This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Segmentation Fault sid&gdb


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

PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]