Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/amd64/amd64/db_trace.c

[BACK] Up to [FreeBSD] / src / sys / amd64 / amd64

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.86.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.86.2.1: preferred, colored
Changes since revision 1.86.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.86.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.80.2.3.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.80.2.3: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.2.3: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.85.2.2.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.85.2.2: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.2.2: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.85.2.2.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.85.2.2: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.2.2: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.85.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 7 02:24:41 2010 UTC (22 months ago) by nwhitehorn
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP
Branch point for: RELENG_8_2, RELENG_8_1
Diff to: previous 1.85.2.1: preferred, colored; branchpoint 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.2.1: +1 -1 lines
SVN rev 206336 on 2010-04-07 02:24:41Z by nwhitehorn

MFC r205014,205015:

Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

This MFC is required for MFCs of later changes to the freebsd32
compatibility from HEAD.

Requested by:	kib

Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Mar 11 14:49:06 2010 UTC (23 months ago) by nwhitehorn
Branches: MAIN
CVS tags: RELENG_9_BP, HEAD
Branch point for: RELENG_9
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +1 -1 lines
SVN rev 205014 on 2010-03-11 14:49:06Z by nwhitehorn

Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

Reviewed by:	kib, jhb

Revision 1.80.2.3.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.80.2.3: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.2.3: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.85.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.85.2.1: preferred, colored; next MAIN 1.85.2.2: preferred, colored
Changes since revision 1.85.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.85.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.80.2.3.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.80.2.3: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.2.3: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Apr 1 13:09:26 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -4 lines
SVN rev 190620 on 2009-04-01 13:09:26Z by kib

Save and restore segment registers on amd64 when entering and leaving
the kernel on amd64. Fill and read segment registers for mcontext and
signals. Handle traps caused by restoration of the
invalidated selectors.

Implement user-mode creation and manipulation of the process-specific
LDT descriptors for amd64, see sysarch(2).

Implement support for TSS i/o port access permission bitmap for amd64.

Context-switch LDT and TSS. Do not save and restore segment registers on
the context switch, that is handled by kernel enter/leave trampolines
now. Remove segment restore code from the signal trampolines for
freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason.

Implement amd64-specific compat shims for sysarch.

Linuxolator (temporary ?) switched to use gsbase for thread_area pointer.

TODO:
Currently, gdb is not adapted to show segment registers from struct reg.
Also, no machine-depended ptrace command is added to set segment
registers for debugged process.

In collaboration with:	pho
Discussed with:	peter
Reviewed by:	jhb
Linuxolator tested by:	dchagin

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Mar 17 00:48:11 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -0 lines
SVN rev 189903 on 2009-03-17 00:48:11Z by jkim

Initial suspend/resume support for amd64.

This code is heavily inspired by Takanori Watanabe's experimental SMP patch
for i386 and large portion was shamelessly cut and pasted from Peter Wemm's
AP boot code.

Revision 1.80.2.2.2.2: download - view: text, markup, annotated - select for diffs
Fri Dec 12 13:21:31 2008 UTC (3 years, 1 month ago) by kib
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.80.2.2.2.1: preferred, colored; branchpoint 1.80.2.2: preferred, colored; next MAIN 1.80.2.3: preferred, colored
Changes since revision 1.80.2.2.2.1: +6 -0 lines
SVN rev 185986 on 2008-12-12 13:21:31Z by kib

MFC r185634:
Improve db_backtrace() for compat ia32 on amd64. 32bit image enters
the kernel via Xint0x80_syscall().

Approved by:	re (kensmith)

Revision 1.80.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 12 13:09:52 2008 UTC (3 years, 1 month ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP, RELENG_7_2_BP
Branch point for: RELENG_7_4, RELENG_7_3, RELENG_7_2
Diff to: previous 1.80.2.2: preferred, colored; branchpoint 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.2.2: +6 -0 lines
SVN rev 185985 on 2008-12-12 13:09:52Z by kib

MFC r185634:
Improve db_backtrace() for compat ia32 on amd64. 32bit image enters
the kernel via Xint0x80_syscall().

Approved by:	re (kensmith)

Revision 1.83: download - view: text, markup, annotated - select for diffs
Fri Dec 5 11:34:36 2008 UTC (3 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +6 -0 lines
SVN rev 185634 on 2008-12-05 11:34:36Z by kib

Improve db_backtrace() for compat ia32 on amd64. 32bit image enters
the kernel via Xint0x80_syscall().

Submitted by:	dchagin
MFC after:	1 week

Revision 1.80.2.2.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
Diff to: previous 1.80.2.2: preferred, colored
Changes since revision 1.80.2.2: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.66.2.3.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.66.2.3: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.3: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.80.2.2: download - view: text, markup, annotated - select for diffs
Thu Apr 10 22:09:20 2008 UTC (3 years, 10 months ago) by rwatson
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.80.2.1: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.2.1: +1 -38 lines
Merge stack.9:1.5, amd64/db_trace.c:1.82, amd64/stack_machdep.c:1.1,
amd64/conf/GENERIC:1.489, amd64/include/stack.h:1.1, arm/db_trace.c:1.14,
arm/stack_machdep.c:1.1, arm/include/stack.h:1.1, NOTES:1.1457,
files:1.1254, files.amd64:1.115, files.arm:1.19, files.i386:1.588,
files.ia64:1.94, files.powerpc:1.67, files.sparc64:1.93, files.sun4v:1.13,
options:1.610, i386/conf/GENERIC:1.478, i386/db_trace.c:1.80,
i386/stack_machdep.c:1.1, i386/include/stack.h:1.1, ia64/conf/GENERIC:1.93,
ia64/db_machdep.c:1.6, ia64/stack_machdep.c:1.1, kern/subr_stack.c:1.5,
pc98/conf/GENERIC:1.299, powerpc/conf/GENERIC:1.73,
powerpc/include/stack.h:1.1, powerpc/db_trace.c:1.14,
powerpc/stack_machdep.c:1.1, sparc64/conf/GENERIC:1.129,
sparc64/include/stack.h:1.1, sparc64/db_trace.c:1.27,
sparc64/stack_machdep.c:1.1, sun4v/conf/GENERIC:1.16,
sun4v/include/stack.h:1.1, sun4v/db_trace.c:1.2, sun4v/stack_machdep.c:1.1,
sys/stack.h:1.4 from HEAD to RELENG_7:

  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)

Merge i386/stack_machdep.c:1.2 from HEAD to RELENG_7:

  Remove duplicate $FreeBSD$ tag.

Merge files.pc98:1.359, pc98/include/stack.h:1.1 from HEAD to RELENG_7:

  Catch up pc98 for i386 stack(9) changes:

    Add stub stack.h for pc98 that includes i386 pc98.

    Add i386 stack_machdep.c to files.pc98.

  Spotted by:     tinderbox

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Dec 2 20:40:30 2007 UTC (4 years, 2 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +1 -38 lines
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 1.66.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 21 16:41:51 2007 UTC (4 years, 2 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.66.2.2: preferred, colored; branchpoint 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.2: +2 -1 lines
MFC: Add support for debugging double fault frames.

Approved by:	re (kensmith)

Revision 1.80.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 21 16:38:54 2007 UTC (4 years, 2 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -1 lines
MFC: Add support for debugging double fault frames.

Approved by:	re (kensmith)

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Nov 15 22:00:56 2007 UTC (4 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -1 lines
Add support for cross double fault frames in stack traces:
- Populate the register values for the trapframe put on the stack by the
  double fault handler.
- Teach DDB's trace routine to treat a double fault like other trap frames.

MFC after:	3 days

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Nov 17 20:27:00 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +14 -4 lines
Add support for 8 byte hardware watches in long mode.  Kernel hardware
watches support 8 byte watches.  For userland, we disallow 8 byte watches
for 32-bit tasks.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Nov 17 19:20:31 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +33 -30 lines
- 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 1.78: download - view: text, markup, annotated - select for diffs
Fri Nov 17 16:37:35 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -4 lines
A few more style fixes.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Nov 15 19:53:47 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +35 -36 lines
Various whitespace and style fixes.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Oct 20 09:44:20 2006 UTC (5 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +2 -1 lines
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 1.75: download - view: text, markup, annotated - select for diffs
Wed Jul 12 21:22:42 2006 UTC (5 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -4 lines
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 1.74: download - view: text, markup, annotated - select for diffs
Mon Mar 13 23:56:44 2006 UTC (5 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +8 -0 lines
MFi386: add a TRAP_INTERRUPT case

Revision 1.66.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 13 03:03:51 2006 UTC (5 years, 11 months ago) by jeff
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.66.2.1: preferred, colored; branchpoint 1.66: preferred, colored
Changes since revision 1.66.2.1: +29 -1 lines
MFC Rev 1.72
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)

Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue Dec 27 23:23:47 2005 UTC (6 years, 1 month ago) by pjd
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
Fix watch address truncation. The address was truncated when it was passed to
amd64_set_watch() as 'unsigned int' and 'unsigned int' is 32bit long on amd64.

Even with that fix hardware watchpoint don't work for me on amd64, ie. when
I set the watchpoint and write a byte there, nothing happens.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Dec 23 21:33:55 2005 UTC (6 years, 1 month ago) by jeff
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -1 lines
 - 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 1.71: download - view: text, markup, annotated - select for diffs
Thu Dec 8 18:33:29 2005 UTC (6 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +5 -2 lines
MFi386:
- Move PUSH_FRAME and POP_FRAME to asmacros.h and use PUSH_FRAME in
  atpic entry points.
- Move PCPU_* asm macros out of the middle of the asm profiling macros.
- Pass IRQ vector argument as an int rather than void * to reduce diffs
  with i386.
- EOI the lapic in C for the lapic timer handler.
- GC unused Xcpuast function.
- Split IPI_STOP handling code of ipi_nmi_handler() out into a
  cpustop_handler() function and call it from Xcpustop rather than
  duplicating all the logic in assembly.
- Fixup the list of symbols with interrupt frames in ddb traces.
  Xatpic_fastintr* have never existed on amd64, and the lapic timer
  handler and various IPI handlers were missing.
- Use trapframe instead of intrframe for interrupt entry points (on amd64
  the interrupt vector was already a separate argument, so the two frames
  were already identical) and GC intrframe.

Submitted by:	peter (3)

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Sep 10 03:01:24 2005 UTC (6 years, 5 months ago) by marcel
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +0 -3 lines
Move the prototypes of db_md_set_watchpoint(), db_md_clr_watchpoint()
and db_md_list_watchpoints() to ddb/ddb.h.

Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 3 11:57:28 2005 UTC (6 years, 5 months ago) by jkoshy
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -1 lines
MFC: { db_trace.c:1.69, exception.S:1.127, genassym.c:1.156, trap.c:1.290 }

- Special-case NMI handling on the AMD64.

  On entry or exit from the kernel the 'alltraps' and 'doreti' the code
  used by normal traps disables interrupts to protect the critical sections
  where it is setting up %gs.

  This protection is insufficient in the presence of NMIs since NMIs
  can be taken even when the processor has disabled normal interrupts.
  Thus the NMI handler needs to actually read MSR_GBASE on entry to
  the kernel to determine whether a swap of %gs using 'swapgs' is
  needed.  However, reads of MSRs are expensive and integrating this
  check into the 'alltraps'/'doreti' path would penalize normal
  interrupts.

- Teach DDB about the 'nmi_calltrap' symbol.

Reviewed by:	bde, peter (an older version) and ups
Approved by:	re (scottl)

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat Aug 27 16:03:39 2005 UTC (6 years, 5 months ago) by jkoshy
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -1 lines
- Special-case NMI handling on the AMD64.

  On entry or exit from the kernel the 'alltraps' and 'doreti' code
  used taken by normal traps disables interrupts to protect the
  critical sections where it is setting up %gs.

  This protection is insufficient in the presence of NMIs since NMIs
  can be taken even when the processor has disabled normal interrupts.
  Thus the NMI handler needs to actually read MSR_GBASE on entry to
  the kernel to determine whether a swap of %gs using 'swapgs' is
  needed.  However, reads of MSRs are expensive and integrating this
  check into the 'alltraps'/'doreti' path would penalize normal
  interrupts.

- Teach DDB about the 'nmi_calltrap' symbol.

Reviewed by:	bde, peter (older versions of this change)

Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed Aug 3 04:33:48 2005 UTC (6 years, 6 months ago) by jeff
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +23 -0 lines
- 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 1.67: download - view: text, markup, annotated - select for diffs
Wed Aug 3 04:21:51 2005 UTC (6 years, 6 months ago) by jeff
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -1 lines
 - Improve the definition of INKERNEL() to include the DMAP area and the
   proper start of the kernel area.

Discussed with:	peter

Revision 1.62.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 14 03:21:01 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.62.2.2: preferred, colored; branchpoint 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62.2.2: +8 -2 lines
MFC: rev 1.66: use %rip - 1 for the symbol search address (for noreturn funcs).

Revision 1.62.2.2: download - view: text, markup, annotated - select for diffs
Sun Jan 30 00:59:13 2005 UTC (7 years ago) by imp
Branches: RELENG_5
Diff to: previous 1.62.2.1: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.2.1: +1 -1 lines
MFC: /*- and my license changes for sys/[a-d]*

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Jan 21 05:54:05 2005 UTC (7 years ago) by peter
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +8 -2 lines
MFi386: use %rip - 1 for the symbol search address (for noreturn funcs)

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Jan 5 20:17:20 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -1 lines
Begin all license/copyright comments with /*-

Revision 1.62.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 23 21:08:13 2004 UTC (7 years, 2 months ago) by jhb
Branches: RELENG_5
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -2 lines
MFC: Enhancements to the ddb "experience":
- Add paging support to the various MD stack trace handlers.
- Allow the number of lines per page to be adjusted via the $lines
  variable in ddb.  Setting this variable to 0 effectively disables
  paging.
- Fix the sparc64 userland stack trace to honor the total count argument
  so it won't loop forever in some cases.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Mon Nov 1 22:15:13 2004 UTC (7 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -1 lines
- 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 1.63: download - view: text, markup, annotated - select for diffs
Mon Sep 20 19:05:31 2004 UTC (7 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -2 lines
- 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 1.62: download - view: text, markup, annotated - select for diffs
Wed Jul 21 05:07:08 2004 UTC (7 years, 6 months ago) by marcel
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +0 -14 lines
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 1.61: download - view: text, markup, annotated - select for diffs
Sat Jul 10 23:47:18 2004 UTC (7 years, 7 months ago) by marcel
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +191 -225 lines
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 1.60: download - view: text, markup, annotated - select for diffs
Wed Jan 28 23:57:40 2004 UTC (8 years ago) by peter
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -33 lines
Un-stub the hardware debug register stuff.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Nov 17 08:58:12 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -2 lines
Initial landing of SMP support for FreeBSD/amd64.

- This is heavily derived from John Baldwin's apic/pci cleanup on i386.
- I have completely rewritten or drastically cleaned up some other parts.
  (in particular, bootstrap)
- This is still a WIP.  It seems that there are some highly bogus bioses
  on nVidia nForce3-150 boards.  I can't stress how broken these boards
  are.  I have a workaround in mind, but right now the Asus SK8N is broken.
  The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed.
- Most of my testing has been with SCHED_ULE.  SCHED_4BSD works.
- the apic and acpi components are 'standard'.
- If you have an nVidia nForce3-150 board, you are stuck with 'device
  atpic' in addition, because they somehow managed to forget to connect the
  8254 timer to the apic, even though its in the same silicon!  ARGH!
  This directly violates the ACPI spec.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Jul 25 21:15:44 2003 UTC (8 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -2 lines
Use __FBSDID().

Brought to you by:	a boring talk at Ottawa Linux Symposium

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat May 31 22:02:11 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2 lines
MFi386: rev 1.56: remove break after return

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri May 30 01:01:07 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +137 -99 lines
Initial port to amd64 after repocopy from i386.  Note that the
disassembler has not been updated yet, and will do some very strange
things.  It does tracebacks (without function arguments due to regparm
calling conventions) if -fno-omit-frame-pointer is used (to come later).
This achieves basic functionality.

Approved by:	re (amd64/* blanket)

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Dec 28 01:23:06 2002 UTC (9 years, 1 month ago) by julian
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +50 -2 lines
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 1.54: download - view: text, markup, annotated - select for diffs
Sun Oct 20 20:48:56 2002 UTC (9 years, 3 months ago) by phk
Branches: MAIN
CVS tags: old_RELENG_5_0_BP, old_RELENG_5_0_0_RELEASE, old_RELENG_5_0
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +10 -10 lines
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 1.53: download - view: text, markup, annotated - select for diffs
Fri Sep 20 13:58:21 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -1 lines
fork_trampoline() marks a trap frame.

Submitted by:	bde

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Sep 20 13:56:11 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -1 lines
Use proper type for a variable used as a DDB symbol.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Sep 20 13:54:45 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -2 lines
Trim includes.

Submitted by:	bde

Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Sep 20 13:53:33 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +25 -32 lines
Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Sep 19 18:46:29 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +9 -0 lines
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 1.48: download - view: text, markup, annotated - select for diffs
Sun Jul 28 00:27:51 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -1 lines
Unwind the syscall_with_err_pushed tweak that jake did some time back.

OK'ed by:	jake

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Mar 23 14:27:06 2002 UTC (9 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
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 1.46: download - view: text, markup, annotated - select for diffs
Wed Mar 20 08:56:31 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +11 -11 lines
Remove __P.

Revision 1.35.2.3: download - view: text, markup, annotated - select for diffs
Thu Feb 21 22:31:25 2002 UTC (9 years, 11 months ago) by silby
Branches: old_RELENG_4
CVS tags: old_RELENG_4_8_BP, old_RELENG_4_8_0_RELEASE, old_RELENG_4_8, old_RELENG_4_7_BP, old_RELENG_4_7_0_RELEASE, old_RELENG_4_7, old_RELENG_4_6_BP, old_RELENG_4_6_2_RELEASE, old_RELENG_4_6_1_RELEASE, old_RELENG_4_6_0_RELEASE, old_RELENG_4_6
Diff to: previous 1.35.2.2: preferred, colored; branchpoint 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35.2.2: +81 -26 lines
MFC rev 1.39:
- 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.

Partial MFC of rev 1.40:
- Don't try to trace a swapped-out process.  (Brought over from NetBSD via
  the new alpha trace code.)

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Feb 7 20:58:43 2002 UTC (10 years ago) by julian
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2 lines
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 1.44: download - view: text, markup, annotated - select for diffs
Tue Oct 9 19:54:48 2001 UTC (10 years, 4 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -2 lines
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 1.43: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:37:29 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: old_KSE_MILESTONE_2
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +8 -5 lines
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 1.35.2.2: download - view: text, markup, annotated - select for diffs
Wed Jul 25 01:00:09 2001 UTC (10 years, 6 months ago) by bsd
Branches: old_RELENG_4
CVS tags: old_RELENG_4_5_BP, old_RELENG_4_5_0_RELEASE, old_RELENG_4_5, old_RELENG_4_4_BP, old_RELENG_4_4_0_RELEASE, old_RELENG_4_4
Diff to: previous 1.35.2.1: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.2.1: +202 -2 lines
MFC new hwatch/dhwatch ddb commands for setting/deleting hardware
watchpoints within ddb.

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 12 02:57:11 2001 UTC (10 years, 7 months ago) by bsd
Branches: old_RELENG_4
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +57 -16 lines
MFC Rev 1.41 db_trace.c
MFC Rev 1.83 support.s
MFC Rev 1.105 cpufunc.h

  Provide access to the IA32 hardware debug registers from the ddb
  kernel debugger.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Jul 11 03:15:25 2001 UTC (10 years, 7 months ago) by bsd
Branches: MAIN
CVS tags: old_KSE_PRE_MILESTONE_2
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +202 -2 lines
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 1.41: download - view: text, markup, annotated - select for diffs
Thu Jun 28 02:08:13 2001 UTC (10 years, 7 months ago) by bsd
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +57 -16 lines
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 1.40: download - view: text, markup, annotated - select for diffs
Mon Jun 18 19:17:30 2001 UTC (10 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +62 -38 lines
- 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 1.39: download - view: text, markup, annotated - select for diffs
Mon Apr 9 21:43:45 2001 UTC (10 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +74 -26 lines
- 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 1.38: download - view: text, markup, annotated - select for diffs
Sun Feb 25 02:53:04 2001 UTC (10 years, 11 months ago) by jake
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -5 lines
- 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 1.37: download - view: text, markup, annotated - select for diffs
Wed Feb 7 22:41:47 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
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 1.36: download - view: text, markup, annotated - select for diffs
Fri Jan 19 10:49:20 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -2 lines
Catch a few alternative names for the syscall entry frame, eg: post-ELF
and int $0x80 entry methods.

Revision 1.11.4.2: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:29:16 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_1_0
Diff to: previous 1.11.4.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.4.1: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.15.4.3: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:11:06 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_2
Diff to: previous 1.15.4.2: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.4.2: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:05:38 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_3
CVS tags: old_RELENG_3_5_0_RELEASE, old_RELENG_3_4_0_RELEASE, old_RELENG_3_3_0_RELEASE
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:43:42 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
CVS tags: old_RELENG_4_BP, old_RELENG_4_3_BP, old_RELENG_4_3_0_RELEASE, old_RELENG_4_3, old_RELENG_4_2_0_RELEASE, old_RELENG_4_1_1_RELEASE, old_RELENG_4_1_0_RELEASE, old_RELENG_4_0_0_RELEASE, old_PRE_SMPNG
Branch point for: old_RELENG_4
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.34: download - view: text, markup, annotated - select for diffs
Wed Apr 28 01:03:17 1999 UTC (12 years, 9 months ago) by luoqi
Branches: MAIN
CVS tags: old_PRE_VFS_BIO_NFS_PATCH, old_POST_VFS_BIO_NFS_PATCH, old_POST_SMP_VMSHARE
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
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 1.33: download - view: text, markup, annotated - select for diffs
Thu Jan 28 01:59:50 1999 UTC (13 years ago) by dillon
Branches: MAIN
CVS tags: old_PRE_SMP_VMSHARE, old_PRE_NEWBUS, old_POST_NEWBUS
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +17 -17 lines
    Fix warnings in preparation for adding -Wall -Wcast-qual to the
    kernel compile

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Jan 27 23:45:38 1999 UTC (13 years ago) by dillon
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -6 lines
    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 1.31: download - view: text, markup, annotated - select for diffs
Wed Jul 15 11:27:11 1998 UTC (13 years, 6 months ago) by bde
Branches: MAIN
CVS tags: old_RELENG_3_BP, old_RELENG_3_2_PAO_BP, old_RELENG_3_2_PAO, old_RELENG_3_2_0_RELEASE, old_RELENG_3_1_0_RELEASE, old_RELENG_3_0_0_RELEASE
Branch point for: old_RELENG_3
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
%n in a comment was a poor abbreviation for Immediate-byte-signed,
especially now that %n format has almost gone away.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Jul 8 10:53:58 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -5 lines
Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Jul 8 09:11:43 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +17 -17 lines
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 1.28: download - view: text, markup, annotated - select for diffs
Sun Jun 7 17:09:59 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
CVS tags: old_PRE_NOBDEV
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +17 -17 lines
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 1.27: download - view: text, markup, annotated - select for diffs
Thu Nov 20 18:24:52 1997 UTC (14 years, 2 months ago) by bde
Branches: MAIN
CVS tags: old_PRE_SOFTUPDATE, old_PRE_DEVFS_SLICE, old_POST_SOFTUPDATE, old_POST_DEVFS_SLICE
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +7 -3 lines
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 1.26: download - view: text, markup, annotated - select for diffs
Mon Oct 27 17:23:18 1997 UTC (14 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -3 lines
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 1.25: download - view: text, markup, annotated - select for diffs
Thu Aug 21 06:32:37 1997 UTC (14 years, 5 months ago) by charnier
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Aug 18 06:58:06 1997 UTC (14 years, 5 months ago) by charnier
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
Use CS_SECURE macro.
Reviewed by:	John Dyson

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jul 20 08:37:17 1997 UTC (14 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -4 lines
Removed unused #includes.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Apr 26 19:12:03 1997 UTC (14 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_WOLLMAN_MBUF, old_BP_WOLLMAN_MBUF
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -7 lines
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 1.21: download - view: text, markup, annotated - select for diffs
Sat Apr 26 11:45:04 1997 UTC (14 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_post_smp_merge
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -1 lines
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 1.15.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 1 06:10:44 1997 UTC (14 years, 11 months ago) by bde
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_8_RELEASE, old_RELENG_2_2_7_RELEASE, old_RELENG_2_2_6_RELEASE, old_RELENG_2_2_5_RELEASE, old_RELENG_2_2_2_RELEASE, old_RELENG_2_2_1_RELEASE, old_RELENG_2_2_0_RELEASE
Diff to: previous 1.15.4.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.4.1: +2 -1 lines
YAMFC (add missing #include <machine/segments.h>).

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Mar 1 05:44:09 1997 UTC (14 years, 11 months ago) by ache
Branches: MAIN
CVS tags: old_pre_smp_merge
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -1 lines
Add missing #include <machine/segments.h> for ISPL and SEL_UPL macros

Revision 1.15.4.1: download - view: text, markup, annotated - select for diffs
Fri Feb 28 12:39:23 1997 UTC (14 years, 11 months ago) by bde
Branches: old_RELENG_2_2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +13 -8 lines
YAMFC (print syscall numbers in the current radix, etc).

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Feb 28 12:36:18 1997 UTC (14 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +13 -8 lines
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 1.18: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:32:15 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Feb 10 02:05:59 1997 UTC (15 years ago) by dyson
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -1 lines
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 1.16: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:38:44 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -1 lines
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 1.15: download - view: text, markup, annotated - select for diffs
Wed Mar 27 17:06:03 1996 UTC (15 years, 10 months ago) by bde
Branches: MAIN
CVS tags: old_wollman_polling, old_RELENG_2_2_BP
Branch point for: old_RELENG_2_2
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +50 -22 lines
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 1.11.4.1: download - view: text, markup, annotated - select for diffs
Tue Jan 30 09:19:18 1996 UTC (16 years ago) by davidg
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_7_RELEASE, old_RELENG_2_1_6_RELEASE, old_RELENG_2_1_6_1_RELEASE, old_RELENG_2_1_5_RELEASE
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +167 -204 lines
Brought in changes from revs 1.12-1.14 of db_trace.c and related changes:
rewrite of DDB's stack traceback code to fix multiple bugs in it.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Dec 22 07:09:24 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +6 -3 lines
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 1.13: download - view: text, markup, annotated - select for diffs
Thu Dec 21 19:20:55 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +162 -207 lines
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 1.12: download - view: text, markup, annotated - select for diffs
Fri Nov 24 13:27:24 1995 UTC (16 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +13 -8 lines
Staticized.  Moved some ero-initialized values to the bss.

Added prototypes.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue May 30 07:59:23 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: old_RELENG_2_1_0_RELEASE, old_RELENG_2_1_0_BP, old_RELENG_2_0_5_RELEASE, old_RELENG_2_0_5_BP, old_RELENG_2_0_5
Branch point for: old_RELENG_2_1_0
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +13 -13 lines
Remove trailing whitespace.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:11:26 1995 UTC (16 years, 10 months ago) by bde
Branches: MAIN
CVS tags: old_RELENG_2_0_5_ALPHA
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
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 1.9: download - view: text, markup, annotated - select for diffs
Wed Mar 1 21:37:44 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
Slight change to include file order to accommodate upcoming changes.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 13 03:49:37 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
CVS tags: old_RELEASE_2_0, old_OLAH_TTCP, old_BETA_2_0, old_ALPHA_2_0
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -5 lines
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 1.7: download - view: text, markup, annotated - select for diffs
Sat Aug 6 10:25:33 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Fixed various prototype problems with the pmap functions and the subsequent
problems that fixing them caused.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed May 25 08:53:21 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
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 1.5: download - view: text, markup, annotated - select for diffs
Fri Jan 14 16:23:31 1994 UTC (18 years ago) by davidg
Branches: MAIN
CVS tags: old_REL_before_johndavid_2_0_0, old_MOVED_NEWCVS, old_GAMMA_1_1, old_FINAL_1_1, old_BP_BETA_1_1, old_BETA_1_1
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -1 lines
"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 1.4: download - view: text, markup, annotated - select for diffs
Mon Jan 3 07:55:19 1994 UTC (18 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +82 -13 lines
Convert syscall to trapframe. Based on work done by John Brezak.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Dec 19 00:50:01 1993 UTC (18 years, 1 month ago) by wollman
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -2 lines
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 1.2: download - view: text, markup, annotated - select for diffs
Sat Oct 16 14:14:56 1993 UTC (18 years, 3 months ago) by rgrimes
Branches: MAIN
CVS tags: old_FINAL_1_0_2, old_FINAL_1_0, old_BRANCH_1_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -30 lines
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 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sat Jun 12 14:58:07 1993 UTC (18 years, 8 months ago) by rgrimes
CVS tags: old_V_0_1_2_4, old_GAMMA_1_0, old_EPSILON_1_0, old_BETA_1_0, old_ALPHA_1_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Initial import, 0.1 + pk 0.2.4-B1

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jun 12 14:58:06 1993 UTC (18 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options