Bug 109733 - Request to make certain methods as public
Summary: Request to make certain methods as public
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-09-16 09:16 EDT by Balasubramaniyan K CLA
Modified: 2008-06-19 13:26 EDT (History)
2 users (show)

See Also:


Attachments
Patch for my request (2.17 KB, patch)
2005-09-16 09:20 EDT, Balasubramaniyan K CLA
no flags Details | Diff
Valid Patch (3.08 KB, text/plain)
2005-09-22 08:05 EDT, Balasubramaniyan K CLA
no flags Details
Patch is created after checking out CDT_3_0_1_RC1 version from cvs , and overwriting few files . (4.01 KB, patch)
2006-05-17 06:43 EDT, Ruchi Arora CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balasubramaniyan K CLA 2005-09-16 09:16:24 EDT
Dear Team,
Comment 1 Balasubramaniyan K CLA 2005-09-16 09:18:40 EDT
Dear Team,

   I request you to make the following changes :
     (a) Constructor as public in MIInferior.java
     (b) To add a setter for MIInferior in the file MISession.java
     (c) To handle the NPE condition for line & parser in the setPrompt method 
of RxThread.java
Comment 2 Balasubramaniyan K CLA 2005-09-16 09:20:52 EDT
Created attachment 27210 [details]
Patch for my request

I have created a patch for the above request. The patch was created for CDT_3_0
version.

Kindly accept the patch
Comment 3 Balasubramaniyan K CLA 2005-09-16 12:54:05 EDT
Comment on attachment 27210 [details]
Patch for my request

This patch is invalid. We will re-submit the patch ASAP.
Comment 4 Balasubramaniyan K CLA 2005-09-22 08:05:24 EDT
Created attachment 27384 [details]
Valid Patch

I am submitting a valid patch now. Kindly accept the patch.
Comment 5 Ruchi Arora CLA 2006-05-17 06:43:43 EDT
Created attachment 41710 [details]
Patch is created after checking out  CDT_3_0_1_RC1 version from cvs , and overwriting few files .

Please find the attached patch,I have checked out CDT_3_0_1_RC1 version from cvs , overwritten few files and created the patch.
The changed file names and changes made are::


File Name                 Changes Made

CValue.java               Fix of Bug#: 108653 
                          Register displays "." instead of "0"



MIInferior.java           Made the constructor public


MISession.java            Setter method for MIInferior instance

RxThread.java             Null check in setPrompt method


ModulesView.java         Fixed Bug " Eclipse crashes while expanding the tree 
                          in Modules View "

CWordFinder.java          Fixed Bug "Balloon evaluation does not 
                          seem to work correctly for struct.field, 
                          if you point at field, you get an error,
                           So changed findWord() method"

BinaryParserBlock.java   Changed the access specifier of variables             	                 configMap and initialSelected to protected
Comment 6 Nobody - feel free to take it CLA 2006-05-17 18:12:58 EDT
I'll create the separate entries for each problem to decide on it one by one.
Comment 7 Nobody - feel free to take it CLA 2006-05-18 15:54:34 EDT
The modules view problem has been fixed for 3.0.1. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113114.
Comment 8 Nobody - feel free to take it CLA 2006-05-18 16:15:53 EDT
Changing the access modifiers from private to public or protected means that we take a responsibility to keep these methods and fields unchanged in the future. It would limit our ability to modify the code. That's the main reason why we are so reluctant when it comes to make the implementation details public.
Please, provide a justification for each case. Maybe we'll find a better solution if we know why do you need access to these objects. 
And please submit an individual entry for each unrelated problem.
Comment 9 Nobody - feel free to take it CLA 2006-05-18 16:47:28 EDT
Regarding "Balloon evaluation does not seem to work correctly for struct.field, if you point at field, you get an error, So changed findWord() method" see my comment in https://bugs.eclipse.org/bugs/show_bug.cgi?id=40101.
Comment 10 Nobody - feel free to take it CLA 2006-05-18 16:57:12 EDT
"Null check in setPrompt method": Can you please describe the case when either "line" or "parser" variables can be null? 
Comment 11 Balasubramaniyan K CLA 2006-05-23 05:45:13 EDT
I have closed the BUG 113114 & hence reject the Modules View patch

Thanks,
Bala 
Comment 12 Balasubramaniyan K CLA 2006-05-23 05:46:30 EDT
Balloon evaluation patch seems to be wrong. Is there a way to fix this ? Are you planning to fix this bug. 

- Bala 
Comment 13 Balasubramaniyan K CLA 2006-05-23 05:49:33 EDT
>>"Null check in setPrompt method": Can you please describe the case when either
>>"line" or "parser" variables can be null? 

I think this is very specific to HP GDB. The first time when we make a GDB command request, the line / parser is null. Hence, we did this null check. This might be a defensive check in case of other GDB but for HP GDB, this looks to be a mandatory step. What's your opinion on this ?

- Bala 
Comment 14 Balasubramaniyan K CLA 2006-05-23 06:10:50 EDT
We wanted to update the interrupt() of MIInferior so that the remote processes started by RemoteGDBDebugger can be killed on an interrupt signal. To do this, we need to extend the MIInferior as RemoteMIInferior. However, MIInferior construct was not public / protected & so we need to change the access modifier. 

On similar lines, we wanted to extend MISession as RemoteMISession and set the inferior as RemoteMIInferior. The setter method was not available in MISession, though the getter method was available. Hence, we have added a setter method. 
Comment 15 Nobody - feel free to take it CLA 2006-05-25 13:47:57 EDT
(In reply to comment #12)
> Balloon evaluation patch seems to be wrong. Is there a way to fix this ? Are
> you planning to fix this bug. 
> - Bala

We simply don't have tools to verify which expresion in [] is eligible to evaluate and which is not. It could be something like a[foo()], where foo is a function, evaluation of which will change the state of the program being debugged.
Comment 16 Nobody - feel free to take it CLA 2006-05-25 14:26:20 EDT
(In reply to comment #13)
> I think this is very specific to HP GDB. The first time when we make a GDB
> command request, the line / parser is null. Hence, we did this null check. This
> might be a defensive check in case of other GDB but for HP GDB, this looks to
> be a mandatory step. What's your opinion on this ?
> - Bala 

The situation when the value "line" or "parser" is null is not supposed to happen in our implementation. I thought it might be a bug somewhere in our code.
If it's a HP specific issue, I have no problem. Fixed.
Comment 17 Nobody - feel free to take it CLA 2006-05-25 16:17:27 EDT
(In reply to comment #14)
> We wanted to update the interrupt() of MIInferior so that the remote processes
> started by RemoteGDBDebugger can be killed on an interrupt signal. To do this,
> we need to extend the MIInferior as RemoteMIInferior. However, MIInferior
> construct was not public / protected & so we need to change the access
> modifier. 
> On similar lines, we wanted to extend MISession as RemoteMISession and set the
> inferior as RemoteMIInferior. The setter method was not available in MISession,
> though the getter method was available. Hence, we have added a setter method. 

OK, I have submitted the patch, though there is probably a better way to do it. Using factory methods, for example. Just don't have a time now and don't know your requirements for MIInferior.
Please, verfiy.
Comment 18 Balasubramaniyan K CLA 2006-05-26 00:25:01 EDT
Thanks Mikhail for your help in this regard. 
Bala