All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre d'Herbemont <pdherbemont@free.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Help with gdb on Mac OS
Date: Mon, 12 Feb 2007 11:17:21 +0100	[thread overview]
Message-ID: <CC800B1B-6C2B-45AB-A023-51D6901F7FDB@free.fr> (raw)
In-Reply-To: <103570.87635.qm@web62001.mail.re1.yahoo.com>


On 12 févr. 07, at 07:54, Ilya Shar wrote:

> I am trying to step through i386-darwin-user/qemu-i386
>
> Program received signal EXC_BAD_ACCESS, Could not
> access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x2115eaf5
> helper_cmpxchg8b () at ../cpu-all.h:344
> 344         ((uint32_t *)ptr)[0] = x.p[0];
> (gdb)
>
> The offending value of ptr is misalligned, can this
> indicate a problem?  Reducing optimization or setting
> -g3 doesn't change this behavior.  Strangely, the same
> example runs fine without gdb.

qemu will handle the signal fine. Actually it is more a feature than  
a bug ;-)

Unfortunately
"(gdb) handle EXC_BAD_ACCESS pass"
is kind of broken as EXC_BAD_ACCESS is not translated to the  
corresponding bsd signal, so qemu won't handle it.

You should probably try to use the gdb interface provided by qemu if  
you wan't to debug the target program instead of qemu:
# i386-darwin-user/qemu-i386 -g /bin/ls

You can now connect to the gdb interface using:
#gdb -arch i386
(gdb) target remote localhost:1234
(gdb) c

Pierre.

      reply	other threads:[~2007-02-12 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  6:54 [Qemu-devel] Help with gdb on Mac OS Ilya Shar
2007-02-12 10:17 ` Pierre d'Herbemont [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CC800B1B-6C2B-45AB-A023-51D6901F7FDB@free.fr \
    --to=pdherbemont@free.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.