[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/amd64/include/db_machdep.h

Version: -  FREEBSD  -  FREEBSD7  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  OPENSOLARIS  -  minix-3-1-1  -  TRUSTEDBSD-SEBSD  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

  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  Software.Distribution@CS.CMU.EDU
 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  * $FreeBSD: src/sys/amd64/include/db_machdep.h,v 1.22 2005/01/05 20:17:20 imp Exp $
 27  */
 28 
 29 #ifndef _MACHINE_DB_MACHDEP_H_
 30 #define _MACHINE_DB_MACHDEP_H_
 31 
 32 #include <machine/frame.h>
 33 #include <machine/trap.h>
 34 
 35 typedef vm_offset_t     db_addr_t;      /* address - unsigned */
 36 typedef long            db_expr_t;      /* expression - signed */
 37 
 38 #define PC_REGS()       ((db_addr_t)kdb_thrctx->pcb_rip)
 39 
 40 #define BKPT_INST       0xcc            /* breakpoint instruction */
 41 #define BKPT_SIZE       (1)             /* size of breakpoint inst */
 42 #define BKPT_SET(inst)  (BKPT_INST)
 43 
 44 #define BKPT_SKIP                               \
 45 do {                                            \
 46         kdb_frame->tf_rip += 1;                 \
 47         kdb_thrctx->pcb_rip += 1;               \
 48 } while(0)
 49 
 50 #define FIXUP_PC_AFTER_BREAK                    \
 51 do {                                            \
 52         kdb_frame->tf_rip -= 1;                 \
 53         kdb_thrctx->pcb_rip -= 1;               \
 54 } while(0);
 55 
 56 #define db_clear_single_step    kdb_cpu_clear_singlestep
 57 #define db_set_single_step      kdb_cpu_set_singlestep
 58 
 59 #define IS_BREAKPOINT_TRAP(type, code)  ((type) == T_BPTFLT)
 60 /*
 61  * Watchpoints are not supported.  The debug exception type is in %dr6
 62  * and not yet in the args to this macro.
 63  */
 64 #define IS_WATCHPOINT_TRAP(type, code)  0
 65 
 66 #define I_CALL          0xe8
 67 #define I_CALLI         0xff
 68 #define I_RET           0xc3
 69 #define I_IRET          0xcf
 70 
 71 #define inst_trap_return(ins)   (((ins)&0xff) == I_IRET)
 72 #define inst_return(ins)        (((ins)&0xff) == I_RET)
 73 #define inst_call(ins)          (((ins)&0xff) == I_CALL || \
 74                                  (((ins)&0xff) == I_CALLI && \
 75                                   ((ins)&0x3800) == 0x1000))
 76 #define inst_load(ins)          0
 77 #define inst_store(ins)         0
 78 
 79 /*
 80  * There no interesting addresses below _kstack = 0xefbfe000.  There
 81  * are small absolute values for GUPROF, but we don't want to see them.
 82  * Treat "negative" addresses below _kstack as non-small to allow for
 83  * future reductions of _kstack and to avoid sign extension problems.
 84  *
 85  * There is one interesting symbol above -db_maxoff = 0xffff0000,
 86  * namely _APTD = 0xfffff000.  Accepting this would mess up the
 87  * printing of small negative offsets.  The next largest symbol is
 88  * _APTmap = 0xffc00000.  Accepting this is OK (unless db_maxoff is
 89  * set to >= 0x400000 - (max stack offset)).
 90  */
 91 #define DB_SMALL_VALUE_MAX      0x7fffffff
 92 #define DB_SMALL_VALUE_MIN      (-0x400001)
 93 
 94 #endif /* !_MACHINE_DB_MACHDEP_H_ */
 95 

Cache object: b817376b8502bf888150d475af2e5773


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.