Commit Graph

118 Commits

Author SHA1 Message Date
Theodore A. Roth e76c5fcc46 * blockframe.c (frameless_look_for_prologue): Remove unused
after_prologue variable.
2003-05-23 17:05:19 +00:00
Mark Kettenis 2cdd89cb84 * blockframe.c (get_pc_function_start): Rewrite to avoid
asignments in if-statements.
2003-05-23 16:59:13 +00:00
Elena Zannoni 176620f10b 2003-05-14 Elena Zannoni <ezannoni@redhat.com>
* symtab.h (enum domain_enum): Rename from namespace_enum.
	(UNDEF_DOMAIN, VAR_DOMAIN, STRUCT_DOMAIN, LABEL_DOMAIN,
	VARIABLES_DOMAIN, FUNCTIONS_DOMAIN, TYPES_DOMAIN, METHODS_DOMAIN):
	Rename from UNDEF_NAMESPACE, VAR_NAMESPACE, STRUCT_NAMESPACE,
	LABEL_NAMESPACE, VARIABLES_NAMESPACE, FUNCTIONS_NAMESPACE,
	TYPES_NAMESPACE, METHODS_NAMESPACE.
	(SYMBOL_NAMESPACE): Rename to SYMBOL_DOMAIN.
	(struct symbol, struct partial_symbol): Rename field
	'namespace_enum namespace' to 'domain_enum domain'.
	(PSYMBOL_NAMESPACE): Rename to PSYMBOL_DOMAIN.
	Delete old define kludge for namespace.

	* ada-exp.y, ada-lang.c, ada-lang.h, alpha-tdep.c, arm-tdep.c,
	blockframe.c, c-exp.y, c-valprint.c, coffread.c, dbxread.c,
	dwarf2read.c, dwarfread.c, f-exp.y, gdbtypes.c, gdbtypes.h,
	gnu-v3-abi.c, hppa-tdep.c, hpread.c, jv-exp.y, jv-lang.c,
	language.c, linespec.c, m2-exp.y, m3-nat.c, mdebugread.c,
	mips-tdep.c, nlmread.c, objc-exp.y, objc-lang.c, objfiles.c,
	p-exp.y, p-valprint.c, parse.c, printcmd.c, scm-lang.c, source.c,
	stabsread.c, stack.c, symfile.c, symfile.h, symmisc.c, symtab.c,
	valops.c, values.c, xcoffread.c, xstormy16-tdep.c: Replace all
	occurrences of the above.

2003-05-12  Elena Zannoni  <ezannoni@redhat.com>

	* mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to
	VAR_DOMAIN.
2003-05-14 17:43:20 +00:00
Andrew Cagney 0ba6dca974 2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_TARGET_READ_FP): Replace TARGET_READ_FP.
	(DEPRECATED_FP_REGNUM): Replace FP_REGNUM.
	* gdbarch.h, gdbarch.c: Re-generate.
	* infcall.c (call_function_by_hand): Use DEPRECATED_FP_REGNUM,
	DEPRECATED_TARGET_READ_FP, or "sp" to create the dummy frame ID.
	* inferior.h (deprecated_read_fp): Rename read_fp.
	(generic_target_read_fp): Delete declaration.
	* regcache.c (generic_target_read_fp): Delete function.
	(deprecated_read_fp): Replace read_fp, use
	DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM.
	* d10v-tdep.c (d10v_read_fp): Delete function.
	(d10v_gdbarch_init): Do not set deprecated_read_fp.

	* sparc-tdep.c (sparc_gdbarch_init): Do not set
	deprecated_target_read_fp to generic_target_read_fp.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.

	* xstormy16-tdep.c (xstormy16_gdbarch_init): Set
	deprecated_fp_regnum.
	* x86-64-tdep.c (x86_64_init_abi): Ditto.
	* vax-tdep.c (vax_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68k-tdep.c (m68k_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* hppa-tdep.c (hppa_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.
	* alpha-tdep.c (alpha_gdbarch_init): Ditto.

	* x86-64-tdep.c (x86_64_init_abi): Set deprecated_target_read_fp.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* hppa-tdep.c (hppa_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.

	* vax-tdep.c (vax_frame_init_saved_regs): Replace FP_REGNUM with
	DEPRECATED_FP_REGNUM.
	(vax_push_dummy_frame, vax_pop_frame): Ditto.
	* std-regs.c (value_of_builtin_frame_fp_reg): Ditto.
	* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
	(sparc_push_dummy_frame, sparc64_read_fp): Ditto.
	(sparc32_register_virtual_type): Ditto.
	* sh-tdep.c (sh64_frame_chain): Ditto.
	(sh64_get_saved_register, sh64_pop_frame): Ditto.
	(sh_nofp_frame_init_saved_regs): Ditto.
	(sh64_nofp_frame_init_saved_regs): Ditto.
	(sh_fp_frame_init_saved_regs): Ditto.
	* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
	* remote-e7000.c (fetch_regs_from_dump): Ditto.
	* procfs.c (procfs_fetch_registers): Ditto.
	(procfs_store_registers): Ditto.
	* ns32knbsd-nat.c (fetch_inferior_registers): Ditto.
	(store_inferior_registers, fetch_core_registers): Ditto.
	(fetch_kcore_registers, clear_regs): Ditto.
	* ns32k-tdep.c (ns32k_frame_init_saved_regs): Ditto.
	(ns32k_push_dummy_frame, ns32k_pop_frame): Ditto.
	* nlm/i386.h (DEPRECATED_FP_REGNUM): Ditto.
	* nlm/i386.c (do_status): Ditto.
	* mipsv4-nat.c (supply_gregset): Ditto.
	* mips-tdep.c: Ditto for comments.
	* mips-nat.c (fetch_inferior_registers): Ditto.
	(store_inferior_registers, fetch_core_registers): Ditto.
	* m68k-tdep.c (m68k_push_dummy_frame): Ditto.
	(m68k_pop_frame, m68k_frame_init_saved_regs): Ditto.
	* i386-tdep.c (i386_frame_init_saved_regs): Ditto.
	(i386_do_pop_frame, i386_register_type): Ditto.
	* hppa-tdep.c (hppa_frame_chain): Ditto.
	(hppa_push_dummy_frame, find_dummy_frame_regs): Ditto.
	(hppa_pop_frame, hppa_read_fp): Ditto.
	(skip_prologue_hard_way, hppa_frame_find_saved_regs): Ditto.
	* cris-tdep.c (cris_examine, cris_pop_frame): Ditto.
	* config/vax/nm-vax.h (REGISTER_U_ADDR): Ditto.
	* config/sparc/tm-sparc.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/sparc/tm-sp64.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/s390/tm-s390.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/pa/tm-hppa64.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/ia64/tm-ia64.h (DEPRECATED_FP_REGNUM): Ditto.
	* blockframe.c: Ditto for comments.
	* arch-utils.h: Ditto for comments.
	* arch-utils.c (legacy_virtual_frame_pointer): Ditto.
	* alphanbsd-tdep.c (fetch_core_registers): Ditto.
	* alphabsd-nat.c (fetch_inferior_registers): Ditto.
	* alpha-tdep.h: Ditto for comments.
	* alpha-tdep.c (alpha_cannot_fetch_register): Ditto.
	(alpha_cannot_store_register): Ditto.
	(alpha_push_dummy_frame): Ditto.
	* alpha-nat.c (supply_gregset): Ditto.

	* config/sparc/tm-sp64.h (DEPRECATED_TARGET_READ_FP): Update.
	* config/pa/tm-hppa64.h (DEPRECATED_TARGET_READ_FP): Update.
	* config/sparc/tm-sparc.h: Update comment.

	* hppa-tdep.c (hppa_init_extra_frame_info): Use
	deprecated_read_fp instead of TARGET_READ_FP.
	(hppa_init_extra_frame_info, hppa_frame_chain): Ditto.
	(hppa_push_dummy_frame, hppa_read_fp): Ditto.
	* sparc-tdep.c (sparc_init_extra_frame_info): Use
	deprecated_read_fp instead of read_fp.
	* s390-tdep.c (s390_push_arguments): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* frame.h: Ditto in comments.
	* frame.c (legacy_get_prev_frame): Ditto.
	* dummy-frame.c (dummy_frame_this_id): Ditto.
	* arm-tdep.c (arm_init_extra_frame_info): Ditto.

2003-04-28  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Replace
	read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp,
	DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
2003-04-29 01:49:49 +00:00
Corinna Vinschen 7c86889b04 * blockframe.c (legacy_frame_chain_valid): Move call to
DEPRECATED_FRAME_CHAIN_VALID before calls to inside_entry_func and
	inside_entry_file.
2003-04-10 11:12:30 +00:00
Andrew Cagney e6ba3bc976 2003-04-06 Andrew Cagney <cagney@redhat.com>
* frame.h (legacy_frame_chain_valid): Rename frame_chain_valid.
	Update comment.
	* frame.c (legacy_saved_regs_this_id): Update.
	(legacy_get_prev_frame): Update.
	* xstormy16-tdep.c: Update comment.
	* sparc-tdep.c (sparc_frame_chain): Update comment.
	* blockframe.c (legacy_frame_chain_valid): Update.
2003-04-06 18:36:23 +00:00
Andrew Cagney be41e9f456 2003-04-05 Andrew Cagney <cagney@redhat.com>
* frame.c (frame_func_unwind, get_frame_func): New functions.
	* frame.h (get_frame_func, frame_func_unwind): Declare.
	(struct frame_info): Add field "prev_func" for caching the
	previous frame's function address.
	* arm-tdep.c (arm_frameless_function_invocation): Combine
	get_pc_function_start and get_frame_pc into get_frame_func.
	* sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto.
	(sh64_nofp_frame_init_saved_regs): Ditto.
	* s390-tdep.c (s390_function_start): Ditto.
	* rs6000-tdep.c (rs6000_pop_frame): Ditto.
	(rs6000_frameless_function_invocation): Ditto.
	(rs6000_frame_saved_pc): Ditto.
	* m68k-tdep.c (m68k_frame_init_saved_regs): Ditto.
	* ia64-tdep.c (ia64_frame_init_saved_regs): Ditto.
	* i386-tdep.c (i386_frameless_signal_p): Ditto.
	(i386_frame_init_saved_regs): Ditto.
	* hppa-tdep.c (hppa_frame_find_saved_regs): Ditto.
	* d10v-tdep.c (d10v_frame_unwind_cache): Combine
	get_pc_function_start and frame_pc_unwind into frame_func_unwind.
	* cris-tdep.c (cris_frame_init_saved_regs): Ditto.
	* blockframe.c (frameless_look_for_prologue): Ditto.
2003-04-05 18:54:38 +00:00
Andrew Cagney 618ce49fa2 Index: ChangeLog
2003-03-23  Andrew Cagney  <cagney@redhat.com>

	* gdbarch.sh (DEPRECATED_FRAME_CHAIN): Replace FRAME_CHAIN.
	(DEPRECATED_FRAME_CHAIN_VALID): Replace FRAME_CHAIN_VALID.
	* gdbarch.h, gdbarch.c: Regenerate.
	* valops.c (hand_function_call): Update.
	* objfiles.h (DEPRECATED_FRAME_CHAIN_VALID): Update.
	* frame.c (legacy_saved_regs_this_id): Update.
	(legacy_get_prev_frame, get_prev_frame, legacy_frame_p): Update.
	* dummy-frame.h: Update.
	* config/sparc/tm-sparc.h (DEPRECATED_FRAME_CHAIN): Update.
	* config/pa/tm-hppa.h (DEPRECATED_FRAME_CHAIN_VALID): Update.
	* config/m68k/tm-vx68.h (DEPRECATED_FRAME_CHAIN): Update.
	* config/m68k/tm-os68k.h (DEPRECATED_FRAME_CHAIN): Update.
	* config/m68k/tm-sun3.h: Update.
	* blockframe.c (inside_main_func, frame_chain_valid): Update.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
	* x86-64-tdep.c (x86_64_init_abi): Update.
	* vax-tdep.c (vax_gdbarch_init): Update.
	* v850-tdep.c (v850_gdbarch_init): Update.
	* sparc-tdep.c (sparc_frame_chain, sparc_gdbarch_init): Update.
	* sh-tdep.c (sh_gdbarch_init): Update.
	* s390-tdep.c (s390_gdbarch_init): Update.
	* rs6000-tdep.c (rs6000_frame_saved_pc): Update.
	(rs6000_gdbarch_init, rs6000_frame_saved_pc): Update.
	(frame_get_saved_regs): Update.
	* ppc-linux-tdep.c (ppc_linux_init_abi): Update.
	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
	* mn10300-tdep.c (mn10300_gdbarch_init): Update.
	* mips-tdep.c (mips_gdbarch_init): Update.
	* mcore-tdep.c (mcore_gdbarch_init): Update.
	* m68k-tdep.c (m68k_gdbarch_init): Update.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
	* ia64-tdep.c (ia64_gdbarch_init): Update.
	* i386-tdep.c (i386_frame_num_args, i386_gdbarch_init): Update.
	* i386-interix-tdep.c (i386_interix_init_abi): Update.
	(i386_interix_back_one_frame): Update.
	* hppa-tdep.c (hppa_gdbarch_init): Update.
	(hppa_init_extra_frame_info): Update.
	* h8300-tdep.c (h8300_gdbarch_init): Update.
	* frv-tdep.c (frv_gdbarch_init): Update.
	* cris-tdep.c (cris_gdbarch_init): Update.
	* avr-tdep.c (avr_gdbarch_init): Update.
	* arm-tdep.c (arm_gdbarch_init): Update.
	* alpha-tdep.c (alpha_gdbarch_init): Update.

Index: doc/ChangeLog
2003-03-23  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Algorithms, Target Architecture Definition):
	Deprecate FRAME_CHAIN and FRAME_CHAIN_VALID.
2003-03-24 03:54:51 +00:00
David Carlton 22abf04a5d 2003-02-25 David Carlton <carlton@math.stanford.edu>
* symtab.h (SYMBOL_NATURAL_NAME): New macro.
	(SYMBOL_LINKAGE_NAME): Ditto.
	(SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and
	SYMBOL_LINKAGE_NAME.
	(struct general_symbol_info): Expand comment.
	(DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME.
	(SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME.
	(SYMBOL_MATCHES_REGEXP): Ditto.
	* symtab.c (symbol_natural_name): New function.
	* objfiles.h: Replace all uses of SYMBOL_NAME by
	DEPRECATED_SYMBOL_NAME.
	* xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto.
	* symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto.
	* somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto.
	* printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto.
	* minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto.
	* i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto.
	* gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto.
	* dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto.
	* cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto.
	* blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto.
	* ada-exp.y: Ditto.
	* ada-exp.y: Update copyright.
	* sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto.
	* cp-valprint.c: Ditto.

2003-02-25  David Carlton  <carlton@math.stanford.edu>

	* generic/gdbtk.h: Replace all instances of SYMBOL_NAME by
	DEPRECATED_SYMBOL_NAME.
	* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto.
	* generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright.

2003-02-25  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with
	DEPRECATED_SYMBOL_NAME.  Update copyright.
2003-02-25 21:36:23 +00:00
David Carlton fe898f56a1 2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
	(block_h): New.
	(COMMON_OBS): Add block.o.
	(block.o): New.
	(x86-64-tdep.o): Add $(block_h).
	(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
	(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
	(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
	(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
	(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
	(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
	(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
	* value.h: Add opaque declaration for struct block.
	* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
	* ada-lang.h: Ditto.
	* x86-64-tdep.c: #include "block.h"
	* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
	* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
	* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
	* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
	* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
	* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
	* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
	* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
	* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
	(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
	* symtab.c (block_function): Ditto.
	(contained_in): Ditto.
	* frame.h: Move block_for_pc and block_for_pc_sect declarations to
	block.h.  Add opaque declaration for struct block.
	* symtab.h: Move block_function and contained_in declarations to
	block.h.  Add opaque declarations for struct block, struct
	blockvector.
	(struct block): Move to block.h.
	(struct blockvector): Ditto.
	(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
	(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
	(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
	(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
	(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
	Ditto.
	* block.c: New file.
	* block.h: New file.

2003-02-19  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: #include "block.h"
2003-02-20 00:01:07 +00:00
Andrew Cagney 73c1f219a3 2003-01-21 Andrew Cagney <ac131313@redhat.com>
* exec.c (text_start): Delete global variable.
	(exec_file_attach): Make text_start local to the function.
	* inferior.h (BEFORE_TEXT_END, AFTER_TEXT_END): Delete macros.
	* valops.c (hand_function_call): Delete code that handles
	BEFORE_TEXT_END and AFTER_TEXT_END.
	* gdbarch.sh (CALL_DUMMY_LENGTH): Test call_dummy_length instead
	of CALL_DUMMY_LOCATION.
	* gdbarch.c: Regenerate.
	* inferior.h (deprecated_pc_in_call_dummy_before_text_end)
	(deprecated_pc_in_call_dummy_after_text_end): Delete declaration.
	* blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
	(deprecated_pc_in_call_dummy_after_text_end): Delete functions.
	(text_end): Delete extern declaration.
2003-01-21 19:43:48 +00:00
Andrew Cagney eb4f72c5f9 2003-01-21 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_OBSTACK_ZALLOC): Define.
	* blockframe.c (backtrace_below_main): Move to "frame.c".
	(frame_chain_valid): Delete check for backtrace_below_main.
	(_initialize_blockframe): Delete initialization, move ``set
	backtrace-below-main'' command to "frame.c".
	(do_flush_frames_sfunc): Delete function.
	* frame.c: Include "command.h" and "gdbcmd.h".
	(frame_type_from_pc): New function.
	(create_new_frame): Use frame_type_from_pc.
	(legacy_get_prev_frame): New function.
	(get_prev_frame): Rewrite.  When an old style frame, call
	legacy_get_prev_frame.  Otherwize, unwind the PC first.
	(_initialize_frame): Add ``set backtrace-below-main'' command.
	* Makefile.in (frame.o): Update dependencies.
2003-01-21 19:32:42 +00:00
Daniel Jacobowitz 516034834f * arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
* d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
	* hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.

	* blockframe.c: Include "gdbcmd.h" and "command.h".
	(backtrace_below_main): New variable.
	(file_frame_chain_valid, func_frame_chain_valid)
	(nonnull_frame_chain_valid, generic_file_frame_chain_valid)
	(generic_func_frame_chain_valid): Remove functions.
	(frame_chain_valid, do_flush_frames_sfunc): New functions.
	(_initialize_blockframe): New function.
	* Makefile.in (blockframe.o): Update dependencies.
	* frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
	comment.  Call frame_chain_valid ().
	* frame.h: Remove old prototypes.  Add prototype for
	frame_chain_valid and update comments to match.
	* gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
	Remove old comment.
	* gdbarch.h: Regenerated.
	* gdbarch.c: Regenerated.

Plus updates to all other targets not to provide a FRAME_CHAIN_VALID.
2003-01-05 01:39:56 +00:00
Andrew Cagney bdd78e628a 2002-12-07 Andrew Cagney <ac131313@redhat.com>
* f-valprint.c (info_common_command): Use get_frame_pc.
	* std-regs.c (value_of_builtin_frame_pc_reg): Ditto.
	* ax-gdb.c (agent_command): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	(rs6000_pop_frame): Ditto.
	(rs6000_frameless_function_invocation): Ditto.
	(rs6000_frame_saved_pc, frame_get_saved_regs): Ditto.
	(frame_initial_stack_address, rs6000_frame_chain): Ditto.
	* macroscope.c (default_macro_scope): Ditto.
	* stack.c (print_frame_info_base): Ditto.
	(print_frame, frame_info, print_frame_label_vars): Ditto.
	(return_command, func_command, get_frame_language): Ditto.
	* infcmd.c (finish_command): Ditto.
	* dummy-frame.c (cached_find_dummy_frame): Ditto.
	* breakpoint.c (deprecated_frame_in_dummy): Ditto.
	(break_at_finish_at_depth_command_1): Ditto.
	(break_at_finish_command_1): Ditto.
	(until_break_command, get_catch_sals): Ditto.
	* blockframe.c (func_frame_chain_valid): Ditto.
	(frameless_look_for_prologue): Ditto.
	(frame_address_in_block, generic_func_frame_chain_valid): Ditto.
2002-12-09 03:30:44 +00:00
Andrew Cagney 8b36eed86d 2002-12-08 Andrew Cagney <ac131313@redhat.com>
* blockframe.c: Use get_frame_base instead of directly accessing
	the `struct frame_info' member frame.
	* f-valprint.c, std-regs.c, rs6000-tdep.c: Ditto.
	* stack.c, dummy-frame.c, breakpoint.c: Ditto.
2002-12-09 01:40:25 +00:00
Andrew Cagney 75e3c1f98d 2002-12-08 Andrew Cagney <ac131313@redhat.com>
* stack.c (frame_info): Use get_prev_frame.
	* blockframe.c (frame_address_in_block): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	(rs6000_frameless_function_invocation): Ditto.
	(rs6000_frame_saved_pc): Ditto.
	(rs6000_frame_chain): Ditto.
	* arch-utils.c (init_frame_pc_default): Ditto.
2002-12-09 00:32:08 +00:00
Andrew Cagney ae45cd1682 2002-12-01 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Rename
	PC_IN_CALL_DUMMY.  Change to predicate.  Always allow call.
	* gdbarch.h, gdbarch.c: Re-generate.
	* config/sparc/tm-sparc.h, config/sparc/tm-sp64.h: Update.
	* config/mn10200/tm-mn10200.h, config/h8500/tm-h8500.h: Update.
	* config/pa/tm-hppa.h, frame.h: Update.
	* x86-64-tdep.c, vax-tdep.c, sparc-tdep.c: Update.
	* s390-tdep.c, ns32k-tdep.c, mn10300-tdep.c: Update.
	* m68k-tdep.c, i386-tdep.c, frv-tdep.c: Update.
	* cris-tdep.c, alpha-tdep.c: Update.
	* frame.c (set_unwind_by_pc, create_new_frame): Use either
	DEPRECATED_PC_IN_CALL_DUMMY or pc_in_dummy_frame.
	(get_prev_frame): Ditto.

Index: doc/ChangeLog
2002-12-01  Andrew Cagney  <ac131313@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Delete
	PC_IN_CALL_DUMMY.
2002-12-01 19:07:16 +00:00
Andrew Cagney 8c69fc49d5 2002-11-28 Andrew Cagney <cagney@redhat.com>
* stack.c (get_selected_block): In-line get_current_block.
	* frame.h (get_current_block): Delete declaration.
	* blockframe.c (get_current_block): Delete function.
2002-11-29 00:15:48 +00:00
Andrew Cagney 07555a7286 2002-11-28 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Rename
	USE_GENERIC_DUMMY_FRAMES.
	* gdbarch.h, gdbarch.c: Regenerate.
	* valops.c, frame.c: Update.
	* config/z8k/tm-z8k.h, config/mn10200/tm-mn10200.h: Update.
	* config/m32r/tm-m32r.h, config/h8500/tm-h8500.h: Update.
	* config/pa/tm-hppa.h, blockframe.c: Update.
	* vax-tdep.c, sparc-tdep.c, ns32k-tdep.c: Ditto.
	* m68k-tdep.c, alpha-tdep.c: Ditto.

	* arm-tdep.c: Eliminate USE_GENERIC_DUMMY_FRAMES as always 1.
	* mips-tdep.c: Ditto.

Index: doc/ChangeLog
2002-11-28  Andrew Cagney  <ac131313@redhat.com>

	* gdbint.texinfo (Host Definition): Delete documentation on
	USE_GENERIC_DUMMY_FRAMES.
2002-11-28 21:38:44 +00:00
Andrew Cagney b4b8817765 2002-11-26 Andrew Cagney <ac131313@redhat.com>
* inferior.h (deprecated_pc_in_call_dummy_before_text_end): Rename
	pc_in_call_dummy_before_text_end
	(deprecated_pc_in_call_dummy_after_text_end): Rename
	pc_in_call_dummy_after_text_end.
	(deprecated_pc_in_call_dummy_on_stack): Rename
	pc_in_call_dummy_on_stack.
	(deprecated_pc_in_call_dummy_at_entry_point): Rename
	pc_in_call_dummy_at_entry_point.
	* m68k-tdep.c (m68k_gdbarch_init): Update.
	* s390-tdep.c (s390_gdbarch_init): Update.
	* x86-64-tdep.c (x86_64_gdbarch_init): Update.
	* vax-tdep.c (vax_gdbarch_init): Update.
	* sparc-tdep.c (sparc_gdbarch_init): Update.
	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
	* mn10300-tdep.c (mn10300_gdbarch_init): Update.
	* i386-tdep.c (i386_gdbarch_init): Update.
	* frv-tdep.c (frv_gdbarch_init): Update.
	* cris-tdep.c (cris_gdbarch_init): Update.
	* config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Update.
	* blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
	(deprecated_pc_in_call_dummy_after_text_end)
	(deprecated_pc_in_call_dummy_on_stack)
	(deprecated_pc_in_call_dummy_at_entry_point): Update.
	* alpha-tdep.c (alpha_gdbarch_init): Update.
2002-11-26 19:01:30 +00:00
Andrew Cagney 7d8547c960 2002-11-23 Andrew Cagney <ac131313@redhat.com>
* blockframe.c (find_frame_addr_in_frame_chain): Move function
	from here ...
	* varobj.c (find_frame_addr_in_frame_chain): ... to here.
	(varobj_create): Note that frame ID should be used.
	* frame.h (find_frame_addr_in_frame_chain): Delete declaration.
2002-11-24 14:16:38 +00:00
Andrew Cagney 5a203e4405 2002-11-18 Andrew Cagney <ac131313@redhat.com>
* frame.h (enum frame_type): Define.
	(get_frame_type): Declare.
	(struct frame_info): Add field `type'.  Delete field
	signal_handler_caller.
	(deprecated_set_frame_signal_handler_caller): Declare.
	* frame.c (get_frame_type): New function.
	(deprecated_set_frame_type): New function.
	(create_new_frame): Set the frame's type.
	(get_prev_frame): Similar.
	* sparc-tdep.c: Use get_frame_type instead of signal_handler_caller.
	* s390-tdep.c: Ditto.
	* m68klinux-nat.c: Ditto.
	* ns32k-tdep.c: Ditto.
	* x86-64-linux-tdep.c: Ditto.
	* vax-tdep.c: Ditto.
	* rs6000-tdep.c: Ditto.
	* ppc-linux-tdep.c: Ditto.
	* i386-interix-tdep.c: Ditto.
	* mips-tdep.c: Ditto.
	* m68k-tdep.c: Ditto.
	* hppa-tdep.c: Ditto.
	* ia64-tdep.c: Ditto.
	* cris-tdep.c: Ditto.
	* arm-tdep.c: Ditto.
	* alpha-tdep.c: Ditto.
	* i386-tdep.c: Ditto.
	* stack.c: Ditto.
	* ada-lang.c: Ditto.
	* blockframe.c: Update.
	* i386-interix-tdep.c (i386_interix_back_one_frame): Use
	deprecated_set_frame_type instead of signal_handler_caller.
	* ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto.
	* rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
	* breakpoint.h: Delete FIXME suggesting get_frame_type.

Index: tui/ChangeLog
2002-11-18  Andrew Cagney  <ac131313@redhat.com>

	* tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
	signal_handler_caller.
2002-11-18 22:19:33 +00:00
Andrew Cagney f407986f1a 2002-11-15 Andrew Cagney <cagney@redhat.com>
* frame.h (sigtramp_saved_pc): Delete declaration.
	* blockframe.c (sigtramp_saved_pc): Delete function.
	* ns32k-tdep.c (ns32k_sigtramp_saved_pc): New function.
	(ns32k_frame_saved_pc): Call ns32k_sigtramp_saved_pc.
	* vax-tdep.c (vax_sigtramp_saved_pc): New function.
	(vax_frame_saved_pc): Call vax_sigtramp_saved_pc.
2002-11-15 23:24:21 +00:00
Andrew Cagney f18c5a7303 2002-11-15 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_pc_unwind): New function.
	(frame_saved_regs_pc_unwind): New function.
	(frame_register_unwind): Pass unwind_cache instead of
	register_unwind_cache.
	(set_unwind_by_pc): Add unwind_pc parameter, set.
	(create_new_frame): Pass frame->pc_unwind to set_unwind_by_pc.
	(get_prev_frame): Ditto.
	* frame.h (frame_pc_unwind_ftype): Declare.
	(struct frame_info): Add pc_unwind, pc_unwind_cache_p and
	pc_unwind_cache.  Rename register_unwind_cache to unwind_cache.
	(frame_pc_unwind): Declare.
	* dummy-frame.c (dummy_frame_pc_unwind): New function.
	(struct dummy_frame): Add comment mentioning that values are for
	previous frame.
	* dummy-frame.h (dummy_frame_pc_unwind): Declare.
	* blockframe.c (file_frame_chain_valid): Use frame_pc_unwind.
	(generic_file_frame_chain_valid): Ditto.
	* stack.c (frame_info): Ditto.
2002-11-15 22:16:25 +00:00
Andrew Cagney 8971b011f4 2002-11-11 Andrew Cagney <ac131313@redhat.com>
* blockframe.c (sigtramp_saved_pc): Fix tipo. void_func_ptr
	instead of void_code_ptr.
	(sigtramp_saved_pc): Ditto.
2002-11-11 16:23:58 +00:00
Klee Dienes ebe68b2757 2002-11-09 Klee Dienes <kdienes@apple.com>
* blockframe.c (sigtramp_saved_pc): Use
        builtin_type_void_code_ptr, not builtin_type_void_data_ptr (we are
        extracting the PC).  Use TYPE_LENGTH (builtin_type_void_code_ptr)
        instead of (TARGET_PTR_BIT / TARGET_CHAR_BIT).
2002-11-09 19:28:22 +00:00
Andrew Cagney 4c1e7e9d5e 2002-11-08 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (frame.o): Update dependencies.
	* blockframe.c (current_frame, frame_obstack_alloc)
	(frame_saved_regs_zalloc, get_current_frame)
	(set_current_frame, create_new_frame)
	(set_unwind_by_pc, get_next_frame)
	(flush_cached_frames, reinit_frame_cache)
	(frame_saved_regs_register_unwind)
	(deprecated_generic_get_saved_register)
	(get_prev_frame, get_frame_pc, get_frame_saved_regs)
	(_initialize_blockframe): Move frame code from
	here...
	* frame.c: ...to here.  Include "gdb_obstack.h", "gdbcore.h",
	"annotate.h" and "dummy-frame.h".
	(_initialize_frame): New function.
2002-11-08 20:48:55 +00:00
Andrew Cagney 9c1412c1a1 2002-11-08 Andrew Cagney <ac131313@redhat.com>
* blockframe.c: Include "dummy-frame.h".
	(struct dummy_frame, dummy_frame_stack)
	(generic_find_dummy_frame, deprecated_generic_find_dummy_frame)
	(generic_pc_in_call_dummy, deprecated_read_register_dummy)
	(generic_push_dummy_frame, generic_save_dummy_frame_tos)
	(generic_save_call_dummy_addr, generic_pop_current_frame)
	(generic_pop_dummy_frame, generic_fix_call_dummy)
	(generic_fix_call_dummy, generic_call_dummy_register_unwind): Move
	dummy frame code from here...
	* dummy-frame.c: ...to here.  New file.
	* dummy-frame.h: New file.
	(generic_call_dummy_register_unwind): Declare.
	(generic_find_dummy_frame): Declare.
	* Makefile.in (SFILES): Add dummy-frame.c.
	(dummy-frame.o): Specify dependencies.
	(dummy_frame_h): Define.
	(COMMON_OBS): Add dummy-frame.o.
	(blockframe.o): Update dependencies.
2002-11-08 19:42:00 +00:00
Andrew Cagney 4caf0990c1 2002-11-02 Andrew Cagney <cagney@redhat.com>
* regcache.h (deprecated_read_register_gen): Rename
	read_register_gen.
	(deprecated_write_register_gen): Rename write_register_gen.
	* i387-tdep.c: Update.
	* x86-64-linux-nat.c: Update
	* wince.c: Update.
	* thread-db.c: Update.
	* win32-nat.c: Update.
	* mips-tdep.c: Update.
	* d10v-tdep.c: Update.
	* cris-tdep.c: Update.
	* remote-sim.c: Update.
	* remote-rdi.c: Update.
	* remote-rdp.c: Update.
	* frame.c: Update.
	* target.c: Update.
	* blockframe.c: Update.
	* x86-64-tdep.c: Update.
	* xstormy16-tdep.c: Update.
	* sh-tdep.c: Update.
	* s390-tdep.c: Update.
	* rs6000-tdep.c: Update.
	* sparc-tdep.c: Update.
	* i386-tdep.c: Update.
	* dwarf2cfi.c: Update.
	* regcache.c: Update.
2002-11-02 14:59:10 +00:00
Andrew Cagney bdcdd53569 2002-11-01 Andrew Cagney <cagney@redhat.com>
* frame.h (deprecated_generic_get_saved_register): Rename
	generic_get_saved_register.
	* blockframe.c (deprecated_generic_get_saved_register): Update.
	* xstormy16-tdep.c (xstormy16_get_saved_register): Update.
	(xstormy16_frame_saved_register): Update.
	* sh-tdep.c (sh_gdbarch_init): Update.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
	* ia64-tdep.c (ia64_get_saved_register): Update.
	* cris-tdep.c (cris_gdbarch_init): Update.
	* config/m32r/tm-m32r.h (GET_SAVED_REGISTER): Update.
	* arm-tdep.c (arm_gdbarch_init): Update.
2002-11-01 21:21:49 +00:00
Klee Dienes 0d540cdfe7 2002-10-11 Klee Dienes <kdienes@apple.com>
* findvar.c (read_memory_typed_address): New function.
        * gdbcore.h (read_memory_typed_address): Add prototype.
        * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
        to read a value destined for a CORE_ADDR, not read_memory_integer.
        * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
        (f77_get_dynamic_lowerbound): Ditto.
2002-10-12 01:48:17 +00:00
Andrew Cagney 68315eb83a 2002-09-30 Andrew Cagney <ac131313@redhat.com>
* blockframe.c (generic_find_dummy_frame): Rewrite.  Only test
	against TOP when TOP was explictly set.
	(generic_push_dummy_frame): Set TOP to zero.
2002-10-01 01:24:01 +00:00
Andrew Cagney 135c175f57 2002-09-17 Andrew Cagney <cagney@redhat.com>
* h8300-tdep.c (h8300_frame_chain):
	(h8300_frame_saved_pc):

	* blockframe.c (deprecated_read_register_dummy): Rename
	generic_read_register_dummy.
	* frame.c (frame_unwind_signed_register): New function.
	(frame_unwind_unsigned_register): New function.
	* frame.h (frame_unwind_signed_register): Declare.
	(frame_unwind_unsigned_register): Declare.
	(deprecated_read_register_dummy): Rename
	generic_read_register_dummy.

	* xstormy16-tdep.c (xstormy16_frame_saved_pc): Update.
	* rs6000-tdep.c (rs6000_frame_saved_pc): Update.
	* s390-tdep.c (s390_frame_saved_pc_nofix): Update.
	(s390_frame_chain): Update.
	* v850-tdep.c (v850_find_callers_reg): Update.
	(v850_frame_saved_pc): Update.
	* m32r-tdep.c (m32r_init_extra_frame_info): Update.
	(m32r_find_callers_reg): Update.
	(m32r_frame_saved_pc): Update.
	* sh-tdep.c (sh_find_callers_reg): Update.
	(sh64_get_saved_pr): Update.
	(sh_init_extra_frame_info): Update.
	(sh_init_extra_frame_info): Update.
	(sh64_init_extra_frame_info): Update.
	(sh64_init_extra_frame_info): Update.
	* mcore-tdep.c (mcore_find_callers_reg): Update.
	(mcore_frame_saved_pc): Update.
	(mcore_init_extra_frame_info): Update.
	* i386-tdep.c (i386_frame_saved_pc): Update.
	* ia64-tdep.c (ia64_frame_saved_pc): Update.
	(ia64_init_extra_frame_info): Update.
	(ia64_init_extra_frame_info): Update.
	* d10v-tdep.c (d10v_frame_saved_pc): Update.
	* cris-tdep.c (cris_init_extra_frame_info): Update.
	* avr-tdep.c (avr_frame_chain): Update.
	(avr_init_extra_frame_info): Update.
	(avr_frame_saved_pc): Update.
	* arm-tdep.c (arm_find_callers_reg): Update.
	(arm_init_extra_frame_info): Update.
	(arm_frame_saved_pc): Update.
2002-09-17 20:42:01 +00:00
Mark Kettenis 43156d82f1 * gdbarch.sh (SIGTRAMP_START, SIGTRAMP_END): New methods.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (find_pc_sect_partial_function): Convert to use
SIGTRAMP_START_P predicate.
2002-09-06 20:17:40 +00:00
Elena Zannoni fbefca5bab 2002-08-22 Elena Zannoni <ezannoni@redhat.com>
* blockframe.c (generic_call_dummy_register_unwind): Use
	regcache_cooked_read to catch cases in which the variable is
	stored in a pseudo register.
2002-08-22 22:25:17 +00:00
Mark Kettenis 247055dee0 * blockframe.c: Fix a few coding standard violations. 2002-08-18 22:40:15 +00:00
Andrew Cagney a378f41926 2002-08-12 Andrew Cagney <cagney@redhat.com>
* regcache.c (regcache_raw_read_as_address): Delete function.
(regcache_cooked_read_signed): New function.
(regcache_cooked_read_unsigned): New function.
* regcache.h (regcache_cooked_read_signed): Declare.
(regcache_cooked_read_unsigned): Declare.
(regcache_raw_read_as_address): Delete declaration.
* blockframe.c (generic_read_register_dummy): Use
regcache_cooked_read_unsigned.
* i386-tdep.c (i386_extract_struct_value_address): Use
regcache_cooked_read_unsigned.
2002-08-13 13:58:50 +00:00
Kevin Buettner fbcdb4a3f0 * blockframe.c (frame_saved_regs_register_unwind): Revise
PC_IN_CALL_DUMMY assertion to only apply when generic dummy
	frames are in use.
2002-08-09 18:26:15 +00:00
Andrew Cagney 0818c12a55 2002-07-24 Andrew Cagney <cagney@redhat.com>
* regcache.h (regcache_raw_read, regcache_raw_write): Replace
regcache_read and regcache_write.
(regcache_raw_read_as_address): Replace regcache_read_as_address.
* regcache.c: Update.
* sh-tdep.c (sh64_push_arguments): Update comment.
(sh_pseudo_register_read): Update.
(sh_pseudo_register_write): Update.
(sh4_register_read): Update.
(sh4_register_write): Update.
(sh64_pseudo_register_read): Update.
(sh64_pseudo_register_write): Update.
(sh64_register_read): Update.
(sh64_register_write): Update.
* i386-tdep.c (i386_extract_return_value): Update.
(i386_extract_struct_value_address): Update.
(i386_extract_return_value): Update.
* blockframe.c (generic_read_register_dummy): Update.
(generic_call_dummy_register_unwind): Update
* infrun.c (write_inferior_status_register): Update.
2002-07-24 14:38:55 +00:00
Pierre Muller 28a93f5a7a 2002-07-16 Pierre Muller <muller@ics.u-strasbg.fr>
* blockframe.c (get_pc_function_start): return 0 if the minimal symbol
	found is not inside a section.
2002-07-16 07:42:25 +00:00
Joel Brobecker 42f99ac23d * frame.h (frame_address_in_block): New function.
* blockframe.c (frame_address_in_block): New function extracted
        from get_frame_block().
        (get_frame_block): Use frame_address_in_block().
        (block_innermost_frame): Use frame_address_in_block() to match
        the frame pc address against the block boundaries rather than
        the frame pc directly. This prevents a failure when a frame pc
        is actually a return-address pointing immediately after the end
        of the given block.
2002-07-02 19:08:55 +00:00
Andrew Cagney b4d8393384 * blockframe.c (generic_find_dummy_frame): Change return type to
``struct regcache''.
(struct dummy_frame): Replace field ``registers'' with regcache, a
struct regcache object.
(generic_find_dummy_frame): Update.
(generic_push_dummy_frame): Update.  Use regcache_xfree,
regcache_xmalloc and regcache_cpy.
(generic_pop_dummy_frame): Update.  Use regcache_cpy and
regcache_xfree.
(deprecated_generic_find_dummy_frame): Update.
(generic_read_register_dummy): Update.  Use
regcache_read_as_address.
(generic_call_dummy_register_unwind): Update.  Use regcache_read.
(generic_get_saved_register): Update.  Use regcache_read.
2002-06-28 22:38:29 +00:00
Andrew Cagney da130f98ef * frame.h (deprecated_generic_find_dummy_frame): Rename
generic_find_dummy_frame.
* blockframe.c (generic_find_dummy_frame): Make static.
(deprecated_generic_find_dummy_frame): New function.
* sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace
generic_find_dummy_frame with deprecated_find_dummy_frame.
(sh64_nofp_frame_init_saved_regs): Ditto.
(sh_fp_frame_init_saved_regs): Ditto.
* s390-tdep.c (s390_frame_saved_pc_nofix): Ditto.
(s390_frame_chain): Ditto.
* cris-tdep.c (cris_frame_init_saved_regs): Ditto.
2002-06-26 15:28:46 +00:00
Andrew Cagney ca0d0b529b * gdbarch.sh (FRAME_CHAIN_VALID): Set default to
generic_func_frame_chain_valid.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (generic_func_frame_chain_valid): Only check
PC_IN_CALL_DUMMY when generic dummy frames.  Don't worry about
passing FP to PC_IN_CALL_DUMMY.
Fix PR gdb/360.
2002-06-08 18:30:14 +00:00
Andrew Cagney 4f4608125d * stack.c (frame_info): Use frame_register_unwind instead of
saved_regs.  Mention when the SP is on the stack or in a register.
* frame.h (frame_register_unwind_ftype): Define.  Document.
(struct frame_info): Add field register_unwind and
register_unwind_cache.
(frame_register_unwind): Declare.
(generic_unwind_get_saved_register): Declare.
* frame.c (frame_register_unwind): New function.
(generic_unwind_get_saved_register): New function.
* blockframe.c (generic_call_dummy_register_unwind): New function.
(frame_saved_regs_register_unwind): New function.
(set_unwind_by_pc): New function.
(create_new_frame): New function.
(get_prev_frame): New function.
2002-06-01 20:44:21 +00:00
Andrew Cagney 0f7d239c5a * frame.h (select_frame): Delete level parameter.
* stack.c (select_frame): Update.  Use frame_relative_level to
obtain the frame's level.
(select_and_print_frame): Update call.
(select_frame_command): Ditto.
(up_silently_base): Ditto.
(down_silently_base): Ditto.
* ocd.c (ocd_start_remote): Ditto.
* remote-rdp.c (remote_rdp_open): Ditto.
* remote-mips.c (mips_initialize): Ditto.
(common_open): Ditto.
* remote-e7000.c (e7000_start_remote): Ditto.
* m3-nat.c (select_thread): Ditto.
* hppa-tdep.c (child_get_current_exception_event): Ditto.
(child_get_current_exception_event): Ditto.
* varobj.c (varobj_create): Ditto.
(varobj_update): Ditto.
(c_value_of_root): Ditto.
* tracepoint.c (finish_tfind_command): Ditto.
* corelow.c (core_open): Ditto.
* arch-utils.c (generic_prepare_to_proceed): Ditto.
* thread.c (info_threads_command): Ditto.
(switch_to_thread): Ditto.
* infrun.c (normal_stop): Ditto.
(restore_selected_frame): Ditto.
(restore_inferior_status): Ditto.
* breakpoint.c (insert_breakpoints): Ditto.
(watchpoint_check): Ditto.
(bpstat_stop_status): Ditto.
(do_enable_breakpoint): Ditto.
* blockframe.c (flush_cached_frames): Ditto.
(reinit_frame_cache): Ditto.
2002-05-05 01:15:13 +00:00
Andrew Cagney 6096c27ac0 * valops.c (hand_function_call): Call
generic_save_call_dummy_addr.
* frame.h (generic_save_call_dummy_addr): Declare.
* blockframe.c (struct dummy_frame): Add fields call_lo and
call_hi.
(generic_find_dummy_frame): Check for PC in range call_lo to
call_hi instead of entry_point_address.
(generic_pc_in_call_dummy): Search the dummy frames for a PC in
the call_lo to call_hi range.  Allow for DECR_PC_AFTER_BREAK.
(generic_save_call_dummy_addr): New function.
2002-04-26 03:37:42 +00:00
Andrew Cagney d7bd68ca3c * arch-utils.h: Update copyright.
* gdbarch.sh (PC_IN_SIGTRAMP): Add.
* gdbarch.h, gdbarch.c: Re-generate.

* inferior.h (IN_SIGTRAMP): Delete definition.
* arch-utils.c (legacy_pc_in_sigtramp): New function.
* arch-utils.h (legacy_pc_in_sigtramp): Declare.

* mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP.
(mips_dump_tdep): Do not print value of IN_SIGTRAMP.
* hppa-tdep.c (pc_in_interrupt_handler):  Use PC_IN_SIGTRAMP.
(find_proc_framesize): Ditto.
* alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto.
(alpha_init_extra_frame_info): Ditto.
* infrun.c (handle_inferior_event): Ditto.
(handle_inferior_event): Ditto.
(check_sigtramp2): Ditto.
* blockframe.c (create_new_frame): Ditto.
(get_prev_frame): Ditto.
* ppc-linux-tdep.c: Update comments.
* i386-linux-tdep.c: Update comments.
* breakpoint.c (bpstat_what): Update comment.

* gdbint.texinfo (Target Architecture Definition): Replace
IN_SIGTRAMP with PC_IN_SIGTRAMP.
2002-04-24 16:28:16 +00:00
Andrew Cagney f208ba17b9 * config/pa/tm-hppa.h (FRAME_CHAIN_COMBINE): Delete macro.
* blockframe.c (FRAME_CHAIN_COMBINE): Delete macro.
(get_prev_frame): Do not call FRAME_CHAIN_COMBINE.
* gdbint.texinfo (Target Architecture Definition): Remove
FRAME_CHAIN_COMBINE.
2002-04-14 13:38:07 +00:00
Andrew Cagney 7cc19214aa * stack.c (select_frame): Check that selected_frame and the
specified level are as expected.
* blockframe.c (get_prev_frame): Set the `level' from next_frame.
Update copyright.
* frame.h (struct frame_info): Add field `level'.  Update
copyright.
Work-in-progress PR gdb/464.
2002-04-10 22:14:02 +00:00