[GDBJIT] Make gdbjit thread-safe & bug fix (dotnet/coreclr#14390)
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>
Mon, 9 Oct 2017 17:21:22 +0000 (20:21 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 9 Oct 2017 17:21:22 +0000 (19:21 +0200)
commitcd72720fd40ae306afe9292ed7329b075be9bc6a
treeacaa11b25aeaadb273515c76a6e53835227154cd
parent97fd7ebb4100a0d01f6667f95715a1a3424bb3c6
[GDBJIT] Make gdbjit thread-safe & bug fix (dotnet/coreclr#14390)

* [GDBJIT] Fix DW_AT_comp_dir setting

We should use cuPath to set dirPath in NotifyGdb::EmitDebugInfo instead of
DebugString[1].

* [GDBJIT] Make gdbjit thread-safe

NotifyGdb::MethodPrepared method can be called from multiple threads
simultaneously in this case gdbjit will work incorrectly as it uses
global variable without synchronization.

Commit migrated from https://github.com/dotnet/coreclr/commit/0ba964d19b84a690a451a61a38fa12c4ebf4f890
src/coreclr/src/inc/CrstTypes.def
src/coreclr/src/inc/crsttypes.h
src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/gdbjit.cpp
src/coreclr/src/vm/gdbjit.h