Re: How can I trace a segfault on program start?
"Eric G. Miller" wrote:
>On Tue, Jul 17, 2001 at 11:04:52AM +0100, Oliver Elphick wrote:
>> I have compiled a program with gcc 2.95. It segfaults immediately on star
>ting
>> and neither gdb nor strace reveal any useful information:
>>
>>
>> olly@linda:.../src$ people
>> Segmentation fault (core dumped)
>> olly@linda:.../src$ gdb people
>> GNU gdb 2001-07-05-cvs (MI_OUT)
>> ...
>> (gdb) run
>> Starting program: /usr1/proj/bray/gtk/people_glade/src/people
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00000001 in ?? ()
>> (gdb) bt
>> #0 0x00000001 in ?? ()
>> Cannot access memory at address 0x0
> ^^^^
> Obviously an error.
Obviously! But what is causing it? This happens while the program is
loading, before any of my own code is executed.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"But my God shall supply all your need according to his
riches in glory by Christ Jesus." Philippians 4:19
Reply to: