)]}'
{
  "commit": "cc4c8e4ca8b9fe7f04e2ee4614cca96e9cc90044",
  "tree": "3dd3977ccad9f107fe7c88421a8b3bc5ed95eaf0",
  "parents": [
    "bf6187c92e596ef4bf934d430c570fa68a7f7176"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Mon Nov 17 22:38:23 2025 -0500"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Wed Nov 19 14:41:57 2025 -0500"
  },
  "message": "gdb/dwarf: use offset in dwarf_expr_context::read_mem\n\nThe `offset` variable is the offset within the passed-in object where\n`addr` falls.  We use it to verify whether `addr` falls within that\nobject\u0027s bounds, but then the memcpy fails to consider it, meaning that\nwe always copy from the beginning of the passed-in object, even if\n`addr` lands in the middle of the object.  Fix that by adding `offset`\nto the source argument of the memcpy.  I caught this by writing a patch\nlater in this series, so this fix is covered by the test added in that\nlater patch.\n\nAlso, I find it a bit odd to compute the offset of `addr` within the\npassed-in object, before knowing if `addr` even lands within the\npassed-in object\u0027s address range.  If `addr` is before the object\u0027s\naddress, it does an unsigned underflow, which I guess works, but is not\nreally intuitive.  Change it to check whether `addr` falls within the\nobject first, and if so, compute the offset of `addr` within the object.\n\nChange-Id: Ibbacab6d57e693e02e2bdfec4f3a7d42d9a1bd4b\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2125577bec224d0d48114ec166d7b5510e95498a",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/expr.c",
      "new_id": "aa7b8cd95481475a2081a03782cfa179e394431a",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/expr.c"
    }
  ]
}
