From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22612 invoked by alias); 18 Apr 2004 16:33:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22604 invoked from network); 18 Apr 2004 16:33:32 -0000 Received: from unknown (HELO aragorn.inter.net.il) (192.114.186.23) by sources.redhat.com with SMTP; 18 Apr 2004 16:33:32 -0000 Received: from zaretski (pns03-205-119.inter.net.il [80.230.205.119]) by aragorn.inter.net.il (MOS 3.4.5-GR) with ESMTP id CSC83627; Sun, 18 Apr 2004 19:32:57 +0300 (IDT) Date: Sun, 18 Apr 2004 16:33:00 -0000 From: "Eli Zaretskii" To: Brian Ford Message-Id: <3405-Sun18Apr2004192849+0300-eliz@gnu.org> CC: jimb@redhat.com, gdb-patches@sources.redhat.com In-reply-to: (message from Brian Ford on Mon, 5 Apr 2004 16:57:46 -0500 (CDT)) Subject: Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp) Reply-to: Eli Zaretskii References: <8011-Fri02Apr2004094123+0300-eliz@gnu.org> <2719-Fri02Apr2004213907+0300-eliz@gnu.org> <6654-Sat03Apr2004110513+0300-eliz@gnu.org> X-SW-Source: 2004-04/txt/msg00400.txt.bz2 > Date: Mon, 5 Apr 2004 16:57:46 -0500 (CDT) > From: Brian Ford > > > So the only way to get those register numbers to appear at all is to > > get a variable allocated to them. You'll never get a variable > > allocated to %esp. And you'll never get a varable allocated to %ebp > > unless you compile with -fomit-frame-pointer. So, if I compile the > > attached program with GCC 3.3 passing -O -fomit-frame-pointer, 'n' > > gets allocated to %ebp. > > FWIW, this does show the problem clearly on Cygwin. > > ford@fordpc ~ > $ gcc -g -O -fomit-frame-pointer frameless.c -o frameless_stab.exe > > ford@fordpc ~ > $ gdb frameless_stab.exe > [...] > (gdb) info address n > Symbol "n" is a variable in register esp. > (gdb) p n > $1 = 2289692 I see a similar bug in frameless.c compiled with the DJGPP port of GCC using -gstabs+. So indeed the bug uncovered by Brian exists in DJGPP as well, and the patch for stabs register renumbering will fix it for DJGPP. Thanks!