Commit Graph

67366 Commits

Author SHA1 Message Date
Ulrich Weigand 8e6a5956eb * gdb.base/watch_thread_num.exp: Revert 2008-09-03 change.
Skip test completely if gdb,no_hardware_watchpoints.
2010-10-19 21:29:23 +00:00
Ulrich Weigand 2c04da0de0 * gdb.base/foll-fork.exp: Make regexps to match catchpoint hits more
strict, but do not check for any particular function name within libc.
2010-10-19 21:28:33 +00:00
Sami Wagiaalla 79afc5ef5d Support overloading of 'operator->'.
2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	 PR C++/11500:
	* valarith.c (value_x_unop): Handle STRUCTOP_PTR.
	* eval.c (evaluate_subexp_standard): Check for overload of
	'operator->'.
	* valarith.c (value_x_binop): Throw NOT_FOUND_ERROR.
	(value_x_unop): Ditto.
	* valops.c: Include "exceptions.h".
	(find_overload_match): Throw NOT_FOUND_ERROR.
	(value_struct_elt): Ditto.

2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/smartp.exp: New test.
	* gdb.cp/smartp.cc : New test.
2010-10-19 20:53:15 +00:00
Tom Tromey cca56ac7ae * python/py-cmd.c (cmdpy_function): Unreference exception state. 2010-10-19 20:11:37 +00:00
H.J. Lu 5d1268c689 Add testcase for PR gas/12049.
2010-10-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/12049
	* gas/i386/i386.exp: Run relax-1 and relax-2.

	* gas/i386/relax-1.d: New.
	* gas/i386/relax-1.s: Likewise.
	* gas/i386/relax-2.d: Likewise.
	* gas/i386/relax-2.s: Likewise.
2010-10-19 17:13:30 +00:00
Sami Wagiaalla 026ffab798 Support pointer to bool conversion.
2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdbtypes.h: Introduce BOOL_PTR_CONVERSION_BADNESS.
	* gdbtypes.c (rank_one_type): Use BOOL_PTR_CONVERSION_BADNESS
	for conversion.
	Make all other conversions illegal.

2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/converts.exp: Test pointer to bool conversion.
	Test pointer to long conversion.
	* gdb.cp/oranking.exp: Removed relevant kfail.
2010-10-19 16:07:25 +00:00
Alan Modra 20f5cfbdea * write.c (relax_segment): Correct address on frag added to stop
leb128/align frags bouncing.
2010-10-19 12:14:23 +00:00
Alan Modra e35a414d3c PR gas/12049
* frags.h (struct frag): Add "region" field.
	* write.c (relax_frag): Don't add "stretch" to forward reference
	target if there is an intervening org or align.
	(relax_segment): Set region.
2010-10-19 12:00:33 +00:00
Doug Evans 8c540a24cf * c-typeprint.c (c_type_print_base, case TYPE_CODE_TYPEDEF): Verify
assumptions of when this case happens.  Print "<unnamed typedef>".
2010-10-19 04:22:20 +00:00
gdbadmin a01c006446 *** empty log message *** 2010-10-19 00:00:32 +00:00
Alan Modra 9b819e63d8 daily update 2010-10-18 23:00:05 +00:00
Tom Tromey 3a772aa44d gdb
* valprint.c (val_print_string): Pass 'encoding' to
	LA_PRINT_STRING.
gdb/testsuite
	* gdb.python/py-prettyprint.exp (run_lang_tests): Test encoding
	argument to lazy_string.
	* gdb.python/py-prettyprint.py (pp_ls_encoding): New global.
	(pp_ls.to_string): Use it.
	* gdb.python/py-prettyprint.c (main): Move declarations to top.
	Add "estring2" local.
2010-10-18 19:14:03 +00:00
DJ Delorie ca346ede18 merge from gcc 2010-10-18 17:08:53 +00:00
Kai Tietz 9dc9b05c80 2010-10-18 Kai Tietz <kaI.tietz@onevision.com>
* gas/i386/disp32.d: Adjust initial symbol check.
        * gas/i386/x86-64-disp32.d: Likewise.
2010-10-18 05:50:31 +00:00
Cary Coutant 5bc2f5be52 * output.h (Output_segment::set_section_addresses): Change function
signature.  Update all callers.
	* output.cc (Output_segment::is_first_section_relro): Ignore TLS
	sections.
	(Output_segment::set_section_addresses): Align after last TLS
	section.  Add padding before last relro section instead of after.
2010-10-18 05:39:23 +00:00
Maciej W. Rozycki eae1474374 * gas/mips/ld.d: Spell out section offsets and addends
explicitly.  Clean up some regexps.
	* gas/mips/ld-ilocks.d: Likewise.  Add missing "$" prefixes to
	the names of FP registers.
	* gas/mips/ld-ilocks-addr32.d: Likewise.
	* gas/mips/ld.s: Align sections to 4k, adjust padding.
2010-10-18 01:35:06 +00:00
Maciej W. Rozycki 2c8abc570c * gas/mips/ld.d: Use wildcard address matching.
* gas/mips/ld-ilocks.d: Likewise.
	* gas/mips/ld-ilocks-addr32.d: Likewise.
2010-10-18 00:55:23 +00:00
Maciej W. Rozycki 475a10d05c * gas/mips/mips.exp (run_dump_test_arch): Get the name of the
architecture to check against for an architecture-specific test
	from the properties instead of the name passed.
2010-10-18 00:44:18 +00:00
Maciej W. Rozycki 0970e49e1a * config/tc-mips.c (macro)[ldd_std]: Fix the relaxation variant
for absolute addressing.
2010-10-18 00:17:43 +00:00
Maciej W. Rozycki 704897fbef opcodes/
* mips-opc.c (mips_builtin_opcodes): Move M_LD_OB and M_SD_OB
	macros before their corresponding MIPS III hardware instructions.

	gas/
	* config/tc-mips.c (macro)[M_LD_OB, M_SD_OB]: Handle 64-bit ABIs.

	gas/testsuite/
	* gas/mips/lineno.s: Convert to o32.
	* gas/mips/lineno.d: Adjust patterns accordingly.  Force the o32
	ABI.
2010-10-18 00:15:35 +00:00
Maciej W. Rozycki 998b3c3643 * config/tc-mips.c (mips_pseudo_table): Add "sbss".
(s_change_sec): Handle it.
2010-10-18 00:11:08 +00:00
gdbadmin 36ad8f020a *** empty log message *** 2010-10-18 00:00:33 +00:00
Alan Modra 1644365f15 daily update 2010-10-17 23:00:05 +00:00
Jan Kratochvil 5fc3827b43 gdb/testsuite/
Fix s390x compatibility.
	* gdb.dwarf2/pr11465.S (DW_TAG_pointer_type): Use PTRBITS.  Twice.
	* gdb.dwarf2/pr11465.exp: Set ptrbits, use it for -DPTRBITS.
2010-10-17 18:55:09 +00:00
Jan Kratochvil 01f8c46dda gdb/
Fix the `stopped language detection' testcase for gcc-4.5.
	* dwarf2read.c (read_partial_die): Set also LANGUAGE_OF_MAIN.
	* symfile.c (set_initial_language): Move variable filename to a more
	inner block.  Prefer LANGUAGE_OF_MAIN.
	* symtab.c (language_of_main): New variable.
	(set_main_name): Always reset LANGUAGE_OF_MAIN.
	* symtab.h (language_of_main): New declaration.
2010-10-17 18:49:47 +00:00
Jan Kratochvil 8aeb23f364 gdb/
* gdbthread.h (currently_stepping): New declaration.
	* infrun.c (currently_stepping): Remove the forward declaration.
	(currently_stepping): Make it global.
	* linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New
	variables tp and step, initialized them.  Pass STEP to to_resume.
	Print also possibly "PTRACE_SINGLESTEP" if STEP.  Initialize LP->STEP.
	* remote.c (currently_stepping_callback): New.
	(remote_vcont_resume)
	<ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>:
	New variable tp.  Call currently_stepping_callback and step such
	thread.

gdb/testsuite/
	* gdb.threads/sigstep-threads.exp: New file.
	* gdb.threads/sigstep-threads.c: New file.
2010-10-17 18:24:47 +00:00
Jan Kratochvil c1e5657246 gdb/
* infrun.c (follow_exec): Replace symbol_file_add_main by
	symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and
	breakpoint_re_set.
	* m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for
	clear_symtab_users.
	* objfiles.c (free_all_objfiles): Likewise.
	* remote-m32r-sdi.c (m32r_load): Likewise.
	* solib-som.c (som_solib_create_inferior_hook): Likewise.
	* symfile.c (new_symfile_objfile): New comment for add_flags.  Call
	clear_symtab_users with ADD_FLAGS.
	(reread_symbols): Use parameter 0 for clear_symtab_users.
	(clear_symtab_users): New parameter add_flags.  Do not call
	breakpoint_re_set if SYMFILE_DEFER_BP_RESET.
	(clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users.
	* symtab.h (clear_symtab_users): New parameter add_flags.

gdb/testsuite/
	* gdb.base/pie-execl.exp: New file.
	* gdb.base/pie-execl.c: New file.
2010-10-17 17:45:17 +00:00
Doug Kwan 0c91cf0457 2010-10-17 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (Target_arm::got_section): Use correct order and set
	GOT output section to be writable.
2010-10-17 15:12:50 +00:00
Jan Kratochvil 3a182a6912 gdb/
Fix GCC false warning.
	* varobj.c (value_get_print_value) <str_addr>: Initialize it.
2010-10-17 08:43:46 +00:00
gdbadmin ad65951529 *** empty log message *** 2010-10-17 00:00:32 +00:00
Alan Modra 37f4de23e9 daily update 2010-10-16 23:00:05 +00:00
H.J. Lu da98bb4c74 Add CpuNop to CPU_GENERIC64_FLAGS.
gas/testsuite/

2010-10-16  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/i386.exp: Run x86-64-nops-1-g64.

	* gas/i386/x86-64-nops-1.d: Remove -mtune=generic64.

	* gas/i386/x86-64-nops-1-g64.d: New.

opcodes/

2010-10-16  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-gen.c (cpu_flag_init): Add CpuNop to CPU_GENERIC64_FLAGS.

	* i386-init.h: Regenerated.
2010-10-16 21:53:16 +00:00
Kai Tietz fb43c6529c 2010-10-16 Kai Tietz <kai.tietz@onevision.com>
* ld-pe/pe-run2.exp: Prefix --enable-auto-import by -Wl.
2010-10-16 20:11:40 +00:00
Cary Coutant fc497986a3 * layout.cc (Layout::set_segment_offsets): Don't try to realign data
segment that has been aligned for relro.
	* output.cc (Output_segment::set_section_addresses): Change signature;
	adjust all callers.  Account for alignment when totalling
	size of relro sections.
	* output.h (Output_segment::set_section_addresses): Change signature.
	* testsuite/Makefile.am (relro_test.sh, relro_test.stdout): New
	targets.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/relro_test.cc: Add alignment attributes to test proper
	alignment of relro sections when padding is necessary.
	* testsuite/relro_test.sh: New script.
2010-10-16 00:37:25 +00:00
gdbadmin 591c895777 *** empty log message *** 2010-10-16 00:00:33 +00:00
Pierre Muller 3a9d7214ad * p-typeprint.c (pascal_type_print_method_args): Fix problem in
display of type of method arguments.
2010-10-15 23:08:04 +00:00
Alan Modra ab27a17180 daily update 2010-10-15 23:00:05 +00:00
Mike Frysinger 636b4f1142 gas: blackfin: add tests for recent loop label fixes
Signed-off-by: David Gibson <david.gibson@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-15 20:53:28 +00:00
Mike Frysinger e7b77cfe1e gas: blackfin: add illegal insn tests
Make sure all illegal insns get assembled & decoded correctly.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-15 20:52:36 +00:00
Mike Frysinger e1791cb8b5 gas: blackfin: fix encoding of BYTEOP2M insn
The BYTEOP2M parser incorrectly calls BYTEOP2P to generate the opcode.
Once we've fixed that, it's easy to see that the disassembler also likes
to decode this insn incorrectly.  So fix that and then add some tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-15 20:44:46 +00:00
Mike Frysinger 6ccfe592c6 gas: blackfin: generalize matching in the video tests
The exact symbol addresses are not important to these tests.  We only
care about the opcodes and the disassembly output.  This makes adding
more insns to these tests easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-15 20:43:16 +00:00
Tom Tromey 09ca9e2e34 PR python/11948:
* varobj.c (value_get_print_value): Use val_print_string to print
	lazy strings.
	* python/py-prettyprint.c (print_string_repr): Use
	val_print_string to print lazy strings.  Fix cleanup logic.
	(print_children): Likewise.
	* python/python-internal.h (gdbpy_extract_lazy_string): Update.
	* python/py-lazy-string.c (gdbpy_extract_lazy_string): Rewrite.
	Change return type to 'void', add 'addr' argument.
	* value.h (val_print_string): Update.
	* valprint.c (val_print_string): Add 'encoding' argument.
	* printcmd.c (print_formatted): Update.
	* p-valprint.c (pascal_val_print): Update.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Likewise.
	* jv-valprint.c (java_value_print): Update.
	* f-valprint.c (f_val_print): Update.
	* c-valprint.c (c_val_print): Update.
	* auxv.c (fprint_target_auxv): Update.
2010-10-15 18:54:13 +00:00
Jan Kratochvil 92163a10dc gdb/
PR exp/12117
	* gdbtypes.c (check_typedef): Clean up function comment.
	Keep track of instance flags as we strip typedefs and create a new
	type to preserve them if necessary.
	* gdbtypes.h (type) <instance_flags>: Extend the comment.

gdb/testsuite/
	PR exp/12117
	* gdb.cp/ptype-cv-cp.cc: New file.
	* gdb.cp/ptype-cv-cp.exp: New file.
2010-10-15 17:48:48 +00:00
Dave Korn 3917d5d5ca Provide win32-based dlapi replacements on windows platforms without dlfcn.h.
ld/ChangeLog:

	* configure.in: If <dlfcn.h> can't be found, try for <Windows.h>
	* configure: Regenerate.
	* config.in: Likewise.
	* plugin.c [!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlopen): Provide
	trival LoadLibrary-based replacement for Windows systems.
	[!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlsym): Likewise trivial
	replacement based on GetProcAddress.
	[!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlsym): Likewise FreeLibrary.
	* sysdep.h: Don't infer presence of <dlfcn.h> from ENABLE_PLUGINS
	anymore, use its own guard.
2010-10-15 16:21:41 +00:00
Dave Korn d4cb7acdd8 Fix potential use-after-free bugs.
ld/ChangeLog:

	* plugin.c (add_input_file): Take copy of input string.
	(add_input_library): Likewise.
	(set_extra_library_path): Likewise.
2010-10-15 16:09:36 +00:00
Dave Korn c3842ce50e Avoid testsuite errors when no cross compiler is available.
ld/testsuite/ChangeLog:

	* ld-plugin/plugin.exp: Don't error out if there is no target compiler
	available, make tests UNSUPPORTED instead.
2010-10-15 16:07:06 +00:00
Pierre Muller dae714134c * p-lang.c (is_pascal_string_type): Use TYPE_FIELD_NAME accessor. 2010-10-15 15:42:51 +00:00
gdbadmin 0a72ddf55c *** empty log message *** 2010-10-15 00:00:04 +00:00
H.J. Lu 553d0a7447 Remove CheckRegSize from movq.
2010-10-14  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-opc.tbl: Remove CheckRegSize from movq.
	* i386-tbl.h: Regenerated.
2010-10-14 23:16:19 +00:00
Alan Modra 98bb660ae6 daily update 2010-10-14 23:00:05 +00:00