)]}'
{
  "commit": "7438771288f1acd5ab25277188a75ce9e48e256c",
  "tree": "7f261a382ee420c2a26d6ed2f0f9305fb5285359",
  "parents": [
    "4a2530397b87c66bd45b21cf20e2cc12bf26879f"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Fri Nov 17 19:55:58 2023 +0000"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Fri Nov 17 20:01:35 2023 +0000"
  },
  "message": "gdb: remove regcache\u0027s address space\n\nWhile looking at the regcache code, I noticed that the address space\n(passed to regcache when constructing it, and available through\nregcache::aspace) wasn\u0027t relevant for the regcache itself.  Callers of\nregcache::aspace use that method because it appears to be a convenient\nway of getting the address space for a thread, if you already have the\nregcache.  But there is always another way to get the address space, as\nthe callers pretty much always know which thread they are dealing with.\nThe regcache code itself doesn\u0027t use the address space.\n\nThis patch removes anything related to address_space from the regcache\ncode, and updates callers to get it from the thread in context.  This\nremoves a bit of unnecessary complexity from the regcache code.\n\nThe current get_thread_arch_regcache function gets an address_space for\nthe given thread using the target_thread_address_space function (which\ncalls the target_ops::thread_address_space method).  This suggest that\nthere might have been the intention of supporting per-thread address\nspaces.  But digging through the history, I did not find any such case.\nMaybe this method was just added because we needed a way to get an\naddress space from a ptid (because constructing a regcache required an\naddress space), and this seemed like the right way to do it, I don\u0027t\nknow.\n\nThe only implementations of thread_address_space and\nprocess_stratum_target::thread_address_space and\nlinux_nat_target::thread_address_space, which essentially just return\nthe inferior\u0027s address space.  And thread_address_space is only used in\nthe current get_thread_arch_regcache, which gets removed.  So, I think\nthat the thread_address_space target method can be removed, and we can\nassume that it\u0027s fine to use the inferior\u0027s address space everywhere.\nCallers of regcache::aspace are updated to get the address space from\nthe relevant inferior, either using some context they already know\nabout, or in last resort using the current global context.\n\nSo, to summarize:\n\n - remove everything in regcache related to address spaces\n - in particular, remove get_thread_arch_regcache, and rename\n   get_thread_arch_aspace_regcache to get_thread_arch_regcache\n - remove target_ops::thread_address_space, and\n   target_thread_address_space\n - adjust all users of regcache::aspace to get the address space another\n   way\n\nChange-Id: I04fd41b22c83fe486522af7851c75bcfb31c88c7\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1102eb0d13b870083023445dad89dcf2b453a26a",
      "old_mode": 33188,
      "old_path": "gdb/aarch64-fbsd-tdep.c",
      "new_id": "681149b1c6ce975d0d90d2a6e5f887a27bd1093f",
      "new_mode": 33188,
      "new_path": "gdb/aarch64-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "2b633cd479cc6187394e8dce9000701134bbfd70",
      "old_mode": 33188,
      "old_path": "gdb/amd64-fbsd-tdep.c",
      "new_id": "5b0896fcd417a9a4d5206a8216b7c31d14b2c777",
      "new_mode": 33188,
      "new_path": "gdb/amd64-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "b6aa42a4fd056bf65262ec77ecac0be23e575d11",
      "old_mode": 33188,
      "old_path": "gdb/arm-fbsd-tdep.c",
      "new_id": "90273a3f5ef8d5924abfebdd22481904b5c6d41c",
      "new_mode": 33188,
      "new_path": "gdb/arm-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "588e9e2a34578d35741a928491d14aab17322bb7",
      "old_mode": 33188,
      "old_path": "gdb/darwin-nat.c",
      "new_id": "0de476b022bbc493dad1d97b1f041f3221c134d0",
      "new_mode": 33188,
      "new_path": "gdb/darwin-nat.c"
    },
    {
      "type": "modify",
      "old_id": "6d5e6cddb9b36b7246f813a498a4fa26f15a3ad3",
      "old_mode": 33188,
      "old_path": "gdb/displaced-stepping.c",
      "new_id": "9d45013e62cee9fb8b8f4a4ef09f0f59dc8060e2",
      "new_mode": 33188,
      "new_path": "gdb/displaced-stepping.c"
    },
    {
      "type": "modify",
      "old_id": "4a46ccb9abc0485b2c2b160aa52d858641b113d2",
      "old_mode": 33188,
      "old_path": "gdb/frame.c",
      "new_id": "dfd92991d99a03f7a30beb653176ae72333c3bf7",
      "new_mode": 33188,
      "new_path": "gdb/frame.c"
    },
    {
      "type": "modify",
      "old_id": "0142db82670d9a2e6449ca334c0df103ceddf2a9",
      "old_mode": 33188,
      "old_path": "gdb/gcore-elf.c",
      "new_id": "8b4177cfe257d853ce17f8818c9a2a774c383a3a",
      "new_mode": 33188,
      "new_path": "gdb/gcore-elf.c"
    },
    {
      "type": "modify",
      "old_id": "f8c2758c2b0c0aca87b5db2a8b398d612a1622b0",
      "old_mode": 33188,
      "old_path": "gdb/i386-fbsd-tdep.c",
      "new_id": "58d06e3676704e60e321a168039b4933ce4dd487",
      "new_mode": 33188,
      "new_path": "gdb/i386-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "62b306ff347935f4926faf03f98db9017cdced32",
      "old_mode": 33188,
      "old_path": "gdb/infrun.c",
      "new_id": "785a4e198ec2bb969baa48dbb3260c234a5950b8",
      "new_mode": 33188,
      "new_path": "gdb/infrun.c"
    },
    {
      "type": "modify",
      "old_id": "8951b34e192109c41e5cac930717c3798bed5280",
      "old_mode": 33188,
      "old_path": "gdb/linux-nat.c",
      "new_id": "d3e9560c2fc53de9b7c5687c943c1fc2e9fe8749",
      "new_mode": 33188,
      "new_path": "gdb/linux-nat.c"
    },
    {
      "type": "modify",
      "old_id": "cf236160b4a64b936afe6087b2c5ffb670c4da44",
      "old_mode": 33188,
      "old_path": "gdb/linux-nat.h",
      "new_id": "cce8bb3ddcc568d1169aade4c778e7131dbc8e94",
      "new_mode": 33188,
      "new_path": "gdb/linux-nat.h"
    },
    {
      "type": "modify",
      "old_id": "4355b6483fea064defac96da0678c072190cc01c",
      "old_mode": 33188,
      "old_path": "gdb/ppc-fbsd-tdep.c",
      "new_id": "2238a22afd90ecf1db7e7f13702a297878a9cf68",
      "new_mode": 33188,
      "new_path": "gdb/ppc-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "e41278dbe6a8d64a714a6fe588126920b3677c30",
      "old_mode": 33188,
      "old_path": "gdb/proc-service.c",
      "new_id": "48f3dec5587143862a9f8a520201f5bc9f604066",
      "new_mode": 33188,
      "new_path": "gdb/proc-service.c"
    },
    {
      "type": "modify",
      "old_id": "173c3ecad1345a3f4b94fcfea765c8daa2539b22",
      "old_mode": 33188,
      "old_path": "gdb/process-stratum-target.c",
      "new_id": "017d26e28df1b97e5c903e74263a506d4e737f2d",
      "new_mode": 33188,
      "new_path": "gdb/process-stratum-target.c"
    },
    {
      "type": "modify",
      "old_id": "f4968ec47019135d00aed67ee6ea62d274bfb068",
      "old_mode": 33188,
      "old_path": "gdb/process-stratum-target.h",
      "new_id": "f35b59978f8200c0cf76e2a6c9bef43b634acf9c",
      "new_mode": 33188,
      "new_path": "gdb/process-stratum-target.h"
    },
    {
      "type": "modify",
      "old_id": "2ee08e6d54fb9c9d7d66b0230363a94c0e3d7abb",
      "old_mode": 33188,
      "old_path": "gdb/record-full.c",
      "new_id": "1cea869e88bb1c7162f15aa8c6acc89e3f44646b",
      "new_mode": 33188,
      "new_path": "gdb/record-full.c"
    },
    {
      "type": "modify",
      "old_id": "2e48c025809148e1779ff469b167ec7ea8387577",
      "old_mode": 33188,
      "old_path": "gdb/regcache.c",
      "new_id": "48a926ed44832d626ab435c7cce1275ca5d34bfe",
      "new_mode": 33188,
      "new_path": "gdb/regcache.c"
    },
    {
      "type": "modify",
      "old_id": "57ddac465f09ed220337dd0af97d6253a2a4b979",
      "old_mode": 33188,
      "old_path": "gdb/regcache.h",
      "new_id": "f73f08a44ab7beb8008b0cb8706cf716bb7ccc56",
      "new_mode": 33188,
      "new_path": "gdb/regcache.h"
    },
    {
      "type": "modify",
      "old_id": "ce5addade6f7c7bd3e49078ed299e319bd97c211",
      "old_mode": 33188,
      "old_path": "gdb/remote.c",
      "new_id": "501270041d84d397c61e7a90528db475b8cfc132",
      "new_mode": 33188,
      "new_path": "gdb/remote.c"
    },
    {
      "type": "modify",
      "old_id": "8ae4a1953bcc2694bb4d9d17b6de8032996b31e1",
      "old_mode": 33188,
      "old_path": "gdb/riscv-fbsd-tdep.c",
      "new_id": "9050cf425ec10e3f6578520689591554f7f68e5e",
      "new_mode": 33188,
      "new_path": "gdb/riscv-fbsd-tdep.c"
    },
    {
      "type": "modify",
      "old_id": "537acdb57548341955eea5e618140d2c784e54e8",
      "old_mode": 33188,
      "old_path": "gdb/sol-thread.c",
      "new_id": "61331f9d40fc90d36a33e265879c538be2cc772b",
      "new_mode": 33188,
      "new_path": "gdb/sol-thread.c"
    },
    {
      "type": "modify",
      "old_id": "e21190a30f159cc696fcd1320f76c7c3026acc44",
      "old_mode": 33188,
      "old_path": "gdb/solib-svr4.c",
      "new_id": "b02e8094ac6b25d54524c0a98ca2f7354e95dd16",
      "new_mode": 33188,
      "new_path": "gdb/solib-svr4.c"
    },
    {
      "type": "modify",
      "old_id": "a27b66df10001e7b034e1817043f5d80139f1028",
      "old_mode": 33188,
      "old_path": "gdb/target-delegates.c",
      "new_id": "4c499fac55c422322a5e6c46895eadf996f925fb",
      "new_mode": 33188,
      "new_path": "gdb/target-delegates.c"
    },
    {
      "type": "modify",
      "old_id": "a6ca7fc4f0779f705bddb54952a9ef621de74aa1",
      "old_mode": 33188,
      "old_path": "gdb/target.c",
      "new_id": "a93740bbbddd227a4ebe4665c229dd3a373c4ec3",
      "new_mode": 33188,
      "new_path": "gdb/target.c"
    },
    {
      "type": "modify",
      "old_id": "558be4637554b477929e7e1c67da2b06a100b48b",
      "old_mode": 33188,
      "old_path": "gdb/target.h",
      "new_id": "fca0bbbf66e29c137cbb89751841105138c78653",
      "new_mode": 33188,
      "new_path": "gdb/target.h"
    }
  ]
}
