)]}'
{
  "commit": "ff4e23032673f78177d5d47e7e9812238eaa6553",
  "tree": "591f322cb442f6fc8143dd1e52b42a6da092a048",
  "parents": [
    "e346d50a89106a52fa1545db5eade2a25a4932f0"
  ],
  "author": {
    "name": "Jon Turney",
    "email": "jon.turney@dronecode.org.uk",
    "time": "Tue Jan 12 22:49:09 2016 +0000"
  },
  "committer": {
    "name": "Pedro Alves",
    "email": "pedro@palves.net",
    "time": "Fri Feb 23 16:16:18 2024 +0000"
  },
  "message": "Teach gdb how to unwind cygwin _sigbe and sigdelayed frames\n\nThe majority of functions in the cygwin DLL are wrapped by routines\nwhich use an an alternate stack to return via a signal handler if a\nsignal occured while inside the function. (See [1],[2])\n\nAt present, these frames cannot be correctly unwound by gdb.  There\ndoesn\u0027t seem to currently be a way to correctly describe these frames\nusing DWARF CFI.\n\nSo instead, write a custom unwinder for _sigbe and sigdelayed frames,\nwhich gets the return address from the alternate stack.\n\nThe offset of tls::stackptr from TIB.stacktop is determined by analyzing\nthe code in _sigbe or sigdelayed.\n\nThis can backtrace from _sigbe and from a sighandler through sigdelayed.\n\nImplemented for amd64 and i386\n\nIssues:\n\n1. We should detect if we are in the wrapper after the return address\nhas been popped off the alternate stack, and if so, fetch the return\naddress from the register it\u0027s been popped into.\n\n2. If there are multiple _sigbe or sigdelayed stack frames to be\nunwound, this only unwinds the first one correctly, because we don\u0027t\nunwind the value of the alternate stack pointer itself.\n\nThis is no worse than currently, when we can\u0027t even unwind one of\nthese frame correctly, but isn\u0027t quite correct.\n\nI guess this could be handled by defining a pseudo-register to track\nits value as we unwind the stack.\n\n[1] https://sourceware.org/git/gitweb.cgi?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dwinsup/cygwin/gendef\n[2] https://sourceware.org/git/gitweb.cgi?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dwinsup/cygwin/how-signals-work.txt\n\nCo-Authored-By: Pedro Alves \u003cpedro@palves.net\u003e\nChange-Id: I4a0d02c1b85d0aadaab2de3abd584eb4bda5b5cc",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c5169fd98c5e935b47099a103989e56c70a67bf",
      "old_mode": 33188,
      "old_path": "gdb/amd64-windows-tdep.c",
      "new_id": "af17886c0806f96af6bf1a412c1bd2a0328ee6d2",
      "new_mode": 33188,
      "new_path": "gdb/amd64-windows-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "cd5c580a3e8dc3a212934a45f513db3f5f008734",
      "old_mode": 33188,
      "old_path": "gdb/i386-windows-tdep.c",
      "new_id": "e8ed043be8a0ac935259280e9b1f4d9538c9f226",
      "new_mode": 33188,
      "new_path": "gdb/i386-windows-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "19a42a49a98207124fb3b882f1dc7f330d9c50ed",
      "old_mode": 33188,
      "old_path": "gdb/windows-tdep.c",
      "new_id": "361ccdd0dcbfb3694a4d65abc0636e52efa72f7a",
      "new_mode": 33188,
      "new_path": "gdb/windows-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "e786a1d3eb9851e5df0c9da4bb099b341675b572",
      "old_mode": 33188,
      "old_path": "gdb/windows-tdep.h",
      "new_id": "f122f7aaa61ca28fb5aad8598b5cb2a3a62e278c",
      "new_mode": 33188,
      "new_path": "gdb/windows-tdep.h"
    }
  ]
}
