This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Debugging problem

Tags: None
(comma "," separated)
cengizkandemir
Registered Member
Posts
2
Karma
0

Debugging problem

Wed Mar 06, 2013 7:13 pm
Hi,

I changed my development environment from Windows to Fedora and I needed an IDE to continue development of my isometric RPG. Anyway, I decided give a shot to KDev(my instructor from college suggested it). IDE seems good but I have problems with its debugger. Somehow, it doesn't recognizes files in executable's directory.

In my Main.cpp, following line(writing it for convenience) initializes the game engine I am using and this line requires a special file(widget file).

Code: Select all
gge::widgets::InitializeApplication("The Fallen", "The Fallen", 1300, 700, icon);


The problem is, it gives abort signal to application and exists with runtime error that is

terminate called after throwing an instance of 'std::runtime_error'
what(): Cannot find UI file


It should find the file because it's located in executable's directory. When I am running gdb from Konsol it works just fine. I don't know what is the problem. I need your help

thank you in advance.

Last edited by cengizkandemir on Thu Apr 24, 2014 1:08 pm, edited 1 time in total.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Debugging problem

Sat Mar 09, 2013 12:48 am
Hm, what happens exactly?

When you launch the application from KDevelop, does that work correctly?
When you debug the application, what happens? Can you set breakpoints, and do those work?

Greetings,
Sven


I'm working on the KDevelop IDE.
cengizkandemir
Registered Member
Posts
2
Karma
0

Re: Debugging problem

Fri Mar 15, 2013 10:02 pm
I have solved the problem. The problem is KDev doesn't run gdb on correct path. I expect KDev to run gdb under my ..Project/Bin folder where my UI and various other files are located, however, it doesn't do that. It runs the gdb on a different path instead of binary path so executable can't find the files that it wants to load.

Here how I solved it:

I created an executable that changes the path of gdb properly

Code: Select all
#!/bin/bash
gdb --cd="path to your binary folder" $@


and navigate the debugger executable to this executable. This changes the working path of gdb.

Image


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]