Author Topic: debugging symbols [-g] option not working!  (Read 5372 times)

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
debugging symbols [-g] option not working!
« 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

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: debugging symbols [-g] option not working!
« Reply #1 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.

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: debugging symbols [-g] option not working!
« Reply #2 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugging symbols [-g] option not working!
« Reply #3 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: debugging symbols [-g] option not working!
« Reply #4 on: December 01, 2012, 12:14:55 pm »
no, it doesn't work

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: debugging symbols [-g] option not working!
« Reply #6 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...

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: debugging symbols [-g] option not working!
« Reply #7 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
« Last Edit: December 01, 2012, 02:18:02 pm by polisbul »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugging symbols [-g] option not working!
« Reply #8 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline polisbul

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: debugging symbols [-g] option not working!
« Reply #9 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...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: debugging symbols [-g] option not working!
« Reply #10 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.
« Last Edit: December 02, 2012, 04:40:07 pm by jens »