<NishanthMenon_>
target configure -event gdb-attach func -> I want the function to get a parameter.. any idea what maybe the best way to do that?
<Hawk777>
What value do you expect to be passed in the parameter?
<NishanthMenon_>
Hawk777, my SoC has a few R5s, defered examine.. am654.cpu.r5.0 configure -event gdb-attach { puts "am654.cpu.r5.0"}
<Hawk777>
NishanthMenon_: So, do you mean that you want a way to get the name of the relevant target inside the handler?
<NishanthMenon_>
Hawk777, correct.
<NishanthMenon_>
trying to maintain a single function that does similar stuff based on just the target it was involed on.. (there are some 4 or so of the R5s)
<Hawk777>
NishanthMenon_: OK, I see. The “current target” while an event handler is running is always the target where the event occurred (it temporarily overrides the current target selected via e.g. Telnet).
<Hawk777>
“target current” should return the name, if you need to do something else with that.
<Hawk777>
For example I think you could do something like [target current] mww 1234 5678
<Hawk777>
Though since mww defaults to the current target, that would be redundant.