)]}'
{
  "commit": "48a0a7ca5e6f928bb707cb16aeae1ff8b678f101",
  "tree": "aa91f018169d3f881ca64f540bc056da6fbf22aa",
  "parents": [
    "40ae603e6e0fe21fd0c1677dcf4e137cf99c2ebe"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Thu Oct 17 11:56:47 2024 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Sun Oct 20 21:54:13 2024 +0100"
  },
  "message": "gdb: fix \u0027maint info inline-frames\u0027 after \u0027stepi\u0027\n\nThere is an invalid assumption within \u0027maint info inline-frames\u0027 which\ntriggers an assert:\n\n  (gdb) stepi\n  0x000000000040119d\t18\t  printf (\"Hello World\\n\");\n  (gdb) maintenance info inline-frames\n  ../../src/gdb/inline-frame.c:554: internal-error: maintenance_info_inline_frames: Assertion `it !\u003d inline_states.end ()\u0027 failed.\n  A problem internal to GDB has been detected,\n  further debugging may prove unreliable.\n  ----- Backtrace -----\n  ... etc ...\n\nThe problem is this assert:\n\n  /* Stopped threads always have cached inline_state information.  */\n  gdb_assert (it !\u003d inline_states.end ());\n\nIf you check out infrun.c and look in handle_signal_stop for the call\nto skip_inline_frames then you\u0027ll find a rather large comment that\nexplains that we don\u0027t always compute the inline state information for\nperformance reasons.  So the assertion is not valid.\n\nI\u0027ve updated the code so that if there is cached information we use\nthat, but if there is not then we just create our own information for\nthe current $pc of the current thread.\n\nThis means that, if there is cached information, GDB still correctly\nshows which frame the inferior is in (it might not be in the inner\nmost frame).\n\nIf there is no cached information we will always display the inferior\nas being in the inner most frame, but that\u0027s OK, because if\nskip_inline_frames has not been called then GDB will have told the\nuser they are in the inner most frame, so everything lines up.\n\nI\u0027ve extended the test to check \u0027maint info inline-frames\u0027 after a\nstepi which would previously have triggered the assertion.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8ba886c3efc84c4885cb0a529a26991fd1978cd3",
      "old_mode": 33188,
      "old_path": "gdb/inline-frame.c",
      "new_id": "759c526a7c200543f7a15841a8c799eb25ab63eb",
      "new_mode": 33188,
      "new_path": "gdb/inline-frame.c"
    },
    {
      "type": "modify",
      "old_id": "16be22a99635a72f152a8ad28f9dd0622d7d8b4e",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp",
      "new_id": "97e5d99e405127a1e594db047b74116ce56ad712",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp"
    }
  ]
}
