maintenance_print_psymbols (char *args, int from_tty)
{
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;
dont_repeat ();
gdb_argv argv (args);
- cleanups = make_cleanup (null_cleanup, NULL);
for (i = 0; argv != NULL && argv[i] != NULL; ++i)
{
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;
}
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). */