gdb_cons.c (177255) | gdb_cons.c (213305) |
---|---|
1/*- 2 * Copyright (c) 2006 Sam Leffler 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 18 unchanged lines hidden (view full) --- 27/* 28 * Support for redirecting console msgs to gdb. We register 29 * a pseudo console to hook cnputc and send stuff to the gdb 30 * port. The only trickiness here is buffering output so this 31 * isn't dog slow. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Sam Leffler 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 18 unchanged lines hidden (view full) --- 27/* 28 * Support for redirecting console msgs to gdb. We register 29 * a pseudo console to hook cnputc and send stuff to the gdb 30 * port. The only trickiness here is buffering output so this 31 * isn't dog slow. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/gdb/gdb_cons.c 177255 2008-03-16 13:02:04Z rwatson $"); | 35__FBSDID("$FreeBSD: head/sys/gdb/gdb_cons.c 213305 2010-09-30 17:05:23Z avg $"); |
36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/cons.h> 40#include <sys/kdb.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> 43#include <sys/reboot.h> --- 77 unchanged lines hidden (view full) --- 121 * and/or an earlier point in the boot process when it's ok. 122 */ 123static int calloutok = 0; 124static void 125oktousecallout(void *data __unused) 126{ 127 calloutok = 1; 128} | 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/cons.h> 40#include <sys/kdb.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> 43#include <sys/reboot.h> --- 77 unchanged lines hidden (view full) --- 121 * and/or an earlier point in the boot process when it's ok. 122 */ 123static int calloutok = 0; 124static void 125oktousecallout(void *data __unused) 126{ 127 calloutok = 1; 128} |
129SYSINIT(gdbhack, SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY, oktousecallout, NULL); | 129SYSINIT(gdbhack, SI_SUB_RUN_SCHEDULER, SI_ORDER_MIDDLE, oktousecallout, NULL); |
130 131static void 132gdb_cnputc(struct consdev *cp, int c) 133{ 134 struct gdbcons *gc; 135 136 if (gdbcons_enable && gdb_cur != NULL && gdb_listening) { 137 gc = cp->cn_arg; --- 38 unchanged lines hidden --- | 130 131static void 132gdb_cnputc(struct consdev *cp, int c) 133{ 134 struct gdbcons *gc; 135 136 if (gdbcons_enable && gdb_cur != NULL && gdb_listening) { 137 gc = cp->cn_arg; --- 38 unchanged lines hidden --- |