aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/simops.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-30 02:05:33 -0400
committerMike Frysinger <vapier@gentoo.org>2015-03-30 02:20:23 -0400
commit541ebcee679ccda568b49af01b1da74387623386 (patch)
tree7cab77675c45ca3a0883ee8a0f042c6c95fb1f08 /sim/d10v/simops.c
parenta87686e5aa57d86a86b6deac8b4d47a86c69c950 (diff)
downloadgdb-541ebcee679ccda568b49af01b1da74387623386.zip
gdb-541ebcee679ccda568b49af01b1da74387623386.tar.gz
gdb-541ebcee679ccda568b49af01b1da74387623386.tar.bz2
sim: d10v: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling. The sim_size support needs unwinding at some point. But at least this is an improvement on the status quo.
Diffstat (limited to 'sim/d10v/simops.c')
-rw-r--r--sim/d10v/simops.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index e26770c..2c457bb 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -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;