Add PowerPC64 ld --tls-get-addr-optimize.
[deliverable/binutils-gdb.git] / gdb / record-btrace.c
index 6f4ee669422c0757259e4e8bd55f34bc62ce30fa..9e16ab412dfef3a7a63ed766dac45568361e3465 100644 (file)
@@ -567,14 +567,35 @@ btrace_insn_history (struct ui_out *uiout,
        }
       else
        {
+         char prefix[4];
+
+         /* We may add a speculation prefix later.  We use the same space
+            that is used for the pc prefix.  */
+         if ((flags & DISASSEMBLY_OMIT_PC) == 0)
+           strncpy (prefix, pc_prefix (insn->pc), 3);
+         else
+           {
+             prefix[0] = ' ';
+             prefix[1] = ' ';
+             prefix[2] = ' ';
+           }
+         prefix[3] = 0;
+
          /* Print the instruction index.  */
          ui_out_field_uint (uiout, "index", btrace_insn_number (&it));
          ui_out_text (uiout, "\t");
 
+         /* Indicate speculative execution by a leading '?'.  */
+         if ((insn->flags & BTRACE_INSN_FLAG_SPECULATIVE) != 0)
+           prefix[0] = '?';
+
+         /* Print the prefix; we tell gdb_disassembly below to omit it.  */
+         ui_out_field_fmt (uiout, "prefix", "%s", prefix);
+
          /* Disassembly with '/m' flag may not produce the expected result.
             See PR gdb/11833.  */
-         gdb_disassembly (gdbarch, uiout, NULL, flags, 1, insn->pc,
-                          insn->pc + 1);
+         gdb_disassembly (gdbarch, uiout, NULL, flags | DISASSEMBLY_OMIT_PC,
+                          1, insn->pc, insn->pc + 1);
        }
     }
 }
@@ -1722,7 +1743,7 @@ record_btrace_start_replaying (struct thread_info *tp)
 
       /* We start replaying at the end of the branch trace.  This corresponds
         to the current instruction.  */
-      replay = xmalloc (sizeof (*replay));
+      replay = XNEW (struct btrace_insn_iterator);
       btrace_insn_end (replay, btinfo);
 
       /* Skip gaps at the end of the trace.  */
This page took 0.024344 seconds and 4 git commands to generate.