aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
AgeCommit message (Collapse)AuthorFilesLines
2010-01-01Update copyright year in most headers.Joel Brobecker97-99/+106
Automatic update by copyright.sh.
2009-12-28 * gdb.base/find.c (main): Reference search buffers.Daniel Jacobowitz6-7/+31
* gdb.base/included.c (main): Reference integer. * gdb.base/ptype.c (charfoo): Declare. (intfoo): Call charfoo. * gdb.base/scope0.c (useitp): New function. (usestatics): Use useitp. (useit): Add a type for val. * gdb.base/scope1.c (useit1): Take a pointer argument. (usestatics1): Update calls to useit1. * gdb.cp/call-c.cc: Declare foo. (main): Call foo. * gdb.cp/m-static.cc (main): Reference test4.elsewhere. * gdb.cp/namespace.cc (ensureOtherRefs): Declare. (main): Call C::ensureRefs and ensureOtherRefs. * gdb.cp/namespace1.cc (C::ensureOtherRefs): Also reference int variables. (ensureOtherRefs): New function. * gdb.cp/overload.cc (main): Call all overloadNamespace variants. * gdb.cp/templates.cc (main): Call t5i.value.
2009-12-24gdb/testsuite/Jan Kratochvil2-7/+1
Fix compatibility with G++-4.5. * gdb.cp/expand-sals.cc (main): Remove the "exit-line" comment. * gdb.cp/expand-sals.exp: Remove breakpoint on "exit-line". (uncaught return): Remove.
2009-12-10Fix for PR 9399 gdb can't call or print a const function that uses virtual ↵Chris Moller3-1/+100
inheritance
2009-11-25 * gdb.cp/extern-c.cc, gdb.cp/extern-c.exp: New test.Daniel Jacobowitz2-0/+85
2009-11-21 * gdb.cp/cplusfuncs.exp (info_func_regexp, print_addr): Don'tPedro Alves1-2/+2
assume new `regsub' syntax available.
2009-11-13 gdb/testsuite/Daniel Jacobowitz1-1/+4
* gdb.cp/virtfunc.exp (do_tests): If runto_main fails, give up.
2009-11-13 gdb/testsuite/Daniel Jacobowitz1-1/+6
* gdb.cp/formatted-ref.exp (test_p_x_ref_addr): Allow the reference to be in memory. * gdb.base/display.c (force_mem): New. (do_loops): Use it. Add breakpoint comments. (do_vars): Add a breakpoint comment. * gdb.base/display.exp: Use gdb_get_line_number. Remove hardcoded line numbers.
2009-11-12 testsuite/Daniel Jacobowitz3-38/+10
* lib/gdb.exp (gdb_test_multiple): Handle "y or [n]", "[y] or n", and the breakpoint menu. Do not call perror if a prompt is seen. Consume the following GDB prompt. * gdb.cp/method2.exp (test_break): Use gdb_test_multiple. * gdb.cp/namespace.exp: Use gdb_test. * gdb.cp/templates.exp: Use gdb_test. (test_template_breakpoints): Use gdb_test_multiple.
2009-11-12 * gdb.base/break.c (need_malloc): New.Daniel Jacobowitz5-3/+17
* gdb.base/constvars.c (main): Reference crass and crisp. * gdb.base/gdb1821.c (main): Reference bar. * gdb.cp/gdb1355.cc (main): Reference s1. * gdb.cp/hang1.cc (dummy2, dummy3): Declare. (main): Call them. * gdb.cp/hang2.cc (dummy2): Define. * gdb.cp/hang3.cc (dummy3): Define. * gdb.cp/m-data.cc (main): Reference shadow.
2009-11-11 * gdb.cp/classes.cc (ByAnyOtherName): Add typedef andKeith Seitz2-1/+5
use it instead of "Foo". * gdb.cp/classes.exp (do_tests): Add a test to access a method through a typedef'd class name.
2009-11-11 * gdb.base/long_long.exp: Permit leading zeros on floating-pointNathan Froyd1-2/+2
exponents. * gdb.base/pointers.exp: Likewise. * gdb.cp/ref-types.exp: Likewise.
2009-11-11 * gdb.cp/cplusfuncs.cc (class foo): Add operatorsKeith Seitz2-20/+33
new[] and delete[]. * gdb.cp/cplusfuncs.exp (dm_type_void): Change to "void". (probe_demangler): Remove all single-quoting of method and variable names. (info_func_regexp): Remove the word "void" from any occurrence of "(void)". (print_addr_2): Remove all single-quoting of method names. (print_addr_2_kfail): Likewise. (print_addr): Single-quote C function names before passing to print_addr_2. (test_paddr_operator_functions): Remove single-quoting for method names. Add tests for operator new[] and operator delete[].
2009-11-10 * gdb.cp/overload.exp: Add tests for resolving overloadedKeith Seitz1-0/+21
methods in expression parsing/evaluation.
2009-11-02 * gdb.cp/ctti.exp: Correct return values for unsigned char functions.Daniel Jacobowitz1-4/+4
2009-09-27 * gdb.cp/gdb2495.exp: Skip test on spu*-*-*.Ulrich Weigand1-0/+5
2009-09-21 * gdb.cp/cplusfuncs.exp (do_tests): Add check for proper error messageKeith Seitz1-0/+5
with invalid operator.
2009-09-21 * gdb.cp/classes.exp (do_tests): Add tests to print a constructorKeith Seitz4-0/+23
and destructor using typedef name of class. * gdb.cp/classes.cc (class Base1): Add a destructor. (base1): New typedef. (use_methods): Instanitate an object of type base1. * gdb.cp/templates.exp (test_template_typedef): New procedure. (do_tests): Call test_template_typedef. * gdb.cp/templates.cc (Baz::~Baz): New method. (intBazOne): New typedef. (main): Instantiate intBazOne.
2009-08-24 * gdb.cp/cpcompletion.exp (test_class_complete): New procedure.Keith Seitz1-0/+42
Add two new C++ completer tests which limit the output to a given class.
2009-07-13gdb/testsuite/Jan Kratochvil1-12/+0
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-07gdbTom Tromey1-2/+2
* 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-06-292009-06-29 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla2-0/+60
* dwarf2read.c (read_import_statement): Properly set import location and destination. * cp-support.h (cp_add_using, cp_add_using_directive): Now take char* inner, char* outer arguments. Updated callers. 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/namespace-nested-import.cc: New test. * gdb.cp/namespace-nested-import.exp: New test.
2009-06-28 gdb/Daniel Jacobowitz1-1/+2
* NEWS: Document inlined function support. * Makefile.in (SFILES): Add inline-frame.c. (COMMON_OBS): Add inline-frame.o. * block.c (contained_in): Rewrite to use lexical nesting. (block_linkage_function): Skip inlined function blocks. (block_inlined_p): New. * block.h (struct block): Update comment. (block_inlined_p): New prototype. * blockframe.c (get_frame_block): Handle inlined functions. (get_frame_function): Do not use block_linkage_function. (block_innermost_frame): Use get_frame_block and contained_in. * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache. Skip over inlined functions. Simplify epilogue check. (bpstat_check_breakpoint_conditions): Use get_stack_frame_id. Update comments. (set_momentary_breakpoint): Only accept non-inlined frames. (watch_command_1): Use frame_unwind_caller_pc and frame_unwind_caller_id instead of get_prev_frame. (until_break_command): Likewise. Use get_stack_frame_id. * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions. * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function. * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine. (read_func_scope, new_symbol): Likewise. Handle arguments specially for inlined functions without call site information. (inherit_abstract_dies): Allow tag mismatch for inlined subroutines. (die_specification): Treat DW_AT_abstract_origin as a specification. (read_type_die): Handle DW_TAG_inlined_subroutine. * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind. * frame.c (fprint_frame_id): Print inline depth. (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME. (skip_inlined_frames, get_stack_frame_id): New. (frame_unwind_caller_id): Use skip_inlined_frames. (frame_id_inlined_p): New. (frame_id_eq): Make the logic match the comments. Add inline_depth check. (frame_id_inner): Handle inlined functions. (frame_unwind_pc): New function, copied from frame_unwind_caller_pc. (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc. (get_prev_frame_1): Check for inline frames. Split out frame allocation to get_prev_frame_raw. (get_prev_frame_raw): New function. (get_prev_frame): Handle inline frames. (get_frame_pc): Use frame_unwind_pc. (get_frame_address_in_block): Skip inlined frames on both sides. (pc_notcurrent): Delete. (find_frame_sal): Rewrite to handle inline call sites. Use get_frame_address_in_block. (deprecated_update_frame_pc_hack): Make static. * frame.h: Update comments. (struct frame_id): Add inline_depth. (enum frame_type): Add INLINE_FRAME. (frame_id_inlined_p, get_stack_frame_id): New prototypes. * gdbthread.h (struct thread_info): Add step_stack_frame_id field. * infcmd.c (set_step_frame): New function. (step_once): Use set_step_frame. Handle inlined functions. (until_next_command): Use set_step_frame. (finish_backward), finish_forward): Use get_stack_frame_id. (finish_command): Support inlined functions. * inferior.h (set_step_info): New prototype. * infrun.c (RESUME_ALL): Use minus_one_ptid. (clear_proceed_status): Clear step_stack_frame_id. (init_wait_for_inferior): Call clear_inline_frame_state. (init_execution_control_state): Make static. (set_step_info): New function. (init_thread_stepping_state): Do not set the symtab or line here. (stepped_in_from): New function. (handle_inferior_event): Handle inlined functions. Use set_step_info. (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id. (struct inferior_status): Add step_stack_frame_id. (save_inferior_status, restore_inferior_status): Save and restore step_stack_frame_id. * inline-frame.c, inline-frame.h: New files. * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC. * regcache.c (regcache_write_pc): Call reinit_frame_cache. * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME. * stack.c (frame_show_address): New. (print_frame_info, print_frame): Use it. (find_frame_funname): Use get_frame_function. Handle inlined blocks. (frame_info): Mark inlined functions. (backtrace_command_1): Use get_current_user_frame. (print_frame_local_vars, print_frame_label_vars): Update comments. (return_command): Refuse inlined functions. * symtab.c (lookup_symbol_aux_local): Stop at inlined function boundaries. (find_function_start_sal): Avoid inlined functions. (completion_list_add_fields): New function. (default_make_symbol_completion_list): Use it. Use block_static_block and block_global_block. Check for inlined functions. (skip_prologue_using_sal): Avoid line number comparison across inlining. * symtab.h (struct symbol): Add is_inlined. (SYMBOL_INLINED): New. * target.c (target_resume): Call clear_inline_frame_state. * valops.c (value_of_variable): Check block_inlined_p. gdb/doc/ * gdb.texinfo (Debugging Optimized Code): New chapter. (Compiling for Debugging): Reference it. Move some text to the new section. gdb/testsuite/ * gdb.base/break.exp: Add an XFAIL for gcc/36748. * gdb.cp/annota2.exp: Accept frames-invalid in more places. * gdb.opt/Makefile.in (EXECUTABLES): Update. * gdb.opt/clobbered-registers-O2.exp: Update to GPL v3. * gdb.opt/inline-bt.c, gdb.opt/inline-bt.exp, gdb.opt/inline-cmds.c, gdb.opt/inline-cmds.exp, gdb.opt/inline-locals.c, gdb.opt/inline-locals.exp, gdb.opt/inline-markers.c: New files. * lib/gdb.exp (skip_inline_frame_tests): New function. (skip_inline_var_tests): New function.
2009-06-27* gdb.cp/exception.exp: Don't require $hex before inner frame inAndreas Schwab1-4/+4
backtrace.
2009-06-232009-06-23 Sami Wagiaalla <swagiaal@redhat.com>Sami Wagiaalla2-0/+132
* dwarf2read.c (process_die): Handle import statements (DW_TAG_imported_declaration, case DW_TAG_imported_module) (read_import_statement): New. (read_func_scope): Update using_directives to point to current context (read_lexical_block_scope): Ditto. * cp-support.h: Added prototype for cp_add_using. * cp-namespace.c: Removed local context_stack. (cp_initialize_namespace): Deleted. (cp_finalize_namespace): Deleted. (cp_add_using_directive): Use using_directives instead of using_list. (cp_add_using): No longer static. * buildsym.h: Created global using_direct variable. Created using_direct variable in context_stack. * buildsym.c (finish_block): Set using directives for the block under construction. (start_symtab): Removed call to cp_initialize_namespace(). (end_symtab): Removed call to cp_finalize_namespace(). (push_context): Save and reset using_directives. * block.c (block_using): Return using directives for given block instead of static block. 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/namespace-using.exp: New test. * gdb.cp/namespace-using.cc: New test.
2009-06-17ChangeLog:Ulrich Weigand1-2/+2
* infrun.c (handle_inferior_event): Use current frame architecture or thread architecture instead of current_gdbarch. Pass to handle_step_into_function and handle_step_into_function_backward. (handle_step_into_function): Add GDBARCH parameter. Use it instead of current_gdbarch. (handle_step_into_function_backward): Likewise. (insert_step_resume_breakpoint_at_frame): Use frame architecture instead of current_gdbarch. (insert_step_resume_breakpoint_at_caller): Likewise. testsuite/ChangeLog: * gdb.base/annota1.exp: Allow multiple occurrences of the frames-invalid annotation. * gdb.cp/annota2.exp: Likewise.
2009-06-152009-06-15 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon3-1/+247
* infcall.c (show_unwind_on_terminating_exception_p): New function. (call_function_by_hand): Create breakpoint and clean-up call for std::terminate.breakpoint. Add unwind_on_terminating_exception_p gate. Pop frame on breakpoint hit. (_initialize_infcall): Add add_setshow_boolean_cmd for unwind-on-terminating-exception. testsuite/ 2009-06-15 Phil Muldoon <pmuldoon@redhat.com> * gdb.cp/gdb2495.cc: New file. * gdb.cp/gdb2495.exp: New file. doc/ 2009-06-15 Phil Muldoon <pmuldoon@redhat.com> * doc/gdb.texinfo (Calling): Document set-unwind-on-terminating-exception usage.
2009-05-11gdb/Jan Kratochvil2-0/+111
Fix internal error on breaking at a multi-locations caller source line. * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break' command with no parameters. gdb/testsuite/ * gdb.cp/expand-sals.exp, gdb.cp/expand-sals.cc: New.
2009-04-29 * gdb.cp/mb-ctor.exp: Add multi-line source statement test.Doug Evans8-17/+90
* gdb.cp/mb-ctor.cc: Ditto. * gdb.cp/mb-inline.exp: Add multi-line source statement test. * gdb.cp/mb-inline.h (multi_line_foo): New function. * gdb.cp/mb-inline1.cc: Call it. * gdb.cp/mb-inline2.cc: Ditto. * gdb.cp/mb-templates.exp: Add multi-line source statement test. * gdb.cp/mb-templates.cc (multi_line_foo): New template.
2009-04-27 * gdb.cp/templates.cc (GetMax): New template.Jerome Guitton2-0/+15
(main): Declare two instances of GetMax. * gdb.cp/templates.exp: Add new test.
2009-04-27gdb/Jan Kratochvil2-0/+73
PR gdb/9675: * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New. (read_func_scope): Call inherit_abstract_dies. gdb/testsuite/ * gdb.cp/abstract-origin.exp, gdb.cp/abstract-origin.cc: New test.
2009-03-31gdbTom Tromey2-15/+11
2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Keith Seitz <keiths@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/6817 * Makefile.in (dbxread.o): Update. * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string. * dwarf2read.c (GDB_FORM_cached_string): New. (read_partial_die): Use dwarf2_canonicalize_name. (dwarf2_linkage_name): Use dwarf2_name. (dwarf2_canonicalize_name): New. (dwarf2_name): Use dwarf2_canonicalize_name. (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string. * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string. * symtab.c (lookup_symbol_in_language): Canonicalize input before searching. * cp-name-parser.y: operator() requires two parameters, according to libiberty. * minsyms.c (lookup_minimal_symbol): Canonicalize input before searching. * NEWS: Update. gdb/testsuite 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/931 * gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical output. * gdb.cp/templates.exp: Allow canonical output. Remove KFAILs for gdb/931. * dw2-strp.S (DW_AT_language): Change to C++. (DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New.
2009-03-20gdb:Tom Tromey1-2/+2
2009-03-19 Tom Tromey <tromey@redhat.com> Julian Brown <julian@codesourcery.com> PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103, PR i18n/9401, PR exp/9613: * NEWS: Update * value.h (value_typed_string): Declare. (val_print_string): Update. * valprint.h (print_char_chars): Update. * valprint.c (print_char_chars): Add type argument. Update. (val_print_string): Likewise. * valops.c (value_typed_string): New function. * utils.c (host_char_to_target): New function. (parse_escape): Use host_char_to_target, host_hex_value. Update. Remove '^' case. (no_control_char_error): Remove. * typeprint.c (print_type_scalar): Update. * scm-valprint.c (scm_scmval_print): Update. * scm-lang.h (scm_printchar, scm_printstr): Update. * scm-lang.c (scm_printchar): Add type argument. (scm_printstr): Likewise. * printcmd.c (print_formatted): Update. (print_scalar_formatted): Update. (printf_command) <wide_string_arg, wide_char_arg>: New constants. Handle '%lc' and '%ls'. * parser-defs.h (struct typed_stoken): New type. (struct stoken_vector): Likewise. (write_exp_string_vector): Declare. * parse.c (write_exp_string_vector): New function. * p-valprint.c (pascal_val_print): Update. * p-lang.h (is_pascal_string_type, pascal_printchar, pascal_printstr): Update. * p-lang.c (is_pascal_string_type): Remove 'char_size' argument. Add 'char_type' argument. (pascal_emit_char): Add type argument. (pascal_printchar): Likewise. (pascal_printstr): Likewise. * objc-lang.c (objc_emit_char): Add type argument. (objc_printchar): Likewise. (objc_printstr): Likewise. * macroexp.c (get_character_constant): Handle unicode characters. Use c_parse_escape. (get_string_literal): Handle unicode strings. Use c_parse_escape. * m2-valprint.c (print_unpacked_pointer): Update. (m2_print_array_contents): Update. (m2_val_print): Update. * m2-lang.c (m2_emit_char): Add type argument. (m2_printchar): Likewise. (m2_printstr): Likewise. * language.h (struct language_defn) <la_printchar>: Add type argument. <la_printstr, la_emitchar>: Likewise. (LA_PRINT_CHAR): Likewise. (LA_PRINT_STRING): Likewise. (LA_EMIT_CHAR): Likewise. * language.c (unk_lang_emit_char): Add type argument. (unk_lang_printchar): Likewise. (unk_lang_printstr): Likewise. * jv-valprint.c (java_val_print): Update. * jv-lang.c (java_emit_char): Add type argument. * f-valprint.c (f_val_print): Update. * f-lang.c (f_emit_char): Add type argument. (f_printchar): Likewise. (f_printstr): Likewise. * expprint.c (print_subexp_standard): Update. * charset.h (target_wide_charset): Declare. (c_target_char_has_backslash_escape, c_parse_backslash, host_char_print_literally, host_char_to_target, target_char_to_host, target_char_to_control_char): Remove. (enum transliterations): New type. (convert_between_encodings): Declare. (HOST_ESCAPE_CHAR): New define. (host_letter_to_control_character, host_hex_value): Declare. (enum wchar_iterate_result): New enum. (struct wchar_iterator): Declare. (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator, wchar_push_back): Declare. * charset-list.h: New file. * c-valprint.c (textual_name): New function. (textual_element_type): Handle wide character types. (c_val_print): Pass original type to textual_element_type. Handle wide character types. (c_value_print): Use textual_element_type. Pass original type of value to val_print. * c-lang.h (enum c_string_type): New type. (c_printchar, c_printstr): Update. * c-lang.c (classify_type): New function. (print_wchar): Likewise. (c_emit_char): Add type argument. Handle wide characters. (c_printchar): Likewise. (c_printstr): Add type argument. Handle wide and multibyte character sets. (convert_ucn): New function. (emit_numeric_character): Likewise. (convert_octal): Likewise. (convert_hex): Likewise. (ADVANCE): New macro. (convert_escape): New function. (parse_one_string): Likewise. (evaluate_subexp_c): Likewise. (exp_descriptor_c): New global. (c_language_defn): Use exp_descriptor_c. (cplus_language_defn): Likewise. (asm_language_defn): Likewise. (minimal_language_defn): Likewise. (charset_for_string_type): New function. * c-exp.y (%union): Add 'svec' and 'tsval'. (CHAR): New token. (exp): Add CHAR production. (string_exp): Rewrite. (exp) <string_exp>: Rewrite. (tempbuf): Now global. (tempbuf_init): New global. (parse_string_or_char): New function. (yylex) <tempbuf>: Now global. <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>: Remove. Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char. (c_parse_escape): New function. * auxv.c (fprint_target_auxv): Update. * ada-valprint.c (ada_emit_char): Add type argument. (ada_printchar): Likewise. (ada_print_scalar): Update. (printstr): Add type argument. Update calls to ada_emit_char. (ada_printstr): Add type argument. (ada_val_print_array): Update. (ada_val_print_1): Likewise. * ada-lang.c (emit_char): Add type argument. * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add type arguments. * gdb_locale.h: Include langinfo.h. * charset.c (_initialize_charset): Set default host charset from the locale. Don't register charsets. Add target-wide-charset commands. Call find_charset_names. (struct charset, struct translation): Remove. (GDB_DEFAULT_HOST_CHARSET): Remove. (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define. (target_wide_charset_name): New global. (show_host_charset_name): Handle "auto". (show_target_wide_charset_name): New function. (host_charset_enum, target_charset_enum): Remove. (charset_enum): New global. (all_charsets, register_charset, lookup_charset, all_translations, register_translation, lookup_translation): Remove. (simple_charset, ascii_print_literally, ascii_to_control): Remove. (iso_8859_print_literally, iso_8859_to_control, iso_8859_family_charset): Remove. (ebcdic_print_literally, ebcdic_to_control, ebcdic_family_charset): Remove. (struct cached_iconv, check_iconv_cache, cached_iconv_convert, register_iconv_charsets): Remove. (target_wide_charset_be_name, target_wide_charset_le_name): New globals. (identity_either_char_to_other): Remove. (set_be_le_names, validate): New functions. (backslashable, backslashed, represented): Remove. (default_c_target_char_has_backslash_escape): Remove. (default_c_parse_backslash, iconv_convert): Remove. (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table, ascii_to_ibm1047_table, iso_8859_1_to_ascii_table, iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table, ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table, ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table, ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove. (table_convert_char, table_translation, simple_table_translation): Remove. (current_host_charset, current_target_charset, c_target_char_has_backslash_escape_func, c_target_char_has_backslash_escape_baton): Remove. (c_parse_backslash_func, c_parse_backslash_baton): Remove. (host_char_to_target_func, host_char_to_target_baton): Remove. (target_char_to_host_func, target_char_to_host_baton): Remove. (cached_iconv_host_to_target, cached_iconv_target_to_host): Remove. (lookup_charset_or_error, check_valid_host_charset): Remove. (set_host_and_target_charsets): Remove. (set_host_charset, set_target_charset): Remove. (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite. (set_target_wide_charset_sfunc): New function. (show_charset): Print target wide character set. (host_charset, target_charset): Rewrite. (target_wide_charset): New function. (c_target_char_has_backslash_escape): Remove. (c_parse_backslash): Remove. (host_letter_to_control_character): New function. (host_char_print_literally): Remove. (host_hex_value): New function. (target_char_to_control_char): Remove. (cleanup_iconv): New function. (convert_between_encodings): New function. (target_char_to_host): Remove. (struct wchar_iterator): Define. (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator, wchar_push_back): New functions. (do_cleanup_iterator): New function. (char_ptr): New typedef. (charsets): New global. (add_one, find_charset_names): New functions. (default_charset_names): New global. (auto_host_charset_name): Likewise. * aclocal.m4, config.in, configure: Rebuild. * configure.ac: Call AM_LANGINFO_CODESET. (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8. (AM_ICONV): Invoke earlier. * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and LIBICONV_LIBDIR. Check for libiconv in build tree. * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros. (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE. (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR. * gdb_obstack.h (obstack_grow_wstr): New define. * gdb_wchar.h: New file. * defs.h: Include it. gdb/testsuite: * gdb.base/store.exp: Update for change to escape output. * gdb.base/callfuncs.exp (fetch_all_registers): Update for change to escape output. * gdb.base/pointers.exp: Update for change to escape output. * gdb.base/long_long.exp (gdb_test_long_long): Update for change to escape output. * gdb.base/constvars.exp (do_constvar_tests): Update for change to escape output. * gdb.base/call-rt-st.exp (print_struct_call): Update for change to escape output. * gdb.cp/ref-types.exp (gdb_start_again): Update for change to escape output. * gdb.base/setvar.exp: Update for change to escape output. * lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C. * gdb.base/printcmds.exp (test_print_all_chars): Update for change to escape output. (test_print_string_constants): Likewise. * gdb.base/charset.exp (valid_host_charset): Check size of wchar_t. Handle UCS-2 and UCS-4. Add tests for wide and unicode cases. Handle "auto"-related output. * gdb.base/charset.c (char16_t, char32_t): New typedefs. (uvar, Uvar): New globals. gdb/doc: * gdb.texinfo (Character Sets): Remove obsolete text. Document set target-wide-charset. (Requirements): Mention iconv.
2009-02-102009-02-06 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov1-0/+1
* gdb.cp/pr9594.cc: Prevent GCC from optimizing 'a' out.
2009-02-03Fix ChangeLog to point to the correct bug, PR gdb/9594.Tom Tromey3-2/+2
gdb/testsuite * gdb.cp/cpcompletion.exp: Name the test "pr9594". * gdb.cp/pr2489.cc: Rename... * gdb.cp/pr9594.cc: ... to this.
2009-02-03gdbTom Tromey3-1/+124
PR gdb/2489: * completer.c (count_struct_fields): Count method names. (add_struct_fields): Add matching method names. gdb/testsuite * gdb.cp/Makefile.in (EXECUTABLES): Add pr2489. * gdb.cp/pr2489.cc: New file. * gdb.cp/cpcompletion.exp: New file.
2009-02-02gdbTom Tromey2-0/+6
PR exp/9059: * valops.c (find_overload_match): Follow typedefs before taking address of object argument. gdb/testsuite PR exp/9059: * gdb.cp/call-c.exp: Add regression test. * gdb.cp/call-c.cc (FooHandle): New typedef. (main): New variable 'handle'.
2009-01-222009-01-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-0/+90
PR c++/9631: * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on vbasetype. 2009-01-22 Pedro Alves <pedro@codesourcery.com> PR c++/9631: * gdb.cp/pr9631.cc, gdb.cp/pr9631.exp: New.
2009-01-03 Updated copyright notices for most files.Joel Brobecker83-84/+90
2008-12-23 * gdb.cp/punctuator.exp: Backslash the '$' signs.Jan Kratochvil1-12/+12
2008-12-22gdbTom Tromey1-0/+52
* c-exp.y (ident_tokens): New global. (struct token) <cxx_only>: New field. (tokentab3): Update. (tokentab2): Update. (yylex): Use ident_tokens. gdb/testsuite * gdb.cp/punctuator.exp: New file.
2008-11-27 * gdb.cp/formatted-ref.exp: Add equality test.Jerome Guitton1-0/+10
* gdb.ada/formatted_ref.exp: Ditto.
2008-10-15typo.Denis Pilat1-1/+1
2008-10-032008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov4-40/+59
PR gdb/2384: * gdb.cp/gdb2384.exp: Extended to test more cases. * gdb.cp/gdb2384.cc: Likewise. * gdb.cp/gdb2384-base.h: Likewise. * gdb.cp/gdb2384-base.cc: Likewise.
2008-08-21 * dwarf2read.c (processing_current_prefix): Delete staticDaniel Jacobowitz1-7/+10
variable. (process_full_comp_unit): Do not set processing_current_prefix. (dwarf2_full_name): New function. (read_func_scope): Do not set processing_current_prefix. Use determine_prefix. (read_structure_type): Do not set processing_current_prefix. Remove unused inner cleanup. (process_structure_scope): Do not set processing_current_prefix. (read_enumeration_type): Use dwarf2_full_name. (determine_class_name): Return a const char *. Put the result on the objfile obstack. Use dwarf2_full_name. (read_namespace_type): New function. (read_namespace): Do not create the type here. Use determine_prefix. (read_typedef): Use dwarf2_full_name. Do not pass the name to init_type. (read_base_type): Do not pass the name to init_type. Handle TYPE_FLAG_NOSIGN. (read_unspecified_type): Do not pass the name to init_type. (new_symbol): Use dwarf2_full_name instead of processing_current_prefix. (read_type_die): Do not set processing_current_prefix. Handle DW_TAG_namespace. (determine_prefix): Handle specifications. Return the result on the objfile obstack. Handle unions correctly.
2008-07-15Fix for 'FAIL: gdb.cp/class2.exp: p acp->c2' on spu-elfPaul Pluzhnikov1-2/+2
2008-07-14Fix for PR gdb/2477Paul Pluzhnikov2-1/+17
2008-06-062008-06-06 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2-0/+16
* gdb.cp/call-c.exp: Test for incorrect handling of reference to pointer. * gdb.cp/call-c.cc: Likewise.
2008-06-05 * gdb.cp/exception.exp: Activate test, make it work with pendingAleksandar Ristovski1-52/+57
catchpoints.
2008-05-04gdb/Pedro Alves1-2/+2
* breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp and bp_longjmp_resume breakpoints. (breakpoint_address_is_meaningful): Claim bp_longjmp_resume as meaningful. (create_longjmp_breakpoint): Don't create bp_longjmp_resume breakpoints. Create bp_longjmp breakpoints as momentary breakpoints. (enable_longjmp_breakpoint): Delete. (set_longjmp_breakpoint): New. (disable_longjmp_breakpoint): Delete. (delete_longjmp_breakpoint): New. (set_longjmp_resume_breakpoint): Delete. (set_momentary_breakpoint_at_pc): New. (breakpoint_re_set_one): Don't delete bp_longjmp and bp_longjmp_resume breakpoints. (breakpoint_re_set): Don't create longjmp and longjmp-resume breakpoints. * infrun.c (step_resume_breakpoint): Add comment. (struct execution_control_state): Delete handling_longjmp member. (init_execution_control_state). Don't clear handling_longjmp. (context_switch): Don't context switch handling_longjmp. (handle_inferior_event): If handling a bp_longjmp breakpoint, create a bp_longjmp_resume breakpoint, and set it as current step_resume_breakpoint, then step over the longjmp breakpoint. If handling a bp_longjmp_resume breakpoint, don't delete the longjmp breakpoint, delete the longjmp-resume breakpoint, and stop stepping. (currently_stepping): Remove handling_longjmp from expression. (insert_step_resume_breakpoint_at_sal): Update comment. (insert_longjmp_resume_breakpoint): New. * breakpoint.h (set_momentary_breakpoint_at_pc): Declare. (enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete declarations. (set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare. (set_longjmp_resume_breakpoint): Delete declaration. * gdbthread.h (save_infrun_state): Remove handling_longjmp parameter. (load_infrun_state): Delete *handling_longjmp parameter. * thread.c (save_infrun_state): Remove handling_longjmp parameter. Update body. (load_infrun_state): Delete *handling_longjmp parameter. Update body. * infcmd.c (disable_longjmp_breakpoint_cleanup): Delete. (delete_longjmp_breakpoint_cleanup): New. (step_1): Call set_longjmp_breakpoint instead of enable_longjmp_breakpoint. Use delete_longjmp_breakpoint_cleanup instead of disable_longjmp_breakpoint_cleanup when making cleanup. (step_1_continuation): Pass thread id in the continuation args to step_once. (step_once): Add thread parameter. Pass thread id the the continuation. gdb/testsuite/ * gdb.cp/annota2.exp: Adjust to breakpoints invalidations at different times.