Ios Symbolication Server side

How to symbolize an ios crash report after downloading to a server in a Linux environment where tools and scripts for iOS are not available. I know that Apple uses atos and some other tools to match hexadecimal addresses with a character along with a .dYSM file.

I can upload the .dYSM file along with the error message to the server. It is called QuincyKit, but they make the symbolism locally. But others like HockeyApp and Critterism do it remotely.

Pls recommends possible ways to do this on the server.

+4
source share
2 answers

You need to implement your own Linux compatible versions of atos , otool and dwarfdump (at least the functions required for symbolism). Apple tools are not open source and only work on Mac OS X.

None of the services provides a solution that can be used by third parties on systems without OS X. Thus, your only chance, in addition to introducing the necessary functions to work on your Linux system, is to do it on a Mac, as QuincyKit does. see https://github.com/TheRealKerni/QuincyKit/wiki/Remote-symbolication or use a third-party service.

Note. I am the creator of QuincyKit and co-founder of HockeyApp.

+3
source

It is possible. You can take a look at https://github.com/facebook/atosl

I worked on Linux. (Ubuntu server) However, it takes some time to start.


atosl installation

First you need to install libdwarf-dev , dwarfdump , binutils-dev and libiberty-dev .

eg. on Ubuntu:

 $ sudo apt-get install libdwarf-dev dwarfdump binutils-dev libiberty-dev 

Download or clone the atosl repository from GitHub:

 $ git clone https://github.com/facebook/atosl.git 

CD to atosl dir

 $ cd atosl 

Create a local configuration config.mk.local that contains a flag with the location of your binutil applications. (in Ubuntu, the default is /usr/bin ). If you are not sure, you can find out by running cat /var/lib/dpkg/info/binutils.list | less cat /var/lib/dpkg/info/binutils.list | less and copy the path to the objdump file. For instance. if the entry is /usr/bin/objdump , your path is /usr/bin .

So your config.mk.local should look like this:

 LDFLAGS += -L/usr/bin 

Compile it:

 $ make 

Now you can start using it:

 $ ./atosl --help 

Symbolizing Example

To show how atosl used, I will give a simple example.

Now let's take a look at the line from the crash log:

 13 ErrorApp 0x000ea294 0xe3000 + 29332 

To symbolize this, we need load address and runtime address .

In this example, runtime address is 0x000ea294 , and load address is 0xe3000 .

Now we have everything we need:

 $ ./atosl -o [YOUR_dSYM_FILE] -l [LOAD_ADDRESS] [RUNTIME_ADDRESS] 

In this example:

 $ ./atosl -o ErrorApp.app.dSYM/Contents/Resources/DWARF/ErrorApp -l 0xe3000 0x000ea294 

Returns a character string:

 main (in ErrorApp) (main.m:16) 

Fyi

You can find your vmaddr , which is usually 0x00001000 , by looking at the segname __TEXT Mach-O load command of your binary. In my example, this is different: 0x00004000

To find the address , we need to do some math.

address is found by the following formula:

 address = vmaddr + ( runtime_address - load_address ) 

In this example, our address is:

 0x00004000 + ( 0x000ea294 - 0xe3000 ) = 0xB294 

I have not played with this yet, but at the moment it seems to me that I need results. Perhaps this will work for you too.

+8
source

All Articles