Posts

使用GDB/Emacs debug C++程序

使用GDB/Emacs debug C++程序 Date: 2006-09-26 Version: 1.0 Authors: 张乐 内容 gdb使用技巧 注意事项 准备工作 运行 设置断点 检查状态 继续运行 信号 与Emacs配合使用 gdb使用技巧 注意事项 gdb使用 Readline 库 可以使用bash快捷键,tab补齐 清除inputrc里有冲突的设置 准备工作 重新编译安装程序。系统里现有的程序一般不适合直接拿来跟踪。需要使用合理的CFLAGS重新编译安装后再跟踪。 ./configure find -name "Makefile" | xargs sed -i -e 's/^CFLAGS = /CFLAGS = -g3 -ggdb3 -gdwarf-2 /' make && make install 运行 启动gdb a. gdb bayonne b. gdb --args bayonne -vvv script.scr 利用帮助 a. help 命令类别名 b. help 命令名 运行程序 a. r[un] b. r[un] -vvv script.scr 设置断点 按照函数名设置断点 b[reak] main b[reak] 'namespace::Class::func()' 按照文件名和行数设置断点 b[reak] methods.cpp:523 检查状态 检查堆栈 b[ack]t[race] up down 检查当前函数的源代码 list 检查/改变变量值 p[rint] var p[rint] ptr->mem p[rint] *ptr p[rint] ('namespace::Class') *this p[rint] (('namespace::Class') *this)->a.b.c p[rint] var=value 检查类 ptype ptr set print object on whatis ptr 检查并启用/禁用断点 set breakpoint pending on info b[rea

Latest News on scim and glibc

According to my own experience, scim 1.4.4 works fine with glibc 2.5! Scim 1.4.5 must have used something which is changed from glibc 2.4 to 2.5.

scim doesn't work after glibc 2.5 being emerged

I am not sure about the cause at this moment. Thanks to fcitx, I still can input Chinese. However I can't get used to it, there is some difference between the two input methods. For example in fcitx you need to press 2 keys when switching between English/Chinese, while in scim you just need to press "shift", which is the same as in MS Pinyin. Updates: Anyway, I have come back to scim (1.4.4). So good bye to fcitx! http://zhllg.blogspot.com/2006/10/latest-news-on-scim-and-glibc.html

scim-pinyin @MKINSTALLDIRS@ problem

Background: http://www.linuxsir.org/bbs/showthread.php?t=266936&highlight=mkinstalldirs http://bugs.gentoo.org/show_bug.cgi?id=144930#c3 Solution: layman -a gentoo-china layman -S emerge -1 scim-pinyin PS: some info about gentoo-china-overlay http://www.linuxsir.org/bbs/showthread.php?t=272832

Non-dev could not assign bug to individual dev?

I have been translating GWN to Simplified Chinese with my teammates since May 2006. Originally, I sent translated GWN to gwn-feedback. Several weeks ago I started to send to neysx, because neysx will be my mentor. At the beginning, I sent translated GWN via email. However, the attachment was lost several times. Then I began to use bugs.gentoo.org. Neysx gave me a link. http://bugs.gentoo.org/show_bug.cgi?id=147686#c4 I was supposed to use this link to assign bugs directly to neysx. I have tried it 3 times. Each time the assignee will be changed from neysx to docs-team. Like this one: http://bugs.gentoo.org/show_bug.cgi?id=150726 However, dev's seem never know this. This explains why words like "Whatever you do, you do it wrong" would come out. Later, neysx verified this fact himself: http://bugs.gentoo.org/show_bug.cgi?id=150743 Then neysx said sorry to me. Problem solved.

libglitz.la

I did some housekeeping work today, unmerged glitz. I have disabled glitz USE flag for a long time. Don't know why it still exists today. Of course, I do --depclean regularly. Then disaster happened as you may guess. All the apps previously linked with glitz ceased to work. So I have to resort to revdep-rebuild. However, many program still failed to emerge, as "/usr/lib/libglitz.la" exists in many la files under /usr/lib. Honestly, I still don't know exactly la files' functionality. But I guess it plays an important role in the linking process. I used the following command to wipe out all the "/usr/lib/libglitz.la" string from la files under /usr/lib. sudo find /usr/lib -name "*.la" | xargs sudo sed -i -e 's# /usr/lib/libglitz.la##' Not sure whether this is the right way to go, but it works here.

[video] aiglx + beryl on ati r200

http://www.youtube.com/watch?v=KoRozMganNQ

AIGLX + beryl 终于跑起来了

比XGL还要顺畅 哦yeah!

A good article about DocBook

http://lwn.net/Articles/199200/

reStructuredText

rst可以让你从文本文件生成html/xml/LaTeX http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html http://docutils.sourceforge.net/docs/user/rst/quickref.html http://docutils.sourceforge.net/docs/user/rst/quickstart.html

还是screen

C-o会和vim里的命令冲突的 所以现在用\\ escape \\\\ 意思是\是命令键,相当于之前的C-a,要打反斜线\就打两个\\ 同理 escape ^Oo 意思是C-o是命令键,C-o o就相当于C-o

看来我应该放弃AIGLX的努力了

https://help.ubuntu.com/community/CompositeManager/AIGLX Information about unsupported hardware The open-source ATI driver (radeon) uses software rendering for alpha (transparency). This makes Compiz unusably slow on a Radeon 9200 (one of the fastest cards supported). No word from ATI on when their proprietary driver (which has proper 3d acceleration) will support AIGLX.

想让screen更像个桌面么?

需要有个好的screenrc screen的默认配置的最大问题是ctrl-A和bash里回到行首的快捷键冲突,导致要使用后者要多打一个a(ctrl-a a)。比较麻烦。 下面这个screenrc重定义了这个快捷键 而且加上了一个更漂亮的caption,有日期时间主机名等 现在terminal是否有tab功能对我来说已经无所谓了 哈哈 # ~/.screenrc # use visual bell vbell on # replace ctrl-A by ctrl-O escape ^Oo # set a big scrolling buffer defscrollback 5000 # Set the caption on the bottom line caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"