From abb6af934c54e386c2bca8d725a496f239a9bac2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 25 Oct 2021 18:20:24 -0600 Subject: C++-ify path substitution code I found some uses of xfree in the path substitution code in source.c. C++-ifying struct substitute_path_rule both simplifies the code and removes manual memory management. Regression tested on x86-64 Fedora 34. --- gdb/source.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/source.h') diff --git a/gdb/source.h b/gdb/source.h index 2b9e8f3..e146ce9 100644 --- a/gdb/source.h +++ b/gdb/source.h @@ -128,7 +128,7 @@ extern symtab_and_line set_current_source_symtab_and_line extern void clear_current_source_symtab_and_line (void); /* Add a source path substitution rule. */ -extern void add_substitute_path_rule (char *, char *); +extern void add_substitute_path_rule (const char *, const char *); /* Flags passed as 4th argument to print_source_lines. */ enum print_source_lines_flag -- cgit v1.1