uiout->field_string ("file", symtab_to_filename_for_display (s),
file_name_style.style ());
if (uiout->is_mi_like_p () || !uiout->test_flags (ui_source_list))
- {
+ {
const char *s_fullname = symtab_to_fullname (s);
char *local_fullname;
strcpy (local_fullname, s_fullname);
uiout->field_string ("fullname", local_fullname);
- }
+ }
uiout->text ("\n");
}
if (iter > start)
{
std::string text (start, iter);
- uiout->text (text.c_str ());
+ uiout->text (text);
}
if (*iter == '\r')
{
void
_initialize_source ()
{
- struct cmd_list_element *c;
-
init_source_path ();
/* The intention is to use POSIX Basic Regular Expressions.
just an approximation. */
re_set_syntax (RE_SYNTAX_GREP);
- c = add_cmd ("directory", class_files, directory_command, _("\
+ cmd_list_element *directory_cmd
+ = add_cmd ("directory", class_files, directory_command, _("\
Add directory DIR to beginning of search path for source files.\n\
Forget cached info on source file locations and line positions.\n\
DIR can also be $cwd for the current working directory, or $cdir for the\n\
&cmdlist);
if (dbx_commands)
- add_com_alias ("use", "directory", class_files, 0);
+ add_com_alias ("use", directory_cmd, class_files, 0);
- set_cmd_completer (c, filename_completer);
+ set_cmd_completer (directory_cmd, filename_completer);
add_setshow_optional_filename_cmd ("directories",
class_files,
so that \"x/i\" suffices to start examining the machine code.\n\
The address is also stored as the value of \"$_\"."));
- add_com ("forward-search", class_files, forward_search_command, _("\
+ cmd_list_element *forward_search_cmd
+ = add_com ("forward-search", class_files, forward_search_command, _("\
Search for regular expression (see regex(3)) from last line listed.\n\
The matching line number is also stored as the value of \"$_\"."));
- add_com_alias ("search", "forward-search", class_files, 0);
- add_com_alias ("fo", "forward-search", class_files, 1);
+ add_com_alias ("search", forward_search_cmd, class_files, 0);
+ add_com_alias ("fo", forward_search_cmd, class_files, 1);
- add_com ("reverse-search", class_files, reverse_search_command, _("\
+ cmd_list_element *reverse_search_cmd
+ = add_com ("reverse-search", class_files, reverse_search_command, _("\
Search backward for regular expression (see regex(3)) from last line listed.\n\
The matching line number is also stored as the value of \"$_\"."));
- add_com_alias ("rev", "reverse-search", class_files, 1);
+ add_com_alias ("rev", reverse_search_cmd, class_files, 1);
add_setshow_integer_cmd ("listsize", class_support, &lines_to_list, _("\
Set number of source lines gdb will list by default."), _("\