00001
00002
00003 #ifndef jdb_disasm_i_h
00004 #define jdb_disasm_i_h
00005
00006 #include <cstdio>
00007 #include <cstring>
00008 #include <cstdarg>
00009
00010 #include "alloca.h"
00011 #include "disasm.h"
00012 #include "jdb.h"
00013 #include "jdb_input.h"
00014 #include "jdb_lines.h"
00015 #include "jdb_module.h"
00016 #include "jdb_screen.h"
00017 #include "jdb_symbol.h"
00018 #include "kernel_console.h"
00019 #include "keycodes.h"
00020 #include "static_init.h"
00021
00022 class Jdb_disasm : public Jdb_module
00023 {
00024 static char show_intel_syntax;
00025 static char show_lines;
00026
00027 public:
00028 static bool show_disasm_line(int len, Address &addr, int show_symbols, Task_num task);
00029
00030 static Jdb_module::Action_code show(Address virt, Task_num task, int level);
00031
00032 Jdb_module::Action_code action(int cmd, void *&args, char const *&fmt, int &next_char);
00033
00034 Jdb_module::Cmd const *const cmds() const;
00035
00036 int const num_cmds() const;
00037
00038 Jdb_disasm();
00039
00040 private:
00041 static bool disasm_line(char *buffer, int buflen, Address &addr, int show_symbols, Task_num task);
00042
00043 static int at_symbol(Address addr, Task_num task);
00044
00045 static int at_line(Address addr, Task_num task);
00046
00047 static Address disasm_offset(Address &start, int offset, Task_num task);
00048 };
00049
00050 #endif // jdb_disasm_i_h