aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
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 /gdb/remote.c
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c4
1 files changed, 2 insertions, 2 deletions
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));