X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..94ff46dc2849db4d43eaaf144872decc522aafb4:/libsyscall/wrappers/stackshot.c diff --git a/libsyscall/wrappers/stackshot.c b/libsyscall/wrappers/stackshot.c index 0e065edd2..d819d3470 100644 --- a/libsyscall/wrappers/stackshot.c +++ b/libsyscall/wrappers/stackshot.c @@ -136,14 +136,14 @@ stackshot_capture_with_config(stackshot_config_t *stackshot_config) } s_config = (stackshot_config_t *) stackshot_config; - if (s_config->sc_buffer != 0) { + if (s_config->sc_buffer != 0) { return EINVAL; } - s_config->sc_out_buffer_addr = &s_config->sc_buffer; - s_config->sc_out_size_addr = &s_config->sc_size; - ret = __stack_snapshot_with_config(STACKSHOT_CONFIG_TYPE, s_config, sizeof(stackshot_config_t)); - + s_config->sc_out_buffer_addr = (uintptr_t)&s_config->sc_buffer; + s_config->sc_out_size_addr = (uintptr_t)&s_config->sc_size; + ret = __stack_snapshot_with_config(STACKSHOT_CONFIG_TYPE, (uintptr_t)s_config, sizeof(stackshot_config_t)); + if (ret != 0) { ret = errno; s_config->sc_buffer = 0; @@ -171,7 +171,7 @@ stackshot_config_get_stackshot_buffer(stackshot_config_t *stackshot_config) } s_config = (stackshot_config_t *) stackshot_config; - return ((void *)s_config->sc_buffer); + return (void *)s_config->sc_buffer; } /*