)]}'
{
  "commit": "ebc3d2cc69d62103a08a4fbf90d36dfdd6743d9b",
  "tree": "44d01d5f3a2b09e12437a3005f0fd105506fe684",
  "parents": [
    "5cb6772600a90b7a214b84277fc795c5d45e98fa"
  ],
  "author": {
    "name": "Tom Tromey",
    "email": "tromey@adacore.com",
    "time": "Thu May 07 12:08:40 2026 -0600"
  },
  "committer": {
    "name": "Tom Tromey",
    "email": "tromey@adacore.com",
    "time": "Fri May 15 14:27:09 2026 -0600"
  },
  "message": "Handle DW_AT_encoding on DW_TAG_enumeration_type\n\nA user pointed out a problem when printing certain values from an Ada\nenumeration type.  Investigation showed that the problem was that some\nenumeration constants were emitted using DW_FORM_data1, and were\nincorrectly sign-extended by gdb.\n\nFirst, this is yet another instance of a general problem with DWARF.\nSee https://sourceware.org/bugzilla/show_bug.cgi?id\u003d32680 for the\nanalysis.\n\nMeanwhile, it turns out that GCC implements an extension to handle\nthis scenario.  In particular, in non-strict mode, it will emit\nDW_AT_encoding using either DW_ATE_signed or DW_ATE_unsigned.  This\nwas done back in 2017 by Pierre-Marie, in support of Ada -- but then\nsomehow nothing was ever implemented on the gdb side.  For this see\nGCC commit f76f096e (\"DWARF: add DW_AT_encoding attributes for\nDW_TAG_enumeration_type DIEs\").\n\nThis patch adds the missing code to gdb.  The included test case shows\nthe bug that was originally reported.  I\u0027ve also included the snippet\nfrom Pierre-Marie\u0027s commit message for good measure.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d32680\nApproved-By: Andrew Burgess \u003caburgess@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4d8923d3ca7a950fe0428623f83aa8041319ec6b",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "f8ade564b0ba8dd18995262e41857bae8ce1f75d",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "84098027849c704243cdebd4fb8541e9752e7ec6",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/enum-sign.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6ef3c956917fb5922f62a64f47a8349bd29b89c6",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/enum-sign/prog.adb"
    }
  ]
}
