[PATCHv2,00/13] Infcalls from B/P conditions in multi-threaded inferiors

Message ID cover.1674058359.git.aburgess@redhat.com
Headers
Series Infcalls from B/P conditions in multi-threaded inferiors |

Message

Andrew Burgess Jan. 18, 2023, 4:17 p.m. UTC
  Thanks for the feedback on V1.  I merged a couple of the really minor
patches from the V1 series, but after the feedback I'm some new
patches in the v2 series.

In V2:

  - Rebased onto something closer to HEAD of master,

  - Patches #1, #2, #12, and #13 are new in this series,
  
  - Patches #3 to #9, and #11 are unchanged since their V1 iteration,
  
  - Patches #10 has changed slightly in implementation since v1, and
    the docs have been significantly updated.

---

Andrew Burgess (13):
  gdb/doc: extended documentation for inferior function calls
  gdb/doc: extend the documentation for conditional breakpoints
  gdb: include breakpoint number in testing condition error message
  gdbserver: allows agent_mem_read to return an error code
  gdbserver: allow agent expressions to fail with invalid memory access
  gdb: avoid repeated signal reporting during failed conditional
    breakpoint
  gdb: don't always print breakpoint location after failed condition
    check
  Revert "gdb: remove unnecessary parameter wait_ptid from
    do_target_wait"
  gdb: fix b/p conditions with infcalls in multi-threaded inferiors
  gdb: add timeouts for inferior function calls
  gdb/remote: avoid SIGINT after calling remote_target::stop
  gdb: introduce unwind-on-timeout setting
  gdb: rename unwindonsignal to unwind-on-signal

 gdb/NEWS                                      |  38 +++
 gdb/breakpoint.c                              |  17 +-
 gdb/doc/gdb.texinfo                           | 136 +++++++-
 gdb/gdbthread.h                               |   3 +
 gdb/infcall.c                                 | 294 +++++++++++++++++-
 gdb/infrun.c                                  |  52 +++-
 gdb/infrun.h                                  |   2 +-
 gdb/remote.c                                  |  17 +
 gdb/testsuite/gdb.base/bp-cond-failure.c      |  30 ++
 gdb/testsuite/gdb.base/bp-cond-failure.exp    |  81 +++++
 gdb/testsuite/gdb.base/callfuncs.exp          |   4 +-
 .../gdb.base/catch-signal-siginfo-cond.exp    |   2 +-
 gdb/testsuite/gdb.base/gnu-ifunc.exp          |   2 +-
 gdb/testsuite/gdb.base/help.exp               |   2 +-
 gdb/testsuite/gdb.base/infcall-failure.c      |  48 +++
 gdb/testsuite/gdb.base/infcall-failure.exp    | 182 +++++++++++
 gdb/testsuite/gdb.base/infcall-timeout.c      |  36 +++
 gdb/testsuite/gdb.base/infcall-timeout.exp    |  98 ++++++
 gdb/testsuite/gdb.base/unwindonsignal.exp     |  36 ++-
 gdb/testsuite/gdb.compile/compile-cplus.exp   |   2 +-
 gdb/testsuite/gdb.compile/compile.exp         |   2 +-
 gdb/testsuite/gdb.cp/gdb2495.exp              |  16 +-
 gdb/testsuite/gdb.fortran/function-calls.exp  |   2 +-
 gdb/testsuite/gdb.mi/mi-syn-frame.exp         |   2 +-
 .../gdb.python/py-finish-breakpoint.exp       |   2 +-
 .../infcall-from-bp-cond-other-thread-event.c | 135 ++++++++
 ...nfcall-from-bp-cond-other-thread-event.exp | 175 +++++++++++
 .../gdb.threads/infcall-from-bp-cond-simple.c |  89 ++++++
 .../infcall-from-bp-cond-simple.exp           | 236 ++++++++++++++
 .../gdb.threads/infcall-from-bp-cond-single.c | 139 +++++++++
 .../infcall-from-bp-cond-single.exp           | 119 +++++++
 .../infcall-from-bp-cond-timeout.c            | 169 ++++++++++
 .../infcall-from-bp-cond-timeout.exp          | 174 +++++++++++
 .../gdb.threads/thread-unwindonsignal.exp     |   8 +-
 gdb/testsuite/lib/gdb.exp                     |   8 +
 gdbserver/ax.cc                               |  12 +-
 gdbserver/ax.h                                |   3 +-
 gdbserver/tracepoint.cc                       |  11 +-
 gdbserver/tracepoint.h                        |   9 +-
 39 files changed, 2317 insertions(+), 76 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.c
 create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.exp
 create mode 100644 gdb/testsuite/gdb.base/infcall-failure.c
 create mode 100644 gdb/testsuite/gdb.base/infcall-failure.exp
 create mode 100644 gdb/testsuite/gdb.base/infcall-timeout.c
 create mode 100644 gdb/testsuite/gdb.base/infcall-timeout.exp
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c
 create mode 100644 gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp


base-commit: ac37b79cc440e37fc704d425a6e450afb3c7ee89
  

Comments

Terekhov, Mikhail via Gdb-patches Jan. 20, 2023, 9:34 a.m. UTC | #1
On Wednesday, January 18, 2023 5:18 PM, Andrew Burgess wrote:
> Thanks for the feedback on V1.  I merged a couple of the really minor
> patches from the V1 series, but after the feedback I'm some new
> patches in the v2 series.
> 
> In V2:
> 
>   - Rebased onto something closer to HEAD of master,
> 
>   - Patches #1, #2, #12, and #13 are new in this series,
> 
>   - Patches #3 to #9, and #11 are unchanged since their V1 iteration,
> 
>   - Patches #10 has changed slightly in implementation since v1, and
>     the docs have been significantly updated.

I've looked at the series and posted my comments.  Thanks for doing this.

Is there a chance to push the branch to somewhere?  Git am does not 
work very well for my setup.

Regards,
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
  
Andrew Burgess Jan. 25, 2023, 3:53 p.m. UTC | #2
"Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com> writes:

> On Wednesday, January 18, 2023 5:18 PM, Andrew Burgess wrote:
>> Thanks for the feedback on V1.  I merged a couple of the really minor
>> patches from the V1 series, but after the feedback I'm some new
>> patches in the v2 series.
>> 
>> In V2:
>> 
>>   - Rebased onto something closer to HEAD of master,
>> 
>>   - Patches #1, #2, #12, and #13 are new in this series,
>> 
>>   - Patches #3 to #9, and #11 are unchanged since their V1 iteration,
>> 
>>   - Patches #10 has changed slightly in implementation since v1, and
>>     the docs have been significantly updated.
>
> I've looked at the series and posted my comments.  Thanks for doing this.
>
> Is there a chance to push the branch to somewhere?  Git am does not 
> work very well for my setup.

Hi!

Thanks for looking through,  I've pushed the branch to
users/aburgess/bp-inferior-calls.  I'll go through your feedback and
make any updates needed and force push this branch.

Thanks,
Andrew
  
Terekhov, Mikhail via Gdb-patches Feb. 16, 2023, 11:09 a.m. UTC | #3
On Wednesday, January 25, 2023 4:54 PM, Andrew Burgess wrote:
> Hi!
> 
> Thanks for looking through,  I've pushed the branch to
> users/aburgess/bp-inferior-calls.  I'll go through your feedback and
> make any updates needed and force push this branch.
> 
> Thanks,
> Andrew

Thank you.  I think the branch still contains v2, not v3, but there were only minor
behavioral changes between the two versions.  So, that should be fine.
I built GDB from your branch and played around a bit, including running the newly
added tests.  I didn't notice any problems.  I posted some minor things for some
of the v3 patches.

Regards
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928