)]}'
{
  "commit": "b8d1a3a8ef9aff015ae963522287f7785bc552ec",
  "tree": "a3c28e75c66b3c70c0fe3bc2ea04ab9684113a81",
  "parents": [
    "aa2306fbfe2748854439c1ace9ec733560a0746c"
  ],
  "author": {
    "name": "Hui Li",
    "email": "lihui@loongson.cn",
    "time": "Mon Mar 06 11:55:15 2023 +0800"
  },
  "committer": {
    "name": "Tiezhu Yang",
    "email": "yangtiezhu@loongson.cn",
    "time": "Fri Apr 14 20:06:20 2023 +0800"
  },
  "message": "gdb/testsuite: Skip dump ihex for 64-bit address in gdb.base/dump.exp\n\n(1) Description of problem\n\nIn the current code, when execute the following test on LoongArch:\n\n$make check-gdb TESTS\u003d\"gdb.base/dump.exp\"\n```\nFAIL: gdb.base/dump.exp: dump array as value, intel hex\nFAIL: gdb.base/dump.exp: dump struct as value, intel hex\nFAIL: gdb.base/dump.exp: dump array as memory, ihex\nFAIL: gdb.base/dump.exp: dump struct as memory, ihex\n\n```\nThese tests passed on the X86_64,\n\n(2) Root cause\n\nOn LoongArch, variable intarray address 0x120008068 out of range for IHEX,\nso dump ihex test failed.\n\ngdb.base/dump.exp has the following code to check 64-bit address\n\n```\n # Check the address of a variable.  If it is bigger than 32-bit,\n # assume our target has 64-bit addresses that are not supported by SREC,\n # IHEX and TEKHEX.  We skip those tests then.\n set max_32bit_address \"0xffffffff\"\n set data_address [get_hexadecimal_valueof \"\u0026intarray\" 0x100000000]\n if {${data_address} \u003e ${max_32bit_address}} {\n    set is64bitonly \"yes\"\n}\n```\n\nWe check the \"\u0026intarray\" on different target as follow:\n\n```\n$gdb gdb/testsuite/outputs/gdb.base/dump/dump\n...\n(gdb) start\n...\n\nOn X86_64:\n(gdb) print /x \u0026intarray\n$1 \u003d 0x404060\n\nOn LoongArch:\n(gdb) print /x \u0026intarray\n$1 \u003d 0x120008068\n```\nThe variable address difference here is due to the link script\nof linker.\n\n```\nOn X86_64:\n$ld --verbose\n...\nPROVIDE (__executable_start \u003d SEGMENT_START(\"text-segment\", 0x400000));\n. \u003d SEGMENT_START(\"text-segment\", 0x400000) + SIZEOF_HEADERS;\n\nOn LoongArch:\n$ld --verbose\n...\nPROVIDE (__executable_start \u003d SEGMENT_START(\"text-segment\", 0x120000000));\n. \u003d SEGMENT_START(\"text-segment\", 0x120000000) + SIZEOF_HEADERS;\n\n```\n\n(3) How to fix\n\nBecause 64-bit variable address out of range for IHEX, it\u0027s not an\nfunctional problem for LoongArch. Refer to the handling of 64-bit\ntargets in this testsuite, use the \"is64bitonly\" flag to skip those\ntests for the target has 64-bit addresses.\n\nSigned-off-by: Hui Li \u003clihui@loongson.cn\u003e\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\nSigned-off-by: Tiezhu Yang \u003cyangtiezhu@loongson.cn\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bc0ab4a8805b66c512f5d6e70824c81ba4462814",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/dump.exp",
      "new_id": "b361d05d392f66ff5cb02f1cabb2289f93fcbd74",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/dump.exp"
    }
  ]
}
