[root@caoxl ~]# pstack 777 #0 0x00007fde797c117c in waitpid () from /usr/lib64/libc.so.6 #1 0x0000000000440b24 in waitchld.isra.10 () #2 0x0000000000441ddc in wait_for () #3 0x0000000000433aae in execute_command_internal () #4 0x000000000046f6e4 in parse_and_execute () #5 0x000000000042f27b in execute_builtin.isra.2 () #6 0x00000000004313d9 in execute_simple_command () #7 0x00000000004322e3 in execute_command_internal () #8 0x0000000000432953 in execute_command_internal () #9 0x000000000043283f in execute_command_internal () #10 0x0000000000434e2f in execute_function.isra.7 () #11 0x00000000004316f1 in execute_simple_command () #12 0x00000000004322e3 in execute_command_internal () #13 0x0000000000432953 in execute_command_internal () #14 0x0000000000433cce in execute_command () #15 0x0000000000432917 in execute_command_internal () #16 0x0000000000433cce in execute_command () #17 0x0000000000432917 in execute_command_internal () #18 0x0000000000433cce in execute_command () #19 0x0000000000432917 in execute_command_internal () #20 0x0000000000433cce in execute_command () #21 0x0000000000432917 in execute_command_internal () #22 0x0000000000433cce in execute_command () #23 0x0000000000432917 in execute_command_internal () #24 0x0000000000433cce in execute_command () #25 0x0000000000432917 in execute_command_internal () #26 0x0000000000433cce in execute_command () #27 0x0000000000432917 in execute_command_internal () #28 0x0000000000433cce in execute_command () #29 0x0000000000432917 in execute_command_internal () #30 0x0000000000433cce in execute_command () #31 0x0000000000433da5 in execute_while_or_until () #32 0x0000000000432410 in execute_command_internal () #33 0x0000000000433cce in execute_command () #34 0x000000000041e305 in reader_loop () #35 0x000000000041c96e in main ()
$nm myProgrammer 08049f28 d _DYNAMIC 08049ff4 d _GLOBAL_OFFSET_TABLE_ 080484dc R _IO_stdin_used w _Jv_RegisterClasses 08049f18 d __CTOR_END__ 08049f14 d __CTOR_LIST__ 08049f20 D __DTOR_END__ 08049f1c d __DTOR_LIST__ 080485e0 r __FRAME_END__ 08049f24 d __JCR_END__ 08049f24 d __JCR_LIST__ 0804a014 A __bss_start 0804a00c D __data_start 08048490 t __do_global_ctors_aux 08048360 t __do_global_dtors_aux 0804a010 D __dso_handle w __gmon_start__ 08048482 T __i686.get_pc_thunk.bx 08049f14 d __init_array_end 08049f14 d __init_array_start 08048480 T __libc_csu_fini 08048410 T __libc_csu_init U __libc_start_main@@GLIBC_2.0 0804a014 A _edata 0804a01c A _end 080484bc T _fini 080484d8 R _fp_hw 080482b4 T _init 08048330 T _start 0804a014 b completed.6086 0804a00c W data_start 0804a018 b dtor_idx.6088 080483c0 t frame_dummy 080483e4 T main U printf@@GLIBC_2.0
1 2 3 4 5 6 7 8 9 10 11 12
[root@caoxl lib64]# nm -X 32_64 /usr/lib64/liby.a
main.o: 0000000000000000 T main U setlocale U yyparse
yyerror.o: U fputc U fputs U stderr 0000000000000000 T yyerror
$od -Ax -tcx4 a.c 000000# i n c l u d e < s t d i o . 636e6923 6564756c74733c20 2e6f6964 000010 h > \n\n v o i d m a i n ( ) \n 0a0a3e68 64696f76 69616d20 0a29286e 000020 { \n\t i n t i = 5 ; \n\t p 69090a7b 6920746e35203d20 70090a3b 000030 r i n t f ( " h e l l o , % d " 746e6972 682228666f6c6c65 2264252c 000040 , i ) ; \n } \n 3b29692c 000a7d0a 000047
以字符方式显示:
1 2 3 4 5 6 7
$od -c a.c 0000000# i n c l u d e < s t d i o . 0000020 h > \n\n v o i d m a i n ( ) \n 0000040 { \n\t i n t i = 5 ; \n\t p 0000060 r i n t f ( " h e l l o , % d " 0000100 , i ) ; \n } \n 0000107