aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorGuinevere Larsen <guinevere@redhat.com>2024-09-06 14:47:44 -0300
committerGuinevere Larsen <guinevere@redhat.com>2024-09-20 17:01:35 -0300
commit890f0ceb616bf64caee9d09c7b14159f19fd7111 (patch)
tree1c31ade60beb57f90326cef7978fad25c1aec893 /gdb/python
parentb0170acd5a9e834e2b37ff151fa817e9a7a1412a (diff)
downloadbinutils-890f0ceb616bf64caee9d09c7b14159f19fd7111.zip
binutils-890f0ceb616bf64caee9d09c7b14159f19fd7111.tar.gz
binutils-890f0ceb616bf64caee9d09c7b14159f19fd7111.tar.bz2
gdb: Make dbxread rely less on global variables
The file dbxread.c, which is responsible for reading stabs information for multiple file formats, relies heavily on setting and using global variables over the course of reading symbols. Future patches aim to make stabs reading more file format independent, and this patch starts that change by introducing a stabs_context struct, that will hold all the relevant variables. This context struct is saved on the registry key inside the objfile being read. Some of those global variables have been deemed irrelevant: * dbxread_objfile - Since we're saving in an objfile, this is redundant * symfile_bfd - It is trivial to get the bfd pointer from the objfile, so also unnecessary * string_table_offset - was never initialized, just used to set a value. That usage was substituted by a hardcoded 0 * next_file_string_table_offset - was only used by read_dbx_symtab, so it was turned into a local variable there. As I was moving variables, I also couldn't think of a good reason for the bincl_list to be a pointer, so it was changed to just be an std::vector. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions