Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org,  Kevin Buettner <kevinb@redhat.com>
Subject: Re: [PATCH][gdb] Fix gdb.dwarf2/varval.exp with -fPIE/-pie
Date: Thu, 08 Aug 2019 17:16:00 -0000	[thread overview]
Message-ID: <87h86r60hv.fsf@tromey.com> (raw)
In-Reply-To: <20190808124907.GA19791@delia> (Tom de Vries's message of "Thu, 8	Aug 2019 14:49:08 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Thanks for the patch.

Tom> +      CORE_ADDR baseaddr
Tom> +	= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
Tom> +      struct gdbarch *gdbarch = get_objfile_arch (objfile);
 
Tom>        for (const auto &cand_off
Tom>  	     : dwarf2_per_objfile->abstract_to_concrete[die->sect_off])
Tom> @@ -23220,6 +23223,8 @@ dwarf2_fetch_die_loc_sect_off (sect_offset sect_off,
 
Tom>  	  CORE_ADDR pc_low, pc_high;
Tom>  	  get_scope_pc_bounds (cand->parent, &pc_low, &pc_high, cu);
Tom> +	  pc_low = gdbarch_adjust_dwarf2_addr (gdbarch, pc_low + baseaddr);
Tom> +	  pc_high = gdbarch_adjust_dwarf2_addr (gdbarch, pc_high + baseaddr);
Tom>  	  if (pc_low == ((CORE_ADDR) -1)

I think this test has to precede the offsetting.

Tom


  reply	other threads:[~2019-08-08 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 12:49 Tom de Vries
2019-08-08 17:16 ` Tom Tromey [this message]
2019-08-08 18:04   ` Kevin Buettner
2019-08-09  4:50     ` Tom de Vries

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=87h86r60hv.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=tdevries@suse.de \
    /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