NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <debugviewer.hpp>
Public Member Functions | |
DebugViewer (wxWindow *parent, Options *_options, const wxString &title="NumeRe: Debugger") | |
Constructor. Creates the necessary controls of the debugger window. More... | |
void | updateSettings () |
This member function should be called after the user modified the application settings. It will propagate the necessary application settings into the debugger. More... | |
void | setTerminal (NumeReTerminal *term) |
void | setDebugInfo (const wxString &title, const std::vector< std::string > &vStack) |
This member function is used from the main window to update the debugger window with the information of the current debug event (aka the new stack). More... | |
void | OnClose (wxCloseEvent &event) |
This member function is called upon closing the debugger window: it won't be destroyed but hidden and the kernel will get a CONTINUE signal. More... | |
void | OnExecutionFinished () |
This member function will inform the debugger window that the execution of the current code has ben finished. More... | |
DECLARE_EVENT_TABLE () | |
Public Member Functions inherited from ViewerFrame | |
ViewerFrame (wxWindow *parent, const wxString &title) | |
void | OnKeyDown (wxKeyEvent &event) |
This event handler closes the frame, if the user presses ESC. More... | |
void | OnFocus (wxFocusEvent &event) |
This event handler passes the keyboard focus down to the first child in the window list, if the frame gets keyboard focus. More... | |
void | OnEnter (wxMouseEvent &event) |
This event handler get the keyboard focus, if the user enters with the mouse. More... | |
void | OnClose (wxCloseEvent &event) |
This event handler informs all child windows that this frame will now close. It furthermore automatically unregisters itself in the opened window list. More... | |
DECLARE_EVENT_TABLE () | |
Private Member Functions | |
void | initializeToolbar () |
This private member function creates the toolbar of the debugger window. More... | |
void | setExpression (const std::string &sLineNumber, const std::string &sExpression) |
This private member function updates the expression element in the debugger window and changes the colour of the characters correspondingly. More... | |
void | getInformationByStackId (size_t id) |
This private member function gets the debugger information from the selected stack ID. More... | |
void | OnStackItemActivate (wxListEvent &event) |
This member function is the event handler function for double-clicking on a stack item. More... | |
void | OnMenuEvent (wxCommandEvent &event) |
This member function is the event handler routine for the toolbar functions. More... | |
void | EnableDebugger (bool enable) |
This member function may enable or disable the debugger toolbar. More... | |
Private Attributes | |
VariableViewer * | m_varViewer |
wxTextCtrl * | m_expression |
wxTextCtrl * | m_lineNumber |
wxTextCtrl * | m_errorMessage |
wxListCtrl * | m_stacktrace |
NumeReTerminal * | m_terminal |
Options * | m_options |
bool | b_transferredControl |
int | nLineColumn |
int | nModuleColumn |
Definition at line 32 of file debugviewer.hpp.
DebugViewer::DebugViewer | ( | wxWindow * | parent, |
Options * | _options, | ||
const wxString & | title = "NumeRe: Debugger" |
||
) |
Constructor. Creates the necessary controls of the debugger window.
parent | wxWindow* |
_options | Options* |
title | const wxString& |
Definition at line 48 of file debugviewer.cpp.
References _guilang, and Language::get().
DebugViewer::DECLARE_EVENT_TABLE | ( | ) |
|
private |
This member function may enable or disable the debugger toolbar.
enable | bool |
Definition at line 397 of file debugviewer.cpp.
References ID_DEBUG_CANCEL, ID_DEBUG_CONTINUE, ID_DEBUG_LEAVE, ID_DEBUG_STEP, and ID_DEBUG_STEPOVER.
Referenced by OnExecutionFinished(), OnMenuEvent(), and setDebugInfo().
|
private |
This private member function gets the debugger information from the selected stack ID.
id | size_t |
Definition at line 245 of file debugviewer.cpp.
References NumeReTerminal::_kernel, NumeReDebugger::getArguments(), NumeReDebugger::getClusters(), NumeReKernel::getDebugger(), NumeReDebugger::getGlobals(), NumeReDebugger::getModuleInformations(), NumeReDebugger::getNumVars(), Options::GetShowGlobalVariables(), Options::GetShowProcedureArguments(), NumeReDebugger::getStringVars(), NumeReDebugger::getTables(), m_errorMessage, NumeReTerminal::m_kernelCS, m_options, m_stacktrace, m_terminal, m_varViewer, NumeReDebugger::select(), setExpression(), and VariableViewer::UpdateVariables().
Referenced by OnStackItemActivate(), and setDebugInfo().
|
private |
This private member function creates the toolbar of the debugger window.
Definition at line 143 of file debugviewer.cpp.
References _guilang, Language::get(), ID_DEBUG_CANCEL, ID_DEBUG_CONTINUE, ID_DEBUG_LEAVE, ID_DEBUG_STEP, and ID_DEBUG_STEPOVER.
void DebugViewer::OnClose | ( | wxCloseEvent & | event | ) |
This member function is called upon closing the debugger window: it won't be destroyed but hidden and the kernel will get a CONTINUE signal.
event | wxCloseEvent& |
Definition at line 511 of file debugviewer.cpp.
References b_transferredControl, NumeReTerminal::continueDebug(), and m_terminal.
void DebugViewer::OnExecutionFinished | ( | ) |
This member function will inform the debugger window that the execution of the current code has ben finished.
The debugger window will disable its toolbar and display a corresponding message in the status bar.
Definition at line 532 of file debugviewer.cpp.
References _guilang, EnableDebugger(), Language::get(), and m_errorMessage.
Referenced by NumeReWindow::Ready().
|
private |
This member function is the event handler routine for the toolbar functions.
event | wxCommandEvent& |
Definition at line 333 of file debugviewer.cpp.
References _guilang, b_transferredControl, NumeReTerminal::CancelCalculation(), NumeReTerminal::continueDebug(), EnableDebugger(), Language::get(), ID_DEBUG_CANCEL, ID_DEBUG_CONTINUE, ID_DEBUG_LEAVE, ID_DEBUG_STEP, ID_DEBUG_STEPOVER, NumeReTerminal::leaveDebug(), m_terminal, NumeReTerminal::stepDebug(), and NumeReTerminal::stepOverDebug().
|
private |
This member function is the event handler function for double-clicking on a stack item.
event | wxListEvent& |
Definition at line 230 of file debugviewer.cpp.
References getInformationByStackId(), and m_stacktrace.
void DebugViewer::setDebugInfo | ( | const wxString & | title, |
const std::vector< std::string > & | vStack | ||
) |
This member function is used from the main window to update the debugger window with the information of the current debug event (aka the new stack).
title | const wxString& |
vStack | const std::vector<std::string>& |
Definition at line 448 of file debugviewer.cpp.
References _guilang, SettingsValue::active(), b_transferredControl, EnableDebugger(), Language::get(), getInformationByStackId(), Settings::getSetting(), Options::GetShowLinesInStackTrace(), Options::GetShowModulesInStackTrace(), m_errorMessage, m_options, m_stacktrace, nLineColumn, nModuleColumn, and SETTING_B_FLASHTASKBAR.
Referenced by NumeReWindow::evaluateDebugInfo().
|
private |
This private member function updates the expression element in the debugger window and changes the colour of the characters correspondingly.
sLineNumber | const std::string& |
sExpression | const std::string& |
Definition at line 184 of file debugviewer.cpp.
References Options::COMMAND, SyntaxStyles::foreground, Options::FUNCTION, GenericTerminal::getSyntax(), Options::GetSyntaxStyle(), NumeReSyntax::highlightLine(), m_expression, m_lineNumber, m_options, m_terminal, Options::METHODS, Options::OPERATOR, Options::PROCEDURE, Options::STRING, NumeReSyntax::SYNTAX_COMMAND, NumeReSyntax::SYNTAX_FUNCTION, NumeReSyntax::SYNTAX_METHODS, NumeReSyntax::SYNTAX_NPRC_COMMAND, NumeReSyntax::SYNTAX_OPERATOR, NumeReSyntax::SYNTAX_PROCEDURE, and NumeReSyntax::SYNTAX_STRING.
Referenced by getInformationByStackId().
|
inline |
Definition at line 60 of file debugviewer.hpp.
References m_terminal.
Referenced by NumeReWindow::evaluateDebugInfo().
void DebugViewer::updateSettings | ( | ) |
This member function should be called after the user modified the application settings. It will propagate the necessary application settings into the debugger.
Definition at line 418 of file debugviewer.cpp.
References Options::GetShowLinesInStackTrace(), Options::GetShowModulesInStackTrace(), m_options, m_stacktrace, m_varViewer, nLineColumn, nModuleColumn, and VariableViewer::setDebuggerMode().
Referenced by NumeReWindow::EvaluateOptions().
|
private |
Definition at line 43 of file debugviewer.hpp.
Referenced by OnClose(), OnMenuEvent(), and setDebugInfo().
|
private |
Definition at line 38 of file debugviewer.hpp.
Referenced by getInformationByStackId(), OnExecutionFinished(), and setDebugInfo().
|
private |
Definition at line 36 of file debugviewer.hpp.
Referenced by setExpression().
|
private |
Definition at line 37 of file debugviewer.hpp.
Referenced by setExpression().
|
private |
Definition at line 41 of file debugviewer.hpp.
Referenced by getInformationByStackId(), setDebugInfo(), setExpression(), and updateSettings().
|
private |
Definition at line 39 of file debugviewer.hpp.
Referenced by getInformationByStackId(), OnStackItemActivate(), setDebugInfo(), and updateSettings().
|
private |
Definition at line 40 of file debugviewer.hpp.
Referenced by getInformationByStackId(), OnClose(), OnMenuEvent(), setExpression(), and setTerminal().
|
private |
Definition at line 35 of file debugviewer.hpp.
Referenced by getInformationByStackId(), and updateSettings().
|
private |
Definition at line 44 of file debugviewer.hpp.
Referenced by setDebugInfo(), and updateSettings().
|
private |
Definition at line 45 of file debugviewer.hpp.
Referenced by setDebugInfo(), and updateSettings().