Changeset 7f1c620 in mainline for arch/amd64/src/debugger.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/debugger.c
r991779c5 r7f1c620 47 47 48 48 typedef struct { 49 __addressaddress; /**< Breakpoint address */49 uintptr_t address; /**< Breakpoint address */ 50 50 int flags; /**< Flags regarding breakpoint */ 51 51 int counter; /**< How many times the exception occured */ … … 123 123 static void setup_dr(int curidx) 124 124 { 125 __nativedr7;125 unative_t dr7; 126 126 bpinfo_t *cur = &breakpoints[curidx]; 127 127 int flags = breakpoints[curidx].flags; … … 154 154 } else { 155 155 if (sizeof(int) == 4) 156 dr7 |= (( __native) 0x3) << (18 + 4*curidx);156 dr7 |= ((unative_t) 0x3) << (18 + 4*curidx); 157 157 else /* 8 */ 158 dr7 |= (( __native) 0x2) << (18 + 4*curidx);158 dr7 |= ((unative_t) 0x2) << (18 + 4*curidx); 159 159 160 160 if ((flags & BKPOINT_WRITE)) 161 dr7 |= (( __native) 0x1) << (16 + 4*curidx);161 dr7 |= ((unative_t) 0x1) << (16 + 4*curidx); 162 162 else if ((flags & BKPOINT_READ_WRITE)) 163 dr7 |= (( __native) 0x3) << (16 + 4*curidx);163 dr7 |= ((unative_t) 0x3) << (16 + 4*curidx); 164 164 } 165 165 … … 206 206 cur = &breakpoints[curidx]; 207 207 208 cur->address = ( __address) where;208 cur->address = (uintptr_t) where; 209 209 cur->flags = flags; 210 210 cur->counter = 0; … … 236 236 if (! (breakpoints[slot].flags & BKPOINT_INSTR)) { 237 237 if ((breakpoints[slot].flags & BKPOINT_CHECK_ZERO)) { 238 if (*(( __native*) breakpoints[slot].address) != 0)238 if (*((unative_t *) breakpoints[slot].address) != 0) 239 239 return; 240 240 printf("**** Found ZERO on address %p ****\n", … … 242 242 } else { 243 243 printf("Data watchpoint - new data: %p\n", 244 *(( __native*) breakpoints[slot].address));244 *((unative_t *) breakpoints[slot].address)); 245 245 } 246 246 } … … 316 316 static void debug_exception(int n, istate_t *istate) 317 317 { 318 __nativedr6;318 unative_t dr6; 319 319 int i; 320 320
Note:
See TracChangeset
for help on using the changeset viewer.