From: Roland McGrath <mcgrathr@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: GDB <gdb-patches@sourceware.org>
Subject: Re: [PATCH users/roland/osabi-assert] Do not crash on unrecognized GNU .note.ABI-tag values
Date: Fri, 29 May 2015 16:32:00 -0000 [thread overview]
Message-ID: <CAB=4xhoNhJbN5naaZQR4k4e=zAD7TyfPF7OG7damoDp8ChatGA@mail.gmail.com> (raw)
In-Reply-To: <55683A6F.2030600@redhat.com>
On Fri, May 29, 2015 at 3:07 AM, Pedro Alves <palves@redhat.com> wrote:
> In order to get this into a release branch, the protocol is to file
> a PR and then once fixed, list the fix in the release page in the wiki:
>
> https://sourceware.org/gdb/wiki/GDB_7.9_Release
>
> That helps the release manager build the release notes.
I've filed 18464 for it. I'm not clear from what you said here whether I
should cherry-pick the commit onto the branch myself, or just list it in
the "Maybe" section on the wiki to wait for approval.
>> + warning ("GNU ABI tag value %u unrecognized.\n", abi_tag);
>
> Wrap string in _().
I was following the model of the other warning call in that file (and the
end of gdbarch_init_osabi). It seemed odd to me that it didn't have a
translation wrapper. But looking around the rest of the code, I see now
that gdbarch_init_osabi is the outlier, and normal usage is to have a
translation wrapper and now trailing newline. So I've fixed the new call.
> Indentation looks odd. tabs vs spaces? (We use tabs in gdb.)
I've found a lot of inconsistency as to that in this repository
(and even in this particular file). I've fixed it to use tabs.
>> + *osabi = GDB_OSABI_UNKNOWN;
>
> This line is not necessary. It if were, we'd need to do the
> same in the other two paths that don't match anything in
> this function too.
OK.
Below is what I've committed to the trunk.
Can I cherry-pick it to the 7.9 branch too?
Thanks,
Roland
gdb/
2015-05-29 Roland McGrath <mcgrathr@google.com>
PR gdb/18464
* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
rather than internal_error for an unrecognized value.
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 9d90c55..3581eb3 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -493,10 +493,8 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd
*abfd, asection *sect, void *obj)
break;
default:
- internal_error (__FILE__, __LINE__,
- _("generic_elf_osabi_sniff_abi_tag_sections: "
- "unknown OS number %d"),
- abi_tag);
+ warning (_("GNU ABI tag value %u unrecognized."), abi_tag);
+ break;
}
return;
}
next prev parent reply other threads:[~2015-05-29 16:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 0:21 Roland McGrath
2015-05-29 10:07 ` Pedro Alves
2015-05-29 16:26 ` Doug Evans
2015-05-29 16:29 ` Pedro Alves
2015-05-29 16:32 ` Roland McGrath [this message]
2015-05-29 17:00 ` Pedro Alves
2015-05-29 17:34 ` Roland McGrath
2015-05-29 17:36 ` Pedro Alves
2015-05-29 18:21 ` Roland McGrath
2015-05-29 18:24 ` Pedro Alves
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='CAB=4xhoNhJbN5naaZQR4k4e=zAD7TyfPF7OG7damoDp8ChatGA@mail.gmail.com' \
--to=mcgrathr@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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