languages/cpp/debugger/gdbcommand.cpp
Go to the documentation of this file.00001 /*************************************************************************** 00002 begin : Sun Aug 8 1999 00003 copyright : (C) 1999 by John Birch 00004 email : jbb@kdevelop.org 00005 ***************************************************************************/ 00006 00007 /*************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #include "gdbcommand.h" 00017 #include "breakpoint.h" 00018 #include "variablewidget.h" 00019 00020 namespace GDBDebugger 00021 { 00022 00023 /***************************************************************************/ 00024 00025 QCString GDBCommand::idlePrompt_ = QCString().sprintf("\nset prompt %c%c\n", BLOCK_START, IDLE); 00026 00027 /***************************************************************************/ 00028 00029 GDBCommand::GDBCommand(const QCString &setCommand, bool isRunCmd, bool isInfoCmd, char setPrompt) 00030 : DbgCommand(setCommand, isRunCmd, isInfoCmd, setPrompt) 00031 { 00032 if (prompt_) { 00033 cmdBuffer_ = QCString().sprintf("set prompt %c%c\n", BLOCK_START, prompt_) + 00034 command_ + 00035 idlePrompt_; 00036 } 00037 } 00038 00039 /***************************************************************************/ 00040 00041 GDBCommand::~GDBCommand() 00042 { 00043 } 00044 00045 /***************************************************************************/ 00046 /***************************************************************************/ 00047 /***************************************************************************/ 00048 00049 GDBItemCommand::GDBItemCommand( VarItem *item, 00050 const QCString &command, 00051 bool isRunCmd, 00052 char prompt) 00053 : GDBCommand(command, isRunCmd, true, prompt), 00054 item_(item) 00055 { 00056 } 00057 00058 /***************************************************************************/ 00059 00060 GDBItemCommand::~GDBItemCommand() 00061 { 00062 } 00063 00064 /***************************************************************************/ 00065 /***************************************************************************/ 00066 /***************************************************************************/ 00067 00068 GDBPointerCommand::GDBPointerCommand(VarItem *item) 00069 : GDBItemCommand(item, 00070 QCString("print *")+QCString(item->fullName().latin1()), 00071 false, 00072 DATAREQUEST) 00073 { 00074 } 00075 00076 /***************************************************************************/ 00077 00078 GDBPointerCommand::~GDBPointerCommand() 00079 { 00080 } 00081 00082 /***************************************************************************/ 00083 /***************************************************************************/ 00084 /***************************************************************************/ 00085 00086 //GDBReferenceCommand::GDBReferenceCommand(VarItem *item) : 00087 // GDBItemCommand(item, "print "+item->fullName(), false, 00088 // DATAREQUEST) 00089 //{ 00090 //} 00091 // 00093 // 00094 //GDBReferenceCommand::~GDBReferenceCommand() 00095 //{ 00096 //} 00097 // 00098 /***************************************************************************/ 00099 /***************************************************************************/ 00100 /***************************************************************************/ 00101 00102 GDBSetBreakpointCommand::GDBSetBreakpointCommand(const QCString &command, int key) 00103 : GDBCommand(command, false, false, SET_BREAKPT), 00104 key_(key) 00105 { 00106 } 00107 00108 /***************************************************************************/ 00109 00110 GDBSetBreakpointCommand::~GDBSetBreakpointCommand() 00111 { 00112 } 00113 00114 /***************************************************************************/ 00115 /***************************************************************************/ 00116 /***************************************************************************/ 00117 00118 }