aboutsummaryrefslogtreecommitdiff
path: root/sbin/ddb
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-272-2/+0
| | | | | | | | | | | | | | | | 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
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-163-6/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-124-4/+4
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-2/+0
|
* mac: add new mac_ddb(4) policyMitchell Horne2022-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally, access to the kernel debugger is considered to be unsafe from a security perspective since it presents an unrestricted interface to inspect or modify the system state, including sensitive data such as signing keys. However, having some access to debugger functionality on production systems may be useful in determining the cause of a panic or hang. Therefore, it is desirable to have an optional policy which allows limited use of ddb(4) while disabling the functionality which could reveal system secrets. This loadable MAC module allows for the use of some ddb(4) commands while preventing the execution of others. The commands have been broadly grouped into three categories: - Those which are 'safe' and will not emit sensitive data (e.g. trace). Generally, these commands are deterministic and don't accept arguments. - Those which are definitively unsafe (e.g. examine <addr>, search <addr> <value>) - Commands which may be safe to execute depending on the arguments provided (e.g. show thread <addr>). Safe commands have been flagged as such with the DB_CMD_MEMSAFE flag. Commands requiring extra validation can provide a function to do so. For example, 'show thread <addr>' can be used as long as addr can be checked against the system's list of process structures. The policy also prevents debugger backends other than ddb(4) from executing, for example gdb(4). Reviewed by: markj, pauamma_gundo.com (manpages) Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35371
* ddb: use 'textdump dump' instead of 'call doadump'Andriy Gapon2019-10-181-1/+1
| | | | | | | | | | | | | | | | | The change is for the example in textdump.4 and the default ddb.conf. First of all, doadump now requires an argument and it won't do a textdump if the argument is not 'true'. And 'textdump dump' is more idiomatic anyway. For what it's worth, ddb 'dump' command seems to always request a vmcore dump even if a textdump was requested earlier, e.g., by 'textdump set'. Finally, ddb 'call' command is not documented. MFC after: 2 weeks Notes: svn path=/head/; revision=353726
* Move ddb.conf to sbin/ddb/ and switch to CONFS.Brad Davis2018-08-112-0/+16
| | | | | | | | | | This helps pkgbase as this config file will now be tagged as a config file. Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D16675 Notes: svn path=/head/; revision=337623
* ddb: unbreak ppcEitan Adler2018-06-171-2/+2
| | | | | | | | usr/src/powerpc.powerpcspe/tmp/usr/include/strings.h:62: warning: shadowed declaration is here Notes: svn path=/head/; revision=335271
* ddb: build with WARNS=6Eitan Adler2018-06-162-2/+1
| | | | | | | Tested with amd64, arm64, i386, mips Notes: svn path=/head/; revision=335266
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-274-0/+8
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Update dependencies after r291406 added libelf to libkvm.Bryan Drewery2015-12-011-0/+1
| | | | | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291558
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync from headSimon J. Gerraty2012-11-041-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |/ |/| | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | remove duplicate semicolons where possible.Eitan Adler2012-10-221-1/+1
|/ | | | | | | | Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241844
* Correct subcommand name 'unset' -> 'unscript'.Pawel Jakub Dawidek2011-06-181-1/+1
| | | | Notes: svn path=/head/; revision=223278
* Plug an fd leakKevin Lo2010-11-221-0/+1
| | | | Notes: svn path=/head/; revision=215658
* Always assign WARNS using ?=Ulrich Spörlein2010-03-021-1/+1
| | | | | | | | | | - fix some nearby style bugs - include Makefile.inc where it makes sense and reduces duplication Approved by: ed (co-mentor) Notes: svn path=/head/; revision=204585
* Ensure 'kvm' is always initialized. If "-M" was not specified and theJohn Baldwin2009-11-021-0/+1
| | | | | | | | | | garbage value on the stack was not zero, then 'ddb capture' would try to use the garbage value as a kvm_t pointer. MFC after: 1 week Notes: svn path=/head/; revision=198820
* When extracting the capture buffer from a crashdump, only read the validJohn Baldwin2009-10-291-10/+10
| | | | | | | | | | | | | portion of the capture buffer (db_capture_bufoff vs db_capture_bufsize). This could result in outputting garbage (e.g. lots of 'p' characters if DIAGNOSTIC is enabled) after the end of the capture buffer. While here, fix a spelling nit. Reported by: Mikolaj Golub to my trociny of gmail MFC after: 3 days Notes: svn path=/head/; revision=198585
* Apply various fixes:Tom Rhodes2008-12-241-3/+4
| | | | | | | | | | | | Silence mdoc(7) warnings; Xref correct manual pages; Point user to the ddb.8 manual page. PR: 129398 Submitted by: gavin Notes: svn path=/head/; revision=186478
* DDB scripting, textdumps, output capture, etc, all will appear inRobert Watson2008-08-031-1/+1
| | | | | | | | | | FreeBSD 7.1 before 8.0 ships. Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com> MFC after: 3 days Notes: svn path=/head/; revision=181240
* Add "ddb capture print" and "ddb capture status" commands do ddb(8),Robert Watson2008-04-255-5/+297
| | | | | | | | | | | | | | | | | alowing the DDB output capture buffer to be easily extracted from user space. Both of these commands include -M/-N arguments, allowing them to be used with kernel crash dumps (or /dev/mem). This makes it easier to use DDB scripting and output capture with minidumps or full dumps rather than with text dumps, allowing DDB output (scripted or otherwise) to be easily extracted from a crash dump. MFC after: 1 week Discussed with: brooks, jhb Notes: svn path=/head/; revision=178515
* - Normalize usage(), add "ddb pathname" syntax.Ruslan Ermilov2008-04-042-25/+28
| | | | | | | - Revise the manpage. Notes: svn path=/head/; revision=177909
* Add the ability to read a file of commands to ddb(8) modeled after theBrooks Davis2008-03-052-5/+81
| | | | | | | feature in ipfw(8). Notes: svn path=/head/; revision=176833
* Minor formatting tweaks.Robert Watson2007-12-261-3/+10
| | | | | | | | | Point at ddb(4) and textdump(4) man pages for more script examples. MFC after: 3 months Notes: svn path=/head/; revision=174925
* Add command-line tool ddb(8), which allows DDB(4) scripts to beRobert Watson2007-12-265-0/+378
managed from userspace. It is largely a wrapper for sysctl() calls, but because the sysctls for adding and removing scripts are awkward to use directly, this provides an easier-to-use interface. MFC after: 3 months Notes: svn path=/head/; revision=174915