[cagney_convert-20030606-branch] Add value to REGISTER_TO_VALUE et.al.

Andrew Cagney ac131313@redhat.com
Mon Jun 9 00:22:00 GMT 2003


> And what do these functions do if the register is unavailable in a
> certain frame?  That shouldn't happen if we have complete debug
> information, but unfortunately we almost certainly don't have that.
> Should this be reported to the user or not?  Should we set
> VALUE_OPTIMIZED_OUT, just as we do for registers that don't need
> conversion?  If so, we probably need a return value that indicates
> whether the conversion was successfull.

I've got into the habit of ignoring OPTIMIZED_OUT, for registers it's 
always cleared (well ignoring the recent CFI stuff).  It was added 
between 3.5 and 3.93 but for no apparent reason (at least for 
registers).  The ChangeLog's are not very enlightenting and this 
pre-dates Cygnus CVS.

Anyway, the question of what to do when the register's value can't be 
found has been largely ignored.  I'm thinking that throwing an error 
would be a safer strategy - there is too much code ignoring register 
fetches and I don't think we're going to be auditing it soon.

Andrew




More information about the Gdb-patches mailing list