public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Debug Problem
@ 2000-07-29  1:07 ligl
  2000-07-29 16:01 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: ligl @ 2000-07-29  1:07 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]




 
I can debug the "hello" example.but when 
I reach the "====>" line ,I can't continue,why? Thanks very 
much!
 
        void 
Cyg_Scheduler::start()         
{             
CYG_REPORT_FUNCTION();         
            // Get the first 
thread to run from scheduler         
    register Cyg_Thread *next = 
scheduler.schedule();
 
        
    CYG_ASSERTCLASS( next, "Bad initial thread" );
 
        
    need_reschedule = false;    // finished 
rescheduling             
current_thread = next;      // restore current thread 
pointer
 
        #ifdef 
CYGVAR_KERNEL_COUNTERS_CLOCK         
    // Reference the real time clock. This ensures that at least 
one             // reference to 
the kernel_clock.o object exists, without which     
        // the object will not be included while 
linking.             
CYG_REFERENCE_OBJECT( Cyg_Clock::real_time_clock );     
    #endif
 
        
    // Let the interrupts 
go         
    Cyg_Interrupt::enable_interrupts();     
====>  HAL_THREAD_LOAD_CONTEXT( 
&next->stack_ptr );        
        }
 

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

* Re: [ECOS] Debug Problem
  2000-07-29  1:07 [ECOS] Debug Problem ligl
@ 2000-07-29 16:01 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2000-07-29 16:01 UTC (permalink / raw)
  To: ligl; +Cc: ecos-discuss

> ligl wrote:
> 
> 
> I can debug the "hello" example.but when I reach the "====>" line ,I
> can't continue,why? Thanks very much!

You mean the program crashes or that you can't step it in GDB? If the
latter, this is completely expected because you are switching context into
a different thread[1].

The HAL_THREAD_LOAD_CONTEXT macro never returns.

[1] Well, the startup context isn't a thread in the kernel sense, but
still...

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

end of thread, other threads:[~2000-07-29 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-29  1:07 [ECOS] Debug Problem ligl
2000-07-29 16:01 ` Jonathan Larmour

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).