This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: [PATCH] savestring-->gdb_savestring
- To: Elena Zannoni <ezannoni at cygnus dot com>
- Subject: Re: [PATCH] savestring-->gdb_savestring
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 07 Jul 2000 13:47:53 -0400
- CC: insight at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <14692.51351.465539.467765@kwikemart.cygnus.com>
There is no alternative so, please, just go ahead and check it in.
Thanks.
Fernando
Elena Zannoni wrote:
>
> This patch is to make gdbtk build with the new release of readline
> (4.1). There are conflicts between the readline exported version of
> savestring and the gdb defined one. I'll commit it tomorrow.
>
> 2000-07-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
>
> * gdbtk-cmds.c, gdbtk-variable.c: Replace savestring() with
> gdb_savestring(), to avoid conflicts with readline's version of
> savestring().
>
> Index: gdbtk-cmds.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
> retrieving revision 1.10
> diff -c -u -p -r1.10 gdbtk-cmds.c
> --- gdbtk-cmds.c 2000/07/02 20:07:07 1.10
> +++ gdbtk-cmds.c 2000/07/06 14:39:13
> @@ -2327,7 +2327,7 @@ gdb_actions_command (clientData, interp,
> temp = xmalloc (sizeof (struct action_line));
> temp->next = NULL;
> action = Tcl_GetStringFromObj (actions[i], &len);
> - temp->action = savestring (action, len);
> + temp->action = gdb_savestring (action, len);
>
> linetype = validate_actionline (&(temp->action), tp);
>
> Index: gdbtk-variable.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-variable.c,v
> retrieving revision 1.3
> diff -c -u -p -r1.3 gdbtk-variable.c
> --- gdbtk-variable.c 2000/07/02 20:07:07 1.3
> +++ gdbtk-variable.c 2000/07/06 14:39:13
> @@ -515,7 +515,7 @@ variable_obj_command (clientData, interp
> /* If var->name has "-" in it, it's because we
> needed to escape periods in the name... */
> char *p, *name;
> - name = savestring (var->name, strlen (var->name));
> + name = gdb_savestring (var->name, strlen (var->name));
> p = name;
> while (*p != '\000')
> {
> @@ -715,7 +715,7 @@ create_variable (name, frame)
>
> var->format = variable_default_display (var);
> var->root->valid_block = innermost_block;
> - var->name = savestring (name, strlen (name));
> + var->name = gdb_savestring (name, strlen (name));
>
> /* When the frame is different from the current frame,
> we must select the appropriate frame before parsing
> @@ -766,7 +766,7 @@ install_variable (interp, name, var)
> char *name;
> gdb_variable *var;
> {
> - var->obj_name = savestring (name, strlen (name));
> + var->obj_name = gdb_savestring (name, strlen (name));
> Tcl_CreateObjCommand (interp, name, variable_obj_command,
> (ClientData) var, NULL);
> }
> @@ -1796,7 +1796,7 @@ c_name_of_child (parent, index)
> case TYPE_CODE_STRUCT:
> case TYPE_CODE_UNION:
> string = TYPE_FIELD_NAME (type, index);
> - name = savestring (string, strlen (string));
> + name = gdb_savestring (string, strlen (string));
> break;
>
> case TYPE_CODE_PTR:
> @@ -1805,7 +1805,7 @@ c_name_of_child (parent, index)
> case TYPE_CODE_STRUCT:
> case TYPE_CODE_UNION:
> string = TYPE_FIELD_NAME (target, index);
> - name = savestring (string, strlen (string));
> + name = gdb_savestring (string, strlen (string));
> break;
>
> default:
> @@ -2205,7 +2205,7 @@ cplus_name_of_child (parent, index)
> else
> {
> if (name != NULL)
> - name = savestring (name, strlen (name));
> + name = gdb_savestring (name, strlen (name));
> }
>
> return name;
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299