* stepping through a flat binary in qemu
@ 2009-10-17 12:55 fpga
2009-10-17 16:11 ` fpga
2009-10-17 23:03 ` Michael Snyder
0 siblings, 2 replies; 4+ messages in thread
From: fpga @ 2009-10-17 12:55 UTC (permalink / raw)
To: gdb
Hi.
I'm trying to step through a tiny real-to-pmode os in qemu using gdb.
I'm using
nasm -f bin emakeimg.asm -o enth.fbin
to assemble the thing and then pasting the 16bit flat binary to a floppy
image
i.e. no debugging symbols.
I've booted the os in qemu with
"qemu -s -S -fda boot.img -boot a"
& also without "-s" (use gstabs)
In another terminal I debug the same image and connect to qemu via
"target remote localhost:1234".
If I type "cont" the OS starts to execute.
If I try to step by typing "break" gdb complains about no symbols.
Is it possible to step through this 16 bit bootloader code and into the OS
proper with no symbols & if not what's the easiest way of putting symbols
in.
I have a problem that if I try to assemble as elf, I have multiple [ORG
statements in the code] which only bin files recognise.
Any help much appreciated.
--
View this message in context: http://www.nabble.com/stepping-through-a-flat-binary-in-qemu-tp25936753p25936753.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: stepping through a flat binary in qemu
2009-10-17 12:55 stepping through a flat binary in qemu fpga
@ 2009-10-17 16:11 ` fpga
2009-10-17 23:03 ` Michael Snyder
1 sibling, 0 replies; 4+ messages in thread
From: fpga @ 2009-10-17 16:11 UTC (permalink / raw)
To: gdb
fpga wrote:
>
> Hi.
> I'm trying to step through a tiny real-to-pmode os in qemu using gdb.
>
> I'm using
> nasm -f bin emakeimg.asm -o enth.fbin
> to assemble the thing and then pasting the 16bit flat binary to a floppy
> image
> i.e. no debugging symbols.
>
> I've booted the os in qemu with
> "qemu -s -S -fda boot.img -boot a"
> & also without "-s" (use gstabs)
>
> In another terminal I debug the same image and connect to qemu via
> "target remote localhost:1234".
> If I type "cont" the OS starts to execute.
>
> If I try to step by typing "break" gdb complains about no symbols.
> Is it possible to step through this 16 bit bootloader code and into the OS
> proper with no symbols & if not what's the easiest way of putting symbols
> in.
>
> I have a problem that if I try to assemble as elf, I have multiple [ORG
> statements in the code] which only bin files recognise.
>
> Any help much appreciated.
>
>
Its ok I've sorted it using this thread
http://qemu-forum.ipi.fi/viewtopic.php?f=22&t=4544
Thanks very much dhbaird!
If there's any more useful advice re this I'd appreciate it
--
View this message in context: http://www.nabble.com/stepping-through-a-flat-binary-in-qemu-tp25936753p25938062.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: stepping through a flat binary in qemu
2009-10-17 12:55 stepping through a flat binary in qemu fpga
2009-10-17 16:11 ` fpga
@ 2009-10-17 23:03 ` Michael Snyder
2009-10-18 16:18 ` fpga
1 sibling, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2009-10-17 23:03 UTC (permalink / raw)
To: fpga; +Cc: gdb
fpga wrote:
> Hi.
> I'm trying to step through a tiny real-to-pmode os in qemu using gdb.
>
> I'm using
> nasm -f bin emakeimg.asm -o enth.fbin
> to assemble the thing and then pasting the 16bit flat binary to a floppy
> image
> i.e. no debugging symbols.
>
> I've booted the os in qemu with
> "qemu -s -S -fda boot.img -boot a"
> & also without "-s" (use gstabs)
>
> In another terminal I debug the same image and connect to qemu via
> "target remote localhost:1234".
> If I type "cont" the OS starts to execute.
>
> If I try to step by typing "break" gdb complains about no symbols.
> Is it possible to step through this 16 bit bootloader code and into the OS
> proper with no symbols & if not what's the easiest way of putting symbols
> in.
>
> I have a problem that if I try to assemble as elf, I have multiple [ORG
> statements in the code] which only bin files recognise.
>
> Any help much appreciated.
Probably need to use stepi, since step depends on line symbols.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: stepping through a flat binary in qemu
2009-10-17 23:03 ` Michael Snyder
@ 2009-10-18 16:18 ` fpga
0 siblings, 0 replies; 4+ messages in thread
From: fpga @ 2009-10-18 16:18 UTC (permalink / raw)
To: gdb
Michael Snyder-6 wrote:
>
> fpga wrote:
>> Hi.
>> I'm trying to step through a tiny real-to-pmode os in qemu using gdb.
>>
>> I'm using
>> nasm -f bin emakeimg.asm -o enth.fbin
>> to assemble the thing and then pasting the 16bit flat binary to a floppy
>> image
>> i.e. no debugging symbols.
>>
>> I've booted the os in qemu with
>> "qemu -s -S -fda boot.img -boot a"
>> & also without "-s" (use gstabs)
>>
>> In another terminal I debug the same image and connect to qemu via
>> "target remote localhost:1234".
>> If I type "cont" the OS starts to execute.
>>
>> If I try to step by typing "break" gdb complains about no symbols.
>> Is it possible to step through this 16 bit bootloader code and into the
>> OS
>> proper with no symbols & if not what's the easiest way of putting symbols
>> in.
>>
>> I have a problem that if I try to assemble as elf, I have multiple [ORG
>> statements in the code] which only bin files recognise.
>>
>> Any help much appreciated.
>
> Probably need to use stepi, since step depends on line symbols.
>
>
Yes that works
Thanks Michael
--
View this message in context: http://www.nabble.com/stepping-through-a-flat-binary-in-qemu-tp25936753p25945835.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-18 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-17 12:55 stepping through a flat binary in qemu fpga
2009-10-17 16:11 ` fpga
2009-10-17 23:03 ` Michael Snyder
2009-10-18 16:18 ` fpga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox