Community
Participate
Working Groups
Hi Guru's out there, I'm tryin to debug a C++ Source via the "attach to running process" feature of Eclipse and get some obscure behavior. My environmemt: AIX 5.2, Eclipse 3.0, CDT 2.02, GDB 6.2, IBM xlc Compiler, gcc compiler 3.3.3 Here's what I do: I compile my source with xlC with -g option (symbole table). I start the process and set a breakpoint in the main function. I connect the process via the eclipse wizard. The process is attached, the only options in the debug view are stop and resume. I press the resume button and the process stops right at my breakpoint. For far so good .... . When I then press stepin or stepout the debug cursor vanishs into nirvana instead of going to the next line. That is the problem ????? I tried several things: 1. I compiled with "gcc -g" to make sure that it is not a compiler issue. Got almost the same behavoir there (except that the debug view tells me something about an I/O Error after vanishing ... might his also be a hint for xlc?) 2. I started the process in Eclipse an via the shell: Makes no difference. Maybe the problem has something to do with a simple compiler setting that I dunno ? Many thanX in advance, Mario
I tried a couple of things more that brought me to the point that it might be no eclipse bug, but a gdb one. when I try the scenraio with the raw gdb client it tells me something of an I/O error (same as gcc !): Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-ibm-aix5.1.0.0". (gdb) attach 38562 Attaching to process 38562 [Switching to Thread 1] 0xd01ed948 in read () from /usr/lib/libc.a(shr.o) (gdb) b main Breakpoint 1 at 0x10001edc: file Test.cpp, line 14. (gdb) n Single stepping until exit from function read, which has no line number information. ptrace: I/O error. 0xd01ed948 in read () from /usr/lib/libc.a(shr.o) (gdb) quit Any idea what causes the I/O Error ??????????? second thanXXX, Mario
I don't have a PowerPC box, so I can't try it. But it would be helpful if you can get the gdb command trace. For instructions see the CDT Debugger FAQ #5. Thanks.
Hi Mikhail, where is the debug output written to ? stdout/stderr just displays: Install location: file:/usr/local/eclipse/ Configuration file: file:/usr/local/eclipse/configuration/config.ini loaded Configuration location: file:/home/p018256/.eclipse/org.eclipse.platform_3.0.0/configuration/ Configuration file: file:/home/p018256/.eclipse/org.eclipse.platform_3.0.0/configuration/config.ini loaded Shared configuration location: file:/usr/local/eclipse/configuration/ Framework located: file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/ Loading framework classpath from: file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/eclipse.properties Framework classpath: file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/core.jar file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/console.jar file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/osgi.jar file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/resolver.jar file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/defaultAdaptor.jar file:/usr/local/eclipse/plugins/org.eclipse.osgi_3.0.0/eclipseAdaptor.jar Splash location: /usr/local/eclipse/plugins/org.eclipse.platform_3.0.0/splash.bmp Debug options: file:/cvs_develop/local/p018256/.debug_options loaded Time to load bundles: 15 Starting application: 841 I've tried the whole thing on my local windows 2K machine and it works fine with exactly the same configuration (eclipse 3.0, CDT 2.02 and gdb 6.2.0.0), as well as other gdb Versions (5.2.1, 6.0). Fortunatly I've also access to another AIX Machine, but this one runs into the very same problem :-(. I haven't tried Solaris 8 yet, but I think it's plattform dependend only on AIX. Greets, Mario
>Debug options: > file:/cvs_develop/local/p018256/.debug_options loaded This part of your output shows that Eclipse is trying to load the options file. Unfortunately, the error reporting in this case is not good. If file doesn't exist or there are errors in the content you don't get informed. Check if the path is correct or you put the right content in the file. I suspect that the gdb/mi output is different for AIX.
Instead of attaching try just running the program # gdb app (gdb) b main (gdb) run ... And see why gdb fails.
path and content of the debug settings are OK. One thing that I accidently did not mentioned before: If I run the process directly in the gdb (as in your example), it all works fine !
today I also tries to compile my own binary of the 6.3 Version of gdb. Problem still resists with that one too!
Doug do you have someone with AIX to check this, we do not have this env. here.
Unfortunately, I don't have the gnu tools installed on our AIX machine. This may take a while to get set up.
Solaris 8 works fine too with seveal Versions of the gdb. So it is definitly an AIX related issue. I just can't find any gdb settings that makes gdb more speech :-( . Another solution of the problem would be an eclipse Plugin for dbx (since raw dbx works fine too). But as far as I know there's currently none. Greets, Mario
> Another solution of the problem would be an eclipse Plugin for dbx (since raw > dbx works fine too). But as far as I know there's currently none. Same problem 8-( ... I do not have dbx available in my env. At least it does not come for free.
dbx was just another thought ... no real option. Maybe the I/O error is caused be an general AIX problem (e.g. closed socket) that is by fixed by a patch. I'll attach my system configuration to this case, maybe it's a help for Doug.
Created attachment 16073 [details] lslpp output This is the output of my config from the lslpp command
Created attachment 16074 [details] instfix -i second system environment output