aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-13Refactor Python "gdb" module into a proper Python package, by introducingYit Phang Khoo7-116/+205
a new "_gdb" module for code implemented in C, and using reload/__import__ instead of exec. gdb/ * python/lib/gdb/__init__.py: Import * from _gdb. (GdbOutputFile, sys.stdout, GdbOutputErrorFile, sys.stderr, prompt_hook, sys.argv): Moved from finish_python_initialization. (pretty_printers, PYTHONDIR): Moved from _initialize_python. (packages, auto_load_packages): New list and function replacing module_dict and auto-loading code, using __file__ instead of gdb.PYTHONDIR and reload/__import__ instead of exec. (GdbSetPythonDirectory): Replacing function of the same name from finish_python_initialization, using reload/__import__ instead of exec, as well as call auto_load_packages. * python/py-prettyprint.c (find_pretty_printer_from_gdb): Check gdb_python_module and not gdb_module. * python/python-internal.h (gdb_python_module): Declare. * python/python.c (gdb_python_module): New global. (before_prompt_hook): Check gdb_python_module and not gdb_module. (_initialize_python): Rename gdb module to _gdb. Move gdb.PYTHONDIR and gdb.pretty_printer to lib/gdb/__init__.py. (finish_python_initialization): Move Python code to lib/gdb/__init__.py; instead, set up sys.path and import gdb into __main__. gdb/testsuite/ * gdb.python/python.exp (Test stderr location): Update module location of GDB-specific sys.stderr. (Test stdout location): Ditto for sys.stdout.
2012-09-13gdb/doc/Jan Kratochvil2-6/+18
* gdbint.texinfo (Defining Other Architecture Features): Clarify *pcptr encoding for gdbarch_breakpoint_from_pc, bp_addr for gdbarch_push_dummy_call and bp_addr for gdbarch_push_dummy_code.
2012-09-132012-09-13 Pedro Alves <palves@redhat.com>Pedro Alves4-71/+246
* Makefile.in (COMMON_OBS): Add registry.o. * registry.c: New file. * registry.h (struct registry_container): Declare. (registry_data_callback): New typedef. (struct registry_data, struct registry_data_registration, struct registry_data_registry): New type. (register_data_with_cleanup, registry_alloc_data) (registry_callback_adaptor, registry_clear_data) (registry_container_free_data, registry_set_data, registry_data): Declare. (DEFINE_REGISTRY): Refactor structures and functions as shims over the new common structures and functions. (DECLARE_REGISTRY): Declare struct TAG ## _data. Use the tagged callback typedefs.
2012-09-13Really commit regenerated files.Richard Earnshaw2-0/+8
2012-09-13 * v850.igen (W,WWWW): Correct computation of register number.Nick Clifton2-14/+19
(JR32): Remove unnecessary comma. (cmovf.s): Register 0 is an invalid source register. (maddf.s): Remove bogus intermediary rounding. (nmaddf.s): Likewise. (trncf.sl): Remove bogus initial rounding. (trncf.dw): Likewise. (trncf.sl): Likewise. (trncf.sw): Likewise.
2012-09-13gdb/testsuite/Jan Kratochvil2-1/+4
* gdb.base/valgrind-infcall.exp: Remove comment about Ubuntu.
2012-09-13*** empty log message ***gdbadmin1-1/+1
2012-09-13daily updateAlan Modra1-1/+1
2012-09-12 * gdb.cp/converts.cc (main): Comment out the pointer to booleanKeith Seitz2-0/+13
conversion statement.
2012-09-122012-09-12 Doug Kwan <dougkwan@google.com>Doug Kwan2-6/+13
* elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted relocation for stub lookup.
2012-09-12 * target-reloc.h (scan_relocs): Call scan.local for relocsAlan Modra7-77/+208
against symbols in discarded sections. Pass is_discarded param. * arm.cc, * i386.cc, * sparc.cc, * x86_64.cc (Target_*::Scan::local): Add is_discarded param. * powerpc (Target_powerpc::Scan::local): Likewise. Use is_discarded to flag opd entry as discarded. Don't emit dyn relocs on such entries. (Target_powerpc::Scan::global): Similarly detect and handle such opd entries. (Powerpc_relobj): Replace opd_ent_shndx_ and opd_ent_off_ with opd_ent_. Update all uses. (Powerpc_relobj::get_opd_discard, set_opd_discard): New functions. (Target_powerpc::relocate_section): Zero out discarded opd entry relocs.
2012-09-12* emulparams/elf32rx.sh (OTHER_READONLY_SECTIONS): Add W_* sections.DJ Delorie2-1/+5
2012-09-12* gdb/remote.c (remote_insert_hw_breakpoint): Throw exception ifMike Wrighton3-14/+55
there is an error inserting hardware breakpoints and use the error message from the target. * gdb/breakpoint.c (insert_bp_location, insert_breakpoint_locations): Catch this exception and print the error message contained within. Do not print the default hardware error breakpoint message in this case.
2012-09-12 * dwarf2read.c (dwarf2_read_addr_index): Fix handling the case whereDoug Evans2-3/+11
cu == NULL.
2012-09-12 * gdb.base/help.exp: Remove testing of individual command help text,Doug Evans2-640/+68
too much of a maintenance burden. Instead, test the functionality of "help" itself.
2012-09-12 PR gold/14570Ian Lance Taylor4-61/+110
* output.cc: Rename Output_data_got template parameter from size to got_size for all functions. Compile all variants of Output_data_got. (Output_data_got::Got_entry::write): Correct use of size for symbol value. Use local_is_tls rather than casting to Sized_relobj_file. * object.h (class Object): Add local_is_tls and do_local_is_tls. (class Sized_relobj_file): Add do_local_is_tls. * incremental.h (class Sized_relobj_incr): Add do_local_is_tls.
2012-09-122012-09-11 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>Richard Earnshaw17-55/+250
bfd/ * bfd-in2.h: Regenerated. * elf64-aarch64.c (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO. (elf64_aarch64_reloc_map): Add reloc entry. (aarch64_resolve_relocation): Likewise. (bfd_elf_aarch64_put_addend): Likewise. (aarch64_reloc_got_type): Likewise. (elf64_aarch64_final_link_relocate): Likewise. (lf64_aarch64_check_relocs): Likewise. (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21 reloc. * libbfd.h: Regenerated. * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc. gas/ * config/tc-aarch64.c (reloc_table): Add reloc to table entry. (parse_address_main): Add support for #:<reloc_op>:<symbol>. (parse_operands): Check for unused reloc. (md_apply_fix): New case for reloc. (aarch64_force_relocation): Likewise. gas/testsuite * gas/aarch64/reloc-insn.d (BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test. * gas/aarch64/reloc-insn.s (BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc. include/ * elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc. ld/testsuite * ld-aarch64/aarch64-elf.exp: New reloc tests. * ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test failure (lower bound overflow). * ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test success (lower bound). * ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test failure (upper bound overflow). * ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test success (upper bound). * ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
2012-09-12*** empty log message ***gdbadmin1-1/+1
2012-09-12daily updateAlan Modra1-1/+1
2012-09-11 * dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examineDoug Evans2-6/+17
.gdb_index symbol attributes if there are none.
2012-09-11 * gdb.cp/mb-inline.exp: Do "info break" after setting multi-locationDoug Evans2-0/+8
breakpoint.
2012-09-11Name of symbol missing when printing global variable's addressJoel Brobecker5-5/+32
The build_address_symbolic funnction filters out data symbols if their size is set to zero. But the problem is that the COFF symbol table (for instance) does not provide any size information, leaving the size to its default value of zero, thus always triggering the filter. This shows up when trying to print the address of a global variable when debugging a Windows executable, for instance. gdb/ChangeLog: * symtab.h (struct minimal_symbol) [has_size]: New field. (MSYMBOL_SIZE): Adjust to forbid macro from being used as lvalue. (SET_MSYMBOL_SIZE, MSYMBOL_HAS_SIZE): New macros. * printcmd.c (build_address_symbolic): Only filter out zero-sized minimal symbols if the symbol's size is actually known. * minsyms.c (prim_record_minimal_symbol_full): Adjust setting of msymbol's size field. Add comment. * elfread.c (elf_symtab_read, elf_rel_plt_read): Use SET_MSYMBOL_SIZE to set the minimal symbol size.
2012-09-11install_minimal_symbols: use memset instead of setting each field.Joel Brobecker2-7/+7
gdb/ChangeLog: * minsyms.c (install_minimal_symbols): Use memset to fill entire minimal_symbol struct object, rather than setting some of its fields one by one.
2012-09-11 PR gas/13503Denis Chertykov2-1/+11
* config/tc-avr.h (TC_VALIDATE_FIX): Skip: BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HLO.
2012-09-11 * gdb.dwarf2/fission-base.S: Include gdb.dwarf2/ in dwo_name.Doug Evans5-36/+32
* gdb.dwarf2/fission-reread.S: Ditto. * gdb.dwarf2/fission-base.exp: Remove setting of debug-file-directory. * gdb.dwarf2/fission-reread.exp: Ditto.
2012-09-11http://sourceware.org/ml/gdb-patches/2012-09/msg00013.htmlAndrew Burgess4-1/+12
gdb/ChangeLog: * c-typeprint.c (c_type_print_varspec_prefix): Pass through the passed_a_ptr flag when displaying typedef types. gdb/testsuite/ChangeLog: * gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
2012-09-11 * Makefile.am (bootstrap): Add $EXEEXT to dependency.Alan Modra3-2/+7
* Makefile.in: Regenerate.
2012-09-11 PR gprof/13836Alan Modra2-1/+6
* fsf_callg_bl.m: Fix typo.
2012-09-11*** empty log message ***gdbadmin1-1/+1
2012-09-11daily updateAlan Modra1-1/+1
2012-09-10missed from 2012-08-15 changeAlan Modra1-387/+387
2012-09-10 PR gold/14566Alan Modra3-3/+15
* layout.cc (Layout::set_segment_offsets): When using common-page-size alignment, ensure we are on a new max-page-size page. * output.cc (Output_segment::set_section_addresses): Use abi_pagesize, not common_pagesize for relro boundary. (Output_segment::set_offset): Likewise.
2012-09-10 * output.h (Output_data_got::add_global_tls, add_local_tls,Alan Modra9-59/+242
add_local_tls_pair): New functions. (Output_data_got::add_local_pair_with_rel): Remove second reloc param. Expand comment. (Output_data_got::Got_entry): Rename use_plt_offset_ to use_plt_or_tls_offset_, similarly for constructor param. (Output_data_got::Got_entry::write): Add got_index param. * output.cc (Output_data_got::add_global_tls, add_local_tls, add_local_tls_pair): New functions. (Output_data_got::Got_entry::write): Handle tls symbols with use_plt_or_tls_offset_ set specially. (Output_data_got::add_local_pair_with_rel): Only one reloc. (Output_data_got::do_write): Replace iterator with index, pass index to entry write function. * target.h (Target::tls_offset_for_local, tls_offset_for_global, do_tls_offset_for_local, do_tls_offset_for_global): New functions. * arm.cc (Target_arm::Scan::local): Update add_local_pair_with_rel call. * i386.cc (Target_i386::Scan::local): Likewise. * sparc.cc (Target_sparc::Scan::local): Likewise. * x86_64.cc (Target_x86_64::Scan::local): Likewise. * powerpc.cc (Target_powerpc::do_tls_offset_for_local, do_tls_offset_for_global): New functions. (Target_powerpc::Scan::local): Correct TLS relocations and got entry values. (Target_powerpc::Scan::global): Don't emit unnecessary dynamic relocations on TLS GOT entries.
2012-09-10 * config.in: Disable sanity check for kfreebsd.Alan Modra12-6/+30
2012-09-10crash printing optimized out variant typeJoel Brobecker5-0/+69
Assuming the following declarations: type Discriminants_Record (A : Integer; B : Boolean) is record C : Float; end record; Z : Discriminants_Record := (A => 1, B => False, C => 2.0); If variable Z is not used, and the compiler optimizes it out, GDB would crash as follow: (gdb) print Z /[...]/gdb/valops.c:1121: internal-error: Unexpected lazy value type. This is because the ada-lang module forgot to set the optimized_out flag in the value returned by ada_evaluate_subexp during the value's "fixing" process. Later on, when trying to print the resulting value, GDB finds that the value is still lazily allocated, and thus tries to fetch it. But this is not allowed for not_lval values, hence the internal error. gdb/ChangeLog: * ada-lang.c (coerce_unspec_val_to_type): Make sure that the optimized_out flag is preserved. gdb/testsuite/ChangeLog: * gdb.ada/optim_drec: New testcase.
2012-09-10Fix function prologue analyzer for moxie.Anthony Green2-6/+11
2012-09-102012-09-10 Sterling Augustine <saugustine@google.com>Sterling Augustine3-14/+33
* gdb-index.cc (Gdb_index::pubnames_read): New parameter. (Gdb_index::pubtypes_read): New parameter. (Gdb_index_info_reader::read_pubnames_and_pubtypes): Add parameters to calls. * gdb-index.h (Gdb_index): New fields pubnames_object_ and pubtypes_object_.
2012-09-10 * boards/fission.exp: Explicitly mark "board" as not remote.Doug Evans2-0/+9
2012-09-10 PR gdb/13483Keith Seitz6-7/+73
* 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-09-10Regenerate binutils configureH.J. Lu12-40/+106
bfd/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. binutils/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. etc/ 2010-11-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * Makefile.in (install-strip): New target. gas/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. gold/ 2012-09-09 Alan Modra <amodra@gmail.com> * target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions. gprof/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. intl/ 2010-06-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> PR bootstrap/44621 ld/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. libiberty/ 2011-08-28 H.J. Lu <hongjiu.lu@intel.com> * argv.c (dupargv): Replace malloc with xmalloc. Don't check opcodes/ 2012-09-10 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated.
2012-09-10 * configure.tgt (powerpc-*-elf, et al): Define targ_extra_libpath.Alan Modra2-7/+17
Correct whitespace. (powerpcle-*-elf, et al): Likewise. Correct targ_extra_emuls.
2012-09-10 * configure.tgt (powerpc-*-elf, et al): Define targ64_extra_emulsIain Sandoe2-2/+14
and targ64_extra_libpath. (powerpcle-*-elf, et al): Likewise.
2012-09-10daily updateAlan Modra1-1/+1
2012-09-10*** empty log message ***gdbadmin1-1/+1
2012-09-09 * ld-mmix/sec-1.d, ld-mmix/sec-3.d: Force end-of-section symbolsHans-Peter Nilsson23-4/+352
to be emitted and checked. * ld-mmix/data-1.s, ld-mmix/orph-.d, ld-mmix/orph-awp.d, ld-mmix/orph-d-a.d, ld-mmix/orph-d-awn.d, ld-mmix/orph-d-awp.d, ld-mmix/orph-d-awpe.d, ld-mmix/orph-d.d, ld-mmix/orph-dc-ap.d, ld-mmix/orph-dc-awp.d, ld-mmix/orph-dc.d, ld-mmix/tm-ae.s, ld-mmix/tm-ape.s, ld-mmix/tm-awne.s, ld-mmix/tm-awpe.s, ld-mmix/tm-d-ap.s, ld-mmix/tm-d-awp.s, ld-mmix/tm-d.s, ld-mmix/tm-e.s, ld-mmix/tm-orph1.s: New test files.
2012-09-09 * emultempl/mmo.em (mmo_place_orphan): Rewrite to also attachHans-Peter Nilsson3-66/+148
orphan sections to .data and .bss output sections, not just .text. When giving up on finding a suitable output section, attach to any output section other than .MMIX.reg_contents, if it exists. * scripttempl/mmo.sc: Move output debug sections to just before .MMIX.reg_contents. Add .gnu.attributes. Add new . = . NOP assignments and move end-of-section provide-symbols after them to force the end-of-section symbols to the address after orphan placement. Add SORT_NONE to .init and .fini sections.
2012-09-09 * target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.Alan Modra6-43/+215
(Sized_target::gc_add_reference, do_gc_add_reference): New functions. * gc.h (gc_process_relocs): Call target gc_add_reference. * gold.cc (queue_middle_tasks): Use gc_mark_symbol on start sym. * symtab.cc (Symbol_table::gc_mark_undef_symbols): Use gc_mark_symbol. (Symbol_table::gc_mark_symbol): Call target gc_mark_symbol. Remove unnecessary cast. * powerpc.cc (Powerpc_relobj::get_opd_ent): Rearrange parameters to cater for when we don't need code offset. Update use. (Powerpc_relobj::access_from_map_, opd_valid_): New vars. (Powerpc_relobj::access_from_map, add_reference, opd_valid, set_opd_valid): New functions. (Target_powerpc::do_gc_add_reference): New function. (Target_powerpc::gc_process_relocs): Call gc()->add_reference on stashed refs. (Target_powerpc::do_gc_mark_symbol): New function.
2012-09-09*** empty log message ***gdbadmin1-1/+1
2012-09-09daily updateAlan Modra1-1/+1
2012-09-082012-09-08 Khoo Yit Phang <khooyp@cs.umd.edu>Yit Phang Khoo5-4/+18
Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to avoid spurious results due to ~/.gdbinit. * gdb.gdb/complaint.exp (setup_test): Replace -nw option with $INTERNAL_GDBFLAGS in run command. * gdb.gdb/observer.exp (setup_test): Ditto. * gdb.gdb/selftest.exp (test_with_self): Ditto. * gdb.gdb/xfullpath.exp (setup_test): Ditto.