do_setshow_command will free it. */
char *interpreter_p;
-/* Whether dbx commands will be handled. */
-int dbx_commands = 0;
-
/* System root path, used to find libraries etc. */
std::string gdb_sysroot;
{
int save_errno = errno;
- fprintf_unfiltered (gdb_stderr, "Warning: ");
+ gdb_printf (gdb_stderr, "Warning: ");
print_sys_errmsg (new_datadir, save_errno);
}
else if (!S_ISDIR (st.st_mode))
"../foo" and "../foo" doesn't exist then we'll record $(pwd)/../foo which
isn't canonical, but that's ok. */
if (!IS_ABSOLUTE_PATH (gdb_datadir.c_str ()))
- {
- gdb::unique_xmalloc_ptr<char> abs_datadir
- = gdb_abspath (gdb_datadir.c_str ());
-
- gdb_datadir = abs_datadir.get ();
- }
+ gdb_datadir = gdb_abspath (gdb_datadir.c_str ());
}
/* Relocate a file or directory. PROGNAME is the name by which gdb
static struct option long_options[] =
{
{"tui", no_argument, 0, OPT_TUI},
- {"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, NULL, OPT_READNOW},
{"readnever", no_argument, NULL, OPT_READNEVER},
{"r", no_argument, NULL, OPT_READNOW},
/* Any argument left on the command line is unexpected and
will be ignored. Inform the user. */
if (optind < argc)
- fprintf_unfiltered (gdb_stderr,
- _("Excess command line "
- "arguments ignored. (%s%s)\n"),
- argv[optind],
- (optind == argc - 1) ? "" : " ...");
+ gdb_printf (gdb_stderr,
+ _("Excess command line "
+ "arguments ignored. (%s%s)\n"),
+ argv[optind],
+ (optind == argc - 1) ? "" : " ...");
}
/* Lookup gdbinit files. Note that the gdbinit file name may be
if (print_version)
{
print_gdb_version (gdb_stdout, false);
- wrap_here ("");
- printf_filtered ("\n");
+ gdb_printf ("\n");
exit (0);
}
if (print_configuration)
{
print_gdb_configuration (gdb_stdout);
- wrap_here ("");
- printf_filtered ("\n");
+ gdb_printf ("\n");
exit (0);
}
about to read a symbol file (possibly slowly). */
print_gdb_version (gdb_stdout, true);
if (symarg)
- printf_filtered ("..");
- wrap_here ("");
- printf_filtered ("\n");
+ gdb_printf ("..");
+ gdb_printf ("\n");
gdb_flush (gdb_stdout); /* Force to screen during slow
operations. */
}
about to read a symbol file (possibly slowly). */
print_gdb_version (gdb_stdout, true);
if (symarg)
- printf_filtered ("..");
- wrap_here ("");
- printf_filtered ("\n");
+ gdb_printf ("..");
+ gdb_printf ("\n");
gdb_flush (gdb_stdout); /* Force to screen during slow
operations. */
}
/* Note: The options in the list below are only approximately sorted
in the alphabetical order, so as to group closely related options
together. */
- fputs_unfiltered (_("\
+ gdb_puts (_("\
This is the GNU debugger. Usage:\n\n\
gdb [options] [executable-file [core-file or process-id]]\n\
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream);
- fputs_unfiltered (_("\
+ gdb_puts (_("\
Selection of debuggee and its files:\n\n\
--args Arguments after executable-file are passed to inferior.\n\
--core=COREFILE Analyze the core dump COREFILE.\n\
--readnever Do not read symbol files.\n\
--write Set writing into executable and core files.\n\n\
"), stream);
- fputs_unfiltered (_("\
+ gdb_puts (_("\
Initial commands and command files:\n\n\
--command=FILE, -x Execute GDB commands from FILE.\n\
--init-command=FILE, -ix\n\
--nh Do not read ~/.gdbinit.\n\
--nx Do not read any .gdbinit files in any directory.\n\n\
"), stream);
- fputs_unfiltered (_("\
+ gdb_puts (_("\
Output and user interface control:\n\n\
--fullname Output information used by emacs-GDB interface.\n\
--interpreter=INTERP\n\
--nw Do not use the GUI interface.\n\
"), stream);
#if defined(TUI)
- fputs_unfiltered (_("\
+ gdb_puts (_("\
--tui Use a terminal user interface.\n\
"), stream);
#endif
- fputs_unfiltered (_("\
- --dbx DBX compatibility mode.\n\
+ gdb_puts (_("\
-q, --quiet, --silent\n\
Do not print version number on startup.\n\n\
"), stream);
- fputs_unfiltered (_("\
+ gdb_puts (_("\
Operating modes:\n\n\
--batch Exit after processing options.\n\
--batch-silent Like --batch, but suppress all gdb stdout output.\n\
--data-directory=DIR, -D\n\
Set GDB's data-directory to DIR.\n\
"), stream);
- fputs_unfiltered (_("\n\
+ gdb_puts (_("\n\
At startup, GDB reads the following early init files and executes their\n\
commands:\n\
"), stream);
if (!home_gdbearlyinit.empty ())
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
* user-specific early init file: %s\n\
"), home_gdbearlyinit.c_str ());
if (home_gdbearlyinit.empty ())
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
None found.\n"));
- fputs_unfiltered (_("\n\
+ gdb_puts (_("\n\
At startup, GDB reads the following init files and executes their commands:\n\
"), stream);
if (!system_gdbinit.empty ())
if (idx < system_gdbinit.size () - 1)
output += ", ";
}
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
* system-wide init files: %s\n\
"), output.c_str ());
}
if (!home_gdbinit.empty ())
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
* user-specific init file: %s\n\
"), home_gdbinit.c_str ());
if (!local_gdbinit.empty ())
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
* local init file (see also 'set auto-load local-gdbinit'): ./%s\n\
"), local_gdbinit.c_str ());
if (system_gdbinit.empty () && home_gdbinit.empty ()
&& local_gdbinit.empty ())
- fprintf_unfiltered (stream, _("\
+ gdb_printf (stream, _("\
None found.\n"));
- fputs_unfiltered (_("\n\
+ gdb_puts (_("\n\
For more information, type \"help\" from within GDB, or consult the\n\
GDB manual (available as on-line info or a printed manual).\n\
"), stream);
if (REPORT_BUGS_TO[0] && stream == gdb_stdout)
- fprintf_unfiltered (stream, _("\n\
-Report bugs to %s.\n\
-"), REPORT_BUGS_TO);
+ gdb_printf (stream, _("\n\
+Report bugs to %ps.\n\
+"), styled_string (file_name_style.style (), REPORT_BUGS_TO));
if (stream == gdb_stdout)
- fprintf_unfiltered (stream, _("\n\
+ gdb_printf (stream, _("\n\
You can ask GDB-related questions on the GDB users mailing list\n\
(gdb@sourceware.org) or on GDB's IRC channel (#gdb on Freenode).\n"));
}