)]}'
{
  "commit": "ebed2c2c43aeaa6e4e603d07e930eceda510c02d",
  "tree": "c1b61b96dc07e415eade0d13017d57030627ab07",
  "parents": [
    "2711e4754fc4d9ed594491d3e87a37d0ffa165ed"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed May 21 10:16:08 2025 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Thu May 22 19:14:01 2025 +0100"
  },
  "message": "gdb: reorder checks in validate_exec_file\n\nWhile reviewing another patch I was briefly confused by a call to\ntarget_pid_to_exec_file coming from validate_exec_file while attaching\nto a process when I had not previously set an executable.\n\nThe current order of actions in validate_exec_file is:\n\n  1. Get name of current executable.\n  2. Get name of executable from the current inferior.\n  3. If either of (1) or (2) return NULL, then there\u0027s nothing to\n     check, early return.\n\nI think it would be cleaner if we instead did this:\n\n  1. Get name of current executable.\n  3. If (1) returned NULL then there\u0027s nothing to check, early return.\n  3. Get name of executable from the current inferior.\n  4. If (3) returned NULL then there\u0027s nothing to check, early return.\n\nThis does mean there\u0027s an extra step, but I don\u0027t think the code is\nany more complex really, and we now avoid trying to extract the name\nof the executable from the current inferior unless we really need it.\nThis avoids the target_pid_to_exec_file call that I was seeing, which\nfor remote targets does avoid a packet round trip (not that I\u0027m\nselling this as an \"optimisation\", just noting the change).\n\nThere should be no user visible changes after this commit.\n\nApproved-By: Simon Marchi \u003csimon.marchi@efficios.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c7979a2bd94f2dae94671a58445e7544215d613b",
      "old_mode": 33188,
      "old_path": "gdb/exec.c",
      "new_id": "33183ab2de80e184919d09113a0d95c21944d733",
      "new_mode": 33188,
      "new_path": "gdb/exec.c"
    }
  ]
}
