aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2008-12-09 16:36:15 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2008-12-09 16:36:15 +0000
commit4100683baad9f616d7510a789bef00fbd396a0eb (patch)
treef70fd4670a60c4e2ada82f761eff1e9adae37b94
parentfbc558e16b993e66a468bf5b901bc39a53b483d5 (diff)
downloadgdb-4100683baad9f616d7510a789bef00fbd396a0eb.zip
gdb-4100683baad9f616d7510a789bef00fbd396a0eb.tar.gz
gdb-4100683baad9f616d7510a789bef00fbd396a0eb.tar.bz2
* remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/remote.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5e34bbb..233ea29 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
+
2008-12-08 Joel Brobecker <brobecker@adacore.com>
* python/python-value.c (values_in_python): Add specific initialization
diff --git a/gdb/remote.c b/gdb/remote.c
index c8a46ee..f1fb875 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4305,8 +4305,6 @@ Packet: '%s'\n"),
struct packet_reg *reg = packet_reg_from_pnum (rsa, pnum);
cached_reg_t cached_reg;
- cached_reg.num = reg->regnum;
-
p = p1;
if (*p != ':')
@@ -4320,6 +4318,8 @@ Packet: '%s'\n"),
Packet: '%s'\n"),
phex_nz (pnum, 0), p, buf);
+ cached_reg.num = reg->regnum;
+
fieldsize = hex2bin (p, cached_reg.data,
register_size (target_gdbarch,
reg->regnum));