public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v4 7/8] Relocate block range start and end addresses
Date: Wed, 22 Aug 2018 17:19:00 -0000	[thread overview]
Message-ID: <20180822101859.2757662a@pinnacle.lan> (raw)
In-Reply-To: <20180822095721.3e298051@pinnacle.lan>

gdb/ChangeLog:
    
    	* objfiles.c (objfile_relocate1): Relocate start and end addresses
    	for each range in a block.
---
 gdb/objfiles.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index df28da5..4bffd20 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -831,6 +831,14 @@ objfile_relocate1 (struct objfile *objfile,
 	  BLOCK_START (b) += ANOFFSET (delta, block_line_section);
 	  BLOCK_END (b) += ANOFFSET (delta, block_line_section);
 
+	  if (BLOCK_RANGES (b) != nullptr)
+	    for (int j = 0; j < BLOCK_NRANGES (b); j++)
+	      {
+		BLOCK_RANGE_START (b, j)
+		  += ANOFFSET (delta, block_line_section);
+		BLOCK_RANGE_END (b, j) += ANOFFSET (delta, block_line_section);
+	      }
+
 	  /* We only want to iterate over the local symbols, not any
 	     symbols in included symtabs.  */
 	  ALL_DICT_SYMBOLS (BLOCK_DICT (b), iter, sym)

  parent reply	other threads:[~2018-08-22 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 16:57 [PATCH v4 0/8] Non-contiguous address range support Kevin Buettner
2018-08-22 17:07 ` [PATCH v4 1/8] Add block range data structure for blocks with non-contiguous address ranges Kevin Buettner
2018-08-22 17:09 ` [PATCH v4 2/8] Record explicit block ranges from dwarf2read.c Kevin Buettner
2018-08-22 17:11 ` [PATCH v4 3/8] Add support for non-contiguous blocks to find_pc_partial_function Kevin Buettner
2018-08-22 17:14 ` [PATCH v4 4/8] Disassemble blocks with non-contiguous ranges Kevin Buettner
2018-08-22 17:16 ` [PATCH v4 5/8] Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START Kevin Buettner
2018-08-22 17:18 ` [PATCH v4 6/8] Introduce find_function_entry_range_from_pc and use it in infrun.c Kevin Buettner
2018-08-22 17:19 ` Kevin Buettner [this message]
2018-08-22 17:20 ` [PATCH v4 8/8] Test case for functions with non-contiguous ranges Kevin Buettner
2018-08-22 18:22 ` [PATCH v4 0/8] Non-contiguous address range support Simon Marchi
2018-08-23 16:16   ` Pedro Alves
2018-08-23 23:31 ` Kevin Buettner

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=20180822101859.2757662a@pinnacle.lan \
    --to=kevinb@redhat.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).