This is the mail archive of the insight@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]

[RFA] Fix gdbtk-cmds.c to use new xfer_memory


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 */

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