Commit Graph

28804 Commits

Author SHA1 Message Date
Pedro Alves d9b3f62eb2 2011-07-25 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (print_recreate_thread): Declare.
	(struct breakpoint): Move step_count, pass_count,
	number_on_target, static_trace_marker_id,
	static_trace_marker_id_idx ...
	(struct tracepoint): ... to this new struct.
	(get_tracepoint, get_tracepoint_by_number_on_target)
	(get_tracepoint_by_number): Change return type to struct
	tracepoint pointer.
	* breakpoint.c (is_tracepoint_type): New, factored out from
	is_tracepoint.
	(is_tracepoint): Adjust.
	(print_one_breakpoint_location): Cast to struct tracepoint as
	necessary, and adjust.
	(print_recreate_catch_fork, print_recreate_catch_vfork)
	(print_recreate_catch_syscall, print_recreate_catch_exec): Call
	print_recreate_thread.
	(init_breakpoint_sal): New, factored out from
	create_breakpoint_sal.
	(create_breakpoint_sal): Reimplement.
	(create_breakpoint): Allocate a struct tracecepoint if the caller
	wanted a tracepoint.  Use init_breakpoint_sal and
	install_breakpoint.
	(print_recreate_ranged_breakpoint, print_recreate_watchpoint)
	(print_recreate_masked_watchpoint)
	(print_recreate_exception_catchpoint): Call print_recreate_thread.
	(tracepoint_print_one_detail): Adjust.
	(tracepoint_print_recreate): Adjust.  Call print_recreate_thread.
	Dump the pass count here.
	(update_static_tracepoint): Adjust.
	(addr_string_to_sals): Adjust.
	(create_tracepoint_from_upload): Adjust.  Change return type to
	struct tracepoint pointer.
	(trace_pass_set_count): Change parameter type to struct tracepoint
	pointer, and adjust.
	(trace_pass_command): Adjust.
	(get_tracepoint, get_tracepoint_by_number_on_target)
	(get_tracepoint_by_number): Change return type to struct
	tracepoint pointer, and adjust.
	(print_recreate_thread): New, factored out from save_breakpoints.
	(save_breakpoints): Don't print thread and task and passcount
	recreation here.
	* remote.c (remote_download_tracepoint): Adjust.
	* tracepoint.c (trace_actions_command, validate_actionline)
	(start_tracing, tfind_1, trace_find_tracepoint_command)
	(trace_dump_command): Adjust.
	(find_matching_tracepoint): Change return type to struct
	tracepoint pointer, and adjust.
	(merge_uploaded_tracepoints, tfile_get_traceframe_address)
	(tfile_trace_find, tfile_fetch_registers): Adjust.
	* tracepoint.h (create_tracepoint_from_upload): Change return type
	to struct tracepoint pointer.
	* ada-lang.c (print_recreate_exception): Call
	print_recreate_thread.
	* mi/mi-cmd-break.c (mi_cmd_break_passcount): Adjust.
2011-07-25 11:24:44 +00:00
Pedro Alves 3a5c3e2258 2011-07-25 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (struct breakpoint): Move ops as first field.  Move
	exp_string, exp_string_reparse, exp, exp_valid_block, cond_exp,
	cond_exp_valid_block, val, val_valid, watchpoint_frame,
	watchpoint_thread, watchpoint_triggered ...
	(struct watchpoint): ... to this new struct.
	(is_watchpoint): Declare.
	(install_breakpoint): Add new `internal' parameter.
	* breakpoint.c (is_watchpoint): Delete declaration.
	(set_breakpoint_condition): Handle watchpoints.
	(is_watchpoint): Make public.
	(watchpoint_in_thread_scope): Change parameter type to struct
	watchpoint.
	(watchpoint_del_at_next_stop): Change parameter type to struct
	watchpoint.  Remove assertion.  Adjust.
	(update_watchpoint): Ditto.
	(insert_breakpoints, breakpoint_init_inferior)
	(watchpoints_triggered, watchpoint_check)
	(bpstat_check_watchpoint, bpstat_check_breakpoint_conditions)
	(bpstat_stop_status, print_one_breakpoint_location)
	(print_one_breakpoint_location, watchpoint_locations_match): Cast
	to struct watchpoint as necessary, and adjust.
	(install_breakpoint): Add `internal' argument.  If true, don't
	mention the new breakpoint.  Use set_breakpoint_number.
	(create_fork_vfork_event_catchpoint)
	(create_syscall_event_catchpoint): Adjust.
	(dtor_watchpoint): New.
	(re_set_watchpoint, insert_watchpoint, remove_watchpoint)
	(breakpoint_hit_watchpoint, resources_needed_watchpoint)
	(print_it_watchpoint, print_mention_watchpoint)
	(print_recreate_watchpoint, insert_masked_watchpoint)
	(remove_masked_watchpoint, resources_needed_masked_watchpoint)
	(print_one_detail_masked_watchpoint)
	(print_mention_masked_watchpoint)
	(print_recreate_masked_watchpoint): Cast to struct watchpoint as
	necessary, and adjust.
	(watch_command_1): Allocate and initialize a struct watchpoint
	instead of a struct breakpoint.  Use install_breakpoint.
	(catch_exec_command_1): Adjust.
	(base_breakpoint_dtor): Delete accesses to watchpoint specific
	fields.
	(delete_breakpoint, enable_breakpoint_disp)
	(invalidate_bp_value_on_memory_change): Cast to struct watchpoint
	as necessary, and adjust.
	(initialize_breakpoint_ops): Install dtor_watchpoint as
	watchpoints' dtor method.
	* ada-lang.c (create_ada_exception_catchpoint): Adjust.
	* python/py-breakpoint.c (bppy_get_expression): Use is_watchpoint.
	to struct watchpoint as necessary, and adjust.
2011-07-25 11:23:03 +00:00
Pedro Alves 2060206eaf 2011-07-25 Pedro Alves <pedro@codesourcery.com>
* ada-lang.c (dtor_exception, re_set_exception): Indirect through
	the the base class ops table.
	(catch_exception_breakpoint_ops)
	(catch_exception_unhandled_breakpoint_ops)
	(catch_assert_breakpoint_ops): Don't statically initialize.
	(initialize_ada_catchpoint_ops): New.
	(_initialize_ada_language): Call it.
	* breakpoint.c (base_breakpoint_ops, bkpt_base_breakpoint_ops)
	(bkpt_breakpoint_ops): Forward declare.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops)
	(catch_syscall_breakpoint_ops, catch_exec_breakpoint_ops)
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops)
	(gnu_v3_exception_catchpoint_ops): Don't statically initialize.
	(dtor_catch_syscall, dtor_catch_exec): Indirect through the the
	base class ops table.
	(null_re_set, null_check_status, null_works_in_software_mode)
	(null_resources_needed, null_print_one_detail): Delete.
	(bkpt_dtor): Rename to ...
	(base_breakpoint_dtor): ... this.  Make static.
	(bkpt_allocate_location): Rename to ...
	(base_breakpoint_allocate_location): ... this.  Make static.
	(base_breakpoint_re_set): New.
	(internal_error_pure_virtual_called): New.
	(base_breakpoint_insert_location, base_breakpoint_remove_location)
	(base_breakpoint_breakpoint_hit, base_breakpoint_check_status)
	(base_breakpoint_works_in_software_mode)
	(base_breakpoint_resources_needed, base_breakpoint_print_it)
	(base_breakpoint_print_one_detail, base_breakpoint_print_mention)
	(base_breakpoint_print_recreate): New functions.
	(base_breakpoint_ops): New global.
	(bkpt_re_set, bkpt_insert_location, bkpt_remove_location)
	(bkpt_breakpoint_hit): Make static.
	(bkpt_check_status): Delete.
	(bkpt_resources_needed): Make static.
	(bkpt_works_in_software_mode): Delete.
	(bkpt_print_it, bkpt_print_mention, bkpt_print_recreate): Make
	static.
	(bkpt_breakpoint_ops, internal_breakpoint_ops)
	(momentary_breakpoint_ops): Don't statically initialize.
	(internal_bkpt_print_recreate, momentary_bkpt_print_recreate):
	Delete.
	(tracepoint_insert_location, tracepoint_remove_location)
	(tracepoint_check_status, tracepoint_works_in_software_mode)
	(tracepoint_print_it): Delete.
	(tracepoint_breakpoint_ops): Don't statically initialize.
	(initialize_breakpoint_ops): New.
	(_initialize_breakpoint): Call it.
	* breakpoint.h (null_re_set, null_works_in_software_mode)
	(null_resources_needed, null_check_status, null_print_one_detail):
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it)
	(null_print_one_detail, bkpt_print_mention, bkpt_print_recreate):
	Delete declarations.
	(initialize_breakpoint_ops): Declare.
2011-07-25 11:21:08 +00:00
Pedro Alves 001c8c333d 2011-07-25 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (bkpt_print_it, internal_bkpt_print_it)
	(momentary_bkpt_print_it): Simplify.
2011-07-25 11:20:08 +00:00
Pedro Alves 06edf0c005 2011-07-25 Pedro Alves <pedro@codesourcery.com>
Split internal, momentary and user breakpoints breakpoint_ops
	tables.

	gdb/
	* breakpoint.c (internal_breakpoint_ops)
	(momentary_breakpoint_ops): Forward declare.
	(create_internal_breakpoint): Add new breakpoint_ops parameter.
	Pass it down, rather than hardcoding bkpt_breakpoint_ops.
	(create_overlay_event_breakpoint)
	(create_std_terminate_master_breakpoint)
	(create_exception_master_breakpoint): Create breakpoints with
	internal_breakpoint_ops vtable.
	(set_longjmp_breakpoint): Create momentary breakpoints with
	momentary_breakpoint_ops vtable, using
	momentary_breakpoint_from_master.
	(create_thread_event_breakpoint, create_jit_event_breakpoint)
	(create_solib_event_breakpoint): Create breakpoints with
	internal_breakpoint_ops vtable.
	(set_momentary_breakpoint): Create breakpoints with
	momentary_breakpoint_ops vtable.
	(momentary_breakpoint_from_master): New, factored out from
	clone_momentary_breakpoint.
	(clone_momentary_breakpoint): Adjust.
	(watch_command_1): Create scope breakpoints with
	momentary_breakpoint_ops vtable.
	(bkpt_re_set): Remove handling of internal and momentary
	breakpoints.
	(bkpt_print_mention, bkpt_print_recreate): New.
	(bkpt_breakpoint_ops): Adjust.
	(internal_bkpt_re_set, internal_bkpt_check_status)
	(internal_bkpt_print_it, internal_bkpt_print_mention)
	(internal_bkpt_print_recreate, internal_breakpoint_ops): New.
	(momentary_bkpt_re_set, momentary_bkpt_check_status)
	(momentary_bkpt_print_it, momentary_bkpt_print_mention)
	(momentary_bkpt_print_recreate): New.
	(momentary_breakpoint_ops): New.
2011-07-25 11:19:26 +00:00
Pedro Alves 348d480fa9 2011-07-25 Pedro Alves <pedro@codesourcery.com>
Implement most breakpoint_ops methods for all breakpoint types,
	and move the default handlings to the proper callbacks.

	gdb/
	* breakpoint.c (update_watchpoint): Always call the breakpoint's
	works_in_software_mode method.
	(insert_bp_location): Go through breakpoint_ops->insert_location
	for software and hardware watchpoints.
	(create_internal_breakpoint): Pass bkpt_breakpoint_ops as
	breakpoint_ops.
	(remove_breakpoint_1): Go through breakpoint_ops->remove_location
	for software and hardware watchpoints.
	(print_it_typical): Delete.
	(print_bp_stop_message): Always call the breakpoint_ops->print_it
	method.
	(watchpoint_check): Adjust comment.
	(bpstat_check_location): Simply always call the breakpoint's
	breakpoint_hit method.
	(bpstat_stop_status): Always call the breakpoint's check_status
	method.  Remove special cases for watchpoints and internal event
	breakpoints from here (moved to the check_status implementations).
	(print_one_breakpoint_location): Assume b->ops is never NULL.
	Remove static tracepoint marker id printing from here (moved to
	the print_one_detail callback implementation of tracepoints).
	(init_bp_location): Assert OPS is never NULL.
	(allocate_bp_location): Always call the breakpoint's
	allocate_location method, and remove the default code from here.
	(free_bp_location): Always call the location's dtor method, and
	remove the default code from here.
	(init_raw_breakpoint_without_location): Assert OPS is never NULL.
	(set_raw_breakpoint_without_location): Add new breakpoint_ops
	parameter.  Pass it down.
	(set_raw_breakpoint): Ditto.
	(print_it_catch_fork): Adjust to take a bpstat as argument.
	(catch_fork_breakpoint_ops): Install methods.
	(print_it_catch_vfork): Adjust to take a bpstat as argument.
	(catch_vfork_breakpoint_ops): Install methods.
	(dtor_catch_syscall): Call the base dtor.
	(print_it_catch_syscall): Adjust to take a bpstat as argument.
	(catch_syscall_breakpoint_ops): Install methods.
	(dtor_catch_exec): Call the base dtor.
	(print_it_catch_exec): Adjust to take a bpstat as argument.
	(catch_exec_breakpoint_ops): Install methods.
	(hw_breakpoint_used_count, hw_watchpoint_used_count): Always call
	the breakpoint's resources_needed method, and remove the default
	code from here.
	(set_momentary_breakpoint): Pass bkpt_breakpoint_ops as
	breakpoint_ops.
	(clone_momentary_breakpoint): Clone the original's ops.
	(mention): Always call the breakpoint's print_mention method, and
	remove the default code from here.
	(create_breakpoint_sal): Adjust to pass the ops to
	set_raw_breakpoint rather than setting it manually.
	(create_breakpoint): Assert ops is never NULL.  Adjust to pass the
	ops to set_raw_breakpoint_without_location rather than setting it
	manually.
	(break_command_1): Pass bkpt_breakpoint_ops as breakpoint_ops.
	(print_it_ranged_breakpoint): Adjust to take a bpstat as argument.
	(ranged_breakpoint_ops): Install methods.
	(break_range_command): Adjust to pass the ops to
	set_raw_breakpoint rather than setting it manually.
	(re_set_watchpoint, breakpoint_hit_watchpoint)
	(check_status_watchpoint, resources_needed_watchpoint)
	(works_in_software_mode_watchpoint, print_it_watchpoint)
	(print_mention_watchpoint, print_recreate_watchpoint): New
	functions.
	(watchpoint_breakpoint_ops): Install new methods.
	(print_it_masked_watchpoint): New function.
	(masked_watchpoint_breakpoint_ops): Install new methods.
	(watch_command_1): Adjust to pass the right breakpoint_ops to
	set_raw_breakpoint_without_location rather than setting it
	manually later.  Record the current pspace.
	(print_it_exception_catchpoint): Adjust to take a bpstat as
	argument.
	(gnu_v3_exception_catchpoint_ops): Install new methods.
	(say_where): New function.
	(null_re_set, null_check_status, null_works_in_software_mode)
	(null_resources_needed, null_print_one_detail, bp_location_dtor):
	New functions.
	(bp_location_ops): New global.
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it, bkpt_print_mention)
	(bkpt_print_recreate): New functions.
	(bkpt_breakpoint_ops): New global.
	(tracepoint_re_set, tracepoint_insert_location)
	(tracepoint_remove_location, tracepoint_breakpoint_hit)
	(tracepoint_check_status, tracepoint_works_in_software_mode)
	(tracepoint_print_it, tracepoint_print_one_detail)
	(tracepoint_print_mention, tracepoint_print_recreate): New
	functions.
	(tracepoint_breakpoint_ops): New global.
	(delete_breakpoint): Always call the breakpoint's dtor method, and
	remove the default handling from here.
	(breakpoint_re_set_default): Make static.
	(breakpoint_re_set_one): Always call the breakpoints re_set
	method, and remove the default handling from here.
	(trace_command, ftrace_command, strace_command)
	(create_tracepoint_from_upload): Pass appropriate breakpoints_ops
	to create_breakpoint.
	(save_breakpoints): Always call the breakpoint's print_recreate
	method, and remove the default handling from here.

	* ada-lang.c (dtor_exception): Call the base dtor.
	(re_set_exception): Call the base method.
	(print_it_exception, print_it_catch_exception): Adjust to take a
	bpstat as argument.
	(catch_exception_breakpoint_ops): Install methods.
	(print_it_catch_exception_unhandled): Adjust to take a bpstat as
	argument.
	(catch_exception_unhandled_breakpoint_ops): Install methods.
	(print_it_catch_assert): Adjust to take a bpstat as argument.
	(catch_assert_breakpoint_ops): Install methods.

	* breakpoint.h (struct breakpoint_ops): Adjust the print_it method
	to take a bpstat as argument.
	(enum print_stop_action): Add describing comments to each enum
	value.
	(breakpoint_re_set_default): Delete declaration.
	(null_re_set, null_works_in_software_mode, null_resources_needed)
	(null_check_status, null_print_one_detail): Declare.
	(bkpt_breakpoint_ops): Declare.
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it)
	(null_print_one_detail, bkpt_print_mention, bkpt_print_recreate):
	Declare.

	* mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust to pass
	bkpt_breakpoint_ops.
	* python/py-breakpoint.c (bppy_init): Ditto.
2011-07-25 11:16:49 +00:00
gdbadmin 4de338c844 *** empty log message *** 2011-07-25 00:00:03 +00:00
Philippe Waroquiers be8f8133ec 2011-07-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* MAINTAINERS (Write After Approval): Add myself to the list.
2011-07-24 20:16:58 +00:00
gdbadmin bbc40cf228 *** empty log message *** 2011-07-24 00:00:32 +00:00
Paul Pluzhnikov 3807f6133e 2011-07-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* elfread.c (elf_rel_plt_read): Fix off-by-one bug.
2011-07-23 16:49:16 +00:00
gdbadmin c0588ba682 *** empty log message *** 2011-07-23 00:00:33 +00:00
Ulrich Weigand b3215adc06 * gdb.python/py-mi.exp: Use different file names for different
versions of the executable under test.
	* gdb.python/py-prettyprint.exp: Likewise.
	* gdb.python/py-symbol.exp: Likewise.
	* gdb.python/py-template.exp: Likewise.
	* gdb.python/py-type.exp: Likewise.
	* gdb.python/py-value.exp: Likewise.
2011-07-22 18:01:43 +00:00
Ulrich Weigand 182b9acc4b * gdb.python/py-breakpoint.exp: Re-set can-use-hw-watchpoints
flag after restarting GDB if necessary.
2011-07-22 17:46:18 +00:00
Ulrich Weigand e6052b5dd3 * gdb.python/py-shared.exp: Call gdb_load_shlibs. 2011-07-22 17:45:16 +00:00
Pedro Alves 1ced966e34 2011-07-22 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.arch/i386-dr3-watch.exp: Test that the i386 watchpoints
	backend doesn't leave used debug registers behind.

	gdb/gdbserver/
	* i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
	to the inferior here.
	(i386_remove_aligned_watchpoint): Ditto.
	(i386_handle_nonaligned_watchpoint): Return immediate on fail to
	fit part of the watchpoint in the debug registers.
	(i386_update_inferior_debug_regs): New.
	(i386_low_insert_watchpoint): Work on a local mirror of the debug
	registers, and only update the inferior on success.
	(i386_low_remove_watchpoint): Ditto.

	gdb/
	* i386-nat.c (I386_DR_VACANT, I386_DR_LOCAL_ENABLE)
	(I386_DR_GLOBAL_ENABLE, I386_DR_DISABLE, I386_DR_SET_RW_LEN)
	(I386_DR_GET_RW_LEN, I386_DR_WATCH_HIT): Add state parameter and
	adjust.
	(dr_mirror, dr_status_mirror, dr_control_mirror): Delete.
	(struct i386_debug_reg_state): New.
	(i386_init_dregs): New.
	(dr_mirror): New.
	(i386_cleanup_dregs): Use i386_init_dregs.
	(i386_show_dr): Add state parameter and adjust.
	(i386_insert_aligned_watchpoint): Ditto.  Don't pass the info to
	the inferior here.
	(i386_remove_aligned_watchpoint): Likewise.
	(i386_handle_nonaligned_watchpoint): Add state parameter and adjust.
	(i386_update_inferior_debug_regs): New.
	(i386_insert_watchpoint): Work on a local mirror of the debug
	registers, and only update the inferior on success.
	(i386_remove_watchpoint): Ditto.
	(i386_region_ok_for_watchpoint): Adjust.
	(i386_stopped_data_address): Adjust.
	(i386_insert_hw_breakpoint): Adjust.
	(i386_remove_hw_breakpoint): Adjust.
2011-07-22 16:58:32 +00:00
Tom Tromey 3543a589b2 gdb
* amd64-tdep.c (amd64_pseudo_register_read_value): Rename
	from amd64_pseudo_register_read.  Change arguments.  Call
	mark_value_bytes_unavailable when needed.
	(amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not
	set_gdbarch_pseudo_register_read.
	* sentinel-frame.c (sentinel_frame_prev_register): Use
	regcache_cooked_read_value.
	* regcache.h (regcache_cooked_read_value): Declare.
	* regcache.c (regcache_cooked_read_value): New function.
	(regcache_cooked_read): Call
	gdbarch_pseudo_register_read_value if available.
	* i386-tdep.h (i386_pseudo_register_read_value): Declare.
	(i386_pseudo_register_read): Remove.
	* i386-tdep.c (i386_pseudo_register_read_into_value): Rename from
	i386_pseudo_register_read.  Change arguments.  Call
	mark_value_bytes_unavailable when needed.
	(i386_pseudo_register_read_value): New function.
	(i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value,
	not set_gdbarch_pseudo_register_read.
	* gdbarch.sh (pseudo_register_read_value): New method.
	* gdbarch.c, gdbarch.h: Rebuild.
	* findvar.c (value_from_register): Call get_frame_register_value.
gdb/testsuite
	* gdb.dwarf2/typeddwarf.c: XFAIL 'z' on x86-64.
	* gdb.dwarf2/typeddwarf.exp (xfail-gdb-test): Add arch_pattern
	argument.
	* gdb.dwarf2/typeddwarf-amd64.S: New file.
2011-07-22 15:31:52 +00:00
Phil Muldoon 95298e7219 2011-07-22 Phil Muldoon <pmuldoon@redhat.com>
* event-top.c (cli_command_loop): Use get_prompt, get_suffix,
	get_prefix.
	(display_gdb_prompt): Likewise.
	(change_annotation_level): Likewise.
	(push_prompt): Likewise.
	(pop_prompt): Likewise.
	(handle_stop_sig): Use get_prompt with a level.
	* top.c (command_loop): Use get_prompt with a level.
	(set_async_annotation_level): Use set_prompt with a level.
	(get_prefix): New function.
	(set_prefix): Ditto.
	(set_suffix): Ditto.
	(get_suffix): Ditto.
	(get_prompt): Accept a level argument.
	(set_prompt): Accept a level argument.  Free old prompts.  Set
	new_async_prompt if level is 0.
	(init_main): Use set_prompt with a level.  Do not set
	new_async_prompt.
	* event-top.h (PROMPT, SUFFIX, PREFIX): Move to top.c
	* top.h: Declare set_suffix, get_suffix, set_prefix, get_prefix.
	Modify set_prompt, get_prompt to account for levels.
	* tui/tui-interp.c (tui_command_loop): Use get_prompt with a
	level
	* python/python.c (before_prompt_hook): Use set_prompt.
2011-07-22 09:22:50 +00:00
matt rice 14d1530353 * gdb.threads/Makefile.in: Avoid globbing corethreads.exp
in mostlyclean rule.  Add files ending in .core.
2011-07-22 01:05:24 +00:00
gdbadmin 30c77ff1a6 *** empty log message *** 2011-07-22 00:00:02 +00:00
Kwok Yeung d26e3629bb 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
gdb/
	* defs.h: Add guard against inclusion in gdbserver.
	(struct ptid, ptid_t): Move to common/ptid.h.
	(xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
	xsnprintf, internal_error): Move to common/common-utils.h.
	(nomem): Delete.
	* gdb_assert.h: Move into common/ sub-directory.
	* gdb_locale.h: Ditto.
	* gdb_dirent.h: Ditto.
	* inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
	Move into common/ptid.h.
	* xml-support.c (xml_escape_text): Move into common/xml-utils.c.
	(gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
	Change nomem to malloc_failure.
	* xml-support.h (xml_escape_text): Move into common/xml-utils.h.
	* utils.c (nomem): Rename to malloc_failure.
	(xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
	xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c.
	(gdb_buildargv): Change nomem to malloc_failure.
	* infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
	ptid_is_pid): Move into common/ptid.c.
	(initialize_infrun): Delete initialization of null_ptid and
	minus_one_ptid.
	* linux-nat.c (linux_nat_xfer_osdata): Defer to
	linux_common_xfer_osdata.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/ptid.c and common/buffer.c.
	(HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h,
	common/ptid.h, common/buffer.h and common/linux-osdata.h.
	(COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o.
	(common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New
	rules.
	* common/gdb_assert.h: New.
	* common/gdb_dirent.h: New.
	* common/gdb_locale.h: New.
	* common/buffer.c: New.
	* common/buffer.h: New.
	* common/ptid.c: New.
	* common/ptid.h: New.
	* common/xml-utils.c: New.
	* common/xml-utils.h: New.
	* common/common-utils.c: New.
	* common/common-utils.h: New.
	* common/linux-osdata.c: New.
	* common/linux-osdata.h: New.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* config/ia64/linux.mh (NATDEPFILES): Ditto.
	* config/m32r/linux.mh (NATDEPFILES): Ditto.
	* config/m68k/linux.mh (NATDEPFILES): Ditto.
	* config/mips/linux.mh (NATDEPFILES): Ditto.
	* config/pa/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
	* config/s390/s390.mh (NATDEPFILES): Ditto.
	* config/sparc/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.

gdbserver/
	* linux-low.c (compare_ints, unique, list_threads, show_process,
	linux_core_of_thread): Delete.
	(linux_target_ops): Change linux_core_of_thread to
	linux_common_core_of_thread.
	(linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
	* utils.c (malloc_failure): Change type of argument.
	(xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/linux-osdata.c, common/ptid.c and common/buffer.c.
	(OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
	(IPA_OBJS): Add common-utils-ipa.o.
	(ptid_h, linux_osdata_h): New macros.
	(server_h): Add common/common-utils.h, common/xml-utils.h,
	common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
	common/ptid.h.
	(common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
	ptid.o, buffer.o): New rules.
	(linux-low.o): Add common/linux-osdata.h as a dependency.
	* configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
	* configure.ac: Add AC_HEADER_DIRENT check.
	* config.in: Regenerate.
	* configure: Regenerate.
	* remote-utils.c (xml_escape_text): Delete.
	(buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf): Move to common/buffer.c.
	* server.c (main): Remove call to initialize_inferiors.
	* server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
	ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
	ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
	internal_error, gdb_assert, gdb_assert_fail): Delete.
	(struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
	common/buffer.h.
	* inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
	initialize_inferiors): Delete.
2011-07-21 23:46:12 +00:00
matt rice edc8499054 * NEWS: Add info macros and info definitions commands. 2011-07-21 17:23:55 +00:00
Phil Muldoon 3a7bf607da 2011-07-21 Phil Muldoon <pmuldoon@redhat.com>
* NEWS: Document Python prompt substitution hook.
2011-07-21 15:58:52 +00:00
matt rice 9b158ba08e PR macros/12999
* macrotab.h (macro_callback_fn): Add new arguments to callback.
* macrotab.c (foreach_macro): Ditto.
(foreach_macro_in_scope): Ditto.
* macrocmd.c (print_macro_callback): New function.
(info_macro_command): Move some code to print_macro_definition.
(print_macro_definition): New function.
(print_one_macro): Add new arguments to callback.

testsuite/
* gdb.base/info-macros.c: New test sources.
* gdb.base/info-macros.exp: New tests.

docs/
* gdb.texinfo (Macros): Add info definitions and info macros commands.
Update text and cindex entries for info macro command.
2011-07-21 15:13:30 +00:00
Phil Muldoon d17b6f8101 2011-07-21 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* top.c (set_prompt): Rewrite to free previous prompt, free
	asynch_new_prompt and set both on new prompts.
	* event-top.c (display_gdb_prompt): Add prompt substitution
	logic.
	* python/python.c (before_prompt_hook): New function.

2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/python.exp: Add prompt substitution tests.

2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>

	* observer.texi (GDB Observers): Add before_prompt observer.
	* gdb.texinfo (Basic Python): Add documentation for prompt
	substitution.
2011-07-21 11:03:48 +00:00
gdbadmin 3779080d04 *** empty log message *** 2011-07-21 00:00:33 +00:00
matt rice 1364323a41 * bfin-tdep.c (bfin_extract_return_value): Fix swapped
arguments to store_unsigned_integer.
2011-07-20 16:52:36 +00:00
Tom Tromey 6c83ed5236 * dwarf2read.c (process_enumeration_scope): Do not call new_symbol
in some declaration-only cases.
2011-07-20 15:13:49 +00:00
Tom Tromey 8b70b953ba PR symtab/12984:
* dwarf2read.c (dwarf2_section_info_def): New typedef.
	(struct dwarf2_per_objfile) <types>: Change to a VEC.
	(struct dwarf2_per_cu_data) <from_debug_types>: Remove.
	<debug_type_section>: New field.
	(dwarf2_locate_sections): Push .debug_types sections onto VEC.
	(load_cu): Use appropriate section.
	(create_signatured_type_table_from_index): Add 'section'
	argument.
	(dwarf2_read_index): Only allow a single .debug_types section.
	(dw2_get_file_names): Use appropriate section.
	(read_type_comp_unit_head): Add 'section' argument.
	(create_debug_types_hash_table): Loop over all .debug_types
	sections.
	(init_cu_die_reader): Use appropriate section.
	(process_psymtab_comp_unit, load_partial_comp_unit)
	(load_full_comp_unit, read_die_and_children, find_partial_die)
	(lookup_die_type, determine_prefix, follow_die_offset): Update.
	(lookup_signatured_type_at_offset): Add 'section' argument.
	(read_signatured_type_at_offset): Add 'sect' argument.
	(read_signatured_type): Use appropriate section.
	(set_die_type, get_die_type_at_offset): Update.
	(dwarf2_per_objfile_free): Free all .debug_types sections, and
	VEC.
	(write_psymtabs_to_index): Don't allow index with more than one
	.debug_types section.
2011-07-20 15:06:54 +00:00
Pedro Alves 2275a1a744 2011-07-20 Pedro Alves <pedro@codesourcery.com>
* tracepoint.c (tracepoint_look_up_symbols): Return upon the first
	symbol error.
2011-07-20 11:01:21 +00:00
gdbadmin 37f005ff6b *** empty log message *** 2011-07-20 00:00:02 +00:00
Jan Kratochvil 918dd91059 gdb/
Fix crash if referenced CU is aged out.
	* dwarf2loc.c (per_cu_dwarf_call): New variable back_to, use to for
	xfree of block.data.
	(indirect_pieced_value): New variable back_to, use to for xfree of
	baton.data.
	(dwarf2_compile_expr_to_ax): New variable back_to, use to for xfree of
	block.data.
	* dwarf2read.c (dwarf2_find_base_address): New prototype.
	(load_cu): New function from ...
	(dw2_do_instantiate_symtab): ... the code here ...
	(process_full_comp_unit): ... and here.
	(dwarf2_fetch_die_location_block): Call load_cu first.  Call xmemdup on
	retval.data.

gdb/testsuite/
	Fix crash if referenced CU is aged out.
	* gdb.dwarf2/dw2-op-call.exp (maintenance set dwarf2 max-cache-age 0):
	New.
	* gdb.dwarf2/implptr.exp: Likewise.
2011-07-19 20:28:52 +00:00
Jan Kratochvil 0e37a63c3c gdb/
* dwarf2loc.c (indirect_pieced_value): Use check_typedef for VALUE's
	type.

gdb/testsuite/
	* gdb.dwarf2/implptr.S: Rebuilt.
	* gdb.dwarf2/implptr.c (intp, intpp, intppp): New typedefs.
	(bar): Use them for j, k, l.
	* gdb.dwarf2/implptr.exp: New variable opts.  Support runtest parameter
	COMPILE.
	(print j in implptr:bar): Update for the intp typedef.
	(print p[0].x in implptr:foo): Use more exact regex.
2011-07-19 20:25:14 +00:00
Gary Benson 7e324e482f gdb/
* infrun.c (struct execution_control_state): New member
	stop_func_filled_in.
	(clear_stop_func, fill_in_stop_func): New functions.
	(handle_inferior_event): Call clear_stop_func rather than
	manipulating the execution control state directly.
	Call fill_in_stop_func lazily as required rather than
	directly calling find_pc_partial_function in all cases.
2011-07-19 12:24:34 +00:00
gdbadmin c8057f624e *** empty log message *** 2011-07-19 00:00:32 +00:00
Tom Tromey d48323d808 * dwarf2read.c (read_subrange_type): Use attr_form_is_block when
checking for variable-sized array.
2011-07-18 15:17:35 +00:00
Tom Tromey f65cf84c3e * gdb.cp/static-method.exp: Add missing single quote. 2011-07-18 15:15:06 +00:00
Jean-Charles Delay a0f171c869 gdb/
* MAINTAINERS (Write After Approval): Add myself to the list.
2011-07-18 09:23:52 +00:00
Jean-Charles Delay 40591b7d64 gdb/
* varobj.h (varobj_languages): Add vlang_ada definition to the list
	of supported languages.
	* varobj.c: Add top definitions and basic implementation of the
	following callbacks: ada_number_of_children, ada_name_of_variable,
	ada_name_of_child, ada_path_expr_of_child, ada_value_of_root,
	ada_value_of_child, ada_type_of_child, ada_value_of_variable.
	(languages): Register Ada-specific callbacks.
	(variable_language): Add the Ada case in the language setter switch.
2011-07-18 09:21:43 +00:00
Yao Qi d5b4a7be2c gdb/testsuite/
* gdb.base/async-shell.exp: Skip test if displaced stepping is not
	supported.
	* gdb.mi/mi-nonstop-exit.exp: Likewise.
	* gdb.mi/mi-nonstop.exp: Likewise.
	* gdb.mi/mi-ns-stale-regcache.exp: Likewise.
	* gdb.mi/mi-nsintrall.exp: Likewise.
	* gdb.mi/mi-nsmoribund.exp: Likewise.
	* gdb.mi/mi-nsthrexec.exp: Likewise.
	* gdb.python/py-evthreads.exp: Likewise.
2011-07-18 04:14:21 +00:00
gdbadmin b12c3949ab *** empty log message *** 2011-07-18 00:00:33 +00:00
Jan Kratochvil 2e424e08c1 gdb/
* remote-mips.c (pmon_download): Fix ignored return value GCC warning.
2011-07-17 19:22:32 +00:00
gdbadmin a5c45d3bd6 *** empty log message *** 2011-07-17 00:00:02 +00:00
gdbadmin 290cbfdfad *** empty log message *** 2011-07-16 00:00:02 +00:00
Jan Kratochvil 9e8b7a03dd gdb/
Code cleanup.
	* dwarf2-frame.c (dwarf2_frame_ctx_funcs): New.
	(execute_stack_op): Use dwarf2_frame_ctx_funcs
	* dwarf2expr.c (dwarf_get_base_type): Access get_base_type via funcs.
	(execute_stack_op): Access read_reg, get_frame_base, read_mem,
	get_frame_cfa, get_tls_address and dwarf_call via funcs.
	* dwarf2expr.h (struct dwarf_expr_context): New forward declaration.
	(struct dwarf_expr_context_funcs): New, move here methods from ...
	(struct dwarf_expr_context): ... here.  New fields funcs.
	* dwarf2loc.c (dwarf_expr_dwarf_call): Access get_frame_pc via funcs.
	(dwarf_expr_ctx_funcs): New.
	(dwarf2_evaluate_loc_desc_full): Use dwarf_expr_ctx_funcs.
	(needs_frame_dwarf_call): Access get_frame_pc via funcs.
	(needs_frame_ctx_funcs): New.
	(dwarf2_loc_desc_needs_frame): Use needs_frame_ctx_funcs.
2011-07-15 20:54:32 +00:00
Jan Kratochvil e9ea266294 gdb/testsuite/
Code cleanup.
	* gdb.cp/namespace.exp (xfail_class_types): New variable.  Initialize
	it.  Substitute it instead of test_compiler_info everywhere.
2011-07-15 18:46:10 +00:00
Fawzi Mohamed 2b1260ab17 2011-07-15 Fawzi Mohamed <fawzi.mohamed@nokia.com>
* MAINTAINERS (Write After Approval): Add myself to the list.
2011-07-15 15:27:49 +00:00
Fawzi Mohamed 8bd908398f 2011-07-15 Fawzi Mohamed <fawzi.mohamed@nokia.com>
* dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): Ensure
	that CIE pointer of an FDE really points to a CIE .
2011-07-15 15:01:04 +00:00
Ulrich Weigand ce4515734c * gdb.base/type-opaque.exp: Use gdb_load_shlibs. Run test on
remote targets as well.
2011-07-15 14:13:00 +00:00
Ulrich Weigand 756d88a7fe * lib/gdb.exp (gdb_compile_shlib_pthreads): New helper.
* gdb.threads/tls-shared.exp: Use it.  Call gdb_load_shlibs.
2011-07-15 14:11:22 +00:00
Ulrich Weigand 31f83dc55a * lib/gdb.exp (gdb_compile): Specify rpath if the *target* is
a remote machine, not the host.
	(gdb_compile_shlib): Set soname if target is remote.
2011-07-15 14:10:26 +00:00
Hui Zhu 953b98d1cf 2011-07-15 Hui Zhu <teawater@gmail.com>
* remote.c (remote_get_trace_status): Add comments.
2011-07-15 02:07:43 +00:00
gdbadmin 6d44329fb3 *** empty log message *** 2011-07-15 00:00:33 +00:00
Paul Pluzhnikov df46027df1 Cleanup: kill trailing whitespace 2011-07-14 16:41:56 +00:00
Paul Pluzhnikov 059241a073 2011-07-14 Paul Pluzhnikov <ppluzhnikov@google.com>
* gdb.cp/minsym-fallback.exp: Link in C++ mode.
2011-07-14 16:33:21 +00:00
Jan Kratochvil c8f2448ab7 gdb/
Code cleanup - constify struct lval_funcs.
	* dwarf2loc.c (pieced_value_funcs): Make it const.
	* infrun.c (siginfo_value_funcs): Likewise.
	* opencl-lang.c (opencl_value_funcs): Likewise.
	* valops.c (value_assign, value_ind): Make the funcs variable const.
	* value.c (struct value): Make location.computed.funcs target const.
	Rearrange the comments.
	(allocate_computed_value): Make the funcs parameter target const.
	(value_computed_funcs): Return the funcs target const.
	(value_free, value_copy, set_value_component_location): Make the funcs
	variable const.
	* value.h (allocate_computed_value): Make the funcs parameter target
	const.
	(value_computed_funcs): Return the funcs target const.
	* windows-tdep.c (tlb_value_funcs): Make it const.
2011-07-14 15:00:20 +00:00
Hui Zhu f652de6f62 2011-07-14 Hui Zhu <teawater@gmail.com>
* remote.c (remote_get_trace_status): Initialize p.
2011-07-14 04:46:42 +00:00
gdbadmin 41d1d0bd9b *** empty log message *** 2011-07-14 00:00:33 +00:00
Jan Kratochvil 67f41397ce gdb/
Work around kgdb.
	* remote.c (remote_get_trace_status): New variable ex.  Put
	remote_get_noisy_reply into TRY_CATCH.  Call exception_fprintf for it.
2011-07-13 17:07:16 +00:00
matt rice 28a0b48c48 * gdb.python/py-objfile-script-gdb.py: Renamed to
py-objfile-script-gdb.py.in.
* gdb.python/py-objfile-script-gdb.py.in: Renamed from
py-objfile-script-gdb.py.
* gdb.python/py-objfile-script.exp: Update reference to
py-objfile-script-gdb.py.
2011-07-13 17:00:56 +00:00
Tom Tromey d1b66e6d73 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_regval_type>: Use
value_from_contents for final conversion.
2011-07-13 16:51:22 +00:00
Jan Kratochvil 9a771b671f gdb/testsuite/
* gdb.dwarf2/dw2-op-call.S (array1): Use the real label; do not
	reference undefined label.
2011-07-13 15:18:13 +00:00
Jan Kratochvil 1632a688b3 gdb/
Code cleanup.
	* dwarf2loc.c (dwarf_expr_frame_base_1, dwarf2_evaluate_loc_desc_full):
	Indent prototypes so they do not get into tags.
2011-07-13 15:15:42 +00:00
gdbadmin 8ce909f926 *** empty log message *** 2011-07-13 00:00:33 +00:00
Jan Kratochvil a7035dbbd1 gdb/
Code cleanup making also optimized out values lazy.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
	allocate_optimized_out_value.  Twice.
	(loclist_read_variable)  Use allocate_optimized_out_value.  Once.
	* findvar.c (read_var_value): Likewise.
	* value.c (allocate_optimized_out_value): New function.
	* value.h (allocate_optimized_out_value): New declaration.
2011-07-12 21:16:48 +00:00
Jan Kratochvil d07ed419cf gdb/
Fix occasional crash of CTRL-C during DWARF read in.
	* dwarf2read.c (dwarf2_mark_helper): Return on NULL CU.
2011-07-12 20:59:03 +00:00
gdbadmin 036d672c60 *** empty log message *** 2011-07-12 00:00:03 +00:00
Tom Tromey 86d318988c * regcache.c (struct regcache_descr): Fix typo.
* i387-tdep.c (i387_supply_xsave): Fix typo.
2011-07-11 17:19:16 +00:00
Tom Tromey 2ab9532817 * dwarf2read.c (handle_DW_AT_stmt_list): New function.
(read_file_scope, read_type_unit_scope): Use it.
2011-07-11 17:17:26 +00:00
Jan Kratochvil 04ad99e60b gdb/
* dwarf2expr.c (read_sleb128): Fix signed extension overflowing host
	`int'.

gdb/testsuite/
	* gdb.dwarf2/dw2-const.S (Pointer size): Change from 4 to 8.
	(DW_AT_high_pc, DW_AT_low_pc): Remove them.
	(val8, .Ltype_const8, .Ltype_int8, DW_TAG_variable): New.
	* gdb.dwarf2/dw2-const.exp (print/x val8): New test.
2011-07-11 13:40:24 +00:00
Phil Muldoon 713389e024 2011-07-11 Phil Muldoon <pmuldoon@redhat.com>
PR python/12438
	* python/python.c: Set gdbpy_should_print_stack default to off.
	(set_python): Deprecate maint set python print-stack to
	class_deprecate.
	(_initialize_python): Deprecate maint set/show python print-stack.
	Add new prefix command, python.  Add new setting, print-backtrace.
	* NEWS: Document set python print-stack.  Document default change.

2011-07-11  Phil Muldoon  <pmuldoon@redhat.com>

        PR python/12438
	* gdb.texinfo (Python Commands): Add deprecate note to maint
          set/show python print-stack.  Document set/show python
          print-backtrace.

2011-07-11  Phil Muldoon  <pmuldoon@redhat.com>

        PR python/12438
	* gdb.python/python.exp: Add maint set/show python print-stack
          deprecated tests.  Add set/show python print-backtrace tests.
2011-07-11 13:07:38 +00:00
Phil Muldoon 754eadd19f 2011-07-11 Phil Muldoon <pmuldoon@redhat.com>
* python/py-inferior.c (infpy_dealloc): New function.
        (inferior_to_inferior_object): Return a new object, or a
	new reference to the existing object.
        (find_thread_object): Cleanup references to inferior.
        (delete_thread_object): Ditto.
        * python/py-infthread.c (create_thread_object): Do not increment
	inferior reference count.
2011-07-11 12:10:19 +00:00
gdbadmin c930b845d3 *** empty log message *** 2011-07-11 00:00:03 +00:00
gdbadmin fc4cbfac1c *** empty log message *** 2011-07-10 00:00:03 +00:00
gdbadmin 00b50a6ad4 *** empty log message *** 2011-07-09 00:00:02 +00:00
Tom Tromey 5e44ecb338 * dwarf2loc.c (locexpr_regname): New function.
(locexpr_describe_location_piece): Use it.
	(disassemble_dwarf_expression): Add per_cu argument.  Use
	locexpr_regname.
	<DW_OP_GNU_deref_type, DW_OP_GNU_const_type,
	DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>:
	New cases.
	(locexpr_describe_location_1): Add per_cu argument.
	(locexpr_describe_location): Update.
	(loclist_describe_location): Update.
2011-07-08 19:54:55 +00:00
Tom Tromey e0e9434c89 * dwarf2expr.c (execute_stack_op): Add QUIT. 2011-07-08 16:02:59 +00:00
gdbadmin a0b50e655a *** empty log message *** 2011-07-08 00:00:03 +00:00
Jan Kratochvil 97d146f805 gdb/testsuite/
* gdb.java/jprint.exp (print a java.lang.String): xfail without system
	debug info.
2011-07-07 14:08:21 +00:00
Hui Zhu 26afc0d703 2011-07-07 Hui Zhu <teawater@gmail.com>
Revert:
	2011-07-06  Hui Zhu  <teawater@gmail.com>
	* remote.c (remote_start_remote): Add TRY_CATCH for
	remote_get_trace_status.
	* tracepoint.c (disconnect_tracing): Ditto.
2011-07-07 13:32:55 +00:00
Andrew Burgess a40a111fc7 http://sourceware.org/ml/gdb-patches/2011-07/msg00085.html
* cli/cli-setshow.c (do_setshow_command): Display var_zinteger
	variables as signed, not unsigned.
2011-07-07 08:38:37 +00:00
Joel Brobecker e2bd3b15a8 Minor forward declaration reformatting (jit.c)
gdb/ChangeLog:

 	* jit.c (jit_inferior_init): Reformat forward declaration.
2011-07-07 02:07:04 +00:00
gdbadmin 5df0ebe99e *** empty log message *** 2011-07-07 00:00:03 +00:00
matt rice e3d961fe96 MAINTAINERS (Write after approval): Add myself to the list. 2011-07-06 22:20:16 +00:00
matt rice facde0e593 gdb.python/python.exp: Update filename paths.
gdb.python/py-symtab.exp: Ditto.
2011-07-06 22:15:02 +00:00
Joel Brobecker 3b2a0cf216 Fix JIT clang-lli regression (unable to read JIT descriptor from memory)
2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * jit.c (jit_inferior_init): Forward declare.
        (jit_breakpoint_re_set_internal): Call jit_inferior_init.

testsuite/ChangeLog:

2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * gdb.base/jit-so.exp: New test.
        * gdb.base/jit-dlmain.c: New file.
        * gdb.base/jit-main.c: Allow "main" to be elsewhere.
2011-07-06 21:40:17 +00:00
Marek Polacek 438640d112 gdb.python/py-evthreads.exp: add missing $ 2011-07-06 19:52:21 +00:00
Mike Frysinger 33a365dfad gdb: testsuite: add Blackfin support
This fills out a few of the test places where needed for Blackfin targets.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-06 18:40:30 +00:00
Marek Polacek 8f7ae68682 Fix race in gdb.python/py-evthreads.exp 2011-07-06 15:00:15 +00:00
Hui Zhu 21083d0f0c Correct a email error. 2011-07-06 02:46:47 +00:00
Hui Zhu 0f3428f083 2011-07-06 Hui Zhu <teawater@gmail.com>
* remote.c (remote_start_remote): Add TRY_CATCH for
	remote_get_trace_status.
	* tracepoint.c (disconnect_tracing): Ditto.
2011-07-06 02:43:12 +00:00
gdbadmin dfea59b08c *** empty log message *** 2011-07-06 00:00:03 +00:00
Tom Tromey fc9f3a6978 * symtab.c (operator_chars): Now static.
* linespec.c (operator_chars): Don't declare.
2011-07-05 20:30:19 +00:00
Thiago Jung Bauermann 26e519b913 * ui-out.h (ui_out_field_core_addr): Fix typo in comment. 2011-07-05 18:36:52 +00:00
Tom Tromey eb2a6f420b gdb
* gnu-v3-abi.c (gnuv3_rtti_type): Check TYPE_CPLUS_REALLY_JAVA.
	* gdbtypes.h (struct cplus_struct_type) <is_java>: New field.
	(TYPE_CPLUS_REALLY_JAVA): New macro.
	* dwarf2read.c (process_structure_scope): Set
	TYPE_CPLUS_REALLY_JAVA.
gdb/testsuite
	* gdb.java/jprint.java (jprint.hi): New field.
	* gdb.java/jprint.exp: Print string.
2011-07-05 13:36:42 +00:00
Thiago Jung Bauermann 177b42fefa gdb/
* ada-lang.c: Fix typos.
	* amd64-tdep.c: Likewise.
	* breakpoint.c: Likewise.
	* cli/cli-decode.c: Likewise.
	* findcmd.c: Likewise.
	* inline-frame.c: Likewise.
	* mi/mi-main.c: Likewise.
	* minsyms.c: Likewise.
	* monitor.c: Likewise.
	* monitor.h: Likewise.
	* prologue-value.c: Likewise.
	* reverse.c: Likewise.
	* s390-tdep.c: Likewise.

gdb/testsuite/
	* gdb.base/call-sc.c: Likewise.
	* gdb.base/ifelse.exp: Likewise.
	* gdb.base/structs.c: Likewise.

gdb/doc/
	* gdb.texinfo: Likewise.
2011-07-05 04:35:00 +00:00
gdbadmin ec478a00d2 *** empty log message *** 2011-07-05 00:00:03 +00:00
Joel Brobecker efae1d9244 Minor comment reformatting in generic_elf_osabi_sniffer
Comment says it all.  I just felt that putting some new text in
a separate paragraph allowed us to clearly identify the section
about ELFOSABI_NONE, and the part that talks about the new
ELFOSABI_GNU.

gdb/ChangeLog:

        * osabi.c (generic_elf_osabi_sniffer): Minor comment reformatting.
2011-07-04 19:50:44 +00:00
Joel Brobecker 6040a59db5 ada-tasks.c: handle known tasks maintained by a simply-linked list.
The mapping between Ada tasks, and the underlying threads is
normally maintained by the GNAT runtime under the known_tasks
array.  For performance reasons, this array is just a static
array with 10_000 entries in it. However, this is not very
practical in certain environments where memory is limited.
For those environments, the runtime has been enhanced to use
an alternate scheme with a linked list.

This change enhances the Ada tasking support to recognize this
situation and use the correct way of reading the tasks info
based on the the situation.

gdb/ChangeLog  (Tristan Gingold)

	* ada-tasks.c (KNOWN_TASKS_LIST): New macro.
	(tcb_fieldno): Add activation_link field.
	(get_known_tasks_addr): Moved and rewritten.
	(get_tcb_types_info): Set activation_link field.
	(read_known_tasks_array): Add parameter.  Rewritten.
	(read_known_tasks_list): New function.
	(read_known_tasks): New function.
	(ada_build_task_list): Call read_known_tasks instead of
	read_known_tasks_array.
	* ravenscar-thread.c: Add first_task_name constant.
	(has_ravenscar_runtime): Check for task list too.
2011-07-04 19:32:07 +00:00
Joel Brobecker cb741e45a0 Minor changes in ada-tasks.c
Just some minor cleanup changes in preparation for an upcoming
change...

gdb/ChangeLog  (Tristan Gingold)

	* ada-tasks.c: Renames fieldno to actb_fieldno.
	(ada_get_task_number): Indentation.
	(get_tcb_types_info): Remove all parameters.  Write directly
	the globals.
	(ptid_from_atcb_common): Adjust.
	(read_atcb): Adjust.
2011-07-04 19:31:49 +00:00
Thiago Jung Bauermann 7475b06c20 * symtab.c (in_prologue): Remove mention of ppc's refine_prologue_limit. 2011-07-04 18:51:12 +00:00