- commands["run"] = &CommandInterpreter::cmd_run;
- commands["continue"] = &CommandInterpreter::cmd_continue;
- commands["c"] = &CommandInterpreter::cmd_continue;
- commands["kill"] = &CommandInterpreter::cmd_kill;
- commands["signal"] = &CommandInterpreter::cmd_signal;
- commands["exit"] = &CommandInterpreter::cmd_exit;
- commands["quit"] = &CommandInterpreter::cmd_exit;
- commands["trace"] = &CommandInterpreter::cmd_trace;
+ commands["help"] = Command(&CommandInterpreter::cmd_help,
+ "Provides help on commands",
+ "help\n"
+ " Displays a list of commands\n\n"
+ "help COMMAND\n"
+ " Gives detailed information on a command\n");
+ commands["exit"] = Command(&CommandInterpreter::cmd_exit,
+ "Ends the debugging session");
+ commands["quit"] = Command(&commands["exit"]);
+
+ commands["run"] = Command(&CommandInterpreter::cmd_run,
+ "Starts the program");
+ commands["continue"] = Command(&CommandInterpreter::cmd_continue,
+ "Resumes program execution");
+ commands["kill"] = Command(&CommandInterpreter::cmd_kill,
+ "Terminates the program immediately");
+ commands["signal"] = Command(&CommandInterpreter::cmd_signal,
+ "Resumes execution with a signal",
+ "signal NUM\n"
+ "signal NAME\n"
+ " Sends the signal identified by NUM or NAME to the program and resumes\n"
+ " execution. Currently recognized signal names are HUP, INT, TERM, SEGV\n"
+ " and TERM.\n");
+
+ commands["trace"] = Command(&CommandInterpreter::cmd_trace,
+ "Traces GL function calls",
+ "trace\n"
+ " Send trace output to stdout.\n\n"
+ "trace FILE\n"
+ " Send trace output to FILE (- for stdout).\n\n"
+ "trace {off|on}\n"
+ " Temporarily suspend or resume trace without closing the file.\n\n"
+ "trace end\n"
+ " Terminate trace, closing the file.\n");
+
+ commands["profile"] = Command(&CommandInterpreter::cmd_profile,
+ "Profiles GL usage and performance",
+ "profile {on|off}\n"
+ " Enables or disables profiling\n");
+
+ commands["state"] = Command(&CommandInterpreter::cmd_state,
+ "Inspects general GL state",
+ "state vertex\n"
+ " Print current vertex attributes\n\n"
+ "state bind\n"
+ " Show current bindings\n");
+
+ commands["texture"] = Command(&CommandInterpreter::cmd_texture,
+ "Inspect texture state",
+ "texture\n"
+ " Lists texture objects\n\n"
+ "texture ID\n"
+ " Print information about a texture object\n");
+
+ commands["buffer"] = Command(&CommandInterpreter::cmd_buffer,
+ "Inspect buffer object state",
+ "buffer\n"
+ " Lists buffer objects\n\n"
+ "buffer ID\n"
+ " Print information about a buffer object\n");