From: Nicola S. <nic...@ec...> - 2017-03-23 22:43:36
|
Hi. I have an error in one of my test, but I do not understand why. It causes a SEGFAULT, so it should be easy to find with GDB. But GDB seems not to follow the processes created by the test. There is probably a way to use GDB correctly in this context, but I do not know it. Is there a way to force check not to create process and thread (that will enable me to use GDB in a simple way)? I would particularly appreciate a way without recompiling check, but I found nothing in the public API. I am on GNU/Linux. user@user-ThinkPad-X200:~/workspace/PlanetWars2dRT-SDL2/externals/core$ ./debug/bin/check_activity_manager Running suite(s): Activity manager 71%: Checks: 7, Failures: 0, Errors: 2 /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/tests/check_activity_manager.c:66:E:Current:test_activity_manager_start_current:0: (after this point) Received signal 11 (Segmentation fault) /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/tests/check_activity_manager.c:87:E:Next:test_activity_manager_start_next:0: (after this point) Received signal 11 (Segmentation fault) user@user-ThinkPad-X200:~/workspace/PlanetWars2dRT-SDL2/externals/core$ gdb ./debug/bin/check_activity_manager GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./debug/bin/check_activity_manager...done. (gdb) b tests/check_activity_manager.c:65 Breakpoint 1 at 0x4030f3: file /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/tests/check_activity_manager.c, line 65. (gdb) r Starting program: /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/debug/bin/check_activity_manager [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Running suite(s): Activity manager 71%: Checks: 7, Failures: 0, Errors: 2 /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/tests/check_activity_manager.c:66:E:Current:test_activity_manager_start_current:0: (after this point) Received signal 11 (Segmentation fault) /home/user/workspace/PlanetWars2dRT-SDL2/externals/core/tests/check_activity_manager.c:87:E:Next:test_activity_manager_start_next:0: (after this point) Received signal 11 (Segmentation fault) [Inferior 1 (process 8147) exited with code 01] Regards. |