Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Set ADDR
Date: Tue, 20 Aug 2002 20:33:00 -0000	[thread overview]
Message-ID: <3D630A21.5060308@ges.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Hello,

The bug below and the attached patch are just scary!

(top-gdb) print $r0
$4 = 209
(top-gdb) print $r2
$5 = 0
(top-gdb) set $r2 = 0
(top-gdb) print $r2
$6 = 0
(top-gdb) print $r0
$7 = 0

``addr'' the offset into the registers buffer wasn't being set which 
would lead to register zero always being set.

The worry is that I didn't pick up any testsuite failures :-(

committed the attached,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 831 bytes --]

2002-08-19  Andrew Cagney  <ac131313@redhat.com>

	* frame.c (frame_register_unwind): When a register, set addrp to
	the register's byte.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.14
diff -u -r1.14 frame.c
--- frame.c	6 Aug 2002 22:42:56 -0000	1.14
+++ frame.c	21 Aug 2002 03:16:11 -0000
@@ -142,7 +142,9 @@
 	 register cache.  */
       *optimizedp = 0;
       *lvalp = lval_register;
-      *addrp = 0;
+      /* ULGH!  Code uses the offset into the raw register byte array
+         as a way of identifying a register.  */
+      *addrp = REGISTER_BYTE (regnum);
       /* Should this code test ``register_cached (regnum) < 0'' and do
          something like set realnum to -1 when the register isn't
          available?  */

             reply	other threads:[~2002-08-21  3:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20 20:33 Andrew Cagney [this message]
2002-08-21  8:44 ` Andrew Cagney
2002-08-21 18:01   ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D630A21.5060308@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox