This is most likely a cygwin/gdb issue, mentioned in various places on the
cygwin lists, such as http://sourceware.org/ml/cygwin/2006-02/msg00122.html

This is expected behaviour and if you just enter 'continue' a few times it
will most likely get past it - otherwise enter 'handle SIGSEGV noprint
nostop' to tell gdb to just pass the expections straight to the program and
not halt for them. Of course if you do this and you encounter a genuine
segfault gdb won't trap it.


Hope this helps,

Ciaran Lynch

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Vinai
> Sundaram
> Sent: 20 April 2006 23:36
> To: [email protected]
> Subject: [Tinyos-help] SIGSEGV when debugging using gdb
>
>
> Hi,
>
> I ran into a strange problem when trying to debug a TOSSIM application
> with gdb running under cygwin. A SIGSEGV is generated when I invoke any
> tiny-os application(including samples like Blink,Sense) using gdb.
> However, the applications run just fine when invoked from command line.
> This is indeed strange because I used gdb to step through my application
> a few days ago. I haven't modified the environment since( cygwin or Tiny
> OS version ). The backtrace(bt command in gdb) is of not much help
> either as the file name that causes SEGV is not being printed though I
> compiled the application with debug option ( make pc debug ).
>
> Any pointers on how to solve this problem is much appreciated.
>
> Thanks,
> Vinai.
>
> ********* GDB TRACE *********
> This GDB was configured as "i686-pc-cygwin"...
> (gdb) run 2
> Starting program: /home/...../tinyos-1.x/apps/Blink/build/pc/main.exe 2
> SIM: EEPROM system initialized.
> SIM: event queue initialized.
> SIM: Random seed is 849740
> SIM: Initializing sockets
> SIM: Created server socket listening on port 10584.
> SIM: Created server socket listening on port 10585.
> SIM: eventAcceptThread running.
> SIM: commandReadThread running.
> SIM: Time for mote 0 initialized to 24182616.
> SIM: Time for mote 1 initialized to 28938372.
> 1: BOOT: Scheduling for boot at 0:0:6.04565400.
> 1: BOOT: Scheduling for boot at 0:0:7.23459300.
> 1: Popping event for mote 0 with time 0:0:6.04565400.
>
> Program received signal SIGSEGV, Segmentation fault.
> ---Type <return> to continue, or q <return> to quit---
> 0x7c809f64 in KERNEL32!IsBadWritePtr ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
> (gdb) bt
> #0  0x7c809f64 in KERNEL32!IsBadWritePtr ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
> #1  0x00000013 in ?? ()
> #2  0x0022eb74 in ?? ()
> #3  0x00000012 in ?? ()
> #4  0x0022e000 in ?? ()
> #5  0x0022e000 in ?? ()
> #6  0x0022d5bc in ?? ()
> #7  0x0a050020 in ?? ()
> #8  0x0022eff0 in ?? ()
> #9  0x7c8399f3 in KERNEL32!FindAtomW ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
> #10 0x7c809f90 in KERNEL32!IsBadWritePtr ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
> (gdb)
> ********** END OF GDB TRACE*************
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> -------------------Legal
> Disclaimer---------------------------------------
>
> The above electronic mail transmission is confidential and
> intended only for the person to whom it is addressed. Its
> contents may be protected by legal and/or professional privilege.
> Should it be received by you in error please contact the sender
> at the above quoted email address. Any unauthorised form of
> reproduction of this message is strictly prohibited. The
> Institute does not guarantee the security of any information
> electronically transmitted and is not liable if the information
> contained in this communication is not a proper and complete
> record of the message as transmitted by the sender nor for any
> delay in its receipt.
>


-------------------Legal  Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only for 
the person to whom it is addressed. Its contents may be protected by legal 
and/or professional privilege. Should it be received by you in error please 
contact the sender at the above quoted email address. Any unauthorised form of 
reproduction of this message is strictly prohibited. The Institute does not 
guarantee the security of any information electronically transmitted and is not 
liable if the information contained in this communication is not a proper and 
complete record of the message as transmitted by the sender nor for any delay 
in its receipt.

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to