summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-03-05 18:00:02 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-03-05 18:00:02 +0000
commit89b09fdb482f1edd45d8feea7ac134c623c7e438 (patch)
treed2dae407c6cb9907e798738a9c91d839649172cd
parent161d3bf30fe69040eddeb1e1cfc3ddbbe2b6c5f3 (diff)
downloadgdb-89b09fdb482f1edd45d8feea7ac134c623c7e438.tar.gz
* dwarf2expr.c (new_dwarf_expr_context): Add (void) to definition.
* dwarf2loc.c: Include "regcache.h". (dwarf_expr_read_reg): Rename regnum argument to dwarf_regnum. Use register_size. * Makefile.in (dwarf2loc.o): Update dependencies.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/dwarf2expr.c2
-rw-r--r--gdb/dwarf2loc.c19
4 files changed, 22 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b9eee6346ba..c10c49da546 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2expr.c (new_dwarf_expr_context): Add (void) to definition.
+ * dwarf2loc.c: Include "regcache.h".
+ (dwarf_expr_read_reg): Rename regnum argument to dwarf_regnum. Use
+ register_size.
+ * Makefile.in (dwarf2loc.o): Update dependencies.
+
2003-03-04 Theodore A. Roth <troth@openavr.org>
* avr-tdep.c (avr_io_reg_read_command): Fix to handle case when the
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index e0e812e1372..90f6ab12587 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1641,7 +1641,7 @@ dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
$(gdbcore_h) $(dwarf2expr_h)
dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(dwarf2expr_h) \
- $(dwarf2loc_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h)
+ $(dwarf2loc_h) $(ax_h) $(ax_gdb_h) $(regcache_h) $(gdb_string_h)
dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
$(symfile_h) $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) \
$(demangle_h) $(expression_h) $(filenames_h) $(macrotab_h) \
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index df6fc73ceb7..7456979b91f 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -35,7 +35,7 @@ static void execute_stack_op (struct dwarf_expr_context *,
/* Create a new context for the expression evaluator. */
struct dwarf_expr_context *
-new_dwarf_expr_context ()
+new_dwarf_expr_context (void)
{
struct dwarf_expr_context *retval;
retval = xcalloc (1, sizeof (struct dwarf_expr_context));
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 55de8dae74e..9ea9941f249 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -28,6 +28,7 @@
#include "inferior.h"
#include "ax.h"
#include "ax-gdb.h"
+#include "regcache.h"
#include "elf/dwarf2.h"
#include "dwarf2expr.h"
@@ -53,17 +54,21 @@ struct dwarf_expr_baton
type will be returned in LVALP, and for lval_memory the register
save address will be returned in ADDRP. */
static CORE_ADDR
-dwarf_expr_read_reg (void *baton, int regnum, enum lval_type *lvalp,
+dwarf_expr_read_reg (void *baton, int dwarf_regnum, enum lval_type *lvalp,
CORE_ADDR *addrp)
{
- CORE_ADDR result;
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
- char *buf = (char *) alloca (MAX_REGISTER_RAW_SIZE);
- int optimized, realnum;
+ CORE_ADDR result;
+ char *buf;
+ int optimized, regnum, realnum, regsize;
+
+ regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum);
+ regsize = register_size (current_gdbarch, regnum);
+ buf = (char *) alloca (regsize);
- frame_register (debaton->frame, DWARF2_REG_TO_REGNUM (regnum),
- &optimized, lvalp, addrp, &realnum, buf);
- result = extract_address (buf, REGISTER_RAW_SIZE (regnum));
+ frame_register (debaton->frame, regnum, &optimized, lvalp, addrp, &realnum,
+ buf);
+ result = extract_address (buf, regsize);
return result;
}