From b8da2db21fbe849118508526fe3180c63f923175 Mon Sep 17 00:00:00 2001 From: evomarc Date: Sat, 8 Dec 2007 15:05:51 +0000 Subject: [PATCH] Added the GDB trick to visualize the components of a vector (but it still doesn't work with EO objects, though???) --- eo/tutorial/html/eoProgramming.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index 40ffcad3..a986b341 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -292,16 +292,20 @@ method will take more time for vectors than for linked lists, while on the opposite, the operator[] accessor will be faster for vectors. But both will work anyway.

STL: Drawbacks -
The main drawback I see in using STL is that it makes it almost -impossible +
The main drawback I see in using STL is that it makes it +difficult to use a debugger normally: whereas access to data is made simple to the programmer, data structures are actually so complex, and debuggers so willing to display everything that you get lines of template instantiation -when asking your debugger what is inside some container! For instance I +when asking your debugger what is inside some container!
+However, here is a trick (thanks to Arnaud Quirin!) to actually print what is inside an STL vector with gdb (but it doesn't really work with complex structures like EO genotypes :-( :
+(gdb) print (*(&v))[i]
+$1 = (const double &) @0x934cad0: 0.69543264131061733
+



Random