1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2005 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2006 The Regents of the University of California. 11 * All rights reserved. 12 * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. 13 * Copyright (c) 2017 IBM Corporation. All rights reserved. 14 * $COPYRIGHT$ 15 * 16 * Additional copyrights may follow 17 * 18 * $HEADER$ 19 */ 20 #include "opal_config.h" 21 22 #include <stdio.h> 23 #include <ucontext.h> 24 25 #include "opal/constants.h" 26 #include "opal/mca/backtrace/backtrace.h" 27 28 int 29 opal_backtrace_print(FILE *file, char *prefix, int strip) 30 { 31 int fd = opal_stacktrace_output_fileno; 32 33 if( NULL != file ) { 34 fd = fileno(file); 35 } 36 37 printstack(fd); 38 39 return OPAL_SUCCESS; 40 } 41 42 43 int 44 opal_backtrace_buffer(char ***message_out, int *len_out) 45 { 46 *message_out = NULL; 47 *len_out = 0; 48 49 /* BWB - I think we can implement this in a similar way that 50 printstack is implemented. I just don't have time right 51 now. */ 52 53 return OPAL_ERR_NOT_IMPLEMENTED; 54 }