Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
答复:Re: [cdt-dev] [DSF] Variables view issue in remote debugging

Hi Piech:
Thanks! and It does help a lot!. We've tried and found the problem.

It is the SSH issue: SSH sometimes delivers back broken GDB output. in our case, it looks like:

       Correct
        1216-var-evaluate-_expression_ var11
        1216^done,lang="C",exp="MsgTenPtr"
1217-var-evaluate-_expression_ var11
        1217^done,lang="C",exp="MsgBufPtr"
       SSH:

1216-var-info-ene,lang="C",exp="MsgN"

or another place:
354^doar-info-_expression_ var19.AbortN

1. Variable does have incomplete requests inside (with italics title
        2. It's rare that tracing can not be turned on for debugging. it hangs on the GDBProcess, start Monitor Step.

 It is not the issue with CDT-DSF,  and we are trying to add some code to handle this failure. Does CDT team have any plan for the SSH support?

Regards
邢云


在2010-04-09 13:34:47,"Pawel Piech" <pawel.piech@xxxxxxxxxxxxx> 写道:
Hi 邢云,
>From your description it seems that some of the updates in the variables view never complete.  You can confirm this by looking at the title of the variables view, if it's in italics, that means that the view is "busy" and is waiting for updates to complete. 

If this is the case, then I'm afraid you'll need to do some tedious debugging to figure out where the options are being dropped.  A couple of places to start:

1) Launch the IDE with tracing turned on in the org.eclipse.cdt.dsf plugin, with the following two options:
org.eclipse.cdt.dsf/debug=true
org.eclipse.cdt.dsf/debug/executor=true
This will cause any request monitors that were not submitted to be printed to std out.  If some requrests monitors are being leaked they'll show up there.  Unfortunately there's a lot of false positives there because the SimpleDisplayExecutor does not mark rm's are submitted.

Another place to look is to debug into the TreeModelContnentProvider for the variables views.  If you look at the requests in progress, you can figure out exactly which updates never returned.

Hope this helps,
Pawel

邢云 wrote:
Hi   guys:
 
                we have problems with Variables View during development:
 
We are doing:
           Our company has a customized version of GDB, which is aimed for debugging DBS systems. We Java developers take the responsibility of providing a GUI tool on Eclipse CDT platform.
 
We are working on:
          Eclipse 3.5.2,  latest CDT-DSF. we build our debugger on DSF other than CDI
 
We have achived:
          Our product has 2 ways of collaborating with GDB (of course our company's), both have Live debugging and Post-mortem debugging
                     1. Local debugging: The product is deployed on the same machine with DBS. It establishes connection with GDB exactly the same as the standard one (Process p = .....)
                     2. Remote debugging: The product is able to connect to DBS on a remote machine. It establishes connection with GDB via SSH (SSHProcess......)
 
We are at:
           1. Local debugging is fine. Debug views such as Variables View, Registers View, Memory, instruction pointer....etc
           2. Every component except Variables View goes well with Remote Debugging
 
The Issue:
          1. Our variables have extreme complicated data structure. You have to expand, expand, expand.... and then to see the final leaf of the variables tree.
          2. Variable doesn't respond for any operation
          3. GDB doesn't crash, other views goes well.
          4. When we click on Refresh button, the VariablesVMProvider.refresh() gets invoked. we inspected the xxxservice values, no null value. But VariableVMNode doesn't get notified
          5. Close and re-open Varialbes View, no effect
          6. We adjusted the LRU cache size and RxCommandQueue size ,no effect
 
Our modifications on MIVariablesManager
         1. Our GDB doesn't support command: -var-info-path-_expression_, we have no choice but to use:-var-info-_expression_ instead.
         2. The full path of the variable is constructed in such way:

                            

                    private String buildChildExpression(String parentExp, String childExp) {

                                   

                                                return parentExp + "." + childExp;            // "childExp" is retrived from "-var-info-_expression_")

                                                                                                                              // parentExp is the path of parent variable

                    }

               we neglected the original code:

                                                         if (isPointer()) {

                                                                 return "*("+parentExp+")"; //$NON-NLS-1$//$NON-NLS-2$

                                                         }

 

Our observations:

     1. TxThread writes all commands that are put into command queue

      2. All the created commands are put into command queque

      3. In remote debugging. Obeviously Variables View "dies" before sending as many commands as Local debugging does.

Above is the issue which has been bothering us for quite a long time. Finally we turn to CDT team for help, any advice is welcomed and thanked.

 

Regards

Xing  Yun




_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top