summaryrefslogtreecommitdiff
path: root/usr/src/cmd/mdb/intel
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/mdb/intel')
-rw-r--r--usr/src/cmd/mdb/intel/Makefile.libstand6
-rw-r--r--usr/src/cmd/mdb/intel/amd64/Makefile.kmdb13
-rw-r--r--usr/src/cmd/mdb/intel/amd64/fcip/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/amd64/fctl/Makefile6
-rw-r--r--usr/src/cmd/mdb/intel/amd64/genunix/Makefile7
-rw-r--r--usr/src/cmd/mdb/intel/amd64/idm/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/ipc/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/ipp/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/libproc/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/libtopo/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/amd64/libumem/Makefile4
-rw-r--r--usr/src/cmd/mdb/intel/amd64/libzpool/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/mdb/Makefile12
-rw-r--r--usr/src/cmd/mdb/intel/amd64/mpt_sas/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/amd64/pmcs/Makefile4
-rw-r--r--usr/src/cmd/mdb/intel/amd64/qlc/Makefile1
-rw-r--r--usr/src/cmd/mdb/intel/amd64/rdc/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/amd64/ufs/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/amd64/zfs/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/fcip/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/fctl/Makefile6
-rw-r--r--usr/src/cmd/mdb/intel/ia32/genunix/Makefile9
-rw-r--r--usr/src/cmd/mdb/intel/ia32/idm/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/ipc/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/ipp/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/libproc/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/libtopo/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/libumem/Makefile4
-rw-r--r--usr/src/cmd/mdb/intel/ia32/libzpool/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/mpt_sas/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/pmcs/Makefile4
-rw-r--r--usr/src/cmd/mdb/intel/ia32/qlc/Makefile1
-rw-r--r--usr/src/cmd/mdb/intel/ia32/rdc/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/ufs/Makefile3
-rw-r--r--usr/src/cmd/mdb/intel/ia32/zfs/Makefile4
-rw-r--r--usr/src/cmd/mdb/intel/libstand/uname.c42
-rw-r--r--usr/src/cmd/mdb/intel/mdb/mdb_amd64util.c250
-rw-r--r--usr/src/cmd/mdb/intel/modules/amd_opteron/amd64/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/modules/amd_opteron/ia32/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/modules/generic_cpu/amd64/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/modules/generic_cpu/ia32/Makefile2
41 files changed, 182 insertions, 253 deletions
diff --git a/usr/src/cmd/mdb/intel/Makefile.libstand b/usr/src/cmd/mdb/intel/Makefile.libstand
index f7c386163d..69abf9db8d 100644
--- a/usr/src/cmd/mdb/intel/Makefile.libstand
+++ b/usr/src/cmd/mdb/intel/Makefile.libstand
@@ -23,12 +23,8 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-SRCS += \
- stat.c \
- uname.c
+SRCS += stat.c
%.o: ../../libstand/%.c
$(COMPILE.c) $<
diff --git a/usr/src/cmd/mdb/intel/amd64/Makefile.kmdb b/usr/src/cmd/mdb/intel/amd64/Makefile.kmdb
index 324572a024..278724bb74 100644
--- a/usr/src/cmd/mdb/intel/amd64/Makefile.kmdb
+++ b/usr/src/cmd/mdb/intel/amd64/Makefile.kmdb
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
KMDBML += \
kaif_invoke.s \
@@ -31,6 +29,15 @@ KMDBML += \
KMDBSRCS += \
kmdb_makecontext.c \
- mdb_amd64util.c
+ mdb_amd64util.c \
+ saveargs.c
+
+%.o: $(SRC)/common/saveargs/%.c
+ $(COMPILE.c) $<
+ $(CTFCONVERT_O)
+
+%.ln: $(SRC)/common/saveargs/%.c
+ $(LINT.c) -c $<
SACPPFLAGS = -D__$(MACH64) -U__$(MACH)
+CPPFLAGS += -I$(SRC)/common/saveargs
diff --git a/usr/src/cmd/mdb/intel/amd64/fcip/Makefile b/usr/src/cmd/mdb/intel/amd64/fcip/Makefile
index 7ba9baa3b6..4621e40161 100644
--- a/usr/src/cmd/mdb/intel/amd64/fcip/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/fcip/Makefile
@@ -36,3 +36,5 @@ include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/uts/common
LINTFLAGS64 += -erroff=E_STATIC_UNUSED
+
+CERRWARN += -_gcc=-Wno-unused-function
diff --git a/usr/src/cmd/mdb/intel/amd64/fctl/Makefile b/usr/src/cmd/mdb/intel/amd64/fctl/Makefile
index 2aa2cfaafa..155470c49f 100644
--- a/usr/src/cmd/mdb/intel/amd64/fctl/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/fctl/Makefile
@@ -42,4 +42,8 @@ LINTFLAGS64 += -erroff=E_FUNC_SET_NOT_USED
LINTFLAGS64 += -erroff=E_FUNC_ARG_UNUSED
LINTFLAGS64 += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY
# if optimization is on, compiler asserts
-COPTFLAG64 = -v
+COPTFLAG64 = $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/amd64/genunix/Makefile b/usr/src/cmd/mdb/intel/amd64/genunix/Makefile
index 02b6ae84a8..fb372b267b 100644
--- a/usr/src/cmd/mdb/intel/amd64/genunix/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/genunix/Makefile
@@ -24,7 +24,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = genunix.so
MDBTGT = kvm
@@ -67,3 +66,9 @@ CPPFLAGS += -I$(SRC)/uts/common
# Needed to find include file mutex_impl.h
CPPFLAGS += -I$(SRC)/uts/intel
+
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-type-limits
diff --git a/usr/src/cmd/mdb/intel/amd64/idm/Makefile b/usr/src/cmd/mdb/intel/amd64/idm/Makefile
index 063dbb4145..c68aa1c1dc 100644
--- a/usr/src/cmd/mdb/intel/amd64/idm/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/idm/Makefile
@@ -1,3 +1,4 @@
+
#
# CDDL HEADER START
#
@@ -39,3 +40,5 @@ include ../../../Makefile.module
CPPFLAGS += -I$(ISCSITBASE)
CPPFLAGS += -I$(ISCSIBASE)
CPPFLAGS += -I$(ISERBASE)
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/amd64/ipc/Makefile b/usr/src/cmd/mdb/intel/amd64/ipc/Makefile
index a0cab76c18..4c77f4bec7 100644
--- a/usr/src/cmd/mdb/intel/amd64/ipc/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/ipc/Makefile
@@ -23,7 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ipc.so
MDBTGT = kvm
@@ -34,3 +33,5 @@ include ../../../../Makefile.cmd
include ../../../../Makefile.cmd.64
include ../../Makefile.amd64
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/amd64/ipp/Makefile b/usr/src/cmd/mdb/intel/amd64/ipp/Makefile
index 6ed321bf73..da6e6cfea0 100644
--- a/usr/src/cmd/mdb/intel/amd64/ipp/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/ipp/Makefile
@@ -23,7 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ipp.so
MDBTGT = kvm
@@ -34,3 +33,5 @@ include ../../../../Makefile.cmd
include ../../../../Makefile.cmd.64
include ../../Makefile.amd64
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/amd64/libproc/Makefile b/usr/src/cmd/mdb/intel/amd64/libproc/Makefile
index 4e98e2dee4..64e67e2d0d 100644
--- a/usr/src/cmd/mdb/intel/amd64/libproc/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/libproc/Makefile
@@ -22,7 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libproc.so
MDBTGT = proc
@@ -39,6 +38,8 @@ include ../../../Makefile.module
CFLAGS64 += -I../../../../../lib/libproc/common
LINTFLAGS64 += -I../../../../../lib/libproc/common
+CERRWARN += -_gcc=-Wno-uninitialized
+
%.o: $(MODSRCS_DIR)/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/amd64/libtopo/Makefile b/usr/src/cmd/mdb/intel/amd64/libtopo/Makefile
index f669c27ae7..1f33d61aa3 100644
--- a/usr/src/cmd/mdb/intel/amd64/libtopo/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/libtopo/Makefile
@@ -23,7 +23,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libtopo.so
MDBTGT = proc
@@ -36,3 +35,4 @@ include ../../Makefile.amd64
include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/lib/fm/topo/libtopo/common
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/amd64/libumem/Makefile b/usr/src/cmd/mdb/intel/amd64/libumem/Makefile
index b1b38c5a2a..ae22217a1b 100644
--- a/usr/src/cmd/mdb/intel/amd64/libumem/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/libumem/Makefile
@@ -51,6 +51,10 @@ include ../../../Makefile.module
dmod/$(MODULE) := LDLIBS += -lproc -lm
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
%.o: $(MODSRCS_DIR)/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/amd64/libzpool/Makefile b/usr/src/cmd/mdb/intel/amd64/libzpool/Makefile
index d2a5a8c2a6..fa059da58b 100644
--- a/usr/src/cmd/mdb/intel/amd64/libzpool/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/libzpool/Makefile
@@ -23,7 +23,6 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libzpool.so
MDBTGT = proc
@@ -44,6 +43,8 @@ CPPFLAGS += -I../../../../../lib/libzpool/common \
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+CERRWARN += -_gcc=-Wno-type-limits
+
dmod/%.o: $(GENUNIX_DIR)/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/amd64/mdb/Makefile b/usr/src/cmd/mdb/intel/amd64/mdb/Makefile
index 2115a928e7..6542718c6b 100644
--- a/usr/src/cmd/mdb/intel/amd64/mdb/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/mdb/Makefile
@@ -22,12 +22,12 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
SRCS = kvm_amd64dep.c \
kvm_isadep.c \
mdb_amd64util.c \
- proc_amd64dep.c
+ proc_amd64dep.c \
+ saveargs.c
%.o: %.c
$(COMPILE.c) $<
@@ -37,17 +37,25 @@ SRCS = kvm_amd64dep.c \
$(COMPILE.c) $<
$(CTFCONVERT_O)
+%.o: $(SRC)/common/saveargs/%.c
+ $(COMPILE.c) $<
+ $(CTFCONVERT_O)
+
%.ln: %.c
$(LINT.c) -c $<
%.ln: ../../mdb/%.c
$(LINT.c) -c $<
+%.ln: $(SRC)/common/saveargs/%.c
+ $(LINT.c) -c $<
+
include ../../../../Makefile.cmd
include ../../../../Makefile.cmd.64
include ../../Makefile.amd64
include ../../../Makefile.mdb
CPPFLAGS += -I../../mdb
+CPPFLAGS += -I$(SRC)/common/saveargs
install: all $(ISAEXEC) $(ROOTPROG64) $(ROOTLINK64)
diff --git a/usr/src/cmd/mdb/intel/amd64/mpt_sas/Makefile b/usr/src/cmd/mdb/intel/amd64/mpt_sas/Makefile
index 2a751d4ebf..3b87bba4f0 100644
--- a/usr/src/cmd/mdb/intel/amd64/mpt_sas/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/mpt_sas/Makefile
@@ -33,3 +33,5 @@ include ../../Makefile.amd64
include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/uts/common
+
+CERRWARN += -_gcc=-Wno-trigraphs
diff --git a/usr/src/cmd/mdb/intel/amd64/pmcs/Makefile b/usr/src/cmd/mdb/intel/amd64/pmcs/Makefile
index e016f01a1d..a8e6e2cfcc 100644
--- a/usr/src/cmd/mdb/intel/amd64/pmcs/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/pmcs/Makefile
@@ -36,3 +36,7 @@ include $(SRC)/cmd/mdb/Makefile.module
C99MODE = -xc99=%all
CPPFLAGS += -I$(SRC)/uts/common
+
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/amd64/qlc/Makefile b/usr/src/cmd/mdb/intel/amd64/qlc/Makefile
index 7e82d4699b..5c60dfe50b 100644
--- a/usr/src/cmd/mdb/intel/amd64/qlc/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/qlc/Makefile
@@ -44,3 +44,4 @@ LINTFLAGS64 += -erroff=E_STATIC_UNUSED -erroff=E_FUNC_ARG_UNUSED
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+CERRWARN += -_gcc=-Wno-address
diff --git a/usr/src/cmd/mdb/intel/amd64/rdc/Makefile b/usr/src/cmd/mdb/intel/amd64/rdc/Makefile
index 7ceb0798e4..e9dd4a514c 100644
--- a/usr/src/cmd/mdb/intel/amd64/rdc/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/rdc/Makefile
@@ -34,3 +34,5 @@ include ../../Makefile.amd64
include ../../../Makefile.module
include ../../../common/modules/rdc/Makefile.com
CPPFLAGS += -erroff=E_STATIC_UNUSED
+
+CERRWARN += -_gcc=-Wno-unused-function
diff --git a/usr/src/cmd/mdb/intel/amd64/ufs/Makefile b/usr/src/cmd/mdb/intel/amd64/ufs/Makefile
index ca03049662..376308fcf3 100644
--- a/usr/src/cmd/mdb/intel/amd64/ufs/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/ufs/Makefile
@@ -22,7 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ufs.so
MDBTGT = kvm
@@ -33,3 +32,5 @@ include ../../../../Makefile.cmd
include ../../../../Makefile.cmd.64
include ../../Makefile.amd64
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-trigraphs
diff --git a/usr/src/cmd/mdb/intel/amd64/zfs/Makefile b/usr/src/cmd/mdb/intel/amd64/zfs/Makefile
index 972d59937e..97a4a859c9 100644
--- a/usr/src/cmd/mdb/intel/amd64/zfs/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/zfs/Makefile
@@ -23,7 +23,6 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = zfs.so
MDBTGT = kvm
@@ -39,3 +38,5 @@ CPPFLAGS += -I../../../../../uts/common/fs/zfs
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+
+CERRWARN += -_gcc=-Wno-type-limits
diff --git a/usr/src/cmd/mdb/intel/ia32/fcip/Makefile b/usr/src/cmd/mdb/intel/ia32/fcip/Makefile
index 53f235a417..2fdfd5e872 100644
--- a/usr/src/cmd/mdb/intel/ia32/fcip/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/fcip/Makefile
@@ -35,3 +35,5 @@ include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/uts/common
LINTFLAGS += -erroff=E_STATIC_UNUSED
+
+CERRWARN += -_gcc=-Wno-unused-function
diff --git a/usr/src/cmd/mdb/intel/ia32/fctl/Makefile b/usr/src/cmd/mdb/intel/ia32/fctl/Makefile
index 9b15adf814..a784d92918 100644
--- a/usr/src/cmd/mdb/intel/ia32/fctl/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/fctl/Makefile
@@ -41,4 +41,8 @@ LINTFLAGS += -erroff=E_FUNC_SET_NOT_USED
LINTFLAGS += -erroff=E_FUNC_ARG_UNUSED
LINTFLAGS += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY
# if optimization is on, compiler asserts
-COPTFLAG = -v
+COPTFLAG = $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/ia32/genunix/Makefile b/usr/src/cmd/mdb/intel/ia32/genunix/Makefile
index bb50d0bed8..e5efcd19ac 100644
--- a/usr/src/cmd/mdb/intel/ia32/genunix/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/genunix/Makefile
@@ -18,13 +18,10 @@
#
# CDDL HEADER END
-
-#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = genunix.so
MDBTGT = kvm
@@ -66,3 +63,9 @@ CPPFLAGS += -I$(SRC)/uts/common
# Needed to find include file mutex_impl.h
CPPFLAGS += -I$(SRC)/uts/intel
+
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-type-limits
diff --git a/usr/src/cmd/mdb/intel/ia32/idm/Makefile b/usr/src/cmd/mdb/intel/ia32/idm/Makefile
index f6aab4d791..3b43e3170b 100644
--- a/usr/src/cmd/mdb/intel/ia32/idm/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/idm/Makefile
@@ -38,3 +38,5 @@ include ../../../Makefile.module
CPPFLAGS += -I$(ISCSITBASE)
CPPFLAGS += -I$(ISCSIBASE)
CPPFLAGS += -I$(ISERBASE)
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/ia32/ipc/Makefile b/usr/src/cmd/mdb/intel/ia32/ipc/Makefile
index 2dd41475da..b2a5bcedfa 100644
--- a/usr/src/cmd/mdb/intel/ia32/ipc/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/ipc/Makefile
@@ -23,7 +23,6 @@
# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ipc.so
MDBTGT = kvm
@@ -33,3 +32,5 @@ MODSRCS = ipc.c
include ../../../../Makefile.cmd
include ../../Makefile.ia32
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/ia32/ipp/Makefile b/usr/src/cmd/mdb/intel/ia32/ipp/Makefile
index 3b01f7ce7e..4905c5df0c 100644
--- a/usr/src/cmd/mdb/intel/ia32/ipp/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/ipp/Makefile
@@ -23,7 +23,6 @@
# Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ipp.so
MDBTGT = kvm
@@ -33,3 +32,5 @@ MODSRCS = ipp.c
include ../../../../Makefile.cmd
include ../../Makefile.ia32
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/ia32/libproc/Makefile b/usr/src/cmd/mdb/intel/ia32/libproc/Makefile
index 938998447c..08d6644a93 100644
--- a/usr/src/cmd/mdb/intel/ia32/libproc/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/libproc/Makefile
@@ -22,7 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libproc.so
MDBTGT = proc
@@ -38,6 +37,8 @@ include ../../../Makefile.module
CFLAGS += -I../../../../../lib/libproc/common
LINTFLAGS += -I../../../../../lib/libproc/common
+CERRWARN += -_gcc=-Wno-uninitialized
+
%.o: $(MODSRCS_DIR)/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/ia32/libtopo/Makefile b/usr/src/cmd/mdb/intel/ia32/libtopo/Makefile
index f7563492bb..364b30392d 100644
--- a/usr/src/cmd/mdb/intel/ia32/libtopo/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/libtopo/Makefile
@@ -23,7 +23,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libtopo.so
MDBTGT = proc
@@ -35,3 +34,4 @@ include ../../Makefile.ia32
include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/lib/fm/topo/libtopo/common
+CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/mdb/intel/ia32/libumem/Makefile b/usr/src/cmd/mdb/intel/ia32/libumem/Makefile
index 1a1f23446c..bde1be90ac 100644
--- a/usr/src/cmd/mdb/intel/ia32/libumem/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/libumem/Makefile
@@ -50,6 +50,10 @@ include ../../../Makefile.module
dmod/$(MODULE) := LDLIBS += -lproc -lm
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
%.o: $(MODSRCS_DIR)/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/ia32/libzpool/Makefile b/usr/src/cmd/mdb/intel/ia32/libzpool/Makefile
index c8e8b4bb34..bb2758e83b 100644
--- a/usr/src/cmd/mdb/intel/ia32/libzpool/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/libzpool/Makefile
@@ -23,7 +23,6 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = libzpool.so
MDBTGT = proc
@@ -43,6 +42,8 @@ CPPFLAGS += -I../../../../../lib/libzpool/common \
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+CERRWARN += -_gcc=-Wno-type-limits
+
dmod/%.o: $(GENUNIX_DIR)/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
diff --git a/usr/src/cmd/mdb/intel/ia32/mpt_sas/Makefile b/usr/src/cmd/mdb/intel/ia32/mpt_sas/Makefile
index 0c277eef7a..7a03980d61 100644
--- a/usr/src/cmd/mdb/intel/ia32/mpt_sas/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/mpt_sas/Makefile
@@ -33,3 +33,5 @@ include ../../Makefile.ia32
include ../../../Makefile.module
CPPFLAGS += -I$(SRC)/uts/common
+
+CERRWARN += -_gcc=-Wno-trigraphs
diff --git a/usr/src/cmd/mdb/intel/ia32/pmcs/Makefile b/usr/src/cmd/mdb/intel/ia32/pmcs/Makefile
index f68f0e6f9e..63375fbb5a 100644
--- a/usr/src/cmd/mdb/intel/ia32/pmcs/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/pmcs/Makefile
@@ -35,3 +35,7 @@ include $(SRC)/cmd/mdb/Makefile.module
C99MODE = -xc99=%all
CPPFLAGS += -I$(SRC)/uts/common
+
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/ia32/qlc/Makefile b/usr/src/cmd/mdb/intel/ia32/qlc/Makefile
index c9ce97dbfe..7c015a5ec3 100644
--- a/usr/src/cmd/mdb/intel/ia32/qlc/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/qlc/Makefile
@@ -43,3 +43,4 @@ LINTFLAGS += -erroff=E_STATIC_UNUSED -erroff=E_FUNC_ARG_UNUSED
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+CERRWARN += -_gcc=-Wno-address
diff --git a/usr/src/cmd/mdb/intel/ia32/rdc/Makefile b/usr/src/cmd/mdb/intel/ia32/rdc/Makefile
index 30a242b3e2..63d95aefb3 100644
--- a/usr/src/cmd/mdb/intel/ia32/rdc/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/rdc/Makefile
@@ -33,3 +33,5 @@ include ../../Makefile.ia32
include ../../../Makefile.module
include ../../../common/modules/rdc/Makefile.com
CPPFLAGS += -erroff=E_STATIC_UNUSED
+
+CERRWARN += -_gcc=-Wno-unused-function
diff --git a/usr/src/cmd/mdb/intel/ia32/ufs/Makefile b/usr/src/cmd/mdb/intel/ia32/ufs/Makefile
index 212a14d9d4..ebc0c99046 100644
--- a/usr/src/cmd/mdb/intel/ia32/ufs/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/ufs/Makefile
@@ -22,7 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ufs.so
MDBTGT = kvm
@@ -32,3 +31,5 @@ MODSRCS = ufs.c ufs_log.c
include ../../../../Makefile.cmd
include ../../Makefile.ia32
include ../../../Makefile.module
+
+CERRWARN += -_gcc=-Wno-trigraphs
diff --git a/usr/src/cmd/mdb/intel/ia32/zfs/Makefile b/usr/src/cmd/mdb/intel/ia32/zfs/Makefile
index a569d4fd91..8220aa4947 100644
--- a/usr/src/cmd/mdb/intel/ia32/zfs/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/zfs/Makefile
@@ -23,8 +23,6 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
MODULE = zfs.so
MDBTGT = kvm
@@ -39,3 +37,5 @@ CPPFLAGS += -I../../../../../uts/common/fs/zfs
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
+
+CERRWARN += -_gcc=-Wno-type-limits
diff --git a/usr/src/cmd/mdb/intel/libstand/uname.c b/usr/src/cmd/mdb/intel/libstand/uname.c
deleted file mode 100644
index f6647df922..0000000000
--- a/usr/src/cmd/mdb/intel/libstand/uname.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * The inclusion of <sys/utsname.h> in a source file causes an automatic
- * inclusion of a static definition of uname() that calls _nuname().
- */
-
-#include <sys/utsname.h>
-#include <errno.h>
-
-/*ARGSUSED*/
-int
-_nuname(struct utsname *utsp)
-{
- return (EINVAL);
-}
diff --git a/usr/src/cmd/mdb/intel/mdb/mdb_amd64util.c b/usr/src/cmd/mdb/intel/mdb/mdb_amd64util.c
index 868533fe11..65adaf37be 100644
--- a/usr/src/cmd/mdb/intel/mdb/mdb_amd64util.c
+++ b/usr/src/cmd/mdb/intel/mdb/mdb_amd64util.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/reg.h>
#include <sys/privregs.h>
@@ -41,6 +39,8 @@
#include <mdb/mdb_err.h>
#include <mdb/mdb.h>
+#include <saveargs.h>
+
/*
* This array is used by the getareg and putareg entry points, and also by our
* register variable discipline.
@@ -138,170 +138,6 @@ mdb_amd64_printregs(const mdb_tgt_gregset_t *gregs)
}
/*
- * Sun Studio 10 patch compiler and gcc 3.4.3 Sun branch implemented a
- * "-save_args" option on amd64. When the option is specified, INTEGER
- * type function arguments passed via registers will be saved on the stack
- * immediately after %rbp, and will not be modified through out the life
- * of the routine.
- *
- * +--------+
- * %rbp --> | %rbp |
- * +--------+
- * -0x8(%rbp) | %rdi |
- * +--------+
- * -0x10(%rbp) | %rsi |
- * +--------+
- * -0x18(%rbp) | %rdx |
- * +--------+
- * -0x20(%rbp) | %rcx |
- * +--------+
- * -0x28(%rbp) | %r8 |
- * +--------+
- * -0x30(%rbp) | %r9 |
- * +--------+
- *
- *
- * For example, for the following function,
- *
- * void
- * foo(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
- * {
- * ...
- * }
- *
- * Disassembled code will look something like the following:
- *
- * pushq %rbp
- * movq %rsp, %rbp
- * subq $imm8, %rsp **
- * movq %rdi, -0x8(%rbp)
- * movq %rsi, -0x10(%rbp)
- * movq %rdx, -0x18(%rbp)
- * movq %rcx, -0x20(%rbp)
- * movq %r8, -0x28(%rbp)
- * movq %r9, -0x30(%rbp)
- * ...
- * or
- * pushq %rbp
- * movq %rsp, %rbp
- * subq $imm8, %rsp **
- * movq %r9, -0x30(%rbp)
- * movq %r8, -0x28(%rbp)
- * movq %rcx, -0x20(%rbp)
- * movq %rdx, -0x18(%rbp)
- * movq %rsi, -0x10(%rbp)
- * movq %rdi, -0x8(%rbp)
- * ...
- *
- * **: The space being reserved is in addition to what the current
- * function prolog already reserves.
- *
- * If there are odd number of arguments to a function, additional space is
- * reserved on the stack to maintain 16-byte alignment. For example,
- *
- * argc == 0: no argument saving.
- * argc == 3: save 3, but space for 4 is reserved
- * argc == 7: save 6.
- */
-
-/*
- * The longest instruction sequence in bytes before all 6 arguments are
- * saved on the stack. This value depends on compiler implementation,
- * therefore it should be examined periodically to guarantee accuracy.
- */
-#define SEQ_LEN 80
-
-/*
- * Size of the instruction sequence arrays. It should correspond to
- * the maximum number of arguments passed via registers.
- */
-#define INSTR_ARRAY_SIZE 6
-
-#define INSTR4(ins, off) \
- (ins[(off)] + (ins[(off) + 1] << 8) + (ins[(off + 2)] << 16) + \
- (ins[(off) + 3] << 24))
-
-/*
- * Sun Studio 10 patch implementation saves %rdi first;
- * GCC 3.4.3 Sun branch implementation saves them in reverse order.
- */
-static const uint32_t save_instr[INSTR_ARRAY_SIZE] = {
- 0xf87d8948, /* movq %rdi, -0x8(%rbp) */
- 0xf0758948, /* movq %rsi, -0x10(%rbp) */
- 0xe8558948, /* movq %rdx, -0x18(%rbp) */
- 0xe04d8948, /* movq %rcx, -0x20(%rbp) */
- 0xd845894c, /* movq %r8, -0x28(%rbp) */
- 0xd04d894c /* movq %r9, -0x30(%rbp) */
-};
-
-static const uint32_t save_fp_instr[] = {
- 0xe5894855, /* pushq %rbp; movq %rsp,%rbp, encoding 1 */
- 0xec8b4855, /* pushq %rbp; movq %rsp,%rbp, encoding 2 */
- 0xe58948cc, /* int $0x3; movq %rsp,%rbp, encoding 1 */
- 0xec8b48cc, /* int $0x3; movq %rsp,%rbp, encoding 2 */
- NULL
-};
-
-/*
- * Look for the above instruction sequences as indicators for register
- * arguments being available on the stack.
- */
-static int
-is_argsaved(mdb_tgt_t *t, uintptr_t fstart, uint64_t size, uint_t argc,
- int start_index)
-{
- uint8_t ins[SEQ_LEN];
- int i, j;
- uint32_t n;
-
- size = MIN(size, SEQ_LEN);
- argc = MIN((start_index + argc), INSTR_ARRAY_SIZE);
-
- if (mdb_tgt_vread(t, ins, size, fstart) != size)
- return (0);
-
- /*
- * Make sure framepointer has been saved.
- */
- n = INSTR4(ins, 0);
- for (i = 0; save_fp_instr[i] != NULL; i++) {
- if (n == save_fp_instr[i])
- break;
- }
-
- if (save_fp_instr[i] == NULL)
- return (0);
-
- /*
- * Compare against Sun Studio implementation
- */
- for (i = 8, j = start_index; i < size - 4; i++) {
- n = INSTR4(ins, i);
-
- if (n == save_instr[j]) {
- i += 3;
- if (++j >= argc)
- return (1);
- }
- }
-
- /*
- * Compare against GCC implementation
- */
- for (i = 8, j = argc - 1; i < size - 4; i++) {
- n = INSTR4(ins, i);
-
- if (n == save_instr[j]) {
- i += 3;
- if (--j < start_index)
- return (1);
- }
- }
-
- return (0);
-}
-
-/*
* We expect all proper Solaris core files to have STACK_ALIGN-aligned stacks.
* Hence the name. However, if the core file resulted from a
* hypervisor-initiated panic, the hypervisor's frames may only be 64-bit
@@ -339,6 +175,8 @@ mdb_amd64_kvm_stack_iter(mdb_tgt_t *t, const mdb_tgt_gregset_t *gsp,
uintptr_t lastfp, curpc;
ssize_t size;
+ ssize_t insnsize;
+ uint8_t ins[SAVEARGS_INSN_SEQ_LEN];
GElf_Sym s;
mdb_syminfo_t sip;
@@ -354,6 +192,7 @@ mdb_amd64_kvm_stack_iter(mdb_tgt_t *t, const mdb_tgt_gregset_t *gsp,
bcopy(gsp, &gregs, sizeof (gregs));
while (fp != 0) {
+ int args_style = 0;
curpc = pc;
@@ -367,28 +206,75 @@ mdb_amd64_kvm_stack_iter(mdb_tgt_t *t, const mdb_tgt_gregset_t *gsp,
NULL, 0, &s, &sip) == 0) &&
(mdb_ctf_func_info(&s, &sip, &mfp) == 0)) {
int return_type = mdb_ctf_type_kind(mfp.mtf_return);
+ mdb_ctf_id_t args_types[5];
+
argc = mfp.mtf_argc;
+
/*
- * If the function returns a structure or union,
- * %rdi contains the address in which to store the
- * return value rather than for an argument.
+ * If the function returns a structure or union
+ * greater than 16 bytes in size %rdi contains the
+ * address in which to store the return value rather
+ * than for an argument.
*/
- if (return_type == CTF_K_STRUCT ||
- return_type == CTF_K_UNION)
+ if ((return_type == CTF_K_STRUCT ||
+ return_type == CTF_K_UNION) &&
+ mdb_ctf_type_size(mfp.mtf_return) > 16)
start_index = 1;
else
start_index = 0;
+
+ /*
+ * If any of the first 5 arguments are a structure
+ * less than 16 bytes in size, it will be passed
+ * spread across two argument registers, and we will
+ * not cope.
+ */
+ if (mdb_ctf_func_args(&mfp, 5, args_types) == CTF_ERR)
+ argc = 0;
+
+ for (i = 0; i < MIN(5, argc); i++) {
+ int t = mdb_ctf_type_kind(args_types[i]);
+
+ if (((t == CTF_K_STRUCT) ||
+ (t == CTF_K_UNION)) &&
+ mdb_ctf_type_size(args_types[i]) <= 16) {
+ argc = 0;
+ break;
+ }
+ }
} else {
argc = 0;
}
- if (argc != 0 && is_argsaved(t, s.st_value, s.st_size,
- argc, start_index)) {
+ /*
+ * The number of instructions to search for argument saving is
+ * limited such that only instructions prior to %pc are
+ * considered such that we never read arguments from a
+ * function where the saving code has not in fact yet
+ * executed.
+ */
+ insnsize = MIN(MIN(s.st_size, SAVEARGS_INSN_SEQ_LEN),
+ pc - s.st_value);
+
+ if (mdb_tgt_vread(t, ins, insnsize, s.st_value) != insnsize)
+ argc = 0;
- /* Upto to 6 arguments are passed via registers */
- reg_argc = MIN(6, mfp.mtf_argc);
+ if ((argc != 0) &&
+ ((args_style = saveargs_has_args(ins, insnsize, argc,
+ start_index)) != SAVEARGS_NO_ARGS)) {
+ /* Up to 6 arguments are passed via registers */
+ reg_argc = MIN((6 - start_index), mfp.mtf_argc);
size = reg_argc * sizeof (long);
+ /*
+ * If Studio pushed a structure return address as an
+ * argument, we need to read one more argument than
+ * actually exists (the addr) to make everything line
+ * up.
+ */
+ if (args_style == SAVEARGS_STRUCT_ARGS)
+ size += sizeof (long);
+
if (mdb_tgt_vread(t, fr_argv, size, (fp - size))
!= size)
return (-1); /* errno has been set for us */
@@ -397,21 +283,25 @@ mdb_amd64_kvm_stack_iter(mdb_tgt_t *t, const mdb_tgt_gregset_t *gsp,
* Arrange the arguments in the right order for
* printing.
*/
- for (i = 0; i < (reg_argc >> 1); i++) {
+ for (i = 0; i < (reg_argc / 2); i++) {
long t = fr_argv[i];
fr_argv[i] = fr_argv[reg_argc - i - 1];
fr_argv[reg_argc - i - 1] = t;
}
- if (argc > 6) {
- size = (argc - 6) * sizeof (long);
- if (mdb_tgt_vread(t, &fr_argv[6], size,
+ if (argc > reg_argc) {
+ size = MIN((argc - reg_argc) * sizeof (long),
+ sizeof (fr_argv) -
+ (reg_argc * sizeof (long)));
+
+ if (mdb_tgt_vread(t, &fr_argv[reg_argc], size,
fp + sizeof (fr)) != size)
return (-1); /* errno has been set */
}
- } else
+ } else {
argc = 0;
+ }
if (got_pc && func(arg, pc, argc, fr_argv, &gregs) != 0)
break;
diff --git a/usr/src/cmd/mdb/intel/modules/amd_opteron/amd64/Makefile b/usr/src/cmd/mdb/intel/modules/amd_opteron/amd64/Makefile
index f33fd3d67a..324ea9da32 100644
--- a/usr/src/cmd/mdb/intel/modules/amd_opteron/amd64/Makefile
+++ b/usr/src/cmd/mdb/intel/modules/amd_opteron/amd64/Makefile
@@ -36,3 +36,5 @@ CPPFLAGS += -I../../../../common
CPPFLAGS += -I$(SRC)/uts/i86pc/cpu
CPPFLAGS += -I$(SRC)/uts/intel
CPPFLAGS += -I$(SRC)/uts/i86pc
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/modules/amd_opteron/ia32/Makefile b/usr/src/cmd/mdb/intel/modules/amd_opteron/ia32/Makefile
index adacbdc27e..cd8c42adef 100644
--- a/usr/src/cmd/mdb/intel/modules/amd_opteron/ia32/Makefile
+++ b/usr/src/cmd/mdb/intel/modules/amd_opteron/ia32/Makefile
@@ -35,3 +35,5 @@ CPPFLAGS += -I../../../../common
CPPFLAGS += -I$(SRC)/uts/i86pc/cpu
CPPFLAGS += -I$(SRC)/uts/intel
CPPFLAGS += -I$(SRC)/uts/i86pc
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/modules/generic_cpu/amd64/Makefile b/usr/src/cmd/mdb/intel/modules/generic_cpu/amd64/Makefile
index 483ed03218..55b43df8fb 100644
--- a/usr/src/cmd/mdb/intel/modules/generic_cpu/amd64/Makefile
+++ b/usr/src/cmd/mdb/intel/modules/generic_cpu/amd64/Makefile
@@ -35,3 +35,5 @@ CPPFLAGS += -I../../../../common
CPPFLAGS += -I$(SRC)/uts/i86pc/cpu
CPPFLAGS += -I$(SRC)/uts/intel
CPPFLAGS += -I$(SRC)/uts/i86pc
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/cmd/mdb/intel/modules/generic_cpu/ia32/Makefile b/usr/src/cmd/mdb/intel/modules/generic_cpu/ia32/Makefile
index 84adb38a5c..ab61ac5b5e 100644
--- a/usr/src/cmd/mdb/intel/modules/generic_cpu/ia32/Makefile
+++ b/usr/src/cmd/mdb/intel/modules/generic_cpu/ia32/Makefile
@@ -35,3 +35,5 @@ CPPFLAGS += -I../../../../common
CPPFLAGS += -I$(SRC)/uts/i86pc/cpu
CPPFLAGS += -I$(SRC)/uts/intel
CPPFLAGS += -I$(SRC)/uts/i86pc
+
+CERRWARN += -_gcc=-Wno-uninitialized