aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-04-08 21:18:13 +0000
committerAndrew Cagney <cagney@redhat.com>2004-04-08 21:18:13 +0000
commitf83f82bc153ade6a787dd5084f125a4cd7a6a2de (patch)
tree5d0dea6c9a03cb4e9e53089fbfec116bd0ff97b4 /gdb
parentfb2be677dcb440b001df7739bda229295910a7c8 (diff)
downloadgdb-f83f82bc153ade6a787dd5084f125a4cd7a6a2de.zip
gdb-f83f82bc153ade6a787dd5084f125a4cd7a6a2de.tar.gz
gdb-f83f82bc153ade6a787dd5084f125a4cd7a6a2de.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog31
-rw-r--r--gdb/breakpoint.c18
-rw-r--r--gdb/breakpoint.h9
-rw-r--r--gdb/c-exp.y3
-rw-r--r--gdb/c-typeprint.c5
-rw-r--r--gdb/cp-valprint.c6
-rw-r--r--gdb/eval.c15
-rw-r--r--gdb/hppa-hpux-tdep.c21
-rw-r--r--gdb/hpread.c7
-rw-r--r--gdb/infttrace.c6
-rw-r--r--gdb/parse.c4
-rw-r--r--gdb/symfile.c3
-rw-r--r--gdb/symtab.c6
-rw-r--r--gdb/symtab.h5
-rw-r--r--gdb/valops.c8
15 files changed, 80 insertions, 67 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 09e800a..3eeb4da 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,36 @@
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)
(frame_unwind_prepend_unwinder, frame_unwind_append_sniffer)
(frame_unwind_find_by_frame): Re-implement the unwind code so
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 61b7225..f6437e8 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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))
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 41bcb0c..76bd183 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -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) */
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index f11b93e..706b407 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -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
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 2d2ad85..c9a6442 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -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:
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 42a48f5..53e3ce9 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -36,10 +36,6 @@
#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;
diff --git a/gdb/eval.c b/gdb/eval.c
index 452aeb7..b690a78 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -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))
{
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 5534806..ad066b2 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -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;
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 76e9696..6e92276 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -238,11 +238,6 @@ static dnttpointer hpread_get_next_skip_over_anon_unions
(int, dnttpointer, union dnttentry **, struct objfile *);
-/* 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));
}
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index 06bb4b3..3a8e7b4 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -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.
diff --git a/gdb/parse.c b/gdb/parse.c
index 374e88e..3bf06b9 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -95,8 +95,6 @@ int comma_terminates;
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;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 19ae294..3f07f49 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -65,10 +65,9 @@
/* 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
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 6995891b5..7d1fd83 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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 *);
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 16a212e..b30fc89 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -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) */
diff --git a/gdb/valops.c b/gdb/valops.c
index 6042277..def8e8f 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -43,10 +43,6 @@
#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;