Commit Graph

29298 Commits

Author SHA1 Message Date
Sanjoy Das 784c47ee81 gdb/
* jit.c: Include gdb-dlfcn.h.
	(loaded_jit_reader, reader_init_fn_sym): New static variables.
	(jit_reader_load, jit_reader_load_command)
	(jit_reader_unload_command): New functions.
	(_initialize_jit): Add commands "jit-reader-load" and
	"jit-reader-unload".
2011-11-20 09:09:56 +00:00
Sanjoy Das a2d08b9eeb gdb/
* Makefile.in: Add gdb-dlfcn.c and gdb-dlfcn.h to build system.
	* config.in: Add new #define HAVE_LIBDL.
	* configure.ac: Add check for -ldl.
	* configure: Re-generated by autoconf.
	* gdb-dlfcn.c: New file.
	* gdb-dlfcn.h: New file.
2011-11-20 08:59:56 +00:00
Sanjoy Das b8e0a31cb5 gdb/
* config.in: Add new #defines: JIT_READER_DIR and
	JIT_READER_DIR_RELOCATABLE.
	* configure.ac: New GDB directory entry for jit-reader-dir.
	* configure: Re-generated by autoconf.
	* jit.c: New static variable: const char *jit_reader_dir.
	(_initialize_jit): Relocate jit_reader_dir.
2011-11-20 08:53:25 +00:00
Sanjoy Das f997c38354 gdb/
* Makefile.in: Add jit-reader.h as a header.  Have it installed in
	$(includedir)/gdb.
	* configure.ac: Generate a correct value for TARGET_PTR for
	jit-reader.h.  Tell configure to generate jit-reader.h from
	jit-reader.in.
	* configure: Re-generated by autoconf.
	* jit-reader.in: New file.
	* jit.c: Include jit-reader.h.
2011-11-20 08:30:59 +00:00
Sanjoy Das dc8c0494f2 gdb/
* MAINTAINERS (Write After Approval): Add myself to the list.
2011-11-20 08:09:52 +00:00
gdbadmin 12a0339399 *** empty log message *** 2011-11-20 00:00:32 +00:00
gdbadmin 9b8fcf90e1 *** empty log message *** 2011-11-19 00:00:03 +00:00
Ulrich Weigand 01efb93640 * findvar.c (read_frame_register_value): Respect value_offset
of the register value.  Remove big-endian special case.
2011-11-18 20:03:42 +00:00
Tom Tromey 732f3f122e PR build/7196:
* remote.c (putpkt_for_catch_errors): New function.
	(remote_kill): Use it.
2011-11-18 15:38:58 +00:00
Yao Qi bfccc43c12 gdb/
* breakpoint.c (create_breakpoint): Produce query message according to
	breakpoint's type.
	Allocate tracepoint per correct type.
	Don't check SALs for pending fast tracepoints.
	* tracepoint.c (process_tracepoint_on_disconnect): New.
	(disconnect_tracing): Call process_tracepoint_on_disconnect.

gdb/doc/
	* gdb.texinfo (Create and Delete Tracepoints): Mention pending
	tracepoint.

gdb/testsuite/
	* gdb.trace/pending.exp: New.
	* gdb.trace/pending.c: New.
	* gdb.trace/pendshr1.c: New.
	* gdb.trace/pendshr2.c: New.
	* gdb.trace/change-loc.exp (tracepoint_change_loc_1): Check one
	tracepoint location becomes pending.
	(tracepoint_change_loc_2): New.
2011-11-18 01:21:35 +00:00
Yao Qi 3ea46bff73 * breakpoint.c (install_breakpoint): Add one more parameter so that
update_global_location_list is called conditionally.
	(create_fork_vfork_event_catchpoint): Update.
	(create_syscall_event_catchpoint): Update.
	(create_breakpoint_sal): Update.
	(create_breakpoint_sal): Update. Call do_cleanups before
	install_breakpoint.
	* ada-lang.c (create_ada_exception_catchpoint): Update.
	* breakpoint.h (install_breakpoint): Update declaration.
2011-11-18 01:03:51 +00:00
gdbadmin bb8ed79b6a *** empty log message *** 2011-11-18 00:00:03 +00:00
gdbadmin 715e99ef38 *** empty log message *** 2011-11-17 00:00:03 +00:00
Ulrich Weigand 598cfb7174 * spu-tdep.c (spu_return_value): Fix handling of
TYPE_CALLING_CONVENTION annotation.
2011-11-16 18:30:09 +00:00
Ulrich Weigand caf4328c57 * skip.c (skip_function_command): Work around uninitialized
variable warning.
2011-11-16 18:29:34 +00:00
David S. Miller 73cd8ab132 * lib/gdb.exp (can_single_step_to_signal_handler): Return zero when
target is sparc*-*-linux*
2011-11-16 18:16:27 +00:00
David S. Miller 2b54dda2fa * utils.c (report_command_stats): Cast delta_wall_time 'tv_sec' and
'tv_usec' to long for printf since these fields have a type which
	varies.
2011-11-16 18:14:53 +00:00
gdbadmin e3631f0d29 *** empty log message *** 2011-11-16 00:00:03 +00:00
Doug Evans 93bf33fd99 * buildsym.c (add_symbol_to_list): Delete outdated comment. 2011-11-15 23:12:30 +00:00
Pierre Muller 8de33dc288 Obvious: Fix error in name of concerned macro ETIMEDOUT 2011-11-15 22:04:43 +00:00
Paul Koning 7742673004 * gdb.python/py-type.exp: New testcases for exceptions on scalar types 2011-11-15 21:17:40 +00:00
Paul Koning 9cc10fd150 * python/py-type.c (typy_get_composite): New function.
(typy_nonzero): New function.
(typy_values): Rename from typy_fields.
(typy_fields): New function.
(typy_length): Raise exception if not struct, union, or enum type.
(typy_getitem): Ditto.
(typy_has_key): Ditto.
(typy_make_iter): Ditto.
2011-11-15 21:17:04 +00:00
Doug Evans c011a4f469 * NEWS: Mention new parameter basenames-may-differ.
* dwarf2read.c (dw2_lookup_symtab): Avoid calling gdb_realpath if
	! basenames_may_differ.
	* psymtab.c (lookup_partial_symtab): Ditto.
	* symtab.c (lookup_symtab): Ditto.
	(basenames_may_differ): New global.
	(_initialize_symtab): New parameter basenames-may-differ.
	* symtab.h (basenames_may_differ): Declare.

	doc/
	* gdb.texinfo (Files): Document basenames-may-differ.
2011-11-15 17:40:02 +00:00
Luis Machado 865ecab4b2 2011-11-15 Pedro Alves <pedro@codesourcery.com>
Luis Machado  <lgustavo@codesourcery.com>

	* auxv.c: Include observer.h.
	(auxv_inferior_data_cleanup): New.
	(invalidate_auxv_cache_inf): New.
	(invalidate_auxv_cache): New.
	(get_auxv_inferior_data): New.
	(auxv_inferior_data): New static global.
	(auxv_info): New structure.
	(target_auxv_search): Use get_auxv_inferior_data instead of
	target_read_alloc and don't free cached buffers.
	(fprint_target_auxv): Likewise
	(_initialize_auxv): Register per-inferior auxv cache and register
	observers to invalidate auxv cache when needed.
2011-11-15 13:17:05 +00:00
Doug Evans ed59ded5eb Make "!" an alias for "shell".
* NEWS: Add mention.
	* cli/cli-cmds.c (init_cli_cmds): Remove xdb_commands condition on
	adding "!" command, always add it.
	* cli/cli-decode.c (find_command_name_length): Recognize "!" as a
	command of length one.

	doc/
	* gdb.texinfo (Shell Commands): Document "!".

	testsuite/
	* gdb.base/shell.exp: New file.
2011-11-15 05:06:35 +00:00
Yao Qi 3ccd4ac6d3 Fix broken changelog entry. 2011-11-15 01:07:44 +00:00
gdbadmin 43ecc66e5d *** empty log message *** 2011-11-15 00:00:03 +00:00
Stan Shebs 405f8e9499 2011-11-14 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* NEWS: Document shorter fast tracepoints and qTMinFTPILen packet.
	* i386-tdep.c (i386_fast_tracepoint_valid_at): Query target for
	the minimum instruction size for fast tracepoints.
	* target.h (struct target_ops): Add new method
	to_get_min_fast_tracepoint_insn_len.
	(target_get_min_fast_tracepoint_insn_len): New.
	* target.c (update_current_target): Set up new target operation.
	* remote.c (remote_write_bytes_aux): Fix typo.
	(remote_get_min_fast_tracepoint_insn_len): New.
	(init_remote_ops): Initialize new field.

	* gdb.texinfo (Create and Delete Tracepoints): Describe what is
	needed to get shorter fast tracepoints.
	(Tracepoint Packets): Document new qTMinFTPILen packet.

	* linux-x86-low.c (small_jump_insn): New.
	(i386_install_fast_tracepoint_jump_pad): Add arguments for
	trampoline and error message, build a trampoline and issue a small
	jump instruction to it.
	(x86_install_fast_tracepoint_jump_pad): Add arguments for
	trampoline and error message.
	(x86_get_min_fast_tracepoint_insn_len): New.
	(the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
	* linux-low.h (struct linux_target_ops): Add arguments to
	install_fast_tracepoint_jump_pad operation, add new operation.
	* linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
	arguments.
	(linux_get_min_fast_tracepoint_insn_len): New function.
	(linux_target_op): Add new operation.
	* tracepoint.c (gdb_trampoline_buffer): New IPA variable.
	(gdb_trampoline_buffer_end): Ditto.
	(gdb_trampoline_buffer_error): Ditto.
	(struct ipa_sym_addresses): Add fields for new IPA variables.
	(symbol_list): Add entries for new IPA variables.
	(struct tracepoint): Add fields to hold the address range of the
	trampoline used by the tracepoint.
	(trampoline_buffer_head): New static variable.
	(trampoline_buffer_tail): Ditto.
	(claim_trampoline_space): New function.
	(have_fast_tracepoint_trampoline_buffer): New function.
	(clone_fast_tracepoint): Fill in trampoline fields of tracepoint
	structure.
	(install_fast_tracepoint): Ditto, also add error buffer argument.
	(cmd_qtminftpilen): New function.
	(handle_tracepoint_query): Add response to qTMinFTPILen packet.
	(fast_tracepoint_from_trampoline_address): New function.
	(fast_tracepoint_collecting): Handle trampoline as part of jump
	pad space.
	(set_trampoline_buffer_space): New function.
	(initialize_tracepoint): Initialize new IPA variables.
	* target.h (struct target_ops): Add arguments to
	install_fast_tracepoint_jump_pad operation, add new
	get_min_fast_tracepoint_insn_len operation.
	(target_get_min_fast_tracepoint_insn_len): New.
	(install_fast_tracepoint_jump_pad): Add arguments.
	* server.h (IPA_BUFSIZ): Define.
	* linux-i386-ipa.c: Include extra header files.
	(initialize_fast_tracepoint_trampoline_buffer): New function.
	(initialize_low_tracepoint): Call it.
	* server.h (set_trampoline_buffer_space): Declare.
	(claim_trampoline_space): Ditto.
	(have_fast_tracepoint_trampoline_buffer): Ditto.

	* gdb.trace/ftrace.c: New.
	* gdb.trace/ftrace.exp: New.
2011-11-14 20:07:25 +00:00
Tom Tromey 3e05895e9e * tracepoint.c (encode_actions_1): Use the location's gdbarch.
(encode_actions): Likewise.
2011-11-14 16:10:18 +00:00
Yao Qi 1e4d17643d gdb/
* remote.c (struct remote_state): <install_in_trace> new field.
	(PACKET_InstallInTrace): New enum value.
	(remote_install_in_trace_feature): Support InstallInTrace.
	(remote_supports_install_in_trace): Likewise.
	(remote_protocol_features): Likewise.
	(_initialize_remote): Likewise.
	(remote_can_download_tracepoint): New.
	* target.h (struct target): New field
	`to_can_download_tracepoint'.
	(target_can_download_tracepoint): New macro.
	* target.c (update_current_target): Update.
	* breakpoint.h (struct bp_location): Add comment on field
	`duplicate'.
	(should_be_inserted): Don't differentiate breakpoint and tracepoint.
	(remove_breakpoints): Don't remove tracepoints.
	(tracepoint_locations_match ): New.
	(breakpoint_locations_match): Call it.
	(disable_breakpoints_in_unloaded_shlib): Handle tracepoint.
	(download_tracepoint_locations): New.
	(update_global_location_list): Call it.
	* tracepoint.c (find_matching_tracepoint): Delete.
	(find_matching_tracepoint_location): Renamed from
	find_matching_tracepoint.  Return bp_location rather than
	tracepoint.
	(merge_uploaded_tracepoints): Set `inserted' field to 1 if
	tracepoint is found.

gdb/doc/
	* gdb.texinfo (Create and Delete Tracepoints): Describe changed
	behavior of tracepoint.
	(General Query Packets): New feature InstallInTrace.
	(Remote Configuration): Document "set remote
	install-in-trace-packet".

gdb/gdbserver/
	* server.c (handle_query): Handle InstallInTrace for qSupported.
	* tracepoint.c (add_tracepoint): Sort list.
	(install_tracepoint, download_tracepoint): New.
	(cmd_qtdp): Call them to install and download tracepoints.
	(sort_tracepoints): Removed.
	(cmd_qtstart): Update.

gdb/testsuite/
	* gdb.trace/change-loc-1.c: New.
	* gdb.trace/change-loc-2.c: New.
	* gdb.trace/change-loc.c: New.
	* gdb.trace/change-loc.exp:  New.
	* gdb.trace/change-loc.h:  New.
	* gdb.trace/trace-break.c (marker): Define new symbol.
	* gdb.trace/trace-break.exp (break_trace_same_addr_5):
        New.
	(break_trace_same_addr_6): New.
2011-11-14 15:18:54 +00:00
Yao Qi 5c73ff4ec2 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
* mem-break.h: Declare.
	* tracepoint.c (cmd_qtstart): Move some code to ...
	(clone_fast_tracepoint, install_fast_tracepoint): ... here.
	New.
	(download_tracepoints): Move some code to ...
	(download_tracepoint_1): ... here.  New.
2011-11-14 14:38:41 +00:00
Yao Qi e8ba31153a * target.h (struct target): <to_download_tracepoint> Change type
of parameter from tracepoint to bp_location.
	* target.c (update_current_target): Update.
	* tracepoint.c (start_tracing): Update.
	* remote.c (remote_download_tracepoint): Remove loop for each location
	of a tracepoint.
2011-11-14 14:11:36 +00:00
Maciej W. Rozycki edcc485a36 * i386-nat.c (i386_insert_hw_breakpoint): Call
i386_update_inferior_debug_regs.
	(i386_remove_hw_breakpoint): Likewise.
2011-11-14 13:11:58 +00:00
Yao Qi 3742cc8b4f * breakpoint.c (init_raw_breakpoint): Call
add_location_to_breakpoint to replace duplicated code.
	(add_location_to_breakpoint): Adjust the breakpoint's
	address prior to allocating a location.
2011-11-14 03:01:01 +00:00
gdbadmin 8c19ceefad *** empty log message *** 2011-11-14 00:00:32 +00:00
gdbadmin 0847b2ea3f *** empty log message *** 2011-11-13 00:00:03 +00:00
matt rice 71eba9c25e Move info definitions command to an info macro option. 2011-11-12 17:01:12 +00:00
gdbadmin 30fc0b956b *** empty log message *** 2011-11-12 00:00:33 +00:00
Keith Seitz 1d93e29a97 PR gdb/12843
* gdb.base/linespecs.exp: New file.
2011-11-11 19:53:12 +00:00
Keith Seitz 731971ed4b PR gdb/12843
* linespec.c (locate_first_half): Keep ':' if it looks
	like it could be part of a Windows path starting with
	a drive letter.
2011-11-11 19:52:46 +00:00
Doug Evans a4b5b48aa8 * gdb.threads/print-threads.exp: Extend timeout for slower
tests.
2011-11-11 17:36:07 +00:00
Tom Tromey e0f8f636bd * gdb.texinfo (Compilation): Don't mention -gdwarf-2. Link to GCC
manual.
	(Variables): Don't mention -gdwarf-2.  Link to Compilation node.
	(Macros): Add a footnote.
	(C): Remove paragraph about compiler options.
	(C Constants): Mention wide character and string constants.
	(C Plus Plus Expressions): Update compiler option advice.  Mention
	using declarations.  Mention ADL.  Remove old HP compiler
	information.
2011-11-11 16:56:47 +00:00
Tom Tromey 625c0d4785 PR c++/9257:
* gdb.texinfo (Print Settings): Add an extra note about the need
	for a vtable.
2011-11-11 15:07:57 +00:00
Doug Evans 74e2f25548 * dwarf2read.c (dw2_map_symbol_filenames): New parameter
`need_fullname'.
	* psymtab.c (map_symbol_filenames_psymtab): Ditto.
	(map_partial_symbol_filenames): Ditto.  All callers updated.
	* psymtab.h (map_partial_symbol_filenames): Update prototype.
	* symfile.h (struct quick_symbol_functions, map_symbol_filenames): New
	parameter need_fullname.
2011-11-11 00:43:04 +00:00
gdbadmin 3d88bd9200 *** empty log message *** 2011-11-11 00:00:33 +00:00
Doug Evans 256f06f3f6 * psymtab.c (psymtab_to_fullname): Use cached copy if it exists.
* source.c (symtab_to_fullname): Ditto.
2011-11-10 22:14:16 +00:00
Doug Evans 50f182aa66 * defs.h (is_cplus_marker, set_demangling_style): Moved to ...
* gdb-demangle.h: ... here.  New file.
	* demangle.c: #include "gdb-demangle.h".
	(_initialize_demangler): Use initialize_file_ftype for prototype.
	Move "set demangle" and "set asm-demangle" parameters here from utils.c
	(demangle, show_demangle, asm_demangle, show_asm_demangle): Move here
	from utils.c
	* utils.c: Update. #include "gdb-demangle.h".
	* symtab.h (asm_demangle): Delete.
	(demangle): Move declaration next to use.
	* breakpoint.c: #include "gdb-demangle.h" instead of "demangle.h".
	* dwarf2read.c: #include "gdb-demangle.h".
	* gnu-v2-abi.c: Ditto.
	* jv-typeprint.c: Ditto.
	* mdebugread.c: Ditto.
	* p-typeprint.c: Ditto.
	* stabsread.c: Ditto.
	* printcmd.c: Ditto.
	(asm_demangle): Delete declaration.
	* tui/tui-stack.c: #include "gdb-demangle.h".
2011-11-10 20:21:29 +00:00
Pedro Alves 6953d2240a 2011-11-10 Pedro Alves <pedro@codesourcery.com>
gdb/
	* linux-nat.c (linux_nat_wait): Don't force waking up the event
	loop when returning a TARGET_WAITKIND_NO_RESUMED.
2011-11-10 20:17:52 +00:00
Pedro Alves 0c94aa73a0 2011-11-10 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.c (target_waitstatus_to_string): Handle
	TARGET_WAITKIND_NO_RESUMED.
2011-11-10 20:07:51 +00:00
Doug Evans 792a023056 * gdb.reverse/i387-env-reverse.exp: Extend timeout of
"record to end of main" test.
2011-11-10 19:22:07 +00:00