This is the mail archive of the insight-prs@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

insight/152: Memory window addresses include an extra '0x'



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]