Bug 78595 - trouble while debug via process attach
Summary: trouble while debug via process attach
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 2.0.2   Edit
Hardware: Power PC AIX Motif
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-15 04:28 EST by Mario Horny CLA
Modified: 2020-09-04 15:17 EDT (History)
1 user (show)

See Also:


Attachments
lslpp output (77.47 KB, text/plain)
2004-11-23 11:07 EST, Mario Horny CLA
no flags Details
instfix -i (205.71 KB, text/plain)
2004-11-23 11:08 EST, Mario Horny CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Horny CLA 2004-11-15 04:28:51 EST
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
Comment 1 Mario Horny CLA 2004-11-15 07:43:48 EST
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
Comment 2 Nobody - feel free to take it CLA 2004-11-17 18:20:40 EST
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.
Comment 3 Mario Horny CLA 2004-11-18 04:00:33 EST
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
Comment 4 Nobody - feel free to take it CLA 2004-11-18 11:27:15 EST
>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. 
Comment 5 Alain Magloire CLA 2004-11-18 15:10:25 EST
Instead of attaching try just running the program

# gdb app
(gdb) b main
(gdb) run

...

And see why gdb fails.
Comment 6 Mario Horny CLA 2004-11-19 03:30:56 EST
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 !
Comment 7 Mario Horny CLA 2004-11-22 04:31:24 EST
today I also tries to compile my own binary of the 6.3 Version of gdb. Problem 
still resists with that one too!
Comment 8 Alain Magloire CLA 2004-11-22 16:39:41 EST
Doug do you have someone with AIX to check this, we do not have
this env. here.
Comment 9 Doug Schaefer CLA 2004-11-22 16:42:01 EST
Unfortunately, I don't have the gnu tools installed on our AIX machine. This may
take a while to get set up.
Comment 10 Mario Horny CLA 2004-11-23 06:09:55 EST
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
Comment 11 Alain Magloire CLA 2004-11-23 10:34:07 EST
> 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.

Comment 12 Mario Horny CLA 2004-11-23 10:41:32 EST
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.
Comment 13 Mario Horny CLA 2004-11-23 11:07:10 EST
Created attachment 16073 [details]
lslpp output

This is the output of my config from the lslpp command
Comment 14 Mario Horny CLA 2004-11-23 11:08:43 EST
Created attachment 16074 [details]
instfix -i

second system environment output