This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Possible bug in dbg-threads-syscall.c
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Patrick Doyle <wpd at delcomsys dot com>
- Cc: eCos <ecos-discuss at sourceware dot cygnus dot com>
- Date: Sat, 01 Dec 2001 02:00:29 +0000
- Subject: Re: [ECOS] Possible bug in dbg-threads-syscall.c
- References: <NFBBJAJICAKJPMMKDAGBEENKCMAA.wpd@delcomsys.com>
Patrick Doyle wrote:
>
> I believe that I have found a subtle bug in "dbg-threads-syscall.c", and I
> would appreciate some feedback on this.
>
> Here is the 'dbg_thread_syscall()' function. The problem is that, on the
> surface, this looks correct, but in my particular environment, where
> 'dbg_thread_syscall()' is called when 'dbg_syscall_ptr' is NULL, things just
> don't work.
We haven't noticed that before, so I wonder what's different in your
environment? Oh, perhaps it only happens if you're trying to debug before
the kernel runs its constructors.
> Anyway, here is my proposed patch, comments and feedback are definately
> welcome :-)
Looks fine, although I left in the check for *f being non-NULL too. It's
good defensive programming anyway.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine