This is some thoughts on cleaning up target.c and specifictarget relations.
It is not an architectural change, but rather about consistent use of the one we have. A very common pattern is to have something like this target_halt(target_s *target) . Some common cleanup and sanity checking . calling out to: target->type->halt(target) The consequencies should be that: - the specific targets does not have to do general sanity checking that is not unique for a specific target. - target->type->halt(target) should never be called from any other function than target_halt() - the specific implementation of halt() can be called from within the defining module If you work through these issues I am sure that you can make it easier to implement new targets, where onle the really target spicific thins has to be rewritten. Regards Magnus _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
