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

RTLinux debugger problems



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