aboutsummaryrefslogtreecommitdiff
path: root/gdb/demangle.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-05-23 16:17:18 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-05-23 16:17:18 +0000
commit1b36a34b7a279d934ee183f3d97562d49b612cc5 (patch)
tree3a9bd202bdab9e50804c1096fb173ced0b5db2d9 /gdb/demangle.c
parent61d8f2758f5881aa0138e31b45105515e98eb715 (diff)
downloadfsf-binutils-gdb-1b36a34b7a279d934ee183f3d97562d49b612cc5.zip
fsf-binutils-gdb-1b36a34b7a279d934ee183f3d97562d49b612cc5.tar.gz
fsf-binutils-gdb-1b36a34b7a279d934ee183f3d97562d49b612cc5.tar.bz2
gdb/
Replace the savestring calls by xstrdup calls where possible. * breakpoint.c (condition_command, set_raw_breakpoint) (create_catchpoint, update_breakpoint_locations): Replace the savestring calls by xstrdup calls where possible. * buildsym.c (start_subfile, patch_subfile_names, record_debugformat) (record_producer): Likewise. * coffread.c (coff_start_symtab, complete_symtab): Likewise. * corefile.c (set_gnutarget): Likewise. * dbxread.c (add_new_header_file): Likewise. * demangle.c (set_demangling_command, set_demangling_style): Likewise. * event-top.c (push_prompt, pop_prompt, command_line_handler) (set_async_prompt): Likewise. * infcmd.c (set_inferior_io_terminal, attach_command_post_wait): Likewise. * language.c (set_language_command, _initialize_language): Likewise. * linespec.c (decode_line_2): Likewise. * rs6000-nat.c (add_vmap): Likewise. * top.c (set_prompt, init_history, init_main): Likewise. * tracepoint.c (stringify_collection_list): Likewise. * varobj.c (varobj_create): Remove variable expr_len. Replace the savestring calls by xstrdup calls where possible. (value_of_root, c_name_of_variable, c_describe_child): Replace the savestring calls by xstrdup calls where possible. * xcoffread.c (complete_symtab): Likewise. * cli/cli-script.c (build_command_line, define_command): Likewise. * cli/cli-setshow.c (do_setshow_command): Likewise.
Diffstat (limited to 'gdb/demangle.c')
-rw-r--r--gdb/demangle.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 4a39ad9..b5ccf87 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -125,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)
@@ -136,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);
}
@@ -154,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);
}