summaryrefslogtreecommitdiff
path: root/packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch
diff options
context:
space:
mode:
authorchunseok lee <chunseoklee@gmail.com>2017-09-27 01:15:38 -0400
committerchunseok lee <chunseoklee@gmail.com>2017-09-27 01:16:34 -0400
commitbb775f145721fba5683307a6089269e19396b597 (patch)
treeb64801236c55d0d90c4f21e3ad4dd1486053c653 /packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch
parentfa221f1b039348ceaeb4a35b65133437e2781bbe (diff)
downloadcoreclr-submit/tizen_4.0/20170927.091815.tar.gz
coreclr-submit/tizen_4.0/20170927.091815.tar.bz2
coreclr-submit/tizen_4.0/20170927.091815.zip
Specify C# language in DWARF debug informationsubmit/tizen_4.0/20170927.091815
To correctly support C# language in lldb DWARF debug information should contain correct information about language. Now we use 0x9e57 constant for specify C# language. Introduce FEATURE_GDBJIT_LANGID_CS If this feature is set gdbjit will use 0x9e57 as c# lang id, otherwise it will use DW_LANG_C89. Change-Id: I06e8dce6bf9b2506e62edaa6b2629cd5cfacfc0d
Diffstat (limited to 'packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch')
-rw-r--r--packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch b/packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch
new file mode 100644
index 0000000000..9a9be0911e
--- /dev/null
+++ b/packaging/0034-Introduce-FEATURE_GDBJIT_LANGID_CS.patch
@@ -0,0 +1,68 @@
+From 1e96f53060b04c63877c607684066baa421145e3 Mon Sep 17 00:00:00 2001
+From: Konstantin Baladurin <k.baladurin@partner.samsung.com>
+Date: Thu, 7 Sep 2017 18:24:01 +0300
+Subject: [PATCH] Introduce FEATURE_GDBJIT_LANGID_CS
+
+If this feature is set gdbjit will use 0x9e57 as c# lang id,
+otherwise it will use DW_LANG_C89.
+---
+ clrdefinitions.cmake | 3 +++
+ clrfeatures.cmake | 1 +
+ src/vm/gdbjit.cpp | 6 ++++++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/clrdefinitions.cmake b/clrdefinitions.cmake
+index 6db2b24..627cfff 100644
+--- a/clrdefinitions.cmake
++++ b/clrdefinitions.cmake
+@@ -113,6 +113,9 @@ if(FEATURE_EVENT_TRACE)
+ endif(FEATURE_EVENT_TRACE)
+ if(CLR_CMAKE_PLATFORM_LINUX)
+ add_definitions(-DFEATURE_PERFTRACING)
++if(FEATURE_GDBJIT_LANGID_CS)
++ add_definitions(-DFEATURE_GDBJIT_LANGID_CS)
++endif(FEATURE_GDBJIT_LANGID_CS)
+ endif(CLR_CMAKE_PLATFORM_LINUX)
+ if(CLR_CMAKE_PLATFORM_UNIX)
+ add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
+diff --git a/clrfeatures.cmake b/clrfeatures.cmake
+index 0e2801c..b9261f6 100644
+--- a/clrfeatures.cmake
++++ b/clrfeatures.cmake
+@@ -1,5 +1,6 @@
+ if(CLR_CMAKE_TARGET_TIZEN_LINUX)
+ set(FEATURE_EVENT_TRACE 1)
++ set(FEATURE_GDBJIT_LANGID_CS 1)
+ endif()
+
+ if(NOT DEFINED FEATURE_EVENT_TRACE)
+diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp
+index 9b70a6b..37466e3 100644
+--- a/src/vm/gdbjit.cpp
++++ b/src/vm/gdbjit.cpp
+@@ -740,8 +740,10 @@ const int AbbrevTableSize = sizeof(AbbrevTable);
+ #define DWARF_LINE_RANGE 14
+ #define DWARF_OPCODE_BASE 13
+
++#ifdef FEATURE_GDBJIT_LANGID_CS
+ /* TODO: use corresponding constant when it will be added to llvm */
+ #define DW_LANG_MICROSOFT_CSHARP 0x9e57
++#endif
+
+ DwarfLineNumHeader LineNumHeader = {
+ 0, 2, 0, 1, 1, DWARF_LINE_BASE, DWARF_LINE_RANGE, DWARF_OPCODE_BASE, {0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1}
+@@ -756,7 +758,11 @@ struct __attribute__((packed)) DebugInfoCU
+ uint32_t m_cu_name;
+ uint32_t m_line_num;
+ } debugInfoCU = {
++#ifdef FEATURE_GDBJIT_LANGID_CS
+ 1, 0, DW_LANG_MICROSOFT_CSHARP, 0, 0
++#else
++ 1, 0, DW_LANG_C89, 0, 0
++#endif
+ };
+
+ struct __attribute__((packed)) DebugInfoTryCatchSub
+--
+2.7.4
+