)]}'
{
  "commit": "8dd54de0a83dcf57fdaef68902c73e35e0ea274d",
  "tree": "5775750afc2708d2d3bbd008b0b92109ab0c3efd",
  "parents": [
    "3e02c4891dcb37a0a12cff53232342f6d160b2c5"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon May 26 15:15:31 2025 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon May 26 15:15:31 2025 +0200"
  },
  "message": "[gdb/breakpoints] Rename bp_location_is_less_than to bp_location_ptr_is_less_than\n\nIn breakpoint.c, we have:\n...\n/* A comparison function for bp_location AP and BP being interfaced to\n   std::sort.  Sort elements primarily by their ADDRESS (no matter what\n   bl_address_is_meaningful says), secondarily by ordering first\n   permanent elements and tertiarily just ensuring the array is sorted\n   stable way despite std::sort being an unstable algorithm.  */\n\nstatic int\nbp_location_is_less_than (const bp_location *a, const bp_location *b)\n...\n\nThere are few problems here:\n- the return type is int.  While std::sort allows this, because int is\n  convertible to bool, it\u0027s clearer to use bool directly,\n- it\u0027s not abundantly clear from either function name or comment that we can\n  use this to sort std::vector\u003cbp_location *\u003e but not\n  std::vector\u003cbp_location\u003e, and\n- the comment mentions AP and BP, but there are no such parameters.\n\nFix this by:\n- changing the return type to bool,\n- renaming the function to bp_location_ptr_is_less_than and mentioning\n  std::vector\u003cbp_location *\u003e in the comment, and\n- updating the comment to use the correct parameter names.\n\nTested on x86_64-linux.\n\nReviewed-By: Guinevere Larsen \u003cguinevere@redhat.com\u003e\nApproved-By: Andrew Burgess \u003caburgess@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f44ac457b22bc1a3c3c33d08e8ed076edcaff112",
      "old_mode": 33188,
      "old_path": "gdb/breakpoint.c",
      "new_id": "bbafa096309c472fa1dd686f4a643ced87c80ded",
      "new_mode": 33188,
      "new_path": "gdb/breakpoint.c"
    }
  ]
}
