Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 15 additions & 27 deletions src/coreclr/debug/di/valuehome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,26 +451,14 @@ void FloatRegValueHome::SetEnregisteredValue(MemoryRange newValue,
DT_CONTEXT * pContext,
bool fIsSigned)
{
// TODO: : implement CordbValue::SetEnregisteredValue for RAK_FLOAT
#if defined(TARGET_AMD64)
PORTABILITY_ASSERT("NYI: SetEnregisteredValue (divalue.cpp): RAK_FLOAT for AMD64");
#endif // TARGET_AMD64

_ASSERTE((newValue.Size() == 4) || (newValue.Size() == 8));

// Convert the input to a double.
double newVal = 0.0;

memcpy(&newVal, newValue.StartAddress(), newValue.Size());

#if defined(TARGET_X86)

// This is unfortunately non-portable. Luckily we can live with this for now since we only support
// Win/X86 debugging a Mac/X86 platform.

#if !defined(TARGET_X86)
#error Unsupported target platform
#endif // !TARGET_X86
#if defined(TARGET_X86)

// What a pain, on X86 take the floating
// point state in the context and make it our current FP
Expand Down Expand Up @@ -576,7 +564,7 @@ void FloatRegValueHome::SetEnregisteredValue(MemoryRange newValue,
: "m"(currentFPUState)
);
#endif
#endif // TARGET_X86
#endif // TARGET_X86

// update the thread's floating point stack
void * valueAddress = (void *) &(m_pFrame->m_pThread->m_floatValues[m_floatIndex]);
Expand All @@ -596,19 +584,19 @@ void FloatRegValueHome::GetEnregisteredValue(MemoryRange valueOutBuffer)
// RemoteValueHome implementation
// ============================================================================

// constructor
// Arguments:
// input: pProcess - the process to which the value belongs
// remoteValue - a buffer with the target address of the value and its size
// Note: It's possible a particular instance of CordbGenericValue may have neither a remote address nor a
// register address--FuncEval makes empty GenericValues for literals but for those, we will make a
// RegisterValueHome,so we can assert that we have a non-null remote address here
RemoteValueHome::RemoteValueHome(CordbProcess * pProcess, TargetBuffer remoteValue):
ValueHome(pProcess),
m_remoteValue(remoteValue)
{
_ASSERTE(remoteValue.pAddress != 0);
} // RemoteValueHome::RemoteValueHome
// constructor
// Arguments:
// input: pProcess - the process to which the value belongs
// remoteValue - a buffer with the target address of the value and its size
// Note: It's possible a particular instance of CordbGenericValue may have neither a remote address nor a
// register address--FuncEval makes empty GenericValues for literals but for those, we will make a
// RegisterValueHome,so we can assert that we have a non-null remote address here
RemoteValueHome::RemoteValueHome(CordbProcess * pProcess, TargetBuffer remoteValue):
ValueHome(pProcess),
m_remoteValue(remoteValue)
{
_ASSERTE(remoteValue.pAddress != 0);
} // RemoteValueHome::RemoteValueHome

// Gets a value and returns it in dest
// virtual
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/palclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
// The message in these two macros should not contain any keywords like TODO
// or NYI. It should be just the brief description of the problem.

#if defined(TARGET_X86)
#if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64)
// Finished ports - compile-time errors
#define PORTABILITY_WARNING(message) NEED_TO_PORT_THIS_ONE(NEED_TO_PORT_THIS_ONE)
#define PORTABILITY_ASSERT(message) NEED_TO_PORT_THIS_ONE(NEED_TO_PORT_THIS_ONE)
Expand Down
11 changes: 2 additions & 9 deletions src/coreclr/utilcode/dacutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <winwrap.h>
#include <utilcode.h>
#include <dacprivate.h>
#include <pedecoder.h>

//----------------------------------------------------------------------------
//
Expand Down Expand Up @@ -74,15 +75,7 @@ LiveProcDataTarget::GetMachineType(
{
LIMITED_METHOD_CONTRACT;

#if defined(TARGET_X86)
*machine = IMAGE_FILE_MACHINE_I386;
#elif defined(TARGET_AMD64)
*machine = IMAGE_FILE_MACHINE_AMD64;
#elif defined(TARGET_ARM)
*machine = IMAGE_FILE_MACHINE_ARMNT;
#else
PORTABILITY_ASSERT("Unknown Processor");
#endif
*machine = IMAGE_FILE_MACHINE_NATIVE;
return S_OK;
}

Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/vm/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6663,14 +6663,7 @@ bool Thread::InitRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, bool validCo
SetIP(pctx, 0);
#ifdef TARGET_X86
SetRegdisplayPCTAddr(pRD, (TADDR)&(pctx->Eip));
#elif defined(TARGET_AMD64)
// nothing more to do here, on Win64 setting the IP to 0 is enough.
#elif defined(TARGET_ARM)
// nothing more to do here, on Win64 setting the IP to 0 is enough.
#else
PORTABILITY_ASSERT("NYI for platform Thread::InitRegDisplay");
#endif

return false;
}
#endif // DACCESS_COMPILE
Expand Down
Loading