src/share/tools/hsdis/hsdis.h

changeset 4093
5a98bf7d847b
parent 2314
f95d63e2154a
child 4244
3d701c802d01
     1.1 --- a/src/share/tools/hsdis/hsdis.h	Thu Sep 20 03:49:15 2012 -0700
     1.2 +++ b/src/share/tools/hsdis/hsdis.h	Mon Sep 24 12:44:00 2012 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -25,7 +25,10 @@
    1.11  /* decode_instructions -- dump a range of addresses as native instructions
    1.12     This implements the protocol required by the HotSpot PrintAssembly option.
    1.13  
    1.14 -   The starting and ending addresses are within the current process's address space.
    1.15 +   The start_va, end_va is the virtual address the region of memory to
    1.16 +   disasemble and buffer contains the instructions to decode,
    1.17 +   Disassembling instructions in the current address space is done by
    1.18 +   having start_va == buffer.
    1.19  
    1.20     The option string, if not empty, is interpreted by the disassembler implementation.
    1.21  
    1.22 @@ -48,18 +51,20 @@
    1.23  #ifdef DLL_EXPORT
    1.24    DLL_EXPORT
    1.25  #endif
    1.26 -void* decode_instructions(void* start, void* end,
    1.27 -                          void* (*event_callback)(void*, const char*, void*),
    1.28 -                          void* event_stream,
    1.29 -                          int (*printf_callback)(void*, const char*, ...),
    1.30 -                          void* printf_stream,
    1.31 -                          const char* options);
    1.32 +void* decode_instructions_virtual(uintptr_t start_va, uintptr_t end_va,
    1.33 +                                  unsigned char* buffer, uintptr_t length,
    1.34 +                                  void* (*event_callback)(void*, const char*, void*),
    1.35 +                                  void* event_stream,
    1.36 +                                  int (*printf_callback)(void*, const char*, ...),
    1.37 +                                  void* printf_stream,
    1.38 +                                  const char* options);
    1.39  
    1.40  /* convenience typedefs */
    1.41  
    1.42  typedef void* (*decode_instructions_event_callback_ftype)  (void*, const char*, void*);
    1.43  typedef int   (*decode_instructions_printf_callback_ftype) (void*, const char*, ...);
    1.44 -typedef void* (*decode_instructions_ftype) (void* start, void* end,
    1.45 +typedef void* (*decode_instructions_ftype) (uintptr_t start_va, uintptr_t end_va,
    1.46 +                                            unsigned char* buffer, uintptr_t length,
    1.47                                              decode_instructions_event_callback_ftype event_callback,
    1.48                                              void* event_stream,
    1.49                                              decode_instructions_printf_callback_ftype printf_callback,

mercurial