aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c40
1 files changed, 31 insertions, 9 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index fbfe3a7..5bb15c2 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1,6 +1,6 @@
/* Read a symbol table in ECOFF format (Third-Eye).
- Copyright (C) 1986-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-2025 Free Software Foundation, Inc.
Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
CMU. Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -329,7 +329,7 @@ fdr_name (FDR *f)
/* Read in and parse the symtab of the file OBJFILE. Symbols from
different sections are relocated via the SECTION_OFFSETS. */
-void
+static void
mdebug_build_psymtabs (minimal_symbol_reader &reader,
struct objfile *objfile,
const struct ecoff_debug_swap *swap,
@@ -1119,7 +1119,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case_stBlock_code:
found_ecoff_debugging_info = 1;
- /* Beginnning of (code) block. Value of symbol
+ /* Beginning of (code) block. Value of symbol
is the displacement from procedure start. */
push_parse_stack ();
@@ -2122,7 +2122,7 @@ parse_external (EXTR *es, int bigend, const section_offsets &section_offsets,
/* There is no need to parse the external procedure symbols.
If they are from objects compiled without -g, their index will
be indexNil, and the symbol definition from the minimal symbol
- is preferrable (yielding a function returning int instead of int).
+ is preferable (yielding a function returning int instead of int).
If the index points to a local procedure symbol, the local
symbol already provides the correct type.
Note that the index of the external procedure symbol points
@@ -2488,7 +2488,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
switch (ext_in->asym.st)
{
case stProc:
- /* Beginnning of Procedure */
+ /* Beginning of Procedure */
break;
case stStaticProc:
/* Load time only static procs */
@@ -2671,7 +2671,10 @@ parse_partial_symbols (minimal_symbol_reader &reader,
&sh);
if (strcmp (debug_info->ss + fh->issBase + sh.iss,
stabs_symbol) == 0)
- processing_gcc_compilation = 2;
+ {
+ processing_gcc_compilation = 2;
+ stabs_deprecated_warning ();
+ }
}
if (processing_gcc_compilation != 0)
@@ -2935,7 +2938,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
name SOs. */
/* Some other compilers (C++ ones in particular) emit
- useless SOs for non-existant .c files. We ignore
+ useless SOs for non-existent .c files. We ignore
all subsequent SOs that immediately follow the
first. */
@@ -4789,9 +4792,28 @@ elfmdebug_build_psymtabs (struct objfile *objfile,
reader.install ();
}
-void _initialize_mdebugread ();
+/* see mdebugread.h. */
+
void
-_initialize_mdebugread ()
+mipsmdebug_build_psymtabs (struct objfile *objfile,
+ const struct ecoff_debug_swap *swap,
+ struct ecoff_debug_info *info)
+{
+ bfd *abfd = objfile->obfd.get ();
+
+ minimal_symbol_reader reader (objfile);
+
+ if (!(*swap->read_debug_info) (abfd, nullptr,
+ info))
+ error (_("Error reading ECOFF debugging information: %s"),
+ bfd_errmsg (bfd_get_error ()));
+
+ mdebug_build_psymtabs (reader, objfile, swap, info);
+
+ reader.install ();
+}
+
+INIT_GDB_FILE (mdebugread)
{
mdebug_register_index
= register_symbol_register_impl (LOC_REGISTER, &mdebug_register_funcs);