From: Andreas Hansson Date: Fri, 24 Apr 2015 07:30:08 +0000 (-0400) Subject: misc: Appease gcc 5.1 without moving GDB_REG_BYTES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=179787f31faf12f7f4a31506db40236e82873675;p=gem5.git misc: Appease gcc 5.1 without moving GDB_REG_BYTES This patch rolls back the move of the GDB_REG_BYTES constant, and instead adds M5_VAR_USED. --- diff --git a/src/arch/arm/remote_gdb.hh b/src/arch/arm/remote_gdb.hh index 1e6420633..ce5c5aa6e 100644 --- a/src/arch/arm/remote_gdb.hh +++ b/src/arch/arm/remote_gdb.hh @@ -76,6 +76,10 @@ enum { GDB64_NUMREGS = 98 }; +const int GDB_REG_BYTES M5_VAR_USED = + std::max(GDB64_NUMREGS * sizeof(uint64_t), + GDB32_NUMREGS * sizeof(uint32_t)); + class RemoteGDB : public BaseRemoteGDB { protected: @@ -86,9 +90,6 @@ class RemoteGDB : public BaseRemoteGDB void setregs(); public: - const int GDB_REG_BYTES = std::max(GDB64_NUMREGS * sizeof(uint64_t), - GDB32_NUMREGS * sizeof(uint32_t)); - RemoteGDB(System *_system, ThreadContext *tc); }; } // namespace ArmISA diff --git a/src/arch/x86/remote_gdb.hh b/src/arch/x86/remote_gdb.hh index 0f41055cd..991452f74 100644 --- a/src/arch/x86/remote_gdb.hh +++ b/src/arch/x86/remote_gdb.hh @@ -111,10 +111,6 @@ class RemoteGDB : public BaseRemoteGDB GDB64_NUMREGS = (GDB64_GS_32 + 1) / 2 + 1 }; - const int GDB_REG_BYTES = - std::max(RemoteGDB::GDB32_NUMREGS * sizeof(uint32_t), - RemoteGDB::GDB64_NUMREGS * sizeof(uint64_t)); - RemoteGDB(System *system, ThreadContext *context); bool acc(Addr addr, size_t len); @@ -126,6 +122,10 @@ class RemoteGDB : public BaseRemoteGDB bool checkBpLen(size_t len) { return len == 1; } }; +const int GDB_REG_BYTES M5_VAR_USED = + std::max(RemoteGDB::GDB32_NUMREGS * sizeof(uint32_t), + RemoteGDB::GDB64_NUMREGS * sizeof(uint64_t)); + } #endif // __ARCH_X86_REMOTEGDB_HH__