diff --git a/src/system/kernel/port.cpp b/src/system/kernel/port.cpp index 2523349955..2b21c6aa15 100644 --- a/src/system/kernel/port.cpp +++ b/src/system/kernel/port.cpp @@ -136,7 +136,7 @@ dump_port_info(int argc, char **argv) int i; if (argc < 2) { - kprintf("usage: port [id|name|sem|address]\n"); + print_debugger_command_usage(argv[0]); return 0; } @@ -331,8 +331,21 @@ port_init(kernel_args *args) sPorts[i].id = -1; // add debugger commands - add_debugger_command("ports", &dump_port_list, "Dump a list of all active ports"); - add_debugger_command("port", &dump_port_info, "Dump info about a particular port"); + add_debugger_command_etc("ports", &dump_port_list, + "Dump a list of all active ports (for team, with name, etc.)", + "[ ([ \"team\" | \"owner\" ] ) | (\"name\" ) ]\n" + "Prints a list of all active ports meeting the given\n" + "requirement. If no argument is given, all ports are listed.\n" + " - The team owning the ports.\n" + " - Part of the name of the ports.\n", 0); + add_debugger_command_etc("port", &dump_port_info, + "Dump info about a particular port", + "([ \"address\" ]
) | ([ \"name\" ] ) " + "| (\"sem\" )\n" + "Prints info about the specified port.\n" + "
- Pointer to the port structure.\n" + " - Name of the port.\n" + " - ID of the port's read or write semaphore.\n", 0); sPortsActive = true; return B_OK; diff --git a/src/system/kernel/sem.cpp b/src/system/kernel/sem.cpp index 22a5d5f06e..55035876fd 100644 --- a/src/system/kernel/sem.cpp +++ b/src/system/kernel/sem.cpp @@ -187,7 +187,7 @@ dump_sem_info(int argc, char **argv) int32 i; if (argc < 2) { - kprintf("sem: not enough arguments\n"); + print_debugger_command_usage(argv[0]); return 0; } @@ -370,8 +370,27 @@ sem_init(kernel_args *args) } // add debugger commands - add_debugger_command("sems", &dump_sem_list, "Dump a list of all active semaphores"); - add_debugger_command("sem", &dump_sem_info, "Dump info about a particular semaphore"); + add_debugger_command_etc("sems", &dump_sem_list, + "Dump a list of all active semaphores (for team, with name, etc.)", + "[ ([ \"team\" | \"owner\" ] ) | (\"name\" ) ]" +#ifdef DEBUG_LAST_ACQUIRER + " | (\"last\" )" +#endif + "\n" + "Prints a list of all active semaphores meeting the given\n" + "requirement. If no argument is given, all sems are listed.\n" + " - The team owning the semaphores.\n" + " - Part of the name of the semaphores.\n" +#ifdef DEBUG_LAST_ACQUIRER + " - The thread that last acquired the semaphore.\n" +#endif + , 0); + add_debugger_command_etc("sem", &dump_sem_info, + "Dump info about a particular semaphore", + "\n" + "Prints info about the specified semaphore.\n" + " - pointer to the semaphore structure, semaphore ID, or name\n" + " of the semaphore to print info for.\n", 0); TRACE(("sem_init: exit\n"));