Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Issue in displaying Back trace info with FlexRAN code

Satish12
Beginner
638 Views

Hi all

We are working on open FlexRAN code to custom for L1 code.

Part of this exp. , source/auxlib/sys/aux_sys.c ,

try to add the support for SIGSEGV to print back trace function available in open source 

but it is giving basic info "Core dump info", it is printing Back_trace info form aux_sys.c , what could be reason for the same .

print_trace function body:

void print_trace() {
    char pid_buf[30];
    sprintf(pid_buf, "%d", getpid());
    char name_buf[512];
    name_buf[readlink("/proc/self/exe", name_buf, 511)]=0;
    int child_pid = fork();
    if (!child_pid) {
        dup2(2,1); // redirect output to stderr
        fprintf(stdout,"stack trace for %s pid=%s\n",name_buf,pid_buf);
        execlp("gdb", "gdb", "--batch", "-n", "-ex", "thread", "-ex", "bt", name_buf, pid_buf, NULL);
        abort(); /* If gdb failed to start */
    } else {
        waitpid(child_pid,NULL,0);
    }
}

 It is added part of SIGSEGV handler function with backtrace_symbols_fd() instead of   backtrace_symbols()  presented by default.

Could you please help us to resolve the issue.

Thanks in advance

Thanks & Regards

Satish G

 

0 Kudos
0 Replies
Reply