Lines Matching +full:unused +full:- +full:function
18 /* Command line syntax: ./backtrace-child [--ptraceme|--gencore]
19 --ptraceme will call ptrace (PTRACE_TRACEME) in the two threads.
20 --gencore will call abort () at its end.
23 To test getting a signal at the very first instruction of a function:
24 PC will get changed to function 'jmp' by backtrace.c function
25 prepare_thread. Then SIGUSR2 will be signalled to backtrace-child
26 which will invoke function sigusr2.
28 instruction of a function. Properly handled unwind should not slip into
29 the previous unrelated function.
30 The tested functionality is arch-independent but the code reproducing it
31 has to be arch-specific.
32 On non-x86_64:
33 sigusr2 gets called by normal function call from function stdarg.
34 On any arch then sigusr2 calls raise (SIGUSR1) for --ptraceme.
35 abort () is called otherwise, expected for --gencore core dump.
40 # 1 0x7f7ab661af47 - 1 main
41 # 2 0x7f7ab5e3bb45 - 1 __libc_start_main
42 # 3 0x7f7ab661aa09 - 1 _start
45 # 1 0x7f7ab661ab3c - 1 sigusr2
48 # 4 0x7f7ab661ac92 - 1 stdarg
49 # 5 0x7f7ab661acba - 1 backtracegen
50 # 6 0x7f7ab661acd1 - 1 start
51 # 7 0x7f7ab61e2c53 - 1 start_thread
52 # 8 0x7f7ab5f0fdbd - 1 __clone
54 Expected non-x86_64 (i386) output; __kernel_vsyscall are skipped if found:
57 # 1 0xf7771466 - 1 raise
58 # 2 0xf77c1d07 - 1 main
59 # 3 0xf75bd963 - 1 __libc_start_main
60 # 4 0xf77c1761 - 1 _start
63 # 1 0xf7771466 - 1 raise
64 # 2 0xf77c18f4 - 1 sigusr2
65 # 3 0xf77c1a10 - 1 stdarg
66 # 4 0xf77c1a2c - 1 backtracegen
67 # 5 0xf77c1a48 - 1 start
68 # 6 0xf77699da - 1 start_thread
69 # 7 0xf769bbfe - 1 __clone
72 function in glibc to be the same as for the jmp() function. This is not always
93 main (int argc __attribute__ ((unused)), char **argv) in main()
111 #define UNUSED __attribute__ ((unused)) macro
116 /* Execution will arrive here from jmp by an artificial ptrace-spawn signal. */
125 /* Do not return as stack may be invalid due to ptrace-patched PC to the in sigusr2()
126 jmp function. */ in sigusr2()
131 /* Here we dump the core for --gencore. */ in sigusr2()
147 /* Not reached, signal will get ptrace-spawn to jump into sigusr2. */ in jmp()
159 stdarg (int f UNUSED, ...) in stdarg() argument
172 /* Execution will get PC patched into function jmp. */ in stdarg()
192 function. It must be stdarg so that it is a call and not jump (jump as in backtracegen()
193 a tail-call). */ in backtracegen()
203 start (void *arg UNUSED) in start() argument
211 main (int argc UNUSED, char **argv) in main() argument
215 ptraceme = (*argv && strcmp (*argv, "--ptraceme") == 0); in main()
217 gencore = (*argv && strcmp (*argv, "--gencore") == 0); in main()