This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83130 - "Locals View" window for "native" debugging.
Summary: "Locals View" window for "native" debugging.
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: Sun All
: P1 blocker (vote)
Assignee: Nikolay Molchanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-22 01:46 UTC by Nikolay Molchanov
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Molchanov 2006-08-22 01:46:40 UTC
This is IZ for a new feature: "Locals View" window for "native" debugging.
The implementation should be similar (from user's point of view) to the 
standard Netbeans "Locals View" window, which is used in java debugging.

I set high priority P1 because we need this feature in milestone 3.
Comment 1 Nikolay Molchanov 2006-09-08 17:48:01 UTC
GdbProxy API is implemented. The next step is to connect "Locals" view 
with this API.

Tag: cnd-nb50-dev
User: NikMolchanov
Date: 2006/08/21 17:52:51

Modified:
   cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbProxy.java

Log:
 IZ 83130 "Locals View" window for "native" debugging.
 - Added new methodr stack_list_locals() to get local variables
   public String stack_list_locals(String printValues)
Comment 2 Nikolay Molchanov 2006-09-15 18:11:07 UTC
First part of this feature is implemented. The changes are integrated 
in "release55" branch. All commits are marked with IZ number.

Here is a brief description of current state:
---------------------------------------------
1. Primitive variables are supported: their names, types and values are
shown in "Locals" view. Function "edit value" do not really change the
value, but it shows how this will be done.

2. Arrays are partially supported: their names are shown (with wrong icon), 
but their values are not displayed yet.

3. Structures, classes and other complicated types are partially supported: 
they are shown (with wrong icon), but their fields are not visible.

It would be great to get a feedback from QA about primitive variables support.
If there are any performance problems, I need to know ASAP.
Comment 3 Nikolay Molchanov 2006-09-23 04:14:12 UTC
Support for arrays and structures is implemented. The changes are integrated 
in "release55" branch. All commits are marked with IZ number.

Here is a brief description of current state:
---------------------------------------------
1. Primitive variables are supported: their names, types and values are
shown in "Locals" view. Function "edit value" do not really change the
value, but it shows how this will be done.

2. Arrays are supported: their names, types and values are shown in "Locals" 
view. Function "edit value" do not really change the value, but it shows how 
this will be done.

3. Structures, classes and other complicated types are supported: their names, 
types and values are shown in "Locals" view, but their fields are shown 
without type, because gdb does not report types of fields.

It would be great to get a feedback from QA about functionality and performance.

I marked this issue FIXED. Of there are are critical bugs, they can be filed
as separate issues, or this issue can be reopen. 
Comment 4 alexandrov 2006-09-26 16:09:15 UTC
Nik, there are some reasons to reopen this issue.
1. You say about support of primitive types. But what about function arguments.
Should they be shown in local variables view? Now they does not. 
2. Open the Quote project, set line breakpoint at 47-th line of quote.cc. Run
Debugger, open local variables view.  I do not see any local variables(index,
type, discount and so on...) here becides MyDisk variable... Step over through
this source, no new variables will appear in local variables view...
3. Open IO project. Set breakpoint before scanf call. Debug. See the "line"
variable value in local variables view before scanf and after scanf. It does not
change...

So I think the "Locals View" should receive your extra attention.   
Comment 5 Nikolay Molchanov 2006-09-26 20:17:32 UTC
We discussed this issue today, and decided to mark it FIXED, but open separate
issues for the defects and rfes. Here is an evaluation of mentioned problems:

 1. ... But what about function arguments.
    Should they be shown in local variables view? Now they does not. 

Function arguments are not local variables, so they are not shown in
"Locals" view. I agree that there should be a way to see their values.
For now our plan is to show them using "Baloon Evaluation" feature,
which is planned to be implemented in Milestone 4. If there is a good
reason to show them in "Locals" view (e.g. our competitors do so), 
please file RFE for this issue.

 2. Open the Quote project, set line breakpoint at 47-th line of quote.cc. 
    Run Debugger, open local variables view. I do not see any local variables 
    (index, type, discount and so on...) here becides MyDisk variable... 
    Step over through this source, no new variables will appear in local 
    variables view...

Unfortunately I cannot reproduce this problem. I stopped at line 47, which is
in file quote.cc, function main():

47   cout<<"Support metric quote program"<<endl<<endl;

I see all local variables: inputdata, customerName, type, units, metric, ...
Some of them do not show the value, but this is the same problem as mentioned
below: if type is char[], the value is missed.

 3. Open IO project. Set breakpoint before scanf call. Debug. See the "line"
    variable value in local variables view before scanf and after scanf. 
    It does not change...

Good catch! This is a bug: if type is char[], the value is missed.
It is a special case, which is different than any other array.
I made additional fix to solve this problem.
Please file a separate P2 DEFECT if such problem still exists in some cases.

Comment 6 Alexander Pepin 2007-09-18 14:59:42 UTC
Verified in nightly build 20070915