LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-21-2010, 05:37 AM   #1
hs_linux
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Rep: Reputation: 0
How are symbols read during core dump analysis?


I am using GDB/KDevelop to analyse a coredump. When a coredump is loaded, symbols from several libraries that are related to the program are read. I think the debugger must be tracking down dependencies of the program (through something like ldd) and then reading their symbols. Please confirm. Can I get some useful documentation on internal details?
What if the crash is coming from a library that was loaded at runtime but is not specified as a dependency while building the program. Will it's symbols get read?

Thanks
 
Old 07-22-2010, 01:25 AM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
http://www.dialogic.com/support/help...all/tn957.aspx
http://www.unix.com/unix-advanced-ex...-analysis.html
http://programming.itags.org/unix-li...ramming/87358/
 
1 members found this post helpful.
Old 07-22-2010, 02:40 AM   #3
hs_linux
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the reply foodown. I followed these links but unfortunately these explain gdb usage more or less and not what I am looking for. How does gdb come to know about libraries whose symbols are to be read?
 
Old 07-22-2010, 08:42 AM   #4
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 809

Rep: Reputation: 178Reputation: 178
Quote:
Originally Posted by hs_linux View Post
Thanks for the reply foodown. I followed these links but unfortunately these explain gdb usage more or less and not what I am looking for. How does gdb come to know about libraries whose symbols are to be read?
The names of the files containing the object code for these libraries (and therefore containing the symbols desired) are in the object code (the ELF file) which you are running. Try doing this to the file containing some program you have compiled and linked:
Code:
readelf program_of_interest | less
 
1 members found this post helpful.
Old 07-28-2010, 09:29 AM   #5
hs_linux
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the reply wje_lq. readelf provides some useful information. I work on JNI. Part of my application is Java and partly C/C++. During Core dump analysis, I only mention path to Java which doesn't contain reference to my application's C++ libraries/files. I guess the core dump would be containing information here about these dependant C++ libraries.

Thanks.
 
  


Reply

Tags
coredump, gdb, kdevelop


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
Does core dump analysis require program arguments? hs_linux Programming 2 07-23-2010 03:46 AM
[SOLVED] Why core dump analysis require a program name? hs_linux Programming 3 07-22-2010 01:55 AM
gdb/Core Dump: "warning: Can't read pathname for load map: Input/output error." pr_deltoid Programming 2 07-03-2010 01:04 PM
Core dump issues. Program crashes but does not generate core dump file sabeel_ansari Programming 1 10-07-2009 05:23 PM
LXer: A quick overview of Linux kernel crash dump analysis LXer Syndicated Linux News 0 08-16-2007 05:11 AM


All times are GMT -5. The time now is 03:55 AM.

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