Bug 69284 - [Help Wanted] problem in Debugging C/C++ projects with Eclipse 3.0 on HP/UX
Summary: [Help Wanted] problem in Debugging C/C++ projects with Eclipse 3.0 on HP/UX
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-cdi-gdb (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2004-07-05 07:56 EDT by Ragav CLA
Modified: 2017-10-23 13:41 EDT (History)
5 users (show)

See Also:


Attachments
log file (4.48 KB, text/plain)
2004-07-08 05:58 EDT, Ragav CLA
no flags Details
log file (4.48 KB, text/plain)
2004-07-08 07:22 EDT, Ragav CLA
no flags Details
HP-UX SOM Binary parser patch (921 bytes, patch)
2004-07-22 15:16 EDT, Victor Lenet CLA
no flags Details | Diff
GDB session output (23.47 KB, text/plain)
2004-07-22 15:20 EDT, Victor Lenet CLA
no flags Details
Attachment for comment 10 (13.38 KB, application/octet-stream)
2004-07-22 23:43 EDT, Balasubramaniyan K CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ragav CLA 2004-07-05 07:56:40 EDT
Hello open source world,

	I am using the Latest Eclipse build (Build Id:-200406301200) with 
compatible CDT plugins on Linux platform.
When I try debugging a C or C++ project, I am getting the following error.

"Launching (Error: Target request failed: Target is not responding(timed out).)

However, there was no such problem with the earlier releases.

I have the latest version of debugger. May I know what causes this problem.

Please help me to make it work.

Thanks in advance,
Ragav.
Comment 1 Kleo Hapitas CLA 2004-07-07 16:53:56 EDT
PR was not targeted to any particular release. Changing target milestone to 2.1
Comment 2 Ragav CLA 2004-07-08 05:58:20 EDT
Created attachment 13046 [details]
log file

Have attached the log file for more details.
Comment 3 Ragav CLA 2004-07-08 07:22:51 EDT
Created attachment 13050 [details]
log file

Have attached the log file for more details.
Comment 4 Alain Magloire CLA 2004-07-08 10:03:23 EDT
Please check your path to make sure you have
a version of gdb that is 5.2.1 or later versions.
You can verify by typing:
# gdb -i mi1

In the CDT FAQ web pages it describes a way to get
the output of gdb via trace logging, I would like
to see this.  So far, I do not have enough information
on what is a problem to be of good help.

Thanks
Comment 5 Alain Magloire CLA 2004-07-16 09:46:22 EDT
I've look at the the trace and it seems to work ok.

However, you seem to have the disassembly view on.
Turn this off for the test, i.e. do not use the disassembly view.
that will help us isolate the problem.  Do the normal next/next.

what is of surpise to me is this:

[1,089,778,307,755] 30-exec-continue
[1,089,778,307,770]  I AM FOO I AM BAR (gdb)=20
[1,089,778,307,771] 30^running
[1,089,778,307,771] (gdb)=20
[1,089,778,307,771] 30*stopped
[1,089,778,307,774] 31 info threads
[1,089,778,307,774] (gdb)=20
[1,089,778,307,775] &"info threads\n"
[1,089,778,307,775] &"No stack.\n"
[1,089,778,307,776] 31^error,msg=3D"No stack."
[1,089,778,307,776] 32 info threads
[1,089,778,307,777] (gdb)=20

After the print out, the program stop for unknown reason, just
"*stopped" for unknown reasons or it reach the end.

With the disassembly off is it working better ?

Comment 6 Alain Magloire CLA 2004-07-22 09:39:35 EDT
Vlad/Mathieu
  Do you have an HP machine to quickly run hello_world
type of program on the debugger ?
We do not have any HP machine here, so debugging this
is extremmely painfull.  If an hello_world type of program
does not work, could you send me the MI log trace ...

Note: you need gdb-5.2.1 or newer on HP

Thanks
Comment 7 Victor Lenet CLA 2004-07-22 15:16:39 EDT
Created attachment 13546 [details]
HP-UX SOM Binary parser patch

HP-UX SOM Binary parser patch
Comment 8 Victor Lenet CLA 2004-07-22 15:17:52 EDT
I was not able to make Debugging work in CDT 2.0 GA on HP-UX because there is  
only one Debugger available in the C/C++ Local configuration and that is GDB  
Server. When I was trying to debug the HelloWorld application with this  
debugger I was getting errors (same as Ragav, and some similar ones).  
  
Then I applied a quick fix to the new HP-UX SOM binary parser and got GDB  
Debugger as well, which worked just fine.  
  
Attached are the patch and the GDB trace output of successful debugging  
session. The patch is applicable to both HEAD and the branch.  
Comment 9 Victor Lenet CLA 2004-07-22 15:20:14 EDT
Created attachment 13547 [details]
GDB session output
Comment 10 Balasubramaniyan K CLA 2004-07-22 23:42:05 EDT
I have narrowed down the problem to MIPlugin.java Line No:166 (see the attached 
file). In this code, there are two blocks one if pty == null and other for pty !
=null.

 If pty !=null, then tty and pty.getSlaveName() is sent as parameters  and 
libpty.so comes into action. 

 If pty = null , then tty and pty.getSlaveName() is not available as parameters 
and libpty.so does not come into action. 

 When I encountered this "Target not responding" exception, I drilled down that 
this happens because of the two arguments tty and pty.getSlaveName() and then 
commented them out from the code. The debugger worked perflectly fine. Now I 
got confused , if the debugger works perfectly fine without these tty options 
then why should we have this code. I am sure I am missing something. Can you 
set me the right context?
 I perfectly understand that by setting the "tty", we redirect our gdb output 
to Eclipse console rather than the pseudo terminal or standart input/output. 
Well this problem occurs even in Eclipse 3.0 + CDT 2.0.




Comment 11 Balasubramaniyan K CLA 2004-07-22 23:43:22 EDT
Created attachment 13556 [details]
Attachment for comment 10
Comment 12 Alain Magloire CLA 2004-07-26 10:34:38 EDT
> if the debugger works perfectly fine without these tty options 
> then why should we have this code. I am sure I am missing something. Can you 
> set me the right context?

As you pointed out, the PTY support is to redirect the output
to the console(Eclipse) and also some applications __need__
a TTY stream to work/behave etc ...

Some platforms do not have PTY(See org.eclipse.cdt.core.win32)
and do not provide a libpty.so.  It looks like the pty handling
is not working for HP.  We could fix the code or remove
the pty.so completely.

Doug/vlad what do you think ?  Unfortunately we do not have 
HP machines here to commit to fix this code, somebody else will
have to step in.

Comment 13 Alain Magloire CLA 2004-07-26 10:37:51 EDT
> Attached are the patch and the GDB trace output of successful debugging  
> session. The patch is applicable to both HEAD and the branch.  

Thanks Vlad,
 another PR was created to track this down:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=70820

Comment 14 Alain Magloire CLA 2004-08-05 10:47:30 EDT
Is there any progress done with this PR.
Ragav, was saying that the PTY handling code is buggy,

We don't have HP here, so it will be up the folks having
HP boxes to provide a fix for this .
Comment 15 Doug Schaefer CLA 2004-08-05 11:31:44 EDT
I'm pretty sure HP has a lot of HP machines around :-). Guys, please feel free 
to send in patches to make the CDT work better on your platforms. We'll be 
happy to review them and apply them as necessary.
Comment 16 Victor Lenet CLA 2004-08-05 14:30:40 EDT
Just for the record, there is no HP version of libpty.so because there is no 
org.eclipse.cdt.core.hpux fragment. Therefore pty is always equal to null so 
tty and pty.getSlaveName() never make it to the argument list. I am not quite 
clear why it was necessary to remove them from the code.

Still I was able to debug an application (even without HP-UX binary parser) 
using GDB Debugger (not Server) launch configuration.
Comment 17 Alain Magloire CLA 2004-08-05 14:53:33 EDT
> Just for the record, there is no HP version of libpty.so because there is no 
> org.eclipse.cdt.core.hpux fragment. Therefore pty is always equal to null so 
> tty and pty.getSlaveName() never make it to the argument list. I am not quite 
> clear why it was necessary to remove them from the code.

Agreed.

> Still I was able to debug an application (even without HP-UX binary parser) 
> using GDB Debugger (not Server) launch configuration.

Allright cool!

Thanks vlad.
Comment 18 Alain Magloire CLA 2004-11-04 13:53:43 EST
No feedback for the reporter, unblocking and moving to future
Comment 19 Chris Recoskie CLA 2007-05-30 12:57:02 EDT
No one is currently looking at HP/UX support.
Comment 20 Jonah Graham CLA 2017-10-23 13:41:54 EDT
(this is part of a batch change)

The CDI debug implementation has been removed in CDT 9.0. Please see bug 484900 and the entry on the New and Noteworthy page https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications