Commit Graph

21516 Commits

Author SHA1 Message Date
gdbadmin d83b1de40b *** empty log message *** 2007-09-24 00:00:02 +00:00
Daniel Jacobowitz 41f1b6975d * infcall.c (call_function_by_hand): Handle language-specific
pass and return by reference.

	* cp-abi.c (cp_pass_by_reference): New.
	* cp-abi.h (cp_pass_by_reference): Declare.
	(struct cp_abi_ops): Add pass_by_reference.
	* gnu-v3-abi.c (gnuv3_pass_by_reference): New.
	(init_gnuv3_ops): Set pass_by_reference.

	* language.c (language_pass_by_reference): New.
	(default_pass_by_reference): New.
	(unknown_language_defn, auto_language_defn, local_language_defn): Add
	default_pass_by_reference.
	* langauge.h (struct language_defn): Add la_pass_by_reference.
	(language_pass_by_reference, default_pass_by_reference): Declare.
	* ada-lang.c (ada_language_defn): Add default_pass_by_reference.
	* c-lang.c (c_language_defn, asm_language_defn)
	(minimal_language_defn): Likewise.
	(cplus_language_defn): Add cp_pass_by_reference.
	* f-lang.c (f_language_defn): Add default_pass_by_reference.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (pascal_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise

	* gdb.cp/pass-by-ref.cc, gdb.cp/pass-by-ref.exp: New files.
2007-09-23 16:25:06 +00:00
Pedro Alves 3f213f78ed * configure.ac: Do gdb.stabs tests by default on Cygwin and MinGW
targets.
	* configure: Regenerate.
2007-09-23 13:56:56 +00:00
Vladimir Prus 0d381245e3 * breakpoint.h (enum enable_state): Remove the
bp_shlib_disabled enumerator.
	(struct bp_location): New members shlib_disabled,
	global_next, enabled and function_name.
	Rename pending to condition_not_parsed.

	* breakpoint.c (ALL_BP_LOCATIONS): Iterate over global_next.
	(ALL_BP_LOCATIONS_SAFE): Likewise.
	(breakpoint_enabled): Don't check for pending.
	(condition_command): Free and update all locations of
	a breakpoint.
	(insert_bp_location): Adjust.
	(software_breakpoint_inserted_here_p): Don't care
	if breakpoint is enabled, as soon as it's inserted.
	(print_it_typical): Print bpstat's location, not
	bpstat's breakpoint's location.
	(bpstat_stop_status): Iterate over all locations, not
	all breakpoints.
	(print_breakpoint_location): New.
	(print_one_breakpoint): Renamed to
	(print_one_breakpoint_location): ...this. Take
	parameters to describe which location is being
	printed. Modify code to properly print header
	for several locations and individual locations.
	(print_one_breakpoint): Print all locations.
	(breakpoint_has_pc): New.
	(describe_other_breakpoints): Use the above.
	(check_duplicates): Renamed to...
	(check_duplicates_for): .. this.
	(check_duplicates): Use check_duplicates_for.
	(allocate_bp_location): Adjust.
	(set_raw_breakpoint_without_location): New,
	extracted from set_raw_breakpoint.
	(set_breakpoint_location_function): New.
	(set_raw_breakpoint): Use
	set_raw_breakpoint_without_location.
	(make_breakpoint_permanent): Mark all locations
	as inserted.
	(disable_breakpoints_in_shlibs): Iterate over
	locations.
	(disable_breakpoints_in_unloaded_shlib): Likewise.
	(re_enable_breakpoints_in_shlibs): Likewise.
	(mention): Say "pending" when breakpoint has
	zero locations.  If breakpoint has more than one
	location, say so.
	(add_location_to_breakpoint): New.
	(create_breakpoint): Accept symtabs_and_lines, not
	symtab_and_line. Pass extra sals to
	add_location_to_breakpoint.
	(create_breakpoints): Pass symtabs_and_lines to
	create_breakpoints.
	(break_command_1): Make pending breakpoints
	have zero locations.
	(do_captured_breakpoint): Remove wrong allocation.
	(clear_command): Iterate over all locations.
	(unlink_locations_from_global_list): Renamed
	from unlink_location_from_global_list. Remove
	all locations.
	(delete_breakpoint): Remove all locations.
	Iterate over all locations when deciding which
	other location to re-enable.
	(all_locations_are_pending): New.
	(update_breakpoint_locations): Renamed from
	update_breakpoint_location. Try to match old
	and new locations using names of containing
	functions.
	(breakpoint_re_set_one): Adjust.
	(find_location_by_number): New.
	(disable_command): Allow disabling individual location.
	(enable_command): Allow enabling individual location.
	* breakpoint.c: Adjust all uses of breakpoint's
	enable state to for bp_shlib_disabled change.
2007-09-23 07:56:22 +00:00
gdbadmin f58849bd46 *** empty log message *** 2007-09-23 00:00:36 +00:00
Vladimir Prus fe3f5fa8f9 * breakpoint.c (do_restore_lang_radix_cleanup): Remove.
(resolve_pending_breakpoint): Remove.
	(re_enable_breakpoints_in_shlibs): Remove.
	(unlink_locations_from_global_list): New.
	(update_breakpoint_locations): New.
	(breakpoint_re_set_one): Don't bail out on pending breakpoints.
	Use parse_condition and update_breakpoint_location to
	reset breakpoint.  Ignore 'symbol not found' error from
	decode_line_1.
	(breakpoint_re_set): Don't emit newline before the
	reason why breakpoint is not reset.
	(do_enable_breakpoint): Don't specially process pending
	breakpoints.
	(free_bp_location): New.
	(break_command_1): For pending breakpoints, initialize
	all fields of a sal with zeroes.
	* breakpoint.h (re_enable_breakpoints_in_shlibs): Remove.
	* infcmd.c (post_create_inferior): Don't call
	re_enable_breakpoints_in_shlibs.
	* infrun.c (handle_inferior_event): Likewise.
	* solib-irix.c (irix_solib_create_inferior_hook): Likewise.
	* solib-osf.c (osf_solib_create_inferior_hook): Likewise.
	* win32-nat.c (get_win32_debug_event): Likewise.
2007-09-22 19:33:32 +00:00
Vladimir Prus 018d34a46b * breakpoint.c (create_breakpoint): Split from
create_breakpoints, implementing most of its logic.
	Take just a single sal, single address string and
	single condition.  Do not take parsed condition at
	all.
	(create_breakpoints): Just call create_breakpoint
	for each sal.
	(find_condition_and_thread): New.
	(break_command_1): Use find_condition_and_thread.
	Do not keep parsed conditions.
	(do_captured_breakpoint): Don't convert
	condition string to struct expression.
2007-09-22 19:10:05 +00:00
Vladimir Prus 511a6cd4e1 gdb/
* breakpoint.h (struct breakpoint): Move the cond
	field to...
	(struct bp_location): Here.
	* breakpoint.c (condition_command, bpstat_stop_status)
	(print_one_breakpoint, allocate_bp_location)
	(solib_load_unload_1, create_fork_vfork_event_catchpoint)
	(create_exec_event_catchpoint, create_breakpoints)
	(break_command_1, watch_command_1, handle_gnu_v3_exceptions)
	(create_ada_exception_breakpoint, set_breakpoint_sal)
	(delete_breakpoint, breakpoint_re_set_one): Adjust.
	* tui/tui-winsource.c (tui_update_breakpoint_info): Adjust.
2007-09-22 19:06:59 +00:00
Vladimir Prus 4f8d1dc6a5 Associate bp_stat with bp_location, not breakpoint.
* breakpoint.h (breakpoint_at): Change type
	to bp_location*.
	* breakpoint.c (bpstat_alloc): Take bp_location,
	not breakpoint.
	(bpstat_find_breakpoint): Look at bpstat's location's
	owner, not at bpstat->breakpoint_at.
	(bpstat_find_step_resume_breakpoint): Likewise.
	(bpstat_num): Likewise.
	(print_it_typical): Likewise.
	(print_bp_stop_message): Likewise.
	(watchpoint_check): Likewise.
	(bpstat_what): Likewise.
	(bpstat_get_triggered_catchpoints): Likewise.
	(breakpoint_auto_delete): Likewise.
	(delete_breakpoint): Likewise.
	(bpstat_stop_status): Pass location, not breakpoint,
	to bpstat_alloc.  Look at bpstat's location's
	owner, not at bpstat->breakpoint_at.
2007-09-22 17:49:41 +00:00
Jim Blandy 3262338673 * macrotab.h (new_macro_table): Document that removing information
from an obstack/bcache-managed macro table leaks memory.
* macrotab.c (macro_free, macro_bcache_free): Instead of asserting
that data is never freed in obstack/bcache-managed macro tables,
just leak the storage.
(macro_undef): If we're undefining a macro at exactly the same
source location that we defined it, simply remove the definition
altogether.
2007-09-22 01:09:19 +00:00
gdbadmin 5aa6af59af *** empty log message *** 2007-09-22 00:00:33 +00:00
Daniel Jacobowitz a75cf6c00c * gdb.base/sepdebug.exp (test_different_dir): Append to pf_prefix. 2007-09-21 22:42:52 +00:00
Joel Brobecker c295b2e505 * symfile.h (struct sym_fns): Add new field sym_read_linetable.
* coffread.c, dbxread.c, elfread.c, mipsread.c somread.c:
        Adjust the struct sym_fns object accordingly by setting
        the new field to NULL.
        * xcoffread.c (aix_process_linenos): Make static.
        (xcoff_sym_fns): Set new field to aix_process_linenos.
        * buildsym.c (end_symtab): Replace call to PROCESS_LINENUMBER_HOOK
        by call to new the new sym_fns sym_read_linetable function.
        * config/powerpc/aix.mt (DEPRECATED_TM_FILE): Delete.
        * config/rs6000/tm-rs6000.h: Delete.
2007-09-21 18:01:26 +00:00
Maciej W. Rozycki ab2e1992cf * mips-tdep.c (mips_n32n64_push_dummy_call): Per N32/N64 ABI
rules do not treat composite types specially.
2007-09-21 15:54:58 +00:00
gdbadmin aca99d3e4e *** empty log message *** 2007-09-21 00:00:03 +00:00
Maciej W. Rozycki 97ab0fdd9d * mips-tdep.c (mips32_in_function_epilogue_p): New function.
(mips16_in_function_epilogue_p): Likewise.
(mips_in_function_epilogue_p): Likewise.
(mips_gdbarch_init): Register mips_in_function_epilogue_p().
2007-09-20 15:34:19 +00:00
gdbadmin ea3c290040 *** empty log message *** 2007-09-20 00:00:02 +00:00
Joel Brobecker 01fe12f6fb * configure.ac: Add check for "etext".
* configure, config.in: Regenerate.
        * maint.c (TEXTEND): Only define if either _etext or etext
        are available.
        Disable the profiling functionality if TEXTEND is not defined.
2007-09-19 22:00:34 +00:00
Daniel Jacobowitz aa6c981f95 * mips-tdep.c (mips_stub_frame_cache): Correct the saved return
address register.  Correct the call to frame_id_build.
	(mips_stub_frame_sniffer): Use the stub unwinder when the PC
	is invalid.
2007-09-19 14:45:39 +00:00
Daniel Jacobowitz fd462a6189 * linux-low.c (O_LARGEFILE): Define.
(linux_read_memory): Use /proc/PID/mem.
	* configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
	* configure, config.in: Regenerated.
2007-09-19 14:41:50 +00:00
gdbadmin 039cfc074b *** empty log message *** 2007-09-19 00:00:02 +00:00
Joel Brobecker 393129712f * ia64-tdep.c (refine_prologue_limit): Make sure we don't scan
the linetable past the function end.
2007-09-18 23:46:04 +00:00
Jim Wilson 558dc30aec Update my email address. 2007-09-18 21:13:03 +00:00
Jim Wilson 2e2973de8b Update email address. 2007-09-18 21:10:41 +00:00
Jerome Guitton 60e2c248bc * inf-ttrace.c (inf_ttrace_private_thread_info): New structure type.
(inf_ttrace_delete_dying_threads_callback): New function.
        (inf_ttrace_resume): After resuming the execution, iterate over
        the dying threads to delete them for the thread list.
        (inf_ttrace_wait): on TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE,
        mark the corresponding thread as dying instead of removing it
        from the thread list.
        (inf_ttrace_thread_alive): return 0 for dying threads.
2007-09-18 12:42:22 +00:00
gdbadmin 87dcefc059 *** empty log message *** 2007-09-18 00:00:37 +00:00
Joel Brobecker f4c1edd8e5 * infrun.c (insert_step_resume_breakpoint_at_frame): Add assertion
that return_frame is not null.
2007-09-17 19:44:20 +00:00
Joel Brobecker 8d4e36bad1 * solib-svr4.c: Add include of "auxv.h".
(enable_break): Use the AT_BASE auxiliary entry if available.
        * Makefile.in (solib-svr4.o): Update dependencies.
2007-09-17 19:32:53 +00:00
Joel Brobecker f9ed52beed * NEWS: Create a new section for the next release branch.
Rename the section of the current branch, now that it has
        been cut.
2007-09-17 19:30:05 +00:00
Daniel Jacobowitz 18ecae3831 * schedlock.c (NUM): Change to 1.
(main): Use args[0] for the main thread.
	* schedlock.exp: Only expect two threads.  Only issue one pass or fail
	regardless of the number of threads.
2007-09-17 15:38:05 +00:00
Jerome Guitton eff4f95e29 * dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.
* Makefile.in (dwarf2loc.o): Depend on gdb_assert.h.
2007-09-17 14:53:05 +00:00
gdbadmin b6dcfa7d9e *** empty log message *** 2007-09-17 00:00:02 +00:00
Vladimir Prus 084344da42 * mi/mi-cmds.c (mi_cmds): Register -list-features.
* mi/mi-cmds.h (mi_cmd_list_features): New.
	* mi/mi-main.c (mi_cmd_list_features): New.
2007-09-16 14:59:31 +00:00
gdbadmin ea9eba9bfa *** empty log message *** 2007-09-16 00:00:32 +00:00
Eli Zaretskii 7e27a47a1e gdb.texinfo (Separate Debug Files): More accurate wording regarding
build ID and a reference to the ld manual rather than the Fedora wiki.
2007-09-15 09:49:36 +00:00
Eli Zaretskii 821609525d * gdb.texinfo (Output): Spell out which features of C's printf are
not supported by GDB's printf.
2007-09-15 08:54:26 +00:00
gdbadmin 2fc5992fbb *** empty log message *** 2007-09-15 00:00:33 +00:00
Maciej W. Rozycki 4a543daf06 * gdb.mi/mi-watch.exp (test_watchpoint_all): Pass the watchpoint
type down.
(test_watchpoint_triggering): XFAIL the sw watchpoint scope
test.
* gdb.mi/mi2-watch.exp (test_watchpoint_all): Pass the
watchpoint type down.
(test_watchpoint_triggering): XFAIL the sw watchpoint scope
test.
2007-09-14 17:37:55 +00:00
Maciej W. Rozycki 5509918fe4 [mti-fix-scope]
* gdb.mi/mi-watch.exp (test_watchpoint_all): New function.
Move all the tests here and run them twice, once using software
watchpoints and once using hardware watchpoints.
* gdb.mi/mi2-watch.exp (test_watchpoint_all): Likewise.
2007-09-14 17:21:29 +00:00
gdbadmin 8e8b1f6967 *** empty log message *** 2007-09-14 00:00:33 +00:00
gdbadmin 17b6b921e4 *** empty log message *** 2007-09-13 00:00:32 +00:00
Daniel Jacobowitz 40b5398770 * gdb.base/solib-weak.exp (do_test): Adjust the file names for each
test.
2007-09-12 15:12:53 +00:00
gdbadmin aa31c83b93 *** empty log message *** 2007-09-12 00:00:03 +00:00
gdbadmin 50c7215d2f Record GDB 6.7 branch creation. Bump version number to 6.7.50-20070911-cvs. 2007-09-11 21:28:45 +00:00
gdbadmin d1cb150d60 *** empty log message *** 2007-09-11 00:00:02 +00:00
Daniel Jacobowitz 4d8453a549 * thread.c (free_thread): Do not delete the step resume breakpoint
right away.
2007-09-10 21:27:23 +00:00
Daniel Jacobowitz 4eb0ad19f3 * arch-utils.c (gdbarch_info_fill): Also try core_bfd.
* corelow.c (core_read_description): New.
	(init_core_ops): Set to_read_description.
	* gdbarch.sh: Add gdbarch_core_read_description.
	* mips-linux-tdep.c (mips_linux_core_read_description): New.
	(mips_linux_init_abi): Call set_gdbarch_core_read_description.
	* mips-tdep.c (mips_tdesc_gp32, mips_tdesc_gp64): New.
	(mips_register_g_packet_guesses): Use them.
	(_initialize_mips_tdep): Initialize them.
	* mips-tdep.h (mips_tdesc_gp32, mips_tdesc_gp64): Declare.
	* gdbarch.h, gdbarch.c: Regenerated.
2007-09-10 21:14:11 +00:00
Ulrich Weigand 6a6b96b9c2 * infrun.c (stepping_past_breakpoint): New global variable.
(stepping_past_breakpoint_ptid): Likewise.
	(prepare_to_proceed): Add STEP parameter.  Do not check for Ctrl-C.
	Only switch threads if we need to single-step over a breakpoint hit
	in the previously selected thread.  If stepping, remember previous
	thread to switch back to in STEPPING_PAST_BREAKPOINT[_PTID].  Call
	switch_to_thread instead of copying its contents.
	(proceed): Pass STEP to prepare_to_proceed.  Always set ONEPROC if
	prepare_to_proceed returns true.
	(init_wait_for_inferior): Reset STEPPING_PAST_BREAKPOINT.
	(context_switch): Call switch_to_thread.
	(handle_inferior_event): Switch back to previous thread if requested
	in STEPPING_PAST_BREAKPOINT[_PTID] by prepare_to_proceed.
	* gdbthread.h (switch_to_thread): Add prototype.
	* thread.c (switch_to_thread): Make global.
2007-09-10 18:49:26 +00:00
gdbadmin b7d8ff2e0f *** empty log message *** 2007-09-10 00:00:32 +00:00
Mark Kettenis 8b3fc8d898 * lib/gdb.exp (build_id_debug_filename_get): Improve check for
build-id.
2007-09-09 22:25:31 +00:00