/* Parser for linespec for the GNU debugger, GDB.
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
This file is part of GDB.
{
if (canonical_arr[i] == NULL)
{
- symname = DEPRECATED_SYMBOL_NAME (sym_arr[i]);
+ symname = SYMBOL_LINKAGE_NAME (sym_arr[i]);
canonical_arr[i] = savestring (symname, strlen (symname));
}
}
{
if (canonical_arr)
{
- symname = DEPRECATED_SYMBOL_NAME (sym_arr[num]);
+ symname = SYMBOL_LINKAGE_NAME (sym_arr[num]);
make_cleanup (xfree, symname);
canonical_arr[i] = savestring (symname, strlen (symname));
}
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);
}
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);
}
values.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
values.sals[0] = find_pc_sect_line (SYMBOL_VALUE_ADDRESS (msymbol),
- (struct bfd_section *) 0, 0);
- values.sals[0].section = SYMBOL_BFD_SECTION (msymbol);
+ (struct obj_section *) 0, 0);
+ values.sals[0].section = SYMBOL_OBJ_SECTION (msymbol);
/* The minimal symbol might point to a function descriptor;
resolve it to the actual code address instead. */