public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Shortcomings of HPD '#' identifier qualification syntax
@ 2008-04-07  2:06 Petr Machata
  2008-04-08 13:45 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Machata @ 2008-04-07  2:06 UTC (permalink / raw)
  To: frysk

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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.

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shortcomings of HPD '#' identifier qualification syntax
  2008-04-07  2:06 Shortcomings of HPD '#' identifier qualification syntax Petr Machata
@ 2008-04-08 13:45 ` Andrew Cagney
  2008-04-08 14:56   ` Petr Machata
  2008-04-28 11:55   ` Sami Wagiaalla
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cagney @ 2008-04-08 13:45 UTC (permalink / raw)
  To: Petr Machata; +Cc: frysk

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
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shortcomings of HPD '#' identifier qualification syntax
  2008-04-08 13:45 ` Andrew Cagney
@ 2008-04-08 14:56   ` Petr Machata
  2008-04-28 11:55   ` Sami Wagiaalla
  1 sibling, 0 replies; 4+ messages in thread
From: Petr Machata @ 2008-04-08 14:56 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: frysk

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

On Tue, Apr 08, 2008 at 09:16:41AM -0400, Andrew Cagney wrote:
> Sami and I were brainstorming some #-parsing vs lexing problems friday

>  (fhpd) print #solib#astruct .member

Hmm, the necessity to insert spaces into expressions to disambiguate
parsing is nasty.  Unfortunately I have no better idea.

Anyway, in that case I'm leaving the #-output of ftrace as it is with
plt: for designation of plt entries.

PM

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Shortcomings of HPD '#' identifier qualification syntax
  2008-04-08 13:45 ` Andrew Cagney
  2008-04-08 14:56   ` Petr Machata
@ 2008-04-28 11:55   ` Sami Wagiaalla
  1 sibling, 0 replies; 4+ messages in thread
From: Sami Wagiaalla @ 2008-04-28 11:55 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Petr Machata, frysk

I am now starting to implement # parsing in the search engine.
I would like to generate a list of all possible queries that
the search engine can be asked for.

Here is what I have so far:
- #lib#file#symbol
  - #lib#file#symbol@version ?
  - #lib#file#plt:symbol ?
- #lib#symbol
  - #lib#symbol@version ?
  - #lib#plt:symbol ?
- #file#symbol
- #file#line

Any additions, corrections, comments ?

Sami Wagiaalla

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-25 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07  2:06 Shortcomings of HPD '#' identifier qualification syntax Petr Machata
2008-04-08 13:45 ` Andrew Cagney
2008-04-08 14:56   ` Petr Machata
2008-04-28 11:55   ` Sami Wagiaalla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).