UnivesalDisassembler(2003)
|
#include <string>
#include <iomanip>
#include <iostream>
#include <libgen.h>
#include "shared.h"
#include "plugins.h"
#include "sections.h"
#include "symtable.h"
#include "instrset.h"
#include "decoder.h"
Go to the source code of this file.
Typedefs | |
typedef vector< string > | str_list |
Functions | |
int | load_parameters (int &argc, char **&argv) |
void | locate_address (BinaryFile &binaryfile, const string address) |
void | print_sections (BinaryFile &binaryfile) |
void | print_content (BinaryFile &binaryfile, const string section) |
void | print_symbols (BinaryFile &binaryfile) |
void | disassemble (BinaryFile &binaryfile, const string section, const string scanned) |
void | set_base_dir (char *dir) |
int | main (int argc, char *argv[]) |
str_list | parse_sectionname (BinaryFile &binaryfile, const string section) |
void | print_sections_header () |
void | print_sections_info (unsigned n, const string name, Address start, unsigned size, bool executable) |
void | disasm_section (BinaryFile &binaryfile, const string section) |
Variables | |
Parameters | params |
Parameters * | Params = ¶ms |
Parameters map. | |
const char * | defaultbasedir = "/usr/share/uda/" |
string | basedir |
const char * | par_binfile = "-b" |
const char * | sec_alldata = "*data" |
const char * | sec_allexec = "*exec" |
const char * | sec_all = "*" |
const char * | syntax |
const char * | options |
void disasm_section | ( | BinaryFile & | binaryfile, |
const string | section | ||
) |
Definition at line 303 of file uda.cc.
References debug, decinfo, Decoder::Decode(), decoder, DecoderInfo::print, and DecoderInfo::section.
Referenced by disassemble().
void disassemble | ( | BinaryFile & | binaryfile, |
const string | section, | ||
const string | scanned | ||
) |
Definition at line 317 of file uda.cc.
References disasm_section(), and parse_sectionname().
Referenced by main().
int load_parameters | ( | int & | argc, |
char **& | argv | ||
) |
void locate_address | ( | BinaryFile & | binaryfile, |
const string | address | ||
) |
Definition at line 243 of file uda.cc.
References Symbols::findaddress(), hex2uint(), pdefined, print_sections_header(), print_sections_info(), BinaryFile::sections, and symbols.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 65 of file uda.cc.
References DecoderInfo::address, BinaryFile::bfdata, DecoderInfo::binfile, ClosePlugins(), debug, decinfo, disassemble(), Symbols::findaddress(), hex2uint(), DecoderInfo::hexdump, BinaryFile::Init(), instructionset, InstructionSet::Load(), Symbols::Load(), load_parameters(), locate_address(), number2uint(), DecoderInfo::onlyname, OpenPlugins(), options, par_binfile, params, pdefined, PluginsInfo(), Exception::Print(), DecoderInfo::print, print_content(), print_sections(), print_symbols(), set_base_dir(), DecoderInfo::size, DecoderInfo::start, DecoderInfo::stop, DecoderInfo::symbolic, symbols, and syntax.
str_list parse_sectionname | ( | BinaryFile & | binaryfile, |
const string | section | ||
) |
Definition at line 192 of file uda.cc.
References sec_all, sec_alldata, sec_allexec, and BinaryFile::sections.
Referenced by disassemble().
void print_content | ( | BinaryFile & | binaryfile, |
const string | section | ||
) |
Definition at line 283 of file uda.cc.
References SectionData::addr, Section::data, BinaryFile::sections, and Section::ValidAddress().
Referenced by main().
void print_sections | ( | BinaryFile & | binaryfile | ) |
Definition at line 273 of file uda.cc.
References print_sections_header(), print_sections_info(), and BinaryFile::sections.
Referenced by main().
void print_sections_header | ( | ) |
Definition at line 221 of file uda.cc.
Referenced by locate_address(), and print_sections().
void print_sections_info | ( | unsigned | n, |
const string | name, | ||
Address | start, | ||
unsigned | size, | ||
bool | executable | ||
) |
Definition at line 226 of file uda.cc.
Referenced by locate_address(), and print_sections().
void print_symbols | ( | BinaryFile & | binaryfile | ) |
Definition at line 295 of file uda.cc.
References AbstractSymbols::symbols, and symbols.
Referenced by main().
void set_base_dir | ( | char * | dir | ) |
Definition at line 55 of file uda.cc.
References basedir, defaultbasedir, directory_exists(), and instrsetdirectory.
Referenced by main().
string basedir |
Definition at line 32 of file uda.cc.
Referenced by InstructionSet::Load(), OpenPlugins(), and set_base_dir().
const char* defaultbasedir = "/usr/share/uda/" |
Definition at line 31 of file uda.cc.
Referenced by set_base_dir().
const char* par_binfile = "-b" |
Definition at line 34 of file uda.cc.
Referenced by load_parameters(), and main().
Parameters* Params = ¶ms |
Definition at line 28 of file uda.cc.
Referenced by load_parameters(), and main().
const char* sec_all = "*" |
Definition at line 38 of file uda.cc.
Referenced by parse_sectionname().
const char* sec_alldata = "*data" |
Definition at line 36 of file uda.cc.
Referenced by parse_sectionname().
const char* sec_allexec = "*exec" |
Definition at line 37 of file uda.cc.
Referenced by parse_sectionname().
const char * syntax |
"\ Usage: uda binary [options]\n\ uda --help\n"
Definition at line 328 of file uda.cc.
Referenced by Plugin::Info(), load_parameters(), main(), and Plugin::Open().