qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrog@zabor.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] fix breakpoint address conversions
Date: Fri, 7 Apr 2006 23:39:49 +0200	[thread overview]
Message-ID: <fb249edb0604071439h7fd3b9e4wb3009482e656f25e@mail.gmail.com> (raw)
In-Reply-To: <fb249edb0604071438w36fd932bn102907f852f2b0ef@mail.gmail.com>

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

On 07/04/06, andrzej zaborowski <balrog@zabor.org> wrote:
> Hi,
> This patch adds conversion of the breakpoint addresses from the target
> to host space when invalidating translation blocks.
> This issue prevented breakpoints from working on machines that have
> physical memory mapped starting at a different place than address zero
> (such as TI OMAP boards), except for the cases when the translation
> block was accidentaly invalidated due to e.g a jump, at the same time.
> As a result this was also breaking the stepping single instructions in
> gdb. This patch fixes this problem.
> --
> balrog 2oo6
>
> Dear Outlook users: Please remove me from your address books
> http://www.newsforge.com/article.pl?sid=03/08/21/143258
>

I forgot about the attachment...
--
balrog 2oo6

Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258

[-- Attachment #2: qemu-breakpoints.patch --]
[-- Type: application/octet-stream, Size: 809 bytes --]

diff -pNaur qemu/exec.c qemu-omap-clean/exec.c
--- qemu/exec.c	2006-02-08 22:43:39.000000000 +0000
+++ qemu-omap-clean/exec.c	2006-04-07 20:56:55.000000000 +0000
@@ -993,9 +993,17 @@ static void tb_reset_jump_recursive(Tran
 #if defined(TARGET_HAS_ICE)
 static void breakpoint_invalidate(CPUState *env, target_ulong pc)
 {
-    target_ulong phys_addr;
+    target_ulong phys_addr, addr, pd;
+    PhysPageDesc *p;
 
-    phys_addr = cpu_get_phys_page_debug(env, pc);
+    addr = cpu_get_phys_page_debug(env, pc);
+    p = phys_page_find(addr >> TARGET_PAGE_BITS);
+    if (!p) {
+        pd = IO_MEM_UNASSIGNED;
+    } else {
+        pd = p->phys_offset;
+    }
+    phys_addr = (pd & TARGET_PAGE_MASK) | (addr & ~TARGET_PAGE_MASK);
     tb_invalidate_phys_page_range(phys_addr, phys_addr + 1, 0);
 }
 #endif

      reply	other threads:[~2006-04-07 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 21:38 [Qemu-devel] [PATCH] fix breakpoint address conversions andrzej zaborowski
2006-04-07 21:39 ` andrzej zaborowski [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=fb249edb0604071439h7fd3b9e4wb3009482e656f25e@mail.gmail.com \
    --to=balrog@zabor.org \
    --cc=balrogg@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).