All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue: qemu-kvm with gdb
@ 2011-03-24  6:17 shiv chauhan
  2011-03-24  7:14 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: shiv chauhan @ 2011-03-24  6:17 UTC (permalink / raw)
  To: kvm

Hi all,

While remote debugging a kernel (not written in C and no debugging
symbols) using qemu-kvm with gdb, strange it does not stop at
breakpoint though qemu works well:

Commands:
 # qemu-kvm -s -S -hda hd.img &
#gdb
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x0000fff0 in ?? ()
(gdb) break *0x200020
Breakpoint 1 at 0x200020
(gdb) c

This break point never reach, though I am sure this address comes in
execution control path, above all same sequence of commands work well
with qemu, anybody else faced such issue? or any explanation for this
behavior?


Thanks,
SPC

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issue: qemu-kvm with gdb
  2011-03-24  6:17 Issue: qemu-kvm with gdb shiv chauhan
@ 2011-03-24  7:14 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2011-03-24  7:14 UTC (permalink / raw)
  To: shiv chauhan; +Cc: kvm

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On 2011-03-24 07:17, shiv chauhan wrote:
> Hi all,
> 
> While remote debugging a kernel (not written in C and no debugging
> symbols) using qemu-kvm with gdb, strange it does not stop at
> breakpoint though qemu works well:
> 
> Commands:
>  # qemu-kvm -s -S -hda hd.img &
> #gdb
> (gdb) target remote localhost:1234
> Remote debugging using localhost:1234
> 0x0000fff0 in ?? ()
> (gdb) break *0x200020
> Breakpoint 1 at 0x200020
> (gdb) c
> 
> This break point never reach, though I am sure this address comes in
> execution control path, above all same sequence of commands work well
> with qemu, anybody else faced such issue? or any explanation for this
> behavior?

Breakpoints in emulation mode are like hardware breakpoints: It doesn't
matter if the guest writes to their location. However, KVM software
breakpoints (the default) work via injecting an INT3 into the guest
code. So you may be more lucky with hbreak.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-24  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  6:17 Issue: qemu-kvm with gdb shiv chauhan
2011-03-24  7:14 ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.