Thanks, I'll give it a try. Now, about getting an actual core dump, docs [1] say process.abort will generate one.
$ node -e 'process.abort()' Aborted (core dumped) $ ls -a ./ ../ Should I file this as a bug? [1] http://nodejs.org/api/process.html#process_process_abort danmilon. On 02/01/2013 01:21 PM, Ben Noordhuis wrote: > On Fri, Feb 1, 2013 at 12:39 AM, Dan Milon <[email protected]> > wrote: >> >> I was wondering if it is possible to use a core dump from a node >> process running on linux as a post mortem debugging mechanism. >> >> Would smartos' MDB understand a core dump coming from a linux >> machine? >> >> Thanks, danmilon. > > The people at Joyent added V8 smarts to mdb as a plugin but I > don't know if it still works. > > It's possible that mdb understands Linux core dumps but I expect > it doesn't. A core dump is an ELF file in disguise and about as > portable. > > On a tangential note, there's built-in gdbjit support. It's not > perfect but it's functional enough to print JS function names in > stack traces. > > $ ./configure --debug --gdb $ make <snip> $ gdb --args > out/Debug/node --gdbjit tmp/net-connect.js (gdb) break > uv_tcp_connect Breakpoint 1 at 0xb92ca0: file > ../../deps/uv/src/uv-common.c, line 245. (gdb) run Starting > program: /home/bnoordhuis/src/nodejs/master/out/Debug/node --gdbjit > tmp/net-connect.js Breakpoint 1, uv_tcp_connect (req=0x13870c0, > handle=0x137a690, address=..., cb=0x72efa6 > <node::TCPWrap::AfterConnect(uv_connect_s*, int)>) at > ../../deps/uv/src/uv-common.c:245 245 if (handle->type != > UV_TCP || address.sin_family != AF_INET) { (gdb) bt #0 > uv_tcp_connect (req=0x13870c0, handle=0x137a690, address=..., > cb=0x72efa6 <node::TCPWrap::AfterConnect(uv_connect_s*, int)>) at > ../../deps/uv/src/uv-common.c:245 #1 0x000000000072f3d4 in > node::TCPWrap::Connect (args=...) at ../../src/tcp_wrap.cc:379 #2 > 0x00000000007c1cea in v8::internal::HandleApiCallHelper<false> > (args=..., isolate=0x1300070) at > ../../deps/v8/src/builtins.cc:1372 #3 0x00000000007bc634 in > v8::internal::Builtin_Impl_HandleApiCall (args=..., > isolate=0x1300070) at ../../deps/v8/src/builtins.cc:1390 #4 > 0x00000000007bc605 in v8::internal::Builtin_HandleApiCall > (args=..., isolate=0x1300070) at > ../../deps/v8/src/builtins.cc:1389 #5 0x000002a75ec0654e in ?? () > #6 0x000002a75ec150b8 in ?? () #7 0x000002a75ec064a1 in ?? () #8 > 0x00007fffffffd3d0 in ?? () #9 0x00007fffffffd438 in ?? () #10 > 0x000002a75ec6f9b8 in connect (self=..., address=..., port=..., > addressType=..., localAddress=...) at net.js:703 Backtrace stopped: > previous frame inner to this frame (corrupt stack?) > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
