hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk9-arm3264 Sdiff hotspot/src/jdk.hotspot.agent/linux/native/libsaproc

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

Print this page




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






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




  60 only for processes. For core dumps, we don't use libthread_db at all (like gdb).
  61 
  62 4. ptrace operates on this LWP id under both the thread libraries. When we say 'pid' for
  63 ptrace call, we refer to lwp_id of the thread.
  64 
  65 5. for core file, we parse ELF files and read data from them. For processes we  use
  66 combination of ptrace and /proc calls.
  67 
  68 *************************************************************************************/
  69 
  70 
  71 #if defined(sparc) || defined(sparcv9) || defined(ppc64) || defined(ppc64le)
  72 #include <asm/ptrace.h>
  73 #define user_regs_struct  pt_regs
  74 #endif
  75 #if defined(aarch64)
  76 #include <asm/ptrace.h>
  77 #define user_regs_struct user_pt_regs
  78 #endif
  79 
  80 #if defined(arm) || defined(arm64)
  81 struct user_regs_struct {
  82     unsigned long   regs[ELF_NGREG];     /* integer and fp regs */
  83 };
  84 #endif
  85 
  86 // This C bool type must be int for compatibility with Linux calls and
  87 // it would be a mistake to equivalence it to C++ bool on many platforms
  88 
  89 typedef int bool;
  90 #define true  1
  91 #define false 0
  92 
  93 struct ps_prochandle;
  94 
  95 // attach to a process
  96 struct ps_prochandle* Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
  97 
  98 // attach to a core dump
  99 struct ps_prochandle* Pgrab_core(const char* execfile, const char* corefile);
 100 
 101 // release a process or core
 102 void Prelease(struct ps_prochandle* ph);
 103 
 104 // functions not directly available in Solaris libproc
 105 


hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File