摘要:
whatis识别数组或变量的类型ptype比whatis的功能更强,他可以提供一个结构的定义print h@num(gdb)print h@10$13=(-1,345,23,-234,0,0,0,98,345,10)--args调试时加入参数gdb --args [exe] [args]set args(gdb)set args –b –xshow args(gdb)show argsgdb -silent not display hints -help/-h <exe_file> <process_no>(gdb)r run and display err info 阅读全文
posted @ 2012-03-15 20:12
田涛@武汉
阅读(1233)
评论(0)
推荐(0)
摘要:
yum install ctagsdownload taglistcp doc and plugin to ~/.vimedit /etc/vimrc or ~/.vimrc add let Tlist_Use_Right_Window=1 let Tlist_File_Fold_Auto_Close=1 map <F3> :Explore<CR> map <F4> :TlistToggle<CR> 阅读全文
posted @ 2012-03-15 20:06
田涛@武汉
阅读(165)
评论(0)
推荐(0)
摘要:
#include <dirent.h>#include <sys/mman.h>#include <fcntl.h>#include <errno.h>#include <sys/stat.h>#include <sys/types.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>void main(int argc, char **argv){ int fd = 0; 阅读全文
posted @ 2012-03-15 19:57
田涛@武汉
阅读(208)
评论(0)
推荐(0)
摘要:
#include <sys/select.h>#include <sys/time.h>#include <stdio.h>#include <unistd.h>#include <signal.h>int n = 0;struct itimerval value;void timefunc(int sig){ fprintf(stderr, "timer[%d]\n", n++); if (n > 5) { getitimer(ITIMER_REAL, &value); value.it_value 阅读全文
posted @ 2012-03-15 19:53
田涛@武汉
阅读(224)
评论(0)
推荐(0)
摘要:
#include <stdio.h>#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <errno.h>#include <stdlib.h>#include <stdint.h>#define MAXLINE 80#define TRUE 1#defin 阅读全文
posted @ 2012-03-15 19:53
田涛@武汉
阅读(358)
评论(0)
推荐(0)
摘要:
#include <pcap.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <net/ethernet.h>#include <linux/if_ether.h>#include <netinet/in.h>#include <netinet/ip.h>#include <netinet/tcp.h>#include <stdint.h># 阅读全文
posted @ 2012-03-15 19:52
田涛@武汉
阅读(564)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <netinet/in.h> 3 #include <stdlib.h> 4 #include <unistd.h> 5 #include <sys/socket.h> 6 #include <string.h> 7 #include <arpa/inet.h> 8 9 int main()10 { 11 struct sockaddr_in6 addr;12 13 memset(&addr, 0, sizeof addr);14 addr 阅读全文
posted @ 2012-03-15 19:51
田涛@武汉
阅读(186)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdint.h> 3 #include <stdlib.h> 4 5 #include <pcap.h> 6 7 //////////////////////////////////////////////////////////////////////////////// 8 9 // ./a.out [源文件]10 int main(int argc, char **argv)11 {12 pcap_t *pcap = NULL;13 struct pcap_pkthdr * 阅读全文
posted @ 2012-03-15 19:51
田涛@武汉
阅读(1228)
评论(0)
推荐(0)
摘要:
使用indent来格式化C代码:indent -npro -kr -i4 -ts4 -sob -bl -bli 0 main.c[linux indent格式化代码]http://dongyulong.blog.51cto.com/1451604/338633 阅读全文
posted @ 2012-03-15 17:10
田涛@武汉
阅读(112)
评论(0)
推荐(0)
该文被密码保护。 阅读全文
posted @ 2012-03-15 14:12
田涛@武汉
阅读(17)
评论(0)
推荐(0)

浙公网安备 33010602011771号