Hi All,
I am trying to run Ofono on a ARM based AP processor. The backtrace
function which is present in Ofono is not working on that Processor though
I have done following:
Enabled -- > enable-debug option
Enabled -funwind_tables option in CC_FLAGS within enable-debug option
itself (configure.ac)
Provided -rdynamic option in LD_FLAGS within enable-debug option itseld (
configure.ac)
src/log.c
static void print_backtrace(unsigned int offset)
{
written = write(outfd[1], addr, len); -->This line is failing all the time.
}
I modified the print_backtrace() to below:
static void print_backtrace(unsigned int offset)
{
void *frames[99];
size_t n_ptrs;
//unsigned int i;
//int outfd[2], infd[2];
int pathlen;
//pid_t pid;
if (program_exec == NULL)
return;
pathlen = strlen(program_path);
ofono_error("++++++++ backtrace +++++++++++++++++++++");
n_ptrs = backtrace(frames, G_N_ELEMENTS(frames));
fprintf(stderr, "Last %d frames:\n", n_ptrs);
fprintf(stderr, "Offset is %d:\n", offset);
backtrace_symbols_fd(frames, n_ptrs, STDERR_FILENO);
ofono_error("++++++++++++++++++++++++++++++++++++++++");
}
With above modification, I am able to get backtrace but it only prints
address not the function names. Result is as below:
ofonod[2835]: ++++++++ backtrace +++++++++++++++++++++
Last 8 frames:
Offset is 2:
ofonod(+0xd5f60)[0x558a1a3f60]
ofonod(+0xd5ff4)[0x558a1a3ff4]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7f9cfa36c0]
ofonod(+0x3b614)[0x558a109614]
ofonod(ofono_modem_set_powered+0xe8)[0x558a1a6b18]
ofonod(+0x38548)[0x558a106548]
ofonod(+0x39548)[0x558a107548]
/usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x114)[0x7f9ce8eed4]
ofonod[2835]: ++++++++++++++++++++++++++++++++++++++++
Can some one help me what is missing and how can I resolve the issue ?
-Best Regards,
Rohit Agrawal
Show replies by date