aboutsummaryrefslogtreecommitdiff
path: root/sys/gdb
Commit message (Collapse)AuthorAgeFilesLines
* sys/gdb: Support hardware breakpointsAndrew Turner2024-04-121-0/+13
| | | | | | | | Support the use of hardware breakpoints in the kernel gdb stub. Reviewed by: jhb (earlier version) Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44354
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-273-3/+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
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-164-8/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* netgdb: Fix netgdb double ack, print proxy addressJohn Reimer2023-05-271-45/+31
| | | | | | | | | | | | - Fixes netgdb's double ack - Moving ack responsibility to debugnet, decision to ack made by netdump/netgdb. - Finish responsibility moved to debugnet, new finish handler. - netgdb now prints the address to connect to in case the user doesn't have access to the proxy machine. Sponsored by: Dell EMC Reviewed By: markj, bdrewery (earlier version) Differential Revision: https://reviews.freebsd.org/D40064
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-127-7/+7
| | | | | | | | | 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
* ddb: use _FLAGS command macros where appropriateMitchell Horne2022-07-051-1/+1
| | | | | | | | | | | | Some command definitions were forced to use DB_FUNC in order to specify their required flags, CS_OWN or CS_MORE. Use the new macros to simplify these. Reviewed by: markj, jhb MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35582
* gdb(4): Do not use run length encoding for 3-symbol repetitionsMichał Górny2022-01-221-12/+4
| | | | | | | | | | | | | | | | | | Disable the gdb packet run length encoding for 3-symbol repetitions. While it is technically possible to encode them, they have no advantage over sending the characters verbatim (the resulting length is the same) and they result in sending non-printable \x1f character. The protocol has been designed with the intent of avoiding non-printable characters and therefore the run length encoding is biased to emit \x20 (a space) with the minimal intended run length of 4. While at it, simplify the logic by merging the different 'if' blocks into a single while loop, and moving 'runlen == 0' check lower. Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33686
* gdb: report specific stop reason for watchpointsMitchell Horne2021-03-301-1/+2
| | | | | | | | | | | | | | | | The remote protocol allows for implementations to report more specific reasons for the break in execution back to the client [1]. This is entirely optional, so it is only implemented for amd64, arm64, and i386 at the moment. [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Stop-Reply-Packets.html Reviewed by: jhb MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 Differential Revision: https://reviews.freebsd.org/D29174
* gdb: allow setting/removing hardware watchpointsMitchell Horne2021-03-301-0/+102
| | | | | | | | | | | | | | | | | Handle the 'z' and 'Z' remote packets for manipulating hardware watchpoints. This could be expanded quite easily to support hardware or software breakpoints as well. https://sourceware.org/gdb/onlinedocs/gdb/Packets.html Reviewed by: cem, markj MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 Differential Revision: https://reviews.freebsd.org/D29173
* Use atomic loads/stores when updating td->td_stateAlex Richardson2021-02-181-3/+3
| | | | | | | | | | | | | | | KCSAN complains about racy accesses in the locking code. Those races are fine since they are inside a TD_SET_RUNNING() loop that expects the value to be changed by another CPU. Use relaxed atomic stores/loads to indicate that this variable can be written/read by multiple CPUs at the same time. This will also prevent the compiler from doing unexpected re-ordering. Reported by: GENERIC-KCSAN Test Plan: KCSAN no longer complains, kernel still runs fine. Reviewed By: markj, mjg (earlier version) Differential Revision: https://reviews.freebsd.org/D28569
* gdb(4): allow bulk write of registersMitchell Horne2020-12-231-2/+16
| | | | | | | | | | | | | | | Add support for the remote 'G' packet. This is not widely used by gdb when 'P' is supported, but is technically required by any remote gdb stub implementation [1]. [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.html Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644
* gdb(4): handle single register read packetsMitchell Horne2020-12-231-0/+11
| | | | | | | | | | | | | We support bulk reads of the register set, but not reading specific registers via the 'p' packet. This is useful at least for the 'call' command in gdb. Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644
* gdb(4): Don't escape GDB special characters at application layerConrad Meyer2020-09-301-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | In r351368, we introduced this XML- and GDB-encoded data. The protocol 'offset' should reflex the logical XML data offset, but unfortunately we counted the GDB escapes as well. In fact, we cannot safely do GDB character escaping at this layer at all, because we don't know what will be flushed in a packet. It is bogus to send only the first character of a two-character escape sequence. This patch "corrects" the problem by squashing these characters in the transmitted XML document. It would be nice to transmit the characters faithfully, but that is a more complicated change. Thread names are a nice convenience feature for the GDB client, but one can always inspect td_name or p_comm directly to find the true name. Reported by: Ka Ho Ng <khng300 AT gmail.com> Tested by: Ka Ho Ng Reviewed by: emaste, markj, rlibby Differential Revision: https://reviews.freebsd.org/D26599 Notes: svn path=/head/; revision=366291
* gdb(4): Support empty qSupported queriesConrad Meyer2020-08-181-1/+8
| | | | | | | | | | | | | | Technically a client may send a qSupported query without specifying any client features. We should respond with our supported list in that case instead of bailing with error. Reported by: rlibby Reviewed by: emaste, rlibby, vangyzen Sponsored by: Isilon Differential Revision: https://reviews.freebsd.org/D26115 Notes: svn path=/head/; revision=364358
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-262-2/+3
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Add KERNEL_PANICKED macro for use in place of direct panicstr testsMateusz Guzik2020-01-121-1/+1
| | | | Notes: svn path=/head/; revision=356655
* [PPC] Handle qOffsets packetLeandro Lupori2019-12-161-0/+4
| | | | | | | | | | | | | | On PowerPC, this is needed in order for the debugger to find out the memory offset where the kernel image was loaded on the remote target. This fixes symbol resolution when remote debugging a PowerPC kernel. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D22767 Notes: svn path=/head/; revision=355801
* gdb(4): Implement support for NoAckModeConrad Meyer2019-10-175-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the underlying debugport transport is reliable, GDB's additional checksums and acknowledgements are redundant. NoAckMode eliminates the the acks and allows us to skip checking RX checksums. The GDB packet framing does not change, so unfortunately (valid) checksums are still included as message trailers. The gdb(4) stub in FreeBSD advertises support for the feature in response to the client's 'qSupported' request IFF the current debugport has the gdb_dbfeatures flag GDB_DBGP_FEAT_RELIABLE set. Currently, only netgdb(4) supports this feature. If the remote GDB client supports the feature and does not have it disabled via a GDB configuration knob, it may instruct our gdb(4) stub to enter NoAckMode. Unless and until it issues that command, we must continue to transmit acks as usual (and for now, we continue to wait until we receive them as well, even if we know the debugport is on a reliable transport). In the kernel sources, the sense of the flag representing the state of the feature is reversed from that of the GDB command. (I.e., it is 'gdb_ackmode', not 'gdb_noackmode.') This is to avoid confusing double- negative conditions. For reference, see: * https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html * https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#QStartNoAckMode Reviewed by: jhb, markj (both earlier version) Differential Revision: https://reviews.freebsd.org/D21761 Notes: svn path=/head/; revision=353702
* Implement NetGDB(4)Conrad Meyer2019-10-176-4/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetGDB(4) is a component of a system using a panic-time network stack to remotely debug crashed FreeBSD kernels over the network, instead of traditional serial interfaces. There are three pieces in the complete NetGDB system. First, a dedicated proxy server must be running to accept connections from both NetGDB and gdb(1), and pass bidirectional traffic between the two protocols. Second, the NetGDB client is activated much like ordinary 'gdb' and similarly to 'netdump' in ddb(4) after a panic. Like other debugnet(4) clients (netdump(4)), the network interface on the route to the proxy server must be online and support debugnet(4). Finally, the remote (k)gdb(1) uses 'target remote <proxy>:<port>' (like any other TCP remote) to connect to the proxy server. The NetGDB v1 protocol speaks the literal GDB remote serial protocol, and uses a 1:1 relationship between GDB packets and sequences of debugnet packets (fragmented by MTU). There is no encryption utilized to keep debugging sessions private, so this is only appropriate for local segments or trusted networks. Submitted by: John Reimer <john.reimer AT emc.com> (earlier version) Discussed some with: emaste, markj Relnotes: sure Differential Revision: https://reviews.freebsd.org/D21568 Notes: svn path=/head/; revision=353700
* gdb(4): Root a sysctl tree at 'debug.gdb.'Conrad Meyer2019-09-083-1/+10
| | | | | | | | Like debug.ddb and debug.kdb. Rename 'debug.gdbcons' to 'debug.gdb.cons,' but leave the old name as a compatibility alias. Notes: svn path=/head/; revision=352050
* Fix i386 build after r351368Conrad Meyer2019-08-221-1/+1
| | | | | | | | Reported by: cy Submitted by: cy Notes: svn path=/head/; revision=351381
* gdb(4): StyleConrad Meyer2019-08-223-8/+14
| | | | | | | | | | No functional change. I was surprised to find that no sys/ header already defines the -1 EOF convention anywhere, so defined one locally. Notes: svn path=/head/; revision=351370
* gdb(4): Implement qXfer:threads:readConrad Meyer2019-08-221-1/+304
| | | | | | | | | | | | | | | | | | | | | | | This streams out an XML document over several GDB packets describing all threads in the system; their ids, name, and any loosely defined "extra info" we feel like including. For now, I have included a string version of the run state, similar to some of the DDB logic to stringify thread state. The benefit of supporting this in addition to the qfThreadInfo/qsThreadInfo packing is that in this mode, the host gdb does not ask for every thread's "qThreadExtraInfo," saving per-thread round-trips on "info threads." To use this feature, (k)gdb needs to be built with the --with-expat option. I would encourage enabling this option by default in our GDB port, if it is not already. Finally, there is another optional attribute you can specify per-thread called a "handle." Handles are arbitrarily long sequences of bytes, represented in the XML as hexadecimal. It is unclear to me how or if GDB actually uses handles for anything. So I have left them out. Notes: svn path=/head/; revision=351368
* gdb(4): Add basic 'qSupported' supportConrad Meyer2019-08-221-0/+107
| | | | | | | | This is where the host GDB tells us what features it supports, and we respond with the list we support. For now, just report PacketSize. Notes: svn path=/head/; revision=351366
* gdb(4): Include thread in Target Halt ReasonConrad Meyer2019-08-221-1/+4
| | | | | | | | | | This saves a round trip of the gdb remote inferior attempting to find the thread id of the halted thread. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=351365
* Fix stylistic nit in r351239Conrad Meyer2019-08-191-1/+0
| | | | | | | Meant to fix this before committing, but forgot. Notes: svn path=/head/; revision=351240
* gdb(4): Support "qC" queryConrad Meyer2019-08-191-1/+7
| | | | | | | | | | Sometimes GDB gets confused about what the current thread is. When it does, it asks the remote: "Who am I?" Answer it. Notes: svn path=/head/; revision=351239
* gdb(4): Pack 'info threads' responses into fewer packetsConrad Meyer2019-08-193-16/+48
| | | | | | | | | | | | | | | | We suffer at least one round trip ACK latency every command / packet that GDB has to send and receive, and the response format for 'info threads' supports packing many threads IDs into a single packet, so do so. Adds and uses a new API, gdb_txbuf_has_capacity(), which checks for a certain number of bytes available in the outgoing txbuf. On an example amd64 VM, the number of RTTs to transmit this list is reduced by a factor of 110x. This is especially beneficial with recent GDB, which seems to request the list at least twice during attach. Notes: svn path=/head/; revision=351238
* amd64: Protect the kernel text, data, and BSS by setting the RW/NX bitsJonathan T. Looney2018-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly for the data contained on each memory page. There are several components to this change: * Add a variable to indicate the start of the R/W portion of the initial memory. * Stop detecting NX bit support for each AP. Instead, use the value from the BSP and, if supported, activate the feature on the other APs just before loading the correct page table. (Functionally, we already assume that the BSP and all APs had the same support or lack of support for the NX bit.) * Set the RW and NX bits correctly for the kernel text, data, and BSS (subject to some caveats below). * Ensure DDB can write to memory when necessary (such as to set a breakpoint). * Ensure GDB can write to memory when necessary (such as to set a breakpoint). For this purpose, add new MD functions gdb_begin_write() and gdb_end_write() which the GDB support code can call before and after writing to memory. This change is not comprehensive: * It doesn't do anything to protect modules. * It doesn't do anything for kernel memory allocated after the kernel starts running. * In order to avoid excessive memory inefficiency, it may let multiple types of data share a 2M page, and assigns the most permissions needed for data on that page. Reviewed by: jhb, kib Discussed with: emaste MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14282 Notes: svn path=/head/; revision=330539
* sys/gdb: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-275-0/+10
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326269
* gdb kernel server: fixup Search:memory styleRyan Libby2017-10-171-21/+28
| | | | | | | | | | | | | | This is a NFC patch to move around the Search:memory implementation so that it doesn't exceed the standard column width and doesn't take so much vertical space in gdb_trap. Submitted by: Daniel O'Connor <darius@dons.net.au> Reviewed by: cem, jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12684 Notes: svn path=/head/; revision=324680
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenJung-uk Kim2015-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 Notes: svn path=/head/; revision=283291
* Add support for gdb's memory searching capabilities to our in-kernel gdbBenno Rice2014-09-053-0/+71
| | | | | | | | | | | server. Submitted by: Daniel O'Connor <daniel.oconnor@isilon.com> Reviewed by: jhb Sponsored by: EMC Isilon Storage Division Notes: svn path=/head/; revision=271173
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-3/+2
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-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 Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-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 Notes: svn path=/head/; revision=267961
* rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LASTAndriy Gapon2013-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 Notes: svn path=/head/; revision=253604
* Update the ddb and gdb backends for the new 'trace_thread' hook.John Baldwin2012-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 Notes: svn path=/head/; revision=234196
* kern cons: introduce infrastructure for console grabbing by kernelAndriy Gapon2011-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 Notes: svn path=/head/; revision=228631
* Modify kdb_trap() so that it re-calls the dbbe_trap function as long asMatthew D Fleming2011-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 Notes: svn path=/head/; revision=218825
* there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY orderAndriy Gapon2010-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 Notes: svn path=/head/; revision=213305
* Commit SYSINIT() ;-adding patch missed in previous pass.Robert Watson2008-03-161-1/+1
| | | | | | | | MFC after: 1 month Caught by: tinderbox Notes: svn path=/head/; revision=177255
* Add support for kgdb's 'detach' command.Peter Grehan2008-02-291-0/+5
| | | | | | | | Reviewed by: marcel Sponsored by: Network Appliance Notes: svn path=/head/; revision=176651
* Add kdb_cpu_sync_icache(), intended to synchronize instructionMarcel Moolenaar2007-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. Notes: svn path=/head/; revision=170473
* Convert to new console apiPoul-Henning Kamp2006-05-261-4/+7
| | | | Notes: svn path=/head/; revision=158960
* Eliminate gdb_checkc member from GDB_DBGPORT(), it is never used.Poul-Henning Kamp2006-05-261-6/+4
| | | | | | | | Use polling behaviour for gdb_getc() where convenient, this edges us closer to the console code. Notes: svn path=/head/; revision=158950
* Don't use GDB_DBGPORT() macro to fill in dummy element in gdb_dbgport_set.Poul-Henning Kamp2006-05-261-1/+2
| | | | Notes: svn path=/head/; revision=158949
* Wrap our drivers gdb_getc() function so that if it returns -1 wePoul-Henning Kamp2006-05-261-5/+20
| | | | | | | | try again. This way it matches the console behaviour and allows us to share more code. Notes: svn path=/head/; revision=158948
* add support for copying console messages to a remote gdbSam Leffler2006-03-233-2/+185
| | | | | | | Reviewed by: kan Notes: svn path=/head/; revision=157059