Print this page
10816 ctf_dwarf_convert_type() relies on un-initialized id
10817 ctfconvert -i option is mis-handled
10818 Improve ctfconvert error messages
10819 ctfconvert should handle empty dies
10820 ctfconvert -i never converts
10821 bad free in ctf_dwarf_init_die
10815 shouldn't build gcore.c as part of kmdb
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>


   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright (c) 2013 by Delphix. All rights reserved.
  26 # Copyright (c) 2018, Joyent, Inc.
  27 # Copyright (c) 2019 Carlos Neira <cneirabustos@gmail.com>
  28 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

  29 #
  30 
  31 .KEEP_STATE:
  32 .SUFFIXES:
  33 
  34 include $(SRC)/cmd/mdb/Makefile.tools
  35 
  36 #
  37 # Make sure we're getting a consistent execution environment for the
  38 # embedded scripts.
  39 #
  40 SHELL= /usr/bin/ksh93
  41 
  42 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
  43 $(KMOD_SOURCES_DIFFERENT)KMODASMSRCS = $(MODASMSRCS)
  44 
  45 MODOBJS = $(MODSRCS:%.c=dmod/%.o) $(MODASMSRCS:%.s=dmod/%.o)
  46 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o) $(KMODASMSRCS:%.s=kmod/%.o)
  47 
  48 MODNAME_cmd = if [ -n "$(MODULE_NAME)" ]; then print $(MODULE_NAME); else print $(MODULE)| sed -e 's:\.so$$::'; fi


 217 
 218 linktest: linktest_check .WAIT kmod .WAIT $(KMODOBJS)
 219         $(KMDB_LINKTEST)
 220 
 221 linktest_check:
 222         @if [ "$(MDBTGT)" != "kvm" ] ; then \
 223                 echo "ERROR: linktest is not supported non-kvm/disasm dmods" \
 224                     >&2 ; \
 225                 exit 1 ; \
 226         fi
 227 
 228 #
 229 # Dynamic rules for object construction
 230 #
 231 dmod/%.o kmod/%.o: %.c
 232         $(COMPILE.c) -o $@ $<
 233         $(CTFCONVERT_O)
 234 
 235 dmod/%.o kmod%.o: %.s
 236         $(COMPILE.s) -o $@ $<
 237         $(CTFCONVERT_O)
 238 
 239 dmod/%.o kmod/%.o: ../%.c
 240         $(COMPILE.c) -o $@ $<
 241         $(CTFCONVERT_O)
 242 
 243 dmod/%.o kmod%.o: ../%.s
 244         $(COMPILE.s) -o $@ $<
 245         $(CTFCONVERT_O)
 246 
 247 dmod/%.o kmod/%.o: ../../../common/modules/$(MODNAME)/%.c
 248         $(COMPILE.c) -o $@ $<
 249         $(CTFCONVERT_O)
 250 
 251 dmod/%.o kmod%.o: ../../../common/modules/$(MODNAME)/%.s
 252         $(COMPILE.s) -o $@ $<
 253         $(CTFCONVERT_O)
 254 
 255 dmod/%.o kmod/%.o: $$(MODSRCS_DIR)/%.c
 256         $(COMPILE.c) -o $@ $<
 257         $(CTFCONVERT_O)
 258 
 259 dmod/%.o kmod%.o: $$(MODSRCS_DIR)/%.s
 260         $(COMPILE.s) -o $@ $<
 261         $(CTFCONVERT_O)
 262 
 263 #
 264 # Lint
 265 #
 266 dmod/%.ln kmod/%.ln: %.c
 267         $(LINT.c) -dirout=$(@D) -c $<
 268 
 269 dmod/%.ln kmod/%.ln: %.s
 270         $(LINT.s) -dirout=$(@D) -c $<
 271 
 272 dmod/%.ln kmod/%.ln: ../%.c
 273         $(LINT.c) -dirout=$(@D) -c $<
 274 
 275 dmod/%.ln kmod/%.ln: ../%.s
 276         $(LINT.s) -dirout=$(@D) -c $<
 277 
 278 dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.c
 279         $(LINT.c) -dirout=$(@D) -c $<
 280 
 281 dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.s




   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright (c) 2013 by Delphix. All rights reserved.

  26 # Copyright (c) 2019 Carlos Neira <cneirabustos@gmail.com>
  27 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  28 # Copyright (c) 2019, Joyent, Inc.
  29 #
  30 
  31 .KEEP_STATE:
  32 .SUFFIXES:
  33 
  34 include $(SRC)/cmd/mdb/Makefile.tools
  35 
  36 #
  37 # Make sure we're getting a consistent execution environment for the
  38 # embedded scripts.
  39 #
  40 SHELL= /usr/bin/ksh93
  41 
  42 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
  43 $(KMOD_SOURCES_DIFFERENT)KMODASMSRCS = $(MODASMSRCS)
  44 
  45 MODOBJS = $(MODSRCS:%.c=dmod/%.o) $(MODASMSRCS:%.s=dmod/%.o)
  46 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o) $(KMODASMSRCS:%.s=kmod/%.o)
  47 
  48 MODNAME_cmd = if [ -n "$(MODULE_NAME)" ]; then print $(MODULE_NAME); else print $(MODULE)| sed -e 's:\.so$$::'; fi


 217 
 218 linktest: linktest_check .WAIT kmod .WAIT $(KMODOBJS)
 219         $(KMDB_LINKTEST)
 220 
 221 linktest_check:
 222         @if [ "$(MDBTGT)" != "kvm" ] ; then \
 223                 echo "ERROR: linktest is not supported non-kvm/disasm dmods" \
 224                     >&2 ; \
 225                 exit 1 ; \
 226         fi
 227 
 228 #
 229 # Dynamic rules for object construction
 230 #
 231 dmod/%.o kmod/%.o: %.c
 232         $(COMPILE.c) -o $@ $<
 233         $(CTFCONVERT_O)
 234 
 235 dmod/%.o kmod%.o: %.s
 236         $(COMPILE.s) -o $@ $<

 237 
 238 dmod/%.o kmod/%.o: ../%.c
 239         $(COMPILE.c) -o $@ $<
 240         $(CTFCONVERT_O)
 241 
 242 dmod/%.o kmod%.o: ../%.s
 243         $(COMPILE.s) -o $@ $<

 244 
 245 dmod/%.o kmod/%.o: ../../../common/modules/$(MODNAME)/%.c
 246         $(COMPILE.c) -o $@ $<
 247         $(CTFCONVERT_O)
 248 
 249 dmod/%.o kmod%.o: ../../../common/modules/$(MODNAME)/%.s
 250         $(COMPILE.s) -o $@ $<

 251 
 252 dmod/%.o kmod/%.o: $$(MODSRCS_DIR)/%.c
 253         $(COMPILE.c) -o $@ $<
 254         $(CTFCONVERT_O)
 255 
 256 dmod/%.o kmod%.o: $$(MODSRCS_DIR)/%.s
 257         $(COMPILE.s) -o $@ $<

 258 
 259 #
 260 # Lint
 261 #
 262 dmod/%.ln kmod/%.ln: %.c
 263         $(LINT.c) -dirout=$(@D) -c $<
 264 
 265 dmod/%.ln kmod/%.ln: %.s
 266         $(LINT.s) -dirout=$(@D) -c $<
 267 
 268 dmod/%.ln kmod/%.ln: ../%.c
 269         $(LINT.c) -dirout=$(@D) -c $<
 270 
 271 dmod/%.ln kmod/%.ln: ../%.s
 272         $(LINT.s) -dirout=$(@D) -c $<
 273 
 274 dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.c
 275         $(LINT.c) -dirout=$(@D) -c $<
 276 
 277 dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.s