context comes from 《expert C Programming》

目录

Tools to Examine Source

Tools to Examine Executables

Tools to Help with Debugging

Tools to Help with Performance Tuning


Tools to Examine Source

Tool Where to Find It What It Does

cb Comes with the compiler C program beautifier. Run your source through this filter to put it in a standard layout and indentation. Comes from Berkeley. indent   Does the same things cb does. Comes from AT & T. cdecl This book Unscrambles C declarations. cflow Comes with the compiler Prints the caller/callee relationships of a program. cscope Comes with the compiler An interactive ASCII-based C program browser. We use it in the OS group to check the impact of changes to header files. It provides quick answers to questions like: "How many commands use libthread?" or "Who are all the kmem readers?" ctags /usr/bin Creates a tags file for use in vi editor. A tags file speeds up examining program source by maintaining a table of where most objects are located. lint Comes with the compiler A C program checker. sccs /usr/ccs/bin A source code version control system. vgrind /usr/bin A formatter for printing nice C listings.

Tools to Examine Executables

Tool Where to Find It What It Does

dis /usr/ccs/bin Object code disassembler dump -Lv /usr/ccs/bin Prints dynamic linking information ldd /usr/bin Prints the dynamic libraries this file needs nm /usr/ccs/bin Prints the symbol table of an object file strings /usr/bin Looks at the strings embedded in a binary. Useful for looking at the error messages a binary can generate, built-in file names, and (sometimes) symbol names or version and copyright information. sum /usr/bin Prints checksum and block count for a file. An-swers questions like: "Are two executables the same version?" "Did the transmission go OK?"

Tools to Help with Debugging

Tool Where to Find It What It Does

truss /usr/bin The SVr4 version of trace. This tool prints out the system calls that an executable makes. Use it to see what a binary is doing, and why it's stuck or failing. This is a great help! ps /usr/bin Displays process characteristics. ctrace Comes with the compiler Modifies your source to print lines as they are executed. A great tool for small programs! debugger Comes with the compiler Interactive debugger. file /usr/bin Tells you what a file contains (e.g., executable, data, ASCII, shell script, archive, etc.).

Tools to Help with Performance Tuning

Tool Where to Find It What It Does

collector Comes with the compiler (SunOS only) Collects runtime performance data under the control of the debugger. analyzer Comes with the compiler (SunOS only) Analyzes collected performance data. gprof /usr/ccs/bin Displays the call-graph profile data (identifies the computeintensive functions). prof /usr/ccs/bin Displays the percentage of time spent in each routi ne. tcov Comes with the compiler Displays a count of how often each statement is executed (identifies the compute-intensive loops within a function). time /usr/bin/time Displays the total real and CPU time used by a program.

Helpful C Tools:source、executables、debugging and performance tuning相关推荐

  1. 动手实现Android源码(AOSP)的下载、编译、运行、导入、调试

    这几天为了搞Android源码费了不少功夫,也遇到了不少坑,在此记录作为日后参考.Android源码的编译运行只支持Linux和Mac系统,至于Windows系统只能绕道了,或是在虚拟机上安装Linu ...

  2. ElasticSearch增删改查之python sort、scroll、scan

    1.用python操作elasticsearch有两个库可以调用 # ElasticSearch不支持scroll(分页查询)查询 from pyelasticsearch import Elasti ...

  3. OpenFlow入门资料汇总(OpenFlow、SDN、NOX等,多为网络文章)

    声明:此篇文章为转载,转载原文地址为:http://blog.csdn.net/jincm13/article/details/7825754 很好的OpenFlow方向的网络文章汇总,阅读通篇能够对 ...

  4. 安装OpenCV、cython、numpy和h5py

    安装OpenCV: 一. 系统烧录 Raspberry Pi Imager 烧录步骤: 软件下载地址:Raspberry Pi OS – Raspberry Pi (建议提前准备一张容量在8G以上的S ...

  5. 【教你搭建服务器系列】(2)搭建服务器环境,安装JDK、MySQL、Redis、Tomcat、Nginx

    我白嫖过的一些云厂商: 云厂商 学生优惠 新人优惠 腾讯云 学生特惠,1核2G5M宽带,仅需9元/1个月 星星海SA2云服务器,1核2G首年99元(我目前用的) 新客户无门槛代金券,价值高达2860元 ...

  6. 视频编解码(十二):播放器编解码流程source、demux、decoder、output

    一.播放器编解码流程source.demux.decoder.output 说白了播放器大致分为4大部分:source.demux.decoder.output. 1.source: 数据源,数据的来 ...

  7. source insight教程:常用设置、快捷键、附带source insight3.5和4的对比

    本篇内容基于source insight4版本,最后会说明source insight4相比3.5的改进. 前言 兜兜转转,发现还是source insight对于浏览代码来说几乎是最好的选择.特别是 ...

  8. Interview: Kevin Kelly, editor, author, and futurist采访:凯文·凯利,编辑、作家、未来学家

    By Cmichel67 - Own work, CC BY-SA 4.0 作者:Cmichel 67-自己的作品,CC BY-SA 4. 0 Kevin Kelly is one of the th ...

  9. Hadoop生态上几个技术的关系与区别:hive、pig、hbase 关系与区别

    Pig 一种操作hadoop的轻量级脚本语言,最初又雅虎公司推出,不过现在正在走下坡路了.当初雅虎自己慢慢退出pig的维护之后将它开源贡献到开源社区由所有爱好者来维护.不过现在还是有些公司在用,不过我 ...

最新文章

  1. python画二维散点图-python3怎样画二维点图
  2. Java 8新特性——default方法(defender方法)介绍
  3. jQuery 1.11 / 2.1 beta 版发布
  4. python pep8_Python 代码风格 和 PEP8
  5. .Net 中的序列化与反序列化[概述]
  6. 获取验证码 60秒后重新获取
  7. java借书_用java语言实现借书系统
  8. oracle 汉字转五笔码,芈月传的芈字怎么打?用五笔拆解并输入方法图解
  9. C语言游戏开发闪屏解决办法--双缓冲技术
  10. css 使图片变清晰
  11. java 将html转为word导出 (富文本内容导出word)
  12. 怎样将PDF转成EXCEL
  13. ADOBE pr000的下载安装+基本操作
  14. 【程序人生】1024 程序员节——闲言鹤语
  15. git之小乌龟,或者小王八,如何使用小乌龟来将已push的代码回撤
  16. 在N1盒子进行Openwrt的内网穿透
  17. 大数据开发实战教程目录
  18. 解决标准“痛点” 京东联手公安部检测中心将推指纹锁电商标准
  19. 刺激战场测试fps软件,绝地求生刺激战场怎么查看帧率?查看帧率方法一览
  20. 整理各类IT编程视频教程下载地址

热门文章

  1. JVM学习-G1回收器
  2. [CQOI2011]放棋子 题解(dp+组合数学)
  3. Vue-router学习(一)- 路由匹配
  4. IBM MQ Explore使用
  5. OpenCV图像处理篇之边缘检測算子
  6. css中的一些问题及解决方法
  7. Log4net系统日志
  8. xcode5+未能安装到模拟器
  9. [ASP.NET MVC]让Html.RenderAction支持Lamda表达式
  10. 虚拟化文件服务器,vmware服务器虚拟化项目实施文档(1)