// Retrieves the current source location (file, line). // The current location is initially determined by the location // where execution was interrupted to hand control back to // the debugger client and can thereafter be modified by list // commands and by switching the the stack frame. // // The lineFocus and and charFocus parameters // are non zero only when the source location comes from a breakpoint. // They can be used to highlight the location of the current breakpoint // in the edit window of an attached IDE, for example. // // If m_line1 and m_line2 are currently 0 (because they have not been specified // as parameters to the list command), they are updated to point to a block of // code one line beyond the current line maintained by the client. // This has the effect that a succession of list commands that specify no // parameters will scroll sequentially through the source code in blocks // of DebuggerClient::CodeBlockSize. void CmdList::getListLocation(DebuggerClient &client, int &lineFocus0, int &charFocus0, int &lineFocus1, int &charFocus1) { int currentLine = 0; client.getListLocation(m_file, currentLine, lineFocus0, charFocus0, lineFocus1, charFocus1); if (m_line1 == 0 && m_line2 == 0) { m_line1 = currentLine + 1; m_line2 = m_line1 + DebuggerClient::CodeBlockSize; } }