From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Veer To: jlarmour@redhat.com Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] Debugging multi-threaded eCos application using GDB Date: Fri, 03 Aug 2001 09:46:00 -0000 Message-id: <200108031646.f73Gkn225440@sheesh.cambridge.redhat.com> References: <200108031439.f73EdOE25094@sheesh.cambridge.redhat.com> <3B6ABF02.4A91A194@redhat.com> X-SW-Source: 2001-08/msg00131.html >>>>> "Jifl" == Jonathan Larmour 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