* dbxread.c: White space.
* dcache.c: White space.
* disasm.c: White space.
* doublest.c: White space.
* dsrec.c: White space.
* dummy-frame.c: White space.
* dwarf2expr.c: White space.
* dwarf2-frame.c: White space.
* dwarf2loc.c: White space.
* dwarf2read.c: White space.
+2010-05-14 Michael Snyder <msnyder@vmware.com>
+
+ * dbxread.c: White space.
+ * dcache.c: White space.
+ * disasm.c: White space.
+ * doublest.c: White space.
+ * dsrec.c: White space.
+ * dummy-frame.c: White space.
+ * dwarf2expr.c: White space.
+ * dwarf2-frame.c: White space.
+ * dwarf2loc.c: White space.
+ * dwarf2read.c: White space.
+
2010-05-14 Phil Muldoon <pmuldoon@redhat.com>
PR python/11482
/* Same with virtual function tables, both global and static. */
{
char *tempstring = name;
+
if (tempstring[0] == bfd_get_symbol_leading_char (objfile->obfd))
++tempstring;
if (is_vtable_name (tempstring))
if (symbuf_left <= 0)
{
file_ptr filepos = symbuf_sections->section->filepos;
+
if (bfd_seek (sym_bfd, filepos, SEEK_SET) != 0)
perror_with_name (bfd_get_filename (sym_bfd));
symbuf_left = bfd_section_size (sym_bfd, symbuf_sections->section);
if (next_bincl >= bincl_list + bincls_allocated)
{
int offset = next_bincl - bincl_list;
+
bincls_allocated *= 2;
bincl_list = (struct header_file_location *)
xrealloc ((char *) bincl_list,
{
arelent *rel = *relptr;
CORE_ADDR address =
- rel->address + ANOFFSET (objfile->section_offsets,
- SECT_OFF_DATA (objfile));
+ rel->address + ANOFFSET (objfile->section_offsets,
+ SECT_OFF_DATA (objfile));
switch (bfd_get_arch (abfd))
{
case N_BINCL:
{
enum language tmp_language;
+
/* Add this bincl to the bincl_list for future EXCLs. No
need to save the string; it'll be around until
read_dbx_symtab function returns */
case N_SOL:
{
enum language tmp_language;
- /* Mark down an include file in the current psymtab */
+ /* Mark down an include file in the current psymtab */
namestring = set_namestring (objfile, &nlist);
tmp_language = deduce_language_from_filename (namestring);
continue;
{
int i;
+
for (i = 0; i < includes_used; i++)
if (strcmp (namestring, psymtab_include_list[i]) == 0)
{
{
char *new_name, *name = xmalloc (p - namestring + 1);
memcpy (name, namestring, p - namestring);
+
name[p - namestring] = '\0';
new_name = cp_canonicalize_string (name);
if (new_name != NULL)
{
int name_len = p - namestring;
char *name = xmalloc (name_len + 1);
+
memcpy (name, namestring, name_len);
name[name_len] = '\0';
function_outside_compilation_unit_complaint (name);
find_stab_function_addr (namestring,
pst ? pst->filename : NULL,
objfile);
+
/* find_stab_function_addr will return 0 if the minimal
symbol wasn't found. (Unfortunately, this might also
be a valid address.) Anyway, if it *does* return 0,
{
int name_len = p - namestring;
char *name = xmalloc (name_len + 1);
+
memcpy (name, namestring, name_len);
name[name_len] = '\0';
function_outside_compilation_unit_complaint (name);
find_stab_function_addr (namestring,
pst ? pst->filename : NULL,
objfile);
+
/* find_stab_function_addr will return 0 if the minimal
symbol wasn't found. (Unfortunately, this might also
be a valid address.) Anyway, if it *does* return 0,
if (dependencies_used >= dependencies_allocated)
{
struct partial_symtab **orig = dependency_list;
+
dependency_list =
(struct partial_symtab **)
alloca ((dependencies_allocated *= 2)
struct partial_symbol **static_syms)
{
struct partial_symtab *result =
- start_psymtab_common (objfile, objfile->section_offsets,
- filename, textlow, global_syms, static_syms);
+ start_psymtab_common (objfile, objfile->section_offsets,
+ filename, textlow, global_syms, static_syms);
result->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
sizeof (struct symloc));
for (i = 0; i < num_includes; i++)
{
struct partial_symtab *subpst =
- allocate_psymtab (include_list[i], objfile);
+ allocate_psymtab (include_list[i], objfile);
/* Copy the sesction_offsets array from the main psymtab. */
subpst->section_offsets = pst->section_offsets;
= symfile_relocate_debug_section (pst->objfile,
DBX_STAB_SECTION (pst->objfile),
NULL);
+
if (stabs_data)
back_to = make_cleanup (free_current_contents,
(void *) &stabs_data);
#endif
}
else if (type & N_EXT || type == (unsigned char) N_TEXT
- || type == (unsigned char) N_NBTEXT
- )
+ || type == (unsigned char) N_NBTEXT)
{
/* Global symbol: see if we came across a dbx defintion for
a corresponding symbol. If so, store the value. Remove
if (sline_found_in_function)
{
CORE_ADDR addr = last_function_start + valu;
+
record_line (current_subfile, 0,
gdbarch_addr_bits_remove (gdbarch, addr));
}
{
CORE_ADDR addr = processing_gcc_compilation == 2 ?
last_function_start : valu;
+
record_line (current_subfile, desc,
gdbarch_addr_bits_remove (gdbarch, addr));
sline_found_in_function = 1;
{
int deftype;
char *colon_pos = strchr (name, ':');
+
if (colon_pos == NULL)
deftype = '\0';
else
int i;
int res;
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
+
xfunc = should_write ? dcache_poke_byte : dcache_peek_byte;
/* If this is a different inferior from what we've recorded,
dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
int i;
+
for (i = 0; i < len; i++)
dcache_poke_byte (dcache, memaddr + i, myaddr + i);
}
if (exp)
{
char *linestart;
+
i = strtol (exp, &linestart, 10);
if (linestart == exp || i < 0)
{
dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
{
struct gdbarch *gdbarch = info->application_data;
+
print_address (gdbarch, addr, info->stream);
}
CORE_ADDR old_pc = pc;
bfd_byte data;
int status;
+
pc += gdbarch_print_insn (gdbarch, pc, di);
for (;old_pc < pc; old_pc++)
{
fprintf_disasm (void *stream, const char *format, ...)
{
va_list args;
+
va_start (args, format);
vfprintf_filtered (stream, format, args);
va_end (args);
gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
{
struct disassemble_info di;
+
init_disassemble_info (&di, file, fprintf_disasm);
di.flavour = bfd_target_unknown_flavour;
di.memory_error_func = dis_asm_memory_error;
represents the number of bits from the end of our starting
byte needed to get to bit 0. */
int excess = FLOATFORMAT_CHAR_BIT - (total_len % FLOATFORMAT_CHAR_BIT);
+
cur_byte = (total_len / FLOATFORMAT_CHAR_BIT)
- ((start + len + excess) / FLOATFORMAT_CHAR_BIT);
cur_bitshift = ((start + len + excess) % FLOATFORMAT_CHAR_BIT)
if (kind == float_infinite || kind == float_nan)
{
double dto;
+
floatformat_to_double (fmt, from, &dto);
*to = (DOUBLEST) dto;
return;
if (fmt->split_half)
{
DOUBLEST dtop, dbot;
+
floatformat_to_doublest (fmt->split_half, ufrom, &dtop);
/* Preserve the sign of 0, which is the sign of the top
half. */
if (order == floatformat_little)
{
int excess = FLOATFORMAT_CHAR_BIT - (total_len % FLOATFORMAT_CHAR_BIT);
+
cur_byte = (total_len / FLOATFORMAT_CHAR_BIT)
- ((start + len + excess) / FLOATFORMAT_CHAR_BIT);
cur_bitshift = ((start + len + excess) % FLOATFORMAT_CHAR_BIT)
the result of converting to double. */
static volatile double dtop, dbot;
DOUBLEST dtopnv, dbotnv;
+
dtop = (double) dfrom;
/* If the rounded top half is Inf, the bottom must be 0 not NaN
or Inf. */
while (mant_bits_left > 0)
{
unsigned long mant_long;
+
mant_bits = mant_bits_left < 32 ? mant_bits_left : 32;
mant *= 4294967296.0;
if (fmt == host_float_format)
{
float val;
+
memcpy (&val, in, sizeof (val));
*out = val;
}
else if (fmt == host_double_format)
{
double val;
+
memcpy (&val, in, sizeof (val));
*out = val;
}
else if (fmt == host_long_double_format)
{
long double val;
+
memcpy (&val, in, sizeof (val));
*out = val;
}
if (fmt == host_float_format)
{
float val = *in;
+
memcpy (out, &val, sizeof (val));
}
else if (fmt == host_double_format)
{
double val = *in;
+
memcpy (out, &val, sizeof (val));
}
else if (fmt == host_long_double_format)
{
long double val = *in;
+
memcpy (out, &val, sizeof (val));
}
else
floatformat_from_length (struct gdbarch *gdbarch, int len)
{
const struct floatformat *format;
+
if (len * TARGET_CHAR_BIT == gdbarch_float_bit (gdbarch))
format = gdbarch_float_format (gdbarch)
[gdbarch_byte_order (gdbarch)];
floatformat_from_type (const struct type *type)
{
struct gdbarch *gdbarch = get_type_arch (type);
+
gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
if (TYPE_FLOATFORMAT (type) != NULL)
return TYPE_FLOATFORMAT (type)[gdbarch_byte_order (gdbarch)];
if (s->flags & SEC_LOAD)
{
int numbytes;
+
bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
bfd_size_type size = bfd_get_section_size (s);
char *section_name = (char *) bfd_get_section_name (abfd, s);
deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct dummy_frame *dummyframe;
+
for (dummyframe = dummy_frame_stack;
dummyframe != NULL;
dummyframe = dummyframe->next)
if (frame_id_eq (dummyframe->id, this_id))
{
struct dummy_frame_cache *cache;
+
cache = FRAME_OBSTACK_ZALLOC (struct dummy_frame_cache);
cache->prev_regcache = get_inferior_thread_state_regcache (dummyframe->caller_state);
cache->this_id = this_id;
{
/* The dummy-frame sniffer always fills in the cache. */
struct dummy_frame_cache *cache = (*this_prologue_cache);
+
gdb_assert (cache != NULL);
(*this_id) = cache->this_id;
}
fprint_dummy_frames (struct ui_file *file)
{
struct dummy_frame *s;
+
for (s = dummy_frame_stack; s != NULL; s = s->next)
{
gdb_print_host_address (s, file);
{
struct cleanup *cleanups;
struct ui_file *file = gdb_fopen (args, "w");
+
if (file == NULL)
perror_with_name (_("maintenance print dummy-frames"));
cleanups = make_cleanup_ui_file_delete (file);
unwinder. */
{
int size = register_size (gdbarch, 0);
+
dwarf2_frame_state_alloc_regs (&fs->regs, 32);
for (reg = 8; reg < 16; reg++)
{
select the FDE of the previous function. */
CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
struct dwarf2_fde *fde = dwarf2_frame_find_fde (&block_addr);
+
if (!fde)
return 0;
dwarf2_frame_base_sniffer (struct frame_info *this_frame)
{
CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
+
if (dwarf2_frame_find_fde (&block_addr))
return &dwarf2_frame_base;
{
ULONGEST value;
gdb_byte *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
+
*bytes_read_ptr += read_uleb128 (buf, end_buf, &value) - buf;
return base + value;
}
{
LONGEST value;
gdb_byte *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
+
*bytes_read_ptr += read_sleb128 (buf, end_buf, &value) - buf;
return base + value;
}
{
CORE_ADDR seek_pc = *(CORE_ADDR *) key;
struct dwarf2_fde *fde = *(struct dwarf2_fde **) element;
+
if (seek_pc < fde->initial_location)
return -1;
if (seek_pc < fde->initial_location + fde->address_range)
new_dwarf_expr_context (void)
{
struct dwarf_expr_context *retval;
+
retval = xcalloc (1, sizeof (struct dwarf_expr_context));
retval->stack_len = 0;
retval->stack_allocated = 10;
if (ctx->stack_len + need > ctx->stack_allocated)
{
size_t newlen = ctx->stack_len + need + 10;
+
ctx->stack = xrealloc (ctx->stack,
newlen * sizeof (struct dwarf_stack_value));
ctx->stack_allocated = newlen;
gdb_byte *op_ptr, gdb_byte *op_end)
{
enum bfd_endian byte_order = gdbarch_byte_order (ctx->gdbarch);
+
ctx->location = DWARF_VALUE_MEMORY;
ctx->initialized = 1; /* Default is initialized. */
case DW_OP_implicit_value:
{
ULONGEST len;
+
op_ptr = read_uleb128 (op_ptr, op_end, &len);
if (op_ptr + len > op_end)
error (_("DW_OP_implicit_value: too few bytes available."));
case DW_OP_deref:
{
gdb_byte *buf = alloca (ctx->addr_size);
+
(ctx->read_mem) (ctx->baton, buf, result, ctx->addr_size);
result = dwarf2_read_address (ctx->gdbarch,
buf, buf + ctx->addr_size,
{
int addr_size = *op_ptr++;
gdb_byte *buf = alloca (addr_size);
+
(ctx->read_mem) (ctx->baton, buf, result, addr_size);
result = dwarf2_read_address (ctx->gdbarch,
buf, buf + addr_size,
else
{
struct dwarf2_locexpr_baton *symbaton;
+
symbaton = SYMBOL_LOCATION_BATON (framefunc);
if (symbaton != NULL)
{
dwarf_expr_frame_cfa (void *baton)
{
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
+
return dwarf2_frame_cfa (debaton->frame);
}
for (i = 0; i < c->n_pieces; i++)
{
struct dwarf_expr_piece *p = &c->pieces[i];
+
switch (p->location)
{
case DWARF_VALUE_REGISTER:
{
struct gdbarch *gdbarch = get_type_arch (value_type (v));
size_t n = p->size;
+
if (n > c->addr_size)
n = c->addr_size;
store_unsigned_integer (contents + offset, n,
case DWARF_VALUE_LITERAL:
{
size_t n = p->size;
+
if (n > p->v.literal.length)
n = p->v.literal.length;
memcpy (contents + offset, p->v.literal.data, n);
for (i = 0; i < c->n_pieces; i++)
{
struct dwarf_expr_piece *p = &c->pieces[i];
+
switch (p->location)
{
case DWARF_VALUE_REGISTER:
struct gdbarch *arch = get_frame_arch (frame);
CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0);
int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, dwarf_regnum);
+
if (gdb_regnum != -1)
retval = value_from_register (type, gdb_regnum, frame);
else
needs_frame_read_reg (void *baton, int regnum)
{
struct needs_frame_baton *nf_baton = baton;
+
nf_baton->needs_frame = 1;
return 1;
}
needs_frame_frame_cfa (void *baton)
{
struct needs_frame_baton *nf_baton = baton;
+
nf_baton->needs_frame = 1;
return 1;
}
needs_frame_tls_address (void *baton, CORE_ADDR offset)
{
struct needs_frame_baton *nf_baton = baton;
+
nf_baton->needs_frame = 1;
return 1;
}
else if (data[0] == DW_OP_regx)
{
ULONGEST reg;
+
data = read_uleb128 (data + 1, end, ®);
loc->kind = axs_lvalue_register;
loc->reg = gdbarch_dwarf2_reg_to_regnum (gdbarch, reg);
{
struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
struct value *val;
+
val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, dlbaton->data,
dlbaton->size, dlbaton->per_cu);
locexpr_read_needs_frame (struct symbol *symbol)
{
struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+
return dwarf2_loc_desc_needs_frame (dlbaton->data, dlbaton->size,
dlbaton->per_cu);
}
data + 1,
data + size - 1,
addr_size);
+
fprintf_filtered (stream,
_("a thread-local variable at offset %s "
"in the thread-local storage for `%s'"),
/* Initialize per-objfile state. */
struct dwarf2_per_objfile *data
= obstack_alloc (&objfile->objfile_obstack, sizeof (*data));
+
memset (data, 0, sizeof (*data));
set_objfile_data (objfile, dwarf2_objfile_data_key, data);
dwarf2_per_objfile = data;
else if (section_is_p (sectp->name, EH_FRAME_SECTION))
{
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
+
if (aflag & SEC_HAS_CONTENTS)
{
dwarf2_per_objfile->eh_frame.asection = sectp;
unsigned int top = (cu_header->offset
+ cu_header->length
+ cu_header->initial_length_size);
+
return (offset >= bottom && offset < top);
}
if (attr)
{
unsigned int line_offset = DW_UNSND (attr);
+
lh = dwarf_decode_line_header (line_offset, abfd, cu);
}
if (lh == NULL)
hash_type_signature (const void *item)
{
const struct signatured_type *type_sig = item;
+
/* This drops the top 32 bits of the signature, but is ok for a hash. */
return type_sig->signature;
}
{
const struct signatured_type *lhs = item_lhs;
const struct signatured_type *rhs = item_rhs;
+
return lhs->signature == rhs->signature;
}
struct dwarf2_per_objfile *dpo_backlink
= objfile_data (pst->objfile->separate_debug_objfile_backlink,
dwarf2_objfile_data_key);
+
dwarf2_per_objfile->has_section_at_zero
= dpo_backlink->has_section_at_zero;
}
if (dwarf2_attr (die, DW_AT_specification, cu))
{
struct dwarf2_cu *spec_cu = cu;
+
return die_needs_namespace (die_specification (die, &spec_cu),
spec_cu);
}
if (*prefix != '\0')
{
char *prefixed_name = typename_concat (NULL, prefix, name, cu);
+
fputs_unfiltered (prefixed_name, buf);
xfree (prefixed_name);
}
char *cname
= dwarf2_canonicalize_name (name, cu,
&cu->objfile->objfile_obstack);
+
if (cname != NULL)
name = cname;
}
if (attr && line_header)
{
unsigned int macro_offset = DW_UNSND (attr);
+
dwarf_decode_macros (line_header, macro_offset,
comp_dir, abfd, cu);
}
but GCC versions at least through 4.4 generate this (GCC PR
40573). */
struct die_info *child_origin_die = child_die;
+
while (1)
{
attr = dwarf2_attr (child_origin_die, DW_AT_abstract_origin, cu);
if (attr)
{
CORE_ADDR high = DW_ADDR (attr);
+
attr = dwarf2_attr (die, DW_AT_low_pc, cu);
if (attr)
{
CORE_ADDR low = DW_ADDR (attr);
+
record_block_range (block, baseaddr + low, baseaddr + high - 1);
}
}
&& DW_BLOCK (attr)->data[0] == DW_OP_deref)
{
struct dwarf_block blk;
+
blk.size = DW_BLOCK (attr)->size - 1;
blk.data = DW_BLOCK (attr)->data + 1;
fnp->voffset = decode_locdesc (&blk, cu);
{
struct dwarf2_cu *type_cu = cu;
struct die_info *type_die = follow_die_ref_or_sig (die, attr, &type_cu);
+
/* We could just recurse on read_structure_type, but we need to call
get_die_type to ensure only one type for this DIE is created.
This is important, for example, because for c++ classes we need
{
struct dwarf2_cu *type_cu = cu;
struct die_info *type_die = follow_die_ref_or_sig (die, attr, &type_cu);
+
type = read_type_die (type_die, type_cu);
return set_die_type (die, type, cu);
}
if (child_die->tag == DW_TAG_subrange_type)
{
struct type *child_type = read_type_die (child_die, cu);
+
if (child_type != NULL)
{
/* The range type was succesfully read. Save it for
if (read_array_order (die, cu) == DW_ORD_col_major)
{
int i = 0;
+
while (i < ndim)
type = create_array_type (NULL, type, range_types[i++]);
}
{
struct die_info *ext_die;
struct dwarf2_cu *ext_cu = cu;
+
ext_die = dwarf2_extension (die, &ext_cu);
type = read_type_die (ext_die, ext_cu);
return set_die_type (die, type, cu);
if (is_anonymous)
{
const char *previous_prefix = determine_prefix (die, cu);
+
cp_add_using_directive (previous_prefix, TYPE_NAME (type), NULL,
NULL, &objfile->objfile_obstack);
}
{
complaint (&symfile_complaints, _("invalid pointer size %d"), byte_size);
}
- else {
- /* Should we also complain about unhandled address classes? */
- }
+ else
+ {
+ /* Should we also complain about unhandled address classes? */
+ }
}
TYPE_LENGTH (type) = byte_size;
if (cu->language == language_java)
{
const char *name = dwarf2_name (child_die, cu);
+
if (name && !strcmp (name, "this"))
TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 1;
}
die_hash (const void *item)
{
const struct die_info *die = item;
+
return die->offset;
}
{
const struct die_info *die_lhs = item_lhs;
const struct die_info *die_rhs = item_rhs;
+
return die_lhs->offset == die_rhs->offset;
}
unsigned int *bytes_read)
{
LONGEST offset = read_offset_1 (abfd, buf, cu_header->offset_size);
+
*bytes_read = cu_header->offset_size;
return offset;
}
for (i = 0; i < lh->num_file_names; i++)
{
char *dir = NULL;
+
fe = &lh->file_names[i];
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
if (attr)
{
int file_index = DW_UNSND (attr);
+
if (cu->line_header == NULL
|| file_index > cu->line_header->num_file_names)
complaint (&symfile_complaints,
else if (file_index > 0)
{
struct file_entry *fe;
+
fe = &cu->line_header->file_names[file_index - 1];
SYMBOL_SYMTAB (sym) = fe->symtab;
}
if (obs == NULL)
{
char *retval = xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
+
strcpy (retval, prefix);
strcat (retval, sep);
strcat (retval, suffix);
else if (! offset_in_cu_p (&cu->header, offset))
{
struct dwarf2_per_cu_data *per_cu;
+
per_cu = dwarf2_find_containing_comp_unit (offset, cu->objfile);
/* If necessary, add it to the queue and load its DIEs. */
record the macro definitions made in the file, even if we
won't be able to find the file by name. */
char fake_name[80];
+
sprintf (fake_name, "<bad macro file number %d>", file);
complaint (&symfile_complaints,
copy_string (const char *buf, int len)
{
char *s = xmalloc (len + 1);
+
memcpy (s, buf, len);
s[len] = '\0';
-
return s;
}
struct dwarf2_per_objfile *per_objfile
= objfile_data (objfile, dwarf2_objfile_data_key);
gdb_byte *info_ptr = per_objfile->info.buffer + per_cu->offset;
-
struct comp_unit_head cu_header;
+
memset (&cu_header, 0, sizeof cu_header);
read_comp_unit_head (&cu_header, info_ptr, objfile->obfd);
return cu_header.addr_size;
while (high > low)
{
int mid = low + (high - low) / 2;
+
if (dwarf2_per_objfile->all_comp_units[mid]->offset >= offset)
high = mid;
else
dwarf2_find_comp_unit (unsigned int offset, struct objfile *objfile)
{
struct dwarf2_per_cu_data *this_cu;
+
this_cu = dwarf2_find_containing_comp_unit (offset, objfile);
if (this_cu->offset != offset)
error (_("no compilation unit with offset %u."), offset);
offset_and_type_hash (const void *item)
{
const struct dwarf2_offset_and_type *ofs = item;
+
return ofs->offset;
}
{
const struct dwarf2_offset_and_type *ofs_lhs = item_lhs;
const struct dwarf2_offset_and_type *ofs_rhs = item_rhs;
+
return ofs_lhs->offset == ofs_rhs->offset;
}
partial_die_hash (const void *item)
{
const struct partial_die_info *part_die = item;
+
return part_die->offset;
}
{
const struct partial_die_info *part_die_lhs = item_lhs;
const struct partial_die_info *part_die_rhs = item_rhs;
+
return part_die_lhs->offset == part_die_rhs->offset;
}
intptr_t begin = (intptr_t) info->buffer;
intptr_t map_begin = begin & ~(pagesize - 1);
size_t map_length = info->size + begin - map_begin;
+
gdb_assert (munmap ((void *) map_begin, map_length) == 0);
#else
/* Without HAVE_MMAP, we should never be here to begin with. */
dwarf2_per_objfile_free (struct objfile *objfile, void *d)
{
struct dwarf2_per_objfile *data = d;
+
munmap_section_buffer (&data->info);
munmap_section_buffer (&data->abbrev);
munmap_section_buffer (&data->line);