)]}'
{
  "commit": "315e4ebb4b7ef01da2f5c419edc74f39a0122d20",
  "tree": "ed8a010b58b1f7cb532b83d602b39adfc07397f8",
  "parents": [
    "ee3d46491537e343c276a7fc455dd94812fd3f72"
  ],
  "author": {
    "name": "Tom Tromey",
    "email": "tromey@adacore.com",
    "time": "Thu Feb 03 10:42:07 2022 -0700"
  },
  "committer": {
    "name": "Tom Tromey",
    "email": "tromey@adacore.com",
    "time": "Mon Mar 07 07:52:59 2022 -0700"
  },
  "message": "Handle non-ASCII identifiers in Ada\n\nAda allows non-ASCII identifiers, and GNAT supports several such\nencodings.  This patch adds the corresponding support to gdb.\n\nGNAT encodes non-ASCII characters using special symbol names.\n\nFor character sets like Latin-1, where all characters are a single\nbyte, it uses a \"U\" followed by the hex for the character.  So, for\nexample, thorn would be encoded as \"Ufe\" (0xFE being lower case\nthorn).\n\nFor wider characters, despite what the manual says (it claims\nShift-JIS and EUC can be used), in practice recent versions only\nsupport Unicode.  Here, characters in the base plane are represented\nusing \"Wxxxx\" and characters outside the base plane using\n\"WWxxxxxxxx\".\n\nGNAT has some further quirks here.  Ada is case-insensitive, and GNAT\nemits symbols that have been case-folded.  For characters in ASCII,\nand for all characters in non-Unicode character sets, lower case is\nused.  For Unicode, however, characters that fit in a single byte are\nconverted to lower case, but all others are converted to upper case.\n\nFurthermore, there is a bug in GNAT where two symbols that differ only\nin the case of \"Y WITH DIAERESIS\" (and potentially others, I did not\ncheck exhaustively) can be used in one program.  I chose to omit\nhandling this case from gdb, on the theory that it is hard to figure\nout the logic, and anyway if the bug is ever fixed, we\u0027ll regret\nhaving a heuristic.\n\nThis patch introduces a new \"ada source-charset\" setting.  It defaults\nto Latin-1, as that is GNAT\u0027s default.  This setting controls how \"U\"\ncharacters are decoded -- W/WW are always handled as UTF-32.\n\nThe ada_tag_name_from_tsd change is needed because this function will\nread memory from the inferior and interpret it -- and this caused an\nencoding failure on PPC when running a test that tries to read\nuninitialized memory.\n\nThis patch implements its own UTF-32-based case folder.  This avoids\nhost platform quirks, and is relatively simple.  A short Python\nprogram to generate the case-folding table is included.  It simply\nrelies on whatever version of Unicode is used by the host Python,\nwhich seems basically acceptable.\n\nTest cases for UTF-8, Latin-1, and Latin-3 are included.  This\nexercises most of the new code paths, aside from Y WITH DIAERESIS as\nnoted above.\n\n\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dc2cac1871bb67a166b6ec8338dfc39abd631cb8",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "068a6c46bc886165d4cb268e2644c203b8f1afc4",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f790f37e671a2cccb96084df2387690978025a7b",
      "new_mode": 33188,
      "new_path": "gdb/ada-casefold.h"
    },
    {
      "type": "modify",
      "old_id": "d3fce8d05e3ef867adb3e08501bb763981f02495",
      "old_mode": 33188,
      "old_path": "gdb/ada-exp.y",
      "new_id": "c974657dbcd68010be965bfc58bbd0027710a6e1",
      "new_mode": 33188,
      "new_path": "gdb/ada-exp.y"
    },
    {
      "type": "modify",
      "old_id": "9a7ab72f0e5f51c4ab52c2f910acee479480797f",
      "old_mode": 33188,
      "old_path": "gdb/ada-lang.c",
      "new_id": "12ff03538297370d1a6c3189d9e331fc9f8bff28",
      "new_mode": 33188,
      "new_path": "gdb/ada-lang.c"
    },
    {
      "type": "modify",
      "old_id": "a1e194236911d9909f740d07e020b43b5e710ad5",
      "old_mode": 33188,
      "old_path": "gdb/ada-lex.l",
      "new_id": "f698ad4dd57ee36ff546e9ced35b3a8bfc831793",
      "new_mode": 33188,
      "new_path": "gdb/ada-lex.l"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4c4986b84cb9886984bb18b943a313a8b92e9f2c",
      "new_mode": 33261,
      "new_path": "gdb/ada-unicode.py"
    },
    {
      "type": "modify",
      "old_id": "a80b61e622dd43a5ecfdf90dc52f5f7eee6414ba",
      "old_mode": 33188,
      "old_path": "gdb/doc/gdb.texinfo",
      "new_id": "5d1dcfd60524b7229701aa23b72b5f960ccfe5e5",
      "new_mode": 33188,
      "new_path": "gdb/doc/gdb.texinfo"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5ff55d66a688619efc330abef117ffa83ccd22bc",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-1.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b82a0e25184c2a11f8fff28eff06beb0dbe1c367",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-1/pack.adb"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "93180b4a4e9f6940e60546846807b2d4b78ead7c",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-1/pack.ads"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f0bd5abaa8b739f0325f8def556c43dbf7b96ffa",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-1/prog.adb"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "bafcdeb13e7f8baf1784414724a703c02987dc61",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-3.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b639b1c19a7d723ba52fd01c5de75deca183cf34",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-3/pack.adb"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d030d73003f7bc7d0689317a0a21e3b611eee557",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-3/pack.ads"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c029dd93d0248710149d3a7d994026a10cb1a7b1",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-latin-3/prog.adb"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4ab0ca54c630f14ee3a96cac2a08153a1acea6a9",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-utf-8.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f7893f20976ec752dda40119591e1b0c5e744b7a",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-utf-8/pack.adb"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f44c487295f91decd8b70c40c9ef06c08ec327f6",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-utf-8/pack.ads"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b9c1b17d4483abcb0d2a20abe8aa2febdd9e811e",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/non-ascii-utf-8/prog.adb"
    }
  ]
}
