From: Eli Zaretskii <eliz@gnu.org>
To: simon.marchi@polymtl.ca
Cc: gdb-patches@sourceware.org, nick.alcock@oracle.com,
weimin.pan@oracle.com
Subject: Re: [RFC PATCH 1/8] gdb/ctf: add debug logging in ctfread.c
Date: Tue, 03 Feb 2026 14:40:42 +0200 [thread overview]
Message-ID: <868qda0zlh.fsf@gnu.org> (raw)
In-Reply-To: <20260203065435.3092465-2-simon.marchi@polymtl.ca>
> From: simon.marchi@polymtl.ca
> Cc: Nick Alcock <nick.alcock@oracle.com>, Weimin Pan <weimin.pan@oracle.com>,
> Simon Marchi <simon.marchi@polymtl.ca>
> Date: Tue, 3 Feb 2026 01:45:42 -0500
>
> From: Simon Marchi <simon.marchi@polymtl.ca>
>
> Add some debug statements, to be able to visualize what is happening
> when loading CTF debug info. Add a new "set debug ctf" command, with
> the usual logging macros.
>
> Here's an example of the result, when reading the binary from test
> gdb.ctf/cruss-tu-cyclic:
>
> [ctf] elfctf_build_psymtabs: start: building psymtabs for /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.ctf/cross-tu-cyclic/cross-tu-cyclic
> [ctf] scan_partial_symbols: start: fname='.ctf'
> [ctf] scan_partial_symbols: is parent, using fname='/home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.ctf/cross-tu-cyclic/cross-tu-cyclic'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x1 kind=INTEGER name='int'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x2 kind=INTEGER name='long int'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x3 kind=FORWARD name='B'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x5 kind=FORWARD name='A'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x8 kind=STRUCT name='C'
> [ctf] ctf_psymtab_add_stt_entries: adding function psym 'main' tid=0x7 kind=FUNCTION
> [ctf] scan_partial_symbols: end: fname='.ctf'
> [ctf] scan_partial_symbols: start: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-1.c'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000001 kind=STRUCT name='B'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000002 kind=STRUCT name='A'
> [ctf] scan_partial_symbols: end: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-1.c'
> [ctf] scan_partial_symbols: start: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-2.c'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000001 kind=STRUCT name='A'
> [ctf] scan_partial_symbols: end: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-2.c'
> [ctf] scan_partial_symbols: start: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-3.c'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000001 kind=STRUCT name='A'
> [ctf] scan_partial_symbols: end: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-3.c'
> [ctf] scan_partial_symbols: start: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-4.c'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000001 kind=STRUCT name='A'
> [ctf] ctf_psymtab_type_cb: adding type tid=0x80000002 kind=STRUCT name='B'
> [ctf] scan_partial_symbols: end: fname='/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ctf/cross-tu-cyclic-4.c'
> [ctf] elfctf_build_psymtabs: end: building psymtabs for /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.ctf/cross-tu-cyclic/cross-tu-cyclic
>
> Change-Id: If3800d14dd965ccefa67a24ef5c4481aef70ffa4
> ---
> gdb/NEWS | 4 ++
> gdb/ctfread.c | 95 ++++++++++++++++++++++++++++++++++++++++++++-
> gdb/doc/gdb.texinfo | 7 ++++
> 3 files changed, 104 insertions(+), 2 deletions(-)
Thanks.
> diff --git a/gdb/NEWS b/gdb/NEWS
> index fa6e7ca61219..af04fa1e67ae 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -91,6 +91,10 @@ show progress-bars enabled
> content, to be disabled (the set command), or to see if
> progress-bars are currently enabled or not (the show command).
>
> +set debug ctf on|off
> +show debug ctf
> + Print debug messages about CTF reading.
> +
> * Changed commands
This part is okay.
> +@item set debug ctf
> +@cindex CTF debug messages
> +Turns on or off display of debugging messages related to reading CTF
Please always put the indexing commands _before_ the @item line to
which they refer. This way, following the index entry in the Info
reader will place the cursor on the @item line, not after it.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2026-02-03 12:41 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 6:45 [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab simon.marchi
2026-02-03 6:45 ` [RFC PATCH 1/8] gdb/ctf: add debug logging in ctfread.c simon.marchi
2026-02-03 12:40 ` Eli Zaretskii [this message]
2026-02-03 16:21 ` Simon Marchi
2026-02-03 16:37 ` Eli Zaretskii
2026-02-03 20:39 ` Simon Marchi
2026-02-03 6:45 ` [RFC PATCH 2/8] gdb/ctf: add unique_ptr types simon.marchi
2026-02-03 6:45 ` [RFC PATCH 3/8] gdb/ctf: editorial renames simon.marchi
2026-02-03 6:45 ` [RFC PATCH 4/8] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context simon.marchi
2026-02-12 17:44 ` Tom Tromey
2026-02-12 18:35 ` Simon Marchi
2026-02-03 6:45 ` [RFC PATCH 5/8] gdb/ctf: check return value of ctf_type_align simon.marchi
2026-02-12 17:49 ` Tom Tromey
2026-02-12 18:37 ` Simon Marchi
2026-02-03 6:45 ` [RFC PATCH 6/8] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs simon.marchi
2026-02-03 6:45 ` [RFC PATCH 7/8] gdb/ctf: don't use psymtabs, create symtabs directly simon.marchi
2026-02-12 17:54 ` Tom Tromey
2026-02-03 6:45 ` [RFC PATCH 8/8] gdb: remove psymtab.{c,h} simon.marchi
2026-02-12 17:58 ` [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab Tom Tromey
2026-02-12 18:47 ` Simon Marchi
2026-02-17 19:50 ` [PATCH v2 0/9] " simon.marchi
2026-02-17 19:50 ` [PATCH v2 1/9] gdb/ctf: add debug logging in ctfread.c simon.marchi
2026-02-17 19:50 ` [PATCH v2 2/9] gdb/ctf: add unique_ptr types simon.marchi
2026-02-17 19:50 ` [PATCH v2 3/9] gdb/ctf: editorial renames simon.marchi
2026-02-17 19:50 ` [PATCH v2 4/9] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context simon.marchi
2026-02-17 19:50 ` [PATCH v2 5/9] gdb/ctf: check return value of ctf_type_align simon.marchi
2026-02-17 19:50 ` [PATCH v2 6/9] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs simon.marchi
2026-02-17 19:50 ` [PATCH v2 7/9] gdb: make expanded_symbols_functions hold compunit symtabs simon.marchi
2026-02-17 19:50 ` [PATCH v2 8/9] gdb/ctf: don't use psymtabs, create symtabs directly simon.marchi
2026-02-17 19:50 ` [PATCH v2 9/9] gdb: remove psymtab.{c,h} simon.marchi
2026-02-28 3:51 ` [PATCH v3 0/9] Make CTF reader build full symtabs, get rid of psymtab Simon Marchi
2026-02-28 3:51 ` [PATCH v3 1/9] gdb/ctf: add debug logging in ctfread.c Simon Marchi
2026-02-28 10:12 ` Eli Zaretskii
2026-02-28 16:23 ` Simon Marchi
2026-02-28 3:51 ` [PATCH v3 2/9] gdb/ctf: add unique_ptr types Simon Marchi
2026-02-28 3:51 ` [PATCH v3 3/9] gdb/ctf: editorial renames Simon Marchi
2026-02-28 3:51 ` [PATCH v3 4/9] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context Simon Marchi
2026-02-28 3:51 ` [PATCH v3 5/9] gdb/ctf: check return value of ctf_type_align Simon Marchi
2026-02-28 3:51 ` [PATCH v3 6/9] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs Simon Marchi
2026-02-28 3:51 ` [PATCH v3 7/9] gdb: make expanded_symbols_functions hold compunit symtabs Simon Marchi
2026-03-04 19:21 ` Tom Tromey
2026-03-04 19:32 ` Tom Tromey
2026-03-09 18:56 ` Simon Marchi
2026-03-09 18:48 ` Simon Marchi
2026-03-10 17:09 ` Tom Tromey
2026-02-28 3:51 ` [PATCH v3 8/9] gdb/ctf: don't use psymtabs, create symtabs directly Simon Marchi
2026-03-04 19:29 ` Tom Tromey
2026-03-09 18:51 ` Simon Marchi
2026-02-28 3:51 ` [PATCH v3 9/9] gdb: remove psymtab.{c,h} Simon Marchi
2026-02-28 10:18 ` Eli Zaretskii
2026-03-04 19:33 ` [PATCH v3 0/9] Make CTF reader build full symtabs, get rid of psymtab Tom Tromey
2026-03-09 18:57 ` Simon Marchi
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=868qda0zlh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=nick.alcock@oracle.com \
--cc=simon.marchi@polymtl.ca \
--cc=weimin.pan@oracle.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