From: Dirk Behme <dirk.behme@googlemail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Debugging low level ARM with GDB
Date: Thu, 23 Mar 2006 09:25:44 -0000 [thread overview]
Message-ID: <44226996.30202@gmail.com> (raw)
Hello,
I'd like to debug low level ARM bootloader U-Boot using ARM
port of QEMU.
I use qemu-0.8.0-i386.tar.gz for this and start QEMU with
> qemu-system-arm -S -s -m 64 -net none -nographic -kernel
u-boot.bin -monitor null -parallel null -serial null
Waiting gdb connection on port 1234
(Note: u-boot.bin is the binary one, u-boot used below is
the ELF version)
In another window I start ARM gdb, but seems that I'm not
able to step, disassemble etc:
uboot/u-boot-1.1.4> arm-linux-gdb
GNU gdb 6.4
Copyright 2005 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=arm-linux".
(gdb) file u-boot
Reading symbols from uboot/u-boot-1.1.4/u-boot...done.
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x00000000 in ?? ()
(gdb) info r
r0 0x0 0
r1 0x0 0
...
r12 0x0 0
sp 0x0 0
lr 0x0 0
pc 0x0 0
fps 0x0 0
cpsr 0x400001d3 1073742291
(gdb) disassemble
No function contains program counter for selected frame.
(gdb) s
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) c
Continuing.
[pressing ctrl-c] Program received signal 0, Signal 0.
0x00018468 in ?? ()
(gdb) s
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) info r
r0 0xfffecf00 -78080
r1 0x0 0
r2 0x100 256
r3 0x0 0
...
r6 0x0 0
r7 0x400 1024
r8 0x0 0
...
r11 0x0 0
r12 0x18064 98404
sp 0x0 0
lr 0x180f4 98548
pc 0x18468 99432
fps 0x0 0
cpsr 0x600001d3 1610613203
(gdb)
What do I miss here? Seems that program did something, but
I'm not able to debug it.
Two additional questions:
If I load the binary version of image u-boot.bin into QEMU,
how does QEMU know to which start address the image was
linked to? Or do I have to load the ELF file?
If my program want to access the serial ports, how do I have
to configure the serial driver in my program to access these
ports? E.g. which base address do I have to use in the
serial driver? In real HW they differ from chip to chip.
Many thanks and best regards,
Dirk
next reply other threads:[~2006-03-23 9:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-23 9:25 Dirk Behme [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-03-23 16:10 [Qemu-devel] Debugging low level ARM with GDB Dirk Behme
2006-03-23 16:26 ` Paul Brook
2006-03-24 15:46 ` Dirk Behme
2006-03-24 16:28 ` Paul Brook
2006-03-24 16:51 ` Dirk Behme
2006-03-24 17:09 ` Paul Brook
2006-03-27 19:48 ` andrzej zaborowski
2006-03-23 19:44 ` Daniel Jacobowitz
2006-03-24 10:35 Schwarz, Konrad
2006-03-24 16:32 ` Paul Brook
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=44226996.30202@gmail.com \
--to=dirk.behme@googlemail.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).