Hi
Gurus,
I want to print the
stack trace in exception signal handler, do you guys know any reliable way to do
it?
My Dev
Env,
Gcc: MontaVista
3.3.1
Linux Kernel:
2.4.18
Glibc:
2.3.2
I tired,
1) backtrace, it
just print nothing.
2) try to use
sa_sigaction, but when I get uc_mcontext.gregs from the third parameter (cast to
ucontext_t*),
there is no stack pointer register??
do not know
why.
Many thanks
-Rockson
Registers dumped in
signal handler:
Reg 0: 0
Reg 1: 5f13
Reg 2: 0
Reg 3: 47269c
Reg 4: 0
Reg 5: 0
Reg 6: 0
Reg 7: 7fff7918
Reg 8: 0
Reg 9: 0
Reg 10: 0
Reg 11: 8
Reg 12: 0
Reg 13: b
Reg 14: 0
Reg 15: 7fff78f8
Reg 16: 0
Reg 17: 0
Reg 18: 0
Reg 19: 0
Reg 20: 0
Reg 21: 5f00
Reg 22: 0
Reg 23: b
Reg 24: 0
Reg 25: 0
Reg 26: 0
Reg 27: 0
Reg 28: 0
Reg 29: 0
Reg 30: 0
Reg 31: 0
Reg 32: 0
Reg 33: b
Reg 34: 0
Reg 35: 0
Reg 36: 0
Reg 1: 5f13
Reg 2: 0
Reg 3: 47269c
Reg 4: 0
Reg 5: 0
Reg 6: 0
Reg 7: 7fff7918
Reg 8: 0
Reg 9: 0
Reg 10: 0
Reg 11: 8
Reg 12: 0
Reg 13: b
Reg 14: 0
Reg 15: 7fff78f8
Reg 16: 0
Reg 17: 0
Reg 18: 0
Reg 19: 0
Reg 20: 0
Reg 21: 5f00
Reg 22: 0
Reg 23: b
Reg 24: 0
Reg 25: 0
Reg 26: 0
Reg 27: 0
Reg 28: 0
Reg 29: 0
Reg 30: 0
Reg 31: 0
Reg 32: 0
Reg 33: b
Reg 34: 0
Reg 35: 0
Reg 36: 0