This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Add options to skip unavailable locals
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, <gdb-patches at sourceware dot org>
- Date: Thu, 1 Aug 2013 21:59:06 +0800
- Subject: Re: [PATCH 2/2] Add options to skip unavailable locals
- References: <1372816106-15942-1-git-send-email-yao at codesourcery dot com> <1372816106-15942-3-git-send-email-yao at codesourcery dot com> <83vc4ra1ps dot fsf at gnu dot org> <51EC8CCE dot 7020007 at codesourcery dot com> <51FA557F dot 5 at redhat dot com>
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 (éå)