From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Add missing include dependency in exceptions.h
Date: Mon, 30 May 2005 16:01:00 -0000 [thread overview]
Message-ID: <20050530045227.GB18760@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
Hello,
See http://sources.redhat.com/ml/gdb-patches/2005-05/msg00601.html.
The TRY_CATCH macro has a dependency on "uiout", which is declared in
ui-out.h. Because this header is not included in exceptions.h, any file
that uses this macro needs to include "ui-out.h". I think we should
include "ui-out.h" in "exceptions.h" instead. This is what this patch
does.
Note that another alternative would be to add something like:
extern struct ui_out *uiout;
to exceptions.h. I personnaly think it would be ugly to sprinkle
such extern declarations everywhere...
2005-05-30 Joel Brobecker <brobecker@adacore.com>
* exceptions.h: Include ui-out.h.
(ui_out): Remove declaration.
* Makefile.in (exceptions_h): Add dependency on ui-out.h.
Tested on x86-linux.
OK to apply?
Thanks,
--
Joel
[-- Attachment #2: uiout.diff --]
[-- Type: text/plain, Size: 1055 bytes --]
Index: exceptions.h
===================================================================
RCS file: /cvs/src/src/gdb/exceptions.h,v
retrieving revision 1.14
diff -u -p -r1.14 exceptions.h
--- exceptions.h 26 Apr 2005 05:03:36 -0000 1.14
+++ exceptions.h 30 May 2005 01:47:56 -0000
@@ -24,8 +24,7 @@
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
-struct ui_out;
-
+#include "ui-out.h"
#include <setjmp.h>
/* Reasons for calling throw_exceptions(). NOTE: all reason values
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.734
diff -u -p -r1.734 Makefile.in
--- Makefile.in 29 May 2005 03:13:17 -0000 1.734
+++ Makefile.in 30 May 2005 01:48:06 -0000
@@ -672,7 +672,7 @@ dwarf2loc_h = dwarf2loc.h
environ_h = environ.h
event_loop_h = event-loop.h
event_top_h = event-top.h
-exceptions_h = exceptions.h
+exceptions_h = exceptions.h $(ui_out_h)
exec_h = exec.h $(target_h)
expression_h = expression.h $(symtab_h) $(doublest_h)
fbsd_nat_h = fbsd-nat.h
next reply other threads:[~2005-05-30 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-30 16:01 Joel Brobecker [this message]
2005-05-30 18:52 ` Daniel Jacobowitz
2005-06-02 16:52 ` Joel Brobecker
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=20050530045227.GB18760@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sources.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