From: Doug Evans <xdje42@gmail.com>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH] use error, not internal_error, in dwarf2-frame.c
Date: Thu, 14 Nov 2013 18:11:00 -0000 [thread overview]
Message-ID: <CAP9bCMQ-wiPSYdobKzd3Gu2uj+UdUtSQwcUQ4iztvX84WyKj3A@mail.gmail.com> (raw)
In-Reply-To: <5284B2BB.3090800@broadcom.com>
On Thu, Nov 14, 2013 at 3:23 AM, Andrew Burgess <aburgess@broadcom.com> wrote:
> On 13/11/2013 8:43 PM, Tom Tromey wrote:
>>
>> I think that gdb should not call internal_error for bad DWARF.
>> Instead, it should simply throw an ordinary exception.
>
> Sounds reasonable.
>
>>
>> diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
>> index e05236f..8f55e9f 100644
>> --- a/gdb/dwarf2-frame.c
>> +++ b/gdb/dwarf2-frame.c
>> @@ -680,8 +680,7 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
>> break;
>>
>> default:
>> - internal_error (__FILE__, __LINE__,
>> - _("Unknown CFI encountered."));
>> + error (_("Unknown CFI encountered."));
>
> I wonder if we could make this error message clearer? Will an "average"
> user understand what a CFI is? How about something like:
>
> "Invalid DWARF debugging information: Unknown CFI encountered"
>
> This might give a better idea what is going on. If you agree then the
> same applies to the rest of these errors too.
>
> Just a thought.
There's a convention for the style of these kinds of messages in dwarf2read.c.
IWBN to use the same convention here.
"Dwarf Error: blah [in module %s]"
E.g.,
if (header->version != 2 && header->version != 3 && header->version != 4)
error (_("Dwarf Error: wrong version in compilation unit header "
"(is %d, should be 2, 3, or 4) [in module %s]"), header->version,
filename);
I didn't check to see whether the file name is available in any of the
instances in dwarf2-frame.c, but if available IWBN to print it.
prev parent reply other threads:[~2013-11-14 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 20:51 Tom Tromey
2013-11-14 9:52 ` Joel Brobecker
2013-11-14 12:26 ` Andrew Burgess
2013-11-14 18:11 ` Doug Evans [this message]
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=CAP9bCMQ-wiPSYdobKzd3Gu2uj+UdUtSQwcUQ4iztvX84WyKj3A@mail.gmail.com \
--to=xdje42@gmail.com \
--cc=aburgess@broadcom.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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