From: Andrew Cagney <ac131313@cygnus.com>
To: "Insight (GDB GUI)" <insight@sourceware.cygnus.com>
Subject: RFA: strdup -> xstrdup
Date: Mon, 22 Nov 1999 00:59:00 -0000 [thread overview]
Message-ID: <383905B3.EEFB536F@cygnus.com> (raw)
Hello,
The attached replaces strdup() calls with liberty's slightly more robust
xstrdup().
Ok?
Andrew
Thu Nov 18 18:19:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbtk.c (tk_command), gdbtk-hooks.c (gdbtk_readline),
gdbtk-variable.c (variable_type): Replace strdup with xstrdup.
Index: gdbtk-hooks.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-hooks.c,v
retrieving revision 2.31
diff -p -r2.31 gdbtk-hooks.c
*** gdbtk-hooks.c 1999/10/17 04:23:08 2.31
--- gdbtk-hooks.c 1999/11/22 07:39:29
*************** gdbtk_readline (prompt)
*** 470,476 ****
if (result == TCL_OK)
{
! return (strdup (gdbtk_interp->result));
}
else
{
--- 470,476 ----
if (result == TCL_OK)
{
! return (xstrdup (gdbtk_interp->result));
}
else
{
Index: gdbtk-variable.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-variable.c,v
retrieving revision 2.15
diff -p -r2.15 gdbtk-variable.c
*** gdbtk-variable.c 1999/10/05 10:47:59 2.15
--- gdbtk-variable.c 1999/11/22 07:39:35
*************** variable_type (interp, objc, objv, var)
*** 1227,1233 ****
result = call_gdb_type_print (val);
if (result == TCL_OK)
{
! string = strdup (Tcl_GetStringFromObj (get_call_output (), NULL));
first = string;
/* gdb will print things out like "struct {...}" for anonymous structs.
--- 1227,1233 ----
result = call_gdb_type_print (val);
if (result == TCL_OK)
{
! string = xstrdup (Tcl_GetStringFromObj (get_call_output (), NULL));
first = string;
/* gdb will print things out like "struct {...}" for anonymous structs.
Index: gdbtk.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk.c,v
retrieving revision 2.145
diff -p -r2.145 gdbtk.c
*** gdbtk.c 1999/09/23 22:46:57 2.145
--- gdbtk.c 1999/11/22 07:39:37
*************** tk_command (cmd, from_tty)
*** 639,645 ****
retval = Tcl_Eval (gdbtk_interp, cmd);
! result = strdup (gdbtk_interp->result);
old_chain = make_cleanup (free, result);
--- 639,645 ----
retval = Tcl_Eval (gdbtk_interp, cmd);
! result = xstrdup (gdbtk_interp->result);
old_chain = make_cleanup (free, result);
next reply other threads:[~1999-11-22 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-22 0:59 Andrew Cagney [this message]
1999-11-22 10:07 ` James Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=383905B3.EEFB536F@cygnus.com \
--to=ac131313@cygnus.com \
--cc=insight@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).