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]

Segmentation Fault sid&gdb


Hello,

I'm trying to use gdb in combination with sid.
I followed the example in the SID Faq-O-Matic on "how does one build and run sid".

I compiled the following program for the ARM

    #include <stdio.h>
    
    int main
    { printf("Hello world!\n");
       return 0;
     }

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
But I now give the follwing command:

      (gdb) cont

Then I get the following message:

      Program received signal SIGSEGV, Segmentation fault

Which I think is probably due to the way gdb handles breakpoints (am I correct?).
But I I then want to step or continue the program in which way what so ever, I get the
message

      Fault (memory, 0xfffffffc) pc=0x80e8

And then nothing happens anymore.

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? If yes, what am I doing wrong?
Can anybody shed some light on this subject?

Thanks. 

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