Unexpected $M and $X packets

Simon Marchi simon.marchi@polymtl.ca
Tue Dec 18 02:37:00 GMT 2018


On 2018-12-17 20:13, Martin R wrote:
> wt., 18 gru 2018 o 02:09 Martin R <martin.rajwa@gmail.com> napisał(a):
> 
>> Hello,
>> 
>> I am writing GDB stub for some tesnilica DSP chip. For front end we 
>> use
>> xt-gdb. I noticed that it sends unexpectatly write memory packets like 
>> $X
>> or $M. It happens for example while stepping. So, it is definitely not
>> expected at this time right?
>> 
>> 
>> PS: I also noticed that in this unexpected memory write packets it 
>> tries
>> to write to the current instruction addres some trash characters (non 
>> ASCI
>> ones).
>> 
>> Do you have any clue what may cause it?

Maybe software breakpoints, if your stub does not support the z0 packet? 
  The quickest way to find out would be to build GDB, debug it, and set a 
breakpoint on the remote_target::remote_write_bytes function.

Building GDB is usually easy, and you can do "show configuration" in 
your existing GDB to see how it was configured.  Though if you build a 
different version than your current GDB, it comes with its own set of 
bugs.

Simon



More information about the Gdb mailing list