X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fc-valprint.c;h=fd42ae0b908d6fdea2793da908fa2c86a3b5e10b;hb=e2d0e7eb0476ade97ed7c00e7a3838609d52d084;hp=66ee0a3c558f67ea7f1b80253540772657ddc724;hpb=de5ad195ef7f521cd021746f49f8c4c5c64e7872;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 66ee0a3c55..fd42ae0b90 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -30,6 +30,7 @@ #include "language.h" #include "c-lang.h" #include "cp-abi.h" +#include "target.h" /* Print function pointer with inferior address ADDRESS onto stdio @@ -38,7 +39,9 @@ static void print_function_pointer_address (CORE_ADDR address, struct ui_file *stream) { - CORE_ADDR func_addr = CONVERT_FROM_FUNC_PTR_ADDR (address); + CORE_ADDR func_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch, + address, + ¤t_target); /* If the function pointer is represented by a description, print the address of the description. */ @@ -70,7 +73,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int format, int deref_ref, int recurse, enum val_prettyprint pretty) { - register unsigned int i = 0; /* Number of characters printed */ + unsigned int i = 0; /* Number of characters printed */ unsigned len; struct type *elttype; unsigned eltlen; @@ -213,13 +216,12 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, struct value *vt_val; struct symbol *wsym = (struct symbol *) NULL; struct type *wtype; - struct symtab *s; struct block *block = (struct block *) NULL; int is_this_fld; if (msymbol != NULL) - wsym = lookup_symbol (SYMBOL_NAME (msymbol), block, - VAR_NAMESPACE, &is_this_fld, &s); + wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block, + VAR_DOMAIN, &is_this_fld, NULL); if (wsym) { @@ -593,7 +595,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format, /* Otherwise, we end up at the return outside this "if" */ } - return val_print (type, VALUE_CONTENTS_ALL (val), VALUE_EMBEDDED_OFFSET (val), - VALUE_ADDRESS (val), + return val_print (type, VALUE_CONTENTS_ALL (val), + VALUE_EMBEDDED_OFFSET (val), + VALUE_ADDRESS (val) + VALUE_OFFSET (val), stream, format, 1, 0, pretty); }