This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: cli/1815: GDB can crash with overridden "down" command
- From: Tom Tromey <tromey at redhat dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 23 Sep 2008 00:18:01 -0000
- Subject: Re: cli/1815: GDB can crash with overridden "down" command
- Reply-to: Tom Tromey <tromey at redhat dot com>
The following reply was made to PR cli/1815; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: cli/1815: GDB can crash with overridden "down" command
Date: Mon, 22 Sep 2008 18:16:27 -0600
The problem here is that 'do' is an alias for 'down' and points to the
struct cmd_list_element for 'down'. However, when defining the new
'down', that cmd_list_element is freed.
One fix would be to add reference counting to struct cmd_list_element.
This approach would cause 'do' to remain an alias for the original
'down'... I'm not sure this is the best UI.
Tom