aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2009-09-212009-09-21 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon3-0/+96
* python/py-value.c (valpy_getitem): Test value before allowing subscript operation. 2009-09-21 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-value.exp (test_subscript_regression): New function. Test for invalid subscripts. * gdb.python/py-value.c (main): Add test array, and pointer to it. (ptr_ref): New function.
2009-09-17testsuite/ChangeLogPaul Pluzhnikov2-1/+5
2009-09-17 Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.base/default.exp: Fix "show convenience". doc/ChangeLog 2009-09-17 Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.texinfo (convenince variables): Mention $_siginfo could be empty.
2009-09-15gdbTom Tromey16-112/+412
* varobj.h (varobj_update_result_t) <new>: New field. (varobj_get_child_range, varobj_set_child_range): Declare. (varobj_list_children): Update. (varobj_enable_pretty_printing, varobj_has_more) (varobj_pretty_printed_p): Declare. * varobj.c (pretty_printing): New global. (varobj_enable_pretty_printing): New function. (struct varobj_root) <from, to, constructor, child_iter, saved_item>: New fields. (varobj_create): Don't call install_default_visualizer. (instantiate_pretty_printer): Don't use value_copy. (varobj_has_more): New function. (restrict_range): New function. (install_dynamic_child): Likewise. (dynamic_varobj_has_child_method): Likewise. (update_dynamic_varobj_children): Remove 'new_and_unchanged' argument; add 'new', 'unchanged', 'from', and 'to' arguments. Rewrite. (varobj_get_num_children): Call update_dynamic_varobj_children. (varobj_list_children): Add 'from' and 'to' arguments. Ignore result of update_dynamic_varobj_children. Don't call install_default_visualizer. Restrict result range. (varobj_add_child): Don't call install_default_visualizer. (varobj_pretty_printed_p): New function. (install_visualizer): Rewrite. Move earlier in file. (install_default_visualizer): Likewise. (construct_visualizer): New function. (install_new_value_visualizer): Likewise. (install_new_value): Don't call release_value. Special case pretty-printed objects. Use value_incref. Rearrange "changed" logic. (varobj_get_child_range): New function. (varobj_set_child_range): Likewise. (varobj_set_visualizer): Rewrite. (varobj_update): Rewrite pretty-printing logic. (new_variable): Initialize new fields. (free_variable): Destroy new fields. (value_of_root): Copy 'from' and 'to'. (my_value_of_variable): Handle pretty-printers. (value_get_print_value): Rework pretty-printing logic. (cplus_describe_child): Don't use release_value. * mi/mi-cmds.h (mi_cmd_enable_pretty_printing) (mi_cmd_var_set_update_range): Declare. * mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and var-set-update-range. * mi/mi-cmd-var.c (print_varobj): Update. Emit "dynamic" attribute. (mi_cmd_var_create): Emit "has_more" attribute. (mi_cmd_var_set_format): Plug memory leak. (mi_print_value_p): Replace 'type' argument with 'var'. Handle pretty-printed varobjs. (mi_cmd_var_list_children): Accept 'from' and 'to' arguments. Emit "has_more" attribute. (mi_cmd_var_evaluate_expression): Plug memory leak. (mi_cmd_var_assign): Likewise. (varobj_update_one): Likewise. Emit "dynamic", "has_more", and "new_children" attributes. (mi_cmd_enable_pretty_printing): New function. (mi_cmd_var_set_update_range): Likewise. gdb/doc * gdb.texinfo (GDB/MI Variable Objects): Document -enable-pretty-printing, -var-set-update-range, dynamic varobjs. Expand -var-update documentation. gdb/testsuite * lib/mi-support.exp (mi_create_varobj): Update. (mi_create_floating_varobj): Likewise. (mi_create_dynamic_varobj): New proc. (mi_varobj_update): Update. (mi_varobj_update_with_type_change): Likewise. (mi_varobj_update_kv_helper): New proc. (mi_varobj_update_dynamic_helper): Rewrite. (mi_varobj_update_dynamic): New proc. (mi_list_varobj_children): Update. (mi_list_varobj_children_range): Add 'from' and 'to' arguments. * gdb.python/python-prettyprint.py (pp_outer): New class. (pp_nullstr): Likewise. (lookup_function): Register new printers. * gdb.python/python-prettyprint.c (struct substruct): New type. (struct outerstruct): Likewise. (substruct_test): New function. (struct nullstr): New type. (string_1, string_2): New globals. (main): Add new tests. * gdb.python/python-mi.exp: Added regression tests. * gdb.mi/mi2-var-display.exp: Update. * gdb.mi/mi2-var-cmd.exp: Update. * gdb.mi/mi2-var-child.exp: Update. * gdb.mi/mi2-var-block.exp: Update. * gdb.mi/mi-var-invalidate.exp: Update. * gdb.mi/mi-var-display.exp: Update. * gdb.mi/mi-var-cmd.exp: Update. * gdb.mi/mi-var-child.exp: Update. * gdb.mi/mi-var-block.exp: Update. * gdb.mi/mi-break.exp: Update. * gdb.mi/gdb701.exp: Update.
2009-09-15Forgot to add these files. They are referent to the last commit,Sergio Durigan Junior2-0/+470
"Implementing the catch syscall feature".
2009-09-15Implementing catch syscall.Sergio Durigan Junior2-1/+7
* amd64-linux-tdep.c: Include xml-syscall.h header, define the XML syscall name for the architecture. (amd64_linux_get_syscall_number): New function. (amd64_linux_init_abi): Register the correct functions for syscall catchpoint; set the correct syscall file name. * breakpoint.c: New include: xml-syscall.h. (set_raw_breakpoint_without_location): Setting the parameters for the catch syscall feature. (insert_catch_syscall): New. (remove_catch_syscall): New. (breakpoint_hit_catch_syscall): New. (print_it_catch_syscall): New. (print_one_catch_syscall): New. (print_mention_catch_syscall): New. (catch_syscall_breakpoint_ops): New. (syscall_catchpoint_p): New. (create_catchpoint_without_mention): New. (create_catchpoint): Modified in order to use create_catchpoint_without_mention. (create_syscall_event_catchpoint): New. (clean_up_filters): New. (catch_syscall_split_args): New. (catch_syscall_command_1): New. (delete_breakpoint): Add cleanup for catch syscall. (is_syscall_catchpoint_enabled): New. (catch_syscall_enabled): New. (catching_syscall_number): New. (catch_syscall_completer): New completer function. (add_catch_command): Add the completer function for catchpoints. * breakpoint.h (syscalls_to_be_caught): New vector. (catch_syscall_enabled): New. (catching_syscall_number): New. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * gdbarch.sh: Add syscall catchpoint functions and structures. (get_syscall_number): New. (UNKNOWN_SYSCALL): New definition. * i386-linux-nat.c (i386_linux_resume): Select the proper request to be made for ptrace() considering if we are catching syscalls or not. * i386-linux-tdep.c: Include xml-syscall.h header, define the XML syscall name for the architecture. (i386_linux_get_syscall_number): New. (i386_linux_init_abi): Register the correct functions for syscall catchpoint; set the correct syscall file name. * inf-child.c (inf_child_set_syscall_catchpoint): New. (inf_child_target): Assign default values to target_ops. * inf-ptrace.c (inf_ptrace_resume): Select the proper request to be made for ptrace() considering if we are catching syscalls or not. * inferior.h (struct inferior): Included new variables any_syscall_count, syscalls_counts and total_syscalls_count, used to keep track of requested syscall catchpoints. * infrun.c (resume): Add syscall catchpoint. (deal_with_syscall_event): New. (handle_inferior_event): Add syscall entry/return events. (inferior_has_called_syscall): New. * linux-nat.c: Define some helpful variables to track wether we have support for the needed ptrace option. (linux_test_for_tracesysgood): New. (linux_supports_tracesysgood): New. (linux_enable_tracesysgood): New. (linux_enable_event_reporting): Save the current used ptrace options. (linux_child_post_attach): Calling linux_enable_tracesysgood. (linux_child_post_startup_inferior): Likewise. (linux_child_set_syscall_catchpoint): New function. (linux_handle_extended_wait): Handle the case which the inferior stops because it has called or returned from a syscall. (linux_target_install_ops): Install the necessary functions to handle syscall catchpoints. * linux-nat.h (struct lwp_info): Include syscall_state into the structure, which indicates if we are in a syscall entry or return. * ppc-linux-tdep.c: Include xml-syscall.h header, define the XML syscall filename for the arch. (ppc_linux_get_syscall_number): New. (ppc_linux_init_abi): Register the correct functions for syscall catchpoint; setting the correct name for the XML syscall file. * target.c (update_current_target): Update/copy functions related to syscall catchpoint. (target_waitstatus_to_string): Add syscall catchpoint entry/return events. * target.h (struct target_waitstatus): Add syscall number. (struct syscall): New struct to hold information about syscalls in the system. (struct target_ops): Add ops for syscall catchpoint. (inferior_has_called_syscall): New. (target_set_syscall_catchpoint): New. * xml-support.c (xml_fetch_content_from_file): New function, transferred from xml-tdesc.c. * xml-support.h (xml_fetch_content_from_file): New. * xml-tdesc.c (fetch_xml_from_file): Function removed; transferred to xml-support.c. (file_read_description_xml): Updated to use the new xml_fetch_content_from_file function. * syscalls/gdb-syscalls.dtd: New definition file for syscall's XML support. * syscalls/amd64-linux.xml: New file containing information about syscalls for GNU/Linux systems that use amd64 architecture. * syscalls/i386-linux.xml: New file containing information about syscalls for GNU/Linux systems that use i386 architecture. * syscalls/ppc-linux.xml: New file containing information about syscalls for GNU/Linux systems that use PPC architecture. * syscalls/ppc64-linux.xml: New file containing information about syscalls for GNU/Linux systems that use PPC64 architecture. * xml-syscall.c: New file containing functions for manipulating syscall's XML files. * xml-syscall.h: New file, exporting the functions above mentioned. * Makefile.in: Support for relocatable GDB datadir and XML syscall. * NEWS: Added information about the catch syscall feature. * doc/gdb.texinfo (Set Catchpoints): Documentation about the new feature. * testsuite/Makefile.in: Inclusion of catch-syscall object. * testsuite/gdb.base/catch-syscall.c: New file. * testsuite/gdb.base/catch-syscall.exp: New file.
2009-09-132009-09-12 Michael Snyder <msnyder@vmware.com>Michael Snyder3-0/+1839
* gdb.reverse/step-reverse.exp: Explicitly check for targets that can support reverse debuggnig.
2009-09-11gdbTom Tromey3-0/+565
* dwarf2loc.c (struct piece_closure) <arch>: New field. (dwarf2_evaluate_loc_desc): Update. (dwarf2_loc_desc_needs_frame): Likewise. (allocate_piece_closure): Initialize new field. (read_pieced_value): Update. (write_pieced_value): Update. (copy_pieced_value_closure): Update. * dwarf2expr.h (enum dwarf_value_location): New. (struct dwarf_expr_context) <in_reg>: Remove. <location, len, data>: New fields. (struct dwarf_expr_piece) <in_reg, value>: Remove. <location, v>: New fields. * dwarf2expr.c (add_piece): Remove in_reg, value arguments. Update. (require_composition): New function. (execute_stack_op): Update. <DW_OP_implicit_value, DW_OP_stack_value>: New cases. <DW_OP_reg0>: Set location, not in_reg. <DW_OP_regx>: Likewise. Use require_composition. <DW_OP_fbreg>: Update. <DW_OP_piece>: Likewise. * dwarf2-frame.c (execute_stack_op): Update. gdb/testsuite * gdb.dwarf2/valop.S: New file. * gdb.dwarf2/valop.exp: New file.
2009-09-11* gdb.threads/current-lwp-dead.exp: Only run this on Linux.Mark Kettenis2-0/+9
2009-09-10 * gdb.base/breakpoint-shadow.exp: Fix intermittent failures.Doug Evans2-1/+6
Add $gdb_prompt to second breakpoint regexp.
2009-09-09Checking in this patch for Thiago: Rename python-* files into py-*,Joel Brobecker14-7/+29
more 8+3 friendly. gdb/ * Makefile.in (py-cmd.o): Renamed from python-cmd.o. Updated references. (py-frame.o): Renamed from python-frame.o. Updated references. (py-function.o): Renamed from python-function.o. Updated references. (py-objfile.o): Renamed from python-objfile.o. Updated references. (py-prettyprint.o): Renamed from python-prettyprint.o. Updated +references. (py-type.o): Renamed from python-type.o. Updated references. (py-utils.o): Renamed from python-utils.o. Updated references. (py-value.o): Renamed from python-value.o. Updated references. * py-cmd.o: Renamed from python-cmd.o. * py-frame.o: Renamed from python-frame.o. * py-function.o: Renamed from python-function.o. * py-objfile.o: Renamed from python-objfile.o. * py-prettyprint.o: Renamed from python-prettyprint.o. * py-type.o: Renamed from python-type.o. * py-utils.o: Renamed from python-utils.o. * py-value.o: Renamed from python-value.o. gdb/testsuite/ * gdb.python/Makefile.in (EXECUTABLES): Adjust to new executable names, add missing ones. * gdb.python/py-cmd.exp: Rename from python-cmd.exp. * gdb.python/py-frame.c: Rename from python-frame.c. * gdb.python/py-frame.exp: Rename from python-frame.exp. Adjust testfile name. * gdb.python/py-function.exp: Rename from python-function.exp. * gdb.python/py-mi.exp: Rename from python-mi.exp. Adjust testfile name. * gdb.python/py-prettyprint.c: Rename from python-prettyprint.c. * gdb.python/py-prettyprint.exp: Rename from python-prettyprint.exp. Adjust testfile name. * gdb.python/py-prettyprint.py: Rename from python-prettyprint.py. * gdb.python/py-template.cc: Rename from python-template.cc. * gdb.python/py-template.exp: Rename from python-template.exp. Adjust testfile name. * gdb.python/py-value.c: Rename from python-value.c. * gdb.python/py-value.exp: Rename from python-value.exp. Adjust testfile name.
2009-09-08gdb/Jan Kratochvil2-1/+30
Fix ia64 shadowing of breakpoints in multiple slots of a single bundle. * ia64-tdep.c (ia64_memory_insert_breakpoint): New call of make_show_memory_breakpoints_cleanup with parameter 0. Move the reading of SHADOW_CONTENTS to this memory state point of code. Update comment for the memory re-read. gdb/testsuite/ * gdb.base/breakpoint-shadow.exp (Second breakpoint placed): Initialize $bpt2address. (Second breakpoint address is valid on ia64) (Third breakpoint on ia64 in the Second breakpoint's bundle): New.
2009-09-03 * gdb.base/ending-run.exp: Restrict regular expression matchingJoseph Myers2-1/+6
line number to require closing brace following.
2009-09-03 * gdb.base/store.exp (check_set): Fix typo in expected value message.Doug Evans2-1/+5
2009-09-02 * gdb.dwarf2/callframecfa.exp: Use gdb_continue_to_breakpoint.Tom Tromey2-2/+10
2009-09-02gdbTom Tromey3-0/+369
* frame.h (frame_unwinder_is): Declare. * frame.c (frame_unwinder_is): New function. * dwarf2loc.c: Include dwarf2-frame.h. (dwarf_expr_frame_cfa): New function. (dwarf2_evaluate_loc_desc): Use it. (needs_frame_frame_cfa): New function. (dwarf2_loc_desc_needs_frame): Use it. * dwarf2expr.h (struct dwarf_expr_context) <get_frame_cfa>: New field. * dwarf2expr.c (execute_stack_op) <DW_OP_call_frame_cfa>: New case. * dwarf2-frame.h (dwarf2_frame_cfa): Declare. * dwarf2-frame.c (no_get_frame_cfa): New function. (execute_stack_op): Use it. (dwarf2_frame_cfa): New function. gdb/testsuite * gdb.dwarf2/callframecfa.exp: New file. * gdb.dwarf2/callframecfa.S: New file.
2009-09-01gdb/testsuite/Jan Kratochvil4-0/+196
* gdb.base/solib-overlap.exp, gdb.base/solib-overlap-lib.c, gdb.base/solib-overlap-main.c: New.
2009-08-28 PR gdb/10565Daniel Jacobowitz3-0/+41
* value.c (value_primitive_field): Do not save value_offset for bitfields. (unpack_bits_as_long): Do not read an entire ULONGEST. testsuite/ PR gdb/10565 * gdb.base/bitfields.c (struct container, container): New. (main): Initialize it and call break5. * gdb.base/bitfields.exp (bitfield_at_offset): New test.
2009-08-28gdb/Jan Kratochvil3-0/+143
Support constant DW_AT_data_member_location by GCC PR debug/40659. * dwarf2read.c (dwarf2_add_field <DW_TAG_member> <DW_AT_data_member_location>): Initialize BYTE_OFFSET to 0 by default. Explicitly check if attr_form_is_block. (dwarf2_add_field <DW_TAG_inheritance> <DW_AT_data_member_location>) (read_common_block <DW_AT_data_member_location>): New variable byte_offset. Fix crash on non-DW_BLOCK ATTR values. gdb/testsuite/ Support constant DW_AT_data_member_location by GCC PR debug/40659. * gdb.dwarf2/dw2-inheritance.exp, gdb.dwarf2/dw2-inheritance.S: New.
2009-08-27gdb/Jan Kratochvil2-0/+9
* varobj.c (varobj_create): Error if the specified frame was not found and it is needed. gdb/testsuite/ * gdb.mi/mi2-var-cmd.exp (create variable with invalid FRAME-ADDR): New.
2009-08-272009-08-26 Michael Snyder <msnyder@vmware.com>Michael Snyder4-1/+341
* gdb.base/i386-reverse.c: New file. * gdb.base/i386-reverse.exp: New file. * gdb.base/Makefile.in: Add new files to be removed.
2009-08-26 * gdb.mi/mi-basics.exp (test_cwd_specification): Do not testJoseph Myers3-2/+16
environment-pwd for remote host. * gdb.mi/mi2-basics.exp (test_cwd_specification): Likewise.
2009-08-24 * gdb.cp/cpcompletion.exp (test_class_complete): New procedure.Keith Seitz2-0/+48
Add two new C++ completer tests which limit the output to a given class.
2009-08-242009-08-24 Michael Snyder <msnyder@vmware.com>Michael Snyder3-3/+8
* gdb.base/del.exp: Fix typo in comment. * gdb.base/step-bt.exp: Fix cut and paste error in comment.
2009-08-22Regenerate tree using Autoconf 2.64 and Automake 1.11.Ralf Wildenhues9-10783/+15898
config/: * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. /: * configure: Regenerate. etc/: * configure: Regenerate. sim/common/: * config.in: Regenerate. * configure: Likewise. sim/iq2000/: * config.in: Regenerate. * configure: Likewise. sim/d10v/: * config.in: Regenerate. * configure: Likewise. sim/igen/: * config.in: Regenerate. * configure: Likewise. sim/m32r/: * config.in: Regenerate. * configure: Likewise. sim/frv/: * config.in: Regenerate. * configure: Likewise. sim/: * avr/config.in: Regenerate. * avr/configure: Likewise. * configure: Likewise. * cris/config.in: Likewise. * cris/configure: Likewise. sim/h8300/: * config.in: Regenerate. * configure: Likewise. sim/mn10300/: * config.in: Regenerate. * configure: Likewise. sim/ppc/: * config.in: Regenerate. * configure: Likewise. sim/erc32/: * config.in: Regenerate. * configure: Likewise. sim/arm/: * config.in: Regenerate. * configure: Likewise. sim/m68hc11/: * config.in: Regenerate. * configure: Likewise. sim/lm32/: * config.in: Regenerate. * configure: Likewise. sim/sh64/: * config.in: Regenerate. * configure: Likewise. sim/v850/: * config.in: Regenerate. * configure: Likewise. sim/cr16/: * config.in: Regenerate. * configure: Likewise. sim/moxie/: * config.in: Regenerate. * configure: Likewise. sim/m32c/: * config.in: Regenerate. * configure: Likewise. sim/mips/: * config.in: Regenerate. * configure: Likewise. sim/mcore/: * config.in: Regenerate. * configure: Likewise. sim/testsuite/d10v-elf/: * configure: Regenerate. sim/testsuite/: * configure: Regenerate. sim/testsuite/frv-elf/: * configure: Regenerate. sim/testsuite/m32r-elf/: * configure: Regenerate. sim/testsuite/mips64el-elf/: * configure: Regenerate. sim/sh/: * config.in: Regenerate. * configure: Likewise. gold/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. gprof/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. * gconfig.in: Likewise. opcodes/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. gas/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. ld/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. gdb/: * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. * gnulib/Makefile.in: Likewise. gdb/doc/: * configure: Regenerate. gdb/gdbserver/: * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. gdb/testsuite/: * configure: Regenerate. * gdb.hp/configure: Likewise. * gdb.hp/gdb.aCC/configure: Likewise. * gdb.hp/gdb.base-hp/configure: Likewise. * gdb.hp/gdb.compat/configure: Likewise. * gdb.hp/gdb.defects/configure: Likewise. * gdb.hp/gdb.objdbg/configure: Likewise. * gdb.stabs/configure: Likewise. binutils/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. bfd/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. bfd/doc/: * Makefile.in: Regenerate. readline/: * configure: Regenerate. readline/examples/rlfe/: * configure: Regenerate.
2009-08-19ChangeLog:Ulrich Weigand3-0/+40
* value.c (enum internalvar_kind): Replace INTERNALVAR_SCALAR by INTERNALVAR_INTEGER and INTERNALVAR_POINTER. (union internalvar_data): Replace "scalar" member by "integer" and "pointer". (value_of_internalvar): Handle INTERNALVAR_INTEGER and INTERNALVAR_POINTER instead of INTERNALVAR_SCALAR. (get_internalvar_integer): Likewise. (set_internalvar): Likewise. (set_internalvar_integer): Likewise. (preserve_one_internalvar): Likewise. (value_from_pointer): Handle typedef'd pointer types. testsuite/ChangeLog: 2009-08-19 Doug Evans <dje@google.com> * gdb.base/gdbvars.c: New file. * gdb.base/gdbvars.exp: Test convenience vars with program variables.
2009-08-142009-08-14 Pedro Alves <pedro@codesourcery.com>Pedro Alves4-3/+8
gdb/ * top.c (any_thread_of): Delete. (kill_or_detach): Use any_thread_of_process. * top.c (print_inferior_quit_action): New. (quit_confirm): Rewrite to print info about all inferiors. * target.c (dispose_inferior): New. (target_preopen): Use it. 2009-08-14 Pedro Alves <pedro@codesourcery.com> gdb/testsuite/ * gdb.threads/killed.exp, gdb.threads/manythreads.exp, gdb.threads/staticthreads.exp: Adjust to "quit" output changes.
2009-08-132009-08-13 Pedro Alves <pedro@codesourcery.com>Pedro Alves3-2/+10
PR gdb/8869: * language.c (language, type, range, case_sensitive): Make const. (show_language_command): Don't call deprecated_show_value_hack. Special case "auto". (set_language_command): An unrecognized language is now an internal error instead of a user error. Don't call set_lang_str. (show_type_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_type_command): An unrecognized type is now an internal error instead of a user error. Output type check mismatch with language here. Don't call set_type_str. (show_range_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_range_command): An unrecognized range check is now an internal error instead of a warning. Output range check mismatch with language here. Don't call set_range_str. (show_case_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_case_command): Don't call set_case_str. An unrecognized case check is now an internal error instead of a warning. Output range check mismatch with language here. Don't call set_case_str. (set_type_range_case): Don't call set_type_str, set_range_str or set_case_str here. (set_lang_str, set_type_str, set_range_str, set_case_str): Delete. (add_language): Install or reinstall the "set language" command here, and make it an enum command. Build the enumeration and the help string from the current list of known languages. (_initialize_language): Don't install "set language" here. Make "set check type", "set check range" and "set case-sensitive" enum commands. Register the "auto" "local" and "unknown" languages in that order. 2009-08-13 Pedro Alves <pedro@codesourcery.com> * gdb.base/default.exp: Adjust "set language test": it's now an enum command. Larger help string moved to "help set language". * gdb.base/help.exp: Adjust "help set language" expected output, now lists all known languages.
2009-08-11 * gdb.arch/altivec-abi.exp (altivec_abi_tests): Turn on printing ofNathan Froyd3-0/+9
all frame arguments. * gdb.arch/altivec-regs.exp: Likewise.
2009-08-07gdbTom Tromey2-0/+20
* language.c (set_language_command): Strip whitespace. (set_type_command): Likewise. (set_range_command): Likewise. gdb/testsuite * gdb.base/setshow.exp: Add tests for changes to set language, set check range, and set check type.
2009-08-042009-08-04 Thiago Jung Bauermann <thiago.bauermann@gmail.com>Thiago Jung Bauermann2-0/+92
gdb/ * linux-tdep.c (check_is_pie_binary, _initialize_linux_tdep): New functions. gdb/testsuite/ * gdb.base/pie-support.exp: New file. * gdb.base/pie-support.c: New file.
2009-08-03 Implement -break-commandsVladimir Prus3-6/+39
* breakpoint.c (get_breakpoint, breakpoint_set_commands): New. (commands_command): Use breakpoint_set_commands. * breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare. * mi/mi-cmds.h (mi_cmd_break_commands): New. * mi/mi-cmds.c: Register -break-commands. * mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line) (mi_command_line_array, mi_command_line_array_cnt) (mi_command_line_array_ptr): New.
2009-08-03 Refactor reading of commandsVladimir Prus1-0/+3
* defs.h (read_command_lines_1): Declare. * cli/cli-script.c (read_next_line): Only return string, do not process. (process_next_line): New, extracted from read_next_line. (recurse_read_control_structure): Take a function pointer to the read function. (get_command_line) Pass the read_next_line as reader function into recurse_read_control_structure. (read_command_lines_1): New, extracted from... (read_command_lines): ...here.
2009-07-31Fix previous check-in.Ulrich Weigand1-0/+182
2009-07-31 * configure.ac: Run gdb.cell tests when appropriate.Ulrich Weigand39-0/+4999
* configure: Regenerate. * lib/cell.exp: New file. * gdb.cell: New directory. * gdb.cell/configure.ac: New file. * gdb.cell/configure: New file. * gdb.cell/Makefile.in: New file. * gdb.cell/arch.exp: New file. * gdb.cell/break.c: New file. * gdb.cell/break.exp: New file. * gdb.cell/break-spu.c: New file. * gdb.cell/bt.c: New file. * gdb.cell/bt2-spu.c: New file. * gdb.cell/bt-spu.c: New file. * gdb.cell/bt.exp: New file. * gdb.cell/coremaker.c: New file. * gdb.cell/coremaker-spu.c: New file. * gdb.cell/core.exp: New file. * gdb.cell/gcore.exp: New file. * gdb.cell/data.c: New file. * gdb.cell/data.exp: New file. * gdb.cell/data-spu.c: New file. * gdb.cell/ea-cache.exp: New file. * gdb.cell/ea-cache.c: New file. * gdb.cell/ea-cache-spu.c: New file. * gdb.cell/ea-standalone.c: New file. * gdb.cell/ea-standalone.exp: New file. * gdb.cell/ea-test.c: New file. * gdb.cell/ea-test.exp: New file. * gdb.cell/f-regs.exp: New file. * gdb.cell/mem-access.c: New file. * gdb.cell/mem-access.exp: New file. * gdb.cell/mem-access-spu.c: New file. * gdb.cell/ptype.exp: New file. * gdb.cell/registers.exp: New file. * gdb.cell/size.c: New file. * gdb.cell/sizeof.exp: New file. * gdb.cell/size-spu.c: New file. * gdb.cell/solib.exp: New file. * gdb.cell/solib-symbol.exp: New file.
2009-07-31ChangeLog:Ulrich Weigand2-0/+14
* target.h (enum strata): New value arch_stratum. * target.c (target_require_runnable): Skip arch_stratum targets. * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add solib-spu.o and spu-multiarch.o to gdb_target_obs. * Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o. (ALLDEPFILES): Add solib-spu.c and spu-multiarch.c. * solib-spu.c: New file. * solib-spu.h: New file. * spu-multiarch.c: New file. * spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros. * spu-tdep.c (struct gdbarch_tdep): New member id. (spu_gdbarch_id): New function. (spu_lslr): New function. (spu_address_to_pointer): New function. (spu_pointer_to_address): Support SPU ID address encoding. Use spu_gdbarch_id and spu_lslr. (spu_integer_to_address): Likewise. (spu_frame_unwind_cache): Update for encoded addresses. (spu_unwind_pc, spu_unwind_sp): Likewise. (spu_read_pc, spu_write_pc): Likewise. (spu_push_dummy_call): Likewise. (spu_software_single_step): Likewise. (spu_get_longjmp_target): Likewise. (spu_overlay_update_osect): Likewise. (spu_dis_asm_print_address): New function. (gdb_print_insn_spu): Likewise. (spu_gdbarch_init): Store SPU ID in tdep structure. Install spu_address_to_pointer and gdb_print_insn_spu. * ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h" and "solib-spu.h". (ppc_linux_entry_point_addr): New static variable. (ppc_linux_inferior_created): New function. (ppc_linux_displaced_step_location): Likewise. (ppc_linux_init_abi): Enable Cell/B.E. support if supported by the target. (_initialize_ppc_linux_tdep): Attach to inferior_created observer. * NEWS: Mention multi-architecture and Cell/B.E. debugging capabilities. testsuite/ChangeLog: * gdb.xml/tdesc-regs.exp: Skip for SPU targets.
2009-07-28 * NEWS: Mention ARM VFP support.Daniel Jacobowitz2-0/+9
* target-descriptions.c (tdesc_register_type): Make public. (tdesc_unnumbered_register): New function. (tdesc_register_reggroup_p): Allow missing pseudo_register_reggroup_p. * target-descriptions.h (tdesc_register_type): Declare. (tdesc_unnumbered_register): Declare. * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions. (arm_push_dummy_call): Use arm_neon_quad_write. (arm_neon_double_type, arm_neon_quad_type): New functions. (arm_register_type): Handle VFP and NEON registers. Override the types of double-precision registers for NEON. Disable FPA registers if they are not present. (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers. (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read. (arm_register_name): Handle VFP single and NEON quad registers. (arm_pseudo_read, arm_pseudo_write): New functions. (arm_gdbarch_init): Check for VFP and NEON in the target description. Assign numbers to double-precision registers. Register VFP and NEON pseudo registers. Remove a shadowed "i" variable. * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and ARM_D31_REGNUM. (struct gdbarch_tdep): Add have_neon_pseudos, have_neon, have_vfp_registers, have_vfp_pseudos, neon_double_type, and neon_quad_type. * features/Makefile: Make expedite settings only architecture specific. (WHICH): Add new ARM descriptions. * features/arm-with-neon.xml, features/arm-with-vfpv2.c, features/arm-with-vfpv3.c, features/arm-vfpv2.xml, features/arm-vfpv3.xml, features/arm-with-vfpv2.xml, features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files. * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat, regformats/arm-with-vfpv3.dat: Generate. doc/ * gdb.texinfo (ARM Features): Document org.gnu.gdb.arm.vfp and org.gnu.gdb.arm.neon. gdbserver/ * linux-low.c (linux_write_memory): Update debugging output. * Makefile.in (clean): Add new descriptions. (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o) (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules. * configure.srv: Add new files for arm*-*-linux*. * linux-arm-low.c: Add new declarations. (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined. (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3) (HWCAP_VFPv3D16): New. (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT instead of __IWMMXT__. (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap) (arm_arch_setup): New. (target_regsets): Remove #ifdef. Add VFP regset. (the_low_target): Use arm_arch_setup. testsuite/ * gdb.base/float.exp: Handle VFP registers.
2009-07-152009-07-14 Michael Snyder <msnyder@vmware.com>Michael Snyder2-34/+9
* gdb.reverse/finish-reverse.exp: Do not expect reverse-finish to bring gdb to the beginning of the calling line.
2009-07-152009-07-14 Michael Snyder <msnyder@vmware.com>Michael Snyder2-0/+10
* gdb.arch/i386-signal.c (sigframe): Add a nop to avoid confusing the i386 epilogue unwinder.
2009-07-14 gdb/Stan Shebs2-1/+10
Conditional tracepoints. * ax-gdb.h (gen_eval_for_expr): Declare. * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL and other comparisons. (gen_eval_for_expr): New function. (agent_eval_command): New maintenance command. (_initialize_ax_gdb): Define the command. * remote.c (struct remote_state): New field cond_tracepoints. (PACKET_ConditionalTracepoints): New packet config type. (remote_cond_tracepoint_feature): New function. (remote_protocol_features): Add ConditionalTracepoints. (remote_supports_cond_tracepoints): New function. (_initialize_remote): Add ConditionalTracepoints. * tracepoint.c (download_tracepoint): Add conditional. * NEWS: Mention conditional tracepoints. gdb/doc/ * gdb.texinfo (Tracepoint Conditions): New section. (General Query Packets): Describe ConditionalTracepoints. (Tracepoint Packets): Describe condition field. (Maintenance Commands): Describe maint agent-eval. * agentexpr.texi (Using Agent Expressions): Mention eval usage. gdb/testsuite/ * gdb.trace/tracecmd.exp: Add basic test of tracepoint conditions.
2009-07-142009-07-14 Michael Snyder <msnyder@vmware.com>Michael Snyder2-2/+12
* gdb.reverse/step-reverse.exp (stepi into function call): Call instruction may not be first instruction in the line. (reverse stepi from a function call): Used wrong line number.
2009-07-13gdb/Jan Kratochvil3-0/+71
Fix memory access from signed 32bit inferior registers on 64bit GDB. * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable addr_bit. Mask OFFSET by the ADDR_BIT width. gdb/testsuite/ * gdb.arch/amd64-i386-address.exp, gdb.arch/amd64-i386-address.S: New.
2009-07-13gdb/testsuite/Jan Kratochvil5-54/+22
Fix gdb.base/macscp.exp when using custom inputrc. * gdb.base/completion.exp: Remove env(INPUTRC) set and restore. * gdb.base/readline.exp: Remove env(INPUTRC) set and restore. Remove env(TERM) set. * gdb.cp/cpcompletion.exp: Remove env(INPUTRC) set. * lib/gdb.exp (default_gdb_start): Add env(INPUTRC) and env(TERM) set.
2009-07-13gdb/testsuite/Jan Kratochvil13-139/+51
Fix racy clashing of output files for gdb.base{1,2}/ parallel run. * gdb.base/annota1.exp (thread_test): Import global $testfile. Change the compilation target to match the testcase name. * gdb.base/sect-cmd.exp: Change the compilation target to match the testcase name. * a2-run.exp: Use for setup prepare_for_testing. Change the compilation target to match the testcase name. * gdb.base/commands.exp: Likewise. * gdb.base/finish.exp: Likewise. * gdb.base/float.exp: Likewise. * gdb.base/info-target.exp: Likewise. * gdb.base/relational.exp: Likewise. * gdb.base/term.exp: Likewise. * gdb.base/until.exp: Likewise. * gdb.base/volatile.exp: Likewise. * gdb.base/whatis-exp.exp: Likewise.
2009-07-112009-07-11 Hui Zhu <teawater@gmail.com>Hui Zhu2-1/+5
* gdb.base/help.exp (disassemble): Update expected help text.
2009-07-10gdb/docTom Tromey2-0/+51
* gdbint.texinfo (Testsuite): Document test transcripts. gdb/testsuite * lib/gdb.exp: Handle TRANSCRIPT. (remote_spawn, remote_close, send_gdb): New procs.
2009-07-102009-07-10 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon6-0/+57
* python/python-internal.h (apply_varobj_pretty_printer): Update definition. (python_string_to_target_python_string): Add definition. * python/python-utils.c (unicode_to_encoded_python_string) (unicode_to_target_python_string) (python_string_to_target_python_string): New Functions. * python/python-prettyprint.c (pretty_print_one_value): Likewise. (print_string_repr): Refactor to logic to account for PyObject returned strings. (apply_varobj_pretty_printer): Likewise. * python/python-value.c (valpy_string): Parse length keyword. Use length keyword in LA_GET_STRING. * varobj.c (value_get_print_value): Refactor logic to account for PyObject returned strings. * c-lang.c (c_get_string): If the length parameter is specified, use that. Return value in characters. Update comments. * language.h: Update c_get_string prototype comments. 2009-07-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Values From Inferior): Add length parameter description. 2009-07-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/python-prettyprint.c: Add counted null string structure. * gdb.python/python-prettyprint.exp: Print null string. Test for embedded nulls. * gdb.python/python-prettyprint.py (pp_ns): New Function. * gdb.python/python-value.exp (test_value_in_inferior): Add variable length string fetch tests. * gdb.python/python-value.c (main): Add strings for string fetch tests.
2009-07-09gdb/Jan Kratochvil2-0/+8
Report error on inaccessible memory. * cli/cli-dump.c: Include gdbcore.h. (dump_memory_to_file): Call read_memory instead of target_read_memory. gdb/testsuite/ * gdb.base/dump.exp (inaccessible memory is reported): New test.
2009-07-07gdbTom Tromey14-55/+76
* c-lang.c (convert_octal): Only allow 3 octal digits. (print_wchar): Prefer 3-digit octal form. Fall back to hex if needed. * c-exp.y (c_parse_escape): Only allow 3 octal digits. gdb/testsuite * gdb.base/call-rt-st.exp: Update for change to escape output. * gdb.base/callfuncs.exp: Likewise. * gdb.base/charset.exp: Likewise. * gdb.base/constvars.exp: Likewise. * gdb.base/long_long.exp: Likewise. * gdb.base/pointers.exp: Likewise. * gdb.base/printcmds.exp: Likewise. * gdb.base/setvar.exp: Likewise. * gdb.base/store.exp: Likewise. * gdb.cp/ref-types.exp: Likewise. * gdb.mi/mi-var-child.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.base/charset.exp: Test octal escape sequence length. Update for change to escape output.
2009-07-07gdb/testsuite/Jan Kratochvil2-0/+8
* gdb.mi/mi2-var-cmd.exp (floating varobj invalidation): New test.
2009-07-06 * lib/java.exp (java_init): Ignore $GCJ if it is empty.Daniel Jacobowitz2-1/+5