Subversion Repositories HelenOS-doc

Compare Revisions

Ignore whitespace Rev 143 → Rev 144

/usrman/trunk/running/running.tex
13,13 → 13,13
 
\section{KConsole}
KConsole is a kernel thread operating completely in priviledged mode.
It allows user to interact directly with kernel and even start directly
It allows user to interact directly with the kernel and even start directly
functions inside the kernel.
 
The KConsole is shown by switching to console number 12. On some platforms
the kconsole screen is not restored to its previous contents. Press
enter to see a KConsole prompt. The function keys for switching terminals
do not work in KConsole, if you want to switch back to other console, use
do not work in KConsole, to switch back to other console, use
the {\em continue} command. After executing the command, press a function key
to switch to other consoles.
 
31,35 → 31,41
 
The first class of commands prints useful statistics from the running
operating systems. The commands are:
- zones - Prints a list of memory zones.
- zone <zone number> - Prints a detailed statistics about frame allocator.
- slabs - Prints a details statistics about slab allocator.
- scheduler - Prints scheduler queues on all cpus.
- threads - Prints list of existing threads, including information about
the thread state/
- tasks - Prints list of tasks along with some basic IPC informations.
- ipc_tasks - Prints detailed information about IPC queues of a particular task.
- tlb - Prints contents of the Translation Lookaside Buffer on a processor (supported only on some platforms)
- exc - Prints table of registered exception handlers
\begin{description}
\item[zones] --- Prints a list of memory zones.
\item[zone $<$zone number$>$] --- Prints a detailed statistics about frame allocator.
\item[slabs] --- Prints a details statistics about slab allocator.
\item[scheduler] --- Prints scheduler queues on all cpus.
\item[threads] --- Prints list of existing threads, including information about
the thread state
\item[tasks] --- Prints list of tasks along with some basic IPC informations.
\item[ipc\_task $<$taskid$>$] --- Prints detailed information about IPC queues of a particular task.
\item[tlb] --- Prints contents of the Translation Lookaside Buffer on a processor (supported only on some platforms)
\item[exc] --- Prints table of registered exception handlers
\end{description}
 
Kernel contains a searchable version of its symbol table. This is used
in error processing as well as for extending functionality of KConsole.
The following commands are supported:
- symaddr <address> - Finds an address in symbol table and prints appropriate
\begin{description}
\item[symaddr $<$address$>$] --- Finds an address in symbol table and prints appropriate
symbol name.
- call0, call1... <function> <args...> - Calls a C function function(args...).
\item[call0, call1... $<$function$>$ $<$args...$>$] --- Calls a C function function(args...).
Note that the tab-completion works for the function names. Because
of architecture calling convention, this command does not work correctly
on the ia64 platform. The arguments can be specified
- as a number or hexadecimal number: call1 task_kill 8
- as a string: call1 printf "Hello world"
- as a hexadecimal number preceded by '*'. The argument is then read from
\begin{itemize}
\item as a number or hexadecimal number: call1 task\_kill 8
\item as a string: call1 printf "Hello world"
\item as a hexadecimal number preceded by '*'. The argument is then read from
the given address: call2 printf "%X" *0x8000000
- as a symbol name. In such case the value located in the memory
\item as a symbol name. In such case the value located in the memory
in the symbols address is used: call2 printf "%d" task_counter
- as a symbol name preceded by '&'. The address is used.
- as a symbol name preceded by '*'. In such a case the symbol is dereferenced.
- set4 <address|symbol name> - Saves 4-byte value on a given address.
\item as a symbol name preceded by '\&'. The address is used.
\item as a symbol name preceded by '*'. In such a case the symbol is dereferenced.
\end{itemize}
\item[set4 <address|symbol name>] --- Saves 4-byte value on a given address.
\end{description}
 
The mips, ia32 and amd64 platforms provide additional commands regarding
debugging facility - set and clear hardware breakpoints and watchpoints.
76,4 → 82,4
to the KConsole and allows users to inspect the failed kernel online.
On the SMP system the other processors are halted immediately. The kernel
contains its symbol table, so you can probably read some useful information
about the exact place where the panic occured.
about the exact place where the panic occured.