)]}'
{
  "commit": "0833fb8f4bc8d8f369d0d76f604c248b4ad1de1d",
  "tree": "72edcfce64b8951b958fbef81cf678191c5ceb7c",
  "parents": [
    "6d0aebbcff0636fb11fb26116ef7ae53ecca314f"
  ],
  "author": {
    "name": "Luis Machado",
    "email": "luis.machado@arm.com",
    "time": "Thu Aug 04 00:00:26 2022 +0100"
  },
  "committer": {
    "name": "Luis Machado",
    "email": "luis.machado@arm.com",
    "time": "Wed Sep 07 09:17:32 2022 +0100"
  },
  "message": "Fix endianness handling for arm record self tests\n\nv2:\n\n- Add 32-bit Arm instruction selftest\n- Refactored abstract memory reader into abstract instruction reader\n- Adjusted code to use templated type and to use host endianness as\n  opposed to target endianness.\n\nThe arm record tests handle 16-bit and 32-bit thumb instructions, but the\ncode is laid out in a way that handles the 32-bit thumb instructions as\ntwo 16-bit parts.\n\nThis is fine, but it is prone to host-endianness issues given how the two\n16-bit parts are stored and how they are accessed later on. Arm is\nlittle-endian by default, so running this test with a GDB built with\n--enable-targets\u003dall and on a big endian host will run into the following:\n\nRunning selftest arm-record.\nProcess record and replay target doesn\u0027t support syscall number -2036195\nProcess record does not support instruction 0x7f70ee1d at address 0x0.\nSelf test failed: self-test failed at ../../binutils-gdb/gdb/arm-tdep.c:14482\n\nIt turns out the abstract memory reader class is more generic than it needs to\nbe, and we can simplify the code a bit by assuming we have a simple instruction\nreader that only reads up to 4 bytes, which is the length of a 32-bit\ninstruction.\n\nInstead of returning a bool, we return instead the instruction that has been\nread. This way we avoid having to deal with the endianness conversion, and use\nthe host endianness instead. The Arm selftests can be executed on non-Arm\nhosts.\n\nWhile at it, Tom suggested adding a 32-bit Arm instruction selftest to increase\nthe coverage of the selftests.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d29432\n\nCo-authored-by: Tom de Vries \u003ctdevries@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0091d14708fec23f78240ecbb7cdc435b1d62970",
      "old_mode": 33188,
      "old_path": "gdb/arm-tdep.c",
      "new_id": "ead9bbf46c5c28662ea7e748dfd85a21b320d9cc",
      "new_mode": 33188,
      "new_path": "gdb/arm-tdep.c"
    }
  ]
}
