* [Qemu-devel] [PATCH] fix breakpoint address conversions
@ 2006-04-07 21:38 andrzej zaborowski
2006-04-07 21:39 ` [Qemu-devel] " andrzej zaborowski
0 siblings, 1 reply; 2+ messages in thread
From: andrzej zaborowski @ 2006-04-07 21:38 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] fix breakpoint address conversions
2006-04-07 21:38 [Qemu-devel] [PATCH] fix breakpoint address conversions andrzej zaborowski
@ 2006-04-07 21:39 ` andrzej zaborowski
0 siblings, 0 replies; 2+ messages in thread
From: andrzej zaborowski @ 2006-04-07 21:39 UTC (permalink / raw)
To: qemu-devel
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-07 21:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-07 21:38 [Qemu-devel] [PATCH] fix breakpoint address conversions andrzej zaborowski
2006-04-07 21:39 ` [Qemu-devel] " andrzej zaborowski
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).