diff options
author | David Taylor <taylor@redhat.com> | 1998-12-10 21:25:43 +0000 |
---|---|---|
committer | David Taylor <taylor@redhat.com> | 1998-12-10 21:25:43 +0000 |
commit | 4770ff087a88ed81794edb49d9558acbdd0a22a5 (patch) | |
tree | 3474d41502fb5afd58f43f6146b371f691ca1de3 | |
parent | 51d57b0aa645837382c51d0053b0c75ef30c63a2 (diff) | |
download | gdb-4770ff087a88ed81794edb49d9558acbdd0a22a5.zip gdb-4770ff087a88ed81794edb49d9558acbdd0a22a5.tar.gz gdb-4770ff087a88ed81794edb49d9558acbdd0a22a5.tar.bz2 |
Start of HP merge changes to GDB.
-rw-r--r-- | gdb/ChangeLog | 65 | ||||
-rw-r--r-- | gdb/annotate.c | 8 | ||||
-rw-r--r-- | gdb/annotate.h | 4 | ||||
-rw-r--r-- | gdb/buildsym.h | 19 | ||||
-rw-r--r-- | gdb/coff-solib.h | 130 | ||||
-rw-r--r-- | gdb/complaints.h | 7 | ||||
-rw-r--r-- | gdb/dstread.c | 2 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 6 | ||||
-rw-r--r-- | gdb/frame.h | 43 | ||||
-rw-r--r-- | gdb/minsyms.c | 2 | ||||
-rw-r--r-- | gdb/parser-defs.h | 4 | ||||
-rw-r--r-- | gdb/scm-lang.c | 4 | ||||
-rw-r--r-- | gdb/top.h | 7 | ||||
-rw-r--r-- | gdb/valprint.h | 9 |
14 files changed, 282 insertions, 28 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a25bc0d..d607c5d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/annotate.c b/gdb/annotate.c index ccb35e2..ec3e424 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -65,6 +65,14 @@ annotate_breakpoint (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; { diff --git a/gdb/annotate.h b/gdb/annotate.h index 3aad4d0..59739db 100644 --- a/gdb/annotate.h +++ b/gdb/annotate.h @@ -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)); diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 5cf7548..feb22a1 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -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) */ diff --git a/gdb/coff-solib.h b/gdb/coff-solib.h index d154234..43375cc 100644 --- a/gdb/coff-solib.h +++ b/gdb/coff-solib.h @@ -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. */ diff --git a/gdb/complaints.h b/gdb/complaints.h index 022bc19..4b9b5de 100644 --- a/gdb/complaints.h +++ b/gdb/complaints.h @@ -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) */ diff --git a/gdb/dstread.c b/gdb/dstread.c index f0d2a98..d23f9f6 100644 --- a/gdb/dstread.c +++ b/gdb/dstread.c @@ -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); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ea0af40..54c8e44 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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"; diff --git a/gdb/frame.h b/gdb/frame.h index 634765f..fe542e1 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -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) */ diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 30ecc90..a271c91 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -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 diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index fed5411..3226fdd 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -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)); diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 82b6a1c..7f31ba4 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -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: @@ -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; diff --git a/gdb/valprint.h b/gdb/valprint.h index fb3e859..e6edb15 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -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)); + |