)]}'
{
  "commit": "8cdf110a115c971f3184bbd30f515fd2cd6f72ef",
  "tree": "fba3f16375fcb1bf5030ae19f4971f5e82592e29",
  "parents": [
    "b6fb76ec6ef1e6643c87f29594d76c13aa94d876"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Feb 28 14:13:02 2025 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Feb 28 14:13:02 2025 +0100"
  },
  "message": "[gdb/testsuite] Fix gdb.base/nostdlib.exp on aarch64\n\nOn aarch64-linux, in test-case gdb.base/nostdlib.exp I run into:\n...\n(gdb) continue^M\nContinuing.^M\nwarning: Temporarily disabling breakpoints for unloaded shared library \\\n  \"/lib/ld-linux-aarch64.so.1\"^M\n^M\nBreakpoint 2, _start () at nostdlib.c:20^M\n20      {^M\n(gdb) FAIL: $exp: pie\u003dpie: continue to marker\n...\n\nThis happens as follows:\n- the test-case sets a breakpoint on *_start,\n- the breakpoint resolves to *_start in the executable,\n- the executable is started, and the breakpoint resolves to *_start in the\n  dynamic linker,\n- execution stops at *_start in the dynamic linker,\n- the test-case issues a continue, expecting to continue to the breakpoint on\n  marker,\n- while continuing, the dynamic linker is reported as unloaded,\n- the breakpoint again resolves to *_start in the executable,\n- execution stops at *_start in the executable, and\n- the test-case concludes that it failed to \"continue to marker\".\n\nThis doesn\u0027t happen on x86_64-linux.  There, after the executable is started,\nthe breakpoint again resolves to *_start in the exec.\n\nThis is similar to what happens when printing _start.\n\nOn aarch64-linux, we print the _start in the dynamic linker:\n...\n$ gdb -q -batch outputs/gdb.base/nostdlib/nostdlib-pie \\\n    -ex \"b _start\" \\\n    -ex run \\\n    -ex \"print _start\" \\\n    -ex \"info break\"\nBreakpoint 1 at 0x2bc: file nostdlib.c, line 23.\n\nBreakpoint 1.2, _start () at ../sysdeps/aarch64/dl-start.S:22\n22      ENTRY (_start)\n$1 \u003d {void (void)} 0xfffff7fd6ac0 \u003c_start\u003e\nNum     Type           Disp Enb Address            What\n1       breakpoint     keep y   \u003cMULTIPLE\u003e\n        breakpoint already hit 1 time\n1.1                         y   0x0000aaaaaaaa02bc in _start at nostdlib.c:23\n1.2                         y   0x0000fffff7fd6ac0 in _start at dl-start.S:22\n...\n\nOn x86_64-linux, we print the _start in the exec:\n...\nBreakpoint 1 at 0x2c5: file nostdlib.c, line 23.\n\nBreakpoint 1.2, 0x00007ffff7fe4f00 in _start () from \\\n  /lib64/ld-linux-x86-64.so.2\n$1 \u003d {void (void)} 0x5555555542c1 \u003c_start\u003e\nNum     Type           Disp Enb Address            What\n1       breakpoint     keep y   \u003cMULTIPLE\u003e\n\tbreakpoint already hit 1 time\n1.1                         y   0x00005555555542c5 in _start at nostdlib.c:23\n1.2                         y   0x00007ffff7fe4f00 \u003c_start\u003e\n...\n\nThe difference may be down to the availability of debug info for the _start in\nthe dynamic linker.\n\nFinally, the described scenario on aarch64-linux is not deterministic.  The\nbehavior depends on the dynamic linker being reported as unloaded, which has\nbeen classified as a GLIBC bug, so that might get fixed.\n\nIdeally this test-case would stop at both *_start in the executable and the\ndynamic linker, but in absense of a way to specify this reliably (see PR32748),\nfix this by making this a temporary breakpoint, ensuring that the breakpoint\nwill only trigger once.\n\nApproved-by: Kevin Buettner \u003ckevinb@redhat.com\u003e\n\nPR testsuite/32743\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d32743\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c32e87ebdbe7423a74d9293703b32ef04d5ef81",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/nostdlib.exp",
      "new_id": "f595bab5a5bc767769bb0ea28b3d749e49980727",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/nostdlib.exp"
    }
  ]
}
