aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-03ELFOSABI_GNUThomas Schwinge20-47/+91
bfd/ * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf64-hppa.c: Likewise. binutils/ * elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias and ELFOSABI_HURD. Add GNU alias. * readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type): Likewise. * doc/binutils.texi <elfedit>: Update accordingly. elfcpp/ * elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX, keep ELFOSABI_LINUX as an alias. Remove ELFOSABI_HURD. gas/ * config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * config/tc-ia64.c: Likewise. include/elf/ * common.h (ELFOSABI_GNU): Define, replaces... (ELFOSABI_LINUX): ... this, kept as an alias. (ELFOSABI_HURD): Remove. ld/testsuite/ * ld-ifunc/ifunc.exp: Update for changed output. * ld-unique/unique.exp: Likewise.
2011-07-03 PR gold/12957Ian Lance Taylor4-2/+36
* options.h (class General_options): Add -f and -F. * options.cc (General_options::finalize): Fatal error if -f/-F are used without -shared. * layout.cc (Layout::finish_dynamic_section): Implement -f/-F.
2011-07-03 * dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors.Ian Lance Taylor2-2/+7
2011-07-03daily updateAlan Modra1-1/+1
2011-07-03*** empty log message ***gdbadmin1-1/+1
2011-07-02gdb/testsuite/Jan Kratochvil3-5/+24
* gdb.cp/m-static.exp: Call get_compiler_info. (static const int initialized nowhere): Call setup_xfail for gcc <= 4.4. * gdb.cp/pr9167.exp (p b): Likewise. * gdb.cp/temargs.exp: Do not set have_pr_45024_fixed for gcc 4.6. (test value of P in inner_m, test type of Z in inner_m): Call setup_xfail for gcc <= 4.5.
2011-07-02gdb/testsuite/Jan Kratochvil2-0/+16
* gdb.cp/m-static.exp: Call get_compiler_info. (static const int initialized nowhere): Call setup_xfail for gcc<=4.4.
2011-07-02 PR gold/12525Ian Lance Taylor9-12/+109
PR gold/12952 * resolve.cc (Symbol::override_base_with_special): Don't override the version if the overriding symbol has a different name. * dynobj.cc (Versions::add_def): Add dynpool parameter. Change all callers. If we give an error about an undefined version, define the base version if necessary. * dynobj.h (class Versions): Update declaration. * testsuite/weak_alias_test_5.cc: New file. * testsuite/weak_alias_test.script: New file. * testsuite/weak_alias_test_main.cc: Check that versioned_symbol and versioned_alias have the right value, and call t2. * testsuite/Makefile.am (weak_alias_test_DEPENDENCIES): Add weak_alias_test_5.so. (weak_alias_test_LDADD): Likewise. (weak_alias_test_5_pic.o, weak_alias_test_5.so): New targets. * testsuite/Makefile.in: Rebuild.
2011-07-02 * dwarf.h (enum DW_CFA): Define.Ian Lance Taylor2-1/+51
2011-07-02 PR gold/12525Ian Lance Taylor4-15/+29
* options.h (class General_options): Support -z notext. * testsuite/Makefile.am (two_file_shared_1_nonpic.so): Use -Wl,-z,notext. (two_file_shared_nonpic.so): Likewise. (two_file_shared_mixed.so): Likewise. (two_file_shared_mixed_1.so): Likewise. (weak_undef_lib_nonpic.so): Likewise. (alt/weak_undef_lib_nonpic.so): Likewise. (tls_test_shared_nonpic.so): Likewise. * testsuite/Makefile.in: Rebuild.
2011-07-02Correct last commit.Ian Lance Taylor2-3/+5
2011-07-02 PR gold/12525Ian Lance Taylor5-222/+344
* configure.ac: Test whether static linking works, setting the automake conditional HAVE_STATIC. * testsuite/Makefile.am: Disable tests using -static if HAVE_STATIC is not true. * configure, testsuite/Makefile.in: Rebuild.
2011-07-02 PR gold/12525Ian Lance Taylor5-1/+69
* ehframe.cc (Eh_frame_hdr::get_fde_pc): Handle DW_EH_PE_datarel. Assert if we see DW_EH_PE_indirect. * target.h (Target::ehframe_datarel_base): New function. (Target::do_ehframe_datarel_base): New target function. * i386.cc (Target_i386::do_ehframe_datarel_base): New function. * x86_64.cc (Target_x86_64::do_ehframe_datarel_base): New function.
2011-07-02daily updateAlan Modra1-1/+1
2011-07-02*** empty log message ***gdbadmin1-1/+1
2011-07-01Correct comment in last commit.Ian Lance Taylor1-1/+1
2011-07-01 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: changeIan Lance Taylor2-1/+6
DW_OP_lit3 to DW_OP_lit2.
2011-07-01 PR gold/12571Ian Lance Taylor9-98/+400
* options.h (class General_options): Add --ld-generated-unwind-info. * ehframe.cc (Fde::write): Add address parameter. Change all callers. If associated with PLT, fill in address and size. (Cie::set_output_offset): Only add merge mapping if there is an object. (Cie::write): Add address parameter. Change all callers. (Eh_frame::add_ehframe_for_plt): New function. * ehframe.h (class Fde): Update declarations. Move shndx_ and input_offset_ fields into union u_, with new plt field. (Fde::Fde): Adjust for new union field. (Fde::Fde) [Output_data version]: New constructor. (Fde::add_mapping): Only add merge mapping if there is an object. (class Cie): Update declarations. (class Eh_frame): Declare add_ehframe_for_plt. * layout.cc (Layout::layout_eh_frame): Break out code into make_eh_frame_section, and call it. (Layout::make_eh_frame_section): New function. (Layout::add_eh_frame_for_plt): New function. * layout.h (class Layout): Update declarations. * merge.cc (Merge_map::add_mapping): Add assertion. * i386.cc: Include "dwarf.h". (class Output_data_plt_i386): Make first_plt_entry, dyn_first_plt_entry, exec_plt_entry, and dyn_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_i386::Output_data_plt_i386): Align to 16-byte boundary. Call add_eh_frame_for_plt if appropriate. * x86_64.cc: Include "dwarf.h". (class Output_data_plt_x86_64): Align to 16-byte boundary. Make first_plt_entry, plt_entry and tlsdesc_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_x86_64::init): Call add_eh_frame_for_plt if appropriate.
2011-07-01sim: bfin: implement stat_map for virtual environments (libgloss)Mike Frysinger2-4/+30
The stat syscalls cannot work without a stat map, so declare one that matches libgloss for virtual environments. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-01gdb/Jan Kratochvil5-1/+73
* linespec.c (find_method): Accept the function type automatically only if it was specified with parameter types. gdb/testsuite/ * gdb.cp/paren-type.cc: New files. * gdb.cp/paren-type.exp: New files.
2011-07-01gdb/Jan Kratochvil8-102/+86
Stop on first linespec terminator instead of eating what we can. * linespec.c (is_linespec_boundary): New function. (name_end): Remove function. (keep_name_info): New parameter on_boundary, replace the body. (decode_line_1): Provide the parameter to keep_name_info. (decode_compound): Likewise. Drop the trailing java return type handling. Twice. gdb/testsuite/ Stop on first linespec terminator instead of eating what we can. * gdb.cp/minsym-fallback-main.cc (main): Call also C::operator (). * gdb.cp/minsym-fallback.cc (C::operator ()): Define. * gdb.cp/minsym-fallback.exp (break 'C::f()'): Change to ... (break C::f()): ... this one. (break C::operator()()): New test. * gdb.cp/minsym-fallback.h (C::operator ()): Declare. * gdb.java/jmisc.exp (break jmisc.main(java.lang.String[])int): New test.
2011-07-01gdb/Jan Kratochvil9-27/+175
Fall back linespec to minimal symbols. * linespec.c (decode_line_1): New variable ex, saved_argptr. Protect decode_compound by TRY_CATCH, fall back on minsyms if it failed. (find_method, symbol_found): Change error to cplusplus_error. gdb/testsuite/ Fall back linespec to minimal symbols. * gdb.base/psymtab.exp (Don't search past end of psymtab.): Update the error message. * gdb.cp/cplusfuncs.exp (list foo::operator int*): Likewise. * gdb.cp/minsym-fallback-main.cc: New file. * gdb.cp/minsym-fallback.cc: New file. * gdb.cp/minsym-fallback.exp: New file. * gdb.cp/minsym-fallback.h: New file.
2011-07-01gdb/Changelog fix:Jan Kratochvil1-1/+1
* symtab.c (symbol_find_demangled_name): Remove DMGL_VERBOSE.
2011-07-01gdb/Jan Kratochvil5-2/+72
* symtab.c (symbol_find_demangled_name): Likewise. gdb/testsuite/ * gdb.cp/no-dmgl-verbose.cc: New file. * gdb.cp/no-dmgl-verbose.exp: New file.
2011-07-01gdb/Jan Kratochvil12-10/+391
* dwarf2read.c (check_physname): New variable. (dwarf2_physname): Prefer DW_AT_linkage_name over dwarf2_compute_name. (show_check_physname): New function. (_initialize_dwarf2_read): Add `check-physname' for check_physname. gdb/doc/ * gdb.texinfo (Debugging Output): Document set debug check-physname. gdb/testsuite/ * gdb.base/break-interp.exp (reach_1, test_ld): Allow also the prefix __GI_. * gdb.cp/psymtab-parameter.cc (func): Make it a template function. (f): New function. * gdb.cp/psymtab-parameter.exp (complete break 'func(): Rename to ... (complete p 'func<short>(): ... here. * gdb.dwarf2/dw2-linkage-name-trust-main.cc: New file. * gdb.dwarf2/dw2-linkage-name-trust.S: New file. * gdb.dwarf2/dw2-linkage-name-trust.exp: New file. * gdb.cp/temargs.exp (test type of F in k3_m, test value of F in k3_m): Make them KFAIL gcc/49546.
2011-07-01remove comment in machoread.c (macho_symfile_read)Joel Brobecker2-3/+4
Does not seem to be applicable to the current code anymore. gdb/ChangeLog: * machoread.c (macho_symfile_read): Delete OBE comment.
2011-07-01[mach-o] get rid of current_oso globalJoel Brobecker2-68/+75
This current_oso global was used to store the OSO's symbol table in order to relocate common symbols. But it is also making the assumption that all sections are going to be immediately relocated as macho_add_oso_symfile does: - Initialize the current_oso - Use it through symbol_file_add_from_bfd - Reset the current_oso (to all fields NULL) What actually happens is that the .debug_frame section gets read lazily, and thus relocated at a later time. This relocation causes current_oso.symbol_table to be initialized (see macho_symfile_relocate) again. And this eventually causes to trip the... gdb_assert (current_oso.symbol_table == NULL); ...assertion to fail because the symbol_table was never free'ed. To be complete, this happens because macho_symfile_relocate was called outside of macho_add_oso_symfile's control, where the set-global/use/unset-global dance happens. But it looks like keeping this global around is not necessary, as this symbol table is only used to relocate the common symbols. We can do that prior to relocating the rest of the symbols. gdb/ChangeLog: * machoread.c (struct macho_oso_data): Delete. (current_oso): Delete. (macho_relocate_common_syms): New function, mostly extracted out of (macho_add_oso_symfile): Call macho_relocate_common_syms. Remove code that sets and unset current_oso. (macho_symfile_relocate): Delete handling of common symbols, now moved to macho_relocate_common_syms.
2011-07-01[Darwin] Do not crash (failed assertion) after PT_KILL ptrace errorJoel Brobecker2-1/+25
It might not be a debugger bug that caused the PT_KILL ptrace operation to fail. So emit a warning instead, and try to continue. This patch also tries to handle the case where ptrace return -1, but left errno set to zero. According to the ptrace man page, it is possible for some ptrace operations to return -1 in non-error situations, and to detect those situations, it explains that errno should be set prior to calling ptrace, and then checked again after. gdb/ChangeLog: * darwin-nat.c (darwin_ptrace): Add documentation. Set errno to zero before calling ptrace. If ptrace returns -1 and errno is zero, then change then return zero. (darwin_kill_inferior): Issue a warning instead of triggering a failed assertion when the PT_KILL ptrace operations returned nonzero.
2011-07-01Darwin/detach: Do not resume inferior after ptrace detachJoel Brobecker2-1/+10
When trying to detach from an inferior that we start from the debugger, GDB prints the following warning: (gdb) detach Detaching from program: /[...]/foo, process 74593 warning: Mach error at "/[...]/darwin-nat.c:445" in function "darwin_resume_inferior": (os/kern) failure (0x5) The warning comes from the following code in darwin_detach: darwin_resume_inferior (inf); This is because the process has already been resumed by the PT_DETACH ptrace operation that has just been performed. On the other hand, when trying to detach from an inferior that was started outside of debugger control (thus after having attached the debugger to that inferior), things go smoothly. That's because we don't use ptrace to control the process in that case, and so the resume is perfectly justified. This patch makes sure that we resume the inferior during the detach only when we're NOT using ptrace. gdb/ChangeLog: * darwin-nat.c (darwin_detach): Call darwin_resume_inferior only when inf->private->no_ptrace.
2011-07-01bettter display for temporary Ada exception catchpointsJoel Brobecker4-8/+58
Temporary catchpoints on Ada exceptions are now displayed as "Temporary catchpoint" as opposed to just "Catchpoint". This is cosmetic only, but in line with what's done for other catchpoints as well as breakpoints. gdb/ChangeLog: * ada-lang.c (print_it_exception): Print temporary catchpoints as "Temporary catchpoint". (print_mention_exception): Likewise. gdb/testsuite/ChangeLog: * gdb.ada/catch_ex.exp: Add temporary catchpoint tests.
2011-07-01gdb/testsuite/Jan Kratochvil3-0/+46
Test GCC PR debug/49546. * gdb.cp/temargs.exp (set sixth breakpoint for temargs) (test type of F in k3_m, test value of F in k3_m): New. * gdb.cp/temargs.cc (struct S3, struct K3): New. (main): New variable k3. Call k3.k3_m.
2011-07-01 * jv-lang.c (java_language_defn): Use java_printchar,Tom Tromey2-30/+65
java_printstr. (java_get_encoding): New function. (java_emit_char): Use generic_emit_char. (java_printchar): New function. (java_printstr): Likewise.
2011-07-01crash when printing type of tagged typeJoel Brobecker2-2/+16
If the debugging info is incorrect or incomplete, printing the type description of a variable that's a variant tagged type can trigger a crash. The crash comes from us trying print a NULL string which was supposed to be the parent type name. We observed this behavior on bareboard targets where a-tags is not always linked in, as is the case for native platforms, for instance. Coupled with -feliminate-unused-debug-types, this leads to GDB being unable to find type ada__tags__type_specific_data, without which printing the type description above cannot be done acurately. There is an easy workaround for this limitation, which is to compile at least 1 unit with -fno-eliminate-unused-debug-types, but GDB should also be made resilient to this situation. gdb/ChangeLog: * ada-typeprint.c (print_record_type): If unable to decode the name of the parent type, use the encoded name.
2011-07-01Fix printing address of packed arrayJoel Brobecker5-15/+18
When trying to print the address of a non-packed array, GDB correctly prints the type name and address: (gdb) print &var $2 = (access pa.var) 0xbffff1d8 However, it is behaving differently when dealing with a packed array: (gdb) p &var (access array (4 .. 8) of boolean <packed: 1-bit elements>) (4 => false, false, false, true, false) The type description isn't all that bad, but GDB shouldn't be printing the array value! This patch fixes the `print` and `ptype` command on packed and non-packed array. It also fixes a gdb.ada test to match with the new ouput. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (ada_print_type): Fix both PAD type and pointer to constrained packed array type output. * ada-valprint.c (ada_val_print_1): Fix pointer to constrained packed array output. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: Fix expected outout.
2011-07-01Fix ada array bounds displayJoel Brobecker4-41/+45
Array bounds were not correctly displayed when the SHOW parameter of print_type functions is set to -1. This shows up in the following type of situation, where we have a declaration as follow: Anon_Array_Int_Obj : array (1..10) of Integer := (others => 8); In GDB/MI mode, trying to print the type info for our array object yields: (gdb) -var-create ai 0 Anon_Array_Int_Obj (gdb) -var-info-type ai ^done,type="array (...) of integer" The actual bounds are missing. Contrast this with what happens when in GDB/CLI mode: (gdb) ptype Anon_Array_Int_Obj type = array (1 .. 10) of integer This patch fixes array type printing accordingly. And as it turns out, it also improves the output for one of the tests already present, so it shows that it's not just the GDB/MI mode that's affected. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (print_array_type): removed if condition on show being negative for bounds printing. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: fixed expected output.
2011-07-01treat identical enum types as the same typeJoel Brobecker7-0/+242
This is to avoid an unnecessary multiple-choice menu for an expression involving an enumeral declared in two types, when the second type is an identical copy of the first type. This happens in the following situation: type Color is (Black, Red, Green, Blue, White); type RGB_Color is new Color range Red .. Blue; In that case, an implict type is created, and is used as the base type for type RGB_Color. This base type is a copy of type Color. We've added some extensive comments explaining the situation and our approach further. gdb/ChangeLog: * ada-lang.c (ada_identical_enum_types_p): New function. (symbols_are_identical_enums): New function. (remove_extra_symbols): Do nothing if NSYMS < 2. Use symbols_are_identical_enums. gdb/testsuite/ChangeLog: * gdb.ada/same_enum: New testcase.
2011-07-01missing type description for typedef to pointer valueJoel Brobecker7-1/+114
If we evaluate an expression that results in a value that is a typedef to pointer, then the debugger fails to print the type description before printing the actual value: (gdb) print e.plan(1) $1 = 0x0 The expected output is: (gdb) print e.plan(1) $1 = (access integer) 0x0 gdb/ChangeLog: * ada-valprint.c (ada_value_print): Handle typedefs. gdb/testsuite/ChangeLog: * gdb.ada/ptr_typedef: New testcase.
2011-07-01Add missing word in comment (ada-lang.c)Joel Brobecker2-2/+6
gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp): Add missing word in comment.
2011-07-01variables whose type is a typedef to an array pointerJoel Brobecker4-7/+20
If we declare a type as being an access to array type, and then declare a variable of that type, for instance: type Some_Array is array [...]; type Array_Access is access all Some_Array; Table : Array_Access := [...]; The variable "Table" may be defined in the debugging information as being a typedef to the array pointer type. In the past, it was defined directly as the array pointer type, but this has been changed to make sure that the typedef type gets used. If the typedef type wasn't used, it would allow the compiler to stop emitting that typedef type when compiling with -feliminate-unused-debug-types. The removal of this typedef would be a problem, because GDB relies on the typedef to create symbols for pointer types, and without it, we would no longer be able to do "ptype array_access". This patch helps prevent incorrect output or even crashes when that extra typedef layer is used. The testing is already mostly covered by arrayptr.exp, but I still added a 'ptype' test, just for good measure. gdb/ChangeLog: (Eric Botcazou) * ada-lang.c (thin_descriptor_type): Deal with typedefs. (decode_constrained_packed_array): Likewise. (ada_evaluate_subexp) <TERNOP_SLICE>: Likewise. gdb/testsuite/ChangeLog (Joel Brobecker): * gdb.ada/arrayptr.exp: Add ptype test.
2011-07-01Fix date in testsuite/ChangeLog entry.Joel Brobecker1-1/+1
2011-07-01handle character-based enumeration typedefsJoel Brobecker7-1/+114
Consider the following type: type Char_Enum_Type is ('A', 'B', 'C', 'D'); If the compiler generates a Char_Enum_Type typedef in the debugging information, the debugger fails in the following case: (gdb) p Char_Enum_Type'('B') $1 = 66 For our type, the underlying value of 'B' is actually 1, not 66 (ASCII 'B'). We are failing this case because we were not handling typedef to enum types before. This patch fixes this. gdb/ChangeLog: * ada-exp.y (convert_char_literal): Handle typedef types. gdb/testsuite/ChangeLog: * gdb.ada/char_enum: New testcase.
2011-07-01Document ada_remove_trailing_digits moreJoel Brobecker2-1/+8
gdb/ChangeLog: * ada-lang.c (ada_remove_trailing_digits): Expand documentation.
2011-07-01[libiberty/filename_cmp] Darwin has case-insensitive filesystemsJoel Brobecker4-6/+41
include/ChangeLog: * filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define on Darwin, as well as on the systems that use a DOS-like filesystem. libiberty/ChangeLog: * filename_cmp.c (filename_cmp, filename_ncmp): Add handling of HAVE_CASE_INSENSITIVE_FILE_SYSTEM.
2011-07-01merge from gccJan Kratochvil3-3/+84
libiberty/ PR debug/49408 * cp-demangle.c (d_print_comp): Suppress argument list for function references by the '&' unary operator. Keep also already processed variant without the argument list. Suppress argument list types for function call used in an expression. * testsuite/demangle-expected: Fix excessive argument list types in `test for typed function in decltype'. New testcase for no argument list types printed. 3 new testcases for function references by the '&' unary operator..
2011-07-012011-07-01 Eric B. Weddington <eric.weddington@atmel.com>Eric B. Weddington2-2/+6
* avr.h (AVR_ISA_AVR6): Remove AVR_ISA_SPMX as it was actually a duplicate of AVR_ISA_SPM.
2011-07-012011-07-02 Yao Qi <yao@codesourcery.com>Yao Qi2-105/+119
* gdb.base/dump.exp (capture_pointer_with_type): New. Get value from address instead of name. Start GDB once, and do `dump' and `restore' tests together.
2011-07-01 PR binutils/12329Nick Clifton5-2/+16
* avr-dis.c (avr_operand): Fix disassembly of ELPM, LPM and SPM insns using post-increment addressing. * avr.h (AVR_ISA_AVR6): Fix typo, adding AVR_ISA_SPMX.
2011-07-01 PR binutils/12325Nick Clifton2-2/+20
* doc/binutils.texi (ar cmdline): Document --target, --version and --help command line options.
2011-07-01 PR sim/12737Nick Clifton5-4/+8
* sim/arm/iwmmxt/wcmpgt.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wmac.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wsra.cgs: Remove expectation of failure. * sim/arm/xscale/blx.cgs: Remove expectation of failure.
2011-07-01 PR sim/12737Nick Clifton2-8/+19
* iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a signed compare. (WMAC): Extend computed result before adding to result register. (WRSA): Sign extend 32-bit values before shifting.