aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2012-12-25gdb/Jan Kratochvil2-0/+45
* ada-lang.c (is_known_support_routine): New variable fullname. Use access call to verify the symtab_to_fullname result. * breakpoint.c (print_breakpoint_location, update_static_tracepoint): Remove NULL check of symtab_to_fullname result. * cli/cli-cmds.c (edit_command): Likewise. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file) (mi_cmd_file_list_exec_source_files): Likewise. * python/py-symtab.c (stpy_fullname): Likewise. * source.c (symtab_to_fullname): Update function comment. Rename variable r to fd, move it to inner block. Always provide non-NULL result. (print_source_lines_base): Remove NULL check of symtab_to_fullname result. * stack.c (print_frame): Likewise. * symtab.c (iterate_over_some_symtabs, find_line_symtab, sources_info): Likewise. * tracepoint.c (print_one_static_tracepoint_marker): Likewise. gdb/doc/ * gdb.texinfo (GDB/MI Data Manipulation) (fullname): Make it always present. (GDB/MI File Commands) (-file-list-exec-source-files): Make the fullname output always present. gdb/testsuite/ * gdb.mi/mi-fullname-deleted.exp: New file.
2012-12-24gdb/Jan Kratochvil5-47/+139
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call. * infrun.c (handle_inferior_event): Rename the called function to function_name_is_marked_for_skip, pass it TMP_SAL. * skip.c (struct skiplist_entry): Update function_name comment. Remove fields pc, gdbarch and pending. (skip_function_pc): Rename this forward declaration to ... (skip_function): ... here. (skip_file_command): Remove variable pending and its use, remove initialization of E fields pending and gdbarch. Do not use SYMTAB filename, use the specified one. (skip_function_command): Remove variable func_pc, do not set it. Update the caller of skip_function. Replace decode_line_1 call by a lookup_symbol call. Remove variables orig_arg, decode_exception and sals. Update the caller of skip_function. (skip_info): Remove variable address_width and its use. Do not print address (PC). Renumber column 5 to 4. (skip_function_pc): Rename to ... (skip_function): ... here and remove its parameters pc, arch and pending. Update the function comment and no longer use those parameters. (function_pc_is_marked_for_skip): Rename to ... (function_name_is_marked_for_skip): ... here, update function comment just to a skip.h reference, replace pc parameter by function_name and function_sal. No longer use E field pending and pc. Remove variables searched_for_sal, sal and filename. Call compare_filenames_for_search instead of just strcmp. (skip_re_set): Remove the function. * skip.h (struct symtab_and_line): New declaration. (function_pc_is_marked_for_skip): Rename to ... (function_name_is_marked_for_skip): ... here, replace pc parameter by function_name and function_sal, update the function comment. gdb/testsuite/ * gdb.base/skip-solib.exp (info skip with pending file): Update the expected output. (info skip with pending file): Remove. (ignoring function in solib, info skip for function multiply): Update the expected output. * gdb.base/skip.ex (skip (main), skip function baz, info skip) (info skip (delete 1), info skip after disabling all) (info skip after enabling all, info skip after disabling 4 2-3) (info skip after enabling 2-3, info skip 2-3) (info skip after deleting 2 3): Update the expected output. * gdb.linespec/base/two/thefile.cc (n): New variable v, split the statement to its initialization and return. * gdb.linespec/skip-two.exp: New file.
2012-12-20 * gdb.base/maint.exp: Handle testing with .gdb_index.Doug Evans2-29/+45
2012-12-19Change copyright from Cavium to FSF.Joel Brobecker2-1/+6
gdb/testsuite/ChangeLog: * gdb.arch/mips-octeon-bbit.exp: Fix copyright header from Cavium to FSF.
2012-12-19update copyright notices in various GDB files.Joel Brobecker9-29/+26
Update some files in GDB that were accidently left with a GPL v2 copyright header. Update some files where the copyright notice still provides the old contact info, using the approach for providing the FSF's contact info. gdb/ChangeLog: * acinclude.m4: Update contact info in copyright notice. gdb/doc/ChangeLog: * refcard.tex: Update copyright notice to GPL v3 or later. Update contact info. gdb/testsuite/ChangeLog: * dg-extract-results.sh: Update contact info in copyright notice. * gdb.arch/mips-octeon-bbit.exp: Update copyright notice to GPL v3 or later. Update contact info. * gdb.fortran/logical.f90, gdb.threads/watchpoint-fork-child.c, gdb.threads/watchpoint-fork-mt.c, gdb.threads/watchpoint-fork-parent.c, gdb.threads/watchpoint-fork-st.c, gdb.threads/watchpoint-fork.h: Likewise.
2012-12-17Enable accidentally commented out code.Doug Evans1-3/+3
2012-12-152012-12-15 Yao Qi <yao@codesourcery.com>Yao Qi10-40/+121
* breakpoint.c (print_one_breakpoint_location): Display the state of 'installed' of each non-pending location of a tracepoint in both CLI and MI. (download_tracepoint_locations): Notify 'breakpoint-modified' observer if any tracepoint location is downloaded. * tracepoint.c (start_tracing): Likewise. (merge_uploaded_tracepoints): Record all modified tracepoints and notify 'breakpoint-modified' observer for them. * NEWS: Mention the change for CLI and MI. gdb/doc: 2012-12-15 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Listing Tracepoints): New item and example about 'installed on target' output. Add more in the example about 'installed on target'. (GDB/MI Breakpoint Commands): Doc about 'installed field. gdb/testsuite: 2012-12-15 Yao Qi <yao@codesourcery.com> * gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check 'installed' field in '=breakpoint-modified'. (test_reconnect): Check 'installed' field in '=breakpoint-modified' and '=breakpoint-created'. * gdb.trace/actions.exp: Update test for 'installed' field. * gdb.trace/change-loc.exp (tracepoint_change_loc_1): (tracepoint_change_loc_2): Likewise. Check 'info tracepoint' display nothing else. * gdb.trace/deltrace.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/mi-traceframe-changed.exp (test_tfind_remote): Likewise. * gdb.trace/passcount.exp: Likewise. * gdb.trace/tracecmd.exp: Likewise. * gdb.trace/while-stepping.exp: Likewise.
2012-12-14 PR c++/8888:Tom Tromey3-0/+121
* 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 Tromey2-0/+20
* 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-12-14 * gdb.dwarf2/implptr-optimized-out.S: DIE offset forDoug Evans2-1/+6
DW_OP_GNU_implicit_pointer is section-relative.
2012-12-14gdbTom Tromey2-0/+18
* NEWS: Mention "info proc" and core files. * corelow.c (core_info_proc): New function. (init_core_ops): Set to_info_proc. * gdbarch.c, gdbarch.h: Rebuild. * gdbarch.sh (core_info_proc): New method. * infcmd.c (info_proc_cmd_1): Invoke target_info_proc first. * linux-tdep.c (linux_core_info_proc_mappings) (linux_core_info_proc): New functions. (linux_find_memory_region_ftype): New typedef. (linux_find_memory_regions_full): New function, from linux_find_memory_regions. (struct linux_find_memory_regions_data): New. (linux_find_memory_regions_thunk): New function. (linux_find_memory_regions): Rewrite. (struct linux_make_mappings_data): New. (linux_make_mappings_callback) (linux_make_mappings_corefile_notes): New functions. (linux_make_corefile_notes): Call linux_make_mappings_corefile_notes. (linux_init_abi): Call set_gdbarch_core_info_proc. * target.c (target_info_proc): Return 'int'. * target.h (target_info_proc): Update. gdb/doc * gdb.texinfo (SVR4 Process Information): Mention core files. gdb/testsuite * gdb.base/info-proc.exp: Add core file tests. bfd * elf.c (elfcore_grok_note) <NT_FILE>: New case.
2012-12-14Fix whitespace.Pedro Alves1-57/+63
2012-12-142012-12-14 Yufeng Zhang <yufeng.zhang@arm.com>Pedro Alves2-0/+9
* gdb.base/kill-after-signal.exp: Disable if gdb,nosignals.
2012-12-13 * gdb.multi/multi-arch-exec.exp: Skip for i*86-linux.Doug Evans3-0/+17
* gdb.multi/multi-arch.exp: Ditto.
2012-12-12MI: tests for -catch-load/-catch-unloadMircea Gherzan4-0/+157
Added basic MI tests for the -catch-load and -catch-unload MI commands. 2012-11-19 Keven Boell <keven.boell@intel.com> gdb/testsuite: * gdb.mi/mi-catch-load-so.c: New. Clone of the catch load test library source file. * gdb.mi/mi-catch-load.c: New. Clone of the catch load test source file. * gdb.mi/mi-catch-load.exp: New. Test file for basic MI -catch-load and -catch-unload tests.
2012-12-11 * gdb.python/py-prettyprint.py (_iterator): Remove exception_flagPaul Koning4-21/+27
exception. (_iterator_except): New function. (ArrayPrinter): Use _iterator function instead of local _iterator class for Python 3 compatibility. (NoStringContainerPrinter): Use _iterator_except instead of _iterator. * gdb.python/py-typeprint.exp: Use exec(open(...).read()) instead of execfile for Python 3 compatibility. * gdb.python/python.exp: Handle Python 2.4 exception traceback format in error_prompt test.
2012-12-102012-12-10 Paul Koning <paul_koning@dell.com>Paul Koning37-602/+684
* gdb.base/charset.exp: Change print syntax for Python 3 compatibility. * gdb.python/py-block.exp: Ditto. * gdb.python/py-breakpoint.exp: Ditto. * gdb.python/py-cmd.exp: Ditto. * gdb.python/py-events.py: Ditto. * gdb.python/py-finish-breakpoint.py: Ditto. * gdb.python/py-finish-breakpoint2.exp: Ditto. * gdb.python/py-finish-breakpoint2.py: Ditto. * gdb.python/py-frame-inline.exp: Ditto. * gdb.python/py-frame.exp: Ditto. * gdb.python/py-infthread.exp: Ditto. * gdb.python/py-objfile.exp: Ditto. * gdb.python/py-parameter.exp: Ditto. * gdb.python/py-progspace.exp: Ditto. * gdb.python/py-prompt.exp: Ditto. * gdb.python/py-symbol.exp: Ditto. * gdb.python/py-symtab.exp: Ditto. * gdb.python/py-template.exp: Ditto. * gdb.python/py-value-cc.exp: Ditto. * gdb.python/python.exp: Ditto. * gdb.python/source2.py: Ditto. * gdb.python/lib-types.exp: Change print syntax for Python 3 compatibility. Use sorted() function rather than sort() method. Accept either int or long values for enum values. * gdb.python/py-events.exp: Use exec(open(...).read()) instead of execfile for Python 3 compatibility. * gdb.python/py-evsignal.exp: Ditto. * gdb.python/py-evthreads.exp: Ditto. * gdb.python/py-mi.exp: Ditto. * gdb.python/py-pp-maint.exp: Ditto. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-finish-breakpoint.exp: Change print syntax for Python 3 compatibility. Skip tests for Python 2.4. * gdb.python/py-inferior.exp: Change print syntax for Python 3 compatibility. Use byte string rather than character string in memory write test if Python 3. * gdb.python/py-pp-maint.py: Change class declarations to "new class" syntax. * gdb.python/py-prettyprint.py: Change iterator class to generator function for Python 3 compatibility. Make all classes "new style". Fix indentation issue and stray semicolon. * gdb.python/py-shared.expChange print syntax for Python 3 compatibility. Define "long" if Python 3. * gdb.python/py-type.exp: Change print syntax for Python 3 compatibility. Accept either int or long values for enum values. * gdb.python/py-value.exp: Change print syntax for Python 3 compatibility. Skip "long" and "unicode" tests if Python 3. Accept either "type" or "class" in type checks. * lib/gdb.exp (gdb_py_is_py3k): New flag set if Python 3. (gdb_py_is_py24): New flag set if Python 2.4 or 2.5.
2012-12-10 * dwarf2read.c (dwarf2_fetch_die_loc_sect_off): New function.Tom Tromey3-22/+62
(dwarf2_fetch_die_loc_cu_off): Rename from dwarf2_fetch_die_location_block. Rewrite to use dwarf2_fetch_die_loc_sect_off. * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Declare. (dwarf2_fetch_die_loc_cu_off): Rename. * dwarf2loc.c (indirect_pieced_value): Use dwarf2_fetch_die_loc_sect_off. * dwarf2expr.h (struct dwarf_expr_context) <len, data>: Update comment. (struct dwarf_expr_piece) <v.ptr.die>: Now a sect_offset. * dwarf2expr.c (add_piece): Update. (execute_stack_op) <DW_OP_GNU_implicit_pointer>: Update comment. testsuite * gdb.dwarf2/implptr-64bit.exp: Run tests with two CUs as well. (test): Add "two_cu" argument. * gdb.dwarf2/implptr-64bit.S: Move subprogram later; use ref_addr for types; allow two CUs.
2012-12-09gdb/Jan Kratochvil3-0/+277
* dwarf2read.c (struct dwarf2_cu): New field producer_is_gcc_lt_4_3. Update the comment for checked_producer. (check_producer): New forward declaration. (producer_is_gcc_lt_4_3): New function. (find_file_and_directory): Simulate *COMP_DIR only for gcc < 4.3. (check_producer): Initialize also PRODUCER_IS_GCC_LT_4_3. gdb/testsuite/ * gdb.dwarf2/dw2-compdir-oldgcc.S: New file. * gdb.dwarf2/dw2-compdir-oldgcc.exp: New file.
2012-12-08gdb/testsuiteYao Qi2-2/+41
2012-12-08 Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> * gdb.trace/mi-tracepoint-changed.exp (test_reconnect): Test '=breakpoint-created' when GDB merges the tracepoints of both sides.
2012-12-07 * ada-lang.c (ada_make_symbol_completion_list): Add 'code'Tom Tromey3-0/+31
argument, assertion. * c-exp.y (typebase): Add completion productions. * completer.c (expression_completer): Handle tag completion. * expression.h (parse_expression_for_completion): Add argument. * f-lang.c (f_make_symbol_completion_list): Add 'code' argument. * language.h (struct language_defn) <la_make_symbol_completion_list>: Add 'code' argument. * parse.c (expout_tag_completion_type, expout_completion_name): New globals. (mark_struct_expression): Add assertion. (mark_completion_tag): New function. (parse_exp_in_context): Initialize new globals. (parse_expression_for_completion): Add 'code' argument. Handle tag completion. * parser-defs.h (mark_completion_tag): Declare. * symtab.c (default_make_symbol_completion_list_break_on): Add 'code' argument. Update. (default_make_symbol_completion_list): Add 'code' argument. (make_symbol_completion_list): Update. (make_symbol_completion_type): New function. * symtab.h (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list): Update. (make_symbol_completion_type): Declare. testsuite * gdb.base/break1.c (enum some_enum, union some_union): New. (some_enum_global, some_union_global, some_value): New globals. * gdb.base/completion.exp: Add tag completion tests.
2012-12-07 * typeprint.c (_initialize_typeprint): Set completerTom Tromey2-0/+13
for "whatis" and "ptype". testsuite * gdb.base/completion.exp: Add tests for ptype and whatis completion.
2012-12-07Fix gdb.base/stale-infcall.exp's copyright line.Joel Brobecker2-1/+5
gdb/testsuite/ChangeLog: * gdb.base/stale-infcall.exp: Fix copyright line.
2012-12-07gdb.ada/lang_switch: Allow msg parameter to be a reference.Joel Brobecker2-3/+6
gdb/testsuite/ChangeLog: * gdb.ada/lang_switch.exp: The "msg" parameter may be a reference.
2012-12-062012-12-06 Pedro Alves <palves@redhat.com>Tom Tromey2-0/+9
Tom Tromey <tromey@redhat.com> * valops.c (value_cast): Move TYPE_CODE_VOID case earlier. testsuite * gdb.base/exprs.exp: Add tests for cast to void.
2012-12-062012-12-06 Jens Elmenthaler <jens.elmenthaler@advantest.com>Tom Tromey4-3/+83
PR mi/14741: * mi/mi-cmd-var.c (varobj_update_one): Take value of attribute "dynamic" and "displayhint" from printed child, not the root variable. * gdb.python/py-mi.exp: Correct expected results for attribute "dynamic" returned by -var-update. Add test case for correct handling of "diplayhint" for children of dynamic varobjs. * gdb.python/py-prettyprint.c (set_itme): New function. (bug_14741) New function. (main) Add call to bug_14741(). * gdb.python/py-prettyprint.py (class ArrayPrinter): New class.
2012-12-05 * gdb.base/gnu-debugdata.exp: Also include "D" symbols inUlrich Weigand2-1/+8
${binfile}.funcsyms list.
2012-12-04gdb/testsuiteYao Qi2-1/+6
2012-12-04 Yao Qi <yao@codesourcery.com> PR gdb/13443 * gdb.trace/actions.exp: Make test messages unique.
2012-11-29 * gdb.base/gnu-debugdata.exp (run, pipeline): Don't use lassign.Tom Tromey2-2/+11
2012-11-29ChangeLog:Ulrich Weigand5-296/+303
* opencl-lang.c (opencl_print_type): New function. (opencl_language_arch_info): Install it. testsuite/ChangeLog: * gdb.opencl/convs_casts.exp: Always expect standard vector type names. * gdb.opencl/datatypes.exp: Likewise. * gdb.opencl/operators.exp: Likewise. * gdb.opencl/vec_comps.exp: Likewise.
2012-11-29New testcase for interface type printing.Jerome Guitton5-0/+153
gdb/testsuite/ChangeLog: * gdb.ada/iwide: New testcase.
2012-11-29Full view of interface-wide typesJerome Guitton2-1/+6
For displaying the full view of a class-wide object, GDB relies on the assumption that this view will have the same address as the address of the object. In the case of simple inheritance, this assumption is correct; the proper type is deduced by decoding the tag of the object and converting the result to this full-view type. Consider for example an abstract class Shape, a child Circle which implements an interface Drawable, and the corresponding following objects: My_Circle : Circle := ((1, 2), 3); My_Shape : Shape'Class := Shape'Class (My_Circle); My_Drawable : Drawable'Class := Drawable'Class (My_Circle); To display My_Shape, the debugger first extracts the tag (an internal field, usually the first one of the record): (gdb) p my_shape'address $2 = (system.address) 0x8063e28 (gdb) x/x my_shape'address 0x8063e28 <classes__my_shape>: 0x08059ec4 Then the type specific data and the expanded name of the tag is read from there: (gdb) p my_shape'tag $3 = (access ada.tags.dispatch_table) 0x8059ec4 (classes.circle) To get the full view, the debugger converts to the corresponding type: (gdb) p {classes.circle}0x8063e28 $4 = (center => (x => 1, y => 2), radius => 3) Now, in the case of multiple inheritance, the assumption does not hold anymore. The address that we have usually points to some place lower. The offset to the original address is saved in the field Offset_To_Top of the metadata that are above the tag, at address obj'tag - 8. In the case of my_shape, this offset is 0: (gdb) x/x my_shape'tag - 8 0x8059ebc <classes__circleT+12>: 0x00000000 ...but in the case of an interface-wide object, it is not null: (gdb) x/x my_drawable'tag - 8 0x8063b28 <classes__classes__circle_classes__drawable1T56s+12>: 0x00000004 (gdb) p {classes.circle}(my_drawable'address - 4) $7 = (center => (x => 1, y => 2), radius => 3) The following change handles this relocation in the most common cases. Remaining cases that are still to be investigated are signaled by comments. gdb/ChangeLog: * ada-lang.h (ada_tag_value_at_base_address): New function declaration. * ada-lang.c (is_ada95_tag, ada_tag_value_at_base_address): New functions. (ada_to_fixed_type_1, ada_evaluate_subexp): Let ada_tag_base_address relocate the class-wide value if need be. (ada_value_struct_elt, ada_value_ind, ada_coerce_ref): Let ada_tag_value_at_base_address relocate the class-wide access/ref before dereferencing it. * ada-valprint.c (ada_val_print_1): Relocate to base address before displaying the content of an interface-wide ref. gdb/testsuite/ChangeLog: * gdb.ada/ptype_tagged_param.exp: Adjust expected output in ptype test.
2012-11-29Update gdb.ada/variant_record_packed_arrayJerome Guitton2-0/+12
gdb/testsuite/ChangeLog: * gdb.ada/variant_record_packed_array.exp: Test expressions of the form {VARIANT_TYPE}ADDRESS.
2012-11-27gdb/Yao Qi3-0/+51
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-262012-11-26 Alexander Larsson <alexl@redhat.com>Tom Tromey4-0/+204
Jan Kratochvil <jan.kratochvil@redhat.com> Tom Tromey <tromey@redhat.com> * NEWS: Mention mini debuginfo feature. * minidebug.c: New file. * configure.ac: Check for lzma. * configure, config.in: Rebuild. * Makefile.in (LIBLZMA): New variable. (CLIBS): Include LIBLZMA. (SFILES): Mention minidebug.c. (COMMON_OBS): Mention minidebug.o. * symfile.c (read_symbols): New function. (syms_from_objfile, reread_symbols): Call it. * symfile.h (find_separate_debug_file_in_section): Declare. doc * gdb.texinfo (MiniDebugInfo): New node. (GDB Files): Update. testsuite * gdb.base/gnu-debugdata.exp: New file. * gdb.base/gnu-debugdata.c: New file. * lib/gdb.exp (gdb_file_cmd): Handle LZMA warning. (gdb_unload): Return 0 on success.
2012-11-26gdb/testsuite/Jan Kratochvil2-3/+49
* gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6.
2012-11-26Do not crash when calling GDB with empty executable name.Joel Brobecker2-0/+30
% gdb -q '' ... or ... % gdb -q (gdb) file '' ... both cause GDB to crash with an invalid free. This is because exec_file_attach is attempting to free a string that has not been allocated. The string is only allocated if openp is successful. But in the case of this obviously invalid filename, openp fails, and leaves scratch_pathname uninitialized, thus causing the xfree to fail. The fix is to enable the associated cleanup after we have verified that openp was successful. gdb/ChangeLog (By Keith Seitz <keiths@redhat.com>): * exec.c (exec_file_attach): Move cleanup after verifying that memory has in fact been allocated. gdb/testsuite/ChangeLog: * gdb.base/empty_exe.exp: New testcase.
2012-11-20gdb: include help aliases in help command completionMike Frysinger2-0/+17
There are a bunch of aliases that get used with help, but the current command completion logic does not include those when doing completions. Since the framework is already mostly in place, extend complete_on_cmdlist slightly to pass down the ignore_help_classes flag like is done with the existing lookup command logic. Now you can do: (gdb) help use<tab> and get back: (gdb) help user-defined Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-20gdb/testsuite/Yao Qi2-7/+12
2012-11-20 Yao Qi <yao@codesourcery.com> * gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed): Don't test 'maint set show-debug-regs'. Use command 'set remotecache' instead of 'set circular-trace-buffer'.
2012-11-16 PR c++/13615Keith Seitz5-54/+299
* 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-142012-11-14 Luis Machado <lgustavo@codesourcery.com>Luis Machado3-0/+81
gdb/ * value.c (value_actual_type): Check for TYPE_CODE_STRUCT target types. gdb/testsuite/ * gdb.mi/mi-var-create-rtti.c: New file. * gdb.mi/mi-var-create-rtti.exp: New file.
2012-11-142012-11-14 Luis Machado <lgustavo@codesourcery.com>Luis Machado2-0/+9
* gdb.base/structs3.exp: Run to main before doing any tests.
2012-11-14http://sourceware.org/ml/gdb-patches/2012-11/msg00308.htmlAndrew Burgess2-110/+131
gdb/testsuite/ChangeLog * gdb.python/py-type.exp: Uniquify test names.
2012-11-14gdb/testsuite/Yao Qi3-10/+19
2012-11-14 Yao Qi <yao@codesourcery.com> * gdb.threads/manythreads.c [DEBUG]: Include "stdio.h". (thread_function) [DEBUG]: Call 'printf'. * gdb.threads/manythreads.exp: Pass '-DDEBUG' to compilation command line if 'DEBUG=1' is passed to test. Remove a pattern to match inferior's output.
2012-11-132012-11-13 Giuseppe Montalto <giuseppe.montalto@st.com>Tom Tromey2-0/+62
* mi/mi-main.c (mi_cmd_data_write_memory): Handle additional parameter COUNT, for pattern filling of memory regions. * NEWS: Mention it. doc * gdb.texinfo (GDB/MI Data Manipulation): Document new optional parameter "count" of -data-write-memory-bytes, and add an example. testsuite * gdb.mi/mi-fill-memory.exp: New test.
2012-11-12 * NEWS: Update.Tom Tromey5-3/+135
* data-directory/Makefile.in (PYTHON_FILES): Add type_printers.py. * python/lib/gdb/command/type_printers.py: New file. * python/lib/gdb/command/types.py (TypePrinter): New class. (_get_some_type_recognizers, get_type_recognizers, apply_type_recognizers, register_type_printer): New functions. * python/py-objfile.c (objfile_object) <type_printers>: New field. (objfpy_dealloc): Decref new field. (objfpy_new): Set new field. (objfpy_get_type_printers, objfpy_set_type_printers): New functions. (objfile_to_objfile_object): Set new field. (objfile_getset): Add "type_printers". * python/py-progspace.c (pspace_object) <type_printers>: New field. (pspy_dealloc): Decref new field. (pspy_new): Set new field. (pspy_get_type_printers, pspy_set_type_printers): New functions. (pspace_to_pspace_object): Set new field. (pspace_getset): Add "type_printers". * python/python.c (start_type_printers, apply_type_printers, free_type_printers): New functions. (_initialize_python): Set gdb.type_printers. * python/python.h (start_type_printers, apply_type_printers, free_type_printers): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update for new fields. (do_free_global_table, create_global_typedef_table, find_global_typedef): New functions. (find_typedef_in_hash): Use find_global_typedef. (whatis_exp): Use create_global_typedef_table. Change cleanup handling. * typeprint.h (struct type_print_options) <global_typedefs, global_printers>: New fields. doc * gdb.texinfo (Symbols): Document "info type-printers", "enable type-printer" and "disable type-printer". (Python API): Add new node to menu. (Type Printing API): New node. (Progspaces In Python): Document type_printers field. (Objfiles In Python): Likewise. (gdb.types) <get_type_recognizers, apply_type_recognizers, register_type_printer, TypePrinter>: Document. testsuite * gdb.base/completion.exp: Update for "info type-printers". * gdb.python/py-typeprint.cc: New file. * gdb.python/py-typeprint.exp: New file. * gdb.python/py-typeprint.py: New file.
2012-11-12 * c-typeprint.c (find_typedef_for_canonicalize,Tom Tromey11-99/+252
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 Tromey6-95/+113
"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-11-10 PR gdb/14288Keith Seitz5-0/+202
* c-valprint.c (c_val_print): For character arrays with "print null" option on, print ellipses if the output is truncated and the next character is not \000. * valprint.c (MAX_WCHARS): Define. (WCHAR_BUFLEN): Likewise. (WCHAR_BUFLEN_MAX): Likewise. (struct converted_character): New structure. (count_next_character): New function. (print_converted_chars_to_obstack): New function. (generic_printstr): Rewrite using count_next_character and print_converted_chars_to_obstack. * gdb.base/printcmds.c: Add invalid_XXX globals for repeated byte tests. * gdb.base/printcmds.exp (test_repeat_bytes): New procedure. * gdb.base/wchar.c (main): Add and construct a wchar_t array with repeated characters. * gdb.base/wchar.exp: Add repeated character tests.
2012-11-09http://sourceware.org/ml/gdb-patches/2012-10/msg00083.htmlAndrew Burgess2-7/+15
gdb/ChangeLog * source.c (print_source_lines_base): Add fullname field giving full path to file in mi output. * NEWS: Mention the new fullname field. gdb/doc/ChangeLog * gdb.texinfo (GDB/MI Data Manipulation): Add fullname field to the example -data-disassemble output. Extend the description of the -data-disassemble results to document all fields. Document the cli disassemble command as being related to -data-disassemble. gdb/testsuite/ChangeLog * gdb.mi/mi-disassemble.exp: Expect fullname field in mi disassembly output.