From: "Ijaz, Abdul B" <abdul.b.ijaz@intel.com>
To: Tom Tromey <tom@tromey.com>,
Abdul Basit Ijaz via Gdb-patches <gdb-patches@sourceware.org>
Cc: "JiniSusan.George@amd.com" <JiniSusan.George@amd.com>,
"eliz@gnu.org" <eliz@gnu.org>,
"blarsen@redhat.com" <blarsen@redhat.com>
Subject: RE: [PATCH v4 1/4] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader
Date: Mon, 7 Aug 2023 14:43:01 +0000 [thread overview]
Message-ID: <SA1PR11MB684606ADA1B87FFEA50A45EECB0CA@SA1PR11MB6846.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87y1itcin7.fsf@tromey.com>
Hi Tom,
Thanks for the feedback.
Abdul> + if (target_name == NULL)
Tom> Probably your patch predates this but nowadays we're using nullptr instead of NULL.
Will fix in V5 patch.
Abdul> + (unsigned int) TYPE_FUNC_FLAGS (type));
Tom> If we're just printing the flags as an int, how about using hex instead?
Will update print format to hex in V5 patch.
Abdul> + func_type_flags flags;
Tom>This should use ENUM_BITFIELD like the other spot in the patch.
This flag may store multiple values together with no return and trampoline types for a function. That is the reason why it is used like this here. So value is already bitfield like:
enum func_type_flag_value : unsigned
{
FUNC_TYPE_NO_RETURN = (1 << 0),
FUNC_TYPE_TRAMPOLINE = (1 << 1)
};
Thanks & Best Regards
Abdul Basit
-----Original Message-----
From: Tom Tromey <tom@tromey.com>
Sent: Wednesday, August 2, 2023 10:08 PM
To: Abdul Basit Ijaz via Gdb-patches <gdb-patches@sourceware.org>
Cc: Ijaz, Abdul B <abdul.b.ijaz@intel.com>; JiniSusan.George@amd.com; tom@tromey.com; eliz@gnu.org; blarsen@redhat.com; Nils-Christian Kempke <nils-christian.kempke@intel.com>
Subject: Re: [PATCH v4 1/4] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader
>>>>> "Abdul" == Abdul Basit Ijaz via Gdb-patches <gdb-patches@sourceware.org> writes:
Abdul> This patch adds support to GDB for reading the DW_AT_trampoline
Abdul> attribute. It stores the attribute and its value in the
Abdul> type_specific part of a GDB type. This patch is implemented in
Abdul> preparation of the following patches, which will add a mechanism
Abdul> to hide DW_AT_trampoline subroutines from the user.
Thanks for the patch.
Abdul> + if (target_name == NULL)
Abdul> + target_name = dwarf2_physname (NULL, target_die,
Abdul> +target_cu);
Probably your patch predates this but nowadays we're using nullptr instead of NULL.
Abdul> + unrelocated_addr target_addr_reloc = attr->as_address ();
Abdul> + CORE_ADDR target_addr
Abdul> + = cu->per_objfile->relocate (target_addr_reloc);
Abdul> + target_addr = gdbarch_adjust_dwarf2_addr (objfile->arch (),
Abdul> + target_addr);
dwarf2_per_objfile::relocate already calls gdbarch_adjust_dwarf2_addr, so that call isn't needed.
Abdul> + gdb_printf ("%*sfunc_type_flags %u\n", spaces, "",
Abdul> + (unsigned int) TYPE_FUNC_FLAGS (type));
If we're just printing the flags as an int, how about using hex instead?
Abdul> - unsigned int is_noreturn : 1;
Abdul> + func_type_flags flags;
This should use ENUM_BITFIELD like the other spot in the patch.
Tom
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2023-08-07 14:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 22:47 [PATCH v4 0/4] GDB support for DW_AT_trampoline Abdul Basit Ijaz
2023-08-01 22:47 ` [PATCH v4 1/4] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader Abdul Basit Ijaz
2023-08-02 20:07 ` Tom Tromey
2023-08-07 14:43 ` Ijaz, Abdul B [this message]
2023-08-10 16:20 ` Tom Tromey
2023-08-02 20:13 ` Tom Tromey
2023-08-07 13:36 ` Ijaz, Abdul B
2023-08-10 16:18 ` Tom Tromey
2023-08-14 21:53 ` Ijaz, Abdul B
2023-08-01 22:47 ` [PATCH v4 2/4] gdb/symtab: add lookup for trampoline functions Abdul Basit Ijaz
2023-08-02 20:18 ` Tom Tromey
2023-08-07 7:40 ` Ijaz, Abdul B
2023-08-01 22:47 ` [PATCH v4 3/4] gdb/infrun: handle stepping through functions with DW_AT_trampoline Abdul Basit Ijaz
2023-08-02 11:52 ` Eli Zaretskii
2023-08-02 11:54 ` Ijaz, Abdul B
2023-08-02 20:33 ` Tom Tromey
2023-08-07 8:08 ` Ijaz, Abdul B
2023-08-10 16:56 ` Tom Tromey
2023-08-16 14:18 ` Ijaz, Abdul B
2023-08-01 22:47 ` [PATCH v4 4/4] gdb: Skip trampoline frames in the stack for printing or finish command Abdul Basit Ijaz
2023-08-02 11:52 ` Eli Zaretskii
2023-08-02 11:54 ` Ijaz, Abdul B
2023-08-02 20:41 ` Tom Tromey
2023-08-07 13:28 ` Ijaz, Abdul B
2023-08-10 17:45 ` Tom Tromey
2023-08-02 20:42 ` Tom Tromey
2023-08-07 7:19 ` 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=SA1PR11MB684606ADA1B87FFEA50A45EECB0CA@SA1PR11MB6846.namprd11.prod.outlook.com \
--to=abdul.b.ijaz@intel.com \
--cc=JiniSusan.George@amd.com \
--cc=blarsen@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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).