From ae454edb0325b7cd11132eb961fc4a7afc4a9d7c Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 25 Apr 2018 20:49:13 +0100 Subject: [PATCH] JDWP compile fixes for linux --- renderdoc/android/jdwp.cpp | 2 +- renderdoc/android/jdwp.h | 7 +++++-- renderdoc/android/jdwp_util.cpp | 5 ----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/renderdoc/android/jdwp.cpp b/renderdoc/android/jdwp.cpp index 894392327..e921c54c0 100644 --- a/renderdoc/android/jdwp.cpp +++ b/renderdoc/android/jdwp.cpp @@ -322,7 +322,7 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock) thread = 0; Event evData = conn.WaitForEvent( - EventKind::MethodEntry, {{ModifierKind::ClassOnly, thisClass.Object}}, + EventKind::MethodEntry, {{ModifierKind::ClassOnly, thisClass.RefType}}, [onCreate](const Event &evData) { return evData.MethodEntry.location.methodID == onCreate; }); if(evData.eventKind == EventKind::MethodEntry) diff --git a/renderdoc/android/jdwp.h b/renderdoc/android/jdwp.h index 6d1a65975..f6a119e00 100644 --- a/renderdoc/android/jdwp.h +++ b/renderdoc/android/jdwp.h @@ -227,7 +227,7 @@ enum class IDType frame }; -template +template struct jdwpID { public: @@ -238,7 +238,7 @@ public: static void setSize(int32_t s) { RDCASSERT(s == 4 || s == 8); - size = s; + jdwpID::size = s; } void EndianSwap() @@ -277,6 +277,9 @@ typedef jdwpID methodID; typedef jdwpID fieldID; typedef jdwpID frameID; +template +int32_t jdwpID::size = 8; + struct taggedObjectID { Tag tag; diff --git a/renderdoc/android/jdwp_util.cpp b/renderdoc/android/jdwp_util.cpp index 748f3c725..73ae39364 100644 --- a/renderdoc/android/jdwp_util.cpp +++ b/renderdoc/android/jdwp_util.cpp @@ -32,11 +32,6 @@ namespace JDWP { uint32_t Command::idalloc = 42; -int32_t objectID::size = 8; -int32_t referenceTypeID::size = 8; -int32_t methodID::size = 8; -int32_t fieldID::size = 8; -int32_t frameID::size = 8; uint32_t Command::Send(StreamWriter &writer) {