Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* z8k simulator broken
@ 2003-01-15  4:28 Daniel Jacobowitz
  2003-01-15  4:46 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-01-15  4:28 UTC (permalink / raw)
  To: Alan Modra; +Cc: gdb

Did you ever get a chance to look at the z8k sim problem?  It seems that the
problem is that it uses the idx to generate the names of functions, but your
changes to "Generate idx as gas needs it" broke that.

Here's what I'm using; it builds, but I haven't really tested the simulator
yet.  Someone tell me again why I'm doing this?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

Index: writecode.c
===================================================================
RCS file: /cvs/src/src/sim/z8k/writecode.c,v
retrieving revision 1.3
diff -u -p -r1.3 writecode.c
--- writecode.c	6 Jun 2002 15:50:50 -0000	1.3
+++ writecode.c	15 Jan 2003 04:27:10 -0000
@@ -187,7 +187,7 @@ lookup_inst (what)
 	    }
 	  if (nibl_matched)
 	    {
-	      z8k_inv_list[what] = ptr->idx;
+	      z8k_inv_list[what] = ptr - z8k_table;
 	      break; /* while */
 	    }
 	  ptr++;
@@ -1550,7 +1550,7 @@ mangle (p, shortcut, value)
     }
   else
     {
-      emit ("int <fop>_%d(context,pc,iwords0)\n", p->idx);
+      emit ("int <fop>_%d(context,pc,iwords0)\n", p - z8k_table);
       emit ("int iwords0;\n");
     }
   emit ("sim_state_type *context;\n");
@@ -1668,7 +1668,7 @@ build_list (i)
 
   if (!p)
     return;
-  add_to_list (&list[p->idx], i);
+  add_to_list (&list[p - z8k_table], i);
 }
 
 int
@@ -1807,7 +1807,7 @@ main (ac, av)
 #endif
 	  if (p != NULL)
 	    {
-	      printf ("%d", p->idx);
+	      printf ("%d", p - z8k_table);
 	    }
 	  else
 	    printf ("400");


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

end of thread, other threads:[~2003-01-15 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15  4:28 z8k simulator broken Daniel Jacobowitz
2003-01-15  4:46 ` Alan Modra
2003-01-15 14:55   ` Daniel Jacobowitz
2003-01-15 16:09     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox