public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Adding buttons to the Source window toolbar.
@ 2008-01-10 18:01 McCabe, John (UK)
  2008-01-16 17:39 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: McCabe, John (UK) @ 2008-01-10 18:01 UTC (permalink / raw)
  To: insight

Dear All,

I've had a look for some information on this on the net, but I haven't
found much that helps me and, knowing little (if anything!) of Tcl/Tk
and incr-Tk I'm a bit lost. I hope this hasn't been asked too many times
before; I didn't find an answer in the archives!

Anyway, on to the question:

We are using GDB/Insight (well, sde-insight, it's a MIPS based system)
for debugging. We've found an issue with our configuration that causes
us problems when stepping through code, but we believe we can work
round it by disabling interrupts round the steps. We can do this from
the console in Insight, but it would be nice to add extra buttons on
the source window to do this. The thing is, none of us here have much
experience of Tcl/Tk (or incr-Tcl) so we're not sure how to go about
it. We do realise we need to add some stuff into srcbar.itcl in the
create_control_buttons{} function, but we're not sure what we need to
put in there.

Essentially what we want to do in response to pressing the new button
is:

call TCT_Control_Interrupts(0x8000)
next
call TCT_Control_Interrupts(0xff00)

(where TCT_Control_Interrups() is a Nucleus function).

If anyone has done anything similar, or knows what we should be
looking for in the tcl code, please let me know. It will be greatly
appreciated.


John McCabe
Software Developer
EMS SatCom UK Ltd
Green Lane
Ashchurch
Tewkesbury
Gloucestershire
GL20 8HD

Tel  : +44 1684 290020 x146
Email: mccabe.j@emssatcom.com
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Adding buttons to the Source window toolbar.
  2008-01-10 18:01 Adding buttons to the Source window toolbar McCabe, John (UK)
@ 2008-01-16 17:39 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2008-01-16 17:39 UTC (permalink / raw)
  To: McCabe, John (UK); +Cc: insight

McCabe, John (UK) wrote:
> Essentially what we want to do in response to pressing the new button
> is:
> 
> call TCT_Control_Interrupts(0x8000)
> next
> call TCT_Control_Interrupts(0xff00)
> 
> (where TCT_Control_Interrups() is a Nucleus function).

Yeah, this should be possible. Unfortunately, adding buttons to the 
source window toolbar is not supported by our plugin architecture, so 
you'll have to hack the source window source code directly.

You can add a button by modifying the code in srcbar.itcl, method 
"create_buttons". Just follow the examples there. If you run into any 
problems, just let me know (via the list).

Keith

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-16 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 18:01 Adding buttons to the Source window toolbar McCabe, John (UK)
2008-01-16 17:39 ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).