/* Non-null if this CU is from .debug_types; in which case it points
to the section. Otherwise it's from .debug_info. */
- struct dwarf2_section_info *debug_type_section;
+ struct dwarf2_section_info *debug_types_section;
/* Set to non-NULL iff this CU is currently loaded. When it gets freed out
of the CU cache it gets reset to NULL again. */
gdb_byte *buffer,
unsigned int buffer_size,
bfd *abfd,
- int is_debug_type_section);
+ int is_debug_types_section);
static void init_cu_die_reader (struct die_reader_specs *reader,
struct dwarf2_cu *cu);
static void
load_cu (struct dwarf2_per_cu_data *per_cu)
{
- if (per_cu->debug_type_section)
+ if (per_cu->debug_types_section)
read_signatured_type_at_offset (per_cu->objfile,
- per_cu->debug_type_section,
+ per_cu->debug_types_section,
per_cu->offset);
else
load_full_comp_unit (per_cu, per_cu->objfile);
struct signatured_type);
type_sig->signature = signature;
type_sig->type_offset = type_offset;
- type_sig->per_cu.debug_type_section = section;
+ type_sig->per_cu.debug_types_section = section;
type_sig->per_cu.offset = offset;
type_sig->per_cu.objfile = objfile;
type_sig->per_cu.v.quick
init_one_comp_unit (&cu, objfile);
cleanups = make_cleanup (free_stack_comp_unit, &cu);
- if (this_cu->debug_type_section)
- sec = this_cu->debug_type_section;
+ if (this_cu->debug_types_section)
+ sec = this_cu->debug_types_section;
else
sec = &dwarf2_per_objfile->info;
dwarf2_read_section (objfile, sec);
info_ptr = partial_read_comp_unit_head (&cu.header, info_ptr,
buffer, buffer_size,
abfd,
- this_cu->debug_type_section != NULL);
+ this_cu->debug_types_section != NULL);
/* Skip dummy compilation units. */
if (info_ptr >= buffer + buffer_size
static gdb_byte *
partial_read_comp_unit_head (struct comp_unit_head *header, gdb_byte *info_ptr,
gdb_byte *buffer, unsigned int buffer_size,
- bfd *abfd, int is_debug_type_section)
+ bfd *abfd, int is_debug_types_section)
{
gdb_byte *beg_of_comp_unit = info_ptr;
/* If we're reading a type unit, skip over the signature and
type_offset fields. */
- if (is_debug_type_section)
+ if (is_debug_types_section)
info_ptr += 8 /*signature*/ + header->offset_size;
header->first_die_offset = info_ptr - beg_of_comp_unit;
type_sig->signature = signature;
type_sig->type_offset = type_offset;
type_sig->per_cu.objfile = objfile;
- type_sig->per_cu.debug_type_section = section;
+ type_sig->per_cu.debug_types_section = section;
type_sig->per_cu.offset = offset;
slot = htab_find_slot (types_htab, type_sig, INSERT);
{
reader->abfd = cu->objfile->obfd;
reader->cu = cu;
- if (cu->per_cu->debug_type_section)
+ if (cu->per_cu->debug_types_section)
{
- gdb_assert (cu->per_cu->debug_type_section->readin);
- reader->buffer = cu->per_cu->debug_type_section->buffer;
+ gdb_assert (cu->per_cu->debug_types_section->readin);
+ reader->buffer = cu->per_cu->debug_types_section->buffer;
}
else
{
info_ptr = partial_read_comp_unit_head (&cu.header, info_ptr,
buffer, buffer_size,
abfd,
- this_cu->debug_type_section != NULL);
+ this_cu->debug_types_section != NULL);
/* Skip dummy compilation units. */
if (info_ptr >= buffer + buffer_size
info_ptr = read_full_die (&reader_specs, &comp_unit_die, info_ptr,
&has_children);
- if (this_cu->debug_type_section)
+ if (this_cu->debug_types_section)
{
/* LENGTH has not been set yet for type units. */
gdb_assert (this_cu->offset == cu.header.offset);
info_ptr = (beg_of_comp_unit + cu.header.length
+ cu.header.initial_length_size);
- if (this_cu->debug_type_section)
+ if (this_cu->debug_types_section)
{
/* It's not clear we want to do anything with stmt lists here.
Waiting to see what gcc ultimately does. */
this_cu = &entry->per_cu;
- gdb_assert (this_cu->debug_type_section->readin);
+ gdb_assert (this_cu->debug_types_section->readin);
process_psymtab_comp_unit (objfile, this_cu,
- this_cu->debug_type_section->buffer,
- (this_cu->debug_type_section->buffer
+ this_cu->debug_types_section->buffer,
+ (this_cu->debug_types_section->buffer
+ this_cu->offset),
- this_cu->debug_type_section->size);
+ this_cu->debug_types_section->size);
return 1;
}
struct die_reader_specs reader_specs;
int read_cu = 0;
- gdb_assert (! this_cu->debug_type_section);
+ gdb_assert (! this_cu->debug_types_section);
gdb_assert (dwarf2_per_objfile->info.readin);
info_ptr = dwarf2_per_objfile->info.buffer + this_cu->offset;
struct attribute *attr;
int read_cu = 0;
- gdb_assert (! per_cu->debug_type_section);
+ gdb_assert (! per_cu->debug_types_section);
/* Set local variables from the partial symbol table info. */
offset = per_cu->offset;
actually available. Note that we do not want to do this for all
enums which are just declarations, because C++0x allows forward
enum declarations. */
- if (cu->per_cu->debug_type_section
+ if (cu->per_cu->debug_types_section
&& die_is_declaration (die, cu))
{
struct signatured_type *type_sig;
type_sig
= lookup_signatured_type_at_offset (dwarf2_per_objfile->objfile,
- cu->per_cu->debug_type_section,
+ cu->per_cu->debug_types_section,
cu->per_cu->offset);
if (type_sig->type_offset != die->offset)
return;
{
fprintf_unfiltered (gdb_stdlog,
"\nRead die from %s of %s:\n",
- (reader->cu->per_cu->debug_type_section
+ (reader->cu->per_cu->debug_types_section
? ".debug_types"
: ".debug_info"),
reader->abfd->filename);
struct dwarf2_per_cu_data *per_cu = NULL;
struct partial_die_info *pd = NULL;
- if (cu->per_cu->debug_type_section)
+ if (cu->per_cu->debug_types_section)
{
pd = find_partial_die_in_comp_unit (offset, cu);
if (pd != NULL)
"at 0x%x [in module %s]"),
die->offset, cu->objfile->name);
- gdb_assert (sig_type->per_cu.debug_type_section);
+ gdb_assert (sig_type->per_cu.debug_types_section);
offset = sig_type->per_cu.offset + sig_type->type_offset;
this_type = get_die_type_at_offset (offset, &sig_type->per_cu);
}
target_cu = cu;
- if (cu->per_cu->debug_type_section)
+ if (cu->per_cu->debug_types_section)
{
/* .debug_types CUs cannot reference anything outside their CU.
If they need to, they have to reference a signatured type via
struct dwarf2_cu *cu;
ULONGEST signature;
struct cleanup *back_to, *free_cu_cleanup;
- struct dwarf2_section_info *section = type_sig->per_cu.debug_type_section;
+ struct dwarf2_section_info *section = type_sig->per_cu.debug_types_section;
dwarf2_read_section (objfile, section);
types_ptr = section->buffer + type_sig->per_cu.offset;
&& !HAVE_GNAT_AUX_INFO (type))
INIT_GNAT_SPECIFIC (type);
- if (cu->per_cu->debug_type_section)
+ if (cu->per_cu->debug_types_section)
type_hash_ptr = &dwarf2_per_objfile->debug_types_type_hash;
else
type_hash_ptr = &dwarf2_per_objfile->debug_info_type_hash;
struct dwarf2_offset_and_type *slot, ofs;
htab_t type_hash;
- if (per_cu->debug_type_section)
+ if (per_cu->debug_types_section)
type_hash = dwarf2_per_objfile->debug_types_type_hash;
else
type_hash = dwarf2_per_objfile->debug_info_type_hash;