Stack trace: stack scan against call frame vs set as instruction pointer in context

I use breakpad in my project to handle crashes and create a stack trace. There are various ways in a stack trace how a function calls the information found by stackwalker. The process described here by Finding_the_caller_frame :

  • Found by: stack scan
  • Found by: call frame information
  • Found by: indicated as an instruction pointer in context

What is the difference between the two? And more importantly, how could they help in terms of debugging?

Thread 0 (crashed)
  0  test_google_breakpad!crash [test_breakpad.cpp : 17 + 0x4]
      r4 = 0x00015530    r5 = 0xbea2cbe4    r6 = 0xffffff38    r7 = 0xbea2cb5c
      r8 = 0x00000000    r9 = 0x00000000   r10 = 0x00000000    fp = 0x00000000
      sp = 0xbea2cb50    lr = 0x00009025    pc = 0x00008f84
     Found by: given as instruction pointer in context
  1  test_google_breakpad!main [test_breakpad.cpp : 25 + 0x3]
      r4 = 0x00015530    r5 = 0xbea2cbe4    r6 = 0xffffff38    r7 = 0xbea2cb5c
      r8 = 0x00000000    r9 = 0x00000000   r10 = 0x00000000    fp = 0x00000000
      sp = 0xbea2cb50    pc = 0x00009025
     Found by: call frame info
  2  libc.so + 0x164e5
      r4 = 0x00008f64    r5 = 0xbea2cc34    r6 = 0x00000001    r7 = 0xbea2cc3c
      r8 = 0x00000000    r9 = 0x00000000   r10 = 0x00000000    fp = 0x00000000
      sp = 0xbea2cc18    pc = 0x400c34e7
     Found by: call frame info
+4
source share
1 answer

, , . .

, , , , . , "" , . , . , , (, , , ) .

, , . , ( !), , . , , - , .

+4

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


All Articles