Go to the documentation of this file.
41 message(ui_message_handler)
65 "no binary provided for analysis",
"<binary> <args>");
71 "need to provide symbols to analyse via --symbols",
"--symbols");
77 if(core_file && breakpoint)
80 "cannot start gdb from both core-file and breakpoint",
81 "--core-file/--breakpoint");
84 if(!core_file && !breakpoint)
87 "need to provide either core-file or breakpoint for gdb",
88 "--core-file/--breakpoint");
92 const bool symtab_snapshot =
cmdline.
isset(
"symtab-snapshot");
94 if(symtab_snapshot && output_file)
97 "printing to a file is not supported for symbol table snapshot output",
110 "cannot read goto binary '" +
binary +
"'");
113 const goto_modelt goto_model(std::move(opt.value()));
141 output_file ? (std::ostream &)file : (std::ostream &)
message.
result();
175 <<
"Usage: Purpose:\n"
177 <<
" memory-analyzer [-?] [-h] [--help] show help\n"
178 <<
" memory-analyzer --version show"
180 <<
" memory-analyzer --symbols <symbol-list> <options> <binary> analyze"
183 <<
" --core-file <file> analyze from core file\n"
184 <<
" --breakpoint <breakpoint> analyze from breakpoint\n"
185 <<
" --symbols <symbol-list> list of symbols to analyze\n"
186 <<
" --symtab-snapshot output snapshot as symbol table\n"
187 <<
" --output-file <file> write snapshot to file\n"
188 <<
" --json-ui output snapshot in JSON format\n"
ui_message_handlert ui_message_handler
virtual bool isset(char option) const
Thrown when failing to deserialize a value from some low level format, like JSON or raw bytes.
void show_symbol_table(const symbol_tablet &symbol_table, ui_message_handlert &ui)
std::list< std::string > get_comma_separated_values(const char *option) const
Collect all occurrences of option option and split their values on each comma, merging them into a si...
const char * CBMC_VERSION
mstreamt & result() const
std::string banner_string(const std::string &front_end, const std::string &version)
std::string get_value(char option) const
void register_language(language_factoryt factory)
Register a language Note: registering a language is required for using the functions in language_util...
#define MEMORY_ANALYZER_OPTIONS
memory_analyzer_parse_optionst(int argc, const char *argv[])
bool set(const cmdlinet &cmdline)
std::unique_ptr< languaget > new_ansi_c_language()
static std::string binary(const constant_exprt &src)
static bool read_goto_binary(const std::string &filename, symbol_tablet &, goto_functionst &, message_handlert &)
Read a goto binary from a file, but do not update config.
#define CPROVER_EXIT_SUCCESS
Success indicates the required analysis has been performed without error.
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
symbol_tablet symbol_table
Symbol table.
void register_languages() override
std::string align_center_with_border(const std::string &text)
Utility for displaying help centered messages borderered by "* *".