> Interesting, but still no how to.
On host with a m68k gdb cross gdb and a suitable .gdbinit script that connects the BDM gdb server as per the documentation, then :
$ m68k-gdb kernel.elf
where kernel.elf is the kernel excutable containing all the debug data. This is the normal procedure for using BDM and GDB with the gdb-server on a host. The BDM project explains using the BDM gdbserver on its web site.
> The only problem I see there is that GDB depends on a sprite running on the target.
With BDM the bdm server runs on the host and connects directly into the CPU. Your use of JTAG is a little confusing to me. The Coldfire uses BDM which is not JTAG. Are you talking about another debugger or BDM ?
If you are debugging applications then using a native gdb-server running on the target is the correct tool and what you state is correct. For the kernel using the debug module of the CPU can be done.
> Since the sprite is basically a user space app that loads the target app and communicates
> the debug information over the selected transport, the kernel needs to be already running.
The BDM hardware is in the processor and your gdb the BDM gdb-server on the same host machine. You treat the kernel as a bare metal embedded application. You cannot debug the user space applications.
> Second you can't start the kernel until uboot has initialised the hardware, so the debugger would
> have to know how to do this as well.
BDM works from reset. If you do not touch the PC but continue the debugger it will run the boot monitor as if not present at all. If this boot monitor loads a kernel and the symbol table you have loaded into gdb matches the kernel you can look at the kernel's source and inspect it's variables.
> Just breaking into the kernel at some random place with no symbols is really not that useful.
Agreed so you need to load the kernel symbols. GDB will not allow you to switch address spaces so you cannot see what an application is doing. Also kernel modules are a problem because GDB does not know the vma of the loaded module.
> My point is really this - why would you recommend that someone try a technique that you have no
> idea how to actually do it, or even if it is reasonably possible?
But I do.
> If I were posting I would not consider it ethical to do so, but that's just me. I have a good reason
> for this, mainly the OP will just waste time attempting to do such, to no avail. Second, when the
> OP asked me how to do that I would have no answer.
I have no idea what you are talking about or why.
> Again, I really hope someone can come up with a how-to on using a JTAG
> to trace uboot and or the kernel with symbols. That would be fantastic.
Do you mean BDM or do tools exist that allow debugging over JTAG ?