2004-10-27 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Fri, 29 Oct 2004 14:00:58 +0000 (14:00 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 29 Oct 2004 14:00:58 +0000 (14:00 +0000)
* trad-frame.c (trad_frame_get_prev_register): Use
frame_unwind_register instead of frame_register_unwind, do not
recurse the register's location.
* xstormy16-tdep.c (xstormy16_frame_prev_register):
* sparc-tdep.c (sparc32_frame_prev_register): Ditto.
* sparc64-tdep.c (sparc64_frame_prev_register): Ditto.
* sh-tdep.c (sh_frame_prev_register): Ditto.
* m68k-tdep.c (m68k_frame_prev_register): Ditto.
* i386-tdep.c (i386_frame_prev_register): Ditto.
* dwarf2-frame.c (dwarf2_frame_prev_register): Ditto.
* amd64-tdep.c (amd64_frame_prev_register): Ditto.

gdb/ChangeLog
gdb/amd64-tdep.c
gdb/dwarf2-frame.c
gdb/i386-tdep.c
gdb/m68k-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-tdep.c
gdb/trad-frame.c
gdb/xstormy16-tdep.c

index ca9fe4be110d2cd1d4fb5e8f8590cb5d83951e6a..cfce5eaf157e66a9090d47217b0665e252d0fb88 100644 (file)
@@ -1,3 +1,17 @@
+2004-10-27  Andrew Cagney  <cagney@gnu.org>
+
+       * trad-frame.c (trad_frame_get_prev_register): Use
+       frame_unwind_register instead of frame_register_unwind, do not
+       recurse the register's location.
+       * xstormy16-tdep.c (xstormy16_frame_prev_register): 
+       * sparc-tdep.c (sparc32_frame_prev_register): Ditto.
+       * sparc64-tdep.c (sparc64_frame_prev_register): Ditto.
+       * sh-tdep.c (sh_frame_prev_register): Ditto.
+       * m68k-tdep.c (m68k_frame_prev_register): Ditto.
+       * i386-tdep.c (i386_frame_prev_register): Ditto.
+       * dwarf2-frame.c (dwarf2_frame_prev_register): Ditto.
+       * amd64-tdep.c (amd64_frame_prev_register): Ditto.
+
 2004-10-28  Mark Kettenis  <kettenis@jive.nl>
 
        * proc-events.c: Fix several coding-style issues.  Consistently
index 90a4e11bed0323996bbec044477ce4b97688f5b5..613022be2a06cea7d004e4cb49a3148f2e8c5012 100644 (file)
@@ -898,8 +898,12 @@ amd64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       return;
     }
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static const struct frame_unwind amd64_frame_unwind =
index 005592c199478c76687fbb5a35487e29eed82fa8..0e1a9532a990e3fc413c8c3b0c450625a6ee6412 100644 (file)
@@ -770,9 +770,12 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       break;
 
     case DWARF2_FRAME_REG_SAVED_REG:
-      regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
-      frame_register_unwind (next_frame, regnum,
-                            optimizedp, lvalp, addrp, realnump, valuep);
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+      if (valuep)
+       frame_unwind_register (next_frame, (*realnump), valuep);
       break;
 
     case DWARF2_FRAME_REG_SAVED_EXP:
@@ -797,13 +800,21 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
         "undefined").  Code above issues a complaint about this.
         Here just fudge the books, assume GCC, and that the value is
         more inner on the stack.  */
-      frame_register_unwind (next_frame, regnum,
-                            optimizedp, lvalp, addrp, realnump, valuep);
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = regnum;
+      if (valuep)
+       frame_unwind_register (next_frame, (*realnump), valuep);
       break;
 
     case DWARF2_FRAME_REG_SAME_VALUE:
-      frame_register_unwind (next_frame, regnum,
-                            optimizedp, lvalp, addrp, realnump, valuep);
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = regnum;
+      if (valuep)
+       frame_unwind_register (next_frame, (*realnump), valuep);
       break;
 
     case DWARF2_FRAME_REG_CFA:
index d5cd111c90193949a9633f110637e774ef880b18..e001c3e10e141a2b7d75fce4ae03feff67a8e0d5 100644 (file)
@@ -984,8 +984,12 @@ i386_frame_prev_register (struct frame_info *next_frame, void **this_cache,
 
   if (regnum == I386_EIP_REGNUM && cache->pc_in_eax)
     {
-      frame_register_unwind (next_frame, I386_EAX_REGNUM,
-                            optimizedp, lvalp, addrp, realnump, valuep);
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = I386_EAX_REGNUM;
+      if (valuep)
+       frame_unwind_register (next_frame, (*realnump), valuep);
       return;
     }
 
@@ -1018,8 +1022,12 @@ i386_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       return;
     }
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static const struct frame_unwind i386_frame_unwind =
index 1ada90a4488f399a54e419bb890fc58410de8c24..cb2bb10adc8d2cb812a95782a807630fa837ab2c 100644 (file)
@@ -862,8 +862,12 @@ m68k_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       return;
     }
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static const struct frame_unwind m68k_frame_unwind =
index 48e994d4e2e774ea2d318893f00a2730af7bb1a4..a745e44fe3e047d3ac739dd459c2790b4852a48a 100644 (file)
@@ -2363,8 +2363,12 @@ sh_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       return;
     }
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static void
index 7fbd9de62b02e26881d131e6390f269685d926a4..1af5b598b4875e4f8f8cb69d9c8eb5859f08dc71 100644 (file)
@@ -763,8 +763,12 @@ sparc32_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       && regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
     regnum += (SPARC_I0_REGNUM - SPARC_O0_REGNUM);
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static const struct frame_unwind sparc32_frame_unwind =
index a4398d57adb23d675a7ed090e76c9247a2c976ef..1d925188f299a290e2c056b1b85a1d950377ab88 100644 (file)
@@ -544,8 +544,12 @@ sparc64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       && regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
     regnum += (SPARC_I0_REGNUM - SPARC_O0_REGNUM);
 
-  frame_register_unwind (next_frame, regnum,
-                        optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, regnum, valuep);
 }
 
 static const struct frame_unwind sparc64_frame_unwind =
index b9ee2e15e8ec81d19dabf4e4ca61c53fcf67a155..fc67db860fa7b4f1909501107465105667feca56 100644 (file)
@@ -145,9 +145,13 @@ trad_frame_get_prev_register (struct frame_info *next_frame,
     }
   else if (trad_frame_realreg_p (this_saved_regs, regnum))
     {
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realregp = this_saved_regs[regnum].realreg;
       /* Ask the next frame to return the value of the register.  */
-      frame_register_unwind (next_frame, this_saved_regs[regnum].realreg,
-                            optimizedp, lvalp, addrp, realregp, bufferp);
+      if (bufferp)
+       frame_unwind_register (next_frame, (*realregp), bufferp);
     }
   else if (trad_frame_value_p (this_saved_regs, regnum))
     {
index 28f5d002af62904a78cafcc99906181d59371a36..086566fd5a20d2db9d44158e2974988fa647dee3 100644 (file)
@@ -712,8 +712,12 @@ xstormy16_frame_prev_register (struct frame_info *next_frame, void **this_cache,
       return;
     }
 
-  frame_register_unwind (next_frame, regnum,
-                         optimizedp, lvalp, addrp, realnump, valuep);
+  *optimizedp = 0;
+  *lvalp = lval_register;
+  *addrp = 0;
+  *realnump = regnum;
+  if (valuep)
+    frame_unwind_register (next_frame, (*realnump), valuep);
 }
 
 static void