dlbeer / mspdebug

Debugging tool for MSP430 MCUs
GNU General Public License v2.0
190 stars 80 forks source link

Cannot connect from a recent GDB client #32

Closed eblot closed 7 years ago

eblot commented 7 years ago

msp430-elf-gdb (7.12.1) fails with

"Reply contains invalid hex digit 59"

The issue comes from the following line:

T0500:16c2;01:fa03;02:0000;03:0000;04:8b10;05:0081;06:b885;07:23f1;08:67e7;09:089d;0a:0100;0b:8f02;0c:8202;0d:0000;0e:0703;0f:6100;

as GDB expects 4-byte values, and mspdebug 0.22 sends on 2-byte values

It seems this issue is due to a hack to distinguish msp430-gdb from msp430-elf-gdb that seems to work anymore, ui/gdb.c:

/* This is a hack to distinguish msp430-elf-gdb
  * from msp430-gdb. The former expects 32-bit
  * register fields.
  */
  if (strstr(buf, "multiprocess+"))
      register_bytes = 4;

while register_bytes default value is 2.

Forcing register_bytes to 4 instead of 2 does work.

Obvisouly, this would break support for msp430-gdb, so I guess another hack/kludge is required to distinguish one release from another.

eblot commented 7 years ago

Me bad, it has already been fixed. Ubuntu 16.04 was using a too old version.