From: Eli Zaretskii <eliz@gnu.org>
To: Abdul Basit Ijaz <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
Date: Thu, 28 Mar 2024 15:58:43 +0200 [thread overview]
Message-ID: <86wmpmfofg.fsf@gnu.org> (raw)
In-Reply-To: <20240328120528.30382-4-abdul.b.ijaz@intel.com> (message from Abdul Basit Ijaz on Thu, 28 Mar 2024 13:05:21 +0100)
> 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>
next prev parent reply other threads:[~2024-03-28 13:59 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 [this message]
2024-03-28 14:31 ` Ijaz, Abdul B
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=86wmpmfofg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=JiniSusan.George@amd.com \
--cc=abdul.b.ijaz@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=nils-christian.kempke@intel.com \
--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