-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Quality Tracker #11643
Comments
Currently jlcall parameters terminate at the first call because they reference the argument register. begin # LineEdit.jl, line 1441:
return history_prev_prefix(data,(top(getfield))((top(getfield))(data,:histprompt),:hp),(top(getfield))(data,:prefix))
end define %jl_value_t* @julia_anonymous_21645(%jl_value_t*, %jl_value_t**, i32) #0 !lam !15 {
top:
call void @llvm.stackprotector(i8* %StackGuard, i8** %StackGuardSlot), !dbg !16
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !17, metadata !18), !dbg !16
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !19, metadata !20), !dbg !16
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !21, metadata !22), !dbg !16
%3 = alloca %jl_value_t*, i32 6
%4 = getelementptr %jl_value_t*, %jl_value_t** %3, i32 2, !dbg !16
[snip]
br i1 %14, label %ifcont, label %else, !dbg !16
else: ; preds = %top
call void @jl_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @_j_str25, i32 0, i32 0)), !dbg !16
unreachable, !dbg !16
ifcont: ; preds = %top
%const = bitcast i64 13008184512 to i64, !dbg !23
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !17, metadata !18), !dbg !16
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !19, metadata !20), !dbg !16
call void @llvm.dbg.value(metadata %jl_value_t** %1, i64 0, metadata !21, metadata !22), !dbg !16
[snip]
call void @llvm.dbg.declare(metadata %jl_value_t** %4, metadata !19, metadata !18), !dbg !23
[snip]
; Debug Info Terminates here (see below)
%24 = call %jl_value_t* @jl_f_get_field(%jl_value_t* null, %jl_value_t** %23, i32 2), !dbg !23
[snip]
}
Needs to be fixed in LLVM most likely. |
FWIW I suspect merging GC frame in #11508 will break certain debug info created by |
Are you looking for examples where local variables are not shown? I have one: https://gist.github.com/aviks/ad207b71e514ffe79c13 (Note: this is on OSX, where we get a segfault on running that test. No segfault in linux) Let me know if you need any more info. EDIT: This is with |
We have bad debug info in the error paths of most functions because variables get clobbered by the arguments to the throw function. Not quite sure how to fix this yet. Maybe we can do some sort of stack dump before proceeding. Example:
|
My current evil plan for fixing the second case is to do the following:
Where jl_stackspill is an assembly routine that just dumps the current register state to the stack. |
Is this still relevant? |
One year later, closing due to inactivity. |
It's been largely fixed now (with the right -g and/or -O flags) |
I've started working on debug info quality. This will likely be a rather long process with many subparts, but this issues is intended to serve as an umbrella issue for testcases/TODOs/etc. For now I'm planning to paste test cases directly into comments here, but if that gets unwieldy, I'll move them to gist.
The text was updated successfully, but these errors were encountered: