Hi all,
I am running Dev-C++ with the (I thought up to now)
latest version 4.9.8.10.
I have tried to debug my first stl+ program, found here:
<< Datei: stlplus-02-01 v02.zip >>
use main.dev in the main directory.
I guess, there are some bugs with the STL+-based
program, but I can not get hold of them, since
debugging does not work properly. To reproduce the
problems, try the following:
1)
- breakpoint on the line containing
cli_parser parser(definitions, ini_files, "vlibrary", errors);
then debug the program. Try to go through the program
using F7
-> goes to next line
if (!parser.parse(myArgv))
- press F7 again, and you will see, that debugging stops
By trying to troubleshoot the troubleshooter, I have
found the following problems:
2)
- breakpoint on the line containing
printf("test\n");
- debug
- <shift> F7
--> you will find yourself in the last line of textio2.cpp
(note, all following lines of the file are commented out)
Here, we seem to have a problem with the function
to_string; if the line is commented out, then the
debugger will not stop in textio2.cpp any more.
3) Problem with inline
comment the line out:
return std::string("unknown error number " +
to_string(error));
and rerun 2)
--> you will find yourself on the last line of file
dprintf.cpp
This seems to be a problem with the inline macro
used in the function isdigit() used in file dprintf.cpp and
defined in file ctype.h, which comes with Dev-C++:
--- from ctype.h ---
extern inline int isdigit(int c) {return __ISCTYPE(c,
_DIGIT);}
--- end ---
This last problem, I have found the workaround to
configure
in the beginning of file dprintf.hpp (is commented out for
you, since I wanted to present the problem to you)
Am I doing someething wrong, or are those bugs of Dev-
C++? Is there a quick workaround to come around all
those problems quickly? Is Dev-C++ 4.0 an alternative?
Or Insight Debugger? I have seen "Do not use with Dev-
C++ 5, or Dev-C++'s integrated debugging will not work
anymore."
So after installation of InSight, Dev-C++ debugging does
not work any more?
BTW, the purpose of this all is to create a Cisco-like CLI
for a server. I guess, this is a very common task to
programmers. However, I only have found a Router-CLI
for diskless Linux-Routers (I am working on Windows
right now) and I have found STL+, which provides
libraries to build a CLI. However, working examples are
missing there. Do you have a tip?
Thanks,
Oliver
STL+ based source code