Fix debug line info for macro expansions.
Macro expansions produce code tagged with debug locations that are completely different from the surrounding expressions. This wrecks havoc on debugger's ability the step over source lines. In order to have a good line stepping behavior in debugger, we overwrite debug locations of macro expansions with that of the outermost expansion site.
This commit is contained in:
parent
e9bc1bac8c
commit
cf6461168f
11 changed files with 298 additions and 53 deletions
|
@ -521,6 +521,15 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateLexicalBlock(
|
|||
));
|
||||
}
|
||||
|
||||
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
|
||||
LLVMRustDIBuilderRef Builder,
|
||||
LLVMRustMetadataRef Scope,
|
||||
LLVMRustMetadataRef File) {
|
||||
return wrap(Builder->createLexicalBlockFile(
|
||||
unwrapDI<DIDescriptor>(Scope),
|
||||
unwrapDI<DIFile>(File)));
|
||||
}
|
||||
|
||||
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
||||
LLVMRustDIBuilderRef Builder,
|
||||
LLVMRustMetadataRef Context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue