* utils.c (fputs_maybe_filtered): Check if there's already a top
[deliverable/binutils-gdb.git] / gdb / demangle.c
index c6027c67293db8ef28c68eeb1c243dc2e0d426f5..88dafa103d74667074b2ccb52956bfdb1639c18a 100644 (file)
@@ -1,7 +1,7 @@
 /* Basic C++ demangling support for GDB.
 
-   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-   2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+   2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,9 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 /*  This file contains support code for C++ demangling that is common
@@ -127,8 +125,7 @@ set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
            {
              xfree (current_demangling_style_string);
              current_demangling_style_string =
-               savestring (dem->demangling_style_name,
-                           strlen (dem->demangling_style_name));
+               xstrdup (dem->demangling_style_name);
            }
        }
       if (current_demangling_style == unknown_demangling)
@@ -138,9 +135,7 @@ set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
             one as the default. */
          current_demangling_style = libiberty_demanglers[0].demangling_style;
          current_demangling_style_string =
-           savestring (
-              libiberty_demanglers[0].demangling_style_name,
-             strlen (libiberty_demanglers[0].demangling_style_name));
+           xstrdup (libiberty_demanglers[0].demangling_style_name);
          warning (_("`%s' style demangling chosen as the default."),
                   current_demangling_style_string);
        }
@@ -156,7 +151,7 @@ set_demangling_style (char *style)
     {
       xfree (current_demangling_style_string);
     }
-  current_demangling_style_string = savestring (style, strlen (style));
+  current_demangling_style_string = xstrdup (style);
   set_demangling_command ((char *) NULL, 0, (struct cmd_list_element *) NULL);
 }
 
This page took 0.027748 seconds and 4 git commands to generate.