]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: fix call to dwarf2_queue_guard in dw2_do_instantiate_symtab
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 12 Nov 2020 22:42:55 +0000 (17:42 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 12 Nov 2020 22:43:39 +0000 (17:43 -0500)
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
gdb/dwarf2/read.c

index b7e8f1f462408988be1e0a814551d3bf97b077ec..abcd02bd170efb650dee1845318645da3e454674 100644 (file)
@@ -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
index 5c3849bd43ea9117b613d20ec409ffc22721d0ce..1b43fc8cdcdeae47077957df5cf24fcee9da664d 100644 (file)
@@ -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))
     {