mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
gdbstub: Add trace events for around XML parsing / generation
Add trace events to help follow how the various files in gdb-xml/ are parsed or generated at runtime. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260310232045.58440-8-philmd@linaro.org Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This commit is contained in:
committed by
Pierrick Bouvier
parent
3b6cf87d42
commit
1e06ef47df
@@ -478,6 +478,10 @@ void gdb_feature_builder_end(const GDBFeatureBuilder *builder)
|
||||
|
||||
builder->feature->num_regs = builder->regs->len;
|
||||
builder->feature->regs = (void *)g_ptr_array_free(builder->regs, FALSE);
|
||||
trace_gdbxml_feature_builder_header(builder->feature->name,
|
||||
builder->feature->xmlname,
|
||||
builder->feature->num_regs);
|
||||
trace_gdbxml_feature_builder_content(builder->feature->xml);
|
||||
}
|
||||
|
||||
const GDBFeature *gdb_find_static_feature(const char *xmlname)
|
||||
@@ -511,6 +515,10 @@ GArray *gdb_get_register_list(CPUState *cpu)
|
||||
name,
|
||||
r->feature->name
|
||||
};
|
||||
trace_gdbxml_get_register_list(r->feature->name,
|
||||
r->feature->xmlname,
|
||||
r->feature->base_reg,
|
||||
r->base_reg + i, name);
|
||||
g_array_append_val(results, desc);
|
||||
}
|
||||
}
|
||||
@@ -563,6 +571,8 @@ static void gdb_register_feature(CPUState *cpu, int base_reg,
|
||||
.feature = feature
|
||||
};
|
||||
|
||||
trace_gdbxml_register_feature(feature->name, feature->xmlname,
|
||||
base_reg, feature->num_regs);
|
||||
g_array_append_val(cpu->gdb_regs, s);
|
||||
}
|
||||
|
||||
@@ -598,6 +608,10 @@ void gdb_init_cpu(CPUState *cpu)
|
||||
} else {
|
||||
cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
|
||||
}
|
||||
|
||||
trace_gdbxml_init_cpu(object_get_typename(OBJECT(cpu)), cpu->cpu_index,
|
||||
cpu->gdb_num_regs, cpu->gdb_num_g_regs,
|
||||
cc->gdb_num_core_regs);
|
||||
}
|
||||
|
||||
void gdb_register_coprocessor(CPUState *cpu,
|
||||
|
||||
@@ -28,5 +28,11 @@ gdbstub_err_checksum_invalid(uint8_t ch) "got invalid command checksum digit: 0x
|
||||
gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command packet with incorrect checksum, expected=0x%02x, received=0x%02x"
|
||||
gdbstub_err_unexpected_runpkt(uint8_t ch) "unexpected packet (0x%02x) while target running"
|
||||
|
||||
gdbxml_init_cpu(const char *typename, unsigned id, unsigned gdb_num_regs, unsigned gdb_num_g_regs, unsigned gdb_num_core_regs) "%s:%d regs:%u g_regs:%u core_regs:%u"
|
||||
gdbxml_register_feature(const char *featname, const char *xmlname, unsigned base_reg, unsigned num_regs) "%s (%s) @%u +%u"
|
||||
gdbxml_feature_builder_header(const char *name, const char *xmlname, int num_regs) "%s (%s) regs:%d"
|
||||
gdbxml_feature_builder_content(const char *xml) "%s"
|
||||
gdbxml_get_register_list(const char *featname, const char *xmlname, unsigned feat_base_reg, unsigned base_reg, const char *regname) "%s (%s) [%u,%u]:%s"
|
||||
|
||||
# system.c
|
||||
gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr) "Watchpoint hit, type=\"%s\" cpu=%d, vaddr=0x%" PRIx64 ""
|
||||
|
||||
Reference in New Issue
Block a user