/* Pull in a current source symtab if necessary. */
current_source_location *loc = get_source_location (current_program_space);
if (loc->symtab () == nullptr)
- select_source_symtab (0);
+ select_source_symtab ();
}
/* Return the current default file for listing and next line to list
/* See source.h. */
void
-select_source_symtab (struct symtab *s)
+select_source_symtab ()
{
- if (s)
- {
- current_source_location *loc
- = get_source_location (s->compunit ()->objfile ()->pspace);
- loc->set (s, 1);
- return;
- }
-
current_source_location *loc = get_source_location (current_program_space);
if (loc->symtab () != nullptr)
return;
for (objfile *objfile : current_program_space->objfiles ())
{
- s = objfile->find_last_source_symtab ();
+ symtab *s = objfile->find_last_source_symtab ();
if (s)
new_symtab = s;
}
current_source_location *loc
= get_source_location (current_program_space);
if (loc->symtab () == nullptr)
- select_source_symtab (0);
+ select_source_symtab ();
if (!source_open)
error (_("source code access disabled"));
may be found in a different directory now. */
extern void forget_cached_source_info (void);
-/* Set the source file default for the "list" command to be S.
-
- If S is NULL, and we don't have a default, find one. This
- should only be called when the user actually tries to use the
- default, since we produce an error if we can't find a reasonable
- default. Also, since this can cause symbols to be read, doing it
- before we need to would make things slower than necessary. */
-extern void select_source_symtab (struct symtab *s);
+/* Find a source file default for the "list" command. This should
+ only be called when the user actually tries to use the default,
+ since we produce an error if we can't find a reasonable default.
+ Also, since this can cause symbols to be read, doing it before we
+ need to would make things slower than necessary. */
+extern void select_source_symtab ();
#endif