From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] exec.c: print_section_info() format string fixes
Date: Mon, 23 Dec 2002 15:53:00 -0000 [thread overview]
Message-ID: <1021223233859.ZM26089@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "Re: [PATCH] exec.c: print_section_info() format string fixes" (Dec 20, 6:51pm)
On Dec 20, 6:51pm, Andrew Cagney wrote:
> I don't think the problem is fixed, just improved. The 08l / 016l test
> assumes that the address is <= 64 bits. Hence, I think some sort of
> FIXME should remain [...]
With regard to the FIXME comments, I've just committed the following:
* exec.c (print_section_info): Add FIXME comments regarding format
string choices.
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.25
diff -u -p -r1.25 exec.c
--- exec.c 19 Dec 2002 19:02:57 -0000 1.25
+++ exec.c 23 Dec 2002 23:34:24 -0000
@@ -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
{
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"));
next prev parent reply other threads:[~2002-12-23 23:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-19 11:44 Kevin Buettner
2002-12-23 14:50 ` Andrew Cagney
2002-12-23 15:39 ` Kevin Buettner
2002-12-23 15:53 ` Kevin Buettner [this message]
2003-01-03 21:38 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1021223233859.ZM26089@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox