logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Proposed fix to gdb for printing 64-bit addresses on AIX: msg#00110

Subject: Proposed fix to gdb for printing 64-bit addresses on AIX
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@xxxxxxxxx>

       * 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@xxxxxxxxx                      Portland, OR 97223-4347
Phone: (503) 526-3042                 Fax: (503) 526-5473





<Prev in Thread] Current Thread [Next in Thread>