Hi all,

I have updated my repo.or.cz repository with the series of patches that
I have been working on.  There are a few issues that still need to be
worked out, but it shows what I am doing so others can avoid duplicating
(or "helping") in similar areas.  You can view the changes from here:

  http://repo.or.cz/w/openocd/ztw.git

My changes started by asking the question: can we change the types used
in the command_s->handler function signature?  Answer: Yes. Yes, we can.

In short, it starts with a bunch general cleanup issues that serve only
to reduce noise in the remaining patches.  These may deserve to be
pushed before the rest of the series, as they are mostly harmless.
The remainder of the series makes radical (but positive) changes to the
command handler function type signature, improving their maintainability
and making it a little easier to write new commands and their helpers.

The series will be done when we can reorder (or add) parameters to all
command handlers by a one-line patch to command.h (touching no other
files), and it's nearly there already.  For a final coup, I believe that
a small final patch will allow the removal of the 'cmd' parameter from
command handler functions.  That parameter goes unused more often than
not (and the value will still be available when it is needed).

Still known missing is documentation.  That amounts to a chapter in the
developer manual describing how to write new OpenOCD modules/commands.
However, the commit messages walk you through the conversion process,
and they introduce new concepts in their logical order.  The tree should
compile cleanly after each patch is applied.

Testing and feedback would be welcome.  Again, it's not quite done, but
the tree compiles and should work as-is without any regressions.

Cheers,

Zach Welch
Corvallis, OR

P.S. Strategically, I am working to improve the use of types throughout
the system, starting on helpers/ and up.
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to