🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #1264

Re: Strongly suspected gdb bug.

#1264
From: Eli Zaretskii
Date: Sun, 10 Apr 2005 05:05
41 lines
3204 bytes
> From: Casey Callaghan <casey@spectrumvns.com>
> Date: Fri, 8 Apr 2005 14:58:28 +0200
> 
> (gdb) watch *(Hidden *)0xbffff190
> Watchpoint 2: *(Bug::Hidden *) 3221221776

Here, GDB sets a software watchpoint on that address (because the
Hidden object is too large to watch it with x86 debug registers).

> (gdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x08048488 in main at gdb_bug.cpp:6
>         breakpoint already hit 1 time
> 2   watchpoint     keep y              *(Bug::Hidden *) 3221221776
> (gdb) run
> Starting program: /home/casey/Multicaster/Sender/a.out
> 
> (...seems to just stop here. I had to press ctrl-C to get any further 
> response...)

I think this is because the software watchpoint is still active, so
GDB single-steps the program and checks the watched region after each
instruction.  Can you verify that disabling the watchpoint before you
rerun the program solves the problem?

> Program received signal SIGINT, Interrupt.
> 0x40012a9a in ?? ()
> (gdb) bt
> #0  0x40012a9a in ?? ()
> #1  0x40007f4f in ?? ()
> #2  0x4005b5cf in ?? ()
> #3  0x4005b5cf in ?? ()
> #4  0x00000001 in ?? ()
> #5  0x00000020 in ?? ()
> #6  0x00000000 in ?? ()
> #7  0x00000000 in ?? ()

One possibility for the bogus backtrace is that GDB gets confused by
the startup code.  Try a newer GDB, perhaps it will behave better.  In
any case, I think disabling the watchpoint until the program gets to
your `main' function will work around the backtrace problem as well.
Technical Details
Message-ID: <mailman.960.1113108322.2895.bug-gdb@gnu.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <200504081458.28710.casey@spectrumvns.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f5053,1d707e55d0f6831,start
X-Google-Attributes: gidf5053,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
From: "Eli Zaretskii" <eliz@gnu.org>
Newsgroups: gnu.gdb.bug
Subject: Re: Strongly suspected gdb bug.
Date: Sun, 10 Apr 2005 08:05:06 +0300
Lines: 43
Sender: halo1@zahav.net.il
Approved: bug-gdb@gnu.org
Message-ID: <mailman.960.1113108322.2895.bug-gdb@gnu.org>
References: <200504081458.28710.casey@spectrumvns.com>
Reply-To: Eli Zaretskii <eliz@gnu.org>
NNTP-Posting-Host: lists.gnu.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7BIT
X-Trace: news.Stanford.EDU 1113110108 10814 199.232.76.165 (10 Apr 2005 05:15:08 GMT)
X-Complaints-To: news@news.stanford.edu
Cc: bug-gdb@gnu.org
To: Casey Callaghan <casey@spectrumvns.com>
Envelope-to: bug-gdb@gnu.org
X-Mailer: emacs 22.0.50 (via feedmail 8 I) and Blat ver 2.4
In-reply-to: <200504081458.28710.casey@spectrumvns.com> (message from Casey
 Callaghan on Fri, 8 Apr 2005 14:58:28 +0200)
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=subscribe>