This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: [RFA] Fix gdbtk-cmds.c to use new xfer_memory
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: [RFA] Fix gdbtk-cmds.c to use new xfer_memory
- From: "Martin M. Hunt" <hunt at cygnus dot com>
- Date: Thu, 25 Jan 2001 07:51:23 -0800 (PST)
- cc: insight at sourceware dot cygnus dot com, gdb-patches at sources dot redhat dot com
Thanks. I see you updated the ChangeLog with both changes, but only the
first one got checked in.
Martin
On Wed, 24 Jan 2001, Fernando Nasser wrote:
> I will check it in. But as two separate patches though.
>
> This is a temporary fix as J.T. has pointed out. But it will allow
> Insight to build.
>
> Thanks for the patch.
>
> Fernando
>
> Martin Hunt wrote:
> >
> > 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 */
>
> --
> Fernando Nasser
> Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9
>