Commit Graph

73 Commits

Author SHA1 Message Date
dyson
0f54a3a55f 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
7cd32186da Cleaned up revs.1.19-1.21: 1997-11-20 16:53:23 +00:00
msmith
67ba7220fd 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
cfad384768 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
3ef4a761cf Fixed scrolling. Newline at the "--More--" prompt scrolled 2 lines. 1997-10-09 00:20:00 +00:00
phk
159b51570f Print the filename, not the directory we compiled in. 1997-09-28 08:34:46 +00:00
joerg
2819c5d8c9 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
0f00fbdf2b Some staticized variables were still declared to be extern. 1997-06-30 23:54:50 +00:00
bde
276d810752 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
302a2f962e Removed unused #includes. 1997-06-14 11:52:37 +00:00
joerg
66e9a34c96 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
5ba45e8d33 Fixed gratuitous ANSIisms. 1997-04-01 14:31:06 +00:00
bde
b0b8f0ac08 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
94b6d72794 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
10f666af84 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
42a95278a7 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
808a36ef65 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
aeabb37c7e Fixed bogus linkage of one of the ddb linker sets. 1996-12-18 17:58:24 +00:00
julian
e1b78916a4 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
e9c09cbb61 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
6145ccc494 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
8e672a5c30 Allow the user to switch into gdb mode from ddb 1996-08-27 19:46:28 +00:00
joerg
08f9d454e0 Finally implement a simple commandline history in DDB.
Emacs-style line editing has already been there (did anybody ever
notice this? :), so i `only' had to add ^P and ^N.  The approach is
fairly minimalistic, with the advantage of keeping the bloat as small
as 864 bytes of .text and 16 bytes of .bss, plus 10*120 bytes
malloc'ed history buffer at the first use.
1996-08-10 13:38:44 +00:00
peter
f420d94a19 A small bit of defensive programming in case the panic is during process
exit and cleanup.  the 'ps' command assumes that there are always 'nproc'
processes on the lists and will walk off the end without checking if not,
causing ddb to trap during the 'ps' command.
1996-06-15 07:08:02 +00:00
gpalmer
c79cc630ed Clean up various compiler warnings. Most (if not all) were benign
Reviewed by:	bde
1996-05-08 04:29:08 +00:00
hsu
7530dffb8e For Lite2: proc LIST changes.
Reviewed by:	david & bde
1996-03-11 05:55:56 +00:00
phk
5a1d479ab0 Remove some now unused printfoids. 1996-01-23 21:17:59 +00:00
bde
7e5df308af Fixed the one remaining %r. 1996-01-21 19:18:46 +00:00
phk
db9288fd24 One missed printf in the debugger.
Found By: bde
1996-01-21 16:30:43 +00:00
phk
c3e6222aa5 Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job:
	+	signed quantity.
	#	alternate format
	-	left padding
	*	read width as next arg.
	n	numeric in (argument specified) default radix.

Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.

The warnings from gcc may become more wrong and  intolerable because
of this.

Warning:  I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.

Suggested by: bde
1996-01-15 22:41:03 +00:00
bde
0cb993b9a2 Reduced and cleaned up #includes. 1995-12-10 19:08:32 +00:00
phk
a298a1843c Staticize and cleanup. 1995-12-10 13:32:43 +00:00
dg
c30f46c534 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
phk
6056f81916 Staticized and '#ifdef notused' stuff we don't use. 1995-11-29 10:25:50 +00:00
bde
ed3ff9247c Completed function declarations and/or added prototypes and/or #includes
to get the prototypes.

Changed some `int's to `boolean_t's.  boolean_t's are ints so they are
hard to distinguish from ints.

Converted function headers to old-style.  ddb is written in K&R1 C
except where we broke it.
1995-11-24 14:13:42 +00:00
bde
c14aa7ae48 Completed function declarations and/or added prototypes.
Removed `extern' from prototypes.
Sorted prototypes.
Uniformized idempotency ifdefs.
1995-11-24 13:53:05 +00:00
bde
c854b9d5a9 Change db_ps() to have the correct number and type of args for a ddb
command.
1995-08-27 02:40:39 +00:00
bde
aa76819f6f Change db_fncall() and db_panic() to have the correct number and type of
args for a ddb command.
1995-08-27 02:39:39 +00:00
dg
0ca978d61c Make db_ps tolerant of uninitialized struct proc fields. Improved 'more'
function to work like you'd expect. Other misc cleanup.
1995-08-20 05:25:11 +00:00
rgrimes
c86f0c7a71 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
dg
4c238c72a8 Print the address associated with an examine. Changed db_maxoff to
something more reasonable (64k). Suggested by Gordon Ross about a
year ago.
1995-05-22 13:07:12 +00:00
dg
27e6941140 Fixed the formatting breakage I added in the previous commit. 1995-04-04 01:35:33 +00:00
dg
14d50aee6d Fixed DDB's "ps" output formatting. 1995-03-28 23:29:52 +00:00
dg
9cd78521d8 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
bde
289f11acb4 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
joerg
a7aa212707 Make `p'' an explicit alias for `print'' instead of being an
implicit alias for ``panic'', since this seems to be more rational.
1995-03-05 22:56:21 +00:00
phk
df28946018 Added "panic" command to ddb, so we can do something sensible even if
we have no symbols.
1995-02-05 21:09:04 +00:00
bde
802677cea8 Load the kernel symbol table in the boot loader and not at compile time.
(Boot with the -D flag if you want symbols.)

Make it easier to extend `struct bootinfo' without losing either forwards
or backwards compatibility.

ddb_aout.c:
Get the symbol table from wherever the loader put it.
Nuke db_symtab[SYMTAB_SPACE].

boot.c:
Enable loading of symbols.  Align them on a page boundary.  Add printfs
about the symbol table sizes.
Pass the memory sizes to the kernel.
Fix initialization of `unit' (it got moved out of the loop).
Fix adding the bss size (it got moved inside an ifdef).
Initialize serial port when RB_SERIAL is toggled on.
Fix comments.
Clean up formatting of recently added code.

io.c:
Clean up formatting of recently added code.

netboot/main.c, machdep.c, wd.c:
Change names of bootinfo fields.

LINT:
Nuke SYMTAB_SPACE.
Fix comment about DODUMP.

Makefile.i386:
Nuke use of dbsym.
Exclude gcc symbols from kernel unless compiling with -g.
Remove unused macro.
Fix comments and formatting.

genassym.c:
Generate defines for some new bootinfo fields.  Change names of old ones.

locore.s:
Copy only the valid part of the `struct bootinfo' passed by the loader.
Reserve space for symbol table, if any.

machdep.c:
Check the memory sizes passed by the loader, if any.  Don't use them yet.

bootinfo.h:
Add a size field so that we can resolve some mismatches between the loader
bootinfo and the kernel boot info.  The version number is not so good for
this because of historical botches and because it's harder to maintain.
Add memory size and symbol table fields.  Change the names of everything.

Hacks to save a few bytes:

asm.S, boot.c, boot2.S:
Replace `ouraddr' by `(BOOTSEG << 4)'.

boot.c:
Don't statically initialize `loadflags' to 0.  Disable the "REDUNDANT"
code that skips the BIOS variables.  Eliminate `total'.  Combine some
more printfs.

boot.h, disk.c, io.c, table.c:
Move all statically initialzed data to table.c.

io.c:
Don't put the A20 gate bits in a variable.
1995-01-25 21:40:47 +00:00
bde
423f808042 Print "(null)" instead of crashing for null strings. Null names are
often generated for stack traces.  Now inspection of unmapped addresses
no longer panics the system.
1994-10-30 20:55:44 +00:00
phk
1f6d0ff1e2 Avoid ddb getting a panic if the code-segment isn't the usual one... 1994-10-02 19:36:30 +00:00