Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Add missing include dependency in exceptions.h
@ 2005-05-30 16:01 Joel Brobecker
  2005-05-30 18:52 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2005-05-30 16:01 UTC (permalink / raw)
  To: gdb-patches

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add missing include dependency in exceptions.h
  2005-05-30 16:01 [RFA] Add missing include dependency in exceptions.h Joel Brobecker
@ 2005-05-30 18:52 ` Daniel Jacobowitz
  2005-06-02 16:52   ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-05-30 18:52 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Mon, May 30, 2005 at 02:52:27PM +1000, Joel Brobecker wrote:
> 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.

This is OK.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add missing include dependency in exceptions.h
  2005-05-30 18:52 ` Daniel Jacobowitz
@ 2005-06-02 16:52   ` Joel Brobecker
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2005-06-02 16:52 UTC (permalink / raw)
  To: gdb-patches

On Mon, May 30, 2005 at 12:54:25PM -0400, Daniel Jacobowitz wrote:
> On Mon, May 30, 2005 at 02:52:27PM +1000, Joel Brobecker wrote:
> > 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.
> 
> This is OK.

Thanks. Committed.

-- 
Joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-02 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 16:01 [RFA] Add missing include dependency in exceptions.h Joel Brobecker
2005-05-30 18:52 ` Daniel Jacobowitz
2005-06-02 16:52   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox