#include "xed-state.h"
#include "xed-portability.h"
int xed_state_print(const xed_state_t* p, char* buf, int buflen) {
int blen = buflen;
blen = xed_strncpy(buf,"MachineMode: ",blen);
blen = xed_strncat(buf, xed_machine_mode_enum_t2str(p->mmode),blen);
blen = xed_strncat(buf," AddrWidth: ",blen);
blen = xed_strncat(buf,
xed_address_width_enum_t2str(xed_state_get_address_width(p)),blen);
blen = xed_strncat(buf," StackAddrWidth: ",blen);
blen = xed_strncat(buf,
xed_address_width_enum_t2str(p->stack_addr_width),blen);
return blen;
}