This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: RE: question of watchpoint


I don’t see how GDB could resolve the aliasing; it doesn’t know about page tables.  GDB programs the h/w interface to set the breakpoint (or, rather, asks the kernel to do it).  On IA, it would write the linear address in one of the DR.

One could imagine a h/w that offers watchpoints on physical addresses; then the kernel would do the translation and program the corresponding h/w interface with the resulting physical address.

You could also try it out to see what happens in your case.

Markus.

From: jjren@hxgpt.com <jjren@hxgpt.com>
Sent: 04 March 2019 03:31
To: Metzger, Markus T <markus.t.metzger@intel.com>; gdb <gdb@sourceware.org>
Subject: Re: RE: question of watchpoint

I'm glad to receive your reply.  I got your point. You mean it depends on the architecture implementation.
But If the architecture is evaluated on the physical address, how should be gdb do?

Thanks
Ron

From: Metzger, Markus T<mailto:markus.t.metzger@intel.com>
Date: 2019-03-02 01:32
To: jjren@hxgpt.com<mailto:jjren@hxgpt.com>; gdb<mailto:gdb@sourceware.org>
Subject: RE: question of watchpoint
The question is what the underlying hardware does.  On IA, the watchpoint is evaluated on the linear (virtual) address, so you wouldn't get an exception when modifying the memory via the other mapping.

Markus.

> -----Original Message-----
> From: gdb-owner@sourceware.org<mailto:gdb-owner@sourceware.org> <gdb-owner@sourceware.org<mailto:gdb-owner@sourceware.org>> On Behalf Of
> jjren@hxgpt.com<mailto:jjren@hxgpt.com>
> Sent: 22 February 2019 03:06
> To: gdb <gdb@sourceware.org<mailto:gdb@sourceware.org>>
> Subject: question of watchpoint
>
> Hi,  guys:
>
>     I have a question about watch-point.
>     If the program mapped a physical address(PA)  to two(or more than one)
> virtual address (VA and VB), if I set a watchpiont at Va, after this, I modify VB,
> what does gdb do?
>     Trigger a watchpoint or do nothing? If triggered a watchpoint how to report it?
>     If anyone knows, pls help me with it.
>
>     Thinks a lot.
>
> Ron Ren
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de<http://www.intel.de>
Managing Directors: Christin Eisenschmid, , Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, , Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]