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]?Mak e register_valid_p signed


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?

> 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.

:REVIEWMAIL:

-- 
Daniel Jacobowitz
CodeSourcery


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