Lines Matching refs:stash

242   struct dwarf2_debug *stash;
597 struct dwarf2_debug *stash = unit->stash;
607 if (! read_section (unit->abfd, debug_str, stash->syms, offset,
608 &stash->dwarf_str_buffer, &stash->dwarf_str_size))
611 str = (char *) stash->dwarf_str_buffer + offset;
680 read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
689 if (! read_section (abfd, debug_abbrev, stash->syms, offset,
690 &stash->dwarf_abbrev_buffer, &stash->dwarf_abbrev_size))
698 abbrev_ptr = stash->dwarf_abbrev_buffer + offset;
773 if ((unsigned int) (abbrev_ptr - stash->dwarf_abbrev_buffer)
774 >= stash->dwarf_abbrev_size)
1385 decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
1397 if (! read_section (abfd, debug_line, stash->syms, unit->line_offset,
1398 &stash->dwarf_line_buffer, &stash->dwarf_line_size))
1419 line_ptr = stash->dwarf_line_buffer + unit->line_offset;
1811 struct dwarf2_debug *stash = unit->stash;
1812 return read_section (unit->abfd, debug_ranges, stash->syms, 0,
1813 &stash->dwarf_ranges_buffer, &stash->dwarf_ranges_size);
2021 if (! unit->stash->dwarf_ranges_buffer)
2026 ranges_ptr = unit->stash->dwarf_ranges_buffer + offset;
2311 parse_comp_unit (struct dwarf2_debug *stash,
2324 bfd_byte *info_ptr = stash->info_ptr;
2329 bfd *abfd = stash->bfd_ptr;
2366 abbrevs = read_abbrevs (abfd, abbrev_offset, stash);
2399 unit->stash = stash;
2401 unit->sec_info_ptr = stash->sec_info_ptr;
2509 struct dwarf2_debug *stash)
2526 unit->line_table = decode_line_info (unit, stash);
2546 stash->inliner_chain = function;
2559 struct dwarf2_debug *stash)
2572 unit->line_table = decode_line_info (unit, stash);
2605 struct dwarf2_debug *stash)
2607 if (!comp_unit_maybe_decode_line_info (unit, stash))
2655 comp_unit_hash_info (struct dwarf2_debug *stash,
2664 BFD_ASSERT (stash->info_hash_status != STASH_INFO_HASH_DISABLED);
2666 if (!comp_unit_maybe_decode_line_info (unit, stash))
2685 info in the stash. */
2705 info in the stash. */
2755 unset_sections (struct dwarf2_debug *stash)
2760 i = stash->adjusted_section_count;
2761 p = stash->adjusted_sections;
2770 place_sections (bfd *abfd, struct dwarf2_debug *stash)
2775 if (stash->adjusted_section_count != 0)
2777 i = stash->adjusted_section_count;
2778 p = stash->adjusted_sections;
2822 stash->adjusted_sections = p;
2823 stash->adjusted_section_count = i;
2970 stash_maybe_update_info_hash_tables (struct dwarf2_debug *stash)
2975 if (stash->all_comp_units == stash->hash_units_head)
2978 if (stash->hash_units_head)
2979 each = stash->hash_units_head->prev_unit;
2981 each = stash->last_comp_unit;
2985 if (!comp_unit_hash_info (stash, each, stash->funcinfo_hash_table,
2986 stash->varinfo_hash_table))
2988 stash->info_hash_status = STASH_INFO_HASH_DISABLED;
2994 stash->hash_units_head = stash->all_comp_units;
3001 stash_verify_info_hash_table (struct dwarf2_debug *stash)
3009 for (each_unit = stash->all_comp_units;
3019 node = lookup_info_hash_table (stash->funcinfo_hash_table,
3037 node = lookup_info_hash_table (stash->varinfo_hash_table,
3057 stash_maybe_enable_info_hash_tables (bfd *abfd, struct dwarf2_debug *stash)
3059 BFD_ASSERT (stash->info_hash_status == STASH_INFO_HASH_OFF);
3061 if (stash->info_hash_count++ < STASH_INFO_HASH_TRIGGER)
3068 stash->funcinfo_hash_table = create_info_hash_table (abfd);
3069 stash->varinfo_hash_table = create_info_hash_table (abfd);
3070 if (!stash->funcinfo_hash_table || !stash->varinfo_hash_table)
3073 stash->info_hash_status = STASH_INFO_HASH_DISABLED;
3079 stash_maybe_update_info_hash_tables (stash);
3080 stash->info_hash_status = STASH_INFO_HASH_ON;
3084 info hash tables of a stash. If there is a match, the function returns
3089 stash_find_line_fast (struct dwarf2_debug *stash,
3095 BFD_ASSERT (stash->info_hash_status == STASH_INFO_HASH_ON);
3098 return info_hash_lookup_funcinfo (stash->funcinfo_hash_table, sym, addr,
3100 return info_hash_lookup_varinfo (stash->varinfo_hash_table, sym, addr,
3135 struct dwarf2_debug *stash;
3142 stash = (struct dwarf2_debug *) *pinfo;
3144 if (! stash)
3148 stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt);
3149 if (! stash)
3157 if (! place_sections (abfd, stash))
3192 *pinfo = stash;
3201 Note that at this point the stash has been allocated, but
3224 large stash. We do this in two passes - in the first pass we
3227 reallocing the data as we add sections to the stash.) If
3236 &stash->info_ptr_memory, &total_size))
3245 stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
3246 if (stash->info_ptr_memory == NULL)
3261 (debug_bfd, msec, stash->info_ptr_memory + total_size,
3269 stash->info_ptr = stash->info_ptr_memory;
3270 stash->info_ptr_end = stash->info_ptr + total_size;
3271 stash->sec = find_debug_info (debug_bfd, NULL);
3272 stash->sec_info_ptr = stash->info_ptr;
3273 stash->syms = symbols;
3274 stash->bfd_ptr = debug_bfd;
3278 (or that an error occured while setting up the stash). */
3279 if (! stash->info_ptr)
3282 stash->inliner_chain = NULL;
3290 if (stash->info_hash_status == STASH_INFO_HASH_OFF)
3291 stash_maybe_enable_info_hash_tables (abfd, stash);
3295 if (stash->info_hash_status == STASH_INFO_HASH_ON)
3296 stash_maybe_update_info_hash_tables (stash);
3298 if (stash->info_hash_status == STASH_INFO_HASH_ON)
3300 found = stash_find_line_fast (stash, symbol, addr, filename_ptr,
3308 for (each = stash->all_comp_units; each; each = each->next_unit)
3313 linenumber_ptr, stash);
3321 for (each = stash->all_comp_units; each; each = each->next_unit)
3328 stash));
3342 while (stash->info_ptr < stash->info_ptr_end)
3346 bfd_byte *info_ptr_unit = stash->info_ptr;
3348 length = read_4_bytes (stash->bfd_ptr, stash->info_ptr);
3354 length = read_8_bytes (stash->bfd_ptr, stash->info_ptr + 4);
3355 stash->info_ptr += 12;
3363 length = read_4_bytes (stash->bfd_ptr, stash->info_ptr + 4);
3364 stash->info_ptr += 8;
3378 stash->info_ptr += 4;
3381 stash->info_ptr += 4;
3385 each = parse_comp_unit (stash, length, info_ptr_unit,
3391 stash->info_ptr += length;
3393 if (stash->all_comp_units)
3394 stash->all_comp_units->prev_unit = each;
3396 stash->last_comp_unit = each;
3398 each->next_unit = stash->all_comp_units;
3399 stash->all_comp_units = each;
3413 stash));
3421 stash));
3423 if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
3424 == stash->sec->size)
3426 stash->sec = find_debug_info (stash->bfd_ptr, stash->sec);
3427 stash->sec_info_ptr = stash->info_ptr;
3437 unset_sections (stash);
3485 struct dwarf2_debug *stash;
3487 stash = (struct dwarf2_debug *) *pinfo;
3488 if (stash)
3490 struct funcinfo *func = stash->inliner_chain;
3497 stash->inliner_chain = func->caller_func;
3509 struct dwarf2_debug *stash;
3514 stash = (struct dwarf2_debug *) elf_tdata (abfd)->dwarf2_find_line_info;
3516 if (stash == NULL)
3519 for (each = stash->all_comp_units; each; each = each->next_unit)
3571 if (stash->dwarf_abbrev_buffer)
3572 free (stash->dwarf_abbrev_buffer);
3573 if (stash->dwarf_line_buffer)
3574 free (stash->dwarf_line_buffer);
3575 if (stash->dwarf_str_buffer)
3576 free (stash->dwarf_str_buffer);
3577 if (stash->dwarf_ranges_buffer)
3578 free (stash->dwarf_ranges_buffer);
3579 if (stash->info_ptr_memory)
3580 free (stash->info_ptr_memory);