Start of HP merge changes to GDB.

This commit is contained in:
David Taylor 1998-12-10 21:25:43 +00:00
parent 51d57b0aa6
commit 4770ff087a
14 changed files with 283 additions and 29 deletions

View 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

View 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;

View 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));

View 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) */

View 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. */

View 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) */

View 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);

View 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";

View 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.
XXXX - both default and alternate frame_chain_valid functions are
deprecated. New code should use generic dummy frames. */
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)
#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;
extern void generic_get_saved_register PARAMS ((char *, int *, CORE_ADDR *, struct frame_info *, int, enum lval_type *));
#endif
extern void generic_get_saved_register PARAMS ((char *, int *, CORE_ADDR *, struct frame_info *, int, enum lval_type *));
#endif /* !defined (FRAME_H) */

View 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

View 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));

View 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:

View File

@ -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;

View 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));