This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: possible gdb agent expression extension
- From: David Taylor <dtaylor at emc dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 25 Aug 2014 12:30:02 -0400
- Subject: Re: possible gdb agent expression extension
- Authentication-results: sourceware.org; auth=none
- References: <20426 dot 1406558341 at usendtaylorx2l> <12648 dot 1408745258 at usendtaylorx2l> <83fvgnmzk7 dot fsf at gnu dot org> <7594 dot 1408975383 at usendtaylorx2l> <83lhqclibe dot fsf at gnu dot org>
Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Mon, 25 Aug 2014 10:03:03 -0400
> > From: David Taylor <dtaylor@emc.com>
> >
> > > That @result{} at the end, with nothing after it, does look strange:
> > > what "result" does this give?
> >
> > I was largely copying snippets I found nearby in the agentexpr.texi
> > file. They are of the form:
> >
> > <agent-opcode> <additional items in the agent byte stream> :
> > <items on the stack at start of operation> ==>
> > <items on the stack at end of operation>
>
> Right, but in your case there's nothing after ==>, which is
> unexpected.
>
> Thanks.
Right. Like
if_goto (0x20) offset : a ==>
goto (0x21) offset : ==>
trace (0x0c) : addr size ==>
tracenz (0x2f) : addr size ==>
printf (0x34) numargs string : ==>
end (0x27) : ==>
it means that inputs -- if any -- are consumed; nothing is pushed on the
stack.
[Aside: the documentation is missing the ':' on tracenz and printf. For
that matter, documentation for printf is missing some other stuff, too.]