From 4100683baad9f616d7510a789bef00fbd396a0eb Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 9 Dec 2008 16:36:15 +0000 Subject: [PATCH] * remote.c (remote_parse_stop_reply): Use REG only after its NULL check. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5e34bbb7c19..233ea29c87c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-12-09 Jan Kratochvil + + * remote.c (remote_parse_stop_reply): Use REG only after its NULL check. + 2008-12-08 Joel Brobecker * python/python-value.c (values_in_python): Add specific initialization diff --git a/gdb/remote.c b/gdb/remote.c index c8a46eedc46..f1fb8752205 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)); -- 2.30.2