Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: simon.marchi@polymtl.ca
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 1/2] gdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attributes
Date: Thu, 12 Mar 2026 12:32:02 -0400	[thread overview]
Message-ID: <20260312163213.2650909-1-simon.marchi@polymtl.ca> (raw)

From: Simon Marchi <simon.marchi@polymtl.ca>

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
---
 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 40f62de80eb4..1848b92e2cab 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);
 	    }

base-commit: 1fa846a3d49aa9025359c749965c64e1997d5a25
-- 
2.53.0


             reply	other threads:[~2026-03-12 16:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 16:32 simon.marchi [this message]
2026-03-12 16:32 ` [PATCH 2/2] gdb/dwarf: rename low_set variable in dwarf2_ranges_read simon.marchi
2026-03-12 16:51   ` Tom de Vries
2026-03-12 16:45 ` [PATCH 1/2] gdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attributes Tom de Vries
2026-03-14 17:35   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260312163213.2650909-1-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox