From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26223 invoked by alias); 8 May 2002 15:23:02 -0000 Mailing-List: contact insight-prs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-prs-owner@sources.redhat.com Received: (qmail 26208 invoked by uid 71); 8 May 2002 15:23:01 -0000 Resent-Date: 8 May 2002 15:23:01 -0000 Resent-Message-ID: <20020508152301.26207.qmail@sources.redhat.com> Resent-From: insight-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: insight-prs@sources.redhat.com Resent-Reply-To: insight-gnats@sources.redhat.com, craig@triscend.com Received:(qmail 25438 invoked by uid 61); 8 May 2002 15:20:45 -0000 Message-Id:<20020508152045.25437.qmail@sources.redhat.com> Date: Wed, 08 May 2002 08:23:00 -0000 From: craig@triscend.com Reply-To: craig@triscend.com To: insight-gnats@sources.redhat.com X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: insight/152: Memory window addresses include an extra '0x' X-SW-Source: 2002-q2/txt/msg00021.txt.bz2 List-Id: >Number: 152 >Category: insight >Synopsis: Memory window addresses include an extra '0x' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed May 08 08:23:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: craig@triscend.com >Release: unknown-1.0 >Organization: >Environment: Windows 2000/Cygwin & Linux with GDB for ARM >Description: When the memory window is opeded the addresses displayed in the left most column have an extra 0x, ie. 0x0x00000000 This seems to be due to the fact that sprintf in gdb_update_mem adds an '0x', but core_addr_to_string also adds an 0x. >How-To-Repeat: Connect to a target and open the memory window. >Fix: The attached file removes the '0x' from the sprintf in gdbtk-cmds.c >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="gdbtk-cmds.c.pat" Content-Disposition: inline; filename="gdbtk-cmds.c.pat" Index: gdbtk-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.56 diff -c -p -r1.56 gdbtk-cmds.c *** gdbtk-cmds.c 4 Apr 2002 20:38:23 -0000 1.56 --- gdbtk-cmds.c 8 May 2002 15:13:02 -0000 *************** gdb_update_mem (ClientData clientData, T *** 2622,2628 **** for (i = 0; i < nbytes; i += bpr) { char s[130]; ! sprintf (s, "0x%s", core_addr_to_string (addr + i)); INDEX ((int) i/bpr, -1); Tcl_SetVar2 (interp, "data", index, s, 0); --- 2622,2628 ---- for (i = 0; i < nbytes; i += bpr) { char s[130]; ! sprintf (s, "%s", core_addr_to_string (addr + i)); INDEX ((int) i/bpr, -1); Tcl_SetVar2 (interp, "data", index, s, 0);