< prev index next >

src/utils/hsdis/hsdis.c

Print this page

 36  * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 37  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 38  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 39  * USE OR OTHER DEALINGS IN THE SOFTWARE.
 40  *
 41  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 42  * or visit www.oracle.com if you need additional information or have any
 43  * questions.
 44  *
 45  */
 46 
 47 /* hsdis.c -- dump a range of addresses as native instructions
 48    This implements the plugin protocol required by the
 49    HotSpot PrintAssembly option.
 50 */
 51 
 52 #include <config.h> /* required by bfd.h */
 53 #include <errno.h>
 54 #include <inttypes.h>
 55 #include <string.h>
 56 
 57 #include <libiberty.h>
 58 #include <bfd.h>
 59 #include <bfdver.h>
 60 #include <dis-asm.h>
 61 
 62 #include "hsdis.h"
 63 
 64 #ifndef bool
 65 #define bool int
 66 #define true 1
 67 #define false 0
 68 #endif /*bool*/
 69 
 70 /* short names for stuff in hsdis.h */
 71 typedef decode_instructions_event_callback_ftype  event_callback_t;
 72 typedef decode_instructions_printf_callback_ftype printf_callback_t;
 73 
 74 /* disassemble_info.application_data object */
 75 struct hsdis_app_data {
 76   /* virtual address of data */
 77   uintptr_t start_va, end_va;
 78   /* the instructions to be decoded */
 79   unsigned char* buffer;
 80   uintptr_t length;
 81   event_callback_t  event_callback;  void* event_stream;

 36  * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 37  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 38  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 39  * USE OR OTHER DEALINGS IN THE SOFTWARE.
 40  *
 41  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 42  * or visit www.oracle.com if you need additional information or have any
 43  * questions.
 44  *
 45  */
 46 
 47 /* hsdis.c -- dump a range of addresses as native instructions
 48    This implements the plugin protocol required by the
 49    HotSpot PrintAssembly option.
 50 */
 51 
 52 #include <config.h> /* required by bfd.h */
 53 #include <errno.h>
 54 #include <inttypes.h>
 55 #include <string.h>

 56 #include <libiberty.h>
 57 #include <bfd.h>
 58 #include <bfdver.h>
 59 #include <dis-asm.h>

 60 #include "hsdis.h"
 61 
 62 #ifndef bool
 63 #define bool int
 64 #define true 1
 65 #define false 0
 66 #endif /*bool*/
 67 
 68 /* short names for stuff in hsdis.h */
 69 typedef decode_instructions_event_callback_ftype  event_callback_t;
 70 typedef decode_instructions_printf_callback_ftype printf_callback_t;
 71 
 72 /* disassemble_info.application_data object */
 73 struct hsdis_app_data {
 74   /* virtual address of data */
 75   uintptr_t start_va, end_va;
 76   /* the instructions to be decoded */
 77   unsigned char* buffer;
 78   uintptr_t length;
 79   event_callback_t  event_callback;  void* event_stream;
< prev index next >