mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-10 21:35:27 +00:00
qemu-log: new option -dfilter to limit output
When debugging big programs or system emulation sometimes you want both the verbosity of cpu,exec et all but don't want to generate lots of logs for unneeded stuff. This patch adds a new option -dfilter which allows you to specify interesting address ranges in the form: -dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,... Then logging code can use the new qemu_log_in_addr_range() function to decide if it will output logging information for the given range. Backports commit 3514552e04388d8e7686bcf89efd022e892acb5b from qemu
This commit is contained in:
parent
b895ae38a9
commit
2d401b6f23
|
@ -123,4 +123,7 @@ static inline void qemu_log_close(void)
|
|||
}
|
||||
}
|
||||
|
||||
void qemu_set_dfilter_ranges(const char *ranges);
|
||||
bool qemu_log_in_addr_range(uint64_t addr);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,3 +34,17 @@ void qemu_log(const char *fmt, ...)
|
|||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/* Returns true if addr is in our debug filter or no filter defined
|
||||
*/
|
||||
bool qemu_log_in_addr_range(uint64_t addr)
|
||||
{
|
||||
// Unicorn: stubbed
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void qemu_set_dfilter_ranges(const char *filter_spec)
|
||||
{
|
||||
// Unicorn: stubbed
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue