problems debugging CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

problems debugging CEGUI

Postby YaronCT » Fri Jun 19, 2015 12:44

Hi,

I'm sorry if this question isn't specific to CEGUI, but for some reason I'm unable to debug CEGUI code with gdb, and this is something I've not encountered before. For example, I put a breakpoint in CEGUI::OpenGL3ShaderManager::loadShader. When I hit that breakpoint, I get:

Code: Select all

Breakpoint 1, 0x00007ffff7bac3e0 in CEGUI::OpenGL3ShaderManager::loadShader(unsigned int, std::string, std::string)@plt ()
   from /usr/local/cegui-0.8.4/lib/libCEGUIOpenGLRenderer-0.so.2


However, there's no indication of the source file name, and I can't see the code itself. I've built CEGUI 0.8.4 with:

Code: Select all

cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="/usr/local/cegui-0.8.4" ../../src/cegui-0.8.4
make -j4
sudo make install


And I built my sample program that uses CEGUI with:

Code: Select all

export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+":"}/usr/local/cegui-0.8.4/lib/pkgconfig
c++ main.cpp -g -I/usr/include/GLFW `pkg-config --cflags --libs CEGUI-0-OPENGL3` -Wl,-rpath,/usr/local/cegui-0.8.4/lib -lglfw -lGLEW -lGL


I'm using Debian Linux 8.1 with GCC 4.9.2, GDB 7.7.1 and CMake 3.0.2.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: problems debugging CEGUI

Postby YaronCT » Fri Jun 19, 2015 14:46

I've done the same with Clang and its debugger (LLDB), and debugging works fine. Could it be a GDB bug?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: problems debugging CEGUI

Postby Ident » Sat Jun 20, 2015 07:22

It could be, I am not sure. I only use Visual Studio and I have encountered not a single issue at all, ever. Of course this does not mean much, there could still be something "wrong" and Visual Studio may just be being nice about it. Does your problem only occur inside the the OpenGL Renderers?
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: problems debugging CEGUI

Postby YaronCT » Sat Jun 20, 2015 08:35

I don't know in general, but from a single attempt I've now made to debug a function not in the renderer, it works. What's weird though is that when I get a crash in the OpenGL 3 renderer while in GDB, I can see its code. That also seems to suggests it's a GDB bug. I might ask in the GDB mailing list and see what they have to say. In the meantime I switched to LLVM's Clang/LLDB.

I find the combination of words "bug in GDB" somewhat funny and terrifying. It's like when the judge is a murderer himself...

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: problems debugging CEGUI

Postby Ident » Sat Jun 20, 2015 08:38

Indeed, this is odd. If you figure out what causes this or if we did anything wrong, please report back.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests