This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]?Make register_valid_p signed


Le lundi 24 juillet 2006 Ã 15:41 -0400, Daniel Jacobowitz a Ãcrit :
> On Fri, Jul 21, 2006 at 11:15:49PM +0200, FrÃdÃric Riss wrote:
> > The attached patch fixes this by declaring register_valid_p as a signed
> > char array and also adds a comment (partly copied from the
> > register_cached one).
> 
> Oops!  Thank you.  This patch is OK - you have write access, I think?

Thanks! I commited it.

> > While reading the code to find this out, I also noticed a little
> > inconsistency. I don't really think this deserves a fix, but I thought
> > I'd mention it anyway. 
> > Most people are using dwarf2 as debug format today, and with dwarf2
> > symbols in registers are marked as LOC_COMPUTED. The read_var_value
> > function will return NULL when a dwarf2 computed symbol needs access to
> > a register that the target has marked as unavailable (register_valid_p <
> > 0). This will make functions like print_frame_args output something like
> > "my_var=???" for the unavailable var value.
> > Yet if you use another debug format that marks the symbol as
> > LOC_REGISTER, read_var_value will call error() if it can't read the
> > register which is a lot more radical than the above behaviour. 
> 
> You're right, this is a bit strange.  Feel free to fix it if you like;
> otherwise I'm sure it will eventually go away next time that code is
> cleaned up thoroughly.

I you think it's worth it, I'll give it a try once I get some time.
Should just be a matter of some s/error(.*)/return NULL/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]