/[base]/head/sys/i386/i386/db_trace.c
ViewVC logotype

Log of /head/sys/i386/i386/db_trace.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 365072 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 1 21:19:39 2020 UTC (3 years, 10 months ago) by mjg
File length: 19226 byte(s)
Diff to previous 354647
i386: clean up empty lines in .c and .h files


Revision 354647 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 12 15:56:27 2019 UTC (4 years, 7 months ago) by kib
File length: 19232 byte(s)
Diff to previous 354638
i386: stop guessing the address of the trap frame in ddb backtrace.

Save the address of the trap frame in %ebp on kernel entry.  This
automatically provides it in struct i386_frame.f_frame to unwinder.

While there, more accurately handle the terminating frames,

Reviewed by:	avg, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D22321


Revision 354638 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 12 11:00:01 2019 UTC (4 years, 7 months ago) by avg
File length: 19284 byte(s)
Diff to previous 354627
teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler

Discussed with:	kib, royger
MFC after:	3 weeks
Sponsored by:	Panzura


Revision 354627 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 11 19:06:04 2019 UTC (4 years, 7 months ago) by avg
File length: 19237 byte(s)
Diff to previous 332564
db_nextframe/i386: reduce the number of special frame types

This change removes TRAP_INTERRUPT and TRAP_TIMERINT frame types.

Their names are a bit confusing: trap + interrupt, what is that?
The TRAP_TIMERINT name is too specific -- can it only be used for timer
"trap-interrupts"?  What is so special about them?

My understanding of the code is that INTERRUPT, TRAP_INTERRUPT and
TRAP_TIMERINT differ only in how an offset from callee's frame pointer to a
trap frame on the stack is calculated.  And that depends on a number of
arguments that a special handler passes to a callee (a function with a
normal C calling convention).

So, this change makes that logic explicit and collapses all interrupt frame
types into the INTERRUPT type.

Reviewed by:	markj
Discussed with:	kib, jhb
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D22303


Revision 332564 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 16 13:52:40 2018 UTC (6 years, 2 months ago) by imp
File length: 19112 byte(s)
Diff to previous 332489
Use bool instead of boolean_t here. No reason to use boolean_t.

Also, stop passing FALSE to a bool parameter.


Revision 332489 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 13 20:30:49 2018 UTC (6 years, 2 months ago) by kib
File length: 19117 byte(s)
Diff to previous 324078
i386 4/4G split.

The change makes the user and kernel address spaces on i386
independent, giving each almost the full 4G of usable virtual addresses
except for one PDE at top used for trampoline and per-CPU trampoline
stacks, and system structures that must be always mapped, namely IDT,
GDT, common TSS and LDT, and process-private TSS and LDT if allocated.

By using 1:1 mapping for the kernel text and data, it appeared
possible to eliminate assembler part of the locore.S which bootstraps
initial page table and KPTmap.  The code is rewritten in C and moved
into the pmap_cold(). The comment in vmparam.h explains the KVA
layout.

There is no PCID mechanism available in protected mode, so each
kernel/user switch forth and back completely flushes the TLB, except
for the trampoline PTD region. The TLB invalidations for userspace
becomes trivial, because IPI handlers switch page tables. On the other
hand, context switches no longer need to reload %cr3.

copyout(9) was rewritten to use vm_fault_quick_hold().  An issue for
new copyout(9) is compatibility with wiring user buffers around sysctl
handlers. This explains two kind of locks for copyout ptes and
accounting of the vslock() calls.  The vm_fault_quick_hold() AKA slow
path, is only tried after the 'fast path' failed, which temporary
changes mapping to the userspace and copies the data to/from small
per-cpu buffer in the trampoline.  If a page fault occurs during the
copy, it is short-circuit by exception.s to not even reach C code.

The change was motivated by the need to implement the Meltdown
mitigation, but instead of KPTI the full split is done.  The i386
architecture already shows the sizing problems, in particular, it is
impossible to link clang and lld with debugging.  I expect that the
issues due to the virtual address space limits would only exaggerate
and the split gives more liveness to the platform.

Tested by: pho
Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D14633


Revision 324078 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 28 08:38:24 2017 UTC (6 years, 9 months ago) by kib
File length: 18467 byte(s)
Diff to previous 323722
Revert r323722.  A better fix will be committed shortly, as well as
some still useful bits of the reverted revision.

The problem with the committed fix is that there are still issues with
returning from NMI, when NMI interrupted kernel in a moment where the
kernel segments selectors were still not loaded into registers.  If
this happens, the NMI return would loose the userspace selectors
because r323722 does not reload segment registers on return to kernel
mode.

Fixing the problem is complicated.  Since an alternative approach to
handle the original bug exists, it makes sence to stop adding more
complexity.

Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week


Revision 323722 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 18 20:22:42 2017 UTC (6 years, 9 months ago) by kib
File length: 18422 byte(s)
Diff to previous 315454
Fix handling of the segment registers on i386.

Suppose that userspace is executing with the non-standard segment
descriptors.  Then, until exception or interrupt handler executed
SET_KERNEL_SEGS, kernel is still executing with user %ds, %es and %fs.
If an interrupt occurs in this window, the interrupt handler is
executed unsafely, relying on usability of the usermode registers.  If
the interrupt results in the context switch on return, the
contamination of the kernel state spreads to the thread we switched
to.  As result, kernel data accesses might fault or, if only the base
is changed, completely messed up.

More, if the user segment was allocated in LDT, another thread might
mark the descriptor as invalid before doreti code tried to reload
them.  In this case kernel panics.

The issue exists for all exception entry points which use trap gate,
and thus do not automatically disable interrupts on entry, and for
lcall_handler.

Fix is two-fold: first, we need to disable interrupts for all kernel
entries, changing the IDT descriptor types from trap gate to interrupt
gate.  Interrupts are re-enabled not earlier than the kernel segments
are loaded into the segment registers.  Second, we only load the
segment registers from the trap frame when returning to usermode.  For
the later, all interrupt return paths must happen through the doreti
common code.

There is no way to disable interrupts on call gate, which is the
supposed mode of servicing for lcall $7,$0 syscalls.  Change the LDT
descriptor 0 into a code segment type and point it to the userspace
trampoline which redirects the syscall to int $0x80.

All the measures make the segment register handling similar to that of
amd64.  We do not apply amd64 optimizations of not reloading segment
registers on return from the syscall.

Reported by:	Maxime Villard <max@m00nbsd.net>
Tested by:	pho (the non-lcall part)
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D12402


Revision 315454 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 17 13:49:05 2017 UTC (7 years, 3 months ago) by bde
File length: 18467 byte(s)
Diff to previous 306311
Don't access the reserved registers %dr4 and %dr5 on i386.

On the original i386, %dr[4-5] were unimplemented but not very clearly
reserved, so debuggers read them to print them.  i386 was still doing
this.

On the original athlon64, %dr[4-5] are documented as reserved but are
aliased to %dr[6-7] unless CR4_DE is set, when accessing them traps.

On 2 of my systems, accessing %dr[4-5] trapped sometimes.  On my Haswell
system, the apparent randomness was because the boot CPU starts with
CR4_DE set while all other CPUs start with CR4_DE clear.  FreeBSD
doesn't support the data breakpoints enabled by CR4_DE and it never
changes this flag, so the flag remains different across CPUs and
the behaviour seemed inconsistent except while booting when the CPU
doesn't change.

The invalid accesses broke:
- read access for printing the registers in ddb "show watches" on CPUs
  with CR4_DE set
- read accesses in fill_dbregs() on CPUs with CR4_DE set.  This didn't
  implement panic(3) since the user case always skipped %dr[4-5].
- write accesses in set_dbregs().  This also didn't affect userland.
  When it didn't trap, the aliasing made it fragile.

Don't print the dummy (zero) values of %dr[4-5] in "show watches" for
i386 or amd64.  Fix style bugs near this printing.

amd64 also has space in the dbregs struct for the reserved %dr[8-15]
and already didn't print the dummy values for these, and never accessed
any of the 10 reserved debug registers.

Remove cpufuncs for making the invalid accesses.  Even amd64 had these.


Revision 306311 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 25 16:30:29 2016 UTC (7 years, 9 months ago) by bde
File length: 18449 byte(s)
Diff to previous 305807
Determine the operand/address size of %cs in a new function
db_segsize().

Use db_segsize() to set the default operand/address size for
disassembling.  Allow overriding this with the "alternate" display
format /I.  The API of db_disasm() should be debooleanized to pass a
more general request (amd64 needs overrides to sizes of 16, 32, and
64, but this commit doesn't implement anything for amd64 since much
larger changes are needed to restore the amd64 disassmbler's support
for non-default sizes).

Fix db_print_loc_and_inst() to ask for the normal format and not the
alternate in normal operation.

This is most useful for vm86 mode, but also works for 16-bit protected
mode.

Use db_segsize() to avoid trying to print a garbage stack trace if %cs
is 16 bits.  Print something like the stack trace termination message
for a trap boundary instead.

Document that the alternate format is now useful on i386.


Revision 305807 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 14 12:57:40 2016 UTC (7 years, 9 months ago) by bde
File length: 18097 byte(s)
Diff to previous 304085
Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  This is just a style change on amd64,
but on i386 it fixes 1 unimportant place where the PSL_VM check was
missing and starts fixing 1 important place where the PSL_VM check
had a logic error.

Fix logic errors in treating vm86 bioscall mode as kernel mode.  The
main place checked all the necessary flags, but put the necessary
parentheses for the PSL_VM and PCB_VM86CALL checks in the wrong
place.  The broken case is only reached if a vm86 bioscall uses a
%cs which is nonzero mod 4, but that is unusual -- most bios calls
start with %cs = 0xc000 or 0xf000 and rarely change it.  Another
place was missing the check for PCB_VM86CALL, but was only reachable
if there are bugs virtualizing PSL_I.

Add a macro TF_HAS_STACKREGS() and use this instead of converting
open-coded checks of SEL_UPL, etc. to TRAPF_USERMODE() when we only
care about whether the frame has stack registers.  This fixes 3
places in my recent fix for register variables in vm86 mode where I
messed up the PSL_VM check and cleans up other places.


Revision 304085 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 14 16:51:25 2016 UTC (7 years, 10 months ago) by bde
File length: 18180 byte(s)
Diff to previous 285783
Fix the variables $esp, $ds, $es, $fs, $gs and $ss in vm86 mode.

Fix PC_REGS() so that printing of instructions works in some useful
cases.  ddb only understands a single flat address space, but this
macro allows mapping $cs:$eip into vm86's flat address space well
enough for the MI parts of ddb.  This doesn't work for the MD parts
that do stack traces, and there are no similar macros for data addresses.

PC_REGS() has to use the trapframe pointer instead of the pcb for this.
For other CPUs, the trapframe pointer is not available except by tracing
back to it.  But tracing back through vm86 trapframes is broken even
starting with one.


Revision 285783 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 22 01:09:02 2015 UTC (8 years, 11 months ago) by jhb
File length: 17355 byte(s)
Diff to previous 285776
Various changes to the registers displayed in DDB for x86.
- Fix segment registers to only display the low 16 bits.
- Remove unused handlers and entries for the debug registers.
- Display xcr0 (if valid) in 'show sysregs'.
- Add '0x' prefix to MSR values to match other values in 'show sysregs'.
- MFamd64: Display various MSRs in 'show sysregs'.
- Add a 'show dbregs' to display the value of debug registers.
- Dynamically size the column width for register values to properly
  align columns on 64-bit platforms.
- Display %gs for i386 in 'show registers'.

Differential Revision:	https://reviews.freebsd.org/D2784
Reviewed by:	kib, markj
MFC after:	2 weeks


Revision 285776 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 21 23:22:23 2015 UTC (8 years, 11 months ago) by markj
File length: 17719 byte(s)
Diff to previous 285775
Let the unwinder handle faults during function prologues or epilogues.

The i386 and amd64 DDB stack unwinders contain code to detect and handle
the case where the first frame is not completely set up or torn down. This
code was accidentally unused however, since db_backtrace() was never called
with a non-NULL trap frame. This change fixes that.

Also remove get_rsp() from the amd64 code. It appears to have come from
i386, which needs to take into account whether the exception triggered a
CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64,
SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for
kernel-mode exceptions. As a result, we can also remove custom print
functions for these registers.

Reviewed by:	jhb
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D2881


Revision 285775 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 21 23:13:11 2015 UTC (8 years, 11 months ago) by markj
File length: 17654 byte(s)
Diff to previous 281707
Improve stack unwinding on i386 and amd64 after an IP fault.

If we can't find a symbol corresponding to the faulting instruction, assume
that the previously-executed function is a call and attempt to find the
calling function using the return address on the stack. Otherwise we end
up associating the last stack frame with the current call, which is
incorrect and causes the unwinder to skip printing of the calling function,
resulting in a confusing backtrace.

Reviewed by:	jhb
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D2859


Revision 281707 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 18 21:23:16 2015 UTC (9 years, 2 months ago) by kib
File length: 17210 byte(s)
Diff to previous 243836
Remove lazy pmap switch code from i386.  Naive benchmark with md(4)
shows no difference with the code removed.

On both amd64 and i386, assert that a released pmap is not active.

Proposed and reviewed by:	alc
Discussed with:	Svatopluk Kraus <onwahe@gmail.com>, peter
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks


Revision 243836 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 3 22:16:51 2012 UTC (11 years, 7 months ago) by kib
File length: 17250 byte(s)
Diff to previous 183413
Print the frame addresses for the backtraces on i386 and amd64. It
allows both to inspect the frame sizes and to manually peek into the
frames from ddb, if needed.

Reviewed by:	dim
MFC after:	2 weeks


Revision 183413 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 27 15:54:04 2008 UTC (15 years, 9 months ago) by kib
File length: 17098 byte(s)
Diff to previous 174195
Frames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler
and Xlazypmap differ from the frame for Xtimerint. The Xtimerint puts
pointer to the frame between return address and frame body, while rest
of the functions listed above do not. Correct offset calculation to
allow the ddb backtrace to step over such frames.

Noted and reviewed by:	tegge
Tested by:	pho
MFC after:	1 week


Revision 174195 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 2 20:40:35 2007 UTC (16 years, 7 months ago) by rwatson
File length: 16935 byte(s)
Diff to previous 166825
Break out stack(9) from ddb(4):

- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
  definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it is
  defined, or also if "options DDB" is defined to provide compatibility
  with existing users of stack(9).

Add new stack_save_td(9) function, which allows the capture of a stacktrace
of another thread rather than the current thread, which the existing
stack_save(9) was limited to.  It requires that the thread be neither
swapped out nor running, which is the responsibility of the consumer to
enforce.

Update stack(9) man page.

Build tested:	amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested:	amd64 (rwatson), arm (cognet), i386 (rwatson)


Revision 166825 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 19 10:57:47 2007 UTC (17 years, 4 months ago) by kib
File length: 17672 byte(s)
Diff to previous 164362
Unbreak ddb stepping over special frames after the following commit:
 Revision  Changes    Path
  1.113     +4 -2      src/sys/i386/i386/apic_vector.s
  1.117     +7 -1      src/sys/i386/i386/exception.s
  1.36      +7 -7      src/sys/i386/i386/local_apic.c
  1.298     +61 -63    src/sys/i386/i386/trap.c
  1.62      +15 -22    src/sys/i386/i386/vm86.c
  1.32      +4 -2      src/sys/i386/i386/vm86bios.s
  1.21      +2 -2      src/sys/i386/include/apicvar.h
  1.27      +2 -2      src/sys/i386/isa/atpic.c
  1.50      +2 -1      src/sys/i386/isa/atpic_vector.s
  1.35      +1 -1      src/sys/i386/isa/icu.h

Tested by:	kris, Peter Holm
No objections from:	kmacy


Revision 164362 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 19:20:32 2006 UTC (17 years, 7 months ago) by jhb
File length: 17671 byte(s)
Diff to previous 164357
- Add macro constants for the various fields in %dr7 and use them in place
  of various scattered magic values.
- Pretty print the address of hardware watchpoints in 'show watch' rather
  than just displaying hex.
- Expand address field width on amd64 for 64-bit pointers.


Revision 164357 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 16:37:35 2006 UTC (17 years, 7 months ago) by jhb
File length: 17710 byte(s)
Diff to previous 164303
A few more style fixes.


Revision 164303 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 15 19:53:48 2006 UTC (17 years, 7 months ago) by jhb
File length: 17697 byte(s)
Diff to previous 163534
Various whitespace and style fixes.


Revision 163534 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 20 09:44:21 2006 UTC (17 years, 8 months ago) by bde
File length: 17714 byte(s)
Diff to previous 160312
Don't show debug registers in "show registers".  Special registers should
be displayed specially, and debug registers are among of the least
interesting special registers (far behind %cr3).  The debug registers
are still accessible as variables and displayed in another bogus place
("show watches").


Revision 160312 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 12 21:22:44 2006 UTC (17 years, 11 months ago) by jhb
File length: 17669 byte(s)
Diff to previous 159723
Simplify the pager support in DDB.  Allowing different db commands to
install custom pager functions didn't actually happen in practice (they
all just used the simple pager and passed in a local quit pointer).  So,
just hardcode the simple pager as the only pager and make it set a global
db_pager_quit flag that db commands can check when the user hits 'q' (or a
suitable variant) at the pager prompt.  Also, now that it's easy to do so,
enable paging by default for all ddb commands.  Any command that wishes to
honor the quit flag can do so by checking db_pager_quit.  Note that the
pager can also be effectively disabled by setting $lines to 0.

Other fixes:
- 'show idt' on i386 and pc98 now actually checks the quit flag and
  terminates early.
- 'show intr' now actually checks the quit flag and terminates early.


Revision 159723 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 18 12:07:00 2006 UTC (18 years ago) by yar
File length: 17738 byte(s)
Diff to previous 159659
The i386 "call" instruction works as follows: it pushes
the return address on the stack and only then "dereferences" %pc.
Therefore, in the case of a call to an invalid address, we arrive
to the trap handler with the invalid value in tf_eip.  This used
to prevent db_backtrace() from assigning the most recent and interesting
frame on the stack to the right spot in the right function, from
which the invalid call was attempted.

Try to detect and work around that by recovering the return address
from the stack.

The work-around requires the fault address be passed to db_backtrace().
Smuggle it as tf_err.

MFC after:	1 month
Sponsored by:	RiNet (Cronyx Plus LLC)


Revision 159659 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 16 11:49:37 2006 UTC (18 years ago) by yar
File length: 16914 byte(s)
Diff to previous 159657
Return -1 from db_numargs() if number of args couldn't be guessed.
Use this later to indicate in backtrace output that args shown are
uncertain.

Sponsored by: RiNet (Cronyx Plus LLC)


Revision 159657 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 16 11:14:54 2006 UTC (18 years ago) by yar
File length: 16850 byte(s)
Diff to previous 153694
Guess the number of arguments to a function somewhat better.
Now GCC likes to stick a "mov %eax, %FOO" instruction before
"addl $BAR, %esp" if the function just called returns an int,
which is a very common case in the kernel.

Sponsored by: RiNet (Cronyx Plus LLC)


Revision 153694 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 23 21:33:55 2005 UTC (18 years, 6 months ago) by jeff
File length: 16760 byte(s)
Diff to previous 153146
 - Improve the INKERNEL macro such that it can no longer give false positives.
   This fixes the stack(9) functionality.

Submitted by:	Antoine Brodin <antoine.brodin@laposte.net>


Revision 153146 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 5 22:39:09 2005 UTC (18 years, 7 months ago) by jhb
File length: 16575 byte(s)
Diff to previous 149925
Change the i386 code to pass the interrupt vector as a separate argument
rather than embedding it in the intrframe as if_vec.  This reduces diffs
with amd64 somewhat.
- Remove cf_vec from clockframe (it wasn't used anyway) and stop pushing
  dummy vector arguments for ipi_bitmap_handler() and lapic_handle_timer()
  since clockframe == trapframe now.
- Fix ddb to handle stack traces across interrupt entry points that just
  have a trapframe on their stack and not a trapframe + vector.
- Change intr_execute_handlers() to take a trapframe rather than an
  intrframe pointer.
- Change lapic_handle_intr() and atpic_handle_intr() to take a vector and
  trapframe rather than an intrframe.
- GC struct intrframe now that nothing uses it anymore.
- GC CLOCK_TO_TRAPFRAME() and INTR_TO_TRAPFRAME().

Reviewed by:	bde
Requested by:	peter


Revision 149925 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 10 03:01:25 2005 UTC (18 years, 9 months ago) by marcel
File length: 16224 byte(s)
Diff to previous 148666
Move the prototypes of db_md_set_watchpoint(), db_md_clr_watchpoint()
and db_md_list_watchpoints() to ddb/ddb.h.


Revision 148666 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 3 04:27:40 2005 UTC (18 years, 11 months ago) by jeff
File length: 16377 byte(s)
Diff to previous 140401
 - Add support for saving stack traces and displaying them via printf(9)
   and KTR.

Contributed by:		Antoine Brodin <antoine.brodin@laposte.net>
Concept code from:	Neal Fachan <neal@isilon.com>


Revision 140401 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 18 03:48:02 2005 UTC (19 years, 5 months ago) by jhb
File length: 15963 byte(s)
Diff to previous 139724
Unbreak stack traces across double faults.  In a particular edge case
(calling a __dead2 function such as panic() at the end of a function), the
saved %eip on the stack will actually not be part of the function that
executed a call instruction but instead will be the first instruction of
the next function in the text.  This happens with dblfault_handler() and
syscall() for example.  Work around this in the one place it matters by
looking at the saved %eip - 1 to determine the calling function when we
check for "magic" frames.

MFC after:	2 weeks


Revision 139724 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 5 19:10:48 2005 UTC (19 years, 6 months ago) by imp
File length: 15569 byte(s)
Diff to previous 137117
Start all license/copyright notice comments with /*-, per tradition


Revision 137117 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 1 22:15:15 2004 UTC (19 years, 8 months ago) by jhb
File length: 15568 byte(s)
Diff to previous 135529
- Change the ddb paging "support" to use a variable (db_lines_per_page) to
  control the number of lines per page rather than a constant.  The variable
  can be examined and changed in ddb as '$lines'.  Setting the variable to
  0 will effectively turn off paging.
- Change db_putchar() to force out pending whitespace before outputting
  newlines and carriage returns so that one can rub out content on the
  current line via '\r     \r' type strings.
- Change the simple pager to rub out the --More-- prompt explicitly when
  the routine exits.
- Add some aliases to the simple pager to make it more compatible with
  more(1): 'e' and 'j' do a single line.  'd' does half a page, and
  'f' does a full page.

MFC after:	1 month
Inspired by:	kris


Revision 135529 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 20 19:05:32 2004 UTC (19 years, 9 months ago) by jhb
File length: 15568 byte(s)
Diff to previous 135008
- Add support for "paging" in stack trace output.  That is, when you do
  a stack trace from ddb, the output will pause with a '--More--' prompt
  every 18 lines.  If you hit Enter, it will print another line and prompt
  again.  If you hit space it will output another page and then prompt.
  If you hit 'q' or 'x' it will abort the rest of the stack trace.
- Fix the sparc64 userland stack trace to honor the total count of lines
  to print.  This is useful if your trace happens to walk back onto
  0xdeadc0de and gets stuck in an endless loop.

MFC after:	1 month
Tested on:	i386, alpha, sparc64


Revision 135008 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 20:39:31 2004 UTC (19 years, 9 months ago) by jhb
File length: 15481 byte(s)
Diff to previous 132482
Teach the stack trace code how to step across a double fault when stepping
across frames.  Basically, if the current frame is for the
'dblfault_handler' function, then get the next %eip and %ebp values to use
from the original TSS of the thread that has the saved state when the
double fault triggered.

MFC after:	4 days


Revision 132482 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 21 05:07:09 2004 UTC (19 years, 11 months ago) by marcel
File length: 14897 byte(s)
Diff to previous 131952
Unify db_stack_trace_cmd(). All it did was look up the thread given
the thread ID and call db_trace_thread().
Since arm has all the logic in db_stack_trace_cmd(), rename the
new DB_COMMAND function to db_stack_trace to avoid conflicts on
arm.
While here, have db_stack_trace parse its own arguments so that
we can use a more natural radix for IDs. If the ID is not a thread
ID, or more precisely when no thread exists with the ID, try if
there's a process with that ID and return the first thread in it.
This makes it easier to print stack traces from the ps output.

requested by: rwatson@
tested on: amd64, i386, ia64


Revision 131952 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 10 23:47:20 2004 UTC (19 years, 11 months ago) by marcel
File length: 15178 byte(s)
Diff to previous 121989
Mega update for the KDB framework: turn DDB into a KDB backend.
Most of the changes are a direct result of adding thread awareness.
Typically, DDB_REGS is gone. All registers are taken from the
trapframe and backtraces use the PCB based contexts. DDB_REGS was
defined to be a trapframe on all platforms anyway.
Thread awareness introduces the following new commands:
	thread X	switch to thread X (where X is the TID),
	show threads	list all threads.

The backtrace code has been made more flexible so that one can
create backtraces for any thread by giving the thread ID as an
argument to trace.

With this change, ia64 has support for breakpoints.


Revision 121989 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 3 22:07:21 2003 UTC (20 years, 8 months ago) by jhb
File length: 16558 byte(s)
Diff to previous 119452
Update names of entry points for interrupt frames.


Revision 119452 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 25 09:48:48 2003 UTC (20 years, 10 months ago) by obrien
File length: 16551 byte(s)
Diff to previous 115683
Fix copyright comment & FBSDID style nits.

Requested by:	bde


Revision 115683 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 2 06:43:15 2003 UTC (21 years, 1 month ago) by obrien
File length: 16554 byte(s)
Diff to previous 115545
Use __FBSDID().


Revision 115545 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 31 20:24:30 2003 UTC (21 years, 1 month ago) by phk
File length: 16520 byte(s)
Diff to previous 108338
Remove break after return;

Found by:       FlexeLint


Revision 108338 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 28 01:23:07 2002 UTC (21 years, 6 months ago) by julian
File length: 16534 byte(s)
Diff to previous 105554
Add code to ddb to allow backtracing an arbitrary thread.
(show thread {address})

Remove the IDLE kse state and replace it with a change in
the way threads sahre KSEs. Every KSE now has a thread, which is
considered its "owner" however a KSE may also be lent to other
threads in the same group to allow completion of in-kernel work.
n this case the owner remains the same and the KSE will revert to the
owner when the other work has been completed.

All creations of upcalls etc. is now done from
kse_reassign() which in turn is called from mi_switch or
thread_exit(). This means that special code can be removed from
msleep() and cv_wait().

kse_release() does not leave a KSE with no thread any more but
converts the existing thread into teh KSE's owner, and sets it up
for doing an upcall. It is just inhibitted from being scheduled until
there is some reason to do an upcall.

Remove all trace of the kse_idle queue since it is no-longer needed.
"Idle" KSEs are now on the loanable queue.


Revision 105554 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 20 20:48:56 2002 UTC (21 years, 8 months ago) by phk
File length: 15295 byte(s)
Diff to previous 103682
Change the definition of the debugging registers to be an array, so
that we can index into it, rather than do pointer gymnastics on a
structure containing 8 elements.

Verified by:	MD5 hash on the produced .o files.


Revision 103682 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 20 13:58:21 2002 UTC (21 years, 9 months ago) by jhb
File length: 15273 byte(s)
Diff to previous 103681
fork_trampoline() marks a trap frame.

Submitted by:	bde


Revision 103681 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 20 13:56:11 2002 UTC (21 years, 9 months ago) by jhb
File length: 15227 byte(s)
Diff to previous 103680
Use proper type for a variable used as a DDB symbol.


Revision 103680 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 20 13:54:45 2002 UTC (21 years, 9 months ago) by jhb
File length: 15216 byte(s)
Diff to previous 103679
Trim includes.

Submitted by:	bde


Revision 103679 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 20 13:53:33 2002 UTC (21 years, 9 months ago) by jhb
File length: 15241 byte(s)
Diff to previous 103646
Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde


Revision 103646 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 19 18:46:29 2002 UTC (21 years, 9 months ago) by jhb
File length: 15276 byte(s)
Diff to previous 100781
Implement db_print_backtrace() if DDB is compiled into the kernel.  This
MD function is just a wrapper around db_stack_trace_cmd() that prints out
a backtrace of curthread.  Currently, this function is only implemented
on i386 and alpha (and the alpha version isn't quite tested yet, will do
that in a bit).  Other changes:

- For i386, fix a bug in the raw frame address case.  The eip we extract
  from the passed in frame address does not match the frame we received.
  Thus, instead of printing a bogus frame with the wrong eip, go ahead
  and advance frame down to the same frame as the eip we are using.
- For alpha, attempt to add a way of doing a raw trace for alpha.  Instead
  of passing a frame address in 'addr', pass in a pointer to a structure
  containing PC and KSP and use those to start the backtrace.  The alpha
  db_print_backtrace() uses asm to read in the current PC and KSP values
  into such a request.

Tested on:	i386
Requested by:	many


Revision 100781 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 28 00:27:51 2002 UTC (21 years, 11 months ago) by peter
File length: 15109 byte(s)
Diff to previous 93017
Unwind the syscall_with_err_pushed tweak that jake did some time back.

OK'ed by:	jake


Revision 93017 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 23 14:27:06 2002 UTC (22 years, 3 months ago) by bde
File length: 15043 byte(s)
Diff to previous 92770
Fixed some style bugs in the removal of __P(()).  The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.


Revision 92770 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 20 08:56:31 2002 UTC (22 years, 3 months ago) by alfred
File length: 15071 byte(s)
Diff to previous 90361
Remove __P.


Revision 90361 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 7 20:58:47 2002 UTC (22 years, 4 months ago) by julian
File length: 15151 byte(s)
Diff to previous 84733
Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.

Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,


Revision 84733 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 9 19:54:52 2001 UTC (22 years, 8 months ago) by iedowse
File length: 15138 byte(s)
Diff to previous 83366
Remove the Xresume* labels from the i386 interrupt handlers; the
code in ipl.s and icu_ipl.s that used them was removed when the
interrupt thread system was committed. Debuggers also knew about
Xresume* because these labels hide the real names of the interrupt
handlers (Xintr*), and debuggers need to special-case interrupt
handlers to get the interrupt frame.

Both gdb and ddb will now use the Xintr* and Xfastintr* symbols to
detect interrupt frames. Fast interrupt frames were never identified
correctly before, so this fixes the problem of the running stack
frame getting lost in a ddb or gdb trace generated from a fast
interrupt - e.g. when debugging a simple infinite loop in the kernel
using a serial console, the frame containing the loop would never
appear in a gdb or ddb trace.

Reviewed by:	jhb, bde


Revision 83366 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 12 08:38:13 2001 UTC (22 years, 9 months ago) by julian
File length: 15100 byte(s)
Diff to previous 79573
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha


Revision 79573 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 11 03:15:25 2001 UTC (22 years, 11 months ago) by bsd
File length: 15010 byte(s)
Diff to previous 78903
Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and
'dwatch'.  The new commands install hardware watchpoints if supported
by the architecture and if there are enough registers to cover the
desired memory area.

No objection by: audit@, hackers@

MFC after: 2 weeks


Revision 78903 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 28 02:08:13 2001 UTC (23 years ago) by bsd
File length: 11254 byte(s)
Diff to previous 78426
Provide access to the IA32 hardware debug registers from the ddb
kernel debugger.  Proper use of these registers allows setting
hardware watchpoints for use in kernel debugging.

MFC after: 2 weeks


Revision 78426 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 18 19:17:30 2001 UTC (23 years ago) by jhb
File length: 10379 byte(s)
Diff to previous 75357
- Add support for decoding syscall names.  (Brought over from the new alpha
  trace code that was brought over from NetBSD.)
- Check for "syscall_with_err_pushed" as the label prior to a syscall trap
  frame rather than "Xlcall_syscall" and "Xint0x80_syscall".  We don't
  have a valid trapframe during the short range of code that those two
  symbols now cover.
- Simplify db_next_frame() to avoid duplicating the code for the different
  trap frame types.
- Don't try to trace a swapped-out process.  (Brought over from NetBSD via
  the new alpha trace code.)


Revision 75357 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 9 21:43:45 2001 UTC (23 years, 2 months ago) by jhb
File length: 9806 byte(s)
Diff to previous 73001
- One can now specify the decimal pid of a process to trace as a parameter.
  Since pid's are not in the kernel address space, this doesn't conflict
  with the funcionality of specifying an arbitrary frame pointer to the
  trace command.
- If the first function of a backtrace maps to fork_trampoline, then this
  is a newly fork'd process that has not been executed yet, so just print
  out the first frame and then return for that case.
- Lower the default count from 65535 to 1024.  ddb doesn't trace into
  userland, and if the stack gets hosed and starts looping it's less
  annoying.


Revision 73001 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 25 02:53:06 2001 UTC (23 years, 4 months ago) by jake
File length: 8507 byte(s)
Diff to previous 72145
- Rename the lcall system call handler from Xsyscall to Xlcall_syscall
  to be more like Xint0x80_syscall and less like c function syscall().
- Reduce code duplication between the int0x80 and lcall handlers by
  shuffling the elfags into the right place, saving the sizeof the
  instruction in tf_err and jumping into the common int0x80 code.

Reviewed by:	peter


Revision 72145 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 7 22:41:47 2001 UTC (23 years, 4 months ago) by jhb
File length: 8602 byte(s)
Diff to previous 71244
When SMPng was first committed, we removed 'cpl' from the interrupt
frame.  Teach ddb about this as there is one less word for it to skip
over when finding a trapframe on the interrupt frame stack.


Revision 71244 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 19 10:49:20 2001 UTC (23 years, 5 months ago) by peter
File length: 8602 byte(s)
Diff to previous 50477
Catch a few alternative names for the syscall entry frame, eg: post-ELF
and int $0x80 entry methods.


Revision 50477 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 28 01:08:13 1999 UTC (24 years, 10 months ago) by peter
File length: 8459 byte(s)
Diff to previous 46129
$Id$ -> $FreeBSD$


Revision 46129 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 28 01:04:33 1999 UTC (25 years, 2 months ago) by luoqi
File length: 8505 byte(s)
Diff to previous 43314
Enable vmspace sharing on SMP. Major changes are,
- %fs register is added to trapframe and saved/restored upon kernel entry/exit.
- Per-cpu pages are no longer mapped at the same virtual address.
- Each cpu now has a separate gdt selector table. A new segment selector
  is added to point to per-cpu pages, per-cpu global variables are now
  accessed through this new selector (%fs). The selectors in gdt table are
  rearranged for cache line optimization.
- fask_vfork is now on as default for both UP and SMP.
- Some aio code cleanup.

Reviewed by:	Alan Cox	<alc@cs.rice.edu>
		John Dyson	<dyson@iquest.net>
		Julian Elischer	<julian@whistel.com>
		Bruce Evans	<bde@zeta.org.au>
		David Greenman	<dg@root.com>


Revision 43314 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 28 01:59:53 1999 UTC (25 years, 5 months ago) by dillon
File length: 8505 byte(s)
Diff to previous 43309
    Fix warnings in preparation for adding -Wall -Wcast-qual to the
    kernel compile


Revision 43309 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 27 23:45:44 1999 UTC (25 years, 5 months ago) by dillon
File length: 8432 byte(s)
Diff to previous 37679
    Fix warnings in preparation for adding -Wall -Wcast-qual to the
    kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.


Revision 37679 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 15 11:27:11 1998 UTC (25 years, 11 months ago) by bde
File length: 8406 byte(s)
Diff to previous 37506
%n in a comment was a poor abbreviation for Immediate-byte-signed,
especially now that %n format has almost gone away.


Revision 37506 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 8 10:53:58 1998 UTC (26 years ago) by bde
File length: 8404 byte(s)
Diff to previous 37504
Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.


Revision 37504 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 8 09:11:43 1998 UTC (26 years ago) by bde
File length: 8404 byte(s)
Diff to previous 36735
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.


Revision 36735 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 7 17:13:14 1998 UTC (26 years, 1 month ago) by dfr
File length: 8531 byte(s)
Diff to previous 31318
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.


Revision 31318 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 20 18:24:52 1997 UTC (26 years, 7 months ago) by bde
File length: 8515 byte(s)
Diff to previous 30789
Fixed wrong limits for the kernel text in db_numargs().  The
interval [VM_MIN_KERNEL_ADDRESS, etext] was used instead of
[btext, etext).  Added a comment about this being completely
wrong for LKMs.  This only affects interpreting the instructions
after the return to attempt decide the number of args.  The
attempt usually fails anyway.


Revision 30789 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 27 17:23:18 1997 UTC (26 years, 8 months ago) by bde
File length: 8365 byte(s)
Diff to previous 28496
Moved declaration of etext from <machine/md_var.h> to <machine/cpu.h>
and fixed everything that dependended on it being declared in the old
place.  It is used in "machine-independent" code in subr_prof.c.

Moved declaration of btext from subr_prof.c to <machine/cpu.h>.  It
is machine-dependent.


Revision 28496 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 21 06:33:04 1997 UTC (26 years, 10 months ago) by charnier
File length: 8398 byte(s)
Diff to previous 28359
Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.


Revision 28359 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 18 06:58:59 1997 UTC (26 years, 10 months ago) by charnier
File length: 8384 byte(s)
Diff to previous 27535
Use CS_SECURE macro.
Reviewed by:	John Dyson


Revision 27535 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 20 08:37:24 1997 UTC (26 years, 11 months ago) by bde
File length: 8395 byte(s)
Diff to previous 25175
Removed unused #includes.


Revision 25175 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 26 19:12:03 1997 UTC (27 years, 2 months ago) by peter
File length: 8463 byte(s)
Diff to previous 25164
Remove the curproc printing on trap/interrupt/etc.  It's outlived it's
usefulness, and there were problems with it anyway.

Found by: bde


Revision 25164 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 26 11:46:25 1997 UTC (27 years, 2 months ago) by peter
File length: 8756 byte(s)
Diff to previous 23230
Man the liferafts!  Here comes the long awaited SMP -> -current merge!

There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people.  A special thanks to Steve Passe for implementing
the APIC code!


Revision 23230 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 1 05:44:09 1997 UTC (27 years, 4 months ago) by ache
File length: 8461 byte(s)
Diff to previous 23206
Add missing #include <machine/segments.h> for ISPL and SEL_UPL macros


Revision 23206 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 28 12:36:18 1997 UTC (27 years, 4 months ago) by bde
File length: 8433 byte(s)
Diff to previous 22975
Print function args in the current radix instead of always in hex.

Print the stack pointer together with the frame pointer in the trap,
syscall and interrupt messages.  The frame pointer is not very useful
for locating syscall args since syscall functions don't have a frame
pointer.

Print all the numbers in the trap, syscall and interrupt messages in
the default radix.  The syscall number was confusing because it was
printed in decimal.

Use %#n format more and 0x%x less.  0x%x of course doesn't work with
a variable radix.  ddb is now fairly consistent about using %+#n to
print all numbers.  It omits the '+' for signed numbers the '#' in a
few cases (e.g., for function args) to save space.


Revision 22975 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 22 09:48:43 1997 UTC (27 years, 4 months ago) by peter
File length: 8236 byte(s)
Diff to previous 22521
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.


Revision 22521 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 10 02:22:35 1997 UTC (27 years, 4 months ago) by dyson
File length: 8241 byte(s)
Diff to previous 21673
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>


Revision 21673 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 14 07:20:47 1997 UTC (27 years, 5 months ago) by jkh
File length: 8240 byte(s)
Diff to previous 14834
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.


Revision 14834 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 27 17:06:03 1996 UTC (28 years, 3 months ago) by bde
File length: 8286 byte(s)
Diff to previous 12958
Fixed traceback for the following cases:
- legitimate null frames from idle() (traceback was aborted after a null
  pointer trap)
- second instruction of normal function prologue, and last instruction of
  a function (caller wasn't reported).

Reviewed by:	davidg


Revision 12958 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 22 07:09:24 1995 UTC (28 years, 6 months ago) by dg
File length: 7381 byte(s)
Diff to previous 12952
Fix a small logic bug that caused the arguments of the previous frame to
be used instead of the ones for the current frame if a breakpoint had been
set at the entry to a function.


Revision 12952 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 21 19:20:58 1995 UTC (28 years, 6 months ago) by dg
File length: 7316 byte(s)
Diff to previous 12471
Rewrote most of the ddb stack traceback code. These changes are smarter
about decoding trap/syscall/interrupt frames and generally works better
than the previous stuff.
Removed some special (incorrect) frobbing of the frame pointer that
was messing some things up with the new traceback code.


Revision 12471 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 24 13:27:24 1995 UTC (28 years, 7 months ago) by bde
File length: 9030 byte(s)
Diff to previous 8876
Staticized.  Moved some ero-initialized values to the bss.

Added prototypes.


Revision 8876 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 30 08:16:23 1995 UTC (29 years, 1 month ago) by rgrimes
File length: 8796 byte(s)
Diff to previous 7090
Remove trailing whitespace.


Revision 7090 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 16 18:17:34 1995 UTC (29 years, 3 months ago) by bde
File length: 8812 byte(s)
Diff to previous 6806
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.


Revision 6806 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 1 21:37:44 1995 UTC (29 years, 4 months ago) by dg
File length: 8806 byte(s)
Diff to previous 2056
Slight change to include file order to accommodate upcoming changes.


Revision 2056 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 13 03:50:34 1994 UTC (29 years, 10 months ago) by wollman
File length: 8805 byte(s)
Diff to previous 1890
Change all #includes to follow the current Berkeley style.  Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles.  This is not
quite complete yet, as `config' doesn't yet do the right thing.  You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make


Revision 1890 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 6 10:25:50 1994 UTC (29 years, 11 months ago) by dg
File length: 8794 byte(s)
Diff to previous 1549
Fixed various prototype problems with the pmap functions and the subsequent
problems that fixing them caused.


Revision 1549 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 25 09:21:21 1994 UTC (30 years, 1 month ago) by rgrimes
File length: 8800 byte(s)
Diff to previous 974
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman


Revision 974 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 14 16:25:31 1994 UTC (30 years, 5 months ago) by dg
File length: 8785 byte(s)
Diff to previous 924
"New" VM system from John Dyson & myself. For a run-down of the
major changes, see the log of any effected file in the sys/vm
directory (swap_pager.c for instance).


Revision 924 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 3 07:55:47 1994 UTC (30 years, 6 months ago) by dg
File length: 8683 byte(s)
Diff to previous 879
Convert syscall to trapframe. Based on work done by John Brezak.


Revision 879 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 19 00:55:01 1993 UTC (30 years, 6 months ago) by wollman
File length: 6831 byte(s)
Diff to previous 620
Make everything compile with -Wtraditional.  Make it easier to distribute
a binary link-kit.  Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.

NB: -Wtraditional will henceforth be forgotten.  This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax.  These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.


Revision 620 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 16 14:15:10 1993 UTC (30 years, 8 months ago) by rgrimes
File length: 6772 byte(s)
Diff to previous 5
Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc


Revision 5 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jun 12 14:58:17 1993 UTC (31 years ago) by rgrimes
File length: 7577 byte(s)
Copied from: cvs2svn/branches/unlabeled-1.1.1/sys/i386/i386/db_trace.c revision 4
Diff to previous 4
This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches.


Revision 4 - (view) (download) (annotate) - [select for diffs]
Added Sat Jun 12 14:58:17 1993 UTC (31 years ago) by rgrimes
Original Path: cvs2svn/branches/unlabeled-1.1.1/sys/i386/i386/db_trace.c
File length: 7577 byte(s)
Initial import, 0.1 + pk 0.2.4-B1


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27