Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(lldb) log enable dwarf all
(lldb) r
Process 3453 launched: '../node_g' (x86_64)
DWARFDebugInfo::GetCompileUnitAranges() for "../node_g" from .debug_aranges
DWARFDebugAranges::Sort(minimize = 1) with 12 entries
DWARFDebugAranges::Sort() 12 entries after minimizing (0 entries combined for 0 bytes saved)
0x001bc88e: [0x8e3700 - 0x8e6540)
0x001bcb2d: [0x8e6540 - 0x8e8b80)
0x001bcebf: [0x8e8b80 - 0x8e9ec0)
0x001bcfc6: [0x8e9ec0 - 0x8ec0bd)
0x001bd1b3: [0x8ec0c0 - 0x8ec9b4)
0x001bd270: [0x8ec9c0 - 0x8ed1c0)
0x001bd360: [0x8ed1c0 - 0x8ee1dc)
0x001bd414: [0x8ee200 - 0x8f0200)
0x001bd53e: [0x8f0200 - 0x8f1580)
0x001bd616: [0x8f1580 - 0x8f2ac0)
0x001bd6ee: [0x8f2ac0 - 0x8f4390)
0x001bd7a1: [0x8f4390 - 0x8f4617)
Process 3453 stopped
* thread #1: tid = 0x0d7d, 0x00007f87a514ef77 libc.so.6`raise + 55, stop reason = signal SIGABRT
frame #0: 0x00007f87a514ef77 libc.so.6`raise + 55
libc.so.6`raise + 55:
-> 0x7f87a514ef77: cmpq $-4096, %rax
0x7f87a514ef7d: ja 0x7f87a514ef9d ; raise + 93
0x7f87a514ef7f: .byte 0xf3 ; unknown opcode
0x7f87a514ef80: ret
(lldb) log disable dwarf all
(lldb) log enable dwarf line
(lldb) f 17
frame #17: 0x00000000007cc0e6 node_g`node::AsyncWrap::MakeCallback(unsigned int, int, v8::Handle<v8::Value>*) + 182
node_g`node::AsyncWrap::MakeCallback(unsigned int, int, v8::Handle<v8::Value>*) + 182:
-> 0x7cc0e6: movq %rax, -8(%rbp)
0x7cc0ea: movq -8(%rbp), %rax
0x7cc0ee: addq $80, %rsp
0x7cc0f2: popq %rbp
(lldb) l
(lldb) log enable dwarf pubnames
(lldb) log enable dwarf pubtypes
(lldb) l
(lldb) log enable dwarf map
(lldb) log enable dwarf completion
(lldb) l
(lldb) log enable dwarf lookups
(lldb) l
(x86_64) ../node_g: SymbolFileDWARF::FindFunctions (name="main", name_type_mask=0x8, append=0, sc_list)
(x86_64) ../node_g: SymbolFileDWARF::FindFunctions (name="main", name_type_mask=0x8, append=0, sc_list) => 1
In the massive output, got a few of these lines:
(x86_64) ../node_g: DWARFCompileUnit::Index() for compile unit at .debug_info[0x0001b717]
(x86_64) ../node_g: DWARFCompileUnit::ExtractDIEsIfNeeded () for compile unit at .debug_info[0x00025ec2]
(lldb) bt
* thread #1: tid = 0x013a, 0x00007f0baa38df77 libc.so.6`raise + 55, stop reason = signal SIGABRT
frame #0: 0x00007f0baa38df77 libc.so.6`raise + 55
frame #1: 0x00007f0baa3915e8 libc.so.6`abort + 328
frame #2: 0x000000000078d4a1 node_g`node::Abort(v8::FunctionCallbackInfo<v8::Value> const&) + 17
frame #3: 0x0000000000a06a3c node_g`v8::internal::FunctionCallbackArguments::Call(v8::Handle<v8::Value> (*)(v8::Arguments const&)) + 188
frame #4: 0x0000000000a2b468 node_g`v8::internal::MaybeObject* v8::internal::HandleApiCallHelper<false>(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) + 936
frame #5: 0x0000000000a2b0b3 node_g`v8::internal::Builtin_Impl_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) + 51
frame #6: 0x0000000000a22682 node_g`v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 146
frame #7: 0x00000311cab072ce
frame #8: 0x00000311cab7cdd4
frame #9: 0x00000311cab7c3e0
frame #10: 0x00000311cab108f4
frame #11: 0x00000311cab2aebe
frame #12: 0x00000311cab17e97
frame #13: 0x0000000000aa281c node_g`v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, bool*) + 540
frame #14: 0x0000000000aa22f4 node_g`v8::internal::Execution::Call(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, bool*, bool) + 548
frame #15: 0x00000000009cd6d6 node_g`v8::Function::Call(v8::Handle<v8::Object>, int, v8::Handle<v8::Value>*) + 582
frame #16: 0x000000000077c11a node_g`node::AsyncWrap::MakeCallback(v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) + 522
frame #17: 0x00000000007cc0e6 node_g`node::AsyncWrap::MakeCallback(unsigned int, int, v8::Handle<v8::Value>*) + 182
frame #18: 0x00000000007cc005 node_g`node::TimerWrap::OnTimeout(uv_timer_s*, int) + 181
frame #19: 0x00000000009a86c7 node_g`uv__run_timers + 135
frame #20: 0x0000000000997930 node_g`uv_run + 96
frame #21: 0x00000000007906d2 node_g`node::Start(int, char**) + 258
frame #22: 0x00000000007b4a52 node_g`main + 34
frame #23: 0x00007f0baa378de5 libc.so.6`__libc_start_main + 245
frame #24: 0x0000000000779fb4 node_g`_start + 41
(lldb) frame select 17
frame #17: 0x00000000007cc0e6 node_g`node::AsyncWrap::MakeCallback(unsigned int, int, v8::Handle<v8::Value>*) + 182
node_g`node::AsyncWrap::MakeCallback(unsigned int, int, v8::Handle<v8::Value>*) + 182:
-> 0x7cc0e6: movq %rax, -8(%rbp)
0x7cc0ea: movq -8(%rbp), %rax
0x7cc0ee: addq $80, %rsp
0x7cc0f2: popq %rbp
(lldb) list
(lldb)
SBCommandInterpreter(0x1d83b30)::HandleCommand (command="l", SBCommandReturnObject(0x224cc60), add_to_history=1)
0x1e034c0 ConnectionFileDescriptor::Read () ::read (fd = 5, dst = 0x7f260d091a30, dst_len = 1024)...
Processing command: l
0x1e034c0 ConnectionFileDescriptor::BytesAvailable (timeout_usec = 5000000)
0x1e034c0 ConnectionFileDescriptor::BytesAvailable() ::select (nfds=12, fds={5, 11}, NULL, NULL, timeout=0x7f260d091840)...
HandleCommand, cmd_obj : '_regexp-list'
HandleCommand, revised_command_line: '_regexp-list'
HandleCommand, wants_raw_input:'True'
HandleCommand, command line after removing command name(s): ''
Processing command: source list
HandleCommand, cmd_obj : 'source list'
HandleCommand, revised_command_line: 'source list'
HandleCommand, wants_raw_input:'False'
HandleCommand, command line after removing command name(s): ''
HandleCommand, command succeeded
HandleCommand, command succeeded
SBCommandInterpreter(0x1d83b30)::HandleCommand (command="l", SBCommandReturnObject(0x224cc60): Status: Success, add_to_history=1) => 1
SBDebugger(0x1d83030)::GetSelectedTarget () => SBTarget(0x1e05c60): node_g
SBTarget(0x1e05c60)::GetProcess () => SBProcess(0x1e0b7c0)
SBProcess(0x1e0b7c0)::GetSTDOUT (dst="", dst_len=1024) => 0
SBDebugger(0x1d83030)::GetSelectedTarget () => SBTarget(0x1e05c60): node_g
SBTarget(0x1e05c60)::GetProcess () => SBProcess(0x1e0b7c0)
SBProcess(0x1e0b7c0)::GetSTDERR (dst="", dst_len=1024) => 0
SBInputReader(0x1e03630)::IsActive () => 1
SBBroadcaster(0x1d82f70)::BroadcastEventByType (event_type=0x00000001, unique=1)
0x1d82f70 Broadcaster("Driver")::BroadcastEvent (event_sp = {0x1f89070 Event: broadcaster = 0x1d82f70 (Driver), type = 0x00000001, data = <NULL>}, unique =1) hijack = (nil)
0x7f25f80008f0 Listener('IOChannel::Run')::AddEvent (event_sp = {0x1f89070})
SBListener(0x1d83478)::WaitForEvent (timeout_secs=INFINITE, SBEvent(0x7f25f8000f70))...
0x1d83478 Listener::WaitForEventsInternal (timeout = { (nil) }) for lldb.Debugger
0x7f25f80008f0 'IOChannel::Run' Listener::FindNextEventInternal(broadcaster=(nil), broadcaster_names=(nil)[0], event_type_mask=0x00000000, remove=1) event 0x1f89070
SBListener(0x7f25f80008f0)::WaitForEvent (timeout_secs=INFINITE, SBEvent(0x1f89070)) => 1
SBEvent(0x1f89070)::GetType () => 0x00000001
SBEvent(0x1f89070)::BroadcasterMatchesRef (SBBroadcaster(0x1d82f70): Driver) => 1
0x1e034c0 ConnectionFileDescriptor::BytesAvailable() ::select (nfds=12, fds={5, 11}, NULL, NULL, timeout=0x7f260d091840) => 1, error = (null)
0x1e034c0 ConnectionFileDescriptor::Read () ::read (fd = 5, dst = 0x7f260d091a30, dst_len = 1024) => 7, error = (null)
0x1dfdb30 Communication::AppendBytesToCache (src = 0x7f260d091a30, src_len = 7, broadcast = 1)
SBDebugger(0x1d83030)::InputReaderIsTopReader (SBInputReader(0x7fff21e74db0))
(lldb) 0x1e034c0 ConnectionFileDescriptor::Read () ::read (fd = 5, dst = 0x7f260d091a30, dst_len = 1024)...
0x1e034c0 ConnectionFileDescriptor::BytesAvailable (timeout_usec = 5000000)
SBBroadcaster(0x1df2380)::BroadcastEventByType (SBEvent(0x7f25f8000f30), unique=0)
0x1e034c0 ConnectionFileDescriptor::Read () ::read (fd = 5, dst = 0x7f260d091a30, dst_len = 1024) => 2, error = (null)
0x1df2380 Broadcaster("IOChannel")::BroadcastEvent (event_sp = {0x7f25f8000f30 Event: broadcaster = 0x1df2380 (IOChannel), type = 0x00000001, data = {"quit"}}, unique =0) hijack = (nil)
0x1dfdb30 Communication::AppendBytesToCache (src = 0x7f260d091a30, src_len = 2, broadcast = 1)
0x1d83478 Listener('lldb.Debugger')::AddEvent (event_sp = {0x7f25f8000f30})
SBDebugger(0x1d83030)::InputReaderIsTopReader (SBInputReader(0x7fff21e74db0))
SBListener(0x7f25f80008f0)::WaitForEvent (timeout_secs=INFINITE, SBEvent((nil)))...
^D0x7f25f80008f0 Listener::WaitForEventsInternal (timeout = { (nil) }) for IOChannel::Run
0x1e034c0 ConnectionFileDescriptor::Read () ::read (fd = 5, dst = 0x7f260d091a30, dst_len = 1024)...
0x1e034c0 ConnectionFileDescriptor::BytesAvailable (timeout_usec = 5000000)
0x1e034c0 ConnectionFileDescriptor::BytesAvailable() ::select (nfds=12, fds={5, 11}, NULL, NULL, timeout=0x7f260d091840)...
0x1d83478 'lldb.Debugger' Listener::FindNextEventInternal(broadcaster=(nil), broadcaster_names=(nil)[0], event_type_mask=0x00000000, remove=1) event 0x7f25f8000f30
SBListener(0x1d83478)::WaitForEvent (timeout_secs=INFINITE, SBEvent(0x7f25f8000f30)) => 1
SBEvent(0x7f25f8000f30)::GetType () => 0x00000001
SBEvent(0x7f25f8000f30)::BroadcasterMatchesRef (SBBroadcaster(0x1df2380): IOChannel) => 1
SBEvent(0x7f25f8000f30)::GetType () => 0x00000001
SBEvent(0x7f25f8000f30)::GetCStringFromEvent () => "quit"
SBCommandInterpreter::SBCommandInterpreter (interpreter=(nil)) => SBCommandInterpreter((nil))
SBDebugger(0x1d83030)::GetCommandInterpreter () => SBCommandInterpreter(0x1d83b30)
SBCommandInterpreter(0x1d83b30)::HandleCommand (command="quit", SBCommandReturnObject(0x224cc60), add_to_history=1)
Processing command: quit
node: file format elf64-x86-64
Sections:
Idx Name Size VMA LMA File off Algn
0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.hash 0004d844 0000000000400298 0000000000400298 00000298 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .dynsym 000e29e0 000000000044dae0 000000000044dae0 0004dae0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .dynstr 00233eb9 00000000005304c0 00000000005304c0 001304c0 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .gnu.version 00012e28 000000000076437a 000000000076437a 0036437a 2**1
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .gnu.version_r 00000120 00000000007771a8 00000000007771a8 003771a8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rela.dyn 00000090 00000000007772c8 00000000007772c8 003772c8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rela.plt 000019e0 0000000000777358 0000000000777358 00377358 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 0000001f 0000000000778d38 0000000000778d38 00378d38 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00001150 0000000000778d60 0000000000778d60 00378d60 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 007a8070 0000000000779ec0 0000000000779ec0 00379ec0 2**6
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000009 0000000000f21f30 0000000000f21f30 00b21f30 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00280044 0000000000f21f40 0000000000f21f40 00b21f40 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .eh_frame_hdr 0004c3ec 00000000011a1f84 00000000011a1f84 00da1f84 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .eh_frame 0013102c 00000000011ee370 00000000011ee370 00dee370 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
17 .init_array 00000020 000000000151fd88 000000000151fd88 00f1fd88 2**3
CONTENTS, ALLOC, LOAD, DATA
18 .fini_array 00000018 000000000151fda8 000000000151fda8 00f1fda8 2**3
CONTENTS, ALLOC, LOAD, DATA
19 .jcr 00000008 000000000151fdc0 000000000151fdc0 00f1fdc0 2**3
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 00000230 000000000151fdc8 000000000151fdc8 00f1fdc8 2**3
CONTENTS, ALLOC, LOAD, DATA
21 .got 00000008 000000000151fff8 000000000151fff8 00f1fff8 2**3
CONTENTS, ALLOC, LOAD, DATA
22 .got.plt 000008b8 0000000001520000 0000000001520000 00f20000 2**3
CONTENTS, ALLOC, LOAD, DATA
23 .data 00014800 00000000015208c0 00000000015208c0 00f208c0 2**4
CONTENTS, ALLOC, LOAD, DATA
24 .bss 00007be0 00000000015350c0 00000000015350c0 00f350c0 2**5
ALLOC
25 .comment 00000055 0000000000000000 0000000000000000 00f350c0 2**0
CONTENTS, READONLY
26 .debug_aranges 00000240 0000000000000000 0000000000000000 00f35115 2**0
CONTENTS, READONLY, DEBUGGING
27 .debug_info 02a301b0 0000000000000000 0000000000000000 00f35355 2**0
CONTENTS, READONLY, DEBUGGING
28 .debug_abbrev 0005cd0d 0000000000000000 0000000000000000 03965505 2**0
CONTENTS, READONLY, DEBUGGING
29 .debug_line 00271766 0000000000000000 0000000000000000 039c2212 2**0
CONTENTS, READONLY, DEBUGGING
30 .debug_str 0033f3ad 0000000000000000 0000000000000000 03c33978 2**0
CONTENTS, READONLY, DEBUGGING
31 .debug_loc 00000115 0000000000000000 0000000000000000 03f72d25 2**0
CONTENTS, READONLY, DEBUGGING
32 .debug_ranges 000000c0 0000000000000000 0000000000000000 03f72e3a 2**0
CONTENTS, READONLY, DEBUGGING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.