ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Namespaces | Functions
Hex.h File Reference
#include "etiss/jit/types.h"
#include <iostream>
#include <string>
Include dependency graph for Hex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  etiss
 forwards: include/jit/*
 
namespace  etiss::plugin
 
namespace  etiss::plugin::gdb
 
namespace  etiss::plugin::gdb::hex
 

Functions

uint8_t etiss::plugin::gdb::hex::fromHex (char c)
 convert a character to the hex value it represents(0-15)
 
char etiss::plugin::gdb::hex::toHex (uint8_t l)
 converts the lower 4 bits to a representing char
 
uint8_t etiss::plugin::gdb::hex::toByte (char h, char l)
 converts 2 hex characters to a byte
 
uint8_t etiss::plugin::gdb::hex::toByte (std::string hex, size_t pos=0)
 converts 2 characters from a hex string to one byte
 
std::string etiss::plugin::gdb::hex::fromByte (uint8_t byte)
 converts a byte to a hex string (without "0x" prefix);
 
void etiss::plugin::gdb::hex::fromByte (std::string &append, uint8_t byte)
 converts a byte to hexadecimal representation and appends it to the passed string
 
std::string etiss::plugin::gdb::hex::fromBytes (uint8_t *buf, size_t length)
 converts a sequence of bytes to a representing hex string (without "0x" prefix)
 
template<typename INT >
void etiss::plugin::gdb::hex::fromInt (std::string &string, INT val, bool isLittleEndian)
 converts an integer type variable to a hexadecimal representation with the given endianness
 
template<typename INT >
INT etiss::plugin::gdb::hex::toInt (const std::string &string, bool isLittleEndian, size_t pos=0)
 convert a string of length (pos + sizeof(INT)) or larger to the represented value.
 
template<typename INT >
INT etiss::plugin::gdb::hex::tryInt (std::string &string, unsigned &pos, size_t maxlength=sizeof(INT) *2)
 parses a hex string and returns the result.