This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shortcomings of HPD '#' identifier qualification syntax


Sami and I were brainstorming some #-parsing vs lexing problems friday

We came up with a rough rule of thumb that given a #, everything until until a space (and a finite small set of characters) would be included in the token. Without this something like:
(fhpd) print #libc#environ + #libc.co#errno
would not end how you'd expect. Similarly, this gives us a way to handle the "." in
(fhpd) print #solib#astruct .member
(fhpd) print #solib#afile.c#10
The consequence is that extra tokens such as "@" and ":" can be made to work.


Andrew

Petr Machata wrote:
HPD syntax misses certain features that I'd like to use in ftrace (and
who knows, maybe fhpd users would appreciate them, too).  So here goes
my bikeshed problem:

1) You can't specify ELF symbol version,
2) You can't specify PLT entry

Number 1 can be solved by simply allowing the symbol name to have a form
of "symbolname@version".  "@" is good for that purpose, because it's
non-ambiguous, and already used by readelf to refer to symbol versions.

i noticed, will help with cut/paste.
Number 2 can be resolved in any number of ways. In ftrace, I currently
output traced PLT entries like "#soname#plt:symbolname". This looks
nice, seems to be easy to remember, but would be hard to parse in the
context of ?: ternary expression. objdump uses notation of the form of
"symbol@PLT", which would collide with symbol version syntax. Maybe
something along the lines of ".plt:symbol"?

Opinions? Ideas?

PM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]