aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-16daily updateAlan Modra1-1/+1
2012-01-16 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leaveAlan Modra3-3/+9
trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2012-01-162012-01-16 Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior5-51/+25
* f-exp.y (parse_number): Convert prototype from K&R to ANSI C. (growbuf_by_size): Likewise. (yyerror): Likewise. * m2-exp.y (make_qualname): Remove function (was #if 0'ed). (modblock): Remove variable (was #if 0'ed). (parse_number): Convert prototype from K&R to ANSI C. (yyerror): Likewise. * objc-exp.y (parse_number): Likewise. (yyerror): Likewise. (yylex): Remove #if 0'ed code. * p-exp.y (uptok): Convert prototype from K&R to ANSI C. (yyerror): Likewise.
2012-01-16gdbTom Tromey12-58/+154
* NEWS: Add item. * symtab.h (compare_filenames_for_search): Declare. * symtab.c (compare_filenames_for_search): New function. (iterate_over_some_symtabs): Use it. * symfile.h (struct quick_symbol_functions) <map_symtabs_matching_filename>: Change spec. * psymtab.c (partial_map_symtabs_matching_filename): Use compare_filenames_for_search. Update for new spec. * dwarf2read.c (dw2_map_symtabs_matching_filename): Use compare_filenames_for_search. Update for new spec. * breakpoint.c (clear_command): Use compare_filenames_for_search. gdb/doc * gdb.texinfo (Specify Location): Document relative file name handling. gdb/testsuite * gdb.linespec/linespec.exp: Change some tests to use $decimal. Add tests for relative directory.
2012-01-16gdbTom Tromey14-13/+199
PR python/13281: * gdbtypes.h (TYPE_FLAG_ENUM): New macro. (struct main_type) <flag_flag_enum>: New field. * dwarf2read.c (process_enumeration_scope): Detect "flag" enums. * NEWS: Add entries. * c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag" enums. * python/lib/gdb/printing.py (_EnumInstance): New class. (FlagEnumerationPrinter): Likewise. gdb/doc * gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter. gdb/testsuite * gdb.base/printcmds.c (enum flag_enum): New. (three): New global. * gdb.base/printcmds.exp (test_print_enums): Add test for flag enum printing. * gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate FlagEnumerationPrinter. * gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter. * gdb.python/py-pp-maint.c (enum flag_enum): New. (fval): New global.
2012-01-162012-01-16 Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior3-120/+411
* breakpoint.c (create_sals_from_address_default): New function. (create_breakpoints_sal_default): Likewise. (decode_linespec_default): Likewise. (is_marker_spec): Removed. (strace_marker_p): New function. (init_breakpoint_sal): Using `strace_marker_p' instead of `is_marker_spec'. (create_breakpoint): Call method `create_sals_from_address' from breakpoint_ops, replacing code that created SALs conditionally on the type of the breakpoint. Call method `create_breakpoints_sal', replacing code that created breakpoints conditionally on the type wanted. (base_breakpoint_create_sals_from_address): New function. (base_breakpoint_create_breakpoints_sal): Likewise. (base_breakpoint_decode_linespec): Likewise. (base_breakpoint_ops): Add methods `base_breakpoint_create_sals_from_address', `base_breakpoint_create_breakpoints_sal' and `base_breakpoint_decode_linespec'. (bkpt_create_sals_from_address): New function. (bkpt_create_breakpoints_sal): Likewise. (bkpt_decode_linespec): Likewise. (tracepoint_create_sals_from_address): Likewise. (tracepoint_create_breakpoints_sal): Likewise. (tracepoint_decode_linespec): Likewise. (strace_marker_create_sals_from_address): Likewise. (strace_marker_create_breakpoints_sal): Likewise. (strace_marker_decode_linespec): Likewise. (strace_marker_breakpoint_ops): New variable. (addr_string_to_sals): Remove `marker_spec'. Call method `decode_linespec' from breakpoint_ops, replacing code that decoded an address string into a SAL. Use `strace_marker_p' instead of `marker_spec'. (strace_command): Decide whether we are dealing with a static tracepoint with marker or not. Use the appropriate breakpoint_ops. (initialize_breakpoint_ops): Initialize new fields of breakpoint_ops. * breakpoint.h (linespec_result, linespec_sals): New forward declarations. (breakpoint_ops) <create_sals_from_address>, <create_breakpoints_sal>, <decode_linespec>: New methods.
2012-01-162012-01-16 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+33
* lib/gdb.exp (banned_procedures): New variable. (banned_variables_traced): Rename to ... (banned_traced): ... this. (gdb_init): Also trace banned procedures. (gdb_finish): Also untrace banned procedures.
2012-01-162012-01-16 Pedro Alves <palves@redhat.com>Pedro Alves473-1888/+4
Remove all calls to strace.
2012-01-16 PR binutils/13593Alan Modra2-5/+23
* nm.c (OPTION_SIZE_SORT): Define. (long_options): Don't set no_sort, sort_numerically or sort_by_size directly. (main): Instead set the flags here, making them mutually exclusive.
2012-01-16 PR ld/13491Alan Modra3-5/+13
* coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test h->root.type not h->type. * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2012-01-16*** empty log message ***gdbadmin1-1/+1
2012-01-15daily updateAlan Modra1-1/+1
2012-01-15 PR ld/12758Alan Modra2-2/+8
* ldlang.c (lang_process): Don't reopen all files, just those newly added by plugin.
2012-01-15*** empty log message ***gdbadmin1-1/+1
2012-01-14daily updateAlan Modra1-1/+1
2012-01-14 * NEWS: Update text for "maint set python print-stack".Doug Evans2-4/+14
It is deprecated in gdb 7.4 and deleted in 7.5.
2012-01-14gdb/testsuite/Jan Kratochvil3-0/+131
* gdb.dwarf2/dw2-namespaceless-anonymous.S: New file. * gdb.dwarf2/dw2-namespaceless-anonymous.exp: New file.
2012-01-14*** empty log message ***gdbadmin1-1/+1
2012-01-13daily updateAlan Modra1-1/+1
2012-01-13Add vmfuncH.J. Lu15-2743/+2832
gas/ 2012-01-13 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (cpu_arch): Add ".vmfunc". * doc/c-i386.texi: Document vmfunc. gas/testsuite/ 2012-01-13 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run vmfunc and x86-64-vmfunc. * gas/i386/vmfunc.d: New. * gas/i386/vmfunc.s: Likewise. * gas/i386/x86-64-vmfunc.d: Likewise. opcodes/ 2012-01-13 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (mod_table): Add vmfunc. * i386-gen.c (cpu_flag_init): Add CPU_VMFUNC_FLAGS. (cpu_flags): CpuVMFUNC. * i386-opc.h (CpuVMFUNC): New. (i386_cpu_flags): Add cpuvmfunc. * i386-opc.tbl: Add vmfunc. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
2012-01-132012-01-13 Pedro Alves <palves@redhat.com>Pedro Alves2-0/+8
* server.c (attach_inferior): Clear `cont_thread'.
2012-01-132012-01-13 Pedro Alves <palves@redhat.com>Pedro Alves2-0/+15
* server.c (main): Avoid infinite loop while detaching/killing after a longjmp.
2012-01-132012-01-13 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov3-3/+8
* gdb.base/attach-pie-misread.exp: Pass -pie only to the linker. * gdb.base/pie-execl.exp: Likewise.
2012-01-13reverse the order of relocs in mach-o gas output.Iain Sandoe19-2/+188
gas: * config/obj-macho.c (obj_mach_o_reorder_section_relocs): New. * config/obj-macho.h (SET_SECTION_RELOCS): Define. (obj_mach_o_reorder_section_relocs): Declare. gas/testsuite: * gas/all/redef2.d: Skip for Darwin. * gas/all/redef3.d: Likewise. * gas/all/weakref1.d: Likewise. * gas/macros/irp.d: Likewise. * gas/macros/repeat.d: Likewise. * gas/macros/rept.d: Likewise. * gas/macros/test2.d: Likewise. * gas/macros/vararg.d: Likewise. * gas/mach-o/macro-irp.d: New. * gas/mach-o/macro-repeat.d: New. * gas/mach-o/macro-rept.d: New. * gas/mach-o/macro-test2.d: New. * gas/mach-o/macro-vararg.d: New. * gas/mach-o/redef2.d: New. * gas/mach-o/redef3.d: New.
2012-01-13gdb/doc/Jan Kratochvil2-0/+26
* gdbint.texinfo (Coding Standards): Require braces for two lines of code.
2012-01-13handle absolute indirect syms in mach-oIain Sandoe7-4/+73
bfd: * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. gas: * config/obj-macho.c (obj_mach_o_set_indirect_symbols): Handle absolute indirect symbols. gas/testsuite: * gas/mach-o/dysymtab-3.d: New. * gas/mach-o/symbols-7.s: New.
2012-01-13order relocs after segments for mach-oIain Sandoe2-8/+24
bfd: * mach-o.c (bfd_mach_o_write_relocs): Move compuation of relocs file position from here... to (bfd_mach_o_build_seg_command): Here.
2012-01-13set vma on mach-o sections.Iain Sandoe10-271/+378
gas: * config/obj-macho.c (obj_mach_o_set_vma_data): New type. (obj_mach_o_set_section_vma): New. (obj_mach_o_post_relax_hook): New. * config/obj-macho.h (md_post_relax_hook): Define. (obj_mach_o_post_relax_hook): Declare. gas/testsuite: * gas/mach-o/dysymtab-2.d: Update to include the set VMA. * gas/mach-o/symbols-1-64.d: Likewise. * gas/mach-o/symbols-1.d: Likewise. * gas/mach-o/symbols-6.d: Likewise. * gas/mach-o/zerofill-1.d: Likewise. * gas/mach-o/zerofill-2.d: Likewise.
2012-01-13Avoid compiler warnings in gdb_curses.h on MinGW.Eli Zaretskii2-0/+13
See http://sourceware.org/ml/gdb-patches/2012-01/msg00298.html for more details about the problem. gdb/gdb_curses.h (MOUSE_MOVED) [__MINGW32__]: Undefine before including curses.h.
2012-01-13*** empty log message ***gdbadmin1-1/+1
2012-01-12gdb/Jan Kratochvil3-10/+25
* configure: Regenerate. * config.in: Regenerate.
2012-01-12daily updateAlan Modra1-1/+1
2012-01-12 PR mi/10586Keith Seitz2-27/+145
* varobj.c (ANONYMOUS_STRUCT_NAME): Define. (ANONYMOUS_UNION_NAME): Define. (is_path_expr_parent): New function. (get_path_expr_parent): New function. (is_anonymous_child): New function. (create_child_with_value): If the child is anonymous and without a name, assign an object name to it. (c_describe_child): Use get_path_expr_parent to determine the parent expression. If there field represents an anonymous struct or union and has no name, set an appropriate display name and expression. (cplus_describe_child): Likewise.
2012-01-12 PR mi/10586Keith Seitz5-0/+279
* gdb.mi/var-cmd.c (struct anonymous): New structure. (do_anonymous_type_tests): New function. (main): Call do_anonymous_type_tests. * gdb.mi/mi2-var-child.exp: Add anonymous type tests. (verify_everything): New procedure. * gdb.mi/mi-var-cp.cc (class A): New class. (anonymous_structs_and_unions): New function. (main): Call anonymous_structs_and_unions. * gdb.mi/mi-var-cp.exp: Add anonymous type tests. (verify_everything): New procedure.
2012-01-12 * lib/mi-support.exp: Expand comments about PATH_EXPR.Keith Seitz2-12/+68
(varobj_tree::get_path_expr): Assume that all varobjs are compound unless they are known simple types. Adjust path expressions based on parent type, path parent type, and tree language. (varobj_tree::walk_tree): Add LANGUAGE parameter and save it into the root varobj. (mi_walk_varobj_tree): Add LANGUAGE parameter.
2012-01-122012-01-12 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+9
* i386-tdep.c (i386_frame_cache_1): Also mark the frame base as available when %ebp is found to be zero (outermost).
2012-01-12add indirect_symbol to mach-o port.Iain Sandoe17-48/+705
bfd: * mach-o.c (bfd_mach_o_count_indirect_symbols): New. (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table. * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the file. (bfd_mach_o_section): Add indirect_syms field. gas: * config/obj-macho.c (obj_mach_o_set_symbol_qualifier): Switch off lazy when the symbol is private_extern. (obj_mach_o_indirect_sym): New type. (obj_mach_o_indirect_symbol): New. (mach_o_pseudo_table): Use obj_mach_o_indirect_symbol. (obj_macho_frob_label): Adjust to avoid adding bsyms for locals. (obj_macho_frob_label): Likewise. Adjust external and comm symbol tests. (obj_mach_o_set_indirect_symbols): New. (obj_mach_o_frob_file_after_relocs): New. *config/obj-macho.h (obj_frob_file_after_relocs): Define. (obj_mach_o_frob_file_after_relocs): Declare. include/mach-o: * loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New. (BFD_MACH_O_INDIRECT_SYM_ABS): New gas/testsuite: * gas/mach-o/dysymtab-2.d: New. * gas/mach-o/err-syms-4.s: New. * gas/mach-o/err-syms-5.s: New. * gas/mach-o/err-syms-6.s: New. * gas/mach-o/symbols-6-64.d: New. * gas/mach-o/symbols-6-64.s: New. * gas/mach-o/symbols-6.d: New. * gas/mach-o/symbols-6.s: New.
2012-01-122012-01-12 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-1/+6
PR gas/13591 * config/obj-coff.h (sy_obj): Rename macro to avoid a name conflict.
2012-01-12*** empty log message ***gdbadmin1-1/+1
2012-01-12Trivial cleanup: kill trailing whitespacePaul Pluzhnikov1-4/+4
2012-01-11daily updateAlan Modra1-1/+1
2012-01-112012-01-11 Andreas Tobler <andreast@fgznet.ch>Andreas Tobler3-2/+9
* common/gdb_assert.h (gdb_static_assert): Rename static_assert to an internal gdb_static_assert. * mi/mi-common.c: Rename static_assert to gdb_static_assert.
2012-01-11 PR gdb/9598:Tom Tromey2-4/+8
* breakpoint.c (_initialize_breakpoint): Fix help for "catch catch" and "catch throw".
2012-01-11bfd:Iain Sandoe2-4/+22
* mach-o.c (bfd_mach_o_build_seg_command): Separate computation of vmsize from filesize. Don't compute offsets or file sizes for zerofill sections.
2012-01-11bfd:Iain Sandoe2-50/+81
* mach-o.c (bfd_mach_o_build_commands): Make the building of each command type independent.
2012-01-112012-01-11 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+6
* gdb.base/default.exp (core-file): Don't expect "GDB can't read core files on this machine" anymore.
2012-01-11Add test for use of "<block>::<variable>" syntax for locals in watch.Paul N. Hilfinger3-1/+28
First, fix a technical problem with the function recurser. The test sets a watch on local_x at a point where its value is technically undefined. The test is written assuming that the value is not initially 2, but nothing in the C standard guarantees that. Second, augment the existing test for variables in recursive calls to check an equivalent expression that explicitly sets the scope of the local variable being tracked. 2012-01-11 Paul Hilfinger <hilfingr@adacore.com> * gdb.base/watchpoint.c (recurser): Initialize local_x. (main): Repeat recurser call. * gdb.base/watchpoint.exp: Check that 'watch recurser::local_x' is equivalent to 'local_x'.
2012-01-11Add testcase for locals identified with FUNCTION::VAR syntax.Paul N. Hilfinger3-0/+89
This test stops inside a recursive function after a few levels of recursion, goes up some frames, and then accesses a local variable with 'print foo::val' rather than the usual 'print val' to see if the former pays attention to the selected frame. 2012-01-11 Paul Hilfinger <hilfingr@adacore.com> Joel Brobecker <brobecker@adacore.com> * gdb.base/recpar.c, gdb.base/recpar.exp: New files.
2012-01-11Have block_innermost_frame start from selected frame and document.Paul N. Hilfinger7-5/+85
GDB used to search for the frame containing variables in a particular lexical block starting from the current (top) frame, ignoring any currently selected frame. It is not clear why this is desirable for variables that require a frame; why would a user deliberately select one frame and then expect to see the value of a variable in a more recent frame? This change causes block_innermost_frame to start looking from the selected frame, if there is one. It may be unnecessarily conservative: we use get_selected_frame_if_set rather than get_selected_frame in order to avoid the side effect of calling select_frame, which would probably be harmless. Expression-parsing routines previously made the unwarranted assumption that all block-qualified variables (written with the GDB extension <block>::<variable>) are static. As a result, they failed to update innermost_block, which confused the watch commands about when variables in watched expressions went out of scope, and also caused the wrong variables to be watched. This patch also modifies these routines to treat all local variables the same whether or not they are block-qualified. Finally, we add a paragraph to the "Program Variables" section of the texinfo documentation concerning the use of "::" for accessing non-static variables. 2012-01-11 Paul Hilfinger <hilfingr@adacore.com> * gdb/blockframe.c (block_innermost_frame): Start search from selected frame, if present, or otherwise the current frame. * gdb/c-exp.y (variable): Update innermost_block for 'block COLONCOLON NAME' clause. * gdb/m2-exp.y (variable): Ditto. * gdb/objc-exp.y (variable): Ditto. * gdb/doc/gdb.texinfo (Variables): Document use of :: for non-static variables.
2012-01-11bfd/Alan Modra6-63/+414
* elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. ld/ * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and --{no-,}plt-align. (plt_thread_safe, plt_stub_align): New vars. (gld${EMULATION_NAME}_after_allocation): Pass them to ppc64_elf_size_stubs. Align stub sections according to plt_stub_align. * ld.texinfo: Document new command line options, and an old undocumented option.