Commit Graph

28569 Commits

Author SHA1 Message Date
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
gdbadmin cef6e90a3e *** empty log message *** 2011-05-18 00:00:32 +00:00
Tom Tromey ee86786cdd * cp-valprint.c (cp_print_value_fields): Catch errors from
value_static_field.
2011-05-17 19:29:10 +00:00
Tom Tromey 9ff3b74fdb * dwarf2read.c (dwarf2_get_die_type): Call
get_die_type_at_offset.
	* dwarf2expr.c (dwarf_get_base_type): Handle NULL return from
	get_base_type function.
2011-05-17 17:01:46 +00:00
Pedro Alves 393eab5450 2011-05-17 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
	* gdb.texinfo (Remote Protocol) <Overview>: Mention vCont is
	required for multi-threading support.
	(Remote Protocol) <Packets>: Mention that 'c', 's', 'C', 'S' and
	Hc are deprecated for multi-threading debugging.  Point readers at
	the vCont packet.
2011-05-17 13:29:38 +00:00
Pedro Alves cd3da28e23 2011-05-17 Tomas Martinec <fyzmat@gmail.com>
gdb/
	* infrun.c (handle_inferior_event) <handling deferred step>: Clear
	trap_expected.
2011-05-17 11:43:07 +00:00
gdbadmin 4c83e80569 *** empty log message *** 2011-05-17 00:01:03 +00:00
Doug Evans fd20d931f1 * python/py-auto-load.c (source_section_scripts): Mention objfile
name in warning.
2011-05-16 16:33:57 +00:00
Tom Tromey b481f9e0ce 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
* linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
	__FILE__ and __LINE__ to internal_error.
2011-05-16 15:59:45 +00:00
Pedro Alves 3b48433dfb 2011-05-16 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.ada/start.exp: Call untested with the correct test filename.
	* gdb.arch/i386-bp_permanent.exp: Call untested with the correct
	test filename.  Make the test's binary unique.
	* gdb.arch/i386-signal.exp: Call untested with the correct test
	filename.
	* gdb.arch/i386-size-overlap.exp: Ditto.
	* gdb.arch/Makefile.in (EXECUTABLES): Update.
	* gdb.base/gcore-buffer-overflow.exp: Ditto.
	* gdb.cp/call-c.exp: Ditto.
	* gdb.mi/mi-reverse.exp: Call untested with the correct test
	filename.  Make the test's binary unique.
	* gdb.mi/Makefile.in (EXECUTABLES): Update.
	* gdb.python/py-mi.exp: Ditto.
	* gdb.python/Makefile.in (EXECUTABLES): Update.
	* gdb.reverse/i386-precsave.exp: Ditto.
	* gdb.reverse/i387-env-reverse.exp: Call untested with the correct
	test filename.
	* gdb.reverse/i387-stack-reverse.exp: Ditto.
	* gdb.reverse/sigall-precsave.exp: Ditto.  Make the test's binary
	unique.
	* gdb.reverse/sigall-reverse.exp: Call untested with the correct
	test filename.
	* gdb.reverse/Makefile.in (EXECUTABLES): Update.
	* gdb.trace/tfile.exp: Ditto.
2011-05-16 13:56:41 +00:00
Doug Evans 290351b813 * linux-thread-db.c (try_thread_db_load_from_pdir_1): New function.
(try_thread_db_load_from_pdir): Call it.  If unable to find
	libthread_db in directory of libpthread, see if we're looking at
	the separate-debug-info copy.
2011-05-16 02:22:39 +00:00
gdbadmin 6706b16f7f *** empty log message *** 2011-05-16 00:00:33 +00:00
Doug Evans 75fc9810e3 * python/py-autoload.c (print_script): Print "Missing" instead of
"No" for missing scripts.
	(info_auto_load_scripts): Tweak "Loaded" column to fit "Missing".

	doc/
	* gdb.texinfo (Auto-loading): Document printing of missing scripts.
2011-05-15 18:46:25 +00:00
gdbadmin 80db650d1d *** empty log message *** 2011-05-15 00:00:33 +00:00
Yao Qi ba4a8bdd81 2011-05-14 Yao Qi <yao@codesourcery.com>
* gdb.trace/tfile.c(add_memory_block): Store address in unsigned
	type.
2011-05-14 06:06:36 +00:00
Doug Evans 9f7bc58762 * ui-file.c (stdio_file_write_async_safe): Add comment. 2011-05-14 05:44:37 +00:00
Hui Zhu 093cee7d54 2011-05-14 Hui Zhu <teawater@gmail.com>
* ui-file.c (stdio_file_write_async_safe): Add empty check for build.
2011-05-14 03:37:18 +00:00
gdbadmin 5aa4daa445 *** empty log message *** 2011-05-14 00:00:33 +00:00
Doug Evans 98a5dd1327 Support $pdir and $sdir in libthread-db-search-path.
* NEWS: Mention $sdir,$pdir.
	* gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): Add $sdir:$pdir.
	* linux-thread-db.c (try_thread_db_load_from_pdir): New function.
	(try_thread_db_load_from_sdir): New function.
	(try_thread_db_load_from_dir): New function.
	(thread_db_load_search): Handle $pdir, $sdir.  Remove trying of
	system directories if search of libthread-db-search-path fails,
	that is now done via $sdir.
	(has_libpthread): New function.
	(thread_db_load): Remove search for libthread_db in directory of
	libpthread, that is now done via $pdir.

	gdbserver/
	* thread-db.c (try_thread_db_load_from_sdir): New function.
	(try_thread_db_load_from_dir): New function.
	(thread_db_load_search): Handle $sdir, ignore $pdir.
	Remove trying of system directories if search of
	libthread-db-search-path fails,	that is now done via $sdir.

	doc/
	* gdb.texinfo (Threads): Document $sdir,$pdir.
	(Server): Document $pdir exception.
2011-05-13 22:36:07 +00:00
Doug Evans dbaefcf757 * NEWS: Mention "info auto-load-scripts".
* python/py-auto-load.c (struct auto_load_pspace_info): New member
	script_not_found_warning_printed.
	(init_loaded_scripts_info): Renamed from create_loaded_scripts_hash,
	all callers updated.  Initialize script_not_found_warning_printed.
	(get_auto_load_pspace_data_for_loading): New function.
	(maybe_add_script): New function.
	(source_section_scripts): Simplify.  Only print one warning regardless
	of the number of auto-load scripts not found.
	(clear_section_scripts): Clear script_not_found_warning_printed.
	(auto_load_objfile_script): Record script in hash table.
	(count_matching_scripts): New function.
	(maybe_print_script): Renamed from maybe_print_section_script, all
	callers updated.  Rewrite to use ui_out_*.
	(info_auto_load_scripts): Renamed from
	maintenance_print_section_scripts, all callers updated.
	(gdbpy_initialize_auto_load): "maintenance print section-scripts"
	renamed as "info auto-load-scripts".

	doc/
	* gdb.texinfo (Auto-loading): Document "info auto-load-scripts".

	testsuite/
	* gdb.python/py-objfile-script.exp: New file.
	* gdb.python/py-objfile-script.c: New file.
	* gdb.python/py-objfile-script-gdb.py: New file.
	* testsuite/gdb.python/py-section-script.exp: Test
	"info auto-load-scripts".
2011-05-13 22:11:47 +00:00
Doug Evans cc63ef9bbd fix >80 cols in earlier entry 2011-05-13 22:09:57 +00:00
Doug Evans bbfac39e2a fix >80 column entry in earlier entry 2011-05-13 22:07:56 +00:00
Tom Tromey 9930639c02 gdb
* dwarf2expr.c (read_uleb128): Cast intermediate result.
	(read_sleb128): Likewise.
gdb/testsuite
	* gdb.dwarf2/clztest.exp: New file.
	* gdb.dwarf2/clztest.c: New file.
	* gdb.dwarf2/clztest.S: New file.
2011-05-13 18:54:59 +00:00
Doug Evans 7e0396aae0 * gdb.texinfo (Threads): Clarify default value for libthread-db-search-path. 2011-05-13 18:45:43 +00:00
Tom Tromey 06826322cb * dwarf2loc.c (disassemble_dwarf_expression): Fix instruction
offset display.
2011-05-13 18:42:48 +00:00
Doug Evans 05272e115a * gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 tests. 2011-05-13 18:31:01 +00:00
Doug Evans 01124a23b3 * linux-nat.c (debug_linux_nat_async): Delete.
Replace all references to use debug_linux_nat instead.
	(show_debug_linux_nat_async): Delete.
	(sigchld_handler): Call ui_file_write_async_safe instead of
	fprintf_unfiltered.
	(_initialize_linux_nat): Remove `set debug lin-lwp-async'.
	* ui-file.c (struct ui_file): New member to_write_async_safe.
	(null_file_write_async_safe): New function.
	(ui_file_write_async_safe): New function.
	(set_ui_file_write_async_safe): New function.
	(ui_file_new): Initialize to_write_async_safe.
	(stdio_file_write_async_safe): New function.
	(struct stdio_file): New member fd.
	(stdio_file_new): Initialize to_write_async_safe, fd.
	(stdio_file_read, stdio_file_isatty): New stdio->fd instead of calling fileno.
	* ui-file.h (ui_file_write_async_safe_ftype): New typedef.
	(set_ui_file_write_async_safe): Declare.
	(ui_file_write_async_safe): Declare.

	doc/
	* gdb.texinfo (Completion): Update example.
	(Debugging Output): Delete `set/show debug lin-lwp-async'.
2011-05-13 17:31:07 +00:00
Tom Tromey 6edba76fe8 * lib/gdb.exp (is_x86_like_target): New proc.
* gdb.dwarf2/watch-notconst.exp: Use is_x86_like_target.
	* gdb.dwarf2/valop.exp: Use is_x86_like_target.
	* gdb.dwarf2/typeddwarf.exp: Use is_x86_like_target.  Pass
	-nostdlib to compiler.
	* gdb.dwarf2/typeddwarf.S (_start): Rename from 'main'.
	* gdb.dwarf2/pieces.exp: Use is_x86_like_target.
	* gdb.dwarf2/implptr.exp: Use is_x86_like_target.
	* gdb.dwarf2/dw2-restore.exp: Check for LP64.
	* gdb.dwarf2/callframecfa.exp: Use is_x86_like_target.
2011-05-13 17:17:22 +00:00
Tom Tromey 72fc29ff12 * utils.c (do_value_free): New function.
(make_cleanup_value_free): Likewise.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Handle value
	freeing correctly.
	(dwarf2_loc_desc_needs_frame): Call
	make_cleanup_value_free_to_mark.
	* dwarf2expr.h (struct dwarf_expr_context) <mark>: Remove field.
	* dwarf2expr.c (free_dwarf_expr_context): Don't call
	value_free_to_mark.
	(new_dwarf_expr_context): Don't call value_mark.
	* dwarf2-frame.c (execute_stack_op): Call
	make_cleanup_value_free_to_mark.
	* defs.h (make_cleanup_value_free): Declare.
2011-05-13 15:44:49 +00:00
Thiago Jung Bauermann 028d0ed5d1 gdb/
* mi/mi-main.c (mi_cmd_execute): Use cleanup from
	prepare_execute_command.
	* top.c (prepare_execute_command): Return cleanup.
	(execute_command): Use cleanup from prepare_execute_command.
	* top.h (prepare_execute_command): Change prototype to return
	cleanup.
	* defs.h (struct value): Add opaque declaration.
	(make_cleanup_value_free_to_mark): Add prototype.
	* utils.c (do_value_free_to_mark): New function.
	(make_cleanup_value_free_to_mark): Likewise.

gdb/testsuite/
	* gdb.python/py-function.exp: Test setting a value from a function
	which executes a command.
2011-05-13 04:34:25 +00:00
gdbadmin 69badfdddb *** empty log message *** 2011-05-13 00:00:33 +00:00
Tom Tromey b087e0edae * dwarf2expr.c (execute_stack_op) <DW_OP_shr>: Unconditionally
cast left-hand-side to unsigned.
2011-05-12 19:32:47 +00:00
Tom Tromey 8a9b8146fd gdb
PR gdb/12617:
	* value.h (value_from_contents): Declare.
	* value.c (value_from_contents): New function.
	* dwarf2read.c (dwarf_stack_op_name): Add new values.
	(dwarf2_get_die_type): New function.
	* dwarf2loc.c (dwarf_expr_get_base_type): New function.
	(allocate_piece_closure): Acquire reference to values.
	(read_pieced_value): Update for value-based expressions.
	(write_pieced_value): Likewise.
	(free_pieced_value_closure): Call value_free as needed.
	(dwarf2_evaluate_loc_desc_full): Set get_base_type field.
	Update for value-based expressions.
	* dwarf2loc.h (dwarf2_get_die_type): Declare.
	* dwarf2expr.h (struct dwarf_stack_value) <value>: Change type.
	<get_base_type>: New field.
	(struct dwarf_expr_piece) <v.value>: Change type.
	<v.regno>: New field.
	(struct dwarf_expr_context) <mark>: New field.
	(dwarf_expr_piece, dwarf_expr_fetch): Update.
	(dwarf_expr_pop, dwarf_expr_push): Remove.
	(dwarf_expr_push_address): Declare.
	* dwarf2expr.c (dwarf_arch_cookie): New global.
	(struct dwarf_gdbarch_types): New.
	(dwarf_gdbarch_types_init, dwarf_expr_address_type): New
	functions.
	(dwarf_expr_push): Change type of 'value' argument.  Update.  Now
	static.
	(dwarf_expr_push_address): New function.
	(dwarf_expr_pop): Now static.
	(dwarf_expr_fetch): Change return type.
	(dwarf_require_integral): New function.
	(dwarf_expr_fetch): Simplify.
	(add_piece): Update.
	(base_types_equal_p, dwarf_get_base_type, get_unsigned_type): New
	functions.
	(execute_stack_op) <sign_ext>: Remove.
	Use values for DWARF stack.
	<DW_OP_GNU_const_type, DW_OP_GNU_deref_type,
	DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>:
	New cases.
	(_initialize_dwarf2expr): New function.
	(add_piece): Update.
	(new_dwarf_expr_context): Set new field.
	(free_dwarf_expr_context): Call value_free_to_mark.
	* dwarf2-frame.c (no_base_type): New function.
	(execute_stack_op): Set get_base_type field.  Update.
gdb/testsuite
	* gdb.dwarf2/typeddwarf.S: New file.
	* gdb.dwarf2/typeddwarf.c: New file.
	* gdb.dwarf2/typeddwarf.exp: New file.
2011-05-12 17:40:55 +00:00
Tom Tromey e8d28ef4f3 * dwarf2read.c (read_common_block): Fix formatting. 2011-05-12 15:59:46 +00:00
Kwok Yeung d248b706a3 Add support for enabling and disabling tracepoints while a trace
experiment is still running.

gdb/
	* breakpoint.c (disable_breakpoint): Disable all locations
	associated with a tracepoint on target if a trace experiment is
	running.
	(disable_command): Disable a specific tracepoint location on target if
	a trace	experiment is running.
	(do_enable_breakpoint): Enable all locations associated with a
	tracepoint on target if a trace experiment is running.
	(enable_command) Enable a specific tracepoint location on target if a
	trace experiment is running.
	* target.c (update_current_target): Add INHERIT and de_fault clauses for
	to_supports_enable_disable_tracepoint, to_enable_tracepoint and
	to_disable_tracepoint.
	* target.h: Add declaration of struct bp_location.
	(struct target_ops): Add new functions
	to_supports_enable_disable_tracepoint, to_enable_tracepoint and
	to_disable_tracepoint to target operations.
	(target_supports_enable_disable_tracepoint): New macro.
	(target_enable_tracepoint): New macro.
	(target_disable_tracepoint): New macro.
	* remote.c (struct remote_state): Add new field.
	(remote_enable_disable_tracepoint_feature): New.
	(remote_protocol_features): Add new entry.
	(remote_supports_enable_disable_tracepoint): New.
	(remote_enable_tracepoint): New.
	(remote_disable_tracepoint): New.
	(init_remote_ops): Add remote_enable_tracepoint,
	remote_disable_tracepoint and remote_supports_enable_disable_tracepoint
	to remote operations.
	* tracepoint.c (start_tracing): Allow tracing to start without any
	tracepoints enabled with just a warning if they can be re-enabled
	later.
	* NEWS: Add news item for the new behaviour of the enable and disable
	GDB commands when applied to tracepoints.
	Add news items for the new remote packets QTEnable and QTDisable.

gdb/doc/
	* gdb.texinfo: Document change in the behaviour of the enable and
	disable GDB commands when applied to tracepoints.
	Document the EnableDisableTracepoints remote stub feature.
	Document QTEnable and QTDisable in the list of tracepoint packets.

gdb/gdbserver/
	* server.c (handle_query): Add EnableDisableTracepoints to the list
	of supported features.
	* tracepoint.c (clear_installed_tracepoints): Uninstall	disabled
	tracepoints.
	(cmd_qtenable_disable): New.
	(cmd_qtstart): Install tracepoints even if disabled.
	(handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
	receiving a QTEnable or QTDisable packet.
	(gdb_collect): Skip data collection if fast tracepoint is disabled.
	(ust_marker_to_static_tracepoint): Do not ignore disabled static
	tracepoints.
	(gdb_probe): Skip data collection if static tracepoint is disabled.
2011-05-12 12:09:17 +00:00
Marek Polacek 10483e8e4e Fix races in gdb.mi/mi-basics.exp 2011-05-12 07:13:23 +00:00
gdbadmin 9e26411c96 *** empty log message *** 2011-05-12 00:00:03 +00:00
Jan Kratochvil cc88a640ca Imported readline 6.2, and upstream patch 001.
[patch 0/3] readline-6.2 rebase
http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html
[patch 1/3] readline-6.2: Merge of already posted patches
http://sourceware.org/ml/gdb-patches/2011-05/msg00004.html
	=
	[Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated
	http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html
	[Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html
	[Bug-readline] [patch] Makefile.in htm<->html
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html
	Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html
	[Bug-readline] [patch] Remove . from the VPATH directive
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html
	Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff:
	http://sourceware.org/ml/gdb/2011-04/msg00002.html
	Jan Kratochvil's patch for FSF GDB tree local-specific changes:
	http://sourceware.org/ml/gdb/2011-04/msg00006.html
	Preservation of existing ChangeLog.gdb files, their updates.
[patch 2/3] readline-6.2: Workaround "ask" regression
http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html
[patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.
http://sourceware.org/ml/gdb-patches/2011-05/msg00006.html
[patch 4/3] readline-6.2: Substitute inc-hist.texinfo
http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html

readline/
	Workaround gdb.base/completion.exp regression on readline-6.2.
	* complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK.

	Imported readline 6.2, and upstream patch 001.
	* configure: Regenerate.

readline/doc/
	* hsuser.texi (Using History Interactively): Disable !BashFeatures
	@defcodeindex.  Make the `Programming with GNU History' reference
	external.
	* inc-hist.texinfo: Remove.

	Imported readline 6.2, and upstream patch 001.

readline/examples/
	Imported readline 6.2, and upstream patch 001.

readline/examples/rlfe/
	Imported readline 6.2, and upstream patch 001.

gdb/
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac <--with-system-readline> (for readline_echoing_p):
	Remove the test.
	* tui/tui-io.c (tui_old_readline_echoing_p): Rename to ...
	(tui_old_rl_echoing_p): ... here.
	(tui_setup_io): Rename extern declaration readline_echoing_p to
	_rl_echoing_p.  Adjust assignments for the both renames.

gdb/doc/
	* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
	hsuser.texi.
	* gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and
	comment to hsuser.texi.  Change rluser.texi name in the comment.
2011-05-11 23:38:44 +00:00
Thiago Jung Bauermann 1f84b6196b * symtab.c (lookup_symtab): Run cleanup before returning. 2011-05-11 18:29:01 +00:00
Tom Tromey 74ac6d431c * dwarf2read.c (handle_data_member_location): New function.
(dwarf2_add_field): Use it.
	(read_common_block): Likewise.
2011-05-11 17:25:41 +00:00
Jan Kratochvil faf067f1a3 gdb/testsuite/
* lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers.
	(gdb_touch_execfile): Remove catch wrappers.  New variable time.
	Replace `file copy' and `file rename' by `file mtime'.  Twice.
2011-05-11 09:11:17 +00:00
Jan Kratochvil 7ff911a38f gdb/testsuite/
* gdb.base/readline-ask.c: New file.
	* gdb.base/readline-ask.exp: New file.
	* gdb.base/readline-ask.inputrc: New file.
2011-05-11 05:01:36 +00:00
Jan Kratochvil 5488dafb5a gdb/
Make addrs->SECTINDEX always defined.
	* symfile.c (relative_addr_info_to_section_offsets): Check for
	SECTINDEX -1, not for zero ADDR.
	(addrs_section_compar): Remove checking for invalid SECTINDEX.
	(addr_info_make_relative): Set SECTINDEX to -1 for unmatched entries.
	* symfile.h (struct section_addr_info) <sectindex>: Update the comment
	on its validity.
2011-05-11 04:56:08 +00:00
gdbadmin fc5303d011 *** empty log message *** 2011-05-11 00:00:32 +00:00
Doug Evans 2471d0083c * linux-thread-db.c: Whitespace cleanup.
(try_thread_db_load_1): Fix comment.
2011-05-10 18:45:22 +00:00
Doug Evans 84e578fbe6 * linux-thread-db.c (set_libthread_db_search_path): New function.
(_initialize_thread_db): Add setter for libthread-db-search-path.

	gdbserver/
	* thread-db.c (thread_db_handle_monitor_command): Handle elided path.

	doc/
	* gdb.texinfo (Threads): If an empty path is provided for
	libthread-db-search-path it is reset to its default value.
	(Server): Ditto.
2011-05-10 16:53:23 +00:00
gdbadmin 6592a5d8f0 *** empty log message *** 2011-05-10 00:00:33 +00:00
Doug Evans 478aac75e4 * NEWS: Mention --with-iconv-bin.
* configure.ac: New option --with-iconv-bin.
	* configure: Regenerate.
	* config.in: Regenerate.
	* defs.h (relocate_gdb_directory): Declare.
	* main.c (relocate_gdb_directory): Renamed from relocate_directory,
	removed progname parameter, and exported.  All callers updated.
	* charset.c (find_charset_names): Use --with-iconv-bin if specified.

	doc/
	* gdb.texinfo (Requirements): Fix typo.  Mention --with-iconv-bin.
2011-05-09 21:49:57 +00:00
Doug Evans 673c2bbeab * linux-nat.c (lin_lwp_attach_lwp): For !WIPSTOPPED case,
adding missing call to restore_child_signals_mask.
2011-05-09 18:43:56 +00:00
Pedro Alves e4c8541fca 2011-05-09 Pedro Alves <pedro@codesourcery.com>
* inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap'
	parameter.
	* infrun.c (proceed, start_remote): Adjust.
	(wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter,
	and adjust to not handle it.
	* solib-irix.c (irix_solib_create_inferior_hook): Adjust.
	* solib-osf.c (osf_solib_create_inferior_hook): Adjust.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
	* solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.
	* windows-nat.c (do_initial_windows_stuff): Adjust.
	* infcmd.c (attach_command): Adjust.
	(notice_new_inferior): Adjust.
2011-05-09 14:25:37 +00:00
gdbadmin 8393bfa9fe *** empty log message *** 2011-05-09 00:00:02 +00:00
gdbadmin 3050466aa9 *** empty log message *** 2011-05-08 00:00:03 +00:00
gdbadmin 290421cd5b *** empty log message *** 2011-05-07 00:00:33 +00:00
Ulrich Weigand a536c6d7e6 ChangeLog:
* ppc-linux-tdep.c (ppu2spu_prev_register): Handle pseudo registers.
	(ppu2spu_unwind_register): Mark pseudo registers unavailable.
	* spu-tdep.c (op_selb): Use correct value.

testsuite/ChangeLog:

	* gdb.cell/bt.exp: Delete breakpoints before running to signal
	to avoid race condition.
	* gdb.cell/coremaker.c: Use small stack size.
	* gdb.cell/ea-standalone.exp: Use file name without path as
	argument to c_to.
	* gdb.cell/fork.exp: Allow other output when continuing to end.
2011-05-06 20:48:48 +00:00
Ulrich Weigand 7845b0133d * spu-linux-nat.c (spu_symbol_file_add_from_memory): Add NULL
"parent" parameter to symbol_file_add_from_bfd call.
2011-05-06 19:51:12 +00:00
Thiago Jung Bauermann 9c06b0b428 2011-05-06 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Implement support for PowerPC BookE masked watchpoints.

gdb/
	* NEWS: Mention masked watchpoint support.  Create "Changed commands"
	section.
	* breakpoint.h (struct breakpoint_ops) <works_in_software_mode>: New
	method.  Initialize to NULL in all existing breakpoint_ops instances.
	(struct breakpoint) <hw_wp_mask>: New field.
	* breakpoint.c (is_masked_watchpoint): Add prototype.
	(update_watchpoint): Don't set b->val for masked watchpoints.  Call
	breakpoint's breakpoint_ops.works_in_software_mode if available.
	(watchpoints_triggered): Handle the case of a hardware masked
	watchpoint trigger.
	(watchpoint_check): Likewise.
	(works_in_software_mode_watchpoint): New function.
	(insert_masked_watchpoint, remove_masked_watchpoint)
	(resources_needed_masked_watchpoint)
	(works_in_software_mode_masked_watchpoint, print_it_masked_watchpoint)
	(print_one_detail_masked_watchpoint, print_mention_masked_watchpoint)
	(print_recreate_masked_watchpoint, is_masked_watchpoint): New
	functions.
	(masked_watchpoint_breakpoint_ops): New structure.
	(watch_command_1): Check for the existence of the `mask' parameter.
	Set b->ops according to the type of hardware watchpoint being created.
	* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint)
	(ppc_linux_remove_mask_watchpoint)
	(ppc_linux_masked_watch_num_registers): New functions.
	(_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint,
	to_remove_mask_watchpoint and to_masked_watch_num_registers.
	* target.c (update_current_target): Mention to_insert_mask_watchpoint,
	to_remove_mask_watchpoint, and to_masked_watch_num_registers.
	(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
	(target_masked_watch_num_registers): New functions.
	* target.h (struct target_ops) <to_insert_mask_watchpoint>,
	<to_remove_mask_watchpoint>, <to_masked_watch_num_registers>: New
	methods.
	(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
	(target_masked_watch_num_registers): Add prototypes.

gdb/doc/
	* gdb.texinfo (Set Watchpoints): Document mask parameter.
	(PowerPC Embedded): Mention support of masked watchpoints.
2011-05-06 18:46:33 +00:00
Jan Kratochvil d472a4264b gdb/testsuite/
* gdb.threads/corethreads.c: New file.
	* gdb.threads/corethreads.exp: New file.
2011-05-06 16:03:51 +00:00
Jan Kratochvil 774094b876 gdb/testsuite/
* gdb.threads/gcore-thread.exp (objfile, opts): New variables.
	Try to compile the test using -Wl,-z,norelro first.
	(load_core): New variable libthread_db_seen, initialize it.
	(zeroed-threads cannot be listed): Protect it by XFAIL on
	!$libthread_db_seen.
2011-05-06 16:01:40 +00:00
Jan Kratochvil 8be455d765 gdb/
PR 12573
	* dwarf2read.c (struct dwarf2_cu): New field has_loclist.
	(producer_is_gcc_ge_4_0): New function.
	(process_full_comp_unit): Set also symtab->locations_valid.  Move the
	symtab->language code.
	(var_decode_location): Set cu->has_loclist.
	* symtab.c (skip_prologue_sal): New variables saved_pc, force_skip and
	skip.  Intialize force_skip from locations_valid.  Move the prologue
	skipping code into two passes.
	* symtab.h (struct symtab): Make the primary field a bitfield.  New
	field locations_valid.

gdb/testsuite/
	PR 12573
	* gdb.dwarf2/dw2-skip-prologue.S: New file.
	* gdb.dwarf2/dw2-skip-prologue.c: New file.
	* gdb.dwarf2/dw2-skip-prologue.exp: New file.
2011-05-06 15:06:49 +00:00
Jan Kratochvil d8228535f5 gdb/
* c-exp.y (qualified_name): Call destructor_name_p with $1.type.
	(classify_inner_name): Call cp_lookup_nested_type with
	yylval.tsym.type.
	* cp-namespace.c (cp_lookup_nested_type): New variable
	saved_parent_type.  Call CHECK_TYPEDEF for parent_type.  Call
	type_name_no_tag_or_error with saved_parent_type.
	* dwarf2read.c (load_partial_dies): Read in any children of
	DW_TAG_typedef with complaint in such case.
	* gdbtypes.c (type_name_no_tag_or_error): New function.
	* gdbtypes.h (type_name_no_tag_or_error): New prototype.
	* valops.c (destructor_name_p): New comment for parameter type.  Remove
	type const.  Make dname and cp const.  Call type_name_no_tag_or_error.
	* value.h (destructor_name_p): Remove type const.
2011-05-06 14:12:18 +00:00
Jan Kratochvil 1976171a47 gdb/
* symtab.c (compare_symbol_name): New function.
	(completion_list_add_name, expand_partial_symbol_name): Call it,
	remove the variable ncmp.
	(default_make_symbol_completion_list_break_on): Reduce SYM_TEXT_LEN,
	gdb_assert it.

gdb/testsuite/
	* gdb.cp/psymtab-parameter.cc: New file.
	* gdb.cp/psymtab-parameter.exp: New file.
2011-05-06 13:47:07 +00:00
Jan Kratochvil 7db6f30f9d gdb/testsuite/
Fix a race.
	* gdb.cp/static-print-quit.exp (print c): Split to ...
	(print c - <return>, print c - q <return>, print c - to quit):
	... these.  Make the testfile untested on gdb-7.1.
2011-05-06 13:38:35 +00:00
gdbadmin 7eb9292170 *** empty log message *** 2011-05-06 00:00:03 +00:00
Thiago Jung Bauermann a9634178ec Demote to sw watchpoint only in update_watchpoint.
* breakpoint.c (update_watchpoint): Change between software and
	hardware watchpoint for all kinds of watchpoints, not just
	read/write ones.  Determine b->exact value here instead of
	in watch_command_1.  Error out if there are not enough resources
	for a read or access hardware watchpoint.
	(watch_command_1): Remove logic of checking whether there are
	enough resources available, since update_watchpoint will do that
	work now.  Don't set b->exact here.  Catch exceptions thrown by
	update_watchpoint and delete the watchpoint.
	(can_use_hardware_watchpoint): Remove exact_watchpoints argument.
	Use target_exact_watchpoints instead.
	(delete_breakpoint): Notify observers only if deleted watchpoint
	has a breakpoint number assigned to it.
2011-05-05 22:52:10 +00:00
Janis Johnson 85161e9e44 fix typo 2011-05-05 16:31:05 +00:00
Janis Johnson 56744f0ad5 * lib/gdb.exp (exec_target_file, exec_symbol_file,
gdb_rename_execfile, gdb_touch_execfile): New.
	* gdb.base/reread.exp: Use new procs to handle multiple
	exec files.
2011-05-05 16:29:58 +00:00
Janis Johnson 4c67c79814 * MAINTAINERS: Add myself as a write-after-approval maintainer. 2011-05-05 16:26:25 +00:00
Jerome Guitton a3fcb948d3 2011-05-05 Jerome Guitton <guitton@adacore.com>
* i386-tdep.c (i386_in_stack_tramp_p, i386_stack_tramp_frame_sniffer):
	New functions.
	(i386_stack_tramp_frame_unwind): New static global.
	(i386_match_pattern): New function, extracted from i386_match_insn.
	(i386_match_insn): Use i386_match_pattern.
	(i386_match_insn_block): New function.
	(i386_tramp_chain_in_reg_insns)
	(i386_tramp_chain_on_stack_insns): New static variables.
	(i386_gdbarch_init): Add i386_stack_tramp_frame_unwind to list
	of unwinders.
2011-05-05 15:57:35 +00:00
Yao Qi 0c51be18c4 2011-05-05 Yao Qi <yao@codesourcery.com>
* gdb.arch/arm-disp-step.S(test_ldr_literal): New.
	(test_adr_32bit, test_pop_pc): New.
	* gdb.arch/arm-disp-step.exp (test_ldr_literal): New.
	(test_adr_32bit, test_pop_pc): New.
2011-05-05 02:51:28 +00:00
gdbadmin 6793b8f689 *** empty log message *** 2011-05-05 00:00:03 +00:00
Doug Evans 71f55dd81f * linux-low.c (linux_join): Skip process lookup.
* spu-low.c (spu_join): Ditto.
	* server.c (join_inferiors_callback): Delete.
	(process_serial_event): For 'D' packet (detach) call join_inferior
	directly.
2011-05-04 20:20:12 +00:00
Joseph Myers 4d393d60c4 gdb:
* configure.host (xscale*): Don't handle target.
	* configure.tgt (thumb*-*-* | strongarm*-*-* | xscale-*-*): Don't
	handle targets.

gdb/gdbserver:
	* README: Don't mention xscale*-*-linux*.
	* configure.srv (xscale*-*-linux*): Don't handle target.

gdb/testsuite:
	* gdb.base/a2-run.exp (strongarm-*-coff): Don't handle target.
	* gdb.base/float.exp (xscale*-*-*, strongarm*-*-*): Don't handle
	targets.
	* gdb.base/long_long.exp (xscale*-*-*, strongarm*-*-*): Don't
	handle targets.

sim:
	* configure.tgt (thumb*-*-* | strongarm*-*-* | xscale-*-*): Don't
	handle targets.
	* configure: Regenerate.

sim/testsuite:
	* configure: Regenerate.
	* sim/arm/allinsn.exp (xscale*-*-*): Don't handle target.
	* sim/arm/misc.exp (thumb*-*-*, xscale*-*-*): Don't handle
	targets.
	* sim/arm/iwmmxt/iwmmxt.exp: Test for arm*-*-* instead of
	xscale*-*-*.
	* sim/arm/thumb/allthumb.exp (thumb*-*-*): Don't handle target.
	* sim/arm/xscale/xscale.exp: Test for arm*-*-* instead of
	xscale*-*-*.
2011-05-04 19:28:16 +00:00
Jan Kratochvil 8ffd0459d2 gdb/testsuite/
* gdb.base/completion.exp (complete help info wat): Rename to ...
	(complete 'help info wat'): ... here.
	Remove all `-re ".*' and `-re "^.*' redundant regexes.
	(complete 'p 'arg', complete (2) 'p 'arg'): Remove redundant backslash.
2011-05-04 14:46:17 +00:00
Pedro Alves 8e28d80473 2011-05-04 Pedro Alves <pedro@codesourcery.com>
* gdb.base/completion.exp: Use gdb_test_multiple instead of
	gdb_test and explicit $gdb_prompt/timeout matches.
2011-05-04 14:40:42 +00:00
Yao Qi 3eb2ef34ff 2011-05-04 Yao Qi <yao@codesourcery.com>
* gdb.arch/arm-disp-step.S: Fix usage of macros __thumb__
	and __thumb2__.
2011-05-04 06:40:28 +00:00
Yao Qi f70bd40b64 2011-05-04 Yao Qi <yao@codesourcery.com>
* gdb_wait.h: remove WAITTYPE and WCOREDUMP.
2011-05-04 06:28:45 +00:00
gdbadmin 7efa8b093e *** empty log message *** 2011-05-04 00:00:32 +00:00
Marek Polacek aaaf81a302 Fix races in gdb.base/pr10179.exp. 2011-05-03 18:02:00 +00:00
Joel Brobecker dd3295eed0 Revert "elfread.c (elf_symtab_read): Stop memory leak"
It turns out that this change is not correct, and it causes a crash
on sparc-solaris while trying to load ld.so.  This is because the
memory is actually still referenced after elf_symtab_read completes.

gdb/ChangeLog:

        * elfread.c (elf_symtab_read): Revert the previous change
        that tried to stop a memory leak.
2011-05-03 16:22:39 +00:00
Joel Brobecker 9ed350ad08 Fix uses of litteral `GDB' in `In Memoriam' appendix.
@value{GDBN} should be used in place of GDB, so this patch fixes it.

gdb/doc/ChangeLog:

        * gdb.texinfo (In Memoriam): Replace litteral uses of `GDB' with
        `@value{GDBN}'.
2011-05-03 15:18:10 +00:00
Joel Brobecker 4ceed12377 new `In Memoriam' appendix in GDB Manual
This change removes the dedication of the manual to Fred Fish.
It also creates a new `In Memoriam' appendix, where Fred Fish
and Michael Snyder are mentioned.

gdb/doc/ChangeLog:

        * gdb.texinfo (titlepage): Remove dedication.
        (In Memoriam): New appendix.
2011-05-03 15:09:01 +00:00
Pierre Muller 90375a0e4d * nto-tdep.c (nto_target): Replace deprecated call to
cygwin_conv_to_posix_path functions by cygwin_conv_path calls.
2011-05-03 08:46:06 +00:00
Jan Kratochvil d07205c2f7 gdb/
Fix false GCC warning.
	* breakpoint.c (do_enable_breakpoint): Initialize orig_enable_state.
2011-05-03 07:29:17 +00:00
Thiago Jung Bauermann 1e718ff1cc * breakpoint.c (update_watchpoint): Move code to change
the enable state of breakpoint from here ...
	(do_enable_breakpoint): ... to here.
2011-05-03 05:02:54 +00:00
gdbadmin c22cf4aea8 *** empty log message *** 2011-05-03 00:00:03 +00:00
Pedro Alves c4cbc0dffd 2011-05-02 Pedro Alves <pedro@codesourcery.com>
PR testsuite/12649
	Fix races.

	* gdb.base/completion.exp: Remove all sleep calls.  Remove
	unnecessary regexs.  Don't explicitly expect anything after the
	prompt.  Eat the prompt if necessary.
2011-05-02 17:52:28 +00:00
Edjunior Barbosa Machado b4cbb4a365 * gdb.opt/inline-cmds.exp: Adjust checks with "finish" command to
accept to show the caller line again as well as the line after.
2011-05-02 17:07:10 +00:00
Paul Pluzhnikov f33edef842 Properly TABify ChangeLog; take 2 2011-05-02 00:21:28 +00:00
Paul Pluzhnikov 7829026487 Properly TABify ChangeLog 2011-05-02 00:18:41 +00:00
gdbadmin c73f336eb9 *** empty log message *** 2011-05-02 00:00:33 +00:00
gdbadmin eff750b8ca *** empty log message *** 2011-05-01 00:00:04 +00:00
gdbadmin a432eb7e3d *** empty log message *** 2011-04-30 00:00:33 +00:00
Tom Tromey 35bef4fd1d 2011-04-26 Andrew Gontarek <andrewg@cray.com>
* valprint.c (val_print_array_elements): Fixed poor performance
       of printing very large arrays with repeat_count_threshold set
       to unlimited.  New comment.
2011-04-29 19:23:39 +00:00
Tom Tromey 38a714bb6f * mi/mi-parse.c (mi_parse): Remove incorrect sizeof.
(mi_parse): Likewise.
	* breakpoint.c (break_range_command): Use sizeof char*, not
	char**.
	(create_breakpoint): Likewise.
	(parse_breakpoint_sals): Likewise.
2011-04-29 18:44:15 +00:00
Pedro Alves eb73ad1353 * linux-nat.c (linux_child_remove_fork_catchpoint)
(linux_child_remove_vfork_catchpoint)
	(linux_child_remove_exec_catchpoint): New functions.
	(linux_target_install_ops): Install them.
2011-04-29 15:54:12 +00:00
Phil Muldoon d65aec65d9 2011-04-29 Phil Muldoon <pmuldoon@redhat.com>
PR mi/12531

	* varobj.c (install_default_visualizer): Do not install a
	visualizer if the varobj is CPLUS_FAKE_CHILD.
	(construct_visualizer): Likewise.

2011-04-29  Phil Muldoon  <pmuldoon@redhat.com>

	PR mi/12531

	* gdb.python/py-mi.exp: Add CPLUS_FAKE_CHILD tests and a C++
	compile target.
	* gdb.python/py-prettyprint.exp: Add C++ object for
	CPLUS_FAKE_CHILD test.
2011-04-29 12:45:46 +00:00
gdbadmin b236bd73c5 *** empty log message *** 2011-04-29 00:00:03 +00:00
Jan Kratochvil 165195f46b gdb/
* symtab.c (expand_partial_symbol_name): New variable NCMP.  Support
	case insensitive comparison.
2011-04-28 17:37:06 +00:00
Ulrich Weigand 3085278312 gdb/
* infrun.c (proceed): Revert previous change.
	(resume): Instead, handle the case of signal delivery while stepping
	off a breakpoint location here, and only if software single-stepping
	is used.  Handle nested signals.

	gdb/testsuite/
	* gdb.base/signest.exp: New file.
	* gdb.base/signest.c: Likewise.
2011-04-28 15:53:00 +00:00
Jan Kratochvil c7b1f0d9dc gdb/testsuite/
* lib/mi-support.exp (mi_expect_stop) <stopped at wrong place>: Accept
	thread and breakpoint notifications.
2011-04-28 07:31:29 +00:00
Yao Qi 7ff120b4bf 2011-04-28 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (copy_unmodified): Rename to ...
	(arm_copy_unmodified): .. this.  New.
	(copy_preload): Move common part to ...
	(install_preload): .. this.  New.
	(arm_copy_preload): New.
	(copy_preload_reg): Move common part to ...
	(install_preload_reg): ... this.  New.
	(arm_copy_preload_reg): New.
	(copy_b_bl_blx): Move common part to ...
	(install_b_bl_blx): .. this.  New.
	(arm_copy_b_bl_blx): New.
	(copy_bx_blx_reg): Move common part to ...
	(install_bx_blx_reg): ... this. New.
	(arm_copy_bx_blx_reg): New.
	(copy_alu_reg): Move common part to ...
	(install_alu_reg): ... this.  New.
	(arm_copy_alu_reg): New.
	(copy_alu_shifted_reg): Move common part to ...
	(install_alu_shifted_reg): ... this.  New.
	(copy_ldr_str_ldrb_strb): Move common part to ...
	(install_ldr_str_ldrb_strb): ... this.  New.
	(arm_copy_ldr_str_ldrb_strb): New.
	(copy_copro_load_store): Move some common part to ...
	(install_copy_copro_load_store): ... this.  New.
	(arm_copy_copro_load_store): New.
	(copy_svc): Delete.
	(arm_copy_svc): Renamed from copy_svc.
	(copy_undef): Delete.
	(arm_copy_undef): Renamed from copy_undef.
	(decode_ext_reg_ld_st): Delete.
	(arm_decode_ext_reg_ld_st): Renamed from decode_ext_reg_ld_st.
	(decode_svc_copro): Delete.
	(arm_decode_svc_copro): Renamed from decode_svc_copro.
	(copy_copro_load_store, copy_alu_imm): update callers.
	(copy_extra_ld_st, copy_block_xfer): Likewise.
	(decode_misc_memhint_neon, decode_unconditional): Likewise.
	(decode_miscellaneous, decode_dp_misc): Likewise.
	(decode_ld_st_word_ubyte, decode_media): Likewise.
	(decode_b_bl_ldmstm, decode_ext_reg_ld_st): Likewise.
	(decode_svc_copro, decode_misc_memhint_neon): Likewise.
	(decode_unconditional, decode_miscellaneous): Likewise.
	(decode_media, decode_b_bl_ldmstm): Likewise.
	(arm_process_displaced_insn): Likewise..
	(decode_misc_memhint_neon): Delete.
	(arm_decode_misc_memhint_neon): Renamed from decode_misc_memhint_neon.
	(decode_miscellaneous): Delete.
	(arm_decode_miscellaneous): Renamed from decode_miscellaneous.
	(decode_dp_misc): Delete.
	(arm_decode_dp_misc): Renamed from decode_dp_misc.
	(decode_ld_st_word_ubyte): Delete.
	(arm_decode_ld_st_word_ubyte): Renamed from decode_ld_st_word_ubyte.
	(decode_media): Delete.
	(arm_decode_media): Renamed from decode_media.
	(decode_b_bl_ldmstm): Delete.
	(arm_decode_b_bl_ldmstm): Renamed from decode_b_bl_ldmstm.
	(decode_ext_reg_ld_st): Delete.
	(arm_decode_ext_reg_ld_st): Renamed from decode_ext_reg_ld_st.
	(decode_unconditional): Delete.
	(arm_decode_unconditional): Renamed from decode_unconditional.
2011-04-28 04:59:21 +00:00