Chinaunix首页 | 论坛 | 博客
  • 博客访问: 63962
  • 博文数量: 25
  • 博客积分: 1050
  • 博客等级: 少尉
  • 技术积分: 239
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-28 20:21
文章分类
文章存档

2010年(25)

我的朋友

分类: LINUX

2010-07-01 18:44:11

#10
gcc -DTEST #define TEST, if source code include "ifdef TEST" there are a lot of ...
cpp -dM /dev/null
gcc -DName=Value test.c #Name is not need to be defined in source code.
gcc -E test.c #No compile,just see the predefine process result

#11
gcc -g test.c #option for debugging, recommended for development and deployment
ulimit -c unlimited #for creating core-dump file
gdb a.out core-file #gdb need two file(source+dump)


#12
#Function call overhead (额外开销)

#13
gcc -O0 test.c #no optimization, 03 is highest level.
time ./a.out #output the executed time
gcc -O2 test.c #Data-flow analysis, for instance,no initialized variable will be warning

#14
gcc
g++

#15
cpp test.c > test.i #C PreProcess
gcc -S test.i # to assembly language named test.s
as test.s -o test.o
file a.out #inform for a file
nm #symbol table
ldd #load dynamic libarary
#16
gcc -Wall -pg test.c #gprof 
gprof a.out #gmon.out


gcc -Wall -fprofile-arcs -ftest-coverage test.c #gcov
grep "#####" test.gconv #display the uncovered lines
阅读(313) | 评论(0) | 转发(0) |
0

上一篇:Trade-off

下一篇:日经Linux 笔记-实用工具

给主人留下些什么吧!~~