Index: /trunk/src/lib/util/helper_functions.cc
===================================================================
--- /trunk/src/lib/util/helper_functions.cc	(revision 5147)
+++ /trunk/src/lib/util/helper_functions.cc	(revision 5148)
@@ -43,5 +43,5 @@
   int result = strtol(INT, &endPtr, 10);
 
-  if ( endPtr >= INT && endPtr < INT + strlen(INT))
+  if ( endPtr >= INT && endPtr < INT + strnlen(INT, 10))
     return defaultValue;
   else
Index: /trunk/src/util/shell.cc
===================================================================
--- /trunk/src/util/shell.cc	(revision 5147)
+++ /trunk/src/util/shell.cc	(revision 5148)
@@ -79,6 +79,6 @@
 
   ShellCommand<Shell>::registerCommand("clear", CL_SHELL, &Shell::clear);
+  ShellCommand<Shell>::registerCommand("testS", CL_SHELL, &Shell::testS);
   ShellCommand<Shell>::registerCommand("testI", CL_SHELL, &Shell::testI);
-  ShellCommand<Shell>::registerCommand("testS", CL_SHELL, &Shell::testS);
 }
 
@@ -92,5 +92,4 @@
 {
   printf("This is the Test for one String '%s'\n", s);
-
 }
 
Index: /trunk/src/util/shell_command.cc
===================================================================
--- /trunk/src/util/shell_command.cc	(revision 5147)
+++ /trunk/src/util/shell_command.cc	(revision 5148)
@@ -33,7 +33,4 @@
   this->setName(commandName);
 
-  va_list parameters;
-  va_start(parameters, paramCount);
-
   this->classID = classID;
   this->className = ClassList::IDToString(classID);
@@ -48,33 +45,36 @@
     paramCount = FUNCTOR_MAX_ARGUMENTS;
   this->paramCount = paramCount;
-  this->parameters = new long[paramCount];
+  this->parameters = new unsigned int[paramCount];
+
+  va_list parameterList;
+  va_start(parameterList, paramCount);
 
   for (unsigned int i = 0; i < paramCount; i++)
   {
-    this->parameters[i] = va_arg(parameters, long);
+    this->parameters[i] = va_arg(parameterList, int);
 
     switch (this->parameters[i])
     {
       case ParameterBool:
-        this->defaultBools[i] = va_arg(parameters, int);
+        this->defaultBools[i] = va_arg(parameterList, int);
         break;
       case ParameterChar:
         this->defaultStrings[i] = new char[2];
-        sprintf(this->defaultStrings[0], "%c",  va_arg(parameters, int));
+        sprintf(this->defaultStrings[0], "%c",  va_arg(parameterList, int));
         break;
       case ParameterString:
-        this->defaultStrings[i] = va_arg(parameters, char*);
+        this->defaultStrings[i] = va_arg(parameterList, char*);
         break;
       case ParameterInt:
-        this->defaultInts[i] = va_arg(parameters, int);
+        this->defaultInts[i] = va_arg(parameterList, int);
         break;
       case ParameterUInt:
-        this->defaultInts[i] = va_arg(parameters, unsigned int);
+        this->defaultInts[i] = va_arg(parameterList, unsigned int);
         break;
       case ParameterFloat:
-        this->defaultFloats[i] = va_arg(parameters, double);
+        this->defaultFloats[i] = va_arg(parameterList, double);
         break;
       case ParameterLong:
-        this->defaultInts[i] = va_arg(parameters, long);
+        this->defaultInts[i] = va_arg(parameterList, long);
         break;
       default:
@@ -97,10 +97,11 @@
 bool ShellCommandBase::isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, ...)
 {
-  va_list parameters;
-  va_start(parameters, paramCount);
+  va_list parameterList;
+  va_start(parameterList, paramCount);
 
   if (ShellCommandBase::commandList == NULL)
   {
     ShellCommandBase::commandList = new tList<ShellCommandBase>;
+    ShellCommand<ShellCommandBase>::registerCommand("debug", CL_SHELL_COMMAND, &ShellCommandBase::debug);
     return false;
   }
@@ -126,5 +127,5 @@
  * executes commands
  * @param executionString the string containing the following input
- * <ClassName> [<ObjectName>] <functionName> [parameter1[,parameter2[,...]]]
+ * ClassName [ObjectName] functionName [parameter1[,parameter2[,...]]]
  * @return true on success, false otherwise.
  */
@@ -156,7 +157,8 @@
           continue;
         }
+        PRINTF(4)("Command %s matches\n", elem->getName());
         // getting singleton-reference
         tList<BaseObject>* list =  ClassList::getList(elem->classID);
-        if (list)
+        if (list != NULL)
           objectPointer = list->firstElement();
       }
@@ -195,5 +197,5 @@
           continue;
         }
-        PRINTF(5)("Function '%s' found\n", commandBegin);
+        PRINTF(4)("Function '%s' found\n", commandBegin);
       }
       const char* paramBegin = strchr(commandBegin, ' ');
@@ -203,4 +205,5 @@
         paramBegin++;
 
+      PRINTF(3)("Parameters to Pass: %s\n", paramBegin);
       if (objectPointer != NULL && paramBegin != NULL)
       {
@@ -215,2 +218,58 @@
   return true;
 }
+
+
+void ShellCommandBase::debug()
+{
+  if (ShellCommandBase::commandList == NULL)
+  {
+    PRINT(0)("No Command registered so far\n");
+    return;
+  }
+
+  tIterator<ShellCommandBase>* iterator = ShellCommandBase::commandList->getIterator();
+  ShellCommandBase* elem = iterator->firstElement();
+  while(elem != NULL)
+  {
+    PRINT(0)("Class %s registered command %s with %d parameters: ", elem->className, elem->getName(), elem->paramCount);
+    for (unsigned int i = 0; i< elem->paramCount; i++)
+      printf(ShellCommandBase::paramToString(elem->parameters[i]));
+    printf("\n");
+
+    elem = iterator->nextElement();
+  }
+  delete iterator;
+}
+
+
+
+const char* ShellCommandBase::paramToString(long parameter)
+{
+  switch (parameter)
+  {
+    case ParameterBool:
+      return "BOOL";
+      break;
+    case ParameterChar:
+      return "CHAR";
+      break;
+    case ParameterString:
+      return "STRING";
+      break;
+    case ParameterInt:
+      return "INT";
+      break;
+    case ParameterUInt:
+      return "UINT";
+      break;
+    case ParameterFloat:
+      return "FLOAT";
+      break;
+    case ParameterLong:
+      return "LONG";
+      break;
+    default:
+      return "NULL";
+      break;
+  }
+}
Index: /trunk/src/util/shell_command.h
===================================================================
--- /trunk/src/util/shell_command.h	(revision 5147)
+++ /trunk/src/util/shell_command.h	(revision 5148)
@@ -45,5 +45,5 @@
   }
 
-
+// CONSTRUCTORS
 #define ShellCommandConstructor0 \
   void (T::*functionPointer_0)(); \
@@ -70,5 +70,5 @@
 #define ShellCommandExecute1(t1) \
    else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
-       (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(t1##_FUNC(parameters, 0))
+    (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(t1##_FUNC(parameters, 0))
 
 
@@ -90,5 +90,7 @@
 
     static bool isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, ...);
+    static const char* paramToString(long parameter);
 
+    void debug();
   private:
     virtual void executeCommand (BaseObject* object, const char* parameters) = NULL;
@@ -97,5 +99,5 @@
     void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
     unsigned int                     paramCount;          //!< the count of parameters
-    long*                            parameters;          //!< Parameters
+    unsigned int*                    parameters;          //!< Parameters
     bool                             isSingleton;         //!< if the Class is Singleton @todo autocheck
 
@@ -143,7 +145,7 @@
 #define FUNCTOR_LIST(x) ShellCommandRegister ## x
 //#include "functor_list.h"
-FUNCTOR_LIST(0);
-FUNCTOR_LIST(1)(l_INT);
-FUNCTOR_LIST(1)(l_STRING);
+  FUNCTOR_LIST(0);
+  FUNCTOR_LIST(1)(l_INT);
+  FUNCTOR_LIST(1)(l_STRING);
 #undef FUNCTOR_LIST
 
@@ -160,10 +162,10 @@
     {
       if (parameters != NULL)
-        SubString params(parameters, ',');
+        //SubString params(parameters, ',');
 #define FUNCTOR_LIST(x) ShellCommandExecute ## x
 //#include "functor_list.h"
   FUNCTOR_LIST(0);
   FUNCTOR_LIST(1)(l_INT);
-  FUNCTOR_LIST(1)(l_STRING);
+  //FUNCTOR_LIST(1)(l_STRING);
 #undef FUNCTOR_LIST
     }
