Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Alan Modra <amodra@bigpond.net.au>
Cc: gdb@sources.redhat.com
Subject: z8k simulator broken
Date: Wed, 15 Jan 2003 04:28:00 -0000	[thread overview]
Message-ID: <20030115042818.GA17532@nevyn.them.org> (raw)

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");


             reply	other threads:[~2003-01-15  4:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-15  4:28 Daniel Jacobowitz [this message]
2003-01-15  4:46 ` Alan Modra
2003-01-15 14:55   ` Daniel Jacobowitz
2003-01-15 16:09     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030115042818.GA17532@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=amodra@bigpond.net.au \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox