User talk:Mathieu: Difference between revisions
(→Zsh) |
(Linux in general) |
||
Line 1: | Line 1: | ||
== Linux == | |||
I use Linux. The main reasons are stability and ease of use (I love shells !). | |||
Links: | |||
* [http://slashdot.org /.] | |||
* [http://refcards.com Refcards] | |||
* [http://sf.net SourceForge] | |||
== Zsh == | == Zsh == | ||
Revision as of 20:19, 16 December 2004
Linux
I use Linux. The main reasons are stability and ease of use (I love shells !).
Links:
Zsh
Zsh simply rocks, there absolutely no reason to not switch to zsh from bash since it support all the bash command and is better:
Some usefull zsh command:
Eventhought it should be possible to set zsh to behave like vim with 'set -o vi', I am used to the 'emacs' style command in zsh:
Ctrl+a : Start of line Ctrl+e : End of line Ctrl+l : Clean screen Ctrl+u : Delete anything Ctrl+w : Delete anything on the left side of cursor Ctr+r : Historic search
Ctrl+y : Paste buffer Ctrl+d : delete active character or disconnect if empty line Alt+b / Alt+f : jump from one word to the other Ctrl+Backspace (Ctrl+w) : erase previous work Alt+d : delete next work Alt+t : exhcange current word and next one Alt+c : capitalize current letter, and uncapitalize the next letter, and jump to the end of word Ctrl+t : exchange two letters
Other link to documentation:
Mac OSX
Some tricks I always forgot on MacOSX:
ldd -> otools -L
strace/ltrace -> ktrace / kdump
Valgrind
some valgrind 'feature' to gdb an unitialized var you need to use valgrind macro:
From [How to output address of the unitialized value? ]
Your best bet in that case is to inspect the code at the failing location and see if there is an obvious cause, and if not then to try inserting some assertions using the valgrind macros to try and work out what is uninitialised - assertions like this will do it:
assert( !VALGRIND_CHECK_READABLE( &variable, sizeof( variable ) ) );
GDB
Yet another trick for debugging the destructor of a class: Steps:
nm --defined-only -C vtkEnSight6Reader.o | grep '~'
copy the hexadecimal for those symbol then do
nm --defined-only vtkEnSight6Reader.o | grep 'my_symbol'
then you just need to add a breakpoint on that particular symbol, repeat if more than one destructor.
CMake
Another trick when writting regex in CMake, look at:
http://www.aivosto.com/vbtips/regex.html
It's fairly well describe