It should be an error to register a pre-existing parameter. E.g., one can't extend a native gdb parameter. And changing the meaning/operation of a pre-existing parameter will just confuse users. I'm not sure Python parameters can be fixed, but Guile parameters can be before 7.8 goes out.
Hi Doug, How long do you think before we have a fix for this?
(In reply to Joel Brobecker from comment #1) > Hi Doug, > > How long do you think before we have a fix for this? Patch is posted here: https://sourceware.org/ml/gdb-patches/2014-07/msg00690.html It can be checked in today IMO.
> Patch is posted here: > https://sourceware.org/ml/gdb-patches/2014-07/msg00690.html > It can be checked in today IMO. Awesome! We don't need to rush this patch just because of the release, but I think I will create the release as soon as this one is in. Thanks, Doug.
On a related topic, One thing I'd like to add is the ability to export native gdb parameters to Scheme. One reason is I'd like to write a function that executes a gdb command with a parameter temporarily set to a specified value. In order to easily do that, i.e., without having to have a lot of parameter-specific code, I want to be able to read and write parameters from Scheme and not using gdb set/show commands. Implementing this will involve a bit of work for parameters that post-process writes. The point of noting this here is that in this case we're not registering a new parameter (using the parlance of "register-parameter!"), just exporting to Scheme an existing one.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 7ebdbe9292e4b696740b021938369adb1484da27 (commit) from 385f635ae0be0077dad606c12118bbe0f886f28f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ebdbe9292e4b696740b021938369adb1484da27 commit 7ebdbe9292e4b696740b021938369adb1484da27 Author: Doug Evans <xdje42@gmail.com> Date: Mon Jul 28 19:20:30 2014 -0700 PR guile/17203 * guile/scm-param.c (pascm_parameter_defined_p): New function. (gdbscm_register_parameter_x): Call it. Raise error for pre-existing parameters. testsuite/ * gdb.guile/scm-parameter.exp: Add tests for trying to create previously existing parameter, and previously ambiguously spelled parameter. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 7 +++++++ gdb/guile/scm-param.c | 27 ++++++++++++++++++++++++++- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.guile/scm-parameter.exp | 28 ++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 1 deletions(-)
(In reply to Sourceware Commits from comment #5) > This is an automated email from the git hooks/post-receive script. It was > generated because a ref change was pushed to the repository containing > the project "gdb and binutils". > > The branch, master has been updated > via 7ebdbe9292e4b696740b021938369adb1484da27 (commit) > from 385f635ae0be0077dad606c12118bbe0f886f28f (commit) > > Those revisions listed above that are new to this repository have > not appeared on any other notification email; so we list those > revisions in full, below. > > - Log ----------------------------------------------------------------- > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git; > h=7ebdbe9292e4b696740b021938369adb1484da27 > > commit 7ebdbe9292e4b696740b021938369adb1484da27 > Author: Doug Evans <xdje42@gmail.com> > Date: Mon Jul 28 19:20:30 2014 -0700 > > PR guile/17203 > > * guile/scm-param.c (pascm_parameter_defined_p): New function. > (gdbscm_register_parameter_x): Call it. Raise error for pre-existing > parameters. Can this be closed?