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] add implementation of stack-info-frame MI command


On Thu, 25 Jul 2002 17:03:57 -0700 (PDT)
Keith Seitz <keiths@redhat.com> wrote:

> On Thu, 25 Jul 2002, Andrew Cagney wrote:
> 
> > See my post to GDB.  I think this should be handled as an event and not
> > as a command.
> 
> As Mo has implemented, -stack-info-frame would return the very same
> information as -stack-info-depth.

It would? I was under the impression that -stack-info-depth would return
the number of frames on the stack without taking what the current frame
is into account.

-stack-info-depth
^done,depth="3"
(gdb) 
^done depth 3

-stack-info-frame
^done,level="0"
(gdb) 
^done level 0

up
^done,frame={level="1 ",addr="0x080484a8",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff5c4"}],file="resources.c",line="38"},line="38",file="resources.c"

-stack-info-depth
^done,depth="3"
(gdb) 

-stack-info-frame
^done,level="1"
(gdb) 


> I always thought that -stack-info-frame
> would give information about the current (or given) frame, i.e., saved pc,
> saved registers, etc.

I can't speak as to the original design goals. The existing documentation
for the command is not very clear about what it should do. I just
thought -stack-info-frame would work like -stack-select-frame in
that it would deal with an integer stack level. How is one meant to
query the stack level?

Mo


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