public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Petr Machata <pmachata@redhat.com>
Cc: frysk@sourceware.org
Subject: Re: Shortcomings of HPD '#' identifier qualification syntax
Date: Tue, 08 Apr 2008 13:45:00 -0000	[thread overview]
Message-ID: <47FB7039.3000304@redhat.com> (raw)
In-Reply-To: <20080406073643.GB14265@hridell.englab.brq.redhat.com>

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
>   

  reply	other threads:[~2008-04-08 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07  2:06 Petr Machata
2008-04-08 13:45 ` Andrew Cagney [this message]
2008-04-08 14:56   ` Petr Machata
2008-04-28 11:55   ` Sami Wagiaalla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47FB7039.3000304@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=pmachata@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).