Commit Graph

218 Commits

Author SHA1 Message Date
Elena Zannoni fe39c6533d 2002-10-24 Elena Zannoni <ezannoni@redhat.com>
* symtab.h (INIT_SAL): Delete macro.
	(init_sal): Export.
	* symtab.c (init_sal): New function.

	* ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
	to init_sal function call.
	(find_sal_from_funcs_and_line): Ditto.
	(all_sals_for_line): Ditto.
	* breakpoint.c (create_internal_breakpoint): Ditto.
	(create_fork_vfork_event_catchpoint): Ditto.
	(create_exec_event_catchpoint): Ditto.
	(parse_breakpoint_sals): Ditto.
	(watch_command_1): Ditto.
	(handle_gnu_4_16_catch_command): Ditto.
	(clear_command): Ditto.
	* hppa-tdep.c (child_enable_exception_callback): Ditto.
	* infcmd.c (run_stack_dummy): Ditto.
	* infrun.c (process_event_stop_test): Ditto.
	(check_sigtramp2): Ditto.
	(step_over_function): Ditto.
	* linespec.c (decode_line_2): Ditto.
	(decode_line_1): Ditto.
	* source.c (line_info): Ditto.
	* symtab.c (find_pc_sect_line): Ditto.
2002-10-24 21:02:53 +00:00
Adam Fedor 1aeae86e76 (parse_breakpoint_sals): Ignore ObjC method
names when matching breakpoints in current file.
2002-10-16 23:25:32 +00:00
Fernando Nasser c214a6fd4d * source.c (get_current_source_symtab_and_line): Initialize sal.pc and
sal.end fields.
	(get_current_or_default_source_symtab_and_line): Ditto.
	* breakpoint.c (parse_breakpoint_sals): Use correct accessor function
	so we do not cause a new source symtab to be searched for (reverting an
	unintentional change from the 2002-09-20 patch).
	* scm-lang.c (scm_unpac): Ditto.
2002-09-22 20:29:52 +00:00
Fernando Nasser 0378c33231 * source.c: Make global variables current_source_symtab and
current_source_line static.
        (list_command): Moved to cli/cli-cmds.c.
        (ambiguous_line_spec): Moved to cli/cli-cmds.c.
        (get_first_line_listed): New accessor function.
        (get_lines_to_list): New accessor function.
        (get_current_source_symtab_and_line): New function. Retrieves the
        position in the source code that we consider current.
        (get_current_or_default_source_symtab_and_line): New function.
        Like the above but attempts to determine a default position if one
        is not currently defined.
        (set_current_source_symtab_and_line): New function. Sets the source
        code position considered current and returns the previously set one.
        (clear_current_source_symtab_and_line): Reset stored information about
        a current source line.
        (_initialize_source): Remove registration for the "list" command and
        its alias.
        * source.h: Add declarations for the new functions above.
        * symtab.h: Remove declarations for the global variables mentioned
        above.
        * breakpoint.c (parse_breakpoint_sals): Use accessor functions to
        obtain current source line.
        * linespec.c (decode_line_1): Ditto.
        * macroscope.c (default_macro_scope): Ditto.
        * scm-lang.c (scm_unpac): Ditto.
        * stack.c (print_frame_info_base): Ditto.
        * symfile.c (clear_symtab_users): Ditto.
        * symtab.c (decode_line_spec): Ditto.
        * cli/cli-cmds.c (list_command): Moved here from source.c.
        (ambiguous_line_spec): Moved here from source.c.
        (_init_cli_cmds): Add definition for "list" and its alias.
        * Makefile.in: Update dependencies.
2002-09-20 14:58:59 +00:00
Andrew Cagney 389e51db10 Revert previous change. Not obvious. 2002-09-19 03:58:41 +00:00
Michael Snyder 3b4efeaa2d 2002-09-18 Michael Snyder <msnyder@redhat.com>
Preliminary support for Objective-C:
	* defs.h (language_objc): New enum value.
	(puts_filtered_tabular): Declaration only, exported from utils.c.
	(skip_quoted): Delete, declared in completer.h.
	* c-exp.y: Include completer.h.
	* p-exp.y: Ditto.
	* jv-exp.y: Ditto.
	* expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
	New operator enum values.
	* language.h (CAST_IS_CONVERSION): Test for language_objc.
	* language.c (binop_result_type): Handle language_objc case.
	(integral_type, character_type, string_type, boolean_type,
	structured_type, binop_type_check): Ditto.
	* symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
	(struct objc_specific): Add to general_symbol_info.
	(SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
	(SYMBOL_DEMANGLED_NAME): Handle objc case.
	* parser-defs.h (struct objc_class_str): New struct type.
	(start_msglist, end_msglist, add_msglist): Declaration only,
	exported from objc-lang.c.
	* value.h (value_of_local, value_nsstring,
	call_function_by_hand_expecting_type): Exported from valops.c.
	* valops.c (find_function_addr): Export.
	(call_function_by_hand_expecting_type): New function.
	(value_of_local): New function.
	* symfile.c (init_filename_language_table): Add ".m" extension
	for Objective-C.
	* utils.c (puts_filtered_tabular): New function.
	(fprintf_symbol_filtered): Add objc demangling support (disabled).
	(set/show demangle): Extend help-string to refer to ObjC.
	* elfread.c (elf_symtab_read): Skip Objective-C special symbols.
	* stabsread.c (symbol_reference_defined): Objective-C symbols
	may contain colons: make allowances when scanning stabs strings
	for colons.
	(objc_find_colon): New function.
	* printcmd.c (address_info): If language == objc then print
	"self" instead of "this".
	* parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
	OP_NSSTRING, and OP_SELF.
	(prefixify_subexp): Ditto.
	* source.c (print_source_lines): Mention objc in comment.
	* breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
	method names.
2002-09-19 01:34:51 +00:00
Michael Snyder c651001893 2002-08-26 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (insert_breakpoints): Protect all references
	to 'process_warning'.  Shorten long lines.
2002-09-05 01:28:14 +00:00
Pierre Muller c860120cad 2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
* breakpoint.c (breakpoint_init_inferior): Reset the val field of
	watchpoints to NULL.
	(insert_breakpoints): set val field of watchpoints if NULL.
2002-08-30 07:14:19 +00:00
Elena Zannoni e1507482f5 2002-08-27 Elena Zannoni <ezannoni@redhat.com>
* cli/cli-script.h (copy_command_lines): Export.
	* breakpoint.c: Include cli/cli-script.h.
	* Makefile.in (breakpoint.o): Update dependencies.
2002-08-27 19:06:36 +00:00
Michael Snyder c2b8ed2c80 2002-08-26 Joel Brobecker <brobecker@gnat.com>
* cli/cli-script.c (copy_command_lines): New function.
	* defs.h (copy_command_lines): Export.
	* testsuite/gdb.base/commands.exp: New tests for commands
	attached to a temporary breakpoint, and for commands that
	delete the breakpoint they are attached to.

2002-08-26  Michael Snyder  <msnyder@redhat.com>

	* breakpoint.c (bpstat_stop_status): Instead of copying the
	pointer to the breakpoint commands struct, make a new copy
	of the struct and point to that.
	(bpstat_clear): Free the commands struct.
	(bpstat_clear_actions): Free the commands struct.
	(bpstat_do_actions): Free the command actions.  Also execute
	the local cleanups, instead of deleting them.
	(delete_breakpoint): Leave the commands field of the bpstat
	chain alone -- it will be freed later.
2002-08-27 01:09:09 +00:00
Grace Sainsbury 81d0cc192b * infrun.c (normal_stop, proceed): Remove call to print_sys_errmsg
when breakpoints fail. Move general breakpoint error messages to
	insert_breakpoints.
	* breakpoint.c (insert_breakpoints): Change warnings when
	breakpoints are nto inserted to specify the type. Remove call to
	memory_error when hardware breakpoints can't be inserted. Remove
	multiple calls to warning so all messages are sent to the user at
	once.
	(delete_breakpoints): Make insert error messsages more explicit.
2002-08-23 20:49:38 +00:00
Keith Seitz e86ae29ff5 * breakpoints.c (watch_command_1): Use internal breakpoint
when setting a watchpoint_scope breakpoint.
2002-08-20 20:03:35 +00:00
Joel Brobecker c8edd8b484 * alpha-osf1-tdep.c (alpha_osf1_init_abi): Unfortunately,
procfs appears to be broken when debugging on multi-processor
        machines. So enable software single stepping in order to avoid
        using the procfs interface to do next/step operations, using
        internal breakpoints instead.

        * infrun.c (handle_inferior_event): Readjust the stop_pc by
        DECR_PC_AFTER_BREAK when hitting a single step breakpoint, to
        make this pc address equal to the value it would have if the
        system stepping capability was used. Also set a new flag used
        to ensure that we don't readjust the PC one more time later.

        * breakpoint.c (bpstat_stop_status): Do not adjust the PC
        address by DECR_PC_AFTER_BREAK when software single step is
        in use for this architecture, as this has already been taken
        care of in handle_inferior_event().
2002-08-17 06:12:52 +00:00
Andrew Cagney 6e31adb3f7 * breakpoint.c (bpstat_stop_status): Rename not_a_breakpoint to
not_a_sw_breakpoint.
* breakpoint.h (bpstat_stop_status): Add parameter names.
2002-08-16 15:37:54 +00:00
Tom Tromey ea9365bb21 * breakpoint.c (delete_command): Don't repeat `delete' commands. 2002-06-26 05:20:04 +00:00
Keith Seitz 221ea38594 * breakpoint.c (condition_command): Post breakpoint_modify
when a condition is added to an existing breakpoint.
        (commands_command): Likewise for commands.
        (set_ignore_count): Likewise for ignore counts.
        If no tty, do not simply return, still need to send event
        notification.
        (ignore_command): Only print a newline if the command came
        from a tty.
        Don't call breakpoints_changed, since this is now properly
        handled by set_ignore_count.
2002-06-18 21:58:55 +00:00
Andrew Cagney 101dcfbe4a * infrun.c (struct inferior_status): Replace fields
selected_frame_address and selected_level with field
selected_frame_id.
(save_inferior_status): Update.  Use get_frame_id.
(struct restore_selected_frame_args): Delete.
(restore_selected_frame): Update.  Use frame_find_by_id.
(restore_inferior_status): Update.

* breakpoint.h (struct breakpoint): Change type of
watchpoint_frame to frame_id.
* breakpoint.c (insert_breakpoints): Use frame_find_by_id.  Remove
call to get_current_frame.
(do_enable_breakpoint): Use frame_find_by_id.  Remove call to
get_current_frame.
(watchpoint_check): Use frame_find_by_id.

* frame.h (record_selected_frame): Delete declaration.
* stack.c (record_selected_frame): Delete function.

* frame.h (struct frame_id): Define.
(get_frame_id): Declare.
(frame_find_by_id): Declare.
* frame.c (frame_find_by_id): New function.
(get_frame_id): New function.
2002-06-10 23:25:50 +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 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 b31da25ee5 * frame.h (selected_frame_level): Document as deprecated.
(frame_relative_level): Declare.
* stack.c (frame_relative_level): New function.
(selected_frame_level): Document as deprecated.
(select_frame): Do not set the selected_frame_level.

* stack.c (frame_info, record_selected_frame): Update.
(frame_command, current_frame_command): Update.
(up_silently_base, up_command, down_silently_base): Update.
(down_command): Update.
* inflow.c (kill_command): Update.
* tracepoint.c (finish_tfind_command): Update.
* corelow.c (core_open): Update.
* thread.c (info_threads_command): Update.
(do_captured_thread_select): Update.
* infcmd.c (finish_command): Update.
* breakpoint.c (insert_breakpoints, do_enable_breakpoint): Update.
2002-04-21 20:23:34 +00:00
Michael Snyder 80f8a6eba5 2002-04-05 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (clear_command): Rewrite middle section to
	combine two loops with identical control conditions.
	Add a cleanup to eliminate a memory leak.
2002-04-09 22:33:25 +00:00
Jim Blandy ae767bfb78 gdb/ChangeLog:
* stack.c (get_selected_block): Add new argument `addr_in_block',
used to return the exact code address we used to select the block,
not just the block.
* blockframe.c (get_frame_block, get_current_block): Same.
* frame.h (get_frame_block, get_current_block,
get_selected_block): Update declarations.
* linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c,
linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed.

gdb/mi/ChangeLog:
* mi-cmd-stack.c (list_args_or_locals): Pass new arg to
get_frame_block.  (See entry in gdb/ChangeLog.)
2002-04-05 22:04:43 +00:00
Michael Snyder 84d2ac95e4 2002-04-05 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (insert_breakpoints): Change 'hw' to 'hardware in
	warning message.
2002-04-05 19:16:15 +00:00
Michael Snyder c02f570307 2002-04-04 Michael Snyder <msnyder@redhat.com>
* breakpoint.c: Add support for hardware breakpoints in overlays.
	(overlay_events_enabled): New state variable.
	(insert_breakpoints): Use overlay_events_enabled to decide
	whether to attempt to set a breakpoint at the overlay load addr.
	Handle bp_hardware_breakpoint as well as bp_breakpoint.
	(remove_breakpoint): Use overlay_events_enabled to decide
	whether breakpoints need to be removed from overlay load addr.
	Handle bp_hardware_breakpoint as well as bp_breakpoint.
	(bpstat_stop_status): Handle bp_hardware_breakpoint in overlays.
	(create_overlay_event_breakpoint, enable_overlay_breakpoints,
	disable_overlay_breakpoints): Update overlay_events_enabled.
2002-04-05 02:35:26 +00:00
Michael Snyder d4654627e1 2002-03-27 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (_initialize_breakpoint): Clean up help string.
	* infcmd.c (_initialize_infcmd): Ditto.
	* language.c (_initialize_language): Ditto.
	* symfile.c (_initialize_symfile): Ditto.
	* top.c (_init_main): Ditto.
	* cli/cli-cmds.c (init_cli_cmds): Ditto.
2002-03-28 01:35:56 +00:00
Andrew Cagney 5ba2abebe7 * cli/cli-decode.c (set_cmd_completer): New function.
* command.h (set_cmd_completer): Declare.
* cli/cli-decode.h (set_cmd_completer): Ditto.

* breakpoint.c (_initialize_breakpoint): Use set_cmd_completer.
* cli/cli-cmds.c (init_cli_cmds): Ditto.
* win32-nat.c (_initialize_inftarg): Ditto.
* remote-rdi.c (_initialize_remote_rdi): Ditto.
* proc-api.c (_initialize_proc_api): Ditto.
* hppa-tdep.c (_initialize_hppa_tdep): Ditto.
* source.c (_initialize_source): Ditto.
* exec.c (_initialize_exec): Ditto.
* solib.c (_initialize_solib): Ditto.
* top.c (init_main): Ditto.
* tracepoint.c (_initialize_tracepoint): Ditto.
* symfile.c (_initialize_symfile): Ditto.
* printcmd.c (_initialize_printcmd): Ditto.
* infcmd.c (_initialize_infcmd): Ditto.
* corefile.c (_initialize_core): Ditto.
2002-03-06 06:28:35 +00:00
Richard Earnshaw 9df628e0aa * gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
* gdbarch.c gdbarch.h: Regenerate.
* breakpoint.c (create_longjmp_breakpoint): Always compile this
function.
(breakpoint_reset): Test GET_LONGJMP_TARGET_P().
* infrun.c (GET_LONGJMP_TARGET): Delete default definition.
(handle_inferior_event): Test GET_LONGJMP_TARGET_P().

* arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
* arm-tdep.c (arm_get_longjmp_target): New function.
(arm_gdbarch_init): Initialize jb_pc to -1.  If ABI handler changes
this to a positive value register arm_get_longjmp_target as the
longjmp handler.
* arm-linux-tdep.c (arm_get_longjmp_target): Delete.
(arm_linux_init_abi): Set up longjmp description in tdep.
* armnbsd-nat.c (get_longjmp_target): Delete.
* armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
description in tdep.
* config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
(get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
* config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
2002-02-18 13:35:31 +00:00
Michael Snyder 1900040cf3 2002-02-04 Michael Snyder <msnyder@redhat.com>
* breakpoint.h (enum bptype): Add new overlay event bp type.
	(enable_overlay_breakpoints, disable_overlay_breakpoints): Export.

	* breakpoint.c (create_internal_breakpoint): New function.
	(internal_breakpoint_number): Moved into create_internal_breakpoint.
	(create_longjmp_breakpoint): Use create_internal_breakpoint.
	(create_thread_event_breakpoint): Ditto.
	(create_solib_event_breakpoint): Ditto.
	(create_overlay_event_breakpoint): New function.
	(enable_overlay_breakpoints, disable_overlay_breakpoints): New funcs.
	(update_breakpoints_after_exec): Delete and re-initialize
	overlay event breakpoints after an exec.  Add FIXME comment
	about longjmp breakpoint.
	(print_it_typical): Ignore overlay event breakpoints.
	(print_one_breakpoint): Ditto.
	(mention): Ditto.
	(bpstat_what): Do not stop for overlay event breakpoints.
	(delete_breakpoint): Don't delete overlay event breakpoints.
	(breakpoint_re_set_one): Delete the overlay event breakpoint.
	(breakpoint_re_set): Re-create overlay event breakpoint.

	* symfile.c (overlay_auto_command): Enable overlay breakpoints.
	(overlay_manual_command): Disable overlay breakpoints.
	(overlay_off_command): Disable overlay breakpoints.
2002-02-06 18:31:07 +00:00
Peter Schauer e5d6672073 * breakpoint.c (break_at_finish_command): Really export.
(break_at_finish_at_depth_command): Ditto.
	(tbreak_at_finish_command): Ditto.
	* hppa-tdep.c: Include completer.h.
	* Makefile.in (hppa-tdep.o): Add dependency on $(completer_h).
	(COMMON_OBS): Remove duplicate ui-file.o, frame.o, doublest.o.
2002-02-03 11:43:19 +00:00
Michael Snyder 261c4ca206 2002-02-01 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (breakpoint_re_set): Delete ancient #if 0 code.
2002-02-02 02:49:07 +00:00
Michael Snyder 03ac34d585 2002-02-01 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (set_ignore_count): Move misplaced comment
	back where it belongs.
2002-02-02 01:25:28 +00:00
Michael Snyder c7bd442ca0 2002-02-01 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (create_temp_exception_breakpoint): Delete.
2002-02-01 23:44:39 +00:00
Michael Snyder 502fd40859 2002-01-31 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (break_at_finish_command): Export.
	(break_at_finish_at_depth_command): Export.
	(tbreak_at_finish_command): Export.
	(_initialize_breakpoint): Delete "xbreak" and "tbreak" commands.
	* hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
	"tbreak" commands, which are HPPA specific.
2002-02-01 02:05:13 +00:00
Michael Snyder 9f04af04ce 2002-01-31 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (insert_breakpoints, remove_breakpoint,
	breakpoint_here_p, breakpoint_inserted_here_p,
	breakpoint_thread_match, bpstat_stop_status,
	describe_other_breakpoints, check_duplicates, clear_command):
	Coding standard fixes.
2002-02-01 01:08:05 +00:00
Andrew Cagney 8926118ce2 Remove else clause to #if UI_OUT. 2002-01-17 22:15:18 +00:00
Andrew Cagney b18c45ede9 From Mark Kettenis <kettenis@gnu.org>:
* breakpoint.c (breakpoint_re_set_one): Don't discard SHLIB
breakpoints when they fail.
2001-11-11 16:39:59 +00:00
Corinna Vinschen c12260ac38 * arch-utils.c (generic_in_function_epilogue_p): New function.
* arch-utils.h (generic_in_function_epilogue_p): Declare extern.
	* breakpoint.c (watchpoint_check): Add test whether the pc is
	currently in the epilogue of a function.
	* gdbarch.c: Autogenerated from gdbarch.sh.
	* gdbarch.h: Ditto.
	* gdbarch.sh (function_list): Add `in_function_epilogue_p' definition.
2001-11-06 11:02:12 +00:00
Andrew Cagney 278cd55f78 * breakpoint.h, breakpoint.c: Ditto. 2001-10-20 23:54:29 +00:00
Daniel Jacobowitz e88c90f2c5 2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* symtab.h (struct block): (ALL_BLOCK_SYMBOLS): New macro.

        * symtab.c (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
        (make_symbol_completion_list): Likewise.
        (make_symbol_overload_list): Likewise.
        * buildsym.c (finish_block): Likewise.
        * breakpoint.c (get_catch_sals):  Likewise.
        * mdebugread.c (mylookup_symbol): Likewise.
        * objfiles.c (objfile_relocate): Likewise.
        * printcmd.c (print_frame_args): Likewise.
        * stack.c (print_block_frame_locals): Likewise.
        (print_block_frame_labels): Likewise.
        (print_frame_arg_vars): Likewise.
        * symmisc.c (dump_symtab): Likewise.
        * tracepoint.c (add_local_symbols): Likewise.
        (scope_info): Likewise.

2001-10-12  Daniel Jacobowitz  <drow@mvista.com>

        * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS.

2001-10-12  Daniel Jacobowitz  <drow@mvista.com>

        * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS.
        * generic/gdbtk-stack.c (gdb_block_vars): Likewise.
        (gdb_get_blocks): Likewise.
        (gdb_get_vars_command): Likewise.
5~
2001-10-12 23:51:30 +00:00
Andrew Cagney 2b65245ef4 Add ui_out parameter to libgdb functions. 2001-09-18 05:00:51 +00:00
Eli Zaretskii b5de0fa741 The following changes avoid polluting global namespace with the
`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-08-02 11:58:29 +00:00
Andrew Cagney 5b7f31a409 Move libgdb library functions to gdb.h (new file).
Update everything related to this.
2001-07-28 19:48:15 +00:00
Stephane Carrez 37767e423b * utils.c (query): Remove tui hacks; tui must use the query_hook.
* 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-14 18:59:07 +00:00
Andrew Cagney 9dc5e2a936 Replace:
if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
with:
  if (ui_out_is_mi_like_p (uiout))
2001-07-06 03:53:11 +00:00
Michael Snyder 80b34fabd3 2001-06-28 Michael Snyder <msnyder@redhat.com>
* 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-28 21:34:03 +00:00
Andrew Cagney d7faa9e713 Always send the breakpoint table headers to ui-out. MI/CLI can
internally decide if they should be displayed.
2001-06-27 00:09:01 +00:00
Andrew Cagney b25959ec59 * ui-out.h (ui_out_table_header): Add parameter ``col_name''.
(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-21 15:39:54 +00:00
Andrew Cagney 698384cd69 * cli-out.c: Include "gdb_assert.h'.
(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 20:30:11 +00:00
Andrew Cagney d63f1d40c6 * ui-out.c (ui_out_table_begin): Add parameter ``nr_rows''.
(default_table_begin): Ditto.
* breakpoint.c (breakpoint_1): Pass nr_printable_breakpoints to
ui_out_table_begin.
Update everything.
2001-06-19 16:19:16 +00:00
Andrew Cagney 7f3b047364 * breakpoint.c (breakpoint_1): Restructure. Compute the
nr_printable_breakpoints.  Move the header output to before the
main print breakpoints loop.
(user_settable_breakpoint): New function.
2001-06-18 18:48:06 +00:00