This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
switching stack/frames in gdb
- From: "Sunil Alankar" <sunil dot alankar at coware dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Wed, 20 Nov 2002 09:21:40 -0800
- Subject: switching stack/frames in gdb
I am trying to use gdb to switch threads in a program using qthreads. I was
hoping to use the command 'frame <addr>'. Gdb manual claims "...this can be
useful when your program has multiple stacks and switches between them.".
First of all switching between frames by specifying the frame address seems
to be broken. I can switch only with the frame number. I put in a hack to
make switching by address work. I was not able to switch to a different
frame. I tried using 'frame' command to switch threads in a pthread example
with no success.
Does anybody have some idea on this topic. I would appreciate any help.
Thx
Sunil
Section from GDB manual:
6.3 Selecting a frame
frame addr
f addr
Select the frame at address addr. This is useful mainly if the chaining of
stack frames has been damaged by a bug, making it impossible for GDB to
assign numbers properly to all frames. In addition, this can be useful when
your program has multiple stacks and switches between them.
On the SPARC architecture, frame needs two addresses to select an arbitrary
frame: a frame pointer and a stack pointer.
On the MIPS and Alpha architecture, it needs two addresses: a stack pointer
and a program counter.
On the 29k architecture, it needs three addresses: a register stack pointer,
a program counter, and a memory stack pointer.