aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-03-06 10:42:36 +1030
committerAlan Modra <amodra@gmail.com>2023-03-06 10:42:36 +1030
commite3f450f3933ddb9ca4ef405722706f3c793d295e (patch)
tree4d3febd0a61336384972fe415f386e9741b661fd /gdb/python
parenta734d906cc0e0d3f32705e67b72e7113c69890d6 (diff)
downloadbinutils-e3f450f3933ddb9ca4ef405722706f3c793d295e.zip
binutils-e3f450f3933ddb9ca4ef405722706f3c793d295e.tar.gz
binutils-e3f450f3933ddb9ca4ef405722706f3c793d295e.tar.bz2
Move nm.c cached line number info to bfd usrdata
Replace the static variables used by nm to cache line number info with a struct attached to the bfd. Cleaner, and it avoids any concern that lineno_cache_bfd is somehow left pointing at memory for a closed bfd and that memory is later reused for another bfd, not that I think this is possible. Also don't bomb via bfd_fatal on errors getting the line number info, just omit the line numbers. * nm.c (struct lineno_cache): Rename from get_relocs_info. Add symcount. (lineno_cache_bfd, lineno_cache_rel_bfd): Delete. (get_relocs): Adjust for struct rename. Don't call bfd_fatal on errors. (free_lineno_cache): New function. (print_symbol): Use lineno_cache in place of statics. Don't call bfd_fatal on errors reading symbols, just omit the line info. (display_archive, display_file): Call free_lineno_cache.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions