Saturday, March 26, 2011

linux kernel debugging with gdb: show me the current task

The problem of getting the current task bothered me for a while when debugging with gdb.


define show_current
  set $thread_info = ((int)$sp) &0xffffe000
  set $current_task = (((struct thread_info *)($thread_info))->task)
  printf "current = %08x\n", (int)$current_task
  printf "current pid = %d\n", (int)($current_task->pid)
  printf "current mm = %08x\n", (int)($current_task->mm)
end


Thursday, March 3, 2011

thunderbird segmentation fault

최근 thunderbird가 ubuntu 에서 실행시 segfault로 죽는 경우가 있다.

https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/526667

에따르면
sudo apt-get install nscd

가 이걸 해결한단다.