This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: mi -var-create does not clear the 'value stack' all_values.
- From: Andrew Cagney <cagney at gnu dot org>
- To: Chris Zankel <zankel at tensilica dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 16:08:55 -0400
- Subject: Re: mi -var-create does not clear the 'value stack' all_values.
- References: <410A9EE1.7070301@tensilica.com>
I noticed that the mi command -var-create does not clear the value stack (all_values) before it returns, so any command that follows -var-create and that allocates a new value receives a list of registers that includes those values generated by -var-create.
This could be a problem, for example, in can_use_hardware_watchpoint that walks through the value list looking for any value it cannot watch (registers, for example). If -var-create created such a value (register), any succeeding command that wants to set a watchpoint (-break-watch) would, therefore, fail.
I have to admit, though, that I haven't been able to create such a test case, specifically, I couln't get -var-create to create a value of the type register. Nevertheless, it seems to me that -var-create should clear all_values.
Any comments?
Sounds broken.
Andrew