This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PATCH: use frame_unwind_register instead of frame_register
- From: Jim Blandy <jimb at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 03 Nov 2006 14:11:17 -0800
- Subject: PATCH: use frame_unwind_register instead of frame_register
Committed as obvious --- frame_unwind_register takes care of passing
all the dummy arguments to frame_register, so dwarf_expr_read_reg
shouldn't have to bother.
gdb/ChangeLog:
2006-11-03 Jim Blandy <jimb@codesourcery.com>
* dwarf2loc.c (dwarf_expr_read_reg): Use frame_unwind_register
instead of frame_register. Doc fix.
Index: gdb/dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.34
diff -u -r1.34 dwarf2loc.c
--- gdb/dwarf2loc.c 10 Oct 2006 03:17:53 -0000 1.34
+++ gdb/dwarf2loc.c 3 Nov 2006 21:52:38 -0000
@@ -114,9 +114,8 @@
/* Helper functions for dwarf2_evaluate_loc_desc. */
-/* Using the frame specified in BATON, read register REGNUM. The lval
- type will be returned in LVALP, and for lval_memory the register
- save address will be returned in ADDRP. */
+/* Using the frame specified in BATON, return the value of register
+ REGNUM, treated as an unsigned integer. */
static CORE_ADDR
dwarf_expr_read_reg (void *baton, int dwarf_regnum)
{
@@ -130,8 +129,7 @@
regsize = register_size (current_gdbarch, regnum);
buf = alloca (regsize);
- frame_register (debaton->frame, regnum, &optimized, &lval_type, &save_addr,
- &realnum, buf);
+ frame_unwind_register (debaton->frame, regnum, buf);
/* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
address is always unsigned. That may or may not be true. */
result = extract_unsigned_integer (buf, regsize);