This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [RFC] Collecting strings at tracepoints
- From: Tom Tromey <tromey at redhat dot com>
- To: Stan Shebs <stan at codesourcery dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Tue, 08 Jun 2010 15:18:51 -0600
- Subject: Re: [RFC] Collecting strings at tracepoints
- References: <4C0983C3.6000604@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "Stan" == Stan Shebs <stan@codesourcery.com> writes:
Stan> For tracepoint collection, I think the automatic heuristic is probably
Stan> not a good idea.
I agree.
Stan> Looking at how '@' syntax works, we can extend it without disrupting
Stan> expression parsing much. For instance, "str@@" could mean to
Stan> deference str, and collect bytes until a 0 is seen, or the print
Stan> elements limit is reached (implication is that we would have to tell
Stan> the target that number). The user could exercise even finer control
Stan> by supplying the limit explicitly, for instance "str@/80" to collect
Stan> at most 80 chars of the string. ("str@@80" seems like it would cause
Stan> ambiguity problems vs "str@@").
Wouldn't it be "*str @@ 80" (note the leading "*").
I'm not super fond of the syntax, but I think it is probably as good as
anything else I'd think up :-)
Stan> Under the hood, it's not yet clear if we will need additional
Stan> bytecodes, but probably so.
If you add additional AX bytecodes, please consider adding what is
needed for DWARF location expressions at the same time:
http://sourceware.org/bugzilla/show_bug.cgi?id=11662
It seems better to batch such changes.
Tom