)]}'
{
  "commit": "d6340aa42e2573297c93fe86d27b28ae0de0ecb0",
  "tree": "83713dc390b976e1182e54e11adede59c1ec5014",
  "parents": [
    "15b3c1756339dfc00c61a8ad1390222ce4bbca4f"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Wed Aug 27 15:55:45 2025 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Wed Aug 27 15:57:29 2025 -0400"
  },
  "message": "gdb/testsuite: use libtool to launch selftests\n\nWhen building GDB on Cygwin, gdb/gdb.exe is a libtool wrapper (which\nhappens to be a PE executable).  The real executable is at\ngdb/.libs/gdb.exe.  The \"does gdb have debug info test\" that\n_selftest_setup does is bogus, because it loads the libtool wrapper\n(which doesn\u0027t have debug info), doesn\u0027t see any debug info, and thus\nthe test is skipped.\n\nThe \"correct\" way to deal with libtool wrappers is to run the shell\ncommand you want to run under `libtool --mode\u003dexecute`.  That will\nreplace any path resembling to a libtool wrapper with the real\nexecutable path.  But it will also add to the environment the library\npaths necessary for this executable to find the libraries it needs.\n\nTherefore, modify the `do_self_tests` proc to:\n\n  - run the top-level GDB commands under `libtool --mode\u003dexecute`\n  - pass the path to the inferior GDB on the command-line of the\n    top-level, so that it gets replaced with the real executable\u0027s path\n\nHowever, the \"file\" command was previously used to detect the presence\nof debug info in the GDB executable.  It\u0027s not easy to implement this\ncheck when loading the executable directly on the command line. So, add\na separate proc, _selftest_check_executable_debug_info, that spawns a\ntemporary GDB and does the debug info check through the file command.\nThis proc uses libtool to obtain the path to the real executable.\n\nWhen building, we use the bundled libtool.m4 at the top of the tree.\nThis means that the libtool system package, and therefore the libtool\nbinary, might not be available.  Check for the presence of the libtool\nbinary first, and only do the conversion if it is found.  If it is not\nfound, the test should still work on platforms that don\u0027t require the\nconversion.\n\nWith this commit, the test runs on Cygwin, even though there are\nfailures later.\n\nChange-Id: Ie7b712cdc84671a5a017655a7e41687ff23f906c\nReviewed-By: Keith Seitz \u003ckeiths@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eb31b55b6ecbd608e293063a441ce37c3a3b2164",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/selftest-support.exp",
      "new_id": "a8a33c81ab9f37efa7504e82ab16960985a19388",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/selftest-support.exp"
    }
  ]
}
