summaryrefslogtreecommitdiff
path: root/gdb/dummy-frame.c
Commit message (Collapse)AuthorAgeFilesLines
* 2003-04-09 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-04-101-1/+2
| | | | | | | | | | | | | | | * frame.h (struct frame_id): Replace "pc" and "base" with "stack_addr" and "code_addr". Update comments. (frame_id_build): Update parameter names and comment. (struct frame_info): Replace "id_p" and "id" with "this_id". * dummy-frame.c (dummy_frame_this_id): Update. * breakpoint.c (print_one_breakpoint): Update. * frame.c (get_frame_id): Update. (get_frame_base, frame_id_build): Update. (create_sentinel_frame, legacy_get_prev_frame): Update. (deprecated_update_frame_base_hack): Update. (frame_id_p, frame_id_eq): Rework, return 0 when an invalid ID. (frame_id_inner): Ditto.
* 2003-04-04 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | * frame.c (get_prev_frame): Do not call frame_type_from_pc. Set the frame's type from the unwinder. (get_frame_type): Map UNKNOWN_FRAME onto NORMAL_FRAME. (create_new_frame, legacy_get_prev_frame): When the unwinder's type isn't UNKNOWN_FRAME, initalize "type" from the unwinder. (get_frame_base_address): Use get_frame_type. (get_frame_locals_address, get_frame_args_address): Ditto. (legacy_saved_regs_unwinder): Set the type to UNKNOWN_TYPE. * frame.h (enum frame_type): Add UNKNOWN_FRAME. (struct frame_info): Add comment explaining why the frame contains a "type" field. * dummy-frame.c (dummy_frame_unwind): Set the type to DUMMY_FRAME. * d10v-tdep.c (d10v_frame_unwind): Set the type to NORMAL_FRAME. * sentinel-frame.c (sentinel_frame_unwinder): Set the type to NORMAL_FRAME. * frame-unwind.h: Include "frame.h". (struct frame_unwind): Add "type" field. * Makefile.in (frame_unwind_h): Add $(frame_h).
* 2003-04-04 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-04-041-4/+3
| | | | | | | | | | | | | | | | | | * x86-64-tdep.c (x86_64_unwind_dummy_id): Use frame_id_build. * dummy-frame.c (dummy_frame_this_id): Use frame_id_build. * d10v-tdep.c (d10v_frame_this_id): Use get_frame_pc and get_frame_base. (d10v_unwind_dummy_id): Use frame_id_build. * frame.c (find_frame_sal): Use get_frame_pc. (create_new_frame): Use deprecated_update_frame_pc_hack and deprecated_update_frame_base_hack. (create_sentinel_frame): Add comment about ->pc going away. (get_prev_frame): Add comment about ->pc going away. (legacy_get_prev_frame): Use get_frame_base, get_frame_pc, frame_id_build, deprecated_update_frame_pc_hack and deprecated_update_frame_base_hack. (select_frame): Use get_frame_pc. (legacy_saved_regs_this_id): Use frame_id_build.
* 2003-03-31 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-03-311-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * gdbarch.sh (FIX_CALL_DUMMY): Change to function with predicate. * gdbarch.h, gdbarch.c: Regenerate. * inferior.h (FIX_CALL_DUMMY): Delete macro. * valops.c (hand_function_call): Only call FIX_CALL_DUMMY when available. * frame.h (generic_fix_call_dummy): Delete declaration. * dummy-frame.h: Update comment. * dummy-frame.c (generic_fix_call_dummy): Delete function. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set fix_call_dummy. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto.
* 2003-03-31 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdbarch.sh (CALL_DUMMY_P): Delete. * gdbarch.h, gdbarch.c: Re-generate. * inferior.h (CALL_DUMMY_P): Delete macro. * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. * vax-tdep.c (vax_gdbarch_init): Update. * v850-tdep.c (v850_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * sh-tdep.c (sh_gdbarch_init): Update. * s390-tdep.c (s390_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): 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_gdbarch_init): Update. * h8300-tdep.c (h8300_gdbarch_init): Update. * frv-tdep.c (frv_gdbarch_init): Update. * d10v-tdep.c (d10v_gdbarch_init): Update. * cris-tdep.c (cris_gdbarch_init): Update. * breakpoint.c (deprecated_frame_in_dummy): Update. * avr-tdep.c (avr_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * arm-tdep.c (arm_gdbarch_init): Update. * dummy-frame.c (dummy_frame_this_id): Update comments. * rs6000-tdep.c (rs6000_extract_struct_value_address): Ditto. * frame.c (legacy_get_prev_frame): Ditto. * valops.c (call_function_by_hand): Delete function. (hand_function_call): Rename to call_function_by_hand 2003-03-31 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Delete references to CALL_DUMMY_P.
* 2003-03-17 Andrew Cagney <cagney@redhat.com>cagney_lazyid-20030317-branchpointAndrew Cagney2003-03-171-27/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix frame off-by-one bug. * frame-unwind.h (frame_this_id_ftype): Replace frame_unwind_id_ftype. (frame_prev_register_ftype): Replace frame_unwind_reg_ftype. (struct frame_unwind): Replace "id" with "this_id". Replace "reg" with "prev_register". * frame-unwind.c (frame_unwind_find_by_pc): Return legacy_saved_regs_unwind instead of trad_frame_unwind. Update comment. * dummy-frame.c (cached_find_dummy_frame): Delete function. (dummy_frame_this_id): Replace dummy_frame_id_unwind. (dummy_frame_prev_register): Replace dummy_frame_register_unwind. (dummy_frame_unwind): Update. * sentinel-frame.c (sentinel_frame_prev_register): Replace sentinel_frame_register_unwind. (sentinel_frame_this_id): Replace sentinel_frame_id_unwind. (sentinel_frame_unwinder): Update. * frame.h (legacy_saved_regs_unwind): Replace trad_frame_unwind. (struct frame_info): Rename "unwind_cache" to "prologue_cache". * frame.c (create_sentinel_frame): Update. Initialize "prologue_cache" instead of "unwind_cache". (frame_register_unwind): Call this frame's prev_register with the next frame and this frame's prologue cache. (get_prev_frame): Simplify. Always call prev frame's this_id with this frame and prev frame's prologue cache. Document that this call is shifted one to the left when compared to the frame_register_unwind call. (legacy_saved_regs_prev_register): Replace frame_saved_regs_register_unwind. (legacy_saved_regs_this_id): Replace frame_saved_regs_id_unwind. (legacy_saved_regs_unwinder): Replace trad_frame_unwinder. (legacy_saved_regs_unwind): Replace trad_frame_unwind. * d10v-tdep.c (d10v_frame_this_id): Replace d10v_frame_id_unwind. (d10v_frame_unwind): Update. (d10v_frame_prev_register): Replace d10v_frame_register_unwind. (d10v_frame_unwind_cache): Replace this "fi" with "next_frame". (saved_regs_unwinder): Replace this "frame" with "next_frame", and "saved_regs" with "this_saved_regs".
* 2003-03-12 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-03-121-32/+0
| | | | | | | | | | | | | | | | | Eliminate the need for POP_FRAME. * frame.c (do_frame_unwind_register): New function. (frame_pop): When no POP_FRAME, pop the frame using register unwind and a scratch regcache. (frame_saved_regs_pop): Delete function. (trad_frame_unwinder): Update. * d10v-tdep.c (d10v_frame_pop): Delete function. (d10v_frame_unwind): Update. * sentinel-frame.c (sentinel_frame_pop): Delete function. (sentinel_frame_unwinder): Update. * dummy-frame.c (dummy_frame_pop): Delete function. (dummy_frame_unwind): Update. * frame-unwind.h (frame_unwind_pop_ftype): Delete definition. (struct frame_unwind): Update.
* 2003-03-10 Andrew Cagney <cagney@redhat.com>Andrew Cagney2003-03-101-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * gdbarch.sh (gdbarch_unwind_pc): New method. * gdbarch.h, gdbarch.c: Regenerate. * frame.c (frame_pc_unwind): Rewrite. Prefer gdbarch_unwind_pc, but use read_pc and FRAME_SAVED_PC as fall backs. (frame_saved_regs_pc_unwind): Delete function. (trad_frame_unwinder): Update. * frame-unwind.h (frame_unwind_pc_ftype): Delete declaration. (struct frame_unwind): Update. * dummy-frame.c (dummy_frame_pc_unwind): Delete function. (dummy_frame_unwind): Update. * sentinel-frame.c (sentinel_frame_pc_unwind): Delete function. (sentinel_frame_unwinder): Update. * d10v-tdep.c (d10v_frame_pc_unwind): Delete function. (d10v_frame_unwind): Update. (d10v_unwind_pc): New function. (d10v_gdbarch_init): Set unwind_pc. Index: doc/ChangeLog 2003-03-10 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Cross reference FRAME_SAVED_PC to unwind_pc. Document unwind_pc.
* 2003-01-19 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-191-5/+44
| | | | | | | | | | | | | | | | * frame-unwind.h (frame_unwind_pop_ftype): Declare. (struct frame_unwind): Add field pop. * frame.h (frame_pop): Declare. * frame.c (frame_saved_regs_pop): New function. (trad_frame_unwinder): Add frame_saved_regs_pop. (frame_pop): New function. * dummy-frame.c (dummy_frame_pop): New function. (discard_innermost_dummy): New function. (generic_pop_dummy_frame): Use discard_innermost_dummy. (dummy_frame_unwind): Add dummy_frame_pop. * infrun.c (normal_stop): Call frame_pop instead of POP_FRAME. * valops.c (hand_function_call): Ditto. * stack.c (return_command): Ditto.
* 2003-01-18 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-181-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dummy-frame.h (dummy_frame_id_unwind): Delete declaration. (dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto. (struct frame_unwind): Declare opaque. (dummy_frame_p): Declare function. * dummy-frame.c (dummy_frame_id_unwind): Make static. (dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto. * dummy-frame.c: Include "frame-unwind.h". (dummy_frame_p): New function. (dummy_frame_unwind): New variable. * frame.c: Include "frame-unwind.h". (frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update to use the new unwind field. (set_unwind_by_pc): Delete function. (create_new_frame, get_prev_frame): Set unwind field using frame_unwind_find_by_pc. (trad_frame_unwind, trad_frame_unwinder): New variables. * frame.h (trad_frame_unwind): Declare variable. (frame_id_unwind_ftype): Delete declaration. (frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto. (struct frame_unwind): Declare opaque. (struct frame_info): Replace the fields id_unwind, pc_unwind and register_unwind with a single unwind pointer. * frame-unwind.h, frame-unwind.c: New files. * Makefile.in (SFILES): Add frame-unwind.c. (frame_unwind_h): Define. (COMMON_OBS): Add frame-unwind.o. (frame-unwind.o): Specify dependencies. (frame.o, dummy-frame.o): Update dependencies.
* 2003-01-16 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-161-5/+6
| | | | | | | | | | * frame.h (frame_id_unwind_ftype): Change type so that the frame's ID back using a parameter. * frame.c (frame_id_unwind): Update call. (frame_saved_regs_id_unwind): Update. * dummy-frame.c (dummy_frame_id_unwind): Update function. * dummy-frame.h (struct frame_id): Add opaque declaration. (dummy_frame_id_unwind): Update declaration.
* 2002-12-13 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-12-131-0/+16
| | | | | | | | | | | | | | | | | * frame.h (frame_id_unwind): Declare. (struct frame_info): Add fields id_unwind, id_unwind_cache_p and id_unwind_cache. (frame_id_unwind_ftype): Declare. * frame.c (frame_id_unwind): New function. (set_unwind_by_pc): Add unwind_id parameter. Initialized. (create_new_frame, get_prev_frame): Pass id_unwind to set_unwind_by_pc. (frame_saved_regs_id_unwind): New function. (frame_saved_regs_id_unwind): New function. * dummy-frame.c (dummy_frame_id_unwind): New function. (struct dummy_frame): Add field id. (generic_push_dummy_frame): Initialize `id'. * dummy-frame.h (dummy_frame_id_unwind): Declare.
* 2002-12-07 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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-08 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-12-091-2/+2
| | | | | | | * 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-11-24 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-11-241-3/+22
| | | | | | | | | | | | | * dummy-frame.c (pc_in_dummy_frame): New function. (generic_pc_in_call_dummy): Call pc_in_dummy_frame. (find_dummy_frame): Update comment. (generic_pop_current_frame): Use get_frame_type. * dummy-frame.h (pc_in_dummy_frame): Declare. * frame.c (set_unwind_by_pc): Use pc_in_dummy_frame. (create_new_frame): Use pc_in_dummy_frame. (get_prev_frame): Use pc_in_dummy_frame. (frame_saved_regs_register_unwind): Use get_prev_frame. (deprecated_generic_get_saved_register): Use get_prev_frame.
* 2002-11-15 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-11-151-0/+15
| | | | | | | | | | | | | | | | | | | | | * 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-08 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-11-081-27/+29
| | | | | | | | | | | | | * frame.c (set_unwind_by_pc): Use dummy_frame_register_unwind. * dummy-frame.c (find_dummy_frame): Rename generic_find_dummy_frame, make static. Return the dummy frame instead of the regcache. (generic_find_dummy_frame): Re-implement using find_dummy_frame, (cached_find_dummy_frame): New function. Use find_dummy_frame. (dummy_frame_register_unwind): Rename generic_call_dummy_register_unwind. Use cached_find_dummy_frame. * dummy-frame.h (dummy_frame_register_unwind): Rename generic_call_dummy_register_unwind.
* 2002-11-08 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-11-081-0/+308
* 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.