From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org, pedro@palves.net
Subject: Re: [PATCH v5 1/4] Make linux checkpoints work with multiple inferiors
Date: Wed, 5 Feb 2025 15:06:57 -0700 [thread overview]
Message-ID: <20250205150657.5b0b14ab@f41-zbm-amd> (raw)
In-Reply-To: <87v7tw6vre.fsf@redhat.com>
On Thu, 30 Jan 2025 17:45:25 +0000
Andrew Burgess <aburgess@redhat.com> wrote:
> Additionally, there are a couple of places in this patch where you have
> spaces instead of tabs, and trailing whitespace. I have this in my
> ~/.gitconfig file:
>
> [alias]
> check=show --check --format="%C(auto)%h\\ %s\\ %C(blue)[%an\\ (%cr)]%C(reset)"
>
> Then you can do `git check` to check the last commit, or `git check SHA`
> to check some other commit. The output will highlight any whitespace
> issues with the patch.
Thanks! I've added those lines to my own ~/.gitconfig file and will use
"git check" going forward.
[...]
> > Before:
> >
> > (gdb) info checkpoints
> > * 0 Thread 0x7ffff7cd3740 (LWP 84201) (main process) at 0x40114a, file hello.c, line 28
> > 1 process 84205 at 0x401199, file hello.c, line 51
> > 2 process 84206 at 0x4011a3, file hello.c, line 53
> >
> > After:
> >
> > (gdb) info checkpoints
> > Id Active Target Id Frame
> > * 0 y process 551311 at 0x40114a, file hello.c, line 28
> > 1 n process 551314 at 0x401199, file hello.c, line 51
> > 2 n process 551315 at 0x4011a3, file hello.c, line 53
>
> I'd like to suggest using GDB's structured table generation mechanism
> here. There's two great examples; 'print_inferior' in inferior.c (which
> does the 'info inferiors' command) and 'print_thread_info_1' in thread.c
> (which is the 'info threads' command).
>
> I'd also like to suggest, that for the 'Frame' column, you make use of
> print_stack_frame(). This is the function that 'info threads' uses to
> print its stack frame, I think having consistent output would be a win
> here.
>
> That all said, if you wanted to merge this now, and then we could
> possibly come back and tweak the output formatting and content
> afterwards, I'd be fine with that too.
>
> Either way:
>
> Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks for the review!
I've pushed this series. (Though I did first fix the whitespace problems,
made sure that things still built and checked that the affected tests still ran
as expected.)
I'll work on a separate patch to use GDB's mechanism for structured
table generation. (I'll also incorporate your print_stack_frame()
suggestion.) Thanks for the pointers!
Kevin
next prev parent reply other threads:[~2025-02-05 22:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 1:54 [PATCH v5 0/4] " Kevin Buettner
2024-12-10 1:54 ` [PATCH v5 1/4] " Kevin Buettner
2025-01-30 17:45 ` Andrew Burgess
2025-02-05 22:06 ` Kevin Buettner [this message]
2024-12-10 1:54 ` [PATCH v5 2/4] Capitalize output of successful checkpoint command Kevin Buettner
2024-12-10 1:54 ` [PATCH v5 3/4] Print only process ptids from linux-fork.c Kevin Buettner
2024-12-10 1:54 ` [PATCH v5 4/4] Linux checkpoints: Update NEWS and gdb.texinfo regarding multiple inferiors Kevin Buettner
2024-12-10 13:04 ` Eli Zaretskii
2024-12-19 19:32 ` [PATCH v5 0/4] Make linux checkpoints work with " Tom Tromey
2025-01-30 17:46 ` Andrew Burgess
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=20250205150657.5b0b14ab@f41-zbm-amd \
--to=kevinb@redhat.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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