#include "bfd.h"
#include "gdb_obstack.h"
-
-#include <string.h>
#include <ctype.h>
#include "coff/internal.h" /* Internal format of COFF symbols in BFD */
#include "stabsread.h"
#include "complaints.h"
#include "target.h"
-#include "gdb_assert.h"
#include "block.h"
#include "dictionary.h"
ALL_OBJFILE_MSYMBOLS (objfile, msym)
{
- const char *name = SYMBOL_LINKAGE_NAME (msym);
+ const char *name = MSYMBOL_LINKAGE_NAME (msym);
/* If the minimal symbols whose name are prefixed by "__imp_"
or "_imp_", get rid of the prefix, and search the minimal
|| strncmp (name, "_imp_", 5) == 0))
{
const char *name1 = (name[1] == '_' ? &name[7] : &name[6]);
- struct minimal_symbol *found;
+ struct bound_minimal_symbol found;
found = lookup_minimal_symbol (name1, NULL, objfile);
/* If found, there are symbols named "_imp_foo" and "foo"
respectively in OBJFILE. Set the type of symbol "foo"
as 'mst_solib_trampoline'. */
- if (found != NULL && MSYMBOL_TYPE (found) == mst_text)
- MSYMBOL_TYPE (found) = mst_solib_trampoline;
+ if (found.minsym != NULL
+ && MSYMBOL_TYPE (found.minsym) == mst_text)
+ MSYMBOL_TYPE (found.minsym) = mst_solib_trampoline;
}
}
}
minsyms. */
int section = cs_to_section (cs, objfile);
- tmpaddr = cs->c_value + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
+ tmpaddr = cs->c_value;
record_minimal_symbol (cs, tmpaddr, mst_text,
section, objfile);
enum minimal_symbol_type ms_type;
int sec;
+ CORE_ADDR offset = 0;
if (cs->c_secnum == N_UNDEF)
{
|| cs->c_sclass == C_THUMBEXTFUNC
|| cs->c_sclass == C_THUMBEXT
|| (pe_file && (cs->c_sclass == C_STAT)))
- tmpaddr += ANOFFSET (objfile->section_offsets, sec);
+ offset = ANOFFSET (objfile->section_offsets, sec);
if (bfd_section->flags & SEC_CODE)
{
sym = process_coff_symbol
(cs, &main_aux, objfile);
- SYMBOL_VALUE (sym) = tmpaddr;
+ SYMBOL_VALUE (sym) = tmpaddr + offset;
SYMBOL_SECTION (sym) = sec;
}
}
base_type = decode_type (cs, new_c_type, aux, objfile);
index_type = objfile_type (objfile)->builtin_int;
- range_type =
- create_range_type ((struct type *) NULL,
- index_type, 0, n - 1);
+ range_type
+ = create_static_range_type ((struct type *) NULL,
+ index_type, 0, n - 1);
type =
create_array_type ((struct type *) NULL,
base_type, range_type);