undefined.c (170291) | undefined.c (184205) |
---|---|
1/* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */ 2 3/*- 4 * Copyright (c) 2001 Ben Harris. 5 * Copyright (c) 1995 Mark Brinicombe. 6 * Copyright (c) 1995 Brini. 7 * All rights reserved. 8 * --- 34 unchanged lines hidden (view full) --- 43 * 44 * Created : 06/01/95 45 */ 46 47 48#include "opt_ddb.h" 49 50#include <sys/cdefs.h> | 1/* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */ 2 3/*- 4 * Copyright (c) 2001 Ben Harris. 5 * Copyright (c) 1995 Mark Brinicombe. 6 * Copyright (c) 1995 Brini. 7 * All rights reserved. 8 * --- 34 unchanged lines hidden (view full) --- 43 * 44 * Created : 06/01/95 45 */ 46 47 48#include "opt_ddb.h" 49 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/sys/arm/arm/undefined.c 170291 2007-06-04 21:38:48Z attilio $"); | 51__FBSDID("$FreeBSD: head/sys/arm/arm/undefined.c 184205 2008-10-23 15:53:51Z des $"); |
52 53#include <sys/param.h> 54#include <sys/malloc.h> 55#include <sys/queue.h> 56#include <sys/signal.h> 57#include <sys/systm.h> 58#include <sys/proc.h> 59#include <sys/syslog.h> --- 41 unchanged lines hidden (view full) --- 101install_coproc_handler(int coproc, undef_handler_t handler) 102{ 103 struct undefined_handler *uh; 104 105 KASSERT(coproc >= 0 && coproc < MAX_COPROCS, ("bad coproc")); 106 KASSERT(handler != NULL, ("handler is NULL")); /* Used to be legal. */ 107 108 /* XXX: M_TEMP??? */ | 52 53#include <sys/param.h> 54#include <sys/malloc.h> 55#include <sys/queue.h> 56#include <sys/signal.h> 57#include <sys/systm.h> 58#include <sys/proc.h> 59#include <sys/syslog.h> --- 41 unchanged lines hidden (view full) --- 101install_coproc_handler(int coproc, undef_handler_t handler) 102{ 103 struct undefined_handler *uh; 104 105 KASSERT(coproc >= 0 && coproc < MAX_COPROCS, ("bad coproc")); 106 KASSERT(handler != NULL, ("handler is NULL")); /* Used to be legal. */ 107 108 /* XXX: M_TEMP??? */ |
109 MALLOC(uh, struct undefined_handler *, sizeof(*uh), M_TEMP, M_WAITOK); | 109 uh = malloc(sizeof(*uh), M_TEMP, M_WAITOK); |
110 uh->uh_handler = handler; 111 install_coproc_handler_static(coproc, uh); 112 return uh; 113} 114 115void 116install_coproc_handler_static(int coproc, struct undefined_handler *uh) 117{ 118 119 LIST_INSERT_HEAD(&undefined_handlers[coproc], uh, uh_link); 120} 121 122void 123remove_coproc_handler(void *cookie) 124{ 125 struct undefined_handler *uh = cookie; 126 127 LIST_REMOVE(uh, uh_link); | 110 uh->uh_handler = handler; 111 install_coproc_handler_static(coproc, uh); 112 return uh; 113} 114 115void 116install_coproc_handler_static(int coproc, struct undefined_handler *uh) 117{ 118 119 LIST_INSERT_HEAD(&undefined_handlers[coproc], uh, uh_link); 120} 121 122void 123remove_coproc_handler(void *cookie) 124{ 125 struct undefined_handler *uh = cookie; 126 127 LIST_REMOVE(uh, uh_link); |
128 FREE(uh, M_TEMP); | 128 free(uh, M_TEMP); |
129} 130 131 132static int 133gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code) 134{ 135 struct thread *td; 136 ksiginfo_t ksi; --- 185 unchanged lines hidden --- | 129} 130 131 132static int 133gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code) 134{ 135 struct thread *td; 136 ksiginfo_t ksi; --- 185 unchanged lines hidden --- |