From: Dmytro Bablinyuk <dmytro.bablinyuk@tait.co.nz>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: How to configure gdb on arm-linux (for CDB89712)
Date: Fri, 07 Feb 2003 22:35:00 -0000 [thread overview]
Message-ID: <3E4434CA.5070001@tait.co.nz> (raw)
>> On host:
>>
>> This GDB was configured as "--host=i686-pc-linux-gnu
>> --target=arm-linux"...
>> (gdb) target remote 172.25.193.23:1023
>> Remote debugging using 172.25.193.23:1023
>> 0x00008110 in _start ()
>> (gdb) b main
>> Breakpoint 1 at 0x8158: file hello.c, line 4.
>> (gdb) c
>> Continuing.
>>
>> Program received signal SIGILL, Illegal instruction.
>> 0x00008114 in _start ()
>> (gdb)
>>
>>
>> On target(CDB89712)
>>
>> # gdbserver 172.25.140.19:1023 /armdevelop/hello
>> Process /armdevelop/hello created; pid = 196
>> Remote debugging from host 172.25.140.19
>> hello(135): undefined instruction: pc=00008114
>> Code: e91ba800 e3a0b000 (e7ffdefe) e1a0100d e0812100
>> Killing inferior
>> #
>
>
>
> This is a known problem between GDB 5.3 and uclibc: uclibc doesn't
> leave the identifying marks that GDB uses to figure out that something
> is a "Linux" binary rather than a "generic ELF" binary. Try a CVS
> snapshot of GDB and I bet it'll work.
Thank you Daniel,
I got a CVS snapshot and I have a little different result now.
I tried to compile it the same way (arm-linux) and using
armv4l-unknown-linux option but in both cases result was the same
"Segmentation fault"
Below I attached a debug output from gdb and gdbserver.
May be I am doing something plainly wrong?
Another interesting detail I noticed - in previous version I had
0x00008110 in _start () in this version 0x40000d20 in ?? ().
On host:
[root@sardine gdbserver]# arm-gdb -nw
/home/Dmytro/Dev/armlinux/ramdisk/target/armdevelop/hello
GNU gdb 2003-02-07-cvs
Copyright 2003 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 "--host=i686-pc-linux-gnu
--target=armv4l-unknown-linux"...
(gdb) set debug remote 1
(gdb) set debug target 1
(gdb) target remote marin:1023
Remote debugging using marin:1023
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: T050b:00000000;0d:e0feffbf;0f:200d0040;
target_wait (-1, status) = 42000, status->kind = stopped, signal =
SIGTRAP
Sending packet: $m40000d20,4#87...Ack
Packet received: 0d70a0e1
target_xfer_memory (0x40000d20, xxx, 4, read, xxx) = 4, bytes = 0d 70 a0 e1
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received:
0000000085ffffbf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0feffbf00000000200d00400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
target_fetch_registers (cpsr) = 10000000 0x10 16
target_terminal_ours ()
0x40000d20 in ?? ()
Sending packet: $qSymbol::#5b...Ack
Packet received: OK
Packet qSymbol (symbol-lookup) is supported
(gdb) b main
Breakpoint 1 at 0x8158: file hello.c, line 4.
(gdb) c
Continuing.
Sending packet: $Z0,8110,4#e0...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m8110,4#97...Ack
Packet received: 03000000
target_xfer_memory (0x8110, xxx, 4, read, xxx) = 4, bytes =
03 00 00 00
Sending packet: $X8110,0:#b8...Ack
Packet received:
binary downloading NOT suppported by target
Sending packet: $M8110,4:fedeffe7#ad...Ack
Packet received: OK
target_xfer_memory (0x8110, xxx, 4, write, xxx) = 4, bytes =
fe de ff e7
target_insert_breakpoint (0x8110, xxx) = 0
Sending packet: $m8158,4#a3...Ack
Packet received: 12000000
target_xfer_memory (0x8158, xxx, 4, read, xxx) = 4, bytes = 12 00 00 00
Sending packet: $M8158,4:fedeffe7#b9...Ack
Packet received: OK
target_xfer_memory (0x8158, xxx, 4, write, xxx) = 4, bytes =
fe de ff e7
target_insert_breakpoint (0x8158, xxx) = 0
target_terminal_inferior ()
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
target_resume (-1, continue, 0)
Packet received: T0b0b:e8f8ffbf;0d:90f8ffbf;0f:58310040;
target_wait (-1, status) = 42000, status->kind = stopped, signal =
SIGSEGV
target_terminal_ours_for_output ()
Program received signal SIGSEGV, Segmentation fault.
Sending packet: $m40003158,4#62...Ack
Packet received: 0120dce4
target_xfer_memory (0x40003158, xxx, 4, read, xxx) = 4, bytes = 01 20 dc e4
Sending packet: $g#67...Ack
Packet received:
745100401040014028820000fedeffe7acf8ffbfacf8ffbf388100000000000000000000000000001ccd0040e8f8ffbf266100e890f8ffbf02000000583100400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000020
target_fetch_registers (cpsr) = 10000020 0x20000010 536870928
Sending packet: $m40003158,4#62...Ack
Packet received: 0120dce4
target_xfer_memory (0x40003158, xxx, 4, read, xxx) = 4, bytes = 01 20 dc e4
Sending packet: $mbffff8e8,4#9c...Ack
Packet received: fc2f0040
target_xfer_memory (0xbffff8e8, xxx, 4, read, xxx) = 4, bytes = fc 2f 00 40
Sending packet: $m40002ff4,4#c3...Ack
Packet received: 04b04ce2
target_xfer_memory (0x40002ff4, xxx, 4, read, xxx) = 4, bytes = 04 b0 4c e2
Sending packet: $m40002ff8,4#c7...Ack
Packet received: 30d04de2
target_xfer_memory (0x40002ff8, xxx, 4, read, xxx) = 4, bytes = 30 d0 4d e2
Sending packet: $m40002ffc,4#f2...Ack
Packet received: 40000be5
target_xfer_memory (0x40002ffc, xxx, 4, read, xxx) = 4, bytes = 40 00 0b e5
Sending packet: $m40003000,4#54...Ack
Packet received: 44300be5
target_xfer_memory (0x40003000, xxx, 4, read, xxx) = 4, bytes = 44 30 0b e5
Sending packet: $m40003004,4#58...Ack
Packet received: 0140a0e1
target_xfer_memory (0x40003004, xxx, 4, read, xxx) = 4, bytes = 01 40 a0 e1
Sending packet: $m40003008,4#5c...Ack
Packet received: cca29fe5
target_xfer_memory (0x40003008, xxx, 4, read, xxx) = 4, bytes = cc a2 9f e5
Sending packet: $m4000300c,4#87...Ack
Packet received: 0280a0e1
target_xfer_memory (0x4000300c, xxx, 4, read, xxx) = 4, bytes = 02 80 a0 e1
Sending packet: $m40003010,4#55...Ack
Packet received: 0aa08fe0
target_xfer_memory (0x40003010, xxx, 4, read, xxx) = 4, bytes = 0a a0 8f e0
Sending packet: $m40003014,4#59...Ack
Packet received: 05f7ffeb
target_xfer_memory (0x40003014, xxx, 4, read, xxx) = 4, bytes = 05 f7 ff eb
Sending packet: $m40003018,4#5d...Ack
Packet received: 0030a0e3
target_xfer_memory (0x40003018, xxx, 4, read, xxx) = 4, bytes = 00 30 a0 e3
Sending packet: $m4000301c,4#88...Ack
Packet received: 54300be5
target_xfer_memory (0x4000301c, xxx, 4, read, xxx) = 4, bytes = 54 30 0b e5
Sending packet: $m40003020,4#56...Ack
Packet received: b8229fe5
target_xfer_memory (0x40003020, xxx, 4, read, xxx) = 4, bytes = b8 22 9f e5
Sending packet: $m40003024,4#5a...Ack
Packet received: 58200be5
target_xfer_memory (0x40003024, xxx, 4, read, xxx) = 4, bytes = 58 20 0b e5
Sending packet: $m40003028,4#5e...Ack
Packet received: 54901be5
target_xfer_memory (0x40003028, xxx, 4, read, xxx) = 4, bytes = 54 90 1b e5
Sending packet: $m4000302c,4#89...Ack
Packet received: 02309ae7
target_xfer_memory (0x4000302c, xxx, 4, read, xxx) = 4, bytes = 02 30 9a e7
Sending packet: $m40003030,4#57...Ack
Packet received: 44201be5
target_xfer_memory (0x40003030, xxx, 4, read, xxx) = 4, bytes = 44 20 1b e5
target_terminal_ours ()
frame.c:1439: internal-error: deprecated_update_frame_pc_hack: Assertion
`frame->next != NULL' failed.
A problem internal to GDB has been detected. Further
debugging may prove unreliable.
Quit this debugging session? (y or n) n
Create a core file of GDB? (y or n) y
Sending packet: $M8110,4:03000000#34...Ack
Packet received: OK
target_xfer_memory (0x8110, xxx, 4, write, xxx) = 4, bytes =
03 00 00 00
target_remove_breakpoint (0x8110, xxx) = 0
Sending packet: $M8158,4:12000000#40...Ack
Packet received: OK
target_xfer_memory (0x8158, xxx, 4, write, xxx) = 4, bytes = 12 00 00 00
target_remove_breakpoint (0x8158, xxx) = 0
target_terminal_ours ()
0x40003158 in ?? ()
(gdb) n
target_terminal_ours ()
Cannot find bounds of current function
(gdb) quit
The program is running. Exit anyway? (y or n) y
Sending packet: $k#6b...Ack
target_mourn_inferior ()
target_kill ()
[root@sardine gdbserver]#
On target:
# gdbserver 172.25.140.19:1023 /armdevelop/hello
Process /armdevelop/hello created; pid = 43
Remote debugging from host 172.25.140.19
Killing inferior
# tail /var/log/messages
Jan 1 00:00:33 name user.info klogd: eth0: using half-duplex 10Base-T
(RJ-45)
Jan 1 00:20:33 name syslog.info -- MARK --
Jan 1 00:32:35 name user.debug klogd: hello: unhandled page fault at
pc=0x40003158, lr=0x00000002 (bad address=0xe8006126, code 0)
Jan 1 00:33:51 name user.debug klogd: hello: unhandled page fault at
pc=0x40003158, lr=0x00000002 (bad address=0xe8006126, code 0)
Jan 1 00:40:33 name syslog.info -- MARK --
Jan 1 00:40:36 name user.debug klogd: hello: unhandled page fault at
pc=0x40003158, lr=0x00000002 (bad address=0xe8006126, code 0)
Jan 1 00:48:54 name user.debug klogd: hello: unhandled page fault at
pc=0x40003148, lr=0xe7ffdefe (bad address=0x7ffe7118, code 0)
Jan 1 00:59:59 name user.debug klogd: hello: unhandled page fault at
pc=0x40003158, lr=0x00000002 (bad address=0xe8006126, code 0)
Jan 1 01:00:33 name syslog.info -- MARK --
Jan 1 01:08:55 name user.debug klogd: hello: unhandled page fault at
pc=0x40003158, lr=0x00000002 (bad address=0xe8006126, code 0)
#
--
Dmytro Bablinyuk
Design Engineer Phone: (64)(3) 358 0307
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch
New Zealand
next reply other threads:[~2003-02-07 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 22:35 Dmytro Bablinyuk [this message]
2003-02-08 1:38 ` Dmytro Bablinyuk
2003-02-10 20:31 ` Daniel Jacobowitz
2003-02-10 23:50 ` Dmytro Bablinyuk
2003-02-10 23:53 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2003-02-07 10:38 Dmytro Bablinyuk
2003-02-07 13:27 ` Daniel Jacobowitz
2003-02-08 10:36 ` Erik Andersen
2003-02-08 15:55 ` Daniel Jacobowitz
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=3E4434CA.5070001@tait.co.nz \
--to=dmytro.bablinyuk@tait.co.nz \
--cc=drow@mvista.com \
--cc=gdb@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