Hello.
I just recently installed Red Hat Linux 4.2 on my computer, and it's my
first experience with Linux. I got Linux so that I could easily port
programs back and forth from my SGI at work.
I wrote a fairly simple program at home that reads and writes RGB
files. I used g++ ( gcc version 2.7.2.1 ) to compile it. I got a
segmentation fault the first time I ran it. I am accustomed to hunting
down segmentation faults using 'dbx,' but I suppose gdb is similar. So
I used gdb and got the following output:
--------begin-------
brett: /home/brett/mbuffer>gdb test
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for
details.
GDB 4.16 (i586-unknown-linux),
Copyright 1996 Free Software Foundation, Inc...
(gdb) run leafy4.rgb
Starting program: /home/brett/mbuffer/test leafy4.rgb
Usage: test <filename>
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.
Program received signal SIGSEGV, Segmentation fault.
0x40002902 in _dl_find_hash ()
(gdb) where
#0 0x40002902 in _dl_find_hash ()
#1 0x40002067 in _dl_linux_resolver ()
#2 0x40003b1e in _dl_linux_resolve ()
(gdb)
--------end--------
I compiled the program with the -gstabs+ option.
Anybody know what could be going wrong here? Please reply by e-mail if
convenient.
Thanks,
Brett Keating