currently I am extending the cdt-dsf to implement the gdb
commands for handling instructions and functions call
histories, and parsing and getting their outputs.
I added two buttons and two basic views (see orange
indications in following picture). and I can successfully
display the instructions and functions calls histories when
the user clicks on the buttons in the menu bar.
now I would like to add actions so that when the user clicks
on a line in the function call history list, a command is
issued to gdb, get executed, and then the editor goes to the
related line in the source code (similar to what happens when
the user selects a stack frame in the debug view, or when the
program halts in a breakpoint)
I added a class: public class FunctionsCallHistoryView
extends AbstractDebugView implements IViewerUpdateListener,
IDebugContextListener, IModelChangedListener
and registered a DoubleClickListener, public void
doubleClick(DoubleClickEvent event) where I am identifying the
clicked line extracting the record number and calling
// execute record goto record command
GdbGoToRecordCommand cmd = new
GdbGoToRecordCommand(fFunctionsCallHistoryModel.getSession());
cmd.setRecordNumber(recordNumber);
cmd.execute(null); //how to prepare a
IDebugCommandRequest request ?
I have two issues with this implementation:
- how to prepare a IDebugCommandRequest request object?