Commit Graph

30942 Commits

Author SHA1 Message Date
Tom Tromey 826f00411d * c-exp.y (classify_name): Avoid assignment in condition. 2012-07-27 19:22:17 +00:00
Pedro Alves 84552b164d 2012-07-27 Roland Schwingel <roland.schwingel@onevision.com>
* amd64-windows-tdep.c: Include "frame.h".
	(amd64_windows_skip_trampoline_code): New function.
	(amd64_windows_init_abi): Add trampoline registration.
2012-07-27 17:24:31 +00:00
Yao Qi a8a64aa848 gdb/
* tracepoint.c (cur_traceframe_number): Remove.
	(set_tfile_traceframe): Remove.
	(tfile_trace_find, tfile_fetch_registers): Update callers.
	(tfile_xfer_partial, tfile_get_trace_state_variable_value): Likewise.
	(tfile_open, tfile_trace_find): Likewise.
2012-07-27 16:21:44 +00:00
Yao Qi 7255706c3e gdb/gdbserver/
PR remote/14161.

	* server.h: Declare gdb_agent_about_to_close.
	* target.c (kill_inferior): Include "agent.h".
	New.  Send command 'kill'.
	* target.h (kill_inferior): Removed macro.
	* tracepoint.c (gdb_agent_about_to_close): New.
	(gdb_agent_helper_thread): Handle command 'close'.
	Wait endlessly until the inferior stops.
	Install gdb_agent_remove_socket to atexit hook.
	(agent_socket_name): New static variable.
	(gdb_agent_socket_init): Replace local variable 'name' with
	'agent_socket_name'.
	(gdb_agent_remove_socket): New.

gdb/doc/
	* gdb.texinfo (IPA Protocol Commands): Document new command
	'close'.

gdb/testsuite/
	KFAIL for PR remote/14161.
	* gdb.trace/strace.exp (strace_remove_socket): kfail for native.
	Cleanup socket files.
	(strace_info_marker): Detach inferior.
2012-07-27 08:09:14 +00:00
Yao Qi 5a3f286f45 gdb/gdbserver/
* server.c (process_point_options): Stop at 'X' when parsing.
2012-07-27 00:56:32 +00:00
Yao Qi d99067cba7 gdb/
* thread.c (switch_to_thread): Don't call registers_changed.
2012-07-27 00:52:36 +00:00
gdbadmin 812b597eb3 *** empty log message *** 2012-07-27 00:00:02 +00:00
Tom Tromey f2e8016f41 * Makefile.in (SFILES): Remove objc-exp.y.
(YYFILES): Remove objc-exp.c.
    	(YYOBJ): Remove objc-exp.o.
    	(local-maintainer-clean): Don't mention objc-exp.c.
    	* c-exp.y: Include objc-lang.h.
    	(%union) <class>: New field.
    	(NSSTRING, SELECTOR, CLASSNAME, OBJC_LBRAC): New tokens.
    	(exp): Clone subscript production for OBJC_LBRAC.  Add various
    	Objective C productions.
    	(msglist, msgarglist, msgarg): New productions.
    	(array_mod, func_mod, operator): Clone productions for
    	OBJC_LBRAC.
    	(parse_string_or_char): Handle '@' strings.
    	(lex_one_token): Return OBJC_LBRAC.  Recognize @selector.
    	(classify_name): Check la_name_of_this.  Recognize ObjC class
    	names.
    	* objc-exp.y: Remove.
    	* objc-lang.c (objc_language_defn): Use c_parse, c_error.
    	* objc-lang.h (objc_parse, objc_error): Don't declare.
gdb/testsuite
    	* gdb.objc/print.exp (test_float_accepted): Remove kfails.
2012-07-26 20:11:10 +00:00
Jan Kratochvil f66713d24a gdb/
* python/py-inferior.c (infpy_threads): Call update_thread_list ().

gdb/testsuite/
	* gdb.python/py-inferior.c (thread): New function.
	(check_threads): New function.
	(test_threads): New function.
	* gdb.python/py-inferior.exp: Added test.
	Replaced runto with continue to breakpoint.
2012-07-26 19:09:35 +00:00
Tom Tromey 8223e12c08 * lib/ada.exp (standard_ada_testfile): New proc.
* gdb.ada/aliased_array.exp: Use standard_ada_testfile.
	* gdb.ada/array_bounds.exp: Use standard_ada_testfile.
	* gdb.ada/array_return.exp: Use standard_ada_testfile.
	* gdb.ada/array_subscript_addr.exp: Use standard_ada_testfile.
	* gdb.ada/arrayidx.exp: Use standard_ada_testfile.
	* gdb.ada/arrayparam.exp: Use standard_ada_testfile.
	* gdb.ada/arrayptr.exp: Use standard_ada_testfile.
	* gdb.ada/atomic_enum.exp: Use standard_ada_testfile.
	* gdb.ada/bad-task-bp-keyword.exp: Use standard_ada_testfile.
	* gdb.ada/bp_enum_homonym.exp: Use standard_ada_testfile.
	* gdb.ada/bp_on_var.exp: Use standard_ada_testfile.
	* gdb.ada/bp_range_type.exp: Use standard_ada_testfile.
	* gdb.ada/call_pn.exp: Use standard_ada_testfile.
	* gdb.ada/catch_ex.exp: Use standard_ada_testfile.
	* gdb.ada/char_enum.exp: Use standard_ada_testfile.
	* gdb.ada/char_param.exp: Use standard_ada_testfile.
	* gdb.ada/complete.exp: Use standard_ada_testfile.
	* gdb.ada/cond_lang.exp: Use standard_ada_testfile,
	standard_output_file.
	* gdb.ada/dyn_loc.exp: Use standard_ada_testfile.
	* gdb.ada/enum_idx_packed.exp: Use standard_ada_testfile.
	* gdb.ada/exec_changed.exp: Use standard_ada_testfile,
	standard_output_file.
	* gdb.ada/exprs.exp: Use standard_ada_testfile.
	* gdb.ada/fixed_cmp.exp: Use standard_ada_testfile.
	* gdb.ada/fixed_points.exp: Use standard_ada_testfile.
	* gdb.ada/formatted_ref.exp: Use standard_ada_testfile.
	* gdb.ada/frame_args.exp: Use standard_ada_testfile.
	* gdb.ada/fullname_bp.exp: Use standard_ada_testfile.
	* gdb.ada/fun_addr.exp: Use standard_ada_testfile.
	* gdb.ada/fun_in_declare.exp: Use standard_ada_testfile.
	* gdb.ada/funcall_param.exp: Use standard_ada_testfile.
	* gdb.ada/homonym.exp: Use standard_ada_testfile.
	* gdb.ada/info_locals_renaming.exp: Use standard_ada_testfile.
	* gdb.ada/int_deref.exp: Use standard_ada_testfile.
	* gdb.ada/interface.exp: Use standard_ada_testfile.
	* gdb.ada/lang_switch.exp: Use standard_ada_testfile,
	standard_output_file
	* gdb.ada/mi_catch_ex.exp: Use standard_ada_testfile.
	* gdb.ada/mi_task_arg.exp: Use standard_ada_testfile.
	* gdb.ada/mi_task_info.exp: Use standard_ada_testfile.
	* gdb.ada/mod_from_name.exp: Use standard_ada_testfile.
	* gdb.ada/nested.exp: Use standard_ada_testfile.
	* gdb.ada/null_array.exp: Use standard_ada_testfile.
	* gdb.ada/null_record.exp: Use standard_ada_testfile.
	* gdb.ada/operator_bp.exp: Use standard_ada_testfile.
	* gdb.ada/packed_array.exp: Use standard_ada_testfile.
	* gdb.ada/packed_tagged.exp: Use standard_ada_testfile.
	* gdb.ada/print_chars.exp: Use standard_ada_testfile.
	* gdb.ada/print_pc.exp: Use standard_ada_testfile.
	* gdb.ada/ptr_typedef.exp: Use standard_ada_testfile.
	* gdb.ada/ptype_field.exp: Use standard_ada_testfile.
	* gdb.ada/ptype_tagged_param.exp: Use standard_ada_testfile.
	* gdb.ada/rec_return.exp: Use standard_ada_testfile.
	* gdb.ada/ref_param.exp: Use standard_ada_testfile.
	* gdb.ada/ref_tick_size.exp: Use standard_ada_testfile.
	* gdb.ada/same_enum.exp: Use standard_ada_testfile.
	* gdb.ada/set_pckd_arr_elt.exp: Use standard_ada_testfile.
	* gdb.ada/small_reg_param.exp: Use standard_ada_testfile.
	* gdb.ada/start.exp: Use standard_ada_testfile.
	* gdb.ada/str_ref_cmp.exp: Use standard_ada_testfile.
	* gdb.ada/sym_print_name.exp: Use standard_ada_testfile.
	* gdb.ada/taft_type.exp: Use standard_ada_testfile.
	* gdb.ada/tagged.exp: Use standard_ada_testfile.
	* gdb.ada/tagged_not_init.exp: Use standard_ada_testfile.
	* gdb.ada/task_bp.exp: Use standard_ada_testfile.
	* gdb.ada/tasks.exp: Use standard_ada_testfile.
	* gdb.ada/tick_last_segv.exp: Use standard_ada_testfile.
	* gdb.ada/type_coercion.exp: Use standard_ada_testfile.
	* gdb.ada/uninitialized_vars.exp: Use standard_ada_testfile.
	* gdb.ada/variant_record_packed_array.exp: Use standard_ada_testfile.
	* gdb.ada/watch_arg.exp: Use standard_ada_testfile.
	* gdb.ada/whatis_array_val.exp: Use standard_ada_testfile.
	* gdb.ada/widewide.exp: Use standard_ada_testfile.
2012-07-26 18:43:02 +00:00
Jan Kratochvil 7cfe01b4b3 gdb/
* auto-load.c (auto_load_info_scripts): Remove immediate_quit increment
	and decrement.
2012-07-26 18:21:50 +00:00
Tom Tromey 5ba19b4c7a * copying.c: Rebuild.
* copying.awk: Don't use immediate_quit.  Use 'no_set_class', not
	'no_class'.
2012-07-26 17:21:06 +00:00
Tom Tromey 27618ce42a * symmisc.c (print_symbol_bcache_statistics): Use QUIT, not
immediate_quit.
	(print_objfile_statistics): Likewise.
	(maintenance_print_symbols): Likewise.
	(maintenance_print_msymbols): Likewise.
	(maintenance_print_objfiles): Likewise.
	* psymtab.c (print_partial_symbols): Call QUIT.
	(maintenance_print_psymbols): Likewise.  Don't modify
	immediate_quit.
	* copying.c (show_copying_command): Don't modify immediate_quit.
	(show_warranty_command): Likewise.
	* cli/cli-cmds.c (show_version): Don't modify immediate_quit.
2012-07-26 16:57:22 +00:00
Keith Seitz dd3818c82c * linespec.c (linespec_lexer_lex_number): The input
is also a valid number if the next character is a comma
	or colon.
2012-07-26 16:22:48 +00:00
Joel Brobecker 23a806894c [NEWS] Document --enable-libmcheck/--disable-libmcheck
gdb/ChangeLog:

        * NEWS: Document new --enable-libmcheck/--disable-libmcheck
        configure options.
2012-07-26 15:28:21 +00:00
Tristan Gingold 29f7799750 2012-07-26 Tristan Gingold <gingold@adacore.com>
* machoread.c: Include gdb_bfd.h.
2012-07-26 09:00:42 +00:00
Tristan Gingold a55c1f3223 2012-07-26 Tristan Gingold <gingold@adacore.com>
* dwarf2loc.c (locexpr_describe_location_piece): Use uint64_t for
	offset.
2012-07-26 08:47:14 +00:00
Siddhesh Poyarekar 56eb65bdc1 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Expand parameter
SIZE to size_t.
	(dwarf2_evaluate_loc_desc): Likewise.
	(dwarf2_loc_desc_needs_frame): Likewise.
	(locexpr_describe_location_1): Likewise.
	* dwarf2loc.h (struct dwarf2_locexpr_baton): Make SIZE as
	size_t.
	(struct dwarf2_loclist_baton): Likewise.
	* dwarf2read.c (struct dwarf_block): Likewise.
	(dump_die_shallow): Use pulongest to print dwarf_block.size.
	(decode_locdesc): Expand SIZE and I to size_t.
2012-07-26 02:03:16 +00:00
gdbadmin ef1dc124cf *** empty log message *** 2012-07-26 00:00:33 +00:00
Jan Kratochvil bbec57e429 gdb/testsuite/
Fix testsuite regression after --use-deprecated-index-sections removal.
	* lib/mi-support.exp (gdbindex_warning_re): Update the expect string.
2012-07-25 20:19:56 +00:00
Jan Kratochvil 9cc8e32c67 gdb/testsuite/
Fix compatibility with Tcl before 7.5.
	* lib/future.exp (lreverse): New function if it does not exist.
2012-07-25 20:17:59 +00:00
Jan Kratochvil aec8845cae gdb/
* contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/.
2012-07-25 20:14:20 +00:00
Marc Khouzam ea5ca7b5cf 2012-07-25 Marc Khouzam <marc.khouzam@ericsson.com>
* gdb.mi/mi-pending.c: New method to set a second pending
	breakpoint.
	* gdb.mi/mi-pending.exp: Set a pending breakpoint with a
	condition.
2012-07-25 18:34:17 +00:00
Joel Brobecker 33d7655bb2 convert_doublest_to_floatformat: handle off-range values.
On x86_64-linux targetting AVR, we see the following issues:

    (gdb) print 1.6e+308
    $1 = 0.89002949
    (gdb) print 1.6e-308
    $3 = 2.87630892

What happens is that GDB is trying to convert the value it read
(as a host "long double") into a target "double" value. The routine
performing the conversion does not realize that 1.6e+308 is just
too large to fit in a double. Similarly, it does not notice that
1.6e-308 is too small to be represented.

This patch enhances convert_doublest_to_floatformat to both handle
floats that are too small and too large.

gdb/ChangeLog:

        * doublest.c (convert_doublest_to_floatformat): If the exponent
        is too small, treat the value as zero.  If the exponent is too
        large, treat the value as infinity.
2012-07-25 18:27:21 +00:00
Joel Brobecker a22d44ff78 Add support for --enable-lmcheck configure option.
This allows the user to enable this option at configure time if building
a release, or to disable it if building a snapshot.

gdb/ChangeLog:

        * configure.ac: Add --enable-lmcheck configure option.
        * configure: Regenerate.
2012-07-25 18:27:11 +00:00
Tom Tromey d6b289409b * NEWS: Mention maint info bfds.
* gdb_bfd.c (all_bfds): New global.
    	(gdb_bfd_ref, gdb_bfd_unref): Update all_bfds.
    	(print_one_bfd, maintenance_info_bfds, _initialize_gdb_bfd):
    	New functions.
gdb/doc
    	* gdb.texinfo (Maintenance Commands): Document maint info bfds.
2012-07-25 15:47:09 +00:00
Ralf Corsepius 6e73ba20e6 2012-07-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.tgt: Add v850*-*-rtems*.
2012-07-25 15:34:08 +00:00
Tom Tromey d560eebdef * macrotab.c (macro_bcache_str): Remove cast. 2012-07-25 15:32:09 +00:00
Hui Zhu d7cbec71c9 2012-07-25 Hui Zhu <hui_zhu@mentor.com>
* linespec.c (linespec_lexer_lex_number): Update comments,
	change the return and add check to make sure the input is
	the decimal numbers.
	(linespec_lexer_lex_one): If linespec_lexer_lex_number return
	false, call linespec_lexer_lex_string.
2012-07-25 12:26:27 +00:00
gdbadmin c32e27618c *** empty log message *** 2012-07-25 00:00:03 +00:00
Tom Tromey 882f447fdd * symfile.c (symbol_file_add): Don't open BFD twice. 2012-07-24 20:15:56 +00:00
Marc Khouzam 53ab40660e Updated last commit's date. 2012-07-24 17:39:18 +00:00
Marc Khouzam e12c771396 2012-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
* breakpoint.c (create_breakpoint): Store condition for pending
	breakpoints.
2012-07-24 17:37:56 +00:00
Andreas Schwab 108fb0f719 * m68k-tdep.c (m68k_reg_struct_return_p): Accept complex types.
(m68k_return_value): Handle complex types like structures.
(m68k_svr4_return_value): Likewise.
2012-07-24 16:37:24 +00:00
Jan Kratochvil 1634dcbe16 gdb/
* gdb_bfd.c (zlib_decompress_section) <!HAVE_ZLIB_H>: Adjust
	parameters to bfd_get_section_name.
2012-07-24 13:14:37 +00:00
Yao Qi e2d12c2152 gdb/
* cli/cli-setshow.c (do_setshow_command): Handle case 'var_uinteger'
	and 'var_zuninteger' together.  Handle case 'var_integer' and
	'var_zinteger' together.
2012-07-24 12:49:22 +00:00
gdbadmin 32d9f073de *** empty log message *** 2012-07-24 00:00:03 +00:00
Keith Seitz 64b92e45d3 * linespec.c (convert_linespec_to_sal): Don't add
any symbols to the result vector if symbol_to_sal
	returns zero.
2012-07-23 20:40:07 +00:00
Keith Seitz 0f5f4ffe7a * linespec.c (decode_objc): Record the function name
in the linespec.
2012-07-23 20:31:34 +00:00
Tom Tromey da1cc82f30 * rs6000-nat.c (add_vmap): Rewrite archive loop. Fix reference
counting.
	* exec.c (exec_close_1): Unconditionally release vmap's BFD.
	(map_vmap): Acquire a reference to the BFD.
2012-07-23 18:54:26 +00:00
Siddhesh Poyarekar 6c18f3e0f4 * p-valprint.c (pascal_object_print_value): Replace potentially
unsafe alloca with xmalloc/xfree.
	* valops.c (search_struct_method): Likewise.
2012-07-23 18:08:29 +00:00
Tom Tromey 695c31738b * solib-svr4.c (enable_break): Update.
* bfd-target.h (target_bfd_reopen): Update documentation.
2012-07-23 15:25:12 +00:00
Tom Tromey 08d2cd740c * symfile.c (separate_debug_file_exists): Update.
(gdb_bfd_open_maybe_remote): Rename from bfd_open_maybe_remote.
	(reread_symbols): Update.
	* elfread.c (build_id_verify): Update.
	* symfile.h (gdb_bfd_open_maybe_remote): Rename from
	bfd_open_maybe_remote.
2012-07-23 15:03:59 +00:00
Tom Tromey 596f7d6703 * gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Fix comment. 2012-07-23 15:01:50 +00:00
Tom Tromey 8ac244b433 * coffread.c (coff_symfile_read): Make a cleanup for 'debugfile'
and 'abfd'.
	* elfread.c (elf_symfile_read): Make a cleanup for 'debugfile'
	and 'abfd'.
	* jit.c (jit_bfd_try_read_symtab): Make a cleanup for 'nbfd'.
	* machoread.c (macho_add_oso_symfile): Make a cleanup for
	'abfd'.
	(macho_symfile_read): Make a cleanup for 'dsym_bfd'.
	* objfiles.c (allocate_objfile): Acquire a new reference.
	* rs6000-nat.c (add_vmap): Don't acquire a BFD reference.
	* solib.c (solib_read_symbols): Don't acquire a BFD reference.
	* spu-linux-nat.c (spu_symbol_file_add_from_memory): Make
	a cleanup for 'nbfd'.
	* symfile-mem.c (symbol_file_add_from_memory): Make a cleanup
	for 'nbfd'.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): Don't
	make a cleanup for 'abfd'.
	(symbol_file_add): Make a BFD cleanup.
2012-07-23 14:58:44 +00:00
Tom Tromey 64c311498e * cli/cli-dump.c (bfd_openr_with_cleanup): Use gdb_bfd_openr.
(bfd_openw_with_cleanup): Use gdb_bfd_openw.
	* corelow.c (core_open): Use gdb_bfd_fopen.
	* dsrec.c (load_srec): Use gdb_bfd_openr.
	* exec.c (exec_file_attach): Use gdb_bfd_fopen.
	* gcore.c (gcore_memory_sections): Use gdb_bfd_openw.
	* gdb_bfd.c (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw)
	(gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file)
	(gdb_bfd_fdopenr): New functions.
	* gdb_bfd.h (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw)
	(gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file)
	(gdb_bfd_fdopenr): Declare.
	* jit.c (bfd_open_from_target_memory): Use gdb_bfd_openr_iovec.
	* m32-rom.c (m32r_load, m32r_upload_command): Use gdb_bfd_openr.
	* machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_openr,
	gdb_bfd_openr_next_archived_file.
	(macho_check_dsym): Use gdb_bfd_openr.
	(macho_add_oso_symfile): Don't call gdb_bfd_stash_filename.
	* procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_fdopenr.
	* remote-m32r-sdi.c (m32r_load): Use gdb_bfd_openr.
	* remote-mips.c (mips_load_srec, pmon_load_fast): Use
	gdb_bfd_openr.
	* remote.c (remote_bfd_open): Use gdb_bfd_openr_iovec.
	* rs6000-nat.c (add_vmap): Use gdb_bfd_openr, gdb_bfd_fdopenr,
	gdb_bfd_openr_next_archived_file.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Use gdb_bfd_openr.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Use
	gdb_bfd_openr.
	* solib-spu.c (spu_bfd_fopen): Use gdb_bfd_openr_iovec.
	* solib.c (solib_bfd_fopen): Use gdb_bfd_fopen.
	* spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_openr_iovec.
	* symfile.c (bfd_open_maybe_remote): Use gdb_bfd_openr.
	(symfile_bfd_open): Use gdb_bfd_fopen.
	(generic_load): Use gdb_bfd_openr.
	* windows-nat.c (windows_make_so): Use gdb_bfd_openr.
2012-07-23 14:57:58 +00:00
Tom Tromey 520b0001c1 * bfd-target.c (target_bfd_reopen): Update.
* cli/cli-dump.c (bfd_openr_with_cleanup)
	(bfd_openw_with_cleanup): Update.
	* corelow.c (core_open): Update.
	* dsrec.c (load_srec): Update.
	* exec.c (exec_file_attach): Update.
	* gcore.c (create_gcore_bfd): Update.
	* gdb_bfd.c (gdb_bfd_ref): Return void.
	(gdb_bfd_open): Update.
	* gdb_bfd.h (gdb_bfd_ref): Return void.
	Update comments.
	* jit.c (jit_bfd_try_read_symtab): Update.
	* m32r-rom.c (m32r_load, m32r_upload_command): Update.
	* machoread.c (macho_symfile_read_all_oso): Update.
	(macho_check_dsym): Update.
	* procfs.c (insert_dbx_link_bpt_in_file): Update.
	* remote-m32r-sdi.c (m32r_load): Update.
	* remote-mips.c (mips_load_srec, pmon_load_fast): Update.
	* rs6000-nat.c (add_vmap): Update.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Update.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Update.
	* solib-spu.c (spu_bfd_open): Update.
	* solib.c (solib_bfd_fopen, solib_read_symbols): Update.
	* spu-linux-nat.c (spu_bfd_open): Update.
	* symfile.c (bfd_open_maybe_remote, symfile_bfd_open)
	(generic_load): Update.
	* windows-nat.c (windows_make_so): Update.
2012-07-23 14:56:11 +00:00
gdbadmin ec012f2ba1 *** empty log message *** 2012-07-23 00:00:03 +00:00
Siddhesh Poyarekar 2322ff168c * sh-tdep.c (sh_treat_as_flt_p): Remove unused variable LEN. 2012-07-22 16:52:41 +00:00
gdbadmin e38dcb50c8 *** empty log message *** 2012-07-22 00:00:02 +00:00