mi -var-create does not clear the 'value stack' all_values.

Andrew Cagney cagney@gnu.org
Tue Aug 24 20:10:00 GMT 2004


> 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




More information about the Gdb mailing list