Added usage (respectively more detailed usage) messages for "sem",
"sems", "port", and "ports" debugger commands. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23586 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -136,7 +136,7 @@ dump_port_info(int argc, char **argv)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
kprintf("usage: port [id|name|sem|address]\n");
|
print_debugger_command_usage(argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,8 +331,21 @@ port_init(kernel_args *args)
|
|||||||
sPorts[i].id = -1;
|
sPorts[i].id = -1;
|
||||||
|
|
||||||
// add debugger commands
|
// add debugger commands
|
||||||
add_debugger_command("ports", &dump_port_list, "Dump a list of all active ports");
|
add_debugger_command_etc("ports", &dump_port_list,
|
||||||
add_debugger_command("port", &dump_port_info, "Dump info about a particular port");
|
"Dump a list of all active ports (for team, with name, etc.)",
|
||||||
|
"[ ([ \"team\" | \"owner\" ] <team>) | (\"name\" <name>) ]\n"
|
||||||
|
"Prints a list of all active ports meeting the given\n"
|
||||||
|
"requirement. If no argument is given, all ports are listed.\n"
|
||||||
|
" <team> - The team owning the ports.\n"
|
||||||
|
" <name> - Part of the name of the ports.\n", 0);
|
||||||
|
add_debugger_command_etc("port", &dump_port_info,
|
||||||
|
"Dump info about a particular port",
|
||||||
|
"([ \"address\" ] <address>) | ([ \"name\" ] <name>) "
|
||||||
|
"| (\"sem\" <sem>)\n"
|
||||||
|
"Prints info about the specified port.\n"
|
||||||
|
" <address> - Pointer to the port structure.\n"
|
||||||
|
" <name> - Name of the port.\n"
|
||||||
|
" <sem> - ID of the port's read or write semaphore.\n", 0);
|
||||||
|
|
||||||
sPortsActive = true;
|
sPortsActive = true;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ dump_sem_info(int argc, char **argv)
|
|||||||
int32 i;
|
int32 i;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
kprintf("sem: not enough arguments\n");
|
print_debugger_command_usage(argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,8 +370,27 @@ sem_init(kernel_args *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add debugger commands
|
// add debugger commands
|
||||||
add_debugger_command("sems", &dump_sem_list, "Dump a list of all active semaphores");
|
add_debugger_command_etc("sems", &dump_sem_list,
|
||||||
add_debugger_command("sem", &dump_sem_info, "Dump info about a particular semaphore");
|
"Dump a list of all active semaphores (for team, with name, etc.)",
|
||||||
|
"[ ([ \"team\" | \"owner\" ] <team>) | (\"name\" <name>) ]"
|
||||||
|
#ifdef DEBUG_LAST_ACQUIRER
|
||||||
|
" | (\"last\" <last acquirer>)"
|
||||||
|
#endif
|
||||||
|
"\n"
|
||||||
|
"Prints a list of all active semaphores meeting the given\n"
|
||||||
|
"requirement. If no argument is given, all sems are listed.\n"
|
||||||
|
" <team> - The team owning the semaphores.\n"
|
||||||
|
" <name> - Part of the name of the semaphores.\n"
|
||||||
|
#ifdef DEBUG_LAST_ACQUIRER
|
||||||
|
" <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",
|
||||||
|
"<sem>\n"
|
||||||
|
"Prints info about the specified semaphore.\n"
|
||||||
|
" <sem> - pointer to the semaphore structure, semaphore ID, or name\n"
|
||||||
|
" of the semaphore to print info for.\n", 0);
|
||||||
|
|
||||||
TRACE(("sem_init: exit\n"));
|
TRACE(("sem_init: exit\n"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user