This is the mail archive of the gdb@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: switching stack/frames in gdb


Oops.. A correction:


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
stack. 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

-----Original Message-----
From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com]On Behalf Of Sunil Alankar
Sent: Wednesday, November 20, 2002 9:22 AM
To: gdb@sources.redhat.com
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.



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