From e3257369a830e4184dcf54819ed53c1e252a1961 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 24 Aug 2011 16:23:10 +0200 Subject: [PATCH] debugger: work on manual tests Change-Id: Ied0486b79661c7587211128be047a419351e00f3 Reviewed-on: http://codereview.qt.nokia.com/3515 Reviewed-by: hjk --- .../debugger/simple/simple_test_app.cpp | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 72e0ec9ca42..d1aa97700d3 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -30,7 +30,35 @@ ** **************************************************************************/ -//#include +//////////////// Some global configuration below //////////////// + + +// The following defines can be used to steer the kind of tests that +// can be done. + +// With USE_AUTOBREAK, the debugger will stop automatically on all +// lines containing the BREAK_HERE macro. This should be enabled +// during manual testing. +// Default: 1 +#define USE_AUTOBREAK 1 + +// With USE_PRIVATE tests that require private headers are enabled. +// Default: 1 +#define USE_PRIVATE 1 + +// With USE_BOOST tests of boost data dumpers are enabled. You need +// some boost headers installed. +// Default: 0 +#define USE_BOOST 0 + +// With USE_EGIEN tests of data dumpers for the "Eigen" library are +// enabled. You need some eigen headers installed. +// Default: 0 +#define USE_EIGEN 0 + + +////////////// No further global configuration below //////////////// + void dummyStatement(...) {} @@ -62,6 +90,8 @@ void dummyStatement(...) {} #include #include #include + + //#include #include #include @@ -89,18 +119,8 @@ void dummyStatement(...) {} #include -// For the full manual test, change the '#if 0' to '#if 1' -#if 1 -#define BREAK_HERE /**/ -#else -#define BREAK_HERE asm("int $3; mov %eax, %eax") -#endif - #include "../simple/deep/deep/simple_test_app.h" -#define USE_PRIVATE 1 -//#define USE_BOOST 1 -//#define USE_EIGEN 1 #if USE_BOOST #include @@ -132,6 +152,16 @@ void dummyStatement(...) {} #include #endif +#if USE_AUTOBREAK +# if Q_CC_MSVC +# define BREAK_HERE __asm { int 3 }; __asm { mov eax, eax } +# else +# define BREAK_HERE asm("int $3; mov %eax, %eax") +# endif +#else +# define BREAK_HERE /**/ +#endif + namespace multibp { template class Vector