Skip to content

Commit

Permalink
Use disas_one_str in protobuf backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwattash committed Mar 31, 2023
1 parent 59de746 commit fb7607b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions accel/tcg/log_instr_protobuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static void release_protobuf_event(QEMULogEntryEvt *pb_evt)
g_free(pb_evt);
}

void init_protobuf_backend(CPUArchState *env)
void init_protobuf_backend(CPUArchState *env, const char *trace_logfile)
{
/*
* TODO should handle a separate log file to avoid pollution of the main log
Expand All @@ -266,7 +266,7 @@ void init_protobuf_backend(CPUArchState *env)
*/

if (protobuf_logfile == NULL) {
protobuf_logfile = fopen("qemu-trace.pb", "w+b");
protobuf_logfile = fopen(trace_logfile, "w+b");
}
}

Expand All @@ -293,8 +293,8 @@ void emit_protobuf_entry(CPUArchState *env, cpu_log_entry_t *entry)

if (entry->flags & LI_FLAG_HAS_INSTR_DATA) {
pb_entry.insn_case = ENUM_ENTRY_INSN_CASE(DISAS);
pb_entry.disas = disas_one_strbuf(env_cpu(env), entry->insn_bytes,
sizeof(entry->insn_bytes), entry->pc);
pb_entry.disas = disas_one_str(env_cpu(env), entry->insn_bytes,
sizeof(entry->insn_bytes), entry->pc);
pb_entry.cpu = env_cpu(env)->cpu_index;
pb_entry.asid = entry->asid;
if (entry->flags & LI_FLAG_MODE_SWITCH) {
Expand Down

0 comments on commit fb7607b

Please sign in to comment.