This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 2nd try] tell in which register a register var is loaded.
- From: Pierre Muller <muller at cerbere dot u-strasbg dot fr>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 28 Nov 2001 16:52:17 +0100
- Subject: Re: [RFA 2nd try] tell in which register a register var is loaded.
- References: <email@example.com>
At 04:37 28/11/2001 , Andrew Cagney a écrit:
>>This patch superseeds the previous one,
>>the lval_reg_frame_relative case was not handled correctly there.
>>Still no idea who should give an approval for this patch ?
>No one else did so ...
>>2001-11-20 Pierre Muller <firstname.lastname@example.org>
>> * findvar.c (locate_var_value): specify in which register a register
>> variable is stored.
>Don't forget to ucase ``specify''.
>Hmm, can REGISTER_NAME (num) ever be invalid or is this just being careful?
>If the latter then can I suggest an assertion vis:
> gdb_assert (REGISTER_NAME (...) != NULL
> && *REGISTER_NAME (...) != '\0');
>If the former then the test will need to be tweeked to check for both NULL and '\0'.
Looking at different places where REGISTER_NAME is used, it seems to be
almost always assumed that it is valid, so I will probably simply remove the check.
>I don't think the ``$'' prefix is consistent with existing code - based mainly on a quick grep that didn't reveal any code doing this. (I don't actually have anything agains the convention though - just a separate change :-)
Look at tracepoint.c around line 2380 in function scope_info
and you will find lots of GDB code using printf_filtered("... in register $%s",REGISTER_NAME(...))
>Otherwize, yes, a much more helpful error message.
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99