public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reader
Date: Fri, 15 Jul 2022 14:05:13 -0600	[thread overview]
Message-ID: <87lesum9ae.fsf@tromey.com> (raw)
In-Reply-To: <20220707121538.1317473-2-nils-christian.kempke@intel.com> (Nils-Christian Kempke via Gdb-patches's message of "Thu, 7 Jul 2022 14:15:36 +0200")

>>>>> Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org> writes:

> DW_AT_trampoline can be used to describe compiler generated functions
> that serve some intermediary purpose on making a call to another
> function.  A compiler can emit this tag in order to help a debugger hide
> the trampolines from a user.

Thank you for the patch.

> +	  const char* target_name = dwarf2_name (target_die, target_cu);

"*" comes after the space.

> +	{
> +	  CORE_ADDR target_addr = attr->as_address ();
> +	  target_addr = gdbarch_adjust_dwarf2_addr (objfile->arch (),
> +						    target_addr + baseaddr);
> +	  TYPE_TRAMPOLINE_TARGET (ftype)->set_target_physaddr (target_addr);

If a data structure holds an address that already has the section offset
applied, then objfile_relocate1 must be updated to relocate the value.

However, if you can possibly avoid adding the section offset, in favor
of handling this when the address is used, then that is better IMO.

thanks,
Tom

  parent reply	other threads:[~2022-07-15 20:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 12:15 Nils-Christian Kempke
2022-07-07 12:15 ` [PATCH 2/3] gdb/symtab: add lookup for trampoline functions Nils-Christian Kempke
2022-07-15 20:13   ` Tom Tromey
2022-07-07 12:15 ` [PATCH 3/3] gdb/infrun: handle stepping through functions with DW_AT_trampoline Nils-Christian Kempke
2022-07-15 20:20   ` Tom Tromey
2022-07-13  7:39 ` [PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reader George, Jini Susan
2022-07-13 11:59   ` Kempke, Nils-Christian
2022-07-17 12:57     ` George, Jini Susan
2022-07-18 16:11       ` Tom Tromey
2022-07-15 20:05 ` Tom Tromey [this message]
2023-01-03  1:07 Ijaz, Abdul B

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=87lesum9ae.fsf@tromey.com \
    --to=tom@tromey.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).