Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Cc: scottb@netwinder.org
Subject: [PATCH/arm-linux] Fix thread debugging on ARM/Linux
Date: Wed, 24 Oct 2001 12:25:00 -0000	[thread overview]
Message-ID: <20011024152535.A24994@nevyn.them.org> (raw)

I'm going to commit the attached as obvious in a day or two, unless someone
objects.  fill_gregset () shouldn't just fill in the registers we already
have; it should fetch registers we don't have, and fill in all registers,
like it does on every other target.  With this, thread debugging appears to
work on my ARM/Linux target (although the testsuite results are really quite
awful).

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2001-10-24  Daniel Jacobowitz  <drow@mvista.com>

	* arm-linux-nat.c (fill_gregset): Do not check register_valid[].
	(fill_fpregset): Likewise.

--- gdb-5.0.20010802/gdb/arm-linux-nat.c.orig	Wed Oct 24 12:05:51 2001
+++ gdb-5.0.20010802/gdb/arm-linux-nat.c	Wed Oct 24 12:11:41 2001
@@ -579,26 +579,18 @@ fill_gregset (gdb_gregset_t *gregsetp, i
     {
       int regnum;
       for (regnum = A1_REGNUM; regnum <= PC_REGNUM; regnum++) 
-        if (register_valid[regnum])
-	  read_register_gen (regnum, (char *) &(*gregsetp)[regnum]);
+	read_register_gen (regnum, (char *) &(*gregsetp)[regnum]);
     }
   else if (regno >= A1_REGNUM && regno <= PC_REGNUM)
-    {
-      if (register_valid[regno])
-	read_register_gen (regno, (char *) &(*gregsetp)[regno]);
-    }
+    read_register_gen (regno, (char *) &(*gregsetp)[regno]);
 
   if (PS_REGNUM == regno || -1 == regno)
     {
-      if (register_valid[regno] || -1 == regno)
-        {
-          if (arm_apcs_32)
-	    read_register_gen (PS_REGNUM, (char *) &(*gregsetp)[CPSR_REGNUM]);
-	  else
-	    read_register_gen (PC_REGNUM, (char *) &(*gregsetp)[PC_REGNUM]);
-	}
+      if (arm_apcs_32)
+	read_register_gen (PS_REGNUM, (char *) &(*gregsetp)[CPSR_REGNUM]);
+      else
+	read_register_gen (PC_REGNUM, (char *) &(*gregsetp)[PC_REGNUM]);
     }
-        
 }
 
 /* Fill GDB's register array with the general-purpose register values
@@ -643,9 +635,8 @@ fill_fpregset (gdb_fpregset_t *fpregsetp
     }
 
   /* Store fpsr.  */
-  if (register_valid[FPS_REGNUM])
-    if (FPS_REGNUM == regno || -1 == regno)
-      read_register_gen (FPS_REGNUM, (char *) &fp->fpsr);
+  if (FPS_REGNUM == regno || -1 == regno)
+    read_register_gen (FPS_REGNUM, (char *) &fp->fpsr);
 }
 
 /* Fill GDB's register array with the floating-point register values


             reply	other threads:[~2001-10-24 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-24 12:25 Daniel Jacobowitz [this message]
2001-10-26  8:44 ` Daniel Jacobowitz

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=20011024152535.A24994@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=scottb@netwinder.org \
    /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