gdb/disasm: combine the no printing disassembler setup code
authorAndrew Burgess <aburgess@redhat.com>
Fri, 4 Feb 2022 16:51:45 +0000 (16:51 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 7 Feb 2022 09:59:16 +0000 (09:59 +0000)
commit59091b1280b4ba301a2f147fbe51ea4816246ba2
tree81fedf649c177123e8efcd6d14b380765928845b
parent61fb73769a0168afa466bb2245a1a233942203bb
gdb/disasm: combine the no printing disassembler setup code

We have three places in gdb where we initialise a disassembler that
will not print anything (used for figuring out the length of
instructions, or collecting other information from the disassembler).

Each of these places has its own stub function to act as a print like
callback, the stub function is identical in each case, and just does
nothing.

In this commit I create a new function to initialise a disassembler
that doesn't print anything, and have all three locations use this new
function.  There's now only one non-printing stub function.

There should be no user visible changes after this commit.
gdb/arc-tdep.c
gdb/disasm.c
gdb/disasm.h
gdb/s12z-tdep.c