Ivan Butygin
a26bfc1223
Refactor code to hide direct IrFunction->func usage and add convenient functions ( #1911 )
2017-01-17 22:40:32 +01:00
Johan Engelen
5e9914ad29
Fix LLVM trunk build. ( #1936 )
2016-12-22 17:59:03 +01:00
Remi Thebault
3b63effd3f
Implement -gline-tables-only (PR #1861 )
...
As per ldc-developers/ldc#1844 .
2016-11-12 20:16:41 +01:00
Rainer Schuetze
08e1c496dc
fix build against current LLVM master @ 9b4e8286785f538e73d2e3eaa96f88c3d98b9960
2016-10-27 08:08:19 +02:00
Martin
6b6cafcd60
Win64 workaround: Emit slice and vector params as DI locals
...
This works for both cdb/Windbg and Visual Studio debuggers, otherwise the
DI values are garbage in both debuggers too.
2016-10-10 20:36:17 +02:00
Martin
8be1e3e719
Adapt emission of debuginfos for parameters
...
Emit all parameters (except for captured ones) as DI parameters.
2016-10-09 20:17:39 +02:00
kinke
4e5c9616e3
Merge pull request #1804 from rainers/cv10
...
CodeView: arguments passed by reference not shown
2016-10-08 23:00:43 +02:00
David Nadlinger
ba180bbde2
Merge pull request #1813 from rainers/cv11
...
DI: display typeof(null) as void*
2016-10-08 11:37:10 +01:00
Rainer Schuetze
9d1637f410
DI: display typeof(null) as void*
2016-10-08 10:03:07 +02:00
Nicholas Wilson
45a4f64ac1
[NFC] Refactor debuginfo emission check. ( #1797 )
2016-10-07 15:14:19 +02:00
Rainer Schuetze
4635446bd8
CodeView: arguments passed by reference not shown because of wrong size
2016-10-07 09:41:32 +02:00
Rainer Schuetze
3ed8f25ae2
Debuginfo: try harder to find a suitable filename is location is empty
2016-10-06 00:18:38 +02:00
Rainer Schuetze
5bcfb49b1b
Enable gdb tests in dmd-testsuite ( #1784 )
...
Introduce a hidden `-dwarf-version=<uint>` switch to support old gdb versions
used by Travis. Older versions only supporting DWARF-2 and/or not supporting
TLS correctly are detected in dmd-testsuite's CMakefile.
2016-09-27 01:26:15 +02:00
Rainer Schuetze
fd80d5eada
Merge pull request #1768 from rainers/cv6
...
CodeView: fix vector types void16 and void32
2016-09-25 10:42:21 +02:00
Rainer Schuetze
767f8614ca
Debug info: fix vector types void16 and void32
2016-09-25 09:14:52 +02:00
Rainer Schuetze
2dec29b825
CodeView: fix display of dynamic array arguments ( #1761 )
2016-09-24 21:06:58 +02:00
Rainer Schuetze
daa404d523
Debuginfo: use inheritance information for base classes instead of listing base class members in derived classes
2016-09-23 08:37:41 +02:00
Johan Engelen
807e94011d
Fix unused var warning.
...
(I chose this over `(void)...`.)
2016-09-15 21:07:28 +02:00
Johan Engelen
a561b6a496
Fix LLVM 4.0 build, there was another debuginfo change.
2016-09-14 11:07:58 +02:00
Johan Engelen
b71e8ee439
The type of DIFlag parameters changed from unsigned to DIFlags in LLVM 4.0.
2016-09-13 10:50:00 +02:00
Rainer Schuetze
c8eb07d720
CodeView: add support for imaginary and complex types
2016-09-02 09:18:06 +02:00
Rainer Schuetze
36dec7389d
* DebugInfo fixes:
...
- byte,ubyte should be encoded as DW_ATE_signed_char/DW_ATE_unsigned_char, not DW_ATE_signed/DW_ATE_unsigned
- encode wchar,dchar as UTF
- do not declare struct/class definitions as FlagFwdDecl
- pass deco as unique identifier to UDTs
- dynamic arrays: use type name, don't leave it empty
- use proper type name for delegates
- add support for type "void" and "typeof(null)"
2016-08-30 08:17:39 +02:00
Martin
29152f5b94
Refactor DIBuilder
...
Incl. some subtle changes/fixes.
2016-07-22 22:34:31 +02:00
Martin
c9cb63fb54
Misc. debuginfo fixes
...
As LLVM's CodeView component now uses additional asserts, e.g.,
to make sure the size of a static array equals N * elementSize.
2016-07-22 15:01:55 +02:00
Elie Morisse
302d71a9de
MSVC: Attach !dbg info to _d_eh_enter_catch, _d_enter_cleanup and _d_leave_cleanup calls.
2016-07-03 16:46:51 -03:00
Elie Morisse
7ac1216292
Nested variables debug info fixes.
...
- Fix the value of closure variables in the parent function. Previously the passed value was the GEP instruction into .frame, and that instruction corresponds to a register so resulted in "DWARF-2 expression error: DW_OP_reg operations must be used either alone(...)" (also the address was incorrect anyway because the offset would get doubled by 'addr')
- When emitting debug info for a parent function parameter that is accessed from a nested function, call DIBuilder.createAutoVariable instead of createParameterVariable. Two different variables for the same parameter index was triggering an assert in llvm::DbgVariable::addMMIEntry. This fixes the compilation of druntime and phobos when building against LLVM 3.8.
2016-06-30 14:13:51 -03:00
Elie Morisse
c3ee617d8a
Fix LLVM >=3.8 debug info by assigning DISubprograms to their corresponding function.
2016-06-30 14:13:13 -03:00
Martin
6a6f6be2e3
MSVC: Don't truncate debug info names anymore
...
Newest LLVM takes care of this for us.
2016-03-16 19:45:35 +01:00
Rainer Schuetze
1131e6fc24
fix function name mangling for debug info
2016-03-13 17:31:22 +01:00
Rainer Schuetze
6f3adaea46
add debug info to thunks as a workaround for https://llvm.org/bugs/show_bug.cgi?id=26833
2016-03-13 17:29:44 +01:00
Martin
5ba7ce9b1d
MSVC: Limit debug info display names to ~64k
...
A limitation of the MS linker/COFF format and enforced by LLVM.
Fixes issue #930 .
2016-03-12 16:30:49 +01:00
Johan Engelen
2898ce340d
Fix bug introduced by f626a3f340
2016-02-14 18:06:33 +01:00
Johan Engelen
f626a3f340
Fix for dmd-testsuite/compilable/ice13792.d: compilation with -gc of fwd declared enum (opaque enum type).
2016-02-14 17:35:09 +01:00
Johan Engelen
acdcc4a8c1
Merge branch 'master' into merge-2.069
2016-02-13 20:12:17 +01:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00
Rainer Schuetze
f94c34ea33
The size of the alloca must match the size described by debug info.
2016-01-22 16:07:38 +01:00
Johan Engelen
4399271762
Fix a few compiler warnings.
2015-12-22 12:36:28 +01:00
Martin
71912511a5
Adaptations for recent LLVM 3.8 master changes
2015-11-08 14:06:16 +01:00
David Nadlinger
0d53ca7aea
dibuilder: Reduce number of version conditions that cut statements
...
The code ends up being a bit longer, but imho much more readable.
2015-11-03 11:21:35 +02:00
David Nadlinger
05d45350aa
clang-tidy: Add readability-else-after-return
2015-11-02 11:30:40 +02:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
2d959ea540
Make use of C++11 range-based for
...
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
David Nadlinger
6bf9a7c63e
Merge pull request #1176 from kinke/cleanup
...
Drop support for LLVM < 3.5
2015-10-31 19:35:32 +02:00
David Nadlinger
3fb689caea
Emit debug info for ref and out parameters
...
Fixes DMD testcse 'gdb4149'.
2015-10-31 12:34:55 +02:00
Martin
60d676e2a1
Drop support for LLVM < 3.5
...
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
Rainer Schuetze
27cb609bd8
update to LLVM master changes
2015-10-24 19:53:14 +02:00
Rainer Schuetze
7413f1a8f5
fix build against llvm master (llvm 3.8)
2015-10-17 16:07:17 +02:00
Martin
643eb0cfdf
Debug infos: don't emit a column info if line number == 0.
...
The 2.068 front-end seems to emit such `Loc`s, and LLVM complains about
them. So this fixes a bunch of compile errors for merge-2.068.
2015-09-26 16:37:21 +02:00
Martin
070571730f
Fix debuginfos of special functions for LLVM 3.7+
2015-09-25 20:52:31 +02:00