#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
d6c0538d |
| 07-Jan-2022 |
Warner Losh <imp@FreeBSD.org> |
ddb: Remove SOFTWARE_SSTEP support
It was needed for mips only, and only kinda sorta worked for mips. It can be brought back if we grow another architecture that need it.
Sponsored by: Netflix
|
Revision tags: release/12.3.0 |
|
#
b7924341 |
| 27-Aug-2021 |
Andrew Turner <andrew@FreeBSD.org> |
Create sys/reg.h for the common code previously in machine/reg.h
Move the common kernel function signatures from machine/reg.h to a new sys/reg.h. This is in preperation for adding PT_GETREGSET to p
Create sys/reg.h for the common code previously in machine/reg.h
Move the common kernel function signatures from machine/reg.h to a new sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2).
Reviewed by: imp, markj Sponsored by: DARPA, AFRL (original work) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19830
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0 |
|
#
f993ed2f |
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
#
3c40d3fc |
| 09-Sep-2019 |
Conrad Meyer <cem@FreeBSD.org> |
ddb(4): Move an extern variable declaration to a header
Trivial cleanup, no functional change.
|
Revision tags: release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
72bfb31a |
| 13-Jan-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327886 through r327930.
|
#
3f289c3f |
| 12-Jan-2018 |
Jeff Roberson <jeff@FreeBSD.org> |
Implement 'domainset', a cpuset based NUMA policy mechanism. This allows userspace to control NUMA policy administratively and programmatically.
Implement domainset based iterators in the page laye
Implement 'domainset', a cpuset based NUMA policy mechanism. This allows userspace to control NUMA policy administratively and programmatically.
Implement domainset based iterators in the page layer.
Remove the now legacy numa_* syscalls.
Cleanup some header polution created by having seq.h in proc.h.
Reviewed by: markj, kib Discussed with: alc Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D13403
show more ...
|
#
796df753 |
| 30-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
SPDX: Consider code from Carnegie-Mellon University.
Interesting cases, most likely from CMU Mach sources.
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1 |
|
#
8c4282b3 |
| 24-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305892 through r306302.
|
Revision tags: release/11.0.0 |
|
#
e1e554a3 |
| 17-Sep-2016 |
Bruce Evans <bde@FreeBSD.org> |
Silently ignore unexpected single-step traps (except for turning off single-stepping). Only do this on arches (only x86 so far) which classify single-step traps unambiguously.
This allows other par
Silently ignore unexpected single-step traps (except for turning off single-stepping). Only do this on arches (only x86 so far) which classify single-step traps unambiguously.
This allows other parts of the kernel to be intentionally and unintentionally sloppy about generating single-step traps. On x86, at least the following places were unintentionally sloppy: - all operations that context-switched [er]flags. Especially spinlock_enter()/exit() and cpu_switch(). When single-stepped, saving the flags leaves PSL_T set in the saved flags, so restoring gives a trap that is spurious if it occurs after single-step mode has been left. Switching contexts away from a low priority thread gives especially long-lived saved copies. - the vm86 emulation allows user mode to set PSL_T. This was correct until vm86 bios call mode was unintentionally given access to kdb handling its single-step traps. Now these places are intentionally sloppy, but unexpected debugger traps still cause panics if no debugger that handles the trap is attached when the trap is delivered.
show more ...
|
#
93badfa1 |
| 16-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305687 through r305890.
|
#
1e24fd3b |
| 16-Sep-2016 |
Bruce Evans <bde@FreeBSD.org> |
Statically initialize the run mode to the one that will become current on first entry. This fixes a spurious "Stepping aborted" message when the first entry is for a breakpoint.
Don't reset to the
Statically initialize the run mode to the one that will become current on first entry. This fixes a spurious "Stepping aborted" message when the first entry is for a breakpoint.
Don't reset to the run mode to STEP_NONE when stopping, and remove STEP_NONE. This mode was never really used, except transiently to mis-decide whether to print the message on first entry.
show more ...
|
#
bd20334c |
| 15-Sep-2016 |
Bruce Evans <bde@FreeBSD.org> |
Abort single stepping in ddb if the trap is not for single-stepping. This is not very easy to do, since ddb didn't know when traps are for single-stepping. It more or less assumed that traps are eit
Abort single stepping in ddb if the trap is not for single-stepping. This is not very easy to do, since ddb didn't know when traps are for single-stepping. It more or less assumed that traps are either breakpoints or single-step, but even for x86 this became inadequate with the release of the i386 in ~1986, and FreeBSD passes it other trap types for NMIs and panics.
On x86, teach ddb when a trap is for single stepping using the %dr6 register. Unknown traps are now treated almost the same as breakpoints instead of as the same as single-steps. Previously, the classification of breakpoints was almost correct and everything else was unknown so had to be treated as a single-step. Now the classification of single- steps is precise, the classification of breakpoints is almost correct (as before) and everything else is unknown and treated like a breakpoint.
This fixes: - breakpoints not set by ddb, including the main one in kdb_enter(), were treated as single-steps and not stopped on when stepping (except for the usual, simple case of a step with residual count 1). As special cases, kdb_enter() didn't stop for fatal traps or panics - similarly for "hardware breakpoints".
Use a new MD macro IS_SSTEP_TRAP(type, code) to code to classify single-steps. This is excessively complicated for bug-for-bug and backwards compatibilty. Design errors apparently started in Mach in ~1990 or perhaps in the FreeBSD interface in ~1993. Common trap types like single steps should have a unique MI code (like the TRAP* codes for user SIGTRAP) so that debuggers don't need macros like IS_SSTEP_TRAP() to decode them. But 'type' is actually an ambiguous MD trap number, and code was always 0 (now it is (int)%dr6 on x86). So it was impossible to determine the trap type from the args. Global variables had to be used.
There is already a classification macro db_pc_is_single_step(), but this just gets in the way. It is only used to recover from bugs in IS_BREAKPOINT_TRAP(). On some arches, IS_BREAKPOINT_TRAP() just duplicates the ambiguity in 'type' and misclassifies single-steps as breakpoints. It defaults to 'false', which is the opposite of what is needed for bug-for-bug compatibility.
When this is cleaned up, MI classification bits should be passed in 'code'. This could be done now for positive-logic bits, since 'code' was always 0, but some negative logic is needed for compatibility so a simple MI classificition is not usable yet.
After reading %dr6, clear the single-step bit in it so that the type of the next debugger trap can be decoded. This is a little ddb-specific. ddb doesn't understand the need to clear this bit and doing it before calling kdb is easiest. gdb would need to reverse this to support hardware breakpoints, but it just doesn't support them now since gdbstub doesn't support %dr*.
Fix a bug involving %dr6: when emulating a single-step trap for vm86, set the bit for it in %dr6. Userland debuggers need this. ddb now needs this for vm86 bios calls. The bit gets copied to 'code' then cleared again.
Fix related style bugs: - when clearing bits for hardware breakpoints in %dr6, spell the mask as ~0xf on both amd64 and i386 to get the correct number of bits using sign extension and not need a comment about using the wrong mask on amd64 (amd64 traps for invalid results but clearing the reserved top bits didn't trap since they are 0). - rewrite my old wrong comments about using %dr6 for ddb watchpoints.
show more ...
|
#
a75e9a02 |
| 10-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305623 through r305686.
|
#
5c48342f |
| 09-Sep-2016 |
Bruce Evans <bde@FreeBSD.org> |
Pass the trap type and code down from db_trap() to db_stop_at_pc() so that the latter can easily determine what the trap type actually is after callers are fixed to encode the type unambigously.
ddb
Pass the trap type and code down from db_trap() to db_stop_at_pc() so that the latter can easily determine what the trap type actually is after callers are fixed to encode the type unambigously.
ddb currently barely understands breakpoints, and it treats all non-breakpoints as single-step traps. This works OK for stopping after every instruction when single-stepping, but is broken for single-stepping with a count > 1 (especially with a large count). ddb needs to stop on the first non-single-step trap while single- stepping. Otherwise, ddb doesn't even stop the first time for fatal traps and external breakpoints like the one in kdb_enter().
show more ...
|
#
10c458cc |
| 09-Sep-2016 |
Bruce Evans <bde@FreeBSD.org> |
Fix stopping when the specified breakpoint count is reached. The countdown was done correctly, but the action when the count was not reduced to 0 was to fall through to generic code which almost alw
Fix stopping when the specified breakpoint count is reached. The countdown was done correctly, but the action when the count was not reduced to 0 was to fall through to generic code which almost always stopped.
show more ...
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
6e4f4927 |
| 14-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r304091
|
#
cecc0aa9 |
| 14-Aug-2016 |
Bruce Evans <bde@FreeBSD.org> |
Don't print an extra newline after the instruction when printing for single stepping of multiple instructions (e.g., s/p,<count> and n/p). db_print_loc_and_inst() already prints a newline on all arch
Don't print an extra newline after the instruction when printing for single stepping of multiple instructions (e.g., s/p,<count> and n/p). db_print_loc_and_inst() already prints a newline on all arches although it probably shouldn't.
Especially on SMP systems, single stepping tends to deadlock or panic too quickly to be useful for anything except finding bugs in itself, but with printing "itself" includes console drivers so it is useful for generating stress tests for console drivers.
show more ...
|
Revision tags: release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
c99bbcab |
| 02-Dec-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head.
|
#
cdf23c19 |
| 27-Nov-2015 |
Zbigniew Bodek <zbb@FreeBSD.org> |
Add helper to catch single step debug event and distinguish it from bkpt
Some architectures (including ARMv6/v7) do not have separate single step events and cannot see difference between breakpoint
Add helper to catch single step debug event and distinguish it from bkpt
Some architectures (including ARMv6/v7) do not have separate single step events and cannot see difference between breakpoint and single step. Add db_pc_is_singlestep() to avoid skipping instruction we stepped on to trigger debug event. This commit does not change the existing functionality but adds possibility to implement custom db_pc_is_singlestep().
Reviewed by: imp Submitted by: Zbigniew Bodek <zbb@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4036
show more ...
|
Revision tags: release/10.2.0 |
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
#
37a48d40 |
| 28-May-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r282615-r283655
Sponsored by: The FreeBSD Foundation
|