2005-02-14 Andrew Cagney <cagney@gnu.org>
* utils.c (paddress): New function. * defs.h (paddress): Declare. * printcmd.c (deprecated_print_address_numeric): Rename print_address_numeric, call paddress. * valprint.c, ui-out.c, tui/tui-stack.c, tracepoint.c: Update. * symmisc.c, symfile.c stack.c, p-valprint.c, printcmd.c: Update. * maint.c, m32r-rom.c, infcmd.c, f-valprint.c, exec.c: Update. * dwarf2read.c, dve3900-rom.c, defs.h, c-valprint.c: Update. * corefile.c, cli/cli-cmds.c, breakpoint.c, annotate.c: Update. * ada-valprint.c: Update.
This commit is contained in:
parent
8adce22da6
commit
66bf4b3a03
25 changed files with 141 additions and 108 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* utils.c (paddress): New function.
|
||||||
|
* defs.h (paddress): Declare.
|
||||||
|
* printcmd.c (deprecated_print_address_numeric): Rename
|
||||||
|
print_address_numeric, call paddress.
|
||||||
|
* valprint.c, ui-out.c, tui/tui-stack.c, tracepoint.c: Update.
|
||||||
|
* symmisc.c, symfile.c stack.c, p-valprint.c, printcmd.c: Update.
|
||||||
|
* maint.c, m32r-rom.c, infcmd.c, f-valprint.c, exec.c: Update.
|
||||||
|
* dwarf2read.c, dve3900-rom.c, defs.h, c-valprint.c: Update.
|
||||||
|
* corefile.c, cli/cli-cmds.c, breakpoint.c, annotate.c: Update.
|
||||||
|
* ada-valprint.c: Update.
|
||||||
|
|
||||||
2005-02-13 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
|
2005-02-13 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
|
||||||
|
|
||||||
* MAINTAINERS: Add myself to "Write After Approval".
|
* MAINTAINERS: Add myself to "Write After Approval".
|
||||||
|
|
|
@ -718,7 +718,7 @@ ada_val_print_1 (struct type *type, const bfd_byte *valaddr0,
|
||||||
fprintf_filtered (stream, "(");
|
fprintf_filtered (stream, "(");
|
||||||
type_print (type, "", stream, -1);
|
type_print (type, "", stream, -1);
|
||||||
fprintf_filtered (stream, ") ");
|
fprintf_filtered (stream, ") ");
|
||||||
print_address_numeric
|
deprecated_print_address_numeric
|
||||||
(extract_typed_address (valaddr, builtin_type_void_data_ptr),
|
(extract_typed_address (valaddr, builtin_type_void_data_ptr),
|
||||||
1, stream);
|
1, stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,7 +423,7 @@ annotate_source (char *filename, int line, int character, int mid, CORE_ADDR pc)
|
||||||
printf_filtered (("%s:%d:%d:%s:0x"), filename,
|
printf_filtered (("%s:%d:%d:%s:0x"), filename,
|
||||||
line, character,
|
line, character,
|
||||||
mid ? "middle" : "beg");
|
mid ? "middle" : "beg");
|
||||||
print_address_numeric (pc, 0, gdb_stdout);
|
deprecated_print_address_numeric (pc, 0, gdb_stdout);
|
||||||
printf_filtered (("\n"));
|
printf_filtered (("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ annotate_frame_begin (int level, CORE_ADDR pc)
|
||||||
if (annotation_level == 2)
|
if (annotation_level == 2)
|
||||||
{
|
{
|
||||||
printf_filtered (("\n\032\032frame-begin %d 0x"), level);
|
printf_filtered (("\n\032\032frame-begin %d 0x"), level);
|
||||||
print_address_numeric (pc, 0, gdb_stdout);
|
deprecated_print_address_numeric (pc, 0, gdb_stdout);
|
||||||
printf_filtered (("\n"));
|
printf_filtered (("\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -872,7 +872,7 @@ insert_bp_location (struct bp_location *bpt,
|
||||||
bpt->owner->number);
|
bpt->owner->number);
|
||||||
fprintf_filtered (tmp_error_stream,
|
fprintf_filtered (tmp_error_stream,
|
||||||
"Error accessing memory address ");
|
"Error accessing memory address ");
|
||||||
print_address_numeric (bpt->address, 1, tmp_error_stream);
|
deprecated_print_address_numeric (bpt->address, 1, tmp_error_stream);
|
||||||
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
||||||
safe_strerror (val));
|
safe_strerror (val));
|
||||||
}
|
}
|
||||||
|
@ -1028,7 +1028,7 @@ in which its expression is valid.\n"),
|
||||||
bpt->owner->number);
|
bpt->owner->number);
|
||||||
fprintf_filtered (tmp_error_stream,
|
fprintf_filtered (tmp_error_stream,
|
||||||
"Error accessing memory address ");
|
"Error accessing memory address ");
|
||||||
print_address_numeric (bpt->address, 1, tmp_error_stream);
|
deprecated_print_address_numeric (bpt->address, 1, tmp_error_stream);
|
||||||
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
||||||
safe_strerror (val));
|
safe_strerror (val));
|
||||||
bpt->owner->enable_state = bp_disabled;
|
bpt->owner->enable_state = bp_disabled;
|
||||||
|
@ -3769,7 +3769,7 @@ describe_other_breakpoints (CORE_ADDR pc, asection *section)
|
||||||
: ((others == 1) ? " and" : ""));
|
: ((others == 1) ? " and" : ""));
|
||||||
}
|
}
|
||||||
printf_filtered (_("also set at pc "));
|
printf_filtered (_("also set at pc "));
|
||||||
print_address_numeric (pc, 1, gdb_stdout);
|
deprecated_print_address_numeric (pc, 1, gdb_stdout);
|
||||||
printf_filtered (".\n");
|
printf_filtered (".\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4854,7 +4854,7 @@ mention (struct breakpoint *b)
|
||||||
if (addressprint || b->source_file == NULL)
|
if (addressprint || b->source_file == NULL)
|
||||||
{
|
{
|
||||||
printf_filtered (" at ");
|
printf_filtered (" at ");
|
||||||
print_address_numeric (b->loc->address, 1, gdb_stdout);
|
deprecated_print_address_numeric (b->loc->address, 1, gdb_stdout);
|
||||||
}
|
}
|
||||||
if (b->source_file)
|
if (b->source_file)
|
||||||
printf_filtered (": file %s, line %d.",
|
printf_filtered (": file %s, line %d.",
|
||||||
|
@ -6822,7 +6822,7 @@ delete_breakpoint (struct breakpoint *bpt)
|
||||||
{
|
{
|
||||||
fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
|
fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
|
||||||
fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
|
fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
|
||||||
print_address_numeric (b->loc->address, 1, tmp_error_stream);
|
deprecated_print_address_numeric (b->loc->address, 1, tmp_error_stream);
|
||||||
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
fprintf_filtered (tmp_error_stream, ": %s.\n",
|
||||||
safe_strerror (val));
|
safe_strerror (val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ print_function_pointer_address (CORE_ADDR address, struct ui_file *stream)
|
||||||
if (addressprint && func_addr != address)
|
if (addressprint && func_addr != address)
|
||||||
{
|
{
|
||||||
fputs_filtered ("@", stream);
|
fputs_filtered ("@", stream);
|
||||||
print_address_numeric (address, 1, stream);
|
deprecated_print_address_numeric (address, 1, stream);
|
||||||
fputs_filtered (": ", stream);
|
fputs_filtered (": ", stream);
|
||||||
}
|
}
|
||||||
print_address_demangle (func_addr, stream, demangle);
|
print_address_demangle (func_addr, stream, demangle);
|
||||||
|
@ -184,7 +184,7 @@ c_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset,
|
||||||
|
|
||||||
if (addressprint && format != 's')
|
if (addressprint && format != 's')
|
||||||
{
|
{
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For a pointer to char or unsigned char, also print the string
|
/* For a pointer to char or unsigned char, also print the string
|
||||||
|
@ -269,7 +269,7 @@ c_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset,
|
||||||
CORE_ADDR addr
|
CORE_ADDR addr
|
||||||
= extract_typed_address (valaddr + embedded_offset, type);
|
= extract_typed_address (valaddr + embedded_offset, type);
|
||||||
fprintf_filtered (stream, "@");
|
fprintf_filtered (stream, "@");
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
if (deref_ref)
|
if (deref_ref)
|
||||||
fputs_filtered (": ", stream);
|
fputs_filtered (": ", stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -604,14 +604,14 @@ edit_command (char *arg, int from_tty)
|
||||||
sym = find_pc_function (sal.pc);
|
sym = find_pc_function (sal.pc);
|
||||||
if (sym)
|
if (sym)
|
||||||
{
|
{
|
||||||
print_address_numeric (sal.pc, 1, gdb_stdout);
|
deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
|
||||||
printf_filtered (" is in ");
|
printf_filtered (" is in ");
|
||||||
fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
|
fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
|
||||||
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
|
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_address_numeric (sal.pc, 1, gdb_stdout);
|
deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
|
||||||
printf_filtered (" is at %s:%d.\n",
|
printf_filtered (" is at %s:%d.\n",
|
||||||
sal.symtab->filename, sal.line);
|
sal.symtab->filename, sal.line);
|
||||||
}
|
}
|
||||||
|
@ -771,14 +771,14 @@ list_command (char *arg, int from_tty)
|
||||||
sym = find_pc_function (sal.pc);
|
sym = find_pc_function (sal.pc);
|
||||||
if (sym)
|
if (sym)
|
||||||
{
|
{
|
||||||
print_address_numeric (sal.pc, 1, gdb_stdout);
|
deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
|
||||||
printf_filtered (" is in ");
|
printf_filtered (" is in ");
|
||||||
fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
|
fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
|
||||||
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
|
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_address_numeric (sal.pc, 1, gdb_stdout);
|
deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
|
||||||
printf_filtered (" is at %s:%d.\n",
|
printf_filtered (" is at %s:%d.\n",
|
||||||
sal.symtab->filename, sal.line);
|
sal.symtab->filename, sal.line);
|
||||||
}
|
}
|
||||||
|
@ -895,9 +895,9 @@ disassemble_command (char *arg, int from_tty)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf_filtered ("from ");
|
printf_filtered ("from ");
|
||||||
print_address_numeric (low, 1, gdb_stdout);
|
deprecated_print_address_numeric (low, 1, gdb_stdout);
|
||||||
printf_filtered (" to ");
|
printf_filtered (" to ");
|
||||||
print_address_numeric (high, 1, gdb_stdout);
|
deprecated_print_address_numeric (high, 1, gdb_stdout);
|
||||||
printf_filtered (":\n");
|
printf_filtered (":\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,12 +218,12 @@ memory_error (int status, CORE_ADDR memaddr)
|
||||||
/* Actually, address between memaddr and memaddr + len
|
/* Actually, address between memaddr and memaddr + len
|
||||||
was out of bounds. */
|
was out of bounds. */
|
||||||
fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
|
fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
|
||||||
print_address_numeric (memaddr, 1, tmp_stream);
|
deprecated_print_address_numeric (memaddr, 1, tmp_stream);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf_filtered (tmp_stream, "Error accessing memory address ");
|
fprintf_filtered (tmp_stream, "Error accessing memory address ");
|
||||||
print_address_numeric (memaddr, 1, tmp_stream);
|
deprecated_print_address_numeric (memaddr, 1, tmp_stream);
|
||||||
fprintf_filtered (tmp_stream, ": %s.",
|
fprintf_filtered (tmp_stream, ": %s.",
|
||||||
safe_strerror (status));
|
safe_strerror (status));
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,6 +512,9 @@ extern char *paddr_nz (CORE_ADDR addr);
|
||||||
extern char *paddr_u (CORE_ADDR addr);
|
extern char *paddr_u (CORE_ADDR addr);
|
||||||
extern char *paddr_d (LONGEST addr);
|
extern char *paddr_d (LONGEST addr);
|
||||||
|
|
||||||
|
/* Like 0x%lx, replaces deprecated_print_address_numeric. */
|
||||||
|
extern const char *paddress (CORE_ADDR addr);
|
||||||
|
|
||||||
extern char *phex (ULONGEST l, int sizeof_l);
|
extern char *phex (ULONGEST l, int sizeof_l);
|
||||||
extern char *phex_nz (ULONGEST l, int sizeof_l);
|
extern char *phex_nz (ULONGEST l, int sizeof_l);
|
||||||
extern char *int_string (LONGEST, int, int, int, int);
|
extern char *int_string (LONGEST, int, int, int, int);
|
||||||
|
@ -587,7 +590,7 @@ extern int build_address_symbolic (CORE_ADDR addr,
|
||||||
int *line,
|
int *line,
|
||||||
int *unmapped);
|
int *unmapped);
|
||||||
|
|
||||||
extern void print_address_numeric (CORE_ADDR, int, struct ui_file *);
|
extern void deprecated_print_address_numeric (CORE_ADDR, int, struct ui_file *);
|
||||||
|
|
||||||
extern void print_address (CORE_ADDR, struct ui_file *);
|
extern void print_address (CORE_ADDR, struct ui_file *);
|
||||||
|
|
||||||
|
|
|
@ -826,7 +826,7 @@ load_section (bfd *abfd, asection *s, unsigned int *data_count)
|
||||||
/* Print some fluff about the section being loaded. */
|
/* Print some fluff about the section being loaded. */
|
||||||
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
||||||
bfd_section_name (abfd, s), (long) section_size);
|
bfd_section_name (abfd, s), (long) section_size);
|
||||||
print_address_numeric (section_base, 1, gdb_stdout);
|
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
|
|
||||||
|
|
|
@ -8335,7 +8335,7 @@ dump_die (struct die_info *die)
|
||||||
case DW_FORM_ref_addr:
|
case DW_FORM_ref_addr:
|
||||||
case DW_FORM_addr:
|
case DW_FORM_addr:
|
||||||
fprintf_unfiltered (gdb_stderr, "address: ");
|
fprintf_unfiltered (gdb_stderr, "address: ");
|
||||||
print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr);
|
deprecated_print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr);
|
||||||
break;
|
break;
|
||||||
case DW_FORM_block2:
|
case DW_FORM_block2:
|
||||||
case DW_FORM_block4:
|
case DW_FORM_block4:
|
||||||
|
|
|
@ -531,7 +531,7 @@ print_section_info (struct target_ops *t, bfd *abfd)
|
||||||
if (abfd == exec_bfd)
|
if (abfd == exec_bfd)
|
||||||
{
|
{
|
||||||
printf_filtered (_("\tEntry point: "));
|
printf_filtered (_("\tEntry point: "));
|
||||||
print_address_numeric (bfd_get_start_address (abfd), 1, gdb_stdout);
|
deprecated_print_address_numeric (bfd_get_start_address (abfd), 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
}
|
}
|
||||||
for (p = t->to_sections; p < t->to_sections_end; p++)
|
for (p = t->to_sections; p < t->to_sections_end; p++)
|
||||||
|
|
|
@ -402,7 +402,7 @@ f_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addressprint && format != 's')
|
if (addressprint && format != 's')
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
|
|
||||||
/* For a pointer to char or unsigned char, also print the string
|
/* For a pointer to char or unsigned char, also print the string
|
||||||
pointed to, unless pointer is null. */
|
pointed to, unless pointer is null. */
|
||||||
|
@ -426,7 +426,7 @@ f_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset,
|
||||||
CORE_ADDR addr
|
CORE_ADDR addr
|
||||||
= extract_typed_address (valaddr + embedded_offset, type);
|
= extract_typed_address (valaddr + embedded_offset, type);
|
||||||
fprintf_filtered (stream, "@");
|
fprintf_filtered (stream, "@");
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
if (deref_ref)
|
if (deref_ref)
|
||||||
fputs_filtered (": ", stream);
|
fputs_filtered (": ", stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -889,7 +889,7 @@ jump_command (char *arg, int from_tty)
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
{
|
{
|
||||||
printf_filtered (_("Continuing at "));
|
printf_filtered (_("Continuing at "));
|
||||||
print_address_numeric (addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (addr, 1, gdb_stdout);
|
||||||
printf_filtered (".\n");
|
printf_filtered (".\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ m32r_load_section (bfd *abfd, asection *s, void *obj)
|
||||||
|
|
||||||
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
||||||
bfd_section_name (abfd, s), section_size);
|
bfd_section_name (abfd, s), section_size);
|
||||||
print_address_numeric (section_base, 1, gdb_stdout);
|
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
monitor_printf ("%s mw\r", paddr_nz (section_base));
|
monitor_printf ("%s mw\r", paddr_nz (section_base));
|
||||||
|
@ -142,7 +142,7 @@ m32r_load (char *filename, int from_tty)
|
||||||
|
|
||||||
printf_filtered ("Loading section %s, size 0x%lx vma ",
|
printf_filtered ("Loading section %s, size 0x%lx vma ",
|
||||||
bfd_section_name (abfd, s), section_size);
|
bfd_section_name (abfd, s), section_size);
|
||||||
print_address_numeric (section_base, 1, gdb_stdout);
|
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
monitor_printf ("%x mw\r", section_base);
|
monitor_printf ("%x mw\r", section_base);
|
||||||
|
@ -510,7 +510,7 @@ m32r_upload_command (char *args, int from_tty)
|
||||||
|
|
||||||
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
printf_filtered ("Loading section %s, size 0x%lx lma ",
|
||||||
bfd_section_name (abfd, s), section_size);
|
bfd_section_name (abfd, s), section_size);
|
||||||
print_address_numeric (section_base, 1, gdb_stdout);
|
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,7 +304,8 @@ maint_print_section_info (const char *name, flagword flags,
|
||||||
CORE_ADDR addr, CORE_ADDR endaddr,
|
CORE_ADDR addr, CORE_ADDR endaddr,
|
||||||
unsigned long filepos)
|
unsigned long filepos)
|
||||||
{
|
{
|
||||||
/* FIXME-32x64: Need print_address_numeric with field width. */
|
/* FIXME-32x64: Need deprecated_print_address_numeric with field
|
||||||
|
width. */
|
||||||
printf_filtered (" 0x%s", paddr (addr));
|
printf_filtered (" 0x%s", paddr (addr));
|
||||||
printf_filtered ("->0x%s", paddr (endaddr));
|
printf_filtered ("->0x%s", paddr (endaddr));
|
||||||
printf_filtered (" at %s",
|
printf_filtered (" at %s",
|
||||||
|
|
|
@ -175,7 +175,7 @@ pascal_val_print (struct type *type, const bfd_byte *valaddr,
|
||||||
|
|
||||||
if (addressprint && format != 's')
|
if (addressprint && format != 's')
|
||||||
{
|
{
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For a pointer to char or unsigned char, also print the string
|
/* For a pointer to char or unsigned char, also print the string
|
||||||
|
@ -275,7 +275,7 @@ pascal_val_print (struct type *type, const bfd_byte *valaddr,
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "@");
|
fprintf_filtered (stream, "@");
|
||||||
/* Extract the address, assume that it is unsigned. */
|
/* Extract the address, assume that it is unsigned. */
|
||||||
print_address_numeric
|
deprecated_print_address_numeric
|
||||||
(extract_unsigned_integer (valaddr + embedded_offset,
|
(extract_unsigned_integer (valaddr + embedded_offset,
|
||||||
TARGET_PTR_BIT / HOST_CHAR_BIT),
|
TARGET_PTR_BIT / HOST_CHAR_BIT),
|
||||||
1, stream);
|
1, stream);
|
||||||
|
|
|
@ -686,22 +686,19 @@ build_address_symbolic (CORE_ADDR addr, /* IN */
|
||||||
/* Print address ADDR on STREAM. USE_LOCAL means the same thing as for
|
/* Print address ADDR on STREAM. USE_LOCAL means the same thing as for
|
||||||
print_longest. */
|
print_longest. */
|
||||||
void
|
void
|
||||||
print_address_numeric (CORE_ADDR addr, int use_local, struct ui_file *stream)
|
deprecated_print_address_numeric (CORE_ADDR addr, int use_local,
|
||||||
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Truncate address to the size of a target address, avoiding shifts
|
if (use_local)
|
||||||
larger or equal than the width of a CORE_ADDR. The local
|
fputs_filtered (paddress (addr), stream);
|
||||||
variable ADDR_BIT stops the compiler reporting a shift overflow
|
else
|
||||||
when it won't occur. */
|
{
|
||||||
/* NOTE: This assumes that the significant address information is
|
int addr_bit = TARGET_ADDR_BIT;
|
||||||
kept in the least significant bits of ADDR - the upper bits were
|
|
||||||
either zero or sign extended. Should ADDRESS_TO_POINTER() or
|
|
||||||
some ADDRESS_TO_PRINTABLE() be used to do the conversion? */
|
|
||||||
|
|
||||||
int addr_bit = TARGET_ADDR_BIT;
|
if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
|
||||||
|
addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
|
||||||
if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
|
print_longest (stream, 'x', 0, (ULONGEST) addr);
|
||||||
addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
|
}
|
||||||
print_longest (stream, 'x', use_local, (ULONGEST) addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print address ADDR symbolically on STREAM.
|
/* Print address ADDR symbolically on STREAM.
|
||||||
|
@ -711,7 +708,7 @@ print_address_numeric (CORE_ADDR addr, int use_local, struct ui_file *stream)
|
||||||
void
|
void
|
||||||
print_address (CORE_ADDR addr, struct ui_file *stream)
|
print_address (CORE_ADDR addr, struct ui_file *stream)
|
||||||
{
|
{
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
print_address_symbolic (addr, stream, asm_demangle, " ");
|
print_address_symbolic (addr, stream, asm_demangle, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +726,7 @@ print_address_demangle (CORE_ADDR addr, struct ui_file *stream, int do_demangle)
|
||||||
}
|
}
|
||||||
else if (addressprint)
|
else if (addressprint)
|
||||||
{
|
{
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
print_address_symbolic (addr, stream, do_demangle, " ");
|
print_address_symbolic (addr, stream, do_demangle, " ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1075,14 +1072,14 @@ address_info (char *exp, int from_tty)
|
||||||
fprintf_symbol_filtered (gdb_stdout, exp,
|
fprintf_symbol_filtered (gdb_stdout, exp,
|
||||||
current_language->la_language, DMGL_ANSI);
|
current_language->la_language, DMGL_ANSI);
|
||||||
printf_filtered ("\" is at ");
|
printf_filtered ("\" is at ");
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (" in a file compiled without debugging");
|
printf_filtered (" in a file compiled without debugging");
|
||||||
section = SYMBOL_BFD_SECTION (msymbol);
|
section = SYMBOL_BFD_SECTION (msymbol);
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (",\n -- loaded at ");
|
printf_filtered (",\n -- loaded at ");
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (" in overlay section %s", section->name);
|
printf_filtered (" in overlay section %s", section->name);
|
||||||
}
|
}
|
||||||
printf_filtered (".\n");
|
printf_filtered (".\n");
|
||||||
|
@ -1109,13 +1106,13 @@ address_info (char *exp, int from_tty)
|
||||||
|
|
||||||
case LOC_LABEL:
|
case LOC_LABEL:
|
||||||
printf_filtered ("a label at address ");
|
printf_filtered ("a label at address ");
|
||||||
print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (",\n -- loaded at ");
|
printf_filtered (",\n -- loaded at ");
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (" in overlay section %s", section->name);
|
printf_filtered (" in overlay section %s", section->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1136,27 +1133,27 @@ address_info (char *exp, int from_tty)
|
||||||
|
|
||||||
case LOC_STATIC:
|
case LOC_STATIC:
|
||||||
printf_filtered (_("static storage at address "));
|
printf_filtered (_("static storage at address "));
|
||||||
print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (_(",\n -- loaded at "));
|
printf_filtered (_(",\n -- loaded at "));
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (_(" in overlay section %s"), section->name);
|
printf_filtered (_(" in overlay section %s"), section->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LOC_INDIRECT:
|
case LOC_INDIRECT:
|
||||||
printf_filtered (_("external global (indirect addressing), at address *("));
|
printf_filtered (_("external global (indirect addressing), at address *("));
|
||||||
print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
printf_filtered (")");
|
printf_filtered (")");
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (_(",\n -- loaded at "));
|
printf_filtered (_(",\n -- loaded at "));
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (_(" in overlay section %s"), section->name);
|
printf_filtered (_(" in overlay section %s"), section->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1201,13 +1198,13 @@ address_info (char *exp, int from_tty)
|
||||||
|
|
||||||
case LOC_BLOCK:
|
case LOC_BLOCK:
|
||||||
printf_filtered (_("a function at address "));
|
printf_filtered (_("a function at address "));
|
||||||
print_address_numeric (load_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
|
deprecated_print_address_numeric (load_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (_(",\n -- loaded at "));
|
printf_filtered (_(",\n -- loaded at "));
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (_(" in overlay section %s"), section->name);
|
printf_filtered (_(" in overlay section %s"), section->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1223,13 +1220,13 @@ address_info (char *exp, int from_tty)
|
||||||
{
|
{
|
||||||
section = SYMBOL_BFD_SECTION (msym);
|
section = SYMBOL_BFD_SECTION (msym);
|
||||||
printf_filtered (_("static storage at address "));
|
printf_filtered (_("static storage at address "));
|
||||||
print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (msym),
|
deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (msym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
if (section_is_overlay (section))
|
if (section_is_overlay (section))
|
||||||
{
|
{
|
||||||
load_addr = overlay_unmapped_address (load_addr, section);
|
load_addr = overlay_unmapped_address (load_addr, section);
|
||||||
printf_filtered (_(",\n -- loaded at "));
|
printf_filtered (_(",\n -- loaded at "));
|
||||||
print_address_numeric (load_addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
|
||||||
printf_filtered (_(" in overlay section %s"), section->name);
|
printf_filtered (_(" in overlay section %s"), section->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
24
gdb/stack.c
24
gdb/stack.c
|
@ -941,17 +941,17 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
{
|
{
|
||||||
printf_filtered (_("Stack level %d, frame at "),
|
printf_filtered (_("Stack level %d, frame at "),
|
||||||
frame_relative_level (fi));
|
frame_relative_level (fi));
|
||||||
print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
|
deprecated_print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
|
||||||
printf_filtered (":\n");
|
printf_filtered (":\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf_filtered (_("Stack frame at "));
|
printf_filtered (_("Stack frame at "));
|
||||||
print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
|
deprecated_print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
|
||||||
printf_filtered (":\n");
|
printf_filtered (":\n");
|
||||||
}
|
}
|
||||||
printf_filtered (" %s = ", pc_regname);
|
printf_filtered (" %s = ", pc_regname);
|
||||||
print_address_numeric (get_frame_pc (fi), 1, gdb_stdout);
|
deprecated_print_address_numeric (get_frame_pc (fi), 1, gdb_stdout);
|
||||||
|
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
if (funname)
|
if (funname)
|
||||||
|
@ -966,13 +966,13 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
puts_filtered ("; ");
|
puts_filtered ("; ");
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered ("saved %s ", pc_regname);
|
printf_filtered ("saved %s ", pc_regname);
|
||||||
print_address_numeric (frame_pc_unwind (fi), 1, gdb_stdout);
|
deprecated_print_address_numeric (frame_pc_unwind (fi), 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
|
|
||||||
if (calling_frame_info)
|
if (calling_frame_info)
|
||||||
{
|
{
|
||||||
printf_filtered (" called by frame at ");
|
printf_filtered (" called by frame at ");
|
||||||
print_address_numeric (get_frame_base (calling_frame_info),
|
deprecated_print_address_numeric (get_frame_base (calling_frame_info),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
}
|
}
|
||||||
if (get_next_frame (fi) && calling_frame_info)
|
if (get_next_frame (fi) && calling_frame_info)
|
||||||
|
@ -981,7 +981,7 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
if (get_next_frame (fi))
|
if (get_next_frame (fi))
|
||||||
{
|
{
|
||||||
printf_filtered (" caller of frame at ");
|
printf_filtered (" caller of frame at ");
|
||||||
print_address_numeric (get_frame_base (get_next_frame (fi)), 1,
|
deprecated_print_address_numeric (get_frame_base (get_next_frame (fi)), 1,
|
||||||
gdb_stdout);
|
gdb_stdout);
|
||||||
}
|
}
|
||||||
if (get_next_frame (fi) || calling_frame_info)
|
if (get_next_frame (fi) || calling_frame_info)
|
||||||
|
@ -1001,7 +1001,7 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf_filtered (" Arglist at ");
|
printf_filtered (" Arglist at ");
|
||||||
print_address_numeric (arg_list, 1, gdb_stdout);
|
deprecated_print_address_numeric (arg_list, 1, gdb_stdout);
|
||||||
printf_filtered (",");
|
printf_filtered (",");
|
||||||
|
|
||||||
if (!FRAME_NUM_ARGS_P ())
|
if (!FRAME_NUM_ARGS_P ())
|
||||||
|
@ -1033,7 +1033,7 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf_filtered (" Locals at ");
|
printf_filtered (" Locals at ");
|
||||||
print_address_numeric (arg_list, 1, gdb_stdout);
|
deprecated_print_address_numeric (arg_list, 1, gdb_stdout);
|
||||||
printf_filtered (",");
|
printf_filtered (",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1071,14 +1071,14 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
may or may not be valid. */
|
may or may not be valid. */
|
||||||
sp = extract_unsigned_integer (value, register_size (current_gdbarch, SP_REGNUM));
|
sp = extract_unsigned_integer (value, register_size (current_gdbarch, SP_REGNUM));
|
||||||
printf_filtered (" Previous frame's sp is ");
|
printf_filtered (" Previous frame's sp is ");
|
||||||
print_address_numeric (sp, 1, gdb_stdout);
|
deprecated_print_address_numeric (sp, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
need_nl = 0;
|
need_nl = 0;
|
||||||
}
|
}
|
||||||
else if (!optimized && lval == lval_memory)
|
else if (!optimized && lval == lval_memory)
|
||||||
{
|
{
|
||||||
printf_filtered (" Previous frame's sp at ");
|
printf_filtered (" Previous frame's sp at ");
|
||||||
print_address_numeric (addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (addr, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
need_nl = 0;
|
need_nl = 0;
|
||||||
}
|
}
|
||||||
|
@ -1111,7 +1111,7 @@ frame_info (char *addr_exp, int from_tty)
|
||||||
puts_filtered (",");
|
puts_filtered (",");
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered (" %s at ", REGISTER_NAME (i));
|
printf_filtered (" %s at ", REGISTER_NAME (i));
|
||||||
print_address_numeric (addr, 1, gdb_stdout);
|
deprecated_print_address_numeric (addr, 1, gdb_stdout);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1383,7 +1383,7 @@ print_block_frame_labels (struct block *b, int *have_default,
|
||||||
if (addressprint)
|
if (addressprint)
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, " ");
|
fprintf_filtered (stream, " ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, stream);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, stream);
|
||||||
}
|
}
|
||||||
fprintf_filtered (stream, " in file %s, line %d\n",
|
fprintf_filtered (stream, " in file %s, line %d\n",
|
||||||
sal.symtab->filename, sal.line);
|
sal.symtab->filename, sal.line);
|
||||||
|
|
|
@ -3080,13 +3080,13 @@ list_overlays_command (char *args, int from_tty)
|
||||||
name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
|
name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
|
||||||
|
|
||||||
printf_filtered ("Section %s, loaded at ", name);
|
printf_filtered ("Section %s, loaded at ", name);
|
||||||
print_address_numeric (lma, 1, gdb_stdout);
|
deprecated_print_address_numeric (lma, 1, gdb_stdout);
|
||||||
puts_filtered (" - ");
|
puts_filtered (" - ");
|
||||||
print_address_numeric (lma + size, 1, gdb_stdout);
|
deprecated_print_address_numeric (lma + size, 1, gdb_stdout);
|
||||||
printf_filtered (", mapped at ");
|
printf_filtered (", mapped at ");
|
||||||
print_address_numeric (vma, 1, gdb_stdout);
|
deprecated_print_address_numeric (vma, 1, gdb_stdout);
|
||||||
puts_filtered (" - ");
|
puts_filtered (" - ");
|
||||||
print_address_numeric (vma + size, 1, gdb_stdout);
|
deprecated_print_address_numeric (vma + size, 1, gdb_stdout);
|
||||||
puts_filtered ("\n");
|
puts_filtered ("\n");
|
||||||
|
|
||||||
nmapped++;
|
nmapped++;
|
||||||
|
|
|
@ -348,7 +348,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
|
fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (msymbol), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (msymbol), 1, outfile);
|
||||||
fprintf_filtered (outfile, " %s", DEPRECATED_SYMBOL_NAME (msymbol));
|
fprintf_filtered (outfile, " %s", DEPRECATED_SYMBOL_NAME (msymbol));
|
||||||
if (SYMBOL_BFD_SECTION (msymbol))
|
if (SYMBOL_BFD_SECTION (msymbol))
|
||||||
fprintf_filtered (outfile, " section %s",
|
fprintf_filtered (outfile, " section %s",
|
||||||
|
@ -404,16 +404,16 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
fprintf_filtered (outfile, ", ");
|
fprintf_filtered (outfile, ", ");
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
print_address_numeric (ANOFFSET (psymtab->section_offsets, i),
|
deprecated_print_address_numeric (ANOFFSET (psymtab->section_offsets, i),
|
||||||
1,
|
1,
|
||||||
outfile);
|
outfile);
|
||||||
}
|
}
|
||||||
fprintf_filtered (outfile, "\n");
|
fprintf_filtered (outfile, "\n");
|
||||||
|
|
||||||
fprintf_filtered (outfile, " Symbols cover text addresses ");
|
fprintf_filtered (outfile, " Symbols cover text addresses ");
|
||||||
print_address_numeric (psymtab->textlow, 1, outfile);
|
deprecated_print_address_numeric (psymtab->textlow, 1, outfile);
|
||||||
fprintf_filtered (outfile, "-");
|
fprintf_filtered (outfile, "-");
|
||||||
print_address_numeric (psymtab->texthigh, 1, outfile);
|
deprecated_print_address_numeric (psymtab->texthigh, 1, outfile);
|
||||||
fprintf_filtered (outfile, "\n");
|
fprintf_filtered (outfile, "\n");
|
||||||
fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n",
|
fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n",
|
||||||
psymtab->number_of_dependencies);
|
psymtab->number_of_dependencies);
|
||||||
|
@ -470,7 +470,7 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab,
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
fprintf_filtered (outfile, " line %d at ", l->item[i].line);
|
fprintf_filtered (outfile, " line %d at ", l->item[i].line);
|
||||||
print_address_numeric (l->item[i].pc, 1, outfile);
|
deprecated_print_address_numeric (l->item[i].pc, 1, outfile);
|
||||||
fprintf_filtered (outfile, "\n");
|
fprintf_filtered (outfile, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -498,9 +498,9 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab,
|
||||||
wants it. */
|
wants it. */
|
||||||
fprintf_filtered (outfile, ", %d syms/buckets in ",
|
fprintf_filtered (outfile, ", %d syms/buckets in ",
|
||||||
dict_size (BLOCK_DICT (b)));
|
dict_size (BLOCK_DICT (b)));
|
||||||
print_address_numeric (BLOCK_START (b), 1, outfile);
|
deprecated_print_address_numeric (BLOCK_START (b), 1, outfile);
|
||||||
fprintf_filtered (outfile, "..");
|
fprintf_filtered (outfile, "..");
|
||||||
print_address_numeric (BLOCK_END (b), 1, outfile);
|
deprecated_print_address_numeric (BLOCK_END (b), 1, outfile);
|
||||||
if (BLOCK_FUNCTION (b))
|
if (BLOCK_FUNCTION (b))
|
||||||
{
|
{
|
||||||
fprintf_filtered (outfile, ", function %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
|
fprintf_filtered (outfile, ", function %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
|
||||||
|
@ -599,7 +599,7 @@ print_symbol (void *args)
|
||||||
if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
|
if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
|
||||||
{
|
{
|
||||||
fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
|
fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
||||||
if (SYMBOL_BFD_SECTION (symbol))
|
if (SYMBOL_BFD_SECTION (symbol))
|
||||||
fprintf_filtered (outfile, " section %s\n",
|
fprintf_filtered (outfile, " section %s\n",
|
||||||
bfd_section_name (SYMBOL_BFD_SECTION (symbol)->owner,
|
bfd_section_name (SYMBOL_BFD_SECTION (symbol)->owner,
|
||||||
|
@ -664,7 +664,7 @@ print_symbol (void *args)
|
||||||
|
|
||||||
case LOC_STATIC:
|
case LOC_STATIC:
|
||||||
fprintf_filtered (outfile, "static at ");
|
fprintf_filtered (outfile, "static at ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
||||||
if (SYMBOL_BFD_SECTION (symbol))
|
if (SYMBOL_BFD_SECTION (symbol))
|
||||||
fprintf_filtered (outfile, " section %s",
|
fprintf_filtered (outfile, " section %s",
|
||||||
bfd_section_name
|
bfd_section_name
|
||||||
|
@ -674,7 +674,7 @@ print_symbol (void *args)
|
||||||
|
|
||||||
case LOC_INDIRECT:
|
case LOC_INDIRECT:
|
||||||
fprintf_filtered (outfile, "extern global at *(");
|
fprintf_filtered (outfile, "extern global at *(");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
||||||
fprintf_filtered (outfile, "),");
|
fprintf_filtered (outfile, "),");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ print_symbol (void *args)
|
||||||
|
|
||||||
case LOC_LABEL:
|
case LOC_LABEL:
|
||||||
fprintf_filtered (outfile, "label at ");
|
fprintf_filtered (outfile, "label at ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
|
||||||
if (SYMBOL_BFD_SECTION (symbol))
|
if (SYMBOL_BFD_SECTION (symbol))
|
||||||
fprintf_filtered (outfile, " section %s",
|
fprintf_filtered (outfile, " section %s",
|
||||||
bfd_section_name
|
bfd_section_name
|
||||||
|
@ -736,11 +736,11 @@ print_symbol (void *args)
|
||||||
fprintf_filtered (outfile, "block object ");
|
fprintf_filtered (outfile, "block object ");
|
||||||
gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
|
gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
|
||||||
fprintf_filtered (outfile, ", ");
|
fprintf_filtered (outfile, ", ");
|
||||||
print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (symbol)),
|
deprecated_print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (symbol)),
|
||||||
1,
|
1,
|
||||||
outfile);
|
outfile);
|
||||||
fprintf_filtered (outfile, "..");
|
fprintf_filtered (outfile, "..");
|
||||||
print_address_numeric (BLOCK_END (SYMBOL_BLOCK_VALUE (symbol)),
|
deprecated_print_address_numeric (BLOCK_END (SYMBOL_BLOCK_VALUE (symbol)),
|
||||||
1,
|
1,
|
||||||
outfile);
|
outfile);
|
||||||
if (SYMBOL_BFD_SECTION (symbol))
|
if (SYMBOL_BFD_SECTION (symbol))
|
||||||
|
@ -915,7 +915,7 @@ print_partial_symbols (struct partial_symbol **p, int count, char *what,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fputs_filtered (", ", outfile);
|
fputs_filtered (", ", outfile);
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (*p), 1, outfile);
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (*p), 1, outfile);
|
||||||
fprintf_filtered (outfile, "\n");
|
fprintf_filtered (outfile, "\n");
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
@ -1076,9 +1076,9 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
|
||||||
printf_filtered (" fullname %s\n",
|
printf_filtered (" fullname %s\n",
|
||||||
psymtab->fullname ? psymtab->fullname : "(null)");
|
psymtab->fullname ? psymtab->fullname : "(null)");
|
||||||
printf_filtered (" text addresses ");
|
printf_filtered (" text addresses ");
|
||||||
print_address_numeric (psymtab->textlow, 1, gdb_stdout);
|
deprecated_print_address_numeric (psymtab->textlow, 1, gdb_stdout);
|
||||||
printf_filtered (" -- ");
|
printf_filtered (" -- ");
|
||||||
print_address_numeric (psymtab->texthigh, 1, gdb_stdout);
|
deprecated_print_address_numeric (psymtab->texthigh, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
printf_filtered (" globals ");
|
printf_filtered (" globals ");
|
||||||
if (psymtab->n_global_syms)
|
if (psymtab->n_global_syms)
|
||||||
|
@ -1187,9 +1187,9 @@ maintenance_check_symtabs (char *ignore, int from_tty)
|
||||||
printf_filtered ("Psymtab ");
|
printf_filtered ("Psymtab ");
|
||||||
puts_filtered (ps->filename);
|
puts_filtered (ps->filename);
|
||||||
printf_filtered (" covers bad range ");
|
printf_filtered (" covers bad range ");
|
||||||
print_address_numeric (ps->textlow, 1, gdb_stdout);
|
deprecated_print_address_numeric (ps->textlow, 1, gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
print_address_numeric (ps->texthigh, 1, gdb_stdout);
|
deprecated_print_address_numeric (ps->texthigh, 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1200,13 +1200,13 @@ maintenance_check_symtabs (char *ignore, int from_tty)
|
||||||
printf_filtered ("Psymtab ");
|
printf_filtered ("Psymtab ");
|
||||||
puts_filtered (ps->filename);
|
puts_filtered (ps->filename);
|
||||||
printf_filtered (" covers ");
|
printf_filtered (" covers ");
|
||||||
print_address_numeric (ps->textlow, 1, gdb_stdout);
|
deprecated_print_address_numeric (ps->textlow, 1, gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
print_address_numeric (ps->texthigh, 1, gdb_stdout);
|
deprecated_print_address_numeric (ps->texthigh, 1, gdb_stdout);
|
||||||
printf_filtered (" but symtab covers only ");
|
printf_filtered (" but symtab covers only ");
|
||||||
print_address_numeric (BLOCK_START (b), 1, gdb_stdout);
|
deprecated_print_address_numeric (BLOCK_START (b), 1, gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
print_address_numeric (BLOCK_END (b), 1, gdb_stdout);
|
deprecated_print_address_numeric (BLOCK_END (b), 1, gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -443,7 +443,7 @@ trace_mention (struct tracepoint *tp)
|
||||||
if (addressprint || (tp->source_file == NULL))
|
if (addressprint || (tp->source_file == NULL))
|
||||||
{
|
{
|
||||||
printf_filtered (" at ");
|
printf_filtered (" at ");
|
||||||
print_address_numeric (tp->address, 1, gdb_stdout);
|
deprecated_print_address_numeric (tp->address, 1, gdb_stdout);
|
||||||
}
|
}
|
||||||
if (tp->source_file)
|
if (tp->source_file)
|
||||||
printf_filtered (": file %s, line %d.",
|
printf_filtered (": file %s, line %d.",
|
||||||
|
@ -2420,7 +2420,7 @@ scope_info (char *args, int from_tty)
|
||||||
break;
|
break;
|
||||||
case LOC_STATIC:
|
case LOC_STATIC:
|
||||||
printf_filtered ("in static storage at address ");
|
printf_filtered ("in static storage at address ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
break;
|
break;
|
||||||
case LOC_REGISTER:
|
case LOC_REGISTER:
|
||||||
|
@ -2453,12 +2453,12 @@ scope_info (char *args, int from_tty)
|
||||||
continue;
|
continue;
|
||||||
case LOC_LABEL:
|
case LOC_LABEL:
|
||||||
printf_filtered ("a label at address ");
|
printf_filtered ("a label at address ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
break;
|
break;
|
||||||
case LOC_BLOCK:
|
case LOC_BLOCK:
|
||||||
printf_filtered ("a function at address ");
|
printf_filtered ("a function at address ");
|
||||||
print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
|
deprecated_print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
break;
|
break;
|
||||||
case LOC_BASEREG:
|
case LOC_BASEREG:
|
||||||
|
@ -2479,7 +2479,7 @@ scope_info (char *args, int from_tty)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf_filtered ("static storage at address ");
|
printf_filtered ("static storage at address ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (msym), 1,
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (msym), 1,
|
||||||
gdb_stdout);
|
gdb_stdout);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2491,7 +2491,7 @@ scope_info (char *args, int from_tty)
|
||||||
break;
|
break;
|
||||||
case LOC_INDIRECT:
|
case LOC_INDIRECT:
|
||||||
printf_filtered ("extern (local indirect) at address ");
|
printf_filtered ("extern (local indirect) at address ");
|
||||||
print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
|
||||||
1, gdb_stdout);
|
1, gdb_stdout);
|
||||||
break;
|
break;
|
||||||
case LOC_COMPUTED:
|
case LOC_COMPUTED:
|
||||||
|
|
|
@ -103,7 +103,7 @@ tui_make_status_line (struct tui_locator_element* loc)
|
||||||
|
|
||||||
/* Translate PC address. */
|
/* Translate PC address. */
|
||||||
pc_out = tui_sfileopen (128);
|
pc_out = tui_sfileopen (128);
|
||||||
print_address_numeric (loc->addr, 1, pc_out);
|
deprecated_print_address_numeric (loc->addr, 1, pc_out);
|
||||||
pc_buf = tui_file_get_strbuf (pc_out);
|
pc_buf = tui_file_get_strbuf (pc_out);
|
||||||
pc_width = strlen (pc_buf);
|
pc_width = strlen (pc_buf);
|
||||||
|
|
||||||
|
|
|
@ -494,7 +494,7 @@ ui_out_field_core_addr (struct ui_out *uiout,
|
||||||
/* FIXME: cagney/2002-05-03: Need local_address_string() function
|
/* FIXME: cagney/2002-05-03: Need local_address_string() function
|
||||||
that returns the language localized string formatted to a width
|
that returns the language localized string formatted to a width
|
||||||
based on TARGET_ADDR_BIT. */
|
based on TARGET_ADDR_BIT. */
|
||||||
/* print_address_numeric (address, 1, local_stream); */
|
/* deprecated_print_address_numeric (address, 1, local_stream); */
|
||||||
if (TARGET_ADDR_BIT <= 32)
|
if (TARGET_ADDR_BIT <= 32)
|
||||||
strcpy (addstr, hex_string_custom (address, 8));
|
strcpy (addstr, hex_string_custom (address, 8));
|
||||||
else
|
else
|
||||||
|
|
19
gdb/utils.c
19
gdb/utils.c
|
@ -2528,6 +2528,25 @@ paddr_nz (CORE_ADDR addr)
|
||||||
return phex_nz (addr, TARGET_ADDR_BIT / 8);
|
return phex_nz (addr, TARGET_ADDR_BIT / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
paddress (CORE_ADDR addr)
|
||||||
|
{
|
||||||
|
/* Truncate address to the size of a target address, avoiding shifts
|
||||||
|
larger or equal than the width of a CORE_ADDR. The local
|
||||||
|
variable ADDR_BIT stops the compiler reporting a shift overflow
|
||||||
|
when it won't occur. */
|
||||||
|
/* NOTE: This assumes that the significant address information is
|
||||||
|
kept in the least significant bits of ADDR - the upper bits were
|
||||||
|
either zero or sign extended. Should ADDRESS_TO_POINTER() or
|
||||||
|
some ADDRESS_TO_PRINTABLE() be used to do the conversion? */
|
||||||
|
|
||||||
|
int addr_bit = TARGET_ADDR_BIT;
|
||||||
|
|
||||||
|
if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
|
||||||
|
addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
|
||||||
|
return hex_string (addr);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
decimal2str (char *paddr_str, char *sign, ULONGEST addr, int width)
|
decimal2str (char *paddr_str, char *sign, ULONGEST addr, int width)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1040,13 +1040,13 @@ val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream)
|
||||||
if (errcode == EIO)
|
if (errcode == EIO)
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, " <Address ");
|
fprintf_filtered (stream, " <Address ");
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
fprintf_filtered (stream, " out of bounds>");
|
fprintf_filtered (stream, " out of bounds>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, " <Error reading address ");
|
fprintf_filtered (stream, " <Error reading address ");
|
||||||
print_address_numeric (addr, 1, stream);
|
deprecated_print_address_numeric (addr, 1, stream);
|
||||||
fprintf_filtered (stream, ": %s>", safe_strerror (errcode));
|
fprintf_filtered (stream, ": %s>", safe_strerror (errcode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue