[RFC] Collecting strings at tracepoints
Tom Tromey
tromey@redhat.com
Tue Jun 8 21:19:00 GMT 2010
>>>>> "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
More information about the Gdb
mailing list