This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Eliminate UNSUPPORTED_ERROR.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]