Questions tagged [watchpoint]

Watchpoint is a point at which program executed via a debugger stops to let the programmer peek into memory and call stack or enter step by step execution mode.

98 questions
1
vote
1 answer

GDB watch DMA controller memory access on x86

I run FreeBSD-based kernel as QEMU/KVM guest. I'm working on a FreeBSD-based OS kernel SCSI driver and have an issue with read system call produces corrupted data. To troubleshoot the problem I use the Kernel running in QEMU and would like to trace…
Some Name
  • 8,555
  • 5
  • 27
  • 77
1
vote
2 answers

Cannot find over-released object debugging on device

I have a rather large app which works in the simulator but creates in an over-released object scenario on the iPhone device. NSzombies would seem to be the route to go except that the object is not over-released on the simulator and NSZombies does…
Ric
  • 796
  • 12
  • 28
1
vote
1 answer

Adding a watchpoint in the current process (not in gdb, not for debugging)

I'm wondering if it's possible to add watchpoints in the current process so that when the memory is read or written (depending on the flags) a callback will be called. There are related questions but they're all about debugging with gdb or another…
sinan
  • 6,809
  • 6
  • 38
  • 67
1
vote
1 answer

Watchpoint vs watch expression in eclipse

I am working on a lengthy C code split across different files. While debugging, I would like the simulation to stop wherever the value of a certain parameter is changed (not to a specific value). I have come across watchpoint and watch expression…
user750066
  • 43
  • 6
1
vote
1 answer

How do I set a watchpoint in Xcode 10?

Theoretically, if we interrupt the execution of the app, and we right click on a variable listed in the variables' section of the debug area, we get a contextual menu with the option "Watch variableName", and if we click on it, a watchpoint is set…
Hikarus
  • 325
  • 4
  • 17
1
vote
0 answers

HW breakpoint functionality on kernel before hw breakpoint

Please help if You can. I need to debug access to some variable in kernel module throw mechanism, that allow to print stack each time, when an access is required. I know that the easiest way is to use HW breakpoint (also knows as watchpoint),…
Andriy Veres
  • 81
  • 1
  • 1
  • 5
1
vote
0 answers

Snow Leopard crashes after gdb attempts to access an address using watchpoints

I am debugging a binary (assembly only) using GDB 7.1 compiled via MacPorts for Snow Leopard. I am interested in a specific address that I found using find gdb command. So that, it is a valid address indeed: (gdb) printf "%s\n",…
Bruno Velasco
  • 135
  • 1
  • 6
1
vote
2 answers

gdb watchpoint not activated

Consider the code: #include #include int update (int *arr, int size); #define SIZE 10 int main() { // <---------------------- Breakpoint 1 int x[SIZE]; // Initialize array for (int c = 0 ; c < SIZE ; c++) { x[c] =…
Einar
  • 223
  • 1
  • 9
1
vote
1 answer

Java Field Watchpoints in Android Studio

Whole day i am trying to debug my app with Java Field Watchpoints, set on any type of field : string , int ... but it just wont stop. I am using tablet with 4.4.2 android and 2.0 Android Studio. Breakpoints work normally.
1
vote
2 answers

gdb watchpoint won't work when variable changes from going off end of array

#include typedef struct ThingStruct { int arr[8]; int after; } Thing; void foo(int i) { Thing thing; int* ip = &thing.after; thing.after = 12345; printf("beforehand\n"); thing.arr[i] = 55; …
Buge
  • 476
  • 3
  • 14
1
vote
2 answers

gdb watch pointer that is not valid yet

I have the following code: #include #include #define SIZE 100 int* arr; main() { int i; arr = (int*)malloc(SIZE*sizeof(int)); if (arr == NULL) { printf("Could not allocate SIZE(=%d)", SIZE); } …
Gaston
  • 1,828
  • 2
  • 15
  • 29
1
vote
1 answer

How to set watchpoints via procfs in Linux?

I'm trying to build a debugger-like program under Linux (Ubuntu) and I've run into some problems. From what I've heard, the /proc vfs provides mechanisms to create watchpoints, but I can't seem to find out how. Some man pages pointed me to “control…
aradia
  • 11
  • 1
1
vote
1 answer

GDB watchpoint implementation

I'm writing gdbstub for ARM and I have a question. I'm trying to implement watchpoints for my stub. GDB has special packets for different types of watchpoins (read, write, access), but every time I set a watchpoint at some values I got GDB…
1
vote
2 answers

How to set a hardware watchpoint in dbx?

I need to detect when some memory changes in dbx on Solaris. I know in gdb that I would do this with watch . However, I am using dbx at the moment, so I need to know how to set a hardware watchpoint in dbx. What is the dbx command…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
0
votes
1 answer

ARM A76 watchpoint does not work, after correctly configuring the register

I want to monitor a specified address on an ARM A76 machine and enter an exception when the address is loaded from. However, I did the configuration and did not get the exception. My process is as follows: Set MDSCR_EL1.KDE and MDSCR_EL1.MDE to 1…
qwe
  • 1