aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-08-20 10:10:47 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-08-20 10:10:47 -0400
commitdd125343a1cccac2878d528d61a5ea71e46793fa (patch)
tree8176c46700f549506c18e6bb540773dee9ae8b36 /libiberty
parent3ee93972f9dbbb77a7cd4f63c6c7bb66a8b12c71 (diff)
downloadbinutils-dd125343a1cccac2878d528d61a5ea71e46793fa.zip
binutils-dd125343a1cccac2878d528d61a5ea71e46793fa.tar.gz
binutils-dd125343a1cccac2878d528d61a5ea71e46793fa.tar.bz2
gdb: refactor test_get_thread_arch_aspace_regcache
Do these misc changes to test_get_thread_arch_aspace_regcache: - Rename to get_thread_arch_aspace_regcache_and_check. The following patch introduces a selftest for get_thread_arch_aspace_regcache, named get_thread_arch_aspace_regcache_test. To avoid confusion between the two functions, rename this one to get_thread_arch_aspace_regcache_and_check, I think it describes better what it does. - Remove gdbarch parameter. We always pass the same gdbarch (the current inferior's gdbarch), so having a parameter is not useful. It would be interesting to actually test with multiple gdbarches, to verify that the regcache container can hold multiple regcaches (with different architectures) for a same (target, ptid). But it's not the case as of this patch. - Verify that the regcache's arch is correctly set. - Remove the aspace parameter. We always pass NULL here, so it's not useful to have it as a parameter. Also, instead of passing a NULL aspace to get_thread_arch_aspace_regcache and verifying that we get a NULL aspace back, pass the current inferior's aspace (just like we use the current inferior's gdbarch). gdb/ChangeLog: * regcache.c (test_get_thread_arch_aspace_regcache): Rename to... (get_thread_arch_aspace_regcache_and_check): ... this. Remove gdbarch and aspace parameter. Use current inferior's aspace. Validate regcache's arch value. (regcaches_test): Update. Change-Id: I8b4c2303b4f91f062269043d1f7abe1650232010
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions