* remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 9 Dec 2008 16:36:15 +0000 (16:36 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 9 Dec 2008 16:36:15 +0000 (16:36 +0000)
gdb/ChangeLog
gdb/remote.c

index 5e34bbb7c19168fee3d20e7527eeb6c0a9e647a0..233ea29c87c0aa0299a1308f34329d595ec125cb 100644 (file)
@@ -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
index c8a46eedc46e74d7fa11ae2b0f660ac659d69db1..f1fb8752205b7dcb5941602025135ac5cf0e4f55 100644 (file)
@@ -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));