2004-04-08 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 8 Apr 2004 21:18:13 +0000 (21:18 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 8 Apr 2004 21:18:13 +0000 (21:18 +0000)
* breakpoint.h (deprecated_exception_catchpoints_are_fragile)
(deprecated_exception_support_initialized): Declare.
* hppa-hpux-tdep.c (initialize_hp_cxx_exception_support)
(initialize_hp_cxx_exception_support)
(child_enable_exception_callback): Update.
* breakpoint.c (deprecated_exception_catchpoints_are_fragile)
(deprecated_exception_support_initialized): Rename
deprecated_exception_catchpoints_are_fragile and
deprecated_exception_support_initialized.
(breakpoint_init_inferior, breakpoint_init_inferior): Update.

* symtab.c (deprecated_hp_som_som_object_present): Rename
hp_som_som_object_present.
* symtab.h (deprecated_hp_som_som_object_present): Declare.
* symfile.c (hp_som_som_object_present, RESET_HP_UX_GLOBALS):
Update.  Delete extern declaration.
* valops.c (hp_som_som_object_present): Ditto.
* parse.c (deprecated_hp_som_som_object_present)
(parse_nested_classes_for_hpacc): Ditto.
* hpread.c (hp_som_som_object_present, hpread_expand_symtab): Ditto.
* hppa-hpux-tdep.c (hp_som_som_object_present)
(initialize_hp_cxx_exception_support): Ditto.
* eval.c (hp_som_som_object_present, evaluate_subexp_standard): Ditto.
* cp-valprint.c (hp_som_som_object_present)
(cp_print_class_method): Ditto.
* c-typeprint.c (hp_som_som_object_present):
(c_type_print_base): Ditto.
* c-exp.y (hp_som_som_object_present): Ditto.

15 files changed:
gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/c-exp.y
gdb/c-typeprint.c
gdb/cp-valprint.c
gdb/eval.c
gdb/hppa-hpux-tdep.c
gdb/hpread.c
gdb/infttrace.c
gdb/parse.c
gdb/symfile.c
gdb/symtab.c
gdb/symtab.h
gdb/valops.c

index 09e800a1abacb9a9d47fce183790e95535d6d407..3eeb4da137a762bae2e86f4d4bd97a6a57897d9a 100644 (file)
@@ -1,3 +1,34 @@
+2004-04-08  Andrew Cagney  <cagney@redhat.com>
+
+       * breakpoint.h (deprecated_exception_catchpoints_are_fragile)
+       (deprecated_exception_support_initialized): Declare.
+       * hppa-hpux-tdep.c (initialize_hp_cxx_exception_support) 
+       (initialize_hp_cxx_exception_support)
+       (child_enable_exception_callback): Update.
+       * breakpoint.c (deprecated_exception_catchpoints_are_fragile)
+       (deprecated_exception_support_initialized): Rename
+       deprecated_exception_catchpoints_are_fragile and
+       deprecated_exception_support_initialized.
+       (breakpoint_init_inferior, breakpoint_init_inferior): Update.
+
+       * symtab.c (deprecated_hp_som_som_object_present): Rename
+       hp_som_som_object_present.
+       * symtab.h (deprecated_hp_som_som_object_present): Declare.
+       * symfile.c (hp_som_som_object_present, RESET_HP_UX_GLOBALS):
+       Update.  Delete extern declaration.
+       * valops.c (hp_som_som_object_present): Ditto.
+       * parse.c (deprecated_hp_som_som_object_present) 
+       (parse_nested_classes_for_hpacc): Ditto.
+       * hpread.c (hp_som_som_object_present, hpread_expand_symtab): Ditto.
+       * hppa-hpux-tdep.c (hp_som_som_object_present) 
+       (initialize_hp_cxx_exception_support): Ditto.
+       * eval.c (hp_som_som_object_present, evaluate_subexp_standard): Ditto.
+       * cp-valprint.c (hp_som_som_object_present) 
+       (cp_print_class_method): Ditto.
+       * c-typeprint.c (hp_som_som_object_present): 
+       (c_type_print_base): Ditto.
+       * c-exp.y (hp_som_som_object_present): Ditto.
+
 2004-04-08  Andrew Cagney  <cagney@redhat.com>
 
        * frame-unwind.c (struct frame_unwind_table, frame_unwind_init)
index 61b72255a0a62b4ab96a0485376c25b933a75435..f6437e80380bfe6cd3bf3973ab6e7b42d0eda717 100644 (file)
@@ -266,13 +266,13 @@ int breakpoint_count;
 /* Pointer to current exception event record */
 static struct exception_event_record *current_exception_event;
 
-/* Indicator of whether exception catchpoints should be nuked
-   between runs of a program */
-int exception_catchpoints_are_fragile = 0;
+/* Indicator of whether exception catchpoints should be nuked between
+   runs of a program.  */
+int deprecated_exception_catchpoints_are_fragile = 0;
 
 /* Indicator of when exception catchpoints set-up should be
-   reinitialized -- e.g. when program is re-run */
-int exception_support_initialized = 0;
+   reinitialized -- e.g. when program is re-run */
+int deprecated_exception_support_initialized = 0;
 
 /* This function returns a pointer to the string representation of the
    pathname of the dynamically-linked library that has just been
@@ -1636,8 +1636,8 @@ breakpoint_init_inferior (enum inf_context context)
       default:
        /* Likewise for exception catchpoints in dynamic-linked
           executables where required */
-       if (ep_is_exception_catchpoint (b) &&
-           exception_catchpoints_are_fragile)
+       if (ep_is_exception_catchpoint (b)
+           && deprecated_exception_catchpoints_are_fragile)
          {
            warning_needed = 1;
            delete_breakpoint (b);
@@ -1646,8 +1646,8 @@ breakpoint_init_inferior (enum inf_context context)
       }
   }
 
-  if (exception_catchpoints_are_fragile)
-    exception_support_initialized = 0;
+  if (deprecated_exception_catchpoints_are_fragile)
+    deprecated_exception_support_initialized = 0;
 
   /* Don't issue the warning unless it's really needed... */
   if (warning_needed && (context != inf_exited))
index 41bcb0c3ce1bc105b16121accae72bc7080a9eb1..76bd183c2105b3010eebf8b3b05dd775fb17edb8 100644 (file)
@@ -802,4 +802,13 @@ extern void delete_command (char *arg, int from_tty);
    remove fails. */
 extern int remove_hw_watchpoints (void);
 
+
+/* Indicator of whether exception catchpoints should be nuked between
+   runs of a program.  */
+extern int deprecated_exception_catchpoints_are_fragile;
+
+/* Indicator of when exception catchpoints set-up should be
+   reinitialized -- e.g. when program is re-run.  */
+extern int deprecated_exception_support_initialized;
+
 #endif /* !defined (BREAKPOINT_H) */
index f11b93e3a2b434e2a0043ff097438d85aa3728e3..706b4074d88cb77179966b8dc3342c3d53c5ee01 100644 (file)
@@ -53,9 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "block.h"
 #include "cp-support.h"
 
-/* Flag indicating we're dealing with HP-compiled objects */ 
-extern int hp_som_som_object_present;
-
 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
    as well as gratuitiously global symbol names, so we can have multiple
    yacc generated parsers in gdb.  Note that these are only the variables
index 2d2ad850c3f162f28729f2e6d947c3dd85f83137..c9a644229bb5defa4ee0eddcf0b03ba206359a44 100644 (file)
@@ -38,9 +38,6 @@
 #include "gdb_string.h"
 #include <errno.h>
 
-/* Flag indicating target was compiled by HP compiler */
-extern int hp_som_som_object_present;
-
 static void cp_type_print_method_args (struct type *mtype, char *prefix,
                                       char *varstring, int staticp,
                                       struct ui_file *stream);
@@ -1078,7 +1075,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
     case TYPE_CODE_ENUM:
       c_type_print_modifier (type, stream, 0, 1);
       /* HP C supports sized enums */
-      if (hp_som_som_object_present)
+      if (deprecated_hp_som_som_object_present)
        switch (TYPE_LENGTH (type))
          {
          case 1:
index 42a48f55676f1e611c7d8d300b0772b211e56b3a..53e3ce9b2ec64eee9fb345144a3b1914e0d9f515 100644 (file)
 #include "cp-abi.h"
 #include "valprint.h"
 
-/* Indication of presence of HP-compiled object files */
-extern int hp_som_som_object_present;  /* defined in symtab.c */
-
-
 int vtblprint;                 /* Controls printing of vtbl's */
 int objectprint;               /* Controls looking up an object's derived type
                                   using what we find in its vtables.  */
@@ -115,7 +111,7 @@ cp_print_class_method (char *valaddr,
       if (sym == 0)
        {
          /* 1997-08-01 Currently unsupported with HP aCC */
-         if (hp_som_som_object_present)
+         if (deprecated_hp_som_som_object_present)
            {
              fputs_filtered ("?? <not supported with HP aCC>", stream);
              return;
index 452aeb7f243f2411563dd3ce339889b71d7a7a60..b690a78da09e6807e5628b1dc22ff365c1839a29 100644 (file)
@@ -37,9 +37,6 @@
 #include "block.h"
 #include "parser-defs.h"
 
-/* Defined in symtab.c */
-extern int hp_som_som_object_present;
-
 /* This is defined in valops.c */
 extern int overload_resolution;
 
@@ -972,7 +969,7 @@ evaluate_subexp_standard (struct type *expect_type,
          /* 1997-08-01 Currently we do not support function invocation
             via pointers-to-methods with HP aCC. Pointer does not point
             to the function, but possibly to some thunk. */
-         if (hp_som_som_object_present)
+         if (deprecated_hp_som_som_object_present)
            {
              error ("Not implemented: function invocation through pointer to method with HP aCC");
            }
@@ -1368,7 +1365,7 @@ evaluate_subexp_standard (struct type *expect_type,
       arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 
       /* With HP aCC, pointers to methods do not point to the function code */
-      if (hp_som_som_object_present &&
+      if (deprecated_hp_som_som_object_present &&
          (TYPE_CODE (VALUE_TYPE (arg2)) == TYPE_CODE_PTR) &&
       (TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (arg2))) == TYPE_CODE_METHOD))
        error ("Pointers to methods not supported with HP aCC");        /* 1997-08-19 */
@@ -1381,7 +1378,7 @@ evaluate_subexp_standard (struct type *expect_type,
       arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 
       /* With HP aCC, pointers to methods do not point to the function code */
-      if (hp_som_som_object_present &&
+      if (deprecated_hp_som_som_object_present &&
          (TYPE_CODE (VALUE_TYPE (arg2)) == TYPE_CODE_PTR) &&
       (TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (arg2))) == TYPE_CODE_METHOD))
        error ("Pointers to methods not supported with HP aCC");        /* 1997-08-19 */
@@ -1391,7 +1388,7 @@ evaluate_subexp_standard (struct type *expect_type,
     handle_pointer_to_member:
       /* HP aCC generates offsets that have bit #29 set; turn it off to get
          a real offset to the member. */
-      if (hp_som_som_object_present)
+      if (deprecated_hp_som_som_object_present)
        {
          if (!mem_offset)      /* no bias -> really null */
            error ("Attempted dereference of null pointer-to-member");
@@ -1431,7 +1428,7 @@ evaluate_subexp_standard (struct type *expect_type,
       arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
 
       /* Do special stuff for HP aCC pointers to members */
-      if (hp_som_som_object_present)
+      if (deprecated_hp_som_som_object_present)
        {
          /* 1997-08-19 Can't assign HP aCC pointers to methods. No details of
             the implementation yet; but the pointer appears to point to a code
@@ -1934,7 +1931,7 @@ evaluate_subexp_standard (struct type *expect_type,
        {
          struct value *retvalp = evaluate_subexp_for_address (exp, pos, noside);
          /* If HP aCC object, use bias for pointers to members */
-         if (hp_som_som_object_present &&
+         if (deprecated_hp_som_som_object_present &&
              (TYPE_CODE (VALUE_TYPE (retvalp)) == TYPE_CODE_PTR) &&
              (TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (retvalp))) == TYPE_CODE_MEMBER))
            {
index 553480663af3fc10b7eca7c020af936118b3743c..ad066b25fb8331284433e69056be464e32ecac0a 100644 (file)
@@ -44,12 +44,6 @@ typedef struct
   }
 args_for_find_stub;
 
-/* This is declared in symtab.c; set to 1 in hp-symtab-read.c */
-extern int hp_som_som_object_present;
-
-/* In breakpoint.c */
-extern int exception_catchpoints_are_fragile;
-
 /* FIXME: brobecker 2002-12-25.  The following functions will eventually
    become static, after the multiarching conversion is done.  */
 int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
@@ -198,8 +192,6 @@ __eh_notification;
 static int hp_cxx_exception_support = 0;
 /* Has the initialize function been run? */
 int hp_cxx_exception_support_initialized = 0;
-/* Similar to above, but imported from breakpoint.c -- non-target-specific */
-extern int exception_support_initialized;
 /* Address of __eh_notify_hook */
 static CORE_ADDR eh_notify_hook_addr = 0;
 /* Address of __d_eh_notify_callback */
@@ -374,7 +366,7 @@ initialize_hp_cxx_exception_support (void)
   if (recurse > 0)
     {
       hp_cxx_exception_support_initialized = 0;
-      exception_support_initialized = 0;
+      deprecated_exception_support_initialized = 0;
       return 0;
     }
 
@@ -385,7 +377,7 @@ initialize_hp_cxx_exception_support (void)
      for exception handling debug support will be available!
      This will percolate back up to breakpoint.c, where our callers
      will decide to try the g++ exception-handling support instead. */
-  if (!hp_som_som_object_present)
+  if (!deprecated_hp_som_som_object_present)
     return 0;
 
   /* We have a SOM executable with SOM debug info; find the hooks */
@@ -469,7 +461,7 @@ initialize_hp_cxx_exception_support (void)
       eh_notify_callback_addr = args.return_val;
       recurse--;
 
-      exception_catchpoints_are_fragile = 1;
+      deprecated_exception_catchpoints_are_fragile = 1;
 
       if (!eh_notify_callback_addr)
        {
@@ -481,7 +473,7 @@ initialize_hp_cxx_exception_support (void)
        }
     }
   else
-    exception_catchpoints_are_fragile = 0;
+    deprecated_exception_catchpoints_are_fragile = 0;
 #endif
 
   /* Now, look for the breakpointable routine in end.o */
@@ -556,7 +548,7 @@ initialize_hp_cxx_exception_support (void)
   /* Set the flags */
   hp_cxx_exception_support = 2;        /* everything worked so far */
   hp_cxx_exception_support_initialized = 1;
-  exception_support_initialized = 1;
+  deprecated_exception_support_initialized = 1;
 
   return 1;
 }
@@ -575,7 +567,8 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable)
 {
   char buf[4];
 
-  if (!exception_support_initialized || !hp_cxx_exception_support_initialized)
+  if (!deprecated_exception_support_initialized
+      || !hp_cxx_exception_support_initialized)
     if (!initialize_hp_cxx_exception_support ())
       return NULL;
 
index 76e96961f9ef25e801069b28eb0e41e3924a4f62..6e922768334284e3909a13c9d46e65a51535f9cc 100644 (file)
@@ -238,11 +238,6 @@ static dnttpointer hpread_get_next_skip_over_anon_unions
   (int, dnttpointer, union dnttentry **, struct objfile *);
 
 \f
-/* Global to indicate presence of HP-compiled objects,
-   in particular, SOM executable file with SOM debug info 
-   Defined in symtab.c, used in hppa-tdep.c. */
-extern int hp_som_som_object_present;
-
 /* Static used to indicate a class type that requires a
    fix-up of one of its method types */
 static struct type *fixup_class = NULL;
@@ -2875,7 +2870,7 @@ hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
     }
 
   current_objfile = NULL;
-  hp_som_som_object_present = 1;       /* Indicate we've processed an HP SOM SOM file */
+  deprecated_hp_som_som_object_present = 1;    /* Indicate we've processed an HP SOM SOM file */
 
   return end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
 }
index 06bb4b3b07cd8181e84b02b622f18b854e77d8fb..3a8e7b422c2dff7c885b34bfb081c23fe1f5c276 100644 (file)
@@ -1,7 +1,7 @@
 /* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
-   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-   1999, 2000, 2001, 2003
-   Free Software Foundation, Inc.
+
+   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+   1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
index 374e88ed85ded59131c2f3b6730c397fcd40a64c..3bf06b96a880a69b8dde00251fa69f4a647723a4 100644 (file)
@@ -95,8 +95,6 @@ int comma_terminates;
 \f
 static int expressiondebug = 0;
 
-extern int hp_som_som_object_present;
-
 static void free_funcalls (void *ignore);
 
 static void prefixify_expression (struct expression *);
@@ -590,7 +588,7 @@ parse_nested_classes_for_hpacc (char *name, int len, char **token,
      return NULL, and caller must default to standard GDB
      behaviour. */
 
-  if (!hp_som_som_object_present)
+  if (!deprecated_hp_som_som_object_present)
     return (struct symbol *) NULL;
 
   p = name;
index 19ae2943301231a741aa857bab1ac9faf4bcdc7a..3f07f49c17af6d05c763b9634b7ad94956fb1e67 100644 (file)
 /* Some HP-UX related globals to clear when a new "main"
    symbol file is loaded. HP-specific.  */
 
-extern int hp_som_som_object_present;
 extern int hp_cxx_exception_support_initialized;
 #define RESET_HP_UX_GLOBALS() do {\
-                                    hp_som_som_object_present = 0;             /* indicates HP-compiled code */        \
+                                    deprecated_hp_som_som_object_present = 0;             /* indicates HP-compiled code */        \
                                     hp_cxx_exception_support_initialized = 0;  /* must reinitialize exception stuff */ \
                               } while (0)
 #endif
index 6995891b5ae3ad3074e5c1795ea94eb0659de865..7d1fd83aa43f03984ee1841d45fdf18841ebac0f 100644 (file)
@@ -114,9 +114,9 @@ struct symbol *lookup_symbol_aux_minsyms (const char *name,
                                          struct symtab **symtab);
 #endif
 
-/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */
-/* Signals the presence of objects compiled by HP compilers */
-int hp_som_som_object_present = 0;
+/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c.
+   Signals the presence of objects compiled by HP compilers.  */
+int deprecated_hp_som_som_object_present = 0;
 
 static void fixup_section (struct general_symbol_info *, struct objfile *);
 
index 16a212eff1ecd0b96b3f3165c8f3ea93871c090d..b30fc89dd75072b37499c8602883bf466563830d 100644 (file)
@@ -1362,4 +1362,9 @@ extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search
 extern void set_main_name (const char *name);
 extern /*const */ char *main_name (void);
 
+/* Global to indicate presence of HP-compiled objects,
+   in particular, SOM executable file with SOM debug info 
+   Defined in symtab.c, used in hppa-tdep.c. */
+extern int deprecated_hp_som_som_object_present;
+
 #endif /* !defined(SYMTAB_H) */
index 60422779a14e178972658b56a71e13fa7a5cd8b4..def8e8fb9dcf785057f2a13dc1466cc3f6aeb55c 100644 (file)
 #include "gdb_assert.h"
 #include "cp-support.h"
 
-/* Flag indicating HP compilers were used; needed to correctly handle some
-   value operations with HP aCC code/runtime. */
-extern int hp_som_som_object_present;
-
 extern int overload_debug;
 /* Local functions.  */
 
@@ -299,8 +295,8 @@ value_cast (struct type *type, struct value *arg2)
     {
       LONGEST longest;
 
-      if (hp_som_som_object_present && /* if target compiled by HP aCC */
-         (code2 == TYPE_CODE_PTR))
+      if (deprecated_hp_som_som_object_present /* if target compiled by HP aCC */
+         && (code2 == TYPE_CODE_PTR))
        {
          unsigned int *ptr;
          struct value *retvalp;
This page took 0.054795 seconds and 4 git commands to generate.