diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-05-10 17:03:25 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-05-10 17:03:25 +0000 |
commit | 9ab3e5325dfcddb59b4a081c7c6bc19c5ef88df8 (patch) | |
tree | 52e33cfe84e23e2365f0766ceeaaf72bfd7e49fb /gdb/dwarf2read.c | |
parent | 126fa72d9cd55419f87e547f5c6c17c91b28580b (diff) | |
download | gdb-9ab3e5325dfcddb59b4a081c7c6bc19c5ef88df8.zip gdb-9ab3e5325dfcddb59b4a081c7c6bc19c5ef88df8.tar.gz gdb-9ab3e5325dfcddb59b4a081c7c6bc19c5ef88df8.tar.bz2 |
Properly track the size of the current objfile's .debug_line section.
* dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
(DWARF_LINE_SIZE): New macro.
(dwarf2_build_psymtabs_hard): Record the line section's size in
the partial symbol table.
(psymtab_to_symtab_1): Restore dwarf_line_size from the partial
symbol table.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5c06e9a..b47baef 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -432,6 +432,10 @@ struct dwarf2_pinfo char *dwarf_line_buffer; + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + /* Pointer to start of dwarf string buffer for the objfile. */ char *dwarf_str_buffer; @@ -447,6 +451,7 @@ struct dwarf2_pinfo #define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) #define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) #define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) #define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) #define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) @@ -1166,6 +1171,7 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; DWARF_STR_BUFFER (pst) = dwarf_str_buffer; DWARF_STR_SIZE (pst) = dwarf_str_size; baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); @@ -1467,6 +1473,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst) dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); dwarf_str_buffer = DWARF_STR_BUFFER (pst); dwarf_str_size = DWARF_STR_SIZE (pst); baseaddr = ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (objfile)); |