[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Cross-debugging support in QEMU using GDB
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] Cross-debugging support in QEMU using GDB |
Date: |
Thu, 29 Oct 2009 12:04:08 +0100 |
Hi Anitha,
On 29.10.2009, at 11:20, Boyapati, Anitha wrote:
I have couple of doubts w.r.t cross-debugging in Qemu.
(1) Can Qemu be run without OS support? If so, can I know some
examples where this has been already done?
That what user mode emulation is doing. Instead of emulating the
privileged mode and hardware, it only implements user mode, signals,
syscalls, etc. so an application can run.
Linux user mode emulation is exactly the mode Uli's S390 target
implements.
(2) Can Qemu be used like a simulator to carry out cross-debugging,
typically running a dejaGNU for a target X (again without an OS
support)? The documentation page http://www.qemu.org/qemu-doc.html#SEC1
refers to GDB usage with linux image. I would like to know if the
same can be allowed for other cross-compiled executables.
Essentially, what I am looking for is something like,
qemu-x -s <any_ELF_executable> [options]
targetx-gdb <any_ELF_executable>
Yes. qemu-x -g 1234 <file> <options>
And then use gdb -ex 'target remote localhost:1234'.
where qemu-x is a user mode qemu for target X.
More on (2): if there is no OS, then I think a small application
like bootloader should probably be present to launch the cross-
compiled executable on to Qemu. Any further suggestions on how to
make (2) possible? All the previous threads in developer mail
archives dealt with debugging linux image in some form or the other.
Qemu does that job, interpreting the ELF headers. I'm not sure where
the linking is done though, so maybe better read the code there :-).
Just try out qemu-i386 for now! Try to run a statically linked i386
binary on a non-i386 platform, so you get the hang of it.
Alex