Linux环境应用杂记...不断更新
来源:互联网 发布:淘宝外卖粮票口令 编辑:程序博客网 时间:2024/06/06 04:26
SCIM输入法
sudo apt-get remove scim
sudo apt-get install scim
sudo apt-get install scim-chinese
sudo gedit /etc/X11/Xsession.d /95xinput
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
export GTK_IM_MODULE=scim
exit and relogin
汇编安装 binutils
1. sudo -sH 切换root
2. apt-get install binutils-doc
2. dpkg -l | grep binutil(Debian类型查询)
3. Kdbg在ubuntu软件中心安装
man手册页更新
sudo apt-get install manpages-dev
C库函数编译
as -o cpuid.o cpuid.s
ld -dynamic-linker /lib/ld-linux.so.2 -lc -o cpuid cpuid.o
gcc编译器会自动连接所需C库,不过用gcc编译汇编程序时,必须把_start标签改为main,gcc -o cpuid2 cpuid2.s
as -gstabs -o cpuid.o cpuid.s
ld -o cpuid cpuid.o
gcc -S *.c 生成汇编代码
vim + cscope + tags
1. 软件安装
sudo apt-get install cscope
安装ctags: http://ctags.sourceforge.net/,然后ctags -version查看当前ctags的版本是否是emacs的。
要是安装了emacs的话就必须使用上面这个地址的ctags,vim不支持emacs的ctags,所以要下载安装这个ctags,下载之后在源文件所在目录运行
./configure,make,生成ctags文件,将这个文件保存到“/usr/bin/”目录下即可。
2. 生成索引文件
make cscope
make tags
ls tags -l, ls cscope.* -l
3. 一般源文件中生成索引文件
编写如下脚本
#!/bin/sh
find . -name "*.h" -o -name "*.c" -o -name "*.cc" > cscope.files
cscope -bkq -i cscope.files
ctags -R
4. 在VIM使用cscope查找
在源代码目录下打开vim,加载cscope.out文件,在vim命令行下执行:
:cs add cscope.out
vim命令行下执行:
:cs help
例:查找do_fork函数定义 :cs f g do_fork
5. 在VIM中使用tags查找符号
:tag xxx
6. 其它命令
ctrl+]:在函数调用的地方跳转到函数定义的地方
ctrl+t:返回上一个查找的地方
7. 特别注意
所生成的cscope.out和tags文件要在打开VIM所在的文件夹,否则VIM无法找到相关符号信息
挂载xxx.iso.gz文件
解压:gunzip xxx.iso.gz
挂载:mount -o loop file.iso /mnt/cdrom
- Linux环境应用杂记...不断更新
- Linux应用知识杂记
- linux应用技巧总结(不断更新)
- Linux驱动编程杂记001 -- 环境搭建
- struts学习杂记(不断更新ing)
- Android 开发杂记(不断更新中)
- linux杂记
- Linux杂记
- linux 杂记
- linux 杂记
- Linux 杂记
- linux杂记
- linux杂记
- Linux 杂记
- linux 杂记
- linux杂记
- Linux 杂记
- Linux 杂记
- Consistent Hashing Algorithm 一致性hash算法
- chmod和chown命令详细用法
- 李开复给程序员的七个建议
- linux内核编译之旅
- MFC 定时器的使用
- Linux环境应用杂记...不断更新
- gui的设计总则(集合在一起)
- 输什么也不能输了心情
- .Net中序列化与反序列化
- Expression Studio 4正式版发布
- J2EE学习中一些值得研究的开源项目
- 程序员: 一尘不染的爱情宣言
- 窗口抖动和类消息提示窗口的实现
- 朋友