)]}'
{
  "commit": "bcf43b33cfd3a8415bf272a3ca1af04ec8b9d622",
  "tree": "d0e81893c639d7a486043cf410dfde8c16956824",
  "parents": [
    "87c9b0289d73382cc72adb84d221b0a8ceb33ef8"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Jul 26 13:42:32 2023 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Jul 26 13:42:32 2023 +0200"
  },
  "message": "[gdb/testsuite] Drop -nostdlib in gdb.dwarf2/typeddwarf.exp\n\nAs reported in PR testsuite/30633, when running test-case\ngdb.dwarf2/typeddwarf.exp with target board native-gdbserver on Ubuntu\n22.04.2, we run into:\n...\n(gdb) continue^M\nContinuing.^M\n^M\nProgram received signal SIGSEGV, Segmentation fault.^M\n0x0000000000000001 in ?? ()^M\n(gdb) FAIL: gdb.dwarf2/typeddwarf.exp: runto: run to main\n...\n\nWe run into the FAIL as follows:\n- due to using gdbserver, we attach at the point of the first instruction, in\n  _start\n- we then set a breakpoint at main\n- the test-case is a .s file, that has main renamed to _start in the assembly,\n  but not in the debuginfo\n- setting a breakpoint at main sets the breakpoint at the same instruction\n  we\u0027re currently stopped at\n- continue doesn\u0027t hit the breakpoint, and we return out of _start, which\n  causes a sigsegv\n\nNote that this is for the amd64 case (using gdb.dwarf2/typeddwarf-amd64.S).\nFor the i386 case (using gdb.dwarf2/typeddwarf.S), setting a breakpoint in\nmain sets it one insn after function entry, and consequently the problem does\nnot occur.\n\nThe FAIL is a regression since commit 90cce6c0551 (\"[gdb/testsuite] Add nopie\nin a few test-cases\").\n\nWithout nopie the executable is PIE, with nopie it\u0027s static instead.\n\nIn the PIE case, we attach at the point of _start in the dynamic linker, and\nconsequently we do not skip the breakpoint in main, and also don\u0027t run into\nthe FAIL.\n\nFix this by:\n- removing the -nostdlib setting, and\n- renaming _start to main in both .S files.\n\nThe change to use -nostdlib and rename main to _start was originally added\nin commit 6edba76fe8b (submitted here:\nhttps://sourceware.org/pipermail/gdb-patches/2011-May/082657.html ) , I assume\nto fix the problem now fixed by using nopie.\n\nTested on x86_64-linux.\n\nReported-By: Simon Marchi \u003csimon.marchi@efficios.com\u003e\nTested-By: Simon Marchi \u003csimon.marchi@efficios.com\u003e\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d30633\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eecad231aa1e87ee8fe2b6f5beca7ea294834571",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S",
      "new_id": "ac84f4c593f12553c4eb35ee8efb5d6bbd4695e9",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S"
    },
    {
      "type": "modify",
      "old_id": "f9e8e5c1c1ef69e397281efe17cf64e17b1ba0dd",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.dwarf2/typeddwarf.S",
      "new_id": "654372c5dc0da07781bb4a4f55c0ac46eb959f12",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/typeddwarf.S"
    },
    {
      "type": "modify",
      "old_id": "1e46cab03efcdf2ee7b1bd506be30da2a0da29d9",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.dwarf2/typeddwarf.exp",
      "new_id": "3f96e9687c6fd734fb2d46f6efc8192def3fc4b5",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/typeddwarf.exp"
    }
  ]
}
