AnsweredAssumed Answered

GDB powerpc-eabivle watchpoint & stepping

Question asked by christophe ple on Apr 30, 2018
Latest reply on May 15, 2018 by Mike Doidge

Dear all,

 

When using powerpc-eabivle-gdb of S32DS V1.2 for linux, i think that i have an incorrect behaviour about watchpoint.

 

In many PowerPC, the watchpoint exception occurs just before executing the load or store instruction at the watchpoint address. 

But for the MPC5777M, the exception occurs at the instruction after executing the load or store.

 

Powerpc-eabivle-gdb, after getting the stop remote reply message indicating a watchpoint exception, request for a singlestep to really execute the load or store because it thinks to debug a classic PowerPC, but in case of MPC5777M, this singlestep is erroneous.

 

I make this change in the GDB source file rs6000-tdep.c:

Replace

   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);

By

  set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 0);

And i compile GDB.

 

Then the single-stepping after watchpoint exception is no more request by GDB.

 

Is the possible to make this change in NXP powerpc-eabivle-gdb?

 

Regards

Outcomes