From: Doug Evans <xdje42@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Hui Zhu <hui_zhu@mentor.com>,
gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Eliminate UNSUPPORTED_ERROR.
Date: Thu, 12 Dec 2013 04:23:00 -0000 [thread overview]
Message-ID: <CAP9bCMTk4RzQnte3Nq57TpzwdkxWA0hXOPaS9u0ST9oP+k2AxA@mail.gmail.com> (raw)
In-Reply-To: <52A8BA3D.9020403@redhat.com>
On Wed, Dec 11, 2013 at 11:17 AM, Pedro Alves <palves@redhat.com> wrote:
> 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 think I added it to be extra conservative in case
source_python_script happened to read from the file.
[I know it normally wouldn't read and then throw an UNSUPPORTED_ERROR,
but I'm guessing I didn't want this code to assume that.]
Now that we're not even calling source_python_script the need is gone.
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.
script_from_file was changed to take a const char *arg the prior week.
Presumably I just didn't update that part of the patch.
next prev parent reply other threads:[~2013-12-12 4:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 10:30 [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet Hui Zhu
2013-10-21 15:37 ` Pedro Alves
2013-11-28 10:56 ` Hui Zhu
2013-11-28 17:38 ` Maciej W. Rozycki
2013-11-29 9:41 ` Hui Zhu
2013-11-29 15:27 ` [pushed] Plug target side conditions and commands leaks (was: Re: [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet) Pedro Alves
2013-11-29 16:05 ` [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet Pedro Alves
2013-12-02 12:45 ` Hui Zhu
2013-12-02 14:38 ` Pedro Alves
2013-12-03 4:50 ` Hui Zhu
2013-12-03 4:54 ` Hui Zhu
2013-12-06 19:29 ` Pedro Alves
2013-12-08 5:19 ` Hui Zhu
2013-12-08 8:34 ` Doug Evans
2013-12-08 14:18 ` Hui Zhu
2013-12-09 19:48 ` Pedro Alves
2013-12-09 21:07 ` Doug Evans
2013-12-10 17:34 ` Pedro Alves
2013-12-10 18:14 ` [PATCH] Eliminate UNSUPPORTED_ERROR Pedro Alves
2013-12-11 16:33 ` Doug Evans
2013-12-11 19:17 ` Pedro Alves
2013-12-12 4:23 ` Doug Evans [this message]
2013-12-12 10:23 ` Pedro Alves
2013-12-11 16:40 ` [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet Doug Evans
2013-12-12 10:55 ` breakpoint.c:insert_bp_location: Constify local. (was: Re: [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet) Pedro Alves
2013-12-12 12:55 ` [PATCH] Let gdbserver doesn't tell GDB it support target-side breakpoint conditions and commands if it doesn't support 'Z' packet Pedro Alves
2014-01-09 18:36 ` 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=CAP9bCMTk4RzQnte3Nq57TpzwdkxWA0hXOPaS9u0ST9oP+k2AxA@mail.gmail.com \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=hui_zhu@mentor.com \
--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