)]}'
{
  "commit": "61b9faef51ddd40f9e6de0e41b66c41cd943d868",
  "tree": "ffe54c638d6e6a4859ba371fcfb8ee602d6514d3",
  "parents": [
    "7900b17e334b114ff149c5a3da7884e6ab3f7136"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Sat Jul 30 08:02:20 2022 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Sat Jul 30 08:02:20 2022 +0200"
  },
  "message": "[gdb/testsuite] Fix gdb.ada/literals.exp with aarch64\n\nOn aarch64-linux, I run into:\n...\n(gdb) print 16#ffffffffffffffff#^M\n$7 \u003d 18446744073709551615^M\n(gdb) FAIL: gdb.ada/literals.exp: print 16#ffffffffffffffff#\n...\nwhile on x86_64-linux instead, I get:\n...\n(gdb) print 16#ffffffffffffffff#^M\n$7 \u003d -1^M\n(gdb) PASS: gdb.ada/literals.exp: print 16#ffffffffffffffff#\n...\n\nWe can easily reproduce this on x86_64-linux using:\n...\n$ gdb -q -batch -ex \"set lang ada\" -ex \"set arch i386\" \\\n  -ex \"print 16#ffffffffffffffff#\"\n$1 \u003d -1\n$ gdb -q -batch -ex \"set lang ada\" -ex \"set arch aarch64\" \\\n  -ex \"print 16#ffffffffffffffff#\"\n$1 \u003d 18446744073709551615\n...\n\nWith i386, we have:\n...\n(gdb) p int_bits\n$3 \u003d 32\n(gdb) p long_bits\n$4 \u003d 32\n(gdb) p long_long_bits\n$5 \u003d 64\n...\nand so in processInt we hit the fits-in-unsigned-long-long case where we use\nas type long long:\n...\n      /* Note: Interprets ULLONG_MAX as -1.  */\n      yylval.typed_val.type \u003d type_long_long (par_state);\n...\n\nWith aarch64, we have instead:\n...\n(gdb) p int_bits\n$1 \u003d 32\n(gdb) p long_bits\n$2 \u003d 64\n(gdb) p long_long_bits\n$3 \u003d 64\n...\nand so in processInt we hit the fits-in-unsigned-long case where we use\nas type unsigned long:\n...\n      yylval.typed_val.type\n        \u003d builtin_type (par_state-\u003egdbarch ())-\u003ebuiltin_unsigned_long;\n...\n\nIt\u0027s not clear why for ada we\u0027re using long long for the\nfits-in-unsigned-long-long case.\n\nFix this by using unsigned long long for the fits-in-unsigned-long-long case,\nmeaning the new reference output is 18446744073709551615 instead of -1.\n\nTested on x86_64-linux.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d29416\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "002eb811e4181865ff069ef218a50f6d75d11e80",
      "old_mode": 33188,
      "old_path": "gdb/ada-lex.l",
      "new_id": "ed88d502e9f7124575b0c3e18a66f99cdca34e0e",
      "new_mode": 33188,
      "new_path": "gdb/ada-lex.l"
    },
    {
      "type": "modify",
      "old_id": "a6ac89b540fdb5eace0c06ffa72fb18529fd5b7a",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.ada/literals.exp",
      "new_id": "6badc857292b024409fdae393ca10d55f8d0b39b",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.ada/literals.exp"
    }
  ]
}
