From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2432 invoked by alias); 19 Dec 2002 19:01:41 -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 2421 invoked from network); 19 Dec 2002 19:01:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 19 Dec 2002 19:01:40 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gBJIZ9g02738 for ; Thu, 19 Dec 2002 13:35:09 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBJJ1S201587 for ; Thu, 19 Dec 2002 14:01:28 -0500 Received: from localhost.localdomain (vpn50-3.rdu.redhat.com [172.16.50.3]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBJJ1RL18687 for ; Thu, 19 Dec 2002 14:01:27 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id gBJJ1Mr13456 for gdb-patches@sources.redhat.com; Thu, 19 Dec 2002 12:01:22 -0700 Date: Thu, 19 Dec 2002 11:44:00 -0000 From: Kevin Buettner Message-Id: <1021219190121.ZM13455@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [PATCH] exec.c: print_section_info() format string fixes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00555.txt.bz2 On 64-bit targets, I found that the values printed by print_section_info() were not being printed in their entirety. I've just committed the patch below to fix this problem. As I look at it now, I see that the FIXME comment can go. I'll zap it in a moment. * exec.c (print_section_info): Select a format string to use with local_hex_string_custom() based upon the value of TARGET_ADDR_BIT. Index: exec.c =================================================================== RCS file: /cvs/src/src/gdb/exec.c,v retrieving revision 1.23 diff -u -p -r1.23 exec.c --- exec.c 12 Dec 2002 01:39:34 -0000 1.23 +++ exec.c 19 Dec 2002 18:44:40 -0000 @@ -545,6 +545,7 @@ void print_section_info (struct target_ops *t, bfd *abfd) { struct section_table *p; + char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l"; printf_filtered ("\t`%s', ", bfd_get_filename (abfd)); wrap_here (" "); @@ -558,11 +559,11 @@ print_section_info (struct target_ops *t for (p = t->to_sections; p < t->to_sections_end; p++) { /* FIXME-32x64 need a print_address_numeric with field width */ - printf_filtered ("\t%s", local_hex_string_custom ((unsigned long) p->addr, "08l")); - printf_filtered (" - %s", local_hex_string_custom ((unsigned long) p->endaddr, "08l")); + printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt)); + printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt)); if (info_verbose) printf_filtered (" @ %s", - local_hex_string_custom ((unsigned long) p->the_bfd_section->filepos, "08l")); + local_hex_string_custom (p->the_bfd_section->filepos, "08l")); printf_filtered (" is %s", bfd_section_name (p->bfd, p->the_bfd_section)); if (p->bfd != abfd) {