This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] more 64-bit patches
- To: Insight Mailing List <insight at sources dot redhat dot com>
- Subject: [RFA] more 64-bit patches
- From: "Martin M. Hunt" <hunt at redhat dot com>
- Date: Mon, 29 Oct 2001 12:48:27 -0800
- Organization: Red Hat Inc
I found a couple more 64-bit problems. Things appears to be working well
now, so this should be the last.
- Martin
2001-10-29 Martin M. Hunt <hunt@redhat.com>
* generic/gdbtk-bp.c (gdb_set_bp_addr): When setting
the bp addr_string, use the string the function was called
with instead of using sprintf to write a new one. This
avoids a problem with truncating 64-bit addresses.
* library/srcbar.itcl: Remove lable width for address
box. This allows it to expand for 64-bit addresses.
Index: library/srcbar.itcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v
retrieving revision 1.12
diff -u -p -r1.12 srcbar.itcl
--- srcbar.itcl 2001/08/03 18:46:41 1.12
+++ srcbar.itcl 2001/10/29 19:47:19
@@ -534,7 +534,7 @@ class SrcBar {
$Tool add separator
}
- $Tool add label addr $address "Address" -width 10 -relief sunken \
+ $Tool add label addr $address "Address" -relief sunken \
-bd 1 -anchor e -font src-font
$Tool add label line $line "Line Number" -width 6 -relief sunken \
Index: generic/gdbtk-bp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v
retrieving revision 1.11
diff -u -p -r1.11 gdbtk-bp.c
--- gdbtk-bp.c 2001/10/29 19:37:05 1.11
+++ gdbtk-bp.c 2001/10/29 19:47:19
@@ -200,8 +200,8 @@ Gdbtk_Breakpoint_Init (Tcl_Interp *inter
* It returns a list of breakpoint numbers
*/
static int
-gdb_find_bp_at_addr ( ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
+gdb_find_bp_at_addr (ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])
{
int i;
CORE_ADDR addr;
@@ -568,7 +568,7 @@ gdb_set_bp_addr (ClientData clientData,
int thread = -1;
CORE_ADDR addr;
struct breakpoint *b;
- char *typestr, *buf;
+ char *saddr, *typestr, *buf;
enum bpdisp disp;
if (objc != 3 && objc != 4)
@@ -577,8 +577,9 @@ gdb_set_bp_addr (ClientData clientData,
return TCL_ERROR;
}
- addr = string_to_core_addr (Tcl_GetStringFromObj (objv[1], NULL));
-
+ saddr = Tcl_GetStringFromObj (objv[1], NULL);
+ addr = string_to_core_addr (saddr);
+
typestr = Tcl_GetStringFromObj (objv[2], NULL);
if (strncmp (typestr, "temp", 4) == 0)
disp = disp_del;
@@ -607,9 +608,7 @@ gdb_set_bp_addr (ClientData clientData,
b->number = breakpoint_count;
b->disposition = disp;
b->thread = thread;
-
- xasprintf (&buf, "*(0x%lx)", addr);
- b->addr_string = xstrdup (buf);
+ b->addr_string = xstrdup (saddr);
/* now send notification command back to GUI */
breakpoint_create_event (b->number);