This is the mail archive of the
mailing list for the GDB project.
Re: Checking if addess is on stack?
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 20 Apr 2006 13:22:05 +0300
- Subject: Re: Checking if addess is on stack?
- References: <email@example.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Vladimir Prus <firstname.lastname@example.org>
> Date: Thu, 20 Apr 2006 12:49:53 +0400
> in order to improve watchpoints handling in KDevelop, I need to figure out
> if a given address is part of current frame's stack. Is there any command
> to produce that information? I guess I can look at frame base address and
> check if my address is "close" to that, but it's a bit unreliable.
> For reference, the watchpoint changes for KDevelop are outlined at:
I think one way to solve the problems you describe in that URL is to
set a temporary breakpoint whose commands set the watchpoint:
> watch ptr->i
(and similarly for block-local variables: put a breakpoint on the
block's first line). If you want to keep the watchpoints between
sessions, record the temporary breakpoints and reinsert them when the
Would this do what you want?