From mboxrd@z Thu Jan 1 00:00:00 1970
From: Peter Graf
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] sscanf() vs. fgetc()
Date: Thu, 12 Jul 2001 07:43:00 -0000
Message-id: <3.0.5.32.20010712164238.0093f5e0@128.128.128.220>
References: <3.0.5.32.20010712104805.00914420@128.128.128.220> <3.0.5.32.20010712145511.0093c540@128.128.128.220> <3B4DA283.A0C54D9F@redhat.com>
X-SW-Source: 2001-07/msg00373.html
Hi Jonathan,
>> Which priority value did you have for the sscanf() thread?
>> I had the default of "10", which means lower priority than
>> the "9" in the fgetc() thread.
>
>I used exactly your code, the only change being the serial port name
>(because it has to be for the PC).
Just asked because I didn't exeplicitely set the main() priority.
You might have a different default.
>Try recompiling eCos without optimization, i.e. editting
>CYGBLD_GLOBAL_CFLAGS and doing a "make clean" and then a rebuild.
Yes, I did.
>Once you've compiled without optimization hopefully that will avoid the
>SIGTRAPs.
>Can you then at least give a summary of what functions you enter
>as you single step? Or cut and paste a step session?
sscanf (s=0x811472c "\b\021GL\b\021GP128.128.128.122", format=0x70707070 ...)
vsscanf (s=0x8008690 ...)
__strlen (s=0x202000d "")
cyg_check_data_ptr (ptr=0x202000a)
cyg_check_data_ptr (ptr=0x810df38)
Cyg_Scheduler::unlock_inner (new_lock=0)
Cyg_Thread::check_this (this=0x400001f0, zeal=134416118)
Cyg_Scheduler::unlock_inner (new_lock=0)
Cyg_HardwareThread::check_stack (this=0x0)
Cyg_HardwareThread::get_stack_base (this=0x8084220)
Cyg_HardwareThread::check_stack (this=0x810df38)
Cyg_Scheduler::unlock_inner (new_lock=0)
Cyg_Scheduler::unlock_inner (new_lock=0)
cyg_check_data_ptr (ptr=0x803075a)
Cyg_Scheduler::unlock_inner (new_lock=0)
Cyg_Thread::check_this (this=0x40000100, zeal=134416294)
Program received signal SIGTRAP, Trace/breakpoint trap.
Do you have an idea which common resources sscanf() and fgetc()
might share?
Peter