i am getting memory fault (core dump) in a C program
i want to know which statement execution caused it.
i tried following things
$ gdb generalised_tapinread_mod
HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) r /TRAP_TR/telcel_pr/RAW/BP/POPROMTAPOUT/SOURCE/CDMEXTLUSA2702258 3.11_selectedfields generalised_config.
Starting program: /TRAP_TR/telcel_pr/EXE/generalised_tapinread_mod /TRAP_TR/telcel_pr/RAW/BP/POPROMTAPOUT/SOURC
Process Start Time - Mon Dec 1 23:10:50 2008
Program received signal SIGSEGV, Segmentation fault
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
0x4006350:0 in parseBinaryFile () at generalised_tapinread_mod.c:646
646 cur_add->nodeProcessed = YES;
(gdb) print cur_add->nodeProcessed
Cannot access memory at address 0x325
(gdb) print cur_add
$1 = (struct node *) 0x1
but the line no "646" doesn't seem to be problematic to me.....
can someone tell me how to debug the error in my code.
thanks in advance