From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12140 invoked by alias); 8 Apr 2008 13:17:07 -0000 Received: (qmail 11960 invoked by uid 22791); 8 Apr 2008 13:17:06 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Apr 2008 13:16:50 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m38DGmaQ009443 for ; Tue, 8 Apr 2008 09:16:48 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m38DGm58016265 for ; Tue, 8 Apr 2008 09:16:48 -0400 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m38DGlCG013946; Tue, 8 Apr 2008 09:16:47 -0400 Message-ID: <47FB7039.3000304@redhat.com> Date: Tue, 08 Apr 2008 13:45:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Petr Machata CC: frysk@sourceware.org Subject: Re: Shortcomings of HPD '#' identifier qualification syntax References: <20080406073643.GB14265@hridell.englab.brq.redhat.com> In-Reply-To: <20080406073643.GB14265@hridell.englab.brq.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00036.txt.bz2 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 >