Skip to content

Process event with debug symbol file

It is a prototype implementation to convert stack trace symbol name in a native app to human-readable format and finding out the line no. / filename by using debug symbol files.

(It depends on !78 (merged) )

For example, a "frame" in a stack trace may look:

            {
              "package": "[snipped]",
              "function": "$s10testsentry11ContentViewV5crashyyF",
              "image_addr": "0x0000000102805000",
              "symbol_addr": "0x0000000102806bd0",
              "instruction_addr": "0x0000000102806c36"
            },

If it found a DIF file that matches the frame, it will

  1. Convert the function name from "$s10testsentry11ContentViewV5crashyyF" to ""ContentView.crash()"
  2. Add "lineNo"
  3. Add "filename"
  4. Add "resolved = true"
            {
              "lineNo": 21,
              "package": "[snipped]",
              "filename": "ContentView.swift",
              "function": "ContentView.crash()",
              "resolved": true,
              "image_addr": "0x0000000102805000",
              "symbol_addr": "0x0000000102806bd0",
              "instruction_addr": "0x0000000102806c36"
            },

The frontend will show:

image

Changes

  1. When a new event is received, it will trigger a task called difs_resolve_stracktrace to process the stack trace.

  2. difs_resolve_stracktrace loads DIF files and try to resolve the stack trace one by one. It will update the stack trace's frames using the DIF with the highest matching score.

  3. And then it will update the "Event" data with the processed frames.

Restrictions

  1. It is tested with the iOS Swift application only.

  2. It will process every "event" of a crash report with DIFs uploaded. It may need optimization to reduce the no. of events to process

  3. It don't support to process system library debug symbol

Edited by Ben

Merge request reports