From: Pedro Alves <palves@redhat.com>
To: Gary Benson <gbenson@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5] Use exceptions and cleanups in gdbserver
Date: Thu, 28 Aug 2014 15:35:00 -0000 [thread overview]
Message-ID: <53FF4C52.5000701@redhat.com> (raw)
In-Reply-To: <1408351618-21013-6-git-send-email-gbenson@redhat.com>
On 08/18/2014 09:46 AM, Gary Benson wrote:
> diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
> index 97498a6..cac73e9 100644
> diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
> index 6283877..e2eb4f4 100644
> --- a/gdb/gdbserver/utils.c
> +++ b/gdb/gdbserver/utils.c
> @@ -17,6 +17,7 @@
> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>
> #include "server.h"
> +#include "common-exceptions.h"
>
...
> diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
> index 500260c..aec70f0 100644
> --- a/gdb/gdbserver/server.c
> +++ b/gdb/gdbserver/server.c
> @@ -35,6 +35,8 @@
> #include "tracepoint.h"
> #include "dll.h"
> #include "hostio.h"
> +#include "common-exceptions.h"
> +#include "cleanups.h"
We'll want to start using exceptions/cleanups everywhere.
We'll no doubt end up including them from a central place, either
server.h or somewhere in common/. I think we should just put
them in server.h already ...
> --- a/gdb/gdbserver/server.h
> +++ b/gdb/gdbserver/server.h
> @@ -29,8 +29,6 @@ gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (void *));
>
> #include "version.h"
>
> -#include <setjmp.h>
> -
> #ifdef HAVE_ALLOCA_H
> #include <alloca.h>
> #endif
> @@ -88,8 +86,6 @@ extern int pass_signals[];
> extern int program_signals[];
> extern int program_signals_p;
>
> -extern jmp_buf toplevel;
> -
> extern int disable_packet_vCont;
> extern int disable_packet_Tthread;
> extern int disable_packet_qC;
... which is the same place we had the bare bones setjmp stuff,
avoiding the sprinkling-includes-around-only-to-inevitably-remove-them-later.
This way, even if we move them somewhere in common/ at some point, we'll
still have only a single place to touch.
Other than that, looks good.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2014-08-28 15:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 8:47 [PATCH 0/5] Make gdbserver use exceptions and cleanups Gary Benson
2014-08-18 8:47 ` [PATCH 3/5] Introduce common/gdb_setjmp.h Gary Benson
2014-08-20 16:54 ` Pedro Alves
2014-08-18 8:47 ` [PATCH 1/5] Move internal_{,v}warning to common/errors.[ch] Gary Benson
2014-08-18 8:47 ` [PATCH 2/5] Move cleanups.[ch] to common Gary Benson
2014-08-20 16:47 ` Pedro Alves
2014-08-20 19:05 ` Gary Benson
2014-08-28 15:35 ` Pedro Alves
2014-08-28 15:36 ` Pedro Alves
2014-08-18 8:52 ` [PATCH 4/5] Introduce common/common-exceptions.[ch] Gary Benson
2014-08-18 9:25 ` [PATCH 5/5] Use exceptions and cleanups in gdbserver Gary Benson
2014-08-28 15:35 ` Pedro Alves [this message]
2014-08-28 15:39 ` [PATCH 0/5] Make gdbserver use exceptions and cleanups Pedro Alves
2014-08-29 10:07 ` Gary Benson
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=53FF4C52.5000701@redhat.com \
--to=palves@redhat.com \
--cc=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
/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