[ PATCH 0/3] Fix GDB reverse execution behavior

Carl Love
2023-11-23T05:54:31Z

GDB developers:

The patch "[PATCH 2/2 ver 8] Fix reverse stepping multiple contiguous
PC ranges over the line table",

https://sourceware.org/pipermail/gdb-patches/2023-August/201889.html

was posted and pinged several times without any response from the
developers. It was reviewed by Guinevere Larsen. The original patch 2
was intended to fix failures on PowerPC and AArch64. An additional
architecture independent change and test was added per feedback from
the community.

Based on some private discussions on how best to get the patch
approved, it was suggested that I should break the patch in two to make
it easier to review. Specifically, separate out the PowerPC and
AArch64 fixes from the generic architecture independent changes. The
original patch 2 has been split up as suggested. The hope is this will
make it easier to review and get approval.

The two new patches are functionally identical to the previously posted
patch 2.

The patch series now consists of three patches.

Patch 1, adds a new option to gdb_compile to either generate or not
generate the line table information. No change from the prior version.

Patch 2, fix the specific GDB issues with reverse stepping over a line
with multiple statements in the same line for PowerPC and AArch64.
Behavior on X86-64 did not change.

Patch 3, fix the behavior of GDB for all architectures when executing
the next command in reverse on a line that contains multiple function
calls.

The series of three patches has been tested on PowerPC, X86 and AArch64
with no regression errors. Please let me know if these patches are
acceptable for mainline. Note, Luis Machado did the AArch64 testing.
Thanks.

Carl