)]}'
{
  "commit": "bae19789c0a2d4e88b5b441acebe4d9e1522cd67",
  "tree": "0e87db154b2957b716aa3a3432a95efdbccbaab6",
  "parents": [
    "4a9efa5d63b2253a595ff9d6944415bf8cbfe408"
  ],
  "author": {
    "name": "Maciej W. Rozycki",
    "email": "macro@embecosm.com",
    "time": "Fri Feb 10 23:49:19 2023 +0000"
  },
  "committer": {
    "name": "Maciej W. Rozycki",
    "email": "macro@embecosm.com",
    "time": "Fri Feb 10 23:49:19 2023 +0000"
  },
  "message": "GDB: Ignore `max-value-size\u0027 setting with value history accesses\n\nWe have an inconsistency in value history accesses where array element\naccesses cause an error for entries exceeding the currently selected\n`max-value-size\u0027 setting even where such accesses successfully complete\nfor elements located in the inferior, e.g.:\n\n  (gdb) p/d one\n  $1 \u003d 0\n  (gdb) p/d one_hundred\n  $2 \u003d {0 \u003crepeats 100 times\u003e}\n  (gdb) p/d one_hundred[99]\n  $3 \u003d 0\n  (gdb) set max-value-size 25\n  (gdb) p/d one_hundred\n  value requires 100 bytes, which is more than max-value-size\n  (gdb) p/d one_hundred[99]\n  $7 \u003d 0\n  (gdb) p/d $2\n  value requires 100 bytes, which is more than max-value-size\n  (gdb) p/d $2[99]\n  value requires 100 bytes, which is more than max-value-size\n  (gdb)\n\nAccording to our documentation the `max-value-size\u0027 setting is a safety\nguard against allocating an overly large amount of memory.  Moreover a\nstatement in documentation says, concerning this setting, that: \"Setting\nthis variable does not affect values that have already been allocated\nwithin GDB, only future allocations.\"  While in the implementer-speak\nthe sentence may be unambiguous I think the outside user may well infer\nthat the setting does not apply to values previously printed.\n\nTherefore rather than just fixing this inconsistency it seems reasonable\nto lift the setting for value history accesses, under an implication\nthat by having been retrieved from the debuggee they have already passed\nthe safety check.  Do it then, by suppressing the value size check in\n`value_copy\u0027 -- under an observation that if the original value has been\nalready loaded (i.e. it\u0027s not lazy), then it must have previously passed\nsaid check -- making the last two commands succeed:\n\n  (gdb) p/d $2\n  $8 \u003d {0 \u003crepeats 100 times\u003e}\n  (gdb) p/d $2 [99]\n  $9 \u003d 0\n  (gdb)\n\nExpand the testsuite accordingly, covering both value history handling\nand the use of `value_copy\u0027 by `make_cv_value\u0027, used by Python code.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cc9ae775e38b776fc403ea1c5346fc4dd6d1305e",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/max-value-size.exp",
      "new_id": "199067f5914bcac17cc466a1bdf10a119a512f4d",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/max-value-size.exp"
    },
    {
      "type": "modify",
      "old_id": "97d560476fc3f8fb1e8744fadffdbd65b26ccfc3",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.python/py-xmethods.exp",
      "new_id": "0174b179e36d9813bee35d41a2c81311b1b53103",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-xmethods.exp"
    },
    {
      "type": "modify",
      "old_id": "61d28535e94ae83acabd8ea1e734586f4322137c",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.python/py-xmethods.py",
      "new_id": "20dc397b924d8ab7ce0053e880f4a02e9bee66ec",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-xmethods.py"
    },
    {
      "type": "modify",
      "old_id": "e3f60e7e9891219cb908c7557ef1445a6886c30b",
      "old_mode": 33188,
      "old_path": "gdb/value.c",
      "new_id": "09e10b9a8b158ace108275107e86290ac0b25d3e",
      "new_mode": 33188,
      "new_path": "gdb/value.c"
    }
  ]
}
