)]}'
{
  "commit": "fe6356def678a93121a68147bdf93b6980bbf75d",
  "tree": "cb2ff763d9af621b425751841cd6255ee59baa94",
  "parents": [
    "29deb4221d07d2c497183853e6023acb51d49be9"
  ],
  "author": {
    "name": "Carl Love",
    "email": "cel@linux.ibm.com",
    "time": "Tue Jan 02 17:46:02 2024 -0500"
  },
  "committer": {
    "name": "Carl Love",
    "email": "cel@linux.ibm.com",
    "time": "Tue Jan 02 17:46:02 2024 -0500"
  },
  "message": "PowerPC and aarch64: Fix reverse stepping failure\n\nWhen running GDB\u0027s testsuite on aarch64-linux/Ubuntu 20.04 (also spotted on\nthe ppc backend), there are failures in gdb.reverse/solib-precsave.exp and\ngdb.reverse/solib-reverse.exp.\n\nThe failure happens around the following code:\n\n38  b[1] \u003d shr2(17);          /* middle part two */\n40  b[0] \u003d 6;   b[1] \u003d 9;     /* generic statement, end part two */\n42  shr1 (\"message 1\\n\");     /* shr1 one */\n\nNormal execution:\n\n- step from line 38 will land on line 40.\n- step from line 40 will land on line 42.\n\nReverse execution:\n- step from line 42 will land on line 40.\n- step from line 40 will land on line 40.\n- step from line 40 will land on line 38.\n\nThe problem here is that line 40 contains two contiguous but distinct\nPC ranges in the line table, like so:\n\nLine 40 - [0x7ec ~ 0x7f4]\nLine 40 - [0x7f4 ~ 0x7fc]\n\nThe two distinct ranges are generated because GCC started outputting source\ncolumn information, which GDB doesn\u0027t take into account at the moment.\n\nWhen stepping forward from line 40, we skip both of these ranges and land on\nline 42. When stepping backward from line 42, we stop at the start PC of the\nsecond (or first, going backwards) range of line 40.\n\nSince we\u0027ve reached ecs-\u003eevent_thread-\u003econtrol.step_range_start, we stop\nstepping backwards.\n\nThe above issues were fixed by introducing a new function that looks for\nadjacent PC ranges for the same line, until we notice a line change. Then\nwe take that as the start PC of the range.  The new start PC for the range\nis used for the control.step_range_start when setting up a step range.\n\nThe test case gdb.reverse/map-to-same-line.exp is added to test the fix\nfor the above reverse step issues.\n\nPatch has been tested on PowerPC, X86 and AArch64 with no regressions.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1d863896c405473bb06721c6eae32a29ce7179b3",
      "old_mode": 33188,
      "old_path": "gdb/infrun.c",
      "new_id": "c769e972f49ba23836b6151d2fc569f6304c2ec1",
      "new_mode": 33188,
      "new_path": "gdb/infrun.c"
    },
    {
      "type": "modify",
      "old_id": "7b0559479e114a050a8e3e8761cb7a44503b7a9a",
      "old_mode": 33188,
      "old_path": "gdb/symtab.c",
      "new_id": "ffb095a260cae16d89bbdd370c05b0aec526b113",
      "new_mode": 33188,
      "new_path": "gdb/symtab.c"
    },
    {
      "type": "modify",
      "old_id": "32e89930a30448385d899741fbe215bdcc057bba",
      "old_mode": 33188,
      "old_path": "gdb/symtab.h",
      "new_id": "70eeb353d8d9bcccd3f48dcd6307fab0fa8b22e4",
      "new_mode": 33188,
      "new_path": "gdb/symtab.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3086e8492314de16e4dde04ca693f7d63da6a49d",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.reverse/map-to-same-line.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "63f8c9c76b3fc16d30850072f5976fd8e92fd013",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.reverse/map-to-same-line.exp"
    }
  ]
}
