[binutils-gdb] gdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attributes

Simon Marchi via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=27ffb36fa481aee08b1c6c08cfdaaa9a94b794d3

commit 27ffb36fa481aee08b1c6c08cfdaaa9a94b794d3
Author: Simon Marchi <[email protected]>
Date:   Thu Mar 12 12:32:02 2026 -0400

    gdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attributes
    
    It's not necessary to pass pointers to those variables
    (dwarf2_ranges_read checks then for nullptr), and they are not used.
    Remove them.
    
    Change-Id: Id5462d481f209e9546380f52ddeea2eea811f5f3
    Approved-By: Tom de Vries <[email protected]>

Diff:
---
 gdb/dwarf2/cooked-indexer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/dwarf2/cooked-indexer.c b/gdb/dwarf2/cooked-indexer.c
index 40f62de80eb..1848b92e2ca 100644
--- a/gdb/dwarf2/cooked-indexer.c
+++ b/gdb/dwarf2/cooked-indexer.c
@@ -275,8 +275,8 @@ cooked_indexer::scan_attributes (dwarf2_per_cu *scanning_per_cu,
 		 want to add this value.  */
 	      ranges_offset += reader->cu ()->gnu_ranges_base;
 
-	      unrelocated_addr lowpc, highpc;
-	      dwarf2_ranges_read (ranges_offset, &lowpc, &highpc, reader->cu (),
+	      dwarf2_ranges_read (ranges_offset, nullptr, nullptr,
+				  reader->cu (),
 				  m_index_storage->get_addrmap (),
 				  scanning_per_cu, abbrev->tag);
 	    }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.