UnivesalDisassembler(2003)

uda.cc File Reference

#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
ParametersParams = &params
 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

Typedef Documentation

typedef vector<string> str_list

Definition at line 42 of file uda.cc.


Function Documentation

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 
)

Definition at line 164 of file uda.cc.

References par_binfile, params, pdefined, and syntax.

Referenced by main().

void locate_address ( BinaryFile binaryfile,
const string  address 
)
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().


Variable Documentation

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 * options

Definition at line 332 of file uda.cc.

Referenced by main().

const char* par_binfile = "-b"

Definition at line 34 of file uda.cc.

Referenced by load_parameters(), and main().

Parameters map.

Definition at line 29 of file uda.cc.

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
Initial value:
"\
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().