gdb: make disassembler fprintf callback a static member function

The disassemble_info structure has four callbacks, we have three of
them as static member functions within gdb_disassembler, the fourth is
just a global static function.

However, this fourth callback, is still only used from the
disassemble_info struct, so there's no real reason for its special
handling.

This commit makes fprintf_disasm a static method within
gdb_disassembler.

There should be no user visible changes after this commit.
This commit is contained in:
Andrew Burgess
2021-10-13 18:18:12 +01:00
parent c628f812eb
commit 431be556b0
2 changed files with 18 additions and 16 deletions

View File

@@ -82,6 +82,9 @@ private:
non-memory error. */
gdb::optional<CORE_ADDR> m_err_memaddr;
static int dis_asm_fprintf (void *stream, const char *format, ...)
ATTRIBUTE_PRINTF(2,3);
static int dis_asm_read_memory (bfd_vma memaddr, gdb_byte *myaddr,
unsigned int len,
struct disassemble_info *info);