Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Proposed fix to gdb for printing 64-bit addresses on AIX
@ 2002-04-29 11:16 Brian Taylor
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Brian Taylor @ 2002-04-29 11:16 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-05-07 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-29 11:16 Proposed fix to gdb for printing 64-bit addresses on AIX Brian Taylor
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox