public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] [gdb] Fix info checkpoints
Date: Tue, 9 Jan 2024 11:03:16 -0700	[thread overview]
Message-ID: <20240109110316.4f27f87b@f39-zbm-amd> (raw)
In-Reply-To: <20240108152553.4578-3-tdevries@suse.de>

On Mon,  8 Jan 2024 16:25:52 +0100
Tom de Vries <tdevries@suse.de> wrote:

> Consider test-case gdb.base/checkpoint.exp.  At some point, it issues an info
> checkpoints command:
> ...
> (gdb) info checkpoints^M
> * 0 process 30570 (main process) at 0x0^M
>   1 process 30573 at 0x4008bb, file checkpoint.c, line 49^M
>   2 process 30574 at 0x4008bb, file checkpoint.c, line 49^M
>   3 process 30575 at 0x4008bb, file checkpoint.c, line 49^M
>   4 process 30576 at 0x4008bb, file checkpoint.c, line 49^M
>   5 process 30577 at 0x4008bb, file checkpoint.c, line 49^M
>   6 process 30578 at 0x4008bb, file checkpoint.c, line 49^M
>   7 process 30579 at 0x4008bb, file checkpoint.c, line 49^M
>   8 process 30580 at 0x4008bb, file checkpoint.c, line 49^M
>   9 process 30582 at 0x4008bb, file checkpoint.c, line 49^M
>   10 process 30583 at 0x4008bb, file checkpoint.c, line 49^M
> ...
> 
> According to the docs, each of these (0-10) is a checkpoint.
> 
> But the pc address (as well as the file name and line number) is missing for
> checkpoint 0.
> 
> Fix this by sampling the pc value for the current process in
> info_checkpoints_command, such that we have instead:
> ...
> * 0 process 30570 (main process) at 0x4008bb, file checkpoint.c, line 49^M
> ...
> 
> Tested on x86_64-linux.
> 
> PR gdb/31211
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31211

Approved-By: Kevin Buettner <kevinb@redhat.com>


  reply	other threads:[~2024-01-09 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 15:25 [PATCH 0/3] [gdb] Two checkpoint fixes Tom de Vries
2024-01-08 15:25 ` [PATCH 1/3] [gdb] Make variable printed bool in info_checkpoints_command Tom de Vries
2024-01-09 17:54   ` Kevin Buettner
2024-01-08 15:25 ` [PATCH 2/3] [gdb] Fix info checkpoints Tom de Vries
2024-01-09 18:03   ` Kevin Buettner [this message]
2024-01-08 15:25 ` [PATCH 3/3] [gdb] Fix assertion failure for checkpoint delete 0 Tom de Vries
2024-01-10  5:28   ` Kevin Buettner
2024-01-10 10:25     ` Tom de Vries

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=20240109110316.4f27f87b@f39-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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).