From: "Ijaz, Abdul B" <abdul.b.ijaz@intel.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"JiniSusan.George@amd.com" <JiniSusan.George@amd.com>,
"tom@tromey.com" <tom@tromey.com>
Subject: RE: [PATCH v6 03/10] gdb: handle stepping through functions with DW_AT_trampoline
Date: Thu, 28 Mar 2024 14:31:38 +0000 [thread overview]
Message-ID: <SA1PR11MB6846A37E88E0D7FF538D26DECB3B2@SA1PR11MB6846.namprd11.prod.outlook.com> (raw)
In-Reply-To: <86wmpmfofg.fsf@gnu.org>
Thanks a lot Eli for the feedback. Will wait for the overall feedback and then will fix the issues you mentioned in next series for this patch.
>> + If this is turned off, GDB gdb will handle trampoline functions the
>> + same
^^^^^^^
>Redundant "gdb" there.
Will remove "gdb".
>> +some compilers might generate so-called trampoline functions, which
>> +wrap the actual function call (the
>"trampoline functions" should be in @dfn, as you are introducing new terminology here.
Wil add @dfn for "trampoline functions".
>> +ignore such function\n\ trampolines."),
>In the last sentence, I think "ignore such function trampolines" is misleading. I suggest to replace this with "treat trampolines as normal functions".
Will update accordingly.
Thanks & Best Regards
Abdul Basit
-----Original Message-----
From: Eli Zaretskii <eliz@gnu.org>
Sent: Thursday, March 28, 2024 2:59 PM
To: Ijaz, Abdul B <abdul.b.ijaz@intel.com>
Cc: gdb-patches@sourceware.org; JiniSusan.George@amd.com; tom@tromey.com; nils-christian.kempke@intel.com
Subject: Re: [PATCH v6 03/10] gdb: handle stepping through functions with DW_AT_trampoline
> From: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
> Cc: abdul.b.ijaz@intel.com,
> JiniSusan.George@amd.com,
> tom@tromey.com,
> eliz@gnu.org,
> Nils-Christian Kempke <nils-christian.kempke@intel.com>
> Date: Thu, 28 Mar 2024 13:05:21 +0100
>
> gdb/NEWS | 11 +
> gdb/doc/gdb.texinfo | 35 +++
> gdb/infrun.c | 87 ++++++-
> gdb/infrun.h | 5 +
> .../gdb.dwarf2/dw2-function-trampolines.c | 80 ++++++
> .../gdb.dwarf2/dw2-function-trampolines.exp | 245 ++++++++++++++++++
> 6 files changed, 459 insertions(+), 4 deletions(-) create mode
> 100644 gdb/testsuite/gdb.dwarf2/dw2-function-trampolines.c
> create mode 100644
> gdb/testsuite/gdb.dwarf2/dw2-function-trampolines.exp
Thanks.
> diff --git a/gdb/NEWS b/gdb/NEWS
> index feb3a37393a..da0d936ff70 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -892,6 +892,17 @@ platform.
>
> * New commands
>
> +set skip-trampoline-functions on|off
> +show skip-trampoline-functions
> + This setting is 'on' by default. When 'on' it controls whether GDB
> +will
> + recognize function calls that have been marked as trampolines in
> +the debug
> + info. It improves stepping behavior in that it steps over the
> +trampoline
> + code and hides it from the user. Currently, only DWARF trampolines
> +are
> + supported.
> +
> + If this is turned off, GDB gdb will handle trampoline functions the
> + same
^^^^^^^
Redundant "gdb" there.
> +@kindex set skip-trampoline-functions @item set
> +skip-trampoline-functions @cindex trampoline functions @cindex
> +stepping through trampoline functions @itemx set
> +skip-trampoline-functions on When calling a function in any language,
> +some compilers might generate so-called trampoline functions, which
> +wrap the actual function call (the
"trampoline functions" should be in @dfn, as you are introducing new terminology here.
> + add_setshow_boolean_cmd ("skip-trampoline-functions", class_run,
> + &skip_trampoline_functions, _("\ Set whether gdb attempts to
> +hide trampolines marked in the debug info."), _("\ Show whether gdb
> +attempts to hide trampolines marked in the debug info."), _("\ If on,
> +while stepping gdb will skip through functions and inlined
> +functions\n\ marked as trampolines by the compiler. If off, gdb will
> +ignore such function\n\ trampolines."),
In the last sentence, I think "ignore such function trampolines" is misleading. I suggest to replace this with "treat trampolines as normal functions".
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
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:[~2024-03-28 14:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 12:05 [PATCH v6 00/10] GDB support for DW_AT_trampoline Abdul Basit Ijaz
2024-03-28 12:05 ` [PATCH v6 01/10] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader Abdul Basit Ijaz
2024-03-28 12:05 ` [PATCH v6 02/10] gdb/symtab: add lookup for trampoline functions Abdul Basit Ijaz
2024-03-28 12:05 ` [PATCH v6 03/10] gdb: handle stepping through functions with DW_AT_trampoline Abdul Basit Ijaz
2024-03-28 13:58 ` Eli Zaretskii
2024-03-28 14:31 ` Ijaz, Abdul B [this message]
2024-03-28 12:05 ` [PATCH v6 04/10] gdb: Skip trampoline frames for the backtrace command Abdul Basit Ijaz
2024-03-28 12:05 ` [PATCH v6 05/10] gdb: Skip trampoline functions for the finish and reverse-finish commands Abdul Basit Ijaz
2024-03-28 13:59 ` Eli Zaretskii
2024-03-28 12:05 ` [PATCH v6 06/10] gdb: Skip trampoline functions for the up command Abdul Basit Ijaz
2024-03-28 14:01 ` Eli Zaretskii
2024-03-28 12:05 ` [PATCH v6 07/10] gdb: Skip trampoline functions for the return command Abdul Basit Ijaz
2024-03-28 14:01 ` Eli Zaretskii
2024-03-28 12:05 ` [PATCH v6 08/10] gdb, mi: Skip trampoline functions for the -stack-list-frames command Abdul Basit Ijaz
2024-03-28 14:02 ` Eli Zaretskii
2024-03-28 12:05 ` [PATCH v6 09/10] gdb, mi: Skip trampoline functions for the -stack-list-arguments command Abdul Basit Ijaz
2024-03-28 14:03 ` Eli Zaretskii
2024-03-28 12:05 ` [PATCH v6 10/10] gdb: Filter trampoline frames in backtrace when using Python frame-filters Abdul Basit Ijaz
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=SA1PR11MB6846A37E88E0D7FF538D26DECB3B2@SA1PR11MB6846.namprd11.prod.outlook.com \
--to=abdul.b.ijaz@intel.com \
--cc=JiniSusan.George@amd.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