aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-07-17 16:43:35 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-08-05 15:40:20 -0400
commit7e17ef8ca40d21202fc79cf08726d5b475b175d8 (patch)
tree1fd948fbc3bbbf143d373a45ba649cdcfc5026c0 /gdb/sparc64-tdep.c
parent5c879edf04694a41afc5413b158a7e3828d28733 (diff)
downloadgdb-7e17ef8ca40d21202fc79cf08726d5b475b175d8.zip
gdb-7e17ef8ca40d21202fc79cf08726d5b475b175d8.tar.gz
gdb-7e17ef8ca40d21202fc79cf08726d5b475b175d8.tar.bz2
gdb: move regcache::regcaches to regcache.c
I don't really understand why `regcache_thread_ptid_changed` is a static method of `struct regcache` instead of being a static free function in regcache.c. And I don't understand why `current_regcache` is a static member of `struct regcache` instead of being a static global in regcache.c. It's not wrong per-se, but there's no other place where we do it like this in GDB (as far as I remember) and it just exposes things unnecessarily in the .h. Move them to be just static in regcache.c. As a result, registers_changed_ptid doesn't need to be friend of the regcache class anymore. Removing the include of forward_list in regcache.h showed that we were missing an include for it in dwarf2/index-write.c, record-btrace.c and sparc64-tdep.c. gdb/ChangeLog: * regcache.h (class regcache): Remove friend registers_changed_ptid. <regcache_thread_ptid_changed>: Remove. <regcaches>: Remove. * regcache.c (regcache::regcaches): Rename to... (regcaches): ... this. Make static. (get_thread_arch_aspace_regcache): Update. (regcache::regcache_thread_ptid_changed): Rename to... (regcache_thread_ptid_changed): ... this. Update. (class regcache_access): Remove. (regcaches_test): Update. (_initialize_regcache): Update. * sparc64-tdep.c, dwarf2/index-write.c, record-btrace.c: Include <forward_list>. Change-Id: Iabc25759848010cfbb7ee7e27f60eaca17d61c12
Diffstat (limited to 'gdb/sparc64-tdep.c')
-rw-r--r--gdb/sparc64-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index f481052..95979ab 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -33,8 +33,8 @@
#include "target-descriptions.h"
#include "target.h"
#include "value.h"
-
#include "sparc64-tdep.h"
+#include <forward_list>
/* This file implements the SPARC 64-bit ABI as defined by the
section "Low-Level System Information" of the SPARC Compliance