aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2011-06-14 gdb/testsuite/Yao Qi2-1/+5
* gdb.threads/ia64-sigill.exp: Remove "set debug lin-lwp 1".
2011-06-10gdb/Jan Kratochvil2-0/+7
* symtab.c (output_partial_symbol_filename): Exchange the filename and fullname parameters order. gdb/testsuite/ * gdb.dwarf2/dw2-filename.exp (info sources): New testcase.
2011-06-10 * gdb.cp/temargs.exp: Let tests pass if compiler bug is fixed.Tom Tromey3-6/+53
Add tests for pointer-to-member-function. * gdb.cp/temargs.cc (S::somefunc): New function. (K2): New class. (main): Instantiate K2; call method.
2011-06-08py-inferior.exp: Make sure local var is allocated on the stack.Joel Brobecker3-2/+12
The testcase, at some point, is trying to change the contents of a string that was defined as follow: char *str = "hello, testsuite"; The problem is that the string is constant, and str is never used to change the contents of the string in the program, so the compiler is free to allocate it in a read-only section. This is what happens on x86-windows, for instance. As a result, trying to change the contents of the string during the `python gdb.inferiors()[0].write_memory (addr, str)' results in the following error: (gdb) python gdb.inferiors()[0].write_memory (addr, str) gdb: write target memory, 5 bytes at 0x00403064 Traceback (most recent call last): File "<string>", line 1, in <module> gdb.MemoryError: Cannot access memory at address 0x403064 Error while executing Python code. This patch prevents this from happening by declaring str as an array rather than a pointer. gdb/testsuite/ChangeLog: * gdb.python/py-inferior.c (f2): Make str an array rather than a pointer. * gdb.python/py-inferior.exp: Adjust testcase accordingly.
2011-06-07gdb/Jan Kratochvil3-0/+69
* cli/cli-cmds.c (shell_escape): Use waitpid. * rs6000-nat.c (exec_one_dummy_insn): Likewise. gdb/testsuite/ * gdb.base/async-shell.c: New file. * gdb.base/async-shell.exp: New file.
2011-06-062011-06-06 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-1/+5
gdb/testsuite/ * gdb.threads/pending-step.exp: Add more context to SIGTRAP match.
2011-06-03Various spelling fixes.Joel Brobecker2-9/+15
gdb/ChangeLog: From Stephen Kitt <steve@sk2.org> * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c, gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes. gdb/testsuite/ChangeLog: From Stephen Kitt <steve@sk2.org> * gdb.base/help.exp: Adjust following some spelling corrections in GDB.
2011-06-012011-06-01 Yao Qi <yao@codesourcery.com>Yao Qi2-0/+8
* gdb.base/ending-run.exp: Match __uClibc_main for uClibc.
2011-05-31 PR c++/12750Keith Seitz3-0/+134
* gdb.cp/static-method.cc: New file. * gdb.cp/static-method.exp: New file.
2011-05-31 PR symtab/12704Keith Seitz3-0/+168
* gdb.cp/anon-ns.cc: New file. * gdb.cp/anon-ns.exp: New file.
2011-05-312011-05-31 Pedro Alves <pedro@codesourcery.com>Pedro Alves3-0/+97
gdb/gdbserver/ * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in assertion. * win32-i386-low.c (i386_dr_low_get_addr): Ditto. gdb/testsuite/ * gdb.arch/i386-dr3-watch.c: New file. * gdb.arch/i386-dr3-watch.exp: New file.
2011-05-302011-05-30 Yao Qi <yao@codesourcery.com>Yao Qi3-2/+205
* gdb.base/callfuncs.c (t_structs_fc): New. (t_structs_dc, t_structs_ldc): New. (t_double_many_args): (DEF_FUNC_MANY_ARGS_1, DEF_FUNC_MANY_ARGS_2): Define. (DEF_FUNC_MANY_ARGS_3, DEF_FUNC_VALUES_1): Define. (DEF_FUNC_VALUES_2, DEF_FUNC_VALUES_3): Define. * gdb.base/callfuncs.exp: Call new functions.
2011-05-302011-05-30 Yao Qi <yao@codesourcery.com>Yao Qi2-31/+63
* gdb.base/callfuncs.exp (rerun_and_prepare): New. Call rerun_and_prepare for each test to isolate effects.
2011-05-302011-05-30 Yao Qi <yao@codesourcery.com>Yao Qi4-0/+121
* gdb.base/varargs.c (find_max_float_real): New. (find_max_double_real, find_max_long_double_real): New. * gdb.base/varargs.exp: Call these new added functions. * lib/gdb.exp (setup_kfail_for_target): New.
2011-05-302011-05-30 Yao Qi <yao@codesourcery.com>Yao Qi4-1/+278
* gdb.base/funcargs.c (callca, callcb, callcc): New. (callcd, callce, callcf, callc1a, callc1b): New. (callc2a, callc2b): New. * gdb.base/funcargs.exp (complex_args): New. (complex_integral_args, complex_float_integral_args): New. * lib/gdb.exp (support_complex_tests): New. Determine whether to run test cases on _Complex types.
2011-05-27gdb/Jan Kratochvil3-0/+92
Fix PR 10970, PR 12702. * linux-nat.c (linux_lwp_is_zombie): New function. (wait_lwp): Initialize status. New variable prev_mask. Block signals. Check for linux_lwp_is_zombie. Use WNOHANG and sigsuspend. gdb/testsuite/ * gdb.threads/leader-exit.c: New file. * gdb.threads/leader-exit.exp: New file.
2011-05-27gdb.mi/mi-nonstop.exp: Replace gdb_test_multiple with mi_gdb_test.Marek Polacek2-10/+9
2011-05-27gdb.mi: Get rid of the non-stop testcases.Marek Polacek7-66/+10
2011-05-262011-05-26 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-0/+61
gdb/ * infcmd.c (finish_backward): Set a step-resume breakpoint at the function's entry point instead of a manually managed momentary breakpoint, and only ever issue one proceed call. * infrun.c (handle_inferior_event) <BPSTAT_WHAT_STEP_RESUME>: If doing a reverse-finish, switch to stepi mode, to do another step. (insert_step_resume_breakpoint_at_sal): Make public. (normal_stop): No need to save function value return registers if going reverse. * inferior.h (insert_step_resume_breakpoint_at_sal): Declare. gdb/testsuite/ * gdb.reverse/finish-reverse-bkpt.exp: New test.
2011-05-262011-05-26 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-0/+62
gdb/ * breakpoint.h (enum bptype) <bp_hp_step_resume>: New. (enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME before BPSTAT_WHAT_STOP_SILENT. Add BPSTAT_WHAT_HP_STEP_RESUME at the end. * breakpoint.c (update_breakpoints_after_exec): Also delete hp step-resume breakpoints. (print_it_typical): Handle bp_hp_step_resume. (bpstat_what): Ditto. (bptype_string): Ditto. (print_one_breakpoint_location): Ditto. (allocate_bp_location): Ditto. (mention): Ditto. (breakpoint_re_set_one): Ditto. * infrun.c (handle_inferior_event): Adjust. Split BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and BPSTAT_WHAT_HP_STEP_RESUME. (insert_step_resume_breakpoint_at_sal): Rename to ... (insert_step_resume_breakpoint_at_sal_1): ... this. Add bptype parameter. Handle it. (insert_step_resume_breakpoint_at_sal): Reimplement on top of insert_step_resume_breakpoint_at_sal_1. (insert_step_resume_breakpoint_at_frame): Rename to ... (insert_hp_step_resume_breakpoint_at_frame): ... this. Adjust to set a high-priority step-resume breakpoint. (insert_step_resume_breakpoint_at_frame): Adjust comment. (insert_step_resume_breakpoint_at_caller): Ditto. gdb/testsuite/ * gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
2011-05-24 PR breakpoint/12803Keith Seitz3-1/+28
* gdb.cp/cmpd-minsyms.cc (a): New method. (b): New method. (c): New method. * gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
2011-05-242011-05-24 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-4/+21
gdb/ * breakpoint.c (watchpoint_check): If the watchpoint went out of scope, clear its command list. (map_breakpoint_numbers): Don't walk the related breakpoints list of each breakpoint. gdb/testsuite/ * gdb.base/commands.exp (watchpoint_command_test): Check that the watchpoint's command list didn't execute when the watchpoint went out of scope.
2011-05-24../commit.txt~Pierre Muller14-61/+46
2011-05-242011-05-24 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-0/+10
gdb/ * solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting shared library event breakpoint if there's no execution. gdb/testsuite/ * gdb.trace/tfile.exp: Add test that opening the basic.tf trace file doesn't error, using MI.
2011-05-23gdbTom Tromey3-0/+20
* c-lang.c (evaluate_subexp_c): Use expect_type if it is not NULL. gdb/testsuite * gdb.base/charset.exp (string_display): Add tests to assign to arrays. * gdb.base/charset.c (short_array, int_array, long_array): New.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-4/+21
Cope with async mode. gdb/testsuite/ * gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test into gdb_test + mi_expect_stop.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-4/+5
gdb/testsuite/ * gdb.mi/basics.c: Don't include stdio.h or unistd.h. (callme): Remove printf call.
2011-05-20 * lib/gdb.exp (gdb_test_list_exact): Suggest use of doublePierre Muller3-4/+11
quote pattern to avoid problems with Cygwin/mingw expect versions. * gdb.base/default.exp (show convenience): Use double quote pattern for regular expressions.
2011-05-20gdb/Jan Kratochvil3-0/+129
Fix -readnow for -gdwarf-4 unused type units. * dwarf2read.c (struct signatured_type): Remove the field offset. (create_signatured_type_table_from_index): Remove its initialization. (create_debug_types_hash_table): Likewise. Initialize per_cu.offset instead. Add a complaint call. (process_psymtab_comp_unit): Change assignment to gdb_assert. (process_type_comp_unit, lookup_die_type, dump_die_shallow) (lookup_signatured_type_at_offset, read_signatured_type) (write_one_signatured_type): Update the field for per_cu. gdb/testsuite/ Fix -readnow for -gdwarf-4 unused type units. * gdb.dwarf2/dw4-sig-type-unused.S: New file. * gdb.dwarf2/dw4-sig-type-unused.exp: New file.
2011-05-18gdb/Jan Kratochvil3-0/+71
* linux-nat.c (kill_callback): Use SIGKILL first. gdb/testsuite/ * gdb.base/kill-after-signal.c: New file. * gdb.base/kill-after-signal.exp: New file.
2011-05-162011-05-16 Pedro Alves <pedro@codesourcery.com>Pedro Alves19-47/+78
gdb/testsuite/ * gdb.ada/start.exp: Call untested with the correct test filename. * gdb.arch/i386-bp_permanent.exp: Call untested with the correct test filename. Make the test's binary unique. * gdb.arch/i386-signal.exp: Call untested with the correct test filename. * gdb.arch/i386-size-overlap.exp: Ditto. * gdb.arch/Makefile.in (EXECUTABLES): Update. * gdb.base/gcore-buffer-overflow.exp: Ditto. * gdb.cp/call-c.exp: Ditto. * gdb.mi/mi-reverse.exp: Call untested with the correct test filename. Make the test's binary unique. * gdb.mi/Makefile.in (EXECUTABLES): Update. * gdb.python/py-mi.exp: Ditto. * gdb.python/Makefile.in (EXECUTABLES): Update. * gdb.reverse/i386-precsave.exp: Ditto. * gdb.reverse/i387-env-reverse.exp: Call untested with the correct test filename. * gdb.reverse/i387-stack-reverse.exp: Ditto. * gdb.reverse/sigall-precsave.exp: Ditto. Make the test's binary unique. * gdb.reverse/sigall-reverse.exp: Call untested with the correct test filename. * gdb.reverse/Makefile.in (EXECUTABLES): Update. * gdb.trace/tfile.exp: Ditto.
2011-05-142011-05-14 Yao Qi <yao@codesourcery.com>Yao Qi2-4/+9
* gdb.trace/tfile.c(add_memory_block): Store address in unsigned type.
2011-05-13 * NEWS: Mention "info auto-load-scripts".Doug Evans5-0/+178
* python/py-auto-load.c (struct auto_load_pspace_info): New member script_not_found_warning_printed. (init_loaded_scripts_info): Renamed from create_loaded_scripts_hash, all callers updated. Initialize script_not_found_warning_printed. (get_auto_load_pspace_data_for_loading): New function. (maybe_add_script): New function. (source_section_scripts): Simplify. Only print one warning regardless of the number of auto-load scripts not found. (clear_section_scripts): Clear script_not_found_warning_printed. (auto_load_objfile_script): Record script in hash table. (count_matching_scripts): New function. (maybe_print_script): Renamed from maybe_print_section_script, all callers updated. Rewrite to use ui_out_*. (info_auto_load_scripts): Renamed from maintenance_print_section_scripts, all callers updated. (gdbpy_initialize_auto_load): "maintenance print section-scripts" renamed as "info auto-load-scripts". doc/ * gdb.texinfo (Auto-loading): Document "info auto-load-scripts". testsuite/ * gdb.python/py-objfile-script.exp: New file. * gdb.python/py-objfile-script.c: New file. * gdb.python/py-objfile-script-gdb.py: New file. * testsuite/gdb.python/py-section-script.exp: Test "info auto-load-scripts".
2011-05-13fix >80 cols in earlier entryDoug Evans1-1/+2
2011-05-13gdbTom Tromey4-0/+1030
* dwarf2expr.c (read_uleb128): Cast intermediate result. (read_sleb128): Likewise. gdb/testsuite * gdb.dwarf2/clztest.exp: New file. * gdb.dwarf2/clztest.c: New file. * gdb.dwarf2/clztest.S: New file.
2011-05-13 * gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 ↵Doug Evans2-4/+16
tests.
2011-05-13 * lib/gdb.exp (is_x86_like_target): New proc.Tom Tromey10-12/+36
* gdb.dwarf2/watch-notconst.exp: Use is_x86_like_target. * gdb.dwarf2/valop.exp: Use is_x86_like_target. * gdb.dwarf2/typeddwarf.exp: Use is_x86_like_target. Pass -nostdlib to compiler. * gdb.dwarf2/typeddwarf.S (_start): Rename from 'main'. * gdb.dwarf2/pieces.exp: Use is_x86_like_target. * gdb.dwarf2/implptr.exp: Use is_x86_like_target. * gdb.dwarf2/dw2-restore.exp: Check for LP64. * gdb.dwarf2/callframecfa.exp: Use is_x86_like_target.
2011-05-13gdb/Thiago Jung Bauermann2-0/+19
* mi/mi-main.c (mi_cmd_execute): Use cleanup from prepare_execute_command. * top.c (prepare_execute_command): Return cleanup. (execute_command): Use cleanup from prepare_execute_command. * top.h (prepare_execute_command): Change prototype to return cleanup. * defs.h (struct value): Add opaque declaration. (make_cleanup_value_free_to_mark): Add prototype. * utils.c (do_value_free_to_mark): New function. (make_cleanup_value_free_to_mark): Likewise. gdb/testsuite/ * gdb.python/py-function.exp: Test setting a value from a function which executes a command.
2011-05-12gdbTom Tromey4-0/+2415
PR gdb/12617: * value.h (value_from_contents): Declare. * value.c (value_from_contents): New function. * dwarf2read.c (dwarf_stack_op_name): Add new values. (dwarf2_get_die_type): New function. * dwarf2loc.c (dwarf_expr_get_base_type): New function. (allocate_piece_closure): Acquire reference to values. (read_pieced_value): Update for value-based expressions. (write_pieced_value): Likewise. (free_pieced_value_closure): Call value_free as needed. (dwarf2_evaluate_loc_desc_full): Set get_base_type field. Update for value-based expressions. * dwarf2loc.h (dwarf2_get_die_type): Declare. * dwarf2expr.h (struct dwarf_stack_value) <value>: Change type. <get_base_type>: New field. (struct dwarf_expr_piece) <v.value>: Change type. <v.regno>: New field. (struct dwarf_expr_context) <mark>: New field. (dwarf_expr_piece, dwarf_expr_fetch): Update. (dwarf_expr_pop, dwarf_expr_push): Remove. (dwarf_expr_push_address): Declare. * dwarf2expr.c (dwarf_arch_cookie): New global. (struct dwarf_gdbarch_types): New. (dwarf_gdbarch_types_init, dwarf_expr_address_type): New functions. (dwarf_expr_push): Change type of 'value' argument. Update. Now static. (dwarf_expr_push_address): New function. (dwarf_expr_pop): Now static. (dwarf_expr_fetch): Change return type. (dwarf_require_integral): New function. (dwarf_expr_fetch): Simplify. (add_piece): Update. (base_types_equal_p, dwarf_get_base_type, get_unsigned_type): New functions. (execute_stack_op) <sign_ext>: Remove. Use values for DWARF stack. <DW_OP_GNU_const_type, DW_OP_GNU_deref_type, DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>: New cases. (_initialize_dwarf2expr): New function. (add_piece): Update. (new_dwarf_expr_context): Set new field. (free_dwarf_expr_context): Call value_free_to_mark. * dwarf2-frame.c (no_base_type): New function. (execute_stack_op): Set get_base_type field. Update. gdb/testsuite * gdb.dwarf2/typeddwarf.S: New file. * gdb.dwarf2/typeddwarf.c: New file. * gdb.dwarf2/typeddwarf.exp: New file.
2011-05-12Fix races in gdb.mi/mi-basics.expMarek Polacek2-37/+25
2011-05-11gdb/testsuite/Jan Kratochvil2-18/+13
* lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers. (gdb_touch_execfile): Remove catch wrappers. New variable time. Replace `file copy' and `file rename' by `file mtime'. Twice.
2011-05-11gdb/testsuite/Jan Kratochvil4-0/+163
* gdb.base/readline-ask.c: New file. * gdb.base/readline-ask.exp: New file. * gdb.base/readline-ask.inputrc: New file.
2011-05-06ChangeLog:Ulrich Weigand5-4/+21
* ppc-linux-tdep.c (ppu2spu_prev_register): Handle pseudo registers. (ppu2spu_unwind_register): Mark pseudo registers unavailable. * spu-tdep.c (op_selb): Use correct value. testsuite/ChangeLog: * gdb.cell/bt.exp: Delete breakpoints before running to signal to avoid race condition. * gdb.cell/coremaker.c: Use small stack size. * gdb.cell/ea-standalone.exp: Use file name without path as argument to c_to. * gdb.cell/fork.exp: Allow other output when continuing to end.
2011-05-06gdb/testsuite/Jan Kratochvil3-1/+111
* gdb.threads/corethreads.c: New file. * gdb.threads/corethreads.exp: New file.
2011-05-06gdb/testsuite/Jan Kratochvil2-2/+31
* gdb.threads/gcore-thread.exp (objfile, opts): New variables. Try to compile the test using -Wl,-z,norelro first. (load_core): New variable libthread_db_seen, initialize it. (zeroed-threads cannot be listed): Protect it by XFAIL on !$libthread_db_seen.
2011-05-06gdb/Jan Kratochvil4-0/+530
PR 12573 * dwarf2read.c (struct dwarf2_cu): New field has_loclist. (producer_is_gcc_ge_4_0): New function. (process_full_comp_unit): Set also symtab->locations_valid. Move the symtab->language code. (var_decode_location): Set cu->has_loclist. * symtab.c (skip_prologue_sal): New variables saved_pc, force_skip and skip. Intialize force_skip from locations_valid. Move the prologue skipping code into two passes. * symtab.h (struct symtab): Make the primary field a bitfield. New field locations_valid. gdb/testsuite/ PR 12573 * gdb.dwarf2/dw2-skip-prologue.S: New file. * gdb.dwarf2/dw2-skip-prologue.c: New file. * gdb.dwarf2/dw2-skip-prologue.exp: New file.
2011-05-06gdb/Jan Kratochvil3-0/+66
* symtab.c (compare_symbol_name): New function. (completion_list_add_name, expand_partial_symbol_name): Call it, remove the variable ncmp. (default_make_symbol_completion_list_break_on): Reduce SYM_TEXT_LEN, gdb_assert it. gdb/testsuite/ * gdb.cp/psymtab-parameter.cc: New file. * gdb.cp/psymtab-parameter.exp: New file.
2011-05-06gdb/testsuite/Jan Kratochvil2-5/+27
Fix a race. * gdb.cp/static-print-quit.exp (print c): Split to ... (print c - <return>, print c - q <return>, print c - to quit): ... these. Make the testfile untested on gdb-7.1.
2011-05-05fix typoJanis Johnson1-1/+1
2011-05-05 * lib/gdb.exp (exec_target_file, exec_symbol_file,Janis Johnson3-8/+63
gdb_rename_execfile, gdb_touch_execfile): New. * gdb.base/reread.exp: Use new procs to handle multiple exec files.