Author Topic: How do I step codeblock to debug a libary?(solved with workaround)  (Read 3063 times)

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
I been working on a program that use poco library
http://www.pocoproject.org/poco/info/

What happening 

resentltyI been trying to use the svn version of it so i can use the mysql portion of poco witch is in svn.

I get it to compile and I run and link my program with it but it hangs on the

select.execute();

line in my c++ Code.

select is declared as
 Statement   select(*MyDBSes);
 
Statement is a poco class.

This tells me i need to debug the poco library.

What i would like to do is setup the debuger to step thou the poco code i got from svn

just after it hit the select.execute();

The trouble 

I can't set codeblocks up to use a customn make file to build poco but I can't find how to tell it to use

my program Bugd (wich uses a custom libary witch uses poco;sorry this is winded) so i can debug the libary.

My question?

1.)
How do i specify my host application?   

2.)
Dose codeblock lack steping thou code wich use customn makefiles?

3.)Dose any one know of any good gdb tutorails( i tryed reading the maual but a little over my head)?


some more info

i use a customn make in 3 programs.

Bugd (witch is the main program I trying to setup as a host)
The reason it uses a customn make file is because It to use scons(a make replacment) I need to put files in strange places and was not sure how to do that in c:b

BugdSdk (with is a libary bugd uses so i can upgrade bugd without stoping the daemon.)

Poco (witch is the libbary i try to see whhere my problem of hang is in)


Note

Please forgive me, if you see this as being a general c++ question to me it is very advance. I'm all self taught.   
sorry if i misspelled thing in here to bad, for some reason the spell check telling me ever word i type is misspelled. 

I do read(about how I should post) and i do a google search before i post but i can't find any info on the question above.

If you don't think it belong here could you please tell me where it belongs?

 I try to looking at the gdb manual witch i think is responable for what i want to do and try to do a google search on gdm but
did not find a gitting start tutorails.

Thanks for any help?
 

 
« Last Edit: August 24, 2008, 03:46:55 pm by frog-o »

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: How do I step codeblock to debug a libary?(solved with workaround)
« Reply #1 on: August 24, 2008, 04:02:38 pm »
I managed to find how to debug it altough i don't know how to do it in codeblock.(i probly figure it out with a little more time it almost look like code block dose not suport it yet)

After reading a tutoral i finnaly found on gdm i figured out that i have to compile my program

with -g comand and opt-tim-in-ly with -ggdb I had to add this to my SConstruct file to do that.

debug = ARGUMENTS.get('debug', 0)
if int(debug):
       env.Append(CCFLAGS = '-ggdb -W -Wall')

now i type scon debug=1 to compile with debug support.

I can then use insight( a graphical frontend to gdm) to step thou the code.

I feel a little stupid thou because i realise just type gdm in google an it  gave quite a bit of info on gdm and even a gdm tutorial.

Why is it that i miss the ob-vee-us. i was searching with thing like

gdm codeblocks

gdm scons

gdm site:codeblocks.org

and the list goes on

etc.