00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*- 00002 00003 #ifndef jdb_bp_i_h 00004 #define jdb_bp_i_h 00005 00006 #include <cstdio> 00007 00008 #include "jdb.h" 00009 #include "jdb_input.h" 00010 #include "jdb_module.h" 00011 #include "jdb_handler_queue.h" 00012 #include "jdb_tbuf.h" 00013 #include "l4_types.h" 00014 #include "static_init.h" 00015 #include "thread.h" 00016 00017 class Jdb_set_bp : public Jdb_module, public Jdb_input_task_addr 00018 { 00019 private: 00020 static char breakpoint_cmd; 00021 static char breakpoint_restrict_cmd; 00022 static Mword breakpoint_number; 00023 static Mword breakpoint_length; 00024 static Task_num breakpoint_restrict_task; 00025 static L4_uid breakpoint_restrict_thread; 00026 typedef struct 00027 { 00028 char reg; 00029 Mword low; 00030 Mword high; 00031 } Restrict_reg; 00032 static Restrict_reg breakpoint_restrict_reg; 00033 typedef struct 00034 { 00035 Address addr; 00036 Mword low; 00037 Mword high; 00038 } Restrict_addr; 00039 static Restrict_addr breakpoint_restrict_addr; 00040 static int state; 00041 00042 public: 00043 //---------------------------------------------------------------------------// 00044 Jdb_set_bp(); 00045 00046 Jdb_module::Action_code action(int cmd, void *&args, char const *&fmt, int &next_char); 00047 00048 Jdb_module::Cmd const *const cmds() const; 00049 00050 int const num_cmds() const; 00051 }; 00052 00053 // 00054 // IMPLEMENTATION of inline functions follows 00055 // 00056 00057 00058 00059 00060 inline void 00061 Jdb_bp::clr_dr7(int num, Mword &dr7) 00062 { 00063 dr7 &= ~(((3 + (3 <<2)) << (16 + 4*num)) + (3 << (2*num))); 00064 } 00065 00066 00067 00068 inline void 00069 Jdb_bp::set_dr7(int num, Mword len, Breakpoint::Mode mode, Mword &dr7) 00070 { 00071 dr7 |= ((((mode & 3) + ((len-1)<<2)) << (16 + 4*num)) + (2 << (2*num))); 00072 dr7 |= 0x200; /* exact breakpoint enable (not available on P6 and below) */ 00073 } 00074 00075 #endif // jdb_bp_i_h