This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] Fix gdbtk-cmds.c to use new xfer_memory
- To: insight at sourceware dot cygnus dot com
- Subject: [RFA] Fix gdbtk-cmds.c to use new xfer_memory
- From: Martin Hunt <hunt at cygnus dot com>
- Date: Wed, 24 Jan 2001 15:48:15 -0500
- Organization: Red Hat
Here's a simple patch to make insight work after JT's changes to
xfer_memory() yesterday. I also changed the deprecated strsave() calls
to xstrdup().
2001-01-24 Martin Hunt <hunt@cygnus.com>
* generic/gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Fix call
to xfer_memory().
(gdb_set_bp_addr): Change strsave() to xstrdup().
(gdb_set_bp): Change strsave() to xstrdup().
Index: gdbtk/generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.16
diff -p -r1.16 gdbtk-cmds.c
*** gdbtk-cmds.c 2000/12/07 22:33:27 1.16
--- gdbtk-cmds.c 2001/01/24 21:37:06
*************** gdbtk_dis_asm_read_memory (memaddr, myad
*** 3112,3118 ****
int res;
errno = 0;
! res = xfer_memory (memaddr, myaddr, len, 0, &exec_ops);
if (res == len)
return 0;
--- 3112,3118 ----
int res;
errno = 0;
! res = xfer_memory (memaddr, myaddr, len, 0, 0, &exec_ops);
if (res == len)
return 0;
*************** gdb_set_bp (clientData, interp, objc, ob
*** 3774,3780 ****
/* FIXME: this won't work for duplicate basenames! */
xasprintf (&buf, "%s:%d", basename (Tcl_GetStringFromObj (objv[1],
NULL)),
line);
! b->addr_string = strsave (buf);
free(buf);
/* now send notification command back to GUI */
--- 3774,3780 ----
/* FIXME: this won't work for duplicate basenames! */
xasprintf (&buf, "%s:%d", basename (Tcl_GetStringFromObj (objv[1],
NULL)),
line);
! b->addr_string = xstrdup (buf);
free(buf);
/* now send notification command back to GUI */
*************** gdb_set_bp_addr (clientData, interp, obj
*** 3880,3886 ****
b->thread = thread;
xasprintf (&buf, "*(0x%lx)", addr);
! b->addr_string = strsave (buf);
/* now send notification command back to GUI */
--- 3880,3886 ----
b->thread = thread;
xasprintf (&buf, "*(0x%lx)", addr);
! b->addr_string = xstrdup (buf);
/* now send notification command back to GUI */