summaryrefslogtreecommitdiff
path: root/packaging/0033-Specify-C-language-in-DWARF-debug-information.patch
blob: b06a4f05887d33a21859595d580071435ccdf55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 8a9a359a078b0332bf1ba5cf0dd7c538177527f0 Mon Sep 17 00:00:00 2001
From: Konstantin Baladurin <k.baladurin@partner.samsung.com>
Date: Thu, 31 Aug 2017 15:09:32 +0300
Subject: [PATCH] Specify C# language in DWARF debug information

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.
---
 src/vm/gdbjit.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp
index 50f1bb2..9b70a6b 100644
--- a/src/vm/gdbjit.cpp
+++ b/src/vm/gdbjit.cpp
@@ -740,6 +740,9 @@ const int AbbrevTableSize = sizeof(AbbrevTable);
 #define DWARF_LINE_RANGE 14
 #define DWARF_OPCODE_BASE 13
 
+/* TODO: use corresponding constant when it will be added to llvm */
+#define DW_LANG_MICROSOFT_CSHARP 0x9e57
+
 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}
 };
@@ -753,7 +756,7 @@ struct __attribute__((packed)) DebugInfoCU
     uint32_t m_cu_name;
     uint32_t m_line_num;
 } debugInfoCU = {
-    1, 0, DW_LANG_C89, 0, 0
+    1, 0, DW_LANG_MICROSOFT_CSHARP, 0, 0
 };
 
 struct __attribute__((packed)) DebugInfoTryCatchSub
-- 
2.7.4