summaryrefslogtreecommitdiff
path: root/src/pal/inc
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2018-07-12 23:45:39 -0700
committerGitHub <noreply@github.com>2018-07-12 23:45:39 -0700
commitb89e2305a2c953272c997242d01b66b1bb1e661e (patch)
treeb4064df6f0917351a74722c91d9928789e53c8cc /src/pal/inc
parent0e22b107e811bc8ab7f3c1caf0943ef760d9f53d (diff)
downloadcoreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.gz
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.bz2
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.zip
Add prefix to DAC's PAL exports for alpine (#18873)
Added some cmake logic to create assembly include mapping files. One that maps the prefixed name (DAC_foo) to the actual name (foo) which is included in the DAC module and another that maps the actual name to the prefixed name that is included in the SOS, DBI and createdump modules. The data exports like IID_IUnknown are not prefixed and don't need to be (immutable static data). There were some C++ exports functions exported with their decorated names in the CatchHardwareExceptionHolder and NativeExceptionHolderBase classes. Created PAL_* style export functions that implements the code. Fix lldb plugin cmake file to use LLDB_H/LLDB_LIB env vars to build it.
Diffstat (limited to 'src/pal/inc')
-rw-r--r--src/pal/inc/pal.h52
1 files changed, 47 insertions, 5 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index d5587b9f41..98d0ae2f11 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -5030,6 +5030,16 @@ PALAPI
PAL_SetTerminationRequestHandler(
IN PTERMINATION_REQUEST_HANDLER terminationRequestHandler);
+PALIMPORT
+VOID
+PALAPI
+PAL_CatchHardwareExceptionHolderEnter();
+
+PALIMPORT
+VOID
+PALAPI
+PAL_CatchHardwareExceptionHolderExit();
+
//
// This holder is used to indicate that a hardware
// exception should be raised as a C++ exception
@@ -5038,9 +5048,15 @@ PAL_SetTerminationRequestHandler(
class CatchHardwareExceptionHolder
{
public:
- CatchHardwareExceptionHolder();
+ CatchHardwareExceptionHolder()
+ {
+ PAL_CatchHardwareExceptionHolderEnter();
+ }
- ~CatchHardwareExceptionHolder();
+ ~CatchHardwareExceptionHolder()
+ {
+ PAL_CatchHardwareExceptionHolderExit();
+ }
static bool IsEnabled();
};
@@ -5058,6 +5074,13 @@ public:
#ifdef FEATURE_PAL_SXS
+class NativeExceptionHolderBase;
+
+PALIMPORT
+NativeExceptionHolderBase **
+PALAPI
+PAL_GetNativeExceptionHolderHead();
+
extern "C++" {
//
@@ -5076,9 +5099,22 @@ class NativeExceptionHolderBase
NativeExceptionHolderBase *m_next;
protected:
- NativeExceptionHolderBase();
+ NativeExceptionHolderBase()
+ {
+ m_head = nullptr;
+ m_next = nullptr;
+ }
- ~NativeExceptionHolderBase();
+ ~NativeExceptionHolderBase()
+ {
+ // Only destroy if Push was called
+ if (m_head != nullptr)
+ {
+ *m_head = m_next;
+ m_head = nullptr;
+ m_next = nullptr;
+ }
+ }
public:
// Calls the holder's filter handler.
@@ -5087,7 +5123,13 @@ public:
// Adds the holder to the "stack" of holders. This is done explicitly instead
// of in the constructor was to avoid the mess of move constructors combined
// with return value optimization (in CreateHolder).
- void Push();
+ void Push()
+ {
+ NativeExceptionHolderBase **head = PAL_GetNativeExceptionHolderHead();
+ m_head = head;
+ m_next = *head;
+ *head = this;
+ }
// Given the currentHolder and locals stack range find the next holder starting with this one
// To find the first holder, pass nullptr as the currentHolder.