Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: polisbul on November 28, 2012, 08:58:45 pm

Title: debugging symbols [-g] option not working!
Post by: polisbul on November 28, 2012, 08:58:45 pm
If I get a segmentation fault and start the debug mode, I can't read text messages, but only "??" messages.
In the compiler option the debugging symbols [-g] option is checked.
Am I forgetting anything?
Thank you
Title: Re: debugging symbols [-g] option not working!
Post by: jarod42 on November 29, 2012, 10:46:16 am
Not related to CB.

Check that you don't have 'strip' (-s) option enable in the same time.
Title: Re: debugging symbols [-g] option not working!
Post by: polisbul on November 30, 2012, 05:10:46 pm
but if I compile from terminal and run ddd it works!
-s is disabled.
is gdb the right to debugger to set?
Title: Re: debugging symbols [-g] option not working!
Post by: oBFusCATed on November 30, 2012, 05:45:00 pm
but if I compile from terminal and run ddd it works!
Does ddd still work if you compile with codeblocks?
Title: Re: debugging symbols [-g] option not working!
Post by: polisbul on December 01, 2012, 12:14:55 pm
no, it doesn't work
Title: Re: debugging symbols [-g] option not working!
Post by: oBFusCATed on December 01, 2012, 12:35:04 pm
Then fix your build in C::B...

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Title: Re: debugging symbols [-g] option not working!
Post by: polisbul on December 01, 2012, 02:10:25 pm
I really didn't find anything on that page, so did a complete removal by synaptic, deleted the .codeblocks folder in my home directory and reinstalled. Then, as shown here http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks, I checked -g and -Wall options. But it doesn't work as well...
Title: Re: debugging symbols [-g] option not working!
Post by: polisbul on December 01, 2012, 02:15:03 pm
Ah, I've noted the "warning: GDB: Failed to set controlling terminal: Operation not permitted" message as the debug console starts
Title: Re: debugging symbols [-g] option not working!
Post by: oBFusCATed on December 01, 2012, 07:21:00 pm
Ah, I've noted the "warning: GDB: Failed to set controlling terminal: Operation not permitted" message as the debug console starts
Ignore, to know the reason search for it.

Have you read the link I've given you? If you have and you've executed all the steps you've known where the problem is coming from.
Title: Re: debugging symbols [-g] option not working!
Post by: polisbul on December 02, 2012, 02:40:09 am
Sorry but I still can't understand how things on that page could solve my problem! Did you send me the right link? It's not written there how to fix my CB build!
Anyway I found that the message I posted before is related to a gdb bug, but it seems very strange that no one had the same problem on this forum...
Title: Re: debugging symbols [-g] option not working!
Post by: Jenna on December 02, 2012, 11:12:35 am
The link helps you tro see the commandline used to compile your program.
You should inspect it and see which parameter might cause the trouble.

You can also post the commandline for compiling and linking here.

About the gdb warning: it was reported here quiet often and it is not the cause for your problem.