aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-26 15:41:07 -0700
committerTom Tromey <tom@tromey.com>2020-02-26 15:49:50 -0700
commitb83470bfa7ca200b1c99caac5f6d56bffe0261d0 (patch)
tree9fed46954796dca3bd59b98c97c7da205010cbe1 /bfd/bfd-in2.h
parentedfe0a0c6561cf838f3f885c22940025a826d900 (diff)
downloadgdb-b83470bfa7ca200b1c99caac5f6d56bffe0261d0.zip
gdb-b83470bfa7ca200b1c99caac5f6d56bffe0261d0.tar.gz
gdb-b83470bfa7ca200b1c99caac5f6d56bffe0261d0.tar.bz2
Specialize partial_symtab for DWARF include files
Include files are represented by a partial symtab, but don't expand to anything. From dwarf2_psymtab::expand_psymtab: if (per_cu == NULL) { /* It's an include file, no symbols to read for it. Everything is in the parent symtab. */ readin = true; return; } This patch introduces a new specialization of partial_symtab to handle this case. In addition to being slightly smaller, I believe an include file is the only situation where a DWARF psymtab can result in a null compunit_symtab. This adds an assert to that effect as well. This change will simplify one of the psymtab sharing patches. gdb/ChangeLog 2020-02-26 Tom Tromey <tom@tromey.com> * dwarf2/read.c (struct dwarf2_include_psymtab): New. (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab. (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p) (dwarf2_psymtab::get_compunit_symtab): Remove null checks for per_cu_data.
Diffstat (limited to 'bfd/bfd-in2.h')
0 files changed, 0 insertions, 0 deletions