Commit Graph

26490 Commits

Author SHA1 Message Date
gdbadmin 61d05fada4 *** empty log message *** 2010-04-18 00:00:34 +00:00
Pedro Alves 172240dd22 * ui-file.c (tee_file_isatty): Return whether `tee->one' is a tty,
instead of always false.
2010-04-17 23:56:27 +00:00
Pierre Muller 12ea4b6986 * configure.ac: Use `ws2_32' library for srv_mingw.
* configure: Regenerate.
	* gdbreplay.c: Include winsock2.h instead of winsock.h.
	* remote-utils.c: Likewise.
2010-04-17 20:43:13 +00:00
H.J. Lu ed41462c79 gdb/
2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11511
	* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Support
	orig_rax.

gdb/testsuite/

2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11511
	* gdb.arch/system-gcore.exp: New.
	* gdb.arch/gcore.c: Likewise.
2010-04-17 18:53:46 +00:00
Pedro Alves cc60f2e372 * breakpoint.c (watchpoints_triggered): Use
is_hardware_watchpoint.
	(watchpoints_triggered): Ditto.
	(bpstat_check_location): Use is_watchpoint and
	is_hardware_watchpoint.
	(bpstat_check_watchpoint): Use is_watchpoint and
	is_hardware_watchpoint.
	(bpstat_stop_status): Fix comment.
	(user_settable_breakpoint): Use is_watchpoint.
	(hw_watchpoint_used_count): Use is_hardware_watchpoint.
	(disable_watchpoints_before_interactive_call_start): Use
	is_watchpoint.
	(enable_watchpoints_after_interactive_call_stop): Use
	is_watchpoint.
	(clear_command): Use is_watchpoint.
	(do_enable_breakpoint): Use is_watchpoint.
2010-04-17 18:42:46 +00:00
H.J. Lu f6d1620c59 Define xmltarget_amd64_linux_no_xml only for amd64.
2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	* linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
	if __x86_64__ is defined.
2010-04-17 14:12:31 +00:00
gdbadmin 6cfa03d350 *** empty log message *** 2010-04-17 00:00:05 +00:00
Mike Frysinger cb7db0f2a9 gdb: fdpic/frv: fix shared library loading
The recent change to reload_shared_libraries() broke FDPIC shared libraries as
the solib-frv.c code was implicitly relying on the initial order of calls
(first solib_addr() and then solib_create_inferior_hook()).  It was
maintaining internal state via enable_break{1,2}_done to handle this.

While I could tweak these values a bit more, the original code wasn't terribly
bullet proof -- if during the initial debug you attempted to view shared
libraries, the enable2_break() code would whine about the ldso internal debug
addresses being unfetchable (and would actually attempt to read address 0x8 on
the target).  So I've dropped this implicit dependency on order (i.e.
enable_break1_done) and updated the ldso poking code (i.e. enable_break2) to
silently return when the internal debug address is still set to 0.  It will
remain this way until the ldso gets a chance to initialize at which point the
code will act the same as before.

While I have no way of testing the FRV, the Blackfin FDPIC code is using this
same base in a 100% copy & paste method since we implemented FDPIC the same
way as the FRV guys (I'll address this in the future).  This fix was required
in order to handle shared libraries with Blackfin FDPIC properly, and I see no
reason why it wouldn't also work for FRV (since the uClibc ldso FDPIC code is
the same too and that's really what this is poking).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-16 22:47:42 +00:00
Kevin Buettner d77b48cf13 * m32c-tdep.c (m32c_m16c_address_to_pointer): Print warning
instead of an error if no PLT entry is found.  Return a
	potentially useful result.
	(m32c_m16c_pointer_to_address): Add code to search for function
	address when no .plt entry is found.
2010-04-16 22:46:27 +00:00
Stan Shebs f90824dcbc 2010-04-16 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_variable_command): Run a cleanup.
2010-04-16 18:22:01 +00:00
Pierre Muller 8e64287381 * configure: Regenerate. 2010-04-16 16:22:15 +00:00
Pierre Muller 9b79b476a6 * p-lang.c (pascal_one_char): Do not restrict C to 0..255 range. 2010-04-16 08:12:59 +00:00
Pierre Muller 711e434b39 Support for Windows OS Thread Information Block.
* NEWS: Document new feature.
	* remote.c (PACKET_qGetTIBAddr): New enum element.
	(remote_get_tib_address): New function.
	(init_remote_ops): Set to_get_tib_address field
	to remote_get_tib_address.
	(_initialize_remote): Add add_packet_config_cmd
	for PACKET_qGetTIBAddr.
	* target.c (update_current_target): Set default value for
	new to_get_tib_address field.
	* target.h (target_ops): New field to_get_tib_address.
	(target_get_tib_address): New macro.
	* windows-nat.c (thread_info): Add thread_local_base field.
	(windows_add_thread): Add tlb argument of type 'void *'.
	(fake_create_process): Adapt windows_add_thread call.
	(get_windows_debug_event): Idem.
	(windows_get_tib_address): New function.
	(init_windows_ops): Set to_get_tib_address field
	to remote_get_tib_address.
	(_initialize_windows_nat): Replace info_w32_cmdlist
	initialization by a call to init_w32_command_list.
	(info_w32_command, info_w32_cmdlist): Removed from here...
	to windows-tdep.c file.
	* windows-tdep.h (info_w32_cmdlist): Declare.
	(init_w32_command_list): New external function
	declaration.
	* windows-tdep.c: Add several headers.
	(info_w32_cmdlist): to here, made global.
	(thread_information_32): New struct.
	(thread_information_64): New struct.
	(TIB_NAME): New char array.
	(MAX_TIB32, MAX_TIB64, FULL_TIB_SIZE): New constants.
	(maint_display_all_tib): New static variable.
	(windows_get_tlb_type): New function.
	(tlb_value_read, tlb_value_write): New functions.
	(tlb_value_funcs): New static struct.
	(tlb_make_value): New function.
	(display_one_tib): New function.
	(display_tib): New function.
	(show_maint_show_all_tib):New function.
	(info_w32_command): Moved from windows-nat.c.
	(init_w32_command_list): New function.
	(_initialize_windows_tdep): New function.
	New "maint set/show show-all-tib" command
	New "$_tlb" internal variable.

gdbserver/ChangeLog entry:

	* server.c (handle_query): Handle 'qGetTIBAddr' query.
	* target.h (target_ops): New get_tib_address field.
	* win32-low.h (win32_thread_info): Add thread_local_base field.
	* win32-low.c (child_add_thread): Add tlb argument.
	Set thread_local_base field to TLB.
	(get_child_debug_event): Adapt to child_add_thread change.
	(win32_get_tib_address): New function.
	(win32_target_ops): Set get_tib_address field to
	win32_get_tib_address.
	* linux-low.c (linux_target_ops): Set get_tib_address field to NULL.

doc/ChangeLog entry:

	gdb.texinfo ($_tlb): Document new automatic convinience variable.
	(info w32 thread-information-block): Document new command.
	(qGetTIBAddress): Document new gdbserver query.
	(maint set/show show-all-tib): Document new command.
2010-04-16 07:49:37 +00:00
Joel Brobecker cae3f17bee * tui/tui-regs.c (tui_display_register): Add comment about
a couple of casts.
        * tui/tui-stack.c (tui_show_locator_content): Ditto.
2010-04-16 04:34:31 +00:00
Stan Shebs 2ce6d6bf7c 2010-04-15 Stan Shebs <stan@codesourcery.com>
* frame.c: Include tracepoint.h.
	(get_current_frame): Allow a trace frame to be an alternate source
	of stack frame data.
	* tracepoint.c (tfind_1): Don't try to get current stack frame if
	it won't succeed.
2010-04-16 01:12:07 +00:00
gdbadmin 47edb3fead *** empty log message *** 2010-04-16 00:00:33 +00:00
Pedro Alves 2d6e647aec s/Pedro Alves/Pedro Alves/ 2010-04-15 23:46:11 +00:00
Pedro Alves 8d95cc3b6c Fix date format in one entry. Fix whitespace throughout while there. 2010-04-15 23:43:40 +00:00
Pedro Alves 1a161f722d Remove src/gdb/ from entry. 2010-04-15 22:36:44 +00:00
Pedro Alves 7e559477b1 * ppc-linux-tdep.c (bsd_uthread_solib_loaded): Always pass 0 for
flags.
	* solib-spu.c (spu_solib_loaded): Always pass 0 for flags.
2010-04-15 20:19:24 +00:00
Doug Evans fa33c3cd05 * NEWS: Add entry for python program space support.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-progspace.o.
	(SUBDIR_PYTHON_SRCS): Add py-progspace.c.
	(py-progspace.o): New rule.
	* python/py-prettyprint.c (find_pretty_printer_from_objfiles): New
	function.
	(find_pretty_printer_from_progspace): New function.
	(find_pretty_printer_from_gdb): New function.
	(find_pretty_printer): Rewrite.
	* python/py-progspace.c: New file.
	* python/python-internal.h (program_space): Add forward decl.
	(pspace_to_pspace_object, pspy_get_printers): Declare.
	(gdbpy_initialize_pspace): Declare.
	* python/python.c: #include "progspace.h".
	(gdbpy_get_current_progspace, gdbpy_progspaces): New functions.
	(_initialize_python): Call gdbpy_initialize_pspace.
	(GdbMethods): Add current_progspace, progspaces.

	doc/
	* gdb.texinfo (Python API): Add progspaces section.
	(Selecting Pretty-Printers): Progspace pretty-printers are
	searched too.
	(Progspaces In Python): New section.

	testsuite/
	* gdb.python/py-progspace.c: New file.
	* gdb.python/py-progspace.exp: New file.
2010-04-15 19:54:13 +00:00
Doug Evans 3f7b2faa4b Add -s option to source command.
* NEWS: Document new option.
	* cli/cli-cmds.c (find_and_open_script): Add function comment.
	Delete from_tty and cleanupp args.  Split filep arg into file and
	full_pathp.  New arg search_path.
	(source_script_from_stream): New function.
	(source_script_with_search): New function.
	(source_script): Rewrite.
	(source_command): Parse "-s" option.
	(init_cli_cmds): Add "-s" docs to source command help, and reformat.
	* python/python.c (source_python_script): Make file arg a const char *.
	Don't call fclose, leave for caller.
	* python/python.h (source_python_script): Update.

	testsuite/
	* gdb.base/source-test.gdb: New file.
	* gdb.base/source.exp: Add tests for "source -s".

	doc/
	* gdb.texinfo (Command Files): Add docs for new "source -s" option.
2010-04-15 17:45:57 +00:00
gdbadmin 7a8f71bfab *** empty log message *** 2010-04-15 00:00:33 +00:00
Pedro Alves a86988f21a Avoid rereading shared libraries that haven't changed.
* solib.c (free_so_symbols): New function, from ...
	(free_so): ... here.  Call it.
	(solib_read_symbols): Don't warn here if symbols have already been
	loaded.
	(solib_add): Warn here instead, if a pattern was specified.
	(reload_shared_libraries_1): New.
	(reload_shared_libraries): Rewrite to not fetch the library list.
2010-04-14 23:20:27 +00:00
Doug Evans 589390d6ff fix typo in previous entry 2010-04-14 21:27:01 +00:00
Doug Evans e6d9b9c2fa * source.c (open): Strip DOS drive letter if present before
concatenating string to search path.
2010-04-14 21:22:29 +00:00
Pedro Alves 516ba65938 * objfiles.h (gdb_bfd_close_or_warn): Declare.
* objfiles.c (gdb_bfd_close_or_warn): New.
	* corelow.c: Include objfiles.h
	(core_close): Use gdb_bfd_close_or_warn.
	* elfread.c (build_id_verify): Ditto.
	* exec.c (exec_close, exec_close_1): Ditto.
2010-04-14 17:26:11 +00:00
Pedro Alves 048d532d6e Group errors for many missing shared libraries.
* solist.h (struct so_list): Remove from_tty.
	* solib.c (solib_bfd_open): Return NULL if we failed to open a BFD.
	(solib_map_sections): Take so_list argument.  Return 0 if we
	failed to open a BFD.  Add target sections here.
	(symbol_add_stub): Delete.
	(solib_read_symbols): Inline symbol_add_stub.  Use current flags,
	not from_tty copied from the so_list.  Don't warn a second time
	for a missing library.
	(update_solib_list): Don't save from_tty.  Use TRY_CATCH.  Do not
	add to the section table here.  Print out a single warning for all
	missing libraries.
	* bsd-uthread.c (bsd_uthread_solib_loaded): Always pass 0 for
	flags.
2010-04-14 13:49:53 +00:00
Phil Muldoon 044c0f87fe 2010-04-14 Phil Muldoon <pmuldoon@redhat.com>
* python/py-block.c (gdbpy_block_for_pc): Use i8n to encompass
	error/warning messages.  Capitalize and use complete sentences.
	(blpy_block_syms_iternext): Likewise.
	* python/py-cmd.c (parse_command_name, cmdpy_init): Likewise.
	* python/py-frame.c (FRAPY_REQUIRE_VALID, frapy_block)
	(frame_info_to_frame_object, frapy_read_var)
	(gdbpy_frame_stop_reason_string): Likewise.
	* python/py-lazy-string.c (stpy_convert_to_value)
	(gdbpy_create_lazy_string_object): Likewise.
	* python/py-objfile.c (objfpy_set_printers): Likewise.
	* python/py-prettyprint.c (gdbpy_default_visualizer): Likewise.
	* python/python.c (parameter_to_python): Likewise.
	* python/py-type.c (typy_range, typy_target): Likewise.
	* python/py-value.c (valpy_cast, valpy_length, valpy_getitem)
	(valpy_richcompare, valpy_int, valpy_long, valpy_float): Likewise.
2010-04-14 13:18:55 +00:00
Phil Muldoon 79f283fe85 2010-04-14 Phil Muldoon <pmuldoon@redhat.com>
PR python/11381

	* python/py-prettyprint.c (pretty_print_one_value): Test for
	Py_None.
	(print_string_repr): Test for Py_None.  Set flags accordingly.
	Return value depending on return type.
	(print_children): Take a value indicating whether data was printed
	before this function was called.  Alter output accordingly.
	(apply_val_pretty_printer): Capture return value from
	print_string_repr and pass to print_children.

2010-04-14  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-prettyprint.py (NoStringContainerPrinter): New printer.
	* gdb.python/py-prettyprint.c: Add justchildren struct, typedefs.
	* gdb.python/py-prettyprint.exp: New test for to_string returning None.
	* gdb.python/py-mi.exp: New test for to_string returning None.

2010-04-14  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Pretty Printing): Document behaviour when to_string
	returns None.
2010-04-14 12:02:46 +00:00
H.J. Lu e1caee70ee Correct PR number for PR corefiles/11481. 2010-04-14 00:40:13 +00:00
H.J. Lu b418b5529c Mention PR corefiles/11467. 2010-04-14 00:38:03 +00:00
gdbadmin 83d37c8c77 *** empty log message *** 2010-04-14 00:00:03 +00:00
Mark Kettenis 4ac5d44ece * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended
register note sections.
(i386_linux_sse_regset_sections, i386_linux_avx_regset_sections):
New variables.
(i386_linux_init_abi): Install list of supported register note
sections that matches the target description.
2010-04-13 21:07:16 +00:00
Pedro Alves ad91cd9917 * remote.c (remote_get_noisy_reply): Don't error out on empty
replies.
	(remote_start_remote): Update and merge tracepoints and trace
	state variables as long as the target supports tracepoints.
	(remote_trace_init): Fix prototype.
	(remote_download_trace_state_variable): Validate reply.
	(remote_trace_set_readonly_regions): Fix prototype.
	(remote_trace_start): Fix prototype.  Check for empty reply.
	(remote_get_trace_status): Small cleanup.
	(remote_trace_stop): Fix prototype.  Check for empty reply.
	(remote_trace_find): Check for empty reply.
	(remote_save_trace_data): Validate reply.
	(remote_set_disconnected_tracing): Check for empty reply, and
	validate reply.
	(remote_set_circular_trace_buffer): Ditto.
2010-04-13 16:08:28 +00:00
Pierre Muller ae3bccd49a Suppress unused value warning during compilation.
* tui/tui-regs.c (tui_display_register): Cast wstandout and wstandend
	calls to void.
	* tui/tui-stack.c (tui_show_locator_content): Likewise.
2010-04-13 12:11:10 +00:00
Stan Shebs 523136f211 2010-04-12 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (tfile_xfer_partial): Check read result.
2010-04-13 03:53:50 +00:00
gdbadmin 02067d243b *** empty log message *** 2010-04-13 00:00:33 +00:00
Pedro Alves ef7278ebcc Remove gdb/gdbserver/ line. 2010-04-12 17:46:05 +00:00
Pedro Alves 505106cdc7 gdb/gdbserver/
* linux-low.c (linux_mourn): Also remove the process.
	* server.c (handle_target_event): Don't remove the process here.
	* nto-low.c (nto_mourn): New.
	(nto_target_ops): Install it.
	* spu-low.c (spu_mourn): New.
	(spu_target_ops): Install it.
	* win32-low.c (win32_mourn): New.
	(win32_target_ops): Install it.
2010-04-12 17:39:42 +00:00
Mike Frysinger 0d18d7205b gdb: constify remote files_info
The sim and m32r remote targets declare a local "file" variable and only
assign const strings to it before passing it to a printf() func.  So add
const markings to avoid gcc warnings like:
gdb/remote-sim.c: In function 'gdbsim_files_info':
gdb/remote-sim.c:789: warning: initialization discards qualifiers
	from pointer target type

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-12 16:04:43 +00:00
Richard Earnshaw 3b273a5534 2010-04-12 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* arm-tdep.h (gdb_regnum): Add ARM_FPSCR_REGNUM
	* arm-linux-nat.c (arm_linux_vfp_register_count): New
	variable.
	(fetch_vfp_registers): New function to fetch VFP registers.
	(store_vfp_registers): New function to store VFP registers.
	(arm_linux_fetch_inferior_registers): Add support for VFP
	registers.
	(arm_linux_store_inferior_registers): Likewise.
	(arm_linux_read_description): Likewise.
	(_initialize_arm_linux_nat): Delay initialising iWMMX tdesc
	until we need it.
2010-04-12 13:52:43 +00:00
Pedro Alves e8470a0645 * server.h (buffer_xml_printf): Remove redundant `;'. 2010-04-12 13:51:22 +00:00
Pedro Alves 45ba0d0206 * regcache.c (set_register_cache): Invalidate regcaches before
changing the register cache layout.
	(regcache_invalidate_one): Allow a NULL regcache.
	* linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
	regcaches before changing the register cache layout or the target
	regsets.
2010-04-12 13:25:51 +00:00
H.J. Lu 59e0401339 Avoid unused variable warning on Linux/x86-64.
2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>

	* linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
	variable warning on Linux/x86-64.
2010-04-12 13:18:13 +00:00
Phil Muldoon fc8eb08a3a 2010-04-12 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/py-breakpoint.c: Make result global.
2010-04-12 09:49:35 +00:00
gdbadmin 02063a34cf *** empty log message *** 2010-04-12 00:00:03 +00:00
H.J. Lu 778c709509 Remove the unused variable in amd64-tdep.c.
2010-04-11  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_supply_xstateregset): Remove the unused
	tdep.
	(amd64_collect_xstateregset): Likewise.
2010-04-11 20:20:31 +00:00
Pedro Alves 8336d594d5 GDBserver disconnected tracing support.
* linux-low.c (linux_remove_process): Delete.
	(add_lwp): Don't set last_resume_kind here.
	(linux_kill): Use `mourn'.
	(linux_detach): Use `thread_db_detach', and `mourn'.
	(linux_mourn): New.
	(linux_attach_lwp_1): Adjust comment.
	(linux_attach): last_resume_kind moved the thread_info; adjust.
	(status_pending_p_callback): Adjust.
	(linux_wait_for_event_1): Adjust.
	(count_events_callback, select_singlestep_lwp_callback)
	(select_event_lwp_callback, cancel_breakpoints_callback)
	(db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
	(proceed_one_lwp): Adjust.
	(linux_async): Add debug output.
	(linux_thread_stopped): New.
	(linux_pause_all): New.
	(linux_target_ops): Install linux_mourn, linux_thread_stopped and
	linux_pause_all.
	* linux-low.h (struct lwp_info): Delete last_resume_kind field.
	(thread_db_free): Delete declaration.
	(thread_db_detach, thread_db_mourn): Declare.
	* thread-db.c (thread_db_init): Use thread_db_mourn.
	(thread_db_free): Delete, split in two.
	(disable_thread_event_reporting): New.
	(thread_db_detach): New.
	(thread_db_mourn): New.

	* server.h (struct thread_info) <last_resume_kind>: New field.
	<attached>: Add comment.
	<gdb_detached>: New field.
	(handler_func): Change return type to int.
	(handle_serial_event, handle_target_event): Ditto.
	(gdb_connected): Declare.
	(tracing): Delete.
	(disconnected_tracing): Declare.
	(stop_tracing): Declare.

	* server.c (handle_query) <qSupported>: Report support for
	disconnected tracing.
	(queue_stop_reply_callback): Account for running threads.
	(gdb_wants_thread_stopped): New.
	(gdb_wants_all_threads_stopped): New.
	(gdb_reattached_process): New.
	(handle_status): Clear the `gdb_detached' flag of all processes.
	In all-stop, stop all threads.
	(main): Be sure to leave tfind mode.  Handle disconnected tracing.
	(process_serial_event): If the remote connection breaks, or if an
	exit was forced with "monitor exit", force an event loop exit.
	Handle disconnected tracing on detach.
	(handle_serial_event): Adjust.
	(handle_target_event): If GDB isn't connected, forward events back
	to the inferior, unless the last process exited, in which case,
	exit gdbserver.  Adjust interface.

	* remote-utils.c (remote_open): Don't block in accept.  Instead
	register an event loop source on the listen socket file
	descriptor.  Refactor bits into ...
	(listen_desc): ... this new global.
	(gdb_connected): ... this new function.
	(enable_async_notification): ... this new function.
	(handle_accept_event): ... this new function.
	(remote_close): Clear remote_desc.

	* inferiors.c (add_thread): Set the new thread's last_resume_kind.

	* target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
	New fields.
	(mourn_inferior): Define.
	(target_process_qsupported): Avoid the dangling else problem.
	(thread_stopped): Define.
	(pause_all): Define.
	(target_waitstatus_to_string): Declare.
	* target.c (target_waitstatus_to_string): New.

	* tracepoint.c (tracing): Make extern.
	(disconnected_tracing): New.
	(stop_tracing): Make extern.  Handle tracing stops due to GDB
	disconnecting.
	(cmd_qtdisconnected): New.
	(cmd_qtstatus): Report disconnected tracing status in trace reply.
	(handle_tracepoint_general_set): Handle QTDisconnected.

	* event-loop.c (event_handler_func): Change return type to int.
	(process_event): Bail out if the event handler wants the event
	loop to stop.
	(handle_file_event): Ditto.
	(start_event_loop): Bail out if the event handler wants the event
	loop to stop.

	* nto-low.c (nto_target_ops): Adjust.
	* spu-low.c (spu_wait): Don't remove the process here.
	(spu_target_ops): Adjust.
	* win32-low.c (win32_wait): Don't remove the process here.
	(win32_target_ops): Adjust.
2010-04-11 16:33:56 +00:00
Pedro Alves 5d267c4c70 * regcache.c (realloc_register_cache): Invalidate inferior's
regcache before recreating it.
2010-04-11 01:47:48 +00:00
gdbadmin a18ebeaf85 *** empty log message *** 2010-04-11 00:00:02 +00:00
gdbadmin fcfd64c2cc *** empty log message *** 2010-04-10 00:00:07 +00:00
Jan Kratochvil 26e197f641 gdb/testsuite/
Fix non-GNU make compatibility.
	* Makefile.in ($(TEST_TARGETS)): Conditionalize it by @GMAKE_TRUE@.
2010-04-09 20:50:46 +00:00
Stan Shebs 872906844b 2010-04-09 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_status_mi): Report frames created.

	* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
	Describe the `frames-created' field, tweak grammar.
2010-04-09 20:46:40 +00:00
Stan Shebs 2114d44c8d 2010-04-09 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_dump_command): Include default-collect
	expressions.
2010-04-09 19:34:57 +00:00
Ulrich Weigand 86da934b14 * symtab.c (find_function_start_sal): Never return SAL pointing
before function start address, even if line info is missing.
2010-04-09 15:31:41 +00:00
Pedro Alves d337e9f09e * NEWS: Mention tracepoints support. 2010-04-09 15:26:54 +00:00
Pedro Alves a97153c7f8 gdb/
* tracepoint.c (trace_status_mi): Report disconnected tracing and
	circular trace buffer statuses.

	gdb/doc/
	* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
	Describe the `circular' and `disconnected' fields.
2010-04-09 15:22:09 +00:00
Jan Kratochvil 7a66d6033a gdb/
* config/djgpp/fnchange.lst: Fix typo in translations for
	symbol-without-target_section.exp and symbol-without-target_section.c.
2010-04-09 15:15:05 +00:00
H.J. Lu 5c5dcc1b7a Mention unavailable and invisible registers.
2010-04-09  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (maint print registers): Mention unavailable and
	invisible registers.
2010-04-09 15:12:31 +00:00
Pedro Alves 623ccd7217 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity. 2010-04-09 14:40:48 +00:00
Pedro Alves 2566ad2d88 * breakpoint.c (condition_command): Pass condition expression to
set_breakpoint_condition stripped from breakpoint number.
2010-04-09 13:56:08 +00:00
Phil Muldoon adc368187c 2010-04-09 Phil Muldoon <pmuldoon@redhat.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>
   	    Tom Tromey  <tromey@redhat.com>

	* breakpoint.c (condition_command): Simplify.  Move condition
	setting code to ...
	(set_breakpoint_condition): ... here.  New function.
	* breakpoint.h  (set_breakpoint_condition): Declare.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpoint.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-breakpoint.o): New rule.
	* python/py-breakpoint.c: New file.
	* python/python-internal.h (gdbpy_breakpoints)
	(gdbpy_initialize_breakpoints): Declare.
	(GDB_PY_SET_HANDLE_EXCEPTION) Define.


2010-04-09  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-breakpoint.exp: New File.
	* gdb.python/py-breakpoint.C: Ditto.

2010-04-09  Phil Muldoon  <pmuldoon@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
   	    Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Breakpoints In Python): New Node.
2010-04-09 09:41:43 +00:00
Pedro Alves 219f2f2398 gdb/gdbserver/
* server.h (LONGEST): New.
	(struct thread_info) <while_stepping>: New field.
	(unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
	Declare.
	(initialize_tracepoint, handle_tracepoint_general_set)
	(handle_tracepoint_query, tracepoint_finished_step)
	(tracepoint_was_hit, release_while_stepping_state_list):
	(current_traceframe): Declare.
	* server.c (handle_general_set): Handle tracepoint packets.
	(read_memory): New.
	(write_memory): New.
	(handle_search_memory_1): Use read_memory.
	(handle_query): Report support for conditional tracepoints, trace
	state variables, and tracepoint sources.  Handle tracepoint
	queries.
	(main): Initialize the tracepoints module.
	(process_serial_event): Handle traceframe reads/writes.

	* linux-low.c (handle_tracepoints): New.
	(linux_wait_1): Call it.
	(linux_resume_one_lwp): Handle while-stepping.
	(linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
	(linux_target_ops): Install them.
	* linux-low.h (struct linux_target_ops) <supports_tracepoints>:
	New field.
	* linux-x86-low.c (x86_supports_tracepoints): New.
	(the_low_target). Install it.

	* mem-break.h (delete_breakpoint): Declare.
	* mem-break.c (delete_breakpoint): Make external.

	* target.h (struct target_ops): Add `supports_tracepoints',
	`read_pc', and `write_pc' fields.
	(target_supports_tracepoints): Define.
	* utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
	(phex_nz): New.

	* regcache.h (struct regcache) <registers_owned>: New field.
	(init_register_cache, regcache_cpy): Declare.
	(regcache_read_pc, regcache_write_pc): Declare.
	(register_cache_size): Declare.
	(supply_regblock): Declare.
	* regcache.c (init_register_cache): New.
	(new_register_cache): Use it.
	(regcache_cpy): New.
	(register_cache_size): New.
	(supply_regblock): New.
	(regcache_read_pc, regcache_write_pc): New.

	* tracepoint.c: New.

	* Makefile.in (OBS): Add tracepoint.o.
	(tracepoint.o): New rule.

	gdb/
	* regformats/regdat.sh: Include server.h.  Don't include
	regcache.h.
2010-04-09 03:40:00 +00:00
Stan Shebs 33da3f1cb5 2010-04-08 Stan Shebs <stan@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	* tracepoint.h (struct trace_status): New fields disconnected_tracing
	and circular_buffer.
	(disconnect_tracing): Rename from disconnect_or_stop_tracing.
	* tracepoint.c (trace_status_command): Display target's status for
	disconnected tracing and circular buffer.
	(disconnect_tracing): Rename from disconnect_or_stop_tracing, add
	query for non-disconnected-tracing case, remove the stop_tracing
	call.
	(tfile_open): Clear disconnected and circular buffer status.
	(trace_save): Save disconnected and circular buffer status.
	(parse_trace_status): Parse disconnected and circular buffer status,
	also recognize disconnected as a stop reason.
	* remote.c (remote_set_disconnected_tracing): Only set
	QTDisconnected if the remote end supports disconnected tracing.
	Warn otherwise, if trying to enable disconnected tracing.
	* infcmd.c (detach_command): Update disconnect_tracing call.
	* cli/cli-cmds.c (quit_command): Ditto.

	* gdb.texinfo (Tracepoint Packets): Describe disconn and circular
	trace status fields.
2010-04-09 03:00:58 +00:00
Stan Shebs 64e173680a 2010-04-08 Stan Shebs <stan@codesourcery.com>
* gdb.trace/actions.exp: Clear default-collect.
	* gdb.trace/save-trace.exp: Clear default-collect.
2010-04-09 00:49:59 +00:00
H.J. Lu 4e4d83747c Replace abort with internal_error.
2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* i387-tdep.c (i387_collect_xsave): Replace abort with
	internal_error.
2010-04-09 00:18:52 +00:00
gdbadmin 733e11e71f *** empty log message *** 2010-04-09 00:00:03 +00:00
Stan Shebs ad44314612 2010-04-08 Stan Shebs <stan@codesourcery.com>
* breakpoint.c (default_collect_info): New function.
	(breakpoints_info): Call it.
	(maintenance_info_breakpoints): Ditto.
	(tracepoints_info): Ditto.
2010-04-08 23:13:46 +00:00
H.J. Lu 40936b0de8 Re-indent i387_collect_xsave. 2010-04-08 22:50:34 +00:00
H.J. Lu 3a13a53b43 Support i386 without SSE.
gdb/

2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-linux-nat.c (have_ptrace_getfpxregs): Initialize to -1
	if HAVE_PTRACE_GETFPXREGS is defined.
	(i386_linux_read_description): Set have_ptrace_getfpxregs and
	have_ptrace_getregset to 0 if ptrace PTRACE_GETFPXREGS failed.

	* i386-linux-tdep.c: Include "features/i386/i386-mmx-linux.c"
	(i386_linux_core_read_description): Return tdesc_i386_mmx_linux
	if .reg-xfp section doesn't exist.
	(_initialize_i386_linux_tdep): Call initialize_tdesc_i386_mmx_linux.

	* i386-linux-tdep.h (tdesc_i386_mmx_linux): New.

	* i386-tdep.c: Include "features/i386/i386-mmx.c".
	(i386_go32_init_abi): Set tdesc to tdesc_i386_mmx.
	(i386_validate_tdesc_p): Make org.gnu.gdb.i386.sse optional.  Set
	xcr0 to I386_XSTATE_X87_MASK if SSE isn't available.
	(i386_gdbarch_init): Update comments.
	(_initialize_i386_tdep): Call initialize_tdesc_i386_mmx.

	* common/i386-xstate.h (I386_XSTATE_X87_MASK): New.

	* config/djgpp/fnchange.lst: Add i386 MMX XML files.

	* features/Makefile (i386/i386-mmx-expedite): New.
	(i386/i386-mmx-linux-expedite): Likewise.
	($(outdir)/i386/i386-mmx.dat): Likewise.
	($(outdir)/i386/i386-mmx-linux.dat): Likewise.

	* features/i386/i386-mmx-linux.c: New.
	* features/i386/i386-mmx-linux.xml: Likewise.
	* features/i386/i386-mmx.c: Likewise.
	* features/i386/i386-mmx.xml: Likewise.
	* regformats/i386/i386-mmx-linux.dat: Likewise.
	* regformats/i386/i386-mmx.dat: Likewise.

	* features/Makefile (WHICH): Add i386/i386-mmx and
	i386/i386-mmx-linux.

gdb/doc/

2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (i386 Features): Make org.gnu.gdb.i386.avx
	optional.  Make org.gnu.gdb.i386.avx requires
	org.gnu.gdb.i386.avx.

gdb/gdbserver/

2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
	(i386-mmx.o): New.
	(i386-mmx.c): Likewise.
	(i386-mmx-linux.o): Likewise.
	(i386-mmx-linux.c): Likewise.

	* configure.srv (srv_i386_regobj): Add i386-mmx.o.
	(srv_i386_linux_regobj): Add i386-mmx-linux.o.
	(srv_i386_xmlfiles): Add i386/i386-mmx.xml.
	(srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.

	* linux-x86-low.c (init_registers_i386_mmx_linux): New.
	(x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
	and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2010-04-08 22:32:38 +00:00
Doug Evans 080017175b * source.c (openp): Skip $cdir in PATH.
doc/
	* gdb.texinfo (Command Files): Document that gdb skips $cdir in
	search path, and document that gdb only scans the search path if
	the script's path doesn't specify a directory.
2010-04-08 21:08:40 +00:00
Phil Muldoon f5f8b5baf4 2010-04-08 Phil Muldoon <pmuldoon@redhat.com>
* python/py-lazy-string.c (stpy_convert_to_value): Add i8n to error string.
2010-04-08 10:47:56 +00:00
Phil Muldoon fff5cc649e 2010-04-08 Phil Muldoon <pmuldoon@redhat.com>
PR python/11417

	* python/py-lazy-string.c (stpy_convert_to_value): Check for
          a NULL address.
	  (gdbpy_create_lazy_string_object): Allow strings with a NULL
          address and a zero length.

2010-04-08  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value: Add null string variable.
	  (test_lazy_string): Test zero length, NULL address lazy
	  strings.
2010-04-08 10:28:42 +00:00
Hui Zhu f8c4f48020 2010-04-08 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_process_record): Add support for insn
	rdtsc.
2010-04-08 09:23:06 +00:00
Doug Evans eb5cda8649 * python/python.c (source_python_script): Use ensure_python_env
to prepare environment for script.
2010-04-08 04:57:25 +00:00
gdbadmin 1ad0dc9bb8 *** empty log message *** 2010-04-08 00:00:03 +00:00
H.J. Lu 1570b33e44 Add x86 AVX support to gdbserver.
2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (clean): Updated.
	(i386-avx.o): New.
	(i386-avx.c): Likewise.
	(i386-avx-linux.o): Likewise.
	(i386-avx-linux.c): Likewise.
	(amd64-avx.o): Likewise.
	(amd64-avx.c): Likewise.
	(amd64-avx-linux.o): Likewise.
	(amd64-avx-linux.c): Likewise.

	* configure.srv (srv_i386_regobj): Add i386-avx.o.
	(srv_i386_linux_regobj): Add i386-avx-linux.o.
	(srv_amd64_regobj): Add amd64-avx.o.
	(srv_amd64_linux_regobj): Add amd64-avx-linux.o.
	(srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
	(srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
	(srv_i386_xmlfiles): Add i386/i386-avx.xml.
	(srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
	(srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
	(srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.

	* i387-fp.c: Include "i386-xstate.h".
	(i387_xsave): New.
	(i387_cache_to_xsave): Likewise.
	(i387_xsave_to_cache): Likewise.
	(x86_xcr0): Likewise.

	* i387-fp.h (i387_cache_to_xsave): Likewise.
	(i387_xsave_to_cache): Likewise.
	(x86_xcr0): Likewise.

	* linux-arm-low.c (target_regsets): Initialize nt_type to 0.
	* linux-crisv32-low.c (target_regsets): Likewise.
	* linux-m68k-low.c (target_regsets): Likewise.
	* linux-mips-low.c (target_regsets): Likewise.
	* linux-ppc-low.c (target_regsets): Likewise.
	* linux-s390-low.c (target_regsets): Likewise.
	* linux-sh-low.c (target_regsets): Likewise.
	* linux-sparc-low.c (target_regsets): Likewise.
	* linux-xtensa-low.c (target_regsets): Likewise.

	* linux-low.c: Include <sys/uio.h>.
	(regsets_fetch_inferior_registers): Support nt_type.
	(regsets_store_inferior_registers): Likewise.
	(linux_process_qsupported): New.
	(linux_target_ops): Add linux_process_qsupported.

	* linux-low.h (regset_info): Add nt_type.
	(linux_target_ops): Add process_qsupported.

	* linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
	and <sys/uio.h>.
	(init_registers_i386_avx_linux): New.
	(init_registers_amd64_avx_linux): Likewise.
	(xmltarget_i386_linux_no_xml): Likewise.
	(xmltarget_amd64_linux_no_xml): Likewise.
	(PTRACE_GETREGSET): Likewise.
	(PTRACE_SETREGSET): Likewise.
	(x86_fill_xstateregset): Likewise.
	(x86_store_xstateregset): Likewise.
	(use_xml): Likewise.
	(x86_linux_update_xmltarget): Likewise.
	(x86_linux_process_qsupported): Likewise.
	(target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
	(x86_arch_setup): Don't call init_registers_amd64_linux nor
	init_registers_i386_linux here.  Call
	x86_linux_update_xmltarget.
	(the_low_target): Add x86_linux_process_qsupported.

	* server.c (handle_query): Call target_process_qsupported.

	* target.h (target_ops): Add process_qsupported.
	(target_process_qsupported): New.
2010-04-07 18:49:46 +00:00
H.J. Lu c302619d21 Checkin gdb.arch/i386-avx.exp. 2010-04-07 18:47:57 +00:00
H.J. Lu a055a18785 Support amd64 AVX.
gdb/

2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-linux-nat.c: Include "regset.h", "elf/common.h",
	<sys/uio.h> and "i386-xstate.h".
	(PTRACE_GETREGSET): New.
	(PTRACE_SETREGSET): Likewise.
	(have_ptrace_getregset): Likewise.
	(amd64_linux_gregset64_reg_offset): Include 16 upper YMM
	registers.
	(amd64_linux_gregset32_reg_offset): Include 8 upper YMM
	registers.
	(amd64_linux_fetch_inferior_registers): Support PTRACE_GETFPREGS.
	(amd64_linux_store_inferior_registers): Likewise.
	(amd64_linux_read_description): Check and enable AVX target
	descriptions.

	* amd64-linux-tdep.c: Include "regset.h", "i386-linux-tdep.h"
	and "features/i386/amd64-avx-linux.c".
	(amd64_linux_regset_sections): New.
	(amd64_linux_core_read_description): Check and enable AVX
	target description.
	(amd64_linux_init_abi): Set xsave_xcr0_offset.  Call
	set_gdbarch_core_regset_sections.
	(_initialize_amd64_linux_tdep): Call
	initialize_tdesc_amd64_avx_linux.

	* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM): Replace
	AMD64_MXCSR_REGNUM with AMD64_YMM15H_REGNUM.
	(tdesc_amd64_avx_linux): New.
	(amd64_linux_update_xstateregset): Likewise.

	* amd64-tdep.c: Include "features/i386/amd64-avx.c".
	(amd64_ymm_names): New.
	(amd64_ymmh_names): Likewise.
	(amd64_register_name): Likewise.
	(amd64_supply_xstateregset): Likewise.
	(amd64_collect_xstateregset): Likewise.
	(amd64_supply_xsave): Likewise.
	(amd64_collect_xsave): Likewise.
	(AMD64_NUM_REGS): Removed.
	(amd64_dwarf_reg_to_regnum): Return %ymmN register number for
	%xmmN if AVX is available.
	(amd64_pseudo_register_name): Support pseudo YMM registers.
	(amd64_regset_from_core_section): Support .reg-xstate section.
	(amd64_init_abi): Set ymmh_register_names, num_ymm_regs
	and ymm0h_regnum.  Call set_gdbarch_register_name.
	(amd64_init_abi): Call initialize_tdesc_amd64_avx.

	* amd64-tdep.h (amd64_regnum): Add AMD64_YMM0H_REGNUM and
	AMD64_YMM15H_REGNUM.
	(AMD64_NUM_REGS): New.
	(amd64_supply_xsave): Likewise.
	(amd64_collect_xsave): Likewise.
	(amd64_register_name): Removed.
	(amd64_register_type): Likewise.

gdb/testsuite/

2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.arch/i386-avx.c: New.
	* gdb.arch/i386-avx.exp: Likewise.

	* gdb.arch/i386-cpuid.h: Updated from gcc 4.4.
2010-04-07 18:46:50 +00:00
H.J. Lu 31aeac7844 Support i387 AVX.
2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* i387-tdep.c: Include "i386-xstate.h".
	(XSAVE_XSTATE_BV_ADDR): New.
	(xsave_avxh_offset): Likewise.
	(XSAVE_AVXH_ADDR): Likewise.
	(i387_supply_xsave): Likewise.
	(i387_collect_xsave): Likewise.

	* i387-tdep.h (I387_NUM_YMM_REGS): New.
	(I387_YMM0H_REGNUM): Likewise.
	(I387_YMMENDH_REGNUM): Likewise.
	(i387_supply_xsave): Likewise.
	(i387_collect_xsave): Likewise.
2010-04-07 18:44:57 +00:00
H.J. Lu c131fcee79 Support i386 AVX.
2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-linux-nat.c: Include "regset.h", "elf/common.h",
	<sys/uio.h> and "i386-xstate.h".
	(PTRACE_GETREGSET): New.
	(PTRACE_SETREGSET): Likewise.
	(fetch_xstateregs): Likewise.
	(store_xstateregs): Likewise.
	(GETXSTATEREGS_SUPPLIES): Likewise.
	(regmap): Include 8 upper YMM registers.
	(i386_linux_fetch_inferior_registers): Support XSAVE extended
	state.
	(i386_linux_store_inferior_registers): Likewise.
	(i386_linux_read_description): Check and enable AVX target
	descriptions.

	* i386-linux-tdep.c: Include "regset.h", "i387-tdep.h",
	"i386-xstate.h" and "features/i386/i386-avx-linux.c".
	(i386_linux_regset_sections): Add ".reg-xstate".
	(i386_linux_gregset_reg_offset): Include 8 upper YMM registers.
	(i386_linux_core_read_xcr0): New.
	(i386_linux_core_read_description): Check and enable AVX target
	description.
	(i386_linux_init_abi): Set xsave_xcr0_offset.
	(_initialize_i386_linux_tdep): Call
	initialize_tdesc_i386_avx_linux.

	* i386-linux-tdep.h (I386_LINUX_ORIG_EAX_REGNUM): Replace
	I386_SSE_NUM_REGS with I386_AVX_NUM_REGS.
	(i386_linux_core_read_xcr0): New.
	(tdesc_i386_avx_linux): Likewise.
	(I386_LINUX_XSAVE_XCR0_OFFSET): Likewise.

	* i386-tdep.c: Include "i386-xstate.h" and
	"features/i386/i386-avx.c".
	(i386_ymm_names): New.
	(i386_ymmh_names): Likewise.
	(i386_ymmh_regnum_p): Likewise.
	(i386_ymm_regnum_p): Likewise.
	(i386_xmm_regnum_p): Likewise.
	(i386_register_name): Likewise.
	(i386_ymm_type): Likewise.
	(i386_supply_xstateregset): Likewise.
	(i386_collect_xstateregset): Likewise.
	(i386_sse_regnum_p): Removed.
	(i386_pseudo_register_name): Support pseudo YMM registers.
	(i386_pseudo_register_type): Likewise.
	(i386_pseudo_register_read): Likewise.
	(i386_pseudo_register_write): Likewise.
	(i386_dbx_reg_to_regnum): Return %ymmN register number for
	%xmmN if AVX is available.
	(i386_regset_from_core_section): Support .reg-xstate section.
	(i386_register_reggroup_p): Supper upper YMM and YMM registers.
	(i386_process_record): Replace i386_sse_regnum_p with
	i386_xmm_regnum_p.
	(i386_validate_tdesc_p): Support org.gnu.gdb.i386.avx feature.
	Set ymmh_register_names, num_ymm_regs, ymm0h_regnum and xcr0.
	(i386_gdbarch_init): Set xstateregset.  Set xsave_xcr0_offset.
	Call set_gdbarch_register_name.  Replace I386_SSE_NUM_REGS with
	I386_AVX_NUM_REGS.  Set ymmh_register_names, ymm0h_regnum and
	num_ymm_regs.  Add num_ymm_regs to set_gdbarch_num_pseudo_regs.
	Set ymm0_regnum.
	(_initialize_i386_tdep): Call initialize_tdesc_i386_avx.

	* i386-tdep.h (gdbarch_tdep): Add xstateregset, ymm0_regnum,
	xcr0, xsave_xcr0_offset, ymm0h_regnum, ymmh_register_names and
	i386_ymm_type.
	(i386_regnum): Add I386_YMM0H_REGNUM, and I386_YMM7H_REGNUM.
	(I386_AVX_NUM_REGS): New.
	(i386_xmm_regnum_p): Likewise.
	(i386_ymm_regnum_p): Likewise.
	(i386_ymmh_regnum_p): Likewise.

	* common/i386-xstate.h: New.
2010-04-07 18:43:45 +00:00
H.J. Lu 98adf0f383 Add x86 AVX XML files.
2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>

	* config/djgpp/fnchange.lst: Add x86 AVX XML files.

	* features/Makefile (WHICH): Add i386/i386-avx,
	i386/i386-avx-linux, i386/x86-64-avx and i386/x86-64-avx-linux.
	(i386/i386-avx-expedite): New.
	(i386/i386-avx-linux-expedite): Likewise.
	(i386/x86-64-avx-expedite):Likewise.
	(i386/x86-64-avx-linux-expedite): Likewise.
	($(outdir)/i386/i386-avx.dat): New dependency.
	($(outdir)/i386/i386-avx-linux.dat): Likewise.
	($(outdir)/i386/x86-avx-64.dat): Likewise.
	($(outdir)/i386/x86-64-avx-linux.dat): Likewise.

	* features/i386/32bit-avx.xml: New.
	* features/i386/64bit-avx.xml: Likewise.
	* features/i386/i386-avx-linux.c: Likewise.
	* features/i386/i386-avx-linux.xml: Likewise.
	* features/i386/i386-avx.c: Likewise.
	* features/i386/i386-avx.xml: Likewise.
	* features/i386/x86-64-avx-linux.c: Likewise.
	* features/i386/x86-64-avx-linux.xml: Likewise.
	* features/i386/x86-64-avx.c: Likewise.
	* features/i386/x86-64-avx.xml: Likewise.
	* regformats/i386/i386-avx-linux.dat: Likewise.
	* regformats/i386/i386-avx.dat: Likewise.
	* regformats/i386/x86-64-avx-linux.dat: Likewise.
	* regformats/i386/x86-64-avx.dat: Likewise.
2010-04-07 18:41:49 +00:00
Doug Evans 05159abe96 * top.c (source_file_name): Make const char *.
* top.h (source_file_name): Update.
	* cli/cli-script.c (source_cleanup_lines_args): Make old_file
	const char *.
	(script_from_file): Change `file' arg to const char *.
	* cli/cli-script.h (script_from_file): Update.
2010-04-07 16:54:39 +00:00
Doug Evans 937502b8a9 Fix regexps in previous checkin. 2010-04-07 03:47:22 +00:00
Doug Evans 96e398662d * cli/cli-cmds.c (source_command): Run cleanups.
testsuite/
	* gdb.base/source-test.gdb: New file.
	* gdb.base/source.exp: Test source -v.
2010-04-07 03:42:55 +00:00
gdbadmin db564246a8 *** empty log message *** 2010-04-07 00:00:34 +00:00
Stan Shebs 3149d8c115 2010-04-06 Stan Shebs <stan@codesourcery.com>
* defs.h (char_ptr): Move typedef here from...
	* ada-lang.c (char_ptr): Remove.
	* charset.c (char_ptr): Remove.
	* tracepoint.h (struct uploaded_string): Remove.
	(struct uploaded_tp): Use vectors for string arrays.
	* tracepoint.c (trace_save): Use vectors of actions.
	(parse_tracepoint_definition): Ditto.
	(get_uploaded_tp): Clear vectors.
	* breakpoint.c (create_tracepoint_from_upload): Use vectors.
	(next_cmd): Change to an int.
	(read_next_cmd): Use vector of command strings.
2010-04-06 17:47:40 +00:00
Doug Evans 4cc23edeb9 * top.h (source_script, cd_command): Delete.
* main.c: #include "cli/cli-cmds.h"
2010-04-06 16:51:18 +00:00
Ulrich Weigand 5984a431b3 * gdb.cp/inherit.exp (test_print_anon_union): Fix re_class pattern. 2010-04-06 12:45:22 +00:00
Kevin Buettner bd333fb734 * m32c-tdep.c (make_types): When calling `arch_type', pass size of
type in bytes, not bits.
2010-04-06 00:14:43 +00:00
gdbadmin 3df4642a73 *** empty log message *** 2010-04-06 00:00:12 +00:00
Pierre Muller ec8a089a30 * gdb/stabsread.c (define_symbol): Add support for char
and string constants.

	* gdb/testsuite/gdb.stabs/aout.sed: Convert all backslash to double backslash
	within one line, unless it is followed by a double quote.
	* gdb/testsuite/gdb.stabs/hppa.sed: Idem.
	* gdb/testsuite/gdb.stabs/weird.def: Add char and String constants
	* gdb/testsuite/gdb.stabs/weird.exp: Check for correct parsing of
	chhar and string constants.
	* gdb/testsuite/gdb.stabs/xcoff.sed: Ignore escaped quote quotes
	in .stabs to .stabx substitution.
2010-04-05 22:43:49 +00:00
Pierre Muller 2244ba2e4a Remove remaining "%ll" uses.
* go32-nat.c (go32_pte_for_address): Replace "0x%llx" using
	hex_string call.
	* rs6000-nat.c (rs6000_ptrace64): Idem.
	* solib-pa64.c (pa64_current_sos): Idem.
	* solib-spu.c (spu_current_sos): Idem.
	* linux-nat.c (linux_nat_find_memory_regions): Replace "%lld" using
	plongest call.
	* nto-procfs.c (procfs_meminfo): Replace "0x%016llx" using
	phex (VAR, 8) call.
	* sh64-tdep.c (sh64_show_media_regs): Idem.
2010-04-05 22:18:53 +00:00
Stan Shebs fce3c1f0f1 2010-04-05 Stan Shebs <stan@codesourcery.com>
* tracepoint.c: Include gdbcore.h.
	(tfile_xfer_partial): Return partial results, also try reading
	from executable.
	(tfile_has_all_memory): New function.
	(init_tfile_ops): Use it.

	* gdb.trace/tfile.c: Add a variable split across two blocks, and a
	constant global.
	* gdb.trace/tfile.exp: Try to print them.
2010-04-05 21:57:18 +00:00
Doug Evans c375651d8a * gdb.texinfo (maint show python auto-load): Fix typo. 2010-04-05 17:14:57 +00:00
Sergio Durigan Junior 626ea16dd6 2010-03-23 Sergio Durigan Junior <sergiodj@redhat.com>
PR gdb/10736:
	* xml-syscall.c (my_gdb_datadir): New variable to keep track of
	the changes in data-directory.
	(init_sysinfo): Reload the syscall XML file if the data-directory
	has changed.
2010-04-05 15:58:53 +00:00
Jan Kratochvil 1f7ccab234 gdb/
Code cleanup.
	* breakpoint.c (bpstat_stop_status): Use bpstat_causes_stop.
2010-04-05 10:07:30 +00:00
gdbadmin 0539a0deb5 *** empty log message *** 2010-04-05 00:00:03 +00:00
Stan Shebs d77f58beee 2010-04-04 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* breakpoint.c (breakpoint_1): Add filter argument, return number of
	breakpoints printed.
	(is_hardware_watchpoint): Make argument const.
	(is_watchpoint): Ditto.
	(is_tracepoint): Merge of tracepoint_type and breakpoint_is_tracepoint,
	use it everywhere.
	(breakpoints_info): Pass NULL to breakpoint_1.
	(maintenance_info_breakpoints): Ditto.
	(watchpoints_info): New function.
	(tracepoints_info): Use breakpoint_1 filter.
	(set_ignore_count): Warn that tracepoint ignore count will be ignored.
	(_initialize_breakpoint): Make "info watchpoints" its own command.
	* breakpoint.h (is_tracepoint): Rename from breakpoint_is_tracepoint.
	* mi/mi-cmd-break.c (mi_cmd_break_commands): Use is_tracepoint.

	* gdb.texinfo (Setting Breakpoints): "info watch" no longer a synonym.
	(Setting Watchpoints): Update description of "info watch".
	(Disabling Breakpoints): Only "info break" lists all.

	* gdb.base/completion.exp: Update for new "info watchpoints".
	* gdb.base/default.exp: Ditto.
	* gdb.base/help.exp: Ditto.
	* gdb.base/watchpoint.exp: Ditto.
	* gdb.trace/infotrace.exp: Update "info tracpoints" output.
2010-04-04 23:47:16 +00:00
Stan Shebs af54718eae 2010-04-04 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (tfile_fetch_registers): Add fallback case.

	* gdb.texinfo (Tracepoint Restrictions): Document PC inference.
	(tdump): Explain how tdump works.

	* gdb.trace/tfile.exp: Sharpen tfind test.
2010-04-04 23:31:29 +00:00
Jan Kratochvil 74d1f91eb1 gdb/
* infcmd.c (run_command_1): Call proceed with regcache_read_pc address.
	* config/djgpp/fnchange.lst: Add translation for break-entry.exp.

gdb/testsuite/
	* gdb.base/break-entry.exp: New.
2010-04-04 22:12:14 +00:00
Jan Kratochvil 91d91ceba4 gdb/
* breakpoint.c (bpstat_find_step_resume_breakpoint): Remove.
	* breakpoint.h (bpstat_find_step_resume_breakpoint): Remove.
2010-04-04 13:54:51 +00:00
gdbadmin 6d1ad4017d *** empty log message *** 2010-04-04 00:00:45 +00:00
Pedro Alves fc7238bbba * inferiors.c (add_thread): Set last_status kind to
TARGET_WAITKIND_IGNORE.
	* linux-low.c (cancel_breakpoint): Remove unnecessary regcache
	fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
	(linux_wait_1): Move `thread' local definition to block that uses
	it.  Don't NULL initialize `event_child'.
	(linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
	Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
	* linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2010-04-03 23:14:18 +00:00
gdbadmin 1eed4def45 *** empty log message *** 2010-04-03 00:00:10 +00:00
Jan Kratochvil 60531b2469 gdb/
* dwarf2read.c (read_namespace_type): Use common "return set_die_type"
	code form.
2010-04-02 15:21:47 +00:00
Hui Zhu eb8e76db62 2010-04-02 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>

	* gdb.reverse/i386-sse-reverse.exp: New file.
	* gdb.reverse/i386-sse-reverse.c: New file.
2010-04-02 05:13:09 +00:00
Hui Zhu a3c4230a63 2010-04-02 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (OT_DQUAD): New enum.
	(i386_process_record): Add code for MMX, 3DNow!, SSE, SSE2,
	SSE3, SSSE3 and SSE4.
2010-04-02 05:09:29 +00:00
Hui Zhu b15758fe2f 2010-04-02 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_record_lea_modrm_addr): Remove useless
	"*addr = 0".
2010-04-02 05:04:57 +00:00
Pedro Alves afd02f27b0 * tracepoint.c (trace_dump_actions): New, factored out from
trace_dump_command, and adjusted to recurse into while-stepping's
	action list.
	(trace_dump_command): Use it.
2010-04-02 01:39:53 +00:00
Pedro Alves bf65cad81d * gdb.trace/tfind.exp: Adjust expected disassembly output. 2010-04-02 01:31:59 +00:00
Pedro Alves 5cea2a2659 * breakpoint.h (struct counted_command_line): Moved definition to
breakpoint.c, and forward declare.
	(breakpoint_commands): Declare.
	* breakpoint.c (struct counted_command_line): Moved here.
	(breakpoint_commands): New.
	* tracepoint.c (encode_actions): Use breakpoint_commands.
	* remote.c (remote_download_tracepoint): Ditto.
2010-04-02 01:18:35 +00:00
gdbadmin 9406745256 *** empty log message *** 2010-04-02 00:00:34 +00:00
H.J. Lu 7c47795c2b Use hex_string instead of phex_nz for error.
2010-04-01  H.J. Lu  <hongjiu.lu@intel.com>

	* remote.c (remote_parse_stop_reply): Use hex_string instead
	of phex_nz for error.
2010-04-01 23:13:24 +00:00
Stan Shebs fff87407d4 2010-04-01 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* tracepoint.h (enum actionline_type): Remove.
	(validate_actionline): Change return to void.
	* tracepoint.c (report_agent_reqs_errors): New function.
	(validate_actionline): Call it, change return to void, report errors
	more consistently.
	(collect_symbol): Call report_agent_reqs_errors.
	(encode_actions_1): Ditto.
	(encode_actions): Don't expect a result from validate_actionline.

	* gdb.trace/actions.exp: Tweak expected output.
	* gdb.trace/while-stepping.exp: Tweak expected output.
2010-04-01 22:57:25 +00:00
Stan Shebs 615bcdefbf 2010-04-01 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_start_command): Confirm if trace is running.
	(trace_stop_command): Error if trace not running.
2010-04-01 20:30:56 +00:00
H.J. Lu fe01d6681b Support "ah", "bh", "ch", "dh" on amd64.
gdb/

2010-04-01  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_byte_names): Add "ah", "bh", "ch", "dh".
	(AMD64_NUM_LOWER_BYTE_REGS): New.
	(amd64_pseudo_register_read): Handle "ah", "bh", "ch", "dh".
	(amd64_pseudo_register_write): Likewise.
	(amd64_init_abi): Set num_byte_regs to 20.

gdb/testsuite/

2010-04-01  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.arch/amd64-byte.exp: Check "ah", "bh", "ch", "dh".
2010-04-01 20:02:10 +00:00
Pedro Alves bdabb07895 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
an extended waitstatus, or by a watchpoint.
	(cancel_breakpoints_callback): Don't cancel a breakpoint if the
	thread was stepping or has been stopped by a watchpoint.
2010-04-01 15:31:26 +00:00
Pedro Alves d3bbe7a0c8 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
(set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
	of another, then delete the previous, and validate all
	breakpoints.
	(validate_inserted_breakpoint): New.
	(delete_disabled_breakpoints): New.
	(validate_breakpoints): New.
	(check_mem_read): Validate breakpoints before trusting their
	shadow.  Delete disabled breakpoints.
	(check_mem_write): Validate breakpoints before trusting they
	should be inserted.  Delete disabled breakpoints.
	* mem-break.h (validate_breakpoints):
	* server.c (handle_query): Validate breakpoints when we see a
	qSymbol query.
2010-04-01 14:26:53 +00:00
Pedro Alves 8b07ae33f0 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
	if we could tell there's a GDB breakpoint at stop_pc.
	(need_step_over_p): Don't do a step over if we find a GDB
	breakpoint at the resume PC.

	* mem-break.c (struct raw_breakpoint): New.
	(enum bkpt_type): New type `gdb_breakpoint'.
	(struct breakpoint): Delete the `PC', `old_data' and `inserted'
	fields.  New field `raw'.
	(find_raw_breakpoint_at): New.
	(set_raw_breakpoint_at): Handle refcounting.  Create a raw
	breakpoint instead.
	(set_breakpoint_at): Adjust.
	(delete_raw_breakpoint): New.
	(release_breakpoint): New.
	(delete_breakpoint): Rename to...
	(delete_breakpoint_1): ... this.  Add proc parameter.  Use
	release_breakpoint.  Return ENOENT.
	(delete_breakpoint): Reimplement.
	(find_breakpoint_at): Delete.
	(find_gdb_breakpoint_at): New.
	(delete_breakpoint_at): Delete.
	(set_gdb_breakpoint_at): New.
	(delete_gdb_breakpoint_at): New.
	(gdb_breakpoint_here): New.
	(set_reinsert_breakpoint): Use release_breakpoint.
	(uninsert_breakpoint): Rename to ...
	(uninsert_raw_breakpoint): ... this.
	(uninsert_breakpoints_at): Adjust to handle raw breakpoints.
	(reinsert_raw_breakpoint): Change parameter type to
	raw_breakpoint.
	(reinsert_breakpoints_at): Adjust to handle raw breakpoints
	instead.
	(check_breakpoints): Adjust.  Use release_breakpoint.
	(breakpoint_here): Rewrite using find_raw_breakpoint_at.
	(breakpoint_inserted_here): Ditto.
	(check_mem_read): Adjust to iterate over raw breakpoints instead.
	Don't trust the breakpoint's shadow if it is not inserted.
	(check_mem_write): Adjust to iterate over raw breakpoints instead.
	(delete_all_breakpoints): Adjust.
	(free_all_breakpoints): Mark all breakpoints as uninserted, and
	use delete_breakpoint_1.

	* mem-break.h (breakpoints_supported): Delete declaration.
	(set_gdb_breakpoint_at): Declare.
	(gdb_breakpoint_here): Declare.
	(delete_breakpoint_at): Delete.
	(delete_gdb_breakpoint_at): Declare.

	* server.h (struct raw_breakpoint): Forward declare.
	(struct process_info): New field `raw_breakpoints'.

	* linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
	breakpoints.
2010-04-01 14:25:34 +00:00
Pedro Alves 86b17b608f gdb/
* breakpoint.c (multi_start, multi_end, last_was_multi): Delete.
	(prev_breakpoint_count): New.
	(set_breakpoint_count): Adjust.
	(rbreak_start_breakpoint_count): New.
	(start_rbreak_breakpoints): Adjust.
	(end_rbreak_breakpoints): Adjust.
	(struct commands_info) <arg>: New field.
	(do_map_commands_command): Tweak output to include breakpoint spec
	range.
	(commands_command_1): Adjust.  Avoid setting an xfree cleanup if
	ARG was empty on entry.  Set INFO's arg.
	(create_breakpoint): Adjust.

	* NEWS: Clarify `commands' changes.

	gdb/doc/
	* gdb.texinfo (Break Commands): Clarify `commands' changes, and
	add cross reference.

	gdb/testsuite/
	* gdb.base/commands.exp: Adjust.
	* gdb.cp/extern-c.exp: Adjust.
2010-04-01 14:11:24 +00:00
Pedro Alves 2c58c0a9a5 gdb/
* tracepoint.c: Include stack.h.
	(struct add_local_symbols_data): New.
	(do_collect_symbol): New.
	(add_local_symbols): Rewrite using iterate_over_block_arg_vars and
	iterate_over_block_local_vars.
	* stack.c (print_block_frame_locals): Rewrite as ...
	(iterate_over_block_locals): ... this.  Take a callback function
	pointer and generic data pointer, and call that instead of
	print_variable_and_value.
	(struct print_variable_and_value_data): New.
	(do_print_variable_and_value): New.
	(iterate_over_block_local_vars): New, abstracted out from
	print_frame_local_vars.
	(print_frame_local_vars): Rewrite using
	iterate_over_block_local_vars.
	(iterate_over_block_arg_vars): New, abstracted out from
	print_frame_arg_vars.
	(print_frame_arg_vars): Rewrite using iterate_over_block_arg_vars.
	* stack.h (iterate_over_block_arg_local_vars_cb): New typedef.
	(iterate_over_block_arg_vars, iterate_over_block_local_vars): Declare.

	gdb/testsuite/
	* gdb.trace/collection.c (local_test_func): Define a local struct,
	and instanciate it.
2010-04-01 11:24:01 +00:00
Pedro Alves 0db9b91c94 * gdb.trace/collection.exp (gdb_collect_args_test)
(gdb_collect_argarray_test): XFAIL the tests that assume the
	argarray argument's elements are collected.
2010-04-01 00:55:03 +00:00
gdbadmin dde5d5bf85 *** empty log message *** 2010-04-01 00:00:03 +00:00
Richard Earnshaw d476da0ef3 * arm-tdep.c (thumb_get_next_pc_raw): Correctly detect TBH
instructions.  Use the PC+4 if the base of the TBB or TBH is the
	PC register.
2010-03-31 22:10:07 +00:00
Jan Kratochvil 8072405bd6 gdb/
Fix crash on reading wrong function declaration DWARF.
	* dwarf2read.c (read_subroutine_type): New variable void_type.
	Pre-fill all TYPE_FIELD_TYPEs.  Move nparams and iparams initialization
	more close to their use.

gdb/testsuite/
	* gdb.dwarf2/dw2-bad-parameter-type.exp,
	gdb.dwarf2/dw2-bad-parameter-type.S: New.
2010-03-31 18:13:38 +00:00
Stan Shebs 8bf6485c1c 2010-03-31 Stan Shebs <stan@codesourcery.com>
* breakpoint.c (tracepoint_save_command): Include variables,
 	conditionals, tracepoint types, and default-collect.
	* tracepoint.c (save_trace_state_variables): New function.
	* tracepoint.h (save_trace_state_variables): Declare it.

	* gdb.trace/save-trace.exp: Test save/restore of default-collect
	and tracepoint conditionals.
	(gdb_verify_tracepoints): Delete unused return.
2010-03-31 17:59:49 +00:00
Pierre Muller 2ae2a0b7f1 * src/gdb/remote.c (end_thread): ARI fix: Use xstrdup instead of strdup. 2010-03-31 14:36:41 +00:00
Pedro Alves ff12863fb8 * gdb.texinfo (TUI Commands): Mention that in some cases, these
commands error out.
2010-03-31 12:19:52 +00:00
Keith Seitz 86ffb50612 * c-typeprint.c (c_type_print_args): Don't print "void"
for java, regardless of whether it is TYPE_PROTOTYPED.
  Use the passed-in language instead of current_language.
  (c_type_print_varspec_suffix): Use current_language instead
  of assuming language_c.
  * jv-typeprint.c (java_type_print_base): (bz 9320) Strip off
  any return type specifier from the physname.
2010-03-31 00:48:29 +00:00
Keith Seitz fd7f724a31 * gdb.java/jmisc.exp (ptype jmisc): Allow the constructor to
appear in the output before main.
  Remove KFAIL for gdb/2215 aka bz 9320.
2010-03-31 00:47:23 +00:00
gdbadmin 94c11f939a *** empty log message *** 2010-03-31 00:00:33 +00:00
Doug Evans 0906dd0b0a * gdb.arch/amd64-word.exp: Rename hex to hexr, the former is defined
by dejagnu.
	* gdb.arch/amd64-dword.exp: Ditto.
2010-03-30 22:25:59 +00:00
Pedro Alves 956c2c8b9a * tui/tui-interp.c (tui_is_toplevel): New.
(tui_init): Set it.
	(tui_allowed_p): New.
	* tui/tui.c (tui_enable): Check if the TUI is allowed before
	enabling it.
	* tui/tui.h (tui_allowed_p): Declare.
2010-03-30 22:21:34 +00:00
Doug Evans 8d9e771911 * gdb.base/annota1.exp (break handle_USR1): Make fail and pass text
match.
	(break printf): Ditto.
2010-03-30 22:12:07 +00:00
H.J. Lu f68eb6123c Add org.gnu.gdb.i386.avx.
2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (i386 Features): Add org.gnu.gdb.i386.avx.
2010-03-30 18:37:03 +00:00
Tom Tromey 98e5a990dd 2010-03-30 Ozkan Sezer <sezeroz@gmail.com>
* serial.h: Include winsock2.h before windows.h.
2010-03-30 18:08:04 +00:00
H.J. Lu c8d5aac9db Add xmlRegisters= to qSupported packet.
gdb/

2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>

	* NEWS: Mention xmlRegisters= in qSupported packet.

	* i386-tdep.c: Include "remote.h".
	(_initialize_i386_tdep): Call register_remote_support_xml.

	* remote.c (remote_support_xml): New.
	(register_remote_support_xml): Likewise.
	(remote_query_supported_append): Likewise.
	(remote_query_supported): Support remote_support_xml.

	* remote.h (register_remote_support_xml): New.

gdb/doc/

2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (General Query Packets): Add xmlRegisters.
2010-03-30 15:45:16 +00:00
Stan Shebs 42e08e6983 2010-03-29 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_find_line_command): Remove dead code.
2010-03-30 00:19:43 +00:00
gdbadmin fe5c95995a *** empty log message *** 2010-03-30 00:00:33 +00:00
Stan Shebs 7d13fe92bd 2010-03-29 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* gdb.texinfo (GDB/MI Tracepoint Commands): Add notes about the
	GDBN equivalent.
	(Set Tracepoints): Remove mention that conditional tracepoints
	don't exist.
	(Tracepoint Actions): Clarify when while-stepping collection
	happens, note that while-stepping does not automatically collect
	$pc.
2010-03-29 23:47:28 +00:00
Stan Shebs 409873ef5c 2010-03-29 Stan Shebs <stan@codesourcery.com>
* tracepoint.h (struct uploaded_string): New struct.
	(struct uploaded_tp): New fields for source strings.
	* breakpoint.c (this_utp, next_cmd): New globals.
	(read_uploaded_action): New function.
	(create_tracepoint_from_upload): Fill in more parts
	of a tracepoint.
	* tracepoint.c (encode_source_string): New function.
	(trace_save): Write out source strings, fix error checks.
	(parse_tracepoint_definition): Add source string parsing.
	* remote.c (PACKET_TracepointSource): New packet type.
	(remote_download_command_source): New function.
	(remote_download_tracepoint): Download source pieces also.
	(_initialize_remote): Add packet config command.

	* gdb.texinfo (Tracepoint Packets): Describe QTDPsrc.
	(General Query Packets): Describe TracepointSource.
2010-03-29 23:45:06 +00:00
Sami Wagiaalla 1da644f033 2010-03-29 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/nsusing.exp: Marked imported declaration test as xfail with
	gcc < 4.4.
	* gdb.cp/shadow.exp: Ditto.
2010-03-29 20:35:19 +00:00
Stan Shebs a040585484 2010-03-29 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (collect_symbol): Send LOC_UNRESOLVED symbols to
	expression handler.
2010-03-29 17:58:17 +00:00
Stan Shebs 76a2b9588c 2010-03-29 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (start_tracing): Check tracepoints before sending
	commands to target, don't start if all tracepoints disabled.
2010-03-29 17:41:38 +00:00
Pedro Alves a8121990c1 * gdb.trace/collection.exp (run_trace_experiment): Make sure
"tstart" is silent.
2010-03-29 00:46:54 +00:00
gdbadmin 0e780da906 *** empty log message *** 2010-03-29 00:00:03 +00:00
Pedro Alves 6e79d36707 * gdb.trace/collection.exp (executable): New.
(binfile): Use it.
	(fpreg, spreg, pcreg): New.
	(test_register): Use gdb_test_multiple.  Pass /x to print.
	(prepare_for_trace_test): New.
	(run_trace_experiment): Use "continue", not gdb_run_cmd.
	(gdb_collect_args_test, gdb_collect_argstruct_test)
	(gdb_collect_argarray_test, gdb_collect_locals_test): Use
	prepare_for_trace_test.
	(gdb_collect_registers_test): Use prepare_for_trace_test.  Use
	fpreg, spreg and pcreg.
	(gdb_collect_expression_test, gdb_collect_globals_test): Use
	prepare_for_trace_test.
	(gdb_trace_collection_test): Use fpreg, spreg and pcreg.  Don't
	try to detect tracing support here.  Don't set breakpoints at
	`begin' or `end' here.
	<global scope>: Use clean_restart.  Run to main before checking
	for tracing support.  Check for for tracing support here.
2010-03-28 23:17:57 +00:00
Jan Kratochvil 09248348a7 gdb/testsuite/
* gdb.base/break-interp.exp (test_core, test_attach, test_ld): Add
	" as $displacement" to "seen displacement message".
2010-03-28 19:08:24 +00:00
Pedro Alves 12f2d60102 Whoops. Use tab, not spaces. 2010-03-28 18:11:20 +00:00
Pedro Alves d350db3834 gdb/
* cli/cli-script.c (process_next_line): Handle 'stepping'.

	gdb/testsuite/
	* gdb.trace/while-dyn.exp (executable): New variable.
	(binfile): Use it.
	(test_while_stepping): New function.  Move most tests here.  Call
	it once for each of the while-stepping, stepping and ws aliases.
2010-03-28 18:00:57 +00:00
gdbadmin 69f6c109fa *** empty log message *** 2010-03-28 00:00:03 +00:00
Eli Zaretskii ee8e71d48b * gdb.texinfo (ARM): Document arguments to "target sim".
(Set Catchpoints): Use @dots{} instead of @r{...}.
2010-03-27 09:01:26 +00:00
Stan Shebs 8b9b7ef838 2010-03-26 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
2010-03-27 00:12:34 +00:00
gdbadmin 7989c76eac *** empty log message *** 2010-03-27 00:00:34 +00:00
Stan Shebs 9766ced415 2010-03-26 Tom Tromey <tromey@redhat.com>
* breakpoint.c (commands_command_1): Duplicate 'arg'.
2010-03-26 23:49:31 +00:00
Ulrich Weigand 059acae734 * breakpoint.c (expand_line_sal_maybe): Always call skip_prologue_sal.
(skip_prologue_sal): Remove local definition.
	(resolve_sal_pc): Remove now unnecessary code.
	* linespec.c (minsym_found): Call skip_prologue_sal.
	* symtab.c (find_function_start_pc): Remove.
	(find_function_start_sal): Extract prologue skipping into ...
	(skip_prologue_sal): ... this new function.  Handle code both
	with and without debug info.  Respect SAL's explicit_pc and
	explicit_line flags.  Inline old find_function_start_pc.
	* symtab.h (find_function_start_pc): Remove.
	(skip_prologue_sal): Add prototype.
2010-03-26 19:41:50 +00:00
Ulrich Weigand 4a811a977f * dwarf2read.c (read_func_scope): Also scan specification DIEs
for DW_TAG_imported_module children.
2010-03-26 18:55:30 +00:00
Ulrich Weigand 907af001f7 ChangeLog:
* dwarf2read.c (dwarf2_name): Work around GCC bugzilla debug/41828 by
	ignoring spurious DW_AT_name attributes for unnamed structs or unions.
	* completer.c (add_struct_fields): Fix inverted logic.

testsuite/ChangeLog:

	* gdb.cp/inherit.exp (test_ptype_si): XFAIL test for GCC versions
	that do not provide the tagless_struct type name at all.
	(test_print_anon_union): Do not check value of uninitialized
	union member.  Do not use cp_test_ptype_class, so we can accept
	"long" as well as "long int".
2010-03-26 18:05:46 +00:00
Ulrich Weigand dde2d684b0 * breakpoint.c (bpstat_clear_actions): Reset bs->commands_left. 2010-03-26 16:41:54 +00:00
Pedro Alves a609a0c8ae * tracepoint.c (current_trace_status): Don't make sure error_desc
is non-NULL here.
	(parse_trace_status): Release a previous error_desc string, and
	set it to NULL by default.  If stop reason is tracepoint_error,
	make sure error_desc is not left NULL.
2010-03-26 15:26:29 +00:00
Pedro Alves 610197fd46 gdb/
* tracepoint.c (trace_save): Remove X from tracepoint error
	description.

	gdb/testsuite/
	* gdb.trace/tfile.c (tohex, bin2hex): New.
	(write_error_trace_file): Hexify error description.
2010-03-26 14:31:48 +00:00
Pedro Alves 99b5e152aa gdb/
* tracepoint.c (parse_trace_status): Don't allow plain strings in
	the terror description.  Don't expect an X prefix.

	gdb/doc/
	* gdb.texinfo (Tracepoint Packets): Remove mention that
	terror:string may be plain text, and drop mention of X prefix.
2010-03-26 13:35:06 +00:00
Vladimir Prus cd64ee3183 * gdb.texinfo (GDB/MI Tracepoint Commands): Add comma after @xref. 2010-03-26 08:08:07 +00:00
Stan Shebs 6c28cbf2b6 2010-03-25 Stan Shebs <stan@codesourcery.com>
* tracepoint.h (trace_stop_reason): Add tracepoint_error.
	(struct trace_status): New field error_desc.
	* tracepoint.c (stop_reason_names): Add terror.
	(current_trace_status): Ensure non-NULL error description.
	(trace_status_command): Add error report.
	(trace_status_mi): Ditto.
	(trace_save): Add special case for error description.
	(parse_trace_status): Add case for errors.

	* gdb.texinfo (Tracepoint Packets): Document trace error status.

	* gdb.trace/tfile.c: Generate an additional trace file, improve
	portability.
	* gdb.trace/tfile.exp: Test trace file with an error stop, delete
	files in a better way.
2010-03-26 01:46:29 +00:00
gdbadmin 0de81d1453 *** empty log message *** 2010-03-26 00:00:03 +00:00
Keith Seitz 418835ccec * dwarf2read.c (read_subroutine_type): If the compilation unit
language is Java, mark any formal parameter named "this" as
  artificial (GCC/43521).
  (dwarf2_name): Add special handling for Java constructors.
2010-03-25 22:13:15 +00:00
Keith Seitz e62b8c7ea4 * gdb.java/jprint.exp: XFAIL printing of static class members
because of GCC debuginfo problem.
2010-03-25 22:12:07 +00:00
Tom Tromey aa7d318d60 PR gdb/11327, PR gdb/11328, PR breakpoints/11368:
* infrun.c (handle_inferior_event): Change initialization of
	stop_stack_dummy.
	(handle_inferior_event): Change assignment to stop_stack_dummy.
	(normal_stop): Update use of stop_stack_dummy.
	(struct inferior_status) <stop_stack_dummy>: Change type.
	* inferior.h (stop_stack_dummy): Update.
	* infcmd.c (stop_stack_dummy): Change type.
	* infcall.c (cleanup_delete_std_terminate_breakpoint): New
	function.
	(call_function_by_hand): Call set_std_terminate_breakpoint.
	Rewrite std::terminate handling.
	* breakpoint.h (enum bptype) <bp_std_terminate,
	bp_std_terminate_master>: New.
	(enum stop_stack_kind): New.
	(struct bpstat_what) <call_dummy>: Change type.
	(set_std_terminate_breakpoint, delete_std_terminate_breakpoint):
	Declare.
	* breakpoint.c (create_std_terminate_master_breakpoint): New
	function.
	(update_breakpoints_after_exec): Handle bp_std_terminate_master.
	Call create_std_terminate_master_breakpoint.
	(print_it_typical): Handle new breakpoint kinds.
	(bpstat_stop_status): Handle bp_std_terminate_master.
	(bpstat_what): Correctly set call_dummy field.  Handle
	bp_std_terminate_master and bp_std_terminate.
	(print_one_breakpoint_location): Update.
	(allocate_bp_location): Update.
	(set_std_terminate_breakpoint): New function.
	(delete_std_terminate_breakpoint): Likewise.
	(create_thread_event_breakpoint): Update.
	(delete_command): Update.
	(breakpoint_re_set_one): Update.
	(breakpoint_re_set): Call create_std_terminate_master_breakpoint.
2010-03-25 20:48:53 +00:00
Jan Kratochvil 82ccf5a577 gdb/
* symfile.c (build_section_addr_info_from_bfd): New.
	(build_section_addr_info_from_objfile): Base it on
	build_section_addr_info_from_bfd.
	(addrs_section_compar, addrs_section_sort): New.
	(addr_info_make_relative): New variables my_cleanup, abfd_addrs,
	addrs_sorted, abfd_addrs_sorted and addrs_to_abfd_addrs.  Build
	addrs_to_abfd_addrs.  Use it for recalculating ADDRS.

gdb/testsuite/
	* gdb.base/dup-sect.exp, gdb.base/dup-sect.S: New.
2010-03-25 20:29:30 +00:00
gdbadmin f541940721 *** empty log message *** 2010-03-25 00:00:33 +00:00
Michael Snyder 737c4c52da 2010-03-24 Michael Snyder <msnyder@localhost.localdomain>
* elfread.c (find_separate_debug_file_by_buildid):
	Remove unused local variable.
2010-03-24 21:58:31 +00:00
Daniel Jacobowitz 293e2f9ec5 * gdb.base/completion.exp: Allow long instead of long int.
* gdb.base/ending-run.exp: Match _rt_entry.* for RealView.
	* gdb.base/gdbvars.c (main): Remove unused usestubs code.  Reference
	variable p.
	* gdb.base/maint.exp: Allow ER_RO and ER_RW instead of .text and .data.
	* gdb.base/pointers.exp: Allow long instead of long int.
	* gdb.base/printcmds.exp: XFAIL for RealView on ARM EABI.
	* gdb.base/step-line.exp: Allow a directory before the source file name.
2010-03-24 21:28:14 +00:00
Tom Tromey 95a42b64a1 gdb
PR breakpoints/9352:
	* NEWS: Mention changes to `commands' and `rbreak'.
	* symtab.c (do_end_rbreak_breakpoints): New function.
	(rbreak_command): Call start_rbreak_breakpoints; arrange to call
	end_rbreak_breakpoints.
	* breakpoint.c (breakpoint_count, tracepoint_count): Now static.
	(set_breakpoint_count): Likewise.  Clear last_was_multi.
	(multi_start, multi_end, last_was_multi): New globals.
	(start_rbreak_breakpoints, end_rbreak_breakpoints): New
	functions.
	(struct commands_info): New
	(do_map_commands_command): New function.
	(commands_command_1): New function.
	(commands_command): Use it.
	(commands_from_control_command): Likewise.
	(do_delete_breakpoint): New function.
	(delete_command): Use it.
	(map_breakpoint_numbers): Add 'data' argument.  Pass to callback.
	(do_map_disable_breakpoint): New function.
	(disable_command): Use it.
	(do_map_enable_breakpoint): New function.
	(enable_command): Use it.
	(enable_once_breakpoint): Add argument.
	(enable_once_command): Update.
	(enable_delete_breakpoint): Add argument.
	(enable_delete_command): Update.
	(break_command_really): Set last_was_multi when needed.
	(check_tracepoint_command): Fix formatting.
	(validate_commands_for_breakpoint): New function.
	(breakpoint_set_commands): Use it.
	(tracepoint_save_command): Update.
	* breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints):
	Declare.
gdb/doc
	PR breakpoints/9352:
	* gdb.texinfo (Break Commands): Update.
gdb/testsuite
	PR breakpoints/9352:
	* gdb.base/default.exp: Update.
	* gdb.base/commands.exp: Update.
	* gdb.cp/extern-c.exp: Test setting commands on multiple
	breakpoints at once.
2010-03-24 21:24:09 +00:00
Daniel Jacobowitz 2390201f4b * gdb.base/call-signal-resume.exp, gdb.base/unwindonsignal.exp: Skip
if gdb,nosignals.
	* gdb.base/watchpoints.c: Do not include unnecessary headers.
	* lib/gdb.exp (gdb_test_multiple): Relax pattern for "the program
	exited".
2010-03-24 21:20:39 +00:00
Pedro Alves 6bf5e0ba81 * linux-low.c (status_pending_p_callback): Fix comment.
(linux_wait_for_event_1): Move most of the internal breakpoint
	handling from here...
	(linux_wait_1): ... to here.
	(count_events_callback): New.
	(select_singlestep_lwp_callback): New.
	(select_event_lwp_callback): New.
	(cancel_breakpoints_callback): New.
	(select_event_lwp): New.
	(linux_wait_1): Simplify internal breakpoint handling.  Give equal
	priority to all LWPs that have had events that should be reported
	to the client.  Cancel breakpoints when about to reporting the
	event to the client, not while stopping lwps.  No longer cancel
	finished single-steps here.
	(cancel_finished_single_step): Delete.
	(cancel_finished_single_steps): Delete.
2010-03-24 21:12:45 +00:00
Tom Tromey 9add0f1b43 * breakpoint.h (struct counted_command_line): New struct.
(struct breakpoint) <commands>: Change type.
	(struct bpstats) <commands>: Change type.
	<commands_left>: New field.
	* breakpoint.c (alloc_counted_command_line): New function.
	(incref_counted_command_line): Likewise.
	(decref_counted_command_line): Likewise.
	(do_cleanup_counted_command_line): Likewise.
	(make_cleanup_decref_counted_command_line): Likewise.
	(breakpoint_set_commands): Use decref_counted_command_line and
	alloc_counted_command_line.
	(commands_command): Don't error if breakpoint commands are
	executing.
	(commands_from_control_command): Likewise.
	(bpstat_free): Update.
	(bpstat_copy): Likewise.
	(bpstat_clear_actions): Likewise.
	(bpstat_do_actions_1): Likewise.
	(bpstat_stop_status): Likewise.
	(print_one_breakpoint_location): Likewise.
	(delete_breakpoint): Likewise.
	(bpstat_alloc): Initialize new field.
	(tracepoint_save_command): Update.
	* tracepoint.c (encode_actions): Update.
	(trace_dump_command): Update.
2010-03-24 21:12:18 +00:00
Pedro Alves 414a389f5c * mem-break.c (enum bkpt_type): New.
(struct breakpoint): New field `type'.
	(set_breakpoint_at): Change return type to struct breakpoint
	pointer.  Set type to `other_breakpoint' by default.
	(delete_breakpoint): Rewrite, supporting more than one breakpoint
	in the breakpoint list.
	(delete_reinsert_breakpoints): Only delete reinsert breakpoints.
	(reinsert_breakpoint): Rename to ...
	(reinsert_raw_breakpoint): ... this.
	(reinsert_breakpoints_at): Adjust.
	* mem-break.h (struct breakpoint): Declare.
	(set_breakpoint_at): Change return type to struct breakpoint
	pointer.
2010-03-24 21:11:25 +00:00
Stan Shebs 8c9a6790dd 2010-03-24 Stan Shebs <stan@codesourcery.com>
* gdb.trace/tfile.exp: Expect "trace frame", with a space.
2010-03-24 21:11:06 +00:00
Daniel Jacobowitz a6c727b2f1 * dwarf2-frame.c (dwarf2_frame_find_quirks): Use producer_is_realview.
* dwarf2read.c (load_full_comp_unit): Read DW_AT_producer.
	(read_structure_type): For RealView, set TYPE_STUB on structures with
	no byte size and no children.
	(read_subroutine_type): Mark functions as prototyped by default.
	* symtab.c (producer_is_realview): New function.
	* symtab.h (expand_line_sal): Fix declaration formatting.
	(producer_is_realview): Declare.

	testsuite/
	* gdb.base/callfuncs.exp (do_function_calls): Add XFAILs for RealView.
	* gdb.base/ptype.exp (ptype_maybe_prototyped): Add overprototyped
	argument.  Handle "short" and "long".
	(Top level): Pass overprototyped output for old_fptr and xptr.
2010-03-24 21:06:33 +00:00
Daniel Jacobowitz 0d39a07082 * arm-tdep.c (skip_prologue_function): New function.
(submask, bit, bits, sbits, BranchDest): Move higher in the file.
	(thumb_analyze_prologue): Document return value.  Recognize more
	Thumb instructions, skippable calls, and some Thumb-2 instructions.
	Add debug output.
	(arm_skip_prologue): Remove call dummy check.  Check the prologue
	for non-GNU compilers.
	(arm_instruction_changes_pc): New function.
	(arm_analyze_prologue): New function, broken out from
	arm_scan_prologue.  Recognize more ARM instructions and skippable
	calls.  Update comments.  Handle NULL cache.  Return the address
	of the first unrecognized instruction.  Do not skip past other
	instructions which change control flow.  Add debug output.
	(arm_scan_prologue): Use arm_analyze_prologue.
	(ARM_PC_32): Delete.
	(shifted_reg_val): Simplify ARM_PC_32 check.
2010-03-24 20:23:13 +00:00
Vladimir Prus 4baf5cf487 * tracepoint.c (tvariables_info_1): Actually compute
the number of rows in the result.
2010-03-24 19:37:06 +00:00
Pedro Alves 4a5e7a5b0a gdb/
* remote.c (crc32): Constify `buf' parameter.
	(remote_verify_memory): New, abstracted out from...
	(compare_sections_command): ... this.  Remove hardcoded target
	checks.
	(init_remote_ops): Install remote_verify_memory.
	* target.c (target_verify_memory): New.
	* target.h (struct target_ops) <to_verify_memory>: New field.
	(target_verify_memory): Declare.
2010-03-24 01:12:13 +00:00
Pedro Alves 2280c721d8 * server.c (handle_query): Assign, not compare. 2010-03-24 00:14:54 +00:00
Pedro Alves d50171e439 Teach linux gdbserver to step-over-breakpoints.
* linux-low.c (can_hardware_single_step): New.
	(supports_breakpoints): New.
	(handle_extended_wait): If stopping threads, read the stop pc of
	the new cloned LWP.
	(get_pc): New.
	(get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
	low target doesn't support retrieving the PC.
	(add_lwp): Set last_resume_kind to resume_continue.
	(linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
	(linux_attach): Don't clear stop_expected.  Set the lwp's
	last_resume_kind to resume_stop.
	(linux_detach_one_lwp): Don't check for removed breakpoints.
	(check_removed_breakpoint): Delete.
	(status_pending_p): Rename to ...
	(status_pending_p_callback): ... this.  Don't check for removed
	breakpoints.  Don't consider threads that are stopped from GDB's
	perspective.
	(linux_wait_for_lwp): Always read the stop_pc here.
	(cancel_breakpoint): New.
	(step_over_bkpt): New global.
	(linux_wait_for_event_1): Implement stepping over breakpoints.
	(gdb_wants_lwp_stopped): New.
	(gdb_wants_all_stopped): New.
	(linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
	single-step traps here.  Store the thread's last reported target
	wait status.
	(send_sigstop): Don't clear stop_expected.  Always set it,
	instead.
	(mark_lwp_dead): Remove reference to pending_is_breakpoint.
	(cancel_finished_single_step): New.
	(cancel_finished_single_steps): New.
	(wait_for_sigstop): Don't cancel finished single-step traps here.
	(linux_resume_one_lwp): Don't check for removed breakpoints.
	Don't set `step' on non-hardware step archs.
	(linux_set_resume_request): Ignore resume_stop requests if already
	stopping or stopped.  Set the lwp's last_resume_kind.
	(resume_status_pending_p): Don't check for removed breakpoints.
	(need_step_over_p): New.
	(start_step_over): New.
	(finish_step_over): New.
	(linux_resume_one_thread): Always queue a sigstop for resume_stop
	requests.  Clear the thread's last reported target waitstatus.
	Don't use the `suspended' flag.  Don't consider pending breakpoints.
	(linux_resume): Start a step-over if necessary.
	(proceed_one_lwp): New.
	(proceed_all_lwps): New.
	(unstop_all_lwps): New.
	* linux-low.h (struct lwp_info): Rewrite comment for the
	`suspended' flag.  Add the `stop_pc' field.  Delete the
	`pending_stop_pc' field.  Tweak the `stepping' flag's comment.
	Add `'last_resume_kind' and `need_step_over' fields.
	* inferiors.c (struct thread_info): Delete, moved elsewhere.
	* mem-break.c (struct breakpoint): Delete `reinserting' flag.
	Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
	(set_raw_breakpoint_at): New.
	(set_breakpoint_at): Rewrite to use it.
	(reinsert_breakpoint_handler): Delete.
	(set_reinsert_breakpoint): New.
	(reinsert_breakpoint_by_bp): Delete.
	(delete_reinsert_breakpoints): New.
	(uninsert_breakpoint): Rewrite.
	(uninsert_breakpoints_at): New.
	(reinsert_breakpoint): Rewrite.
	(reinsert_breakpoints_at): New.
	(check_breakpoints): Rewrite.
	(breakpoint_here): New.
	(breakpoint_inserted_here): New.
	(check_mem_read): Adjust.
	* mem-break.h (breakpoints_supported, breakpoint_here)
	(breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
	(reinsert_breakpoint_by_bp): Delete declaration.
	(delete_reinsert_breakpoints): Declare.
	(reinsert_breakpoint): Delete declaration.
	(reinsert_breakpoints_at): Declare.
	(uninsert_breakpoint): Delete declaration.
	(uninsert_breakpoints_at): Declare.
	(check_breakpoints): Adjust prototype.
	* server.h: Adjust include order.
	(struct thread_info): Declare here.  Add a `last_status' field.
2010-03-24 00:05:03 +00:00
gdbadmin 8541339168 *** empty log message *** 2010-03-24 00:00:04 +00:00
Pedro Alves 4dfd542337 * gdb.threads/pthreads.c (thread1, thread2, main): Fix printf
format strings and add casts to avoid compiler warnings.
2010-03-23 23:50:22 +00:00
Michael Snyder 30ba68cb7e 2010-03-23 Michael Snyder <msnyder@vmware.com>
* server.c (crc32): New function.
	(handle_query): Add handling for 'qCRC:' request.
2010-03-23 22:43:50 +00:00
Vladimir Prus 1814801734 * gdb.texinfo (GDB/MI Tracepoint Commands): Document MI tracepoint
commands.
2010-03-23 22:10:08 +00:00
Vladimir Prus 011aacb08e Implement -trace-save.
* mi-cmds.h (mi_cmds_trace_save): Declare.
	* mi-cmds.c (mi_cmds): Register -trace-save.
	* mi/mi-main.c (mi_cmd_trace_save): New.
	* remote.c (remote_save_trace_data): Take const parameter.
	* target.h (struct target_ops::to_save_trace_data): Take
	const parameter.
	* target.c (update_current_target): Adjust to the above.
	* tracepoint.c (trave_save): New, extracted from
	(trace_save_command): ...this.
	(tfile_trace_find): Remove message that is unnecessary now
	that 'tfind' reports found frame.
	* tracepoint.h (trace_save): Declare.
2010-03-23 22:05:46 +00:00
Vladimir Prus f197e0f1b1 Implement -trace-find.
* mi/mi-cmds.c (mi_cmds): Register -trace-find.
	* mi/mi-cmds.h (mi_cmd_trace_find): Declare.
	* mi/mi-main.c (mi_cmd_trace_find): New.
	* target.h (struct target_ops): Document to_trace_find.
	* tracepoint.h (tfind_1): Declare.
	* tracepoint.c (finish_tfind_command): Rename to...
	(tfind_1): ...this.
	* remote.c (remote_trace_find): Return -1 if target say
	there's no frame.  Improve error diagnostics.
2010-03-23 22:01:47 +00:00
Vladimir Prus 40e1c229a2 -trace-define-variable and -trace-list-variables.
* tracepoint.c (create_trace_state_variable): Make
    	private copy of name, as opposed to assuming the
    	pointer lives forever.
    	(tvariables_info_1): New.
    	(tvariables_info): Use the above.
    	* tracepoint.h (create_trace_state_variable, tvariables_info_1):
    	Declare.
    	* mi/mi-cmds.c (mi_cmds): Register -trace-define-variable
    	and -trace-list-variables.
    	* mi/mi-cmds.h (mi_cmd_trace_define_variable)
    	(mi_cmd_trace_list_variables): New.
    	* mi/mi-main.c (mi_cmd_trace_define_variable)
    	(mi_cmd_trace_list_variables): New.
2010-03-23 21:50:11 +00:00
Vladimir Prus 9b4c786c6c Implement -break-passcount.
* mi/mi-cmd-break.c (mi_cmd_break_passcount): New.
	* mi/mi-cmds.c (mi_cmds): Register -break-passcount.
	* mi/mi-cmds.h (mi_cmd_break_passcount): Declare.
2010-03-23 21:48:14 +00:00
Vladimir Prus f224b49dcd -trace-start/-trace-end/-trace-status.
* mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status
	and -trace-stop.
	* mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status)
	(mi_cmd_trace_stop): Declare.
	* mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status)
	(mi_cmd_trace_stop): New.
	* tracepoint.c (start_tracing): New, extracted from...
	(trace_start_command): ...this.
	(trace_status_mi): New.
	* tracepoint.h (struct trace_status): Document
	stopping_tracepoint.
	(start_tracing, stop_tracing, trace_status_mi): Declare.
2010-03-23 21:46:33 +00:00
Vladimir Prus 6534d786b1 Implement creating tracepoints with -break-insert.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a
	to mean that tracepoint should be created.
2010-03-23 21:41:55 +00:00
Vladimir Prus 51661e93bc * breakpoint.c (check_no_tracepoint_commands): Use
current spelling of 'teval'.
2010-03-23 21:36:05 +00:00
Vladimir Prus 58ddf7c9cd Remove conflict marker. 2010-03-23 21:34:30 +00:00
Vladimir Prus a7bdde9e63 Unify actions and commands
* defs.h (read_command_lines, read_command_lines_1): New
	parameters validator and closure.
	* tracepoint.h (struct action_line): Remove.
	* breakpoint.h (struct breakpoint): Remove the 'actions'
	field.
	* defs.h (enum command_control_type): New value
	while_stepping_control.
	(struct command_line): Add comments.
	* breakpoint.c (breakoint_is_tracepoint): New.
	(breakpoint_set_commands): For tracepoints,
	verify the commands are permissible.
	(check_tracepoint_commands): New.
	(commands_command): Require that each new line is validated using
	check_tracepoint_command, if we set commands for a tracepoint.
	(create_tracepoint_from_upload): Likewise.
	(print_one_breakpoint_location): Remove the code to print
	actions specifically.
	(tracepoint_save_command): Relay to print_command_lines.
	* cli/cli-script.c (process_next_line): New parameters validator
	and closure. Handle 'while-stepping'. Call validator if not null.
	(read_command_lines, read_command_lines1): Likewise.
	(recurse_read_control_structure): New parameters validator and
	closure. Handle while_stepping_control.
	(print_command_lines): Handle while-stepping.
	(get_command_line, define_command, document_command): Adjust.
	* remote.c (remote_download_tracepoint): Adjust.
	* tracepoint.c (make_cleanup_free_actions, read_actions)
	(free_actions, do_free_actions_cleanup): Remove.
	(trace_actions_command): Use read_command_lines.
	(validate_actionline): Use error in one place.
	(encode_actions_1): New, extracted from...
	(encode_actions): ...this. Also use cleanups for exception
	safety.
	(trace_dump_command): Adjust.
	* mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if
	it's tracepoint.
2010-03-23 21:32:28 +00:00
Mike Frysinger 64e3cf3d4f gdb: fix building with system readline
Building gdb with --enable-targets=all and --with-system-readline hits a
failure in a few targets all related to the inclusion of some opcodes
headers.  The usage of the bundled readline results in an -I to the top
srcdir, but if that isn't used, then there is no such -I path.  A few gdb
targets use this implicitly to include opcodes/ source header files.  So
make sure there is always an explicit -I path to the opcodes/ directory.
2010-03-23 21:31:29 +00:00
Pedro Alves b9a881c2d2 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
lwp had been stopped by a watchpoint.
2010-03-23 18:00:57 +00:00
gdbadmin 405f531a1a *** empty log message *** 2010-03-23 00:00:03 +00:00
Jan Kratochvil c847d045a6 gdb/testsuite/
* dg-extract-results.sh: Sync with GCC HEAD (import r155655, r157175
	and r157645).
2010-03-22 20:38:58 +00:00
Stan Shebs 52e9fde813 2010-03-22 Stan Shebs <stan@codesourcery.com>
* value.c (value_static_field): Be lazy about the field's value.
2010-03-22 18:47:00 +00:00
Tom Tromey 508ccb1f2c 2010-03-22 Reid Kleckner <reid@kleckner.net>
PR gdb/11094
	* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Add
	bp_jit_event.
	(disable_breakpoints_in_shlibs): Likewise.
2010-03-22 17:36:28 +00:00
Jan Kratochvil 5f717f1dbd gdb/testsuite/
* gdb.dwarf2/dw2-empty-namespace.exp, gdb.dwarf2/dw2-empty-namespace.S:
	New.
2010-03-22 16:53:21 +00:00
Daniel Jacobowitz 7d6d51d5fd * gdb.python/Makefile.in (EXECUTABLES): Add py-mi.
* gdb.python/py-mi.exp (binfile): Rename to py-mi.
2010-03-22 15:32:26 +00:00
Ulrich Weigand acebe513da * dwarf2read.c (partial_die_parent_scope): Work around buggy
GCC 4.1 debug info generation (GCC PR c++/28460).
	(determine_prefix): Likewise.
2010-03-22 13:21:39 +00:00
gdbadmin 197d2099b8 *** empty log message *** 2010-03-22 00:00:03 +00:00
gdbadmin 213efadf9f *** empty log message *** 2010-03-21 00:00:09 +00:00
Daniel Jacobowitz 957b8b5a0f * tui/tui-disasm.c (tui_get_begin_asm_address): Default to
get_current_arch.
	* tui/tui-layout.c (extract_display_start_addr): Likewise.
2010-03-20 05:17:10 +00:00
gdbadmin 515cc1798a *** empty log message *** 2010-03-20 00:00:04 +00:00
Stan Shebs 3b11a01527 2010-03-19 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (gen_fetch): Handle bool.
	(gen_usual_unary): Ditto.
	(gen_cast): Ditto.
	(gen_equal): New function.
	(gen_less): New function.
	(gen_expr_binop_rest): Call them, also return integer type from
	logical operations.
	(gen_expr): Ditto.

	* gdb.trace/ax.exp: New file.
2010-03-19 22:00:17 +00:00
Tom Tromey 2078179266 * jv-lang.c (jv_dynamics_objfile_data_key)
(jv_type_objfile_data_key): New globals.
	(class_symtab): Move earlier.
	(jv_per_objfile_free): New function.
	(get_dynamics_objfile): Call set_objfile_data.  Add 'gdbarch'
	parameter.
	Remove ancient #if 1.
	(add_class_symbol): Remove redundant declaration.
	(java_lookup_class): Use alloc_type, not alloc_type_arch.
	(java_link_class_type): Mark as static.  Update.
	(jv_clear_object_type): New function.
	(set_java_object_type): Likewise.
	(get_java_object_type): Use set_java_object_type.
	(is_object_type): Likewise.
	(_initialize_java_language): Register new objfile keys.
	(get_java_class_symtab): Add 'gdbarch' parameter.
	(add_class_symtab_symbol): Update.
	(type_from_class): Update.
2010-03-19 19:08:41 +00:00
Stan Shebs cf3e25cabf 2010-03-19 Stan Shebs <stan@codesourcery.com>
* ax-general.c (ax_const_l): Fix a sizing bug.
2010-03-19 18:21:03 +00:00
Doug Evans 6bb85cd171 * lib/gdb.exp (gdb_compile_test): Watch for "compiler not installed"
output from gcc.
2010-03-19 17:59:37 +00:00
Doug Evans d7d158ed1d * gdb.base/break-interp.exp (prelinkNO): Handle prelink binaries
named /usr/sbin/prelink<foo>.
2010-03-19 17:57:17 +00:00
gdbadmin 860deac3a2 *** empty log message *** 2010-03-19 00:00:03 +00:00
gdbadmin f1ae44c904 GDB 7.1 released. 2010-03-18 22:25:24 +00:00
Stan Shebs 4daf5ac07e 2010-03-18 Stan Shebs <stan@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	* target.h (struct target_ops): New method
	to_set_circular_trace_buffer.
	(target_set_circular_trace_buffer): New macro.
	* target.c (update_current_target): Add
	to_set_circular_trace_buffer, fix to_set_disconnected_tracing
	default behavior.
	* remote.c (remote_set_circular_trace_buffer): New function.
	(init_remote_ops): Add it to vector.
	* tracepoint.h (struct trace_status): New field traceframes_created,
	change buffer_size and buffer_free to int.
	* tracepoint.c (circular_trace_buffer): New global.
	(start_tracing): Send values of disconnected tracing and circular
	trace buffer settings.
	(set_circular_trace_buffer): New function.
	(parse_trace_state): Handle total space and frames created.
	(trace_status_command): Display total space and total frames
	created.
	(trace_save): Write out new status values.
	(parse_trace_status): Set traceframe_count, traceframes_created,
	buffer_free and buffer_size to -1 by default.
	(_initialize_tracepoint): New setshow for circular-trace-buffer.
	* NEWS: Mention the circular trace buffer option.

	* gdb.texinfo (Starting and Stopping Trace Experiments): Describe
	circular-trace-buffer.
	(Tracepoint Packets): Describe QTBuffer, and details of the
	qTStatus reply.

	* gdb.trace/circ.exp: Test circular-trace-buffer.
	* gdb.trace/tfile.exp: Update tstatus test.
2010-03-18 21:23:35 +00:00
Joel Brobecker e8d054800a [dwarf] Anonymous nested function causes SEGV during psymbol read
According to the DWARF3 standard, a function always has a name attribute
(Section 3.3 - Subroutine and Entry Point Entries).  The only exception
is when a DW_AT_abstract_origin attribute is provided, in which case
the name may be inherited from the referenced DIE.

The problem occured because our compiler generated a subprogram DIE
for a nested function where the name attribute was missing (and no
abstract-origin either).  Our code in add_partial_symbol is not
prepared to deal with the situation, and happily just tries  to compute
the length of the (NULL) function name.

This normally cannot happen, because there is already a guard in
scan_partial_symbols, where we (silently!) ignore anonymous dies,
including anonymous subprograms. Unfortunately, there is a flaw that
affects Ada and other languages that allow nested subprograms. For
nested subprograms, we do not go through scan_partial_symbols and
thus we are missing the name check.

This patch adds the name check in the nested subprogram case. It also
adds a complaint which is emitted during the psymtab->symtab conversion
phase.

gdb/ChangeLog:

        * dwarf2read.c (add_partial_subprogram): Make sure the subprogram
        DIE has a name before creating the associated partial symbol.
        (read_func_scope): Emit a complaint if the subprogram does not
        have a name or when we can't extract the subprogram PC bounds.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-anonymous-func.S: New file.
        * gdb.dwarf2/dw2-anonymous-func.exp: New testcase.

Tested on x86_64-linux, no regression.  Note that the testcase also
verifies that the psymtab->symtab conversion does not crash (this is
the purpose of the "list file1.txt:1" test.
2010-03-18 18:35:55 +00:00
Tom Tromey 40c549d600 * infcmd.c (finish_command_continuation): Wrap print_return_value
in TRY_CATCH.
2010-03-18 18:02:00 +00:00
Stan Shebs 1c40aa62ec Fix last checkin 2010-03-18 16:01:29 +00:00
Ulrich Weigand 441b986a3d ChangeLog:
* mi/mi-main.c (mi_cmd_list_thread_groups): Use get_current_arch
	instead of selected frame architecture.

testsuite/ChangeLog:

	* gdb.mi/gdb680.exp: Revert 2009-06-17 change.
2010-03-18 13:25:20 +00:00
Pedro Alves 4247603be5 gdb/
* infcmd.c (until_command): Use ERROR_NO_INFERIOR.  Ensure there's
	a valid selected thread, and that it is not running.
	(advance_command): Ditto.
	(finish_command): Ditto.

	gdb/testsuite/
	* gdb.base/default.exp: Adjust.
2010-03-18 13:21:40 +00:00
Stan Shebs 3a96536b17 2010-03-17 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (require_rvalue): Disallow non-scalars.
2010-03-18 01:47:33 +00:00
Stan Shebs 573cda036a 2010-03-17 Stan Shebs <stan@codesourcery.com>
* infcall.c: Include tracepoint.h.
	(call_function_by_hand): Disallow calls in tfind mode.
	* infcmd.c: Include tracepoint.h.
	(ensure_not_tfind_mode): New function.
	(continue_1): Call it.
	(step_1) Ditto.
	(jump_command): Ditto.
	(signal_command): Ditto.
	(advance_command): Ditto.
	(until_command): Ditto.
	(finish_command): Ditto.
	* tracepoint.h (disconnect_or_stop_tracing): Declare.
2010-03-18 01:09:26 +00:00
gdbadmin d504198035 *** empty log message *** 2010-03-18 00:00:34 +00:00
Stan Shebs 400c6af037 2010-03-17 Stan Shebs <stan@codesourcery.com>
* ax-gdb.h (struct axs_value): New field optimized_out.
	(gen_trace_for_var): Add gdbarch argument.
	* ax-gdb.c (gen_trace_static_fields): New function.
	(gen_traced_pop): Call it, add gdbarch argument.
	(gen_trace_for_expr): Update call to it.
	(gen_trace_for_var): Ditto, and report optimized-out variables.
	(gen_struct_ref_recursive): Check for optimized-out value.
	(gen_struct_elt_for_reference): Ditto.
	(gen_static_field): Pass gdbarch instead of expression, assume
	optimization if field not found.
	(gen_var_ref): Set the optimized_out flag.
	(gen_expr): Error on optimized-out variable.
	* tracepoint.c (collect_symbol): Handle struct-valued vars as
	expressions, skip optimized-out variables with computed locations.
	* dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of
	erroring out if location expression missing.
	(loclist_tracepoint_var_ref): Don't error out here.
2010-03-17 22:04:43 +00:00
Tom Tromey a3b2a86bb7 * dwarf2read.c (dwarf2_get_section_info): Handle case where no
DWARF data is available.
2010-03-17 19:16:02 +00:00
Daniel Jacobowitz 38963c97b7 * symfile.c (generic_load): Reset breakpoints after loading. 2010-03-17 18:08:11 +00:00
Tom Tromey ddabfc735b * linux-nat.c (linux_nat_detach): Check debug_linux_nat. 2010-03-17 16:17:00 +00:00
Jan Kratochvil d8c09fb595 gdb/
* spu-tdep.c (spu_catch_start): Replace set_breakpoint call with the
	create_breakpoint call, adjust the parameters.
2010-03-17 13:38:56 +00:00
gdbadmin 7a6771ef40 *** empty log message *** 2010-03-17 00:00:33 +00:00
Jan Kratochvil bbb0eef699 gdb/
* dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED.
	* valarith.c (value_subscripted_rvalue): Suppress error if
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
2010-03-16 20:51:23 +00:00
Joel Brobecker b8d088acc8 Avoid switch to invalid ptid during Ada task switch.
This is to prevent an internal error during an Ada task switch. A task
switch is simply a thread switch under the hood. What we do is collect
the info from the Ada Task Control Block, deduce the associated thread
ptid, and then switch to that thread.  If the thread ptid computation
routine has not been implemented for the target, of if there is a bug,
then we end up computing a bogus ptid which GDB does not know about,
which eventually leads to an assertion failure:

    (gdb) task 1
    [New Thread 5715]
    /[...]/gdb/thread.c:595: internal-error: is_thread_state:
     Assertion `tp' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

When this happens, it's just nicer for the user to print an error
message, and cancel the task switch. After this patch is applied,
this is what we get:

    (gdb) task 1
    [New Thread 10250]
    Unable to compute thread ID for task 1.
    Cannot switch to this task.

gdb/ChangeLog:

        * ada-tasks.c (task_command_1): Check that the task ptid is valid
        before doing the associated thread switch.
2010-03-16 18:47:15 +00:00
Pedro Alves e92d13d5bc gdb/gdbserver/
* server.h (internal_error): Declare.
	(gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
	* utils.c (internal_error): New function.
2010-03-16 17:47:52 +00:00
Hui Zhu 46956e396d 2010-03-16 Holger Hans Peter Freyther <zecke@selfish.org>
* linux-record.c (record_linux_msghdr): Remove unintended semicolons.
2010-03-16 17:01:21 +00:00
Daniel Jacobowitz 322be96262 * MAINTAINERS: Update my email address. 2010-03-16 13:59:36 +00:00
Vladimir Prus 8cdf0e1506 Simplify MI breakpoint setting.
* breakpoint.c (break_command_really): Make nonstatic and
    	rename to...
    	(create_breakpoint): ...this. Rename prior function by this name
    	to...
    	(create_breakpoint_sal): ...this.
    	(create_breakpoints): Rename to...
    	(create_breakpoints_sal): ...this.
    	(set_breakpoint): Remove.
    	* breakpoint.h: Adjust to above changes.
    	* mi/mi-cmd-break.c (mi_cmd_break_insert): Simplify.
2010-03-16 08:42:20 +00:00
Stan Shebs ac0cd78b43 Fix a commit snafu 2010-03-16 00:52:54 +00:00
gdbadmin 6ad52ba97a *** empty log message *** 2010-03-16 00:00:03 +00:00
Stan Shebs b6e7192fae 2010-03-15 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c: Include cp-support.h.
	(find_field): Remove.
	(gen_primitive_field): New function.
	(gen_struct_ref_recursive): New function.
	(gen_struct_ref): Rewrite to call gen_struct_ref_recursive instead
	of find_field.
	(gen_static_field): New function.
	(gen_struct_elt_for_reference): New.
	(gen_namespace_elt): New.
	(gen_maybe_namespace_elt): New.
	(gen_aggregate_elt_ref): New.
	(gen_expr): Add OP_SCOPE, display opcode name in error message.
2010-03-15 23:53:21 +00:00
Tom Tromey 1054b214e2 * dwarf2read.c (die_needs_namespace): Also return 0 for
DW_TAG_subprogram.
2010-03-15 20:49:53 +00:00
Joel Brobecker 4dea3bb71a Requalify Ralf Corsepius' change as a "tiny change".
Ralf's copyright assignment does not cover GDB for the moment.
He only contributed one other change, in 2005, so this should be fine.
2010-03-15 17:32:55 +00:00
Sami Wagiaalla 13387711b2 2010-03-15 Sami Wagiaalla <swagiaal@redhat.com>
PR c++/7936:
        * cp-support.h: Added char *declaration element to using_direct
        data struct.
        (cp_add_using): Added char *declaration argument.
        (cp_add_using_directive): Ditto.
        (cp_lookup_symbol_imports): made extern.
        * cp-namespace.c: Updated with the above changes.
        * dwarf2read.c (read_import_statement): Ditto.
        (read_namespace): Ditto.
        (read_import_statement): Support import declarations.
        * cp-namespace.c (cp_lookup_symbol_imports): Check for imported
        declarations.
        Added support for 'declaration_only' search.
        (cp_lookup_symbol_namespace): Attempt to search for the name as
        is before consideration of imports.
        * symtab.c (lookup_symbol_aux_local): Added a 'declaration_only'
        search at every block level search.
        Now takes language argument.
        (lookup_symbol_aux): Updated.

    2010-03-15  Sami Wagiaalla  <swagiaal@redhat.com>

        * gdb.cp/shadow.exp: Removed kfail; test has been fix.
        * gdb.cp/nsusing.exp: Ditto.
2010-03-15 17:29:36 +00:00
Tom Tromey 6e31430b70 gdb
* c-exp.y (name_not_typename): Add 'operator' clause.
gdb/testsuite
	* gdb.cp/userdef.exp: Add tests for explicit calls to operator==.
	* gdb.cp/userdef.cc (operator==): New function.
	(main): New locals mem1, mem2.
2010-03-15 17:26:47 +00:00
Joel Brobecker 0f4b045ab1 Fix date in latest entry. 2010-03-15 17:06:41 +00:00
Joel Brobecker bf3071347e Fail gdb configure if target is not supported.
* configure.ac: Exit if ${gdb_target_obs}" is not set.
        * configure: Regenerate.
2010-03-15 17:03:03 +00:00
Andreas Schwab 64daa791ab * configure.srv: Fix typo setting srv_regobj. 2010-03-15 16:35:29 +00:00
Jan Kratochvil 4d9743afc8 gdb/
* symfile.c (addr_info_make_relative): Ignore also missing ".dynbss"
	and ".sdynbss".  Update the comment.
2010-03-15 09:31:34 +00:00
Jie Zhang f75150fead * MAINTAINERS: Update my email address. 2010-03-15 03:48:46 +00:00
Jie Zhang e2d69cb505 * lib/mi-support.exp (mi_gdb_target_load): Delete unused timeout var.
Declare and use new loadtimeout variable.
2010-03-15 03:43:13 +00:00
Daniel Jacobowitz f572f0a930 * gdb.base/printcmds.exp: Use gdb_file_cmd instead of gdb_load.
Use gdb_load later.
2010-03-15 02:57:57 +00:00
Daniel Jacobowitz 3c13bc11c3 * gdbtypes.h (TYPE_IS_OPAQUE): Correct HAVE_CPLUS_STRUCT check. 2010-03-15 02:42:54 +00:00
Pedro Alves f52cd8cdd8 * linux-low.c (fetch_register): Avoid passing a non string literal
format to `error'.
	(usr_store_inferior_registers): Ditto.
2010-03-15 00:31:16 +00:00
gdbadmin 19941bfa37 *** empty log message *** 2010-03-15 00:00:03 +00:00
Daniel Jacobowitz 43484f03bc * charset.c [USE_WIN32API]: Include <windows.h>.
(_initialize_charset): Correct type of w32_host_default_charset.
2010-03-14 22:38:38 +00:00
Pedro Alves 93ae6fdc31 * linux-low.c (linux_write_memory): Bail out early if peeking
memory failed.
2010-03-14 19:34:47 +00:00
Pedro Alves c3adc08c6f * linux-low.h (struct lwp_info): New fields
`stopped_by_watchpoint' and `stopped_data_address'.
	* linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
	here, and cache them in the lwp object.
	(wait_for_sigstop): Check stopped_by_watchpoint lwp field
	directly.
	(linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
	field.
	(linux_stopped_by_watchpoint): Rewrite.
	(linux_stopped_data_address): Rewrite.
2010-03-14 18:46:40 +00:00
Pedro Alves 51f4c0b08e * gdb.base/solib-disc.c (main): Make format of fprintf a string
literal.  Add missing endlines to prints to stderr.
2010-03-14 17:46:51 +00:00
Pedro Alves 5f25d77d67 * infrun.c (ptid_match): Don't assert that PTID is not a pid ptid. 2010-03-14 17:35:21 +00:00
gdbadmin 005c61b77b *** empty log message *** 2010-03-14 00:00:03 +00:00
Tom Tromey 1c809c6883 gdb
PR c++/9708:
	* dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: A variable
	in a lexical block does not need a namespace.
	(new_symbol) <DW_TAG_variable>: Put extern variables on
	list_in_scope in all cases.
gdb/testsuite
	PR c++/9708:
	* gdb.cp/m-static.exp: Add regression test.
	* gdb.cp/m-static.cc (method): New method.
	(main): Call it.
2010-03-13 00:27:12 +00:00
gdbadmin e0ce539c57 *** empty log message *** 2010-03-13 00:00:33 +00:00
Stan Shebs 948103cf34 2010-03-12 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (gen_expr): Add shift expressions.
	(gen_expr_binop_rest): Ditto.
2010-03-12 23:13:19 +00:00
Sami Wagiaalla 00ae8fef88 2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
* buildsym.c (finish_block): Reset using_directives pointer
	after block initialization.


2010-03-12  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/gdb2384-base.h: Created 'namespace B'.
	* gdb.cp/gdb2384-base.cc: Use 'namespace B'.
2010-03-12 21:13:15 +00:00
Pedro Alves 21e24d2119 gdb/testsuite/
* lib/gdb.exp (gdb_test_multiple): Handle -timeout.
2010-03-12 21:07:51 +00:00
Pedro Alves 759f0f0b7b gdb/testsuite/
* lib/gdb.exp (skip_stl_tests): New.
	(gdb_compile): Symbian needs -ldl.
	(shlib_target_file): New.
	(shlib_symbol_file): New.
	(gdb_load_shlibs): Use shlib_target_file.
	* lib/mi-support.exp (mi_load_shlibs): Use shlib_target_file.
	* gdb.cp/exception.exp: Use skip_stl_tests.
	* gdb.cp/bs15503.exp: Use skip_stl_tests.  Use untested.
	* gdb.cp/try_catch.exp: Use skip_stl_tests.
	* gdb.cp/mb-templates.exp: Ditto.
	* gdb.base/commands.exp: Relax regexes.
	* gdb.base/watchpoint-solib.exp: Don't skip on symbian.  Use
	shlib_target_file and shlib_symbol_file.
	* gdb.base/maint.exp: Allow lowercase t.  Allow .rodata in
	sections.
	* gdb.base/ending-run.exp: Accept E32Main for symbian.
	* gdb.base/solib-disc.exp: Use
	shlib_target_file and shlib_symbol_file.
	* gdb.base/unload.exp: Don't skip on symbian.  Use
	shlib_target_file and shlib_symbol_file.
	* gdb.base/list.exp: Check use_gdb_stub instead of is_remote.
2010-03-12 19:17:01 +00:00
Stan Shebs c942923237 2010-03-12 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* gdb.texinfo (Tracepoint Actions): Clarify that while-stepping is
	doing instruction stepping.
	(Tracepoint Restrictions): New node.
2010-03-12 19:15:52 +00:00
H.J. Lu 9cad29ac31 Restore sp for x86.
2010-03-12  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_word_names): Replace "sp" with "".
	* i386-tdep.c (i386_word_names): Likewise.
2010-03-12 15:12:35 +00:00
Pedro Alves 6a8f26716a * gdb.trace/backtrace.exp: Adjust for x86 and x86_64.
* gdb.trace/report.exp: Adjust for x86 and x86_64.
	Issue a tfind end before looking for a tracepoint frame.
	* gdb.trace/tfind.exp: Adjust tstatus output.
	Adjust disassembly output.
	* gdb.trace/while-dyn.exp: Adjust for x86 and x86_64.
2010-03-12 04:04:40 +00:00
Pedro Alves 2f4d88753b * target.c (memory_xfer_partial): Don't use the stack cache if
inspecting trace frames.
	* tracepoint.c (finish_tfind_command): Invalidate the target
	dcache.
2010-03-12 03:54:45 +00:00
gdbadmin 313660f395 *** empty log message *** 2010-03-12 00:01:04 +00:00
Jan Kratochvil ccf2624776 gdb/
* solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
	for the PIC displacement, print also the displacement value.
	(svr4_exec_displacement):  Print DISPLACEMENT if INFO_VERBOSE.

gdb/testsuite/
	* gdb.base/break-interp.exp: Create new displacement parameter value
	for the test_ld calls.
	(reach): New parameter displacement, verify its content.  New push of
	pf_prefix "reach-$func:".  Import global expect_out.
	(test_core): New parameter displacement, verify its content.  New push
	of pf_prefix "core:".  New command "set verbose on".  Import global
	expect_out.
	(test_attach): New parameter displacement, verify its content.  New
	push of pf_prefix "attach:".  New command "set verbose on".  Import
	global expect_out.
	(test_ld): New parameter displacement, pass it to the reach, test_core
	and test_attach calls and verify its content in the "ld.so exit" test.
	* gdb.base/prelink.exp: Remove gdb_exit and final return.
	(prelink): Update expected text, use gdb_test.
2010-03-11 22:07:03 +00:00
Kevin Buettner 477c84a75f * remote-mips.c (close_ports, mips_initialize_cleanups)
(mips_exit_cleanups, mips_send_command, mips_open, pmon_open)
	(ddb_open, lsi_open, mips_remove_breakpoint, mips_remove_watchpoint)
	(mips_stopped_by_watchpoint, send_srec, pmon_checkset)
	(pmon_make_fastrec, pmon_check_ack, mips_expect_download)
	(pmon_check_entry_address, pmon_check_total, pmon_end_download)
	(pmon_download, pmon_load_fast, _initialize_remote_mips): Add
	comments describing each of these functions.
	(mips_enter_debug, mips_exit_debug, common_open)
	(mips_signal_from_protocol, pmon_makeb64, pmon_zeroset): Add
	blank line after the comment describing the function.
2010-03-11 03:45:49 +00:00
Doug Evans e469c7fb68 * gdb.base/checkpoint.exp: Fix comment.
Lengthen timeout while doing >600 checkpoints test.
	Rename duplicate "kill all one" test to keep test names unique.
2010-03-11 00:20:29 +00:00
gdbadmin 90b21eb72d *** empty log message *** 2010-03-11 00:00:03 +00:00
Jan Kratochvil 01c30d6e99 gdb/
* solib-svr4.c (svr4_exec_displacement): Return now success, new
	parameter displacementp.  Update comment.
	(svr4_relocate_main_executable): Return if non-zero SECTION_OFFSETS
	element exists.  Return if svr4_exec_displacement was not successful.
	Update comment.
2010-03-10 20:55:44 +00:00
Jan Kratochvil 09919ac266 gdb/
* solib-svr4.c (read_program_header): Support type == -1 to read
	all program headers.
	(read_program_headers_from_bfd): New function.
	(svr4_static_exec_displacement): Remove and move the comment ...
	(svr4_exec_displacement): ... here.  Remove variable found.  New
	variable displacement.  Check also DYNAMIC.  Verify DISPLACEMENT
	alignment for ELF targets.  Compare target vs. exec_bfd PHDRs for ELF
	targets using read_program_headers_from_bfd.  Remove the call of
	svr4_static_exec_displacement.
2010-03-10 20:50:55 +00:00
Tom Tromey d146bf1edc * dwarf2read.c (struct pubnames_header): Remove.
(_PUBNAMES_HEADER): Remove.
	(_ACTUAL_PUBNAMES_HEADER_SIZE): Remove.
	(struct aranges_header): Remove.
	(_ARANGES_HEADER, _ACTUAL_ARANGES_HEADER_SIZE): Remove.
	(struct dwarf2_per_objfile) <pubnames, aranges>: Remove.
	(PUBNAMES_SECTION): Remove.
	(ARANGES_SECTION): Remove.
	(dwarf2_locate_sections): Don't handle pubnames or aranges.
	(dwarf2_build_psymtabs): Remove dead code.
	(dwarf2_build_psymtabs_easy): Remove.
2010-03-10 18:41:37 +00:00
Tom Tromey be391dcafc * elfread.c (elf_symfile_read): Don't call
dwarf2_build_frame_info.
	* dwarf2read.c (struct dwarf2_section_info) <readin>: New field.
	(struct dwarf2_per_objfile) <objfile>: New field.
	(dwarf2_has_info): Now idempotent.  Set objfile field.
	(dwarf2_read_section): Check and set readin field.  Call
	posix_madvise.
	(dwarf2_build_psymtabs): Don't read all sections.
	(read_type_comp_unit_head): Read types section.
	(create_debug_types_hash_table): Likewise.
	(init_cu_die_reader): Add asserts.
	(process_type_comp_unit): Add assert.
	(dwarf2_build_psymtabs_hard): Read info section.
	(load_partial_comp_unit): Add assert.
	(create_all_comp_units): Read info section.
	(load_full_comp_unit): Likewise.
	(dwarf2_ranges_read): Read ranges section.
	(dwarf2_record_block_ranges): Add assert.
	(dwarf2_read_abbrevs): Read abbrev section.
	(read_indirect_string): Read str section.
	(dwarf_decode_line_header): Read line section.
	(read_signatured_type_at_offset): Read types section.
	(dwarf_decode_macros): Read macinfo section.
	(dwarf2_symbol_mark_computed): Read loc section.
	* dwarf2-frame.c (dwarf2_frame_find_fde): Call
	dwarf2_build_frame_info.
	(dwarf2_build_frame_info): Unconditionally set
	dwarf2_frame_objfile_data on the objfile.
	* configure.ac: Check for posix_madvise.
	* config.in, configure: Rebuild.
2010-03-10 18:37:24 +00:00
Tom Tromey e38df1d074 * xcoffread.c (xcoff_start_psymtab): Update.
(xcoff_end_psymtab): Update.
	* psymtab.c (allocate_psymtab): Remove dead code.
	* psympriv.h (struct partial_symtab) <read_symtab_private>: Now
	void*.
	* mdebugread.c (parse_partial_symbols): Update.
	(new_psymtab): Likewise.
	* dwarf2read.c (process_psymtab_comp_unit): Update.
	(psymtab_to_symtab_1): Update.
	* dbxread.c (start_psymtab): Update.
	(end_psymtab): Likewise.
2010-03-10 18:27:00 +00:00
Tom Tromey ccefe4c44c gdb
* xcoffread.c: Include psymtab.h.
	(xcoff_sym_fns): Update.
	* symtab.h (struct partial_symbol): Remove.
	(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
	(struct partial_symtab): Remove.
	(PSYMTAB_TO_SYMTAB): Remove.
	(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): Declare.
	(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
	(find_main_psymtab): Remove.
	(find_main_filename): Declare.
	(fixup_psymbol_section): Remove.
	(fixup_section): Declare.
	* symtab.c: Include psymtab.h.
	(lookup_symtab): Use lookup_symtab method.
	(lookup_partial_symtab): Remove.
	(find_pc_sect_psymtab_closer): Remove.
	(find_pc_sect_psymtab): Remove.
	(find_pc_sect_symtab_via_partial): New function.
	(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
	(fixup_section): No longer static.
	(fixup_psymbol_section): Remove.
	(lookup_symbol_aux): Use lookup_symbol_aux_quick.
	(lookup_global_symbol_from_objfile): Likewise.
	(lookup_symbol_aux_psymtabs): Remove.
	(lookup_symbol_aux_quick): New function.
	(lookup_symbol_global): Use lookup_symbol_aux_quick.
	(lookup_partial_symbol): Remove.
	(basic_lookup_transparent_type_quick): New function.
	(basic_lookup_transparent_type): Use it.
	(find_main_psymtab): Remove.
	(find_main_filename): New function.
	(find_pc_sect_symtab): Use find_pc_sect_symtab method.
	(find_line_symtab): Use expand_symtabs_with_filename method.
	(output_partial_symbol_filename): New function.
	(sources_info): Use map_partial_symbol_filenames.
	(struct search_symbols_data): New type.
	(search_symbols_file_matches): New function.
	(search_symbols_name_matches): Likewise.
	(search_symbols): Use expand_symtabs_matching method.
	(struct add_name_data): Rename from add_macro_name_data.
	(add_macro_name): Update.
	(add_partial_symbol_name): New function.
	(default_make_symbol_completion_list): Use
	map_partial_symbol_names.
	(struct add_partial_symbol_name): New type.
	(maybe_add_partial_symtab_filename): New function.
	(make_source_files_completion_list): Use
	map_partial_symbol_filenames.
	(expand_line_sal): Use expand_symtabs_with_filename method.
	* symmisc.c: Include psymtab.h.
	(print_objfile_statistics): Use print_stats method.
	(dump_objfile): Use dump method.
	(dump_psymtab, maintenance_print_psymbols)
	(maintenance_info_psymtabs, maintenance_check_symtabs)
	(extend_psymbol_list): Remove.
	* symfile.h (struct quick_symbol_functions): New struct.
	(struct sym_fns) <qf>: New field.
	(sort_pst_symbols): Remove.
	(increment_reading_symtab): Declare.
	* symfile.c: Include psymtab.h.
	(compare_psymbols, sort_pst_symbols): Remove.
	(psymtab_to_symtab): Remove.
	(increment_reading_symtab): New function.
	(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
	method.
	(set_initial_language): Use find_main_filename.
	(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
	(free_named_symtabs): Remove unused code.
	(start_psymtab_common, add_psymbol_to_bcache)
	(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
	Remove.
	* stack.c: Include psymtab.h, symfile.h.
	(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
	* source.h (psymtab_to_fullname): Don't declare.
	* source.c: Include psymtab.h.
	(select_source_symtab): Use find_last_source_symtab method.
	(forget_cached_source_info): Use forget_cached_source_info
	method.
	(find_and_open_source): No longer static.
	(psymtab_to_fullname): Remove.
	* somread.c: Include psymtab.h.
	(som_sym_fns): Update.
	* psympriv.h: New file.
	* psymtab.h: New file.
	* psymtab.c: New file.
	* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
	(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
	* objfiles.c: Include psymtab.h.
	(objfile_relocate1): Use relocate method.
	(objfile_has_partial_symbols): Use has_symbols method.
	* mipsread.c: Include psymtab.h.
	(ecoff_sym_fns): Update.
	* mi/mi-cmd-file.c: Include psymtab.h.
	(print_partial_file_name): New function.
	(mi_cmd_file_list_exec_source_files): Use
	map_partial_symbol_filenames.
	* mdebugread.c: Include psympriv.h.
	* machoread.c: Include psympriv.h.
	(macho_sym_fns): Update.
	* m2-exp.y (yylex): Use lookup_symtab.
	* elfread.c: Include psympriv.h.
	(elf_sym_fns): Update.
	* dwarf2read.c: Include psympriv.h.
	* dbxread.c: Include psympriv.h.
	(aout_sym_fns): Update.
	* cp-support.c: Include psymtab.h.
	(read_in_psymtabs): Remove.
	(make_symbol_overload_list_qualified): Use
	expand_symtabs_for_function method.
	* coffread.c: Include psympriv.h.
	(coff_sym_fns): Update.
	* blockframe.c: Include psymtab.h.
	(find_pc_partial_function): Use find_pc_sect_symtab method.
	* ada-lang.h (ada_update_initial_language): Update.
	* ada-lang.c: Include psymtab.h.
	(ada_update_initial_language): Remove 'main_pst' argument.
	(ada_lookup_partial_symbol): Remove.
	(struct ada_psym_data): New type.
	(ada_add_psyms): New function.
	(ada_add_non_local_symbols): Use map_ada_symtabs method.
	(struct add_partial_datum): New type.
	(ada_add_partial_symbol_completions): New function.
	(ada_make_symbol_completion_list): Use map_partial_symbol_names.
	(ada_exception_support_info_sniffer): Update.
	* Makefile.in (SFILES): Add psymtab.c.
	(COMMON_OBS): Add psymtab.o.
	(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
	* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
Pierre Muller 7d8500b756 2010-03-10 Pierre Muller <muller@ics.u-strasbg.fr>
* remote-fileio.c (cygwin_conv_path): Define macro for old cygwin API.
2010-03-10 16:39:20 +00:00
Sami Wagiaalla c0cc3a7670 2010-03-09 Sami Wagiaalla <swagiaal@redhat.com>
PR C++/11236:
	* cp-namespace.c (cp_add_using): Deleted.
	(cp_add_using_directive): Use obstack allocations.
	Merged the function cp_add_using into this one.
	Added 'struct obstack *' argument.
	(cp_scan_for_anonymous_namespaces): Updated.
	* cp-support.h: Updated.
	* dwarf2read.c (read_import_statement): Updated.
	(read_namespace): Updated.
2010-03-10 16:22:29 +00:00
Christopher Faylor 452fa0647c * windows-nat.c (cygwin_conv_path): Remove old macro. 2010-03-10 15:57:07 +00:00
Pedro Alves 60e1c644b7 gdb/
* breakpoint.c (condition_command): Handle watchpoint conditions.
	(is_hardware_watchpoint): Add comment.
	(is_watchpoint): New.
	(update_watchpoint): Don't reparse the watchpoint's condition
	unless necessary.
	(WP_IGNORE): New.
	(watchpoint_check): Use it.
	(bpstat_check_watchpoint): Handle it.
	(bpstat_check_breakpoint_conditions): Evaluate watchpoint local
	conditions in a frame where it makes sense.
	(watch_command_1): Store the innermost block of the condition
	expression.
	(delete_breakpoint): Delete the watchpoint condition expression.
	* breakpoint.h (struct bp_location) <cond>: Update comment.
	(struct breakpoint): New fields `cond_exp' and
	`cond_exp_valid_block'.

	gdb/testsuite/
	* gdb.base/watch-cond.c, gdb.base/watch-cond.exp: New.
2010-03-10 13:25:40 +00:00
Joel Brobecker af6b7be16a Adjust handling of Ada DIEs after dwarf2_physname patch.
* dwarf2read.c (dwarf2_compute_name): Add handling of Ada DIEs.
2010-03-10 08:08:46 +00:00
gdbadmin 68221cbf73 *** empty log message *** 2010-03-10 00:00:04 +00:00
Christopher Faylor 60c5c0213a * windows-nat.c (cygwin_conv_path): Redefine to properly convert from/to
posix/win32.
(windows_make_so): Use non-Cygwin 1.7 specific function.
(windows_create_inferior): Make sure that cygallargs points to original args in
non Cygwin 1.7.  case.
2010-03-09 19:10:39 +00:00
Michael Snyder 60a1502afc 2010-03-09 Michael Snyder <msnyder@vmware.com>
* i386-tdep.c (i386_record_lea_modrm_addr): Use extract_signed_int
	after target_read_memory to get host byte order.
	(i386_process_record): Ditto.
2010-03-09 18:25:41 +00:00
Keith Seitz 94af9270db dwarf2_physname patchset:
Based on work from Daniel Jacobowitz  <dan@codesourcery.com>
	* c-typeprint.c (cp_type_print_method_args): For non-static methods,
	print out const or volatile qualifiers, too.
	(c_type_print_args): Add parameters show_artificial and language.
	Skip artificial parameters when requested.
	Use the appropriate language printer.
	(c_type_print_varspec): Tell c_type_print_args to skip artificial
	parameters and pass language_c.
	* dwarf2read.c (die_list): New file global.
	(struct partial_die_info): Update comments for name field.
	(pdi_needs_namespace): Renamed to ...
	(die_needs_namespace): ... this. Rewrite.
	(dwarf2_linkage_name): Remove.
	(add_partial_symbol): Do not predicate the call to
	partial_die_full_name based on pdi_needs_namespace.
	Remove call to cp_check_possible_namespace_symbols and associated
	outdated comments.
	(guess_structure_name): Do not inspect child subprogram DIEs.
	(dwarf2_fullname): Update comments.
	Use die_needs_namespace to assist in computing the name.
	(read_func_scope): Use dwarf2_name to get the DIE's name.
	Use dwarf2_physname to get the "linkage name" of the DIE.
	(dwarf2_add_member_field): Use dwarf2_physname instead of
	dwarf2_linkage_name.
	(read_structure_type): For structs and classes, set TYPE_NAME, too.
	(determine_class): Remove.
	(read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages
	except Ada.
	(new_symbol): Unconditionally call dwarf2_name.
	Compute the "linkage name" using dwarf2_physname.
	Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs.
	When determining to scan for anonymous C++ namespaces, ignore
	the linkage name.
	(dwarf2_physname): New function.
	(dwarf2_full_name): Move content to new function and call
	that.
	(dwarf2_compute_name): "New" function.
	(_initialize_dwarf2_read): Initialize die_list.
	* gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable
	physname.
	(gnu_v3_print_method_ptr): Use the physname for virtual methods
	without a demangled name.
	Print out type information for non-virtual methods.
        * linespec.c (decode_line_1): Force ANY string using "::" (or
	"." for java) to use decode_compound, and clean up any stray quoting.
        If we found a file symtab, re-evaluate whether the remainder is_quoted.
        (decode_compound): Stop consuming at an open parenthesis.
        Keep template parameters.
        Keep any overload information.
        Keep keywords like "const".
        Remove paren_pointer.
        Move is_quoted check from set_flags to here.
        Remove #if 0 code from 2000. Ten years is long enough.
        (find_method): Before comparing symbol names, canonicalize the string
        from the user.
        If a specific overload is requested, find it. Otherwise throw an error.
	(find_method_overload_end): New function.
	(set_flags): Remove.
        (decode_compound): Assume that parentheses are matched.
        It's a lot easier.
	* symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
	to cplus_demangle.
	* linespec.c (decode_line_1): Keep important keywords like
	"const" and "volatile".
	* symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove.
	* typeprint.h (c_type_print_args): Add declaration.
	* ui-file.c (do_ui_file_obsavestring): New function.
	(ui_file_obsavestring): New function.
	* ui-file.h (ui_file_obsavestring): Add declaration.
	* valops.c (find_overload_match): Resolve the object to
	a non-pointer type.
	If the object is a data member, search the object for the member
	and return with staticp set.
	Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME.
	Do not attempt to extract a function name from non-function types.
	If the extracted function name and the original name are the same,
	we don't have a C++ method.

	From Jan Kratochvil  <jan.kratochvil@redhat.com>:
    	* dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name.

	* ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters
	and arguments from symbol lookups.
	* ax-gdb.c (gen_expr): Likewise.
	* cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope,
	cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type,
	lookup_possible_namespace_symbol): Likewise.
	* cp-support.c (read_in_psymtabs): Likewise.
	* cp-support.h (cp_lookup_symbol_nonlocal): Likewise.
	* language.h (la_lookup_symbol_nonlocal): Likewise.
	* scm-valprint.c (scm_inferior_print): Likewise.
	* solib-darwin.c (darwin_relocate_section_addresses): Likewise.
	* solib-svr.c (elf_lookup_lib): Likewise.
	* solib.c (show_auto_solib_add): Likewise.
	* solist.h (lookup_lib_global, solib_global_lookup): Likewise.
	* symmisc.c (maintenance_check_symtabs): Likewise.
	* symtab.c (lookup_symbol_in_language, lookup_symbol_aux,
	lookup_symbol_aux_local, lookup_symbol_aux_block,
	lookup_symbol_from_objfile, lookup_symbol_aux_symtabs,
	lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal,
	lookup_symbol_static, lookup_symbol_global, symbol_matches_domain,
	basic_lookup_transparent_type, find_main_psymtab,
	lookup_block_symbol): Likewise.
	* symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static,
	lookup_symbol_global, lookup_symbol_aux_block,
	lookup_symbol_partial_symbol, lookup_block_symbol,
	lookup_global_symbol, value_maybe_namespace_elt): Likewise.
2010-03-09 18:09:08 +00:00
Keith Seitz cec808ecec * gdb.cp/cp-relocate.exp: Remove single-quoting of C++ methods.
* gdb.cp/cplusfuncs.cc (dm_type_short): New function.
        (dm_type_long): New function.
        (dm_type_unsigned_short): New function.
        (dm_type_unsigned_long): New function.
        (myint): New typedef.
        * gdb.cp/cplusfuncs.exp (probe_demangler): Add tests for short,
        long, unsigned shor and long, operator char*, and typedef.
        (test_lookup_operator_functions): Add operator char* test.
        (test_paddr_operator_functions): Likewise.
        (test_paddr_overloaded_functions): Use probe values for
        short, long, and unsigned short and long.
        (test_paddr_hairy_functions): If the demangler probe detected
        gdb type printers, "expect" them. Otherwise "expect" the v2 or v3
        demangler.
        * gdb.cp/expand-sals.exp: Backtrace may contain class names.
        * gdb.cp/member-ptr.exp: Refine expected result for "print pmf"
        and "print null_pmf".
        Add test "ptype a.*pmf".
        * gdb.cp/overload.exp: Allow optional "int" to appear with
        "short" and "long".
        * gdb.cp/ovldbreak.exp: Use append to construct super-duper
        long expect value for men_overload1arg.
        Allow "int" to appear with "short" and "long".
        When testing "info break", add argument for main (void).
        Also allow "int" to appear with "short" and "long".
        Ditto with "unsigned" and "long long".
	* gdb.java/jmain.exp: Do not enclose methods names in single
	quotes.
	* gdb.java/jmisc.exp: Likewise.
	* gdb.java/jprint.exp: Likewise.
	* gdb.python/py-symbol.exp: Update expected "linkage_name" value.

	From Jan Kratochvil  <jan.kratochvil@redhat.com>:
	* gdb.cp/exception.exp (backtrace after first throw)
	(backtrace after second throw): Allow a namespace before __cxa_throw.
	(backtrace after first catch, backtrace after second catch): Allow
	a namespace before __cxa_begin_catch.

	* gdb.cp/cpexprs.exp: New file.
	* gdb.cp/cpexprs.cc: New file.

	From Daniel Jacobowitz  <dan@codesourcery.com>
	* gdb.cp/cpexprs.exp (escape): Delete.  Change all callers
	to use string_to_regexp.
	(ctor, dtor): New functions.  Use them to match constructor
	and destructor function types.
	(Top level): Use runto_main.
2010-03-09 18:08:05 +00:00
Pierre Muller 9cb74f47a1 * python/python-internal.h: Include symtab.h. 2010-03-09 17:12:40 +00:00
Pierre Muller e13eedd538 * p-lang.c (is_pascal_string_type): Remove unneeded parentheses.
* p-valprint.c (pascal_val_print): Remove undeed block and fix
	indentation.
2010-03-09 08:30:54 +00:00
gdbadmin 840a467a0a *** empty log message *** 2010-03-09 00:00:33 +00:00
Tom Tromey bad5601415 * breakpoint.c (breakpoint_1): Add "QUIT". 2010-03-08 20:21:48 +00:00
Pedro Alves 081058572d * solib.c (solib_find): Replace extension if
solib_symbols_extension is set in the target gdbarch.
	* arm-symbian-tdep.c (arm_symbian_init_abi): Set
	solib_symbols_extension to "sym".
	* gdbarch.sh (solib_symbols_extension): New variable.
	(pstring): New function.
	* gdbarch.h, gdbarch.c: Regenerate.
2010-03-08 19:28:27 +00:00
Tom Tromey 7c95393435 gdb
PR cli/9591:
	* NEWS: Update.
	* utils.c: Include main.h.
	(fputs_maybe_filtered): Don't paginate if `batch_flag'.
	(defaulted_query): Use default answer if `batch_flag'.
	* main.h (batch_flag): Declare.
	* main.c (batch_flag): New global.
	(captured_main): Remove 'batch'.  Update.
gdb/doc
	PR cli/9591:
	* gdb.texinfo (Mode Options): Mention lack of pagination and
	confirmation with --batch.
	(Screen Size): Mention --batch.
	(Messages/Warnings): Likewise.
2010-03-08 19:20:38 +00:00