aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
AgeCommit message (Collapse)AuthorFilesLines
2001-08-02 The following changes avoid polluting global namespace with theEli Zaretskii1-116/+116
`enable' and `disable' identifiers, because some platforms define in their system headers symbols with global scope that go by those names. * breakpoint.h (enum enable_state): Rename from `enum enable'. Also rename all the enum members to have the "bp_" prefix. (struct breakpoint): Rename the `enable' member to `enable_state'. (enum bpdisp): Rename all members to have the "disp_" prefix. * breakpoint.c: All users of `enum enable' and `enum bpdisp' changed. (args_for_catchpoint_enable): Rename the `enable' member to `enable_p'. All users changed. * tracepoint.h (enum enable): Remove. (struct tracepoint): The member `enabled' is now `int enabled_p'. * tracepoint.c: All users of the `enabled' member changed. * printcmd.c (struct display): The `status' member is now an int. * memattr.h (struct mem_region): Rename the `status' member to `enabled_p'. (enum enable): Remove. * memattr.c: Change all users of the `status' member of struct mem_region to use `enabled_p' instead. * infcmd.c (run_stack_dummy): Use disp_del instead of del. * go32-nat.c: Remove the kludgey work-around for conflicts between <dos.h> and "breakpoint.h". * tui/tuiSourceWin.c: Use disp_del instead of del. * tui/tuiSource.c: Use disp_del instead of del. * tui/tuiDisassem.c: Use disp_del instead of del.
2001-07-28Move libgdb library functions to gdb.h (new file).Andrew Cagney1-0/+1
Update everything related to this.
2001-07-14 * utils.c (query): Remove tui hacks; tui must use the query_hook.Stephane Carrez1-22/+0
* top.c (command_loop): Remove tui insert_mode hacks; don't call tuiCleanUp because this must be made with atexit by tui. * symfile.c (symbol_file_command): Remove call to TUIDO * stack.c (show_and_print_stack_frame_stub): Remove tui check; not necessary when using the selected frame hooks. (print_stack_frame_stub): Likewise. (print_frame_info_base): Likewise. (print_frame_info): Likewise. (up_silently_command): Likewise. (down_silently_command): Likewise. (show_stack_frame): Likewise for TUIDO. (select_frame): Likewise. (select_and_print_frame): Likewise. (stack_publish_stopped_with_no_frame): Remove. (select_and_maybe_print_frame): Remove. * main.c (captured_main): Remove tui_fileopen and tuiInit; tui must use the initialize ui hook. * infrun.c (normal_stop): Remove call to TUIDO; tui must use the selected frame hooks. * event-top.c (command_handler): Remove tui insert_mode hack. * defs.h: Remove TUIDO; Only include tui.h. * breakpoint.c (mention): Remove calls to TUIDO. (delete_breakpoint): Remove tui hacks; tui must install the breakpoint hooks.
2001-07-06Replace:Andrew Cagney1-12/+12
if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) with: if (ui_out_is_mi_like_p (uiout))
2001-06-282001-06-28 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+6
* infrun.c (handle_inferior_event): Replace prev_pc test in all calls to bpstat_stop_status (removed in 1999-09-24). This test helps distinguish stepping over a breakpoint trap from stepping thru a jump to the instruction after a breakpoint trap. (handle_inferior_event): Don't bother writing the PC if DECR_PC_AFTER_BREAK is zero (optimization). * breakpoint.c (bpstat_stop_status): Add comment explaining the purpose and usage of the "not_a_breakpoint" argument in computing the breakpoint address.
2001-06-27Always send the breakpoint table headers to ui-out. MI/CLI canAndrew Cagney1-17/+22
internally decide if they should be displayed.
2001-06-21* ui-out.h (ui_out_table_header): Add parameter ``col_name''.Andrew Cagney1-7/+7
(table_header_ftype): Ditto. * cli-out.c (cli_table_header): Update. * ui-out.c (ui_out_table_header): Update. (uo_table_header): Update. (default_table_header): Update. (append_header_to_list): Update. (struct ui_out_header): Add field ``col_name''. (append_header_to_list): Use xstrdup. Initialize col_name. * breakpoint.c (breakpoint_1): Pass COL_NAME to ui_out_table_header.
2001-06-19* cli-out.c: Include "gdb_assert.h'.Andrew Cagney1-3/+5
(struct ui_out_data): Add field ``suppress_output. (cli_table_begin): When NR_ROWS is zero, suppress_output. (cli_table_end): Clear suppress_output. (cli_table_body): Check suppress_output. (cli_table_header, cli_begin): Ditto. (cli_end, cli_field_int, cli_field_skip): Ditto. (cli_field_string, cli_field_fmt, cli_spaces): Ditto. (cli_text, cli_message, cli_wrap_hint): Ditto. * breakpoint.c (breakpoint_1): Close the ui_out table before printing the breakpoint not found message.
2001-06-19* ui-out.c (ui_out_table_begin): Add parameter ``nr_rows''.Andrew Cagney1-2/+2
(default_table_begin): Ditto. * breakpoint.c (breakpoint_1): Pass nr_printable_breakpoints to ui_out_table_begin. Update everything.
2001-06-18* breakpoint.c (breakpoint_1): Restructure. Compute theAndrew Cagney1-68/+89
nr_printable_breakpoints. Move the header output to before the main print breakpoints loop. (user_settable_breakpoint): New function.
2001-06-18Recognize -i=mi0, -i=mi1 and -i=mi.Andrew Cagney1-12/+12
2001-06-11 * completer.c (gdb_completer_loc_break_characters): New variable.Eli Zaretskii1-16/+27
(line_completion_function): If we are completing on locations, back up the start of word pointer past all characters which can appear in a location spec. (location_completer): New function. * completer.h: Add prototype for location_completer. * symtab.c (make_source_files_completion_list) (add_filename_to_list, not_interesting_fname): New functions. (filename_seen): New function, body extracted from output_source_filename. (output_source_filename): Call filename_seen to check if the file was already printed. (make_symbol_completion_list): If TEXT includes a double-quoted string, return an empty list, not NULL. (make_file_symbol_completion_list): New function, similar to make_symbol_completion_list but with an additional argument SRCFILE. * symtab.h (make_file_symbol_completion_list) (make_source_files_completion_list): Add prototypes. * breakpoint.c (_initialize_breakpoint): Make location_completer be the completion function for all commands which set breakpoints and watchpoints. (top-level): #include "completer.h". * tracepoint.c (_initialize_tracepoint): Make location_completer be the completion function for the "trace" command. (top-level): #include "completer.h". * printcmd.c (_initialize_printcmd): Make location_completer be the completion function for the "print", "inspect", "call", and "disassemble" commands. (top-level): #include "completer.h". * infcmd.c (_initialize_infcmd): Make location_completer be the completion function for the "go", "jump", and "until" commands. (top-level): #include "completer.h".
2001-06-092001-06-08 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+1
* breakpoint.c (delete_breakpoint): Pass mark_inserted to remove_breakpoint, so that the subsequent test for bpt->inserted will succeed, and duplicates will be fixed up.
2001-06-022001-06-01 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+7
* thread.c (delete_step_resume_breakpoint): New function. Maintain internal consistency of the thread list while deleting a step_resume_breakpoint. * gdbthread.h (delete_step_resume_breakpoint): Export. * breakpoint.c (bpstat_find_step_resume_breakpoint): Make thread-aware: don't return a step_resume_breakpoint for the wrong thread. * infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint instead of delete_breakpoint_current_contents. (fetch_inferior_event): Ditto. (handle_inferior_event): Call delete_step_resume_breakpoint instead of delete_breakpoint.
2001-05-23 * breakpoint.c (breakpoint_address_is_meaningful): New function.Kevin Buettner1-7/+39
(check_duplicates): Don't compare non-meaningful addresses.
2001-05-12s/ui_out_list/ui_out_tupple/Andrew Cagney1-19/+19
2001-05-11Add ``type'' parameter to set_raw_breakpoint().Kevin Buettner1-65/+52
2001-05-06Consolidate save_inferior_ptid/restore_inferior_ptid implementation toKevin Buettner1-10/+10
one source file.
2001-05-06* breakpoint.c (check_duplicates): Use the breakpoint's type, notJim Blandy1-3/+23
its address, to decide whether it's a watchpoint or not. Zero is a valid code address. (update_breakpoints_after_exec): Admonishing comments. * breakpoint.h (struct breakpoint): Doc fixes.
2001-05-06* breakpoint.c (check_duplicates): Take a breakpoint object as anJim Blandy1-15/+17
argument, rather than an address and section. All callers changed.
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-37/+43
2001-04-172001-04-17 Michael Snyder <msnyder@redhat.com>Michael Snyder1-8/+25
* breakpoint.c (print_one_breakpoint): Handle 64-bit addresses. * tracepoint.c (tracepoints_info): Handle 64-bit addresses. * testsuite/gdb.trace/deltrace.exp: Allow for 64-bit addresses. * testsuite/gdb.trace/infotrace.exp: Ditto. * testsuite/gdb.trace/passcount.exp: Ditto. * testsuite/gdb.trace/while-stepping.exp: Ditto.
2001-03-27* arch-utils.c (#include "gdbthread.h"): Removed.J.T. Conklin1-11/+3
(#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. -------------------------------------------------------------------
2001-03-20Change SOFTWARE_SINGLE_STEP_P into SOFTWARE_SINGLE_STEP_P().Andrew Cagney1-1/+1
2001-03-20 * breakpoint.c (print_it_typical) <bp_access_watchpoint> [UI_OUT]:Eli Zaretskii1-2/+2
Correct the order of calls to ui_out_field_string and ui_out_list_begin when bs->old_val is NULL.
2001-03-06Update/correct copyright notices.Kevin Buettner1-2/+2
2001-03-012001-02-28 Michael Snyder <msnyder@mvstp600e.cygnus.com>Michael Snyder1-29/+23
* breakpoint.c (print_one_breakpoint): Formatting clean-up. (read_memory_nobpt): Ditto. (ep_is_catchpoint): Ditto. (ep_is_shlib_catchpoint): Ditto. (ep_is_exception_catchpoint): Ditto. (describe_other_breakpoints): Ditto.
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-6/+12
internal_verror().
2001-01-31Replace strsave() with xstrdup().Andrew Cagney1-4/+4
2001-01-18* target.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)Andrew Cagney1-1/+1
* breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Wrap macro definition in parenthesis.
2000-12-15Replace free() with xfree().Kevin Buettner1-42/+42
2000-12-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-0/+1
* linespec.h: New file. Declarations for linespec.c. * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c, symtab.c, tracepoint.c: Include the above. * completer.c: New file. Line completion stuff for GDB. (get_gdb_completer_word_break_characters, get_gdb_completer_quote_characters): New functions. Accessors for useful completer internal data. (filename_completer, line_completion_function, skip_quoted): Moved here from top.c. * completer.h: New file. Declarations for the above. * linespec.c (decode_line_1): Use get_gdb_completer_word_break_characters and get_gdb_completer_quote_characters. * top.c: Include completer.h. (filename_completer, line_completion_function, skip_quoted): Moved to completer.c. * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include completer.h. * Makefile.in (SFILES): Add completer.c. (COMMON_OBS): Add completer.o. (completer.o): New target. (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o, symtab.o, tracepoint.o): Add linespec.h to dependencies list. (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h to dependencies list.
2000-11-27* remote.c (remote_write_bytes): Add default case to switchAndrew Cagney1-2/+4
initializing ``todo''. Ditto for ``nr_bytes''. * top.c (catch_errors): Always initialize ``val''. * solib.c (info_sharedlibrary_command): Handle bfd_get_arch_size returning an unknown size. * gdbtypes.c (count_virtual_fns): Always initialize ``vfuncs''. * breakpoint.c (break_at_finish_at_depth_command_1): Initialise extra_args to NULL. (break_at_finish_command_1): Ditto.
2000-10-30 * eval.c (parse_and_eval_long): New function.David Taylor1-2/+2
* value.h: Declare it. * breakpoint.c (breakpoints_info, maintenance_info_breakpoints): Call parse_and_eval_long, not parse_and_eval_address. * command.c (do_setshow_command): Ditto. * infcmd.c (step_1, signal_command, continue_command): Ditto. * infrun.c (signals_info): Ditto. * stack.c (set_backtrace_limit_command, backtrace_command_1, up_silently_base, down_silently_base): Ditto. * tracepoints.c (tracepoints_info, trace_find_command, trace_find_tracepoint_command): Ditto. * valprint.c (set_radix): Ditto. * values.c (show_values): Ditto.
2000-10-27Corrected spelling errors in comments.David Anderson1-2/+2
gdbarch.{c,sh} removed a word from a comment.
2000-08-302000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-1/+1
* valops.c (value_cast): Indentation fix-up. * acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T, HAVE_STRUCT_LINK_MAP32): New configure macros. * config.in: Ditto. * configure.in: Test for the above new macros. * breakpoint.c: Update copyright date. * core-sol2.c: Include v9/sys/privregs.h directly to work around a bug in Sun's Solaris 8 header files. (fetch_core_registers): Use the above new configure macros to handle cross-debugging of 32-bit core files on a 64-bit host. * sol-thread.c (ps_pdmodel) New function. (rw_common): For debugging of 32-bit apps on a 64-bit host, truncate addresses to 32 bits. * solib.c (solib_extract_address): Functionize. Make 32/64 aware. (LM_ADDR, LM_NEXT, LM_NAME): Ditto. (IGNORE_FIRST_LINK_MAP): Ditto. (first_link_map_member): Make 32/64 aware. (open_symbol_file_object): Ditto. (current_sos): Ditto.
2000-08-03Protoization.Kevin Buettner1-9/+3
2000-07-30Protoization.Kevin Buettner1-349/+148
2000-07-07* breakpoint.c (bpstat_what): Keep returningMark Kettenis1-1/+1
BPSTAT_WHAT_SET_LONGJMP_RESUME when hitting multiple longjmp() breakpoints instead of signalling an error by returning BPSTAT_WHAT_STOP_NOISY.
2000-06-122000-06-12 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-2/+2
* breakpoint.c (breakpoint_thread_match): Fix comment.
2000-06-04Eliminate PARAMS from function pointer declarations.Kevin Buettner1-1/+1
2000-05-28PARAMS removal.Kevin Buettner1-121/+79
2000-05-15Cleanup delete_breakpoint cleanups.Andrew Cagney1-5/+22
2000-05-15Use make_cleanup_ui_out_stream_delete().Andrew Cagney1-2/+2
2000-03-302000-03-30 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-3/+3
* defs.h (struct continuation_arg): make 'data' a union, to avoid casting problems when int and pointer are not the same size. * event-top.c (command_handler): use data as a union. (command_line_handler_continuation): ditto. * infcmd.c (step_1_continuation): use data as a union. Re-indent. (step_once): ditto. (finish_command_continuation): ditto. (finish_command): ditto. * breakpoint.c (until_break_command): use data as a union. (until_break_command_continuation): ditto. * utils.c (add_intermediate_continuation): fix typo in comment.
2000-03-29Fix various GCC warnings.Andrew Cagney1-1/+1
2000-03-282000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>Michael Snyder1-0/+21
breakpoint.c, breakpoint.h (remove_hw_watchpoints): New function. infrun.c (resume): Remove hardware watchpoints before stepping when CANNOT_STEP_HW_WATCHPOINTS is nonzero.
2000-03-282000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>Michael Snyder1-4/+4
* breakpoint.c (insert_breakpoints, do_enable_breakpoint): Reselect the saved frame silently after frame selection for watchpoint evaluation. (insert_breakpoints): Add missing space in `Hardware watchpoint deleted' message. Do not reinsert hardware watchpoint if it is already marked for deletion at next stop.
2000-03-212000-03-21 Eli Zaretskii <eliz@is.elta.co.il>Michael Snyder1-0/+11
* breakpoint.c (bpstat_stop_status): Don't stop if a read watchpoint appears to break, but the watched value changed.
2000-03-212000-03-20 Eli Zaretskii <eliz@is.elta.co.il>Michael Snyder1-45/+85
* breakpoint.c (insert_breakpoints, remove_breakpoint) (bpstat_stop_status, can_use_hardware_watchpoint): Don't insert, remove, or check status of hardware watchpoints for entire structs and arrays unless the user explicitly asked to watch that struct or array. (insert_breakpoints): Try to insert watchpoints for all the values on the value chain, even if some of them fail to insert. * values.c (value_primitive_field): Set the offset in struct value we return when the field is a packed bitfield.