/* Read coff symbol tables and convert to internal format, for GDB.
- Copyright (C) 1987-2017 Free Software Foundation, Inc.
+ Copyright (C) 1987-2018 Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
This file is part of GDB.
/* Try to add separate debug file if no symbols table found. */
if (!objfile_has_partial_symbols (objfile))
{
- char *debugfile;
+ std::string debugfile = find_separate_debug_file_by_buildid (objfile);
- debugfile = find_separate_debug_file_by_buildid (objfile);
-
- if (debugfile == NULL)
+ if (debugfile.empty ())
debugfile = find_separate_debug_file_by_debuglink (objfile);
- make_cleanup (xfree, debugfile);
- if (debugfile)
+ if (!debugfile.empty ())
{
- gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile));
+ gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile.c_str ()));
- symbol_file_add_separate (abfd.get (), debugfile, symfile_flags,
- objfile);
+ symbol_file_add_separate (abfd.get (), debugfile.c_str (),
+ symfile_flags, objfile);
}
}
backtraces, so filter them out (from phdm@macqel.be). */
if (within_function)
break;
+ /* Fall through. */
case C_STAT:
case C_THUMBLABEL:
case C_THUMBSTAT:
/* At least on a 3b1, gcc generates swbeg and string labels
that look like this. Ignore them. */
break;
- /* Fall in for static symbols that don't start with '.' */
+ /* For static symbols that don't start with '.'... */
+ /* Fall through. */
case C_THUMBEXT:
case C_THUMBEXTFUNC:
case C_EXT: