From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11836 invoked by alias); 20 Apr 2006 10:22:06 -0000 Received: (qmail 11827 invoked by uid 22791); 20 Apr 2006 10:22:05 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Apr 2006 10:22:03 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-8-103.inter.net.il [80.230.8.103]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DEA70365 (AUTH halo1); Thu, 20 Apr 2006 13:21:58 +0300 (IDT) Date: Thu, 20 Apr 2006 11:42:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb@sources.redhat.com In-reply-to: (message from Vladimir Prus on Thu, 20 Apr 2006 12:49:53 +0400) Subject: Re: Checking if addess is on stack? Reply-to: Eli Zaretskii References: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00267.txt.bz2 > From: Vladimir Prus > 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: > > http://lists.kde.org/?l=kdevelop-devel&m=114552206721831&w=2 I think one way to solve the problems you describe in that URL is to set a temporary breakpoint whose commands set the watchpoint: tb do_that commands > watch ptr->i > continue > end (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 session starts. Would this do what you want?