Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Sandiford <rdsandiford@googlemail.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: binutils@sourceware.org,  gdb-patches@sourceware.org
Subject: Re: [PATCH] MIPS/BFD: Fix assertions with SGI IRIX files
Date: Fri, 19 Aug 2011 09:42:00 -0000	[thread overview]
Message-ID: <m3hb5dpwk6.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1108181530580.4083__36247.0631408089$1313685694$gmane$org@tp.orcam.me.uk>	(Maciej W. Rozycki's message of "Thu, 18 Aug 2011 17:40:41 +0100	(BST)")

"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> Hello,
>
>  If an SGI IRIX ELF variation binary (also produced by binutils for some 
> target configurations) is loaded into GDB configured for the traditional 
> MIPS ELF variation, then a load of assertion failures is spat.  They 
> actually come from BFD being confused.
>
>  As no user input, however unreasonable, should ever trigger assertions 
> and this is simply a case of an unsupported binary format, here's a fix to 
> convert the offending code to do proper error reporting instead.
>
>  Verified manually with GDB, the error messages are produced.  I was 
> unable to trigger this problem with the linker, even though this piece of 
> code looks reachable within to me.

How about just dropping the assertions?  SHN_MIPS_TEXT and SHN_MIPS_DATA
are easy to handle, and it looks like the code will behave sensibly
regardless of SGI_COMPAT.  I realise you might be thinking that the user
would like to know that they have the "wrong" emulation.  But if this
is the only detectable difference, it's better just to carry on.
If there are other detectable differences that cause real problems,
we should try to diagnose the problem there instead.

A patch to remove the assertions is pre-approved if you agree that's OK.

Richard


       reply	other threads:[~2011-08-19  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.1.10.1108181530580.4083__36247.0631408089$1313685694$gmane$org@tp.orcam.me.uk>
2011-08-19  9:42 ` Richard Sandiford [this message]
2011-08-31 18:01   ` Maciej W. Rozycki
2011-08-31 20:14     ` Richard Sandiford
2011-09-02 10:06       ` Maciej W. Rozycki
2011-10-24 14:02         ` Maciej W. Rozycki
2011-11-15 17:29           ` Richard Sandiford
2011-11-16 12:37             ` Maciej W. Rozycki
2011-08-18 16:41 Maciej W. Rozycki

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=m3hb5dpwk6.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com \
    --to=rdsandiford@googlemail.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@codesourcery.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