[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: |
Boyapati, Anitha |
Subject: |
RE: [Qemu-devel] Cross-debugging support in QEMU using GDB |
Date: |
Thu, 29 Oct 2009 17:26:19 +0100 |
Hello Alex,
> > 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.
>
Wow! I just got the gist of entire thing having done the same successfully for
i386. Actually I got confused at multiple points purely because of my mistakes.
As I am running the entire setup on virtual box, I don't have bzImage. I
continued my kernel debugging attempts with linux.img (me in sleep mode :P).
Then I ran an avr32 version of qemu which gave some weird results (the patch
Rabin gave has GDB support in its TODO list and I overlooked it).Indeed the
advice greatly helped to sort out most of the issues :)
On the other hand, I think this can be documented in GDB usage section of QEMU
documentation.
Thanks,
Anitha