aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-4/+13
* gdb.base/valgrind-db-attach.exp: Use unsupported instead of xfail. Recognize "command not found".
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-1/+12
* gdb.arch/thumb2-it.exp (test_it_break): Handle hardware single-stepping.
2010-02-16 * gdb.python/py-value.exp (test_value_in_inferior): Skip arg0 testDaniel Jacobowitz2-1/+8
if arguments are not supported.
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-2/+7
* gdb.cp/overload.exp: Allow foo::overload1arg's "this" pointer to be const or non-const.
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-4/+8
* gdb.mi/mi-break.exp (test_breakpoint_commands): Use mi_send_resuming_command to send -exec-continue.
2010-02-16 gdb/Daniel Jacobowitz4-4/+28
* linespec.c (decode_line_1): Handle FILE:FUNCTION even if FUNCTION contains parentheses. Improve removal of a trailing single quote. gdb/testsuite/ * gdb.base/list.exp (test_list_filename_and_function): Add test with single quotes. * gdb.cp/overload.cc (intToChar): Rewrite onto one line for easy matching. * gdb.cp/overload.exp: Add tests with filename, function, and quotes. Add KFAIL'd tests for PR gdb/11289.
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-1/+6
* gdb.cp/cpcompletion.exp: Specify source file name explicitly.
2010-02-16 gdb/testsuite/Daniel Jacobowitz3-4/+8
* gdb.base/comp-dir/subdir/dummy.txt: New file. * gdb.base/completion.exp: Use comp-dir/subdir instead of creating a temporary directory.
2010-02-16 gdb/testsuite/Daniel Jacobowitz2-33/+19
* gdb.base/charset.exp: Use a single regular expression to match show host-charset and show target-charset output.
2010-02-15gdb/Jan Kratochvil2-1/+28
* defs.h (parse_pid_to_attach): New. * utils.c (parse_pid_to_attach): New. * darwin-nat.c (darwin_attach): Replace ARGS parsing by parse_pid. * gnu-nat.c (gnu_attach): Likewise. * nto-procfs.c (procfs_attach): Likewise. * procfs.c (procfs_attach): Likewise. * windows-nat.c (windows_attach): Likewise. * inf-ptrace.c (inf_ptrace_attach): Likewise. Remove variable dummy. * inf-ttrace.c (inf_ttrace_attach): Likewise. * remote.c (extended_remote_attach_1): Likewise. New comment on getpid check. gdb/testsuite/ * gdb.base/attach.exp (attach to nonsense is prohibited): Make the "Illegal process-id" expect string more exact. (attach to digits-starting nonsense is prohibited): New.
2010-02-13gdb/Jan Kratochvil2-0/+7
* solib-svr4.c: (LM_ADDR_CHECK): Print successful prelink adjustment only if INFO_VERBOSE. gdb/testsuite/ * gdb.base/prelink.exp (set verbose on): New.
2010-02-122010-02-12 Tomas Holmberg <th@virtutech.com>Michael Snyder2-0/+180
* mi-reverse.exp: New file. Test for reverse option to the following MI commands: exec-continue, exec-finish, exec-next, exec-step, exec-next-instruction, exec-step-instruction.
2010-02-09 * gdb.ada/ptype_tagged_param: New testcase.Joel Brobecker5-0/+133
2010-02-08gdbTom Tromey3-0/+41
PR c++/8017: * value.h: Update. * valops.c (search_struct_field): Make 'name' const. (search_struct_method): Likewise. (find_method_list): Make 'method' const. (value_struct_elt): Make 'name' and 'err' const. (value_find_oload_method_list): Make 'method' const. (find_overload_match): Make 'name' const. * eval.c (evaluate_subexp_standard): New locals function, function_name. <OP_FUNCALL>: Handle OP_SCOPE specially. gdb/testsuite PR c++/8017: * gdb.cp/overload.exp: Add tests. * gdb.cp/overload.cc (struct K): New. (namespace N): New. (main): Call new functions. (K::staticoverload): Define.
2010-02-08PR gdb/10728Chris Moller6-1/+104
* valarith.c (value_ptrdiff): Added a test for a zero type length, warn if found, and assume length = 1. * gdb.cp/pr10728-x.h: New file. * gdb.cp/pr10728-x.cc: New file. * gdb.cp/pr10728-y.cc: New file. * gdb.cp/pr10728.exp: New file. * gdb.cp/Makefile.in (EXECUTABLES): Add pr10728
2010-02-08PR gdb/9067Chris Moller4-1/+71
* cp-valprint.c (cp_print_value_fields) Fix use of obstacks. cp_print_static_field) Fix use of obstacks. * gdb.cp/pr9067.exp: New * gdb.cp/pr9067.cc: New * gdb.cp/Makefile.in (EXECUTABLES): Add pr9067
2010-02-08 * lib/gdb.exp (gdb_test_timeout): New global variable.Joel Brobecker2-0/+21
Set it to timeout if not already set. (gdb_init): Reset the value of timeout to gdb_test_timeout.
2010-02-05 testsuite/Doug Evans2-1/+9
* lib/gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by user. doc/ * gdbint.texinfo (Testsuite): Document INTERNAL_GDBFLAGS.
2010-02-052010-02-05 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla2-3/+5
PR c++/7935: * gdb.cp/namespace-using.exp: Removed kfail; bug has been fixed. 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com> PR c++/7935: * cp-support.h: Added char* alias element to using_direct data struct. (cp_add_using): Added char* alias argument. (cp_add_using_directive): Ditto. * cp-namespace.c: Updated with the above changes. (cp_lookup_symbol_imports): Check for aliases. * dwarf2read.c (read_import_statement): Figure out local alias for the import and pass it on to cp_add_using. (read_namespace): Pass alias argument to cp_add_using.
2010-02-04gdbTom Tromey2-2/+6
* valops.c (search_struct_field): Account for value_embedded_offset. Fix check for virtual base past the end of the object. Use value_copy when making a slice of the value. gdb/testsuite * gdb.cp/virtbase.exp: Make test case names unique.
2010-02-02gdbTom Tromey3-0/+43
* valops.c (value_cast_structs): Try downcasting using the RTTI type. gdb/testsuite * gdb.cp/virtbase.exp: Add regression tests. * gdb.cp/virtbase.cc (RHA, RHB, RHC): New classes. (main): Instantiate RHC.
2010-02-02gdbTom Tromey2-1/+6
* m2-typeprint.c (m2_record_fields): Don't use TYPE_DECLARED_TYPE. * gdbtypes.h (TYPE_DECLARED_CLASS): New macro. (struct main_type) <flag_declared_class>: New field. (struct cplus_struct_type) <declared_type>: Remove. <ntemplate_args>: Move earlier. (DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT) (DECLARED_TYPE_TEMPLATE): Remove. (TYPE_DECLARED_TYPE): Remove. * gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE. * dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS. * c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not TYPE_DECLARED_TYPE. gdb/testsuite * gdb.dwarf2/member-ptr-forwardref.exp: Update expected result for type-printing change.
2010-02-02gdbTom Tromey4-1/+122
PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * valops.c (search_struct_field): Compute nbases after calling CHECK_TYPEDEF. (check_field): Call CHECK_TYPEDEF. * cp-valprint.c (cp_print_value): Pass correct address to baseclass_offset. Fix check for virtual base past the end of the object. Don't offset address passed to cp_print_value_fields or apply_val_pretty_printer. (cp_print_value_fields): Fix call to val_print. (cp_print_value_fields_rtti): New function. * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti. * p-valprint.c (pascal_object_print_value_fields): Fix call to val_print. * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded offset to address. * language.h (struct language_defn) <la_val_print>: Document. * c-lang.h (cp_print_value_fields_rtti): Declare. gdb/testsuite PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * gdb.cp/virtbase.cc: New file. * gdb.cp/virtbase.exp: New file. * gdb.cp/userdef.exp: Allow 'struct' or 'class'.
2010-02-01gdb/Jan Kratochvil2-4/+24
PR libc/11214: * linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New. (linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU]. (linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New. gdb/testsuite/ PR libc/11214: * gdb.threads/current-lwp-dead.c: Include features.h. (HAS_NOMMU): New. (fn, main): Move CLONE_VM into [__UCLIBC__ && HAS_NOMMU].
2010-02-01gdb/Jan Kratochvil3-0/+62
* solib-svr4.c (scan_dyntag): New variable dyn_addr. Replace gdb_assert by a conditional setting DYN_ADDR. Use DYN_ADDR. * config/djgpp/fnchange.lst: Add translations for symbol-without-target_section.exp and symbol-without-target_section.c. gdb/testsuite/ * gdb.base/symbol-without-target_section.exp, gdb.base/symbol-without-target_section.c: New.
2010-02-01 * gdb.base/bigcore.exp: Reset increased timeout.Daniel Jacobowitz3-0/+7
* gdb.base/interrupt.exp: Match unexpected gdb prompt.
2010-02-01 * gdb.base/gcore.exp (capture_command_output): UseDaniel Jacobowitz2-5/+6
gdb_test_multiple.
2010-02-01 * arm-tdep.c (arm_find_mapping_symbol): New function, fromDaniel Jacobowitz3-0/+66
arm_pc_is_thumb. (arm_pc_is_thumb): Use arm_find_mapping_symbol. (extend_buffer_earlier): New function. (MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants. (arm_adjust_breakpoint_address): New function. (arm_gdbarch_init): Register arm_adjust_breakpoint_address. testsuite/ * gdb.arch/thumb2-it.S (it_breakpoints): New function. * gdb.arch/thumb2-it.exp (test_it_break): New function. (Top level): Call it.
2010-02-01 * arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)Daniel Jacobowitz3-0/+283
(arm_linux_thumb2_le_breakpoint): New constants. (arm_linux_init_abi): Set thumb2_breakpoint and thumb2_breakpoint_size. * arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions. (thumb_get_next_pc): Add a comment. Rename IT to ITSTATE. Implement support for single stepping through IT blocks if a 32-bit Thumb breakpoint instruction is available. (arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction is available, use it when needed. (arm_remote_breakpoint_from_pc): New function. (arm_gdbarch_init): Register arm_remote_breakpoint_from_pc. * arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint comment. Add thumb2_breakpoint and thumb2_breakpoint_size. gdbserver/ * linux-arm-low.c (thumb_breakpoint_len): Delete. (thumb2_breakpoint): New. (arm_breakpoint_at): Check for Thumb-2 breakpoints. testsuite/ * gdb.arch/thumb2-it.S, gdb.arch/thumb2-it.exp: New files.
2010-01-29 * gdb.base/call-strs.exp, gdb.base/default.exp,Daniel Jacobowitz17-18/+55
gdb.base/ending-run.exp, gdb.base/finish.exp, gdb.base/funcargs.exp, gdb.base/huge.exp, gdb.base/nodebug.exp, gdb.base/ptype.exp, gdb.base/restore.exp, gdb.base/return.exp, gdb.base/setvar.exp, gdb.base/watchpoints.exp, gdb.threads/gcore-thread.exp, gdb.base/watchpoint-solib.exp: Save and restore timeout. * gdb.base/ending-run.exp: Correct restore of timeout. * gdb.base/page.exp: Remove unnecessary timeout setting.
2010-01-29amd64 - function returning record with field straddling 2 registersJoel Brobecker5-0/+129
gdb/ChangeLog: From Paul Hilfinger <hilfinger@adacore.com> * amd64-tdep.c (amd_classify_aggregate): Handle the case of a record of length <= 16 in which a field straddles the two eightbytes. gdb/testsuite/ChangeLog: * gdb.ada/rec_return: New testcase.
2010-01-29amd64: Integer parameters in function calls on Windows.Joel Brobecker5-0/+128
gdb/ChangeLog: * i386-tdep.h (enum amd64_reg_class): New, moved here from amd64-tdep.c. (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs, call_dummy_integer_regs, and classify. * amd64-tdep.h (amd64_classify): Add declaration. * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant. (amd64_reg_class): Delete, moved to i386-tdep.h. (amd64_classify): Make non-static. Move declaration to amd64-tdep.h. Replace call to amd64_classify by call to tdep->classify. (amd64_push_arguments): Get the list of registers to use for passing integer parameters from the gdbarch tdep structure, rather than using a hardcoded one. Replace calls to amd64_classify by calls to tdep->classify. (amd64_push_dummy_call): Get the register number used for the "hidden" argument from tdep->call_dummy_integer_regs. (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs and tdep->call_dummy_integer_regs. Set tdep->classify. * amd64-windows-tdep.c: Add include of gdbtypes.h. (amd64_windows_dummy_call_integer_regs): New static global. (amd64_windows_classify): New function. (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs tdep->call_dummy_integer_regs and tdep->classify. gdb/testsuite/ChangeLog: * gdb.ada/call_pn: New testcase.
2010-01-28 * gdb.mi/mi-nonstop.exp (mi_nonstop_resume): New function.Daniel Jacobowitz3-8/+28
(Top level): Use it to resume. * lib/mi-support.exp (mi_send_resuming_command_raw): Recognize the Thumb mode displaced stepping error as unsupported.
2010-01-282010-01-28 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla5-65/+263
* gdb.cp/nsusing.exp: Added more tests. * gdb.cp/nsrecurs.exp: Ditto. * gdb.cp/nsusing.cc: Added test functions. * gdb.cp/nsrecurs.cc: Ditto.
2010-01-27gdb/testsuite/Jan Kratochvil2-4/+10
* gdb.base/break-interp.exp: Use [file tail $filename] to omit any absolute directory pathnames in gdb.sum file.
2010-01-272010-01-27 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla3-1/+6
* gdb.cp/namespace-using.exp: Rename to nsusing.exp. * gdb.cp/namespace-using.cc: Rename to nsusing.cc.
2010-01-26gdbTom Tromey2-1/+6
PR exp/7643: * eval.c (evaluate_subexp_for_address) <UNOP_IND>: Call coerce_array on result. gdb/testsuite PR exp/7643: * gdb.base/printcmds.exp (test_print_string_constants): Remove setup_kfail.
2010-01-26 2010-01-14 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla7-0/+363
* gdb.cp/nsrecurs.exp: New test. * gdb.cp/nsrecurs.cc: New test program. * gdb.cp/nsstress.exp: New test. * gdb.cp/nsstress.cc: New test program. * gdb.cp/nsdecl.exp: New test. * gdb.cp/nsdecl.cc: New test program. 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com> * cp-namespace.c (cp_lookup_symbol_namespace): Added search_parent argument. (cp_add_using): Initialize 'searched' field. (reset_directive_searched): New function. * cp-support.h: Add 'searched' field to using_direct struct. (cp_lookup_symbol_imports): Ditto. * cp-namespace.c (cp_lookup_symbol_imports): Ditto. Perform recursive search. Implement non parent search. * valops.c (value_maybe_namespace_elt): Updated.
2010-01-262010-01-26 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla7-3/+285
* gdb.cp/namespace-using.exp: Add test for printing of namespaces imported into file scope. Marked test as xfail. * gdb.cp/namespace-using.cc (marker5): New function. * gdb.cp/shadow.exp: New test. * gdb.cp/shadow.cc: New test program. * gdb.cp/nsimport.exp: New test. * gdb.cp/nsimport.cc: New test program. 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com> PR gdb/10929: * dwarf2read.c (read_lexical_block_scope): Create blocks for scopes which contain using directives even if they contain no declarations. * symtab.c (lookup_symbol_aux): Pass lowest level block to la_lookup_symbol_nonlocal. * cp-namespace.c (cp_lookup_symbol_nonlocal): call cp_lookup_symbol_namespace. (cp_lookup_symbol_namespace): Perform an import lookup at every block level. (cp_lookup_symbol_imports): New function. (cp_lookup_symbol_in_namespace): New function.
2010-01-25gdbTom Tromey2-0/+11
PR gdb/11049: * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer result. gdb/testsuite PR gdb/11049: * gdb.base/printcmds.exp (test_print_typedef_arrays): Add test with "set print null-stop on".
2010-01-24gdb/testsuite/Jan Kratochvil2-1/+6
* gdb.arch/i386-bp_permanent.exp (Disassemble function '$function'): Adjust it for DISASSEMBLY_OMIT_FNAME.
2010-01-22gdbTom Tromey3-0/+381
PR symtab/11199: * dwarf2read.c (quirk_gcc_member_function_pointer): Change return type and arguments. Use smash_to_methodptr_type. (read_structure_type): Call quirk_gcc_member_function_pointer later. * gdbtypes.h (smash_to_methodptr_type): Declare. * gdbtypes.c (smash_to_methodptr_type): New function. (lookup_methodptr_type): Use it. gdb/testsuite 2010-01-22 Jan Kratochvil <jan.kratochvil@redhat.com> PR symtab/11199: * gdb.dwarf2/member-ptr-forwardref.exp, gdb.dwarf2/member-ptr-forwardref.S: New.
2010-01-20gdb/testsuite/Jan Kratochvil2-23/+29
* gdb.threads/watchthreads-reorder.c (gdbstop_mutex): Remove. (thread1_func): Protect thread1_tid with thread1_tid_cond by thread1_tid_mutex. Remove gdbstop_mutex handling. (thread2_func): Protect thread2_tid with thread2_tid_cond by thread2_tid_mutex. Remove gdbstop_mutex handling. (main): Move thread1_tid_mutex and thread2_tid_mutex locks before pthread_create. Remove gdbstop_mutex handling. New comment. Replace pthread_cond_wait conditionalizations by while loops.
2010-01-20gdbTom Tromey4-1/+387
PR backtrace/10770: * valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and BINOP_GEQ. Handle BINOP_NOTEQUAL in the signed case. * dwarf2expr.c (new_dwarf_expr_context): Allocate dwarf_stack_values, not CORE_ADDRs. (execute_stack_op): Change DW_OP_div and comparison operators to use signed operands. gdb/testsuite PR backtrace/10770: * gdb.dwarf2/pr10770.exp: New file. * gdb.dwarf2/pr10770.c: New file. * gdb.dwarf2/Makefile.in (EXECUTABLES): Add pr10770.
2010-01-20 * gdb.mi/mi-async.exp: Remove check for 'async' target, becauseVladimir Prus2-4/+10
that target was removed, and the test always runs native anyway.
2010-01-19gdb/Jan Kratochvil4-0/+114
* breakpoint.c (watchpoint_check): Check the call gdbarch_in_function_epilogue_p before calling frame_find_by_id. Extend the comment. * config/djgpp/fnchange.lst: Add translations for watchpoint-cond-gone.exp, watchpoint-cond-gone.c and watchpoint-cond-gone-stripped.c. gdb/testsuite/ * gdb.base/watchpoint-cond-gone.exp, gdb.base/watchpoint-cond-gone.c, gdb.base/watchpoint-cond-gone-stripped.c: New.
2010-01-19gdbTom Tromey3-3/+20
PR c++/8000: * dwarf2read.c (partial_die_parent_scope): Put enumeration type into parent scope, and enumerator into grandparent scope. gdb/testsuite PR c++/8000: * gdb.cp/namespace.exp: Use new enum. Fix line numbers in existing tests. * gdb.cp/namespace.cc (AAA::SomeEnum): New enum. (main): Use AAA::SomeEnum.
2010-01-19gdb/testsuite/Jan Kratochvil4-12/+36
* gdb.mi/mi-break.exp (set line_callme_head, set line_callme_body): New. (test_ignore_count): Declare line_callme_body global. (run to breakpoint with ignore count): Use line_callme_body. * gdb.mi/mi-cli.exp (set line_main_head, set line_main_body) (set line_main_hello, set line_main_return): Reindent. (set line_callee4_head, set line_callee4_body, set line_callee4_next): New. (continue to callee4): Use line_callee4_body. (check *stopped from CLI command): Use line_callee4_next. * gdb.mi/mi2-cli.exp (set line_main_head, set line_main_body) (set line_main_hello, set line_main_return): Reindent. (set line_callee4_head, set line_callee4_body): New. (continue to callee4): Use line_callee4_body.
2010-01-18gdbTom Tromey3-0/+108
PR c++/9680: * c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST) (CONST_CAST): New tokens. (exp): Add new productions. (ident_tokens): Add const_cast, dynamic_cast, static_cast, and reinterpret_cast. (is_cast_operator): New function. (yylex): Handle cast operators specially. * eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST, UNOP_REINTERPRET_CAST>: New cases. * expprint.c (print_subexp_standard): Likewise. (op_name_standard): Likewise. (dump_subexp_body_standard): Likewise. * parse.c (operator_length_standard): Likewise. * expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST, UNOP_REINTERPRET_CAST. * gdbtypes.c (class_types_same_p): New function. (is_ancestor): Use it. (is_public_ancestor): New function. (is_unique_ancestor_worker): Likewise. (is_unique_ancestor): Likewise. * gdbtypes.h (class_types_same_p, is_public_ancestor) (is_unique_ancestor): Declare. * valops.c (value_reinterpret_cast): New function. (dynamic_cast_check_1): Likewise. (dynamic_cast_check_2): Likewise. (value_dynamic_cast): Likewise. * value.h (value_reinterpret_cast, value_dynamic_cast): Declare. gdb/testsuite PR c++/9680: * gdb.cp/casts.cc: Add new classes and variables. * gdb.cp/casts.exp: Test new operators.
2010-01-18 * gdb.python/source2.py: New file.Joel Brobecker4-0/+50
* gdb.python/source1: New file. * gdb.python/python.exp: Test "source" command.