forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a regression in macOS-style path remapping.
When we switched to the LLVM .debug_line parser, the .dSYM-style path remapping logic stopped working for relative paths because of how RemapSourceFile silently fails for relative paths. This patch both makes the code more readable and fixes this particular bug. One interesting thing I learned is that Module::RemapSourceFile() is a macOS-only code path that operates on on the lldb::Module level and is completely separate from target.source-map, which operates on a per-Target level. Differential Revision: https://reviews.llvm.org/D70037 rdar://problem/56924558
- Loading branch information
1 parent
d24bce5
commit da83e96
Showing
5 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
void stop() {} | ||
void relative(); | ||
|
||
int main() | ||
{ | ||
stop(); | ||
// Hello World! | ||
relative(); | ||
// Hello Absolute! | ||
return 0; | ||
} |
5 changes: 5 additions & 0 deletions
5
lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
void stop() {} | ||
void relative() { | ||
stop(); | ||
// Hello Relative! | ||
} |
5 changes: 5 additions & 0 deletions
5
lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
BOTDIR = $(BUILDDIR)/buildbot | ||
USERDIR = $(BUILDDIR)/user | ||
C_SOURCES = $(BOTDIR)/main.c | ||
LD_EXTRAS = $(BOTDIR)/relative.o | ||
|
||
include Makefile.rules | ||
|
||
$(EXE): relative.o | ||
relative.o: $(BOTDIR)/relative.c | ||
cd $(BOTDIR) && $(CC) -c $(CFLAGS) -o $@ relative.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters