Lines Matching refs:command

36 	debugger_command*	command;
92 // invoke command
129 // invoke command
176 parameters->result = parameters->command->func(parameters->argc,
190 // set last command argument
195 // invoke command
199 int result = invoke_debugger_command(segment.command, segment.argc,
222 next_debugger_command(debugger_command* command, const char* prefix,
225 if (command == NULL)
226 command = sCommands;
228 command = command->next;
230 while (command != NULL && strncmp(prefix, command->name, prefixLen) != 0)
231 command = command->next;
233 return command;
240 debugger_command *command;
244 // search command by full name
246 for (command = sCommands; command != NULL; command = command->next) {
247 if (strcmp(name, command->name) == 0)
248 return command;
255 command = next_debugger_command(NULL, name, length);
256 if (command != NULL) {
257 if (next_debugger_command(command, name, length) == NULL)
258 return command;
268 /*! Returns whether or not a debugger command is currently being invoked.
278 It sets a fault handler before invoking the command, so that an invalid
284 invoke_debugger_command(struct debugger_command *command, int argc, char** argv)
287 // If we know the command's usage text, intercept "--help" invocations
290 && command->usage != NULL) {
291 kprintf_unfiltered("usage: %s ", command->name);
292 kputs_unfiltered(command->usage);
296 // replace argv[0] with the actual command name
297 argv[0] = (char *)command->name;
300 // Will automatically clean up all allocations the command leaves over.
302 // Invoking the command directly might be useful when debugging debugger
305 return command->func(argc, argv);
310 parameters.command = command;
337 // command aborted (no page fault)
346 /*! Aborts the currently executed debugger command (in fact the complete pipe),
347 unless direct command invocation has been set. If successful, the function
381 if ((segment.command->flags & B_KDEBUG_PIPE_FINAL_RERUN) != 0) {
429 debugger_command** command = &sCommands;
431 debugger_command* nextCommand = (*command)->next;
433 stopCommand = *command;
437 if (strcmp((*command)->name, nextCommand->name) > 0) {
438 (*command)->next = nextCommand->next;
439 nextCommand->next = *command;
440 *command = nextCommand;
443 command = &(*command)->next;
481 // get the old command
483 debugger_command* command = find_debugger_command(oldName, false,
485 if (command == NULL)
488 // register new command
489 return add_debugger_command_etc(newName, command->func,
490 description != NULL ? description : command->description,
491 command->usage, command->flags);
498 // get the command
500 debugger_command* command = find_debugger_command(commandName, true,
502 if (command == NULL)
506 // command with "--help"
507 if (command->usage != NULL) {
508 kprintf_unfiltered("usage: %s ", command->name);
509 kputs_unfiltered(command->usage);
512 invoke_debugger_command(command, 2, (char**)args);