]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: remove unused argument from builtin_disassemble
authorAndrew Burgess <aburgess@redhat.com>
Sat, 15 Mar 2025 12:03:50 +0000 (12:03 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Sat, 15 Mar 2025 17:12:12 +0000 (17:12 +0000)
commitd21f28a067e94e0ab6548d97f650c14be76bfbde
tree6603df8f01416181eaa7f0a451495de5aa18abab
parent8bfe8a6bfdd45de43c626a12fd176750486a0759
gdb/python: remove unused argument from builtin_disassemble

This commit:

  commit 15e15b2d9cd3b1db68f99cd3b047352142ddfd1c
  Date:   Fri Sep 17 18:12:34 2021 +0100

      gdb/python: implement the print_insn extension language hook

added the gdb.disassembler.builtin_disassemble Python API function.
By mistake, the implementation accepted two arguments, the second
being a "memory_source".

However, this second argument was never used, it was left over from an
earlier proposed version of the API.

Luckily, the only place the unused argument was documented was in the
NEWS file and in the output of `help(gdb.builtin_disassemble)`, and
neither of these locations really describe what the argument was, or
how it would be used.  The manual only describes the first (actually
used) argument, so I think we are safe enough to delete the unused
argument.

This allows some additional cleanup, with the store for the argument
also being deleted.

As the NEWS file did originally document the second argument, I have
added a NEWS entry to explain the argument has now been removed.

This could potentially break users code if they somehow decided to
pass a second argument, however, fixing things is as simple as
removing the second (unused) argument.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/NEWS
gdb/python/py-disasm.c