+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
$(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) \
/* 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));
#include "inferior.h"
#include "ax.h"
#include "ax-gdb.h"
+#include "regcache.h"
#include "elf/dwarf2.h"
#include "dwarf2expr.h"
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;
}