linux的pvtrace环境配置

1.查看当前ubuntu版本号

froid@ubuntu:~/Desktop$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 10.04 LTS
Release:    10.04
Codename:    lucid

2.如何终止ping

ctrl+c

3.linux修改文件访问权限

chmod 777 文件名

chmod -R 777 文件名 【注意是R,不是r】

参考:http://blog.csdn.net/chenjiiinliang/article/details/7288173

删除文件夹及其子文件

rm -rf 文件夹名

4.ubuntu更换软件源

/etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

5.安装pvtrace和graphviz工具:

$ sudo apt-get install graphviz
$wget http://public.dhe.ibm.com/software/dw/library/l-graphvis/pvtrace.zip
$unzip pvtrace.zip –d pvtrace
$cd pvtrace
$make
$make install

------------------------------------------------------------------------------------------------------------11.06晚追加

6.打开终端快捷键 ctrl+alt+t

7.Ubuntu忘记root密码

Ubuntu的root默认是禁止使用的,在安装的时候也没要求你设置root的密码,和红帽系统系列这里是不同的。

要在Ubuntu下使用root,我们可以使用终端给root设置密码sudo passwd root

-------------------------------------------------------------------------------------------------------------11.30下午追加

8.VMware Workstation 11序列号:1F04Z-6D111-7Z029-AV0Q4-3AEH8

9.安装pvtrace:将压缩包拖入ubuntu,Extract Here,make,make install

安装graphviz:sudo apt-get install graphviz,网址http://www.graphviz.org/Download..php

追踪cflow:将压缩包拖入ubuntu,Extract Here,cd Desktop/cflow-1.1/,配置./configure,修改src下的makefile

搜索posix.$(OBJEXT) 在其后加入 instrument.$(OBJEXT)

搜索CFLAGS = -g 将其后改为 -finstrument-functions

修改这个参数的作用是在程序中加入hook 使得在每次程序进入和退出时分别调用两个函数enter 和exit 获得函数地址

搜索posix.c,在其后加入\ 换行加入instrument.c

然后将pvtrace文件夹下的insrtument.c复制到cflow的src文件夹下

在目录cflow-1.1下 make,make install【如果权限不够,切换到root用户】

cd src,使用cflow追一个文件,如cflow rc.c 生成trace.txt (函数进入和退出的地址,示例如下)

E0x804a56c
E0x805053e
X0x805053e
E0x805053e
X0x805053e
E0x804aa14

pvtrace cflow 则在src目录下生成graph.dot文件

dot -Tpng graph.dot -o graph.png 生成graph.dot文件和图像graph.png

10.参考:http://blog.csdn.net/u014526260/article/details/48445197

http://blog.sina.com.cn/s/blog_67fcf49e0101m06d.html

ftp://download.gnu.org.ua/pub/release/cflow  老的

http://ftp.gnu.org/gnu/cflow/ 新的

http://blog.csdn.net/occupy8/article/details/14450453 graphviz介绍

11.实验数据 http://blog.csdn.net/mangoer_ys/article/details/25974067

posted on 2015-09-25 11:55  泽口靖子  阅读(431)  评论(0编辑  收藏  举报

导航