2009年10月26日月曜日

gdbでテストを行う

1.gdbで入力したコマンドを下記で記録できる
 (gdb) set history filename test-pattern1
 (gdb) set history save on
2.記録したファイルを下記コマンドで起動できる
> gdb a.out -x test-pattern1
3.詳しくは下記を参考に
http://www.fireproject.jp/feature/gdb/advanced/auto-test.html

2009年10月22日木曜日

linux svn server (tested in fedora 11)

svn server setup tutorial in fedora core 9
1. First you should Create a SVN Repository
svnadmin create $REPO_URL/svnrepos

2. Then Create a SVN User
vi $REPO_URL/svnrepos/conf/svnserve.conf

In that file add these three lines below:
anon-access = none
auth-access = write
password-db = passwd

Create a password file:
vi $REPO_URL/svnrepos/conf/passwd

In that file add a line for your user:

# add users in the format : user = password
tony = mypassword

3. Now Import Your Project
(assuming you’ve put your project files in /projects/mytestproj)
svn import /projectsToImport/mytestproj file://$REPO_URL/svnrepos/mytestproj

4. Start the SVN Server as Daemon, Lets Ahead
svnserve -d -r $REPO_URL
^^ -r is used to tell the server to refer to the REPO_URL directly.

now you have a SVN server running with one project named mytestproj.
Try checking it out of the repository:svn co svn://$YOUR_IP/svnrepos/mytestproj

original page
http://codefighters.blogspot.com/2009/02/svn-server-setup-tutorial-in-fedora.html

2009年10月19日月曜日

about gdb(sth hard to remember)

(gdb) display /i $pc
-> display pc register
(gdb) undisplay 1
-> undisplay it.

(gdb)i r //info register
-> display register info
(gdb)i r pc
-> display pc register info

(gdb)disas 0xd0dc53 0xd0dc78
反汇编一段指令。可以带零个、一个或两个参数。第一个参数是反汇编开始地址,第二个参数是反汇编结束地址。

メモリダウンプ
(gdb) dump binary memory /tmp/outputFile.log 0x080483ce 0x08058383