aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-12-23 23:36:39 +0000
committerKevin Buettner <kevinb@redhat.com>2002-12-23 23:36:39 +0000
commitbcf16802ca812dbd80e6492a1877845a44c070f5 (patch)
tree23c5947f3eb630042feff1dee25ea992c48f6a09 /gdb/exec.c
parent11e6387acb8640983ec131719e1cb02e9cde60ff (diff)
downloadgdb-bcf16802ca812dbd80e6492a1877845a44c070f5.zip
gdb-bcf16802ca812dbd80e6492a1877845a44c070f5.tar.gz
gdb-bcf16802ca812dbd80e6492a1877845a44c070f5.tar.bz2
* exec.c (print_section_info): Add FIXME comments regarding format
string choices.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 16b7e5f..b495a00 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -545,6 +545,7 @@ void
print_section_info (struct target_ops *t, bfd *abfd)
{
struct section_table *p;
+ /* FIXME: "016l" is not wide enough when TARGET_ADDR_BIT > 64. */
char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l";
printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
@@ -560,6 +561,12 @@ print_section_info (struct target_ops *t, bfd *abfd)
{
printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt));
printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt));
+
+ /* FIXME: A format of "08l" is not wide enough for file offsets
+ larger than 4GB. OTOH, making it "016l" isn't desirable either
+ since most output will then be much wider than necessary. It
+ may make sense to test the size of the file and choose the
+ format string accordingly. */
if (info_verbose)
printf_filtered (" @ %s",
local_hex_string_custom (p->the_bfd_section->filepos, "08l"));