forked from Imagelibrary/binutils-gdb
2011-01-05 Michael Snyder <msnyder@vmware.com>
* addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
This commit is contained in:
239
gdb/dwarf2read.c
239
gdb/dwarf2read.c
@@ -787,8 +787,8 @@ static void
|
||||
show_dwarf2_max_cache_age (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
The upper bound on the age of cached dwarf2 compilation units is %s.\n"),
|
||||
fprintf_filtered (file, _("The upper bound on the age of cached "
|
||||
"dwarf2 compilation units is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
@@ -813,7 +813,8 @@ static void
|
||||
dwarf2_debug_line_missing_end_sequence_complaint (void)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_(".debug_line section has line program sequence without an end"));
|
||||
_(".debug_line section has line "
|
||||
"program sequence without an end"));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -827,8 +828,8 @@ dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
|
||||
int arg3)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("const value length mismatch for '%s', got %d, expected %d"), arg1,
|
||||
arg2, arg3);
|
||||
_("const value length mismatch for '%s', got %d, expected %d"),
|
||||
arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -842,7 +843,8 @@ static void
|
||||
dwarf2_macro_malformed_definition_complaint (const char *arg1)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("macro debug info contains a malformed macro definition:\n`%s'"),
|
||||
_("macro debug info contains a "
|
||||
"malformed macro definition:\n`%s'"),
|
||||
arg1);
|
||||
}
|
||||
|
||||
@@ -850,7 +852,8 @@ static void
|
||||
dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid attribute class or form for '%s' in '%s'"), arg1, arg2);
|
||||
_("invalid attribute class or form for '%s' in '%s'"),
|
||||
arg1, arg2);
|
||||
}
|
||||
|
||||
/* local function prototypes */
|
||||
@@ -1014,7 +1017,8 @@ static struct type *die_type (struct die_info *, struct dwarf2_cu *);
|
||||
|
||||
static int need_gnat_info (struct dwarf2_cu *);
|
||||
|
||||
static struct type *die_descriptive_type (struct die_info *, struct dwarf2_cu *);
|
||||
static struct type *die_descriptive_type (struct die_info *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
static void set_descriptive_type (struct type *, struct die_info *,
|
||||
struct dwarf2_cu *);
|
||||
@@ -1068,7 +1072,8 @@ static void dwarf2_add_member_fn (struct field_info *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
|
||||
struct type *, struct dwarf2_cu *);
|
||||
struct type *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
static void process_structure_scope (struct die_info *, struct dwarf2_cu *);
|
||||
|
||||
@@ -1448,7 +1453,8 @@ zlib_decompress_section (struct objfile *objfile, asection *sectp,
|
||||
int header_size = 12;
|
||||
|
||||
if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0
|
||||
|| bfd_bread (compressed_buffer, compressed_size, abfd) != compressed_size)
|
||||
|| bfd_bread (compressed_buffer,
|
||||
compressed_size, abfd) != compressed_size)
|
||||
error (_("Dwarf Error: Can't read DWARF data from '%s'"),
|
||||
bfd_get_filename (abfd));
|
||||
|
||||
@@ -2992,7 +2998,8 @@ create_debug_types_hash_table (struct objfile *objfile)
|
||||
if (dwarf2_die_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "Signatured types:\n");
|
||||
|
||||
while (info_ptr < dwarf2_per_objfile->types.buffer + dwarf2_per_objfile->types.size)
|
||||
while (info_ptr < dwarf2_per_objfile->types.buffer
|
||||
+ dwarf2_per_objfile->types.size)
|
||||
{
|
||||
unsigned int offset;
|
||||
unsigned int offset_size;
|
||||
@@ -3015,7 +3022,8 @@ create_debug_types_hash_table (struct objfile *objfile)
|
||||
> dwarf2_per_objfile->types.buffer + dwarf2_per_objfile->types.size)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("debug type entry runs off end of `.debug_types' section, ignored"));
|
||||
_("debug type entry runs off end "
|
||||
"of `.debug_types' section, ignored"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3402,7 +3410,8 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile)
|
||||
{
|
||||
struct dwarf2_per_cu_data *this_cu;
|
||||
|
||||
this_cu = dwarf2_find_comp_unit (info_ptr - dwarf2_per_objfile->info.buffer,
|
||||
this_cu = dwarf2_find_comp_unit (info_ptr
|
||||
- dwarf2_per_objfile->info.buffer,
|
||||
objfile);
|
||||
|
||||
info_ptr = process_psymtab_comp_unit (objfile, this_cu,
|
||||
@@ -3521,7 +3530,8 @@ create_all_comp_units (struct objfile *objfile)
|
||||
all_comp_units = xmalloc (n_allocated
|
||||
* sizeof (struct dwarf2_per_cu_data *));
|
||||
|
||||
while (info_ptr < dwarf2_per_objfile->info.buffer + dwarf2_per_objfile->info.size)
|
||||
while (info_ptr < dwarf2_per_objfile->info.buffer
|
||||
+ dwarf2_per_objfile->info.size)
|
||||
{
|
||||
unsigned int length, initial_length_size;
|
||||
struct dwarf2_per_cu_data *this_cu;
|
||||
@@ -3715,7 +3725,8 @@ partial_die_parent_scope (struct partial_die_info *pdi,
|
||||
if (grandparent_scope == NULL)
|
||||
parent->scope = parent->name;
|
||||
else
|
||||
parent->scope = typename_concat (&cu->comp_unit_obstack, grandparent_scope,
|
||||
parent->scope = typename_concat (&cu->comp_unit_obstack,
|
||||
grandparent_scope,
|
||||
parent->name, 0, cu);
|
||||
}
|
||||
else if (parent->tag == DW_TAG_enumerator)
|
||||
@@ -4090,8 +4101,8 @@ peek_die_abbrev (gdb_byte *info_ptr, unsigned int *bytes_read,
|
||||
abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
|
||||
if (!abbrev)
|
||||
{
|
||||
error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"), abbrev_number,
|
||||
bfd_get_filename (abfd));
|
||||
error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"),
|
||||
abbrev_number, bfd_get_filename (abfd));
|
||||
}
|
||||
|
||||
return abbrev;
|
||||
@@ -4140,7 +4151,8 @@ skip_one_die (gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
read_attribute (&attr, &abbrev->attrs[i],
|
||||
abfd, info_ptr, cu);
|
||||
if (attr.form == DW_FORM_ref_addr)
|
||||
complaint (&symfile_complaints, _("ignoring absolute DW_AT_sibling"));
|
||||
complaint (&symfile_complaints,
|
||||
_("ignoring absolute DW_AT_sibling"));
|
||||
else
|
||||
return buffer + dwarf2_get_ref_die_offset (&attr);
|
||||
}
|
||||
@@ -4216,7 +4228,8 @@ skip_one_die (gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
goto skip_attribute;
|
||||
|
||||
default:
|
||||
error (_("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]"),
|
||||
error (_("Dwarf Error: Cannot handle %s "
|
||||
"in DWARF reader [in module %s]"),
|
||||
dwarf_form_name (form),
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
@@ -4261,13 +4274,15 @@ dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
if (pst->readin)
|
||||
{
|
||||
warning (_("bug: psymtab for %s is already read in."), pst->filename);
|
||||
warning (_("bug: psymtab for %s is already read in."),
|
||||
pst->filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (info_verbose)
|
||||
{
|
||||
printf_filtered (_("Reading in symbols for %s..."), pst->filename);
|
||||
printf_filtered (_("Reading in symbols for %s..."),
|
||||
pst->filename);
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
@@ -4416,7 +4431,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
/* Load the DIEs associated with PER_CU into memory. */
|
||||
|
||||
static void
|
||||
load_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct objfile *objfile)
|
||||
load_full_comp_unit (struct dwarf2_per_cu_data *per_cu,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
struct dwarf2_cu *cu;
|
||||
@@ -4881,7 +4897,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
||||
if (attr == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("template parameter missing DW_AT_const_value"));
|
||||
_("template parameter missing "
|
||||
"DW_AT_const_value"));
|
||||
fputs_unfiltered ("UNKNOWN_VALUE", buf);
|
||||
continue;
|
||||
}
|
||||
@@ -4912,7 +4929,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
||||
else
|
||||
v = value_from_longest (type, value);
|
||||
|
||||
/* Specify decimal so that we do not depend on the radix. */
|
||||
/* Specify decimal so that we do not depend on
|
||||
the radix. */
|
||||
get_formatted_print_options (&opts, 'd');
|
||||
opts.raw = 1;
|
||||
value_print (v, buf, &opts);
|
||||
@@ -4965,7 +4983,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
||||
if (TYPE_NFIELDS (type) > 0
|
||||
&& TYPE_FIELD_ARTIFICIAL (type, 0)
|
||||
&& TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_PTR
|
||||
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0))))
|
||||
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type,
|
||||
0))))
|
||||
fputs_unfiltered (" const", buf);
|
||||
}
|
||||
}
|
||||
@@ -5385,8 +5404,9 @@ unsigned_int_compar (const void *ap, const void *bp)
|
||||
}
|
||||
|
||||
/* DW_AT_abstract_origin inherits whole DIEs (not just their attributes).
|
||||
Inherit only the children of the DW_AT_abstract_origin DIE not being already
|
||||
referenced by DW_AT_abstract_origin from the children of the current DIE. */
|
||||
Inherit only the children of the DW_AT_abstract_origin DIE not being
|
||||
already referenced by DW_AT_abstract_origin from the children of the
|
||||
current DIE. */
|
||||
|
||||
static void
|
||||
inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -5484,8 +5504,9 @@ inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
|
||||
unsigned_int_compar);
|
||||
for (offsetp = offsets + 1; offsetp < offsets_end; offsetp++)
|
||||
if (offsetp[-1] == *offsetp)
|
||||
complaint (&symfile_complaints, _("Multiple children of DIE 0x%x refer "
|
||||
"to DIE 0x%x as their abstract origin"),
|
||||
complaint (&symfile_complaints,
|
||||
_("Multiple children of DIE 0x%x refer "
|
||||
"to DIE 0x%x as their abstract origin"),
|
||||
die->offset, *offsetp);
|
||||
|
||||
offsetp = offsets;
|
||||
@@ -5556,7 +5577,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
attr = dwarf2_attr (die, DW_AT_external, cu);
|
||||
if (!attr || !DW_UNSND (attr))
|
||||
complaint (&symfile_complaints,
|
||||
_("cannot get low and high bounds for subprogram DIE at %d"),
|
||||
_("cannot get low and high bounds "
|
||||
"for subprogram DIE at %d"),
|
||||
die->offset);
|
||||
return;
|
||||
}
|
||||
@@ -5845,7 +5867,8 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
|
||||
|
||||
if (ranges_pst != NULL && range_beginning < range_end)
|
||||
addrmap_set_empty (objfile->psymtabs_addrmap,
|
||||
range_beginning + baseaddr, range_end - 1 + baseaddr,
|
||||
range_beginning + baseaddr,
|
||||
range_end - 1 + baseaddr,
|
||||
ranges_pst);
|
||||
|
||||
/* FIXME: This is recording everything as a low-high
|
||||
@@ -6120,7 +6143,8 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block,
|
||||
if (!base_known)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Invalid .debug_ranges data (no base address)"));
|
||||
_("Invalid .debug_ranges data "
|
||||
"(no base address)"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6424,9 +6448,9 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
|
||||
TYPE_N_BASECLASSES (type) = fip->nbaseclasses;
|
||||
}
|
||||
|
||||
/* Copy the saved-up fields into the field vector. Start from the head
|
||||
of the list, adding to the tail of the field array, so that they end
|
||||
up in the same order in the array in which they were added to the list. */
|
||||
/* Copy the saved-up fields into the field vector. Start from the head of
|
||||
the list, adding to the tail of the field array, so that they end up in
|
||||
the same order in the array in which they were added to the list. */
|
||||
while (nfields-- > 0)
|
||||
{
|
||||
struct nextfield *fieldp;
|
||||
@@ -6587,8 +6611,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
|
||||
if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL)
|
||||
fnp->fcontext = die_containing_type (die, cu);
|
||||
|
||||
/* dwarf2 doesn't have stubbed physical names, so the setting of is_const
|
||||
and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */
|
||||
/* dwarf2 doesn't have stubbed physical names, so the setting of is_const and
|
||||
is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */
|
||||
|
||||
/* Get accessibility. */
|
||||
attr = dwarf2_attr (die, DW_AT_accessibility, cu);
|
||||
@@ -6668,7 +6692,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
|
||||
{
|
||||
/* GCC does this, as of 2008-08-25; PR debug/37237. */
|
||||
complaint (&symfile_complaints,
|
||||
_("Member function \"%s\" (offset %d) is virtual but the vtable offset is not specified"),
|
||||
_("Member function \"%s\" (offset %d) is virtual "
|
||||
"but the vtable offset is not specified"),
|
||||
fieldname, die->offset);
|
||||
ALLOCATE_CPLUS_STRUCT_TYPE (type);
|
||||
TYPE_CPLUS_DYNAMIC (type) = 1;
|
||||
@@ -7014,7 +7039,8 @@ process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
/* Complain if virtual function table field not found. */
|
||||
if (i < TYPE_N_BASECLASSES (t))
|
||||
complaint (&symfile_complaints,
|
||||
_("virtual function table pointer not found when defining class '%s'"),
|
||||
_("virtual function table pointer "
|
||||
"not found when defining class '%s'"),
|
||||
TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) :
|
||||
"");
|
||||
}
|
||||
@@ -7334,8 +7360,9 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
if (DW_UNSND (attr) >= TYPE_LENGTH (type))
|
||||
TYPE_LENGTH (type) = DW_UNSND (attr);
|
||||
else
|
||||
complaint (&symfile_complaints, _("\
|
||||
DW_AT_byte_size for array type smaller than the total size of elements"));
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_AT_byte_size for array type smaller "
|
||||
"than the total size of elements"));
|
||||
}
|
||||
|
||||
name = dwarf2_name (die, cu);
|
||||
@@ -7565,7 +7592,8 @@ read_module_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
module_name = dwarf2_name (die, cu);
|
||||
if (!module_name)
|
||||
complaint (&symfile_complaints, _("DW_TAG_module has no name, offset 0x%x"),
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_TAG_module has no name, offset 0x%x"),
|
||||
die->offset);
|
||||
type = init_type (TYPE_CODE_MODULE, 0, 0, module_name, objfile);
|
||||
|
||||
@@ -7671,7 +7699,8 @@ read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
else if (TYPE_LENGTH (type) != byte_size)
|
||||
{
|
||||
complaint (&symfile_complaints, _("invalid pointer size %d"), byte_size);
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid pointer size %d"), byte_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -8785,7 +8814,8 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
&& parent_die->has_specification == 0)
|
||||
{
|
||||
if (part_die->name == NULL)
|
||||
complaint (&symfile_complaints, _("malformed enumerator DIE ignored"));
|
||||
complaint (&symfile_complaints,
|
||||
_("malformed enumerator DIE ignored"));
|
||||
else if (building_psymtab)
|
||||
add_psymbol_to_list (part_die->name, strlen (part_die->name), 0,
|
||||
VAR_DOMAIN, LOC_CONST,
|
||||
@@ -9000,7 +9030,8 @@ read_partial_die (struct partial_die_info *part_die,
|
||||
/* Ignore absolute siblings, they might point outside of
|
||||
the current compile unit. */
|
||||
if (attr.form == DW_FORM_ref_addr)
|
||||
complaint (&symfile_complaints, _("ignoring absolute DW_AT_sibling"));
|
||||
complaint (&symfile_complaints,
|
||||
_("ignoring absolute DW_AT_sibling"));
|
||||
else
|
||||
part_die->sibling = buffer + dwarf2_get_ref_die_offset (&attr);
|
||||
break;
|
||||
@@ -9140,7 +9171,8 @@ find_partial_die (unsigned int offset, struct dwarf2_cu *cu)
|
||||
|
||||
if (pd == NULL)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("could not find partial DIE 0x%x in cache [from module %s]\n"),
|
||||
_("could not find partial DIE 0x%x "
|
||||
"in cache [from module %s]\n"),
|
||||
offset, bfd_get_filename (cu->objfile->obfd));
|
||||
return pd;
|
||||
}
|
||||
@@ -9270,7 +9302,8 @@ read_attribute_value (struct attribute *attr, unsigned form,
|
||||
if (cu->header.version == 2)
|
||||
DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read);
|
||||
else
|
||||
DW_ADDR (attr) = read_offset (abfd, info_ptr, &cu->header, &bytes_read);
|
||||
DW_ADDR (attr) = read_offset (abfd, info_ptr,
|
||||
&cu->header, &bytes_read);
|
||||
info_ptr += bytes_read;
|
||||
break;
|
||||
case DW_FORM_addr:
|
||||
@@ -9689,8 +9722,9 @@ read_indirect_string (bfd *abfd, gdb_byte *buf,
|
||||
}
|
||||
if (str_offset >= dwarf2_per_objfile->str.size)
|
||||
{
|
||||
error (_("DW_FORM_strp pointing outside of .debug_str section [in module %s]"),
|
||||
bfd_get_filename (abfd));
|
||||
error (_("DW_FORM_strp pointing outside of "
|
||||
".debug_str section [in module %s]"),
|
||||
bfd_get_filename (abfd));
|
||||
return NULL;
|
||||
}
|
||||
gdb_assert (HOST_CHAR_BIT == 8);
|
||||
@@ -10064,7 +10098,8 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
|
||||
{
|
||||
lh->maximum_ops_per_instruction = 1;
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid maximum_ops_per_instruction in `.debug_line' section"));
|
||||
_("invalid maximum_ops_per_instruction "
|
||||
"in `.debug_line' section"));
|
||||
}
|
||||
|
||||
lh->default_is_stmt = read_1_byte (abfd, line_ptr);
|
||||
@@ -10114,7 +10149,8 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
|
||||
if (line_ptr > (dwarf2_per_objfile->line.buffer
|
||||
+ dwarf2_per_objfile->line.size))
|
||||
complaint (&symfile_complaints,
|
||||
_("line number info header doesn't fit in `.debug_line' section"));
|
||||
_("line number info header doesn't "
|
||||
"fit in `.debug_line' section"));
|
||||
|
||||
discard_cleanups (back_to);
|
||||
return lh;
|
||||
@@ -10363,7 +10399,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
else switch (op_code)
|
||||
{
|
||||
case DW_LNS_extended_op:
|
||||
extended_len = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
|
||||
extended_len = read_unsigned_leb128 (abfd, line_ptr,
|
||||
&bytes_read);
|
||||
line_ptr += bytes_read;
|
||||
extended_end = line_ptr + extended_len;
|
||||
extended_op = read_1_byte (abfd, line_ptr);
|
||||
@@ -10384,7 +10421,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
char *cur_file;
|
||||
unsigned int dir_index, mod_time, length;
|
||||
|
||||
cur_file = read_direct_string (abfd, line_ptr, &bytes_read);
|
||||
cur_file = read_direct_string (abfd, line_ptr,
|
||||
&bytes_read);
|
||||
line_ptr += bytes_read;
|
||||
dir_index =
|
||||
read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
|
||||
@@ -10611,7 +10649,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
subfile's name. */
|
||||
|
||||
static void
|
||||
dwarf2_start_subfile (char *filename, const char *dirname, const char *comp_dir)
|
||||
dwarf2_start_subfile (char *filename, const char *dirname,
|
||||
const char *comp_dir)
|
||||
{
|
||||
char *fullname;
|
||||
|
||||
@@ -11179,16 +11218,20 @@ dwarf2_const_value_attr (struct attribute *attr, struct type *type,
|
||||
converted to host endianness, so we just need to sign- or
|
||||
zero-extend it as appropriate. */
|
||||
case DW_FORM_data1:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 8);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 8);
|
||||
break;
|
||||
case DW_FORM_data2:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 16);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 16);
|
||||
break;
|
||||
case DW_FORM_data4:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 32);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 32);
|
||||
break;
|
||||
case DW_FORM_data8:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 64);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 64);
|
||||
break;
|
||||
|
||||
case DW_FORM_sdata:
|
||||
@@ -11489,7 +11532,8 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
|
||||
this_type = read_module_type (die, cu);
|
||||
break;
|
||||
default:
|
||||
complaint (&symfile_complaints, _("unexpected tag in read_type_die: '%s'"),
|
||||
complaint (&symfile_complaints,
|
||||
_("unexpected tag in read_type_die: '%s'"),
|
||||
dwarf_tag_name (die->tag));
|
||||
break;
|
||||
}
|
||||
@@ -11552,7 +11596,8 @@ guess_full_die_structure_name (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
/* Test for '::' as a sanity check. */
|
||||
if (actual_name_len > die_name_len + 2
|
||||
&& actual_name[actual_name_len - die_name_len - 1] == ':')
|
||||
&& actual_name[actual_name_len
|
||||
- die_name_len - 1] == ':')
|
||||
name =
|
||||
obsavestring (actual_name,
|
||||
actual_name_len - die_name_len - 2,
|
||||
@@ -11713,11 +11758,11 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
}
|
||||
|
||||
/* Return a newly-allocated string formed by concatenating PREFIX and
|
||||
SUFFIX with appropriate separator. If PREFIX or SUFFIX is NULL or empty, then
|
||||
simply copy the SUFFIX or PREFIX, respectively. If OBS is non-null,
|
||||
perform an obconcat, otherwise allocate storage for the result. The CU argument
|
||||
is used to determine the language and hence, the appropriate separator. */
|
||||
/* Return a newly-allocated string formed by concatenating PREFIX and SUFFIX
|
||||
with appropriate separator. If PREFIX or SUFFIX is NULL or empty, then
|
||||
simply copy the SUFFIX or PREFIX, respectively. If OBS is non-null, perform
|
||||
an obconcat, otherwise allocate storage for the result. The CU argument is
|
||||
used to determine the language and hence, the appropriate separator. */
|
||||
|
||||
#define MAX_SEP_LEN 7 /* strlen ("__") + strlen ("_MOD_") */
|
||||
|
||||
@@ -11728,7 +11773,8 @@ typename_concat (struct obstack *obs, const char *prefix, const char *suffix,
|
||||
const char *lead = "";
|
||||
const char *sep;
|
||||
|
||||
if (suffix == NULL || suffix[0] == '\0' || prefix == NULL || prefix[0] == '\0')
|
||||
if (suffix == NULL || suffix[0] == '\0'
|
||||
|| prefix == NULL || prefix[0] == '\0')
|
||||
sep = "";
|
||||
else if (cu->language == language_java)
|
||||
sep = ".";
|
||||
@@ -11750,7 +11796,8 @@ typename_concat (struct obstack *obs, const char *prefix, const char *suffix,
|
||||
|
||||
if (obs == NULL)
|
||||
{
|
||||
char *retval = xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
|
||||
char *retval
|
||||
= xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
|
||||
|
||||
strcpy (retval, lead);
|
||||
strcat (retval, prefix);
|
||||
@@ -12906,7 +12953,8 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
|
||||
case DW_FORM_block4:
|
||||
case DW_FORM_block:
|
||||
case DW_FORM_block1:
|
||||
fprintf_unfiltered (f, "block: size %d", DW_BLOCK (&die->attrs[i])->size);
|
||||
fprintf_unfiltered (f, "block: size %d",
|
||||
DW_BLOCK (&die->attrs[i])->size);
|
||||
break;
|
||||
case DW_FORM_exprloc:
|
||||
fprintf_unfiltered (f, "expression: size %u",
|
||||
@@ -12957,7 +13005,8 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
|
||||
case DW_FORM_indirect:
|
||||
/* the reader will have reduced the indirect form to
|
||||
the "base form" so this form should not occur */
|
||||
fprintf_unfiltered (f, "unexpected attribute form: DW_FORM_indirect");
|
||||
fprintf_unfiltered (f,
|
||||
"unexpected attribute form: DW_FORM_indirect");
|
||||
break;
|
||||
default:
|
||||
fprintf_unfiltered (f, "unsupported attribute form: %d.",
|
||||
@@ -12997,7 +13046,8 @@ dump_die_1 (struct ui_file *f, int level, int max_level, struct die_info *die)
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf_unfiltered (f, " [not printed, max nesting level reached]\n");
|
||||
fprintf_unfiltered (f,
|
||||
" [not printed, max nesting level reached]\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13071,7 +13121,8 @@ dwarf2_get_attr_constant_value (struct attribute *attr, int default_value)
|
||||
return DW_UNSND (attr);
|
||||
else
|
||||
{
|
||||
complaint (&symfile_complaints, _("Attribute value is not a constant (%s)"),
|
||||
complaint (&symfile_complaints,
|
||||
_("Attribute value is not a constant (%s)"),
|
||||
dwarf_form_name (attr->form));
|
||||
return default_value;
|
||||
}
|
||||
@@ -13302,8 +13353,8 @@ follow_die_sig (struct die_info *src_die, struct attribute *attr,
|
||||
return die;
|
||||
}
|
||||
|
||||
error (_("Dwarf Error: Cannot find signatured DIE at 0x%x referenced from DIE "
|
||||
"at 0x%x [in module %s]"),
|
||||
error (_("Dwarf Error: Cannot find signatured DIE at 0x%x referenced "
|
||||
"from DIE at 0x%x [in module %s]"),
|
||||
sig_type->type_offset, src_die->offset, objfile->name);
|
||||
}
|
||||
|
||||
@@ -13598,7 +13649,8 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
|
||||
break;
|
||||
|
||||
case DW_OP_plus_uconst:
|
||||
stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read);
|
||||
stack[stacki] += read_unsigned_leb128 (NULL, (data + i),
|
||||
&bytes_read);
|
||||
i += bytes_read;
|
||||
break;
|
||||
|
||||
@@ -13799,7 +13851,8 @@ consume_improper_spaces (const char *p, const char *body)
|
||||
if (*p == ' ')
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("macro definition contains spaces in formal argument list:\n`%s'"),
|
||||
_("macro definition contains spaces "
|
||||
"in formal argument list:\n`%s'"),
|
||||
body);
|
||||
|
||||
while (*p == ' ')
|
||||
@@ -13990,7 +14043,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
if (mac_ptr >= mac_end)
|
||||
{
|
||||
/* Complaint is printed during the second pass as GDB will probably
|
||||
stop the first pass earlier upon finding DW_MACINFO_start_file. */
|
||||
stop the first pass earlier upon finding
|
||||
DW_MACINFO_start_file. */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -14027,8 +14081,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
|
||||
mac_ptr += bytes_read;
|
||||
|
||||
current_file = macro_start_file (file, line, current_file, comp_dir,
|
||||
lh, cu->objfile);
|
||||
current_file = macro_start_file (file, line, current_file,
|
||||
comp_dir, lh, cu->objfile);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -14114,7 +14168,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
_("something-or-other"), line, body);
|
||||
break;
|
||||
}
|
||||
if ((line == 0 && !at_commandline) || (line != 0 && at_commandline))
|
||||
if ((line == 0 && !at_commandline)
|
||||
|| (line != 0 && at_commandline))
|
||||
complaint (&symfile_complaints,
|
||||
_("debug info gives %s macro %s with %s line %d: %s"),
|
||||
at_commandline ? _("command-line") : _("in-file"),
|
||||
@@ -14142,7 +14197,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
|
||||
mac_ptr += bytes_read;
|
||||
|
||||
if ((line == 0 && !at_commandline) || (line != 0 && at_commandline))
|
||||
if ((line == 0 && !at_commandline)
|
||||
|| (line != 0 && at_commandline))
|
||||
complaint (&symfile_complaints,
|
||||
_("debug info gives source %d included "
|
||||
"from %s at %s line %d"),
|
||||
@@ -14164,7 +14220,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
case DW_MACINFO_end_file:
|
||||
if (! current_file)
|
||||
complaint (&symfile_complaints,
|
||||
_("macro debug info has an unmatched `close_file' directive"));
|
||||
_("macro debug info has an unmatched "
|
||||
"`close_file' directive"));
|
||||
else
|
||||
{
|
||||
current_file = current_file->included_by;
|
||||
@@ -14189,7 +14246,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
||||
next_type = read_1_byte (abfd, mac_ptr);
|
||||
if (next_type != 0)
|
||||
complaint (&symfile_complaints,
|
||||
_("no terminating 0-type entry for macros in `.debug_macinfo' section"));
|
||||
_("no terminating 0-type entry for "
|
||||
"macros in `.debug_macinfo' section"));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -14311,7 +14369,8 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
|
||||
|
||||
if (cu->base_known == 0)
|
||||
complaint (&symfile_complaints,
|
||||
_("Location list used without specifying the CU base address."));
|
||||
_("Location list used without "
|
||||
"specifying the CU base address."));
|
||||
|
||||
SYMBOL_COMPUTED_OPS (sym) = &dwarf2_loclist_funcs;
|
||||
SYMBOL_LOCATION_BATON (sym) = baton;
|
||||
@@ -15458,12 +15517,14 @@ write_one_signatured_type (void **slot, void *d)
|
||||
|
||||
write_psymbols (info->symtab,
|
||||
info->psyms_seen,
|
||||
info->objfile->global_psymbols.list + psymtab->globals_offset,
|
||||
info->objfile->global_psymbols.list
|
||||
+ psymtab->globals_offset,
|
||||
psymtab->n_global_syms, info->cu_index,
|
||||
0);
|
||||
write_psymbols (info->symtab,
|
||||
info->psyms_seen,
|
||||
info->objfile->static_psymbols.list + psymtab->statics_offset,
|
||||
info->objfile->static_psymbols.list
|
||||
+ psymtab->statics_offset,
|
||||
psymtab->n_static_syms, info->cu_index,
|
||||
1);
|
||||
|
||||
@@ -15560,7 +15621,8 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir)
|
||||
all_comp_units, but only in their own hash table. */
|
||||
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||
{
|
||||
struct dwarf2_per_cu_data *per_cu = dwarf2_per_objfile->all_comp_units[i];
|
||||
struct dwarf2_per_cu_data *per_cu
|
||||
= dwarf2_per_objfile->all_comp_units[i];
|
||||
struct partial_symtab *psymtab = per_cu->v.psymtab;
|
||||
gdb_byte val[8];
|
||||
struct psymtab_cu_index_map *map;
|
||||
@@ -15777,8 +15839,9 @@ static void
|
||||
show_dwarf2_always_disassemble (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Whether to always disassemble DWARF expressions is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Whether to always disassemble "
|
||||
"DWARF expressions is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user