Commit Graph

31 Commits

Author SHA1 Message Date
jmg
682602df27 since kld_deb.py was removed a while back, this script isn't useful
anymore...
2020-08-11 22:33:56 +00:00
glebius
3988008507 Enhance the 'ps' command so that it prints a line per proc and a line
per thread, so that instead of repeating the same info for all threads
in proc, it would print thread specific info. Also includes thread number
that would match 'info threads' info and can be used as argument for
thread swithcing with 'thread' command.
2019-09-25 18:03:15 +00:00
emaste
d60dd0aac6 remove obsolete kernel debugging script
For quite some time kgdb has been internally handling FreeBSD kernel
module state; add-on scripts and tools are not needed.  asf(8) served
a similar purpose to this script and was removed in r335222.

PR:		229046
Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2019-08-01 17:02:58 +00:00
brueffer
8be98708bc Assorted grammar, spelling and punctuation fixes.
PR:		203336, 203339
Submitted by:	espeyb@rpi.edu, themesta@gmail.com
MFC after:	1 week
2015-12-15 13:04:44 +00:00
rodrigc
b75981aabc Use print as a function for Python 3 [PEP 3105]
Import print_function from the __future__ module
to activate this for Python 2.  This works as far back as Python 2.6.0a2:
   https://docs.python.org/2/library/__future__.html

[PEP 3105] https://www.python.org/dev/peps/pep-3105/
2015-11-19 00:01:52 +00:00
glebius
4d10ee85d7 Remove debugging code that sneaked in. 2015-04-09 07:52:03 +00:00
glebius
4a12d7101e Provide a gdb script, that prints routing tables from a live kernel or a
core file, much like 'netstat -anr' does it for living kernel.

Right now only AF_INET routing table is printed. AF_INET6 needs to
be done. But the most difficult part of the script (recursion!) is
complete.

Sponsored by:	Nginx, Inc.
2015-04-09 07:45:30 +00:00
eadler
9860195389 A number of places in the source tree still reference cuad.* after
sio(4) was deprecated by uart(4).

s/cuad/cuau/g/

PR:		docs/171533
Reviewed by:	imp
Approved by:	cperciva (implicit)
MFC after:	3 weeks
2012-12-08 22:16:36 +00:00
uqs
8f1a296b8b Spelling fixes for tools/
Add some $FreeBSD$ tags so svn will allow the commit.
2011-12-30 00:04:11 +00:00
uqs
c2a17de64b Fix a couple of typos.
PR:		docs/148891
Submitted by:	olgeni
MFC after:	1 week
2010-07-30 11:58:18 +00:00
maxim
5363e73b8c o Correct comments: remove a reference to non-existent gdbinit.9 man page;
correct a path to the kernel build directory; gdb lost -k key.

Reviewed by:	grog
MFC after:	1 week
2006-05-22 07:12:25 +00:00
jmg
d4af181c4d I forgot to commit this fix that is now kgdb aware... 2005-03-20 02:08:21 +00:00
das
35f1e7649c Remove the uarea column from the DDB 'ps' display, and from grog's gdb
scripts.

Reviewed by:	arch@
2004-11-20 02:32:42 +00:00
obrien
07115bc66a Catch up with PHK's sio(4) cuaa->cuad rework [sys/dev/sio/sio.c rev. 1.456]. 2004-11-19 03:51:12 +00:00
phk
f2cb74de87 Remove vinum bits. 2004-11-04 13:34:06 +00:00
jmg
1031eb4832 add a set of scripts that I posted to -current last year. This makes
debugging kernels and kernel modules much easier.  It will automaticly
locate kernel source, extract kernel module information, and rerun gdb
to load kernel module symbol information (if available by compiling module
w/ debuging symbols).

I have not run these recently, so may need to be updated to work with
gdb6.  Feel free to fix as appropriate for -current.
2004-08-04 18:03:43 +00:00
grog
bcefc9be85 Rename "msgbuf" to "dmesg", a more easily remembered name.
"Fix" documentation by removing periods and commas.
2003-12-31 00:37:24 +00:00
grog
1838491a76 Remove calls to 'y' macro. 2003-12-30 02:08:29 +00:00
grog
2f97cd9772 Remove current implementation of kldstat macro.
Add new kldstat, kldstat-v and kernel macros.  The kldstat macro is
functionally equivalent to the previous implementation, but it looks
prettier and it matches the kldstat-v macro better.  kldstat-v gives
output similar to userland kldstat -v (note lacking space), and kernel
loads a new kernel and dump.

Submitted by:	des
2003-12-30 01:23:16 +00:00
grog
68c1166195 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.
2003-12-29 06:38:27 +00:00
grog
b30b513db5 Add documentation for previously undocumented macros. This is not
made any easier by the brain-damaged format required for the
documentation: one line, no full stops or commas.

Remove macro xy.  I can't see any use for it any more.
2003-12-29 06:37:11 +00:00
grog
d5947fd154 Add comments to deter people from using this file directly. That's
not the intention.

Rearrange "you may want to change these values" values to the top, and
reduce their number as much as possible.

tr macro: Require a parameter (because gdb is too stupid to understand
optional parameters), and create macros tr0, tr1 and trf which call it
to connect to /dev/cuaa0, /dev/cuaa1 and firewire connections
respectively.

Split kld symbol load into two separate macros: revision 1.5
simplified things for the /dev/mem case, but broke it for anything
else.  Now the simple /dev/mem version is called kldsyms, and the
version for serial debugging and processor dumps is called getsyms,
and still requires this irritating cut and paste.

Change comments on startup to make life easier for the poor
(de)bugger.
2003-12-29 06:35:14 +00:00
grog
4982513fbd Explain what all this is about. 2003-12-22 00:01:53 +00:00
green
1e01559458 Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be.  Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory.  This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.

Approved by:	grog
2003-11-04 06:38:37 +00:00
grog
2ab324d92f Replace hard-coded module path with a keyword which gets changed when
the kernel is built.
2003-06-12 08:11:08 +00:00
grog
bdb8232f29 Make defproc work. 2003-06-08 06:11:15 +00:00
grog
63d6633ce4 Make btpp and fr work. There's still more to be done. 2003-06-08 06:10:45 +00:00
grog
75394c3ce7 Terminate echoed lines. Unlike echo(1), gdb echo doesen't
automatically terminate them.
2003-06-08 06:08:28 +00:00
grog
44ab674c71 Get the manual section number for kldstat(8) right. Comment change only.
Pointed out by:	yar
2003-06-07 01:17:04 +00:00
grog
01c6323d54 Modify startup mode: don't specify the file name for the debug kernel,
so it needs to be (and can be) specified on the command line.  Don't
try to automatically connect to a remote machine, so that the same
.gdbinit file can be used for analysing processor dumps.
2003-06-07 01:15:07 +00:00
grog
df67c67a7d Add macros for kernel debugging. These have been around for a
while, and they will need some more tuning before they're really
useful, but at the moment they're better than nothing.

Indirectly reminded by: dwhite
2003-06-07 01:01:42 +00:00