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 80279

Summary: *Gdb-lite* Implement "Step Into" action
Product: cnd Reporter: Nikolay Molchanov <nikmolchanov>
Component: DebuggerAssignee: Nikolay Molchanov <nikmolchanov>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Nikolay Molchanov 2006-07-14 02:25:14 UTC
This is IZ for a new feature: "Step Into" action.
The implementation should be similar to jpda debugger.
If program is stopped, button "Step Into" should be enabled. 
If user pressed button "Step Into", the execution should be resumed, 
stopping when the beginning of the next source line is reached, if 
the next source line is not a function call. If it is, stop at the 
first instruction of the called function.
Comment 1 Nikolay Molchanov 2006-07-14 02:46:50 UTC
I upgraded priority to P1 because this feature should be implemented 
in Milestone 2B.
Comment 2 Nikolay Molchanov 2006-07-14 06:10:45 UTC
The suggested fix is to connect button "Step Into" via StepActionProvider
with method stepInto() in GdbDebuggerImpl.java, which calls method exec_step()
in GdbProxy.java, which sends "-exec-step" command to gdb. 
To implement this solution a new method is created:

File:
   cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbDebuggerImpl.java

/**
 * Resumes execution of the inferior program, stopping when the beginning of the
 * next source line is reached, if the next source line is not a function call.
 * If it is, stop at the first instruction of the called function.
 */
 public void stepInto() {
    setState(STATE_RUNNING);
    gdb.exec_step();
 }

The fix is integrated in "cnd-nb50-dev" branch.
-----------------------------------------------
Tag: cnd-nb50-dev
User: NikMolchanov
Date: 2006/07/13 18:53:13
Modified:
   cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbDebuggerImpl.java
Log:
 IZ 80279 *Gdb-lite* Implement "Step Into" action
 - added public method stepInto()
 IZ 80281*Gdb-lite* Implement "Step Over" action
 - added public method stepOver()
Revision: 1.1.2.16
------------------------------------------------
Tag: cnd-nb50-dev
User: NikMolchanov
Date: 2006/07/13 18:55:00
Modified: 
cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/actions/StepActionProvider.java
Log:
 IZ 80279 *Gdb-lite* Implement "Step Into" action
 - use public method debuggerImpl.stepInto()
 IZ 80281*Gdb-lite* Implement "Step Over" action
 - use public method debuggerImpl.stepOver()
Revision: 1.1.2.3
------------------------------------------------

For now button "Step Into" is always enabled while the debugging session 
is active. Additional changes are necessary to disable this button while
the program is running, and enable it back when the program is stopped.
Comment 3 _ gordonp 2006-09-07 16:05:18 UTC
Is this issue ready to be marked as fixed? If so, please change it.
Comment 4 Nikolay Molchanov 2006-09-08 15:16:06 UTC
The functionality is implemented and it seems to work just fine.
I changed the status to FIXED. If there are any problems feel free to reopen
this issue or file another one.