aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-18Add support for DW_OP_push_object_address.Joel Brobecker6-18/+79
gdb/ChangeLog: * dwarf2expr.h (struct dwarf_expr_context_funcs): Uncomment field "get_object_address". * dwarf2expr.c (execute_stack_op): Add handling for DW_OP_push_object_address. * dwarf2loc.h (dwarf2_evaluate_property): Add "address" field. * dwarf2loc.c (struct dwarf_expr_baton): Add field "obj_address". (dwarf_expr_push_dwarf_reg_entry_value): Set baton_local.obj_address. (dwarf_expr_get_obj_addr): New function. (dwarf_expr_ctx_funcs): Add get_object_address field. (dwarf2_evaluate_loc_desc_full): Set baton.obj_address. (dwarf2_locexpr_baton_eval): Add parameter "addr". Use it. (dwarf2_evaluate_property): Add parameter "address". Use it. (needs_get_obj_addr): New function. (needs_frame_ctx_funcs): Add get_object_address field. (dwarf2_compile_expr_to_ax): Add DW_OP_push_object_address handling. * gdbtypes.c (resolve_dynamic_range): Add "addr" field. Use it. (resolve_dynamic_array): Likewise.
2014-08-18ada_evaluate_subexp<OP_VAR_VALUE>: Avoid static fixing when possible.Joel Brobecker2-2/+23
Now that the OP_VAR_VALUE section of this function has been reorganized a bit, we can fall-back on standard evaluation when static fixing is not required. This patch does that, but being exclusive about when static fixing has to be used, rather than doing it all the time when noside is EVAL_AVOID_SIDE_EFFECTS. This will pave the way for later when we want to evaluate entities that have no GNAT encodings related to them but dynamic properties instead. In that case, we expect the standard evaluation to resolve those dynamic properties for us, even in no-side-effect mode. gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp) <OP_VAR_VALUE>: When noside is EVAL_AVOID_SIDE_EFFECTS, only return a statically fixed value for records and unions for which some GNAT encodings are present.
2014-08-18avoid "if ... else if ... else" logic in ada-lang.c::ada_evaluate_subexpJoel Brobecker2-7/+13
The OP_VAR_VALUE branch in ada_evaluate_subexp is written with multiple "if ... else if ... else if ... else ..." block. But in practice, these blocks all either goto out of that block of code, or return. This patch rewrites this code slightly by replacing the "else if"-s by simple "if"s. This should better reflect the ideal processing where we try to do a standard eval whenever possible, and only do something else when the standard eval does not work. On a pratical level, this patch makes it easier to fall through to the default processing when none of the special situations are detected, thus making it easier to add more handlers of those special situations; or to remove them as they no longer become necessary! gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp) <OP_VAR_VALUE>: Slight code rewrite to avoid "else if" and "else" constructs. Should be a no-op in practice.
2014-08-18Fix indentation level in ada-lang.c::ada_evaluate_subexp.Joel Brobecker2-44/+49
I just happen to notice that a lexical block was missing one indentation level. gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp) <OP_VAR_VALUE>: Fix identation of lexical block.
2014-08-18LTO plugin with older gccAlan Modra2-1/+5
* ld-plugin/lto.exp: Use gcc -print-file-name to find lto plugin.
2014-08-18PowerPC fix for ifunc broken by d1eca1e4Alan Modra3-1/+11
This probably could be fixed by making changes in relocate_section for ifunc, but it's simpler to disable the optimisation for ifunc. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to use dynrelocs for ifunc. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
2014-08-18PR 17287, DT_NEEDED of unneeded libraries affects --as-neededAlan Modra7-3/+40
PR 17287 bfd/ * elflink.c (on_needed_list): Only consider libraries that have been loaded. ld/ * ld.texinfo (--as-needed): Clarify that references from libraries must be from needed libraries. ld/testsuite/ * ld-plugin/needed3.c: New file. * ld-elf/shared.exp: Add needed3 test.
2014-08-18Return error status from bfd_elf_discard_info.Alan Modra15-45/+118
bfd/ * elflink.c (bfd_elf_discard_info): Return int error status. * stabs.c (_bfd_discard_section_stabs): Comment typo fix. * bfd-in.h (bfd_elf_discard_info): Updata prototype. * bfd-in2.h: Regenerate. ld/ * emultempl/aarch64elf.em (gld${EMULATION_NAME}_after_allocation): Handle error status from bfd_elf_discard_info. * emultempl/armelf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/nios2elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/vms.em: Likewise.
2014-08-18Cast result of TC_PARSE_CONS_EXPRESSIONAlan Modra2-1/+5
* read.c (parse_mri_cons): Warning fix.
2014-08-18daily updateAlan Modra1-1/+1
2014-08-17daily updateAlan Modra1-1/+1
2014-08-15Add new argument NOSIDE to find_overload_match.Siva Chandra8-14/+146
This is a fix for PR c++/17132. If this new argument is set to EVAL_AVOID_SIDE_EFFECTS, then the object's memory will not be read while picking the best overload match. gdb/ * eval.c: Update all calls to find_overload_match. * valarith.c: Likewise. (value_user_defined_cpp_op, value_user_defined_op): New argument NOSIDE. Update all callers. * valops.c (find_overload_match): New argument NOSIDE. * value.h (find_overload_match): Update signature. gdb/testsuite * gdb.cp/pr17132.cc: New file. * gdb.cp/pr17132.exp: New file.
2014-08-15Fix xmethod Python so that it works with Python3.Siva Chandra4-11/+23
gdb/ * python/lib/gdb/command/xmethods.py (set_xm_status1): Use the 'items' methods instead of 'iteritems' method on dictionaries. gdb/testsuite/ * gdb.python/py-xmethods.py (A_getarrayind) (E_method_char_worker.__call__, E_method_int_worker.__call__): Use 'print' with function call syntax. (E_method_matcher.match): Fix tab vs space indentation mixup.
2014-08-16daily updateAlan Modra1-1/+1
2014-08-15(dwarf_decode_lines_1): Move definition of adj_opcode closer to use.Doug Evans2-1/+7
* dwarf2read.c (dwarf_decode_lines_1): Move definition of adj_opcode closer to use.
2014-08-15dwarf2read.c (dwarf_decode_lines_1): Add comment.Doug Evans2-0/+6
* dwarf2read.c (dwarf_decode_lines_1): Add comment.
2014-08-15Regenerate sim configury.Roland McGrath78-234/+1427
2014-08-15(dwarf_decode_lines_1): Delete local "column", unused.Doug Evans2-2/+5
* dwarf2read.c (dwarf_decode_lines_1): Delete local "column", unused.
2014-08-15(dwarf_decode_lines_1): Delete local basic_block, unused.Doug Evans2-4/+5
* dwarf2read.c (dwarf_decode_lines_1): Delete local basic_block, unused.
2014-08-15Avoid compiler warnings about incomplete parameter types.Eli Zaretskii2-0/+6
gdb/ChangeLog: * dcache.h: Include target.h, to avoid compile time warnings.
2014-08-15Add "frame.h" #include in gdbarch.h.Joel Brobecker3-2/+10
This include is needed because gdbarch_dummy_id needs the full definition of struct frame_id. gdb/ChangeLog: * gdbarch.sh: #include "frame.h" in gdbarch.h. Delete "struct frame_info" partial declaration. * gdbarch.h: Regenerate. Tested on x86_64-linux by rebuilding GDB.
2014-08-15Skip tfile.exp if unable to generate trace fileYao Qi2-0/+6
I added proc generate_tracefile in this patch https://sourceware.org/ml/gdb-patches/2014-03/msg00591.html but tfile.exp isn't skipped as changelog entry said: * gdb.trace/tfile.exp: Skip the test if generate_tracefile return 0. it is a mistake I made at the last minute. Patch below fixed it. gdb/testsuite: 2014-08-15 Yao Qi <yao@codesourcery.com> * gdb.trace/tfile.exp: Return -1 if generate_tracefile returns false.
2014-08-15daily updateAlan Modra1-1/+1
2014-08-15Set print symbol off in some testsYao Qi5-1/+17
GDB in default prints the symbol associated on an address, and tests assume that there is no symbol on address zero. However, on bare metal target, address may be mapped to zero and there may be a symbol. Then, some tests fail as below: print const_cast<void *> (0)^M $8 = (void *) 0x0 <_ftext>^M (gdb) FAIL: gdb.cp/casts.exp: const_cast of 0 p acp->c1^M $9 = (A *) 0x0 <_ftext>^M (gdb) FAIL: gdb.cp/class2.exp: p acp->c1 This patch is to set print symbol off in these tests, like what I did previously https://sourceware.org/ml/gdb-patches/2014-07/msg00257.html gdb/testsuite: 2014-08-15 Yao Qi <yao@codesourcery.com> * gdb.cp/casts.exp: Set print symbol off. * gdb.cp/class2.exp: Likewise. * gdb.cp/overload.exp: Likewise. * gdb.cp/templates.exp: Likewise.
2014-08-15Remove pst from dwarf_decode_lines_1Yao Qi2-3/+7
Hi, Parameter 'pst' of function dwarf_decode_lines_1 isn't used except to compute decode_for_pst_p, which has been got in the caller dwarf_decode_lines. I wonder it would be good if we just pass 'decode_for_pst_p'. gdb: 2014-08-15 Yao Qi <yao@codesourcery.com> * dwarf2read.c (dwarf_decode_lines_1): Remove parameter 'pst'. Add parameter 'decode_for_pst_p'. Callers update.
2014-08-14opcodes: blackfin: convert ad-hoc ints to bfd_booleanMike Frysinger2-21/+31
These various int fields are being used as booleans, so change to the existing bfd_boolean style. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-14opcodes: blackfin: simplify decode_CC2stat_0 logicMike Frysinger2-41/+11
These multiple if statements can be condensed down into a single if statement and an array of strings. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-14opcodes: blackfin: avoid duplicate memory readsMike Frysinger2-6/+10
Rather than reading the same memory twice, pass the value back up. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-14Fix for objdump segfault on broken PE executableAlan Modra2-17/+25
* peXXigen.c (pe_print_reloc): Protect against access past end of .reloc section.
2014-08-14Linker part of PR16563 fixAlan Modra7-54/+121
Presents .eh_frame input sections to the optimisation machinery in elf-eh-frame.c in the order they are given by the linker script. PR 16563 bfd/ * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab in the order they are mapped to output sections. ld/ * ldlang.c (map_head_is_link_order): Rename from stripped_excluded_sections. (lang_clear_os_map): New function, extracted from.. (strip_excluded_output_sections): ..here. * ldlang.h (lang_clear_os_map): Declare. * ldwrite.c (ldwrite): Call lang_clear_os_map. * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
2014-08-14configury changes to make ld plugin support controlled by --enable-pluginsAlan Modra21-1647/+1768
This also makes --enable-plugins default to on for hosts that can support plugins, so we have consistent lto toolchain support. The ACX_LARGEFILE moves aren't strictly necessary, but are harmless and will be necessary if plugin support is extended to more hosts via libtool's dlopen support. I started down that path then decided it was more work than I was interested in doing. (ACX_LARGEFILE invokes AC_PLUGINS.) config/ * plugins.m4: Test for dlfcn.h or windows.h here to set default for --enable-plugins. Report error if someone tries to enable plugins on a host we don't support. bfd/ * configure.ac: Delete redundant plugin related checks. * configure: Regenerate. binutils/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gas/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gprof/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * configure: Regenerate. * gconfig.in: Regenerate. ld/ * configure.ac: Move AC_PROG_CC and other macros earlier. Delete plugin checks now done in config/plugins.m4. * config.in: Regenerate. * configure: Regenerate.
2014-08-14Simplify is_ir_dummy_bfd testAlan Modra2-8/+8
is_ir_dummy_bfd started life before BFD_PLUGIN was invented. * plugin.c (is_ir_dummy_bfd): Test BFD_PLUGIN flag rather than flags.claimed.
2014-08-13Add option -no-pie.Sriraman Tallam2-1/+6
2014-08-14daily updateAlan Modra1-1/+1
2014-08-13bfd: or1k: avoid emitting R_OR1K_INSN_REL_26 in shared libsStefan Kristiansson2-18/+12
This fixes a bug where R_OR1K_INSN_REL_26 relocations would be emitted into shared libraries even when the referenced symbol was hidden or the symbol was contained in the same .so which had been linked with -Bsymbolic. bfd/ * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs, allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL and SYMBOLIC_BIND.
2014-08-13opcodes: blackfin: push down global stateMike Frysinger4-48/+92
The variables used to track insn state should be pushed down into the private_data structure to avoid pollution across calls. This also happens to fix the output when hitting comments/invalid insns which needs to tweak a gas test. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-13opcodes: blackfin: do not force align the PCMike Frysinger5-10/+22
If the user gives us an unaligned PC, then dump an error as such. Otherwise if you try to disassemble at an odd address, the output will look weird (it'll read one byte earlier). This can be seen in one of the gas tests where data is in the middle of .text, so move the data to .data like it should be in the first place. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-13opcodes: blackfin: handle memory read errorsMike Frysinger2-19/+45
The current code ignores memory read errors which isn't a great idea. So add a helper function which takes care of error checking and update the code to use that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-08-13This is necessary for adding __cxa_atexit support for Cygwin in GCC withoutYaakov Selkowitz2-0/+6
exporting __dso_handle from every DLL. * pe-dll.c (autofilter_entry_type autofilter_symbollist_i386): Add __dso_handle.
2014-08-13Fix build/17104Yao Qi3-0/+8
This patch is to fix the build error when GDB is configured as: CFLAGS=-Wall ./configure --with-babeltrace; make This patch adds one line of code in configure test to use local variable 'pos'. Note that we append -Werror to CFLAGS to catch the warning related to assignment to scope. See more in this thread https://sourceware.org/ml/gdb-patches/2014-08/msg00045.html 2014-08-13 Yao Qi <yao@codesourcery.com> PR build/17104 * configure.ac: Use local variable 'pos'. * configure: Regenerated.
2014-08-13daily updateAlan Modra1-1/+1
2014-08-12Remove type directiveH.J. Lu2-2/+5
* gas/i386/omit-lock.s: Remove type directive.
2014-08-13Fix non-ELF build breakageAlan Modra2-2/+6
* ldlang.c (open_input_bfds): Don't use bfd_elf_get_dyn_lib_class.
2014-08-12Tighten test for ld plugin supportAlan Modra2-1/+5
To not match spu --plugin option. * lib/ld-lib.exp (check_plugin_api_available): Match "-plugin PLUGIN".
2014-08-12Fix build breakage when ld plugins disabledAlan Modra5-16/+14
* ldlang.h (struct lang_input_statement_flags): Don't make "reload" field conditional on ENABLE_PLUGINS. * ldlang.c (open_input_bfds): Expand plugin_should_reload. * plugin.h (plugin_should_reload): Delete. * plugin.c (plugin_should_reload): Delete.
2014-08-12Change ld "notice" interface for better handling of indirect symbolsAlan Modra9-91/+128
The main aim of this change was to have non_ir_ref set correctly on new indirect symbols. I could have added a "copy" param to the "notice" function, so that indirect symbols could be created in plugin_notice, but it seemed cleaner to create indirect syms earlier and pass them rather than "string" to "notice". include/ * bfdlink.h (struct bfd_link_callbacks <notice>): Remove "string" param, add "inh". bfd/ * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice" here when not calling the generic add_symbol function. Formatting. Correct handling of indirect symbols. Update notice call. * elflink.c (_bfd_elf_notice_as_needed): Update notice call. * linker.c (_bfd_generic_link_add_one_symbol): Create indirect symbols early. Update notice call. Add comments regarding weak symbols vs. indirect. ld/ * ldmain.c (notice): Update args. * plugin.c (plugin_notice): Likewise. Follow warning sym link. Handle new indirect symbol.
2014-08-12missing changelogAlan Modra3-0/+14
2014-08-12Fix non-plugin warning symbol handlingAlan Modra3-1/+7
PR ld/16746 include/ * bfdlink.h (struct bfd_link_info): Add lto_plugin_active. bfd/ * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle !lto_plugin_active. ld/ * plugin.c (plugin_load_plugins): Set link_info.lto_plugin_active.
2014-08-11Delete "Loaded symbols for ..." message, it is redundant.Doug Evans4-9/+13
* solib.c (solib_read_symbols): Delete "Loaded symbols for ..." message, it is redundant with "Reading symbols from ..." message. testsuite/ * gdb.base/print-symbol-loading.exp (test_load_core): Update. (test_load_shlib): Update.
2014-08-12daily updateAlan Modra1-1/+1