Author Topic: Problems discovered in branches/wxpropgrid_debugger SVN7712  (Read 14679 times)

Offline mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Problems discovered in branches/wxpropgrid_debugger SVN7712
« on: January 24, 2012, 12:50:06 am »
I apologize in advance if this is not to correct forum for these issues and would appreciate notification of the correct place.
Thank you.

While using newly installed Code::Blocks at obfuscated's suggestion
SVN7712
Path: .
URL: http://svn.berlios.de/svnroot/repos/codeblocks/branches/wxpropgrid_debugger
Repository Root: http://svn.berlios.de/svnroot/repos/codeblocks
Repository UUID: 98b59c6a-2706-0410-b7d6-d2fa1a1880c9
Revision: 7712
Node Kind: directory
Schedule: normal
Last Changed Author: tpetrov
Last Changed Rev: 7712
Last Changed Date: 2012-01-22 19:36:42 -0500 (Sun, 22 Jan 2012)

I ran into the following problems:

Code
Settings -> Debugger -> Common
Option: Display Debugger's Log
When checked does not display Debugger's Log in Logs & Others panel.  
This was still the result after saving settings, exiting and restarting codeblocks

Right click on any tab in Logs & Others panel.
Popup menu -> Toggle -> Options do not include Debugger(Debug) as in my current working
Code::Blocks configuration (/trunk/SVN7494)

After compiling and installing Code::Blocks(DebugSVN7712), I loaded a project compiled while
using Code::Blocks(trunk/SVN7494).
I set a break point in the source code and ran the code using the Debug -> Start option.
The code did not break as expected.  Was required to Build -> Clean/Debug -> Start before
a break would occur.
As a side note, the debugger did stop somewhere(there was no arrow indicator as usual) and
the buttons in the Debugger toolbar could be clicked on but no action occurred.
After starting the program with no breakpoints set, I attempted to add breakpoints.  
The following is what was displayed in the Debug tab:

[quote]
[color=green][debug]Child process (pid:8988) doesn't exists
[debug]Code::Blocks is trying to interrupt process with pid: 8983; child pid: 8988 gdb pid: 8983

Continuing...
[/quote]
[/color]

The above was displayed each time I attempted to add a breakpoint while the program was running.

I tried to use the Break Debugger option in the Debugger Toolbar and this was displayed in the
   Debugger tab:

[debug]Child process (pid:8988) doesn't exists
[debug]Code::Blocks is trying to interrupt process with pid: 8983; child pid: 8988 gdb pid: 8983

Continuing...


After all of the above, I was not able to exit out of Debugging Mode.  I was required to
use the System Monitor to kill the gdb/program processes.

Start Page info
svn build rev 7712 (2012-01-23 00:36:42) gcc 4.4.4 Linux/unicode - 64 bit

Running CentOS 5.7
Configured Code::Blocks with the following:
../configure  --prefix=<non-default-path>/build --with-contrib-plugins=all,-NassiShneiderman,-byogames,-spellchecker CC=gcc44 CXX=g++44

Compilation went fine after removing NassiShneiderman and spellchecker options.

Code
gcc44 --v
Using built-in specs.
Target: x86_64-redhat-linux6E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --disable-gnu-unique-object --enable-languages=c,c++,fortran --disable-libgcj --with-mpfr=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/mpfr-install/ --with-ppl=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/ppl-install --with-cloog=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/cloog-install --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux6E
Thread model: posix
gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)

g++44 --v
Using built-in specs.
Target: x86_64-redhat-linux6E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --disable-gnu-unique-object --enable-languages=c,c++,fortran --disable-libgcj --with-mpfr=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/mpfr-install/ --with-ppl=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/ppl-install --with-cloog=/builddir/build/BUILD/gcc-4.4.4-20100726/obj-x86_64-redhat-linux6E/cloog-install --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux6E
Thread model: posix

wx-config --selected-config
[color=blue]gtk2-unicode-release-2.8[/color]
wx-config --version
[color=blue]2.8.12[/color]
wx-config --cppflags
[color=blue]-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__[/color]
wx-config --libs
[color=blue]-L/usr/local/lib -pthread   -L/usr/lib64   -lwx_gtk2u-2.8 [/color]
« Last Edit: January 24, 2012, 04:07:32 pm by mmccarty12 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #1 on: January 24, 2012, 08:33:42 am »
Debugger's debug log was removed and the output of it was moved in the normal debug log using the [debug] prefix.
This was made, because too many people were having trouble finding/enabling the log and so they were wasting my time.
I guess, I have to rename the option, so it is more clear.

Can you paste the full log? Do you use some kind of forking?
If you use forking you'll have many problems, because C::B's current debugger plugin doesn't work well with forking debuggees.

p.s. please use code tags for long pastes.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #2 on: January 24, 2012, 03:44:57 pm »
oBFusCATed,

Thank you for your immediate reply.

Quote
oBFusCATed:
Can you paste the full log? Do you use some kind of forking?
If you use forking you'll have many problems, because C::B's current debugger plugin doesn't work well with forking debuggees.

I am unsure what you are asking for here.  If you can give me more details, I am sure I can give you what you are looking for with this problem.
In the program I was running during all of this, there is no forking.

Quote
oBFusCATed:
p.s. please use code tags for long pastes.
Again, I am unsure what you are looking for here.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #3 on: January 24, 2012, 03:47:16 pm »
Right click in the Debug tab and choose "Copy contents to clipboard", then paste the copied text in a new post between [ code ] [/ code ] (removing the spaces) and hit Post.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #4 on: January 24, 2012, 04:03:18 pm »
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /scratch/mccarty/Dem3D/Dem3dPre/
Adding source dir: /scratch/mccarty/Dem3D/Dem3dPre/
Adding file: /scratch/mccarty/Dem3D/Dem3dPre/bin/Debug/Dem3dPreDebug-2012-01-24
Changing directory to: /scratch/mccarty/Dem3D/Dem3dPre/.

[debug]LD_LIBRARY_PATH=.:/opt/intel/Compiler/11.0/081/lib/intel64:/opt/intel/Compiler/11.0/081/mkl/lib/em64t:.:/philo/filesystems/maxwell/release/passage_flow/bin/LINUX/mpi/lib:/usr/lib:/usr/bin:/usr/lib/pkgconfig:/lib:/usr/local/lib/wx:/usr/local/lib:/scratch/mccarty/boost/build/lib:/usr/local/cuda/lib64
[debug]Command-line: /usr/bin/gdb -nx -fullname  -quiet  -args /scratch/mccarty/Dem3D/Dem3dPre/bin/Debug/Dem3dPreDebug-2012-01-24
[debug]Working dir : /scratch/mccarty/Dem3D/Dem3dPre

Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /scratch/mccarty/Dem3D/Dem3dPre/bin/Debug/Dem3dPreDebug-2012-01-24
done

[debug]Reading symbols from /scratch/mccarty/Dem3D/Dem3dPre/bin/Debug/Dem3dPreDebug-2012-01-24...
[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.1
[debug]Copyright (C) 2010 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-unknown-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /scratch/mccarty/codeblocksSVNDebug/wxpropgrid_debugger/build/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /scratch/mccarty/Dem3D/Dem3dPre/
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000
[debug][Thread debugging using libthread_db enabled]

Program started with no breakpoints.

At this point I opened a source file and tried to add a breakpoint.  The following message was displayed.
Code
[debug]Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664

Continuing...

After adding the break point with the above message displayed, I tried to open a file from within my program.
The following was displayed.
Code
[debug]Quit
[debug]>>>>>>cb_gdb

I hope this is enough information.
The program is being developed on the above mentioned system using the wxWidgets-2.9.2 API.
The program runs fine with no problems when not trying to debug at run-time, meaning that if I set breakpoints before
starting the program it will break properly.  However, I have run into situations where the program quits running if
I remove set breakpoints while the program is running.  The program will lock up or it will crash abruptly.

« Last Edit: January 24, 2012, 04:05:58 pm by mmccarty12 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #5 on: January 24, 2012, 04:08:07 pm »
Can you try gdb-7.3. It seems that gdb-7.1 is not stopping the debuggee, when SIGINT is sent to gdb.
GDB 7.3 does stop correctly.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #6 on: January 24, 2012, 04:15:02 pm »

From oBFusCATed:
Quote
Can you try gdb-7.3. It seems that gdb-7.1 is not stopping the debuggee, when SIGINT is sent to gdb.
GDB 7.3 does stop correctly.

It will take some time, I have to call my sysad to have him install it. 

In the meantime, I found another problem.  Above you said to click on the Debug tab and click on Copy Contents to Clipboard.  I tried this in many different ways and was not successful getting it to copy.  I had to highlight and use the mouse wheel click to get the content pasted.
I did select everything and selected Copy Selection to Clipboard in both its guises as well and it also did not work.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #7 on: January 24, 2012, 04:26:20 pm »
Works here.

For gdb-7.3: you can build it yourself, then you can put it somewhere in home and use it from there. This is how I use gdb-7.3 on my old centos. I have it installed in ~/software.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #8 on: January 24, 2012, 08:19:54 pm »
oBFusCATed,

I did as you suggested and compiled and installed gdb-7.4.  However, I cannot figure out how to set a custom debugger in the normal SVN build.
I did figure it out in the wxpropgrid_debug version.

How do you do a custom debugger set in the normal SVN(7713) build?

Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #9 on: January 24, 2012, 09:02:23 pm »
You can set the debugger in the toolchain executables for the compiler.

p.s. I've not tried gdb-7.4, so there might be some problems with it.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #10 on: January 24, 2012, 09:28:20 pm »
You can set the debugger in the toolchain executables for the compiler.

p.s. I've not tried gdb-7.4, so there might be some problems with it.

In SVN7713, I went to Settings -> Compiler and Debugger -> Toolchain Executables -> Additional Paths.
I added the path to the local build of gdb 7.4.
I ran the debugger on my code. In the Debugger log, it showed that gdb 7.1 was running.

I went to Settings -> Compiler and Debugger -> Toolchain Executables -> Debugger.
I put in the full path to the gdb flavor I want to use.
I ran the debugger on my code. In the Debugger log, it showed that gdb 7.1 was running.

I went to Settings -> Compiler and Debugger -> Toolchain Executables -> Additional Paths.
I removed the path added earlier.
I ran the debugger on my code. In the Debugger log, it showed that gdb 7.1 was running.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #11 on: January 24, 2012, 10:03:37 pm »
It might work, if you rename either the older or newer version of gdb (I suggest the older) and put the path to the 7.4 version in additional paths.

Offline mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #12 on: February 15, 2012, 07:23:13 pm »
Hello, again. 

I finally figured out what was going on with not being able to stop program execution during run-time.  But first some background as to the REAL cause of the problem.  Running a console application from Code::Blocks, CB, of course, opens an xterm by default.  As stated earlier, I was running gdb-7.1 when I first posted this as a problem.  Per obfuscated's suggestion I upgraded to 7.4, he said 7.3, but I didn't figure that would be a problem.  The problem was still occurring.  Prior to several software and system package upgrades, I had been running CB:7494, gcc/g++-4.1, gdb-6.8.  I upgraded to gcc/g++-4.4, this resolved some issues I was having with C++-0x/C++-11.  Since I was doing this, I also upgraded everything I could, including gdb.  I upgraded to gdb-7.1.  That is when my debugging issues started. 

I finally paid attention to what was being output in the console window, and the debugging log in CB.  In the console window I was receiving the following warning: "warning: GDB: Failed to set controlling terminal: Operation not permitted".

Thus began a search on Google for related problems.  As it turns out, this problem is a gdb problem, or a problem related to gdb being called from the IDE.  It has to do with the way TTY is assigned to gdb when it is called from the IDEs.  When I switched my debugger back to gdb-6.8, I no longer got the warning message in my output console/debugger's log, and I could put breaks into the code while the program was running.

The gdb people know about the problems, but there is nothing active on what is going to be done to fix the problem.  If you are having this same problem, I suggest downgrading your gdb to 6.8.  It seems that the 7.0 updates introduced as many bugs as it was intended to fix.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #13 on: February 15, 2012, 10:05:55 pm »
Thus began a search on Google for related problems.  As it turns out, this problem is a gdb problem, or a problem related to gdb being called from the IDE.  It has to do with the way TTY is assigned to gdb when it is called from the IDEs.  When I switched my debugger back to gdb-6.8, I no longer got the warning message in my output console/debugger's log, and I could put breaks into the code while the program was running.
This is a warning and it is not really a problem. I don't know why you've decided that it is causing you troubles. Any link with explanation?
I'm seeing this warning all day long and I've no problems with debugging.
I'm using gcc 4.1.2+gdb-7.4 on centos and everything works as expected.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #14 on: February 17, 2012, 05:05:07 pm »
Obfuscated,

First off, I don't like warnings of any type.  When there are none displayed, anywhere, I know that my program is working as programmed, not necessarily the way I want it to, but at the least it is working the way I coded it.  From the first time I actually paid attention to the fact that the warning existed, it annoyed me.

As stated above, I was using CB-SVN Rev 7494 with gcc/g++4.4 and gdb-6.8.
While using this configuration, I was able to do the following:
While the program was running, I was able to insert new break points that were recognized immediately, and the program would stop at that break point when the program came to that point, as is supposed to happen.

While the program was running, I was able to click on the Stop Debugging button or select the Stop Debugging option from the Debug menu option and the program would "break" wherever it happened to be in its run.

Console programs would not display any warnings of this sort:
Quote
warning: GDB: Failed to set controlling terminal: Operation not permitted
The debug window in CD would not show the above message when opening any non-console program.

Console programs would shut down the console window and the debugger when the program had exited.

GDB would stop automatically when the program was stopped by any method.

After upgrading to CB7713, gdb-7.1:
I was no longer able to insert break points while the program was running.  The Debug window would display the message:
Quote
Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664

I was forced to stop the program and restart.
 
I was no longer able to use the Stop Debugging button nor the Debug->Stop Debugging menu option to stop the program.  I was forced to close the program from the program close options.  There were times when CB would crash if this was not done in the proper order.

Console programs displayed the following warning at console window open:
Code
warning: GDB: Failed to set controlling terminal: Operation not permitted"
  The debug window in CB displayed the same message, even though a console window was not being opened.

Console programs would not shut down the console window and the debugger when the program had exited.  It was necessary to close the window using the window close options and shut down the debugger using the Stop Debugging button or the Debug->Stop Debugging menu option.

GDB would not stop automatically when the program was stopped by any method.  It was necessary to manually shut down gdb using the Stop Debugging button or the Debug->Stop Debugging menu option.

I came here, believing the problem was in the debugging plugin, to which you gave your reply below.  I did as you suggested and upgraded gdb, not to gdb-7.3 as you said, but to gdb-7.4.  The problems still persisted, which has led to the continuing conversation here. 

I down-graded gdb to gdb-7.0, then gdb-6.8.  The problems went away with gdb-6.8.  Something was changed, I assume drastically, that has caused the functionality that is in the debugger plugin to no longer work as intended, at least in my case.
If you enter:
Code
warning: GDB: Failed to set controlling terminal: Operation not permitted
into Google, you will find many people with the same problem and no solutions.  There are many threads mentioning the problem, of the fifty or so threads that I did read, none, whatsoever, had a solution, regardless of OS, IDE, compiler. 

As you are the "<debugger plugin maintainer>", and responded to this thread, I thought you felt accused of doing something wrong and came here to let you know it was not you that caused the problems I encountered, it was the developers of gdb. 

I do not claim to know why I am having the issues described above when trying to use gdb-7.x, but I have now found a solution to the problem, and came here to let others know what I have discovered.  I do believe that is the purpose of a forum like this.  To have a question asked and answered.  I asked a question, you and jens both responded which gave me avenues to try, for which I am thankful.  Ultimately, through the advice of both of you, I found a solution that was satisfactory to me and felt that it was necessary to let others know what I found and what I did to resolve the problem.  Maybe not all individuals are as anal retentive and OCD as myself and do not care.  For those who are, here you go, MY solution. 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #15 on: February 17, 2012, 05:23:24 pm »
After upgrading to CB7713, gdb-7.1:
I was no longer able to insert break points while the program was running.  The Debug window would display the message:
Quote
Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664
And here is the real reason for your problem. As I've said the warning is harmless.
The problem is that child pid detection has failed and your gdb doesn't interrupt the debuggee, when it receives SIGINT signal.

And I'm repeating myself!

Can you try to use the native gcc (4.1.2)?

p.s. I'm running gdb-7.4 and there are no problems with it.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #16 on: February 17, 2012, 05:32:19 pm »
Quote
Can you try to use the native gcc (4.1.2)?
I am now really confused.  I am talking about my problems with the gdb-7.x debugger.  Why are you asking me to use gcc-4.1.2?
What does the compiler version have to do with the debugger version?

Also, the problems I encountered went away when I downgraded back to gdb-6.8. I am not the only person who has encountered the console window connection problem.
Code
https://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=warning:+GDB%3A+Failed+to+set+controlling+terminal%3A+Operation+not+permitted&pbx=1&oq=warning:+GDB%3A+Failed+to+set+controlling+terminal%3A+Operation+not+permitted&aq=f&aqi=g2g-v1g-j1&aql=&gs_sm=12&gs_upl=495l495l0l2912l1l1l0l0l0l0l118l118l0.1l1l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=ae73f10212a66505&biw=1218&bih=829

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #17 on: February 17, 2012, 05:34:52 pm »
OK, I quit :)

Edit: To prove that I'm right please paste the line
Code
Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664
When using gdb 6.8, you'll see that the 0 in the middle is not zero.
« Last Edit: February 17, 2012, 05:38:50 pm by oBFusCATed »
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #18 on: February 17, 2012, 05:44:13 pm »
Obfuscated,

I appreciate you taking the time to try to help.  I am not trying to be an ass, nor am I stupid.  From my point of view, what you are telling me is not making any sense.  I responded as I did above because I believed you misunderstood my situation.  Just saying "Do this." without saying why does not make any sense and is not normally like you.  I have dealt with you here in the past and in #codeblocks in chat.  Normally you give an explanation as to why something is happening, and why your suggestion can/will work.  Here, it seems that you have not made yourself clear, from my perspective, so I ask you to explain.  

Quote
Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664
has no meaning, except that it seems to be causing me to not be able to do what I was able to do before the upgrade.  

Quote
The problem is that child pid detection has failed and your gdb doesn't interrupt the debuggee, when it receives SIGINT signal.
Why is child pid detection failing with gdb-7.x and not gdb-6.8?
Why will changing the compiler fix everything?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #19 on: February 17, 2012, 06:03:00 pm »
About the compiler: Because you're using some self compiled compiler or compiler compiled by someone else. And I wanted to remove one uncertainty.

About the message:
It has great meaning if you know how to read it :)
It is a debug message, telling you/me what C::B is doing. In this case it is telling to which process C::B is sending SIGINT. SIGINT is the same as Ctrl+C in terminal.
And in order to insert a new breakpoint, C::B has to stop the execution of the debuggee and then it can insert breakpoints then it will resume it.
Unfortunately this is not very reliable, because there are many different ways to do it, depending on the version of gdb and os.

Newer gdb's are supposed to interrupt the process, when they receive the SIGINT, older ones work only when the debuggee receives the SIGINT signal.
Unfortunately for some programs newer gdbs don't print the pid information during startup and we don't know the debuggee's PID, thus C::B falls back to sending signal directly to GDB.

And for some unknown reason, you newer gdb's fail to interrupt the debuggee, when they receive the SIGINT.
I guess you can try to ask the gdb devs in #gdb.

Do you have SELinux enabled? If you have, can you try without it?

p.s. please post the line from gdb-6.8!
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #20 on: February 17, 2012, 06:47:26 pm »
About the compiler: Because you're using some self compiled compiler or compiler compiled by someone else. And I wanted to remove one uncertainty.
I am using the rpm of gcc-4.4.

Quote
About the message:
It has great meaning if you know how to read it :)
It is a debug message, telling you/me what C::B is doing. In this case it is telling to which process C::B is sending SIGINT. SIGINT is the same as Ctrl+C in terminal.
And in order to insert a new breakpoint, C::B has to stop the execution of the debuggee and then it can insert breakpoints then it will resume it.
Unfortunately this is not very reliable, because there are many different ways to do it, depending on the version of gdb and os.

Newer gdb's are supposed to interrupt the process, when they receive the SIGINT, older ones work only when the debuggee receives the SIGINT signal.
Unfortunately for some programs newer gdbs don't print the pid information during startup and we don't know the debuggee's PID, thus C::B falls back to sending signal directly to GDB.

And for some unknown reason, you newer gdb's fail to interrupt the debuggee, when they receive the SIGINT.
I guess you can try to ask the gdb devs in #gdb.

So given this line:
Code
Code::Blocks is trying to interrupt process with pid: 21664; child pid: 0 gdb pid: 21664
CB is sending a SIGINT to gdb(pid 21664) to interrupt child(pid 0)[that does not exist] and is failing?

Why then would your gdb-7.4/7.3/7.1 work and mine does not?  I really cannot expect you to answer this question, but if you know it would help.

Quote
Do you have SELinux enabled? If you have, can you try without it?
No clue.

Quote
p.s. please post the line from gdb-6.8!
Assuming you want the gdb start-up message when running gdb-6.8, here it is:
in Debugger tab
Code
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /scratch/mccarty/Dem3D/Dem3dPre/
Adding source dir: /
Adding file: bin/Debug/Dem3dPreDebug-2012-02-17
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.8
Child process PID: 29653

As an added measure, here is what is displayed in Debugger tab when using gdb-7.4 for me.
Code
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /scratch/mccarty/Dem3D/Dem3dPre/
Adding source dir: /
Adding file: bin/Debug/Dem3dPreDebug-2012-02-17
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.4

In Debugger[debug] tab
Code
LD_LIBRARY_PATH=.:/usr/lib:/scratch/mccarty/boost_1_35_0/libs:/opt/intel/Compiler/11.0/081/lib/intel64:/opt/intel/Compiler/11.0/081/mkl/lib/em64t:.:/philo/filesystems/maxwell/release/passage_flow/bin/LINUX/mpi/lib:/usr/lib:/usr/bin:/usr/lib/pkgconfig:/lib:/usr/local/lib/wx:/usr/local/lib:/scratch/mccarty/boost/build/lib:/usr/local/cuda/lib64
Command-line: /scratch/mccarty/gdb-6.8/build/bin/gdb -nx -fullname  -quiet -args ../debug/demppDbg
Working dir : /scratch/mccarty/dempp/trunk/
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> source /scratch/mccarty/codeblocksSVN/trunk/build/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> set backtrace limit 0

>>>>>>cb_gdb:>>>>>>cb_gdb:
> cd ../debug
>>>>>>cb_gdb:
> directory /scratch/mccarty/dempp/trunk/
>>>>>>cb_gdb:
> directory /
>>>>>>cb_gdb:
> run

And here is what is displayed in Debugger(debug) tab using gdb-7.4
Code
LD_LIBRARY_PATH=.:/opt/intel/Compiler/11.0/081/lib/intel64:/opt/intel/Compiler/11.0/081/mkl/lib/em64t:.:/philo/filesystems/maxwell/release/passage_flow/bin/LINUX/mpi/lib:/usr/lib:/usr/bin:/usr/lib/pkgconfig:/lib:/usr/local/lib/wx:/usr/local/lib:/scratch/mccarty/boost/build/lib:/usr/local/cuda/lib64
Command-line: /scratch/mccarty/gdb-7.4/build/bin/gdb -nx -fullname  -quiet -args bin/Debug/Dem3dPreDebug-2012-02-17
Working dir : /scratch/mccarty/Dem3D/Dem3dPre/
> set prompt >>>>>>cb_gdb:
Reading symbols from /scratch/mccarty/Dem3D/Dem3dPre/bin/Debug/Dem3dPreDebug-2012-02-17...
done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> source /scratch/mccarty/codeblocksSVN/trunk/build/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> set backtrace limit 0

>>>>>>cb_gdb:>>>>>>cb_gdb:
> directory /scratch/mccarty/Dem3D/Dem3dPre/
>>>>>>cb_gdb:
> directory /
>>>>>>cb_gdb:
> break "/scratch/mccarty/Dem3D/Dem3dPre/code/objects/model/PreprocessorModelClass.cpp:253"
Breakpoint 1 at 0x46c4a5: file /scratch/mccarty/Dem3D/Dem3dPre/code/objects/model/PreprocessorModelClass.cpp, line 253.
>>>>>>cb_gdb:
> run
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #21 on: February 17, 2012, 06:54:48 pm »
OK, your logs are not complete, but yes I'm correct at thinking that child pid detection fails with gdb 7+ and is working correctly with gdb 6.8.

About the sigint problem, only gdb devs can tell you.
(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 mmccarty12

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problems discovered in branches/wxpropgrid_debugger SVN7712
« Reply #22 on: February 17, 2012, 06:59:06 pm »
OK, your logs are not complete

What is missing?