UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 17th, 2004, 08:28 AM
murugesan murugesan is offline
Dinesh_P_V
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 256 murugesan New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 11 h 38 m
Reputation Power: 0
Send a message via Yahoo to murugesan
How to trace without binary and with core file.

Hello all,

I have been given just the core file ( without the binary ). Is there a way to backtrace the core file without the binary?
If so, how can I achieve that ?
Is that possible with gdb ?
If not, is there any other tool for debugging such files ?

Thanks in advance,
Murugesan

Reply With Quote
  #2  
Old June 17th, 2004, 08:42 AM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
I'm sorry, what do you mean "core file"? I've personally never heard the term before. I would guess you were speaking of a source file, but since you are using a debugger, I'd guess you are a programmer, who would know what a source file is....


-Steven
__________________
CHISWICK! FRESH HORSES!! –King Richard, Black Adder

Reply With Quote
  #3  
Old June 17th, 2004, 10:54 AM
murugesan murugesan is offline
Dinesh_P_V
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 256 murugesan New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 11 h 38 m
Reputation Power: 0
Send a message via Yahoo to murugesan
core file in the previous message I refered to as the file that will be created when there is a segmentation fault.
For example
main()
{
int *p=(int*)0x16253;
printf("%d",*p);
}

This will produce the core file after execution. FYI I am using HPUX.
and for tracing the core dump,
I used to use
# gdb a.out core
which on executing backtrace command will give me the coredump trace.

Reply With Quote
  #4  
Old June 17th, 2004, 04:29 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,307 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 28 m 57 sec
Reputation Power: 48
on HPUX
Code:
gdb -c core 


will let you look at the core file. But it can't do much with the symbols, and if
Code:
ulimit -c unlimited 
was not specified for the user, you have no guaranteee that you got a complete core.

And if it segfaulted because of buffer overrun re-writing RET on the stack you are kinda out of luck.

Reply With Quote
  #5  
Old June 17th, 2004, 05:48 PM
codergeek42's Avatar
codergeek42 codergeek42 is offline
少しな日本語とスペイン語と英語を話します。
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jul 2003
Location: Anaheim, CA (USA)
Posts: 6,420 codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)codergeek42 User rank is General 1st Grade (Above 100000 Reputation Level)  Folding Points: 35702 Folding Title: Starter FolderFolding Points: 35702 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 6 Days 5 h 28 m 34 sec
Reputation Power: 1078
Send a message via ICQ to codergeek42 Send a message via AIM to codergeek42 Send a message via Yahoo to codergeek42 Send a message via Google Talk to codergeek42
Quote:
Originally Posted by murugesan
FYI I am using HPUX.
That is why I have moved this thread to the UNIX Help forum.
__________________
~~ Peter ~~
( My Blog: It's exactly like normal nerdiness, but completely different. ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key )

Reply With Quote
  #6  
Old June 17th, 2004, 10:45 PM
murugesan murugesan is offline
Dinesh_P_V
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 256 murugesan New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 11 h 38 m
Reputation Power: 0
Send a message via Yahoo to murugesan
Thanks php4geek for getting me right here.
jim, I got it. Thanks.

Reply With Quote
  #7  
Old June 18th, 2004, 07:12 AM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
Hey, thanks for the lesson, murugesan n jim. I've experienced seg faults before, but never bothered checking out the core file. (always just deleted it.) That was cool.

-Steven
__________________
You ride a horse rather less well than another horse would. –Edmund Black Adder

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > How to trace without binary and with core file.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway