diff agent/src/os/solaris/proc/libproc.h @ 3306:405c634f4aaa

7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307 Summary: Support build and runtime configs of old and new interfaces as appropriate. Reviewed-by: acorn, never
author dcubed
date Mon, 02 May 2011 14:53:49 -0700
parents c18cbe5936b8
children
line wrap: on
line diff
--- a/agent/src/os/solaris/proc/libproc.h	Fri Apr 29 21:13:00 2011 +0400
+++ b/agent/src/os/solaris/proc/libproc.h	Mon May 02 14:53:49 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -420,7 +420,22 @@
 /*
  * Stack frame iteration interface.
  */
+#ifdef SOLARIS_11_B159_OR_LATER
+/* building on Nevada-B159 or later so define the new callback */
+typedef int proc_stack_f(
+    void *,             /* the cookie given to Pstack_iter() */
+    const prgregset_t,  /* the frame's registers */
+    uint_t,             /* argc for the frame's function */
+    const long *,       /* argv for the frame's function */
+    int,                /* bitwise flags describing the frame (see below) */
+    int);               /* a signal number */
+
+#define PR_SIGNAL_FRAME    1    /* called by a signal handler */
+#define PR_FOUND_SIGNAL    2    /* we found the corresponding signal number */
+#else
+/* building on Nevada-B158 or earlier so define the old callback */
 typedef int proc_stack_f(void *, const prgregset_t, uint_t, const long *);
+#endif
 
 extern int Pstack_iter(struct ps_prochandle *,
     const prgregset_t, proc_stack_f *, void *);