public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Modifying the register window
@ 2004-10-18 18:17 Hermann-Simon Lichte
  2004-10-18 18:25 ` Duane Ellis
  2004-10-18 18:34 ` Keith Seitz
  0 siblings, 2 replies; 3+ messages in thread
From: Hermann-Simon Lichte @ 2004-10-18 18:17 UTC (permalink / raw)
  To: insight

Hello mailing list,

I would like to modify Insight's register window in a way such that
additional SPRs of a specific PowerPC CPU can be viewed there. E.g. the IBM
PowerPC 405 provides several SPRs which are not available in Insight by
default.

Could somebody please give me a little hint so that I know which source
files of Insight are involved? I am willing to work it out myself, but since
I'd never worked with the sources before, I just need a little push in the
right direction from an experienced person. Maybe there are some things to
look out for which aren't that obvious to a newbie.

Thank you very much!
Hermann


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

* Re: Modifying the register window
  2004-10-18 18:17 Modifying the register window Hermann-Simon Lichte
@ 2004-10-18 18:25 ` Duane Ellis
  2004-10-18 18:34 ` Keith Seitz
  1 sibling, 0 replies; 3+ messages in thread
From: Duane Ellis @ 2004-10-18 18:25 UTC (permalink / raw)
  To: gem; +Cc: insight


>> I would like to modify Insight's register window in a way such that
   additional SPRs of a specific PowerPC CPU can be viewed
   there. E.g. the IBM PowerPC 405 provides several SPRs which are not
   available in Insight by default.

1) Are these registers presently know by GDB.

   Remember - Insight - like others (ie: DDD) is a wrapper 
   ontop of GDB. 

   Thus, GDB must first know how to get them. 
   
   For those questions - you should ask on the GDB mailing list, not
   the insight mailing list.

   This might also be a limitation of your target operating system,
   and/or target, or - if you are using a JTAG box (embedded system)
   it might not make these registers available to GDB.

2) Once the registers are present in GDB...  then it's a matter of
   attacking the Tcl/Tk Window.  Look at

      ${INSIGHT_SOURCE}/gdb/gdbtk/library/regwin.*

   It is my understanding that there is nothing in
   the tcl/tk stuff that is PowerPPC specific.

-Duane.

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

* Re: Modifying the register window
  2004-10-18 18:17 Modifying the register window Hermann-Simon Lichte
  2004-10-18 18:25 ` Duane Ellis
@ 2004-10-18 18:34 ` Keith Seitz
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2004-10-18 18:34 UTC (permalink / raw)
  To: Hermann-Simon Lichte; +Cc: insight

On Mon, 2004-10-18 at 11:17, Hermann-Simon Lichte wrote:
> Could somebody please give me a little hint so that I know which source
> files of Insight are involved? I am willing to work it out myself, but since
> I'd never worked with the sources before, I just need a little push in the
> right direction from an experienced person. Maybe there are some things to
> look out for which aren't that obvious to a newbie.

As someone just mentioned, if GDB doesn't know about your SPRs, Insight
hasn't a hope. Ask on the gdb list for help on that. Once all that is
available, you can start hacking the code to add GUI support for your
new registers.

If the registers show up in "info all" or something, odds are you don't
need to worry about it at all. The register window will automatically
display them.

Anyway, if you get that far, send the list another note and I'll write
up a little thing about coding caveats. I'll mention the most important
two, just in case:

1) Your c code must never allow gdb to longjmp. ALL calls from
gdbtk-land must use some sort of call wrapper to prevent this:
gdbtk_call_wrapper (for adding tcl commands to the interpreter) and
catch_errors or catch_exceptions for other gdb function calls.

2) Your tcl code should be mindful of the primary state events: busy,
update, idle. [If you are tweaking an existing window, this probably
isn't necessary.] See src/gdb/gdbtk/library/gdbevent.ith for
information.

Keith

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

end of thread, other threads:[~2004-10-18 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-18 18:17 Modifying the register window Hermann-Simon Lichte
2004-10-18 18:25 ` Duane Ellis
2004-10-18 18:34 ` 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).