aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2010-06-26Refactor 'maint time' command statistics.Paul N. Hilfinger2-2/+7
Consolidate code for displaying per-command time and space statistics to avoid duplication. Piggyback on cleanups so that statistics get printed even when commands terminate as a result of an error. Changelog * gdb/defs.h (make_command_stats_cleanup): Declare. (set_display_time): Declare. (set_display_space): Declare. * gdb/event-top.c (command_handler): Use make_command_stats_cleanup. * gdb/main.c (display_time, display_space): Move definitions to utils.c. (captured_main): Use make_command_stats_cleanup to get start-up statistics. Use set_display_time and set_display_space for processing OPT_STATISTICS case. * gdb/maint.c (maintenance_time_display): Use set_display_time. (maintenance_space_display): Use set_display_space. * gdb/top.c (execute_command): Remove obsolete 'maint time' code. (command_loop): Use make_command_stats_cleanup. * gdb/utils.c (struct cmd_stats): Structure for storing initial time and space usage. (display_time, display_space): Move definitions here from utils.c. (set_display_time): New function. (set_display_space): New function. (make_command_stats_cleanup): New function. (report_command_stats): New auxiliary function for make_command_stats_cleanup. * gdb/testsuite/gdb.gdb/selftest.exp: Adjust expected message for capturing start-up runtime.
2010-06-25gdbTom Tromey2-0/+9
PR python/10808: * python/python.c (execute_gdb_command): Add keywords. Accept "to_string" argument. (struct restore_ui_file_closure): New. (restore_ui_file): New function. (make_cleanup_restore_ui_file): Likewise. (GdbMethods) <execute>: Update. gdb/doc PR python/10808: * gdb.texinfo (Basic Python): Document new gdb.execute argument. gdb/testsuite PR python/10808: * gdb.python/python.exp: Add new tests.
2010-06-25Added import loop test.Sami Wagiaalla3-0/+24
2010-06-25 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/operator.cc: Created an import loop. * gdb.cp/operator.exp: Added testcase for import loop.
2010-06-25gdb/testsuite/Jan Kratochvil5-32/+125
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-25gdb/testsuite/Jan Kratochvil4-322/+175
* 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-25ChangeLog:Ulrich Weigand3-0/+248
* 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-24gdb/Jan Kratochvil3-0/+88
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-24Add command "eval".Hui Zhu2-0/+26
2010-06-23ChangeLog:Ulrich Weigand4-0/+215
* 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-22 * lib/gdb.exp (banned_variables_traced): New global variable.Pierre Muller2-6/+30
(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 * gdb.gdb/selftest.exp: Remove support for gpl v1 and v2 gdb's.Doug Evans2-6/+4
2010-06-19ChangeLog:Ulrich Weigand3-0/+90
* 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-18 * thread.c (thread_id_make_value): Make a value representing theStan Shebs2-1/+19
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 * gdb.base/gdb11531.exp: Respect gdb,no_hardware_watchpoints flag.Ulrich Weigand4-0/+30
* gdb.base/watch-cond.exp: Likewise. * gdb.python/py-breakpoint.exp: Likewise.
2010-06-18 * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: UsePedro Alves3-27/+31
clean_restart, make sure every test has a distinct message, and that messages don't include the executable' full path.
2010-06-17 * gdb.arch/i386-size.exp: Updated expected output forDoug Evans2-1/+6
DISASSEMBLY_OMIT_FNAME.
2010-06-16gdb/ChangeLog:Sergio Durigan Junior7-2/+422
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-14Examine instruction at label `start' instead of `_start'.Kevin Buettner14-13/+24
2010-06-14 * gdb.mi/mi-nonstop.exp: Do not call perror if non-stop mode isUlrich Weigand7-7/+10
not supported on the target. * gdb.mi/mi-nonstop-exit.exp: Likewise. * gdb.mi/mi-ns-stale-regcache.exp: Likewise. * gdb.mi/mi-nsintrall.exp: Likewise. * gdb.mi/mi-nsmoribund.exp: Likewise. * gdb.mi/mi-nsthrexec.exp: Likewise.
2010-06-122010-06-11 Stan Shebs <stan@codesourcery.com>Stan Shebs2-1/+106
Add per-operation permission flags. * target.h (struct target_ops): New method to_set_permissions. (target_set_permissions): New macro. (target_insert_breakpoint): Change macro to function. (target_remove_breakpoint): Ditto. (target_stop): Ditto. (may_write_registers): Declare. (may_write_memory): Declare. (may_insert_breakpoints): Declare. (may_insert_tracepoints): Declare. (may_insert_fast_tracepoints): Declare. (may_stop): Declare. * target.c (may_write_registers, may_write_registers_1): New globals. (may_write_memory, may_write_memory_1): New globals. (may_insert_breakpoints, may_insert_breakpoints_1): New globals. (may_insert_tracepoints, may_insert_tracepoints_1): New globals. (may_insert_fast_tracepoints, may_insert_fast_tracepoints_1): New globals. (may_stop, may_stop_1): New global. (target_xfer_partial): Test for write permission. (target_store_registers): Ditto. (target_insert_breakpoint): New function. (target_remove_breakpoint): New function. (target_stop): New function. (_initialize_targets): Add new set/show variables. (set_write_memory_permission): New function. (update_target_permissions): New function. (set_target_permissions): New function. (update_current_target): Default to_set_permissions. (_initialize_targets): Use new globals and setter function. * tracepoint.c (start_tracing): Test for permission. * inferior.h (update_observer_mode): Declare. * infrun.c (non_stop_1): Define earlier. (observer_mode, observer_mode_1): New globals. (set_observer_mode, show_observer_mode): New functions. (update_observer_mode): New function. (_initialize_infrun): Define "set observer" command. * remote.c (PACKET_QAllow): New optional packet. (remote_protocol_features): Add QAllow. (remote_set_permissions): New function. (remote_start_remote): Call it. (init_remote_ops): Add it to target vector. (_initialize_remote): Add config command for QAllow. * gdb.texinfo (Observer Mode): New section. (General Query Packets): Document QAllow. * gdb.base/permissions.exp: New file.
2010-06-11 * gdb.base/valgrind-db-attach.exp: Fail gracefully if valgrindUlrich Weigand2-0/+9
does not support ELF executable class.
2010-06-11 * gdb.trace/packetlen.exp: Respect gdb_target_supports_trace.Ulrich Weigand2-0/+12
2010-06-11gdb/testsuite/Jan Kratochvil2-0/+12
* lib/gdb.exp (gdb_run_cmd): Return on $gdb_prompt. (runto): Catch "The target does not support running in non-stop mode.".
2010-06-112010-06-11 Michael Snyder <msnyder@vmware.com>Michael Snyder2-1/+6
* gdb.base/setshow.exp (set language asm): Don't use gdb_test_no_output, fails on some targets.
2010-06-11 * gdb.cp/cpexprs.exp: Skip test on spu*-*-*.Ulrich Weigand3-0/+15
* gdb.cp/pr9167.exp: Likewise.
2010-06-11 * gdb.python/py-breakpoint.exp: Handle software watchpoints as well.Ulrich Weigand2-1/+5
2010-06-11 * gdb.base/solib-corrupted.exp: Respect skip_shlib_tests.Ulrich Weigand2-0/+8
2010-06-11 * gdb.base/charset.c (main): Make sure malloc gets linked in.Ulrich Weigand2-0/+9
2010-06-11gdbTom Tromey2-3/+7
PR gdb/9977, PR exp/11636: * value.h (value_offset): Update. (struct lval_funcs) <check_validity>: New field. <copy_closure>: Make argument const. (value_computed_closure): Update. (value_contents_for_printing): Declare. (value_bits_valid): Likewise. (val_print): Likewise. (set_value_component_location): Update. (value_entirely_optimized_out): Declare. * value.c (value_offset): Argument now const. (require_not_optimized_out): New function. (value_contents_for_printing): New function. (value_contents_all): Call require_not_optimized_out. (value_contents): Likewise. (value_bits_valid): New function. (value_computed_closure): Argument now const. (set_value_component_location): Make 'whole' argument const. (value_entirely_optimized_out): New function. (value_bitsize): Argument now 'const'. (value_bitpos): Likewise. (value_type): Likewise. * valprint.h (val_print_array_elements): Update. * valprint.c (val_print): Add 'val' argument. Use valprint_check_validity. (valprint_check_validity): New function. (value_check_printable): Use value_entirely_optimized_out. (common_val_print): Update. (value_print): Likewise. (val_print_array_elements): Add 'val' argument. * valops.c (value_fetch_lazy): Use value_contents_for_printing, value_bits_valid. Reinit frame cache for lval_computed. * sh64-tdep.c (sh64_do_register): Update. * scm-valprint.c (scm_val_print): Add 'val' argument. * scm-lang.h (scm_val_print): Update. * python/python.h (apply_val_pretty_printer): Update. * python/py-prettyprint.c (apply_val_pretty_printer): Add 'val' argument. Call set_value_component_location. * printcmd.c (print_scalar_formatted): Update. * p-valprint.c (pascal_val_print): Add 'val' argument. (pascal_object_print_value_fields): Likewise. (pascal_object_print_value): Likewise. (pascal_object_print_static_field): Update. * p-lang.h (pascal_val_print): Update. (pascal_object_print_value_fields): Update. * mt-tdep.c (mt_registers_info): Update. * mi/mi-main.c (get_register): Update. (mi_cmd_data_evaluate_expression): Use common_val_print. * m2-valprint.c (m2_print_array_contents): Add 'val' argument. (m2_print_unbounded_array): Likewise. (m2_val_print): Likewise. * m2-lang.h (m2_val_print): Update. * language.h (struct language_defn) <la_val_print>: Add 'val' argument. (LA_VAL_PRINT): Likewise. * language.c (unk_lang_val_print): Add 'val' argument. * jv-valprint.c (java_print_value_fields): Add 'val' argument. (java_val_print): Likewise. * jv-lang.h (java_val_print): Add 'val' argument. * infcmd.c (default_print_registers_info): Update. * f-valprint.c (f77_print_array_1): Add 'val' argument. (f77_print_array): Likewise. (f_val_print): Likewise. * f-lang.h (f_val_print): Add 'val' argument. * dwarf2loc.c (read_pieced_value): Use value_bitsize and value_bitpos. <DWARF_VALUE_OPTIMIZED_OUT>: Don't print warning. Call set_value_optimized_out. (write_pieced_value): Use value_bitsize and value_bitpos. <default>: Don't exit loop. (check_pieced_value_validity): New function. (pieced_value_funcs): Reference check_pieced_value_validity, check_pieced_value_invalid. (copy_pieced_value_closure): Update. (check_pieced_value_bits): New function. (check_pieced_value_invalid): New function. * d-valprint.c (dynamic_array_type): Add 'val' argument. (d_val_print): Likewise. * d-lang.h (d_val_print): Update. * cp-valprint.c (cp_print_value_fields): Add 'val' argument. (cp_print_value_fields_rtti): Likewise. (cp_print_value): Likewise. (cp_print_static_field): Update. * c-valprint.c (c_val_print): Add 'val' argument. (c_value_print): Update. * c-lang.h (c_val_print): Update. (cp_print_value_fields): Likewise. (cp_print_value_fields_rtti): Likewise. * ada-valprint.c (struct ada_val_print_args): Remove. (val_print_packed_array_elements): Add 'val' argument. (ada_val_print): Likewise. Rewrite. (ada_val_print_stub): Remove. (ada_val_print_array): Add 'val' argument. (ada_val_print_1): Likewise. (print_variant_part): Likewise. (ada_value_print): Update. (print_record): Add 'val' argument. (print_field_values): Likewise. * ada-lang.h (ada_val_print): Update. gdb/testsuite PR gdb/9977, PR exp/11636:: * gdb.dwarf2/pieces.exp (pieces_test_f3): Remove kfail. (pieces_test_f6): Update expected output.
2010-06-11gdb/Jan Kratochvil2-0/+32
* breakpoint.c (breakpoint_restore_shadows): New OWNER comment. (should_be_inserted): Return zero also on NULL OWNER. (breakpoint_program_space_exit): New OWNER comment. (insert_breakpoint_locations): Extend comment for OWNER. (remove_breakpoint_1, remove_breakpoint): Assert on OWNER. (breakpoint_init_inferior, breakpoint_here_p, breakpoint_thread_match): New OWNER comment. (print_it_typical): Return PRINT_UNKNOWN on NULL OWNER. (watchpoint_check): New assert on BREAKPOINT_AT and OWNER. (bpstat_check_location): New assert on OWNER. (bpstat_check_watchpoint, bpstat_check_breakpoint_conditions): Move BL and B initializations to the code block. New assert on them. (print_one_breakpoint_location): New OWNER comment. (watchpoint_locations_match): Assert on OWNER. (breakpoint_locations_match): Move HW_POINT1 and HW_POINT2 initializations to the code block. New assert on OWNER. (set_breakpoint_location_function): New assert on OWNER. (disable_breakpoints_in_shlibs, disable_breakpoints_in_unloaded_shlib) (bp_location_compare, update_global_location_list) (update_global_location_list): New OWNER comment. gdb/testsuite/ * gdb.base/moribund-step.exp: New.
2010-06-102010-06-08 Michael Snyder <msnyder@vmware.com>Michael Snyder49-110/+168
* gdb.ada/assign_1.exp: Use ".*" instead of "" as wildcard regexp. * gdb.ada/boolean_expr.exp: * gdb.ada/frame_args.exp: Ditto. * gdb.ada/lang_switch.exp: Ditto. * gdb.ada/ptype_arith_binop.exp: Ditto. * gdb.ada/ref_param.exp: Ditto. * gdb.ada/type_coercion.exp:Ditto. * gdb.asm/asm-source.exp: Ditto. * gdb.base/attach.exp: Ditto. * gdb.base/bitfields2.exp: Ditto. * gdb.base/call-signal-resume.exp: Ditto. * gdb.base/callfuncs.exp: Ditto. * gdb.base/commands.exp: Ditto. * gdb.base/dbx.exp: Ditto. * gdb.base/default.exp: Ditto. * gdb.base/dump.exp: Ditto. * gdb.base/exprs.exp: Ditto. * gdb.base/freebpcmd.exp: Ditto. * gdb.base/interrupt.exp: Ditto. * gdb.base/list.exp: Ditto. * gdb.base/long_long.exp: Ditto. * gdb.base/maint.exp: Ditto. * gdb.base/ptype.exp: Ditto. * gdb.base/return.exp: Ditto. * gdb.base/setshow.exp: Ditto. * gdb.base/sigbpt.exp: Ditto. * gdb.base/sigrepeat.exp: Ditto. * gdb.cp/classes.exp: Ditto. * gdb.dwarf2/dw2-restore.exp: Ditto. * gdb.gdb/selftest.exp: Ditto. * gdb.multi/base.exp: Ditto. * gdb.multi/bkpt-multi-exec.exp: Ditto. * gdb.python/py-block.exp: Ditto. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-template.exp: Ditto. * gdb.server/ext-attach.exp: Ditto. * gdb.server/ext-run.exp: Ditto. * gdb.server/server-mon.exp: Ditto. * gdb.threads/fork-thread-pending.exp: Ditto. * gdb.threads/hand-call-in-threads.exp: Ditto. * gdb.threads/interrupted-hand-call.exp: Ditto. * gdb.threads/linux-dp.exp: Ditto. * gdb.threads/manythreads.exp: Ditto. * gdb.threads/print-threads.exp: Ditto. * gdb.threads/pthreads.exp: Ditto. * gdb.threads/schedlock.exp: Ditto. * gdb.threads/thread-unwindonsignal.exp: Ditto. * gdb.threads/threadapply.exp: Ditto.
2010-06-082010-06-08 Michael Snyder <msnyder@vmware.com>Michael Snyder30-111/+148
* gdb.ada/exec_changed.exp: Use ".*" instead of "" as wildcard regexp. * gdb.base/async.exp: Use ".*" instead of "" as wildcard regexp. * gdb.base/call-ar-st.exp: Ditto. * gdb.base/checkpoint.exp: Ditto. * gdb.base/default.exp: Ditto. * gdb.base/dump.exp: Ditto. * gdb.base/ending-run.exp: Ditto. * gdb.base/fileio.exp: Ditto. * gdb.base/miscexprs.exp: Ditto. * gdb.base/pointers.exp: Ditto. * gdb.base/readline.exp: Ditto. * gdb.base/reread.exp: Ditto. * gdb.base/restore.exp: Ditto. * gdb.base/shlib-call.exp: Ditto. * gdb.base/valgrind-db-attach.exp: Ditto. * gdb.base/volatile.exp: Ditto. * gdb.base/watchpoints.exp: Ditto. * gdb.cp/classes.exp: Use ".*" instead of "" as wildcard regexp. * gdb.python/py-frame.exp: Use ".*" instead of "" as wildcard regexp. * gdb.python/py-value.exp: Ditto. * gdb.trace/backtrace.exp: Use ".*" instead of "" as wildcard regexp. * gdb.trace/circ.exp: Ditto. * gdb.trace/collection.exp: Ditto. * gdb.trace/packetlen.exp: Ditto. * gdb.trace/passc-dyn.exp: Ditto. * gdb.trace/report.exp: Ditto. * gdb.trace/tfile.exp: Ditto. * gdb.trace/tfind.exp: Ditto. * gdb.trace/while-dyn.exp: Ditto.
2010-06-08gdb/Jan Kratochvil2-0/+7
* configure.ac <"${have_libpython}" != no>: New workaround of python#4434. * configure: Regenerate. gdb/testsuite/ * gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
2010-06-07gdb/Jan Kratochvil3-0/+165
Fix PR 10640. * dwarf2-frame.c (no_dwarf_call): New function. (execute_stack_op): Set CTX->DWARF_CALL. * dwarf2expr.c (execute_stack_op) <DW_OP_call2, DW_OP_call4>: New. * dwarf2expr.h (struct dwarf_expr_context) <dwarf_call>: New. (struct dwarf_expr_context) <get_subr>: Remove the #if0-ed field. * dwarf2loc.c (per_cu_dwarf_call, dwarf_expr_dwarf_call): New functions. (dwarf2_evaluate_loc_desc): Initialize CTX->DWARF_CALL. (needs_frame_dwarf_call): New function. (dwarf2_loc_desc_needs_frame): Initialize CTX->DWARF_CALL. * dwarf2read.c (follow_die_offset): Based on former follow_die_ref. Update the comment. Move variables die, offset and error call to ... (follow_die_ref): ... a new function. (dwarf2_fetch_die_location_block): New function. * dwarf2loc.h (dwarf2_fetch_die_location_block): New prototype. gdb/testsuite/ Test PR 10640. * gdb.dwarf2/dw2-op-call.exp, gdb.dwarf2/dw2-op-call.S: New.
2010-06-07Test and support all cpp operator types.Sami Wagiaalla5-15/+335
2010-06-07 Sami Wagiaalla <swagiaal@redhat.com> * value.h: Created oload_search_type enum. (find_overload_match): Use oload_search_type enum. * valops.c (find_overload_match): Support combined member and non-member search. * eval.c (evaluate_subexp_standard): Calls to find_overload_match now use oload_search_type enum. (oload_method_static): Verify index is a proper value. * valarith.c (value_user_defined_cpp_op): Search for and handle both member and non-member operators. (value_user_defined_cpp_op): New function. (value_user_defined_op): New function. (value_x_unop): Use value_user_defined_op. (value_x_binop): Ditto. * cp-support.c (make_symbol_overload_list_using): Added block iteration. Add check for namespace aliases and imported declarations. 2010-06-07 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/koenig.exp: Test for ADL operators. * gdb.cp/koenig.cc: Added ADL operators. * gdb.cp/operator.exp: New test. * gdb.cp/operator.cc: New test.
2010-06-042010-06-04 Michael Snyder <msnyder@vmware.com>Michael Snyder2-6/+7
* gdb.base/attach.exp: Replace gdb_test_multiple with gdb_test.
2010-06-042010-06-04 Michael Snyder <msnyder@vmware.com>Michael Snyder2-5/+7
* gdb.base/pending.exp: Replace gdb_test_multiple with gdb_test.
2010-06-042010-06-04 Michael Snyder <msnyder@vmware.com>Michael Snyder2-2/+6
* gdb.cp/pr-1210.exp: Add message string to gdb_test_multiple.
2010-06-04 Add support for enabling/disabling individual pretty-printers.Doug Evans3-1/+53
* python/py-prettyprint.c (search_pp_list): Skip disabled printers. * python/python-internal.h (gdbpy_enabled_cst): Declare. * python/python.c (gdbpy_enabled_cst): Define. (_initialize_python): Initialize gdbpy_enabled_cst. * NEWS: Add entry. doc/ * gdb.texinfo (Python API): New node `Disabling Pretty-Printers'. testsuite/ * gdb.python/py-prettyprint.exp: Add new test for enabled and disabled printers. * gdb.python/py-prettyprint.py (disable_lookup_function): New function. (enable_lookup_function): New function.
2010-06-04 * gdb.python/py-value.exp (test_value_hash): Don't test equalityTom Tromey2-1/+5
of hash and id.
2010-06-04gdb/testsuite/Jan Kratochvil3-5/+13
* gdb.base/commands.exp (add printf tbreak command): Remove trailing newline. * gdb.gdb/complaints.exp (empty non-verbose non-noisy clear) (empty verbose non-noisy clear, empty verbose noisy clear) (empty non-verbose noisy clear): Likewise.
2010-06-032010-06-03 Michael Snyder <msnyder@vmware.com>Michael Snyder25-46/+80
* gdb.base/commands.exp: Replace gdb_test with gdb_test_no_output. * gdb.base/display.exp: Ditto. * gdb.base/find.exp: Ditto. * gdb.base/ifelse.exp: Ditto. * gdb.base/multi-forks.exp: Ditto. * gdb.base/recurse.exp: Ditto. * gdb.base/setshow.exp: Ditto. * gdb.base/value-double-free.exp: Ditto. * gdb.base/watch-vfork.exp: Ditto. * gdb.base/watch_thread_num.exp: Ditto. * gdb.base/watchpoint-solib.exp: Ditto. * gdb.base/watchpoint.exp: Ditto. * gdb.base/watchpoints.exp: Ditto. * gdb.cp/classes.exp: Replace gdb_test with gdb_test_no_output. * gdb.cp/overload.exp: Ditto. * gdb.cp/virtfunc.exp: Ditto. * gdb.python/py-value.exp: Replace gdb_test with gdb_test_no_output. * gdb.reverse/watch-precsave.exp: Replace gdb_test with gdb_test_no_output. * gdb.threads/attach-into-signal.exp: Replace gdb_test with gdb_test_no_output. * gdb.threads/local-watch-wrong-thread.exp: Ditto. * gdb.threads/watchthreads.exp: Ditto. * gdb.threads/watchthreads2.exp: Ditto. * gdb.trace/deltrace.exp: Replace gdb_test with gdb_test_no_output. * gdb.trace/tfind.exp: Ditto.
2010-06-03do not emit PASS for gdb_test_no_output test if message is empty string.Joel Brobecker2-2/+10
This patch makes gdb_test_no_output not emit a PASS for a sucessful test when the message is the empty string. As requested, this makes it consistent with what gdb_test does. 2010-06-03 Joel Brobecker <brobecker@adacore.com> * lib/gdb.exp (gdb_test_no_output): Do not emit pass for successful test if message is the empty string.
2010-06-02gdb/Jan Kratochvil2-0/+10
* symfile.c (init_filename_language_table): New extensions .for, .FOR, .ftn, .FTN, .fpp, .FPP, .f90, .F90, .f95, .F95, .f03, .F03, .f08 and .F08. gdb/testsuite/ * gdb.fortran/module.exp (stopped language detection): New test.
2010-06-02gdb/Jan Kratochvil6-14/+203
Support DW_TAG_module as separate namespaces. * dwarf2read.c (typename_concat): New parameter physname. (read_module_type): New function and declaration. (scan_partial_symbols): Scan also DW_TAG_module children. (partial_die_parent_scope): Accept scope even from DW_TAG_module. Pass to typename_concat backward compatible physname value 0. (partial_die_full_name, read_namespace_type): Pass to typename_concat backward compatible physname value 0. (add_partial_module, read_module): Remove FIXME comment. (process_die) <DW_TAG_module>: Set PROCESSING_HAS_NAMESPACE_INFO. (die_needs_namespace) <DW_TAG_variable>: Allow returning true even for DIEs under DW_TAG_module. (dwarf2_compute_name): Move the ada block for DW_AT_linkage_name and DW_AT_MIPS_linkage_name first, extend it for language_fortran && physname and return there instead of just setting NAME. Extend the main block for language_fortran. Pass physname parameter to the typename_concat call. (read_import_statement, read_func_scope, get_scope_pc_bounds) (load_partial_dies, determine_prefix): Support also DW_TAG_module. (new_symbol): Fill in cplus_specific.demangled_name if it is still missing from SYMBOL_SET_NAMES in the language_fortran case. (new_symbol) <DW_TAG_variable>: Force LOC_UNRESOLVED for gfortran module variables. (read_type_die) <DW_TAG_module>: New. (MAX_SEP_LEN): Increase to 7. (typename_concat): New parameter physname. New variable lead. Support also language_fortran. * f-exp.y (yylex): Consider : also as a symbol name character class. * f-lang.c: Include cp-support.h. (f_word_break_characters, f_make_symbol_completion_list): New functions. (f_language_defn): Use cp_lookup_symbol_nonlocal, f_word_break_characters and f_make_symbol_completion_list. * f-typeprint.c (f_type_print_base) <TYPE_CODE_MODULE>: New. * gdbtypes.h (enum type_code) <TYPE_CODE_MODULE>: New. * symtab.c (symbol_init_language_specific): Support language_fortran. (symbol_find_demangled_name): New comment on language_fortran. (symbol_natural_name, symbol_demangled_name): Use demangled_name even for language_fortran. (lookup_symbol_aux_local): Check imports also for language_fortran. (default_make_symbol_completion_list): Rename to ... (default_make_symbol_completion_list_break_on): ... this name. New parameter break_on, use it. (default_make_symbol_completion_list): New stub. * symtab.h (default_make_symbol_completion_list_break_on): New prototype. gdb/testsuite/ Support DW_TAG_module as separate namespaces. * gdb.fortran/library-module.exp, gdb.fortran/library-module-main.f90, gdb.fortran/library-module-lib.f90: New. * gdb.fortran/module.exp: Replace startup by a prepare_for_testing call. (print i): Remove. (continue to breakpoint: i-is-1, print var_i value 1) (continue to breakpoint: i-is-2, print var_i value 2) (continue to breakpoint: a-b-c-d, print var_a, print var_b, print var_c) (print var_d, print var_i value 14, ptype modmany, complete `modm) (complete `modmany, complete `modmany`, complete `modmany`var) (show language, setting breakpoint at module): New tests. * gdb.fortran/module.f90 (module mod): Remove. (module mod1, module mod2, module modmany, subroutine sub1) (subroutine sub2, program module): New.
2010-06-02gdb/testsuite/Jan Kratochvil2-1/+3
* gdb.cp/anon-union.exp (pass): Rename to ... (print z 2): ... here.
2010-06-02gdb/testsuite/Jan Kratochvil2-3/+8
* gdb.cp/ref-types.exp (pass, pass, pass): Rename to ... (print value of rUC, print value of rI, print value of UI): ... here.
2010-06-022010-06-02 Michael Snyder <msnyder@vmware.com>Michael Snyder7-17/+21
* gdb.trace/actions.exp: Use gdb_test_no_output. * gdb.trace/circ.exp: Ditto. * gdb.trace/packetlen.exp: Ditto. * gdb.trace/save-trace.exp: Ditto. * gdb.trace/tracecmd.exp: Ditto. * gdb.trace/tsv.exp: Ditto.
2010-06-022010-06-02 Michael Snyder <msnyder@vmware.com>Michael Snyder14-39/+52
* gdb.threads/fork-thread-pending.exp: Use gdb_test_no_output. * gdb.threads/hand-call-in-thraeds.exp: Ditto. * gdb.threads/local-watch-wrong-thread.exp: Ditto. * gdb.threads/manythreads.exp: Ditto. * gdb.threads/print-threads.exp: Ditto. * gdb.threads/pthreads.exp: Ditto. * gdb.threads/schedlock.exp: Ditto. * gdb.threads/staticthreads.exp: Ditto. * gdb.threads/thread-specific.exp: Ditto. * gdb.threads/thread-unwindonsignal.exp: Ditto. * gdb.threads/threadapply.exp: Ditto. * gdb.threads/watchthreads.exp: Ditto. * gdb.threads/watchthreads2.exp: Ditto.
2010-06-022010-06-02 Michael Snyder <msnyder@vmware.com>Michael Snyder9-11/+22
* gdb.python/py-block.exp: Use gdb_test_no_output. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-template.exp: Ditto. * gdb.python/py-value.exp: Ditto. * gdb.reverse/watch-precsave.exp: Use gdb_test_no_output. * gdb.reverse/watch-reverse.exp: Ditto. * gdb.server/ext-attach.exp: Use gdb_test_no_output. * gdb.server/ext-run.exp: Ditto.