Linux quick debugging - Missing return line

I have a crash that I am trying to find, and even creating the application as debugging and executing it. I don't seem to get any symbolic information.

The output I get on the console is:

fatal error: unexpectedly found nil while unwrapping an Optional value Current stack trace: 0 libswiftCore.so 0x00007f1c51ca51c0 swift_reportError + 120 1 libswiftCore.so 0x00007f1c51cbfbe0 _swift_stdlib_reportFatalError + 62 2 libswiftCore.so 0x00007f1c51ab9be6 <unavailable> + 1186790 3 libswiftCore.so 0x00007f1c51c18ead <unavailable> + 2625197 4 libswiftCore.so 0x00007f1c51ab9be6 <unavailable> + 1186790 5 libswiftCore.so 0x00007f1c51bd4060 specialized _fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never + 96 6 myProgram 0x000000000045909e <unavailable> + 364702 7 myProgram 0x0000000000423f37 <unavailable> + 147255 8 libdispatch.so 0x00007f1c5276e177 <unavailable> + 278903 9 libdispatch.so 0x00007f1c52779edd <unavailable> + 327389 10 libdispatch.so 0x00007f1c5277a890 <unavailable> + 329872 11 libdispatch.so 0x00007f1c5277c5f4 <unavailable> + 337396 12 libdispatch.so 0x00007f1c5279aa18 <unavailable> + 461336 13 libpthread.so.0 0x00007f1c50c6f6ba <unavailable> + 30394 14 libc.so.6 0x00007f1c4f7b9370 clone + 109 Illegal instruction (core dumped) 

I simply cannot find a way to expand this information, and although I could view the map file. I feel that now we have moved very far beyond this territory with the help of modern tools.

Does anyone have pointers or is really able to create an assembly with more information in it.

Ubuntu 16.04, Swift 3.1.1

+5
source share
1 answer

So, unfortunately, this seems like an error in lldb that uses local characters in ELF executables, and dladdr cannot find them on Linux platforms.

See the bug report here: https://bugs.swift.org/browse/SR-755

ATTENTION:

Great news, but there is a bash script that does all the work for you. The instruction is small, but this is what you need to do:

Download script: https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal

Run your emergency application.

 $ myApp &> crash.log 

Then execute the script.

 $ ./symbolicate-linux-fatal myApp crash.log 

It did not help me with anything.

+6
source

Source: https://habr.com/ru/post/1269571/


All Articles