public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] how work synthetic for exceptions
@ 2008-04-03 12:01 trollepi jj
  2008-04-03 14:08 ` Bart Veer
  0 siblings, 1 reply; 9+ messages in thread
From: trollepi jj @ 2008-04-03 12:01 UTC (permalink / raw)
  To: ecos-discuss


Hi,
I try do modify the execution of a thread for the synthetic target.
I've done that for an at91 board (using SWI,exception hanler and HAL_SavedRegisters to store the context info).
I put an exception handler for the CYG_HAL_SYS_SIGILL to see if i get the info pointers of the handler (3rd parameter of the function).
I reach the exception handler and have this backtrace call from gdb


#0  simple_syscall_handler (data=2, number=0, info=0) at main.c:56
#1  0x01004c7c in Cyg_Exception_Control::deliver_exception (this=0x2004560, exception_number=0, 
    exception_info=0) at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/except.cxx:235
#2  0x010042bf in Cyg_Thread::deliver_exception (this=0x20004c0, exception_number=0, exception_info=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:1013
#3  0x01004ce0 in cyg_hal_deliver_exception (code=0, data=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/except.cxx:248
#4  0x0100160d in synth_exception_sighandler (sig=4)
    at /home/pitrolle/ecos/ecos/packages/hal/synth/arch/current/src/synth_intr.c:460
#5  0x01002e18 in cyg_hal_sys_restore_rt ()
    at /home/pitrolle/ecos/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S:446
#6  0x00000004 in ?? ()
#7  0x0100418c in idle_thread_main (data=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:1231
#8  0x01004be0 in Cyg_HardwareThread::thread_entry (thread=0x20004c0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:95
#9  0x00000000 in ?? ()

I have severals questions :
 - What is the real aim of cyg_hal_sys_restore_rt?
 - If I want to get the context of the thread on the exception handler (info about saved registers like previous pc,sp,...) , what can i process?

Thank for future help, Best Regars
jjp
_________________________________________________________________
Lancez des recherches en toute sécurité depuis n'importe quelle page Web. Téléchargez GRATUITEMENT Windows Live Toolbar aujourd'hui !
http://toolbar.live.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [ECOS] how work synthetic for exceptions
@ 2008-04-03 12:26 trollepi jj
  2008-04-03 12:38 ` Gary Thomas
  2008-04-03 12:56 ` Andrew Lunn
  0 siblings, 2 replies; 9+ messages in thread
From: trollepi jj @ 2008-04-03 12:26 UTC (permalink / raw)
  To: ecos-discuss


Hi,
I try do modify the execution of a thread for the synthetic target.
I've done that for an at91 board (using SWI,exception hanler and HAL_SavedRegisters to store the context info).
I put an exception handler for the CYG_HAL_SYS_SIGILL to see if i get the info pointers of the handler (3rd parameter of the function).
I reach the exception handler and have this backtrace call from gdb


#0  simple_syscall_handler (data=2, number=0, info=0) at main.c:56
#1  0x01004c7c in Cyg_Exception_Control::deliver_exception (this=0x2004560, exception_number=0, 
    exception_info=0) at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/except.cxx:235
#2  0x010042bf in Cyg_Thread::deliver_exception (this=0x20004c0, exception_number=0, exception_info=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:1013
#3  0x01004ce0 in cyg_hal_deliver_exception (code=0, data=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/except.cxx:248
#4  0x0100160d in synth_exception_sighandler (sig=4)
    at /home/pitrolle/ecos/ecos/packages/hal/synth/arch/current/src/synth_intr.c:460
#5  0x01002e18 in cyg_hal_sys_restore_rt ()
    at /home/pitrolle/ecos/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S:446
#6  0x00000004 in ?? ()
#7  0x0100418c in idle_thread_main (data=0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:1231
#8  0x01004be0 in Cyg_HardwareThread::thread_entry (thread=0x20004c0)
    at /home/pitrolle/ecos/ecos/packages/kernel/current/src/common/thread.cxx:95
#9  0x00000000 in ?? ()

I have severals questions :
 - What is the real aim of cyg_hal_sys_restore_rt?
 - If I want to get the context of the thread on the exception handler (info about saved registers like previous pc,sp,...) , what can i process?

Thank for future help, Best Regars
jjp
_________________________________________________________________
Lancez des recherches en toute sécurité depuis n'importe quelle page Web. Téléchargez GRATUITEMENT Windows Live Toolbar aujourd'hui !
http://toolbar.live.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-09  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 12:01 [ECOS] how work synthetic for exceptions trollepi jj
2008-04-03 14:08 ` Bart Veer
2008-04-09  9:10   ` trollepi jj
2008-04-09  9:46     ` Andrew Lunn
2008-04-03 12:26 trollepi jj
2008-04-03 12:38 ` Gary Thomas
2008-04-03 12:48   ` trollepi jj
2008-04-03 12:56 ` Andrew Lunn
2008-04-03 13:24   ` trollepi jj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).