Lines Matching refs:stash
138 alloc_dwarf1_unit (struct dwarf1_debug* stash) in alloc_dwarf1_unit() argument
142 struct dwarf1_unit* x = bfd_zalloc (stash->abfd, amt); in alloc_dwarf1_unit()
143 x->prev = stash->lastUnit; in alloc_dwarf1_unit()
144 stash->lastUnit = x; in alloc_dwarf1_unit()
153 alloc_dwarf1_func (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) in alloc_dwarf1_func() argument
157 struct dwarf1_func* x = bfd_zalloc (stash->abfd, amt); in alloc_dwarf1_func()
258 parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) in parse_line_table() argument
263 if (stash->line_section == 0) in parse_line_table()
268 msec = bfd_get_section_by_name (stash->abfd, ".line"); in parse_line_table()
273 stash->line_section = bfd_alloc (stash->abfd, size); in parse_line_table()
275 if (! stash->line_section) in parse_line_table()
278 if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section, in parse_line_table()
281 stash->line_section = 0; in parse_line_table()
285 stash->line_section_end = stash->line_section + size; in parse_line_table()
288 xptr = stash->line_section + aUnit->stmt_list_offset; in parse_line_table()
289 if (xptr < stash->line_section_end) in parse_line_table()
297 tblend = bfd_get_32 (stash->abfd, (bfd_byte *) xptr) + xptr; in parse_line_table()
301 base = bfd_get_32 (stash->abfd, (bfd_byte *) xptr); in parse_line_table()
310 aUnit->linenumber_table = bfd_alloc (stash->abfd, amt); in parse_line_table()
316 = bfd_get_32 (stash->abfd, (bfd_byte *) xptr); in parse_line_table()
324 = base + bfd_get_32 (stash->abfd, (bfd_byte *) xptr); in parse_line_table()
338 parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) in parse_functions_in_unit() argument
344 eachDie < stash->debug_section_end; in parse_functions_in_unit()
349 if (! parse_die (stash->abfd, &eachDieInfo, eachDie, in parse_functions_in_unit()
350 stash->debug_section_end)) in parse_functions_in_unit()
358 struct dwarf1_func* aFunc = alloc_dwarf1_func (stash,aUnit); in parse_functions_in_unit()
367 eachDie = stash->debug_section + eachDieInfo.sibling; in parse_functions_in_unit()
379 dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, in dwarf1_unit_find_nearest_line() argument
398 if (! parse_line_table (stash, aUnit)) in dwarf1_unit_find_nearest_line()
404 if (! parse_functions_in_unit (stash, aUnit)) in dwarf1_unit_find_nearest_line()
450 struct dwarf1_debug *stash = elf_tdata (abfd)->dwarf1_find_line_info; in _bfd_dwarf1_find_nearest_line() local
461 if (! stash) in _bfd_dwarf1_find_nearest_line()
466 stash = elf_tdata (abfd)->dwarf1_find_line_info in _bfd_dwarf1_find_nearest_line()
469 if (! stash) in _bfd_dwarf1_find_nearest_line()
480 stash->debug_section = bfd_alloc (abfd, size); in _bfd_dwarf1_find_nearest_line()
482 if (! stash->debug_section) in _bfd_dwarf1_find_nearest_line()
485 if (! bfd_get_section_contents (abfd, msec, stash->debug_section, in _bfd_dwarf1_find_nearest_line()
488 stash->debug_section = 0; in _bfd_dwarf1_find_nearest_line()
492 stash->debug_section_end = stash->debug_section + size; in _bfd_dwarf1_find_nearest_line()
493 stash->currentDie = stash->debug_section; in _bfd_dwarf1_find_nearest_line()
494 stash->abfd = abfd; in _bfd_dwarf1_find_nearest_line()
500 if (! stash->debug_section) in _bfd_dwarf1_find_nearest_line()
505 for (eachUnit = stash->lastUnit; eachUnit; eachUnit = eachUnit->prev) in _bfd_dwarf1_find_nearest_line()
507 return dwarf1_unit_find_nearest_line (stash, eachUnit, addr, in _bfd_dwarf1_find_nearest_line()
512 while (stash->currentDie < stash->debug_section_end) in _bfd_dwarf1_find_nearest_line()
516 if (! parse_die (stash->abfd, &aDieInfo, stash->currentDie, in _bfd_dwarf1_find_nearest_line()
517 stash->debug_section_end)) in _bfd_dwarf1_find_nearest_line()
523 = alloc_dwarf1_unit (stash); in _bfd_dwarf1_find_nearest_line()
534 && stash->currentDie + aDieInfo.length in _bfd_dwarf1_find_nearest_line()
535 < stash->debug_section_end in _bfd_dwarf1_find_nearest_line()
536 && stash->currentDie + aDieInfo.length in _bfd_dwarf1_find_nearest_line()
537 != stash->debug_section + aDieInfo.sibling) in _bfd_dwarf1_find_nearest_line()
538 aUnit->first_child = stash->currentDie + aDieInfo.length; in _bfd_dwarf1_find_nearest_line()
543 return dwarf1_unit_find_nearest_line (stash, aUnit, addr, in _bfd_dwarf1_find_nearest_line()
550 stash->currentDie = stash->debug_section + aDieInfo.sibling; in _bfd_dwarf1_find_nearest_line()
552 stash->currentDie += aDieInfo.length; in _bfd_dwarf1_find_nearest_line()