Commit Graph

28569 Commits

Author SHA1 Message Date
gdbadmin f020b4cec1 *** empty log message *** 2011-06-05 00:00:33 +00:00
gdbadmin 5ca1effa14 *** empty log message *** 2011-06-04 00:00:02 +00:00
Joel Brobecker 64b9b33460 Various spelling fixes.
gdb/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c,
        gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes.

gdb/testsuite/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * gdb.base/help.exp: Adjust following some spelling corrections
        in GDB.
2011-06-03 23:47:46 +00:00
Joel Brobecker 945b3647f2 Minor spelling fix. 2011-06-03 23:46:25 +00:00
Joel Brobecker 325663dcd2 address size can be different from DW_OP_deref size
gdb/ChangeLog:

        * dwarf2expr.c (execute_stack_op) [DW_OP_deref]: Handle
        the case where ADDR_SIZE is different from TYPE_LENGTH (type).
2011-06-03 17:42:24 +00:00
Tom Tromey 8cf64490f2 gdb
* python/py-inferior.c (python_inferior_exit): Use inferior's exit
	code fields.
	* python/py-exitedevent.c (create_exited_event_object): Change
	type of 'exit_code'.  Optionally add exit_code attribute.
	(emit_exited_event): Change type of 'exit_code'.
	* python/py-event.h (emit_exited_event): Update.
	* mi/mi-interp.c (mi_inferior_exit): Print exit code.
	* infrun.c (handle_inferior_event): Set exit code fields on
	inferior.
	* inferior.h (struct inferior) <has_exit_code, exit_code>: New
	fields.
	* inferior.c (exit_inferior_1): Initialize new fields.
gdb/doc
	* gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field.
	(Events In Python): Note that exit_code is optional.
2011-06-03 15:32:44 +00:00
Tom Tromey 8ddd9a20a7 * dwarf2expr.c (get_signed_type): New function.
(execute_stack_op) <DW_OP_shra>: Always perform a signed shift.
2011-06-03 14:57:29 +00:00
gdbadmin ce6e3af315 *** empty log message *** 2011-06-03 00:00:03 +00:00
Keith Seitz 8dfd1e6d6e * objc-lang.c (find_methods): Increment objfile_csym earlier. 2011-06-02 18:44:01 +00:00
Pedro Alves 65fdb766be 2011-06-02 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.h (simplified_command_loop): Delete declaration.
2011-06-02 14:02:28 +00:00
gdbadmin 598f424ddf *** empty log message *** 2011-06-02 00:00:03 +00:00
Yao Qi dbc0f13167 2011-06-01 Yao Qi <yao@codesourcery.com>
* gdb.base/ending-run.exp: Match __uClibc_main for uClibc.
2011-06-01 15:55:55 +00:00
Mike Frysinger f4b8c29b8a gdb: sim: automatically pass down sysroot
Since gdb sets up a nice sysroot path for us by default, automatically
pass it down to the sim target so it too gets a good default.  This does
not override anything the user explicitly specifies of course.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-01 15:29:07 +00:00
Yao Qi 1706c19944 2011-06-01 Yao Qi <yao@codesourcery.com>
* objfiles.h (obj_section_addr): Update reference to objfile from
	`abfd' to `obfd'.
	(obj_section_endaddr): Likewise.
2011-06-01 14:46:23 +00:00
Daniel Jacobowitz d19cd71304 Really correct email address. 2011-06-01 11:09:15 +00:00
Daniel Jacobowitz 8d07004de6 * MAINTAINERS: Update my email address and affiliation. Also
update Ian Lance Taylor's affiliation.  Use UTF-8 for ludo@gnu.org.
2011-06-01 11:03:58 +00:00
gdbadmin 8dbe69d249 *** empty log message *** 2011-06-01 00:00:03 +00:00
Keith Seitz fd336a18df PR c++/12750
* gdb.cp/static-method.cc: New file.
	* gdb.cp/static-method.exp: New file.
2011-05-31 22:14:21 +00:00
Keith Seitz e8eb7bc534 PR c++/12750
* linespec.c (get_search_block): New function.
	(find_methods): Add FILE_SYMTATB parameter and use it and
	get_search_block to pass an appropriate block to
	lookup_symbol_in_namespace.
	(decode_line_1): Record if *ARGPTR is single-quote enclosed.
	Check if *ARGPTR starts with a filename first.
	If it does, call locate_first_half again to locate the next
	"first half" of the linespec.
	Pass FILE_SYMTATB to decode_objc and decode_compound.
	Swallow the trailing single-quote if IS_SQUOTE_ENCLOSED.
	(locate_first_half): Stop on the first colon seen.
	(decode_compound): Add FILE_SYMTAB parameter.
	Pass FILE_SYMTAB to lookup_prefix_sym and find_method.
	(lookup_prefix_sym): Add FILE_SYMTAB parameter and use
	get_search_block with lookup_symbol.
	(find_method): Add FILE_SYMTAB parameter and pass it to
	find_methods.
	(decode_objc): Use get_search_block.
2011-05-31 22:13:51 +00:00
Keith Seitz fa8b9902af PR symtab/12704
* gdb.cp/anon-ns.cc: New file.
	* gdb.cp/anon-ns.exp: New file.
2011-05-31 21:54:49 +00:00
Keith Seitz 2b1dbab03d PR symtab/12704
* cp-namespace.c (ANONYMOUS_NAMESPACE_LEN): Remove.
	(cp_scan_for_anonymous_namespaces): Use CP_ANONYMOUS_NAMESPACE_STR
	and CP_ANONYMOUS_NAMESPACE_LEN.
	(cp_is_anonymous): Likewise.
	* cp-support.h (CP_ANONYMOUS_NAMESPACE_STR): Define.
	(CP_ANONYMOUS_NAMESPACE_LEN): Define.
	* dwarf2read.c (namespace_name): Likewise.
	(fixup_partial_die): Likewise.
	* linespec.c (decode_compound): If CP_ANONYMOUS_NAMESPACE_STR is
	seen in the input, keep it.
2011-05-31 21:54:07 +00:00
Pedro Alves 0a5b1e09bf 2011-05-31 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
	* linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
	assertion.
	* win32-i386-low.c (i386_dr_low_get_addr): Ditto.

	gdb/testsuite/
	* gdb.arch/i386-dr3-watch.c: New file.
	* gdb.arch/i386-dr3-watch.exp: New file.
2011-05-31 21:18:56 +00:00
gdbadmin 9ad61fd62f *** empty log message *** 2011-05-31 00:00:32 +00:00
Pedro Alves 6d549500db 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_QUIT_REQ.
	* inf-loop.h (inferior_event_handler_wrapper): Delete.
	* inf-loop.c (inferior_event_handler_wrapper): Delete.
	(inferior_event_handler): Don't handle INF_QUIT_REQ.
	* remote.c (_initialize_remote): Register
	async_remote_interrupt_twice directly as
	sigint_remote_twice_token event.
2011-05-30 21:16:35 +00:00
Pedro Alves 395bff701e 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_ERROR.
	* inf-loop.c (inferior_event_handler): Don't handle INF_ERROR.
2011-05-30 20:54:24 +00:00
Pedro Alves 9722416428 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* interps.c (interp_set): Don't cancel continuations.
2011-05-30 20:13:29 +00:00
Jan Kratochvil 07e78767d6 gdb/
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
2011-05-30 19:26:36 +00:00
Pedro Alves fa4cd53f7d 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.h (continuation_ftype): Add `err' parameter.
	Document parameters.
	(do_all_continuations, do_all_continuations_thread)
	(do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(do_all_inferior_continuations): Add `err' parameter.
	* continuations.c (do_my_continuations_1, do_my_continuations)
	(do_all_inferior_continuations, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations): Add `err' parameter, and pass
	it down all the way to the continuations proper.
	* inf-loop.c (inferior_event_handler): If fetching an inferior
	event throws an error, don't pop the target, and still call the
	continuations, but with `err' set.  Adjust all other continuation
	calls.
	* breakpoint.c (until_break_command_continuation): Add `err'
	parameter.
	* infcmd.c (step_1_continuation): Add `err' parameter.  Don't
	issue another step if `err' is set.
	(struct until_next_continuation_args): New.
	(until_next_continuation): Add `err' parameter.  Adjust.
	(until_next_command): Adjust.
	(struct finish_command_continuation_args): Add `thread' field.
	(finish_command_continuation): Add `err' parameter.  Handle it.
	(finish_forward): Adjust.
	(attach_command_continuation): Add `err' parameter.  Handle it.
	* infrun.c (infrun_thread_stop_requested_callback): Adjust to
	cancel the continuations.
	* interps.c (interp_set): Adjust to cancel the continuations.
	* thread.c (clear_thread_inferior_resources): Adjust to cancel the
	continuations rather than discarding.
	(free_thread): Don't clear thread inferior resources here.
	(delete_thread_1): Do it here instead.  And do it before removing
	the thread from the threads list.  Tag the thread as exited before
	clearing thread inferior resources.
2011-05-30 18:04:32 +00:00
Joel Brobecker c2949be03b Rephrase error message in infcall.c:call_function_by_hand
No real change besides the error message.

gdb/ChangeLog:

	* infcall.c (call_function_by_hand): Rephrase error message.
2011-05-30 16:08:28 +00:00
Yao Qi 0578b8d157 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.c (t_structs_fc): New.
	(t_structs_dc, t_structs_ldc): New.
	(t_double_many_args):
	(DEF_FUNC_MANY_ARGS_1, DEF_FUNC_MANY_ARGS_2): Define.
	(DEF_FUNC_MANY_ARGS_3, DEF_FUNC_VALUES_1): Define.
	(DEF_FUNC_VALUES_2, DEF_FUNC_VALUES_3): Define.
	* gdb.base/callfuncs.exp: Call new functions.
2011-05-30 02:51:58 +00:00
Yao Qi ff4d2c6018 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.exp (rerun_and_prepare): New.
	Call rerun_and_prepare for each test to isolate effects.
2011-05-30 02:32:21 +00:00
Yao Qi 6680506ef0 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/varargs.c (find_max_float_real): New.
        (find_max_double_real, find_max_long_double_real): New.
        * gdb.base/varargs.exp: Call these new added functions.
	* lib/gdb.exp (setup_kfail_for_target): New.
2011-05-30 02:27:51 +00:00
Yao Qi e43ec454f9 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/funcargs.c (callca, callcb, callcc): New.
	(callcd, callce, callcf, callc1a, callc1b): New.
	(callc2a, callc2b): New.
	* gdb.base/funcargs.exp (complex_args): New.
	(complex_integral_args, complex_float_integral_args): New.
	* lib/gdb.exp (support_complex_tests): New.  Determine
	whether to run test cases on _Complex types.
2011-05-30 02:20:16 +00:00
gdbadmin a773502202 *** empty log message *** 2011-05-30 00:00:03 +00:00
gdbadmin b3c88224d5 *** empty log message *** 2011-05-29 00:00:32 +00:00
gdbadmin 597a1b9a54 *** empty log message *** 2011-05-28 00:00:32 +00:00
Pedro Alves 619cebe87f 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (struct thread_info, struct inferior): Delete forward
	declarations.
	* breakpoint.h (struct thread_info): New forward declaration.
	* observer.sh (struct inferior): New forward declaration.
	* python/python-internal.h (struct inferior): New forward
	declaration.
2011-05-27 18:39:49 +00:00
Pedro Alves be34f8494e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
* defs.h (struct continuation, continuation_ftype)
	(continuation_free_arg_ftype, add_continuation)
	(do_all_continuations, do_all_continuations_thread)
	(discard_all_continuations, discard_all_continuations_thread)
	(add_intermediate_continuation, do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread)
	(add_inferior_continuation, do_all_inferior_continuations)
	(discard_all_inferior_continuations): Move to ...
	* continuations.h: ... this new file.
	* breakpoint.c, continuations.c, event-top.c, inf-loop.c,
	infcmd.c, inferior.c, infrun.c, interps.c: Include
	continuations.h.
2011-05-27 18:28:18 +00:00
Jan Kratochvil 432b4d03ad gdb/
Fix PR 10970, PR 12702.
	* linux-nat.c (linux_lwp_is_zombie): New function.
	(wait_lwp): Initialize status.  New variable prev_mask.  Block signals.
	Check for linux_lwp_is_zombie.  Use WNOHANG and sigsuspend.

gdb/testsuite/
	* gdb.threads/leader-exit.c: New file.
	* gdb.threads/leader-exit.exp: New file.
2011-05-27 16:55:39 +00:00
Pedro Alves b0f260d61e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (continuation_ftype, continuation_free_arg_ftype): New
	typedefs.
	(add_continuation, add_intermediate_continuation)
	(add_inferior_continuation): Use them.
	* continuations.c (struct continuation): Use them.
	(make_continuation_ftype): Delete.
	(make_continuation, add_inferior_continuation, add_continuation)
	(add_intermediate_continuation): Use continuation_ftype and
	continuation_free_arg_ftype.  Rename parameters to shorter names.
2011-05-27 14:56:14 +00:00
Pedro Alves af1e9a32aa 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.c (make_continuation): Make it return void.
	(do_my_continuations): Rename to ...
	(do_my_continuations_1): ... this.  Remove old_chain parameter and
	adjust.
	(do_my_continuations): New.
	(discard_my_continuations): Rename to ...
	(discard_my_continuations_1): ... this.  Remove old_chain
	parameter and adjust.
	(discard_my_continuations): New.
	(add_inferior_continuation): Simplify.
	(do_all_inferior_continuations): Reimplement on top
	do_my_continuations.
	(discard_all_inferior_continuations): Simplify.
	(add_continuation): Simplify.
	(do_all_continuations_ptid): Simplify.
	(discard_all_continuations_thread_callback): Simplify.
	(add_intermediate_continuation): Simplify.
	(discard_all_intermediate_continuations_thread_callback):
	Simplify.
2011-05-27 14:32:08 +00:00
Marek Polacek 6caf069d24 gdb.mi/mi-nonstop.exp: Replace gdb_test_multiple with mi_gdb_test. 2011-05-27 14:16:43 +00:00
Pedro Alves 50c0c01734 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* utils.c (struct continuation, add_continuation)
	(add_inferior_continuation)
	(do_all_inferior_continuations, discard_all_inferior_continuations)
	(restore_thread_cleanup, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(discard_all_continuations_thread_callback)
	(discard_all_continuations_thread, discard_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread_callback)
	(discard_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations): Move to ...
	* continuations.c: ... this new file, and adjust to no longer
	implement continuations on top of cleanups.
	* Makefile.in (SFILES): Add continuations.c.
	(COMMON_OBS): Add continuations.o.
2011-05-27 14:00:25 +00:00
Marek Polacek 97fce28b40 gdb.mi: Get rid of the non-stop testcases. 2011-05-27 12:47:10 +00:00
gdbadmin cc67cf82dc *** empty log message *** 2011-05-27 00:00:33 +00:00
Pedro Alves d8b344530c 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* inferior.h (enum exec_direction_kind): Delete EXEC_ERROR.
	* infrun.c (show_exec_direction_func): Don't handle EXEC_ERROR.
	Internal error on invalid values.
	* reverse.c: Don't handle EXEC_ERROR.
	* mi/mi-main.c: Don't handle EXEC_ERROR.
2011-05-26 18:23:32 +00:00
Pedro Alves 3223143295 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* record.c: Include event-loop.h, inf-loop.h.
	(record_beneath_to_async): New global.
	(tmp_to_async): New global.
	(record_async_inferior_event_token): New global.
	(record_open_1): Don't error out if async is enabled.
	(record_open): Handle to_async.  Create an async event source in
	the event loop.
	(record_close): Delete the async event source.
	(record_resumed): New global.
	(record_execution_dir): New global.
	(record_resume, record_core_resume): Set them.  Register the
	target on the event loop.
	(record_wait): Rename to ...
	(record_wait_1): ... this.  Add more debug output.  Handle
	TARGET_WNOHANG, and the target beneath returning
	TARGET_WAITKIND_IGNORE.
	(record_wait): Reimplement on top of record_wait_1.
	(record_async_mask_value): New global.
	(record_async, record_async_mask, record_can_async_p)
	(record_is_async_p, record_execution_direction): New functions.
	(init_record_ops, init_record_core_ops): Install new methods.
	* infrun.c (fetch_inferior_event): Temporarily switch the global
	execution direction to the direction the target was going.
	(execution_direction): Change type to int.
	* target.c (default_execution_direction): New function.
	(update_current_target): Inherit and de_fault
	to_execution_direction.
	* target.h (struct target_ops) <to_execution_direction>: New
	field.
	(target_execution_direction): New macro.
	* inferior.h (execution_direction): Change type to int.
2011-05-26 18:11:33 +00:00
Pedro Alves 949dc678a8 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (call_function_by_hand): Don't allow calling functions
	in reverse execution mode.
2011-05-26 16:23:08 +00:00
Pedro Alves c13bd2b52e 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_command): Allow async finish in reverse.
2011-05-26 16:11:45 +00:00
Yao Qi 6938fd346a 2011-05-26 Yao Qi <yao@codesourcery.com>
gdb/
	* gdb_thread_db.h: Delete.  Move to ...
	* common/gdb_thread_db.h: ... here.

	gdb/gdbserver/
	* Makefile.in (thread-db.o): Track dependence to
	common/gdb_thread_db.h.
	* thread-db.c: include gdb_thread_db.h from right place.
2011-05-26 15:49:26 +00:00
Pedro Alves 9da8c2a0fa 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_backward): Set a step-resume breakpoint at the
	function's entry point instead of a manually managed momentary
	breakpoint, and only ever issue one proceed call.
	* infrun.c (handle_inferior_event) <BPSTAT_WHAT_STEP_RESUME>: If
	doing a reverse-finish, switch to stepi mode, to do another step.
	(insert_step_resume_breakpoint_at_sal): Make public.
	(normal_stop): No need to save function value return registers if
	going reverse.
	* inferior.h (insert_step_resume_breakpoint_at_sal): Declare.

	gdb/testsuite/
	* gdb.reverse/finish-reverse-bkpt.exp: New test.
2011-05-26 15:32:38 +00:00
Pedro Alves 2c03e5bed3 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (enum bptype) <bp_hp_step_resume>: New.
	(enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME
	before BPSTAT_WHAT_STOP_SILENT.  Add BPSTAT_WHAT_HP_STEP_RESUME
	at the end.
	* breakpoint.c (update_breakpoints_after_exec): Also delete hp
	step-resume breakpoints.
	(print_it_typical): Handle bp_hp_step_resume.
	(bpstat_what): Ditto.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(allocate_bp_location): Ditto.
	(mention): Ditto.
	(breakpoint_re_set_one): Ditto.
	* infrun.c (handle_inferior_event): Adjust.  Split
	BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and
	BPSTAT_WHAT_HP_STEP_RESUME.
	(insert_step_resume_breakpoint_at_sal): Rename to ...
	(insert_step_resume_breakpoint_at_sal_1): ... this.  Add bptype
	parameter.  Handle it.
	(insert_step_resume_breakpoint_at_sal): Reimplement on top of
	insert_step_resume_breakpoint_at_sal_1.
	(insert_step_resume_breakpoint_at_frame): Rename to ...
	(insert_hp_step_resume_breakpoint_at_frame): ... this.  Adjust to
	set a high-priority step-resume breakpoint.
	(insert_step_resume_breakpoint_at_frame): Adjust comment.
	(insert_step_resume_breakpoint_at_caller): Ditto.

	gdb/testsuite/
	* gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
2011-05-26 14:59:18 +00:00
Pedro Alves 51be5b68a5 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (iterate_over_related_breakpoints): New.
	(do_map_delete_breakpoint): New.
	(delete_command): Pass do_map_delete_breakpoint to
	map_breakpoint_numbers.
	(do_disable_breakpoint): New.
	(do_map_disable_breakpoint): Iterate over the breakpoint's related
	breakpoints.
	(do_enable_breakpoint): Rename to ...
	(enable_breakpoint_disp): ... this.
	(enable_breakpoint): Adjust.
	(do_enable_breakpoint): New.
	(enable_once_breakpoint): Delete.
	(do_map_enable_breakpoint): New.
	(do_map_enable_once_breakpoint): New.
	(enable_once_command, enable_delete_command)
	(delete_trace_command): Iterate over the breakpoint's related
	breakpoints.
2011-05-26 14:21:24 +00:00
Pedro Alves 4a1be8d214 * alpha-tdep.c (alpha_cannot_fetch_register): Don't return true
for ALPHA_ZERO_REGNUM.
	(alpha_supply_int_regs): Explicitly supply zero as the value for
	ALPHA_ZERO_REGNUM in the register cache.
	* alpha-nat.c (fetch_osf_core_registers): Ditto.
2011-05-26 13:57:46 +00:00
Yao Qi 59d70315fb 2011-05-26 Yao Qi <yao@codesourcery.com>
* gdb/gdb_thread_db.h: Remove HAVE_UINTPTR_T.
2011-05-26 08:09:25 +00:00
Tristan Gingold 251d32d96e 2011-05-26 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct dwarf2_section_names): New type.
	(struct dwarf2_debug_sections): New type.
	(dwarf2_has_info): Add parameter.
	* dwarf2read.c (dwarf2_elf_names): New variable.
	(INFO_SECTION, ABBREV_SECTION, LINE_SECTION, LOC_SECTION)
	(MACINFO_SECTION, STR_SECTION, RANGES_SECTION, TYPES_SECTION)
	(FRAME_SECTION, EH_FRAME_SECTION, GDB_INDEX_SECTION): Remove.
	(dwarf2_has_info): Add names parameter.  Pass names
	to dwarf2_locate_sections.
	(section_is_p): Rewrite using the names parameter.
	(dwarf2_locate_sections): Use section names from the names parameter.
	* coffread.c (coff_symfile_read): Adjust call to dwarf2_has_info.
	* elfread.c (read_psyms): Ditto.
	* machoread.c (macho_symfile_read): Ditto.
2011-05-26 07:47:10 +00:00
gdbadmin 39f8b7c1fa *** empty log message *** 2011-05-26 00:00:32 +00:00
Andreas Schwab 652c71b432 PR gdb/8677
* event-loop.c (handle_file_event): Don't handle POLLHUP as error.
2011-05-25 07:59:04 +00:00
gdbadmin 012ca7c8a8 *** empty log message *** 2011-05-25 00:00:33 +00:00
Keith Seitz 2e21250dbc PR breakpoint/12803
* gdb.cp/cmpd-minsyms.cc (a): New method.
	(b): New method.
	(c): New method.
	* gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
2011-05-24 21:00:45 +00:00
Keith Seitz f17170e5e2 PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
	(decode_compound): Unconditionally call	keep_name_info.
2011-05-24 21:00:09 +00:00
Pedro Alves cdac0397bf 2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (watchpoint_check): If the watchpoint went out of
	scope, clear its command list.
	(map_breakpoint_numbers): Don't walk the related breakpoints list
	of each breakpoint.

	gdb/testsuite/
	* gdb.base/commands.exp (watchpoint_command_test): Check that the
	watchpoint's command list didn't execute when the watchpoint went
	out of scope.
2011-05-24 15:03:30 +00:00
Tom Tromey 91d4fe3f85 * MAINTAINERS: Move Jim Blandy to past maintainers. 2011-05-24 14:52:30 +00:00
Tristan Gingold 3017a00367 2011-05-24 Tristan Gingold <gingold@adacore.com>
* symfile.h (enum dwarf2_section_enum): New type.
	(dwarf2_get_section_info): New prototype.
	* dwarf2read.c (dwarf2_get_section_info): Replace parameter
	section_name by sect.  Use a switch to select the info.
	* dwarf2-frame.c (warf2_get_section_info): Remove prototype.
	(dwarf2_build_frame_info): Adjust calls to dwarf2_get_section_info.
2011-05-24 12:40:17 +00:00
Pierre Muller ee5683ab05 ../commit.txt~ 2011-05-24 12:01:22 +00:00
Pedro Alves c91c8c1612 2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting
	shared library event breakpoint if there's no execution.

	gdb/testsuite/
	* gdb.trace/tfile.exp: Add test that opening the basic.tf trace
	file doesn't error, using MI.
2011-05-24 10:48:19 +00:00
Thiago Jung Bauermann 77bc418a4b * breakpont.c (remove_hw_watchpoints): Remove unused function.
* breakpoint.h remove_hw_watchpoints(): Remove prototype.
2011-05-24 03:03:56 +00:00
gdbadmin ed7422145a *** empty log message *** 2011-05-24 00:00:03 +00:00
Tom Tromey c50491a797 gdb
* c-lang.c (evaluate_subexp_c): Use expect_type if it is not
	NULL.
gdb/testsuite
	* gdb.base/charset.exp (string_display): Add tests to assign to
	arrays.
	* gdb.base/charset.c (short_array, int_array, long_array): New.
2011-05-23 20:27:23 +00:00
Doug Evans 6d64e6d477 * python/lib/gdb/printing.py (register_pretty_printer): Add missing
entry for RuntimeError to doc string.
2011-05-23 17:38:06 +00:00
Jerome Guitton 2067c8d4a8 * sparc-tdep.c (sparc_skip_stack_check): Recognize a new instruction
sequence for probing loops.
2011-05-23 16:38:05 +00:00
Pedro Alves b136cd053f 2011-05-23 Pedro Alves <pedro@codesourcery.com>
* infrun.c (user_visible_resume_ptid): Fix typos in describing
	comment.
2011-05-23 15:18:36 +00:00
gdbadmin 2712fce34f *** empty log message *** 2011-05-23 00:00:32 +00:00
gdbadmin ce87af851f *** empty log message *** 2011-05-22 00:00:03 +00:00
Mark Kettenis 22e74ef9b5 * sparc-nat.c (sparc_fetch_inferior_registers): Explicitly supply
zero as the value for %g0 in the register cache.
* sparc-tdep.c (sparc32_supply_gregset): Likewise.
* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
2011-05-21 19:19:45 +00:00
gdbadmin 1d0325c9e6 *** empty log message *** 2011-05-21 00:00:03 +00:00
Pedro Alves 842951eb8c 2011-05-20 Pedro Alves <pedro@codesourcery.com>
* infrun.c (proceed): Set previous_inferior_ptid here.
	(init_wait_for_inferior): Initialize previous_inferior_ptid from
	inferior_ptid, not null_ptid.
	(wait_for_inferior): Don't initialize previous_inferior_ptid here.
	(fetch_inferior_event): Nor here.
2011-05-20 18:38:16 +00:00
Pedro Alves 46cf51e660 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* inf-loop.c (inferior_event_handler): Only output a message if
	verbose.
2011-05-20 18:24:41 +00:00
Luis Machado 29ef4c4686 * MAINTAINERS: Update my e-mail address. 2011-05-20 18:08:43 +00:00
Pedro Alves 4a07b7dac5 2011-05-20 Pedro Alves <pedro@codesourcery.com>
Cope with async mode.

	gdb/testsuite/
	* gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test
	into gdb_test + mi_expect_stop.
2011-05-20 17:52:54 +00:00
Pedro Alves b275f2d2f2 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.mi/basics.c: Don't include stdio.h or unistd.h.
	(callme): Remove printf call.
2011-05-20 17:41:04 +00:00
Pedro Alves f148b27e2c 2011-05-20 Pedro Alves <pedro@codesourcery.com>
* infrun.c (proceed): Switch the inferior event loop to
	INF_EXEC_COMPLETE if the target refused to resume from a
	vfork/fork.
2011-05-20 16:43:47 +00:00
Pedro Alves 09cee04be9 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c: Include "inf-loop.h".
	(step_once): When stepping into an inline subroutine, pretend the
	target has run.  If the target can async, switch the inferior
	event loop to INF_EXEC_COMPLETE.
	* inferior.h (user_visible_resume_ptid): Declare.
	* infrun.c (user_visible_resume_ptid): New function, factored out
	from `resume'.
	(resume): Use it.
	* mi/mi-main.c (mi_execute_async_cli_command): Remove assertion
	that the current thread is running.  Merge async and sync
	branches.
2011-05-20 16:31:31 +00:00
Pedro Alves 751b8ce122 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (step_1): Simplify synchronous case.
2011-05-20 16:20:25 +00:00
Pedro Alves e93a69ed93 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* tracepoint.c: Include exceptions.h.
	(TFILE_PID): Move higher in file.
	(tfile_open): Delay pushing the tfile target until we're assured
	the tfile header is present in the file.  Wrap reading the initial
	newline-terminated lines in TRY_CATCH.  Pop the target if the
	initial setup failed.  Add the tfile's thread immediately
	aftwards, before any non-essential setup.  Don't skip
	post_create_inferior if there are no traceframes present in the
	file.
	(tfile_close): Remove redundant check for null before xfree call.
	(tfile_thread_alive): New function.
	(init_tfile_ops): Register it as to_thread_alive callback.
2011-05-20 14:41:12 +00:00
Pedro Alves 6823e2b15f 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* tracepoint.c (tfile_open): Delete #if 0'd code.
2011-05-20 14:40:23 +00:00
Pierre Muller eec52c4458 * lib/gdb.exp (gdb_test_list_exact): Suggest use of double
quote pattern to avoid problems with Cygwin/mingw expect versions.
	* gdb.base/default.exp (show convenience): Use double
	quote pattern for regular expressions.
2011-05-20 14:37:20 +00:00
Jan Kratochvil b3c8eb43f1 gdb/
Fix -readnow for -gdwarf-4 unused type units.
	* dwarf2read.c (struct signatured_type): Remove the field offset.
	(create_signatured_type_table_from_index): Remove its initialization.
	(create_debug_types_hash_table): Likewise.  Initialize per_cu.offset
	instead.  Add a complaint call.
	(process_psymtab_comp_unit): Change assignment to gdb_assert.
	(process_type_comp_unit, lookup_die_type, dump_die_shallow)
	(lookup_signatured_type_at_offset, read_signatured_type)
	(write_one_signatured_type): Update the field for per_cu.

gdb/testsuite/
	Fix -readnow for -gdwarf-4 unused type units.
	* gdb.dwarf2/dw4-sig-type-unused.S: New file.
	* gdb.dwarf2/dw4-sig-type-unused.exp: New file.
2011-05-20 08:55:51 +00:00
gdbadmin 5583de77a9 *** empty log message *** 2011-05-20 00:00:33 +00:00
Tom Tromey 310afc7652 * python/py-inferior.c (python_inferior_exit): Use
target_gdbarch.
	(python_on_resume): Likewise.
2011-05-19 18:41:23 +00:00
Tom Tromey cf6c5ffb4c 2011-05-19 Matt Rice <ratmice@gmail.com>
* breakpoint.c (bpstat_do_actions_1): Call prevent_dont_repeat.
2011-05-19 18:31:24 +00:00
Hui Zhu fb80a3c562 2011-05-19 Hui Zhu <teawater@gmail.com>
* tracepoint.c (tfile_trace_find): Return directly when num is -1.
2011-05-19 14:06:44 +00:00
Hui Zhu 3672b1be0a 2011-05-19 Hui Zhu <teawater@gmail.com>
* xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved.
2011-05-19 06:54:30 +00:00
gdbadmin 3ee2366c5f *** empty log message *** 2011-05-19 00:01:02 +00:00
Tom Tromey ff355380ea * dwarf2read.c (dwarf2_add_field): Constify.
* value.c (value_static_field): Constify.
	* gdbtypes.h (struct main_type) <field.field_location.physname>:
	Now const.
	* ax-gdb.c (gen_static_field): Constify
2011-05-18 20:19:52 +00:00
Jan Kratochvil ed73195945 gdb/
* linux-nat.c (kill_callback): Use SIGKILL first.

gdb/testsuite/
	* gdb.base/kill-after-signal.c: New file.
	* gdb.base/kill-after-signal.exp: New file.
2011-05-18 18:03:30 +00:00
Joel Brobecker 967cff168c Remove one use of sprintf in ada-lang.c (print_it_exception)
This is just a minor cleanup of an ARI violation.  As this affects
code that is normally unreachable (you'd need a runtime where
the unit providing the exception hook has been compiled without
debugging information), I tested this manually by commenting out
the code just above, thus forcing this part of the code to be
exercised.

gdb/ChangeLog:

        * ada-lang.c (print_it_exception): Avoid use of sprintf.

Tested on x86_64-linux.
2011-05-18 17:29:59 +00:00
Tom Tromey 1d06ead687 * value.c (value_fn_field): Constify.
* symtab.c (gdb_mangle_name): Constify.
	* stabsread.c (update_method_name_from_physname): Make 'physname'
	argument const.
	* p-typeprint.c (pascal_type_print_method_args): Make arguments
	const.  Use explicit fputc_filtered loop.
	(pascal_type_print_base): Constify.
	* p-lang.h (pascal_type_print_method_args): Update.
	* linespec.c (add_matching_methods): Constify.
	(add_constructors): Likewise.
	* jv-typeprint.c (java_type_print_base): Constify.
	* gdbtypes.h (struct cplus_struct_type)
	<fn_fieldlist.fn_field.physname>: Now const.
	* dwarf2read.c (compute_delayed_physnames): Constify.
	(dwarf2_add_member_fn): Likewise.
	* c-typeprint.c (c_type_print_base): Constify.  Use cleanups.
2011-05-18 16:30:37 +00:00
Pedro Alves 0d9a9a5ffe 2011-05-18 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infrun.c (resume): Mention which is the current thread, and its
	current PC in debug output.
	(prepare_to_proceed): Mention the thread switching in debug
	output.
2011-05-18 16:20:27 +00:00
Tom Tromey 05386e9ec7 * linux-thread-db.c (try_thread_db_load_from_pdir_1): Fix absolute
path check.  Use xmalloc and cleanups.
	(try_thread_db_load_from_dir): Use xmalloc and cleanups.
2011-05-18 15:00:55 +00:00