Make psymbols and psymtabs independent of the program space
This patch finally makes partial symbols and partial symtabs independent of the program space. Specifically: It changes add_psymbol_to_list to accept a section index, and changes the psymbol readers to pass this. At the same time it removes the code to add the objfile's section offset to the psymbol. It adds an objfile argument to the psymtab textlow and texthigh accessors and changes some code to use the raw variants instead. It removes the "relocate" method from struct quick_symbol_functions, as it is no longer needed any more. It changes partial_symbol::address so that the relevant offset is now applied at the point of use. gdb/ChangeLog 2018-07-26 Tom Tromey <tom@tromey.com> * dwarf-index-write.c (add_address_entry): Don't add objfile offsets. * dbxread.c (find_stab_function): Rename from find_stab_function_addr. Return a bound_minimal_symbol. (read_dbx_symtab): Use raw_text_low, raw_text_high. Don't add objfile offsets. (end_psymtab): Use raw_text_low, raw_text_high, MSYMBOL_VALUE_RAW_ADDRESS. (read_ofile_symtab): Update. (process_one_symbol): Update. * dwarf2read.c (create_addrmap_from_index): Don't add objfile offsets. (dw2_relocate): Remove. (dw2_find_pc_sect_symtab): Bias PC by the text offset before searching addrmap. (dwarf2_gdb_index_functions, dwarf2_debug_names_functions): Update. (process_psymtab_comp_unit_reader, add_partial_symbol) (add_partial_subprogram, dwarf2_ranges_read): Update. (load_partial_dies): Update. (add_address_entry): Don't add objfile offsets. (dwarf2_build_include_psymtabs): Update. (create_addrmap_from_aranges): Don't add objfile offsets. (dw2_find_pc_sect_compunit_symtab): Update. * mdebugread.c (parse_symbol): Don't add objfile offsets. (parse_lines): Remove 'pst' parameter, replace with 'textlow'. Update. (parse_partial_symbols): Don't add objfile offsets. Use raw_text_low, raw_text_high. Update. (handle_psymbol_enumerators, psymtab_to_symtab_1): Update. * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap or call 'relocate' quick function. Clear psymbol_map. * psympriv.h (struct partial_symbol) <address>: Add section offset. <set_unrelocated_address>: Rename from set_address. <raw_text_low, raw_text_high>: New methods. <text_low, text_high>: Add objfile parameter. (add_psymbol_to_bcache): Add 'section' parameter. Call set_unrelocated_address. * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab) (find_pc_psymbol): Update. (fixup_psymbol_section, relocate_psymtabs): Remove. (dump_psymtab, psym_functions): Update. (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section' parameter. (maintenance_info_psymtabs, maintenance_check_psymtabs): Update. (start_psymtab_common): Update. * symfile-debug.c (debug_qf_relocate): Remove. (debug_sym_quick_functions): Update. * symfile.h (struct quick_symbol_functions) <relocate>: Remove. * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets. Update.
This commit is contained in:
parent
52948f01e4
commit
7974897237
@ -1,3 +1,58 @@
|
|||||||
|
2018-07-26 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* dwarf-index-write.c (add_address_entry): Don't add objfile
|
||||||
|
offsets.
|
||||||
|
* dbxread.c (find_stab_function): Rename from
|
||||||
|
find_stab_function_addr. Return a bound_minimal_symbol.
|
||||||
|
(read_dbx_symtab): Use raw_text_low, raw_text_high.
|
||||||
|
Don't add objfile offsets.
|
||||||
|
(end_psymtab): Use raw_text_low, raw_text_high,
|
||||||
|
MSYMBOL_VALUE_RAW_ADDRESS.
|
||||||
|
(read_ofile_symtab): Update.
|
||||||
|
(process_one_symbol): Update.
|
||||||
|
* dwarf2read.c (create_addrmap_from_index): Don't add objfile
|
||||||
|
offsets.
|
||||||
|
(dw2_relocate): Remove.
|
||||||
|
(dw2_find_pc_sect_symtab): Bias PC by the text offset before
|
||||||
|
searching addrmap.
|
||||||
|
(dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
|
||||||
|
Update.
|
||||||
|
(process_psymtab_comp_unit_reader, add_partial_symbol)
|
||||||
|
(add_partial_subprogram, dwarf2_ranges_read): Update.
|
||||||
|
(load_partial_dies): Update.
|
||||||
|
(add_address_entry): Don't add objfile offsets.
|
||||||
|
(dwarf2_build_include_psymtabs): Update.
|
||||||
|
(create_addrmap_from_aranges): Don't add objfile offsets.
|
||||||
|
(dw2_find_pc_sect_compunit_symtab): Update.
|
||||||
|
* mdebugread.c (parse_symbol): Don't add objfile offsets.
|
||||||
|
(parse_lines): Remove 'pst' parameter, replace with 'textlow'.
|
||||||
|
Update.
|
||||||
|
(parse_partial_symbols): Don't add objfile offsets. Use
|
||||||
|
raw_text_low, raw_text_high. Update.
|
||||||
|
(handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
|
||||||
|
* objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
|
||||||
|
or call 'relocate' quick function. Clear psymbol_map.
|
||||||
|
* psympriv.h (struct partial_symbol) <address>: Add section
|
||||||
|
offset.
|
||||||
|
<set_unrelocated_address>: Rename from set_address.
|
||||||
|
<raw_text_low, raw_text_high>: New methods.
|
||||||
|
<text_low, text_high>: Add objfile parameter.
|
||||||
|
(add_psymbol_to_bcache): Add 'section' parameter. Call
|
||||||
|
set_unrelocated_address.
|
||||||
|
* psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
|
||||||
|
(find_pc_psymbol): Update.
|
||||||
|
(fixup_psymbol_section, relocate_psymtabs): Remove.
|
||||||
|
(dump_psymtab, psym_functions): Update.
|
||||||
|
(add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
|
||||||
|
parameter.
|
||||||
|
(maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
|
||||||
|
(start_psymtab_common): Update.
|
||||||
|
* symfile-debug.c (debug_qf_relocate): Remove.
|
||||||
|
(debug_sym_quick_functions): Update.
|
||||||
|
* symfile.h (struct quick_symbol_functions) <relocate>: Remove.
|
||||||
|
* xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
|
||||||
|
Update.
|
||||||
|
|
||||||
2018-07-26 Tom Tromey <tromey@redhat.com>
|
2018-07-26 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* dbxread.c (end_psymtab): Use text_high_valid and
|
* dbxread.c (end_psymtab): Use text_high_valid and
|
||||||
|
137
gdb/dbxread.c
137
gdb/dbxread.c
@ -902,9 +902,9 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
|||||||
return namestring;
|
return namestring;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CORE_ADDR
|
static struct bound_minimal_symbol
|
||||||
find_stab_function_addr (const char *namestring, const char *filename,
|
find_stab_function (const char *namestring, const char *filename,
|
||||||
struct objfile *objfile)
|
struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct bound_minimal_symbol msym;
|
struct bound_minimal_symbol msym;
|
||||||
int n;
|
int n;
|
||||||
@ -944,7 +944,7 @@ find_stab_function_addr (const char *namestring, const char *filename,
|
|||||||
msym = lookup_minimal_symbol (p, NULL, objfile);
|
msym = lookup_minimal_symbol (p, NULL, objfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
return msym.minsym == NULL ? 0 : BMSYMBOL_VALUE_ADDRESS (msym);
|
return msym;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1137,18 +1137,15 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
|
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
|
||||||
&& namestring[nsl - 2] == '.'))
|
&& namestring[nsl - 2] == '.'))
|
||||||
{
|
{
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
|
|
||||||
if (past_first_source_file && pst
|
if (past_first_source_file && pst
|
||||||
/* The gould NP1 uses low values for .o and -l symbols
|
/* The gould NP1 uses low values for .o and -l symbols
|
||||||
which are not the address. */
|
which are not the address. */
|
||||||
&& nlist.n_value >= pst->text_low ())
|
&& nlist.n_value >= pst->raw_text_low ())
|
||||||
{
|
{
|
||||||
dbx_end_psymtab (objfile, pst, psymtab_include_list,
|
dbx_end_psymtab (objfile, pst, psymtab_include_list,
|
||||||
includes_used, symnum * symbol_size,
|
includes_used, symnum * symbol_size,
|
||||||
nlist.n_value > pst->text_high ()
|
nlist.n_value > pst->raw_text_high ()
|
||||||
? nlist.n_value : pst->text_high (),
|
? nlist.n_value : pst->raw_text_high (),
|
||||||
dependency_list, dependencies_used,
|
dependency_list, dependencies_used,
|
||||||
textlow_not_set);
|
textlow_not_set);
|
||||||
pst = (struct partial_symtab *) 0;
|
pst = (struct partial_symtab *) 0;
|
||||||
@ -1235,8 +1232,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
static const char *dirname_nso;
|
static const char *dirname_nso;
|
||||||
int prev_textlow_not_set;
|
int prev_textlow_not_set;
|
||||||
|
|
||||||
valu = nlist.n_value + ANOFFSET (objfile->section_offsets,
|
valu = nlist.n_value;
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
|
|
||||||
prev_textlow_not_set = textlow_not_set;
|
prev_textlow_not_set = textlow_not_set;
|
||||||
|
|
||||||
@ -1263,8 +1259,8 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
{
|
{
|
||||||
dbx_end_psymtab (objfile, pst, psymtab_include_list,
|
dbx_end_psymtab (objfile, pst, psymtab_include_list,
|
||||||
includes_used, symnum * symbol_size,
|
includes_used, symnum * symbol_size,
|
||||||
(valu > pst->text_high ()
|
(valu > pst->raw_text_high ()
|
||||||
? valu : pst->text_high ()),
|
? valu : pst->raw_text_high ()),
|
||||||
dependency_list, dependencies_used,
|
dependency_list, dependencies_used,
|
||||||
prev_textlow_not_set);
|
prev_textlow_not_set);
|
||||||
pst = (struct partial_symtab *) 0;
|
pst = (struct partial_symtab *) 0;
|
||||||
@ -1438,7 +1434,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
function relative stabs, or the address of the function's
|
function relative stabs, or the address of the function's
|
||||||
end for old style stabs. */
|
end for old style stabs. */
|
||||||
valu = nlist.n_value + last_function_start;
|
valu = nlist.n_value + last_function_start;
|
||||||
if (pst->text_high () == 0 || valu > pst->text_high ())
|
if (pst->raw_text_high () == 0 || valu > pst->raw_text_high ())
|
||||||
pst->set_text_high (valu);
|
pst->set_text_high (valu);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1478,25 +1474,22 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
switch (p[1])
|
switch (p[1])
|
||||||
{
|
{
|
||||||
case 'S':
|
case 'S':
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
data_sect_index);
|
|
||||||
|
|
||||||
if (gdbarch_static_transform_name_p (gdbarch))
|
if (gdbarch_static_transform_name_p (gdbarch))
|
||||||
gdbarch_static_transform_name (gdbarch, namestring);
|
gdbarch_static_transform_name (gdbarch, namestring);
|
||||||
|
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
data_sect_index,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
nlist.n_value, psymtab_language, objfile);
|
nlist.n_value, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
data_sect_index);
|
|
||||||
/* The addresses in these entries are reported to be
|
/* The addresses in these entries are reported to be
|
||||||
wrong. See the code that reads 'G's for symtabs. */
|
wrong. See the code that reads 'G's for symtabs. */
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
data_sect_index,
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
nlist.n_value, psymtab_language, objfile);
|
nlist.n_value, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -1513,14 +1506,14 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
&& namestring[0] != ' '))
|
&& namestring[0] != ' '))
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
STRUCT_DOMAIN, LOC_TYPEDEF,
|
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
if (p[2] == 't')
|
if (p[2] == 't')
|
||||||
{
|
{
|
||||||
/* Also a typedef with the same name. */
|
/* Also a typedef with the same name. */
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
p += 1;
|
p += 1;
|
||||||
@ -1532,7 +1525,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
if (p != namestring) /* a name is there, not just :T... */
|
if (p != namestring) /* a name is there, not just :T... */
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
}
|
}
|
||||||
@ -1593,7 +1586,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
/* Note that the value doesn't matter for
|
/* Note that the value doesn't matter for
|
||||||
enum constants in psymtabs, just in symtabs. */
|
enum constants in psymtabs, just in symtabs. */
|
||||||
add_psymbol_to_list (p, q - p, 1,
|
add_psymbol_to_list (p, q - p, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols, 0,
|
&objfile->static_psymbols, 0,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
/* Point past the name. */
|
/* Point past the name. */
|
||||||
@ -1611,7 +1604,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
case 'c':
|
case 'c':
|
||||||
/* Constant, e.g. from "const" in Pascal. */
|
/* Constant, e.g. from "const" in Pascal. */
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols, 0,
|
&objfile->static_psymbols, 0,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -1627,28 +1620,19 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
function_outside_compilation_unit_complaint (name);
|
function_outside_compilation_unit_complaint (name);
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
/* Kludges for ELF/STABS with Sun ACC. */
|
/* Kludges for ELF/STABS with Sun ACC. */
|
||||||
last_function_name = namestring;
|
last_function_name = namestring;
|
||||||
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
||||||
value for the bottom of the text seg in those cases. */
|
value for the bottom of the text seg in those cases. */
|
||||||
if (nlist.n_value == ANOFFSET (objfile->section_offsets,
|
if (nlist.n_value == 0
|
||||||
SECT_OFF_TEXT (objfile))
|
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
{
|
{
|
||||||
CORE_ADDR minsym_valu =
|
struct bound_minimal_symbol minsym
|
||||||
find_stab_function_addr (namestring,
|
= find_stab_function (namestring,
|
||||||
pst ? pst->filename : NULL,
|
pst ? pst->filename : NULL,
|
||||||
objfile);
|
objfile);
|
||||||
|
if (minsym.minsym != NULL)
|
||||||
/* find_stab_function_addr will return 0 if the minimal
|
nlist.n_value = MSYMBOL_VALUE_RAW_ADDRESS (minsym.minsym);
|
||||||
symbol wasn't found. (Unfortunately, this might also
|
|
||||||
be a valid address.) Anyway, if it *does* return 0,
|
|
||||||
it is likely that the value was set correctly to begin
|
|
||||||
with... */
|
|
||||||
if (minsym_valu != 0)
|
|
||||||
nlist.n_value = minsym_valu;
|
|
||||||
}
|
}
|
||||||
if (pst && textlow_not_set
|
if (pst && textlow_not_set
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
@ -1668,16 +1652,15 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
the partial symbol table. */
|
the partial symbol table. */
|
||||||
if (pst
|
if (pst
|
||||||
&& (textlow_not_set
|
&& (textlow_not_set
|
||||||
|| (nlist.n_value < pst->text_low ()
|
|| (nlist.n_value < pst->raw_text_low ()
|
||||||
&& (nlist.n_value
|
&& (nlist.n_value != 0))))
|
||||||
!= ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile))))))
|
|
||||||
{
|
{
|
||||||
pst->set_text_low (nlist.n_value);
|
pst->set_text_low (nlist.n_value);
|
||||||
textlow_not_set = 0;
|
textlow_not_set = 0;
|
||||||
}
|
}
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
nlist.n_value, psymtab_language, objfile);
|
nlist.n_value, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -1696,28 +1679,19 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
function_outside_compilation_unit_complaint (name);
|
function_outside_compilation_unit_complaint (name);
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
/* Kludges for ELF/STABS with Sun ACC. */
|
/* Kludges for ELF/STABS with Sun ACC. */
|
||||||
last_function_name = namestring;
|
last_function_name = namestring;
|
||||||
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
||||||
value for the bottom of the text seg in those cases. */
|
value for the bottom of the text seg in those cases. */
|
||||||
if (nlist.n_value == ANOFFSET (objfile->section_offsets,
|
if (nlist.n_value == 0
|
||||||
SECT_OFF_TEXT (objfile))
|
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
{
|
{
|
||||||
CORE_ADDR minsym_valu =
|
struct bound_minimal_symbol minsym
|
||||||
find_stab_function_addr (namestring,
|
= find_stab_function (namestring,
|
||||||
pst ? pst->filename : NULL,
|
pst ? pst->filename : NULL,
|
||||||
objfile);
|
objfile);
|
||||||
|
if (minsym.minsym != NULL)
|
||||||
/* find_stab_function_addr will return 0 if the minimal
|
nlist.n_value = MSYMBOL_VALUE_RAW_ADDRESS (minsym.minsym);
|
||||||
symbol wasn't found. (Unfortunately, this might also
|
|
||||||
be a valid address.) Anyway, if it *does* return 0,
|
|
||||||
it is likely that the value was set correctly to begin
|
|
||||||
with... */
|
|
||||||
if (minsym_valu != 0)
|
|
||||||
nlist.n_value = minsym_valu;
|
|
||||||
}
|
}
|
||||||
if (pst && textlow_not_set
|
if (pst && textlow_not_set
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
@ -1737,16 +1711,15 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
the partial symbol table. */
|
the partial symbol table. */
|
||||||
if (pst
|
if (pst
|
||||||
&& (textlow_not_set
|
&& (textlow_not_set
|
||||||
|| (nlist.n_value < pst->text_low ()
|
|| (nlist.n_value < pst->raw_text_low ()
|
||||||
&& (nlist.n_value
|
&& (nlist.n_value != 0))))
|
||||||
!= ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile))))))
|
|
||||||
{
|
{
|
||||||
pst->set_text_low (nlist.n_value);
|
pst->set_text_low (nlist.n_value);
|
||||||
textlow_not_set = 0;
|
textlow_not_set = 0;
|
||||||
}
|
}
|
||||||
add_psymbol_to_list (sym_name, sym_len, 1,
|
add_psymbol_to_list (sym_name, sym_len, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
nlist.n_value, psymtab_language, objfile);
|
nlist.n_value, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -1922,15 +1895,14 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
|||||||
is. */
|
is. */
|
||||||
CORE_ADDR text_end =
|
CORE_ADDR text_end =
|
||||||
(lowest_text_address == (CORE_ADDR) -1
|
(lowest_text_address == (CORE_ADDR) -1
|
||||||
? (text_addr + ANOFFSET (objfile->section_offsets,
|
? text_addr
|
||||||
SECT_OFF_TEXT (objfile)))
|
|
||||||
: lowest_text_address)
|
: lowest_text_address)
|
||||||
+ text_size;
|
+ text_size;
|
||||||
|
|
||||||
dbx_end_psymtab (objfile, pst, psymtab_include_list, includes_used,
|
dbx_end_psymtab (objfile, pst, psymtab_include_list, includes_used,
|
||||||
symnum * symbol_size,
|
symnum * symbol_size,
|
||||||
(text_end > pst->text_high ()
|
(text_end > pst->raw_text_high ()
|
||||||
? text_end : pst->text_high ()),
|
? text_end : pst->raw_text_high ()),
|
||||||
dependency_list, dependencies_used, textlow_not_set);
|
dependency_list, dependencies_used, textlow_not_set);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2029,7 +2001,7 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (minsym.minsym)
|
if (minsym.minsym)
|
||||||
pst->set_text_high (BMSYMBOL_VALUE_ADDRESS (minsym)
|
pst->set_text_high (MSYMBOL_VALUE_RAW_ADDRESS (minsym.minsym)
|
||||||
+ MSYMBOL_SIZE (minsym.minsym));
|
+ MSYMBOL_SIZE (minsym.minsym));
|
||||||
|
|
||||||
last_function_name = NULL;
|
last_function_name = NULL;
|
||||||
@ -2039,7 +2011,7 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
|
|||||||
;
|
;
|
||||||
/* This test will be true if the last .o file is only data. */
|
/* This test will be true if the last .o file is only data. */
|
||||||
else if (textlow_not_set)
|
else if (textlow_not_set)
|
||||||
pst->set_text_low (pst->text_high ());
|
pst->set_text_low (pst->raw_text_high ());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct partial_symtab *p1;
|
struct partial_symtab *p1;
|
||||||
@ -2052,7 +2024,7 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
|
|||||||
ALL_OBJFILE_PSYMTABS (objfile, p1)
|
ALL_OBJFILE_PSYMTABS (objfile, p1)
|
||||||
{
|
{
|
||||||
if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
|
if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
|
||||||
p1->set_text_high (pst->text_low ());
|
p1->set_text_high (pst->raw_text_low ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2238,8 +2210,8 @@ read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
|||||||
|
|
||||||
sym_offset = LDSYMOFF (pst);
|
sym_offset = LDSYMOFF (pst);
|
||||||
sym_size = LDSYMLEN (pst);
|
sym_size = LDSYMLEN (pst);
|
||||||
text_offset = pst->text_low ();
|
text_offset = pst->text_low (objfile);
|
||||||
text_size = pst->text_high () - pst->text_low ();
|
text_size = pst->text_high (objfile) - pst->text_low (objfile);
|
||||||
section_offsets = objfile->section_offsets;
|
section_offsets = objfile->section_offsets;
|
||||||
|
|
||||||
dbxread_objfile = objfile;
|
dbxread_objfile = objfile;
|
||||||
@ -2849,18 +2821,11 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
|
|||||||
SECT_OFF_TEXT (objfile))
|
SECT_OFF_TEXT (objfile))
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
{
|
{
|
||||||
CORE_ADDR minsym_valu =
|
struct bound_minimal_symbol minsym
|
||||||
find_stab_function_addr (name, get_last_source_file (),
|
= find_stab_function (name, get_last_source_file (),
|
||||||
objfile);
|
objfile);
|
||||||
|
if (minsym.minsym != NULL)
|
||||||
/* The function find_stab_function_addr will return
|
valu = BMSYMBOL_VALUE_ADDRESS (minsym);
|
||||||
0 if the minimal symbol wasn't found.
|
|
||||||
(Unfortunately, this might also be a valid
|
|
||||||
address.) Anyway, if it *does* return 0, it is
|
|
||||||
likely that the value was set correctly to begin
|
|
||||||
with... */
|
|
||||||
if (minsym_valu != 0)
|
|
||||||
valu = minsym_valu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* These addresses are absolute. */
|
/* These addresses are absolute. */
|
||||||
|
@ -427,12 +427,8 @@ static void
|
|||||||
add_address_entry (struct objfile *objfile, data_buf &addr_vec,
|
add_address_entry (struct objfile *objfile, data_buf &addr_vec,
|
||||||
CORE_ADDR start, CORE_ADDR end, unsigned int cu_index)
|
CORE_ADDR start, CORE_ADDR end, unsigned int cu_index)
|
||||||
{
|
{
|
||||||
CORE_ADDR baseaddr;
|
addr_vec.append_uint (8, BFD_ENDIAN_LITTLE, start);
|
||||||
|
addr_vec.append_uint (8, BFD_ENDIAN_LITTLE, end);
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
|
||||||
|
|
||||||
addr_vec.append_uint (8, BFD_ENDIAN_LITTLE, start - baseaddr);
|
|
||||||
addr_vec.append_uint (8, BFD_ENDIAN_LITTLE, end - baseaddr);
|
|
||||||
addr_vec.append_data (MAYBE_SWAP (cu_index));
|
addr_vec.append_data (MAYBE_SWAP (cu_index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
111
gdb/dwarf2read.c
111
gdb/dwarf2read.c
@ -3177,8 +3177,8 @@ create_addrmap_from_index (struct dwarf2_per_objfile *dwarf2_per_objfile,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
lo = gdbarch_adjust_dwarf2_addr (gdbarch, lo + baseaddr);
|
lo = gdbarch_adjust_dwarf2_addr (gdbarch, lo + baseaddr) - baseaddr;
|
||||||
hi = gdbarch_adjust_dwarf2_addr (gdbarch, hi + baseaddr);
|
hi = gdbarch_adjust_dwarf2_addr (gdbarch, hi + baseaddr) - baseaddr;
|
||||||
addrmap_set_empty (mutable_map, lo, hi - 1,
|
addrmap_set_empty (mutable_map, lo, hi - 1,
|
||||||
dwarf2_per_objfile->get_cu (cu_index));
|
dwarf2_per_objfile->get_cu (cu_index));
|
||||||
}
|
}
|
||||||
@ -3336,8 +3336,10 @@ create_addrmap_from_aranges (struct dwarf2_per_objfile *dwarf2_per_objfile,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ULONGEST end = start + length;
|
ULONGEST end = start + length;
|
||||||
start = gdbarch_adjust_dwarf2_addr (gdbarch, start + baseaddr);
|
start = (gdbarch_adjust_dwarf2_addr (gdbarch, start + baseaddr)
|
||||||
end = gdbarch_adjust_dwarf2_addr (gdbarch, end + baseaddr);
|
- baseaddr);
|
||||||
|
end = (gdbarch_adjust_dwarf2_addr (gdbarch, end + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
addrmap_set_empty (mutable_map, start, end - 1, per_cu);
|
addrmap_set_empty (mutable_map, start, end - 1, per_cu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4098,14 +4100,6 @@ dw2_dump (struct objfile *objfile)
|
|||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
dw2_relocate (struct objfile *objfile,
|
|
||||||
const struct section_offsets *new_offsets,
|
|
||||||
const struct section_offsets *delta)
|
|
||||||
{
|
|
||||||
/* There's nothing to relocate here. */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dw2_expand_symtabs_for_function (struct objfile *objfile,
|
dw2_expand_symtabs_for_function (struct objfile *objfile,
|
||||||
const char *func_name)
|
const char *func_name)
|
||||||
@ -5237,8 +5231,10 @@ dw2_find_pc_sect_compunit_symtab (struct objfile *objfile,
|
|||||||
if (!objfile->psymtabs_addrmap)
|
if (!objfile->psymtabs_addrmap)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
|
||||||
|
SECT_OFF_TEXT (objfile));
|
||||||
data = (struct dwarf2_per_cu_data *) addrmap_find (objfile->psymtabs_addrmap,
|
data = (struct dwarf2_per_cu_data *) addrmap_find (objfile->psymtabs_addrmap,
|
||||||
pc);
|
pc - baseaddr);
|
||||||
if (!data)
|
if (!data)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -5336,7 +5332,6 @@ const struct quick_symbol_functions dwarf2_gdb_index_functions =
|
|||||||
dw2_lookup_symbol,
|
dw2_lookup_symbol,
|
||||||
dw2_print_stats,
|
dw2_print_stats,
|
||||||
dw2_dump,
|
dw2_dump,
|
||||||
dw2_relocate,
|
|
||||||
dw2_expand_symtabs_for_function,
|
dw2_expand_symtabs_for_function,
|
||||||
dw2_expand_all_symtabs,
|
dw2_expand_all_symtabs,
|
||||||
dw2_expand_symtabs_with_fullname,
|
dw2_expand_symtabs_with_fullname,
|
||||||
@ -6149,7 +6144,6 @@ const struct quick_symbol_functions dwarf2_debug_names_functions =
|
|||||||
dw2_debug_names_lookup_symbol,
|
dw2_debug_names_lookup_symbol,
|
||||||
dw2_print_stats,
|
dw2_print_stats,
|
||||||
dw2_debug_names_dump,
|
dw2_debug_names_dump,
|
||||||
dw2_relocate,
|
|
||||||
dw2_debug_names_expand_symtabs_for_function,
|
dw2_debug_names_expand_symtabs_for_function,
|
||||||
dw2_expand_all_symtabs,
|
dw2_expand_all_symtabs,
|
||||||
dw2_expand_symtabs_with_fullname,
|
dw2_expand_symtabs_with_fullname,
|
||||||
@ -6544,9 +6538,12 @@ dwarf2_build_include_psymtabs (struct dwarf2_cu *cu,
|
|||||||
if (lh == NULL)
|
if (lh == NULL)
|
||||||
return; /* No linetable, so no includes. */
|
return; /* No linetable, so no includes. */
|
||||||
|
|
||||||
/* NOTE: pst->dirname is DW_AT_comp_dir (if present). */
|
/* NOTE: pst->dirname is DW_AT_comp_dir (if present). Also note
|
||||||
|
that we pass in the raw text_low here; that is ok because we're
|
||||||
|
only decoding the line table to make include partial symtabs, and
|
||||||
|
so the addresses aren't really used. */
|
||||||
dwarf_decode_lines (lh.get (), pst->dirname, cu, pst,
|
dwarf_decode_lines (lh.get (), pst->dirname, cu, pst,
|
||||||
pst->text_low (), 1);
|
pst->raw_text_low (), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static hashval_t
|
static hashval_t
|
||||||
@ -7930,14 +7927,17 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
|||||||
cu_bounds_kind = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
|
cu_bounds_kind = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
|
||||||
&best_highpc, cu, pst);
|
&best_highpc, cu, pst);
|
||||||
if (cu_bounds_kind == PC_BOUNDS_HIGH_LOW && best_lowpc < best_highpc)
|
if (cu_bounds_kind == PC_BOUNDS_HIGH_LOW && best_lowpc < best_highpc)
|
||||||
/* Store the contiguous range if it is not empty; it can be empty for
|
{
|
||||||
CUs with no code. */
|
CORE_ADDR low
|
||||||
addrmap_set_empty (objfile->psymtabs_addrmap,
|
= (gdbarch_adjust_dwarf2_addr (gdbarch, best_lowpc + baseaddr)
|
||||||
gdbarch_adjust_dwarf2_addr (gdbarch,
|
- baseaddr);
|
||||||
best_lowpc + baseaddr),
|
CORE_ADDR high
|
||||||
gdbarch_adjust_dwarf2_addr (gdbarch,
|
= (gdbarch_adjust_dwarf2_addr (gdbarch, best_highpc + baseaddr)
|
||||||
best_highpc + baseaddr) - 1,
|
- baseaddr - 1);
|
||||||
pst);
|
/* Store the contiguous range if it is not empty; it can be
|
||||||
|
empty for CUs with no code. */
|
||||||
|
addrmap_set_empty (objfile->psymtabs_addrmap, low, high, pst);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if comp unit has_children.
|
/* Check if comp unit has_children.
|
||||||
If so, read the rest of the partial symbols from this comp unit.
|
If so, read the rest of the partial symbols from this comp unit.
|
||||||
@ -7969,9 +7969,11 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pst->set_text_low (gdbarch_adjust_dwarf2_addr (gdbarch,
|
pst->set_text_low (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
best_lowpc + baseaddr));
|
best_lowpc + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
pst->set_text_high (gdbarch_adjust_dwarf2_addr (gdbarch,
|
pst->set_text_high (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
best_highpc + baseaddr));
|
best_highpc + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
|
|
||||||
end_psymtab_common (objfile, pst);
|
end_psymtab_common (objfile, pst);
|
||||||
|
|
||||||
@ -8008,8 +8010,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
|||||||
", %d global, %d static syms\n",
|
", %d global, %d static syms\n",
|
||||||
per_cu->is_debug_types ? "type" : "comp",
|
per_cu->is_debug_types ? "type" : "comp",
|
||||||
sect_offset_str (per_cu->sect_off),
|
sect_offset_str (per_cu->sect_off),
|
||||||
paddress (gdbarch, pst->text_low ()),
|
paddress (gdbarch, pst->text_low (objfile)),
|
||||||
paddress (gdbarch, pst->text_high ()),
|
paddress (gdbarch, pst->text_high (objfile)),
|
||||||
pst->n_global_syms, pst->n_static_syms);
|
pst->n_global_syms, pst->n_static_syms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8802,7 +8804,8 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
{
|
{
|
||||||
case DW_TAG_inlined_subroutine:
|
case DW_TAG_inlined_subroutine:
|
||||||
case DW_TAG_subprogram:
|
case DW_TAG_subprogram:
|
||||||
addr = gdbarch_adjust_dwarf2_addr (gdbarch, pdi->lowpc + baseaddr);
|
addr = (gdbarch_adjust_dwarf2_addr (gdbarch, pdi->lowpc + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
if (pdi->is_external || cu->language == language_ada)
|
if (pdi->is_external || cu->language == language_ada)
|
||||||
{
|
{
|
||||||
/* brobecker/2007-12-26: Normally, only "external" DIEs are part
|
/* brobecker/2007-12-26: Normally, only "external" DIEs are part
|
||||||
@ -8812,14 +8815,17 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
addr, cu->language, objfile);
|
addr,
|
||||||
|
cu->language, objfile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
addr, cu->language, objfile);
|
addr, cu->language, objfile);
|
||||||
}
|
}
|
||||||
@ -8837,7 +8843,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
list = &objfile->static_psymbols;
|
list = &objfile->static_psymbols;
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL, VAR_DOMAIN, LOC_STATIC,
|
built_actual_name != NULL, VAR_DOMAIN, LOC_STATIC,
|
||||||
list, 0, cu->language, objfile);
|
-1, list, 0, cu->language, objfile);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DW_TAG_variable:
|
case DW_TAG_variable:
|
||||||
@ -8872,9 +8878,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
addr + baseaddr,
|
addr, cu->language, objfile);
|
||||||
cu->language, objfile);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -8891,8 +8897,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
has_loc ? addr + baseaddr : (CORE_ADDR) 0,
|
has_loc ? addr : 0,
|
||||||
cu->language, objfile);
|
cu->language, objfile);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -8901,7 +8908,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
case DW_TAG_subrange_type:
|
case DW_TAG_subrange_type:
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, cu->language, objfile);
|
0, cu->language, objfile);
|
||||||
break;
|
break;
|
||||||
@ -8909,14 +8916,14 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
case DW_TAG_namespace:
|
case DW_TAG_namespace:
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
0, cu->language, objfile);
|
0, cu->language, objfile);
|
||||||
break;
|
break;
|
||||||
case DW_TAG_module:
|
case DW_TAG_module:
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
MODULE_DOMAIN, LOC_TYPEDEF,
|
MODULE_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
0, cu->language, objfile);
|
0, cu->language, objfile);
|
||||||
break;
|
break;
|
||||||
@ -8940,7 +8947,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
static vs. global. */
|
static vs. global. */
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
STRUCT_DOMAIN, LOC_TYPEDEF,
|
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
cu->language == language_cplus
|
cu->language == language_cplus
|
||||||
? &objfile->global_psymbols
|
? &objfile->global_psymbols
|
||||||
: &objfile->static_psymbols,
|
: &objfile->static_psymbols,
|
||||||
@ -8950,7 +8957,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
|
|||||||
case DW_TAG_enumerator:
|
case DW_TAG_enumerator:
|
||||||
add_psymbol_to_list (actual_name, strlen (actual_name),
|
add_psymbol_to_list (actual_name, strlen (actual_name),
|
||||||
built_actual_name != NULL,
|
built_actual_name != NULL,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
cu->language == language_cplus
|
cu->language == language_cplus
|
||||||
? &objfile->global_psymbols
|
? &objfile->global_psymbols
|
||||||
: &objfile->static_psymbols,
|
: &objfile->static_psymbols,
|
||||||
@ -9033,10 +9040,12 @@ add_partial_subprogram (struct partial_die_info *pdi,
|
|||||||
|
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets,
|
baseaddr = ANOFFSET (objfile->section_offsets,
|
||||||
SECT_OFF_TEXT (objfile));
|
SECT_OFF_TEXT (objfile));
|
||||||
lowpc = gdbarch_adjust_dwarf2_addr (gdbarch,
|
lowpc = (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
pdi->lowpc + baseaddr);
|
pdi->lowpc + baseaddr)
|
||||||
highpc = gdbarch_adjust_dwarf2_addr (gdbarch,
|
- baseaddr);
|
||||||
pdi->highpc + baseaddr);
|
highpc = (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
|
pdi->highpc + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
addrmap_set_empty (objfile->psymtabs_addrmap, lowpc, highpc - 1,
|
addrmap_set_empty (objfile->psymtabs_addrmap, lowpc, highpc - 1,
|
||||||
cu->per_cu->v.psymtab);
|
cu->per_cu->v.psymtab);
|
||||||
}
|
}
|
||||||
@ -14489,10 +14498,12 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
|
|||||||
CORE_ADDR lowpc;
|
CORE_ADDR lowpc;
|
||||||
CORE_ADDR highpc;
|
CORE_ADDR highpc;
|
||||||
|
|
||||||
lowpc = gdbarch_adjust_dwarf2_addr (gdbarch,
|
lowpc = (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
range_beginning + baseaddr);
|
range_beginning + baseaddr)
|
||||||
highpc = gdbarch_adjust_dwarf2_addr (gdbarch,
|
- baseaddr);
|
||||||
range_end + baseaddr);
|
highpc = (gdbarch_adjust_dwarf2_addr (gdbarch,
|
||||||
|
range_end + baseaddr)
|
||||||
|
- baseaddr);
|
||||||
addrmap_set_empty (objfile->psymtabs_addrmap, lowpc, highpc - 1,
|
addrmap_set_empty (objfile->psymtabs_addrmap, lowpc, highpc - 1,
|
||||||
ranges_pst);
|
ranges_pst);
|
||||||
}
|
}
|
||||||
@ -18253,7 +18264,7 @@ load_partial_dies (const struct die_reader_specs *reader,
|
|||||||
{
|
{
|
||||||
if (building_psymtab && pdi.name != NULL)
|
if (building_psymtab && pdi.name != NULL)
|
||||||
add_psymbol_to_list (pdi.name, strlen (pdi.name), 0,
|
add_psymbol_to_list (pdi.name, strlen (pdi.name), 0,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, cu->language, objfile);
|
0, cu->language, objfile);
|
||||||
info_ptr = locate_pdi_sibling (reader, &pdi, info_ptr);
|
info_ptr = locate_pdi_sibling (reader, &pdi, info_ptr);
|
||||||
@ -18287,7 +18298,7 @@ load_partial_dies (const struct die_reader_specs *reader,
|
|||||||
complaint (_("malformed enumerator DIE ignored"));
|
complaint (_("malformed enumerator DIE ignored"));
|
||||||
else if (building_psymtab)
|
else if (building_psymtab)
|
||||||
add_psymbol_to_list (pdi.name, strlen (pdi.name), 0,
|
add_psymbol_to_list (pdi.name, strlen (pdi.name), 0,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
cu->language == language_cplus
|
cu->language == language_cplus
|
||||||
? &objfile->global_psymbols
|
? &objfile->global_psymbols
|
||||||
: &objfile->static_psymbols,
|
: &objfile->static_psymbols,
|
||||||
|
107
gdb/mdebugread.c
107
gdb/mdebugread.c
@ -2160,12 +2160,9 @@ parse_external (EXTR *es, int bigend, struct section_offsets *section_offsets,
|
|||||||
numbers can go back and forth, apparently we can live
|
numbers can go back and forth, apparently we can live
|
||||||
with that and do not need to reorder our linetables. */
|
with that and do not need to reorder our linetables. */
|
||||||
|
|
||||||
static void parse_lines (FDR *, PDR *, struct linetable *, int,
|
|
||||||
struct partial_symtab *, CORE_ADDR);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_lines (FDR *fh, PDR *pr, struct linetable *lt, int maxlines,
|
parse_lines (FDR *fh, PDR *pr, struct linetable *lt, int maxlines,
|
||||||
struct partial_symtab *pst, CORE_ADDR lowest_pdr_addr)
|
CORE_ADDR textlow, CORE_ADDR lowest_pdr_addr)
|
||||||
{
|
{
|
||||||
unsigned char *base;
|
unsigned char *base;
|
||||||
int j, k;
|
int j, k;
|
||||||
@ -2196,7 +2193,7 @@ parse_lines (FDR *fh, PDR *pr, struct linetable *lt, int maxlines,
|
|||||||
halt = base + fh->cbLine;
|
halt = base + fh->cbLine;
|
||||||
base += pr->cbLineOffset;
|
base += pr->cbLineOffset;
|
||||||
|
|
||||||
adr = pst->text_low () + pr->adr - lowest_pdr_addr;
|
adr = textlow + pr->adr - lowest_pdr_addr;
|
||||||
|
|
||||||
l = adr >> 2; /* in words */
|
l = adr >> 2; /* in words */
|
||||||
for (lineno = pr->lnLow; base < halt;)
|
for (lineno = pr->lnLow; base < halt;)
|
||||||
@ -2619,12 +2616,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
/* Determine the start address for this object file from the
|
/* Determine the start address for this object file from the
|
||||||
file header and relocate it, except for Irix 5.2 zero fh->adr. */
|
file header and relocate it, except for Irix 5.2 zero fh->adr. */
|
||||||
if (fh->cpd)
|
if (fh->cpd)
|
||||||
{
|
textlow = fh->adr;
|
||||||
textlow = fh->adr;
|
|
||||||
if (relocatable || textlow != 0)
|
|
||||||
textlow += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
textlow = 0;
|
textlow = 0;
|
||||||
pst = start_psymtab_common (objfile,
|
pst = start_psymtab_common (objfile,
|
||||||
@ -2671,7 +2663,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
psymtab_language = prev_language;
|
psymtab_language = prev_language;
|
||||||
PST_PRIVATE (pst)->pst_language = psymtab_language;
|
PST_PRIVATE (pst)->pst_language = psymtab_language;
|
||||||
|
|
||||||
pst->set_text_high (pst->text_low ());
|
pst->set_text_high (pst->raw_text_low ());
|
||||||
|
|
||||||
/* For stabs-in-ecoff files, the second symbol must be @stab.
|
/* For stabs-in-ecoff files, the second symbol must be @stab.
|
||||||
This symbol is emitted by mips-tfile to signal that the
|
This symbol is emitted by mips-tfile to signal that the
|
||||||
@ -2717,8 +2709,6 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
mst_file_text, sh.sc,
|
mst_file_text, sh.sc,
|
||||||
objfile);
|
objfile);
|
||||||
}
|
}
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
procaddr = sh.value;
|
procaddr = sh.value;
|
||||||
|
|
||||||
isym = AUX_GET_ISYM (fh->fBigendian,
|
isym = AUX_GET_ISYM (fh->fBigendian,
|
||||||
@ -2737,9 +2727,9 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
/* Kludge for Irix 5.2 zero fh->adr. */
|
/* Kludge for Irix 5.2 zero fh->adr. */
|
||||||
if (!relocatable
|
if (!relocatable
|
||||||
&& (!pst->text_low_valid
|
&& (!pst->text_low_valid
|
||||||
|| procaddr < pst->text_low ()))
|
|| procaddr < pst->raw_text_low ()))
|
||||||
pst->set_text_low (procaddr);
|
pst->set_text_low (procaddr);
|
||||||
if (high > pst->text_high ())
|
if (high > pst->raw_text_high ())
|
||||||
pst->set_text_high (high);
|
pst->set_text_high (high);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2762,8 +2752,6 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
record_minimal_symbol (reader, namestring, sh.value,
|
record_minimal_symbol (reader, namestring, sh.value,
|
||||||
mst_file_data, sh.sc,
|
mst_file_data, sh.sc,
|
||||||
objfile);
|
objfile);
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -2773,8 +2761,6 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
record_minimal_symbol (reader, namestring, sh.value,
|
record_minimal_symbol (reader, namestring, sh.value,
|
||||||
mst_file_bss, sh.sc,
|
mst_file_bss, sh.sc,
|
||||||
objfile);
|
objfile);
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_BSS (objfile));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2827,22 +2813,16 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
|
|
||||||
case N_TEXT | N_EXT:
|
case N_TEXT | N_EXT:
|
||||||
case N_NBTEXT | N_EXT:
|
case N_NBTEXT | N_EXT:
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
goto record_it;
|
goto record_it;
|
||||||
|
|
||||||
case N_DATA | N_EXT:
|
case N_DATA | N_EXT:
|
||||||
case N_NBDATA | N_EXT:
|
case N_NBDATA | N_EXT:
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
goto record_it;
|
goto record_it;
|
||||||
|
|
||||||
case N_BSS:
|
case N_BSS:
|
||||||
case N_BSS | N_EXT:
|
case N_BSS | N_EXT:
|
||||||
case N_NBBSS | N_EXT:
|
case N_NBBSS | N_EXT:
|
||||||
case N_SETV | N_EXT: /* FIXME, is this in BSS? */
|
case N_SETV | N_EXT: /* FIXME, is this in BSS? */
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_BSS (objfile));
|
|
||||||
goto record_it;
|
goto record_it;
|
||||||
|
|
||||||
case N_ABS | N_EXT:
|
case N_ABS | N_EXT:
|
||||||
@ -2865,8 +2845,6 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case N_DATA:
|
case N_DATA:
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
goto record_it;
|
goto record_it;
|
||||||
|
|
||||||
case N_UNDF | N_EXT:
|
case N_UNDF | N_EXT:
|
||||||
@ -3067,27 +3045,24 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
switch (p[1])
|
switch (p[1])
|
||||||
{
|
{
|
||||||
case 'S':
|
case 'S':
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
|
|
||||||
if (gdbarch_static_transform_name_p (gdbarch))
|
if (gdbarch_static_transform_name_p (gdbarch))
|
||||||
namestring = gdbarch_static_transform_name
|
namestring = gdbarch_static_transform_name
|
||||||
(gdbarch, namestring);
|
(gdbarch, namestring);
|
||||||
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_DATA (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
sh.value,
|
sh.value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
case 'G':
|
case 'G':
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
/* The addresses in these entries are reported
|
/* The addresses in these entries are reported
|
||||||
to be wrong. See the code that reads 'G's
|
to be wrong. See the code that reads 'G's
|
||||||
for symtabs. */
|
for symtabs. */
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_DATA (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
sh.value,
|
sh.value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
@ -3106,6 +3081,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
{
|
{
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
STRUCT_DOMAIN, LOC_TYPEDEF,
|
STRUCT_DOMAIN, LOC_TYPEDEF,
|
||||||
|
-1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
if (p[2] == 't')
|
if (p[2] == 't')
|
||||||
@ -3114,6 +3090,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
add_psymbol_to_list (namestring,
|
add_psymbol_to_list (namestring,
|
||||||
p - namestring, 1,
|
p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF,
|
||||||
|
-1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language,
|
0, psymtab_language,
|
||||||
objfile);
|
objfile);
|
||||||
@ -3127,6 +3104,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
{
|
{
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF,
|
||||||
|
-1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
}
|
}
|
||||||
@ -3191,6 +3169,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
symtabs. */
|
symtabs. */
|
||||||
add_psymbol_to_list (p, q - p, 1,
|
add_psymbol_to_list (p, q - p, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST,
|
||||||
|
-1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language,
|
0, psymtab_language,
|
||||||
objfile);
|
objfile);
|
||||||
@ -3208,7 +3187,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
case 'c':
|
case 'c':
|
||||||
/* Constant, e.g. from "const" in Pascal. */
|
/* Constant, e.g. from "const" in Pascal. */
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -3224,10 +3203,9 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
function_outside_compilation_unit_complaint (name);
|
function_outside_compilation_unit_complaint (name);
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
sh.value,
|
sh.value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
@ -3248,10 +3226,9 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
function_outside_compilation_unit_complaint (name);
|
function_outside_compilation_unit_complaint (name);
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
sh.value,
|
sh.value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
@ -3323,7 +3300,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case N_RBRAC:
|
case N_RBRAC:
|
||||||
if (sh.value > save_pst->text_high ())
|
if (sh.value > save_pst->raw_text_high ())
|
||||||
save_pst->set_text_high (sh.value);
|
save_pst->set_text_high (sh.value);
|
||||||
continue;
|
continue;
|
||||||
case N_EINCL:
|
case N_EINCL:
|
||||||
@ -3379,6 +3356,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
char *name;
|
char *name;
|
||||||
enum address_class theclass;
|
enum address_class theclass;
|
||||||
CORE_ADDR minsym_value;
|
CORE_ADDR minsym_value;
|
||||||
|
short section = -1;
|
||||||
|
|
||||||
(*swap_sym_in) (cur_bfd,
|
(*swap_sym_in) (cur_bfd,
|
||||||
((char *) debug_info->external_sym
|
((char *) debug_info->external_sym
|
||||||
@ -3413,21 +3391,18 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
/* The value of a stEnd symbol is the displacement from the
|
/* The value of a stEnd symbol is the displacement from the
|
||||||
corresponding start symbol value, do not relocate it. */
|
corresponding start symbol value, do not relocate it. */
|
||||||
if (sh.st != stEnd)
|
if (sh.st != stEnd)
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_TEXT (objfile);
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
break;
|
break;
|
||||||
case scData:
|
case scData:
|
||||||
case scSData:
|
case scSData:
|
||||||
case scRData:
|
case scRData:
|
||||||
case scPData:
|
case scPData:
|
||||||
case scXData:
|
case scXData:
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_DATA (objfile);
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
break;
|
break;
|
||||||
case scBss:
|
case scBss:
|
||||||
case scSBss:
|
case scSBss:
|
||||||
sh.value += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_BSS (objfile);
|
||||||
SECT_OFF_BSS (objfile));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3491,11 +3466,13 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
if (sh.st == stProc)
|
if (sh.st == stProc)
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
section,
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
sh.value, psymtab_language, objfile);
|
sh.value, psymtab_language, objfile);
|
||||||
else
|
else
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
section,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
sh.value, psymtab_language, objfile);
|
sh.value, psymtab_language, objfile);
|
||||||
|
|
||||||
@ -3513,11 +3490,11 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
/* Kludge for Irix 5.2 zero fh->adr. */
|
/* Kludge for Irix 5.2 zero fh->adr. */
|
||||||
if (!relocatable
|
if (!relocatable
|
||||||
&& (!pst->text_low_valid
|
&& (!pst->text_low_valid
|
||||||
|| procaddr < pst->text_low ()))
|
|| procaddr < pst->raw_text_low ()))
|
||||||
pst->set_text_low (procaddr);
|
pst->set_text_low (procaddr);
|
||||||
|
|
||||||
high = procaddr + sh.value;
|
high = procaddr + sh.value;
|
||||||
if (high > pst->text_high ())
|
if (high > pst->raw_text_high ())
|
||||||
pst->set_text_high (high);
|
pst->set_text_high (high);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -3561,7 +3538,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
&& sh.index != cur_sdx + 2)
|
&& sh.index != cur_sdx + 2)
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
STRUCT_DOMAIN, LOC_TYPEDEF,
|
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
}
|
}
|
||||||
@ -3600,7 +3577,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
}
|
}
|
||||||
/* Use this gdb symbol. */
|
/* Use this gdb symbol. */
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
VAR_DOMAIN, theclass,
|
VAR_DOMAIN, theclass, section,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
sh.value, psymtab_language, objfile);
|
sh.value, psymtab_language, objfile);
|
||||||
skip:
|
skip:
|
||||||
@ -3618,6 +3595,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
SYMR *psh;
|
SYMR *psh;
|
||||||
char *name;
|
char *name;
|
||||||
CORE_ADDR svalue;
|
CORE_ADDR svalue;
|
||||||
|
short section;
|
||||||
|
|
||||||
if (ext_ptr->ifd != f_idx)
|
if (ext_ptr->ifd != f_idx)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
@ -3631,23 +3609,21 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
svalue = psh->value;
|
svalue = psh->value;
|
||||||
switch (psh->sc)
|
switch (psh->sc)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
case scText:
|
case scText:
|
||||||
case scRConst:
|
case scRConst:
|
||||||
svalue += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_TEXT (objfile);
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
break;
|
break;
|
||||||
case scData:
|
case scData:
|
||||||
case scSData:
|
case scSData:
|
||||||
case scRData:
|
case scRData:
|
||||||
case scPData:
|
case scPData:
|
||||||
case scXData:
|
case scXData:
|
||||||
svalue += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_DATA (objfile);
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
break;
|
break;
|
||||||
case scBss:
|
case scBss:
|
||||||
case scSBss:
|
case scSBss:
|
||||||
svalue += ANOFFSET (objfile->section_offsets,
|
section = SECT_OFF_BSS (objfile);
|
||||||
SECT_OFF_BSS (objfile));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3682,6 +3658,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
name = debug_info->ssext + psh->iss;
|
name = debug_info->ssext + psh->iss;
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
VAR_DOMAIN, theclass,
|
VAR_DOMAIN, theclass,
|
||||||
|
section,
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
svalue, psymtab_language, objfile);
|
svalue, psymtab_language, objfile);
|
||||||
}
|
}
|
||||||
@ -3692,7 +3669,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
fdr_to_pst[f_idx].pst
|
fdr_to_pst[f_idx].pst
|
||||||
= dbx_end_psymtab (objfile, save_pst,
|
= dbx_end_psymtab (objfile, save_pst,
|
||||||
psymtab_include_list, includes_used,
|
psymtab_include_list, includes_used,
|
||||||
-1, save_pst->text_high (),
|
-1, save_pst->raw_text_high (),
|
||||||
dependency_list, dependencies_used,
|
dependency_list, dependencies_used,
|
||||||
textlow_not_set);
|
textlow_not_set);
|
||||||
includes_used = 0;
|
includes_used = 0;
|
||||||
@ -3717,9 +3694,9 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
|||||||
ALL_OBJFILE_PSYMTABS (objfile, pst)
|
ALL_OBJFILE_PSYMTABS (objfile, pst)
|
||||||
{
|
{
|
||||||
if (save_pst != pst
|
if (save_pst != pst
|
||||||
&& save_pst->text_low () >= pst->text_low ()
|
&& save_pst->raw_text_low () >= pst->raw_text_low ()
|
||||||
&& save_pst->text_low () < pst->text_high ()
|
&& save_pst->raw_text_low () < pst->raw_text_high ()
|
||||||
&& save_pst->text_high () > pst->text_high ())
|
&& save_pst->raw_text_high () > pst->raw_text_high ())
|
||||||
{
|
{
|
||||||
objfile->flags |= OBJF_REORDERED;
|
objfile->flags |= OBJF_REORDERED;
|
||||||
break;
|
break;
|
||||||
@ -3842,9 +3819,9 @@ handle_psymbol_enumerators (struct objfile *objfile, FDR *fh, int stype,
|
|||||||
/* Note that the value doesn't matter for enum constants
|
/* Note that the value doesn't matter for enum constants
|
||||||
in psymtabs, just in symtabs. */
|
in psymtabs, just in symtabs. */
|
||||||
add_psymbol_to_list (name, strlen (name), 1,
|
add_psymbol_to_list (name, strlen (name), 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols, 0,
|
||||||
0, psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
ext_sym += external_sym_size;
|
ext_sym += external_sym_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4071,7 +4048,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
|
|||||||
|
|
||||||
if (! last_symtab_ended)
|
if (! last_symtab_ended)
|
||||||
{
|
{
|
||||||
cust = end_symtab (pst->text_high (), SECT_OFF_TEXT (objfile));
|
cust = end_symtab (pst->raw_text_high (), SECT_OFF_TEXT (objfile));
|
||||||
end_stabs ();
|
end_stabs ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4147,7 +4124,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
|
|||||||
top_stack->cur_st = COMPUNIT_FILETABS (cust);
|
top_stack->cur_st = COMPUNIT_FILETABS (cust);
|
||||||
top_stack->cur_block
|
top_stack->cur_block
|
||||||
= BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust), STATIC_BLOCK);
|
= BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust), STATIC_BLOCK);
|
||||||
BLOCK_START (top_stack->cur_block) = pst->text_low ();
|
BLOCK_START (top_stack->cur_block) = pst->text_low (objfile);
|
||||||
BLOCK_END (top_stack->cur_block) = 0;
|
BLOCK_END (top_stack->cur_block) = 0;
|
||||||
top_stack->blocktype = stFile;
|
top_stack->blocktype = stFile;
|
||||||
top_stack->cur_type = 0;
|
top_stack->cur_type = 0;
|
||||||
@ -4208,7 +4185,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
|
|||||||
}
|
}
|
||||||
|
|
||||||
parse_lines (fh, pr_block.data (), lines, maxlines,
|
parse_lines (fh, pr_block.data (), lines, maxlines,
|
||||||
pst, lowest_pdr_addr);
|
pst->text_low (objfile), lowest_pdr_addr);
|
||||||
if (lines->nitems < fh->cline)
|
if (lines->nitems < fh->cline)
|
||||||
lines = shrink_linetable (lines);
|
lines = shrink_linetable (lines);
|
||||||
|
|
||||||
|
@ -841,6 +841,10 @@ objfile_relocate1 (struct objfile *objfile,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This stores relocated addresses and so must be cleared. This
|
||||||
|
will cause it to be recreated on demand. */
|
||||||
|
objfile->psymbol_map.clear ();
|
||||||
|
|
||||||
/* Relocate isolated symbols. */
|
/* Relocate isolated symbols. */
|
||||||
{
|
{
|
||||||
struct symbol *iter;
|
struct symbol *iter;
|
||||||
@ -849,13 +853,6 @@ objfile_relocate1 (struct objfile *objfile,
|
|||||||
relocate_one_symbol (iter, objfile, delta);
|
relocate_one_symbol (iter, objfile, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (objfile->psymtabs_addrmap)
|
|
||||||
addrmap_relocate (objfile->psymtabs_addrmap,
|
|
||||||
ANOFFSET (delta, SECT_OFF_TEXT (objfile)));
|
|
||||||
|
|
||||||
if (objfile->sf)
|
|
||||||
objfile->sf->qf->relocate (objfile, new_offsets, delta);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -54,12 +54,12 @@ struct partial_symbol : public general_symbol_info
|
|||||||
the offsets provided in OBJFILE. */
|
the offsets provided in OBJFILE. */
|
||||||
CORE_ADDR address (const struct objfile *objfile) const
|
CORE_ADDR address (const struct objfile *objfile) const
|
||||||
{
|
{
|
||||||
return value.address;
|
return value.address + ANOFFSET (objfile->section_offsets, section);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the address of this partial symbol. The address must be
|
/* Set the address of this partial symbol. The address must be
|
||||||
unrelocated. */
|
unrelocated. */
|
||||||
void set_address (CORE_ADDR addr)
|
void set_unrelocated_address (CORE_ADDR addr)
|
||||||
{
|
{
|
||||||
value.address = addr;
|
value.address = addr;
|
||||||
}
|
}
|
||||||
@ -98,18 +98,32 @@ enum psymtab_search_status
|
|||||||
|
|
||||||
struct partial_symtab
|
struct partial_symtab
|
||||||
{
|
{
|
||||||
/* Return the low text address of this partial_symtab. */
|
/* Return the raw low text address of this partial_symtab. */
|
||||||
CORE_ADDR text_low () const
|
CORE_ADDR raw_text_low () const
|
||||||
{
|
{
|
||||||
return m_text_low;
|
return m_text_low;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the high text address of this partial_symtab. */
|
/* Return the raw high text address of this partial_symtab. */
|
||||||
CORE_ADDR text_high () const
|
CORE_ADDR raw_text_high () const
|
||||||
{
|
{
|
||||||
return m_text_high;
|
return m_text_high;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the relocated low text address of this partial_symtab. */
|
||||||
|
CORE_ADDR text_low (struct objfile *objfile) const
|
||||||
|
{
|
||||||
|
return m_text_low + ANOFFSET (objfile->section_offsets,
|
||||||
|
SECT_OFF_TEXT (objfile));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the relocated high text address of this partial_symtab. */
|
||||||
|
CORE_ADDR text_high (struct objfile *objfile) const
|
||||||
|
{
|
||||||
|
return m_text_high + ANOFFSET (objfile->section_offsets,
|
||||||
|
SECT_OFF_TEXT (objfile));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the low text address of this partial_symtab. */
|
/* Set the low text address of this partial_symtab. */
|
||||||
void set_text_low (CORE_ADDR addr)
|
void set_text_low (CORE_ADDR addr)
|
||||||
{
|
{
|
||||||
@ -262,6 +276,7 @@ struct partial_symtab
|
|||||||
extern void add_psymbol_to_list (const char *, int,
|
extern void add_psymbol_to_list (const char *, int,
|
||||||
int, domain_enum,
|
int, domain_enum,
|
||||||
enum address_class,
|
enum address_class,
|
||||||
|
short /* section */,
|
||||||
std::vector<partial_symbol *> *,
|
std::vector<partial_symbol *> *,
|
||||||
CORE_ADDR,
|
CORE_ADDR,
|
||||||
enum language, struct objfile *);
|
enum language, struct objfile *);
|
||||||
|
129
gdb/psymtab.c
129
gdb/psymtab.c
@ -62,9 +62,6 @@ static struct partial_symbol *find_pc_sect_psymbol (struct objfile *,
|
|||||||
CORE_ADDR,
|
CORE_ADDR,
|
||||||
struct obj_section *);
|
struct obj_section *);
|
||||||
|
|
||||||
static void fixup_psymbol_section (struct partial_symbol *psym,
|
|
||||||
struct objfile *objfile);
|
|
||||||
|
|
||||||
static struct compunit_symtab *psymtab_to_symtab (struct objfile *objfile,
|
static struct compunit_symtab *psymtab_to_symtab (struct objfile *objfile,
|
||||||
struct partial_symtab *pst);
|
struct partial_symtab *pst);
|
||||||
|
|
||||||
@ -232,7 +229,7 @@ find_pc_sect_psymtab_closer (struct objfile *objfile,
|
|||||||
{
|
{
|
||||||
struct partial_symtab *tpst;
|
struct partial_symtab *tpst;
|
||||||
struct partial_symtab *best_pst = pst;
|
struct partial_symtab *best_pst = pst;
|
||||||
CORE_ADDR best_addr = pst->text_low ();
|
CORE_ADDR best_addr = pst->text_low (objfile);
|
||||||
|
|
||||||
gdb_assert (!pst->psymtabs_addrmap_supported);
|
gdb_assert (!pst->psymtabs_addrmap_supported);
|
||||||
|
|
||||||
@ -256,7 +253,7 @@ find_pc_sect_psymtab_closer (struct objfile *objfile,
|
|||||||
that is closest and still less than the given PC. */
|
that is closest and still less than the given PC. */
|
||||||
for (tpst = pst; tpst != NULL; tpst = tpst->next)
|
for (tpst = pst; tpst != NULL; tpst = tpst->next)
|
||||||
{
|
{
|
||||||
if (pc >= tpst->text_low () && pc < tpst->text_high ())
|
if (pc >= tpst->text_low (objfile) && pc < tpst->text_high (objfile))
|
||||||
{
|
{
|
||||||
struct partial_symbol *p;
|
struct partial_symbol *p;
|
||||||
CORE_ADDR this_addr;
|
CORE_ADDR this_addr;
|
||||||
@ -277,7 +274,7 @@ find_pc_sect_psymtab_closer (struct objfile *objfile,
|
|||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
this_addr = p->address (objfile);
|
this_addr = p->address (objfile);
|
||||||
else
|
else
|
||||||
this_addr = tpst->text_low ();
|
this_addr = tpst->text_low (objfile);
|
||||||
|
|
||||||
/* Check whether it is closer than our current
|
/* Check whether it is closer than our current
|
||||||
BEST_ADDR. Since this symbol address is
|
BEST_ADDR. Since this symbol address is
|
||||||
@ -310,6 +307,8 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
|
|||||||
struct bound_minimal_symbol msymbol)
|
struct bound_minimal_symbol msymbol)
|
||||||
{
|
{
|
||||||
struct partial_symtab *pst;
|
struct partial_symtab *pst;
|
||||||
|
CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
|
||||||
|
SECT_OFF_TEXT (objfile));
|
||||||
|
|
||||||
/* Try just the PSYMTABS_ADDRMAP mapping first as it has better granularity
|
/* Try just the PSYMTABS_ADDRMAP mapping first as it has better granularity
|
||||||
than the later used TEXTLOW/TEXTHIGH one. */
|
than the later used TEXTLOW/TEXTHIGH one. */
|
||||||
@ -317,7 +316,7 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
|
|||||||
if (objfile->psymtabs_addrmap != NULL)
|
if (objfile->psymtabs_addrmap != NULL)
|
||||||
{
|
{
|
||||||
pst = ((struct partial_symtab *)
|
pst = ((struct partial_symtab *)
|
||||||
addrmap_find (objfile->psymtabs_addrmap, pc));
|
addrmap_find (objfile->psymtabs_addrmap, pc - baseaddr));
|
||||||
if (pst != NULL)
|
if (pst != NULL)
|
||||||
{
|
{
|
||||||
/* FIXME: addrmaps currently do not handle overlayed sections,
|
/* FIXME: addrmaps currently do not handle overlayed sections,
|
||||||
@ -361,7 +360,7 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
|
|||||||
|
|
||||||
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst)
|
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst)
|
||||||
if (!pst->psymtabs_addrmap_supported
|
if (!pst->psymtabs_addrmap_supported
|
||||||
&& pc >= pst->text_low () && pc < pst->text_high ())
|
&& pc >= pst->text_low (objfile) && pc < pst->text_high (objfile))
|
||||||
{
|
{
|
||||||
struct partial_symtab *best_pst;
|
struct partial_symtab *best_pst;
|
||||||
|
|
||||||
@ -411,12 +410,12 @@ find_pc_sect_psymbol (struct objfile *objfile,
|
|||||||
{
|
{
|
||||||
struct partial_symbol *best = NULL;
|
struct partial_symbol *best = NULL;
|
||||||
CORE_ADDR best_pc;
|
CORE_ADDR best_pc;
|
||||||
|
const CORE_ADDR textlow = psymtab->text_low (objfile);
|
||||||
|
|
||||||
gdb_assert (psymtab != NULL);
|
gdb_assert (psymtab != NULL);
|
||||||
|
|
||||||
/* Cope with programs that start at address 0. */
|
/* Cope with programs that start at address 0. */
|
||||||
best_pc = ((psymtab->text_low () != 0)
|
best_pc = (textlow != 0) ? textlow - 1 : 0;
|
||||||
? psymtab->text_low () - 1 : 0);
|
|
||||||
|
|
||||||
/* Search the global symbols as well as the static symbols, so that
|
/* Search the global symbols as well as the static symbols, so that
|
||||||
find_pc_partial_function doesn't use a minimal symbol and thus
|
find_pc_partial_function doesn't use a minimal symbol and thus
|
||||||
@ -429,12 +428,11 @@ find_pc_sect_psymbol (struct objfile *objfile,
|
|||||||
&& p->aclass == LOC_BLOCK
|
&& p->aclass == LOC_BLOCK
|
||||||
&& pc >= p->address (objfile)
|
&& pc >= p->address (objfile)
|
||||||
&& (p->address (objfile) > best_pc
|
&& (p->address (objfile) > best_pc
|
||||||
|| (psymtab->text_low () == 0
|
|| (psymtab->text_low (objfile) == 0
|
||||||
&& best_pc == 0 && p->address (objfile) == 0)))
|
&& best_pc == 0 && p->address (objfile) == 0)))
|
||||||
{
|
{
|
||||||
if (section != NULL) /* Match on a specific section. */
|
if (section != NULL) /* Match on a specific section. */
|
||||||
{
|
{
|
||||||
fixup_psymbol_section (p, objfile);
|
|
||||||
if (!matching_obj_sections (p->obj_section (objfile),
|
if (!matching_obj_sections (p->obj_section (objfile),
|
||||||
section))
|
section))
|
||||||
continue;
|
continue;
|
||||||
@ -452,12 +450,11 @@ find_pc_sect_psymbol (struct objfile *objfile,
|
|||||||
&& p->aclass == LOC_BLOCK
|
&& p->aclass == LOC_BLOCK
|
||||||
&& pc >= p->address (objfile)
|
&& pc >= p->address (objfile)
|
||||||
&& (p->address (objfile) > best_pc
|
&& (p->address (objfile) > best_pc
|
||||||
|| (psymtab->text_low () == 0
|
|| (psymtab->text_low (objfile) == 0
|
||||||
&& best_pc == 0 && p->address (objfile) == 0)))
|
&& best_pc == 0 && p->address (objfile) == 0)))
|
||||||
{
|
{
|
||||||
if (section != NULL) /* Match on a specific section. */
|
if (section != NULL) /* Match on a specific section. */
|
||||||
{
|
{
|
||||||
fixup_psymbol_section (p, objfile);
|
|
||||||
if (!matching_obj_sections (p->obj_section (objfile),
|
if (!matching_obj_sections (p->obj_section (objfile),
|
||||||
section))
|
section))
|
||||||
continue;
|
continue;
|
||||||
@ -470,35 +467,6 @@ find_pc_sect_psymbol (struct objfile *objfile,
|
|||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile)
|
|
||||||
{
|
|
||||||
CORE_ADDR addr;
|
|
||||||
|
|
||||||
if (psym == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (psym->section >= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
gdb_assert (objfile);
|
|
||||||
|
|
||||||
switch (psym->aclass)
|
|
||||||
{
|
|
||||||
case LOC_STATIC:
|
|
||||||
case LOC_LABEL:
|
|
||||||
case LOC_BLOCK:
|
|
||||||
addr = psym->address (objfile);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* Nothing else will be listed in the minsyms -- no use looking
|
|
||||||
it up. */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixup_section (psym, addr, objfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Psymtab version of lookup_symbol. See its definition in
|
/* Psymtab version of lookup_symbol. See its definition in
|
||||||
the definition of quick_symbol_functions in symfile.h. */
|
the definition of quick_symbol_functions in symfile.h. */
|
||||||
|
|
||||||
@ -795,42 +763,6 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
|||||||
return pst->compunit_symtab;
|
return pst->compunit_symtab;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Psymtab version of relocate. See its definition in
|
|
||||||
the definition of quick_symbol_functions in symfile.h. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
psym_relocate (struct objfile *objfile,
|
|
||||||
const struct section_offsets *new_offsets,
|
|
||||||
const struct section_offsets *delta)
|
|
||||||
{
|
|
||||||
struct partial_symtab *p;
|
|
||||||
|
|
||||||
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, p)
|
|
||||||
{
|
|
||||||
p->set_text_low (p->text_low ()
|
|
||||||
+ ANOFFSET (delta, SECT_OFF_TEXT (objfile)));
|
|
||||||
p->set_text_high (p->text_high ()
|
|
||||||
+ ANOFFSET (delta, SECT_OFF_TEXT (objfile)));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (partial_symbol *psym : objfile->global_psymbols)
|
|
||||||
{
|
|
||||||
fixup_psymbol_section (psym, objfile);
|
|
||||||
if (psym->section >= 0)
|
|
||||||
psym->set_address (psym->unrelocated_address ()
|
|
||||||
+ ANOFFSET (delta, psym->section));
|
|
||||||
}
|
|
||||||
for (partial_symbol *psym : objfile->static_psymbols)
|
|
||||||
{
|
|
||||||
fixup_psymbol_section (psym, objfile);
|
|
||||||
if (psym->section >= 0)
|
|
||||||
psym->set_address (psym->unrelocated_address ()
|
|
||||||
+ ANOFFSET (delta, psym->section));
|
|
||||||
}
|
|
||||||
|
|
||||||
objfile->psymbol_map.clear ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Psymtab version of find_last_source_symtab. See its definition in
|
/* Psymtab version of find_last_source_symtab. See its definition in
|
||||||
the definition of quick_symbol_functions in symfile.h. */
|
the definition of quick_symbol_functions in symfile.h. */
|
||||||
|
|
||||||
@ -1015,9 +947,9 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fprintf_filtered (outfile, " Symbols cover text addresses ");
|
fprintf_filtered (outfile, " Symbols cover text addresses ");
|
||||||
fputs_filtered (paddress (gdbarch, psymtab->text_low ()), outfile);
|
fputs_filtered (paddress (gdbarch, psymtab->text_low (objfile)), outfile);
|
||||||
fprintf_filtered (outfile, "-");
|
fprintf_filtered (outfile, "-");
|
||||||
fputs_filtered (paddress (gdbarch, psymtab->text_high ()), outfile);
|
fputs_filtered (paddress (gdbarch, psymtab->text_high (objfile)), outfile);
|
||||||
fprintf_filtered (outfile, "\n");
|
fprintf_filtered (outfile, "\n");
|
||||||
fprintf_filtered (outfile, " Address map supported - %s.\n",
|
fprintf_filtered (outfile, " Address map supported - %s.\n",
|
||||||
psymtab->psymtabs_addrmap_supported ? "yes" : "no");
|
psymtab->psymtabs_addrmap_supported ? "yes" : "no");
|
||||||
@ -1551,7 +1483,6 @@ const struct quick_symbol_functions psym_functions =
|
|||||||
psym_lookup_symbol,
|
psym_lookup_symbol,
|
||||||
psym_print_stats,
|
psym_print_stats,
|
||||||
psym_dump,
|
psym_dump,
|
||||||
psym_relocate,
|
|
||||||
psym_expand_symtabs_for_function,
|
psym_expand_symtabs_for_function,
|
||||||
psym_expand_all_symtabs,
|
psym_expand_all_symtabs,
|
||||||
psym_expand_symtabs_with_fullname,
|
psym_expand_symtabs_with_fullname,
|
||||||
@ -1598,7 +1529,7 @@ start_psymtab_common (struct objfile *objfile,
|
|||||||
|
|
||||||
psymtab = allocate_psymtab (filename, objfile);
|
psymtab = allocate_psymtab (filename, objfile);
|
||||||
psymtab->set_text_low (textlow);
|
psymtab->set_text_low (textlow);
|
||||||
psymtab->set_text_high (psymtab->text_low ()); /* default */
|
psymtab->set_text_high (psymtab->raw_text_low ()); /* default */
|
||||||
psymtab->globals_offset = global_psymbols.size ();
|
psymtab->globals_offset = global_psymbols.size ();
|
||||||
psymtab->statics_offset = static_psymbols.size ();
|
psymtab->statics_offset = static_psymbols.size ();
|
||||||
return psymtab;
|
return psymtab;
|
||||||
@ -1718,14 +1649,15 @@ static struct partial_symbol *
|
|||||||
add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
|
add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
|
||||||
domain_enum domain,
|
domain_enum domain,
|
||||||
enum address_class theclass,
|
enum address_class theclass,
|
||||||
|
short section,
|
||||||
CORE_ADDR coreaddr,
|
CORE_ADDR coreaddr,
|
||||||
enum language language, struct objfile *objfile,
|
enum language language, struct objfile *objfile,
|
||||||
int *added)
|
int *added)
|
||||||
{
|
{
|
||||||
struct partial_symbol psymbol;
|
struct partial_symbol psymbol;
|
||||||
|
|
||||||
psymbol.set_address (coreaddr);
|
psymbol.set_unrelocated_address (coreaddr);
|
||||||
psymbol.section = -1;
|
psymbol.section = section;
|
||||||
psymbol.domain = domain;
|
psymbol.domain = domain;
|
||||||
psymbol.aclass = theclass;
|
psymbol.aclass = theclass;
|
||||||
|
|
||||||
@ -1759,6 +1691,7 @@ void
|
|||||||
add_psymbol_to_list (const char *name, int namelength, int copy_name,
|
add_psymbol_to_list (const char *name, int namelength, int copy_name,
|
||||||
domain_enum domain,
|
domain_enum domain,
|
||||||
enum address_class theclass,
|
enum address_class theclass,
|
||||||
|
short section,
|
||||||
std::vector<partial_symbol *> *list,
|
std::vector<partial_symbol *> *list,
|
||||||
CORE_ADDR coreaddr,
|
CORE_ADDR coreaddr,
|
||||||
enum language language, struct objfile *objfile)
|
enum language language, struct objfile *objfile)
|
||||||
@ -1769,7 +1702,7 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
|
|||||||
|
|
||||||
/* Stash the partial symbol away in the cache. */
|
/* Stash the partial symbol away in the cache. */
|
||||||
psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, theclass,
|
psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, theclass,
|
||||||
coreaddr, language, objfile, &added);
|
section, coreaddr, language, objfile, &added);
|
||||||
|
|
||||||
/* Do not duplicate global partial symbols. */
|
/* Do not duplicate global partial symbols. */
|
||||||
if (list == &objfile->global_psymbols
|
if (list == &objfile->global_psymbols
|
||||||
@ -2150,10 +2083,10 @@ maintenance_info_psymtabs (const char *regexp, int from_tty)
|
|||||||
psymtab->fullname
|
psymtab->fullname
|
||||||
? psymtab->fullname : "(null)");
|
? psymtab->fullname : "(null)");
|
||||||
printf_filtered (" text addresses ");
|
printf_filtered (" text addresses ");
|
||||||
fputs_filtered (paddress (gdbarch, psymtab->text_low ()),
|
fputs_filtered (paddress (gdbarch, psymtab->text_low (objfile)),
|
||||||
gdb_stdout);
|
gdb_stdout);
|
||||||
printf_filtered (" -- ");
|
printf_filtered (" -- ");
|
||||||
fputs_filtered (paddress (gdbarch, psymtab->text_high ()),
|
fputs_filtered (paddress (gdbarch, psymtab->text_high (objfile)),
|
||||||
gdb_stdout);
|
gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
printf_filtered (" psymtabs_addrmap_supported %s\n",
|
printf_filtered (" psymtabs_addrmap_supported %s\n",
|
||||||
@ -2233,14 +2166,16 @@ maintenance_check_psymtabs (const char *ignore, int from_tty)
|
|||||||
cust = ps->compunit_symtab;
|
cust = ps->compunit_symtab;
|
||||||
|
|
||||||
/* First do some checks that don't require the associated symtab. */
|
/* First do some checks that don't require the associated symtab. */
|
||||||
if (ps->text_high () < ps->text_low ())
|
if (ps->text_high (objfile) < ps->text_low (objfile))
|
||||||
{
|
{
|
||||||
printf_filtered ("Psymtab ");
|
printf_filtered ("Psymtab ");
|
||||||
puts_filtered (ps->filename);
|
puts_filtered (ps->filename);
|
||||||
printf_filtered (" covers bad range ");
|
printf_filtered (" covers bad range ");
|
||||||
fputs_filtered (paddress (gdbarch, ps->text_low ()), gdb_stdout);
|
fputs_filtered (paddress (gdbarch, ps->text_low (objfile)),
|
||||||
|
gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
fputs_filtered (paddress (gdbarch, ps->text_high ()), gdb_stdout);
|
fputs_filtered (paddress (gdbarch, ps->text_high (objfile)),
|
||||||
|
gdb_stdout);
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2285,16 +2220,18 @@ maintenance_check_psymtabs (const char *ignore, int from_tty)
|
|||||||
}
|
}
|
||||||
psym++;
|
psym++;
|
||||||
}
|
}
|
||||||
if (ps->text_high () != 0
|
if (ps->raw_text_high () != 0
|
||||||
&& (ps->text_low () < BLOCK_START (b)
|
&& (ps->text_low (objfile) < BLOCK_START (b)
|
||||||
|| ps->text_high () > BLOCK_END (b)))
|
|| ps->text_high (objfile) > BLOCK_END (b)))
|
||||||
{
|
{
|
||||||
printf_filtered ("Psymtab ");
|
printf_filtered ("Psymtab ");
|
||||||
puts_filtered (ps->filename);
|
puts_filtered (ps->filename);
|
||||||
printf_filtered (" covers ");
|
printf_filtered (" covers ");
|
||||||
fputs_filtered (paddress (gdbarch, ps->text_low ()), gdb_stdout);
|
fputs_filtered (paddress (gdbarch, ps->text_low (objfile)),
|
||||||
|
gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
fputs_filtered (paddress (gdbarch, ps->text_high ()), gdb_stdout);
|
fputs_filtered (paddress (gdbarch, ps->text_high (objfile)),
|
||||||
|
gdb_stdout);
|
||||||
printf_filtered (" but symtab covers only ");
|
printf_filtered (" but symtab covers only ");
|
||||||
fputs_filtered (paddress (gdbarch, BLOCK_START (b)), gdb_stdout);
|
fputs_filtered (paddress (gdbarch, BLOCK_START (b)), gdb_stdout);
|
||||||
printf_filtered (" - ");
|
printf_filtered (" - ");
|
||||||
|
@ -193,23 +193,6 @@ debug_qf_dump (struct objfile *objfile)
|
|||||||
debug_data->real_sf->qf->dump (objfile);
|
debug_data->real_sf->qf->dump (objfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
debug_qf_relocate (struct objfile *objfile,
|
|
||||||
const struct section_offsets *new_offsets,
|
|
||||||
const struct section_offsets *delta)
|
|
||||||
{
|
|
||||||
const struct debug_sym_fns_data *debug_data
|
|
||||||
= ((const struct debug_sym_fns_data *)
|
|
||||||
objfile_data (objfile, symfile_debug_objfile_data_key));
|
|
||||||
|
|
||||||
fprintf_filtered (gdb_stdlog, "qf->relocate (%s, %s, %s)\n",
|
|
||||||
objfile_debug_name (objfile),
|
|
||||||
host_address_to_string (new_offsets),
|
|
||||||
host_address_to_string (delta));
|
|
||||||
|
|
||||||
debug_data->real_sf->qf->relocate (objfile, new_offsets, delta);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
debug_qf_expand_symtabs_for_function (struct objfile *objfile,
|
debug_qf_expand_symtabs_for_function (struct objfile *objfile,
|
||||||
const char *func_name)
|
const char *func_name)
|
||||||
@ -401,7 +384,6 @@ static const struct quick_symbol_functions debug_sym_quick_functions =
|
|||||||
debug_qf_lookup_symbol,
|
debug_qf_lookup_symbol,
|
||||||
debug_qf_print_stats,
|
debug_qf_print_stats,
|
||||||
debug_qf_dump,
|
debug_qf_dump,
|
||||||
debug_qf_relocate,
|
|
||||||
debug_qf_expand_symtabs_for_function,
|
debug_qf_expand_symtabs_for_function,
|
||||||
debug_qf_expand_all_symtabs,
|
debug_qf_expand_all_symtabs,
|
||||||
debug_qf_expand_symtabs_with_fullname,
|
debug_qf_expand_symtabs_with_fullname,
|
||||||
|
@ -191,12 +191,6 @@ struct quick_symbol_functions
|
|||||||
gdb_stdout. This is used for "maint print objfiles". */
|
gdb_stdout. This is used for "maint print objfiles". */
|
||||||
void (*dump) (struct objfile *objfile);
|
void (*dump) (struct objfile *objfile);
|
||||||
|
|
||||||
/* This is called by objfile_relocate to relocate any indices loaded
|
|
||||||
for OBJFILE. */
|
|
||||||
void (*relocate) (struct objfile *objfile,
|
|
||||||
const struct section_offsets *new_offsets,
|
|
||||||
const struct section_offsets *delta);
|
|
||||||
|
|
||||||
/* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
|
/* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
|
||||||
the corresponding symbol tables are loaded. */
|
the corresponding symbol tables are loaded. */
|
||||||
void (*expand_symtabs_for_function) (struct objfile *objfile,
|
void (*expand_symtabs_for_function) (struct objfile *objfile,
|
||||||
|
@ -2342,10 +2342,10 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
CORE_ADDR highval =
|
CORE_ADDR highval =
|
||||||
symbol.n_value + csect_aux.x_csect.x_scnlen.l;
|
symbol.n_value + csect_aux.x_csect.x_scnlen.l;
|
||||||
|
|
||||||
if (highval > pst->text_high ())
|
if (highval > pst->raw_text_high ())
|
||||||
pst->set_text_high (highval);
|
pst->set_text_high (highval);
|
||||||
if (!pst->text_low_valid
|
if (!pst->text_low_valid
|
||||||
|| symbol.n_value < pst->text_low ())
|
|| symbol.n_value < pst->raw_text_low ())
|
||||||
pst->set_text_low (symbol.n_value);
|
pst->set_text_low (symbol.n_value);
|
||||||
}
|
}
|
||||||
misc_func_recorded = 0;
|
misc_func_recorded = 0;
|
||||||
@ -2659,27 +2659,24 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
switch (p[1])
|
switch (p[1])
|
||||||
{
|
{
|
||||||
case 'S':
|
case 'S':
|
||||||
symbol.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
|
|
||||||
if (gdbarch_static_transform_name_p (gdbarch))
|
if (gdbarch_static_transform_name_p (gdbarch))
|
||||||
namestring = gdbarch_static_transform_name
|
namestring = gdbarch_static_transform_name
|
||||||
(gdbarch, namestring);
|
(gdbarch, namestring);
|
||||||
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_DATA (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
symbol.n_value,
|
symbol.n_value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
symbol.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_DATA (objfile));
|
|
||||||
/* The addresses in these entries are reported to be
|
/* The addresses in these entries are reported to be
|
||||||
wrong. See the code that reads 'G's for symtabs. */
|
wrong. See the code that reads 'G's for symtabs. */
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_STATIC,
|
VAR_DOMAIN, LOC_STATIC,
|
||||||
|
SECT_OFF_DATA (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
symbol.n_value,
|
symbol.n_value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
@ -2697,14 +2694,14 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
&& namestring[0] != ' '))
|
&& namestring[0] != ' '))
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
STRUCT_DOMAIN, LOC_TYPEDEF,
|
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
if (p[2] == 't')
|
if (p[2] == 't')
|
||||||
{
|
{
|
||||||
/* Also a typedef with the same name. */
|
/* Also a typedef with the same name. */
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
p += 1;
|
p += 1;
|
||||||
@ -2716,7 +2713,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
if (p != namestring) /* a name is there, not just :T... */
|
if (p != namestring) /* a name is there, not just :T... */
|
||||||
{
|
{
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_TYPEDEF,
|
VAR_DOMAIN, LOC_TYPEDEF, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
}
|
}
|
||||||
@ -2778,7 +2775,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
/* Note that the value doesn't matter for
|
/* Note that the value doesn't matter for
|
||||||
enum constants in psymtabs, just in symtabs. */
|
enum constants in psymtabs, just in symtabs. */
|
||||||
add_psymbol_to_list (p, q - p, 1,
|
add_psymbol_to_list (p, q - p, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
/* Point past the name. */
|
/* Point past the name. */
|
||||||
@ -2796,7 +2793,7 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
case 'c':
|
case 'c':
|
||||||
/* Constant, e.g. from "const" in Pascal. */
|
/* Constant, e.g. from "const" in Pascal. */
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_CONST,
|
VAR_DOMAIN, LOC_CONST, -1,
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
0, psymtab_language, objfile);
|
0, psymtab_language, objfile);
|
||||||
continue;
|
continue;
|
||||||
@ -2812,10 +2809,9 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
function_outside_compilation_unit_complaint (name);
|
function_outside_compilation_unit_complaint (name);
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
symbol.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->static_psymbols,
|
&objfile->static_psymbols,
|
||||||
symbol.n_value,
|
symbol.n_value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
@ -2843,10 +2839,9 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|
|||||||
if (startswith (namestring, "@FIX"))
|
if (startswith (namestring, "@FIX"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
symbol.n_value += ANOFFSET (objfile->section_offsets,
|
|
||||||
SECT_OFF_TEXT (objfile));
|
|
||||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||||
VAR_DOMAIN, LOC_BLOCK,
|
VAR_DOMAIN, LOC_BLOCK,
|
||||||
|
SECT_OFF_TEXT (objfile),
|
||||||
&objfile->global_psymbols,
|
&objfile->global_psymbols,
|
||||||
symbol.n_value,
|
symbol.n_value,
|
||||||
psymtab_language, objfile);
|
psymtab_language, objfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user