User talk:Mathieu

From KitwarePublic
Revision as of 17:56, 12 April 2005 by Mathieu (talk | contribs) (c++)
Jump to navigationJump to search

Linux

I use Linux. The main reasons are stability and ease of use (I love shells !).

Links:


Debian

Debian is really cool, you have access to billions of package one command line away. The very last package I discover is gcc-snapshot:


 http://packages.debian.org/unstable/devel/gcc-snapshot

Basically you have access to gcc4.0 (+fortran !!) with no hassle. another cool stuff is that gcj comes with libjawt (jawt.h ...) can't wait to compile VTK using gcj.

gVim

Tip #312: Copy, Cut, and Paste

Link I always loose

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


older MacOS

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

http://www.atai.org/guitool/

I still canot boot into BeOS using grub:

http://www.linux-sxs.org/administration/grubbeos.html http://f3wm.free.fr/linux/grub.html http://www.linuxforums.org/tutorials/1/tutorial-19999.html http://leaf.sourceforge.net/doc/guide/bugrub.html


Keep an eye on svn:

[ugly problem found while trying to test KDE SVN] http://svn.haxx.se/dev/archive-2005-02/0897.shtml

[How do you tell the compiler to make a member function inline?] http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7