How to save the core file to disk?

Tony Arnold tony.arnold at manchester.ac.uk
Tue Nov 26 14:55:09 UTC 2013


Unga,

On 26/11/13 14:44, Unga wrote:
> 
> 
> 
> 
> ----- Original Message -----
>> From: Liam Proven <lproven at gmail.com>
>> To: Unga <unga888 at yahoo.com>; "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com>
>> Cc: 
>> Sent: Tuesday, November 26, 2013 2:21 PM
>> Subject: Re: How to save the core file to disk?
>>
>> On 26 November 2013 14:07, Unga <unga888 at yahoo.com> wrote:
>>>  Hi all
>>>
>>>  I'm running Ubuntu 13.10 on i386.
>>>
>>>  My program Seg faults but cannot find where Ubuntu saves the core file.
>>>
>>>  I have changed the core_pattern as follows but still no core file:
>>>  echo "core.%e.%p" > /proc/sys/kernel/core_pattern
>>>
>>>  I want to debug and see where it is crashing. Appreciate if someone could 
>> help to generate the core file disk.
>>
>>
>> Um. This may be naïve, but what's wrong with:
>>
>> `sudo find / -name core*`
>>
> 
> The core_pattern defaults to in Ubuntu 13.10:
> 
> cat /proc/sys/kernel/core_pattern
> |/usr/share/apport/apport %p %s %c
> 
> 
> And the /var/log/apport.log say:
> executable does not belong to a package, ignoring
> 
> I'm writing my own program :)
> 
> It seems Ubuntu did not expect people may write their own programs :)

Seems a good debugger is what you really need. Try running you program
with gdb (it's command line, but does the job). If you are using a
development environment then that may include a debugger. I use Anjuta,
which is not too bad.

Regards,
Tony.
-- 
Tony Arnold,                        Tel: +44 (0) 161 275 6093
Head of IT Security,                Fax: +44 (0) 705 344 3082
University of Manchester,           Mob: +44 (0) 773 330 0039
Manchester M13 9PL.                 Email: tony.arnold at manchester.ac.uk




More information about the ubuntu-users mailing list