Watchpoints on linux

This proved useful to debug a memory corruption on linux/amd64. I had to adapt it to 64bit: the USER_DR constants are 32bit specific. I found that  #including <sys/user.h> and then using offsets of the form offsetof(struct user, u_debugreg[0]) instead of USER_DR0 is all it takes.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Roland Westrelin

Search

Top Tags
Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today