Andreas,

I looking a mips32.c to contain common commands but just not sure how to do the 
chain. I have not looked at the ARM code but I will give it a look and see what 
I can discover.

Thanks for the feedback,
Kent

From: [email protected] [mailto:[email protected]] On Behalf Of 
Andreas Fritiofson
Sent: Wednesday, October 22, 2014 12:29 PM
To: Kent Brinkley
Cc: [email protected]
Subject: Re: [OpenOCD-devel] Reuse of commands



On Wed, Oct 22, 2014 at 7:47 PM, Kent Brinkley 
<[email protected]<mailto:[email protected]>> wrote:
Hi Guys,

I would like to remove redundant commands from openocd, for example both mips32 
and m4k targets have “cp0” command (exactly the same code) . There is no reason 
to have duplicate commands but I would like not to break backward 
compatibility. Is there a way to reference the COMMAND_HANDLER 
(mips32_handle_cp0_command) code (mips32.c) from mips_m4k.c?


I'm not up to speed on how the mips code is organized but removing duplicates 
is a noble goal, thanks for working on that. There is a way to call one command 
handler from another, but I'm wondering if the correct way isn't to group the 
common commands and chain them into both targets' command handler list. Or is 
that impossible while maintaining the same syntax?

/Andreas
------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to