From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14789 invoked by alias); 4 Mar 2005 15:51:50 -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 14617 invoked from network); 4 Mar 2005 15:51:39 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Mar 2005 15:51:39 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j24FpdWB017293 for ; Fri, 4 Mar 2005 10:51:39 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j24FpcK29939 for ; Fri, 4 Mar 2005 10:51:38 -0500 Received: from cygbert.vinschen.de (vpn50-12.rdu.redhat.com [172.16.50.12]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j24FpZ5s028837 for ; Fri, 4 Mar 2005 10:51:36 -0500 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 6769057D6E; Fri, 4 Mar 2005 16:51:27 +0100 (CET) Date: Fri, 04 Mar 2005 15:51:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] New GDB target iq2000 Message-ID: <20050304155127.GH2839@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20050222114141.GA18314@cygbert.vinschen.de> <20050303173443.GD18681@nevyn.them.org> <20050304094605.GU2839@cygbert.vinschen.de> <20050304141439.GA30249@nevyn.them.org> <20050304150129.GF2839@cygbert.vinschen.de> <20050304150629.GA32143@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050304150629.GA32143@nevyn.them.org> User-Agent: Mutt/1.4.2i X-SW-Source: 2005-03/txt/msg00045.txt.bz2 On Mar 4 10:06, Daniel Jacobowitz wrote: > On Fri, Mar 04, 2005 at 04:01:29PM +0100, Corinna Vinschen wrote: > > All three cases don't look like simple coincidence. In all three cases > > we suffer from either optimized code or unavailable debug information. > > The target specific "knowledge", which is represented by the call to > > iq2000_scan_prologue helps to master this situation. > > Would you mind posting disassembly, line table (readelf -wl), and GDB > transcript for these failures? Sure. First the both break.exp fails, which are interlocked: FAIL: gdb.base/break.exp: breakpoint small function, optimized file FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file - Disassembly of function marker4: 80000368 : 80000368: 27 bd ff f0 addiu r29,r29,0xfff0 8000036c <$LCFI9>: 8000036c: af bb 00 08 sw r27,0x8(r29) 80000370 <$LCFI10>: 80000370: 00 1d d8 25 or r27,r0,r29 80000374 <$LCFI11>: 80000374: af 64 00 00 sw r4,0x0(r27) 80000378 <$LM8>: 80000378: 00 1b e8 25 or r29,r0,r27 8000037c: 8f bb 00 08 lw r27,0x8(r29) 80000380: 00 00 00 00 nop 80000384: 27 bd 00 10 addiu r29,r29,0x10 80000388: 03 e0 00 08 jr r31 8000038c: 00 00 00 00 nop - Line table for file break1.c: Line Number Statements: Extended opcode 2: set Address to 0x800002e8 Special opcode 49: advance Address by 0 to 0x800002e8 and Line by 39 to 40 Extended opcode 2: set Address to 0x800002f4 Copy Extended opcode 2: set Address to 0x80000310 Special opcode 11: advance Address by 0 to 0x80000310 and Line by 1 to 41 Extended opcode 2: set Address to 0x80000320 Copy Extended opcode 2: set Address to 0x8000033c Special opcode 11: advance Address by 0 to 0x8000033c and Line by 1 to 42 Extended opcode 2: set Address to 0x80000350 Copy Extended opcode 2: set Address to 0x80000368 Special opcode 11: advance Address by 0 to 0x80000368 and Line by 1 to 43 Extended opcode 2: set Address to 0x80000378 Copy Extended opcode 2: set Address to 0x80000390 Extended opcode 1: End of Sequence - GDB testsuite result with iq2000_skip_prologue: break marker4^M Breakpoint 2 at 0x800001f0: file testsuite/gdb.base/break1.c, line 43.^M (gdb) PASS: gdb.base/break.exp: breakpoint small function, optimized file run^M Starting program: testsuite/gdb.base/breako2 ^M ^M Breakpoint 1, main (argc=0, argv=0x0, envp=0x0) at testsuite/gdb.base/break.c:85^M 85 {^M (gdb) PASS: gdb.base/break.exp: run until function breakpoint, optimized file (code motion) continue^M Continuing.^M 720^M ^M Breakpoint 2, marker4 (d=177601976) at testsuite/gdb.base/break1.c:43^M 43 void marker4 (d) long d; {} /* set breakpoint 13 here */^M PASS: gdb.base/break.exp: run until breakpoint set at small function, optimized file - GDB testsuite result with skip_prologue_using_sal: break marker4^M Breakpoint 2 at 0x800001f8^M (gdb) FAIL: gdb.base/break.exp: breakpoint small function, optimized file run^M Starting program: testsuite/gdb.base/breako2 ^M ^M Breakpoint 1, main (argc=0, argv=0x0, envp=0x0) at testsuite/gdb.base/break.c:85^M 85 {^M (gdb) PASS: gdb.base/break.exp: run until function breakpoint, optimized file (code motion) continue^M Continuing.^M 720^M ^M Breakpoint 2, 0x800001f8 in write_int ()^M (gdb) FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file Now the nodebug.exp case: FAIL: gdb.base/nodebug.exp: running to inner in runto - Disassembly of function inner: 80000048 : 80000048: 27 bd ff f0 addiu r29,r29,0xfff0 8000004c: af bb 00 08 sw r27,0x8(r29) 80000050: 00 1d d8 25 or r27,r0,r29 80000054: af 64 00 00 sw r4,0x0(r27) 80000058: 3c 02 00 00 lui r2,0x0 8000005c: 8f 63 00 00 lw r3,0x0(r27) 80000060: 8c 42 10 00 lw r2,0x1000(r2) 80000064: 00 00 00 00 nop 80000068: 00 62 10 21 addu r2,r3,r2 8000006c: 3c 03 00 00 lui r3,0x0 80000070: 8c 63 10 04 lw r3,0x1004(r3) 80000074: 00 00 00 00 nop 80000078: 00 43 10 21 addu r2,r2,r3 8000007c: 3c 03 00 00 lui r3,0x0 80000080: 8c 63 19 b4 lw r3,0x19b4(r3) 80000084: 00 00 00 00 nop 80000088: 00 43 10 21 addu r2,r2,r3 8000008c: 3c 03 00 00 lui r3,0x0 80000090: 8c 63 19 74 lw r3,0x1974(r3) 80000094: 00 00 00 00 nop 80000098: 00 43 10 21 addu r2,r2,r3 8000009c: 00 1b e8 25 or r29,r0,r27 800000a0: 8f bb 00 08 lw r27,0x8(r29) 800000a4: 00 00 00 00 nop 800000a8: 27 bd 00 10 addiu r29,r29,0x10 800000ac: 03 e0 00 08 jr r31 - Line table for file nodebug.c: There is none since nodebug.c is compiled without -g - GDB testsuite result with iq2000_skip_prologue: (gdb) file testsuite/gdb.base/nodebug^M Reading symbols from testsuite/gdb.base/nodebug...done.^M (gdb) target sim ^M Connected to the simulator.^M (gdb) load^M Loading section .text, size 0x3858 lma 0x80000000^M Loading section .data, size 0x7e0 lma 0x1000^M Loading section .eh_frame, size 0x118 lma 0x17e0^M Loading section .rodata, size 0x7c lma 0x18f8^M Start address 0x80000000^M Transfer rate: 134752 bits in <1 sec.^M (gdb) delete breakpoints^M (gdb) info breakpoints^M No breakpoints or watchpoints.^M (gdb) break inner^M Breakpoint 1 at 0x80000058^M (gdb) target sim ^M Connected to the simulator.^M (gdb) load^M Loading section .text, size 0x3858 lma 0x80000000^M Loading section .data, size 0x7e0 lma 0x1000^M Loading section .eh_frame, size 0x118 lma 0x17e0^M Loading section .rodata, size 0x7c lma 0x18f8^M Start address 0x80000000^M Transfer rate: 134752 bits in <1 sec.^M (gdb) run ^M Starting program: testsuite/gdb.base/nodebug ^M ^M Breakpoint 1, 0x80000058 in inner ()^M - GDB testsuite result with skip_prologue_using_sal: (gdb) file testsuite/gdb.base/nodebug^M Reading symbols from testsuite/gdb.base/nodebug...done.^M (gdb) target sim ^M Connected to the simulator.^M (gdb) load^M Loading section .text, size 0x3858 lma 0x80000000^M Loading section .data, size 0x7e0 lma 0x1000^M Loading section .eh_frame, size 0x118 lma 0x17e0^M Loading section .rodata, size 0x7c lma 0x18f8^M Start address 0x80000000^M Transfer rate: 134752 bits in <1 sec.^M (gdb) delete breakpoints^M (gdb) info breakpoints^M No breakpoints or watchpoints.^M (gdb) break inner^M Breakpoint 1 at 0x0^M (gdb) target sim ^M Connected to the simulator.^M (gdb) load^M Loading section .text, size 0x3858 lma 0x80000000^M Loading section .data, size 0x7e0 lma 0x1000^M Loading section .eh_frame, size 0x118 lma 0x17e0^M Loading section .rodata, size 0x7c lma 0x18f8^M Start address 0x80000000^M Transfer rate: 134752 bits in <1 sec.^M (gdb) run ^M Starting program: testsuite/gdb.base/nodebug ^M ^M *** EXIT code 28^M ^M Program exited with code 034.^M (gdb) FAIL: gdb.base/nodebug.exp: running to inner in runto Note especially the `break inner' which sets a breakpoint to address 0. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat, Inc.