aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d12
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.c14
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/memory.h1
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c7
5 files changed, 26 insertions, 10 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
index 59094e3da37f..1c23b2a0b9e0 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
@@ -61,7 +61,7 @@ EOF
sleeper()
{
while true; do
- $longsleep &
+ limits -c unlimited $longsleep &
/bin/sleep 1
kill -SEGV $!
done
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
index cd4715319913..c6bfff2181e6 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d
@@ -37,23 +37,23 @@
#pragma D option quiet
-struct input_struct {
+struct dtrace_input_struct {
int ii;
char ic;
};
-struct output_struct {
+struct dtrace_output_struct {
int oi;
char oc;
};
-typedef struct output_struct output_t;
+typedef struct dtrace_output_struct dtrace_output_t;
-translator output_t < struct input_struct *ivar >
+translator dtrace_output_t < struct dtrace_input_struct *ivar >
{
- oi = ((struct input_struct *) ivar)->ii;
- oc = ((struct input_struct *) ivar)->ic;
+ oi = ((struct dtrace_input_struct *) ivar)->ii;
+ oc = ((struct dtrace_input_struct *) ivar)->ic;
};
BEGIN
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.c b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
index e16044a8b672..66296c5b114d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.c
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.c
@@ -44,6 +44,20 @@ memory_bailout(void)
exit(1);
}
+int
+xasprintf(char **s, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vasprintf(s, fmt, ap);
+ va_end(ap);
+ if (ret == -1)
+ memory_bailout();
+ return (ret);
+}
+
void *
xmalloc(size_t size)
{
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/memory.h b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
index 88ca31bec65a..72706b5f7fdb 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/memory.h
+++ b/cddl/contrib/opensolaris/tools/ctf/common/memory.h
@@ -39,6 +39,7 @@
extern "C" {
#endif
+int xasprintf(char **, const char *, ...);
void *xmalloc(size_t);
void *xcalloc(size_t);
char *xstrdup(const char *);
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 2d686e53fed1..67866555ae5d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -618,7 +618,7 @@ tdesc_intr_long(dwarf_t *dw)
* caller can then use the copy as the type for a bitfield structure member.
*/
static tdesc_t *
-tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
+tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz, const char *suffix)
{
tdesc_t *new = xcalloc(sizeof (tdesc_t));
@@ -627,7 +627,7 @@ tdesc_intr_clone(dwarf_t *dw, tdesc_t *old, size_t bitsz)
"unresolved type\n", old->t_id);
}
- new->t_name = xstrdup(old->t_name);
+ xasprintf(&new->t_name, "%s %s", old->t_name, suffix);
new->t_size = old->t_size;
new->t_id = mfgtid_next(dw);
new->t_type = INTRINSIC;
@@ -1158,7 +1158,8 @@ die_sou_resolve(tdesc_t *tdp, tdesc_t **tdpp __unused, void *private)
debug(3, "tdp %u: creating bitfield for %d bits\n",
tdp->t_id, ml->ml_size);
- ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size);
+ ml->ml_type = tdesc_intr_clone(dw, mt, ml->ml_size,
+ "bitfield");
}
}