Author Topic: Debugger starts and exits right away (Yes _that_ again)  (Read 4606 times)

hoehrer

  • Guest
Debugger starts and exits right away (Yes _that_ again)
« on: June 29, 2008, 03:22:01 pm »
Hi,

I recently tried to debug a program with C::B and hit a problem:
Code
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
windows
Adding source dir: /games/ufoai/trunk/build/projects/
Adding source dir: /games/ufoai/trunk/
Adding file: ../../ufo
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.8-debian
Child process PID: 2297
Program exited with code 01.
Debugger finished with status 0

Now I've seen a lot of similar problems reported all around this forum and other places, but either they are slightly different in cause or the solutions simply do not work for me.
e.g. debugging symbols (-g) are compiled and I can't find any hints of -s in the log.

Codeblocks version:
Binary download "codeblocks-8.02-amd64.tar.gz"
System:
Ubuntu Linux 8.04 (64bit 4core) - It also happend on my old Debian unstable (32bit single core)

Compiling in C::B works fine and running the created binary (also with gdb) from the command line works as well.

Any tip/hint would be welcome,
Werner

PS: The README of this forum states:
"Is your problem linux or windows specific? There are appropriate forums  for it."
But where are they?


EDIT
Full debugger log:
Code
LD_LIBRARY_PATH=.:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args ../../ufo
Working dir : /games/ufoai/trunk/build/projects/
(gdb)
> set prompt >>>>>>cb_gdb:
>>>>>>cb_gdb:
> show version
GNU gdb 6.8-debian
Copyright (C) 2008 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".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> directory /games/ufoai/trunk/build/projects/
>>>>>>cb_gdb:
> directory /games/ufoai/trunk/
>>>>>>cb_gdb:
> run
[Thread debugging using libthread_db enabled]
[New Thread 0x7f812176b710 (LWP 2297)]
Error: Could not load environment map 0
---- filesystem initialization -----
Adding game dir: ./base
couldn't exec default.cfg
execing config.cfg
execing keys.cfg
----- network initialization -------
libcurl/7.18.0 GnuTLS/2.0.4 zlib/1.2.3.3 libidn/1.1 initialized.
------ server initialization -------
----- console initialization -------
loaded console history commands: 15
Console initialized.
------- video initialization -------
SDL version: 1.2.12
I: desktop depth: 32bpp
I: video memory: 0
I: video driver: x11
I: setting mode 4: 800x600 (fullscreen: no)
I: set swap control to 1
I: got 8 bits of stencil
I: got 24 bits of depth buffer
I: got double buffer
I: got 8 bits for red
I: got 8 bits for green
I: got 8 bits for blue
I: got 8 bits for alpha
I: got 0 multisample buffers
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI Radeon HD 3870
GL_VERSION: 2.1.7412 Release
GL_EXTENSIONS: GL_AMD_performance_monitor GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_meminfo GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_copy_texture GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_vertex_array GL_KTX_buffer_region GL_NV_blend_square GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_WIN_swap_hint WGL_EXT_swap_control
ignoring GL_ARB_texture_compression
ignoring GL_EXT_texture_filter_anisotropic
using GL_EXT_texture_lod_bias
using GL_ARB_fragment_program
using GL_ARB_shading_language_100
ignoring GL_ARB_vertex_buffer_object
max texture units: 8
max texture size: detected 8192
but using 256 as requested
OpenGL err: /games/ufoai/trunk/src/renderer/r_state.c (536): R_Color GL_INVALID_ENUM (0x500)
R_FindImage: Can't find pics/envmaps/envmap_0 (pics/envmaps/envmap_0.tga)
Wrote keys.cfg
Program exited with code 01.
>>>>>>cb_gdb:
> quit

EDIT
Example compile log:
Code
...
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/server/sv_init.c -o .objs/client/src/server/sv_init.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/server/sv_main.c -o .objs/client/src/server/sv_main.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/server/sv_send.c -o .objs/client/src/server/sv_send.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/server/sv_user.c -o .objs/client/src/server/sv_user.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/server/sv_world.c -o .objs/client/src/server/sv_world.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/shared/byte.c -o .objs/client/src/shared/byte.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/shared/infostring.c -o .objs/client/src/shared/infostring.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/shared/mathlib.c -o .objs/client/src/shared/mathlib.o
gcc -W -Wall -g -DCOMPILE_UFO  -Wall -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     -fPIC    -c /games/ufoai/trunk/src/shared/shared.c -o .objs/client/src/shared/shared.o
g++  -o ../../ufo .objs/client/src/client/cl_actor.o .objs/client/src/client/cl_aircraft.o .objs/client/src/client/cl_airfight.o .objs/client/src/client/cl_alienbase.o .objs/client/src/client/cl_aliencont.o .objs/client/src/client/cl_basemanagement.o .objs/client/src/client/cl_basesummary.o .objs/client/src/client/cl_campaign.o .objs/client/src/client/cl_cinematic.o .objs/client/src/client/cl_console.o .objs/client/src/client/cl_employee.o .objs/client/src/client/cl_event.o .objs/client/src/client/cl_hospital.o .objs/client/src/client/cl_http.o .objs/client/src/client/cl_input.o .objs/client/src/client/cl_inventory.o .objs/client/src/client/cl_irc.o .objs/client/src/client/cl_joystick.o .objs/client/src/client/cl_keys.o .objs/client/src/client/cl_language.o .objs/client/src/client/cl_le.o .objs/client/src/client/cl_main.o .objs/client/src/client/cl_map.o .objs/client/src/client/cl_mapfightequip.o .objs/client/src/client/cl_market.o .objs/client/src/client/cl_menu.o .objs/client/src/client/cl_parse.o .objs/client/src/client/cl_particle.o .objs/client/src/client/cl_popup.o .objs/client/src/client/cl_produce.o .objs/client/src/client/cl_radar.o .objs/client/src/client/cl_research.o .objs/client/src/client/cl_save.o .objs/client/src/client/cl_screen.o .objs/client/src/client/cl_sequence.o .objs/client/src/client/cl_shader.o .objs/client/src/client/cl_sound.o .objs/client/src/client/cl_team.o .objs/client/src/client/cl_tip.o .objs/client/src/client/cl_transfer.o .objs/client/src/client/cl_tutorials.o .objs/client/src/client/cl_ufo.o .objs/client/src/client/cl_ufopedia.o .objs/client/src/client/cl_video.o .objs/client/src/client/cl_view.o .objs/client/src/client/menu/m_actions.o .objs/client/src/client/menu/m_draw.o .objs/client/src/client/menu/m_font.o .objs/client/src/client/menu/m_input.o .objs/client/src/client/menu/m_inventory.o .objs/client/src/client/menu/m_main.o .objs/client/src/client/menu/m_messages.o .objs/client/src/client/menu/m_node_bar.o .objs/client/src/client/menu/m_node_checkbox.o .objs/client/src/client/menu/m_node_image.o .objs/client/src/client/menu/m_node_model.o .objs/client/src/client/menu/m_node_radar.o .objs/client/src/client/menu/m_node_selectbox.o .objs/client/src/client/menu/m_node_string.o .objs/client/src/client/menu/m_node_text.o .objs/client/src/client/menu/m_nodes.o .objs/client/src/client/menu/m_parse.o .objs/client/src/client/menu/m_popup.o .objs/client/src/client/menu/m_tooltip.o .objs/client/src/common/cmd.o .objs/client/src/common/cmodel.o .objs/client/src/common/common.o .objs/client/src/common/cvar.o .objs/client/src/common/dbuffer.o .objs/client/src/common/files.o .objs/client/src/common/http.o .objs/client/src/common/ioapi.o .objs/client/src/common/md4.o .objs/client/src/common/mem.o .objs/client/src/common/msg.o .objs/client/src/common/net.o .objs/client/src/common/netpack.o .objs/client/src/common/pqueue.o .objs/client/src/common/routing.o .objs/client/src/common/scripts.o .objs/client/src/common/tracing.o .objs/client/src/common/unzip.o .objs/client/src/game/inv_shared.o .objs/client/src/game/q_shared.o .objs/client/src/ports/linux/linux_main.o .objs/client/src/ports/unix/unix_console.o .objs/client/src/ports/unix/unix_glob.o .objs/client/src/ports/unix/unix_main.o .objs/client/src/renderer/qgl.o .objs/client/src/renderer/r_bsp.o .objs/client/src/renderer/r_draw.o .objs/client/src/renderer/r_entity.o .objs/client/src/renderer/r_font.o .objs/client/src/renderer/r_image.o .objs/client/src/renderer/r_light.o .objs/client/src/renderer/r_lightmap.o .objs/client/src/renderer/r_main.o .objs/client/src/renderer/r_material.o .objs/client/src/renderer/r_mesh.o .objs/client/src/renderer/r_mesh_anim.o .objs/client/src/renderer/r_misc.o .objs/client/src/renderer/r_model.o .objs/client/src/renderer/r_model_alias.o .objs/client/src/renderer/r_model_brush.o .objs/client/src/renderer/r_model_dpm.o .objs/client/src/renderer/r_model_md2.o .objs/client/src/renderer/r_model_md3.o .objs/client/src/renderer/r_particle.o .objs/client/src/renderer/r_sdl.o .objs/client/src/renderer/r_shader.o .objs/client/src/renderer/r_sphere.o .objs/client/src/renderer/r_state.o .objs/client/src/renderer/r_surface.o .objs/client/src/server/sv_ccmds.o .objs/client/src/server/sv_game.o .objs/client/src/server/sv_init.o .objs/client/src/server/sv_main.o .objs/client/src/server/sv_send.o .objs/client/src/server/sv_user.o .objs/client/src/server/sv_world.o .objs/client/src/shared/byte.o .objs/client/src/shared/infostring.o .objs/client/src/shared/mathlib.o .objs/client/src/shared/shared.o   -L/usr/lib -lSDL  -lcurl -lgssapi_krb5   -lSDL -lSDL_ttf -lSDL_mixer -lz -ljpeg -lpng -lcurl
Output size is 4,27 MB
Process terminated with status 0 (0 minutes, 8 seconds)
0 errors, 0 warnings
« Last Edit: June 29, 2008, 03:32:32 pm by hoehrer »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Debugger starts and exits right away (Yes _that_ again)
« Reply #1 on: June 29, 2008, 05:13:29 pm »
R_FindImage: Can't find pics/envmaps/envmap_0 (pics/envmaps/envmap_0.tga)
Wrote keys.cfg
Program exited with code 01.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

hoehrer

  • Guest
Re: Debugger starts and exits right away (Yes _that_ again)
« Reply #2 on: June 29, 2008, 05:50:28 pm »
R_FindImage: Can't find pics/envmaps/envmap_0 (pics/envmaps/envmap_0.tga)
Wrote keys.cfg
Program exited with code 01.

Oh, I must be blind or something, nevermind my post then :D

Cheers,
Werner