if one exists. */
if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0))
{
- sals = decode_line_spec (main_name (), DECODE_LINE_FUNFIRSTLINE);
+ sals = decode_line_with_current_source (main_name (),
+ DECODE_LINE_FUNFIRSTLINE);
sal = sals.sals[0];
xfree (sals.sals);
current_source_pspace = sal.pspace;
}
strcpy (filename, current_directory);
}
+ else if (strchr(dir, '~'))
+ {
+ /* See whether we need to expand the tilde. */
+ int newlen;
+ char *tilde_expanded;
+
+ tilde_expanded = tilde_expand (dir);
+
+ /* First, realloc the filename buffer if too short. */
+ len = strlen (tilde_expanded);
+ newlen = len + strlen (string) + 2;
+ if (newlen > alloclen)
+ {
+ alloclen = newlen;
+ filename = alloca (alloclen);
+ }
+ strcpy (filename, tilde_expanded);
+ xfree (tilde_expanded);
+ }
else
{
/* Normal file name in path -- just use it. */
If this function fails to find the file that this symtab represents,
NULL will be returned and s->fullname will be set to NULL. */
-char *
+const char *
symtab_to_fullname (struct symtab *s)
{
int r;
}
else
{
- sals = decode_line_spec_1 (arg, DECODE_LINE_LIST_MODE);
+ sals = decode_line_with_last_displayed (arg, DECODE_LINE_LIST_MODE);
dont_repeat ();
}
add_com_alias ("?", "reverse-search", class_files, 0);
}
- add_setshow_integer_cmd ("listsize", class_support, &lines_to_list, _("\
+ add_setshow_zuinteger_unlimited_cmd ("listsize", class_support,
+ &lines_to_list, _("\
Set number of source lines gdb will list by default."), _("\
Show number of source lines gdb will list by default."), NULL,
- NULL,
- show_lines_to_list,
- &setlist, &showlist);
+ NULL, show_lines_to_list,
+ &setlist, &showlist);
add_cmd ("substitute-path", class_files, set_substitute_path_command,
_("\