This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] -stack-select-frame


 > My concern was that this added a new item to a response which previous
 > had zero.  Why do you think people couldn't use it as is?  Seems
 > perfectly usable to me; if you know the level of a frame you want to
 > select, then you probably already have the result of a backtrace which
 > includes a printout of the stack frame, so you probably don't need
 > another!

-stack-select-frame without an argument currently works like the CLI command
"frame" without the output.  All "frame" does is output the current frame,
so without output its a bit of a no-op.

-stack-select-frame with an argument just works like up, down or more
precisely "frame FRAMENUM".  So ,these CLI commands could be used directly in
the short term, and via "-interpreter-exec console" in the longer term, if the
frontend is not interested in the output.

 > Could you explain why you think we need output here?

If you have a backtrace then, no, you don't need the output and the frontend
can ignore it.  However, I presume "-stack-select-frame" runs more quickly
than "-stack-list-frames" so, if you don't need a backtrace, its probably best
not to require one.

 > >  > > ! ^done,frame=@{level="2",addr="0x000107a4",func="foo",
 > >  > > !   file="recursive2.c",fullname="/home/foo/bar/devo/myproject/recursive2.c",line=line="14"@},
 > >  > 
 > >  > The double line= is a typo, right?
 > > 
 > > I've just copied it from another part of the manual.  In the node
 > > "GDB/MI Command Description Format" it says:
 > > 
 > > Manual>    Note the the line breaks shown in the examples are here only for
 > > Manual> readability.  They don't appear in the real output.
 > 
 > No, the bit that says "line=line="14"".

Doh!

Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]