public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [commit] Update insight for MAX_REGISTER_SIZE
@ 2003-05-08 23:32 Andrew Cagney
  2003-05-09  1:31 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2003-05-08 23:32 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

FYI, this should fix the build problem with *REGISTER*SIZE.

committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2167 bytes --]

2003-05-08  Andrew Cagney  <cagney@redhat.com>

	* generic/gdbtk-register.c (get_register): Replace
	MAX_REGISTER_VIRTUAL_SIZE and MAX_REGISTER_RAW_SIZE with
	MAX_REGISTER_SIZE.
	(register_changed_p, setup_architecture_data): Ditto.

Index: generic/gdbtk-register.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.17
diff -u -r1.17 gdbtk-register.c
--- generic/gdbtk-register.c	25 Mar 2003 01:03:42 -0000	1.17
+++ generic/gdbtk-register.c	8 May 2003 23:11:50 -0000
@@ -265,8 +265,8 @@
   CORE_ADDR addr;
   enum lval_type lval;
   struct type *reg_vtype;
-  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
-  char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+  char raw_buffer[MAX_REGISTER_SIZE];
+  char virtual_buffer[MAX_REGISTER_SIZE];
   int optim, format;
   struct cleanup *old_chain = NULL;
   struct ui_file *stb;
@@ -439,19 +439,19 @@
 static void
 register_changed_p (int regnum, void *argp)
 {
-  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+  char raw_buffer[MAX_REGISTER_SIZE];
 
   if (deprecated_selected_frame == NULL
       || !frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
     return;
 
-  if (memcmp (&old_regs[regnum * MAX_REGISTER_RAW_SIZE], raw_buffer,
+  if (memcmp (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
 	      REGISTER_RAW_SIZE (regnum)) == 0)
     return;
 
   /* Found a changed register.  Save new value and return its number. */
 
-  memcpy (&old_regs[regnum * MAX_REGISTER_RAW_SIZE], raw_buffer,
+  memcpy (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
 	  REGISTER_RAW_SIZE (regnum));
 
   Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (regnum));
@@ -464,7 +464,7 @@
   xfree (regformat);
   xfree (regtype);
 
-  old_regs = xcalloc (1, (NUM_REGS + NUM_PSEUDO_REGS) * MAX_REGISTER_RAW_SIZE + 1);
+  old_regs = xcalloc (1, (NUM_REGS + NUM_PSEUDO_REGS) * MAX_REGISTER_SIZE + 1);
   regformat = (int *)xcalloc ((NUM_REGS + NUM_PSEUDO_REGS) , sizeof(int));
   regtype = (struct type **)xcalloc ((NUM_REGS + NUM_PSEUDO_REGS), sizeof(struct type **));
 }

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

* Re: [commit] Update insight for MAX_REGISTER_SIZE
  2003-05-08 23:32 [commit] Update insight for MAX_REGISTER_SIZE Andrew Cagney
@ 2003-05-09  1:31 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2003-05-09  1:31 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: insight

On Thu, 2003-05-08 at 16:32, Andrew Cagney wrote:
> FYI, this should fix the build problem with *REGISTER*SIZE.
> 
> committed,

Thanks! I was just about to take a look at this, too. Cool!

Keith

> 2003-05-08  Andrew Cagney  <cagney@redhat.com>
> 
> 	* generic/gdbtk-register.c (get_register): Replace
> 	MAX_REGISTER_VIRTUAL_SIZE and MAX_REGISTER_RAW_SIZE with
> 	MAX_REGISTER_SIZE.
> 	(register_changed_p, setup_architecture_data): Ditto.
> 


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

end of thread, other threads:[~2003-05-09  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 23:32 [commit] Update insight for MAX_REGISTER_SIZE Andrew Cagney
2003-05-09  1:31 ` 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).