summaryrefslogtreecommitdiff
path: root/mdb/debian
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-04-14 19:31:01 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-04-14 19:31:01 +0400
commite36288e1759bf8132948febbbff189bdd1f5e2e6 (patch)
tree0274befd3a7e36d388f2e1ac4cec338c3fe65d8b /mdb/debian
parent95232eb0905a9175ce9094eef86a65adbe5eab8c (diff)
downloadillumos-packaging-e36288e1759bf8132948febbbff189bdd1f5e2e6.tar.gz
Added mdb-genunix-gcore-pointers.patch
Diffstat (limited to 'mdb/debian')
-rw-r--r--mdb/debian/patches/mdb-genunix-gcore-pointers.patch171
-rw-r--r--mdb/debian/patches/series1
2 files changed, 172 insertions, 0 deletions
diff --git a/mdb/debian/patches/mdb-genunix-gcore-pointers.patch b/mdb/debian/patches/mdb-genunix-gcore-pointers.patch
new file mode 100644
index 0000000..e8ac191
--- /dev/null
+++ b/mdb/debian/patches/mdb-genunix-gcore-pointers.patch
@@ -0,0 +1,171 @@
+Index: mdb/usr/src/cmd/mdb/common/modules/genunix/gcore.c
+===================================================================
+--- mdb.orig/usr/src/cmd/mdb/common/modules/genunix/gcore.c 2014-03-01 16:18:00.000000000 +0400
++++ mdb/usr/src/cmd/mdb/common/modules/genunix/gcore.c 2014-04-14 19:27:51.470247760 +0400
+@@ -164,7 +164,7 @@
+ struct vpage *vpage = NULL;
+ size_t nvpage = 0;
+
+- if (seg->s_data != NULL) {
++ if (seg->s_data != 0) {
+ svd = mdb_alloc(sizeof (*svd), UM_SLEEP);
+ if (mdb_ctf_vread(svd, "segvn_data_t", "mdb_segvn_data_t",
+ seg->s_data, 0) == -1) {
+@@ -779,7 +779,7 @@
+ if (seg->s_ops == gcore_segvn_ops) {
+ if (mdb_ctf_vread(&svd, "segvn_data_t",
+ "mdb_segvn_data_t", seg->s_data, 0) == 0 &&
+- svd.vp == NULL) {
++ svd.vp == 0) {
+ mp->pr_mflags |= MA_ANON;
+ }
+ }
+@@ -874,25 +874,25 @@
+ mdb_kthread_t *t = &kthr;
+ ushort_t t_istop_whystop = 0;
+ ushort_t t_istop_whatstop = 0;
+- uintptr_t t_addr = NULL;
+- uintptr_t t_onproc = NULL; // running on processor
+- uintptr_t t_run = NULL; // runnable, on disp queue
+- uintptr_t t_sleep = NULL; // sleeping
+- uintptr_t t_susp = NULL; // suspended stop
+- uintptr_t t_jstop = NULL; // jobcontrol stop, w/o directed stop
+- uintptr_t t_jdstop = NULL; // jobcontrol stop with directed stop
+- uintptr_t t_req = NULL; // requested stop
+- uintptr_t t_istop = NULL; // event-of-interest stop
+- uintptr_t t_dtrace = NULL; // DTrace stop
++ uintptr_t t_addr = 0;
++ uintptr_t t_onproc = 0; // running on processor
++ uintptr_t t_run = 0; // runnable, on disp queue
++ uintptr_t t_sleep = 0; // sleeping
++ uintptr_t t_susp = 0; // suspended stop
++ uintptr_t t_jstop = 0; // jobcontrol stop, w/o directed stop
++ uintptr_t t_jdstop = 0; // jobcontrol stop with directed stop
++ uintptr_t t_req = 0; // requested stop
++ uintptr_t t_istop = 0; // event-of-interest stop
++ uintptr_t t_dtrace = 0; // DTrace stop
+
+ /*
+ * If the agent lwp exists, it takes precedence over all others.
+ */
+- if ((t_addr = p->p_agenttp) != NULL) {
++ if ((t_addr = p->p_agenttp) != 0) {
+ return (t_addr);
+ }
+
+- if ((t_addr = p->p_tlist) == NULL) /* start at the head of the list */
++ if ((t_addr = p->p_tlist) == 0) /* start at the head of the list */
+ return (t_addr);
+ do { /* for each lwp in the process */
+ if (mdb_ctf_vread(&kthr, "kthread_t", "mdb_kthread_t",
+@@ -901,7 +901,7 @@
+ }
+
+ if (VSTOPPED(t)) { /* virtually stopped */
+- if (t_req == NULL)
++ if (t_req == 0)
+ t_req = t_addr;
+ continue;
+ }
+@@ -910,16 +910,16 @@
+ default:
+ return (0);
+ case TS_SLEEP:
+- if (t_sleep == NULL)
++ if (t_sleep == 0)
+ t_sleep = t_addr;
+ break;
+ case TS_RUN:
+ case TS_WAIT:
+- if (t_run == NULL)
++ if (t_run == 0)
+ t_run = t_addr;
+ break;
+ case TS_ONPROC:
+- if (t_onproc == NULL)
++ if (t_onproc == 0)
+ t_onproc = t_addr;
+ break;
+ /*
+@@ -931,22 +931,22 @@
+ case TS_STOPPED:
+ switch (t->t_whystop) {
+ case PR_SUSPENDED:
+- if (t_susp == NULL)
++ if (t_susp == 0)
+ t_susp = t_addr;
+ break;
+ case PR_JOBCONTROL:
+ if (t->t_proc_flag & TP_PRSTOP) {
+- if (t_jdstop == NULL)
++ if (t_jdstop == 0)
+ t_jdstop = t_addr;
+ } else {
+- if (t_jstop == NULL)
++ if (t_jstop == 0)
+ t_jstop = t_addr;
+ }
+ break;
+ case PR_REQUESTED:
+- if (t->t_dtrace_stop && t_dtrace == NULL)
++ if (t->t_dtrace_stop && t_dtrace == 0)
+ t_dtrace = t_addr;
+- else if (t_req == NULL)
++ else if (t_req == 0)
+ t_req = t_addr;
+ break;
+ case PR_SYSENTRY:
+@@ -957,7 +957,7 @@
+ * Make an lwp calling exit() be the
+ * last lwp seen in the process.
+ */
+- if (t_istop == NULL ||
++ if (t_istop == 0 ||
+ (t_istop_whystop == PR_SYSENTRY &&
+ t_istop_whatstop == SYS_exit)) {
+ t_istop = t_addr;
+@@ -1095,7 +1095,7 @@
+ mdb_sc_shared_t td;
+ mdb_sc_shared_t *tdp;
+
+- if (t->t_schedctl == NULL) {
++ if (t->t_schedctl == 0) {
+ return;
+ }
+
+@@ -1317,7 +1317,7 @@
+ uintptr_t t_addr = (uintptr_t)lwent->le_thread;
+ mdb_kthread_t kthrd;
+
+- if (t_addr == NULL) {
++ if (t_addr == 0) {
+ return (1);
+ }
+
+@@ -1693,7 +1693,7 @@
+ pcommon_t pc;
+
+ t_addr = gcore_prchoose(p);
+- if (t_addr != NULL) {
++ if (t_addr != 0) {
+ if (mdb_ctf_vread(&kthr, "kthread_t", "mdb_kthread_t", t_addr,
+ 0) == -1) {
+ return;
+@@ -1759,7 +1759,7 @@
+ uintptr_t t_addr;
+ pcommon_t pc;
+
+- if ((t_addr = gcore_prchoose(p)) == NULL) {
++ if ((t_addr = gcore_prchoose(p)) == 0) {
+ bzero(psp, sizeof (*psp));
+ } else {
+ bzero(psp, sizeof (*psp) - sizeof (psp->pr_lwp));
+@@ -1936,7 +1936,7 @@
+ size_t ldt_size;
+ int i, limit;
+
+- if (p->p_ldt == NULL) {
++ if (p->p_ldt == 0) {
+ return (0);
+ }
+
diff --git a/mdb/debian/patches/series b/mdb/debian/patches/series
index a08c2a8..ecac3d8 100644
--- a/mdb/debian/patches/series
+++ b/mdb/debian/patches/series
@@ -67,3 +67,4 @@ mdb-genunix-tsol-pointers.patch
mdb-genunix-vfs-pointers.patch
mdb-genunix-zone-pointers.patch
mdb-genunix-typegraph-pointers.patch
+mdb-genunix-gcore-pointers.patch