From: Andreas Galauner <andreas@galauner.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Cortex-M3: reading NVIC registers causes segfaults
Date: Mon, 17 Feb 2014 15:52:24 +0100 [thread overview]
Message-ID: <53022228.3000201@galauner.de> (raw)
Hi qemu developers,
I'm currently trying to emulate an ARM Cortex-M3 and I need to debug the
system using GDB and IDA Pro. The platform is an STM32 and I'm using a
port from github [1] based on qemu 1.5.1 for that. I ported the custom
STM32 code to qemu 1.7.0 to have a more recent version to work with.
During a debug session, I'm experiencing segfaults in armv7m_nvic.c when
reading the CPUID and Vector base registers (lines 176 and 212), because
ARM_CPU(current_cpu) returns a NULL-pointer. IDA seems to do that quite
regularly. Debugging with GDB works until you try to read the mentioned
registers by hand like this:
> (gdb) target remote :1234
> Remote debugging using :1234
> 0x08005d1c in ?? ()
> (gdb) x/x *0xE000ED00
> Remote connection closed
The original STM32-port was based on qemu 1.5.1 and the behaviour was
the same. That was the reason why I ported all that stuff over to 1.7.0
which unfortunately didn't solve the problem.
Is this a known bug?
Any hints on how I could possibly solve that problem?
- Andy
[1]: https://github.com/beckus/qemu_stm32
next reply other threads:[~2014-02-17 14:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 14:52 Andreas Galauner [this message]
2014-02-17 15:18 ` [Qemu-devel] Cortex-M3: reading NVIC registers causes segfaults Peter Maydell
2014-02-18 1:14 ` Andreas Färber
2014-02-18 9:51 ` Peter Maydell
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=53022228.3000201@galauner.de \
--to=andreas@galauner.de \
--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.