aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2021-11-14 16:19:31 +0100
committerHannes Domani <ssbssa@yahoo.de>2023-12-14 16:18:25 +0100
commit1d2f86b6b74e6caae77951353a4c353ce9816374 (patch)
tree18726cba53da75f6b9d1d4fba100dd7071c5f59a /gdbsupport
parent8cb16b68584e14aade8de166c75e1d85e38507bd (diff)
downloadbinutils-1d2f86b6b74e6caae77951353a4c353ce9816374.zip
binutils-1d2f86b6b74e6caae77951353a4c353ce9816374.tar.gz
binutils-1d2f86b6b74e6caae77951353a4c353ce9816374.tar.bz2
Allow calling of variadic C++ functions
Currently, it's not possible to call a variadic C++ function: ``` (gdb) print sum_vararg_int(1, 10) Cannot resolve function sum_vararg_int to any overloaded instance (gdb) print sum_vararg_int(2, 20, 30) Cannot resolve function sum_vararg_int to any overloaded instance ``` It's because all additional arguments get the TOO_FEW_PARAMS_BADNESS rank by rank_function, which disqualifies the function. To fix this, I've created the new VARARG_BADNESS rank, which is used only for additional arguments of variadic functions, allowing them to be called: ``` (gdb) print sum_vararg_int(1, 10) $1 = 10 (gdb) print sum_vararg_int(2, 20, 30) $2 = 50 ``` Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28589 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdbsupport')
0 files changed, 0 insertions, 0 deletions