From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23273 invoked by alias); 23 Nov 2005 00:20:46 -0000 Received: (qmail 23266 invoked by uid 22791); 23 Nov 2005 00:20:46 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Nov 2005 00:20:44 +0000 Received: by zproxy.gmail.com with SMTP id l1so31229nzf for ; Tue, 22 Nov 2005 16:20:42 -0800 (PST) Received: by 10.36.71.15 with SMTP id t15mr4426161nza; Tue, 22 Nov 2005 16:20:42 -0800 (PST) Received: by 10.37.2.35 with HTTP; Tue, 22 Nov 2005 16:20:42 -0800 (PST) Message-ID: <8f2776cb0511221620s66ba1d98y8e012785a1665c0c@mail.gmail.com> Date: Wed, 23 Nov 2005 00:50:00 -0000 From: Jim Blandy To: "Newman, Sarah R" Subject: Re: single stepping mips remote programs built with gcc 4.0 Cc: Daniel Jacobowitz , gdb@sources.redhat.com In-Reply-To: <5990BE666D0436419054489CDD9D505409EE88F5@emss01m10.us.lmco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5990BE666D0436419054489CDD9D505409EE88F5@emss01m10.us.lmco.com> 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: 2005-11/txt/msg00508.txt.bz2 It might be worth pointing out: > (gdb) step > Sending packet: $m80001998,4#70...Ack > Packet received: 27bdffe8 > Sending packet: $M80001998,4:0005000d#43...Ack > Packet received: OK > Sending packet: $m800019b0,4#91...Ack > Packet received: 03e00008 > Sending packet: $M800019b0,4:0005000d#64...Ack > Packet received: OK > Sending packet: $s#73...Ack > Packet received: S05 You've talked about GDB inserting breakpoints for software single-stepping, but you're not using software single-stepping here.=20 Those memory writes are for your user breakpoints at the entry point and exit point of main. The 's' packet indicates that the stub itself is doing the single-stepping. > Sending packet: $m8000199c,4#9b...Ack > Packet received: afbf0010 > Sending packet: $m800019a0,4#90...Ack > Packet received: 0c000664 > Sending packet: $m800019a4,4#94...Ack > Packet received: 00000000 This is weird. It looks like GDB is doing some prologue analysis here, but it's not starting at any function's entry point. That, combined with the fact that you said that disassembly shows you the wrong code, makes me wonder if the debug info is right. When you say 'print &a' or 'print &main', do you get the right addresses?