Yit Phang Khoo
037bbc8eea
Enable readline in Python in a GDB-specific way and block the
...
standard Python readline module to prevent conflicts with GDB.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-gdb-readline.o.
(SUBDIR_PYTHON_SRCS): Add python/py-gdb-readline.c.
(py-gdb-readline.o): Add rule to compile python/py-gdb-readline.c.
* python/py-gdb-readline.c: New file.
* python/python-internal.h (gdbpy_initialize_gdb_readline): New
prototype.
* python/python.c (_initialize_python): Call
gdbpy_initialize_gdb_readline.
2012-08-22 21:04:55 +00:00
Keith Seitz
406b1477f5
* defs.h: Include build-gnulib/config.h
...
* server.h: Include build-gnulib-gbserver/config.h.
* gdbreplay.c: Likewise.
2012-08-22 20:04:05 +00:00
Joseph Myers
6ca1b14767
* arm-tdep.c (thumb_get_next_pc_raw): Mask off low bits for bx pc
...
and blx pc.
testsuite:
* gdb.arch/thumb-bx-pc.S: New file.
* gdb.arch/thumb-bx-pc.exp: New file.
2012-08-22 19:47:58 +00:00
Yit Phang Khoo
8315665ec1
Add a new "python-interactive" command that starts a standard
...
Python interactive prompt with "pi" as alias, and add "py" as
an alias to "python".
* NEWS: Mention the new commands.
* doc/gdb.texinfo (Python Commands): Document the new
commands.
* python/python.c (eval_python_command): New function.
(python_interactive_command): For "python-interactive" with
arguments, call eval_python_command. For "python-interactive"
without arguments, call PyRun_InteractiveLoop.
(_initialize_python): Add "python-interactive" command with
"pi" as alias, and add "py" as an alias to "python".
2012-08-22 19:15:15 +00:00
Cary Coutant
1e2bee4f5f
2012-08-22 Cary Coutant <ccoutant@google.com>
...
gold/
* layout.cc (Layout::include_section): Don't assert on GROUP
sections with --emit-relocs.
2012-08-22 18:26:32 +00:00
Tom Tromey
522002f96c
* defs.h (quit_flag): Don't declare.
...
(clear_quit_flag, check_quit_flag, set_quit_flag): Declare.
(QUIT): Use new functions.
* event-top.c (command_handler): Use clear_quit_flag.
(handle_sigint): Use set_quit_flag.
(async_request_quit): Use check_quit_flag. Don't check
immediate_quit.
* exceptions.c (throw_exception): Use clear_quit_flag.
* main.c (captured_main): Use clear_quit_flag.
* python/python.c (clear_quit_flag, set_quit_flag)
(check_quit_flag): New functions.
* remote-sim.c (gdb_os_poll_quit): Use check_quit_flag,
clear_quit_flag.
* remote.c (remote_wait_as): Use check_quit_flag,
clear_quit_flag.
(remote_start_remote): Call QUIT.
* symfile.c (load_progress): Use check_quit_flag.
* top.c (command_loop): Use clear_quit_flag.
(command_line_input): Call QUIT.
* utils.c (quit_flag): Conditionally define.
(clear_quit_flag, check_quit_flag, set_quit_flag): New
functions.
(prompt_for_continue): Call QUIT. Use quit, not
async_request_quit.
* remote-mips.c (mips_expect_timeout): Call QUIT.
* monitor.c (monitor_expect): Call QUIT.
2012-08-22 17:48:55 +00:00
Tom Tromey
b583003e10
* event-top.c (sigwinch_token, handle_sigwinch): Remove.
...
(async_init_signals): Update.
* utils.c (init_page_info): Don't use SIGWINCH_HANDLER.
(SIGWINCH_HANDLER_BODY): Remove.
gdb/doc
* gdbint.texinfo (Host Definition): Remove documentation for
SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY.
2012-08-22 17:31:45 +00:00
Tom Tromey
e1507e953e
* jit.c (jit_object_close_impl): Don't malloc the objfile
...
name.
* objfiles.c (allocate_objfile): Don't malloc the objfile
name.
(free_objfile): Don't free the objfile name.
* objfiles.h (struct objfile) <name>: Update comment.
* symfile.c (reread_symbols): Fix reference counting. Don't
malloc objfile name.
2012-08-22 16:44:45 +00:00
Tom Tromey
1c00ec6b06
* windows-nat.c (windows_make_so): Use gdb_bfd_open.
...
* symfile.c (bfd_open_maybe_remote): Use gdb_bfd_open.
(symfile_bfd_open): Likewise.
(generic_load): Likewise.
* solib.c (solib_bfd_fopen): Use gdb_bfd_open.
* solib-pa64.c (pa64_solib_create_inferior_hook): Use
gdb_bfd_open.
* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
Use gdb_bfd_open.
* rs6000-nat.c (add_vmap): Use gdb_bfd_open.
* remote-mips.c (mips_load_srec): Use gdb_bfd_open.
(pmon_load_fast): Likewise.
* remote-m32r-sdi.c (m32r_load): Use gdb_bfd_open.
* procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_open.
* machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_open.
(macho_check_dsym): Likewise.
* m32r-rom.c (m32r_load): Use gdb_bfd_open.
(m32r_upload_command): Likewise.
* gdb_bfd.h (gdb_bfd_cache): Declare.
* gdb_bfd.c (struct gdb_bfd_data): New.
(gdb_bfd_cache): New global.
(struct gdb_bfd_cache_search): New.
(hash_bfd): New function.
(eq_bfd): Likewise.
(gdb_bfd_open): Likewise.
(gdb_bfd_ref): Allocate a gdb_bfd_data and attach to the BFD.
(gdb_bfd_unref): Remove closed BFD from cache. Update for
gdb_bfd_data.
* exec.c (exec_file_attach): Use gdb_bfd_open.
* dsrec.c (load_srec): Use gdb_bfd_open.
2012-08-22 16:24:39 +00:00
Tom Tromey
6532ff3697
* dwarf2read.c (macro_start_file): Update.
...
* objfiles.c (get_objfile_bfd_data): Initialize macro_cache.
(free_objfile_per_bfd_storage): Destroy macro_cache.
(allocate_objfile, free_objfile): Update.
* objfiles.h (struct objfile_per_bfd_storage) <macro_cache>:
New field.
(struct objfile) <macro_cache>: Remove.
* symfile.c (reread_symbols): Update.
* symmisc.c (print_symbol_bcache_statistics): Update.
(print_objfile_statistics): Update.
2012-08-22 16:12:50 +00:00
Tom Tromey
706e37059f
* elfread.c (elf_symtab_read): Update.
...
* objfiles.c (objfiles_bfd_data): New global.
(get_objfile_bfd_data, free_objfile_per_bfd_storage)
(objfile_bfd_data_free, set_objfile_per_bfd): New functions.
(allocate_objfile, free_objfile): Update.
(_initialize_objfiles): Initialize objfiles_bfd_data.
* objfiles.h (struct objfile_per_bfd_storage): New.
(struct objfile) <per_bfd>: New field.
<filename_cache>: Remove.
(set_objfile_per_bfd): Declare.
* symfile.c (reread_symbols): Update. Call
set_objfile_per_bfd.
(allocate_symtab): Update.
* symmisc.c (print_symbol_bcache_statistics): Update.
(print_objfile_statistics): Print the size of the BFD obstack.
gdb/testsuite
* gdb.base/maint.exp: Update.
2012-08-22 16:01:09 +00:00
Tom Tromey
e992eda4f6
* gdb_bfd.h: Include registry.h. Use DECLARE_REGISTRY.
...
* gdb_bfd.c: Use DEFINE_REGISTRY.
(struct gdb_bfd_data): Add REGISTRY_FIELDS.
(gdb_bfd_ref): Call bfd_alloc_data.
(gdb_bfd_unref): Call bfd_free_data.
2012-08-22 15:50:38 +00:00
Tom Tromey
6b81941e35
* registry.h (struct registry_fields): New.
...
(REGISTRY_FIELDS): Redefine.
(REGISTRY_ACCESS_FIELD): New macro.
(DEFINE_REGISTRY): Add ACCESS argument. Update defined
functions.
2012-08-22 15:31:12 +00:00
Tom Tromey
8e260fc026
* auto-load.c (_initialize_auto_load): Update.
...
* solib-svr4.c (_initialize_svr4_solib): Update
* solib-dsbt.c (_initialize_dsbt_solib): Update.
* solib-darwin.c (_initialize_darwin_solib): Update.
* registry.h: New file.
* python/py-progspace.c (gdbpy_initialize_pspace): Update.
* python/py-inferior.c (gdbpy_initialize_inferior): Update.
* progspace.h: Include registry.h. Use DECLARE_REGISTRY.
(register_program_space_data_with_cleanup)
(register_program_space_data, program_space_alloc_data)
(clear_program_space_data, set_program_space_data)
(program_space_data): Don't declare.
* progspace.c: Use DEFINE_REGISTRY.
(struct program_space_data, struct
program_space_data_registration, struct
program_space_data_registry, program_space_data_registry)
(register_program_space_data_with_cleanup)
(register_program_space_data, program_space_alloc_data)
(program_space_free_data, clear_program_space_data)
(set_program_space_data, program_space_data): Remove.
* objfiles.h: Include registry.h. Use DECLARE_REGISTRY.
(struct objfile) <data, num_data>: Replace with REGISTRY_FIELDS.
(register_objfile_data_with_cleanup, register_objfile_data)
(clear_objfile_data, set_objfile_data, objfile_data): Don't
declare.
* objfiles.c: Use DEFINE_REGISTRY.
(struct objfile_data, struct objfile_data_registration, struct
objfile_data_registry, objfile_data_registry)
(register_objfile_data_with_cleanup, register_objfile_data)
(objfile_alloc_data, objfile_free_data, clear_objfile_data)
(set_objfile_data, objfile_data): Remove.
(_initialize_objfiles): Update.
* jit.c (_initialize_jit): Update.
* inflow.c (_initialize_inflow): Update.
* inferior.h: Include registry.h. Use DECLARE_REGISTRY.
(struct inferior) <data, num_data>: Replace with REGISTRY_FIELDS.
(register_inferior_data_with_cleanup, register_inferior_data)
(clear_inferior_data, set_inferior_data, inferior_data): Don't
declare.
* inferior.c: Use DEFINE_REGISTRY.
(struct inferior_data, struct inferior_data_registration, struct
inferior_data_registry, inferior_data_registry)
(register_inferior_data_with_cleanup, register_inferior_data)
(inferior_alloc_data, inferior_free_data clear_inferior_data)
(set_inferior_data, inferior_data): Remove.
* auxv.c (_initialize_auxv): Update.
* ada-lang.c (_initialize_ada_language): Update.
* breakpoint.c (_initialize_breakpoint): Update.
* i386-nat.c (i386_use_watchpoints): Update.
2012-08-22 15:17:21 +00:00
Tom Tromey
ed9eebafbc
* exec.c (exec_close, exec_file_attach): Update.
...
(add_to_section_table): Initialize 'key' field.
(add_target_sections, remove_target_sections): Add 'key' argument.
* exec.h (add_target_sections, remove_target_sections): Add
'key' argument.
* solib.c (solib_map_sections, update_solib_list, clear_solib)
(reload_shared_libraries_1): Update.
* target.h (struct target_section) <key>: New field.
2012-08-22 15:01:50 +00:00
Tom Tromey
b4893d4828
* lib/gdb.exp (skip_unwinder_tests): New proc.
...
* gdb.cp/nextoverthrow.exp: Use skip_unwinder_tests.
* gdb.java/jnpe.exp: Use skip_unwinder_tests.
2012-08-22 14:27:49 +00:00
Tom Tromey
2f2e97fabc
* cli/cli-cmds.c (filter_sals): Handle nelts == 0 case.
2012-08-22 14:24:05 +00:00
Nick Clifton
da2bb5602c
Move aarch64 announcement into 2.23 section.
2012-08-22 07:35:36 +00:00
gdbadmin
f3523bc0fc
*** empty log message ***
2012-08-22 00:00:34 +00:00
Alan Modra
44de515932
daily update
2012-08-22 00:00:04 +00:00
David S. Miller
2c63854f55
Fix sparc opcode encoding for 4-arg crypto instructions.
...
include/opcode
* sparc.h (F3F4): New macro.
opcodes
* sparc-opc.c (4-argument crypto instructions): Fix encoding using
F3F4 macro.
gas/testsuite
* gas/sparc/crypto.d: Fix opcodes for 4-arg crypto instructions.
2012-08-21 23:00:36 +00:00
Cary Coutant
1d5dfe78f9
2012-08-21 Cary Coutant <ccoutant@google.com>
...
gold/
* symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert
if --export-dynamic-symbol names an undef symbol.
2012-08-21 21:41:04 +00:00
Tom Tromey
45b7da814b
* gdb.hp/gdb.aCC/exception.exp: Remove.
2012-08-21 19:36:47 +00:00
Pierre Muller
b3dbbd6f40
* symfile.c (allocate_symtab): Use host_address_to_string
...
function instead of cast of pointer to long which is not
compatible with x86_64-w64-mingw32 build.
2012-08-21 15:43:46 +00:00
gdbadmin
3c65f4f9ff
*** empty log message ***
2012-08-21 00:00:32 +00:00
Alan Modra
8fdefd9836
daily update
2012-08-21 00:00:05 +00:00
Tom Tromey
06e7acd76f
* vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
...
areltdata.
* opncls.c (_bfd_delete_bfd): Free arelt_data.
* mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
areltdata.
* ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
* coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
areltdata.
(xcoff_write_archive_contents_old): Likewise.
(xcoff_write_archive_contents_big): Likewise.
* archive64.c (bfd_elf64_archive_slurp_armap): Use free for
areltdata.
* archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
free for areltdata.
(_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
failure.
(do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
(do_slurp_coff_armap): Likewise.
(_bfd_slurp_extended_name_table): Likewise.
(bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
2012-08-20 14:32:31 +00:00
H.J. Lu
542385d9f7
Replace --n32 with --x32
...
* doc/as.texinfo: Replace --n32 with --x32.
2012-08-20 13:57:05 +00:00
Alan Modra
e67ed0e885
opcodes/ChangeLog
...
* ppc-opc.c (powerpc_opcodes): Changed opcode for vabsdub,
vabsduh, vabsduw, mviwsplt.
gas/testsuite/ChangeLog
* gas/ppc/e6500.d: Changed opcode for vabsdub, vabsduh, vabsduw,
mviwsplt.
2012-08-20 03:20:24 +00:00
Alan Modra
f1d4a2242f
daily update
2012-08-20 00:00:04 +00:00
gdbadmin
10ca2ade2f
*** empty log message ***
2012-08-20 00:00:03 +00:00
Andrew Pinski
f94363d720
2012-08-19 Andrew Pinski <apinski@cavium.com>
...
* mips-tdep.c (is_octeon): New function.
(is_octeon_bbit_op): New function.
(mips32_next_pc): Handle Octeon's bbit instructions.
(mips32_instruction_has_delay_slot): Likewise.
012-08-19 Andrew Pinski <apinski@cavium.com>
* gdb.arch/mips-octeon-bbit.c: New file.
* gdb.arch/mips-octeon-bbit.exp: New Test.
2012-08-19 22:22:49 +00:00
Andrew Pinski
78a59c2fea
2012-08-19 Andrew Pinski <apinski@cavium.com>
...
* mips-tdep.c (mips32_next_pc): Fix line spacing of the comment
before the function.
2012-08-19 22:21:21 +00:00
Andrew Pinski
4f5bcb5090
2012-08-19 Andrew Pinski <apinski@cavium.com>
...
* mips-tdep.c (mips32_next_pc): Consolidate calls to itype_op.
2012-08-19 22:20:29 +00:00
Keith Seitz
e5afdbd7a0
PR c++/14365
...
* c-typeprint.c (c_type_print_varspec_prefix): Pass
-1 for SHOW to c_type_print_base for METHODPTR and MEMBERPTR.
* gdb.dwarf2/dw2-anon-mptr.exp: New file.
* gdb.dwarf2/dw2-anon-mptr.S: New file.
2012-08-19 19:37:51 +00:00
Alan Modra
f8aa133dce
daily update
2012-08-19 00:00:04 +00:00
gdbadmin
ac48ea5691
*** empty log message ***
2012-08-19 00:00:03 +00:00
Alan Modra
c9269dff67
* powerpc.cc: Formatting and white space.
...
(Powerpc_relobj): Rename got2_section_ to special_.
Add opd_ent_shndx_ and opd_ent_off_ vectors.
(Powerpc_relobj::opd_shndx, init_opd, get_opd_ent, set_opd_ent,
scan_opd_relocs, do_read_relocs, opd_ent_ndx): New functions.
(Target_powerpc): Add Address typedef and invalid_address. Use
throughout.
(Target_powerpc::is_branch_reloc): New function.
(Powerpc_relocate_functions): Add Address typedef, use throughout.
(Powerpc_relocate_functions:rela, rela_ua): Correct type used
for dst_mask, value and addend.
(Powerpc_relobj::do_find_special_sections): Find .opd for 64-bit.
(ld_2_1, cror_15_15_15, cror_31_31_31): New insn constants.
(Output_data_glink::do_write): Correct toc base. Don't try to use
uint16_t for 24-bit offset. Use get_output_section_offset and
check return.
(Target_powerpc::Scan::local): Handle more relocs.
(Target_powerpc::do_finalize_sections): Set up DT_PPC64_GLINK.
(Target_powerpc::Relocate::relocate): Correct toc base calculation.
Plug in toc restoring insn after plt calls. Translate branches
to function descriptor symbols to corresponding entry point.
(Target_powerpc::relocate_for_relocatable): Check return from
get_output_section_offset.
* symtab.h: Comment typo.
2012-08-18 11:12:50 +00:00
Eli Zaretskii
13c9750ebf
Fix a typo that prevented "make TAGS" from working.
...
gdb/Makefile.in (HFILES_NO_SRCDIR): Fix a typo: golang.h -> go-lang.h.
The typo broke "make TAGS".
2012-08-18 11:00:37 +00:00
Jan Kratochvil
c29e8b6460
gdb/testsuite/
...
* gdb.base/solib-corrupted.exp (make solibs looping): Replace
verbose -log by more specific untested call.
2012-08-18 07:02:09 +00:00
Yao Qi
15a7e7bcb1
gdb/testsuite/
...
* gdb.trace/tfind.exp: Move tests on various command help before
checking target supports trace.
Fix the expected output of 'help tfind end'.
2012-08-18 01:00:19 +00:00
H.J. Lu
eb4dc530cb
Remove extra verbose before binutils_run
...
* binutils-all/ar.exp (long_filenames): Remove extra verbose
before binutils_run.
(thin_archive): Likewise.
(thin_archive_with_nested): Likewise. Also run bfdtest1 on
$archive2.
2012-08-18 00:18:31 +00:00
Alan Modra
1df9735d1c
daily update
2012-08-18 00:00:05 +00:00
gdbadmin
91742a8b5d
*** empty log message ***
2012-08-18 00:00:03 +00:00
Andreas Schwab
e372c21ce5
* floatformat.c (floatformat_to_double): Correctly handle numbers
...
between 1 and 2. Simplify handling of denormal number.
(main): Test with 1.1.
2012-08-17 21:59:31 +00:00
gdbadmin
db7618108f
GDB 7.5 released.
2012-08-17 18:41:46 +00:00
Keith Seitz
a451cb65e3
PR c++/13356
...
* gdbtypes.c (strict_type_checking): New variable.
(show_strict_type_checking): New function.
(rank_one_type): Return NS_POINTER_INTEGER_CONVERSION_BADNESS
if strict type checking is disabled.
(_initialize_gdbtypes): Add "check type" subcommand.
* gdbtypes.h (NS_INTEGER_POINTER_CONVERSION_BADNESS): New struct.
PR c++/13356
* gdb.base/default.exp: Update all "check type" tests.
* gdb.base/help.exp: Likewise.
* gdb.base/setshow.exp: Likewise.
* gdb.cp/converts.cc (foo1_type_check): New function.
(foo2_type_check): New function.
(foo3_type_check): New function.
(main): Call new functions.
* converts.exp: Add tests for integer-to-pointer conversions
with/without strict type-checking.
PR c++/13356
* gdb.texinfo (Type and Range Checking): Remove warning.
Remove spurious commas.
Update text and examples for re-implementation of set/show
check type.
(C and C++ Type and Range Checks): Likewise.
* language.h (type_mode): Remove.
(type_check): Remove.
(struct language_defn): Remove la_type_check.
(STRICT_TYPE): Remove unused macro.
(type_error): Remove.
* language.c (set_type_range_case): Renamed to ...
(set_range_case): ... this. Update all callers.
Remove type_mode/type_check.
(type_mode): Remove.
(type_check): Remove.
(show_type_command): Remove.
(set_type_command): Remove.
(language_info): Remove type checking output.
(type_error): Remove unused function.
(range_error): Update comment.
(unknown_language_defn): Remove la_type_check.
(auto_language_defn): Likewise.
(local_language_defn): Likewise.
(_initialize_language): Remove "check type" subcommand.
* ada-lang.c (ada_language_defn): Remove la_type_check.
* c-lang.c (c_language_defn): Likewise.
(cplus_language_defn): Likewise.
(asm_language_defn): Likewise.
(minimal_language_defn): Likewise.
* d-lang.c (d_language_defn): Likewise.
* f-lang.c (f_language_defn): Likewise.
* go-lang.c (go_language_defn): Likewise.
* jv-lang.c (java_language_defn): Likewise.
* m2-lang.c (m2_language_defn): Likewise.
* objc-lang.c (objc_language_defn): Likewise.
* opencl-lang.c (opencl_language_defn): Likewise.
* p-lang.c (pascal_language_defn): Likewise.
2012-08-17 17:37:03 +00:00
H.J. Lu
7b458c12dc
Add AMD btver1 and btver2 support
...
gas/
2012-08-17 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
* config/tc-i386.c (cpu_arch): Add CPU_BTVER1_FLAGS and
CPU_BTVER2_FLAGS.
(i386_align_code): Add case for PROCESSOR_BT.
* config/tc-i386.h (enum processor_type): Add PROCESSOR_BT.
* doc/c-i386.texi: Add -march={btver1, btver2} options.
gas/testsuite/
2012-08-17 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
* gas/i386/i386.exp: Run btver1 and btver2 test cases.
* gas/i386/nops-1-btver1.d: New.
* gas/i386/nops-1-btver2.d: New.
* gas/i386/arch-10-btver1.d: New.
* gas/i386/arch-10-btver2.d: New.
* gas/i386/x86-64-nops-1-btver1.d: New.
* gas/i386/x86-64-nops-1-btver2.d: New.
* gas/i386/x86-64-arch-2-btver1.d: New.
* gas/i386/x86-64-arch-2-btver2.d: New.
opcodes/
2012-08-17 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
* i386-gen.c (cpu_flag_init): Add CPU_BTVER1_FLAGS and
CPU_BTVER2_FLAGS.
* i386-opc.h: Update CpuPRFCHW comment.
* i386-opc.tbl: Enable prefetch instruction for CpuPRFCHW.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
2012-08-17 17:12:36 +00:00
Kai Tietz
ee8206a9d3
PR ld/14326
...
* scripttempl/pe.sc: Add _etext symbol.
2012-08-17 16:33:03 +00:00
Nick Clifton
eb80cb8751
* po/vi.po: Updated Vietnamese translation.
...
* po/uk.po: New Ukranian translation.
* configure.in (ALL_LINGUAS): Add uk.
* configure: Regenerate.
2012-08-17 14:33:27 +00:00