public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
* insight/152: Memory window addresses include an extra '0x'
@ 2002-05-08  8:23 craig
  0 siblings, 0 replies; only message in thread
From: craig @ 2002-05-08  8:23 UTC (permalink / raw)
  To: insight-gnats


>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);
  


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-08 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-08  8:23 insight/152: Memory window addresses include an extra '0x' craig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).