From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30822 invoked by alias); 27 Apr 2006 20:28:28 -0000 Received: (qmail 30811 invoked by uid 22791); 27 Apr 2006 20:28:26 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Apr 2006 20:28:25 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-209-19.inter.net.il [80.230.209.19]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id EBK97281 (AUTH halo1); Thu, 27 Apr 2006 23:28:19 +0300 (IDT) Date: Thu, 27 Apr 2006 20:28:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sources.redhat.com In-reply-to: <20060426190517.GA930@adacore.com> (message from Joel Brobecker on Wed, 26 Apr 2006 12:05:17 -0700) Subject: Re: [RFC] problem fetching inferior memory due to breakpoint Reply-to: Eli Zaretskii References: <20060426190517.GA930@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00360.txt.bz2 > Date: Wed, 26 Apr 2006 12:05:17 -0700 > From: Joel Brobecker > > Break at the first instruction of hello(), and then do a couple of > stepi's: > > (gdb) b *hello > Breakpoint 1 at 0x401050: file foo.c, line 5. > (gdb) run > Starting program: /[...]/foo.exe > > Breakpoint 1, hello () at foo.c:5 > 5 { > (gdb) stepi > 0x00401051 5 { > (gdb) bt > #0 0x00401051 in hello () at foo.c:5 > #1 0x00401093 in main () at foo.c:12 > (gdb) stepi > 0x00401053 in hello () at foo.c:5 > 5 { > > So we're at the third instruction of the function. Here is the backtrace > we get when I request it: > > (gdb) bt > #0 0x00401053 in hello () at foo.c:5 > #1 0x0022ee88 in ?? () > #2 0x00401093 in main () at foo.c:12 > > We get an extra frame between hello() and main(). I cannot reproduce this with a MinGW-compiled program, using GDB 6.3 and 6.3.50.20051116-cvs. What version of GDB are you using? Is this problem visible only in a recent codebase?