Re: [PATCHv6 0/2] Restore thread and frame patches

Andrew Burgess
2021-01-07T10:25:14Z

Ping!

I'd like to ask if anyone has any objections to these patches being
merged?

My original attempt to merge at least part of this series[1] back in
March last year did get some positive feedback, and I was about to
merge until Pedro objected.

I do honestly believe that I have now addressed Pedro's objections
which I interpreted as:

1. Changing existing default behaviour might be confusing:
- This feature is off by default now.

2. Restoring "some" bits of state without restoring "all" bits of
state (examples given were fibers, coroutines, etc) would be
confusing.
- Again, by having this off by default a user has to opt in to
restore those features that we support restoring. As a result
it should not (I think) be confusing. That is, if a user turns
on "restore thread" then of course only threads will be
restored. They might then complain that there's no "restore
coroutine" or "restore fiber" flag, but I'd be OK with that.

3. Pedro expressed that he finds the current behaviour more
intuitive.
- I respectively disagree, but again, by being off be default I
think anyone who prefers the current behaviour will not be put
out.

I've not heard back from Pedro since I posted the latest version of
this series in Sep last year, but I would like to hear if anyone has
either new concerns about this change, or if anyone feels that Pedro's
original concerns have not been addressed.

Thanks for your time,
Andrew

[1] https://sourceware.org/pipermail/gdb-patches/2020-March/167061.html

* Andrew Burgess <andrew.burgess@embecosm.com> [2020-12-10 11:39:03 +0000]:

> Compared to v5:
>
> + Minor tweak to one comment in patch #2 (added a comma).
> + Rebased onto current master.
>
> Still hoping for Pedro to review this series in comparison to the
> original patches he objected to.
>
> Thanks,
> Andrew
>
>
> ---
>
> Andrew Burgess (2):
> gdb: Restore previously selected thread when switching inferior
> gdb: Track the current frame for each thread
>
> gdb/ChangeLog | 34 ++
> gdb/NEWS | 20 ++
> gdb/doc/ChangeLog | 14 +
> gdb/doc/gdb.texinfo | 42 ++-
> gdb/frame.c | 26 ++
> gdb/gdbthread.h | 13 +-
> gdb/inferior.c | 58 ++-
> gdb/inferior.h | 9 +
> gdb/testsuite/ChangeLog | 10 +
> .../gdb.threads/restore-selected-frame.c | 85 +++++
> .../gdb.threads/restore-selected-frame.exp | 336 ++++++++++++++++++
> gdb/testsuite/gdb.threads/restore-thread.c | 248 +++++++++++++
> gdb/testsuite/gdb.threads/restore-thread.exp | 219 ++++++++++++
> gdb/thread.c | 61 +++-
> 14 files changed, 1160 insertions(+), 15 deletions(-)
> create mode 100644 gdb/testsuite/gdb.threads/restore-selected-frame.c
> create mode 100644 gdb/testsuite/gdb.threads/restore-selected-frame.exp
> create mode 100644 gdb/testsuite/gdb.threads/restore-thread.c
> create mode 100644 gdb/testsuite/gdb.threads/restore-thread.exp
>
> --
> 2.25.4
>