public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] gdb/dwarf: fix call to dwarf2_queue_guard in dw2_do_instantiate_symtab
@ 2020-11-12 22:44 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2020-11-12 22:44 UTC (permalink / raw)
  To: gdb-patches

It took me a while to understand why that would even compile: it looks
like we pass a type name as a pointer, that makes no sense.  By looking
at the DWARF, I understood that the compiler actually interprets it as a
function declaration.  So the statement was doing nothing, no
dwarf2_queue_guard was instantiated.  Fix it by passing the right
variable name.

gdb/ChangeLog:

	* dwarf2/read.c (dw2_do_instantiate_symtab): Fix call to
	dwarf2_queue_guard.

Change-Id: I3a7bdead9e8c39f8342a471f10181b85b8f0d801
---
 gdb/ChangeLog     | 5 +++++
 gdb/dwarf2/read.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b7e8f1f46240..abcd02bd170e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* dwarf2/read.c (dw2_do_instantiate_symtab): Fix call to
+	dwarf2_queue_guard.
+
 2020-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* dwarf2/read.c (dw2_do_instantiate_symtab): Fix typo in
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 5c3849bd43ea..1b43fc8cdcde 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -2435,7 +2435,7 @@ dw2_do_instantiate_symtab (dwarf2_per_cu_data *per_cu,
   /* The destructor of dwarf2_queue_guard frees any entries left on
      the queue.  After this point we're guaranteed to leave this function
      with the dwarf queue empty.  */
-  dwarf2_queue_guard q_guard (dwarf2_per_objfile);
+  dwarf2_queue_guard q_guard (per_objfile);
 
   if (!per_objfile->symtab_set_p (per_cu))
     {
-- 
2.29.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-12 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 22:44 [pushed] gdb/dwarf: fix call to dwarf2_queue_guard in dw2_do_instantiate_symtab Simon Marchi

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).