Re: [PATCH 2/2] Add options to skip unavailable locals

Yao Qi
2013-08-01T13:59:55Z

On 08/01/2013 08:33 PM, Pedro Alves wrote:
>> + if (skip_unavailable
>> >+ && (value_entirely_unavailable (val)
>> >+ /* A scalar object that does not have all bits
>> >+ available is also considered unavailable,
>> >+ because all bits contribute to its
>> >+ representation. */
>> >+ || (val_print_scalar_type_p (value_type (val))
>> >+ && !value_bytes_available (val,
>> >+ value_embedded_offset (val),
>> >+ TYPE_LENGTH (value_type (val))))))
>> >+ ;
>> >+ else
> I don't think this has been updated right for entry values. With
> entry values, we now have_two_ values to account for. I think
> we need to do this once for each of the regular arg and the
> entry arg?
>

OK, will update the patch to handle both regular arg and entry value.

Is it possible that one is available and the other is not? If yes,
when option '--skip-unavailable' is used, some thing we have to think about,

1. if regular arg is available but entry is unavailable, like this,

{name="j",type="int",value="4"},{name="j@entry",type="int",value="<unavailable>"}

what is the expected output? how about displaying regular arg only as
it is available? like:

{name="j",type="int",value="4"}

2. if entry is available but regular arg is not, like this,

{name="j",type="int",value="<unavailable>"},{name="j@entry",type="int",value="4"}

what is the expected output? how about displaying entry value only as it
is available? like:

{name="j@entry",type="int",value="4"}

--
Yao (é½å°§)