Sponsored Content
Full Discussion: How to do core dump analysis
Top Forums UNIX for Advanced & Expert Users How to do core dump analysis Post 73679 by vijaysabari on Friday 3rd of June 2005 08:50:23 AM
Old 06-03-2005
Dbx debugger to analysis coredumps ......

dbx debugger is used to analysis the coredumps ............. i will explain with anexample

cc -g first.c
dbx ./a.out


Reading a.out
Reading ld.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libc_psr.so.1
(dbx 1) sif main
(2) stop infunction main
(dbx 2) run
Running: a.out
(process id 6156)
stopped in main at line 7 in file "first.c"
7 printf("%d\n",time(&t1));
(dbx 3) n
1117798709
stopped in main at line 8 in file "first.c"
8 for ( i=0 ; i<10; i++ ){
(dbx 4) n
stopped in main at line 9 in file "first.c"
9 printf("%d\n",rand());
(dbx 5) n
16838
stopped in main at line 8 in file "first.c"
8 for ( i=0 ; i<10; i++ ){
(dbx 6) exitbx 6)
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies

2. UNIX for Dummies Questions & Answers

core file analysis

Hi folks, I'm hoping someone would be charitable enough to give me a quick explanation of adb usage for analyzing core files...or point me in the right direction. A search here revealed scant results and web searches are providing me with ambiguous information. Running Solaris. Thanks,... (1 Reply)
Discussion started by: kristy
1 Replies

3. UNIX for Advanced & Expert Users

any tool for core analysis on HP-UX?

Hi, I just wanted to know is there any tool avaliable for core analysis on hp-ux. I have heard about q4 utility. But I think it is used for analysis of system crash dump and not for core dump produced by a user process. gdb doesn't give much information unless the binary is debug-build. ... (0 Replies)
Discussion started by: shriashishpatil
0 Replies

4. UNIX for Advanced & Expert Users

Core Dump Analysis Using PStack and PMAP

Hello, I'm new to the group and this is my first post. I'm hoping someone can help me out. I have a core dump that I need to analyze from a Unix box and I've never done this sort of thing before. I was told to run a pmap and pstack on the core file which provided two different output files. ... (3 Replies)
Discussion started by: kimblebee
3 Replies

5. AIX

How to do core dump analysis in AIX?

Please tell me some methods to analyse core dump in AIX.:) (2 Replies)
Discussion started by: Mythili
2 Replies

6. Solaris

Core file analysis

How can we analyze a core file and determine why it was generated on a solaris system? I know file core filename will tell us what program generated the file. But, what to do next to get more details? Thanks, (5 Replies)
Discussion started by: Pouchie1
5 Replies

7. Red Hat

core dump analysis : __kernel_vsyscall ()

We have just enabled core dump on our RHEL5.7 OS. the java process is terminating very often so we enable core dump to analysis the issue and find below in core dump file. Core was generated by `/usr/java/jdk1.6.0_06//bin/java -server -Xms1536m -Xmx1536m -Xmn576m -XX:+Aggre'. Program... (0 Replies)
Discussion started by: pawankkamboj
0 Replies

8. UNIX for Dummies Questions & Answers

Learn Linux Core Dump Analysis

Can any body provide me some good link to learn to create and analyze linux user mode application / kernel module core dumps? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

9. AIX

AIX system dump analysis

dear all, i have p770 aix6.1 last week, the host reboot suddenly with dump. but i don't know how to analyze the dump. I posted kdb details in the attachment. please anybody help me. #>kdb vmcore.0 /unix vmcore.0 mapped from @ 700000000000000 to @ 7000001c72c0908 START ... (13 Replies)
Discussion started by: tomato00
13 Replies
core(4) 						     Kernel Interfaces Manual							   core(4)

NAME
core - Format of memory image file SYNOPSIS
#include <sys/core.h> DESCRIPTION
The system writes out a memory image of a terminated process when any of various errors occur. See sigaction(2) for the list of reasons; the most common are memory violations, illegal instructions, bus errors, and user-generated quit signals. The memory image is called core and is written in the process's working directory (provided that it can be; normal access controls apply). The maximum size of a core file is limited. If a process exceeds this limit, any remaining data to be written to the core file is lost. Default behavior is for the system to create a file named core, overwriting any other file with that name in the working directory. You can enable enhanced core file naming, which causes the system to create unique names for core files. Core files are not overwritten, thereby preventing loss of valuable debugging information when the same program fails mulitiple times (and perhaps for mulitple reasons). When enhanced core file naming is enabled, the system produces core files with names in the following format: core.program_name.host_name.numeric_tag The literal string core. Up to sixteen characters taken from the program name as shown by the ps command. The first portion of the system's network host name, or up to 16 characters of the host name, taken from the part of the host name that precedes the first dot. This tag is assigned to the core file to make it unique among all of the core files generated by a pro- gram on a host. The maximum value for this tag, and thus the maximum number of core files for this program and host, is set by a system configuration parameter. Note the tag is not a literal version number. The system selects the first available unique tag for the core file. For example, if a program's core files have tags .0, .1, and .3, the system uses tag .2 for the next core file it creates for that program. If the system-configured limit for core file instances is reached, the system will not create any more core files for that program/host combination. By default, the system can create up to 16 versions of a core file. For example, the fourth core file generated on host buggy.net.ooze.com by the program dropsy would be: core.dropsy.buggy.3 Enhanced core file naming can be enabled at the system level or the program level: At the system level, you can enable enhanced core file naming by setting the enhanced-core-name system configuration variable to 1 in the proc subsystem: proc: enhanced-core-name = 1 At the program level, you can enable enhanced core file naming by calling the uswitch system call with the USW_CORE flag set. See the EXAMPLE section. The system manager can limit the number of unique core file versions that a program can create on a specific host system by setting the system configuration variable enhanced-core-max-versions to the desired value: proc: enhanced-core-name = 1 enhanced-core-max-versions = 8 The miminum value is 1, the maximum is 99,999, and the default is 16. EXAMPLE
The following example shows a code fragment that calls the uswitch system call with the USW_CORE flag set: #include <signal.h> #include <sys/uswitch.h> /* * Request enhanced core file naming for * this process then create a core file. */ main() { long uval = uswitch(USC_GET, 0); uval = uswitch(USC_SET, uval | USW_CORE); if (uval < 0) { perror("uswitch"); exit(1); } raise(SIGQUIT); } In general, the debugger dbx(1) is sufficient to deal with core images. RELATED INFORMATION
sigaction(2), uswitch(2), sysconfigdb(8), dbx(1) delim off core(4)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy