Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Change the Debugger Toolbar on the fly
oBFusCATed:
scarphin:
Hm, pretty random answer, it looks like this feature is not a generic one, so I need particular examples :)
This sounds like a feature request for "custom command buttons/menu items", I'm adding it to the TODO list :)
But I guess to implement the reset button functionality I'll need a resetable board and setup. Which won't happen any time soon... (patches welcome)
e.p:
I am solving my problem creating two toolbars and switching between them. Not really elegant, but it seems to work.
I am glad, my post started such a discussion 8)
While we are at it... I had to modify all dialogs (Registers, Watches, ...). I think it would be useful to make the debugging windows customisable too.
I do not really know a lot of debuggers, but I doubt, that all are providing the same interface and the same functionalities as gdb.
Just a suggestion... I would not know, wehre to put the line between debugger-specific interface and stiff framework.
The reset button: imagine we are controlling a traffic light with a microcontroller.
Three colors --> 2 bits of memory to store the state.
00=red, 01=green, 10=yellow/orange
The program would be something like
--- Code: ---while (true)
if (state == 00)
wait t
state = 01
if (state == 01)
wait t
state = 10
if (state == 10)
wait t
state = 00
end while
--- End code ---
If something goes wrong, we could have state = 11 in the memory. Now you need the reset button. It's like the Ctrl+C under linux :lol:
Edit: of course you can avoid this situation by intelligent programming, but if everything would be perfectly coded, there would be no need for debuggers...
e.p
oBFusCATed:
--- Quote from: e.p on May 27, 2011, 04:14:52 pm ---I am solving my problem creating two toolbars and switching between them. Not really elegant, but it seems to work.
--- End quote ---
Why are you switching? Show them both...
--- Quote from: e.p on May 27, 2011, 04:14:52 pm ---While we are at it... I had to modify all dialogs (Registers, Watches, ...). I think it would be useful to make the debugging windows customisable too.
I do not really know a lot of debuggers, but I doubt, that all are providing the same interface and the same functionalities as gdb.
--- End quote ---
What changes? Esspicially for the watches? What customisation?
Keep in mind that the debuggers could be switched between debugging sessions and the GUI should be able to respond to the change!
--- Quote from: e.p on May 27, 2011, 04:14:52 pm ---Just a suggestion... I would not know, wehre to put the line between debugger-specific interface and stiff framework.
--- End quote ---
Yes, I know, with experience we all learn where to put it. I'm still learning :)
--- Quote from: e.p on May 27, 2011, 04:14:52 pm ---The reset button: imagine we are controlling a traffic light with a microcontroller...
--- End quote ---
OK, I guess this is on the controller, I'm interested what you're doing on the PC's side :)
Alatar:
--- Quote from: oBFusCATed on May 27, 2011, 04:38:49 pm ---OK, I guess this is on the controller, I'm interested what you're doing on the PC's side :)
--- End quote ---
On PC side you are send Reset command to hardware debugger =) Then debugger resets program counter, special registers and etc. on MCU.
e.p:
Hello and sorry for the very late answer
--- Quote from: oBFusCATed on May 27, 2011, 04:38:49 pm ---Why are you switching? Show them both...
--- End quote ---
Good idea. I did it this way.
--- Quote ---What changes? Esspicially for the watches? What customisation?
--- End quote ---
Our watches window is just a table with seven columns: label, value (dec), value (hex), symbol (if watched variable is char), type, address space, base address.
There is no menu.
--- Quote ---OK, I guess this is on the controller, I'm interested what you're doing on the PC's side :)
--- End quote ---
Alatar already ansered this question. Our hardware debugger has a command "reset" which triggers the reset. So, the only thing I do is to issue this command.
Bye
e.p
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version