Reporting crashes/resets in Embedded Systems(8 bit)
PICs provide a method for the firmware to determine the cause of a reset.  There is a register RCON.  It has bits for the following reset caused


Firmware had reset itself through a reset instruction
WDT timeout occurred
Power on reser occurred
Brown-out reset occurred


Look at chapter 4.1 in the datasheet for PIC18F2525.  I don't know which specific model of a PIC you're using, so check the datasheet for your specific PIC.