)]}'
{
  "commit": "da1f552dc79476275af282b65c5317ab3b4dbd9a",
  "tree": "ae9eb538fb263b9ce15654b44cf868e47923d6a7",
  "parents": [
    "ba22cd5e8852a3ad0a94fc268dbd244eb0aae4e7"
  ],
  "author": {
    "name": "Puputti, Matti",
    "email": "matti.puputti@intel.com",
    "time": "Wed Jul 26 12:29:15 2023 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Aug 16 09:55:52 2023 +0100"
  },
  "message": "gdb, infcmd: support jump command in multi-inferior case\n\nFixes the issue where jump failed if multiple inferiors run the same\nsource.\n\nSee the below example\n\n    $ gdb -q ./simple\n    Reading symbols from ./simple...\n    (gdb) break 2\n    Breakpoint 1 at 0x114e: file simple.c, line 2.\n    (gdb) run\n    Starting program: /temp/simple\n\n    Breakpoint 1, main () at simple.c:2\n    2         int a \u003d 42;\n    (gdb) add-inferior\n    [New inferior 2]\n    Added inferior 2 on connection 1 (native)\n    (gdb) inferior 2\n    [Switching to inferior 2 [\u003cnull\u003e] (\u003cnoexec\u003e)]\n    (gdb) info inferiors\n      Num  Description       Connection           Executable\n      1    process 6250      1 (native)           /temp/simple\n    * 2    \u003cnull\u003e            1 (native)\n    (gdb) file ./simple\n    Reading symbols from ./simple...\n    (gdb) run\n    Starting program: /temp/simple\n\n    Thread 2.1 \"simple\" hit Breakpoint 1, main () at simple.c:2\n    2         int a \u003d 42;\n    (gdb) info inferiors\n      Num  Description       Connection           Executable\n      1    process 6250      1 (native)           /temp/simple\n    * 2    process 6705      1 (native)           /temp/simple\n    (gdb) jump 3\n    Unreasonable jump request\n    (gdb)\n\nIn this example, jump fails because the debugger finds two different\nlocations, one for each inferior.\n\nSolution is to limit the search to the current program space.\n\nThis is done by having the jump_command function use\ndecode_line_with_current_source rather than\ndecode_line_with_last_displayed, which makes sense,\nthe *_current_source function always looks up a location based on the\ncurrent thread\u0027s location -- if a user is asking the current thread to\njump, then surely their destination should be relative to where the\ncurrent thread is located.\n\nThen, inside decode_line_with_current_source, the call to\ndecode_line_1 is updated to pass through the current program_space,\nwhich will limit the returned locations to those in the current\nprogram space.\n\nApproved-By: Andrew Burgess \u003caburgess@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "15702f848942d62b1f580953adce7998e6cfec34",
      "old_mode": 33188,
      "old_path": "gdb/infcmd.c",
      "new_id": "96c5feafb1aefbae03087894514548fba7107cc5",
      "new_mode": 33188,
      "new_path": "gdb/infcmd.c"
    },
    {
      "type": "modify",
      "old_id": "7d969f37fbf08b5a02fa71d99296e614f7702454",
      "old_mode": 33188,
      "old_path": "gdb/linespec.c",
      "new_id": "afa9eb4d3ac4d98cf47c1db98f454302c8747d7a",
      "new_mode": 33188,
      "new_path": "gdb/linespec.c"
    },
    {
      "type": "modify",
      "old_id": "032c4a6279d71315f3e394231e67f19ecaaf495c",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/jump.exp",
      "new_id": "63eec8ac8d52732fb155e68c1fa54d9ee810f90c",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/jump.exp"
    }
  ]
}
