On Wed, Nov 1, 2017 at 8:22 AM, Tomas Vanek via OpenOCD-devel <
[email protected]> wrote:
> Hi all,
>
> I need to create an event routine which is aware of a currently processed
> target.
> The easiest but awkward solution is to declare an iteration variable as
> global.
> My second idea was to include a target name to the event:
>
> $_TARGETNAME configure -event reset-assert-pre "my_event_procedure
> $_TARGETNAME"
>
> proc my_event_procedure { t } {
> ...
>
> Do you know a more elegant solution?
>
>
Why isn't the corresponding target always passed to the Tcl event handler
(in target_handle_event)? Seems like a handler would always need that if
it's doing more than echoing something.
Odd... How does the current handlers work if there's more than one target?
I.e. those that simply do mww etc. in the handler. Is the "current target"
somehow always pointing to the relevant target when the handler is
executing? If yes, well you could use that, if not then all stock handlers
are broken.
/Andreas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel