Summary: | gdb.set_parameter doesn't accept a bool where gdb.parameter returns one | ||
---|---|---|---|
Product: | gdb | Reporter: | Dennis Lubert <plasmahh> |
Component: | python | Assignee: | Tom Tromey <tromey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 13.1 | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2022-06-05 00:00:00 |
Description
Dennis Lubert
2022-06-01 12:11:46 UTC
I have a patch for this. The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fa17a6814113ac22d8059d61514aa2c6e29b0aae commit fa17a6814113ac22d8059d61514aa2c6e29b0aae Author: Tom Tromey <tom@tromey.com> Date: Sun Jun 12 11:36:08 2022 -0600 Handle bool specially in gdb.set_parameter PR python/29217 points out that gdb.parameter will return bool values, but gdb.set_parameter will not properly accept them. This patch fixes the problem by adding a special case to set_parameter. I looked at a fix involving rewriting set_parameter in C++. However, this one is simpler. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29217 Fixed. The master branch has been updated by Maciej W. Rozycki <macro@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c506be7d9be55721a44d38782309d8f7fcd5e99e commit c506be7d9be55721a44d38782309d8f7fcd5e99e Author: Maciej W. Rozycki <macro@embecosm.com> Date: Fri Oct 21 08:54:18 2022 +0100 GDB/Python: Make `None' stand for `unlimited' in setting integer parameters Similarly to booleans and following the fix for PR python/29217 make `gdb.parameter' accept `None' for `unlimited' with parameters of the PARAM_UINTEGER, PARAM_INTEGER, and PARAM_ZUINTEGER_UNLIMITED types, as `None' is already returned by parameters of the two former types, so one might expect to be able to feed it back. It also makes it possible to avoid the need to know what the internal integer representation is for the special setting of `unlimited'. Expand the testsuite accordingly. Approved-By: Simon Marchi <simon.marchi@polymtl.ca> |