Open ribrdb opened 9 years ago
I believe this problem is fixed by https://golang.org/cl/112750043 . Can you check with tip, or with 1.3 with that patch included?
Labels changed: added repo-main, release-none.
Oops, I tested it at tip and still got a debugger crash so I just assumed it was the same thing, but the frames do look correct there. I'll have to debug that crash more. However dwarfdump --verify still complains because rows are supposed to have addresses < the FDE's end address but one gets output for the end address itself.
I just tried this on tip. I was not able to put a breakpoint on main.foo - I believe because main.foo is inlined. If I built with `go build -gcflags='-l'` I could indeed breakpoint main.foo, and cause lldb to segfault. I'm running on Linux with lldb version 3.4.2. FWIW the following is the lldb backtrace: #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:136 #1 0x00007f396441851e in memcpy (__len=8, __src=0xc208031f80, __dest=0x1263290) at /usr/include/bits/string3.h:51 #2 lldb_private::Value::GetValueAsData (this=this@entry=0x7fff2322ac20, exe_ctx=exe_ctx@entry=0x7fff2322aad0, data=..., data_offset=data_offset@entry=0, module=<optimized out>) at Value.cpp:582 #3 0x00007f3964432562 in lldb_private::ValueObjectVariable::UpdateValue (this=0x11deda0) at ValueObjectVariable.cpp:241 #4 0x00007f396441d579 in lldb_private::ValueObject::UpdateValueIfNeeded (this=0x11deda0, update_format=<optimized out>) at ValueObject.cpp:212 #5 0x00007f396441d6f3 in lldb_private::ValueObject::GetValueAsCString (this=0x11deda0) at ValueObject.cpp:1477 #6 0x00007f39643d4478 in FormatPromptRecurse (format=<optimized out>, sc=<optimized out>, exe_ctx=<optimized out>, addr=<optimized out>, s=..., end=end@entry=0x7fff2322b170, valobj=0x0) at Debugger.cpp:2285 #7 0x00007f39643d20c8 in FormatPromptRecurse (format=<optimized out>, sc=<optimized out>, exe_ctx=<optimized out>, addr=<optimized out>, s=..., end=end@entry=0x7fff2322b470, valobj=<optimized out>) at Debugger.cpp:1526 #8 0x00007f39643d20c8 in FormatPromptRecurse (format=<optimized out>, sc=sc@entry=0x7fff2322b7b0, exe_ctx=exe_ctx@entry=0x7fff2322b770, addr=addr@entry=0x0, s=..., end=end@entry=0x0, valobj=<optimized out>) at Debugger.cpp:1526 #9 0x00007f39643d5d53 in lldb_private::Debugger::FormatPrompt (format=<optimized out>, sc=0x7fff2322b7b0, exe_ctx=exe_ctx@entry=0x7fff2322b770, addr=addr@entry=0x0, s=..., valobj=valobj@entry=0x0) at Debugger.cpp:2622 #10 0x00007f3964735fee in lldb_private::Thread::DumpUsingSettingsFormat (this=this@entry=0x7f3940000910, strm=..., frame_idx=frame_idx@entry=0) at Thread.cpp:1856 #11 0x00007f39647362c8 in lldb_private::Thread::GetStatus (this=this@entry=0x7f3940000910, strm=..., start_frame=start_frame@entry=0, num_frames=num_frames@entry=1, num_frames_with_source=num_frames_with_source@entry=1) at Thread.cpp:1959 #12 0x00007f39646fa92a in lldb_private::Process::GetThreadStatus (this=this@entry=0x11a74d0, strm=..., only_threads_with_stop_reason=only_threads_with_stop_reason@entry=true, start_frame=start_frame@entry=0, num_frames=num_frames@entry=1, num_frames_with_source=num_frames_with_source@entry=1) at Process.cpp:5596 #13 0x00007f39643674dd in CommandObjectProcessStatus::DoExecute (this=<optimized out>, command=..., result=...) at CommandObjectProcess.cpp:1607 #14 0x00007f39644e5a8d in lldb_private::CommandObjectParsed::Execute (this=0x1110aa0, args_string=<optimized out>, result=...) at CommandObject.cpp:1037 #15 0x00007f39644dfded in lldb_private::CommandInterpreter::HandleCommand (this=0x10ff7f0, command_line=<optimized out>, command_line@entry=0x411fb8 "process status", lazy_add_to_history=lazy_add_to_history@entry=lldb_private::eLazyBoolNo, result=..., override_context=override_context@entry=0x0, repeat_on_empty_command=repeat_on_empty_command@entry=true, no_context_switching=false) at CommandInterpreter.cpp:1853 #16 0x00007f39642a85db in lldb::SBCommandInterpreter::HandleCommand (this=0x7fff2322be30, command_line=0x411fb8 "process status", result=..., add_to_history=<optimized out>) at SBCommandInterpreter.cpp:122 #17 0x000000000040a542 in Driver::HandleProcessEvent (this=0x7fff2322ed00, event=...) at Driver.cpp:1104 #18 0x000000000040b8da in Driver::MainLoop (this=this@entry=0x7fff2322ed00) at Driver.cpp:1635 #19 0x0000000000408f84 in main (argc=2, argv=0x7fff2322ef38, envp=<optimized out>) at Driver.cpp:1802
Does https://golang.org/cl/150370043 help with the issue of reporting line number info for the final address of an FDE? I have no idea what the lldb crash means.
CL https://golang.org/cl/150370043 mentions this issue.
This issue was updated by revision 060b24006a7efbd4ec9d966759482428a421cbe.
LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/150370043