C?????????????ι??????
???????????? ???????[ 2015/12/21 10:14:45 ] ??????????????? ???????????
??????????????????
?????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????е?????????CPU??????????????????????????????????????????????????????????????????????????е?????????????????????????????????????????????????????????????????????GDB????????????????????????????????CPU???
????(gdb) x/10x $pc # heXadecimal representation
????0x402c60: 0x56415741 0x54415541 0x55f48949 0x4853fd89
????0x402c70: 0x03a8ec81 0x8b480000 0x8b48643e 0x00282504
????0x402c80: 0x89480000 0x03982484
????(gdb) x/10i $pc # Instruction representation
????=> 0x402c60: push %r15
????0x402c62: push %r14
????0x402c64: push %r13
????0x402c66: push %r12
????0x402c68: mov %rsi??%r12
????0x402c6b: push %rbp
????0x402c6c: mov %edi??%ebp
????0x402c6e: push %rbx
????0x402c6f: sub $0x3a8??%rsp
????0x402c76: mov (%rsi)??%rdi
???????????????????????????GDB???????????????????
????(gdb) $pc
????$1 = (void (*)()) 0x402c60 <main>
???????????? nm -a $file ?????ELF???????????б??
????nm -a /usr/lib/debug/usr/bin/ls.debug | grep " main"
????0000000000402c60 T main
????GDB???????????????????????????????????????и????????????
????(gdb) where
????#0 write ()
????#1 0x0000003d492769e3 in _IO_new_file_write ()
????#2 0x0000003d49277e4c in new_do_write ()
????#3 _IO_new_do_write ()
????#4 0x0000003d49278223 in _IO_new_file_overflow ()
????#5 0x00000000004085bb in print_current_files ()
????#6 0x000000000040431b in main ()
????????????????PC?????????????????????????????????У???????????????????
???????????????????????????DWARF?淶?μ?gcc -g?????????????????淶????????????????
??????????????к??е?????????
???????????????壬????typedef??structure
????????????????????????????????
????$ dwarfdump /usr/lib/debug/usr/bin/ls.debug | grep 402ce4
????0x00402ce4 [1289?? 0] NS
????$ addr2line -e /usr/lib/debug/usr/bin/ls.debug 0x00402ce4
????/usr/src/debug/coreutils-8.21/src/ls.c:1289
?????????dwarfdump????????????????????????addr2line????????Щ?????
??????????????????????????????Щ?????????next?????????????е????????????????print???????????????????????????char??int??float????????????????????????
?????????
????????????????????????????????????????????????
???????????????????????????????????“????unwinded??”???$sp??$bp/#fp?????????????????Ρ??????????????????????????????????????????????
?????????&amp;amp;lt;code&amp;amp;gt;watchpoints????????????????????????У??????????????????Щ????????????????????????汻??д???????????????????????????????????????????????????????????……?????????????“???”????????????????????????????????????????????????????????????????????????
???????????????????????У?????????????Ч????????????С?
????????????????????????????????????????????????????????鵱?????????????????????????????????????????С?
????????????gdb gdb?????????????????gdb --pid $(pid of gdb)??????????????????????????????????:-)???????????????
????qemu-system-i386 -gdb tcp::1234
????gdb --pid $(pidof qemu-system-i386)
????gdb /boot/vmlinuz --exec "target remote localhost:1234"
?????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
C?????????????????????C?????????????C?????????????malloc??realloc????C??????????????8?????????C??????const?????ü?????C?????Ч????????????????C?????????C????д???????????????????????C????????λ?????C??????define???????÷??????C???????pthread???????C???????????????C????λ????ü??????????C???????????????????C?????з????????????????????????C?????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????