Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)

SIGSEGV
A SIGSEGV signal is sent to a program when a segmentation violation occurs. A
segmentation violation occurs when a process attempts to access an address that is
not in the currently allocated address space of the process.
Example 2 illustrates how a SIGSEGV signal can cause a core dump.
Example 2 SIGSEGV Causes a Core Dump
$ cat a.c
int main()
{
int *i, j;
i = (int *)0x48000000;
j = *i;
return 0;
}
$ aCC a.c -o a
$ ./a
Memory fault(core dump)
$ file core
core: core file from 'a' - received SIGSEGV
In this example, the program de-references a nonexistent pointer address, and this
results in a SIGSEGV signal.
SIGABRT
A SIGABRT signal can be sent to a process in any of the following ways:
The process can send the abort signal, SIGABRT, by invoking the abort(3)
function.
Another process or the user can invoke the kill command to send the SIGABRT
signal.
As a result of calls to C++ terminate() function on various runtime library
errors. Example 3 (page 9) illustrates a SIGABRT signal caused by a call to
terminate().
8