aboutsummaryrefslogtreecommitdiff
path: root/gdb/blockframe.c
AgeCommit message (Collapse)AuthorFilesLines
2000-04-14* gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two newJim Blandy1-2/+2
functions which architectures can redefine, defaulting to generic_pointer_to_address and generic_address_to_pointer. * findvar.c (extract_typed_address, store_typed_address, generic_pointer_to_address, generic_address_to_pointer): New functions. (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default definitions. (extract_address, store_address): Doc fixes. * values.c (value_as_pointer): Doc fix. (value_from_pointer): New function. * defs.h (extract_typed_address, store_typed_address): New declarations. * inferior.h (generic_address_to_pointer, generic_pointer_to_address): New declarations. * value.h (value_from_pointer): New declaration. * ax-gdb.c (const_var_ref): Use value_from_pointer, not value_from_longest. * blockframe.c (generic_push_dummy_frame): Use read_pc and read_sp, not read_register. * c-valprint.c (c_val_print): Use extract_typed_address instead of extract_address to extract vtable entries and references. * cp-valprint.c (cp_print_value_fields): Use value_from_pointer instead of value_from_longest to extract the vtable's address. * eval.c (evaluate_subexp_standard): Use value_from_pointer instead of value_from_longest to compute `this', and for doing pointer-to-member dereferencing. * findvar.c (read_register): Use extract_unsigned_integer, not extract_address. (read_var_value): Use store_typed_address instead of store_address for building label values. (locate_var_value): Use value_from_pointer instead of value_from_longest. * hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer, instead of value_from_longest, to build arguments to __d_shl_get. * printcmd.c (set_next_address): Use value_from_pointer, not value_from_longest. (x_command): Use value_from_pointer, not value_from_longest. * tracepoint.c (set_traceframe_context): Use value_from_pointer, not value_from_longest. * valarith.c (value_add, value_sub): Use value_from_pointer, not value_from_longest. * valops.c (find_function_in_inferior, value_coerce_array, value_coerce_function, value_addr, hand_function_call): Same. * value.h (COERCE_REF): Use unpack_pointer, not unpack_long. * values.c (unpack_long): Use extract_typed_address to produce addresses from pointers and references, not extract_address. (value_from_longest): Use store_typed_address instead of store_address to produce pointer and reference values.
1999-12-22import gdb-1999-12-21 snapshotJason Molenda1-5/+4
1999-12-14import gdb-1999-12-13 snapshotJason Molenda1-7/+21
1999-08-23import gdb-1999-08-23 snapshotJason Molenda1-14/+10
1999-07-12import gdb-1999-07-12 snapshotJason Molenda1-1/+1
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-142/+143
1999-07-05import gdb-1999-07-05 snapshotJason Molenda1-1/+13
1999-06-07import gdb-1999-06-07 snapshotJason Molenda1-1/+19
1999-05-25import gdb-1999-05-25 snapshotJason Molenda1-3/+2
1999-05-05import gdb-19990504 snapshotStan Shebs1-2/+2
1999-04-26import gdb-19990422 snapshotStan Shebs1-33/+109
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1301
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1228/+0
1998-11-28CARP:Andrew Cagney1-2/+6
Rewrite INNER_THAN so that it takes parameters.
1998-10-141998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-23/+32
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid possible nested-if confusion. * breakpoint.c (breakpoint_here_p): Ditto. (breakpoint_inserted_here_p): Ditto. (breakpoint_thread_match): Ditto. * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined. * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability prototypes. * symtab.h: Add prototype for _initialize_source. * value.h: Add prototype for _initialize_value. * defs.h: Include sys/types.h or stddef.h to get size_t. (make_cleanup): Add make_cleanup_func typedef and switch to using a prototype for this function. (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't using mmalloc. * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c: Cast parameters passed to make_cleanup to use the new make_cleanup_func typedef. More warning cleanups. There are still a bunch of places where the first argument to make_cleanup is not cast to (make_cleanup_func); these are either due to the function fitting the make_cleanup_func specification already (e.g. free()) or they are in files that weren't compiled when I did my make on a Linux native system. Bwahahaha. You can see them like this: grep make_cleanup\ * | grep -v make_cleanup_func I'll surely go back and clean up the remaining suspicious calls in GDB one of these days. :-)
1998-09-09Merges from SKY branch:Ron Unrau1-60/+166
* blockframe.c(find_pc_sect_partial_function): look for min syms in the same section when trying to guess the end of a function. * symfile.c(list_overlays_command): use print_address_numeric * remote-sim.c: export simulator_command * tm-r5900.h: add COP0 registers * txvu-tdep.c: printvector and printvector-order commands * tm-txvu.h: add COP0 registers * mips-tdep.c: use NUM_CORE_REGS
1997-02-07 * blockframe.c (generic_frame_chain_valid): If the new frameJeff Law1-1/+3
is not INNER_THAN the old frame, then it's not valid.
1997-01-28 * blockframe.c: fix a null pointer ref in generic_get_saved_registerMichael Snyder1-1/+1
1997-01-18 * blockframe.c (frameless_look_for_prologue): Mark framesPeter Schauer1-44/+17
with a zero PC as frameless to improve backtraces from core dumps caused by dereferencing a NULL function pointer.
1996-11-27Added target function calls for SH, M32R and H8300.Michael Snyder1-28/+295
Added some generic target-independant code for managing call-dummy frames. Wed Nov 27 10:32:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com> * breakpoint.c: DELETE command will not delete CALL_DUMMY breakpoint. * blockframe.c: Add target-independant support for managing CALL_DUMMY frames on the host side. * frame.h: Declarations for generic CALL_DUMMY frame support. * h8300-tdep.c: Add target function calls using generic frame support. * config/h8300/tm-h8300.h: config for generic target function calls. start-sanitize-m32r * m32r-tdep.c: Add target function calls using generic frame support. * config/m32r/tm-m32r.h: config for generic target function calls. end-sanitize-m32r * sh-tdep.c: Add target function calls using generic frame support. * config/sh/tm-sh.h: config for generic target function calls. start-sanitize-v850 * v850-tdep.c: Add target function calls using generic frame support. * config/v850/tm-v850.h: config for generic target function calls. end-sanitize-v850 * valops.c: ADD PUSH_RETURN_ADDRESS so that it doesn't have to be done by PUSH_ARGUMENTS when there's no CALL_DUMMY.
1995-08-14 * blockframe.c (inside_main_func): Fix a typo in previous change.Kung Hsu1-1/+1
1995-08-14 * config/sparc/tm-sparclite.h: Define FRAME_CHAIN_VALID_ALTERNATE.Kung Hsu1-104/+91
* blockframe.c (inside_main_func): If main func addr range not set, try to set it now.
1994-10-08 The point of these changes is to avoid reading the frame pointerJim Kingdon1-10/+21
and stack pointer during stepping, to speed things up. A. Changes to not select a frame until we need a selected frame: * blockframe.c (flush_cached_frames): Call select_frame (NULL, -1). * infrun.c (wait_for_inferior): Move call to select_frame back to normal_stop. This reverts a change of 13 Apr 94 (it says Jeff Law, but the change was my idea); the only reason for that change was so we could save and restore the selected frame in wait_for_inferior, and now that flush_cached frames clears the selected frame, that should work OK now. B. Changes to not create a current_frame until we need one: * blockframe.c (get_current_frame): If current_frame is NULL, try to create an innermost frame. * sparc-tdep.c (sparc_pop_frame), infcmd.c (run-stack_dummy), infrun.c (wait_for_inferior), thread.c (thread_switch), convex-tdep.c (set_thread_command), a29k-tdep.c (pop_frame), alpha-tdep.c (alpha_pop_frame), convex-xdep.c (core_file_command), h8300-tdep.c (h8300_pop_frame), h8500-tdep.c (h8300_pop_frame), hppa-tdep.c (hppa_pop_frame), i386-tdep.c (i386_pop_frame), i960-tdep.c (pop_frame), m68k-tdep.c (m68k_pop_frame), mips-tdep.c (mips_pop_frame), rs6000-tdep.c (push_dummy_frame, pop_dummy_frame, pop_frame), sh-tdep.c (pop_frame), config/arm/tm-arm.h (POP_FRAME), config/convex/tm-convex.h (POP_FRAME), config/gould/tm-pn.h (POP_FRAME), config/ns32k/tm-merlin.h (POP_FRAME), config/ns32k/tm-umax.h (POP_FRAME), config/tahoe/tm-tahoe.h (POP_FRAME), config/vax/tm-vax.h (POP_FRAME): Don't call create_new_frame. * corelow.c (core_open), altos-xdep.c (core_file_command), arm-xdep.c (core_file_command), gould-xdep.c (core_file_command), m3-nat.c (select_thread), sun386-nat.c (core_file_command), umax-xdep.c (core_file_command): Don't call create_new_frame; do call flush_cached_frames. * blockframe.c (reinit_frame_cache): Don't call create_new_frame or select_frame. C. Changes to get rid of stop_frame_address and instead only fetch the frame pointer when we need it. * breakpoint.c (bpstat_stop_status): Remove argument frame_address; use FRAME_FP (get_current_frame ()). * infrun.c (wait_for_inferior): Don't pass frame pointer to bpstat_stop_status. * infrun.c (wait_for_inferior): Use FRAME_FP (get_current_frame ()) instead of stop_frame_address. * infrun.c (save_inferior_status, restore_inferior_status), inferior.h (struct inferior_status): Don't save and restore stop_frame_address. * inferior.h, infcmd.c, thread.c (thread_switch), m3-nat.c (select_thread): Remove stop_frame_address and uses thereof. D. Same thing for the stack pointer. * infrun.c (wait_for_inferior): Remove stop_sp and replace uses thereof with read_sp (). E. Change to eliminate one nasty little spot where we were wanting to know the frame pointer from before the current step (idea from GDB 3.5, which saved my ass, because my other ideas of how to fix it were very baroque). * infrun.c: Remove prev_frame_address. * infrun.c (wait_for_inferior, step_over_function): Use step_frame_address instead of prev_frame_address. F. Same basic idea for the stack pointer. * inferior.h, infcmd.c: New variable step_sp. * infcmd.c (step_1, until_next_command): Set it. * infrun.c: Remove prev_sp and replace uses by step_sp. * infrun.c (wait_for_inferior): If we get out of the step range, then set step_sp to the current stack pointer before we start going again.
1994-04-20 * main.c (main): Accept --annotate=N option and make --fullnameJim Kingdon1-0/+5
the same as --annotate=1. (command_line_input): Print annotatation before and after prompt. * blockframe.c (flush_cached_frames): Print annotation. * Rename frame_file_full_name to annotation_level and move it from symtab.h to defs.h. * source.c (identify_source_line): If annotation_level > 1, change output format. * breakpoint.c: Print annotation whenever a breakpoint changes. * main.c: New variable server_command. (command_line_input): Parse "server " and set server_command. (dont_repeat): Check server_command.
1994-04-13 * breakpoint.h (enum bptype): Add bp_hardware_watchpoint andJeff Law1-0/+23
bp_watchpoint_scope breakpoints. (struct breakpoint): Add val_chain and related_breakpoint fields for use by watchpoints. * breakpoint.c (within_scope): Delete. No longer used. (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Provide default definition. (target_{remove,insert}_watchpoint): Likewise. (can_use_hardware_watchpoint): New function. (remove_breakpoint): New function to remove a single breakpoint or hardware watchpoint. (insert_breakpoints): Handle insertion of hardware watchpoints. Store a copy of the value chain derived from the watchpoint expression. (remove_breakpoints): Simplify by using remove_breakpoint. (delete_breakpoint): Likewise. (watchpoint_check): Delete the watchpoint and watchpoint scope breakpoints when the watchpoint goes out of scope. Save & restore the current frame after checking watchpoints. (breakpoint_init_inferior): Likewise (restarting the program makes all local watchpoints go out of scope). (bpstat_stop_status): Handle hardware watchpoints much like normal watchpoints. Delete the watchpoint and watchpoint scope breakpoint when the watchpoint goes out of scope. Remove and reinsert all breakpoints before returning if we stopped when a hardware watchpoint fired. (watch_command): Use a hardware watchpoint when possible. If watching a local expression, build a scope breakpoint too. (map_breakpoint_numbers): Also call given function for any related breakpoints. (disable_breakpoint): Never disable a scope breakpoint. (enable_breakpoint): Handle hardware breakpoints much like normal breakpoints, but recompute the watchpoint_scope breakpoint's frame and address (if we have an associated scope breakpoint). (read_memory_nobpt): Handle hardware watchpoints like normal watchpoints. When necessary handle watchpoint_scope breakpoints. (print_it_normal, bpstat_what, breakpoint_1, mention): Likewise. (clear_command, breakpoint_re_set_one, enable_command): Likewise. (disable_command): Likewise. * blockframe.c (find_frame_addr_in_frame_chain): New function. Extern prototype added to frame.h * infrun.c (wait_for_inferior): Set current_frame and select a frame before checking if we stopped due to a hardare watchpoint firing. Handle stepping over hardware watchpoints. (normal_stop): Remove unnecessary call to select_frame. * value.h (value_release_to_mark): Declare. * values.c (value_release_to_mark): New function. * procfs.c (procfs_wait): Add cases for hardware watchpoints. (procfs_set_watchpoint, procfs_stopped_by_watchpoint): New functions. * hppab-nat.c (hppa_set_watchpoint): New function. * config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define. (HAVE_STEPPABLE_WATCHPOINT): Define. (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define. (target_{insert,delete}_watchpoint): Define.
1994-03-30 * blockframe.c (find_pc_partial_function): mst_file_textPeter Schauer1-4/+30
symbols do not live in the shared library transfer table.
1993-10-08 * blockframe.c (get_frame_block): Do not adjust pc if the framePeter Schauer1-6/+7
function was interrupted by a signal.
1993-10-07 * blockframe.c (find_pc_partial_function): If we callJim Kingdon1-1/+6
PSYMTAB_TO_SYMTAB, call target_terminal_ours_for_output first. This is needed now that wait_for_inferior passes in endaddr. * infrun.c: Move call to target_terminal_inferior from proceed to resume.
1993-10-07* blockframe.c (find_pc_partial_function): Fix handling for PCsStu Grossman1-25/+22
beyond the end of the last function in an objfile. * coff-solib.c (coff_solib_add): Use BFD to get fields from .lib section. * infrun.c (wait_for_inferior): Modify test for subroutine entry to include pc out of bounds of the previous function. * remote.c (remote_wait): Use strtoul for parsing 'N' message. Add code to relocate symfile_objfile->sections.
1993-10-05 Changes to support alpha OSF/1 in native mode.Peter Schauer1-16/+31
* alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt, config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c: New files. * Makefile.in: Add new files and dependencies. * configure.in: Add alpha target. * config/alpha/alpha-osf1.mh (NATDEPFILES): Add osfsolib.o * config/alpha/alpha-osf1.mh (MH_CFLAGS): Remove, we can handle shared libraries now. * config/alpha/xm-alpha.h: Cleanup, get MAKEVA_* defines right. * defs.h (CORE_ADDR): Make its type overridable via CORE_ADDR_TYPE, provide `unsigned int' default. * breakpoint.c (breakpoint_auto_delete): Delete only if we really stopped for the breakpoint. * stabsread.c, stabsread.h (define_symbol): Change valu parameter to a CORE_ADDR. * stabsread.c (read_range_type): Handle the case where the lower bound overflows and the upper doesn't and the range is legal. * infrun.c (resume): Do not step a breakpoint instruction if CANNOT_STEP_BREAKPOINT is defined. * inferior.h (CALL_DUMMY_LOCATION): New variant AT_ENTRY_POINT. Now that we have the bp_call_dummy breakpoint the call dummy code is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and FIX_CALL_DUMMY can be used to set up everything for the dummy. The breakpoint for the dummy is set at the entry point and thats it. * blockframe.c (inside_entry_file, inside_entry_func): Do not stop backtraces if pc is in the call dummy at the entry point. * infcmd.c (run_stack_dummy): Handle AT_ENTRY_POINT case. Use the expected breakpoint pc when setting up the frame for set_momentary_breakpoint. * symfile.c (entry_point_address): New function for AT_ENTRY_POINT support. * valops.c (call_function_by_hand): Handle AT_ENTRY_POINT case.
1993-09-30 * inflow.c (generic_mourn_inferior): Call reinit_frame_cacheJim Kingdon1-7/+17
instead of doing it ourself. * blockframe.c (reinit_frame_cache): Use code which was in generic_mourn_inferior so we can use this function even when we have switched targets. * corelow.c (core_detach): Call reinit_frame_cache. * target.c (target_detach): Don't call generic_mourn_inferior (revert yesterday's change, now handled by core_detach). * objfiles.c (free_objfile): Detach any core file if we call SOLIB_CLEAR. #include target.h.
1993-08-18 * blockframe.c (block_innermost_frame): Uncomment.Jim Kingdon1-6/+5
Return NULL if passed NULL. * frame.h: Declare it. * expression.h (union exp_element): Add field block. * parse.c (write_exp_elt_block): New function. * expression.h (OP_VAR_VALUE): Now takes additional struct block *. * *-exp.y: Write block for OP_VAR_VALUE. * eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE. * valops.c, value.h (value_of_variable), callers: Add second argument, for block.
1993-08-17 * blockframe.c, frame.h (sigtramp_saved_pc): New routine to fetchPeter Schauer1-57/+124
the saved pc from sigcontext on the stack for BSD signal handling. * config/i386/tm-i386bsd.h (SIGTRAMP_START, SIGTRAMP_END, FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET): Define to make backtracing through sigtramp work. * config/vax/tm-vax.h (SIGTRAMP_START, SIGTRAMP_END, TARGET_UPAGES, FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET): Ditto.
1993-07-07 * frame.h, blockframe.c, stack.c, a29k-tdep.c,Jim Kingdon1-148/+124
config/gould/tmp-{pn,np1}.h, config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field next_frame from struct frame_info. It has no purpose beyond ->next->frame and is an artifact from GDB 2.8.
1991-11-18Remove tdesc stuff. Remove FRAME_CHAIN_COMBINE from all tm-*.h files,John Gilmore1-7/+84
since it was always defined exactly the same in all of them.
1991-08-14 * blockframe.c (frameless_look_for_prologue): Speed up byJohn Gilmore1-6/+12
calling SKIP_PROLOGUE_FRAMELESS_P if it's defined. * tm-sparc.h (SKIP_PROLOGUE, SKIP_PROLOGUE_FRAMELESS_P): Define two variants, one faster. * sparc-tdep.c (sparc_frame_chain): Use target_read_memory and return zero, rather than giving an error. (setup_arbitrary_frame): Initialize the PC in the new frame. (skip_prologue): Add a second arg saying whether we're just checking for a frameless function or not.
1991-05-30Roll in Tiemann changes for gcc -ansi. Fix assorted bugs. See ChangeLog.John Gilmore1-1/+2
1991-04-24 * blockframe.c, frame.h (reinit_frame_cache): New function.Jim Kingdon1-0/+11
solib.c (solib_add), symfile.c ({,add_}symbol_file_command): Use it.
1991-03-28Initial revisionK. Richard Pixley1-0/+650
1990-09-05Initial revisionJohn Gilmore1-604/+0
2012-06-03gdb-3.5gdb-3.51-20/+26
2012-06-03gdb-3.4gdb-3.41-1/+9
2012-06-03gdb-3.3gdb-3.31-173/+211
2012-06-03gdb-3.1gdb-3.11-80/+274
2012-06-03gdb-2.8.1gdb-2.8.11-7/+12
2012-06-03gdb-2.8gdb-2.81-0/+4
2012-06-03gdb-2.5.1gdb-2.5.11-9/+25
2012-06-03gdb-2.4+.aux.coffgdb-2.4+.aux.coff1-0/+333