seems like DR0-DR3 are not changed :
[0]kdb> md 0xa0f7bc94
0xa0f7bc94 00000000 00000001 00000003 00000000 ................
0xa0f7bca4 00000000 a0e1c70d a0e1c722 a0e1c72a .....Çá "Çá *Çá
0xa0f7bcb4 a0e6a7e0 a0e6a820 00000028 0000001c à§æ ¨æ (.......
0xa0f7bcc4 00000000 00000000 00000000 00000000 ................
0xa0f7bcd4 00000000 00000000 00000000 a0e1ca05 .............Êá
0xa0f7bce4 a0e1ca08 a0e1ca1a a0e1ca28 a0e1ca3c .Êá .Êá (Êá <Êá
0xa0f7bcf4 a0e1ca4e 00000000 00000000 03020100 NÊá ............
0xa0f7bd04 07060504 0b0a0908 0f0e0d0c 13121110 ................
[0]kdb> bpha 0xa0f7bc94 dataw 4
[0]kdb> bpha 0xa0f7bc94 dataw 4
Forced Data Write BP #0 at 0xa0f7bc94
is enabled in dr0 for 4 bytes globally
[0]kdb> rd d
[0]kdb> rd d
dr0 = 0x00000000 dr1 = 0x00000000 dr2 = 0x00000000 dr3 = 0x00000000
dr6 = 0xffff0ff0 dr7 = 0x00000400
[0]kdb>
jidong xiao wrote:
> On Wed, May 7, 2008 at 3:07 PM, Avi Nehori <[EMAIL PROTECTED]> wrote:
>
>> I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior).
>> the memory address is being written through a kernel module .
>> please see below :
>>
>> [0]kdb> md 0xa0f7bc94
>> 0xa0f7bc94 00000000 00000001 00000003 00000000 ................
>> [0]kdb> bpha 0xa0f7bc94 dataw 4
>>
> Okay, please can you run "rd d" at this moment to display the debug
> registers(and paste out the result of course), I somewhat feel DR0-DR3
> were not changed but actually they are supposed to represent the
> breakpoint location virtual address.
>
> Regards
> Jason
>
>
>> [0]kdb> go
>>
>>
>> the breakpoint is not called even though the memory address being changed:
>> [0]kdb> md 0xa0f7bc94
>> 0xa0f7bc94 00000064 00000001 00000003 00000000 d...............
>>
>>
>>
>>
>> jidong xiao wrote:
>>
>>> On Wed, May 7, 2008 at 2:41 PM, Avi Nehori <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>> Thanks for your reply Jay,
>>>> I'm running i386 and the thing is that when i set the breakpoint on a
>>>> memory address(trying to catch a memory
>>>> corruption bug) the watch point is not getting hit when the memory is
>>>> written.
>>>> I'm following the kdb documentation which says :
>>>>
>>>> "The |bph| and |bpha| commands can be used (provided the architecture
>>>> supports use of hardware registers) to apply read and write breakpoints.
>>>> This means we can get control whenever data is read from or written into
>>>> a particular address. This can be extremely handy when debugging
>>>> data/memory corruption problems, where you can use it to identify the
>>>> corrupting code/process."
>>>>
>>>> *Examples*
>>>>
>>>> *To enter the kernel debugger whenever four bytes are written into
>>>> address 0xc0204060:*
>>>> | [0]kdb> bph 0xc0204060 dataw 4
>>>>
>>>>
>>>> so i followed the documentation and set a breakpoint using bph (and
>>>> also bpha) on a memory address
>>>> exactly as the above example ,but when i modify the memory address
>>>> ,the breakpoint does not hit....
>>>> any idea what is wrong here ?
>>>> any help will be very appreciated .
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>> What the kernel version are you using? and how do you modify the memory
>>>
>> address?
>>
>>> Regards
>>> Jason Xiao
>>>
>>>
>>>
>>>
>>>> ||
>>>>
>>>>
>>>> ||
>>>> |
>>>>
>>>>
>>>>
>>>>
>>>> Jay Lan wrote:
>>>>
>>>>
>>>>
>>>>> Avi Nehori wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>> I'm trying to set a watch point with bpha as follows :
>>>>>> bpha address dataw 4
>>>>>> but the watchpoint is never called when the memory address is
>>>>>>
>> changed.
>>
>>>>>> is it a know bug ?
>>>>>> is there a patch ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> I heard bph/bpha worked on x86_64. However, hardware breakpoint
>>>>> was not implemented on IA64. Were you on IA64?
>>>>>
>>>>> Greg Banks of SGI ([EMAIL PROTECTED]) provided patches for IA64. Many
>>>>> thanks to Greg!
>>>>> 1) gnb-kdb-implement-bpha-v3
>>>>> This patch implemented bph/bpha on IA64.
>>>>> 2) gnb-test-kdb-bph
>>>>> This patch provided a test infrastructure to test all the ia64
>>>>> data* breakpoint features.
>>>>>
>>>>> I have uploaded the patches to the download area.
>>>>> ftp://oss.sgi.com/projects/kdb/download/v4.4
>>>>>
>>>>>
>>>>> Cheers,
>>>>> - jay
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Thanks.
>>>>>> ---------------------------
>>>>>> Use http://oss.sgi.com/ecartis to modify your settings or to
>>>>>>
>> unsubscribe.
>>
>>>>>>
>>>>>>
>>>>> Scanned by Check Point Total Security Gateway.
>>>>>
>>>>>
>>>>>
>>>> ---------------------------
>>>> Use http://oss.sgi.com/ecartis to modify your settings or to
>>>>
>> unsubscribe.
>>
>>>>
>>>>
>>> Scanned by Check Point Total Security Gateway.
>>>
>>>
>>>
>>>
>
> Scanned by Check Point Total Security Gateway.
>
>
---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.