Commit Graph

26770 Commits

Author SHA1 Message Date
gdbadmin cb97a5c52e *** empty log message *** 2010-06-26 00:00:04 +00:00
Ulrich Weigand 070c802839 * solib-spu.c (append_ocl_sos): Fix xsnprintf statement for
hosts where CORE_ADDR is long long.
2010-06-25 22:00:59 +00:00
Sami Wagiaalla 4656f5c643 Added NEWS entry about C++ improvements. 2010-06-25 18:19:31 +00:00
Tom Tromey bc9f0842f1 gdb
PR python/10808:
	* python/python.c (execute_gdb_command): Add keywords.  Accept
	"to_string" argument.
	(struct restore_ui_file_closure): New.
	(restore_ui_file): New function.
	(make_cleanup_restore_ui_file): Likewise.
	(GdbMethods) <execute>: Update.
gdb/doc
	PR python/10808:
	* gdb.texinfo (Basic Python): Document new gdb.execute argument.
gdb/testsuite
	PR python/10808:
	* gdb.python/python.exp: Add new tests.
2010-06-25 18:15:18 +00:00
Sami Wagiaalla 099ef718e3 Added import loop test.
2010-06-25  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/operator.cc: Created an import loop.
	* gdb.cp/operator.exp: Added testcase for import loop.
2010-06-25 18:05:30 +00:00
Ulrich Weigand c0cc4c83bd * s390-tdep.c (s390_push_dummy_call): Error on stack overflow
during inferior call stack frame setup.
2010-06-25 17:47:29 +00:00
Ulrich Weigand f1d8ee6626 2010-06-25 Ken Werner <ken.werner@de.ibm.com>
* solib-spu.c: Include "exception.h".
	(ocl_program_data_key): New variable.
        (append_ocl_sos): New function.
        (ocl_enable_break): Likewise.
	(spu_current_sos): Call append_ocl_sos.
	(spu_solib_loaded): Call ocl_enable_break.
	(_initialize_spu_solib): Register ocl_program_data_key.
2010-06-25 17:39:56 +00:00
Ulrich Weigand 19c0c0f822 * cp-support.c (reset_directive_searched): New function.
(make_symbol_overload_list_using): Prevent recursive calls.
2010-06-25 16:16:44 +00:00
Jan Kratochvil 5868a63287 gdb/testsuite/
Test PR python/11407.
	* gdb.dwarf2/dw2-ref-missing-frame-func.c: New file.
	* gdb.dwarf2/dw2-ref-missing-frame.S: Use cu_text_start and cu_text_end.
	Split main into func_nofb and func_loopfb dropping NO_FRAME_BASE.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Remove variables sources,
	executable_nofb and executable_fb.  New variables srcsfile, objsfile,
	srcfuncfile, objfuncfile, srcmainfile, objmainfile, executable and
	binfile.  Call gdb_compile with clean_restart twice.
	(func_nofb print, func_nofb backtrace, func_loopfb print)
	(func_loopfb backtrace): New.
2010-06-25 15:34:46 +00:00
Jan Kratochvil af76db58d7 gdb/testsuite/
* gdb.dwarf2/dw2-ref-missing-frame-main.c: New.
	* gdb.dwarf2/dw2-ref-missing-frame.S: Replace compiler generated output
	by a hand made one.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Remove invalid comment.  Remove
	i?86 requirement.  Remove variables srcfile and binfile.  New variable
	sources, executable_nofb and executable_fb.  Call prepare_for_testing.
2010-06-25 15:32:49 +00:00
Phil Muldoon 0f6a939d86 2010-06-24 Phil Muldoon <pmuldoon@redhat.com>
* printcmd.c (print_variable_and_value): Print error message on
	caught exception.
2010-06-25 15:13:52 +00:00
Ulrich Weigand f2c7657e9a ChangeLog:
* dwarf2expr.h (struct dwarf_value_location): Use ULONGEST as type
	of stack values.
	(struct dwarf_expr_piece): Rename "expr" member to "mem".  Add new
	"value" member.
	(dwarf_expr_push): Change input type to ULONGEST.
	(dwarf_expr_fetch): Change return type to ULONGEST.
	(dwarf_expr_fetch_address): Add prototype.
	(dwarf2_read_address): Remove prototype.
	* dwarf2expr.c (dwarf_expr_push): Use ULONGEST as type of stack values.
	Truncate stack values to ctx->addr_size bytes.
	(dwarf_expr_fetch): Change return value to ULONGEST.
	(dwarf_expr_fetch_address): New function.
	(add_piece): Use dwarf_expr_fetch_address instead of dwarf_expr_fetch
	when appropriate.  Update for struct dwarf_expr_piece changes.
	(dwarf2_read_address): Remove.
	(unsigned_address_type): Remove.
	(signed_address_type): Remove.
	(execute_stack_op): Use dwarf_expr_fetch_address instead of
	dwarf_expr_fetch when appropriate.  Use ULONGEST as type of stack
	values.  Perform operations on ULONGEST instead of on GDB values,
	sign-extending from ctx->addr_size bytes as needed.  Read DW_OP_addr
	values and DW_OP_deref results as unsigned integers.
	* dwarf2loc.c (read_pieced_value): Update for struct dwarf_expr_piece
	changes.
	(write_pieced_value): Likewise.
	(dwarf2_evaluate_loc_desc): Use dwarf_expr_fetch_address instead of
	dwarf_expr_fetch when appropriate.
	(compile_dwarf_to_ax): Read DW_OP_addr values as unsigned integers.
	* dwarf2-frame.c (execute_stack_op): Use dwarf_expr_fetch_address
	instead of dwarf_expr_fetch when appropriate.

testsuite/ChangeLog:

	* gdb.cell/dwarfaddr.exp: New file.
	* gdb.cell/dwarfaddr.S: New file.
2010-06-25 13:00:33 +00:00
Pierre Muller b1d61bc9d1 * c-typeprint.c (c_print_typedef): Append new type name for typedefs. 2010-06-25 07:32:25 +00:00
gdbadmin 4f2a93bda2 *** empty log message *** 2010-06-25 00:00:33 +00:00
Joel Brobecker b14285f60e Add support for gdb.PYTHONDIR as $gdb_datadir/python.
Python scripts to be used by GDB can be stored in that directory,
and will be automatically found by the interpreter when importing them.
This patch also sets up <gdb_pythondir>/gdb as the directory where gdb
submodules can be stored.  For now, there is nothing there, but it can
now be added easily without further code changes.

gdb/ChangeLog:
2010-06-24  Joel Brobecker  <brobecker@adacore.com>

        * python/python.c (_initialize_python): Add new "constant"
        PYTHONDIR in gdb module.  Insert this path at the head of
        sys.path. Set gdb.__path__ to gdb.PYTHONDIR + '/gdb' and
        exec its __init__.py script if it exists in that directory.
2010-06-24 22:52:04 +00:00
Kevin Buettner fd60dc691f Add "acc" register. Revise register order and names. 2010-06-24 20:38:05 +00:00
Tom Tromey 1843028924 * psymtab.c (lookup_partial_symbol): Mark definition as static. 2010-06-24 20:17:52 +00:00
Jan Kratochvil 4061892649 gdb/
Fix GDB startup on readonly filesystem.
	* charset.c (find_charset_names): Use PEX_USE_PIPES for pex_init.
2010-06-24 18:24:03 +00:00
Jan Kratochvil 628fe4e4a9 gdb/
Fix PR 9436.
	* breakpoint.c (handle_jit_event): New function.
	(bpstat_what): Remove enum class, kc, ss, sn, sgl, slr, clr, sr, shl,
	jit, err, table and bs_class.  New variables shlib_event, jit_event,
	this_action and bptype.  Change bs_class assignments to this_action
	assignments.  new unhandled bptype internal error.  Move here
	shlib_event and jit_event handling from handle_inferior_event.
	* breakpoint.h (enum bpstat_what_main_action): Extend the comment.
	Reorder items.  Remove BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT.
	* inferior.h (debug_infrun, stop_on_solib_events): New declarations.
	* infrun.c (debug_infrun, stop_on_solib_events): Remove static.
	(handle_inferior_event): Reinitialize frame and gdbarch after
	bpstat_what call.  Move BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT handling to bpstat_what.  Reinitialize even
	gdbarch when frame gets reinitialized.

gdb/testsuite/
	Test PR 9436.
	* gdb.base/nostdlib.exp, gdb.base/nostdlib.c: New.
2010-06-24 15:17:32 +00:00
Hui Zhu f1421989e7 Add command "eval". 2010-06-24 06:12:15 +00:00
gdbadmin fee37fbc3a *** empty log message *** 2010-06-24 00:00:09 +00:00
Ulrich Weigand d03285ec7b ChangeLog:
* infrun.c (handle_inferior_event): Handle presence of single-step
	breakpoints for TARGET_WAITKIND_FORKED and TARGET_WAITKIND_VFORKED.
	Cancel single-step breakpoints for TARGET_WAITKIND_EXITED,
	TARGET_WAITKIND_SIGNALED, and TARGET_WAITKIND_EXECD.
	* breakpoint.c (detach_single_step_breakpoints): New function.
	(detach_breakpoints): Call it.
	(cancel_single_step_breakpoints): New function.
	* breakpoint.h (cancel_single_step_breakpoints): Add prototype.

	* spu-tdep.c (spu_memory_remove_breakpoint): New function.
	(spu_gdbarch_init): Install it.

testsuite/ChangeLog:

	* gdb.cell/fork.exp: New file.
	* gdb.cell/fork.c: Likewise.
	* gdb.cell/fork-spu.c: Likewise.
2010-06-23 12:46:37 +00:00
Jan Kratochvil 38f6b338fd gdb/
* configure.ac: Always set RDYNAMIC at least as `-rdynamic'.
	* configure: Regenerate.
2010-06-23 10:12:14 +00:00
gdbadmin ad2506cfd1 *** empty log message *** 2010-06-23 00:00:03 +00:00
Pierre Muller 41b2c92d4c * lib/gdb.exp (banned_variables_traced): New global variable.
(gdb_init, gdb_finish): Use new variable to avoid multiple tracing.
	(gdb_init): Use `trace add variable' instead of obsolete
	`trace variable'.
2010-06-22 07:21:29 +00:00
Stan Shebs e4c0cfae7e 2010-06-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo: Add explicit @node and @appendix for GFDL.
	* annotate.texinfo: Ditto.
	* gdbint.texinfo: Ditto.
	* stabs.texinfo: Ditto.
2010-06-22 05:03:19 +00:00
Hui Zhu bb08c43207 2010-06-22 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_record_lea_modrm): Change warning to query.
	(i386_process_record): Ditto.
	* record.c (record_memory_query): New variable.
	(_initialize_record): New command "set record memory-query".
	* record.h (record_memory_query): New extern.

2010-06-22  Hui Zhu  <teawater@gmail.com>

	* gdb.texinfo: (Process Record and Replay): Add documentation
	for command "set record memory-query".
2010-06-22 02:15:46 +00:00
Doug Evans b55078be0a * i386-tdep.h (i386_displaced_step_copy_insn): Declare.
* i386-tdep.c (i386_displaced_step_copy_insn): New function.
	(i386_syscall_p): Change type of lengthp to int.
	(i386_displaced_step_fixup): Handle kernels that run one past a
	syscall insn.
	* i386-linux-tdep.c (i386_linux_init_abi): Use
	i386_displaced_step_copy_insn instead of
	simple_displaced_step_copy_insn.
2010-06-22 00:09:10 +00:00
Doug Evans d5bc977ffb * gdb.gdb/selftest.exp: Remove support for gpl v1 and v2 gdb's. 2010-06-22 00:02:07 +00:00
gdbadmin 68f084b101 *** empty log message *** 2010-06-22 00:00:33 +00:00
Tom Tromey 75079b2b31 * dwarf2read.c (read_base_type): Handle DW_ATE_UTF.
(dwarf_type_encoding_name): Likewise.
2010-06-21 19:49:19 +00:00
Tom Tromey b00fdb7832 * p-valprint.c (pascal_val_print): Use TYPE_ERROR_NAME.
* p-typeprint.c (pascal_type_print_base): Use TYPE_ERROR_NAME.
	* m2-valprint.c (m2_val_print): Use TYPE_ERROR_NAME.
	* gdbtypes.h (TYPE_ERROR_NAME): New macro.
	* f-valprint.c (f_val_print): Use TYPE_ERROR_NAME.
	* f-typeprint.c (f_type_print_base): Use TYPE_ERROR_NAME.
	* dwarf2read.c (tag_type_to_type): Create a new error type on
	failure.
	* c-valprint.c (c_val_print): Use TYPE_ERROR_NAME.
	* c-typeprint.c (c_type_print_base): Use TYPE_ERROR_NAME.
2010-06-21 18:01:51 +00:00
Michael Snyder 84951ab584 2010-06-21 Michael Snyder <msnyder@vmware.com>
* breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd,
	not add_abbrev_prefix_cmd, for "enable breakpoints".
2010-06-21 17:38:35 +00:00
Ulrich Weigand d4a087c799 * dwarf2loc.c (find_location_expression): Add relocation offset
to base-address-selection entry base addresses.  Read addresses
	(and offsets) as signed/unsigned integers, depending on the
	BFD's sign_extend_vma flag.  Do not call dwarf2_read_address.
	(loclist_describe_location): Likewise.
	(disassemble_dwarf_expression): Read DW_OP_addr operand as
	unsigned integer.  Do not call dwarf2_read_address.
	(locexpr_describe_location): Likewise for DW_OP_GNU_push_tls_address.
2010-06-21 16:50:18 +00:00
Stan Shebs 4f5d9f0781 2010-06-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo: Relicense under GFDL version 1.3.
	* annotate.texinfo: Relicense under GFDL version 1.3.
	* gdbint.texinfo: Relicense under GFDL version 1.3.
	* stabs.texinfo: Relicense under GFDL version 1.3.
	* fdl.texi: Update to version 1.3.
2010-06-21 16:24:59 +00:00
gdbadmin 0febf158b2 *** empty log message *** 2010-06-21 00:00:03 +00:00
Pedro Alves 9e4344e5ea 2010-06-20 Ian Lance Taylor <iant@google.com>
Pedro Alves  <pedro@codesourcery.com>

	* linux-x86-low.c (always_true): Delete.
	(EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
	trying to fool the compiler with always_true.
2010-06-20 22:23:36 +00:00
Pedro Alves c6beb2cba6 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
conditions in gdbserver.
2010-06-20 22:18:48 +00:00
gdbadmin 59354ce653 *** empty log message *** 2010-06-20 00:00:33 +00:00
Ulrich Weigand 13def385c0 * spu-tdep.c (spu_frame_unwind_cache): Use LSLR register
value instead of hard-coded SPU_LS_SIZE.
	(spu_software_single_step): Likewise.
	* spu-tdep.h (SPU_LS_SIZE): Remove.
2010-06-19 17:59:06 +00:00
Ulrich Weigand d2ed6730f2 ChangeLog:
* spu-multiarch.c (spu_xfer_partial): Wrap around local store
	limit on local store memory accesses.
	* spu-linux-nat.c (spu_xfer_partial): Likewise.
	* spu-tdep.c (spu_lslr): Remove.
	(spu_pointer_to_address): Do not truncate addresses.
	(spu_integer_to_address): Likewise.
	(spu_overlay_new_objfile): Use SPU_OVERLAY_LMA.
	* spu-tdep.h: Add comments.
	(SPUADDR_SPU): Respect SPU_OVERLAY_LMA bit.
	(SPU_OVERLAY_LMA): Define.

gdbserver/ChangeLog:

	* spu-low.c (spu_read_memory): Wrap around local store limit.
	(spu_write_memory): Likewise.

testsuite/ChangeLog:

	* gdb.arch/spu-ls.exp: New file.
	* gdb.arch/spu-ls.c: Likewise.
2010-06-19 17:36:51 +00:00
gdbadmin fbece226ba *** empty log message *** 2010-06-19 00:00:33 +00:00
Stan Shebs a61408f8aa 2010-06-18 Stan Shebs <stan@codesourcery.com>
* osdata.c (get_osdata): Warn separately if target does not report
	type list.
	(info_osdata_command): Allow empty type, report error if target
	does not return available types of OS data.
	* linux-nat.c (linux_nat_xfer_osdata): Report list of OS data
	types if no annex supplied.

	* gdb.texinfo (Operating System Auxiliary Information): Describe
	"info os" when no arguments given.
2010-06-18 23:06:30 +00:00
Stan Shebs 6aed2dbcba * thread.c (thread_id_make_value): Make a value representing the
current thread.
	(_initialize_thread): Create $_thread.

	* gdb.texinfo (Debugging Programs with Multiple Threads): Describe
	$_thread.

	* gdb.threads/thread-specific.exp: Add tests of $_thread.
2010-06-18 17:44:40 +00:00
Ulrich Weigand e075690553 * gdb.base/gdb11531.exp: Respect gdb,no_hardware_watchpoints flag.
* gdb.base/watch-cond.exp: Likewise.
	* gdb.python/py-breakpoint.exp: Likewise.
2010-06-18 16:51:10 +00:00
Pedro Alves d8053d4d67 * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use
clean_restart, make sure every test has a distinct message, and
	that messages don't include the executable' full path.
2010-06-18 15:08:29 +00:00
Hui Zhu 24e933dfc8 2010-06-18 Hui Zhu <teawater@gmail.com>
* gdb.texinfo: (Process Record and Replay): Add documentation
	for commands "record save" and "record restore".
2010-06-18 08:16:15 +00:00
gdbadmin d481c45bde *** empty log message *** 2010-06-18 00:00:03 +00:00
Doug Evans 81ce510cf2 * gdb.arch/i386-size.exp: Updated expected output for
DISASSEMBLY_OMIT_FNAME.
2010-06-17 22:55:53 +00:00
Joel Brobecker ec61707dbb Minor reformatting in dwarf2read.c:psymtabs_addrmap_cleanup.
Really a tiny insignificant detail that just happened to catch my attention.
Fixed thusly.

2010-06-17  Joel Brobecker  <brobecker@adacore.com>

        * dwarf2read.c (psymtabs_addrmap_cleanup): Add empty line after
        last local variable declaration.  No real code change.
2010-06-17 22:36:41 +00:00
Tom Tromey 60606b2c71 * dwarf2read.c (psymtabs_addrmap_cleanup): New function.
(dwarf2_build_psymtabs_hard): Use it.  Create addrmap on a
	temporary obstack.
2010-06-17 17:36:54 +00:00
gdbadmin 19624d79cc *** empty log message *** 2010-06-17 00:00:03 +00:00
Sergio Durigan Junior 65d79d4b97 gdb/ChangeLog:
2010-06-16  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* breakpoint.c: Include parser-defs.h.
	(watchpoint_exp_is_const): New function.
	(watch_command_1): Call watchpoint_exp_is_const to check
	if the expression is constant.

gdb/doc/ChangeLog:

2010-06-16  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.texinfo: Include information about the correct use
	of addresses in the `watch' command.

gdb/testsuite/ChangeLog:

2010-06-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/watch-notconst.c: New file.
	* gdb.base/watch-notconst.S: New file.
	* gdb.base/watch-notconst2.c: New file.
	* gdb.base/watch-notconst2.S: New file.
	* gdb.base/watch-notconst.exp: New file.
	* gdb.base/watchpoint.c (global_ptr_ptr): New variable.
	(func4): Add operations on `global_ptr_ptr'.
	* gdb.base/watchpoint.exp (test_constant_watchpoint): New
	routine to test watchpoints created with a constant expression.
	(test_inaccessible_watchpoint): Include tests for watchpoints
	created with a constant expression.
2010-06-16 18:30:34 +00:00
gdbadmin c562eb737a *** empty log message *** 2010-06-16 00:00:33 +00:00
Andreas Schwab 0407b3f19d * configure.ac: Check for RDYNAMIC also for cross builds.
* configure: Regenerate.
2010-06-15 18:37:18 +00:00
Pedro Alves 98d64339ed * Makefile.in (ALL_TARGET_OBS): Remove solib-target.o.
(SFILES): Remove solib-null.c, add solib-target.c.
	(COMMON_OBS): Remove solib-null.o, add solib-target.o.
	(ALLDEPFILES): Remove solib-target.c.
	* solib-target.c (_initialize_solib_target): Set
	current_target_so_ops to solib_target_so_ops if not already set.
	* solib-null.c: Delete.
2010-06-15 17:57:38 +00:00
Pedro Alves 4e29fb547e * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
(i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
	LONGEST uses.
	* server.h (struct emit_ops): Replace int64_t uses with LONGEST
	uses.
	* tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
	uses with LONGEST uses.
2010-06-15 10:44:48 +00:00
gdbadmin d4364f55c6 *** empty log message *** 2010-06-15 00:00:03 +00:00
Pedro Alves 6a271cae85 gdb/
2010-06-14  Pedro Alves  <pedro@codesourcery.com>

	* NEWS: Mention GDBserver's JIT compilation of tracepoint
	bytecode.

gdb/gdbserver/
2010-06-14  Stan Shebs  <stan@codesourcery.com>
	    Pedro Alves  <pedro@codesourcery.com>

	Bytecode compiler.

	* linux-x86-low.c: Include limits.h.
	(add_insns): New.
	(always_true): New.
	(EMIT_ASM): New.
	(EMIT_ASM32): New.
	(amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
	(amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
	(amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
	(amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
	(amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
	(amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
	(amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
	(amd64_emit_const, amd64_emit_call, amd64_emit_reg)
	(amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
	(amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
	(amd64_emit_void_call_2): New.
	(amd64_emit_ops): New.
	(i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
	(i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
	(i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
	(i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
	(i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
	(i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
	(i386_emit_goto, i386_write_goto_address, i386_emit_const)
	(i386_emit_call, i386_emit_reg, i386_emit_pop)
	(i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
	(i386_emit_stack_adjust, i386_emit_int_call_1)
	(i386_emit_void_call_2): New.
	(i386_emit_ops): New.
	(x86_emit_ops): New.
	(the_low_target): Install x86_emit_ops.
	* server.h (struct emit_ops): New.
	(get_raw_reg_func_addr): Declare.
	(current_insn_ptr, emit_error): Declare.
	* tracepoint.c (get_raw_reg, get_trace_state_variable_value)
	(set_trace_state_variable_value): New defines.
	(struct ipa_sym_addresses): New fields addr_get_raw_reg,
	addr_get_trace_state_variable_value and
	addr_set_trace_state_variable_value.
	(symbol_list): New fields for get_raw_reg,
	get_trace_state_variable_value and set_trace_state_variable_value.
	(condfn): New typedef.
	(struct tracepoint): New field `compiled_cond'.
	(do_action_at_tracepoint): Clear compiled_cond.
	(get_trace_state_variable_value, set_trace_state_variable_value):
	Export in the IPA.
	(condition_true_at_tracepoint): If there's a compiled condition,
	run that.
	(current_insn_ptr, emit_error): New globals.
	(struct bytecode_address): New.
	(get_raw_reg_func_addr): New.
	(emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
	(emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
	(emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
	(emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
	(emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
	(emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
	(emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
	(compile_tracepoint_condition, compile_bytecodes): New.
	* target.h (emit_ops): Forward declare.
	(struct target_ops): New field emit_ops.
	(target_emit_ops): New.
	* linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
	* linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
	* linux-low.c (linux_emit_ops): New.
	(linux_target_ops): Install it.
	* linux-low.h (struct linux_target_ops): New field emit_ops.
2010-06-14 22:16:09 +00:00
Kevin Buettner df0f48365c Examine instruction at label `start' instead of `_start'. 2010-06-14 19:21:11 +00:00
Ulrich Weigand 1e9beacb48 * cp-valprint.c (cp_print_static_field): Members of
dont_print_stat_array_obstack are of type "struct type *".
	(_initialize_cp_valprint): Likewise.
2010-06-14 16:09:58 +00:00
Ulrich Weigand b769def516 * gdb.mi/mi-nonstop.exp: Do not call perror if non-stop mode is
not supported on the target.
	* gdb.mi/mi-nonstop-exit.exp: Likewise.
	* gdb.mi/mi-ns-stale-regcache.exp: Likewise.
	* gdb.mi/mi-nsintrall.exp: Likewise.
	* gdb.mi/mi-nsmoribund.exp: Likewise.
	* gdb.mi/mi-nsthrexec.exp: Likewise.
2010-06-14 15:45:33 +00:00
Ulrich Weigand 92b729071e * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
* linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2010-06-14 13:53:04 +00:00
Ulrich Weigand 21a176fb79 * frame.c (frame_register_unwind): Do not access contents
of "optimized out" unwound register value.
2010-06-14 12:10:56 +00:00
Jan Kratochvil 25b524e836 gdb/
* ada-lang.h (ada_print_type): Make varstring const.
	* ada-typeprint.c (print_func_type): Make name const.
	(ada_print_type): Make varstring const.
	* c-lang.h (c_print_type): Make varstring const.
	* c-typeprint.c (c_print_type): Likewise.
	* f-lang.h (f_print_type): Likewise.
	* f-typeprint.c (f_print_type): Likewise.
	* jv-lang.h (java_print_type): Likewise.
	* jv-typeprint.c (java_print_type): Likewise.
	* language.c (unk_lang_print_type): Likewise.
	* language.h (struct language_defn) <la_print_type>: Likewise.
	* m2-lang.h (m2_print_type): Likewise.
	* m2-typeprint.c (m2_print_type): Likewise.
	* p-lang.h (pascal_print_type): Likewise.
	* p-typeprint.c (pascal_print_type): Likewise.
2010-06-14 08:26:57 +00:00
gdbadmin 008da12ea8 *** empty log message *** 2010-06-14 00:00:09 +00:00
gdbadmin a6293309c4 *** empty log message *** 2010-06-13 00:00:36 +00:00
Stan Shebs d914c394a9 2010-06-11 Stan Shebs <stan@codesourcery.com>
Add per-operation permission flags.

	* target.h (struct target_ops): New method to_set_permissions.
	(target_set_permissions): New macro.
	(target_insert_breakpoint): Change macro to function.
	(target_remove_breakpoint): Ditto.
	(target_stop): Ditto.
	(may_write_registers): Declare.
	(may_write_memory): Declare.
	(may_insert_breakpoints): Declare.
	(may_insert_tracepoints): Declare.
	(may_insert_fast_tracepoints): Declare.
	(may_stop): Declare.
	* target.c (may_write_registers, may_write_registers_1): New globals.
	(may_write_memory, may_write_memory_1): New globals.
	(may_insert_breakpoints, may_insert_breakpoints_1): New globals.
	(may_insert_tracepoints, may_insert_tracepoints_1): New globals.
	(may_insert_fast_tracepoints, may_insert_fast_tracepoints_1): New
	globals.
	(may_stop, may_stop_1): New global.
	(target_xfer_partial): Test for write permission.
	(target_store_registers): Ditto.
	(target_insert_breakpoint): New function.
	(target_remove_breakpoint): New function.
	(target_stop): New function.
	(_initialize_targets): Add new set/show variables.
	(set_write_memory_permission): New function.
	(update_target_permissions): New function.
	(set_target_permissions): New function.
	(update_current_target): Default to_set_permissions.
	(_initialize_targets): Use new globals and setter function.
	* tracepoint.c (start_tracing): Test for permission.
	* inferior.h (update_observer_mode): Declare.
	* infrun.c (non_stop_1): Define earlier.
	(observer_mode, observer_mode_1): New globals.
	(set_observer_mode, show_observer_mode): New functions.
	(update_observer_mode): New function.
	(_initialize_infrun): Define "set observer" command.
	* remote.c (PACKET_QAllow): New optional packet.
	(remote_protocol_features): Add QAllow.
	(remote_set_permissions): New function.
	(remote_start_remote): Call it.
	(init_remote_ops): Add it to target vector.
	(_initialize_remote): Add config command for QAllow.

	* gdb.texinfo (Observer Mode): New section.
	(General Query Packets): Document QAllow.

	* gdb.base/permissions.exp: New file.
2010-06-12 00:05:22 +00:00
gdbadmin 139f2ac873 *** empty log message *** 2010-06-12 00:00:33 +00:00
Ulrich Weigand 5bbad94c39 * gdb.base/valgrind-db-attach.exp: Fail gracefully if valgrind
does not support ELF executable class.
2010-06-11 23:27:22 +00:00
Ulrich Weigand f3ce5b9c8d * gdb.trace/packetlen.exp: Respect gdb_target_supports_trace. 2010-06-11 23:25:59 +00:00
Jan Kratochvil 8e46892cd5 gdb/testsuite/
* lib/gdb.exp (gdb_run_cmd): Return on $gdb_prompt.
	(runto): Catch "The target does not support running in non-stop mode.".
2010-06-11 21:58:20 +00:00
Michael Snyder 6cc55c64ed 2010-06-11 Michael Snyder <msnyder@vmware.com>
* gdb.base/setshow.exp (set language asm): Don't use
	gdb_test_no_output, fails on some targets.
2010-06-11 20:56:06 +00:00
Tom Tromey aec5aa8bde * dwarf2read.c (dwarf2_add_member_fn): Handle correct form of
DW_AT_vtable_elem_location even when GCC extension is seen.
2010-06-11 20:01:06 +00:00
Ulrich Weigand caddefa41f * gdb.cp/cpexprs.exp: Skip test on spu*-*-*.
* gdb.cp/pr9167.exp: Likewise.
2010-06-11 17:35:28 +00:00
Ulrich Weigand 468b1aa797 * gdb.python/py-breakpoint.exp: Handle software watchpoints as well. 2010-06-11 17:34:56 +00:00
Ulrich Weigand 5c3552dc9f * gdb.base/solib-corrupted.exp: Respect skip_shlib_tests. 2010-06-11 17:34:12 +00:00
Ulrich Weigand 02e6fe6a8c * gdb.base/charset.c (main): Make sure malloc gets linked in. 2010-06-11 17:33:19 +00:00
Tom Tromey 0e03807e1c gdb
PR gdb/9977, PR exp/11636:
	* value.h (value_offset): Update.
	(struct lval_funcs) <check_validity>: New field.
	<copy_closure>: Make argument const.
	(value_computed_closure): Update.
	(value_contents_for_printing): Declare.
	(value_bits_valid): Likewise.
	(val_print): Likewise.
	(set_value_component_location): Update.
	(value_entirely_optimized_out): Declare.
	* value.c (value_offset): Argument now const.
	(require_not_optimized_out): New function.
	(value_contents_for_printing): New function.
	(value_contents_all): Call require_not_optimized_out.
	(value_contents): Likewise.
	(value_bits_valid): New function.
	(value_computed_closure): Argument now const.
	(set_value_component_location): Make 'whole' argument const.
	(value_entirely_optimized_out): New function.
	(value_bitsize): Argument now 'const'.
	(value_bitpos): Likewise.
	(value_type): Likewise.
	* valprint.h (val_print_array_elements): Update.
	* valprint.c (val_print): Add 'val' argument.  Use
	valprint_check_validity.
	(valprint_check_validity): New function.
	(value_check_printable): Use value_entirely_optimized_out.
	(common_val_print): Update.
	(value_print): Likewise.
	(val_print_array_elements): Add 'val' argument.
	* valops.c (value_fetch_lazy): Use value_contents_for_printing,
	value_bits_valid.  Reinit frame cache for lval_computed.
	* sh64-tdep.c (sh64_do_register): Update.
	* scm-valprint.c (scm_val_print): Add 'val' argument.
	* scm-lang.h (scm_val_print): Update.
	* python/python.h (apply_val_pretty_printer): Update.
	* python/py-prettyprint.c (apply_val_pretty_printer): Add 'val'
	argument.  Call set_value_component_location.
	* printcmd.c (print_scalar_formatted): Update.
	* p-valprint.c (pascal_val_print): Add 'val' argument.
	(pascal_object_print_value_fields): Likewise.
	(pascal_object_print_value): Likewise.
	(pascal_object_print_static_field): Update.
	* p-lang.h (pascal_val_print): Update.
	(pascal_object_print_value_fields): Update.
	* mt-tdep.c (mt_registers_info): Update.
	* mi/mi-main.c (get_register): Update.
	(mi_cmd_data_evaluate_expression): Use common_val_print.
	* m2-valprint.c (m2_print_array_contents): Add 'val' argument.
	(m2_print_unbounded_array): Likewise.
	(m2_val_print): Likewise.
	* m2-lang.h (m2_val_print): Update.
	* language.h (struct language_defn) <la_val_print>: Add 'val'
	argument.
	(LA_VAL_PRINT): Likewise.
	* language.c (unk_lang_val_print): Add 'val' argument.
	* jv-valprint.c (java_print_value_fields): Add 'val' argument.
	(java_val_print): Likewise.
	* jv-lang.h (java_val_print): Add 'val' argument.
	* infcmd.c (default_print_registers_info): Update.
	* f-valprint.c (f77_print_array_1): Add 'val' argument.
	(f77_print_array): Likewise.
	(f_val_print): Likewise.
	* f-lang.h (f_val_print): Add 'val' argument.
	* dwarf2loc.c (read_pieced_value): Use value_bitsize and
	value_bitpos.
	<DWARF_VALUE_OPTIMIZED_OUT>: Don't print warning.  Call
	set_value_optimized_out.
	(write_pieced_value): Use value_bitsize and value_bitpos.
	<default>: Don't exit loop.
	(check_pieced_value_validity): New function.
	(pieced_value_funcs): Reference check_pieced_value_validity,
	check_pieced_value_invalid.
	(copy_pieced_value_closure): Update.
	(check_pieced_value_bits): New function.
	(check_pieced_value_invalid): New function.
	* d-valprint.c (dynamic_array_type): Add 'val' argument.
	(d_val_print): Likewise.
	* d-lang.h (d_val_print): Update.
	* cp-valprint.c (cp_print_value_fields): Add 'val' argument.
	(cp_print_value_fields_rtti): Likewise.
	(cp_print_value): Likewise.
	(cp_print_static_field): Update.
	* c-valprint.c (c_val_print): Add 'val' argument.
	(c_value_print): Update.
	* c-lang.h (c_val_print): Update.
	(cp_print_value_fields): Likewise.
	(cp_print_value_fields_rtti): Likewise.
	* ada-valprint.c (struct ada_val_print_args): Remove.
	(val_print_packed_array_elements): Add 'val' argument.
	(ada_val_print): Likewise.  Rewrite.
	(ada_val_print_stub): Remove.
	(ada_val_print_array): Add 'val' argument.
	(ada_val_print_1): Likewise.
	(print_variant_part): Likewise.
	(ada_value_print): Update.
	(print_record): Add 'val' argument.
	(print_field_values): Likewise.
	* ada-lang.h (ada_val_print): Update.
gdb/testsuite
	PR gdb/9977, PR exp/11636::
	* gdb.dwarf2/pieces.exp (pieces_test_f3): Remove kfail.
	(pieces_test_f6): Update expected output.
2010-06-11 15:36:10 +00:00
Tom Tromey 3cf03773b7 * vec.h (VEC_cleanup): New macro.
(DEF_VEC_ALLOC_FUNC_I): Update.
	(DEF_VEC_ALLOC_FUNC_P): Likewise.
	(DEF_VEC_ALLOC_FUNC_O): Likewise.
	* dwarf2loc.c (struct axs_var_loc): Remove.
	(unimplemented): New function.
	(translate_register): Likewise.
	(access_memory): Likewise.
	(compile_dwarf_to_ax): Likewise.
	(dwarf2_tracepoint_var_loc): Remove.
	(dwarf2_tracepoint_var_access): Likewise.
	(dwarf2_tracepoint_var_ref): Likewise.
	(locexpr_tracepoint_var_ref): Use compile_dwarf_to_ax.
	(loclist_tracepoint_var_ref): Likewise.
	* dwarf2expr.h (dwarf_expr_require_composition): Declare.
	* dwarf2expr.c (dwarf_expr_require_composition): Rename from
	require_composition.  No longer static.
	(execute_stack_op): Update.
	* ax-gdb.h (trace_kludge): Declare.
2010-06-11 15:21:11 +00:00
Jan Kratochvil 2bdf28a09d gdb/
* breakpoint.c (breakpoint_restore_shadows): New OWNER comment.
	(should_be_inserted): Return zero also on NULL OWNER.
	(breakpoint_program_space_exit): New OWNER comment.
	(insert_breakpoint_locations): Extend comment for OWNER.
	(remove_breakpoint_1, remove_breakpoint): Assert on OWNER.
	(breakpoint_init_inferior, breakpoint_here_p, breakpoint_thread_match):
	New OWNER comment.
	(print_it_typical): Return PRINT_UNKNOWN on NULL OWNER.
	(watchpoint_check): New assert on BREAKPOINT_AT and OWNER.
	(bpstat_check_location): New assert on OWNER.
	(bpstat_check_watchpoint, bpstat_check_breakpoint_conditions): Move BL
	and B initializations to the code block.  New assert on them.
	(print_one_breakpoint_location): New OWNER comment.
	(watchpoint_locations_match): Assert on OWNER.
	(breakpoint_locations_match): Move HW_POINT1 and HW_POINT2
	initializations to the code block.  New assert on OWNER.
	(set_breakpoint_location_function): New assert on OWNER.
	(disable_breakpoints_in_shlibs, disable_breakpoints_in_unloaded_shlib)
	(bp_location_compare, update_global_location_list)
	(update_global_location_list): New OWNER comment.

gdb/testsuite/
	* gdb.base/moribund-step.exp: New.
2010-06-11 12:58:54 +00:00
Ulrich Weigand 5b9a19af43 * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-linux.h 2010-06-11 12:44:15 +00:00
Ulrich Weigand 669211f587 * config/nm-linux.h (struct target_ops): Remove forward declaration.
(lin_thread_get_thread_signals): Remove prototype.
	(GET_THREAD_SIGNALS): Remove.
	* linux-nat.h (lin_thread_get_thread_signals): Add prototype.
	* linux-thread-db.c (check_thread_signals): Directly call
	lin_thread_get_thread_signals; do not check GET_THREAD_SIGNALS.
2010-06-11 12:10:13 +00:00
Ulrich Weigand b7a8b4ef6b * gregset.h (GDB_FPXREGSET_T): Remove.
(gdb_fpxregset_t): Likewise.
	(supply_fpxregset): Remove prototype.
	(fill_fpxregset): Likewise.
	* i386-linux-nat.c (supply_fpxregset): Remove.
	(fill_fpxregset): Likewise.
	(fetch_fpxregs): Inline supply_fpxregset call.
	(store_fpxregs): Inline fill_fpxregset call.

	* config/i386/linux.mh: Set NAT_FILE to config/nm-linux.h.
	* config/i386/nm-linux.h: Remove file.
2010-06-11 12:08:51 +00:00
gdbadmin fbd23af573 *** empty log message *** 2010-06-11 00:00:03 +00:00
Michael Snyder f6978de9f5 2010-06-08 Michael Snyder <msnyder@vmware.com>
* gdb.ada/assign_1.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.ada/boolean_expr.exp:
	* gdb.ada/frame_args.exp: Ditto.
	* gdb.ada/lang_switch.exp: Ditto.
	* gdb.ada/ptype_arith_binop.exp: Ditto.
	* gdb.ada/ref_param.exp: Ditto.
	* gdb.ada/type_coercion.exp:Ditto.

	* gdb.asm/asm-source.exp: Ditto.

	* gdb.base/attach.exp: Ditto.
	* gdb.base/bitfields2.exp: Ditto.
	* gdb.base/call-signal-resume.exp: Ditto.
	* gdb.base/callfuncs.exp: Ditto.
	* gdb.base/commands.exp: Ditto.
	* gdb.base/dbx.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/dump.exp: Ditto.
	* gdb.base/exprs.exp: Ditto.
	* gdb.base/freebpcmd.exp: Ditto.
	* gdb.base/interrupt.exp: Ditto.
	* gdb.base/list.exp: Ditto.
	* gdb.base/long_long.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/ptype.exp: Ditto.
	* gdb.base/return.exp: Ditto.
	* gdb.base/setshow.exp: Ditto.
	* gdb.base/sigbpt.exp: Ditto.
	* gdb.base/sigrepeat.exp: Ditto.

	* gdb.cp/classes.exp: Ditto.

	* gdb.dwarf2/dw2-restore.exp: Ditto.

	* gdb.gdb/selftest.exp: Ditto.

	* gdb.multi/base.exp: Ditto.
	* gdb.multi/bkpt-multi-exec.exp: Ditto.

	* gdb.python/py-block.exp: Ditto.
	* gdb.python/py-prettyprint.exp: Ditto.
	* gdb.python/py-template.exp: Ditto.

	* gdb.server/ext-attach.exp: Ditto.
	* gdb.server/ext-run.exp: Ditto.
	* gdb.server/server-mon.exp: Ditto.

	* gdb.threads/fork-thread-pending.exp: Ditto.
	* gdb.threads/hand-call-in-threads.exp: Ditto.
	* gdb.threads/interrupted-hand-call.exp: Ditto.
	* gdb.threads/linux-dp.exp: Ditto.
	* gdb.threads/manythreads.exp: Ditto.
	* gdb.threads/print-threads.exp: Ditto.
	* gdb.threads/pthreads.exp: Ditto.
	* gdb.threads/schedlock.exp: Ditto.
	* gdb.threads/thread-unwindonsignal.exp: Ditto.
	* gdb.threads/threadapply.exp: Ditto.
2010-06-10 19:48:20 +00:00
gdbadmin 2376308488 *** empty log message *** 2010-06-10 00:00:33 +00:00
Michael Snyder 8289203688 2010-06-09 Michael Snyder <msnyder@vmware.com>
* target.c (update_current_target): Fix spelling error in comment.
	(target_mourn_inferior): Fix spelling error in error message.
2010-06-09 18:25:34 +00:00
Paul N. Hilfinger 5ddb52faff Trivial correction to two comments in dictionary.h.
Changelog:

  * dictionary.h (dict_iter_name_first, dict_iter_name_next): Refer to
  SYMBOL_SEARCH_NAME, not SYMBOL_BEST_NAME, in comments.
2010-06-09 04:22:27 +00:00
gdbadmin 14908e255e *** empty log message *** 2010-06-09 00:00:32 +00:00
Michael Snyder de7ff7894a 2010-06-08 Michael Snyder <msnyder@vmware.com>
* gdb.ada/exec_changed.exp:
	Use ".*" instead of "" as wildcard regexp.

	* gdb.base/async.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.base/call-ar-st.exp: Ditto.
	* gdb.base/checkpoint.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/dump.exp: Ditto.
	* gdb.base/ending-run.exp: Ditto.
	* gdb.base/fileio.exp: Ditto.
	* gdb.base/miscexprs.exp: Ditto.
	* gdb.base/pointers.exp: Ditto.
	* gdb.base/readline.exp: Ditto.
	* gdb.base/reread.exp: Ditto.
	* gdb.base/restore.exp: Ditto.
	* gdb.base/shlib-call.exp: Ditto.
	* gdb.base/valgrind-db-attach.exp: Ditto.
	* gdb.base/volatile.exp: Ditto.
	* gdb.base/watchpoints.exp: Ditto.

	* gdb.cp/classes.exp: Use ".*" instead of "" as wildcard regexp.

	* gdb.python/py-frame.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.python/py-value.exp: Ditto.

	* gdb.trace/backtrace.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.trace/circ.exp: Ditto.
	* gdb.trace/collection.exp: Ditto.
	* gdb.trace/packetlen.exp: Ditto.
	* gdb.trace/passc-dyn.exp: Ditto.
	* gdb.trace/report.exp: Ditto.
	* gdb.trace/tfile.exp: Ditto.
	* gdb.trace/tfind.exp: Ditto.
	* gdb.trace/while-dyn.exp: Ditto.
2010-06-08 22:58:03 +00:00
Michael Snyder 0f2caa1b95 2010-06-08 Michael Snyder <msnyder@vmware.com>
* remote.c (remote_close): Set inferior_ptid to null_ptid.
2010-06-08 16:51:33 +00:00
Jan Kratochvil 3bebe2f205 gdb/
* configure.ac <"${have_libpython}" != no>: New workaround of
	python#4434.
	* configure: Regenerate.

gdb/testsuite/
	* gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
2010-06-08 16:41:45 +00:00
Hui Zhu eaaffdf49f 2010-06-08 Hui Zhu <teawater@gmail.com>
* record.c (record_wait): Move signal out of replay code.
2010-06-08 02:25:31 +00:00
gdbadmin 51ef9f7b38 *** empty log message *** 2010-06-08 00:00:32 +00:00
Jan Kratochvil 5c631832c1 gdb/
Fix PR 10640.
	* dwarf2-frame.c (no_dwarf_call): New function.
	(execute_stack_op): Set CTX->DWARF_CALL.
	* dwarf2expr.c (execute_stack_op) <DW_OP_call2, DW_OP_call4>: New.
	* dwarf2expr.h (struct dwarf_expr_context) <dwarf_call>: New.
	(struct dwarf_expr_context) <get_subr>: Remove the #if0-ed field.
	* dwarf2loc.c (per_cu_dwarf_call, dwarf_expr_dwarf_call): New functions.
	(dwarf2_evaluate_loc_desc): Initialize CTX->DWARF_CALL.
	(needs_frame_dwarf_call): New function.
	(dwarf2_loc_desc_needs_frame): Initialize CTX->DWARF_CALL.
	* dwarf2read.c (follow_die_offset): Based on former follow_die_ref.
	Update the comment.  Move variables die, offset and error call to ...
	(follow_die_ref): ... a new function.
	(dwarf2_fetch_die_location_block): New function.
	* dwarf2loc.h (dwarf2_fetch_die_location_block): New prototype.

gdb/testsuite/
	Test PR 10640.
	* gdb.dwarf2/dw2-op-call.exp, gdb.dwarf2/dw2-op-call.S: New.
2010-06-07 19:55:33 +00:00
Jan Kratochvil 17ea53c331 gdb/
* dwarf2loc.c (struct dwarf_expr_baton) Replace objfile by per_cu.
	(dwarf_expr_tls_address): Use per_cu instead of objfile.
	(dwarf2_evaluate_loc_desc): Drop initialization of BATON.OBJFILE.
	Initialize new BATON.PER_CU.  Adjust CTX->GDBARCH initialization for
	this change.
	(struct needs_frame_baton): New field per_cu.
	(dwarf2_loc_desc_needs_frame): Initialize new BATON.PER_CU.
	* dwarf2read.c (struct dwarf2_per_cu_data) <cu>: Extend the comment.
2010-06-07 19:42:58 +00:00
Sami Wagiaalla 245040d756 Fix operator doubly nested namespace search.
2010-06-07  Sami Wagiaalla  <swagiaal@redhat.com>

	* cp-support.c (make_symbol_overload_list_namespace): Only search
	static and global blocks.
	(make_symbol_overload_list_block): New function.
	(make_symbol_overload_list): Separate namespace search from block
	search.
	(make_symbol_overload_list_qualified): Use
	make_symbol_overload_list_block.
2010-06-07 17:51:03 +00:00
Sami Wagiaalla 4c3376c849 Test and support all cpp operator types.
2010-06-07  Sami Wagiaalla  <swagiaal@redhat.com>

	* value.h: Created oload_search_type enum.
	(find_overload_match): Use oload_search_type enum.
	* valops.c (find_overload_match): Support combined member and
	non-member search.
	* eval.c (evaluate_subexp_standard): Calls to
	find_overload_match now use oload_search_type enum.
	(oload_method_static): Verify index is a proper value.
	* valarith.c (value_user_defined_cpp_op): Search for and handle
	both member and non-member operators.
	(value_user_defined_cpp_op): New function.
	(value_user_defined_op): New function.
	(value_x_unop): Use value_user_defined_op.
	(value_x_binop): Ditto.
	* cp-support.c (make_symbol_overload_list_using): Added block
	iteration.
	Add check for namespace aliases and imported declarations.

2010-06-07  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/koenig.exp: Test for ADL operators.
	* gdb.cp/koenig.cc: Added ADL operators.
	* gdb.cp/operator.exp: New test.
	* gdb.cp/operator.cc: New test.
2010-06-07 16:11:35 +00:00
Jan Kratochvil ee55da67fb gdb/
* breakpoint.h (owner): Extend the comment.
2010-06-07 13:39:10 +00:00