public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Adding Registers
@ 2002-02-12  6:27 David Mc Kenna
  2002-02-12  7:17 ` Duane Ellis
  0 siblings, 1 reply; 10+ messages in thread
From: David Mc Kenna @ 2002-02-12  6:27 UTC (permalink / raw)
  To: insight

Hi,

Is it possible to add extra registers to gdb that link to a memory address,
eg R0 links to 0x00h ? If so how can I add another register, eg R20 to 0x016h,
to be displayed in the register window of Insight?

Thanks,
Dave Mc Kenna


--
http://www.iol.ie

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Adding Registers
@ 2002-02-13  3:40 David Mc Kenna
  2002-02-13  6:49 ` Duane Ellis
  2002-02-13 10:05 ` Andrew Cagney
  0 siblings, 2 replies; 10+ messages in thread
From: David Mc Kenna @ 2002-02-13  3:40 UTC (permalink / raw)
  To: Andrew Cagney, Keith Seitz, mckennad, insight

Thanks for the help.

Just one or two more questions.

I have modified tm-arm.h from

#define NUM_GREGS	16	/* Number of general purpose registers.  */

to

#define NUM_GREGS	18	/* Number of general purpose registers.  */

This increases the number of registers that is seen by GDB/Inishgt by 2.

I have modified arm-tdep.c from

"fps", "cpsr"}; 		/* 24 25 26 27     */ 

to

"fps", "cpsr", "r13" , "r14" }; 		/* 24 25 26 27    
 */  /*Modified by David
McKenna */

I have recompilied Insight/GDB with no problems and the new registers appear

in the Register window.

I have tried looking for the function target_fetch/store_registers() but I am

unable to locate it in any C file. I am assuming that this is where you define

what memory location you want the registers to look at. 

If possible could you point me in the right direction,

Thanks,
Dave Mc Kenna
--
http://www.iol.ie

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Adding Registers
@ 2002-02-14  4:32 David Mc Kenna
  2002-02-14  7:03 ` Duane Ellis
  0 siblings, 1 reply; 10+ messages in thread
From: David Mc Kenna @ 2002-02-14  4:32 UTC (permalink / raw)
  To: Andrew Cagney, mckennad, Keith Seitz, insight

Thanks for the help.

A few more questions. Andrew refers to the internal number of each register.
I am dealing with a memory mapped register and as such it has no number, how
is this dealt with in the functions.

Also I have not found were the registers are written, I have gotten as far as


void
gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
{
  if (gdbarch->register_write == 0)
    internal_error (__FILE__, __LINE__,
                    "gdbarch: gdbarch_register_write invalid");
  if (gdbarch_debug >= 2)
    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
  gdbarch->register_write (gdbarch, regnum, buf);
}

from gdbarch.c .

Were do I go from here?

Any help is greatly appreciated,
Dave Mc Kenna
--
http://www.iol.ie

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

end of thread, other threads:[~2002-02-14 15:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-12  6:27 Adding Registers David Mc Kenna
2002-02-12  7:17 ` Duane Ellis
2002-02-12  8:58   ` Keith Seitz
2002-02-12 19:26     ` Andrew Cagney
2002-02-13  3:40 David Mc Kenna
2002-02-13  6:49 ` Duane Ellis
2002-02-13 10:05 ` Andrew Cagney
2002-02-14  4:32 David Mc Kenna
2002-02-14  7:03 ` Duane Ellis
2002-02-14  7:39   ` Andrew Cagney

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).