That should be possible even on x86, though on x86 the relevant documentation is probably hard to find. For some ARM processors, it should be as easy as installing openocd.
Of course, JTAG requires physical access to plug the debugging cable, which puts it in a different category of attack.