aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-5/+10
* gdb.base/watchpoint.exp (top level): Re-enable hardware watchpoints sooner.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-0/+6
* gdb.base/watchpoint.exp (top level): Delete watch ival3.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-2/+44
* gdb.base/watchpoint.exp (test_watchpoint_in_big_blob): Expect "You may have requested too many hardware breakpoints/watchpoints".
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-47/+49
* gdb.base/watchpoint.exp (maybe_clean_restart) (maybe_reinitialize): New. (test_disabling_watchpoints): Call maybe_reinitialize. Don't expect "hit N times". (test_disabling_watchpoints, test_complex_watchpoint) (test_watchpoint_and_breakpoint, test_inaccessible_watchpoint): Call maybe_clean_restart. (top level): Use clean_restart. Remove "mips-idt-*" reinitialization.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-7/+5
* gdb.base/watchpoint.exp: Always run test_complex_watchpoint.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-11/+10
* gdb.base/watchpoint.exp: Clean restart after tests that don't require `initialize' anymore. Remove unnecessary `initialize' calls.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-66/+8
* gdb.base/watchpoint.exp (wp_set): Delete. (initialize, test_simple_watchpoint, top level): Remove dead code.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+6
* gdb.base/watchpoint.exp (test_inaccessible_watchpoint): Fix typo.
2012-01-272012-01-27 Pedro Alves <palves@redhat.com>Pedro Alves4-1/+217
* config/extended-gdbserver.exp: New file. * lib/gdbserver-support.exp (gdbserver_start_extended): Extend comment. (gdbserver_start_multi, mi_gdbserver_start_multi): New. * boards/native-extended-gdbserver.exp: New file.
2012-01-262012-01-26 Pedro Alves <palves@redhat.com>Pedro Alves2-134/+77
* gdb.base/watchpoint.exp: Replace send_gdb/gdb_expect by gdb_test and gdb_test_multiple.
2012-01-262012-01-26 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+20
Make test messages unique, and more identifiable. * gdb.multi/watchpoint-multi.exp: Change test messages.
2012-01-25 * gdb.base/solib-disc.exp: Fix regexps.Tom Tromey2-2/+6
2012-01-24 PR symtab/12406:Tom Tromey6-1/+189
* solib.c (update_solib_list): Update the program space's added_solibs and deleted_solibs fields. * progspace.h (struct program_space) <added_solibs, deleted_solibs>: New fields. (clear_program_space_solib_cache): Declare. * progspace.c (release_program_space): Call clear_program_space_solib_cache. (clear_program_space_solib_cache): New function. * infrun.c (handle_inferior_event) <TARGET_WAITKIND_LOADED>: Call bpstat_stop_status. Use handle_solib_event. * breakpoint.c: Include gdb_regex.h. (print_solib_event): New function. (bpstat_print): Use print_solib_event. (bpstat_stop_status): Add special case for bp_shlib_event. (handle_solib_event): New function. (bpstat_what): Use handle_solib_event. (struct solib_catchpoint): New. (dtor_catch_solib, insert_catch_solib, remove_catch_solib) (breakpoint_hit_catch_solib, check_status_catch_solib) (print_it_catch_solib, print_one_catch_solib) (print_mention_catch_solib, print_recreate_catch_solib): New functions. (catch_solib_breakpoint_ops): New global. (catch_load_or_unload, catch_load_command_1) (catch_unload_command_1): New functions. (internal_bkpt_check_status): Add special case for bp_shlib_event. (internal_bkpt_print_it): Use print_solib_event. (initialize_breakpoint_ops): Initialize catch_solib_breakpoint_ops. (_initialize_breakpoint): Register "catch load" and "catch unload". * breakpoint.h (handle_solib_event): Declare. * NEWS: Add entry for "catch load" and "catch unload". gdb/doc * gdb.texinfo (Set Catchpoints): Document "catch load" and "catch unload". (Files): Mention new catch commands. (GDB/MI Async Records): Likewise. gdb/testsuite * lib/mi-support.exp (mi_expect_stop): Add special case for solib-event. * gdb.base/catch-load-so.c: New file. * gdb.base/catch-load.exp: New file. * gdb.base/catch-load.c: New file. * gdb.base/break-interp.exp (reach_1): Update regexp.
2012-01-24gdb/testsuite/Jan Kratochvil2-3/+9
Fix fuzzy results. * gdb.mi/var-cmd.c (do_locals_tests): Initialize variables lsimple, lpsimple and func.
2012-01-24ChangeLog:Gary Benson4-5/+7
Delete #if 0'd out code. * stack.c (print_frame_label_vars): Remove. (catch_info): Likewise. (_initialize_stack): Remove "info catch" command. * NEWS: Mention the above. doc/ChangeLog: Delete #if 0'd out code. * gdb.texinfo (Frame Info): Remove "info catch". testsuite/ChangeLog: Delete #if 0'd out code. * gdb.base/default.exp (info catch): Remove. * gdb.base/gdb_history (info catch): Likewise. * gdb.base/help.exp (info catch): Likewise.
2012-01-24gdb/Jan Kratochvil3-0/+148
Fix watchpoints to be specific for each inferior. * breakpoint.c (watchpoint_in_thread_scope): Verify also current_program_space. * i386-nat.c (i386_inferior_data_cleanup): New. (i386_inferior_data_get): Replace variable inf_data_local by an inferior_data call. (i386_use_watchpoints): Initialize i386_inferior_data. * linux-nat.c (linux_nat_iterate_watchpoint_lwps): Use INFERIOR_PTID specific iterate_over_lwps. gdb/testsuite/ Fix watchpoints to be specific for each inferior. * gdb.multi/watchpoint-multi.c: New file. * gdb.multi/watchpoint-multi.exp: New file.
2012-01-24gdb/Jan Kratochvil7-0/+643
Fix watchpoints across inferior fork. * amd64-linux-nat.c (update_debug_registers_callback): Update the comment for linux_nat_iterate_watchpoint_lwps. (amd64_linux_dr_set_control, amd64_linux_dr_set_addr): Use linux_nat_iterate_watchpoint_lwps. (amd64_linux_prepare_to_resume): New comment on Linux kernel. * i386-linux-nat.c (update_debug_registers_callback): Update the comment for linux_nat_iterate_watchpoint_lwps. (i386_linux_dr_set_control, i386_linux_dr_set_addr): Use linux_nat_iterate_watchpoint_lwps. (i386_linux_prepare_to_resume): New comment on Linux kernel. * i386-nat.c: Include inferior.h. (dr_mirror): Remove. (i386_inferior_data, struct i386_inferior_data) (i386_inferior_data_get): New. (i386_debug_reg_state): Use i386_inferior_data_get. (i386_cleanup_dregs, i386_update_inferior_debug_regs) (i386_insert_watchpoint, i386_remove_watchpoint) (i386_stopped_data_address, i386_insert_hw_breakpoint) (i386_remove_hw_breakpoint): New variable state, use i386_debug_reg_state instead of DR_MIRROR. * linux-nat.c (delete_lwp): New declaration. (num_lwps): Move here from downwards. (delete_lwp_cleanup): New. (linux_child_follow_fork): Create new child_lp, call linux_nat_new_thread and linux_nat_prepare_to_resume before calling PTRACE_DETACH. (num_lwps): Move upwards. (linux_nat_iterate_watchpoint_lwps): New. * linux-nat.h (linux_nat_iterate_watchpoint_lwps_ftype): New. (linux_nat_iterate_watchpoint_lwps_ftype): New declaration. gdb/testsuite/ Fix watchpoints across inferior fork. * gdb.threads/watchpoint-fork-child.c: New file. * gdb.threads/watchpoint-fork-mt.c: New file. * gdb.threads/watchpoint-fork-parent.c: New file. * gdb.threads/watchpoint-fork-st.c: New file. * gdb.threads/watchpoint-fork.exp: New file. * gdb.threads/watchpoint-fork.h: New file.
2012-01-23gdb/Pedro Alves2-2/+6
2012-01-23 Pedro Alves <palves@redhat.com> * top.c (caution): Update comment. (execute_command): Don't consider the current value of `caution'. gdb/testsuite/ 2012-01-23 Pedro Alves <palves@redhat.com> * gdb.base/call-signal-resume.exp: Allow output after "return".
2012-01-202012-01-20 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+5
* gdb.python/py-finish-breakpoint.py: Fix typo.
2012-01-20ChangeLog:Ulrich Weigand2-17/+19
* defs.h (enum info_proc_what): Moved here from linux-nat.c * infcmd.c: (info_proc_cmd_1): New function. (info_proc_cmd): New function, moved here from equivalent routine orignally in linux-nat.c. (info_proc_cmd_mappings): Likewise. (info_proc_cmd_stat): Likewise. (info_proc_cmd_status): Likewise. (info_proc_cmd_cwd): Likewise. (info_proc_cmd_cmdline): Likewise. (info_proc_cmd_exe): Likewise. (info_proc_cmd_all): Likewise. (_initialize_infcmd): Install "info proc" command and subcommands. * target.h (struct target_ops): Add to_info_proc. (target_info_proc): Add prototype. * target.c (target_info_proc): New function. * procfs.c (procfs_info_proc): Add prototype. (info_proc_cmd): Rename into ... (procfs_info_proc): ... this. Update argument types as appropriate for a to_info_proc implementation. Handle "what" argument. (procfs_target): Install procfs_info_proc. (_initialize_procfs): No longer install "info proc" command. * linux-nat.c: (enum info_proc_what): Remove. (linux_nat_info_proc_cmd_1): Rename into ... (linux_nat_info_proc): ... this. Update argument types as appropriate for a to_info_proc implementation. (linux_nat_info_proc_cmd): Remove. (linux_nat_info_proc_cmd_mappings): Likewise. (linux_nat_info_proc_cmd_stat): Likewise. (linux_nat_info_proc_cmd_status): Likewise. (linux_nat_info_proc_cmd_cwd): Likewise. (linux_nat_info_proc_cmd_cmdline): Likewise. (linux_nat_info_proc_cmd_exe): Likewise. (linux_nat_info_proc_cmd_all): Likewise. (linux_target_install_ops): Install linux_nat_info_proc. (_initialize_linux_nat): No longer install "info proc" command and subcommands. testsuite/ChangeLog: * gdb.base/info-proc.exp: Also run on remote targets. Main "info proc" command is now always present; whether target supports actual info proc operation is detected when attempting to issue the command.
2012-01-19gdb/testsuite/Jan Kratochvil2-1/+4
* .gdbinit: Remove.
2012-01-192012-01-19 Pedro Alves <palves@redhat.com>Pedro Alves3-9/+19
* gdb.java/jprint.exp: Don't rely on inferior output, but instead look at the funtions' returns. * gdb.java/jprint.java (jvclass.addprint, jprint.print(int)) (jprint.print(int, int)): Change return type to int. Adjust.
2012-01-182012-01-18 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2-5/+27
Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/9538 * symfile.c (find_separate_debug_file): New function. (terminate_after_last_dir_separator): Likewise. (find_separate_debug_file_by_debuglink): Also try realpath. * configure.ac (AC_CHECK_FUNCS): Add lstat. * configure: Regenerate. * config.in: Regenerate. testsuite/ChangeLog: 2012-01-18 Paul Pluzhnikov <ppluzhnikov@google.com> PR gdb/9538 * gdb.base/sepdebug.exp: New test.
2012-01-182012-01-18 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+6
* gdb.ada/mi_task_info.exp (-ada-task-info with no argument): Allow output before ^done.
2012-01-16gdbTom Tromey2-6/+16
* NEWS: Add item. * symtab.h (compare_filenames_for_search): Declare. * symtab.c (compare_filenames_for_search): New function. (iterate_over_some_symtabs): Use it. * symfile.h (struct quick_symbol_functions) <map_symtabs_matching_filename>: Change spec. * psymtab.c (partial_map_symtabs_matching_filename): Use compare_filenames_for_search. Update for new spec. * dwarf2read.c (dw2_map_symtabs_matching_filename): Use compare_filenames_for_search. Update for new spec. * breakpoint.c (clear_command): Use compare_filenames_for_search. gdb/doc * gdb.texinfo (Specify Location): Document relative file name handling. gdb/testsuite * gdb.linespec/linespec.exp: Change some tests to use $decimal. Add tests for relative directory.
2012-01-16gdbTom Tromey6-10/+58
PR python/13281: * gdbtypes.h (TYPE_FLAG_ENUM): New macro. (struct main_type) <flag_flag_enum>: New field. * dwarf2read.c (process_enumeration_scope): Detect "flag" enums. * NEWS: Add entries. * c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag" enums. * python/lib/gdb/printing.py (_EnumInstance): New class. (FlagEnumerationPrinter): Likewise. gdb/doc * gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter. gdb/testsuite * gdb.base/printcmds.c (enum flag_enum): New. (three): New global. * gdb.base/printcmds.exp (test_print_enums): Add test for flag enum printing. * gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate FlagEnumerationPrinter. * gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter. * gdb.python/py-pp-maint.c (enum flag_enum): New. (fval): New global.
2012-01-162012-01-16 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+33
* lib/gdb.exp (banned_procedures): New variable. (banned_variables_traced): Rename to ... (banned_traced): ... this. (gdb_init): Also trace banned procedures. (gdb_finish): Also untrace banned procedures.
2012-01-162012-01-16 Pedro Alves <palves@redhat.com>Pedro Alves473-1888/+4
Remove all calls to strace.
2012-01-14gdb/testsuite/Jan Kratochvil3-0/+131
* gdb.dwarf2/dw2-namespaceless-anonymous.S: New file. * gdb.dwarf2/dw2-namespaceless-anonymous.exp: New file.
2012-01-132012-01-13 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov3-3/+8
* gdb.base/attach-pie-misread.exp: Pass -pie only to the linker. * gdb.base/pie-execl.exp: Likewise.
2012-01-12 PR mi/10586Keith Seitz5-0/+279
* gdb.mi/var-cmd.c (struct anonymous): New structure. (do_anonymous_type_tests): New function. (main): Call do_anonymous_type_tests. * gdb.mi/mi2-var-child.exp: Add anonymous type tests. (verify_everything): New procedure. * gdb.mi/mi-var-cp.cc (class A): New class. (anonymous_structs_and_unions): New function. (main): Call anonymous_structs_and_unions. * gdb.mi/mi-var-cp.exp: Add anonymous type tests. (verify_everything): New procedure.
2012-01-12 * lib/mi-support.exp: Expand comments about PATH_EXPR.Keith Seitz2-12/+68
(varobj_tree::get_path_expr): Assume that all varobjs are compound unless they are known simple types. Adjust path expressions based on parent type, path parent type, and tree language. (varobj_tree::walk_tree): Add LANGUAGE parameter and save it into the root varobj. (mi_walk_varobj_tree): Add LANGUAGE parameter.
2012-01-112012-01-11 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+6
* gdb.base/default.exp (core-file): Don't expect "GDB can't read core files on this machine" anymore.
2012-01-11Add test for use of "<block>::<variable>" syntax for locals in watch.Paul N. Hilfinger3-1/+28
First, fix a technical problem with the function recurser. The test sets a watch on local_x at a point where its value is technically undefined. The test is written assuming that the value is not initially 2, but nothing in the C standard guarantees that. Second, augment the existing test for variables in recursive calls to check an equivalent expression that explicitly sets the scope of the local variable being tracked. 2012-01-11 Paul Hilfinger <hilfingr@adacore.com> * gdb.base/watchpoint.c (recurser): Initialize local_x. (main): Repeat recurser call. * gdb.base/watchpoint.exp: Check that 'watch recurser::local_x' is equivalent to 'local_x'.
2012-01-11Add testcase for locals identified with FUNCTION::VAR syntax.Paul N. Hilfinger3-0/+89
This test stops inside a recursive function after a few levels of recursion, goes up some frames, and then accesses a local variable with 'print foo::val' rather than the usual 'print val' to see if the former pays attention to the selected frame. 2012-01-11 Paul Hilfinger <hilfingr@adacore.com> Joel Brobecker <brobecker@adacore.com> * gdb.base/recpar.c, gdb.base/recpar.exp: New files.
2012-01-052012-01-05 Khoo Yit Phang <khooyp@cs.umd.edu>Pedro Alves5-0/+102
* infrun.c (normal_stop): Don't skip calling the normal_stop observers if the thread was doing a multi-step, but stopped for some reason other than stepping. gdb/testsuite/ 2012-01-05 Pedro Alves <alves.ped@gmail.com> * gdb.mi/mi-stepn.c, gdb.mi/mi-stepn.exp: New files. * gdb.python/py-events.c (first): Add bits for new "step N" test. * gdb.python/py-events.exp: Test that "step N" tripping on a breakpoint emits a breakpoint event.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker263-319/+274
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1290-1648/+1375
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2012-01-03more copyright notice reformatting.Joel Brobecker2-3/+6
gdb/ChangeLog: * ada-lang.c: Reformat the copyright notice. gdb/testsuite/ChangeLog: * gdb.base/auxv.exp: Reformat the copyright notice.
2012-01-03gdb/testsuite/Yao Qi3-0/+171
* gdb.trace/strace.exp (strace_trace_on_same_addr): New. (strace_trace_on_diff_addr): New. * gdb.trace/strace.c: (main): Add two local variables.
2012-01-02 * gdb.cell/fork.exp: Delete breakpoints after reaching main.Ulrich Weigand4-9/+19
* gdb.cell/gcore.exp: Likewise. * gdb.cell/solib-symbol.exp: Use "info symbol" instead of "break" to verify the correct instance of main is selected.
2012-01-02Update the copyright header of various files...Joel Brobecker30-36/+45
... to follow the correct syntax (according to the gospel of gnulib's update-copyright). In other words: - no comma after the last year; - FSF spelled exactly "Free Software Foundation, Inc.", with the comma and the period at the end. sim/common/ChangeLog: * dv-sockser.h, sim-assert.h, sim-fpu.c: Reformat the copyright header. sim/m32c/ChangeLog: * blinky.S, gloss.S, sample.S: Reformat copyright header. sim/mn10300/ChangeLog: * sim-main.h: Reformat copyright header. sim/ppc/ChangeLog: * dp-bit.c: Reformat copyright header. gdb/ChangeLog: * gdb/common/gdb_thread_db.h, gdb/dbxread.c, gdb/environ.c, gdb/gcore.h, gdb/rs6000-tdep.h, gdb/s390-nat.c, gdb/tic6x-tdep.c: Reformat the copyright header. gdb/gdbserver/ChangeLog: * terminal.h: Reformat copyright header. gdb/testsuite/ChangeLog: * dg-extract-results.sh, gdb.arch/gcore.c, gdb.arch/gdb1558.c, gdb.arch/i386-gnu-cfi.c, gdb.base/complex.c, gdb.base/cvexpr.c, gdb.base/gcore.c, gdb.base/gdb1555-main.c, gdb.base/gdb1555.c, gdb.base/gdb1821.c, gdb.base/long_long.c, gdb.base/restore.c, gdb.base/sepdebug.c, gdb.base/type-opaque-lib.c, gdb.base/type-opaque-main.c, gdb.cp/maint.exp, gdb.cp/namespace1.cc, gdb.cp/pr9631.cc, gdb.cp/psmang1.cc, gdb.cp/psmang2.cc, gdb.cp/try_catch.cc, gdb.cp/virtfunc.cc, gdb.hp/gdb.base-hp/reg.exp, gdb.mi/basics.c, gdb.mi/mi-stack.c, gdb.mi/mi-var-child.c, gdb.mi/mi2-var-child.exp, gdb.mi/var-cmd.c, gdb.threads/thread_check.c: Reformat copyright header.
2011-12-30Fixing previous Changelog entry (removing the unnecessary "gdb/testsuite/" lineEdjunior Barbosa Machado1-2/+1
and adding the missing period)
2011-12-302011-12-30 Edjunior Machado <emachado@linux.vnet.ibm.com>Edjunior Barbosa Machado3-1/+12
gdb/testsuite/ * gdb.python/py-finish-breakpoint.exp: Add `.' prefix for ppc64 * gdb.python/py-finish-breakpoint2.exp: Skip testcase if python support is not enabled.
2011-12-27gdb/testsuite/Jan Kratochvil3-6/+18
* gdb.python/py-finish-breakpoint.c (test_exec_exit): Change the parameter to self_exec, adjust the function. (main): Check for argv[1] "exit". Use argv[0] for test_exec_exit. * gdb.python/py-finish-breakpoint.exp (set var self_exec = 0): New test. (set var do_exit = 0): Remove test. (newline at end of file): Add one.
2011-12-27Ignore data minimal symbols for breakpoint linespecsJoel Brobecker4-0/+153
gdb/ChangeLog: * linespec.c (struct collect_minsyms) [list_mode]: New field. (add_minsym): Ignore data symbols if not in list mode. (search_minsyms_for_name): Set local.list_mode. gdb/testsuite/ChangeLog: * gdb.base/dmsym.c, gdb.base/dmsym_main.c, gdb.base/dmsym.exp: New files.
2011-12-26gdb/testsuite/Jan Kratochvil2-0/+15
Fix racy FAILs. * gdb.threads/fork-thread-pending.c (barrier): New variable. (thread_function, thread_forker): Call pthread_barrier_wait for it. (main): Call pthread_barrier_init for it.
2011-12-26gdb/testsuite/Jan Kratochvil6-23/+23
Fix double send_gdb leading to racy FAILs. * gdb.base/break.exp (set silent break bp_location1): Replace 3x send_gdb and gdb_expect by gdb_test. * gdb.base/fileio.exp: Replace 2x send_gdb by gdb_exit and sleep. * gdb.base/foll-vfork.exp (vfork_and_exec_child_follow_to_main_bp) (vfork_and_exec_child_follow_through_step): Use gdb_test_no_output instead of send_gdb. Twice. * gdb.base/sepdebug.exp (set silent break bp_location1): Replace 3x send_gdb and gdb_expect by gdb_test. * gdb.mi/mi-nsmoribund.exp: Replace 3x send_gdb by mi_gdb_test.
2011-12-24gdb/testsuite/Jan Kratochvil2-1/+5
* gdb.linespec/linespec.exp: Compile using {c++}.
2011-12-23gdb/testsuite/Jan Kratochvil2-2/+28
* gdb.cp/templates.exp (test_template_typedef): Import gdb_prompt. (print destructor of template typedef): Extend it for gcc/51668 XFAIL. (verify GCC PR debug/51668): New test.