Disassembler::Exception Class Reference

#include <Disassembler.h>

Collaboration diagram for Disassembler::Exception:

Collaboration graph
[legend]
List of all members.

Detailed Description

Exception thrown by the disassemblers.


Public Member Functions

 Exception (const std::string &reason)
 A bare exception not bound to any particular instruction.
 Exception (const std::string &reason, rose_addr_t ip)
 An exception bound to a virtual address but no raw data or instruction.
 Exception (const std::string &reason, rose_addr_t ip, const SgUnsignedCharList &raw_data, size_t bit)
 An exception bound to a particular instruction being disassembled.
 Exception (const std::string &reason, SgAsmInstruction *insn)
 An exception bound to a particular instruction being assembled.
void print (std::ostream &) const

Public Attributes

std::string mesg
 Reason that disassembly failed.
rose_addr_t ip
 Virtual address where failure occurred; zero if no associated instruction.
SgUnsignedCharList bytes
 Bytes (partial) of failed disassembly, including byte at failure.
size_t bit
 Bit offset in instruction byte sequence where disassembly failed (bit/8 is the index into the "bytes" list, while bit8 is the bit within that byte.
SgAsmInstructioninsn
 Instruction associated with an assembly error.

Friends

std::ostream & operator<< (std::ostream &o, const Exception &e)


Constructor & Destructor Documentation

Disassembler::Exception::Exception ( const std::string &  reason  )  [inline]

A bare exception not bound to any particular instruction.

Disassembler::Exception::Exception ( const std::string &  reason,
rose_addr_t  ip 
) [inline]

An exception bound to a virtual address but no raw data or instruction.

Disassembler::Exception::Exception ( const std::string &  reason,
rose_addr_t  ip,
const SgUnsignedCharList raw_data,
size_t  bit 
) [inline]

An exception bound to a particular instruction being disassembled.

Disassembler::Exception::Exception ( const std::string &  reason,
SgAsmInstruction insn 
) [inline]

An exception bound to a particular instruction being assembled.


Member Function Documentation

void Disassembler::Exception::print ( std::ostream &   )  const


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Exception e 
) [friend]


Member Data Documentation

std::string Disassembler::Exception::mesg

Reason that disassembly failed.

rose_addr_t Disassembler::Exception::ip

Virtual address where failure occurred; zero if no associated instruction.

SgUnsignedCharList Disassembler::Exception::bytes

Bytes (partial) of failed disassembly, including byte at failure.

Empty if the exception is not associated with a particular byte sequence, such as if an attempt was made to disassemble at an invalid address.

size_t Disassembler::Exception::bit

Bit offset in instruction byte sequence where disassembly failed (bit/8 is the index into the "bytes" list, while bit8 is the bit within that byte.

SgAsmInstruction* Disassembler::Exception::insn

Instruction associated with an assembly error.


The documentation for this class was generated from the following files:
Generated on Tue Jan 31 05:34:02 2012 for ROSE by  doxygen 1.4.7