[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [C] gdb - hvor er min .core fil henne?



In <sslug@sslug> Hans Schou <sslug@sslug> writes:

>Jeg har skrevet et C-program der har en periodisk fejl. Under normal 
>brug ses fejlen ca. 1 gang om ugen sådan ret uventet. Fejltypen er 
>Segmentation Fault (det' sgu pinligt).

>Så tænkte jeg at det måske var en idé at granske med gdb og så .core 
>dump fil, men sådan en har jeg ikke. Hvordan får jeg lavet sådan en?

Sørg for at checke med "ulimit -c" om der er grænser for en core-fils 
størrelse. Ofte er den default "0", hvilket gør at der ikke dannes nogen
core-fil.

Ellers så dannes core-filen i "current working directory". Så hvis du vil 
være sikker på hvor den havner henne, må du lægge en signal-handler ind
i programmet som laver en chdir("/tmp") f.eks. så de havner i /tmp når
du får en SIGSEGV, SIGBUS eller SIGABRT.


Henrik



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-09-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *