Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix toplevel types with -fdebug-types-section
@ 2020-01-18 18:59 Mark Williams
  2020-01-19  2:04 ` Simon Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Williams @ 2020-01-18 18:59 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

Per https://sourceware.org/bugzilla/show_bug.cgi?id=24480 toplevel
types were broken by
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=93b8bea4143cafae79076076c64aaa4c46a9b73c
because it only set list_in_scope in start_sym_tab. With type-units,
It also needs to be set when re-opening a symtab.

Mark

[-- Attachment #2: 0001-gdb-Fix-toplevel-types-with-fdebug-types-section.patch --]
[-- Type: application/octet-stream, Size: 1285 bytes --]

From 87fd17d7cc15fc0e49c4afe30edb2faf8f2b83a9 Mon Sep 17 00:00:00 2001
From: mwilliams <mwilliams@fb.com>
Date: Wed, 15 Jan 2020 20:19:39 -0800
Subject: [PATCH] gdb: Fix toplevel types with -fdebug-types-section

When debugging a program compiled with -fdebug-types-section,
only the first top-level type in each file is visible to gdb.

gdb/Changelog
2020-01-18 Mark Williams <mark@myosotissp.com>

	PR gdb/24480
	* dwarf2read.c add missing assingments to list_in_scope when
	start_symtab was already called.
---
 gdb/dwarf2read.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index d1b65b7bc3..c8f0d27f91 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -11762,6 +11762,7 @@ dwarf2_cu::setup_type_unit_groups (struct die_info *die)
 			    COMPUNIT_DIRNAME (cust),
 			    compunit_language (cust),
 			    0, cust));
+	  list_in_scope = get_builder ()->get_file_symbols ();
 	}
       return;
     }
@@ -11813,6 +11814,7 @@ dwarf2_cu::setup_type_unit_groups (struct die_info *die)
 			COMPUNIT_DIRNAME (cust),
 			compunit_language (cust),
 			0, cust));
+      list_in_scope = get_builder ()->get_file_symbols ();
 
       auto &file_names = line_header->file_names ();
       for (i = 0; i < file_names.size (); ++i)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-21 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 18:59 [PATCH] Fix toplevel types with -fdebug-types-section Mark Williams
2020-01-19  2:04 ` Simon Marchi
2020-01-19  2:10   ` Simon Marchi
2020-01-19 16:31     ` Mark Williams
2020-01-19 16:40       ` Simon Marchi
2020-01-21 19:56       ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox