aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>2018-04-26 23:47:25 +0100
committerPedro Alves <palves@redhat.com>2018-04-26 23:47:25 +0100
commitb75abf5bb636869fd893ecf98414b8b2fe0d4a12 (patch)
tree81659aee5a6320b19104a16c8a4ea56643a03026 /gold
parenta914a7c95895161c99533d5919b8504b37ea54a0 (diff)
downloadgdb-b75abf5bb636869fd893ecf98414b8b2fe0d4a12.zip
gdb-b75abf5bb636869fd893ecf98414b8b2fe0d4a12.tar.gz
gdb-b75abf5bb636869fd893ecf98414b8b2fe0d4a12.tar.bz2
Fix remote 'g' command error handling (PR remote/9665)
'g' command returns hex-string as response so simply checking for 'E' to determine if it failed is not enough and can trigger spurious error messages. For example, invalid behaviour can be easily triggered on Cortex-M as follows: (gdb) set $r0 = 0xe0 Sending packet: $P0=e0000000#72...Packet received: OK Packet P (set-register) is supported Sending packet: $g#67...Packet received: E0000000849A0020... Remote failure reply: E0000000849A0020... This patch fixes the problem by calling putpkt()/getpkt() directly and checking result with packet_check_result(). This works fine since Enn response has odd number of bytes while proper response has even number of bytes. Also, remote_send() is now not used anywhere so it can be removed. gdb/Changelog: 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl> PR remote/9665 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result instead of remote_send. (remote_send): Remove.
Diffstat (limited to 'gold')
0 files changed, 0 insertions, 0 deletions