summaryrefslogtreecommitdiffstats
path: root/sys/gdb
Commit message (Collapse)AuthorAgeFilesLines
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenjkim2015-05-221-1/+1
| | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
* Add support for gdb's memory searching capabilities to our in-kernel gdbbenno2014-09-053-0/+71
| | | | | | | | server. Submitted by: Daniel O'Connor <daniel.oconnor@isilon.com> Reviewed by: jhb Sponsored by: EMC Isilon Storage Division
* Pull in r267961 and r267973 again. Fix for issues reported will follow.hselasky2014-06-281-3/+2
|
* Revert r267961, r267973:gjb2014-06-271-2/+3
| | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifhselasky2014-06-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies
* rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LASTavg2013-07-241-1/+1
| | | | | | | | | | | | | | | | Also directly call swapper() at the end of mi_startup instead of relying on swapper being the last thing in sysinits order. Rationale: - "RUN_SCHEDULER" was misleading, scheduling already takes place at that stage - "scheduler" was misleading, the function swaps in the swapped out processes - another SYSINIT(SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY) could never be invoked depending on its relative order with scheduler; this was not obvious and the bug actually used to exist Reviewed by: kib (ealier version) MFC after: 14 days
* Update the ddb and gdb backends for the new 'trace_thread' hook.jhb2012-04-121-1/+1
| | | | | | | | | It is implemented via db_trace_thread() for DDB and not implemented for GDB. This should have been part of r234190. Pointy hat to: jhb Reported by: jkim MFC after: 1 week
* kern cons: introduce infrastructure for console grabbing by kernelavg2011-12-171-0/+10
| | | | | | | | | | | | At the moment grab and ungrab methods of all console drivers are no-ops. Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended). Inspired by: bde MFC after: 2 months
* Modify kdb_trap() so that it re-calls the dbbe_trap function as long asmdf2011-02-182-0/+23
| | | | | | | | | | | | | | | the debugger back-end has changed. This means that switching from ddb to gdb no longer requires a "step" which can be dangerous on an already-crashed kernel. Also add a capability to get from the gdb back-end back to ddb, by typing ^C in the console window. While here, simplify kdb_sysctl_available() by using sbuf_new_for_sysctl(), and use strlcpy() instead of strncpy() since the strlcpy semantic is desired. MFC after: 1 month
* there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY orderavg2010-09-301-1/+1
| | | | | | | | | | | | | | | SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY should only be used to call scheduler() function which turns the initial thread into swapper proper and thus there is no further SYSINIT processing. Other SYSINITs with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY may get ordered after scheduler() and thus never executed. That particular relative order is semi-arbitrary. Thus, change such places to use SI_ORDER_MIDDLE. Also, use SI_ORDER_MIDDLE instead of correct, but less appealing, SI_ORDER_ANY - 1. MFC after: 1 week
* Commit SYSINIT() ;-adding patch missed in previous pass.rwatson2008-03-161-1/+1
| | | | | MFC after: 1 month Caught by: tinderbox
* Add support for kgdb's 'detach' command.grehan2008-02-291-0/+5
| | | | | Reviewed by: marcel Sponsored by: Network Appliance
* Add kdb_cpu_sync_icache(), intended to synchronize instructionmarcel2007-06-091-2/+8
| | | | | | caches with data caches after writing to memory. This typically is required to make breakpoints work on ia64 and powerpc. For those architectures the function is implemented.
* Convert to new console apiphk2006-05-261-4/+7
|
* Eliminate gdb_checkc member from GDB_DBGPORT(), it is never used.phk2006-05-261-6/+4
| | | | | Use polling behaviour for gdb_getc() where convenient, this edges us closer to the console code.
* Don't use GDB_DBGPORT() macro to fill in dummy element in gdb_dbgport_set.phk2006-05-261-1/+2
|
* Wrap our drivers gdb_getc() function so that if it returns -1 wephk2006-05-261-5/+20
| | | | | try again. This way it matches the console behaviour and allows us to share more code.
* add support for copying console messages to a remote gdbsam2006-03-233-2/+185
| | | | Reviewed by: kan
* check return value of gdb_rx_varhexsam2005-03-281-2/+8
| | | | | Noticed by: Coverity Prevent analysis tool Reviewed by: kan
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-064-4/+4
|
* Change gdb_cpu_setreg() to not take the value to which to set themarcel2004-12-011-10/+24
| | | | | | | | | | | | | | | | | | | | | specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64
* Comment-out the debugging printf I left in in case there were somemarcel2004-08-101-1/+1
| | | | packet related problems. No problems have been reported.
* Introduce the GDB debugger backend for the new KDB framework. Themarcel2004-07-104-0/+721
backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support.
OpenPOWER on IntegriCloud