LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-15-2011, 04:37 PM   #1
tbucken
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Rep: Reputation: 0
Question backtrace and backtrace_symbols


Hi,

I am attempting to generate stacktraces in a thread using the
system calls backtrace and backtrace_symbols

Code:
#define NUM_STACKFRAMES 50
  void *arr[NUM_STACKFRAMES];
  int nSize = backtrace(arr, NUM_STACKFRAMES);
  char **sym = backtrace_symbols(arr, nSize);
  char nl = '\n';
  int ii;
  for (ii = 0; ii < nSize; ii++) {
    SENDTOLOGS(alog,apstklog,sym[ii]);
    SENDTOLOGS(alog,apstklog, &nl);
  }
  free(sym);
  return ii;
backtrace_symbols is able to find function names in the
library that has the stacktracing code but is unable to find the
function names in any of our other libraries - backtrace has returned the
correct address.

I used the the flags -rdynamic and -fno-omit-frame-pointer to build
our libraries.

Any suggestions for what I might try ?


Code:
lib15.so(_ZN6UIQCtl14ValidateOptionEP11IConnectionP9an_option15an_option_scopePcP15an_option_value+0xb6) [0x2aab5dd9a8]
lib15.so(_ZN20saint_iqthresholdctl14ValidateOptionEP11IConnectionP9an_option15an_option_scopePcP15an_option_value+0x4d) [0x2aab5db13f]
lib16_r.so [0x2a958de1fe]
lib16_r.so [0x2a958df77b]

Tom Bucken(tbucken@sybase.com)

Last edited by XavierP; 02-16-2011 at 11:48 PM. Reason: code tags and moved to Programming
 
  


Reply

Tags
glibc, [c]


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backtrace and _cxa_demangle mshindo Programming 5 05-26-2009 06:50 PM
Generating a backtrace for dummies (me). Daws Programming 4 11-17-2007 07:18 PM
stack backtrace with pthreads virtualCoder Programming 2 10-06-2007 05:42 AM
backtrace your program? lswhbcb Programming 6 05-24-2007 11:35 PM
Alsa backtrace? hosler Slackware 9 02-07-2006 12:23 AM


All times are GMT -5. The time now is 01:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration