]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Start of HP merge changes to GDB.
authorDavid Taylor <taylor@redhat.com>
Thu, 10 Dec 1998 21:25:43 +0000 (21:25 +0000)
committerDavid Taylor <taylor@redhat.com>
Thu, 10 Dec 1998 21:25:43 +0000 (21:25 +0000)
14 files changed:
gdb/ChangeLog
gdb/annotate.c
gdb/annotate.h
gdb/buildsym.h
gdb/coff-solib.h
gdb/complaints.h
gdb/dstread.c
gdb/dwarf2read.c
gdb/frame.h
gdb/minsyms.c
gdb/parser-defs.h
gdb/scm-lang.c
gdb/top.h
gdb/valprint.h

index a25bc0df8d388229a83747feb975c6cfa24b317a..d607c5ddf6473d46281bc331326113a4fbdc2697 100644 (file)
@@ -1,3 +1,68 @@
+Thu Dec 10 15:19:40 1998  David Taylor  <taylor@texas.cygnus.com>
+
+       The following changes were made by Jim Blandy <jimb@cygnus.com>,
+       Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
+       <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
+       Taylor <taylor@cygnus.com>, as part of the project to merge in
+       changes originally made by HP; HP did not create ChangeLog
+       entries.
+       
+       * annotate.c: (annotate_catchpoint): New function.
+
+       * annotate.h: (annotate_catchpoint): declare it; add new includes
+       (symtab.h and gdbtypes.h).
+
+       * buildsym.h: added external var processing_hp_compilation.
+
+       * coff-solib.h: 
+       (SOLIB_REMOVE_INFERIOR_HOOK): new macro. defined to 0.
+       functionality not implemented for coff.
+       (SOLIB_CREATE_CATCH_LOAD_HOOK): New macro; generate error msg for coff.
+       (SOLIB_CREATE_CATCH_UNLOAD_HOOK): ditto.
+       (SOLIB_HAVE_LOAD_EVENT): ditto.
+       (SOLIB_LOADED_LIBRARY_PATHNAME): ditto.
+       (SOLIB_HAVE_UNLOAD_EVENT): ditto.
+       (SOLIB_UNLOADED_LIBRARY_PATHNAME): ditto.
+       (SOLIB_IN_DYNAMIC_LINKER): ditto.
+       (SOLIB_RESTART): ditto.
+
+       * complaints.h: add ifdef...endif pair at beginning and end of file.
+
+       * dstread.c (dst_symfile_read): the parameter to fileno
+       must be of type FILE *. So cast abfd->iostream in the 
+       call to fileno must be cast as a FILE *, not a GDB_FILE *.
+       This will work because abfd->iostream is declared and 
+       given a value in bdf and bfd will continue to use FILE 
+       rather than GDB_FILE.
+
+       * dwarf2read.c (dwarf_bool_name): change parameter from bool
+       to mybool.  sigh.
+
+       * expression.h: include symtab.h
+       
+       * frame.h (print_only_stack_frame, show_stack_frame,
+       show_frame_info): add prototypes.
+
+       * gdbcmd.h (togglelist, stoplist): declare.
+
+       * gdbcore.h (read_memory_string): declare it.
+       (exec_file_attach): add prototype.
+
+       * inflow.c (terminal_is_ours): make non static.
+
+       * minsyms.c: minor spacing change.
+
+       * parser-defs.h (parse_nested_classes_for_hpacc): add prototype.
+       (find_template_name_end): add prototype.
+
+       * scm-lang.c (scm_unpack): cast svalue to (int).
+
+       * top.h: declare it.
+       
+       * valprint.h: (print_binary_chars): new prototype definition.
+       (print_octal_chars): new prototype definition.
+       (print_decimal_chars): new prototype definition.
+
 Thu Dec 10 07:14:56 1998  Andrew Cagney  <cagney@chook>
 
        * config/arm/tm-arm.h, arm-tdep.c: Replace REGISTER_NAMES with
index ccb35e202b25792cb74e7ba03758618a0bdccbac..ec3e4245c9bd41a56203c47144ddac7e0b348c4e 100644 (file)
@@ -64,6 +64,14 @@ annotate_breakpoint (num)
     printf_filtered ("\n\032\032breakpoint %d\n", num);
 }
 
+void
+annotate_catchpoint (num)
+     int num;
+{
+  if (annotation_level > 1)
+    printf_filtered ("\n\032\032catchpoint %d\n", num);
+}
+
 void
 annotate_watchpoint (num)
      int num;
index 3aad4d04c180bbf46b7624bc1770fc389592c7b7..59739db68dadd436148e53ca86bdf25f49afeb60 100644 (file)
@@ -17,9 +17,13 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#include "symtab.h"
+#include "gdbtypes.h"
+
 extern void breakpoints_changed PARAMS ((void));
 
 extern void annotate_breakpoint PARAMS ((int));
+extern void annotate_catchpoint PARAMS ((int));
 extern void annotate_watchpoint PARAMS ((int));
 extern void annotate_starting PARAMS ((void));
 extern void annotate_stopped PARAMS ((void));
index 5cf7548345a69900d4341e87dec81e4c2db10d8e..feb22a17d0417ad64dab5d363628b60269422dc4 100644 (file)
@@ -80,6 +80,16 @@ EXTERN unsigned char processing_gcc_compilation;
 
 EXTERN unsigned char processing_acc_compilation;
 
+/* elz: added this flag to know when a block is compiled with HP
+   compilers (cc, aCC). This is necessary because of the macro
+   COERCE_FLOAT_TO_DOUBLE defined in tm_hppa.h, which causes
+   a coercion of float to double to always occur in parameter passing
+   for a function called by gdb (see the function value_arg_coerce in 
+   valops.c). This is necessary only if the target
+   was compiled with gcc, not with HP compilers or with g++ */
+
+EXTERN unsigned char processing_hp_compilation;
+
 /* Count symbols as they are processed, for error messages.  */
 
 EXTERN unsigned int symnum;
@@ -105,6 +115,8 @@ EXTERN struct pending *global_symbols;      /* global functions and variables */
 
 EXTERN struct pending *local_symbols;  /* everything local to lexic context */
 
+EXTERN struct pending *param_symbols;  /* func params local to lexic context */
+
 /* Stack representing unclosed lexical contexts
    (that will become blocks, eventually).  */
 
@@ -114,6 +126,10 @@ struct context_stack
 
   struct pending *locals;
 
+  /* Pending func params at the time we entered */
+
+  struct pending *params;
+
   /* Pointer into blocklist as of entry */
 
   struct pending_block *old_blocks;
@@ -275,6 +291,9 @@ record_pending_block PARAMS ((struct objfile *, struct block *,
 extern void
 record_debugformat PARAMS ((char *));
 
+extern void
+merge_symbol_lists PARAMS ((struct pending **, struct pending **));
+
 #undef EXTERN
 
 #endif /* defined (BUILDSYM_H) */
index d154234deb88da6366af8f6ba54279d638f7ce40..43375ccd460a97962da24f519a3ce77d91f9ef6d 100644 (file)
@@ -49,6 +49,136 @@ coff_solib_add PARAMS ((char *, int, struct target_ops *));
 extern void
 coff_solib_create_inferior_hook PARAMS((void));        /* solib.c */
 
+/* Function to be called to remove the connection between debugger and
+   dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
+   (This operation does not remove shared library information from
+   the debugger, as CLEAR_SOLIB does.)
+
+   This functionality is presently not implemented for this target.
+   */
+#define SOLIB_REMOVE_INFERIOR_HOOK(PID) (0)
+
+/* This function is called by the "catch load" command.  It allows
+   the debugger to be notified by the dynamic linker when a specified
+   library file (or any library file, if filename is NULL) is loaded.
+
+   Presently, this functionality is not implemented.
+   */
+#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+
+/* This function is called by the "catch unload" command.  It allows
+   the debugger to be notified by the dynamic linker when a specified
+   library file (or any library file, if filename is NULL) is unloaded.
+
+   Presently, this functionality is not implemented.
+   */
+#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename,cond_string) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+
+/* This function returns TRUE if the dynamic linker has just reported
+   a load of a library.
+
+   This function must be used only when the inferior has stopped in
+   the dynamic linker hook, or undefined results are guaranteed.
+
+   Presently, this functionality is not implemented.
+   */
+/*
+#define SOLIB_HAVE_LOAD_EVENT(pid) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+*/
+
+#define SOLIB_HAVE_LOAD_EVENT(pid) \
+(0)
+
+/* This function returns a pointer to the string representation of the
+   pathname of the dynamically-linked library that has just been loaded.
+
+   This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
+   or undefined results are guaranteed.
+
+   This string's contents are only valid immediately after the inferior
+   has stopped in the dynamic linker hook, and becomes invalid as soon
+   as the inferior is continued.  Clients should make a copy of this
+   string if they wish to continue the inferior and then access the string.
+
+   Presently, this functionality is not implemented.
+   */
+
+/*
+#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+*/
+
+#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
+(0)
+
+/* This function returns TRUE if the dynamic linker has just reported
+   an unload of a library.
+
+   This function must be used only when the inferior has stopped in
+   the dynamic linker hook, or undefined results are guaranteed.
+
+   Presently, this functionality is not implemented.
+   */
+/*
+#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+*/
+
+#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
+(0)
+
+/* This function returns a pointer to the string representation of the
+   pathname of the dynamically-linked library that has just been unloaded.
+
+   This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
+   or undefined results are guaranteed.
+
+   This string's contents are only valid immediately after the inferior
+   has stopped in the dynamic linker hook, and becomes invalid as soon
+   as the inferior is continued.  Clients should make a copy of this
+   string if they wish to continue the inferior and then access the string.
+
+   Presently, this functionality is not implemented.
+   */
+/*
+#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+*/
+
+#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
+(0)
+
+/* This function returns TRUE if pc is the address of an instruction that
+   lies within the dynamic linker (such as the event hook, or the dld
+   itself).
+
+   This function must be used only when a dynamic linker event has been
+   caught, and the inferior is being stepped out of the hook, or undefined
+   results are guaranteed.
+
+   Presently, this functionality is not implemented.
+   */
+
+/*
+#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
+   error("catch of library loads/unloads not yet implemented on this platform")
+*/
+
+#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
+(0)
+
+/* This function must be called when the inferior is killed, and the program
+   restarted.  This is not the same as CLEAR_SOLIB, in that it doesn't discard
+   any symbol tables.
+
+   Presently, this functionality is not implemented.
+   */
+#define SOLIB_RESTART() \
+  (0)
+
 /* If we can't set a breakpoint, and it's in a shared library, just
    disable it.  */
 
index 022bc19c3993576fcc5cf48b0a718b190608b6b8..4b9b5de5236bc1e6255d5d959e8248400a504ed1 100644 (file)
@@ -18,6 +18,10 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
+#if !defined (COMPLAINTS_H)
+#define COMPLAINTS_H
+
+
 /* Support for complaining about things in the symbol file that aren't
    catastrophic.
 
@@ -44,3 +48,6 @@ complain PARAMS ((struct complaint *, ...));
 
 extern void
 clear_complaints PARAMS ((int, int));
+
+
+#endif /* !defined (COMPLAINTS_H) */
index f0d2a980623ff321e982cfa7449dab3ba60032b3..d23f9f6ed415d4c8ad81d39b7e9881b38b5b59d0 100644 (file)
@@ -277,7 +277,7 @@ dst_symfile_read (objfile, section_offsets, mainline)
   symfile_bfd = abfd;                  /* Kludge for swap routines */
 
 /* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
-   desc = fileno ((GDB_FILE *)(abfd->iostream));       /* File descriptor */
+   desc = fileno ((FILE *)(abfd->iostream));   /* File descriptor */
 
   /* Read the line number table, all at once.  */
   bfd_map_over_sections (abfd, find_dst_sections, (PTR)NULL);
index ea0af4012ddb42095112e695d9c4673bf82e6680..54c8e4413963a6cc4a8e9bff6da7aa84a85d56c5 100644 (file)
@@ -5344,10 +5344,10 @@ dwarf_stack_op_name (op)
 }
 
 static char *
-dwarf_bool_name (bool)
-     unsigned bool;
+dwarf_bool_name (mybool)
+     unsigned mybool;
 {
-  if (bool)
+  if (mybool)
     return "TRUE";
   else
     return "FALSE";
index 634765fcac3dbb5592353bab19cb5c7f894c2c63..fe542e1c8e5dbaa54378283696d27acb0cadca71 100644 (file)
@@ -115,29 +115,25 @@ struct dummy_frame
    is the outermost one and has no caller.
 
    If a particular target needs a different definition, then it can override
-   the definition here by providing one in the tm file. */
+   the definition here by providing one in the tm file.
 
-#if !defined (FRAME_CHAIN_VALID)
+   XXXX - both default and alternate frame_chain_valid functions are
+   deprecated.  New code should use generic dummy frames. */
 
-#if defined (FRAME_CHAIN_VALID_ALTERNATE)
+extern int default_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
+extern int alternate_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
+extern int nonnull_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
+extern int generic_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
 
+#if !defined (FRAME_CHAIN_VALID)
+#if !defined (FRAME_CHAIN_VALID_ALTERNATE)
+#define FRAME_CHAIN_VALID(chain, thisframe) default_frame_chain_valid (chain, thisframe)
+#else
 /* Use the alternate method of avoiding running up off the end of the frame
    chain or following frames back into the startup code.  See the comments
    in objfiles.h. */
-   
-#define FRAME_CHAIN_VALID(chain, thisframe)    \
-  ((chain) != 0                                        \
-   && !inside_main_func ((thisframe) -> pc)    \
-   && !inside_entry_func ((thisframe) -> pc))
-
-#else
-
-#define FRAME_CHAIN_VALID(chain, thisframe)    \
-  ((chain) != 0                                        \
-   && !inside_entry_file (FRAME_SAVED_PC (thisframe)))
-
+#define FRAME_CHAIN_VALID(chain, thisframe) alternate_frame_chain_valid (chain,thisframe)
 #endif /* FRAME_CHAIN_VALID_ALTERNATE */
-
 #endif /* FRAME_CHAIN_VALID */
 
 /* The stack frame that the user has specified for commands to act on.
@@ -195,12 +191,18 @@ extern struct frame_info *find_relative_frame PARAMS ((struct frame_info *, int*
 
 extern void print_stack_frame PARAMS ((struct frame_info *, int, int));
 
+extern void print_only_stack_frame PARAMS ((struct frame_info *, int, int));
+
+extern void show_stack_frame PARAMS ((struct frame_info *));
+
 extern void select_frame PARAMS ((struct frame_info *, int));
 
 extern void record_selected_frame PARAMS ((CORE_ADDR *, int *));
 
 extern void print_frame_info PARAMS ((struct frame_info *, int, int, int));
 
+extern void show_frame_info PARAMS ((struct frame_info *, int, int, int));
+
 extern CORE_ADDR find_saved_register PARAMS ((struct frame_info *, int));
 
 extern struct frame_info *block_innermost_frame PARAMS ((struct block *));
@@ -209,12 +211,11 @@ extern struct frame_info *find_frame_addr_in_frame_chain PARAMS ((CORE_ADDR));
 
 extern CORE_ADDR sigtramp_saved_pc PARAMS ((struct frame_info *));
 
-extern int       generic_frame_chain_valid   PARAMS ((CORE_ADDR, 
-                                                     struct frame_info *));
 extern CORE_ADDR generic_read_register_dummy PARAMS ((CORE_ADDR pc, 
                                                      CORE_ADDR fp, 
                                                      int));
 extern void      generic_push_dummy_frame    PARAMS ((void));
+extern void      generic_pop_current_frame   PARAMS ((void (*) (struct frame_info *)));
 extern void      generic_pop_dummy_frame     PARAMS ((void));
 
 extern int       generic_pc_in_call_dummy    PARAMS ((CORE_ADDR pc, 
@@ -223,10 +224,10 @@ extern char *    generic_find_dummy_frame    PARAMS ((CORE_ADDR pc,
                                                      CORE_ADDR fp));
 
 #ifdef __GNUC__
+/* Some native compilers, even ones that are supposed to be ANSI and for which __STDC__
+   is true, complain about forward decls of enums. */
 enum lval_type;
-#endif
-
 extern void     generic_get_saved_register  PARAMS ((char *, int *, CORE_ADDR *, struct frame_info *, int, enum lval_type *));
-
+#endif
 
 #endif /* !defined (FRAME_H)  */
index 30ecc908958622d11902a1305bda450fe88f6cc1..a271c9180c1e49537bb34e59dea8c55f1617f679 100644 (file)
@@ -142,7 +142,7 @@ lookup_minimal_symbol (name, sfile, objf)
 #endif
                      break;
 
-                   case mst_solib_trampoline:
+                    case mst_solib_trampoline:
 
                      /* If a trampoline symbol is found, we prefer to
                         keep looking for the *real* symbol. If the
index fed54110e37fcbce698c3ee27f43073933e0248d..3226fdd8ad1dce34efd4f22d26ddffbbf8a15fe6 100644 (file)
@@ -112,6 +112,10 @@ extern void write_exp_msymbol PARAMS ((struct minimal_symbol *,
 
 extern void write_dollar_variable PARAMS ((struct stoken str));
 
+extern struct symbol * parse_nested_classes_for_hpacc PARAMS ((char *, int, char **, int *, char **));
+
+extern char * find_template_name_end PARAMS ((char *));
+
 extern void
 start_arglist PARAMS ((void));
 
index 82b6a1c8fd388bab81b9cca79e8771d83569841b..7f31ba434833276118e3a115b93790379a1489b4 100644 (file)
@@ -105,7 +105,7 @@ scm_unpack (type, valaddr, context)
          else
            return 1;
        }
-      switch (7 & svalue)
+      switch (7 & (int) svalue)
        {
        case 2:  case 6: /* fixnum */
          return svalue >> 2;
@@ -114,7 +114,7 @@ scm_unpack (type, valaddr, context)
            return SCM_ICHR (svalue);
          else if (SCM_IFLAGP (svalue))
            {
-             switch (svalue)
+             switch ((int) svalue)
                {
 #ifndef SICP
                case SCM_EOL:
index c85b32389882dda8b1fdbe41826e6080bb62102c..fe7002b6091a569e7ffd88f6eb904ad5123c7da0 100644 (file)
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -52,7 +52,14 @@ extern void command_loop PARAMS ((void));
 extern int quit_confirm PARAMS ((void));
 extern void quit_force PARAMS ((char *, int));
 extern void quit_command PARAMS ((char *, int));
+
+/* This function returns a pointer to the string that is used
+   by gdb for its command prompt. */
 extern char *get_prompt PARAMS((void));
+/* This function copies the specified string into the string that
+   is used by gdb for its command prompt. */
+extern void set_prompt PARAMS ((char *));
 
 /* From random places.  */
 extern int mapped_symbol_files;
index fb3e859c2db04f5ed796c1717b759663646df863..e6edb15c650414349ae3f74572369e7fa948884b 100644 (file)
@@ -43,3 +43,12 @@ val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
 extern void
 val_print_type_code_int PARAMS ((struct type *, char *, GDB_FILE *));
 
+extern void
+print_binary_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+extern void
+print_octal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+extern void
+print_decimal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+