Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Don Breazeal <donb@codesourcery.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Eliminate -var-create error for optzd ptr to struct
Date: Mon, 04 Apr 2016 17:16:00 -0000	[thread overview]
Message-ID: <5702A166.6090701@codesourcery.com> (raw)
In-Reply-To: <86pou5pseh.fsf@gmail.com>

On 4/4/2016 3:41 AM, Yao Qi wrote:
> Don Breazeal <donb@codesourcery.com> writes:
> 
>> Note that we if value_optimized_out throws an error we just assume
>> the value is not optimized out.  We let value_rtti_indirect_type
>> handle any errors, and don't try to duplicate its error handling.
> 
> I am wondering why does value_optimized_out have to throw an error?
> Can't we catch the error in value_optimized_out thrown by
> value_fetch_lazy?
> 
> I am not very sure on this idea, but I searched the archive, and didn't
> find anything say we can't do that.
> 
I looked briefly at all the call sites for value_optimized_out.  It
looks like if value_optimized_out were to just return 'false' when it
got a memory error, the result in most cases would be that a subsequent
memory read would throw an error.  It might be that this could prevent a
scenario similar to the -var-create error elsewhere in GDB, but there
wasn't anything obvious in my quick scan.

I'll change the patch accordingly and run the testsuite.
--Don


  reply	other threads:[~2016-04-04 17:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1456273154-28629-1-git-send-email-donb@codesourcery.com>
2016-02-24  1:14 ` Luis Machado
2016-02-24 16:31   ` Don Breazeal
2016-02-25 12:22     ` Pedro Alves
2016-03-28 21:33       ` [PATCH v2 0/2] Optzd-out ptr: Error handling improvement Don Breazeal
2016-03-28 21:34         ` [PATCH v2 1/2] Optzd-out ptr: New test for error handling Don Breazeal
2016-03-29 11:58           ` Yao Qi
2016-03-29 17:13             ` Don Breazeal
2016-03-30 14:37               ` Yao Qi
2016-04-06 21:34                 ` Don Breazeal
2016-03-28 21:34         ` [PATCH v2 2/2] Optzd-out ptr: Eliminate -var-create error Don Breazeal
2016-03-29 12:01     ` [PATCH] Eliminate -var-create error for optzd ptr to struct Yao Qi
2016-03-29 17:14       ` Don Breazeal
2016-03-30 14:35         ` Yao Qi
2016-04-01 16:01           ` Don Breazeal
2016-04-04 10:42             ` Yao Qi
2016-04-04 17:16               ` Don Breazeal [this message]
2016-04-04 21:28           ` Don Breazeal
     [not found] <861t6knro9.fsf@gmail.com>
2016-04-05 18:51 ` Don Breazeal
2016-04-05 19:00   ` Pedro Alves
2016-04-05 20:39     ` Don Breazeal
2016-04-06  9:05       ` Yao Qi
2016-04-06 21:41         ` Don Breazeal
2016-04-06 22:24           ` Pedro Alves
2016-04-07 14:12           ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5702A166.6090701@codesourcery.com \
    --to=donb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox