This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Eliminate UNSUPPORTED_ERROR.
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: Hui Zhu <hui_zhu at mentor dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 11 Dec 2013 19:17:17 +0000
- Subject: Re: [PATCH] Eliminate UNSUPPORTED_ERROR.
- Authentication-results: sourceware.org; auth=none
- References: <5265022F dot 8060203 at mentor dot com> <52654A2C dot 9010202 at redhat dot com> <529707C7 dot 4040504 at mentor dot com> <5298AE7C dot 6020607 at redhat dot com> <529C80D2 dot 2080608 at mentor dot com> <529C9B42 dot 20600 at redhat dot com> <529D62F7 dot 80701 at mentor dot com> <52A22582 dot 8040509 at redhat dot com> <52A40015 dot 207 at mentor dot com> <52A61E86 dot 3020005 at redhat dot com> <m31u1lvimb dot fsf at sspiff dot org> <52A750AA dot 1080807 at redhat dot com> <52A75A05 dot 60006 at redhat dot com> <CAP9bCMRyMQESGWQFSsB-+OJ=eSgtcnNcC6J4hDxq5n6kSY=c6Q at mail dot gmail dot com>
On 12/11/2013 04:33 PM, Doug Evans wrote:
>> > - /* Should we fallback to ye olde GDB script mode? */
>> > - if (script_ext_mode == script_ext_soft
>> > - && e.reason == RETURN_ERROR && e.error == UNSUPPORTED_ERROR)
>> > - {
>> > - fseek (stream, 0, SEEK_SET);
>> > - script_from_file (stream, (char*) file);
>> > - }
>> > - else
>> > - {
>> > - /* Nope, just punt. */
>> > - throw_exception (e);
>> > - }
>> > + /* Fallback to GDB script mode. */
>> > + fseek (stream, 0, SEEK_SET);
>> > + script_from_file (stream, (char*) file);
> Remove the fseek and cast.
Hmm, indeed the fseek doesn't look necessary. Will do. However,
that makes me wonder whether I'm missing something, as it doesn't
look necessary before my patch either. Was it ever really
needed? I see you added it (and the unnecessary cast too ;-) ) in:
https://www.sourceware.org/ml/gdb-patches/2010-04/msg00110.html
but I can't tell why.
--
Pedro Alves