How to backtrace how main's called with gdb? -


The main , show how it is applied?

If I get the right questions, so it may be that what you want:

  Set whether the backdrops should continue "main". Usually the "main" collar is not of interest, so GDB will eliminate the backtracks on the "main". Set this variable if you need to see the rest of the stack trace   

So if you set it to to (and libc available debug information, cf.), see if you look like a stack:

  ./functionPtr.c:8 (gdb) where # 0 main () at 1 0x0000003c47e2139d __libc_start_main (main = 0x40052b & LT; key & gt;, argc = 1, ubp_av = 0x7fffffffde28, init = & LT; customize & gt; out, fini = & LT; customize & gt; out, rtld_fini = & LT; customize outside & gt;, stack_end = 0x7fffffffde18) to libc-start.c: 226 # 2 0x0000000000400449 _start Switch to ()   

around is to take it with the code:

  struct pthread * self = THREAD_SELF; / * Store old information * / Unwind_buf.priv.data.prev = THREAD_GETMEM (auto, cleanup_jmp_buf); Unwind_buf.priv.data.cleanup = THREAD_GETMEM (auto, cleanup); / * Store new cleanup handler information * / THREAD_SETMEM (auto, cleanup_jmp_buf, & amp; unwind_buf); / * Run the program. * / Result = main (argc, argv, MAIN_AUXVEC_PARAM __environ);    

Comments