sim: d10v: convert to nrun
[deliverable/binutils-gdb.git] / sim / d10v / simops.c
index e26770c82eb6783af66e17db2af6c903d5c79b91..2c457bb558171f3511d4c3a413acb98b8334a9f0 100644 (file)
@@ -11,7 +11,7 @@
 #include <string.h>
 #endif
 
-#include "d10v_sim.h"
+#include "sim-main.h"
 #include "simops.h"
 #include "targ-vals.h"
 
@@ -193,14 +193,21 @@ trace_input_func (const char *name, enum op_types in1, enum op_types in2, enum o
 
   else
     {
+      extern SIM_DESC trace_sd;
+
       buf[0] = '\0';
-      byte_pc = decode_pc ();
-      if (text && byte_pc >= text_start && byte_pc < text_end)
+      byte_pc = PC;
+      if (STATE_TEXT_SECTION (trace_sd)
+         && byte_pc >= STATE_TEXT_START (trace_sd)
+         && byte_pc < STATE_TEXT_END (trace_sd))
        {
          filename = (const char *)0;
          functionname = (const char *)0;
          linenumber = 0;
-         if (bfd_find_nearest_line (prog_bfd, text, (struct bfd_symbol **)0, byte_pc - text_start,
+         if (bfd_find_nearest_line (STATE_PROG_BFD (trace_sd),
+                                    STATE_TEXT_SECTION (trace_sd),
+                                    (struct bfd_symbol **)0,
+                                    byte_pc - STATE_TEXT_START (trace_sd),
                                     &filename, &functionname, &linenumber))
            {
              p = buf;
This page took 0.022863 seconds and 4 git commands to generate.