+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)
/* 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
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);
}
}
- 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))
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) */
#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
#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);
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:
#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. */
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;
#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;
/* 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");
}
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 */
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 */
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");
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
{
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))
{
}
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);
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 */
if (recurse > 0)
{
hp_cxx_exception_support_initialized = 0;
- exception_support_initialized = 0;
+ deprecated_exception_support_initialized = 0;
return 0;
}
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 */
eh_notify_callback_addr = args.return_val;
recurse--;
- exception_catchpoints_are_fragile = 1;
+ deprecated_exception_catchpoints_are_fragile = 1;
if (!eh_notify_callback_addr)
{
}
}
else
- exception_catchpoints_are_fragile = 0;
+ deprecated_exception_catchpoints_are_fragile = 0;
#endif
/* Now, look for the breakpointable routine in end.o */
/* 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;
}
{
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;
(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;
}
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));
}
/* 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.
\f
static int expressiondebug = 0;
-extern int hp_som_som_object_present;
-
static void free_funcalls (void *ignore);
static void prefixify_expression (struct expression *);
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;
/* 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
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 *);
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) */
#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. */
{
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;