mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
gdb/
* linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if there are no symbols loaded, instead of throwing a generic error. (decode_variable): Likewise. gdb/testsuite/ * gdb.base/pending.exp: Test pending breakpoints without symbols loaded.
This commit is contained in:
@@ -1556,10 +1556,11 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed,
|
||||
file_symtab = lookup_symtab (copy);
|
||||
if (file_symtab == 0)
|
||||
{
|
||||
if (!have_full_symbols () && !have_partial_symbols ())
|
||||
error (_("No symbol table is loaded. Use the \"file\" command."));
|
||||
if (not_found_ptr)
|
||||
*not_found_ptr = 1;
|
||||
if (!have_full_symbols () && !have_partial_symbols ())
|
||||
throw_error (NOT_FOUND_ERROR,
|
||||
_("No symbol table is loaded. Use the \"file\" command."));
|
||||
throw_error (NOT_FOUND_ERROR, _("No source file named %s."), copy);
|
||||
}
|
||||
|
||||
@@ -1760,12 +1761,14 @@ decode_variable (char *copy, int funfirstline, char ***canonical,
|
||||
if (msymbol != NULL)
|
||||
return minsym_found (funfirstline, msymbol);
|
||||
|
||||
if (!have_full_symbols () &&
|
||||
!have_partial_symbols () && !have_minimal_symbols ())
|
||||
error (_("No symbol table is loaded. Use the \"file\" command."));
|
||||
|
||||
if (not_found_ptr)
|
||||
*not_found_ptr = 1;
|
||||
|
||||
if (!have_full_symbols ()
|
||||
&& !have_partial_symbols ()
|
||||
&& !have_minimal_symbols ())
|
||||
throw_error (NOT_FOUND_ERROR,
|
||||
_("No symbol table is loaded. Use the \"file\" command."));
|
||||
throw_error (NOT_FOUND_ERROR, _("Function \"%s\" not defined."), copy);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user