summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-10-17 13:36:45 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-10-17 13:36:45 +0000
commita24b87f105e3e7029aabcc6fddf87a03ee74b715 (patch)
tree963e03dc1e4061fce0cc291649db5b49380979d4 /gdb
parent50e5bed3a5feb7a9f482475011efe8702da452f1 (diff)
downloadgdb-a24b87f105e3e7029aabcc6fddf87a03ee74b715.tar.gz
* frame.c (frame_unwind_unsigned_register): Delete.
(frame_sp_unwind): Use frame_unwind_register_unsigned instead. * frame.h (frame_unwind_unsigned_register): Delete prototype. * alpha-linux-tdep.c, alpha-mdebug-tdep.c, alpha-tdep.c, avr-tdep.c, cris-tdep.c, frv-tdep.c, m68hc11-tdep.c, mn10300-tdep.c, mt-tdep.c: Replace frame_unwind_unsigned_register with frame_unwind_register_unsigned. * gdbint.texinfo (Target Conditionals): Use frame_unwind_register_unsigned in examples instead of frame_unwind_unsigned_register.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/alpha-linux-tdep.c2
-rw-r--r--gdb/alpha-mdebug-tdep.c2
-rw-r--r--gdb/alpha-tdep.c6
-rw-r--r--gdb/avr-tdep.c12
-rw-r--r--gdb/cris-tdep.c19
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdbint.texinfo6
-rw-r--r--gdb/frame.c19
-rw-r--r--gdb/frame.h4
-rw-r--r--gdb/frv-tdep.c4
-rw-r--r--gdb/m68hc11-tdep.c11
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/mt-tdep.c8
14 files changed, 55 insertions, 59 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 56ae33464dd..b9dbc5fc116 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,14 @@
+2007-10-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * frame.c (frame_unwind_unsigned_register): Delete.
+ (frame_sp_unwind): Use frame_unwind_register_unsigned instead.
+ * frame.h (frame_unwind_unsigned_register): Delete prototype.
+
+ * alpha-linux-tdep.c, alpha-mdebug-tdep.c, alpha-tdep.c,
+ avr-tdep.c, cris-tdep.c, frv-tdep.c, m68hc11-tdep.c, mn10300-tdep.c,
+ mt-tdep.c: Replace frame_unwind_unsigned_register with
+ frame_unwind_register_unsigned.
+
2007-10-16 Pedro Alves <pedro_alves@portugalmail.pt>
* config/i386/mingw.mh, config/i386/mingw.mt: New files.
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index d49dca90a03..983cd510dcf 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -105,7 +105,7 @@ alpha_linux_sigcontext_addr (struct frame_info *next_frame)
long off;
pc = frame_pc_unwind (next_frame);
- frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, ALPHA_SP_REGNUM);
off = alpha_linux_sigtramp_offset (pc);
gdb_assert (off >= 0);
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index 9c82ad16eba..d2c3b9b1277 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -204,7 +204,7 @@ alpha_mdebug_frame_unwind_cache (struct frame_info *next_frame,
info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
/* The VFP of the frame is at FRAME_REG+FRAME_OFFSET. */
- frame_unwind_unsigned_register (next_frame, PROC_FRAME_REG (proc_desc), &vfp);
+ vfp = frame_unwind_register_unsigned (next_frame, PROC_FRAME_REG (proc_desc));
vfp += PROC_FRAME_OFFSET (info->proc_desc);
info->vfp = vfp;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 03fa331abf7..623d1bea2c3 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1151,7 +1151,7 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *next_frame,
return_reg = ALPHA_RA_REGNUM;
info->return_reg = return_reg;
- frame_unwind_unsigned_register (next_frame, frame_reg, &val);
+ val = frame_unwind_register_unsigned (next_frame, frame_reg);
info->vfp = val + frame_size;
/* Convert offsets to absolute addresses. See above about adding
@@ -1278,7 +1278,7 @@ static struct frame_id
alpha_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST base;
- frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &base);
+ base = frame_unwind_register_unsigned (next_frame, ALPHA_SP_REGNUM);
return frame_id_build (base, frame_pc_unwind (next_frame));
}
@@ -1286,7 +1286,7 @@ static CORE_ADDR
alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, ALPHA_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, ALPHA_PC_REGNUM);
return pc;
}
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index d3ecf2b5d64..a19e927b41d 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -904,8 +904,8 @@ avr_frame_unwind_cache (struct frame_info *next_frame,
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM, &this_base);
- frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM+1, &high_base);
+ this_base = frame_unwind_register_unsigned (next_frame, AVR_FP_REGNUM);
+ high_base = frame_unwind_register_unsigned (next_frame, AVR_FP_REGNUM+1);
this_base += (high_base << 8);
/* The FP points at the last saved register. Adjust the FP back
@@ -916,7 +916,7 @@ avr_frame_unwind_cache (struct frame_info *next_frame,
{
/* Assume that the FP is this frame's SP but with that pushed
stack space added back. */
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
prev_sp = this_base + info->size;
}
@@ -954,7 +954,7 @@ avr_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, AVR_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, AVR_PC_REGNUM);
return avr_make_iaddr (pc);
}
@@ -964,7 +964,7 @@ avr_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
return avr_make_saddr (sp);
}
@@ -1095,7 +1095,7 @@ avr_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST base;
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &base);
+ base = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
return frame_id_build (avr_make_saddr (base), frame_pc_unwind (next_frame));
}
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index a6dae9b9d58..4a4dbc858c9 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1338,8 +1338,7 @@ cris_scan_prologue (CORE_ADDR pc, struct frame_info *next_frame,
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, CRIS_FP_REGNUM,
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, CRIS_FP_REGNUM);
info->base = this_base;
info->saved_regs[CRIS_FP_REGNUM].addr = info->base;
@@ -1352,8 +1351,8 @@ cris_scan_prologue (CORE_ADDR pc, struct frame_info *next_frame,
ULONGEST this_base;
/* Assume that the FP is this frame's SP but with that pushed
stack space added back. */
- frame_unwind_unsigned_register (next_frame, gdbarch_sp_regnum (gdbarch),
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
info->base = this_base;
info->prev_sp = info->base + info->size;
}
@@ -1424,8 +1423,8 @@ crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *next_frame,
}
/* The SP is assumed to be unaltered. */
- frame_unwind_unsigned_register (next_frame, gdbarch_sp_regnum (gdbarch),
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
info->base = this_base;
info->prev_sp = this_base;
@@ -1470,8 +1469,8 @@ static CORE_ADDR
cris_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_pc_regnum (gdbarch), &pc);
+ pc = frame_unwind_register_unsigned (next_frame,
+ gdbarch_pc_regnum (gdbarch));
return pc;
}
@@ -1479,8 +1478,8 @@ static CORE_ADDR
cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_sp_regnum (gdbarch), &sp);
+ sp = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
return sp;
}
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 8e58bcc58a2..daa3f2ea500 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gdbint.texinfo (Target Conditionals): Use
+ frame_unwind_register_unsigned in examples instead of
+ frame_unwind_unsigned_register.
+
2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Predefined Target Types): Add int128
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 40d5ad133eb..2ff4d79ac53 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -39,7 +39,7 @@ Free Documentation License''.
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.270 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.271 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -3611,7 +3611,7 @@ is typically no more than:
@smallexample
ULONGEST pc;
-pc = frame_unwind_unsigned_register (next_frame, S390_PC_REGNUM);
+pc = frame_unwind_register_unsigned (next_frame, S390_PC_REGNUM);
return gdbarch_addr_bits_remove (gdbarch, pc);
@end smallexample
@@ -3628,7 +3628,7 @@ is typically no more than:
@smallexample
ULONGEST sp;
-sp = frame_unwind_unsigned_register (next_frame, S390_SP_REGNUM);
+sp = frame_unwind_register_unsigned (next_frame, S390_SP_REGNUM);
return gdbarch_addr_bits_remove (gdbarch, sp);
@end smallexample
diff --git a/gdb/frame.c b/gdb/frame.c
index eda589c5d30..1a7c87f64a9 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -678,17 +678,6 @@ get_frame_register_unsigned (struct frame_info *frame, int regnum)
}
void
-frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
- ULONGEST *val)
-{
- gdb_byte buf[MAX_REGISTER_SIZE];
- frame_unwind_register (frame, regnum, buf);
- (*val) = extract_unsigned_integer (buf,
- register_size (get_frame_arch (frame),
- regnum));
-}
-
-void
put_frame_register (struct frame_info *frame, int regnum,
const gdb_byte *buf)
{
@@ -1730,12 +1719,8 @@ frame_sp_unwind (struct frame_info *next_frame)
/* Now things are really are grim. Hope that the value returned by
the gdbarch_sp_regnum register is meaningful. */
if (gdbarch_sp_regnum (gdbarch) >= 0)
- {
- ULONGEST sp;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_sp_regnum (gdbarch), &sp);
- return sp;
- }
+ return frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
internal_error (__FILE__, __LINE__, _("Missing unwind SP method"));
}
diff --git a/gdb/frame.h b/gdb/frame.h
index 6caf707d3de..d754aed9d15 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -476,10 +476,6 @@ extern ULONGEST get_frame_register_unsigned (struct frame_info *frame,
int regnum);
-/* Use frame_unwind_register_signed. */
-extern void frame_unwind_unsigned_register (struct frame_info *frame,
- int regnum, ULONGEST *val);
-
/* Get the value of the register that belongs to this FRAME. This
function is a wrapper to the call sequence ``frame_register_unwind
(get_next_frame (FRAME))''. As per frame_register_unwind(), if
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 6dd7d365d17..a75a5ff440a 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -938,9 +938,9 @@ frv_analyze_prologue (CORE_ADDR pc, struct frame_info *next_frame,
because instructions may save relative to the SP, but we need
their addresses relative to the FP. */
if (fp_set)
- frame_unwind_unsigned_register (next_frame, fp_regnum, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, fp_regnum);
else
- frame_unwind_unsigned_register (next_frame, sp_regnum, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, sp_regnum);
for (i = 0; i < 64; i++)
if (gr_saved[i])
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index bd64a43c488..68ec49ae056 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -763,8 +763,7 @@ m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, gdbarch_pc_regnum (gdbarch),
- &pc);
+ pc = frame_unwind_register_unsigned (next_frame, gdbarch_pc_regnum (gdbarch));
return pc;
}
@@ -799,7 +798,7 @@ m68hc11_frame_unwind_cache (struct frame_info *next_frame,
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, SOFT_FP_REGNUM);
if (this_base == 0)
{
info->base = 0;
@@ -815,7 +814,7 @@ m68hc11_frame_unwind_cache (struct frame_info *next_frame,
if (info->sp_offset != (CORE_ADDR) -1)
{
info->saved_regs[HARD_PC_REGNUM].addr = info->sp_offset;
- frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, HARD_SP_REGNUM);
prev_sp = this_base + info->sp_offset + 2;
this_base += STACK_CORRECTION;
}
@@ -980,7 +979,7 @@ static CORE_ADDR
m68hc11_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, HARD_SP_REGNUM);
return sp;
}
@@ -995,7 +994,7 @@ m68hc11_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
ULONGEST tos;
CORE_ADDR pc = frame_pc_unwind (next_frame);
- frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &tos);
+ tos = frame_unwind_register_unsigned (next_frame, SOFT_FP_REGNUM);
tos += 2;
return frame_id_build (tos, pc);
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index b7f632303b8..f044caf9e54 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -934,7 +934,7 @@ mn10300_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, E_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, E_PC_REGNUM);
return pc;
}
@@ -943,7 +943,7 @@ mn10300_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, E_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
return sp;
}
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index 95184951db6..93e3b78ac38 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -895,8 +895,8 @@ mt_frame_unwind_cache (struct frame_info *next_frame,
/* Grab the frame-relative values of SP and FP, needed below.
The frame_saved_register function will find them on the
stack or in the registers as appropriate. */
- frame_unwind_unsigned_register (next_frame, MT_SP_REGNUM, &sp);
- frame_unwind_unsigned_register (next_frame, MT_FP_REGNUM, &fp);
+ sp = frame_unwind_register_unsigned (next_frame, MT_SP_REGNUM);
+ fp = frame_unwind_register_unsigned (next_frame, MT_FP_REGNUM);
start_addr = frame_func_unwind (next_frame, NORMAL_FRAME);
@@ -1012,7 +1012,7 @@ mt_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, MT_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, MT_PC_REGNUM);
return pc;
}
@@ -1021,7 +1021,7 @@ mt_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, MT_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, MT_SP_REGNUM);
return sp;
}