summaryrefslogtreecommitdiff
path: root/usr/src/cmd/mdb/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/mdb/common')
-rw-r--r--usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c4
-rw-r--r--usr/src/cmd/mdb/common/mdb/mdb_proc.c9
-rw-r--r--usr/src/cmd/mdb/common/modules/audiosup/audiosup.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/genunix.c2
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/memory.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/mdb_test/mdb_test.c6
-rw-r--r--usr/src/cmd/mdb/common/modules/sctp/sctp.c2
7 files changed, 17 insertions, 14 deletions
diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c b/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c
index 45b9637114..d536f75718 100644
--- a/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c
+++ b/usr/src/cmd/mdb/common/kmdb/kmdb_stubs.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -157,6 +157,8 @@ void
exit(int status)
{
#ifdef __sparc
+ extern void kmdb_prom_exit_to_mon(void) __NORETURN;
+
kmdb_prom_exit_to_mon();
#else
extern void kmdb_dpi_reboot(void) __NORETURN;
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_proc.c b/usr/src/cmd/mdb/common/mdb/mdb_proc.c
index b4495c0f02..b165eb4f4e 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_proc.c
+++ b/usr/src/cmd/mdb/common/mdb/mdb_proc.c
@@ -4378,8 +4378,9 @@ pt_getareg(mdb_tgt_t *t, mdb_tgt_tid_t tid,
* If we are debugging on 32-bit SPARC, the globals and
* outs can have 32 upper bits hiding in the xregs.
*/
- /* LINTED */
- int is_g = (rd_num >= R_G0 && rd_num <= R_G7);
+ /* gcc doesn't like >= R_G0 because R_G0 == 0 */
+ int is_g = (rd_num == R_G0 ||
+ rd_num >= R_G1 && rd_num <= R_G7);
int is_o = (rd_num >= R_O0 && rd_num <= R_O7);
prxregset_t xrs;
@@ -4434,8 +4435,8 @@ pt_putareg(mdb_tgt_t *t, mdb_tgt_tid_t tid, const char *rname, mdb_tgt_reg_t r)
* If we are debugging on 32-bit SPARC, the globals and
* outs can have 32 upper bits stored in the xregs.
*/
- /* LINTED */
- int is_g = (rd_num >= R_G0 && rd_num <= R_G7);
+ int is_g = (rd_num == R_G0 ||
+ rd_num >= R_G1 && rd_num <= R_G7);
int is_o = (rd_num >= R_O0 && rd_num <= R_O7);
prxregset_t xrs;
diff --git a/usr/src/cmd/mdb/common/modules/audiosup/audiosup.c b/usr/src/cmd/mdb/common/modules/audiosup/audiosup.c
index 4ba35343fc..ab98383de7 100644
--- a/usr/src/cmd/mdb/common/modules/audiosup/audiosup.c
+++ b/usr/src/cmd/mdb/common/modules/audiosup/audiosup.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -59,7 +59,7 @@ audiotrace_walk_init(mdb_walk_state_t *wsp)
return (WALK_ERR);
}
- buffer = (audio_trace_buf_t *)sym.st_value;
+ buffer = (audio_trace_buf_t *)(uintptr_t)sym.st_value;
if (mdb_readvar(&seq, "audio_tb_seq") == -1) {
mdb_warn("failed to read 'audio_tb_seq'");
diff --git a/usr/src/cmd/mdb/common/modules/genunix/genunix.c b/usr/src/cmd/mdb/common/modules/genunix/genunix.c
index b79263ee64..36dfa16eb6 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/genunix.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/genunix.c
@@ -629,7 +629,7 @@ lg_walk_init(mdb_walk_state_t *wsp)
}
wsp->walk_addr = (uintptr_t)sym.st_value;
- wsp->walk_data = (void *)(sym.st_value + sym.st_size);
+ wsp->walk_data = (void *)(uintptr_t)(sym.st_value + sym.st_size);
return (WALK_NEXT);
}
diff --git a/usr/src/cmd/mdb/common/modules/genunix/memory.c b/usr/src/cmd/mdb/common/modules/genunix/memory.c
index 443f50901a..2c1864c670 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/memory.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/memory.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -322,7 +322,7 @@ memstat(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_ERR);
}
- unused_stats.ms_kvp = (struct vnode *)sym.st_value;
+ unused_stats.ms_kvp = (struct vnode *)(uintptr_t)sym.st_value;
/* Find unused pages */
if (mdb_walk("page", (mdb_walk_cb_t)memstat_callback,
diff --git a/usr/src/cmd/mdb/common/modules/mdb_test/mdb_test.c b/usr/src/cmd/mdb/common/modules/mdb_test/mdb_test.c
index 8222873990..da6e8be326 100644
--- a/usr/src/cmd/mdb/common/modules/mdb_test/mdb_test.c
+++ b/usr/src/cmd/mdb/common/modules/mdb_test/mdb_test.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -282,9 +282,9 @@ cmd_getsetdot(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (argc != 0)
return (DCMD_USAGE);
- mdb_set_dot(0x12345678feedbeef);
+ mdb_set_dot(0x12345678feedbeefULL);
- if (mdb_get_dot() != 0x12345678feedbeef) {
+ if (mdb_get_dot() != 0x12345678feedbeefULL) {
mdb_warn("mdb_get_dot() returned wrong value!\n");
return (DCMD_ERR);
}
diff --git a/usr/src/cmd/mdb/common/modules/sctp/sctp.c b/usr/src/cmd/mdb/common/modules/sctp/sctp.c
index 692bc1d1df..606fdda635 100644
--- a/usr/src/cmd/mdb/common/modules/sctp/sctp.c
+++ b/usr/src/cmd/mdb/common/modules/sctp/sctp.c
@@ -1062,7 +1062,7 @@ fanout_walk_init(mdb_walk_state_t *wsp)
lw->index = 0;
lw->size = fi->getsize();
lw->sctp = NULL;
- lw->fanout = (sctp_tf_t *)sym.st_value;
+ lw->fanout = (sctp_tf_t *)(uintptr_t)sym.st_value;
lw->getnext = fi->getnext;
if ((wsp->walk_addr = find_next_hash_item(lw)) == NULL) {