From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11920 invoked by alias); 29 Apr 2002 18:16:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11850 invoked from network); 29 Apr 2002 18:16:36 -0000 Received: from unknown (HELO out.model.com) (208.151.247.182) by sources.redhat.com with SMTP; 29 Apr 2002 18:16:36 -0000 Received: from model.com (pmos.model.com [134.86.96.59]) by out.model.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id JXD845NA; Mon, 29 Apr 2002 11:16:29 -0700 Message-ID: <3CCD8E01.2020500@model.com> Date: Mon, 29 Apr 2002 11:16:00 -0000 From: Brian Taylor Organization: Model Technology User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Proposed fix to gdb for printing 64-bit addresses on AIX Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg01131.txt.bz2 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 * 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