[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Ian Soanes <ians@lineo.com>] (fwd)



>From owner-rtl Wed May  2 08:49:47 2001
Received: from colo.asti-usa.com (IDENT:root@colo.asti-usa.com [205.252.89.99])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f42EnkJ07905
	for <rtl@fsmlabs.com>; Wed, 2 May 2001 08:49:46 -0600
Received: from lineo.com (hal.uk.zentropix.com [212.74.13.151])
	by colo.asti-usa.com (8.9.3/8.9.3) with ESMTP id KAA19422
	for <rtl@fsmlabs.com>; Wed, 2 May 2001 10:54:34 -0400
Sender: ians@colo.asti-usa.com
Message-ID: <3AF01E97.B9211D5@lineo.com>
Date: Wed, 02 May 2001 15:49:59 +0100
From: Ian Soanes <ians@lineo.com>
Organization: Lineo UK
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.4.0-test12 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: rtl@fsmlabs.com
Subject: Re: [rtl] RTLinux debugger problems
References: <GBEBJEDLOFFHLCHJLHDLIEGDCDAA.jonas.persson@comsys.se>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Jonas,

Try compiling your module with -fno-schedule-insns2, also don't use
-fomit-frame-pointer and consider switching off optimisation with -O0.
These are what I use when debugging RTAI applications but they're
probably appropriate for RTLinux also.

Best regards,
Ian

Jonas Persson wrote:
> 
> Hi all!
> 
> I am trying to use the RTLinux debugger to find errors in my application, but only get puzzling results. It looks like if the debugger is having problems following the program correctly.
> 
> I output debug information via rtl_printf(), and after insmoding my module, the following appears in the system log:
> 
> May  2 15:05:52 conan kernel: SPARK::init_mrmwbuf returned 0
> 
> Then I start the debugger:
> 
> conan:/usr/local/src/spark/filter # gdb pll_test_mod.o
> (gdb) target remote /dev/rtf10
> Remote debugging using /dev/rtf10
> [Switching to Pid -946613760]
> 0xc804d065 in cleanup_module () at /usr/src/rtlinux-3.0/include/rtl_sched.h:246
> 246             attr->stack_size = 20480;
> (gdb) list
> 241     } pthread_attr_t;
> 242
> 243     extern inline int pthread_attr_init(pthread_attr_t *attr)
> 244     {
> 245             attr->stack_addr = 0;
> 246             attr->stack_size = 20480;
> 247             attr->sched_param.sched_priority = sched_get_priority_min(0);
> 248             attr->cpu = rtl_getcpuid();
> 249             rtl_sigemptyset(&attr->initial_state);
> 250             rtl_sigaddset(&attr->initial_state, RTL_SIGNAL_READY);
> (gdb) n
> warning: Source file is more recent than executable.
> 
> 90        pthread_join(dg_thread, NULL);
> (gdb)
> 
> As you may guess, this is not where I placed my breakpoint. Now, the funny part is that the debugger will pass the point where my call to init_mrmwbuf is after this point, i.e., code that obviously has already been executed will be executed again (at least in the eyes of the debugger).
> 
> Has anyone else managed to make the debugger behave like this? Any suggestions on what is really happening?
> 
> Yours sincerely,
> Jonas Persson
> 
> ______________________________________________________________________
>  Jonas Persson                    E-mail: jonas.persson@comsys.se
>  Project Manager, M.Sc C.Sc&E     http://www.comsys.se/
>  Comsys AB                        Phone: +46-(0)46-286 3500
>  Forskningsbyn IDEON              Fax: +46-(0)46-286 3505
>  S-223 70 Lund, Sweden
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/