0

I have a JIT. I set up a watchpoint (watch -- so it should trigger only on a write) to the jitted code of a function (all of it) as in this answer. And I provide --vgdb=full to valgrind which means all instructions have to be instrumented and I should see execution stopped precisely where the stop happened.

However the watchpoint triggers several times in the middle of the function being watched. I noticed that the instructions at which execution stops are basic block entry points (they all follow either a jump or a call or it's the first instruction of my function).

I don't see actual write to the watched memory upon the watchpoint firing. So does valgrind consider execution of this memory (some of it) a write? Or is it some other valgrind weirdness, or is it just me?

Please, clarify.

My valgrind version is 3.10.0.SVN, gdb is 7.7.1 (Ubuntu 7.7.1-0ubuntu5~14.04.2).

Community
  • 1
  • 1
Vladislav Ivanishin
  • 2,092
  • 16
  • 22

1 Answers1

0

Executing some code should not be considered as a write by valgrind gdbserver. Some valgrind trace arguments (-v -v -v -d -d -d) might give an idea about what happens.

phd
  • 3,669
  • 1
  • 11
  • 12