aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2017-08-17 13:58:01 -0700
committerKeith Seitz <keiths@redhat.com>2017-08-17 13:58:01 -0700
commitb5f28d7abc02ca509e389fa932d725cf111e4b40 (patch)
tree57a0dc0feaff890630a6ba2c9fab811d56b1f9cf /gdb/psymtab.c
parent2a95a158fae932f758d75a1178a40d4cc4804ff0 (diff)
parent1a457753cfad05989574c671a221ffce2d5df703 (diff)
downloadbinutils-users/pmuldoon/c++compile.zip
binutils-users/pmuldoon/c++compile.tar.gz
binutils-users/pmuldoon/c++compile.tar.bz2
Problems: gdb/compile/compile.c gdb/cp-support.c gdb/cp-support.h gdb/gdbtypes.h gdb/language.c gdb/linespec.c
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index bb482ee..8283545 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -529,10 +529,10 @@ psym_lookup_symbol (struct objfile *objfile,
information (but NAME might contain it). */
if (sym != NULL
- && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
+ && SYMBOL_MATCHES_SEARCH_NAME (sym, name))
return stab;
if (with_opaque != NULL
- && strcmp_iw (SYMBOL_SEARCH_NAME (with_opaque), name) == 0)
+ && SYMBOL_MATCHES_SEARCH_NAME (with_opaque, name))
stab_best = stab;
/* Keep looking through other psymtabs. */
@@ -1905,9 +1905,7 @@ dump_psymtab_addrmap (struct objfile *objfile, struct partial_symtab *psymtab,
static void
maintenance_print_psymbols (char *args, int from_tty)
{
- char **argv;
struct ui_file *outfile = gdb_stdout;
- struct cleanup *cleanups;
char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
struct objfile *objfile;
struct partial_symtab *ps;
@@ -1917,8 +1915,7 @@ maintenance_print_psymbols (char *args, int from_tty)
dont_repeat ();
- argv = gdb_buildargv (args);
- cleanups = make_cleanup_freeargv (argv);
+ gdb_argv argv (args);
for (i = 0; argv != NULL && argv[i] != NULL; ++i)
{
@@ -1963,14 +1960,12 @@ maintenance_print_psymbols (char *args, int from_tty)
if (argv != NULL && argv[outfile_idx] != NULL)
{
- char *outfile_name;
-
if (argv[outfile_idx + 1] != NULL)
error (_("Junk at end of command"));
- outfile_name = tilde_expand (argv[outfile_idx]);
- make_cleanup (xfree, outfile_name);
- if (!arg_outfile.open (outfile_name, FOPEN_WT))
- perror_with_name (outfile_name);
+ gdb::unique_xmalloc_ptr<char> outfile_name
+ (tilde_expand (argv[outfile_idx]));
+ if (!arg_outfile.open (outfile_name.get (), FOPEN_WT))
+ perror_with_name (outfile_name.get ());
outfile = &arg_outfile;
}
@@ -2061,8 +2056,6 @@ maintenance_print_psymbols (char *args, int from_tty)
if (source_arg != NULL)
error (_("No partial symtab for source file: %s"), source_arg);
}
-
- do_cleanups (cleanups);
}
/* List all the partial symbol tables whose names match REGEXP (optional). */