From 9ab3e5325dfcddb59b4a081c7c6bc19c5ef88df8 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 10 May 2002 17:03:25 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 18 ++++++++++++++++++ gdb/dwarf2read.c | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b5cd55f9c81..e81d9fa20ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2002-05-10 Jim Blandy + + 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. + 2002-05-10 Petr Sorfa * ia64-tdep.c: Handle breakpoints on L instruction type @@ -182,6 +192,14 @@ 2002-05-06 Jim Blandy + Add first preprocessor macro-expansion files. + * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files. + * Makefile.in (SFILES): Add macrotab.c, macroexp.c. + (splay_tree_h, macroexp_h, macrotab_h): New variable. + (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h. + (COMMON_OBS): Add macrotab.o, macroexp.o. + (macroexp.o, macrotab.o): New rules. + Separate the job of reading the line number info statement program header (...expialidocious) out into its own function. * dwarf2read.c (struct line_head, struct filenames, struct diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5c06e9af75f..b47baefb935 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)); -- 2.30.2