- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to examine core file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 12:33 AM
10-04-2000 12:33 AM
how to examine core file
I would like to check a core file : how to do this using adb ?
Federico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 12:39 AM
10-04-2000 12:39 AM
Re: how to examine core file
Solution
If you see a file named "core" lying around and don't know what program
left it there, try the `file' command:
$ file core
This should tell you the program that left the core file. For example:
$ file core
core: core file from 'audio_editor' - received SIGABRT
If by "programmatic core dump" you mean "my program dumped core", you can use
a good debugger and the sources to get the most thorough answer. Ask the
debugger for a stack trace, which will give you an idea of the routine that
the program was executing when it died.
You can also ask `adb' for a stack trace. To debug an errant program named
`a.out', run adb on a.out and core. Give adb two commands, $C (stack trace)
and $Q (quit). The adb program has no prompt, by the way.
$ PATH=$PATH:/usr/ccs/bin # to get to adb
$ a.out 4 5 6
Floating exception(coredump)
$ adb a.out core
$C
$$divI() from func+1C
func(0) from main+18
data address not found
$Q
The output above shows that when it dumped core, the program was executing a
function named $$divI(), which was called from func(), which was called from
main(). The argument passed to func() was zero. Someone who knows the
sources to the program may be able to interpret the meaning of the argument
or the order of program execution.
This use of adb is documented in the book "The Unix Programming Environment"
by Brian Kernighan and Rob Pike (1984, Prentice-Hall), available in technical
bookstores. Section 6.6, "On bugs and debugging", starting on page 187, is
especially valuable.
If by "programmatic core dump" you mean "caused by a deliberate programming
call that aborted the program", the errant program probably used the assert()
macro. In this case you would see a message indicating the source line on
which an assertion failed before the program dumps. For more information on
this, see the manual page assert(3X). To turn off assertion-checking,
recompile the program with -DNDEBUG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 06:55 AM
10-04-2000 06:55 AM
Re: how to examine core file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 07:23 AM
10-04-2000 07:23 AM
Re: how to examine core file
The core file will probably be quite long. Instead of piping to more, you may wish to redirect to a separate file: strings core > mycore.txt
There will still be some unreadable characters, but you should be able to see familiar commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2000 05:05 AM
10-05-2000 05:05 AM
Re: how to examine core file
With application built on HP-UX, I ask for the following:
1. Determine what program cored
file core
2. Determine what libraries the program uses
chatr
3. Versions of libraries in core
what core
4. Stack trace
Three main options (in order of my
preference)
a. gdb
(gdb) bt
b. dde -ui line core
dde> tb
c. adb
gdb is free to HP customers. Look on
software.hp.com for it. It installs
in /opt/langtools/bin/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2001 01:25 AM
07-05-2001 01:25 AM
Re: how to examine core file
>gdb java core
Core was generated by `java'.
Program terminated with signal 6, Aborted.
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
Error while reading dynamic library list.
#0 0xc01f2740 in ?? ()
Does anyone know how I can get around this?
thanks, Emer