diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-12-19 18:49:27 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-12-19 18:49:27 +0000 |
commit | 2fc70c99f5971c82082002564e3a598f61d1bcd9 (patch) | |
tree | c4898e06c7ffdbf5ed10c71e14a08d0ac476b198 /gdb | |
parent | 69da35b57aebf07cd707c56e36453aa7580c65f0 (diff) | |
download | gdb-2fc70c99f5971c82082002564e3a598f61d1bcd9.zip gdb-2fc70c99f5971c82082002564e3a598f61d1bcd9.tar.gz gdb-2fc70c99f5971c82082002564e3a598f61d1bcd9.tar.bz2 |
* exec.c (print_section_info): Select a format string to use with
local_hex_string_custom() based upon the value of TARGET_ADDR_BIT.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/exec.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e65f442..eaed545 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-12-19 Kevin Buettner <kevinb@redhat.com> + + * exec.c (print_section_info): Select a format string to use with + local_hex_string_custom() based upon the value of TARGET_ADDR_BIT. + 2002-12-18 Andrew Cagney <ac131313@redhat.com> * frame.c (deprecated_update_current_frame_pc_hack): Replace @@ -545,6 +545,7 @@ void print_section_info (struct target_ops *t, bfd *abfd) { struct section_table *p; + char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l"; printf_filtered ("\t`%s', ", bfd_get_filename (abfd)); wrap_here (" "); @@ -558,11 +559,11 @@ print_section_info (struct target_ops *t, bfd *abfd) for (p = t->to_sections; p < t->to_sections_end; p++) { /* FIXME-32x64 need a print_address_numeric with field width */ - printf_filtered ("\t%s", local_hex_string_custom ((unsigned long) p->addr, "08l")); - printf_filtered (" - %s", local_hex_string_custom ((unsigned long) p->endaddr, "08l")); + printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt)); + printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt)); if (info_verbose) printf_filtered (" @ %s", - local_hex_string_custom ((unsigned long) p->the_bfd_section->filepos, "08l")); + local_hex_string_custom (p->the_bfd_section->filepos, "08l")); printf_filtered (" is %s", bfd_section_name (p->bfd, p->the_bfd_section)); if (p->bfd != abfd) { |