User talk:Mathieu

From KitwarePublic
Revision as of 18:02, 21 February 2005 by Mathieu (talk | contribs) (typo)
Jump to navigationJump to search

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:

Similarities with bash

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

Configuring and running X11 on MacOSX

Valgrind

gdb and 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 ) ) );


file open and valgrind

You can track how many files are open when your programm terminates if you use the flag (works only with recent valgrind version):

 --track-fds=yes

Another approach is to use:

 strace -eopen

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


Stuff TODO

- I need to setup a guide to cross compile VTK on debian - I ................... install intel icc on debian linux (all versions)

http://people.debian.org/~debacle/cross.html http://colt.projectgamma.com/intel/ixc-debian.html http://www.creatis.insa-lyon.fr/~bellet/creatis/cygwin/cross.html