{
LONGEST val_long = 0;
unsigned int len = TYPE_LENGTH (type);
+ enum bfd_endian byte_order = gdbarch_byte_order (current_gdbarch);
/* If we get here with a string format, try again without it. Go
all the way back to the language printers, which may call us
again. */
if (format == 's')
{
- val_print (type, valaddr, 0, 0, stream, 0, 0, 0, Val_pretty_default);
+ val_print (type, valaddr, 0, 0, stream, 0, 0, 0, Val_pretty_default,
+ current_language);
return;
}
switch (format)
{
case 'o':
- print_octal_chars (stream, valaddr, len);
+ print_octal_chars (stream, valaddr, len, byte_order);
return;
case 'u':
case 'd':
- print_decimal_chars (stream, valaddr, len);
+ print_decimal_chars (stream, valaddr, len, byte_order);
return;
case 't':
- print_binary_chars (stream, valaddr, len);
+ print_binary_chars (stream, valaddr, len, byte_order);
return;
case 'x':
- print_hex_chars (stream, valaddr, len);
+ print_hex_chars (stream, valaddr, len, byte_order);
return;
case 'c':
- print_char_chars (stream, valaddr, len);
+ print_char_chars (stream, valaddr, len, byte_order);
return;
default:
break;
return 0;
}
-/* Print address ADDR on STREAM. USE_LOCAL means the same thing as for
- print_longest. */
-void
-deprecated_print_address_numeric (CORE_ADDR addr, int use_local,
- struct ui_file *stream)
-{
- if (use_local)
- fputs_filtered (paddress (addr), stream);
- else
- {
- int addr_bit = gdbarch_addr_bit (current_gdbarch);
-
- if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
- addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
- print_longest (stream, 'x', 0, (ULONGEST) addr);
- }
-}
/* Print address ADDR symbolically on STREAM.
First print it as a number. Then perhaps print
struct symbol *sym;
struct minimal_symbol *msymbol;
long val;
- long basereg;
asection *section;
CORE_ADDR load_addr;
int is_a_field_of_this; /* C++: lookup_symbol sets this to nonzero
error (_("Argument required."));
sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN,
- &is_a_field_of_this, (struct symtab **) NULL);
+ &is_a_field_of_this);
if (sym == NULL)
{
if (is_a_field_of_this)
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
- basereg = SYMBOL_BASEREG (sym);
section = SYMBOL_BFD_SECTION (sym);
switch (SYMBOL_CLASS (sym))
}
break;
- case LOC_INDIRECT:
- printf_filtered (_("external global (indirect addressing), at address *("));
- fputs_filtered (paddress (load_addr = SYMBOL_VALUE_ADDRESS (sym)),
- gdb_stdout);
- printf_filtered (")");
- if (section_is_overlay (section))
- {
- load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (_(",\n -- loaded at "));
- fputs_filtered (paddress (load_addr), gdb_stdout);
- printf_filtered (_(" in overlay section %s"), section->name);
- }
- break;
-
case LOC_REGPARM:
printf_filtered (_("an argument in register %s"),
gdbarch_register_name (current_gdbarch, val));
printf_filtered (_("an argument at offset %ld"), val);
break;
- case LOC_LOCAL_ARG:
- printf_filtered (_("an argument at frame offset %ld"), val);
- break;
-
case LOC_LOCAL:
printf_filtered (_("a local variable at frame offset %ld"), val);
break;
printf_filtered (_("a reference argument at offset %ld"), val);
break;
- case LOC_BASEREG:
- printf_filtered (_("a variable at offset %ld from register %s"),
- val, gdbarch_register_name (current_gdbarch, basereg));
- break;
-
- case LOC_BASEREG_ARG:
- printf_filtered (_("an argument at offset %ld from register %s"),
- val, gdbarch_register_name (current_gdbarch, basereg));
- break;
-
case LOC_TYPEDEF:
printf_filtered (_("a typedef"));
break;
}
break;
- case LOC_HP_THREAD_LOCAL_STATIC:
- printf_filtered (_("\
-a thread-local variable at offset %ld from the thread base register %s"),
- val, gdbarch_register_name (current_gdbarch, basereg));
- break;
-
case LOC_OPTIMIZED_OUT:
printf_filtered (_("optimized out"));
break;