)]}'
{
  "commit": "75ece951b544fa1b530340cfa8a04bfb6f5bbaae",
  "tree": "bdca111e435039b44112c81cc03f5f3aa7c2428d",
  "parents": [
    "de272a5e905afb20ec0a2c192538acf9c9103974"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Jul 24 16:32:35 2024 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Jul 24 16:32:35 2024 +0200"
  },
  "message": "[gdb/exp] Fix ptype $_creal/$_cimag\n\nConsider test.c, compiled with -g:\n...\n__complex__ float cf \u003d 1 + 2i;\nint main (void) { return 0; }\n...\n\nThe values of cf and its components are:\n...\n$ gdb -q a.out\nReading symbols from a.out...\n(gdb) p cf\n$1 \u003d 1 + 2i\n(gdb) p $_creal(cf)\n$2 \u003d 1\n(gdb) p $_cimag(cf)\n$3 \u003d 2\n...\nand their respective types are:\n...\n(gdb) ptype $1\ntype \u003d complex float\n(gdb) ptype $2\ntype \u003d float\n(gdb) ptype $3\ntype \u003d float\n...\n\nNow let\u0027s try that again, using ptype directly:\n...\n(gdb) ptype cf\ntype \u003d complex float\n(gdb) ptype $_creal(cf)\ntype \u003d int\n(gdb) ptype $_cimag(cf)\ntype \u003d int\n...\n\nThe last two types should have been float, not int.\n\nFix this by extending the internal function handlers creal_internal_fn and\ncimag_internal_fn with the noside parameter, such that we get instead:\n...\n(gdb) ptype $_creal(cf)\ntype \u003d float\n(gdb) ptype $_cimag(cf)\ntype \u003d float\n...\n\nTested on x86_64-linux.\n\nReviewed-By: Keith Seitz \u003ckeiths@redhat.com\u003e\n\nPR exp/31816\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d31816\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a0ead3eecf60f4c90d7b507f9af2d4ba393b7f80",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/complex-parts.exp",
      "new_id": "40f14f42307316099e2c9144c972fa754df61e09",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/complex-parts.exp"
    },
    {
      "type": "modify",
      "old_id": "9435900ba9410d71cbc94688515f466bf8ed00ab",
      "old_mode": 33188,
      "old_path": "gdb/value.c",
      "new_id": "09fb19b9bf8a1a3ab910987690c00eb0d7236a32",
      "new_mode": 33188,
      "new_path": "gdb/value.c"
    }
  ]
}
