Add documentation for previously undocumented macros, and correct

existing documentation.  This is not made any easier by the
brain-damaged format required for the documentation: one line, no full
stops or commas.
This commit is contained in:
Greg Lehey 2003-12-29 06:38:27 +00:00
parent 8454e168a9
commit 410b51e72b

@ -6,7 +6,7 @@ define pname
p (char *)curproc->p_comm p (char *)curproc->p_comm
end end
document pname document pname
Print the command name of the current process Print the command name of the current process.
end end
# Show contents of bp supplied as first parameter: # Show contents of bp supplied as first parameter:
@ -52,8 +52,7 @@ set $bp = (struct buf *) $arg0
printf "\n" printf "\n"
end end
document bpp document bpp
Show summary information about the buffer header (struct bp) pointed Show summary information about the buffer header (struct bp) pointed at by the parameter.
at by the parameter.
end end
# Show more detailed contents of bp supplied as first parameter: # Show more detailed contents of bp supplied as first parameter:
@ -122,8 +121,7 @@ output $bp->b_npages
printf "\n" printf "\n"
end end
document bpl document bpl
Show detailed information about the buffer header (struct bp) pointed Show detailed information about the buffer header (struct bp) pointed at by the parameter.
at by the parameter.
end end
# Show contents of buffer header in local variable bp. # Show contents of buffer header in local variable bp.
@ -131,8 +129,7 @@ define bp
bpp bp bpp bp
end end
document bp document bp
Show information about the buffer header pointed to by the Show information about the buffer header pointed to by the variable bp in the current frame.
variable bp in the current frame.
end end
# Show data of buffer header in local variable bp as string. # Show data of buffer header in local variable bp as string.
@ -143,8 +140,7 @@ document bpd
Show the contents (char*) of bp->data in the current frame. Show the contents (char*) of bp->data in the current frame.
end end
document bpl document bpl
Show detailled information about the buffer header (struct bp) pointed Show detailed information about the buffer header (struct bp) pointed at by the local variable bp.
at by the local variable bp.
end end
define bx define bx
printf "\n b_vnbufs " printf "\n b_vnbufs "
@ -185,6 +181,9 @@ printf "\n b_validoff "
output/x bp->b_validoff output/x bp->b_validoff
echo \n echo \n
end end
document bx
Print a number of fields from the buffer header pointed at in by the pointer bp in the current environment.
end
# Switch back to ddb # Switch back to ddb
define ddb define ddb
@ -232,7 +231,7 @@ define ps
end end
end end
document ps document ps
Show process status. No options. Show process status without options.
end end
# Specify a process for other commands to refer to. # Specify a process for other commands to refer to.
@ -295,7 +294,11 @@ end
# "define" line. y enables you to insert the confirmation in the # "define" line. y enables you to insert the confirmation in the
# definition without affecting the way the macro runs (much). # definition without affecting the way the macro runs (much).
define y define y
echo Check your .gdbinit, it contains a y command\n echo Check your .gdbinit: it contains a y command\n
end
document y
Kludge for writing macros This is a no-op except for printing a message See gdb(4) for more details.
end end
# kldstat(8) lookalike # kldstat(8) lookalike
@ -313,7 +316,7 @@ define kldstat
end end
end end
document kldstat document kldstat
Equivalent of the kldstat(8) command, without options. Equivalent of the kldstat(8) command without options
end end
# msgbuf: print msgbuf. Can take forever. # msgbuf: print msgbuf. Can take forever.
@ -321,7 +324,7 @@ define msgbuf
printf "%s", msgbufp->msg_ptr printf "%s", msgbufp->msg_ptr
end end
document msgbuf document msgbuf
Print the system message buffer (dmesg). This can take a long time due to the time it takes to transmit the data across a serial line. Print the system message buffer (dmesg) This can take a long time due to the time it takes to transmit the data across a serial line.
end end
# checkmem: check unallocated memory for modifications # checkmem: check unallocated memory for modifications
@ -342,3 +345,7 @@ while ($word < $length)
set $word = $word + 1 set $word = $word + 1
end end
end end
document checkmem
Check unallocated memory for modifications This assumes that DIAGNOSTIC is set which causes free memory to be set to 0xdeadc0de.
end