[dbg] Pull out common code into dbg-lib

- Modularize common routines
- Extract the block_dumper interface for displaying blocks
- Remove inheritance from show_traits
This commit is contained in:
Ming-Hung Tsai
2021-02-19 14:06:21 +08:00
parent c95e31bef6
commit a81cef4467
21 changed files with 640 additions and 587 deletions

24
dbg-lib/commands.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef DBG_COMMANDS_H
#define DBG_COMMANDS_H
#include "dbg-lib/command_interpreter.h"
#include "dbg-lib/block_dumper.h"
#include "persistent-data/block.h"
//----------------------------------------------------------------
namespace dbg {
dbg::command::ptr
create_hello_handler();
dbg::command::ptr
create_exit_handler(dbg::command_interpreter::ptr interp);
dbg::command::ptr
create_block_handler(persistent_data::block_manager::ptr bm,
dbg::block_dumper::ptr dumper);
}
//----------------------------------------------------------------
#endif