Segmentation Fault sid&gdb

Frank Ch. Eigler fche@redhat.com
Tue Jan 16 04:39:00 GMT 2001


Hi -

On Tue, Jan 16, 2001 at 10:24:47AM +0100, norbert.c.esser@philips.com wrote:
: I'm trying to use gdb in combination with sid.

Excellent, welcome!


: I followed the example in the SID Faq-O-Matic on "how does one build
: and run sid".
: I compiled [hello-world] for the ARM [...]
: with arm-elf-gcc -mlittle-endian hello.c -o hello.x
: And then started sid and gdb in the follwing way:
:     arm-elf-sid --gdb=2000 -EL &
:     arm-elf-gdb hello.x
: I then gave the follwing gdb commands:
:       (gdb) target remote localhost:2000
:       (gdb) load
:       (gdb) break main
: Up to here everything seems to work

Good.


: But I now give the follwing command:
: 
:       (gdb) cont
: 
: Then I get the following message:
:       Program received signal SIGSEGV, Segmentation fault
: [...]

This message indicates that the arm-elf program running
on the simulator has encountered a SEGV.  hello-world of
course shouldn't, but there are a few ways to find out
what's happening:

* when the first fault message comes from gdb, run
  the gdb `backtrace' command to find out where the
  crash occurred

* enable more simulator tracing options, for example by
  adding "--trace-sem" and "--trace-core" and perhaps "--verbose"
  to the arm-elf-sid command line; possibly, compare the
  trace-sem disassembly to "arm-elf-objdump -d <your-hello-world.x>".

* identify which arm-elf cross-compiler toolchain you are using


: [...]
: I would for example like to be able to set multiple breakpoints and
: if the program stops on a breakpoint continue the program until it
: stops on another breakpoint.  Is this possible?   [...]

Certainly.  This is a routine usage scenario, and should in general
work.


- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6ZEDxVZbdDOm/ZT0RAkKfAJ4mHXxjobGGdAoq98tAmT9boKsmDACghTmN
eKdX1EM9liyxt+TW1L39234=
=YJ6X
-----END PGP SIGNATURE-----


More information about the Sid mailing list