Commit Graph

59491 Commits

Author SHA1 Message Date
Tom Tromey 7c8a8b0498 * cli/cli-script.c (do_fclose_cleanup): Remove.
(script_from_file): Use make_cleanup_fclose.
	* xml-tdesc.c (do_cleanup_fclose): Remove.
	(fetch_xml_from_file): Use make_cleanup_fclose.
	* tracepoint.c (tracepoint_save_command): Use
	make_cleanup_fclose.  Always free pathname.
	* source.c (print_source_lines_base): Use make_cleanup_fclose.
	* remote.c (fclose_cleanup): Remove.
	(remote_file_put): Use make_cleanup_fclose.
	(remote_file_get): Likewise.
	* linux-nat.c (linux_nat_find_memory_regions): Use
	make_cleanup_fclose.
	(linux_nat_info_proc_cmd): Likewise.
	(linux_proc_pending_signals): Likewise.
	* fbsd-nat.c (fbsd_find_memory_regions): Use make_cleanup_fclose.
	Free file name.
	* cli/cli-dump.c (do_fclose_cleanup): Remove.
	(make_cleanup_fclose): Remove.
	* defs.h (make_cleanup_fclose): Declare.
	* utils.c (do_fclose_cleanup): New function.
	(make_cleanup_fclose): Likewise.
2008-10-28 15:22:13 +00:00
Alan Modra 0f3e7e3c00 daily update 2008-10-28 00:00:04 +00:00
gdbadmin 6b2b219829 *** empty log message *** 2008-10-28 00:00:02 +00:00
Pedro Alves 5a55c295aa * inflow.c (kill_command): If the target claims there is still
execution, don't clear the thread list.
2008-10-27 22:37:20 +00:00
Pedro Alves 5256a53bb3 * cp-name-parser.y: Include defs.h instead of config.h.
(parse_escape): Rename to ...
	(cp_parse_escape): ... this.
	(yylex): Update.
	(xfree) [TEST_CPNAMES]: New.
2008-10-27 19:28:52 +00:00
DJ Delorie aed1add31b merge from gcc 2008-10-27 18:25:21 +00:00
Pedro Alves e8ecdb5c3b * CONTRIBUTE: Mention autoconf 2.59 and configure.ac instead of
2.13 and configure.in.
2008-10-27 17:41:57 +00:00
Pedro Alves 8a30517206 * target.h (struct target_ops) <to_supports_multi_process>: New
field.
	(target_supports_multi_process): New define.
	* target.c (update_current_target): Inherit and de_fault
	to_supports_multi_process.
	* infcmd.c (attach_command): Allow attaching to multiple processes
	if the target supports it.
	(detach_command): If the target claims there is still execution,
	don't clear the thread list.
	* remote.c (remote_supports_multi_process): New.
	(init_remote_ops): Register remote_supports_multi_process.
2008-10-27 12:43:24 +00:00
Pedro Alves 676e87b308 * Makefile.in (.y.c, .l.c): sed free to xfree. 2008-10-27 11:46:24 +00:00
Pedro Alves f0323ca003 gdb/
* Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
	$(TM_CLIBS).
	(CDEPS): Remove reference to $(TM_CDEPS).

gdb/doc/
	* gdbint.texinfo (Adding a New Target): Don't mention TDEPFILES,
	.mt files, TM_CLIBS or TM_CDEPS.
	(x86 Watchpoints): Don't mention TDEPFILES.
2008-10-27 11:37:40 +00:00
Michael Snyder 3067f6e5f1 2008-10-26 Michael Snyder <msnyder@vmware.com>
* infrun.c (handle_inferior_event): Handle dynamic symbol
	resolution in reverse.
2008-10-27 04:53:05 +00:00
gdbadmin dc960f064b *** empty log message *** 2008-10-27 00:00:33 +00:00
Alan Modra c49bb545f8 daily update 2008-10-27 00:00:08 +00:00
gdbadmin 3c0078d7f6 *** empty log message *** 2008-10-26 00:00:32 +00:00
Alan Modra 8ad66ec02f daily update 2008-10-26 00:00:05 +00:00
Joel Brobecker 6130d0b72b * infrun.c: Minor comment reformatting. 2008-10-25 16:03:14 +00:00
Jan Kratochvil 2da16c8c35 ChangeLog (2008-03-13): Fix a function name typo. 2008-10-25 15:44:22 +00:00
Nick Clifton fb6cee9639 PR 6945
* ldlang.c (lang_size_sections_1): Do not update the VMAs of
        output sections when performing a relocatable link on COFF
        objects.
2008-10-25 09:54:01 +00:00
Pedro Alves bbe2ba601d * ada-exp.y (write_object_renaming): Use malloc instead of
xmalloc.
	* p-exp.y (pop_current_type): Use free instead of xfree.
2008-10-25 02:16:39 +00:00
Alan Modra 0775829945 daily update 2008-10-25 00:00:05 +00:00
gdbadmin 26d5f02d0d *** empty log message *** 2008-10-25 00:00:02 +00:00
Pedro Alves 2e979b9404 * fork-child.c (startup_inferior): Only set threads not-executing
after getting all the pending execs.  On TARGET_WAITKIND_IGNORE,
	keep waiting, don't resume.  On all other cases but
	TARGET_WAITKIND_SIGNALLED and TARGET_WAITKIND_EXITED, switch to
	the event ptid.
2008-10-24 22:01:25 +00:00
Daniel Jacobowitz b7c2dce4c2 * Makefile.tpl (HOST_EXPORTS): Correct CPPFLAGS typo.
* Makefile.in: Regenerated.
2008-10-24 21:58:34 +00:00
Sandra Loosemore 8b23ecc445 2008-10-24 Sandra Loosemore <sandra@codesourcery.com>
gdb/doc
	* gdb.texinfo (Remote Protocol): Add new nodes to menu.
	(Overview): Mention notifications and non-stop mode behavior.
	(Packets): Update documentation of ?, vAttach, vCont, and vRun
	with non-stop mode behavior.  Add vStopped description.
	(Stop Reply Packets):  Update list of packets that return
	stop replies.  Mention non-stop behavior.
	(General Query Packets): Document QNonStop packet and associated
	qSupported query response.
	(Interrupts): Clarify multi-threaded behavior.  Mention non-stop
	behavior.
	(Notification Packets): New section.
	(Remote Non-Stop): New section.
	(File-I/O Overview): Mention non-stop behavior.
2008-10-24 21:04:22 +00:00
Pedro Alves 74531fed1f Remote non-stop mode support.
* remote.c (pending_stop_reply): New.
	(struct remote_state) <non_stop_aware, support_vCont_t>: New
	fields.
	(remote_async_inferior_event_token)
	(remote_async_get_pending_events_token): New.
	(notice_new_inferiors): New, abstracted out from record_currthread.
	(record_currthread): Call it.
	(remote_threads_info): Default threads to running in non-stop
	mode.  In non-stop mode, only qfThreadInfo is supported.
	(remote_close): Discard all pending stop_replies.  Close the event
	sources.
	(set_stop_requested_callback): New.
	(remote_start_remote): Implement non-stop mode startup.  In
	all-stop, don't clear the thread list here.
	(remote_non_stop_feature): New.
	(remote_protocol_features): Add a "QNonStop" feature.
	(remote_open_1): Clear cached_wait_status and non_stop_aware.
	Clear the thread list here.
	(remote_detach_1): Discard pending stop replies of the process we
	detached from.
	(extended_remote_attach_1): Implement non-stop mode.
	(remote_vcont_probe): Recognize `vCont;t'.
	(remote_vcont_resume): Implement non-stop mode.
	(remote_resume): Don't set waiting_for_stop_reply in non-stop
	mode.
	(remote_stop_ns): New.
	(remote_stop): Rename to ...
	(remote_stop_as): ... this.  If we have a cached wait status,
	don't bother interrupting the remote.
	(remote_stop): Reimplement as wrapper around remote_stop_as and
	remote_stop_ns.
	(interrupt_query): Don't query in async mode.
	(struct cached_reg, cahed_reg_t): New.
	(struct stop_reply): New.
	(stop_reply_queue): New.
	(stop_reply_xmalloc, stop_reply_xfree)
	(discard_pending_stop_replies, do_stop_reply_xfree)
	(queued_stop_reply, push_stop_reply, peek_stop_reply)
	(remote_parse_stop_reply, remote_get_pending_stop_replies)
	(process_stop_reply): New.
	(remote_wait_ns): New.
	(remote_wait_as): Use remote_parse_stop_reply.  Invalidate the
	notion of current general thread is a process exit was reported.
	(remote_wait): Call remote_wait_ns in non-stop mode.
	(handle_notification): New.
	(putpkt_binary): Handle notifications.  Don't care for
	waiting_for_stop_reply in non-stop mode.
	(getpkt_sane): Rename to ...
	(getpkt_or_notif_sane_1): ... this.  Add `expecting_notif'
	argument.  Handle it.  Handle notifications.
	(getpkt_sane): Reimplement as wrapper around getpkt_or_notif_sane_1.
	(getpkt_or_notif_sane): New.
	(select_new_thread_callback): Check for exited state instead of
	comparing the ptid against minus_one_ptid.
	(extended_remote_create_inferior_1): Query the remote about the
	current thread.
	(remote_supports_non_stop): New.
	(init_remote_ops): Register it.
	(remote_async_inferior_event_handler): New.
	(remote_async_get_pending_events_handler): New.

	* infcmd.c (proceed_thread_callback): Comment.
	(proceed_after_attach_callback, proceed_after_attach): New.
	(attach_command_post_wait): In background attach, resume all
	threads, but only if they are unsignalled, and not explicitly
	stopped.  In foreground attach, in non-stop mode, make sure to
	stop all threads of the just attached to process.
	(attach_command): In non-stop mode: If doing a background attach,
	stop at least one thread.  If a foreground attach, stop all
	threads.
2008-10-24 20:38:26 +00:00
Pedro Alves 50d0174816 * event-loop.h: Mention async_event_handlers.
(async_event_handler): Forward declare.
	(async_event_handler_func): New typedef.
	(create_async_event_handler, delete_async_event_handler)
	(mark_async_event_handler): Declare.
	* event-loop.c (event_data): New.
	(event_handler_func): Take an event_data instead of an integer.
	(struct gdb_event): Replace the integer file descriptor by a
	generic event_data.
	(async_event_handler): New.
	(async_handler_ready): Delete.
	(async_event_handler_list): New.
	(create_event): New.
	(create_file_event): Use it.
	(process_event): Adjust.
	(gdb_do_one_event): Poll from the event sources in round-robin
	fashion across calls.  Be sure to consult all sources before
	blocking.
	(handle_file_event): Take an event_data instead of an integer.
	Adjust.
	(gdb_wait_for_event): Add `block' argument.  Handle it.
	(mark_async_signal_handler): Remove unneeded cast.
	(invoke_async_signal_handler): Rename to ...
	(invoke_async_signal_handlres): ... this.  Return true if any was
	handled.
	(check_async_ready): Delete
	(create_async_event_handler): New.
	(mark_async_event_handler): New.
	(struct async_event_handler_data): New.
	(invoke_async_event_handler): New.
	(check_async_event_handlers): New.
	(delete_async_event_handler): New.
	(handle_timer_event): Adjust.
2008-10-24 19:33:39 +00:00
Maciej W. Rozycki ed16377505 * config/tc-mips.c (mips_cpu_info_table): Move the MIPS64r2
comment so that Broadcom SB-1 cores are in the MIPS64 section.
2008-10-24 19:11:38 +00:00
Pedro Alves adc13a145e * gdb.python/python-value.exp (test_value_in_inferior): Don't use
gdb_start_cmd.
	Use runto_main before any test that requires execution.
2008-10-24 18:54:03 +00:00
Doug Evans 6dd47d34c6 * dwarf2read.c (typename_concat): Don't segv if prefix or suffix
is NULL.  Simplify obs == NULL case.
2008-10-24 18:21:00 +00:00
Hui Zhu fff0886884 2008-10-24 Hui Zhu <teawater@gmail.com>
Pedro Alves  <pedro@codesourcery.com>

	* infrun.c (can_use_displaced_stepping): Change type to
	const char pointer.
	(can_use_displaced_stepping_auto): New string.
	(can_use_displaced_stepping_on): New string.
	(can_use_displaced_stepping_off): New string.
	(can_use_displaced_stepping_enum): New array.
	(show_can_use_displaced_stepping): In auto mode, also show
	the current effect of the option.
	(use_displaced_stepping): Return non-zero if displaced
	stepping is auto, and can be used with GDBARCH, and in
	non-stop mode.  Return non-zero if displaced stepping is on,
	and can be used with GDBARCH.  Return zero otherwise.
	(_initialize_infrun): Make the "set displaced-stepping"
	command an enum command.  Change its class to class_run.
	Place it in the top level set list.  Extend help to describe
	the auto mode.

2008-10-24  Hui Zhu  <teawater@gmail.com>
	    Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (displaced-stepping): Describe the auto mode
	setting, and say it's the default.  This is now a mainstream
	setting instead of a maintenance setting.
2008-10-24 02:31:41 +00:00
Alan Modra dd9f9dc96d daily update 2008-10-24 00:00:04 +00:00
gdbadmin 43fab8ba27 *** empty log message *** 2008-10-24 00:00:03 +00:00
Pedro Alves 252fbfc86a gdb/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* defs.h: Mention ptid_is_pid.
	* inferior.h (ptid_is_pid): Declare.
	* gdbthread.h (struct thread_info) <stop_requested>: New field.
	(set_stop_requested): Declare.
	* infcmd.c (interrupt_target_1): Call set_stop_requested.
	* infrun.c (clear_proceed_status): Clear stop_requested.
	(infrun_thread_stop_requested_callback,
	infrun_thread_stop_requested): New.
	(handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
	thread that had an explicit stop request, pretend we got a
	TARGET_SIGNAL_0.  Always stop if the thread had an explicit stop
	request.
	(print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
	outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
	instead of mentioning signal 0.
	(ptid_is_pid): New.
	* thread.c (set_stop_requested): New.

	* linux-nat.c (queued_waitpid): Rename to ...
	(queued_waitpid_1): ... this.  Add `peek' argument.  Handle it.
	(queued_waitpid): New, as wrapper to queued_waitpid_1.
	(push_waitpid): Push the SIGTRAP to the local event queue, to the
	kernel's.
	(send_sigint_callback): Delete.
	(linux_nat_stop_lwp): New.
	(linux_nat_stop): Use it.

gdb/doc/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* observer.texi (thread_stop_requested): New.

gdb/testsuite/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* lib/mi-support.exp (mi_expect_interrupt): Expect signal 0
	instead of SIGINT.
2008-10-23 23:11:21 +00:00
Paul Pluzhnikov 3c0ed2996e 2008-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-value (valpy_getitem): Fix heap corruption.
2008-10-23 22:48:40 +00:00
Aleksandar Ristovski 103fd00dc6 * nto-procfs.c (do_attach): Form proper ptid including pid and tid.
(procfs_create_inferior): Fetch list of threads.
2008-10-23 20:15:50 +00:00
Aleksandar Ristovski 3fdfcbf1ed * nto-procfs.c (procfs_files_info): Fix a typo.
(procfs_create_inferior): Make attach_flag per-inferior.
2008-10-23 17:53:17 +00:00
Paul Pluzhnikov 997339e8ee 2008-10-23 Tom Tromey <tromey@redhat.com>
* python/python-value.c (value_to_value_object): Initialize
	owned_by_gdb field.
	(valpy_new): Likewise.
2008-10-23 17:14:20 +00:00
Jan Kratochvil d6b67a5e93 * ada-tasks.c (task_states, long_task_states): Use constant N_()
initializer.  Define the strings as const.
	(short_task_info, info_task): Translate the strings above.
2008-10-23 15:42:19 +00:00
Alan Modra eb6d1af8bb daily update 2008-10-23 00:00:05 +00:00
gdbadmin 1cb0b22d54 *** empty log message *** 2008-10-23 00:00:03 +00:00
Joel Brobecker aadc346add * NEWS: Add entry for new feature (Ada tasking support). 2008-10-22 22:14:21 +00:00
Joel Brobecker 77f120bfd7 * configure.ac: On alpha-osf, error out if enable_tui is set to
"yes", and set enable_tui to "no" if previously set to "auto".
          Check for waddstr only if TUI support was requested. Move the
          part of the configure script that updates various Makefile
          variables up, together with the check for waddstr.
          * configure: Regenerate.
2008-10-22 20:22:01 +00:00
Joel Brobecker 4af8819895 * gdbtypes.c (copy_type): New function.
* gdbtypes.h (copy_type): Add declaration.
        * ada-lang.c (ada_to_fixed_type_1): If there is a parallel XVZ
        variable, then use it.
2008-10-22 20:11:56 +00:00
Joel Brobecker 20924a554d * gdb.texinfo (Ada Tasks, Ada Tasks and Core Files): New nodes.
(Patching): Replace incorrect usage of @samp by @kbd.
2008-10-22 19:48:31 +00:00
Joel Brobecker 28148e3d4d * gdb.base/completion.exp: Update expected output following
the addition of the "info tasks" command.
2008-10-22 19:46:13 +00:00
Joel Brobecker 0ef643c89c * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
(target_get_ada_task_ptid): New macro.
        * target.c (default_get_ada_task_ptid): New function.
        (update_current_target): Inherit field default_get_ada_task_ptid.
        (update_current_target): Make default_get_ada_task_ptid the default
        value for field to_get_ada_task_ptid.
        * ada-lang.h (struct task_control_block): Delete. Never used.
        (struct task_ptid, task_ptid_t, struct task_entry, task_list):
        Likewise.
        (struct ada_task_info): New.
        (ada_task_is_alive, ada_find_printable_frame)
        (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
        declarations.
        (ada_build_task_list): Update prototype.
        (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
        * ada-lang.c (ada_find_printable_frame): Make non-static.
        * ada-tasks.c: New file.
        * Makefile.in (SFILES): Add ada-tasks.c.
        (COMMON_OBS): Add ada-tasks.o.
        * linux-thread-db.c (thread_db_find_thread_from_tid)
        (thread_db_get_ada_task_ptid): New functions.
        (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
2008-10-22 19:45:05 +00:00
Tom Tromey c209f8472e gdb
PR gdb/2506:
	* c-exp.y (string_exp): New production.
	(exp): Use it.
gdb/testsuite
	* gdb.base/exprs.exp (test_expr): Add test for string
	concatenation.
2008-10-22 16:38:09 +00:00
Nick Clifton 4267b19fc7 PR 6937
* configure.in (SHARED_LIBADD): Revert previous change.
        Add a comment explaining why.
        (SHARED_DEPENDENCIES): Revert previous change.
        * configure: Regenerate.
2008-10-22 14:45:34 +00:00
Nick Clifton b8976b05f2 * emultempl/armelf.em (arm_elf_after_open): Move check for using a
non-arm output target from here...
        (arm_elf_create_output_section_statements): ... to here, so that
        the check is made at the earliest possible opportunity.
2008-10-22 14:23:44 +00:00
Daniel Jacobowitz bb52de30f4 PR gdb/921
PR gdb/1646
	PR gdb/2175
	PR gdb/2176

	* Makefile.def (flags_to_pass): Add CPPFLAGS_FOR_BUILD and CPPFLAGS.
	* Makefile.tpl (BUILD_EXPORTS): Set CPPFLAGS.
	(EXTRA_BUILD_FLAGS): Correct typo.  Pass CPPFLAGS.
	(HOST_EXPORTS): Pass CPPFLAGS.
	(CPPFLAGS_FOR_BUILD, CPPFLAGS, CPPFLAGS_FOR_TARGET): Define.
	(LDFLAGS_FOR_TARGET): Initialize from configure script.
	(EXTRA_TARGET_FLAGS): Set CPPFLAGS.
	* Makefile.in, configure: Regenerated.
	* configure.ac: Set CPPFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET,
	and CPPFLAGS_FOR_BUILD.

	libiberty/
	* Makefile.in (CPPFLAGS): Define.
	(FLAGS_TO_PASS, COMPILE.c): Add CPPFLAGS.
2008-10-22 13:35:30 +00:00