- fatal_assert(_argc == 0);
-
- if (_use_libtool)
- {
- _argc+= 2; // +2 for libtool --mode=execute
- }
-
- _argc+= 1; // For the command
-
- /*
- valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --track-origin=yes --malloc-fill=A5 --free-fill=DE --log-file=
- */
- if (_use_valgrind)
- {
- _argc+= 8;
- }
- else if (_use_ptrcheck)
- {
- /*
- valgrind --error-exitcode=1 --tool=exp-ptrcheck --log-file=
- */
- _argc+= 4;
- }
- else if (_use_gdb) // gdb
- {
- _argc+= 1;
- }
-
- for (Options::const_iterator iter= _options.begin(); iter != _options.end(); iter++)
- {
- _argc++;
- if ((*iter).second.empty() == false)
- {
- _argc++;
- }
- }
-
- if (args)
- {
- for (const char **ptr= args; *ptr; ++ptr)
- {
- _argc++;
- }
- }
-
- _argc+= 1; // for the NULL
-
- built_argv= new char * [_argc];
-
- size_t x= 0;