Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: deuling@de.ibm.com (Markus Deuling)
Cc: gdb-patches@sourceware.org (GDB Patches)
Subject: Re: [rfc] [01/17] Get rid of current_gdbarch in exec.c
Date: Thu, 11 Oct 2007 13:54:00 -0000	[thread overview]
Message-ID: <200710111341.l9BDfJ8M004404@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <470DE493.3050505@de.ibm.com> from "Markus Deuling" at Oct 11, 2007 10:53:39 AM

Markus Deuling wrote:

> @@ -531,7 +532,7 @@ print_section_info (struct target_ops *t
>  {
>    struct section_table *p;
>    /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
> -  int wid = gdbarch_addr_bit (current_gdbarch) <= 32 ? 8 : 16;
> +  int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16;

I'm not sure this is the right thing to do.  For example, this still
will not handle the case where we have libraries of different 
architectures loaded.

Since this is used only to determine an appropriate display field
width, I think the correct fix would be to just make two passes
over the section table: in the first pass, do not output anything
but simply take note how many digits the addresses require, and
in the second pass do the actual output.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


      reply	other threads:[~2007-10-11 13:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  8:55 Markus Deuling
2007-10-11 13:54 ` Ulrich Weigand [this message]

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=200710111341.l9BDfJ8M004404@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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