aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
AgeCommit message (Collapse)AuthorFilesLines
2013-03-21 PR exp/15109:Tom Tromey2-0/+6
* c-exp.y (yylex): Rewrite to push all tokens onto the FIFO. Handle FILENAME token. gdb/testsuite * gdb.cp/cpexprs.exp: Add test for FILENAME:: case. * gdb.cp/misc.exp: Add test for FILENAME:: case.
2013-03-15 PR c++/15116:Tom Tromey2-0/+5
* gdbtypes.c (types_equal): Handle TYPE_CODE_FUNC. gdb/testsuite * gdb.cp/overload.cc (intintfunc): New. * gdb.cp/overload.exp: Add regression test.
2013-03-14gdb/testsuite/Yao Qi6-6/+6
* config/monitor.exp (gdb_target_cmd): Remove semicolon after 'return'. (gdb_target_monitor, gdb_load): Likewise. * config/sid.exp (gdb_load): Likewise. * config/slite.exp (gdb_load): Likewise. * config/vx.exp (gdb_start, spawn_vxgdb): Likewise. * gdb.ada/arrayidx.exp, gdb.ada/null_array.exp: Likewise. * gdb.arch/mips-octeon-bbit.exp (single_step): Likewise. (single_step_until): Likewise. * gdb.arch/powerpc-d128-regs.exp: Likewise. * gdb.arch/system-gcore.exp: Likewise. * gdb.base/bigcore.exp (extract_heap): Likewise. * gdb.base/break-on-linker-gcd-function.exp: Likewise. * gdb.base/call-ar-st.exp: Likewise. * gdb.base/call-rt-st.exp: Likewise. * gdb.base/call-sc.exp, gdb.base/call-strs.exp: Likewise. * gdb.base/callfuncs.exp, gdb.base/completion.exp: Likewise. * gdb.base/condbreak.exp, gdb.base/constvars.exp: Likewise. * gdb.base/corefile.exp: Likewise. * gdb.base/dbx.exp (gdb_file_cmd): Likewise. * gdb.base/exprs.exp, gdb.base/fileio.exp: Likewise. * gdb.base/fixsection.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/gcore-buffer-overflow.exp: Likewise. * gdb.base/gcore-relro.exp: Likewise. * gdb.base/gcore.exp, gdb.base/gdb11530.exp: Likewise. * gdb.base/gdb11531.exp, gdb.base/gnu-ifunc.exp: Likewise. * gdb.base/info-os.exp, gdb.base/info-proc.exp: Likewise. * gdb.base/interp.exp, gdb.base/langs.exp:: Likewise. * gdb.base/list.exp: Likewise. (set_listsize): Likewise. * gdb.base/logical.exp, gdb.base/mips_pro.exp: Likewise. * gdb.base/miscexprs.exp, gdb.base/nodebug.exp: Likewise. * gdb.base/opaque.exp, gdb.base/pointers.exp: Likewise. * gdb.base/psymtab.exp, gdb.base/ptype.exp: Likewise. * gdb.base/relational.exp, gdb.base/scope.exp: Likewise. * gdb.base/setvar.exp: Likewise. (test_set): Likewise. * gdb.base/signals.exp, gdb.base/sizeof.exp: Likewise. * gdb.base/solib-overlap.exp: Likewise. * gdb.base/store.exp, gdb.base/structs.exp: Likewise. * gdb.base/structs2.exp, gdb.base/volatile.exp: Likewise. * gdb.base/watchpoint.exp (initialize): Likewise. (test_simple_watchpoint): Likewise. (test_disabling_watchpoints): Likewise. (test_watchpoint_triggered_in_syscall): Likewise. * gdb.base/whatis.exp, gdb.cp/ambiguous.exp: Likewise. * gdb.cp/casts.exp, gdb.cp/ctti.exp: Likewise. * gdb.cp/namespace.exp, gdb.cp/nsdecl.exp: Likewise. * gdb.cp/psmang.exp, gdb.dwarf2/dw2-ranges.exp: Likewise. * gdb.hp/gdb.aCC/optimize.exp: Likewise. * gdb.hp/gdb.aCC/watch-cmd.exp: Likewise. * gdb.hp/gdb.base-hp/callfwmall.exp: Likewise. * gdb.hp/gdb.base-hp/pxdb.exp: Likewise. * gdb.hp/gdb.compat/xdb1.exp: Likewise. * gdb.hp/gdb.compat/xdb2.exp: Likewise. * gdb.hp/gdb.compat/xdb3.exp: Likewise. * gdb.hp/gdb.defects/bs14602.exp: Likewise. * gdb.hp/gdb.defects/solib-d.exp: Likewise. * gdb.mi/gdb792.exp: Likewise. * gdb.mi/mi-inheritance-syntax-error.exp: Likewise. * gdb.mi/mi-logging.exp, gdb.mi/mi-var-cp.exp : Likewise. * gdb.mi/mi-var-rtti.exp, gdb.python/py-type.exp: Likewise. * gdb.threads/gcore-thread.exp: Likewise. (load_core): Likewise. * gdb.threads/pthreads.exp (all_threads_running): Likewise. (test_startup, check_control_c): Likewise. * gdb.threads/sigstep-threads.exp: Likewise. * gdb.threads/thread_check.exp: Likewise. * gdb.trace/backtrace.exp, gdb.trace/change-loc.exp: Likewise. * gdb.trace/circ.exp (run_trace_experiment): Likewise. (set_a_tracepoint, trace_buffer_normal): Likewise. (gdb_trace_circular_tests): Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/disconnected-tracing.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/mi-traceframe-changed.exp: Likewise. * gdb.trace/mi-tracepoint-changed.exp: Likewise. * gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv): Likewise. * gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp: Likewise. * gdb.trace/pending.exp, gdb.trace/report.exp: Likewise. * gdb.trace/stap-trace.exp: Likewise. * gdb.trace/status-stop.exp,gdb.trace/strace.exp: Likewise. * gdb.trace/tfind.exp, gdb.trace/trace-break.exp: Likewise. * gdb.trace/trace-buffer-size.exp: Likewise. * gdb.trace/tspeed.exp, gdb.trace/tsv.exp: Likewise. * gdb.trace/unavailable.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise. * lib/fortran.exp (set_lang_fortran): Likewise. * lib/gdb.exp (default_gdb_version, gdb_start_cmd): Likewise. (gdb_breakpoint, gdb_reinitialize_dir): Likewise. (default_gdb_start, get_compiler_info): Likewise. (gdb_compile, gdb_compile_objc, gdb_reload, gdb_init): Likewise. (get_debug_format, setup_xfail_format): Likewise. (rerun_to_main, gdb_skip_float_test): Likewise. (build_id_debug_filename_get, get_remotetimeout): Likewise. * lib/java.exp (set_lang_java): Likewise. * lib/mi-support.exp (default_mi_gdb_start): Likewise. (mi_gdb_reinitialize_dir, mi_gdb_target_cmd): Likewise. (mi_gdb_file_cmd, mi_gdb_test): Likewise. (mi_run_cmd_full, mi_expect_interrupt): Likewise. * lib/objc.exp (set_lang_objc): Likewise. * lib/pascal.exp (set_lang_pascal): Likewise. * lib/prompt.exp (default_prompt_gdb_start): Likewise. * lib/trace-support.exp (gdb_trace_setactions, gdb_tfind_test): Likewise. (gdb_readexpr, gdb_gettpnum, gdb_find_recursion_test_baseline): Likewise.
2013-03-14From: Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior2-0/+9
Subject: [PATCH] Fix for PR c++/15203 and PR c++/15210 Date: Sat, 09 Mar 2013 02:50:49 -0300 (5 days, 4 hours, 57 minutes ago) Message-ID: <m3a9qdnmti.fsf@redhat.com> Hi, This bug was reported internally at our Bugzilla, along with a proposed fix. After talking to Keith about it, he investigated and came up with another patch needed to really fix the issue on CVS HEAD. The first part of the fix is the patch to cp-namespace.c. It handles the case when we are accessing a static variable inside a function (inside a class) by the full linespec (is it right, Keith?). E.g.: class foo { public: int bar() { static int var = 0; } }; And then, printing the value of `var': (gdb) print 'foo::bar()::var' GDB would fall in an internal_error: gdb/cp-namespace.c:816: internal-error: cp_lookup_nested_symbol called on a non-aggregate type. This is because `cp_lookup_nested_symbol' is not handling the case when TYPE_CODE is either _FUNC or _METHOD. This patch fixes it by returning NULL in this case. The second part of the fix is the patch to elfread.c. It is needed because the BSF_GNU_UNIQUE flag was added to some symbols in <http://sourceware.org/ml/binutils/2009-06/msg00016.html>. Because of that, (still) the command: (gdb) print 'foo::bar()::var' where `var' is a static variable returns: "No symbol "foo::bar()::var" in current context." So with the second patch applied the command finally DTRT: (gdb) print 'foo::bar()::var' $1 = 0 This may not be the ideal solution, according to Keith it would be good to implement productions on c-exp.y in order to recognize CLASS::FUNCTION::VARIABLE, but it is a solution which works with what we have today. I regtested it in Fedora 17 x86_64 with -m64 and -m32, including gdbserver, without regressions. gdb/: 2013-03-14 Keith Seitz <keiths@redhat.com> Alan Matsuoka <alanm@redhat.com> PR c++/15203 PR c++/15210 * cp-namespace.c (cp_lookup_nested_symbol): Handle TYPE_CODE_FUNC and TYPE_CODE_METHOD. * elfread.c (elf_symtab_read): Handle BSF_GNU_UNIQUE for certain symbols. gdb/testsuite/: 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com> PR c++/15203 PR c++/15210 * gdb.cp/m-static.cc (keepalive_int): New function. (gnu_obj_1::method): New variable `sintvar', call `keepalive_int'. * gdb.cp/m-static.exp: New test for `sintvar'.
2013-02-14Fix ptype bug actually exercised in userdef.expPedro Alves1-1/+1
I happened to notice a bug with ptype &Ref, and found out userdef.exp actually exercises the bug. With: class Container { public: Member m; Member& operator* (); }; Member& Container::operator* () { return this->m; } And 'c' is of type Container: (gdb) p c $1 = {m = {z = -9192}} (gdb) p *c $2 = (Member &) @0x7fffffffda20: {z = -9192} (gdb) ptype *c type = class Member { public: int z; } & (gdb) p &*c $3 = (Member *) 0x7fffffffda20 (gdb) ptype &*c type = class Member { public: int z; } &* (gdb) Notice that last print (&*c) on says the type is a pointer - that's how you get the address behind a reference. But notice the last ptype instead says the type of the same expression is a pointer _reference_. This looks like a bug to me. This patch fixes it. The issue is that we're entering the VALUE_LVAL (x) == lval_memory branch by mistake for references. The fix is just to swap the tests so references are checked first, like value_addr also handles references first. Tested on x86_64 Fedora 17. 2013-02-14 Pedro Alves <palves@redhat.com> * eval.c (evaluate_subexp_for_address) <default_case_after_eval, EVAL_AVOID_SIDE_EFFECTS>: Swap and handle TYPE_CODE_REF before lval_memory. 2013-02-14 Pedro Alves <palves@redhat.com> * gdb.cp/userdef.exp (ptype &*c): Don't expect an &.
2013-02-12 PR symtab/11464:Tom Tromey2-0/+9
* c-exp.y (lex_one_token): Initialize other fields of yylval on NAME return. (classify_inner_name): Remove 'first_name' argument, add 'context'. Remove unused variable. (yylex): Explicitly maintain the context type. Exit loop earlier if NAME result is seen. gdb/testsuite * gdb.cp/m-static.cc (gnu_obj_1::~gnu_obj_1): New destructor. * gdb.cp/m-static.exp: Add tests to print quoted destructor.
2013-01-23 * gdb.cp/converts.cc (main): Initialize 'a'.Tom Tromey1-1/+2
2013-01-22If a breakpoint is not user visible, then there's no point inPedro Alves1-3/+3
bothering the frontend about it... This is the exact same check MI does. I also smoke tested Emacs 23 in gud-gdb mode, both annotations=2 and annotations=3. I didn't notice anything break. gdb/ 2013-01-22 Pedro Alves <palves@redhat.com> * annotate.c (breakpoint_changed): Skip if breakpoint is not user-visible. gdb/testsuite/ 2013-01-22 Pedro Alves <palves@redhat.com> * gdb.base/annota1.exp (signal sent): No longer expect breakpoints-invalid. * gdb.cp/annota2.exp (continue until exit) (watch triggered on a.x): Ditto.
2013-01-22All annotate_breakpoints_changed calls are along-sidePedro Alves1-6/+9
observer_notify_breakpoints_changed calls. All, except the init_raw_breakpoint one. But that one is actually wrong. The breakpoint is being constructed at that point, and hasn't been placed on the breakpoint chain yet. It would be better placed in install_breakpoint, and I actually started out that way. But once the annotate_breakpoints_changed are parallel to the observer calls, we can fully move annotations to observers too. One issue is that this changes the order of annotations a bit. Before, we'd emit the annotation, and after call "mention()" on the breakpoint (which prints the breakpoint number, etc.). But, we call the observers _after_ mention is called, so the annotation output will change a little: void install_breakpoint (int internal, struct breakpoint *b, int update_gll) { add_to_breakpoint_chain (b); set_breakpoint_number (internal, b); if (is_tracepoint (b)) set_tracepoint_count (breakpoint_count); if (!internal) mention (b); observer_notify_breakpoint_created (b); if (update_gll) update_global_location_list (1); } I believe this order doesn't really matter (the frontend needs to wait for the prompt anyway), so I just adjust the expected output in the tests. Emacs in annotations mode doesn't seem to complain. Couple that with the previous patch that suppressed duplicated annotations, and, the fact that some annotations calls were actually missing (were we do have observer calls), more changes to the tests are needed anyway. Tested on x86_64 Fedora 17. gdb/ 2013-01-22 Pedro Alves <palves@redhat.com> * annotate.c (annotate_breakpoints_changed): Rename to ... (annotate_breakpoints_invalid): ... this. Make static. (breakpoint_changed): Adjust. (_initialize_annotate): Always install the observers. Install a "breakpoint_created" observer. * annotate.h (annotate_breakpoints_changed): Delete declaration. * breakpoint.c (set_breakpoint_condition) (breakpoint_set_commands, do_map_commands_command) (init_raw_breakpoint, clear_command, set_ignore_count) (enable_breakpoint_disp): No longer call annotate_breakpoints_changed. gdb/testsuite/ 2013-01-22 Pedro Alves <palves@redhat.com> * gdb.base/annota1.exp (breakpoints_invalid): New variable. Adjust tests to breakpoints-invalid changes. * gdb.cp/annota2.exp (breakpoints_invalid, frames_invalid): New variables. Adjust tests to breakpoints-invalid changes.
2013-01-13gdb/Jan Kratochvil2-0/+71
* parse.c (parse_exp_in_context): New variable inner_chain. Call make_cleanup_restore_current_language. Call set_language. Move OLD_CHAIN and INNER_CHAIN cleanups. * utils.c (do_restore_current_language) (make_cleanup_restore_current_language): New functions. * utils.h (make_cleanup_restore_current_language): New declaration. gdb/testsuite/ * gdb.cp/parse-lang.cc: New file. * gdb.cp/parse-lang.exp: New file.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker190-205/+190
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-12-14 PR c++/8888:Tom Tromey2-0/+116
* symtab.c (lookup_symbol_aux): If constructor is found, consider returning the type instead. * c-exp.y (classify_name): Check STRUCT_DOMAIN if a constructor is found. testsuite * gdb.cp/member-name.exp: New file. * gdb.cp/member-name.cc: New file.
2012-12-14 Partial fix for PR c++/14160:Tom Tromey1-0/+16
* c-typeprint.c (c_type_print_base): Use TYPE_FN_FIELD_CONSTRUCTOR. * dwarf2read.c (dwarf2_is_constructor): New function. (dwarf2_add_member_fn): Use it. * gnu-v3-abi.c (gnuv3_pass_by_reference): Use TYPE_FN_FIELD_CONSTRUCTOR. * jv-typeprint.c (java_type_print_base): Use TYPE_FN_FIELD_CONSTRUCTOR. * gdbtypes.h (struct fn_field) <is_constructor>: New field. <dummy>: Shrink. (TYPE_FN_FIELD_CONSTRUCTOR): New macro. testsuite * gdb.cp/templates.exp (test_ptype_of_templates): Update kfails.
2012-11-27gdb/Yao Qi2-0/+43
2012-11-27 Daniel Jacobowitz <dan@codesourcery.com> Yao Qi <yao@codesourcery.com> * eval.c (evaluate_subexp_standard): Add handling of TYPE_CODE_MEMBERPTR when calling functions. Correct the result of ptype for calling a TYPE_CODE_METHODPTR. gdb/testsuite/ 2012-11-27 Daniel Jacobowitz <dan@codesourcery.com> * gdb.cp/member-ptr.cc (class Diamond): Add func_ptr. (func): New function. (main): Initialize diamond.func_ptr and add diamond_pfunc_ptr. * gdb.cp/member-ptr.exp: Add new tests for ptype and for pointers to members with pointer-to-function type.
2012-11-16 PR c++/13615Keith Seitz4-54/+277
* cp-namespace.c (cp_lookup_symbol_in_namespace): Add SEARCH parameter and pass it to lookup_symbol_file. (cp_lookup_symbol_imports): Tell cp_lookup_symbol_in_namespace to search base classes. (cp_lookup_symbol_namespace): Likewise. (lookup_namespace_scope): Likewise. (lookup_symbol_file): Add SEARCH parameter. If SEARCH is non-zero and no symbol is found, lookup the class and call cp_lookup_nested_symbol. (find_symbol_in_baseclass): New function. (cp_lookup_nested_symbol): Do not let cp_lookup_symbol_in_namespace search through base classes. Do that later when there is no global symbol match. PR c++/13615 * gdb.cp/baseenum.cc: New file. * gdb.cp/baseenum.exp: New file. * gdb.cp/derivation.cc (A): Add copyright. Add a typedef. (B): Use A::value_type instead of int. Change all references. (D): Use value_type instead of int. Change all references. (E): Likewise. (F); Likewise. (Z): New class. (ZZ): New class. (N, Base, Derived): New namespace and classes. (main): Add instances of Z and ZZ. Make sure all symbols from N are kept. * gdb.cp/derivation.exp: Update typedef changes in tests. Add tests for class typedefs both before and after starting the inferior. Add tests for searching for a typedef while stopped in a method.
2012-11-12 * c-typeprint.c (find_typedef_for_canonicalize,Tom Tromey3-22/+156
print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 * gdb.cp/classes.exp (test_ptype_class_objects): RemoveTom Tromey4-91/+91
"ptype" from calls to cp_test_ptype_class. (test_enums): Likewise. * gdb.cp/derivation.exp: Remove "ptype" from calls to cp_test_ptype_class. * gdb.cp/inherit.exp (test_ptype_si): Remove "ptype" from calls to cp_test_ptype_class. (test_ptype_mi, test_ptype_vi, test_ptype_mvi): Likewise. * gdb.cp/virtfunc.exp (test_ptype_of_classes): Remove "ptype" from calls to cp_test_ptype_class. * lib/cp-support.exp (cp_test_ptype_class): Supply "ptype" command here. Change "in_command" argument to "in_exp".
2012-10-15 * lib/cp-support.exp (cp_test_ptype_class): Add supportKeith Seitz1-0/+16
for class typedefs. * gdb.cp/derivation.exp: Add tests for g_instance.
2012-10-03 PR symtab/14601Doug Evans2-0/+75
* buildsym.c (buildsym_init): Reset using_directives to NULL. testsuite/ * gdb.cp/using-crash.exp: New file. * gdb.cp/using-crash.cc: New file.
2012-09-27 Fix https://bugzilla.redhat.com/show_bug.cgi?id=849357Tom Tromey2-0/+37
* cp-valprint.c (cp_print_value_fields): Use get_vptr_fieldno. gdb/testsuite * gdb.cp/derivation.exp: Add regression test. * gdb.cp/derivation.cc (class V_base, class V_inter, class V_derived): New. (vderived): New global.
2012-09-16gdb/testsuite/Jan Kratochvil1-0/+4
Fix compatibility with old GCC (~4.1). * gdb.cp/converts.cc (my_enum_var): New variable.
2012-09-12 * gdb.cp/converts.cc (main): Comment out the pointer to booleanKeith Seitz1-0/+8
conversion statement.
2012-09-11 * gdb.cp/mb-inline.exp: Do "info break" after setting multi-locationDoug Evans1-0/+5
breakpoint.
2012-09-10 PR gdb/13483Keith Seitz2-1/+38
* gdbtypes.h (BOOL_PTR_CONVERSION_BADNESS): Rename to ... (BOOL_CONVERSION_BADNESS): ... this. * gdbtypes.c (BOOL_PTR_CONVERSION_BADNESS): Likewise. (rank_one_type): Allow all boolean conversions permitted by the standard. * gdb.cp/converts.cc (A::A): Add ctor. (A::member_): Add member. (enum my_enum): New enumeration. (main): Add calls to foo1_7 with various permitted arguments. * gdb.cp/converts.exp: Add tests for boolean conversions permitted by the standard.
2012-08-22 * lib/gdb.exp (skip_unwinder_tests): New proc.Tom Tromey1-29/+1
* gdb.cp/nextoverthrow.exp: Use skip_unwinder_tests. * gdb.java/jnpe.exp: Use skip_unwinder_tests.
2012-08-17 PR c++/13356Keith Seitz2-0/+36
* gdbtypes.c (strict_type_checking): New variable. (show_strict_type_checking): New function. (rank_one_type): Return NS_POINTER_INTEGER_CONVERSION_BADNESS if strict type checking is disabled. (_initialize_gdbtypes): Add "check type" subcommand. * gdbtypes.h (NS_INTEGER_POINTER_CONVERSION_BADNESS): New struct. PR c++/13356 * gdb.base/default.exp: Update all "check type" tests. * gdb.base/help.exp: Likewise. * gdb.base/setshow.exp: Likewise. * gdb.cp/converts.cc (foo1_type_check): New function. (foo2_type_check): New function. (foo3_type_check): New function. (main): Call new functions. * converts.exp: Add tests for integer-to-pointer conversions with/without strict type-checking. PR c++/13356 * gdb.texinfo (Type and Range Checking): Remove warning. Remove spurious commas. Update text and examples for re-implementation of set/show check type. (C and C++ Type and Range Checks): Likewise. * language.h (type_mode): Remove. (type_check): Remove. (struct language_defn): Remove la_type_check. (STRICT_TYPE): Remove unused macro. (type_error): Remove. * language.c (set_type_range_case): Renamed to ... (set_range_case): ... this. Update all callers. Remove type_mode/type_check. (type_mode): Remove. (type_check): Remove. (show_type_command): Remove. (set_type_command): Remove. (language_info): Remove type checking output. (type_error): Remove unused function. (range_error): Update comment. (unknown_language_defn): Remove la_type_check. (auto_language_defn): Likewise. (local_language_defn): Likewise. (_initialize_language): Remove "check type" subcommand. * ada-lang.c (ada_language_defn): Remove la_type_check. * c-lang.c (c_language_defn): Likewise. (cplus_language_defn): Likewise. (asm_language_defn): Likewise. (minimal_language_defn): Likewise. * d-lang.c (d_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * go-lang.c (go_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * opencl-lang.c (opencl_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise.
2012-08-08 * eval.c (evaluate_subexp_standard): Fix thinko in handlingDoug Evans1-0/+43
UNOP_MEMVAL_TYPE. * expprint.c (print_subexp_standard, case OP_TYPE): New. (print_subexp_standard, case UNOP_CAST_TYPE): Don't increment pos. (print_subexp_standard, case UNOP_DYNAMIC_CAST): Ditto. (print_subexp_standard, case UNOP_REINTERPRET_CAST): Ditto. (print_subexp_standard, case UNOP_MEMVAL_TYPE): Ditto. (dump_subexp_body_standard, case UNOP_DYNAMIC_CAST): Don't increment elt. (dump_subexp_body_standard, case UNOP_REINTERPRET_CAST): Ditto. (dump_subexp_body_standard, case UNOP_CAST_TYPE): Ditto. (dump_subexp_body_standard, case UNOP_MEMVAL_TYPE): Ditto. (dump_prefix_expression): Handle OP_TYPE. testsuite/ * gdb.base/debug-expr.c: New file. * gdb.base/debug-expr.exp: New file. * gdb.base/exprs.exp: Test {type} casts. * gdb.cp/debug-expr.exp: New file.
2012-07-19 PR exp/13206:Tom Tromey2-0/+29
* ax-gdb.c (gen_expr) <OP_TYPEOF, OP_DECLTYPE>: New cases. * breakpoint.c (watchpoint_exp_is_const) <OP_TYPEOF, OP_DECLTYPE>: New cases. * c-exp.y (TYPEOF, DECLTYPE): New tokens. (type_exp): Add new productions. (ident_tokens): Add __typeof__, typeof, __typeof, __decltype, and decltype. * eval.c (evaluate_subexp_standard) <OP_TYPEOF, OP_DECLTYPE>: New case. * expprint.c (dump_subexp_body_standard) <OP_TYPEOF, OP_DECLTYPE>: New case. * parse.c (operator_length_standard) <OP_TYPEOF, OP_DECLTYPE>: New case. * std-operator.def (OP_TYPEOF, OP_DECLTYPE): New constants. * varobj.c (varobj_create): Handle OP_TYPEOF, OP_DECLTYPE. gdb/testsuite * gdb.cp/casts.exp: Add tests for typeof and decltype. * gdb.cp/casts.cc (decltype): New function. (main): Use it.
2012-07-10 * gdb.cp/abstract-origin.exp: Use standard_testfile.Tom Tromey100-1026/+315
* gdb.cp/ambiguous.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/annota2.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/annota3.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/anon-ns.exp: Use standard_testfile. * gdb.cp/anon-struct.exp: Use standard_testfile. * gdb.cp/anon-union.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/arg-reference.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/bool.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/breakpoint.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/bs15503.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/call-c.exp: Use standard_testfile, clean_restart, standard_output_file. * gdb.cp/casts.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/class2.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/classes.exp: Use standard_testfile, prepare_for_testing. (test_static_members): Update. * gdb.cp/cmpd-minsyms.exp: Use standard_testfile. * gdb.cp/converts.exp: Use standard_testfile. * gdb.cp/cp-relocate.exp: Use standard_testfile. * gdb.cp/cpcompletion.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/cpexprs.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/cplabel.exp: Use standard_testfile. * gdb.cp/cplusfuncs.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/ctti.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/derivation.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/destrprint.exp: Use standard_testfile. * gdb.cp/dispcxx.exp: Use standard_testfile. * gdb.cp/exception.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/expand-psymtabs-cxx.exp: Use standard_testfile. * gdb.cp/extern-c.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/formatted-ref.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/fpointer.exp: Use standard_testfile. * gdb.cp/gdb1355.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/gdb2384.exp: Use standard_testfile, clean_restart, standard_output_file. * gdb.cp/gdb2495.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/hang.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/infcall-dlopen.exp: Use standard_testfile, standard_output_file. * gdb.cp/inherit.exp: Use standard_testfile, prepare_for_testing. (do_tests): Update. * gdb.cp/koenig.exp: Use standard_testfile. * gdb.cp/local.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/m-data.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/m-static.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/mb-ctor.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/mb-inline.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/mb-templates.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/member-ptr.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/meth-typedefs.exp: Use standard_testfile. * gdb.cp/method.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/method2.exp: Use standard_testfile. * gdb.cp/minsym-fallback.exp: Use standard_testfile, standard_output_file. * gdb.cp/misc.exp: Use standard_testfile, prepare_for_testing. (do_tests): Update. * gdb.cp/namespace-enum.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/namespace-nested-import.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/namespace.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/nextoverthrow.exp: Use standard_testfile. * gdb.cp/no-dmgl-verbose.exp: Use standard_testfile. * gdb.cp/nsdecl.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/nsimport.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/nsnested.exp: Use standard_testfile. * gdb.cp/nsnoimports.exp: Use standard_testfile. * gdb.cp/nsrecurs.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/nsstress.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/nsusing.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/operator.exp: Use standard_testfile. * gdb.cp/oranking.exp: Use standard_testfile. * gdb.cp/overload-const.exp: Use standard_testfile. * gdb.cp/overload.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/ovldbreak.exp: Use standard_testfile. * gdb.cp/ovsrch.exp: Use standard_testfile. * gdb.cp/paren-type.exp: Use standard_testfile. * gdb.cp/pass-by-ref.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/pr-1023.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/pr-1210.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/pr-574.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/pr10687.exp: Use standard_testfile, clean_restart. * gdb.cp/pr10728.exp: Use standard_testfile, standard_output_file. * gdb.cp/pr12028.exp: Use standard_testfile. * gdb.cp/pr9067.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/pr9167.exp: Use standard_testfile. * gdb.cp/pr9631.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/printmethod.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/psmang.exp: Use standard_testfile, clean_restart. * gdb.cp/psymtab-parameter.exp: Use standard_testfile. * gdb.cp/ptype-cv-cp.exp: Use standard_testfile. * gdb.cp/re-set-overloaded.exp: Use standard_testfile, standard_output_file. * gdb.cp/readnow-language.exp: Use standard_testfile. * gdb.cp/ref-params.exp: Use standard_testfile, build_executable. (gdb_start_again): Use clean_restart. * gdb.cp/ref-types.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/rtti.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/shadow.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/smartp.exp: Use standard_testfile. * gdb.cp/static-method.exp: Use standard_testfile. * gdb.cp/static-print-quit.exp: Use standard_testfile. * gdb.cp/temargs.exp: Use standard_testfile. * gdb.cp/templates.exp: Use standard_testfile, prepare_for_testing. (do_tests): Update. * gdb.cp/try_catch.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/typedef-operator.exp: Use standard_testfile. * gdb.cp/userdef.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/virtbase.exp: Use standard_testfile, prepare_for_testing. * gdb.cp/virtfunc.exp: Use standard_testfile, prepare_for_testing. (do_tests): Update. * gdb.cp/virtfunc2.exp: Use standard_testfile, prepare_for_testing.
2012-06-21 * lib/gdb.exp (skip_altivec_tests, skip_vsx_tests)Tom Tromey38-38/+38
(build_executable): Update. (get_compiler_info): Remove 'binfile' argument. * gdb.ada/arrayidx.exp: Update. * gdb.ada/null_array.exp: Update. * gdb.arch/altivec-abi.exp: Update. * gdb.arch/altivec-regs.exp: Update. * gdb.arch/amd64-byte.exp: Update. * gdb.arch/amd64-dword.exp: Update. * gdb.arch/amd64-word.exp: Update. * gdb.arch/i386-avx.exp: Update. * gdb.arch/i386-byte.exp: Update. * gdb.arch/i386-sse.exp: Update. * gdb.arch/i386-word.exp: Update. * gdb.arch/ppc-dfp.exp: Update. * gdb.arch/ppc-fp.exp: Update. * gdb.arch/vsx-regs.exp: Update. * gdb.base/all-bin.exp: Update. * gdb.base/annota1.exp: Update. * gdb.base/async.exp: Update. * gdb.base/attach.exp: Update. * gdb.base/break-interp.exp: Update. * gdb.base/call-ar-st.exp: Update. * gdb.base/call-rt-st.exp: Update. * gdb.base/call-sc.exp: Update. * gdb.base/callfuncs.exp: Update. * gdb.base/catch-load.exp: Update. * gdb.base/completion.exp: Update. * gdb.base/complex.exp: Update. * gdb.base/condbreak.exp: Update. * gdb.base/consecutive.exp: Update. * gdb.base/constvars.exp: Update. * gdb.base/corefile.exp: Update. * gdb.base/eval-skip.exp: Update. * gdb.base/expand-psymtabs.exp: Update. * gdb.base/exprs.exp: Update. * gdb.base/fileio.exp: Update. * gdb.base/fixsection.exp: Update. * gdb.base/funcargs.exp: Update. * gdb.base/gdb11530.exp: Update. * gdb.base/gdb1555.exp: Update. * gdb.base/gnu-ifunc.exp: Update. * gdb.base/gnu_vector.exp: Update. * gdb.base/info-macros.exp: Update. * gdb.base/jit-simple.exp: Update. * gdb.base/jit-so.exp: Update. * gdb.base/jit.exp: Update. * gdb.base/langs.exp: Update. * gdb.base/list.exp: Update. * gdb.base/logical.exp: Update. * gdb.base/long_long.exp: Update. * gdb.base/longjmp.exp: Update. * gdb.base/macscp.exp: Update. * gdb.base/mips_pro.exp: Update. * gdb.base/miscexprs.exp: Update. * gdb.base/morestack.exp: Update. * gdb.base/nodebug.exp: Update. * gdb.base/opaque.exp: Update. * gdb.base/pc-fp.exp: Update. * gdb.base/pending.exp: Update. * gdb.base/permissions.exp: Update. * gdb.base/pointers.exp: Update. * gdb.base/prelink.exp: Update. * gdb.base/printcmds.exp: Update. * gdb.base/psymtab.exp: Update. * gdb.base/ptype.exp: Update. * gdb.base/relational.exp: Update. * gdb.base/scope.exp: Update. * gdb.base/setvar.exp: Update. * gdb.base/shlib-call.exp: Update. * gdb.base/shreloc.exp: Update. * gdb.base/signals.exp: Update. * gdb.base/sizeof.exp: Update. * gdb.base/so-impl-ld.exp: Update. * gdb.base/so-indr-cl.exp: Update. * gdb.base/solib-disc.exp: Update. * gdb.base/solib-display.exp: Update. * gdb.base/solib-nodir.exp: Update. * gdb.base/solib-overlap.exp: Update. * gdb.base/solib-symbol.exp: Update. * gdb.base/solib-weak.exp: Update. * gdb.base/solib.exp: Update. * gdb.base/store.exp: Update. * gdb.base/structs.exp: Update. * gdb.base/structs2.exp: Update. * gdb.base/type-opaque.exp: Update. * gdb.base/unload.exp: Update. * gdb.base/varargs.exp: Update. * gdb.base/volatile.exp: Update. * gdb.base/watch_thread_num.exp: Update. * gdb.base/watchpoint-solib.exp: Update. * gdb.base/watchpoint.exp: Update. * gdb.base/watchpoints.exp: Update. * gdb.base/whatis.exp: Update. * gdb.cell/arch.exp: Update. * gdb.cell/break.exp: Update. * gdb.cell/bt.exp: Update. * gdb.cell/core.exp: Update. * gdb.cell/data.exp: Update. * gdb.cell/ea-cache.exp: Update. * gdb.cell/f-regs.exp: Update. * gdb.cell/fork.exp: Update. * gdb.cell/gcore.exp: Update. * gdb.cell/mem-access.exp: Update. * gdb.cell/ptype.exp: Update. * gdb.cell/registers.exp: Update. * gdb.cell/sizeof.exp: Update. * gdb.cell/solib-symbol.exp: Update. * gdb.cell/solib.exp: Update. * gdb.cp/ambiguous.exp: Update. * gdb.cp/breakpoint.exp: Update. * gdb.cp/bs15503.exp: Update. * gdb.cp/casts.exp: Update. * gdb.cp/class2.exp: Update. * gdb.cp/cpexprs.exp: Update. * gdb.cp/cplusfuncs.exp: Update. * gdb.cp/ctti.exp: Update. * gdb.cp/dispcxx.exp: Update. * gdb.cp/gdb1355.exp: Update. * gdb.cp/gdb2384.exp: Update. * gdb.cp/gdb2495.exp: Update. * gdb.cp/infcall-dlopen.exp: Update. * gdb.cp/local.exp: Update. * gdb.cp/m-data.exp: Update. * gdb.cp/m-static.exp: Update. * gdb.cp/mb-ctor.exp: Update. * gdb.cp/mb-inline.exp: Update. * gdb.cp/mb-templates.exp: Update. * gdb.cp/member-ptr.exp: Update. * gdb.cp/method.exp: Update. * gdb.cp/namespace.exp: Update. * gdb.cp/nextoverthrow.exp: Update. * gdb.cp/nsdecl.exp: Update. * gdb.cp/nsrecurs.exp: Update. * gdb.cp/nsstress.exp: Update. * gdb.cp/nsusing.exp: Update. * gdb.cp/pr-1023.exp: Update. * gdb.cp/pr-1210.exp: Update. * gdb.cp/pr-574.exp: Update. * gdb.cp/pr9631.exp: Update. * gdb.cp/printmethod.exp: Update. * gdb.cp/psmang.exp: Update. * gdb.cp/re-set-overloaded.exp: Update. * gdb.cp/rtti.exp: Update. * gdb.cp/shadow.exp: Update. * gdb.cp/templates.exp: Update. * gdb.cp/try_catch.exp: Update. * gdb.dwarf2/dw2-ranges.exp: Update. * gdb.dwarf2/pr10770.exp: Update. * gdb.fortran/library-module.exp: Update. * gdb.hp/gdb.aCC/optimize.exp: Update. * gdb.hp/gdb.aCC/watch-cmd.exp: Update. * gdb.hp/gdb.base-hp/callfwmall.exp: Update. * gdb.hp/gdb.base-hp/hwwatchbus.exp: Update. * gdb.hp/gdb.base-hp/pxdb.exp: Update. * gdb.hp/gdb.base-hp/sized-enum.exp: Update. * gdb.hp/gdb.base-hp/so-thresh.exp: Update. * gdb.hp/gdb.compat/xdb1.exp: Update. * gdb.hp/gdb.compat/xdb2.exp: Update. * gdb.hp/gdb.compat/xdb3.exp: Update. * gdb.hp/gdb.defects/bs14602.exp: Update. * gdb.hp/gdb.defects/solib-d.exp: Update. * gdb.hp/gdb.objdbg/objdbg01.exp: Update. * gdb.hp/gdb.objdbg/objdbg02.exp: Update. * gdb.hp/gdb.objdbg/objdbg03.exp: Update. * gdb.hp/gdb.objdbg/objdbg04.exp: Update. * gdb.mi/gdb792.exp: Update. * gdb.mi/mi-pending.exp: Update. * gdb.mi/mi-solib.exp: Update. * gdb.mi/mi-var-cp.exp: Update. * gdb.opt/clobbered-registers-O2.exp: Update. * gdb.opt/inline-bt.exp: Update. * gdb.opt/inline-cmds.exp: Update. * gdb.opt/inline-locals.exp: Update. * gdb.python/py-events.exp: Update. * gdb.python/py-finish-breakpoint.exp: Update. * gdb.python/py-type.exp: Update. * gdb.reverse/solib-precsave.exp: Update. * gdb.reverse/solib-reverse.exp: Update. * gdb.server/solib-list.exp: Update. * gdb.stabs/weird.exp: Update. * gdb.threads/attach-into-signal.exp: Update. * gdb.threads/attach-stopped.exp: Update. * gdb.threads/tls-shared.exp: Update. * gdb.trace/change-loc.exp: Update. * gdb.trace/strace.exp: Update.
2012-06-19 * gdb.cp/m-static.cc (keepalive): New function.Tom Tromey1-0/+3
(gnu_obj_1::method): Use it.
2012-06-15 * dwarf2read.c (dw2_find_symbol_file): Unconditionally useTom Tromey1-0/+1
init_cutu_and_read_dies. testsuite * gdb.cp/namespace.exp: Add "show lang" test.
2012-06-13gdb/Jan Kratochvil2-0/+46
PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * c-exp.y (classify_inner_name): Remove caller assumptions in the function comment. Return ERROR for unresolved cases. Implement returning proper NAME. (yylex): Accept also NAME from classify_inner_name. * cp-namespace.c (cp_lookup_nested_type): Rename to ... (cp_lookup_nested_symbol): ... here. Return any found symbol, not just LOC_TYPEDEF type. * cp-support.h (cp_lookup_nested_type): Update its declaration. gdb/testsuite/ PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * gdb.cp/cpexprs.cc (class CV, CV::i, ATTRIBUTE_USED, CV_f): New. (test_function): Call CV_f. * gdb.cp/cpexprs.exp (p 'CV::m(int)', p CV::m(int)) (p 'CV::m(int) const', p CV::m(int) const, p 'CV::m(int) volatile') (p CV::m(int) volatile, p 'CV::m(int) const volatile') (p CV::m(int) const volatile, p CV_f(int), p CV_f(CV::t)) (p CV_f(CV::i)): New tests.
2012-05-21 PR c++/7173:Tom Tromey1-65/+12
* gnu-v3-abi.c (gnuv3_baseclass_offset): Return early for Java types. * value.h (value_cast_pointers): Update. * valops.c (value_cast_pointers): Add 'subclass_check' argument. (value_cast): Update. (update_search_result): New function. (do_search_struct_field): New, from search_struct_field. Check for ambiguous results. (search_struct_field): Rewrite. * infcall.c (value_arg_coerce): Update. * eval.c (evaluate_subexp_standard) <STRUCTOP_MEMBER>: Use value_cast_pointers. * ada-lang.c (ada_convert_actual): Update. testsuite * gdb.cp/inherit.exp (test_print_mi_members): Expect errors. Remove kfails. (test_print_mi_member_types): Likewise.
2012-05-18 PR exp/13907:Tom Tromey3-6/+6
* valprint.h (struct value_print_options) <symbol_print>: New field. * valprint.c (user_print_options): Add default for symbol_print. (show_symbol_print): New function. (generic_val_print): Respect symbol_print. (_initialize_valprint): Add "print symbol" setting. * f-valprint.c (f_val_print): Respect symbol_print. * c-valprint.c (c_val_print): Respect symbol_print. * NEWS: Update. * printcmd.c (print_address_symbolic): Return int. Ignore some zero-size symbols. (print_address_demangle): Return int. * defs.h: (print_address_symbolic): Return int. * value.h (print_address_demangle): Return int. doc * gdb.texinfo (Print Settings): Document 'set print symbol'. testsuite * gdb.mi/mi-var-cmd.exp: Update. * gdb.objc/basicclass.exp (do_objc_tests): Update. * gdb.cp/virtbase.exp: Update. * gdb.cp/classes.exp (test_static_members): Update. * gdb.cp/casts.exp: Update. * gdb.base/pointers.exp: Update. * gdb.base/funcargs.exp (pointer_args): Update. (structs_by_reference): Update. * gdb.base/find.exp: Update. * gdb.base/call-strs.exp: Send "set print symbol off". * gdb.base/call-ar-st.exp: Update. * gdb.ada/fun_addr.exp: Update. * gdb.base/printcmds.exp (test_print_symbol): New proc. Call it. (test_print_repeats_10, test_print_strings) (test_print_char_arrays): Update.
2012-05-18 * printcmd.c (print_address_demangle): Remove special case for 0.Tom Tromey2-5/+8
testsuite * gdb.mi/mi2-var-display.exp: Update. * gdb.mi/mi-var-display.exp: Update. * gdb.mi/mi-var-child.exp: Update. * gdb.cp/expand-psymtabs-cxx.exp: Update. * gdb.cp/cp-relocate.exp (get_func_address): Update.
2012-05-17 * Makefile.in (clean): Remove Fission .dwo and .dwp files.Doug Evans1-0/+1
* gdb.ada/Makefile.in (clean): Ditto. * gdb.arch/Makefile.in (clean): Ditto. * gdb.asm/Makefile.in (clean): Ditto. * gdb.base/Makefile.in (clean): Ditto. * gdb.cell/Makefile.in (clean): Ditto. * gdb.cp/Makefile.in (clean): Ditto. * gdb.disasm/Makefile.in (clean): Ditto. * gdb.dwarf2/Makefile.in (clean): Ditto. * gdb.fortran/Makefile.in (clean): Ditto. * gdb.go/Makefile.in (clean): Ditto. * gdb.hp/Makefile.in (clean): Ditto. * gdb.hp/gdb.aCC/Makefile.in (clean): Ditto. * gdb.hp/gdb.base-hp/Makefile.in (clean): Ditto. * gdb.hp/gdb.compat/Makefile.in (clean): Ditto. * gdb.hp/gdb.defects/Makefile.in (clean): Ditto. * gdb.hp/gdb.objdbg/Makefile.in (clean): Ditto. * gdb.java/Makefile.in (clean): Ditto. * gdb.linespec/Makefile.in (clean): Ditto. * gdb.mi/Makefile.in (clean): Ditto. * gdb.modula2/Makefile.in (clean): Ditto. * gdb.multi/Makefile.in (clean): Ditto. * gdb.objc/Makefile.in (clean): Ditto. * gdb.opencl/Makefile.in (clean): Ditto. * gdb.opt/Makefile.in (clean): Ditto. * gdb.pascal/Makefile.in (clean): Ditto. * gdb.python/Makefile.in (clean): Ditto. * gdb.reverse/Makefile.in (clean): Ditto. * gdb.server/Makefile.in (clean): Ditto. * gdb.stabs/Makefile.in (clean): Ditto. * gdb.threads/Makefile.in (clean): Ditto. * gdb.trace/Makefile.in (clean): Ditto. * gdb.xml/Makefile.in (clean): Ditto.
2012-04-27gdb/doc/ChangeLog:Sergio Durigan Junior1-0/+11
2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com> Tom Tromey <tromey@redhat.com> * gdb.texinfo (Static Probe Points): New entry, explaining SystemTap and generic static probe support on GDB. gdb/testsuite/ChangeLog: 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com> Tom Tromey <tromey@redhat.com> * gdb.base/default.exp: Add `$_probe_arg*' convenience variables. * gdb.base/stap-probe.c: New file. * gdb.base/stap-probe.exp: New file. * gdb.trace/stap-trace.c: New file. * gdb.trace/stap-trace.exp: New file. * gdb.cp/nextoverthrow.exp: Add check for SystemTap probe in libgcc's unwinder.
2012-04-05linespec rewrite:Keith Seitz4-18/+132
* linespec.c (decode_compound): Remove. (enum offset_relative_sign): New enum. (struct line_offset): New struct. (struct linespec): New struct. (struct linespec_state): Move file_symtabs, user_filename, and user_function into struct linespec. Make result an anonymous struct holding vectors of symbolp and minsym_and_objfile_d. Add language member. (enum ls_token_type): New enum. (linespec_keywords): New array. (struct ls_token): New struct. (struct ls_parser): New struct. (linespec_lexer_lex_number): New function. (linespec_lexer_lex_keyword): New function. (is_ada_operator): New function. (skip_quote_char): New function. (copy_token_string): New function. (is_closing_quote_enclosed): New function. (find_parameter_list_end): New function. (linespec_lexer_lex_string): New function. (linespec_lexer_lex_one): New function. (linespec_lexer_consume_token): New function. (linespec_lexer_peek_token): New function. (cplusplus_error): Remove unused function. (find_methods): Update comment. (find_toplevel_char): Return const. (is_objc_method_format): Remove unused function. (find_toplevel_string): New function. (is_linespec_boundary): Remove. (symbol_not_found_error): New function. (find_method_overload_end): Remove function. (unexpected_linespec_error): New function. (keep_name_info): Remove. (linespec_parse_line_offset): New function. (linespec_parse_basic): New function. (canonicalize_linespec): New function. (decode_line_internal): Remove. (create_sals_line_offset): New function adapted from decode_all_digits. (convert_linespec_to_sals): New function. (parse_linespec): New function. (linespec_parser_new): New function. (linespec_state_destructor): Change parameter type to struct linespec_state *. Add language parameter. Remove freeing of moved members. (linespec_parser_delete): New function. (decode_line_full): Use parse_linespec and linespec_parser_new. (decode_line_1): Likewise. (decode_indirect): Rename to ... (linespec_expression_to_pc): ... this and rewrite to simply find CORE_ADDR, storing this result for later conversion to SALs. (locate_first_half): Remove. (deocde_objc): Add parameter LS. Initialize new struct collect_info members. Handle minimal symbols, too. (decode_compound): Delete. (lookup_prefix_sym): Rewrite. (compare_msymbols): New function. (find_method): Rewrite. Do not call cplusplus_error. (symtabs_from_filename): Rewrite. (collect_function_symbols): Delete. (find_function_symbols): Rewrite without ARGPTR-style processing. (decode_all_digits): Delete. (Rewritten as create_sals_line_offset.) (decode_dollar): Adapted and renamed to ... (linespec_parse_variable): ... this. (find_linespec_symbols): New function. (decode_label): Adapted and renamed to ... (find_label_symbols): ... this. (decode_digits_list_mode): Add and use LS argument. (decode_digits_ordinary): Likewise. (collect_symbols): Do not collect SALs, just symbols and msymbols. If in list mode, allow any symbol class. Otherwise, only permit LOC_BLOCK symbols. (minsym_found): Update comments. (search_minsyms_for_name): Do not convert the matching symbol into a SAL. Simply push the symbol and objfile into the result vector. (decode_variable): Delete. Contents adapted into find_linespec_symbols. * cp-support.c (SKIP_SPACE): Remove. (operator_tokens): Remove unused global. (cp_validate_operator): Remove. * cp-support.h (cp_validate_operator): Remove declaration. * gdb.base/advance.exp: Update error message for "advance malformed" test. * gdb.base/break.exp: Likewise for "breakpoint with trailing garbage" test. * gdb.base/hbreak2.exp: Likewise for "hardware breakpoint with trailing garbage" test. * gdb.base/jump.exp: Likewise for "jump with trailing argument junk" test. * gdb.base/sepdebug.exp: Likewise for "breakpoint with trailng garbage" test. * gdb.base/until.exp: Likewise for "malformed until" test. * gdb.cp/ovldbreak.exp: Create the breakpoint table for "breakpoint info (after setting on all)". * gdb.cp/userdef.exp: Remove quoting for "break A2::operator+" tests. * gdb.cp/cplabel.cc: New file. * gdb.cp/cplabel.exp: New test. * gdb.linespec/ls-errs.c: New file. * gdb.linespec/ls-errs.exp: New test.
2012-03-28 * gdb.cp/namespace.exp: Add breakpoint tests for functionsKeith Seitz1-0/+10
starting with the global namespace.
2012-03-15 * cp-valprint.c (cp_print_value_fields): UseTom Tromey6-7/+8
print_function_pointer_address for vtable slot. gdb/testsuite * gdb.cp/virtfunc2.exp: Update expected output. * gdb.cp/pr9631.exp: Update expected output. * gdb.cp/member-ptr.exp: Update expected output. * gdb.cp/inherit.exp (test_print_mvi_classes): Update expected output. * gdb.cp/casts.exp: Update expected output.
2012-03-15 * gnu-v3-abi.c (struct value_and_voffset): New.Tom Tromey2-0/+50
(hash_value_and_voffset, eq_value_and_voffset) (compare_value_and_voffset, compute_vtable_size) (print_one_vtable, gnuv3_print_vtable): New functions. (init_gnuv3_ops): Initialize 'print_vtable' field. * cp-support.c (info_vtbl_command): New function. (_initialize_cp_support): Add "info vtbl". * cp-abi.h (cplus_print_vtable): Declare. (struct cp_abi_ops) <print_vtable>: New field. * cp-abi.c (cplus_print_vtable): New function. * NEWS: Update. gdb/testsuite * gdb.cp/virtfunc.exp (make_one_vtable_result): New proc. (test_info_vtbl): Likewise. (do_tests): Call test_info_vtbl. * gdb.cp/virtfunc.cc (va): New global. gdb/doc * gdb.texinfo (Debugging C Plus Plus): Document "info vtbl".
2012-03-082012-03-08 Luis Machado <lgustavo@codesourcery.com>Luis Machado1-24/+13
Revert: 2012-03-03 Jan Kratochvil <jan.kratochvil@redhat.com> Implement testsuite workaround for PR breakpoints/13781. * gdb.cp/mb-templates.exp: New loop with variable $workaround. (set breakpoint condition-evaluation host): New conditional command.
2012-03-03gdb/Jan Kratochvil1-13/+24
* breakpoint.c (set_condition_evaluation_mode): Set CONDITION_EVALUATION_MODE unconditionally. gdb/testsuite/ Implement testsuite workaround for PR breakpoints/13781. * gdb.cp/mb-templates.exp: New loop with variable $workaround. (set breakpoint condition-evaluation host): New conditional command.
2012-03-03gdb/testsuite/Jan Kratochvil1-21/+16
Code cleanup. * gdb.cp/mb-templates.exp: New variables executable. Use it for binfile. use clean_restart. Replace gdb_expect by gdb_test_multiple. Replace GDB restart by kill and delete_breakpoints. Replace breakpoint number 1 by $bpnum. Four times.
2012-03-01 * gdb.cp/method2.exp: Output of overload menu is nowKeith Seitz3-157/+217
alphabetized. Update tests for "break A::method". * gdb.cp/ovldbreak.exp: Use gdb_get_line_number instead of hard-coding them. Overload menu is alphabetized: rewrite to accommodate. Unset variables LINE and TYPES which are used in other tests. Compute the output of "info break". Update the breakpoint table after all breakpoints are deleted. (continue_to_bp_overloaded): Rename ACTUALS to ARGUMENT and compute ACTUALS and the method body based on parameters. Update expected output accordingly. * gdb.cp/ovldbreak.cc (foo::overload1arg): Reformat and add unique comments to allow the use of gdb_get_line_number. * gdb.cp/method2.exp: Use prepare_for_testing and cleanup some Tcl syntax. * gdb.cp/ovldbreak.exp: Likewise.
2012-02-27 * gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_mainMaciej W. Rozycki1-1/+1
failure return path.
2012-02-02 PR gdb/9307:Tom Tromey2-0/+80
* symtab.c (lookup_language_this): Set block_found. gdb/testsuite * gdb.cp/dispcxx.exp: New file. * gdb.cp/dispcxx.cc: New file.
2012-01-162012-01-16 Pedro Alves <palves@redhat.com>Pedro Alves60-240/+0
Remove all calls to strace.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker176-228/+191
gdb/ChangeLog: Copyright year update in most files of the GDB Project.