qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] GDB


From: Ademar de Souza Reis Jr.
Subject: Re: [Qemu-discuss] GDB
Date: Mon, 28 Nov 2011 11:09:35 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Nov 26, 2011 at 06:55:51PM -0800, Rick Hodgin wrote:
> Greetings!
> 
> I have set QEMU for i386-softmmu, and have written some custom apps which 
> populate a floppy disk image with the boot sector, plus other custom 
> programs.  They all load properly and all is working as on a real 386 
> machine.  Fantastic!
> 
> I see that QEMU has GDB support to debug code running on its virtual CPU.
> 
> I have tried to set this up using:
> qemu -gdb -S -m 64 -no-fd-bootchk -fda floppy.img
> 
> And QEMU returns:
> "qemu: could not open gdbserver on device '-S'"
> 
> 
> I'm not sure what this message is telling me.  According to this page 
> (http://wiki.qemu.org/Documentation/Debugging), the -S option should halt the 
> CPU at startup, allowing remote GDB connection.

-gdb requires a parameter. In this case, -S is being interpreted
as such.

$ qemu --help | grep gdb
-gdb dev        wait for gdb connection on 'dev'
-s              shorthand for -gdb tcp::1234

> 
> I would like to use GDB on the same (or remote) machine and connect to the 
> launched-but-paused QEMU instance, and then be able to resume and break on 
> INT 3 opcodes, or single-step through disassembly examining instructions, 
> registers and memory contents.
> 
> Can somebody point me in the right direction?

The man page has the details.

Cheers,
   - Ademar

-- 
Ademar de Souza Reis Jr.
Red Hat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]