)]}'
{
  "commit": "3cfa137ca5327c759fd192ad1f0fdc981bf05b82",
  "tree": "29b70d68556e9361d812e663666436514cca17ce",
  "parents": [
    "4e943705e3e8a5a9448d087502bcb390a694ad02"
  ],
  "author": {
    "name": "Guinevere Larsen",
    "email": "guinevere@redhat.com",
    "time": "Thu Jun 20 14:52:35 2024 -0300"
  },
  "committer": {
    "name": "Guinevere Larsen",
    "email": "guinevere@redhat.com",
    "time": "Fri Nov 22 17:38:31 2024 -0300"
  },
  "message": "gdb: Introduce RAII signal handler setter\n\nThis patch is motivated by the wait function for the record-full target,\nthat would install a custom signal handler for SIGINT, but could throw\nan exception and never reset the SIGINT handler.  This is clearly a bad\nidea, so this patch introduces the class scoped_signal_handler in a new\n.h file.  The file is added to gdbsupport, even though only gdb code is\nusing it, because it feels like an addition that would be useful for\nmore than just directly gdb.\n\nThe implementation of the RAII class is based on the implementation\non gdb/utils.c. That is, it uses preprocessor ifdefs to probe for\nsigaction support, and uses it if possible, defaulting to a raw call to\nsignal only if sigaction isn\u0027t supported. sigaction is preferred based\non the \"portability\" section of the manual page for the signal function.\n\nThere are 3 places where this class can just be dropped in,\ngdb/record-full.c, gdb/utils.c and gdb/extension.c. This third place\nalready had a specialized RAII signal handler setter, but it is\nsubstituted for the new general purpose one.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ec1aa138872cd52e5ecd0afb6f5d9b1131d8e1db",
      "old_mode": 33188,
      "old_path": "gdb/extension.c",
      "new_id": "47f569148023a821ff78fd806a7a58f845ac7708",
      "new_mode": 33188,
      "new_path": "gdb/extension.c"
    },
    {
      "type": "modify",
      "old_id": "d48718a2793c9b90f12167f71575f34fc8af9412",
      "old_mode": 33188,
      "old_path": "gdb/record-full.c",
      "new_id": "7d7959ffe683cb300306ed22a05233d28bb506c5",
      "new_mode": 33188,
      "new_path": "gdb/record-full.c"
    },
    {
      "type": "modify",
      "old_id": "bd3a1f1c48ece08e0577b57b899b03b0ed69538a",
      "old_mode": 33188,
      "old_path": "gdb/utils.c",
      "new_id": "6f2055e299d363a9504259cfbeb2c12ddde73bdf",
      "new_mode": 33188,
      "new_path": "gdb/utils.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3dffd795b73dd65aa760bde40ef1c0b9921584f7",
      "new_mode": 33188,
      "new_path": "gdbsupport/scoped_signal_handler.h"
    }
  ]
}
