获取Mono本机崩溃的行号

时间:2016-10-03 17:32:39

标签: mono

我在CentOS上的Mono 4.4.1运行时崩溃堆栈跟踪。 Mono是使用configure,make,make install从tarball构建的。 有没有办法获得有关正在执行的行号的更多信息,例如在配置步骤中启用标志?

    Native stacktrace:

    mono() [0x4ac038]
    /lib64/libpthread.so.0(+0xf100) [0x7efc4ff11100]
    /lib64/libc.so.6(gsignal+0x37) [0x7efc4f95f5f7]
    /lib64/libc.so.6(abort+0x148) [0x7efc4f960ce8]
    mono() [0x63e96e]
    mono() [0x63e75b]
    mono() [0x63e8bc]
    mono() [0x636332]
    /lib64/libpthread.so.0(+0x7dc5) [0x7efc4ff09dc5]
    /lib64/libc.so.6(clone+0x6d) [0x7efc4fa20ced]

    Debug info from gdb:
    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.

1 个答案:

答案 0 :(得分:1)

您需要安装gdb才能在堆栈跟踪的输出中获取行号,如下所示。

Thread 1 (Thread 0x7f0b023d8780 (LWP 9762)):
#0  0x00007f0b018a9ca9 in waitpid () from /lib64/libpthread.so.0
#1  0x00000000004ac0fe in mono_handle_native_sigsegv (signal=signal@entry=11, ctx=ctx@entry=0x7f0b02337ac0, info=info@entry=0x7f0b02337bf0) at mini-exceptions.c:2348
#2  0x00000000004ff87e in mono_arch_handle_altstack_exception (sigctx=sigctx@entry=0x7f0b02337ac0, siginfo=siginfo@entry=0x7f0b02337bf0, fault_addr=<optimized out>, stack_ovf=stack_ovf@entry=0) at exceptions-amd64.c:808
#3  0x0000000000424832 in mono_sigsegv_signal_handler (_dummy=11, _info=0x7f0b02337bf0, context=0x7f0b02337ac0) at mini-runtime.c:2888
#4  <signal handler called>
#5  0x00007f0b018a66d5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#6  0x000000000060d56b in mono_os_cond_wait (mutex=0x1594b70, cond=0x1594b98) at ../../mono/utils/mono-os-mutex.h:105
#7  mono_os_cond_timedwait (timeout_ms=4294967295, mutex=0x1594b70, cond=0x1594b98) at ../../mono/utils/mono-os-mutex.h:120
#8  _wapi_handle_timedwait_signal_handle (handle=handle@entry=0x40b, timeout=timeout@entry=4294967295, alertable=alertable@entry=1, poll=poll@entry=0, alerted=alerted@entry=0x7ffdbc5d208c) at handles.c:1554
#9  0x0000000000622992 in wapi_WaitForSingleObjectEx (handle=0x40b, timeout=timeout@entry=4294967295, alertable=alertable@entry=1) at wait.c:181
#10 0x000000000058eaa0 in mono_wait_uninterrupted (multiple=multiple@entry=0, numhandles=numhandles@entry=1, handles=handles@entry=0x7ffdbc5d2138, waitall=waitall@entry=0, ms=ms@entry=-1, thread=<optimized out>, alertable=1) at threads.c:1518
#11 0x00000000005903d5 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this_obj=<optimized out>, handle=0x40b, ms=-1, exitContext=<optimized out>) at threads.c:1652