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?
- Ideally this shall be executed asynchronously to the UI, is
there a mean to achieve it?
On success, I would like a also to fire an event about the
change done in the program counter so that the debug view and
the source code refresh themself with the proper new PC, line
of code and stack frame. is there any guidance/examples for
achieving it?
can you please support me here?
Kind Regards
Zied Guermazi