* [PATCH] Remove remnants of partial DIEs from DWARF reader
@ 2024-02-04 19:16 Tom Tromey
2024-02-05 4:22 ` Tom de Vries
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2024-02-04 19:16 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
When rewriting the DWARF scanner, I forgot to remove
dwarf2_cu::load_all_dies and dwarf2_cu::partial_dies. This patch
corrects the oversight and fixes up a couple other spots that mention
partial DIEs, which no longer exist.
---
gdb/dwarf2/cu.c | 3 +--
gdb/dwarf2/cu.h | 14 ++------------
gdb/dwarf2/read.c | 5 ++---
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
index a1675b0d313..ae46dd2a9b2 100644
--- a/gdb/dwarf2/cu.c
+++ b/gdb/dwarf2/cu.c
@@ -42,8 +42,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu,
producer_is_clang (false),
producer_is_gas_lt_2_38 (false),
producer_is_gas_2_39 (false),
- processing_has_namespace_info (false),
- load_all_dies (false)
+ processing_has_namespace_info (false)
{
}
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index d14397380de..ad89228ef8d 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -136,12 +136,8 @@ struct dwarf2_cu
distinguish these in buildsym.c. */
struct pending **list_in_scope = nullptr;
- /* Hash table holding all the loaded partial DIEs
- with partial_die->offset.SECT_OFF as hash. */
- htab_t partial_dies = nullptr;
-
- /* Storage for things with the same lifetime as this read-in compilation
- unit, including partial DIEs. */
+ /* Storage for things with the same lifetime as this read-in
+ compilation unit. */
auto_obstack comp_unit_obstack;
/* Backlink to our per_cu entry. */
@@ -274,12 +270,6 @@ struct dwarf2_cu
bool processing_has_namespace_info : 1;
- /* This flag will be set when reading partial DIEs if we need to load
- absolutely all DIEs for this compilation unit, instead of just the ones
- we think are interesting. It gets set if we look for a DIE in the
- hash table and don't find it. */
- bool load_all_dies : 1;
-
/* Get the buildsym_compunit for this CU. */
buildsym_compunit *get_builder ();
};
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e873d9cc440..c92554c929d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -25,8 +25,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* FIXME: Various die-reading functions need to be more careful with
- reading off the end of the section.
- E.g., load_partial_dies, read_partial_die. */
+ reading off the end of the section. */
#include "defs.h"
#include "dwarf2/read.h"
@@ -21490,7 +21489,7 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off,
if (this_cu->is_dwz != offset_in_dwz || this_cu->sect_off > sect_off)
{
if (low == 0 || this_cu->is_dwz != offset_in_dwz)
- error (_("Dwarf Error: could not find partial DIE containing "
+ error (_("Dwarf Error: could not find CU containing "
"offset %s [in module %s]"),
sect_offset_str (sect_off),
bfd_get_filename (per_bfd->obfd));
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove remnants of partial DIEs from DWARF reader
2024-02-04 19:16 [PATCH] Remove remnants of partial DIEs from DWARF reader Tom Tromey
@ 2024-02-05 4:22 ` Tom de Vries
0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2024-02-05 4:22 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 2/4/24 20:16, Tom Tromey wrote:
> When rewriting the DWARF scanner, I forgot to remove
> dwarf2_cu::load_all_dies and dwarf2_cu::partial_dies. This patch
> corrects the oversight and fixes up a couple other spots that mention
> partial DIEs, which no longer exist.
LGTM.
Approved-By: Tom de Vries <tdevries@suse.de>
Thanks,
- Tom
> ---
> gdb/dwarf2/cu.c | 3 +--
> gdb/dwarf2/cu.h | 14 ++------------
> gdb/dwarf2/read.c | 5 ++---
> 3 files changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
> index a1675b0d313..ae46dd2a9b2 100644
> --- a/gdb/dwarf2/cu.c
> +++ b/gdb/dwarf2/cu.c
> @@ -42,8 +42,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu,
> producer_is_clang (false),
> producer_is_gas_lt_2_38 (false),
> producer_is_gas_2_39 (false),
> - processing_has_namespace_info (false),
> - load_all_dies (false)
> + processing_has_namespace_info (false)
> {
> }
>
> diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
> index d14397380de..ad89228ef8d 100644
> --- a/gdb/dwarf2/cu.h
> +++ b/gdb/dwarf2/cu.h
> @@ -136,12 +136,8 @@ struct dwarf2_cu
> distinguish these in buildsym.c. */
> struct pending **list_in_scope = nullptr;
>
> - /* Hash table holding all the loaded partial DIEs
> - with partial_die->offset.SECT_OFF as hash. */
> - htab_t partial_dies = nullptr;
> -
> - /* Storage for things with the same lifetime as this read-in compilation
> - unit, including partial DIEs. */
> + /* Storage for things with the same lifetime as this read-in
> + compilation unit. */
> auto_obstack comp_unit_obstack;
>
> /* Backlink to our per_cu entry. */
> @@ -274,12 +270,6 @@ struct dwarf2_cu
>
> bool processing_has_namespace_info : 1;
>
> - /* This flag will be set when reading partial DIEs if we need to load
> - absolutely all DIEs for this compilation unit, instead of just the ones
> - we think are interesting. It gets set if we look for a DIE in the
> - hash table and don't find it. */
> - bool load_all_dies : 1;
> -
> /* Get the buildsym_compunit for this CU. */
> buildsym_compunit *get_builder ();
> };
> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
> index e873d9cc440..c92554c929d 100644
> --- a/gdb/dwarf2/read.c
> +++ b/gdb/dwarf2/read.c
> @@ -25,8 +25,7 @@
> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>
> /* FIXME: Various die-reading functions need to be more careful with
> - reading off the end of the section.
> - E.g., load_partial_dies, read_partial_die. */
> + reading off the end of the section. */
>
> #include "defs.h"
> #include "dwarf2/read.h"
> @@ -21490,7 +21489,7 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off,
> if (this_cu->is_dwz != offset_in_dwz || this_cu->sect_off > sect_off)
> {
> if (low == 0 || this_cu->is_dwz != offset_in_dwz)
> - error (_("Dwarf Error: could not find partial DIE containing "
> + error (_("Dwarf Error: could not find CU containing "
> "offset %s [in module %s]"),
> sect_offset_str (sect_off),
> bfd_get_filename (per_bfd->obfd));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-05 4:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 19:16 [PATCH] Remove remnants of partial DIEs from DWARF reader Tom Tromey
2024-02-05 4:22 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).