Print this page
*** 19,29 ****
* CDDL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2015, Joyent, Inc.
* Copyright (c) 2012, 2016 by Delphix. All rights reserved.
*/
#include <sys/types.h>
#include <sys/modctl.h>
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2012, 2016 by Delphix. All rights reserved.
*/
#include <sys/types.h>
#include <sys/modctl.h>
*** 1145,1161 ****
/*
* Add intrinsic pointer types that are needed to initialize printf
* format dictionary types (see table in dt_printf.c).
*/
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT, NULL,
ctf_lookup_by_name(dmp->dm_ctfp, "void"));
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT, NULL,
ctf_lookup_by_name(dmp->dm_ctfp, "char"));
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT, NULL,
ctf_lookup_by_name(dmp->dm_ctfp, "int"));
if (ctf_update(dmp->dm_ctfp) != 0) {
dt_dprintf("failed to update C container: %s\n",
ctf_errmsg(ctf_errno(dmp->dm_ctfp)));
--- 1145,1161 ----
/*
* Add intrinsic pointer types that are needed to initialize printf
* format dictionary types (see table in dt_printf.c).
*/
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT,
ctf_lookup_by_name(dmp->dm_ctfp, "void"));
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT,
ctf_lookup_by_name(dmp->dm_ctfp, "char"));
! (void) ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT,
ctf_lookup_by_name(dmp->dm_ctfp, "int"));
if (ctf_update(dmp->dm_ctfp) != 0) {
dt_dprintf("failed to update C container: %s\n",
ctf_errmsg(ctf_errno(dmp->dm_ctfp)));
*** 1211,1225 ****
*/
ctc.ctc_return = ctf_lookup_by_name(dmp->dm_ctfp, "int");
ctc.ctc_argc = 0;
ctc.ctc_flags = 0;
! dtp->dt_type_func = ctf_add_funcptr(dmp->dm_ctfp,
CTF_ADD_ROOT, &ctc, NULL);
! dtp->dt_type_fptr = ctf_add_pointer(dmp->dm_ctfp, CTF_ADD_ROOT, NULL,
! dtp->dt_type_func);
/*
* We also insert CTF definitions for the special D intrinsic types
* string and <DYN> into the D container. The string type is added
* as a typedef of char[n]. The <DYN> type is an alias for void.
--- 1211,1225 ----
*/
ctc.ctc_return = ctf_lookup_by_name(dmp->dm_ctfp, "int");
ctc.ctc_argc = 0;
ctc.ctc_flags = 0;
! dtp->dt_type_func = ctf_add_function(dmp->dm_ctfp,
CTF_ADD_ROOT, &ctc, NULL);
! dtp->dt_type_fptr = ctf_add_pointer(dmp->dm_ctfp,
! CTF_ADD_ROOT, dtp->dt_type_func);
/*
* We also insert CTF definitions for the special D intrinsic types
* string and <DYN> into the D container. The string type is added
* as a typedef of char[n]. The <DYN> type is an alias for void.