From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8290 invoked by alias); 25 Jan 2002 08:24:49 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8255 invoked from network); 25 Jan 2002 08:24:48 -0000 Received: from unknown (HELO ganesh.ctd.hctech.com) (202.54.64.2) by sources.redhat.com with SMTP; 25 Jan 2002 08:24:48 -0000 Received: by GANESH with Internet Mail Service (5.5.2653.19) id ; Fri, 25 Jan 2002 13:47:43 +0530 Message-ID: From: "Sarnath K - CTD, Chennai." To: Eli Zaretskii , k_sarnath@ctd.hcltech.com Cc: gdb@sources.redhat.com Subject: RE: "xbreak" command in GDB ? Date: Fri, 25 Jan 2002 00:24:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-01/txt/msg00293.txt.bz2 Hi, The following is the session demonstrating failure of "xbreak" on GDB Version 5.1 (for i386), running on Linux kernel 2.4.0/Pentium III. GDB was configured for "i686-pc-linux-gnu". Source: [root@boost /tmp]# cat xbreak.c int main() { a(); } int a() { int i=0, j=0; return 0; } Compilation: [root@boost /tmp]# cc -g -o xbreak xbreak.c Debug session: [root@boost /tmp]# ./gdb ./xbreak GNU gdb 5.1 Copyright 2001 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) xbreak a Breakpoint 1 at 0x80483c6 (gdb) run Starting program: /tmp/./xbreak Program exited normally. (gdb) disassemble a Dump of assembler code for function a: 0x80483ac : push %ebp 0x80483ad : mov %esp,%ebp 0x80483af : sub $0x8,%esp 0x80483b2 : movl $0x0,0xfffffffc(%ebp) 0x80483b9 : movl $0x0,0xfffffff8(%ebp) 0x80483c0 : xor %eax,%eax 0x80483c2 : jmp 0x80483c4 0x80483c4 : leave 0x80483c5 : ret End of assembler dump. Conclusion: The "xbreak" command says that it has set the bkpt at 0x80483c6. But the disassembly says that the last instruction (ret) is at location 0x80483c5. Is this a bug ? Thanks, Sarnath