From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1195 invoked by alias); 9 Sep 2007 16:37:03 -0000 Received: (qmail 1185 invoked by uid 22791); 9 Sep 2007 16:37:03 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 09 Sep 2007 16:36:59 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1IUPmJ-0006QQ-00; Sun, 09 Sep 2007 18:36:55 +0200 Date: Sun, 09 Sep 2007 16:37:00 -0000 From: Andrew Lunn To: Alok Singh Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070909163655.GC3557@lunn.ch> Mail-Followup-To: Alok Singh , ecos-discuss@ecos.sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Stack Trace and running task when exception occurs - X-SW-Source: 2007-09/txt/msg00042.txt.bz2 On Sun, Sep 09, 2007 at 04:32:10PM +0530, Alok Singh wrote: > > Hi, > > Does eCos provides the details of the task that was running when > exception occurred? I think I know that it doesn't, but just wanted > to get your views?? Or is there a way to get this information > without altering (enhancing) the current eCos code. It depends on what details you want. cyg_thread_self() will tell you the current thread. However, be careful, it could of been an ISR/DSR that caused the exception, not the thread. If you have a hardware exception, eg /0, sigfault etc, the info parameter passed to the exception handler may be the saved registers. This is architecture dependent. eg look at packages/hal/arm/arch/current/src/hal_misc.c lines 136-158 and follow the code patch though into your exception handler. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss