|
|
1.1 ! root 1: /* ! 2: * Mach Operating System ! 3: * Copyright (c) 1991,1990 Carnegie Mellon University ! 4: * All Rights Reserved. ! 5: * ! 6: * Permission to use, copy, modify and distribute this software and its ! 7: * documentation is hereby granted, provided that both the copyright ! 8: * notice and this permission notice appear in all copies of the ! 9: * software, derivative works or modified versions, and any portions ! 10: * thereof, and that both notices appear in supporting documentation. ! 11: * ! 12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 15: * ! 16: * Carnegie Mellon requests users of this software to return to ! 17: * ! 18: * Software Distribution Coordinator or [email protected] ! 19: * School of Computer Science ! 20: * Carnegie Mellon University ! 21: * Pittsburgh PA 15213-3890 ! 22: * ! 23: * any improvements or extensions that they make and grant Carnegie Mellon ! 24: * the rights to redistribute these changes. ! 25: */ ! 26: /* ! 27: * Author: David B. Golub, Carnegie Mellon University ! 28: * Date: 7/90 ! 29: */ ! 30: /* ! 31: * Data access functions for debugger. ! 32: */ ! 33: #include <mach/boolean.h> ! 34: #include <machine/db_machdep.h> ! 35: #include <ddb/db_task_thread.h> ! 36: #include "vm_param.h" ! 37: ! 38: /* implementation dependent access capability */ ! 39: #define DB_ACCESS_KERNEL 0 /* only kernel space */ ! 40: #define DB_ACCESS_CURRENT 1 /* kernel or current task space */ ! 41: #define DB_ACCESS_ANY 2 /* any space */ ! 42: ! 43: #ifndef DB_ACCESS_LEVEL ! 44: #define DB_ACCESS_LEVEL DB_ACCESS_KERNEL ! 45: #endif DB_ACCESS_LEVEL ! 46: ! 47: #ifndef DB_VALID_KERN_ADDR ! 48: #define DB_VALID_KERN_ADDR(addr) ((addr) >= VM_MIN_KERNEL_ADDRESS \ ! 49: && (addr) < VM_MAX_KERNEL_ADDRESS) ! 50: #define DB_VALID_ADDRESS(addr,user) ((user != 0) ^ DB_VALID_KERN_ADDR(addr)) ! 51: #define DB_PHYS_EQ(task1,addr1,task2,addr2) 0 ! 52: #define DB_CHECK_ACCESS(addr,size,task) db_is_current_task(task) ! 53: #endif DB_VALID_KERN_ADDR ! 54: ! 55: extern int db_access_level; ! 56: ! 57: extern db_expr_t db_get_value( db_addr_t addr, ! 58: int size, ! 59: boolean_t is_signed ); ! 60: ! 61: extern void db_put_value( db_addr_t addr, ! 62: int size, ! 63: db_expr_t value ); ! 64: ! 65: extern db_expr_t db_get_task_value( db_addr_t addr, ! 66: int size, ! 67: boolean_t is_signed, ! 68: task_t task ); ! 69: ! 70: extern void db_put_task_value( db_addr_t addr, ! 71: int size, ! 72: db_expr_t value, ! 73: task_t task );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.