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]

[PATCH] Move 'enum exception_event_kind' from symtab.h to breakpoint.c


Hi,
'enum exception_event_kind' is only used in breakpoint.c, so this patch
moves it from symtab.h to breakpoint.c.

'enum exception_event_kind' was once used in target.c and
hppa-hpux-tdep.c, but after these two patches, it is only used in
breakpoint.c.

  [rfc] Remove unused code - hpread.c removal follow-on [2/2]
  http://sourceware.org/ml/gdb-patches/2007-06/msg00015.html

  RFA: Remove unused support for target-based exception handling
  http://sourceware.org/ml/gdb-patches/2007-12/msg00117.html

I grep'ed the source of insight, and find 'enum exception_event_kind'
is not used in other files in insight.  Is it OK?

gdb:

2012-12-31  Yao Qi  <yao@codesourcery.com>

	* symtab.h: Remove some out of date comments.
	 (enum exception_event_kind): Move it ...
	* breakpoint.c: ... here.
---
 gdb/breakpoint.c |    7 +++++++
 gdb/symtab.h     |   15 ---------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 66bbf76..79d84d4 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -82,6 +82,13 @@
 #include "mi/mi-common.h"
 #include "python/python.h"
 
+/* Enums for exception-handling support.  */
+enum exception_event_kind
+{
+  EX_EVENT_THROW,
+  EX_EVENT_CATCH
+};
+
 /* Prototypes for local functions.  */
 
 static void enable_delete_command (char *, int);
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 477ada9..c7839ac 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1124,21 +1124,6 @@ struct symtabs_and_lines
 };
 
 
-
-/* Some types and macros needed for exception catchpoints.
-   Can't put these in target.h because symtab_and_line isn't
-   known there.  This file will be included by breakpoint.c,
-   hppa-tdep.c, etc.  */
-
-/* Enums for exception-handling support.  */
-enum exception_event_kind
-{
-  EX_EVENT_THROW,
-  EX_EVENT_CATCH
-};
-
-
-
 /* Given a pc value, return line number it is in.  Second arg nonzero means
    if pc is on the boundary use the previous statement's line number.  */
 
-- 
1.7.7.6


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