disas: include an optional note for the start of disassembly

This will become useful shortly for providing more information about
output assembly inline. While there fix up the indenting and code
formatting in disas().

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Message-Id: <20200513175134.19619-9-alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée 2020-05-13 18:51:32 +01:00
parent 6a7aa856c5
commit e5ef4ec28b
5 changed files with 17 additions and 11 deletions

View file

@ -56,13 +56,13 @@ static inline void log_target_disas(CPUState *cpu, target_ulong start,
rcu_read_unlock();
}
static inline void log_disas(void *code, unsigned long size)
static inline void log_disas(void *code, unsigned long size, const char *note)
{
QemuLogFile *logfile;
rcu_read_lock();
logfile = atomic_rcu_read(&qemu_logfile);
if (logfile) {
disas(logfile->fd, code, size);
disas(logfile->fd, code, size, note);
}
rcu_read_unlock();
}