From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] New GDB target iq2000
Date: Fri, 04 Mar 2005 15:51:00 -0000 [thread overview]
Message-ID: <20050304155127.GH2839@cygbert.vinschen.de> (raw)
In-Reply-To: <20050304150629.GA32143@nevyn.them.org>
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 <marker4>:
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 <inner>:
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.
next prev parent reply other threads:[~2005-03-04 15:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-22 16:35 Corinna Vinschen
2005-03-01 22:13 ` Jim Blandy
2005-03-01 22:19 ` Daniel Jacobowitz
2005-03-02 9:08 ` Corinna Vinschen
2005-03-03 17:34 ` Daniel Jacobowitz
2005-03-03 17:46 ` Kevin Buettner
2005-03-03 17:51 ` Daniel Jacobowitz
2005-03-03 19:17 ` Kevin Buettner
2005-03-04 9:46 ` Corinna Vinschen
2005-03-04 14:14 ` Daniel Jacobowitz
2005-03-04 15:01 ` Corinna Vinschen
2005-03-04 15:06 ` Daniel Jacobowitz
2005-03-04 15:51 ` Corinna Vinschen [this message]
2005-03-04 16:01 ` Daniel Jacobowitz
2005-03-04 22:01 ` Daniel Jacobowitz
2005-03-05 11:29 ` Mark Kettenis
2005-03-05 16:44 ` Daniel Jacobowitz
2005-03-05 18:13 ` Mark Kettenis
2005-03-05 19:37 ` Daniel Jacobowitz
2005-03-05 20:18 ` Mark Kettenis
2005-03-05 20:20 ` Daniel Jacobowitz
2005-03-07 10:08 ` Corinna Vinschen
2005-03-07 14:05 ` Daniel Jacobowitz
2005-03-07 20:17 ` Corinna Vinschen
2005-03-07 20:37 ` Daniel Jacobowitz
2005-03-08 9:00 ` Corinna Vinschen
2005-03-08 13:32 ` Daniel Jacobowitz
2005-03-07 21:32 ` Daniel Jacobowitz
2005-03-07 21:35 ` Daniel Jacobowitz
2005-03-08 9:00 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050304155127.GH2839@cygbert.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox