• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂602a67cbeaf6b42bc513a873aec82e53235b8754 (tree)
時間2015-06-25 00:10:30
作者Mike Frysinger <vapier@gent...>
CommiterMike Frysinger

Log Message

sim: trace: drop unused trace_one_insn

Everyone has migrated to the split functions (trace_prefix + trace_generic)
a while ago, so we can drop this one now.

Change Summary

差異

--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,10 @@
11 2015-06-24 Mike Frysinger <vapier@gentoo.org>
22
3+ * sim-trace.c (trace_one_insn): Delete.
4+ * sim-trace.h (trace_one_insn): Delete.
5+
6+2015-06-24 Mike Frysinger <vapier@gentoo.org>
7+
38 * sim-trace.c (debug_printf): Rename to ...
49 (sim_debug_printf): ... this.
510 * sim-trace.h (debug_printf): Delete define.
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -1218,91 +1218,6 @@ trace_vprintf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, va_list ap)
12181218 }
12191219 }
12201220
1221-/* The function trace_one_insn has been replaced by the function pair
1222- trace_prefix() + trace_generic(). It is still used. */
1223-void
1224-trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
1225- int line_p, const char *filename, int linenum,
1226- const char *phase_wo_colon, const char *fmt,
1227- ...)
1228-{
1229- va_list ap;
1230- char phase[SIZE_PHASE+2];
1231-
1232- strncpy (phase, phase_wo_colon, SIZE_PHASE);
1233- strcat (phase, ":");
1234-
1235- if (!line_p)
1236- {
1237- trace_printf (sd, cpu, "%-*s %s:%-*d 0x%.*lx ",
1238- SIZE_PHASE+1, phase,
1239- filename,
1240- SIZE_LINE_NUMBER, linenum,
1241- SIZE_PC, (long)pc);
1242- va_start (ap, fmt);
1243- trace_vprintf (sd, cpu, fmt, ap);
1244- va_end (ap);
1245- trace_printf (sd, cpu, "\n");
1246- }
1247- else
1248- {
1249- char buf[256];
1250-
1251- buf[0] = 0;
1252- if (STATE_TEXT_SECTION (CPU_STATE (cpu))
1253- && pc >= STATE_TEXT_START (CPU_STATE (cpu))
1254- && pc < STATE_TEXT_END (CPU_STATE (cpu)))
1255- {
1256- const char *pc_filename = (const char *)0;
1257- const char *pc_function = (const char *)0;
1258- unsigned int pc_linenum = 0;
1259-
1260- if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)),
1261- STATE_TEXT_SECTION (CPU_STATE (cpu)),
1262- (struct bfd_symbol **) 0,
1263- pc - STATE_TEXT_START (CPU_STATE (cpu)),
1264- &pc_filename, &pc_function, &pc_linenum))
1265- {
1266- char *p = buf;
1267- if (pc_linenum)
1268- {
1269- sprintf (p, "#%-*d ", SIZE_LINE_NUMBER, pc_linenum);
1270- p += strlen (p);
1271- }
1272- else
1273- {
1274- sprintf (p, "%-*s ", SIZE_LINE_NUMBER+1, "---");
1275- p += SIZE_LINE_NUMBER+2;
1276- }
1277-
1278- if (pc_function)
1279- {
1280- sprintf (p, "%s ", pc_function);
1281- p += strlen (p);
1282- }
1283- else if (pc_filename)
1284- {
1285- char *q = (char *) strrchr (pc_filename, '/');
1286- sprintf (p, "%s ", (q) ? q+1 : pc_filename);
1287- p += strlen (p);
1288- }
1289-
1290- if (*p == ' ')
1291- *p = '\0';
1292- }
1293- }
1294-
1295- trace_printf (sd, cpu, "%-*s 0x%.*x %-*.*s ",
1296- SIZE_PHASE+1, phase,
1297- SIZE_PC, (unsigned) pc,
1298- SIZE_LOCATION, SIZE_LOCATION, buf);
1299- va_start (ap, fmt);
1300- trace_vprintf (sd, cpu, fmt, ap);
1301- va_end (ap);
1302- trace_printf (sd, cpu, "\n");
1303- }
1304-}
1305-
13061221 void
13071222 trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
13081223 {
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -618,19 +618,6 @@ do { \
618618 } while (0)
619619
620620
621-/* The function trace_one_insn has been replaced by the function pair
622- trace_prefix() + trace_generic() */
623-extern void trace_one_insn (SIM_DESC sd,
624- sim_cpu * cpu,
625- address_word cia,
626- int print_linenum_p,
627- const char *file_name,
628- int line_nr,
629- const char *unit,
630- const char *fmt,
631- ...)
632- __attribute__((format (printf, 8, 9)));
633-
634621 extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...)
635622 __attribute__((format (printf, 3, 4)));
636623