/* $Id$ */
/** @file
* VBox Disassembler - Helper for formatting the opcode bytes.
*/
/*
* Copyright (C) 2008-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "DisasmInternal.h"
/**
* Helper function for formatting the opcode bytes.
*
* @returns The number of output bytes.
*
* @param pDis Pointer to the disassembler state.
* @param pszDst The output buffer.
* @param cchDst The size of the output buffer.
* @param fFlags The flags passed to the formatter.
*/
{
do { \
cchOutput++; \
if (cchDst > 1) \
{ \
cchDst--; \
} \
} while (0)
do { \
if (cchDst > 1) \
{ \
} \
} while (0)
PUT_C('[');
{
if (i != 0 && (fFlags & DIS_FMT_FLAGS_BYTES_SPACED))
else
}
PUT_C(']');
/* Terminate it just in case. */
if (cchDst >= 1)
*pszDst = '\0';
return cchOutput;
}