Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Brian Taylor <briant@model.com>
To: gdb-patches@sources.redhat.com
Subject: Proposed fix to gdb for printing 64-bit addresses on AIX
Date: Mon, 29 Apr 2002 11:16:00 -0000	[thread overview]
Message-ID: <3CCD8E01.2020500@model.com> (raw)

Problem:
64-bit addresses reported by 'info break' and 'backtrace' are truncated 
when debugging a 64-bit executable on AIX 4.3.

ChangeLog entry:
2002-04-29  Brian Taylor  <briant@model.com>

        * ui-out.c (ui_out_field_core_addr): Use the function
        'longest_local_hex_string_custom' to format addresses > 32 bits 
wide.


Diff between OLD (5.1.1) version and NEW version:
diff -cp ui-out.c.orig ui-out.c
*** ui-out.c.orig       Thu Jul  5 20:53:11 2001
--- ui-out.c    Mon Apr 29 11:11:29 2002
*************** ui_out_field_core_addr (struct ui_out *u
*** 457,467 ****
                        const char *fldname,
                        CORE_ADDR address)
  {
!   char addstr[20];

!   /* FIXME-32x64: need a print_address_numeric with field width */
!   /* print_address_numeric (address, 1, local_stream); */
!   strcpy (addstr, local_hex_string_custom ((unsigned long) address, 
"08l"));

    ui_out_field_string (uiout, fldname, addstr);
  }
--- 457,469 ----
                        const char *fldname,
                        CORE_ADDR address)
  {
!   /* Modified to print 64 bit addresses for powerpc-ibm-aix4.3.2.0 */
!   char addstr[50];

!   if (TARGET_ADDR_BIT <= 32)
!     strcpy (addstr, local_hex_string_custom ((unsigned long) address, 
"08l"));!   else
!     strcpy (addstr, longest_local_hex_string_custom (address, "016l"));

    ui_out_field_string (uiout, fldname, addstr);
  }


-- 
Brian Taylor                          Model Technology
Staff Engineer                        10450 SW Nimbus Ave., Bldg. R-b
briant@model.com                      Portland, OR 97223-4347
Phone: (503) 526-3042                 Fax: (503) 526-5473



             reply	other threads:[~2002-04-29 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-29 11:16 Brian Taylor [this message]
2002-05-04 20:08 ` Andrew Cagney
2002-05-07  6:19 ` [RFC] Re: Proposed fix to gdb for printing 64-bit addresses Michal Ludvig
2002-05-07  7:56   ` Daniel Jacobowitz
2002-05-07  8:54     ` Michal Ludvig
2002-05-07 10:49       ` 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=3CCD8E01.2020500@model.com \
    --to=briant@model.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