diff --git a/src/cli.h b/src/cli.h index 718e976..74f3fee 100644 --- a/src/cli.h +++ b/src/cli.h @@ -76,6 +76,7 @@ private: class Command { public: Command (CommandInterpreter *cli, ProcessController *pcm, const char **commands) ; + virtual ~Command() { } virtual void check (std::string root, CommandVec &result) ; // check if string matches command exactly virtual void check_abbreviation (std::string root, CommandVec &result) ; // check if string matches command abbreviation @@ -114,6 +115,7 @@ private: class ControlCommand : public Command { public: + virtual ~ControlCommand() { } ControlCommand(CommandInterpreter *cli, ProcessController *pcm) ; void execute (std::string root, std::string tail) ; bool is_dangerous (std::string cmd) ; @@ -124,6 +126,7 @@ private: class DebuggerCommand : public Command { public: + virtual ~DebuggerCommand() { } DebuggerCommand(CommandInterpreter *cli, ProcessController *pcm) ; void execute (std::string root, std::string tail) ; void complete (std::string root, std::string tail, int ch, std::vector &result) ; @@ -134,6 +137,7 @@ private: class BreakpointCommand : public Command { public: + virtual ~BreakpointCommand() { } BreakpointCommand(CommandInterpreter *cli, ProcessController *pcm) ; void execute (std::string root, std::string tail) ; void complete (std::string root, std::string tail, int ch, std::vector &result) ; @@ -407,7 +411,7 @@ private: ProcessController *pcm ; PStream &os ; std::vector commands ; - sighandler_t oldint ; + void (*oldint)(int); bool program_running ; std::istream *instream ; // current input stream (NULL means keyboard) diff --git a/src/readline.h b/src/readline.h index aa9d3f7..51c9205 100644 --- a/src/readline.h +++ b/src/readline.h @@ -29,6 +29,7 @@ author: James Strother class Completor { public: + virtual ~Completor() { } virtual std::string complete (std::string text, int ch) = 0; virtual void list_matches() = 0; virtual unsigned num_matches() = 0;