Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Jdb Struct Reference

#include <jdb.h>

Inheritance diagram for Jdb:

Jdb_core List of all members.

Public Types

enum  Guessed_thread_state {
  s_unknown, s_ipc, s_syscall, s_pagefault,
  s_fputrap, s_interrupt, s_timer_interrupt, s_slowtrap,
  s_user_invoke
}
enum  { NOFANCY = 0, FANCY = 1 }

Static Public Member Functions

static void init ()
template<typename T>
static T peek (T const *addr, Address_type user)
static void printf_statline (const char *prompt, const char *help, const char *format,...) __attribute__((format(printf
static void static int getchar (void)
 Overwritten getchar() to be able to handle next_char.
static int was_last_cmd (void)
static int get_next_cmd (void)
static void set_next_cmd (char c)
static void flush_next_cmd (void)
static bool is_toplevel_cmd (char c)
static Threadget_thread ()
 Deliver Thread object which was active at entry of kernel debugger.
static bool connected ()
static int source_level_debugging ()
static void abort_command ()
static int get_register (char *reg)
static Address establish_phys_mapping (Address phys, Address *offs)
static Task_num translate_task (Address addr, Task_num task)
static int peek_phys (Address phys)
static int poke_phys (Address phys, Unsigned8 value)
static int peek_task (Address addr, Task_num task)
static int poke_task (Address addr, Task_num task, Unsigned8 value)
static int peek_mword_task (Address addr, Task_num task, Mword *result)
static int peek_addr_task (Address virt, Task_num task, Address *result)
static void poke_mword_task (Address virt, Task_num task, Mword value)
static int is_adapter_memory (Address addr, Task_num task)
static Jdb::Guessed_thread_state guess_thread_state (Thread *t)
static void set_single_step (int on)
static void enter_getchar ()
static void leave_getchar ()
static void cursor (unsigned int row=0, unsigned int col=0)
static void blink_cursor (unsigned int row, unsigned int col)
static void cursor_save ()
static void cursor_restore ()
static void screen_erase ()
static void screen_scroll (unsigned int start, unsigned int end)
static void clear_to_eol ()
static void clear_screen (int fancy=FANCY)
static int std_cursor_key (int c, Mword cols, Mword lines, Mword max_absy, Mword *absy, Mword *addy, Mword *addx, bool *redraw)
static int execute_command (const char *s, int first_char=-1)
static void write_ll_ns (Signed64 ns, char *buf, int maxlen, bool sign)
static void write_tsc_s (Signed64 tsc, char *buf, int maxlen, bool sign)
static void write_tsc (Signed64 tsc, char *buf, int maxlen, bool sign)
static void write_ll_hex (Signed64 x, char *buf, int maxlen, bool sign)
static void write_ll_dec (Signed64 x, char *buf, int maxlen, bool sign)
static Threadget_current_active ()
static Jdb_entry_frameget_entry_frame ()
static int is_valid_task (Task_num task)
static Spacelookup_space (Task_num task)
static void get_current ()
static Spaceget_current_space ()
static Task_num get_current_task ()

Static Public Attributes

static Pic::Status pic_status
static const char *const reg_names []
static char lbr_active
static volatile char test_msr
static int(* bp_test_log_only )()
static int(* bp_test_sstep )()
static int(* bp_test_break )(char *errbuf, size_t bufsize)
static int(* bp_test_other )(char *errbuf, size_t bufsize)
static char esc_iret [] = "\033[36;1m"
static char esc_bt [] = "\033[31m"
static char esc_emph [] = "\033[33;1m"
static char esc_emph2 [] = "\033[32;1m"
static char esc_mark [] = "\033[35;1m"
static char esc_line [] = "\033[37m"
static char esc_symbol [] = "\033[33;1m"
static Jdb_handler_queue jdb_enter
static Jdb_handler_queue jdb_leave

Private Types

enum  Step_state { SS_NONE = 0, SS_BRANCH, SS_RETURN }

Private Member Functions

 Jdb ()
 Jdb (const Jdb &)

Static Private Member Functions

template<typename T>
static T peek (T const *addr)
static void backspace ()
static void save_disable_irqs ()
static void restore_irqs ()
static void open_debug_console ()
static void close_debug_console ()
static int switch_debug_state ()
static int execute_command ()
static void analyze_code ()
static int handle_single_step ()
static int handle_trap1 ()
static int handle_trap3 ()
static int handle_trapX ()
static int handle_int3 ()
 Int3 debugger interface.
static void enable_lbr ()
static FIASCO_FASTCALL int enter_kdebugger (Trap_state *ts)
static int execute_command_ni (Unsigned8 const *str, int len=0)
static int handle_int3_threadctx (Trap_state *ts)
 Handle int3 extensions in the current thread's context.
static int handle_int3_threadctx_generic (Trap_state *ts)
 Handle int3 extensions in the current thread's context.

Static Private Attributes

static Traps const traps [20]
static char error_buffer [81]
static Mword gdb_trap_ip
static Mword gdb_trap_pfa
static Mword gdb_trap_no
static Mword gdb_trap_err
static unsigned old_phys_pte = (unsigned)-1
static char _connected
static char was_input_error
static char permanent_single_step
static char hide_statline
static char use_nested
static char jdb_trap_recover
static char code_ret
static char code_call
static char code_bra
static char code_int
static const char * toplevel_cmds = "jV_"
static const char * non_interactive_cmds = "bEIJLMNOPS^"
static Step_state ss_state = SS_NONE
static int ss_level
static const Unsigned8 * debug_ctrl_str
static int debug_ctrl_len
static int jdb_irqs_disabled
static Threadcurrent_active
static char last_cmd
static char next_cmd
static Trap_state::Handler
nested_trap_handler 
FIASCO_FASTCALL
static Jdb_entry_frameentry_frame

Classes

struct  Traps

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
NOFANCY 
FANCY 

enum Jdb::Guessed_thread_state
 

Enumeration values:
s_unknown 
s_ipc 
s_syscall 
s_pagefault 
s_fputrap 
s_interrupt 
s_timer_interrupt 
s_slowtrap 
s_user_invoke 

enum Jdb::Step_state [private]
 

Enumeration values:
SS_NONE 
SS_BRANCH 
SS_RETURN 


Constructor & Destructor Documentation

Jdb::Jdb  )  [private]
 

Jdb::Jdb const Jdb  )  [private]
 


Member Function Documentation

void Jdb::abort_command  )  [static]
 

void Jdb::analyze_code  )  [static, private]
 

void Jdb::backspace  )  [inline, static, private]
 

void Jdb::blink_cursor unsigned int  row,
unsigned int  col
[inline, static]
 

void Jdb::clear_screen int  fancy = FANCY  )  [static]
 

void Jdb::clear_to_eol  )  [inline, static]
 

void Jdb::close_debug_console  )  [static, private]
 

bool Jdb::connected  )  [inline, static]
 

void Jdb::cursor unsigned int  row = 0,
unsigned int  col = 0
[static]
 

void Jdb::cursor_restore  )  [inline, static]
 

void Jdb::cursor_save  )  [inline, static]
 

void Jdb::enable_lbr  )  [inline, static, private]
 

void Jdb::enter_getchar  )  [inline, static]
 

FIASCO_FASTCALL int Jdb::enter_kdebugger Trap_state ts  )  [static, private]
 

Address Jdb::establish_phys_mapping Address  phys,
Address *  offs
[static]
 

int Jdb::execute_command  )  [static, private]
 

int Jdb::execute_command const char *  s,
int  first_char = -1
[static]
 

int Jdb::execute_command_ni Unsigned8 const *  str,
int  len = 0
[static, private]
 

static void Jdb::flush_next_cmd void   )  [static]
 

void Jdb::get_current  )  [static]
 

Thread * Jdb::get_current_active  )  [inline, static]
 

Space * Jdb::get_current_space  )  [inline, static]
 

Task_num Jdb::get_current_task  )  [inline, static]
 

Jdb_entry_frame * Jdb::get_entry_frame  )  [inline, static]
 

int Jdb::get_next_cmd void   )  [inline, static]
 

int Jdb::get_register char *  reg  )  [static]
 

Thread * Jdb::get_thread  )  [static]
 

Deliver Thread object which was active at entry of kernel debugger.

If we came from the kernel itself, return Thread with id 0.0

int Jdb::getchar void   )  [static]
 

Overwritten getchar() to be able to handle next_char.

Reimplemented from Jdb_core.

Jdb::Guessed_thread_state Jdb::guess_thread_state Thread t  )  [static]
 

int Jdb::handle_int3  )  [inline, static, private]
 

Int3 debugger interface.

This function is called immediately after entering the kernel debugger.

Returns:
1 if command was successfully interpreted

int Jdb::handle_int3_threadctx Trap_state ts  )  [static, private]
 

Handle int3 extensions in the current thread's context.

All functions for which we don't need/want to switch to the debugging stack.

Returns:
0 if this function should be handled in the context of Jdb 1 successfully handled

int Jdb::handle_int3_threadctx_generic Trap_state ts  )  [static, private]
 

Handle int3 extensions in the current thread's context.

All functions for which we don't need/want to switch to the debugging stack.

Returns:
0 if this function should be handled in the context of Jdb 1 successfully handled

int Jdb::handle_single_step  )  [inline, static, private]
 

int Jdb::handle_trap1  )  [inline, static, private]
 

int Jdb::handle_trap3  )  [inline, static, private]
 

int Jdb::handle_trapX  )  [inline, static, private]
 

FIASCO_INIT FIASCO_NOINLINE void Jdb::init  )  [static]
 

int Jdb::is_adapter_memory Address  addr,
Task_num  task
[static]
 

bool Jdb::is_toplevel_cmd char  c  )  [static]
 

int Jdb::is_valid_task Task_num  task  )  [static]
 

void Jdb::leave_getchar  )  [inline, static]
 

Space * Jdb::lookup_space Task_num  task  )  [static]
 

void Jdb::open_debug_console  )  [static, private]
 

template<typename T>
T Jdb::peek T const *  addr  )  [static, private]
 

template<typename T>
T Jdb::peek T const *  addr,
Address_type  user
[inline, static]
 

int Jdb::peek_addr_task Address  virt,
Task_num  task,
Address *  result
[static]
 

int Jdb::peek_mword_task Address  addr,
Task_num  task,
Mword *  result
[static]
 

int Jdb::peek_phys Address  phys  )  [static]
 

int Jdb::peek_task Address  addr,
Task_num  task
[static]
 

void Jdb::poke_mword_task Address  virt,
Task_num  task,
Mword  value
[static]
 

int Jdb::poke_phys Address  phys,
Unsigned8  value
[static]
 

int Jdb::poke_task Address  addr,
Task_num  task,
Unsigned8  value
[static]
 

void Jdb::printf_statline const char *  prompt,
const char *  help,
const char *  format,
  ...
[static]
 

void Jdb::restore_irqs  )  [static, private]
 

void Jdb::save_disable_irqs  )  [static, private]
 

void Jdb::screen_erase  )  [inline, static]
 

void Jdb::screen_scroll unsigned int  start,
unsigned int  end
[static]
 

void Jdb::set_next_cmd char  c  )  [inline, static]
 

void Jdb::set_single_step int  on  )  [static]
 

int Jdb::source_level_debugging  )  [inline, static]
 

int Jdb::std_cursor_key int  c,
Mword  cols,
Mword  lines,
Mword  max_absy,
Mword *  absy,
Mword *  addy,
Mword *  addx,
bool *  redraw
[static]
 

int Jdb::switch_debug_state  )  [static, private]
 

Task_num Jdb::translate_task Address  addr,
Task_num  task
[static]
 

int Jdb::was_last_cmd void   )  [inline, static]
 

void Jdb::write_ll_dec Signed64  x,
char *  buf,
int  maxlen,
bool  sign
[static]
 

void Jdb::write_ll_hex Signed64  x,
char *  buf,
int  maxlen,
bool  sign
[static]
 

void Jdb::write_ll_ns Signed64  ns,
char *  buf,
int  maxlen,
bool  sign
[static]
 

void Jdb::write_tsc Signed64  tsc,
char *  buf,
int  maxlen,
bool  sign
[static]
 

void Jdb::write_tsc_s Signed64  tsc,
char *  buf,
int  maxlen,
bool  sign
[static]
 


Member Data Documentation

char Jdb::_connected [static, private]
 

int(* Jdb::bp_test_break [static]
 

int(* Jdb::bp_test_log_only [static]
 

int(* Jdb::bp_test_other [static]
 

int(* Jdb::bp_test_sstep [static]
 

char Jdb::code_bra [static, private]
 

char Jdb::code_call [static, private]
 

char Jdb::code_int [static, private]
 

char Jdb::code_ret [static, private]
 

Thread * Jdb::current_active [static, private]
 

int Jdb::debug_ctrl_len [static, private]
 

const Unsigned8 * Jdb::debug_ctrl_str [static, private]
 

Jdb_entry_frame * Jdb::entry_frame [static, private]
 

char Jdb::error_buffer [static, private]
 

char Jdb::esc_bt = "\033[31m" [static]
 

char Jdb::esc_emph = "\033[33;1m" [static]
 

char Jdb::esc_emph2 = "\033[32;1m" [static]
 

char Jdb::esc_iret = "\033[36;1m" [static]
 

char Jdb::esc_line = "\033[37m" [static]
 

char Jdb::esc_mark = "\033[35;1m" [static]
 

char Jdb::esc_symbol = "\033[33;1m" [static]
 

Trap_state::Handler nested_trap_handler Jdb::FIASCO_FASTCALL [static, private]
 

Mword Jdb::gdb_trap_err [static, private]
 

Mword Jdb::gdb_trap_ip [static, private]
 

Mword Jdb::gdb_trap_no [static, private]
 

Mword Jdb::gdb_trap_pfa [static, private]
 

char Jdb::hide_statline [static, private]
 

Jdb_handler_queue Jdb::jdb_enter [static]
 

int Jdb::jdb_irqs_disabled [static, private]
 

Jdb_handler_queue Jdb::jdb_leave [static]
 

char Jdb::jdb_trap_recover [static, private]
 

char Jdb::last_cmd [static, private]
 

char Jdb::lbr_active [static]
 

char Jdb::next_cmd [static, private]
 

const char * Jdb::non_interactive_cmds = "bEIJLMNOPS^" [static, private]
 

unsigned Jdb::old_phys_pte = (unsigned)-1 [static, private]
 

char Jdb::permanent_single_step [static, private]
 

Pic::Status Jdb::pic_status [static]
 

const char *const Jdb::reg_names [static]
 

Initial value:

{ "EAX", "EBX", "ECX", "EDX", "EBP", "ESI", "EDI", "EIP", "ESP", "EFL" }

int Jdb::ss_level [static, private]
 

Jdb::Step_state Jdb::ss_state = SS_NONE [static, private]
 

volatile char Jdb::test_msr [static]
 

const char * Jdb::toplevel_cmds = "jV_" [static, private]
 

Traps const Jdb::traps[20] [static, private]
 

char Jdb::use_nested [static, private]
 

char Jdb::was_input_error [static, private]
 


The documentation for this struct was generated from the following files:
Generated on Mon Sep 26 14:20:14 2005 for Fiasco by  doxygen 1.4.2