< prev index next >

src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h

Print this page
rev 49870 : 8202200: set INCLUDE_SA to false on s390x by default


  58 4. ptrace operates on this LWP id under both the thread libraries. When we say 'pid' for
  59 ptrace call, we refer to lwp_id of the thread.
  60 
  61 5. for core file, we parse ELF files and read data from them. For processes we  use
  62 combination of ptrace and /proc calls.
  63 
  64 *************************************************************************************/
  65 
  66 
  67 #if defined(sparc) || defined(sparcv9) || defined(ppc64) || defined(ppc64le)
  68 #include <asm/ptrace.h>
  69 #define user_regs_struct  pt_regs
  70 #endif
  71 #if defined(aarch64) || defined(arm64)
  72 #include <asm/ptrace.h>
  73 #define user_regs_struct user_pt_regs
  74 #elif defined(arm)
  75 #include <asm/ptrace.h>
  76 #define user_regs_struct  pt_regs
  77 #endif
  78 #if defined(s390x)
  79 #include <asm/ptrace.h>
  80 #endif
  81 
  82 // This C bool type must be int for compatibility with Linux calls and
  83 // it would be a mistake to equivalence it to C++ bool on many platforms
  84 
  85 typedef int bool;
  86 #define true  1
  87 #define false 0
  88 
  89 struct ps_prochandle;
  90 
  91 // attach to a process
  92 JNIEXPORT struct ps_prochandle* JNICALL
  93 Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
  94 
  95 // attach to a core dump
  96 JNIEXPORT struct ps_prochandle* JNICALL
  97 Pgrab_core(const char* execfile, const char* corefile);
  98 
  99 // release a process or core
 100 JNIEXPORT void JNICALL




  58 4. ptrace operates on this LWP id under both the thread libraries. When we say 'pid' for
  59 ptrace call, we refer to lwp_id of the thread.
  60 
  61 5. for core file, we parse ELF files and read data from them. For processes we  use
  62 combination of ptrace and /proc calls.
  63 
  64 *************************************************************************************/
  65 
  66 
  67 #if defined(sparc) || defined(sparcv9) || defined(ppc64) || defined(ppc64le)
  68 #include <asm/ptrace.h>
  69 #define user_regs_struct  pt_regs
  70 #endif
  71 #if defined(aarch64) || defined(arm64)
  72 #include <asm/ptrace.h>
  73 #define user_regs_struct user_pt_regs
  74 #elif defined(arm)
  75 #include <asm/ptrace.h>
  76 #define user_regs_struct  pt_regs
  77 #endif



  78 
  79 // This C bool type must be int for compatibility with Linux calls and
  80 // it would be a mistake to equivalence it to C++ bool on many platforms
  81 
  82 typedef int bool;
  83 #define true  1
  84 #define false 0
  85 
  86 struct ps_prochandle;
  87 
  88 // attach to a process
  89 JNIEXPORT struct ps_prochandle* JNICALL
  90 Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
  91 
  92 // attach to a core dump
  93 JNIEXPORT struct ps_prochandle* JNICALL
  94 Pgrab_core(const char* execfile, const char* corefile);
  95 
  96 // release a process or core
  97 JNIEXPORT void JNICALL


< prev index next >