Commit Graph

101 Commits

Author SHA1 Message Date
peter
d2a1fbf785 At the moment, the alpha tentatively uses the ddb elf code rather than KLD,
because the alpha boot loader hasn't been converted yet, and because
it needs the full symbol tables with local symbols in order to make sense
of stack tracebacks.  KLD will implement this (using full sybmol table
rather than the globals only) shortly.
1998-10-09 23:32:03 +00:00
peter
a25058f631 We don't compile this on an elf kernel (and explicitly not on alpha in
case it's possible to compile in something like ECOFF)
The three db_xxx.c symbol interfaces are "standard" because config isn't
flexible enough without forcing the user to know about it.
1998-10-09 23:29:44 +00:00
dfr
2e02e15343 Update to work with the new elf headers. 1998-08-17 08:06:31 +00:00
bde
ead15fb933 Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like
and scanf-like functions in /usr/src except for the err()/warn()
family.  err() isn't quite printf-like since its format arg can
legitimately be NULL.  syslog() isn't quite printf-like, but gcc
already accepts %m, even for plain printf() when it shouldn't.
1998-07-13 06:45:23 +00:00
bde
760240cda1 Use not-so-new printf formats %r and/or %z instead of %n and/or %+x. 1998-07-08 10:53:58 +00:00
bde
d198aa995c Fixed bogus type of valuep in struct db_variable. It was `int *' and
became `long *' for alpha, but should always have been `db_expr_t *'.
Fixed variable types to match.
1998-07-08 09:11:43 +00:00
bde
b51dfbdc71 Fixed db_printf format errors. 1998-07-08 06:43:57 +00:00
bde
288282d0c4 Fixed db_printf format errors (except for ones using broken extensions
(nonstandard %n and '+' with %x), and ones not found by -Wformat on
386's (some db_expr_t's are still printed as ints).

I decided not to change the arg type for %n from [unsigned] int to
register_t, since about half of the uses of %n are to print plain
ints and casting to [unsigned] long for %n is no harder than for %x.
1998-07-08 06:27:22 +00:00
dfr
24f5c23c74 Remove the two single step breakpoints in the reverse order of setting to
ensure that single stepping a branch to the next instruction works.
1998-07-05 10:12:18 +00:00
dfr
bf51da8254 Add symtab parameter to X_db_symbol_values. 1998-07-05 10:11:20 +00:00
dfr
e8f1467736 Support 'g' format for printing 8 byte values. 1998-07-05 10:10:33 +00:00
dfr
35438179a1 Forgot to mention:
Obtained from: NetBSD
1998-06-28 00:59:26 +00:00
dfr
aa6e0422fd Add DDB symbol support for ELF and KLD. The KLD support only supports global
symbols so its not too useful.  Changes to the kernel linker to allow it to
supply DDB with symbols will come later.
1998-06-28 00:57:28 +00:00
dfr
c8a2c9ddab Supply the symbol table as an argument to X_db_symbol_values (required for elf). 1998-06-28 00:55:02 +00:00
dfr
d6dbdebaf2 Use db_addr_t for the breakpoint address in db_set_single_step. 1998-06-28 00:52:50 +00:00
dfr
ae5a06b40c Make db_tok_number a long to allow typing 64bit numbers on alpha. 1998-06-27 15:40:56 +00:00
dfr
d36ea98486 Use %+11ln for printing in r format to make it work for 64bit registers. 1998-06-27 15:39:51 +00:00
dfr
2d2bf54695 Add initial support for the FreeBSD/alpha kernel. This is very much a
work in progress and has never booted a real machine.  Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details).  On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).

Obtained from: partly from NetBSD/alpha
1998-06-10 10:57:29 +00:00
dfr
647d87a559 Make DDB work again after I broke it :-(. 1998-06-08 08:43:20 +00:00
bde
1e190059e3 Backed out previous commit, which just consisted of a 1-byte editing
error.
1998-06-08 02:15:37 +00:00
bde
3ccdda37a9 Fixed missing ifdefs and disordering in previous commit. 1998-06-08 02:12:19 +00:00
bde
734ace49a4 Fixed ifdef bogotification in previous commit. 1998-06-08 02:11:19 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
phk
69ad703802 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
phk
34fa716eb7 Redo the previous commit in a more Bruce-friendly fashion.
Urged by:	bde
1998-05-19 18:42:09 +00:00
phk
81a11ada1b Add "show msgbuf" command 1998-05-19 11:02:24 +00:00
bde
78b04eadd3 Ensure that the linker sets for commands exist by putting a standard
command in each of them.  This removes the need for hard-to-configure
dummy instantiations of the sets.
1998-02-13 02:19:29 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
dyson
bb636d90cc Some fixes from John Hood:
1) Fix the initialization of malloc structure that changed
		due to perf opt.
	2) Remove unneeded include.
	3) An initialization assert added to malloc.
Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
1997-12-05 05:36:58 +00:00
bde
3626e33521 Cleaned up revs.1.19-1.21: 1997-11-20 16:53:23 +00:00
msmith
08fa0fc3d6 A better fix for the ddb command history buffer problem; use a static
buffer instead of trying to use malloc() in the input routine.
Submitted by:	john hood <cgull@smoke.marlboro.vt.us>
1997-11-09 06:30:29 +00:00
msmith
757d68976b Don't try to do anything with the input history if MALLOC() for the buffer
failed.

This broke early debugging.
1997-11-07 02:34:50 +00:00
bde
634f776295 Fixed scrolling. Newline at the "--More--" prompt scrolled 2 lines. 1997-10-09 00:20:00 +00:00
phk
c48cc59656 Print the filename, not the directory we compiled in. 1997-09-28 08:34:46 +00:00
joerg
375a238af1 Minor hack to also allow for syscons's "interesting" arrow keys.
I'm using "#if __i386__ && __FreeBSD__" to check for a ``potentially
syscons-relevant environment''.  Hope that's ok...
1997-08-17 21:21:50 +00:00
bde
2241ae36d6 Some staticized variables were still declared to be extern. 1997-06-30 23:54:50 +00:00
bde
a6d6f19d74 Don't depend on gcc's feature of interpreting `int foo(c) char c; ...'
as `int foo(char c) ...' if there is a bogus prototype `int foo(char c);'
in scope.
1997-06-30 23:49:17 +00:00
bde
31b896c340 Removed unused #includes. 1997-06-14 11:52:37 +00:00
joerg
2a078bdc30 Everyone's favorite, i think: make DDB understand the arrow keys for the
basic cursor movements.  Assumes ANSI/DEC tty, but you can still resort
to plain emacs ^p/^n etc anyway.
1997-04-12 17:35:02 +00:00
bde
320a09186d Fixed gratuitous ANSIisms. 1997-04-01 14:31:06 +00:00
bde
61ef43e63e Added a setjmp() so that an initial pc that points to unmapped memory
isn't fatal.  Backed out rev.1.6, which handled special cases of this.
1997-03-28 12:39:43 +00:00
peter
c8dcd04895 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
dyson
8210b8b788 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
bde
b7bb340766 Fixed printing of small offsets. E.g., -4(%ebp) is now printed
as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is
defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as
GMON_PROF_HIRES+0x4(%ebp).
1997-01-16 11:27:11 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
bde
ffefd4e2b1 Fixed bogus linkage of one of the ddb linker sets. 1996-12-18 17:58:24 +00:00
julian
91c9e80007 if there is no console, cngetc should act like getc and return -1
make callers aware of this in those cases where it can occur.
1996-10-30 21:40:25 +00:00
bde
023da2c1d6 Attached vm ddb commands show map', show vmochk', `show object',
`show vmopag', `show page' and `show pageq'.  Moved all vm ddb stuff
to the ends of the vm source files.

Changed printf() to db_printf(), `indent' to db_indent, and iprintf()
to db_iprintf() in ddb commands.  Moved db_indent and db_iprintf()
from vm to ddb.

vm_page.c:
Don't use __pure.  Staticized.

db_output.c:
Reduced page width from 80 to 79 to inhibit double spacing for long
lines (there are still some problems if words are printed across
column 79).
1996-09-14 11:54:59 +00:00
bde
af95647797 Support statically attaching of ddb commands in non-ddb modules.
The details are hidden in the DB_COMMAND(cmd_name, func_name) and
DB_SHOW_COMMAND(cmd_name, func_name) macros.  DB_COMMAND() adds to
the top-level ddb command table and DB_SHOW_COMMAND adds to the
`show' subtable.  Most external commands will probably be `show'
commands with no side effects.  They should check their pointer
args more carefully than `show map' :-), or ddb should trap internal
faults better (like it does for memory accesses).

The vm ddb commands are temporarily unattached.

ddb.h:
Also declare `db_indent' and db_iprintf() which will replace vm's
`indent' and iprintf().
1996-09-14 09:13:15 +00:00
pst
07a64cde4c Allow the user to switch into gdb mode from ddb 1996-08-27 19:46:28 +00:00