[Linux][GDB-JIT] Fix bugs in gdbjit that break lldb stepping (dotnet/coreclr#8637)
authorIgor Kulaychuk <igor.kulaychuk@gmail.com>
Mon, 19 Dec 2016 11:03:59 +0000 (14:03 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 19 Dec 2016 11:03:59 +0000 (12:03 +0100)
commit1beb81f713eaaeddd18dda9fae517051ecd00268
tree5feb2b0f22301881d15c26756ff18e77c125c5fe
parent8fd61d4e37dac3bba41582c39cc3b3b144638a7b
[Linux][GDB-JIT] Fix bugs in gdbjit that break lldb stepping (dotnet/coreclr#8637)

* Fix .text and .thunk symbols overlapping

When current method calls itself, a __thunk* symbol might be generated with the same address
as the method symbol in .text section. Avoid generating such __thunk* symbol.

* Do not create DWARF line table entries with the same address

* For each HiddenLine assign a zero line number in DWARF

Allow LLDB to to skip HiddenLines when stepping.

* Fix __thunk symbols containing garbage

Fix a bug when __thunk* symbols of previously compiled methods cause
generation of __thunk* symbols for currently compiled method without
filling symbol info.

* Fix missing check for the end of list of compiled methods

* Remove unnecessary check for zero prevLine in gdbjit

Commit migrated from https://github.com/dotnet/coreclr/commit/d23b78ce50d04e97cc23f997fab8c0ce5faa8726
src/coreclr/src/vm/gdbjit.cpp
src/coreclr/src/vm/gdbjit.h