Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Work around incorrect/broken pathnames in NT_FILE note
Date: Mon, 31 Aug 2020 15:50:07 +0100	[thread overview]
Message-ID: <0484421f-a3a6-a319-760f-a620c86385bb@palves.net> (raw)
In-Reply-To: <20200828202528.36adfec0@f32-m1.lan>

Hi Kevin,

On 8/29/20 4:25 AM, Kevin Buettner wrote:
> Hi Pedro,
> 
> I've made all of the changes you suggested except for this one...
> 
>>> @@ -227,6 +244,7 @@ core_target::build_file_mappings ()
>>>  
>>>  	    if (bfd == nullptr || !bfd_check_format (bfd, bfd_object))
>>>  	      {
>>> +		m_core_unavailable_mappings.emplace_back (start, end - start);
>>>  		/* If we get here, there's a good chance that it's due to
>>>  		   an internal error.  We issue a warning instead of an
>>>  		   internal error because of the possibility that the  
>>
>> Now that we're expecting to reach here, the comment about an internal
>> error seems stale.
> 
> IMO, we'll (still) only reach the code in question due either to an
> internal error or due to the condition mentioned later in the comment. 
> Bear in mind that we've already checked for the existence of the file
> and have even opened the file (though we're discarding the result) in
> the call to exec_file_find().  The test with accompanying warning message
> following the call to exec_file_find() should handle most if not all cases
> where the path name is bad / broken.
> 
> The calls to bfd_openr() and bfd_check_format() _should_ be successful,
> but we still need to check the result, hence second block containing the
> comment and the warning, etc.
> 

I see, thanks.

This version LGTM.

Pedro Alves


  reply	other threads:[~2020-08-31 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 22:20 Kevin Buettner
2020-08-08 10:19 ` Luis Machado
2020-08-09  8:19   ` Kevin Buettner
2020-08-11 17:02     ` Kevin Buettner
2020-08-11 17:21       ` Luis Machado
2020-08-11 19:57         ` Kevin Buettner
2020-08-26 18:02           ` Luis Machado
2020-09-01  2:03       ` Kevin Buettner
2020-08-20 14:57 ` Pedro Alves
2020-08-29  3:25   ` Kevin Buettner
2020-08-31 14:50     ` Pedro Alves [this message]
2020-09-01  2:04       ` Kevin Buettner

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=0484421f-a3a6-a319-760f-a620c86385bb@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.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