aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-02-23 16:45:39 +0000
committerPedro Alves <palves@redhat.com>2015-02-23 16:45:39 +0000
commit1f10ba14bc8c53120432ccc7b2ba5605b4cee80e (patch)
tree2f4bbcc4aeab9bd32bb35ffbb4ddd53658536f75 /gdb/xtensa-tdep.h
parentf971c12fc5aca91875b2fff0a115611577d01909 (diff)
downloadgdb-1f10ba14bc8c53120432ccc7b2ba5605b4cee80e.zip
gdb-1f10ba14bc8c53120432ccc7b2ba5605b4cee80e.tar.gz
gdb-1f10ba14bc8c53120432ccc7b2ba5605b4cee80e.tar.bz2
remote.c: simplify parsing stop reasons in T stop replies
We need to be careful with parsing optional stop reasons that start with an hex character ("awatch", "core"), as GDBs that aren't aware of them parse them as real numbers. That's silly of course, given that there should be a colon after those magic "numbers". So if strtol on "abbz:" doesn't return "first invalid char" pointing to the colon, we know that "abbz" isn't really a register number. It must be optional stop info we don't know about. This adjusts GDB to work that way, removing the need for the special casing done upfront: /* If this packet is an awatch packet, don't parse the 'a' as a register number. */ if (strncmp (p, "awatch", strlen("awatch")) != 0 && strncmp (p, "core", strlen ("core") != 0)) For as long as we care about compatibility with GDB 7.9, we'll need to continue to be careful about this, so I added a comment. Tested on x86_64 Fedora 20, native gdbserver. gdb/ChangeLog: 2015-02-23 Pedro Alves <palves@redhat.com> * remote.c (skip_to_semicolon): New function. (remote_parse_stop_reply) <T stop reply>: Use it. Don't special case the stop reasons that look like hex numbers upfront. Instead handle real register numbers after matching all the known stop reasons.
Diffstat (limited to 'gdb/xtensa-tdep.h')
0 files changed, 0 insertions, 0 deletions