Debugger problem

297 views
Skip to first unread message

jime

unread,
Jul 2, 2014, 8:23:18 AM7/2/14
to omn...@googlegroups.com
I have a scenario that launches and executes with no error, although outcome is not correct but no errors occur- because no source for error. When i switch to debugging i get the following pop up "gdb.exe has stopped working" and it fails to run.
The failure happens in IPv4NetworkConfigurator.cc (unmodified from inet package)
at any of these lines (different on each run !!)

line 278: Node *node = (Node *)topology.getNode(i);
             cModule *module = node->getModule();
             node->module = module;
             node->interfaceTable = IPvXAddressResolver().findInterfaceTableOf(module);

Another issue is that I have small change in IPv4NetworkConfigurator.cc, when i run the simulation I get "test.exe has stopped working" >> it does not work at all. it does not also print any lines to console if I run in command line user interface. running in debug mode gives the previous error "gdb.exe has stopped working".

what are your suggestions to get through this?

best regards.

Michael Kirsche

unread,
Jul 2, 2014, 8:33:07 AM7/2/14
to omn...@googlegroups.com
Which GDB version are you executing under Windows/MinGW?

jime

unread,
Jul 2, 2014, 8:39:01 AM7/2/14
to omn...@googlegroups.com
From MINW shell, i see that gdb is GNU gdb 7.4

jime

unread,
Jul 2, 2014, 12:52:18 PM7/2/14
to omn...@googlegroups.com
I should mention this error "gdb.exe ..." happens when you place a break point before these lines and use step over/return buttons. otherwise it doesn't produce this error. but i need to check their values though!

Michael Kirsche

unread,
Jul 3, 2014, 5:10:13 AM7/3/14
to omn...@googlegroups.com
I tried the procedure with a standard INET example, set the breakpoint before those lines that you've mentioned. No problem here.

Which version of INET are you using?

I did an upgrade of the windows MinGW GDB, since the standard version 7.4 has problems with certain breakpoints and newer features are supported since version 7.5 (e.g. display of run-time types of variables).

Try updating your MinGW GDB too. There are versions with and without Python support available. If you take a newer version with Python support, then a pretty-printers will also work.

Here are newer versions without Python support (remember to disable pretty printing under Eclipse Preferences -> C/C++ -> Debug -> GDB): http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/

And here is a repository with newer versions, compiled with Python support: http://sourceforge.net/projects/gdbmingw/files/

You can also compile your own version of GDB for the MinGW environment with Python support, I am currently using ver 7.7.50 from the GDB repository.

Rudolf Hornig

unread,
Jul 4, 2014, 4:50:35 AM7/4/14
to omn...@googlegroups.com
Hi Michael, 

I have bundled gdb 7.5 with the upcoming omnet 4.5 version. Out of curiosity, what are the advantages of your self compiled 7.7 version? I'm asking this whether it would worth to bundle that version?

Rudolf

Michael Kirsche

unread,
Jul 4, 2014, 5:09:55 AM7/4/14
to omn...@googlegroups.com
Hi Rudolf,

main reason for a version higher than 7.4 was the displaying of the run-time type of variables.
I was more interested in a version with Python support, therefore I self-compiled the current version under MinGW. Afterwards I found the mentioned repository with a newer MinGW version with Python support.
Self-compiled also out of pure interest :)

As for important changes in the later revisions (after 7.5) I am not 100% sure if some of the fixes cover the work under OMNeT, here's the news document, covering in short the main fixes and new features for the later releases: http://www.gnu.org/software/gdb/news/

Regards,
Michael

Rudolf Hornig

unread,
Jul 4, 2014, 8:50:36 AM7/4/14
to omn...@googlegroups.com
I have also downloaded the mentioned version and tested briefly. Seemingly solved several older annoyances so I've decided that this version will be included in OMNET 4.5. Let's hope that there are no hidden show stoppers in 7.7

Thanks, Rudolf

jime

unread,
Jul 6, 2014, 10:54:24 AM7/6/14
to omn...@googlegroups.com
I tried upgrading GDB thru this link: http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/
the upgrade did not happen I'm not sure why, it is still 7.4 but the error did not occur again !!

Michael Kirsche

unread,
Jul 6, 2014, 11:21:24 AM7/6/14
to omn...@googlegroups.com
You copied all files from the downloaded new version over the respective files under the mingw subdirectory?
Did you restart the mingw shell?

As for the error... any code changes that you've done in the meantime? Background virus scanner? Other things that you might have changed?

jime

unread,
Jul 7, 2014, 7:57:35 AM7/7/14
to omn...@googlegroups.com
I did not copy anything, I just ran the executable in the link, which most likely means that mingw in eclipse sub directory was not changed ! maybe only mingw in root sub directory has been affected.
As for the error, I did modify the code in various places to get correct behavior (more or less). I rolled back to original code but error never happened. I'm not sure why !

Michael Kirsche

unread,
Jul 7, 2014, 8:28:07 AM7/7/14
to omn...@googlegroups.com
Seems like you had some error that led to a crash in GDB, Valgrind could have probably tracked it...

Nevertheless, for upgrading the GDB, you have to replace the one in the MinGW directory, this is also used by the OMNeT IDE.
Don't know what you mean by Eclipse subdirectory...
Reply all
Reply to author
Forward
0 new messages