[ECOS] Debugging multi-threaded eCos application using GDB
Bart Veer
bartv@redhat.com
Fri Aug 3 09:46:00 GMT 2001
>>>>> "Jifl" == Jonathan Larmour <jlarmour@redhat.com> writes:
>> Yes, theoretically it would be possible to run something like
>> Redboot inside the synthetic target, connect to it via a socket
>> and the remote protocol, and then boot a RAM-startup synthetic
>> target application into it.
Jifl> That's what I was thinking sort of - except you could just
Jifl> build your application for "ROM" startup and include stubs
Jifl> instead. After all, this only applies if you explicitly want
Jifl> thread debugging.
There would be various problems:
1) you would be using the native Linux target vector for starting up
the application, then switching to the remote target vector. That
is not exactly normal behaviour for a Linux gdb session. There
could be all kinds of confusion if e.g. during initialization you
set a few Linux native breakpoints.
2) in the synthetic target only ROM startup is currently supported,
and the code region really is made read-only. Therefore attempting
to insert a breakpoint instruction from inside gdb stubs is not
going to work very well. Although RAM startup support could be
added, it would be a shame to lose functionality such as
applications being unable to overwrite their own code by accident.
3) Linux ptrace debugging probably uses more advanced functionality
than typical gdb stubs, e.g. hardware breakpoints and watchpoints.
It would be a shame to lose those.
Yes, something along your lines is possible. However I would much
prefer to see it fixed generally, by making the gdb target vector
scriptable, and thus solving the problem for simulators etc. at the
same time. All this assumes that the gdb folks do not have their own
plans in this area, of course.
Bart
More information about the Ecos-discuss
mailing list