summaryrefslogtreecommitdiff
path: root/src/vm/util.cpp
diff options
context:
space:
mode:
authornoahfalk <noahfalk@users.noreply.github.com>2016-07-28 00:15:54 -0700
committerGitHub <noreply@github.com>2016-07-28 00:15:54 -0700
commitd81d773312dcae24d0b5d56cb972bf71e22f856c (patch)
tree664e70ddc194cebb7b235a24193c9f9f2006c1b4 /src/vm/util.cpp
parentf30a8de1dc0190dedded08a6f03951ecc1a17604 (diff)
parent27e570de343590fb99a1d9862668ab13843e42be (diff)
downloadcoreclr-d81d773312dcae24d0b5d56cb972bf71e22f856c.tar.gz
coreclr-d81d773312dcae24d0b5d56cb972bf71e22f856c.tar.bz2
coreclr-d81d773312dcae24d0b5d56cb972bf71e22f856c.zip
Merge pull request #6278 from Dmitri-Botcharnikov/feature-gdbjit
[Linux] GDB JIT support for source line debug information.
Diffstat (limited to 'src/vm/util.cpp')
-rw-r--r--src/vm/util.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vm/util.cpp b/src/vm/util.cpp
index f7185c744f..e0f09e3ae0 100644
--- a/src/vm/util.cpp
+++ b/src/vm/util.cpp
@@ -3399,6 +3399,11 @@ void InitializeClrNotifications()
#pragma optimize("", off)
#endif // _MSC_VER
+#if defined(FEATURE_GDBJIT)
+#include "gdbjit.h"
+__declspec(thread) bool tls_isSymReaderInProgress = false;
+#endif // FEATURE_GDBJIT
+
// called from the runtime
void DACNotify::DoJITNotification(MethodDesc *MethodDescPtr)
{
@@ -3410,7 +3415,14 @@ void DACNotify::DoJITNotification(MethodDesc *MethodDescPtr)
MODE_PREEMPTIVE;
}
CONTRACTL_END;
-
+#if defined(FEATURE_GDBJIT) && defined(FEATURE_PAL) && !defined(CROSSGEN_COMPILE)
+ if(!tls_isSymReaderInProgress)
+ {
+ tls_isSymReaderInProgress = true;
+ NotifyGdb::MethodCompiled(MethodDescPtr);
+ tls_isSymReaderInProgress = false;
+ }
+#endif
TADDR Args[2] = { JIT_NOTIFICATION, (TADDR) MethodDescPtr };
DACNotifyExceptionHelper(Args, 2);
}
@@ -3426,6 +3438,9 @@ void DACNotify::DoJITDiscardNotification(MethodDesc *MethodDescPtr)
}
CONTRACTL_END;
+#if defined(FEATURE_GDBJIT) && defined(FEATURE_PAL) && !defined(CROSSGEN_COMPILE)
+ NotifyGdb::MethodDropped(MethodDescPtr);
+#endif
TADDR Args[2] = { JIT_DISCARD_NOTIFICATION, (TADDR) MethodDescPtr };
DACNotifyExceptionHelper(Args, 2);
}