Commit Graph

26714 Commits

Author SHA1 Message Date
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