Commit Graph

24483 Commits

Author SHA1 Message Date
Pierre Muller 5ac79d7811 ARI change: Use "/* ARI: rule */" pattern.
* utils.c: Update ARI patterns.
	* gdb_dirent.h: Likewise.
2009-04-24 22:10:03 +00:00
Anthony Green d7066cce3b Add moxie-elf port. 2009-04-24 02:26:01 +00:00
gdbadmin 8d676cfdc9 *** empty log message *** 2009-04-24 00:00:04 +00:00
Joel Brobecker fc84d355b2 Spell my name properly in the last entry :-). 2009-04-23 22:53:54 +00:00
Joel Brobecker 72fcaa051a * ada-lang.c: Remove an extra empty line. No code change. 2009-04-23 22:52:51 +00:00
Jan Kratochvil 217dc9e25b gdb/
Fix double free on error inserting the breakpoint instruction.
	* breakpoint.c (create_breakpoints): Move the
	update_global_location_list call to ...
	(break_command_really): ... here together with the second local call
	both unified after all the cleanups.
2009-04-23 22:38:24 +00:00
Tom Tromey b14b1491f2 gdb
2009-04-23  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	* configure, config.in: Regenerate.
	* configure.ac: Support for relocatable GDB datadir.  Use
	GDB_AC_WITH_DIR.  Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
	* acinclude.m4 (GDB_AC_WITH_DIR): New defun.
	* top.c (init_main): Add "set data-directory".
	* defs.h (gdb_datadir): Declare.
	* main.c (gdb_datadir): New global.
	(captured_main): Initialize gdb_datadir.  Use relocate_directory.
	(relocate_path): New function.
	(relocate_directory): Likewise.
	(get_init_files): Use relocate_path.
	(README): Mention --with-gdb-datadir.
gdb/doc
2009-04-23  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Data Files): New node.
	(GDB Files): Update menu.
2009-04-23 21:28:20 +00:00
Joel Brobecker 5e7b5f74c2 * ada-tasks (task_command_1): Call target_find_new_threads. 2009-04-23 18:55:20 +00:00
Joel Brobecker 465f42bbe4 * stack.c (do_gdb_disassembly): Print the exception message if an
error was thrown while trying to perform the disassembly.
2009-04-23 18:49:20 +00:00
Joel Brobecker 5c1e86e191 * gdbint.texinfo (Defining Other Architecture Features): Remove
enty for PROCESS_LINENUMBER_HOOK.
2009-04-23 18:46:14 +00:00
gdbadmin ee8921dd8e *** empty log message *** 2009-04-23 00:00:33 +00:00
Joseph Myers e7f86de9ac * lib/gdb.exp (get_compiler_info): Use -E -o in remote-host case. 2009-04-22 19:46:19 +00:00
Jan Kratochvil 3038237c75 gdb/
* varobj.c (free_variable): Replace free_current_contents by xfree.
2009-04-22 17:50:54 +00:00
Vladimir Prus 83eba9b72c * gdb.texinfo (GDB/MI Program Execution): Document -exec-jump. 2009-04-22 17:24:59 +00:00
Kazu Hirata 17c1263914 * arm-linux-nat.c (fetch_register, store_register): Use
ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
	* arm-linux-tdep.c (arm_linux_supply_gregset,
	arm_linux_collect_gregset): Likewise.
	* arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
	* arm-tdep.h (ARM_CPSR_REGNUM): Remove.
2009-04-22 15:14:59 +00:00
Hui Zhu e31198c47e * gdb.texinfo (disassemble-next-line): Set the default of
disassemble-next-line to off.
2009-04-22 06:09:18 +00:00
Hui Zhu a362e3d3b7 * stack.c (_initialize_stack): Set the default of
disassemble-next-line to off.
2009-04-22 06:06:12 +00:00
Tom Tromey d2596e2e7b * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
* configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
2009-04-22 00:17:50 +00:00
gdbadmin 3e7a808720 *** empty log message *** 2009-04-22 00:00:03 +00:00
Andreas Schwab 62e4f60cdb * configure.ac: Add quotes to not lose brackets in help text.
* configure: Rebuild.
2009-04-21 21:01:07 +00:00
Andreas Schwab 82cd387f60 Fix date. 2009-04-21 20:54:33 +00:00
Andreas Schwab cfd5360553 * configure.ac: Don't postprocess Makefile in config.status.
Substitute GDB_NM_FILE.  Don't substitute nm_h.
	* Makefile.in (GDB_NM_FILE): Substitute.
	(TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
	* configure: Regenerate.
	* gnulib/Makefile.in: Regenerate.
2009-04-21 20:19:13 +00:00
Joseph Myers 26e251b603 gdb:
* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.

gdb/doc:
	* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.
	* Makefile.in (datarootdir, docdir): Define.
	(gdb.dvi, gdb.pdf): Use same -I options as for building gdb.info
	instead of $(SET_TEXINPUTS).
	(gdbint.dvi, gdbint.pdf): Use same -I options as for building
	gdbint.info instead of $(SET_TEXINPUTS).
	(gdbint/index.html): Use same -I options as for building
	gdbint.info.
	(stabs.dvi, stabs.pdf): Use same -I options as for building
	stabs.info instead of $(SET_TEXINPUTS).
	(stabs/index.html): Use same -I options as for building
	stabs.info.
	(annotate.dvi, annotate.pdf): Use same -I options as for building
	annotate.info instead of $(SET_TEXINPUTS).
	(annotate/index.html): Use same -I options as for building
	annotate.info.
2009-04-21 20:13:08 +00:00
Tom Tromey 32c1c914bc * configure: Rebuild.
* configure.ac: Use lower case for start of help strings.  Clean
	up --with-sysroot help.
2009-04-21 18:09:11 +00:00
Tom Tromey a1220294e5 * configure: Rebuild.
* acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
	* configure.ac: Use AC_HELP_STRING.  Use upper case for variables
	in help.
2009-04-21 17:00:17 +00:00
David Daney eac35c4ebc 2009-04-21 David Daney <ddaney@caviumnetworks.com>
* gdb.texinfo (maint show-debug-regs): Remove mention of x86.
2009-04-21 16:31:06 +00:00
Pierre Muller dfc3cd0e77 ARI fix: remove "%p".
* ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
	(ia64_sigtramp_frame_this_id): Ditto.
	(ia64_libunwind_frame_this_id): Ditto.
	(ia64_libunwind_sigtramp_frame_this_id): Ditto.
	* symmisc.c (maintenance_info_psymtabs): Ditto.
2009-04-21 11:38:38 +00:00
Joseph Myers 29b0e8a24a gdb:
* configure.ac (--with-relocated-sources): New.
	* configure, config.in: Regenerate.
	* source.c (add_substitute_path_rule): Remove static.
	* source.h (add_substitute_path_rule): Declare.
	* main.c: Include "source.h".
	(captured_main): Add substitution rule if RELOC_SRCDIR.

gdb/doc:
	* gdb.texinfo (Source Path): Document --with-relocated-sources.
2009-04-21 10:13:05 +00:00
Pierre Muller ccabeb57ba * gnu-nat.h (proc_debug): Add missing continuation line in macro. 2009-04-21 07:35:42 +00:00
gdbadmin 73be22b84a *** empty log message *** 2009-04-21 00:00:33 +00:00
David Daney b941295341 2009-04-20 David Daney <ddaney@caviumnetworks.com>
* NEWS: Mention MIPS/Linux hardware watchpoint support.

2009-04-20  David Daney  <ddaney@caviumnetworks.com>

	* mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
	(maint_show_dr, super_close): New variables.
	(super_fetch_registers, super_store_registers): Make static.
	(PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
	(W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
	(pt_watch_style): Define new enum.
	(mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
	Define new structs.
	(watch_readback_valid, watch_readback, current_watches,	watch_mirror):
	New variables.
	(get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
	(set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
	(mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
	(mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
	(type_to_irw, fill_mask, try_one_watch)
	(mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
	(mips_linux_new_thread, populate_regs_from_watches)
	(mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
	(mips_linux_close): New functions.
	(_initialize_mips_linux_nat): Register watchpoint functions with
	the target_ops.  Add show-debug-regs maintenance command.

2009-04-20  David Daney  <ddaney@caviumnetworks.com>

	* infrun.c (handle_inferior_event): Move gegisters_changed call down.
2009-04-20 21:11:06 +00:00
gdbadmin 6d4c6b2e40 *** empty log message *** 2009-04-20 00:00:03 +00:00
Pedro Alves 6de3146cda * NEWS: Mention gdbserver support for x86 Windows CE. 2009-04-19 20:05:23 +00:00
Eli Zaretskii e424a02ef6 * config/djgpp/fnchange.lst: Fix typos. 2009-04-19 19:38:42 +00:00
Eli Zaretskii 10085bb5ab Set default host and target charsets in the DJGPP port.
* config/djgpp/config.sed (am_cv_langinfo_codeset)
	(bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
	in all configure scripts that define ac_cv_env_CPP_value.
	* go32-nat.c (dos_codepage, nl_langinfo): New functions.
	Include langinfo.h.
	* config/djgpp/nl_types.h: New file.
	* config/djgpp/langinfo.h: New file.
	* config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
2009-04-19 18:29:34 +00:00
Pedro Alves 155c8968d9 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
* configure.srv: Add x86 Windows CE target.
2009-04-19 17:54:52 +00:00
gdbadmin 50a1af0d13 *** empty log message *** 2009-04-19 00:00:03 +00:00
Joseph Myers 2b83188937 gdb:
2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in (MAKEHTML): Set to makeinfo --html.
	(MAKEHTMLFLAGS): Set to empty.

gdb/doc:
2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* Makefile.in (MAKEHTML): Set to makeinfo --html.
	(MAKEHTMLFLAGS): Set to empty.
	(html__strip_dir): Define.
	(HTMLFILES): Define.
	(HTMLFILES_INSTALL): Define.
	(install-html): Copy new automake rule.
	(html): Depend on $(HTMLFILES).
	(gdb_toc.html): Rename to gdb/index.html.
	(gdbint_toc.html): Rename to gdbint/index.html.
	(stabs_toc.html): Rename to stabs/index.html.
	(annotate_toc.html): Rename to annotate/index.html.
2009-04-18 17:11:02 +00:00
Eli Zaretskii d7713ae002 * NEWS: Mention all new set/show commands added since GDB 6.8 was
released.
2009-04-18 14:54:00 +00:00
Eli Zaretskii d647eed6d5 * go32-nat.c (go32_sysinfo): Check if the call to
__dpmi_get_capabilities fills the buffer with information, and
	don't use the buffer if not.
2009-04-18 08:16:34 +00:00
gdbadmin 3c0d1e968a *** empty log message *** 2009-04-18 00:00:03 +00:00
Tom Tromey 587204947e * charset.c (_initialize_charset): Add special case for "646". 2009-04-17 23:50:12 +00:00
Joseph Myers 89a34d1b2c gdb:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.
	* Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
	configure substitutions.
	(FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.

gdb/doc:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Set pdfdir and htmldir from configure
	substitutions.
	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.

readline:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add html target.  Add dummy install-html and
	install-pdf targets.

sim:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add dummy install-pdf, html, and
	install-html targets.
2009-04-17 17:44:05 +00:00
Pierre Muller a74ce742ff ARI fix: Do not use %p, replace by call to host_address_to_string
for host pointers.
	* darwin-nat.c (darwin_xfer_partial): Apply change.
	* gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
	* gnu-nat.h (proc_debug): Ditto.
	* symmisc.c (maintenance_info_symtabs): Ditto.
	(maintenance_info_psymtabs): Ditto.
	* windows-nat.c (handle_load_dll): Ditto.
	(handle_unload_dll, info_w32_command, handle_exception): Ditto.
	* xtensa-tdep.c (xtensa_unwind_pc): Ditto.
2009-04-17 15:44:28 +00:00
Joseph Myers 0ca8834fef * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
--enable-64-bit-bfd.
	(sparc-*-linux*): Likewise.
2009-04-17 14:22:25 +00:00
Eli Zaretskii 541f1105bc * go32-nat.c (go32_sysinfo): Update list of Windows versions of
the NT family.
2009-04-17 11:59:35 +00:00
gdbadmin cfc682d498 *** empty log message *** 2009-04-17 00:00:32 +00:00
Pedro Alves 1554e9be88 * remote.c (remote_query_attached): Fix pasto in packet_ok result
checking.
2009-04-16 19:31:03 +00:00
Joel Brobecker bf75638ec1 Undo the following change. Not correct, after all:
* procfs.c (solib_mappings_callback, find_memory_regions_callback):
        Fix a compilation warning on mips-irix due to casting from
        a pointer of different size.
2009-04-16 18:41:40 +00:00
Joel Brobecker 3705b1c591 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
(ada_get_current_task, ada_print_exception_breakpoint_nontask)
        (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
        Remove declaration. These are non-existent functions.
2009-04-16 18:39:36 +00:00
Joel Brobecker a2d5da46c6 * gdbint.texinfo (Native Debugging): Remove entry for PROC_NAME_FMT.
This macro is no longer used.
2009-04-16 17:42:00 +00:00
Joel Brobecker 37da21bceb * procfs.c (solib_mappings_callback, find_memory_regions_callback):
Fix a compilation warning on mips-irix due to casting from
        a pointer of different size.
2009-04-16 17:25:38 +00:00
Joel Brobecker 6f38eac82e * ada-lang.c (symtab_for_sym): Delete.
(user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
2009-04-16 17:21:06 +00:00
Joel Brobecker f9bc20b9be * ada-lang.c (extract_string): Delete.
(ada_main_name): Reimplement using target_read_string instead of
        extract_string.
2009-04-16 17:16:18 +00:00
Andreas Schwab 335d71d67e * m68klinux-nat.c: Remove obsolete comment.
(fetch_register, store_register): Don't call
gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
which are always nops here.
2009-04-16 15:26:49 +00:00
gdbadmin 015f384266 *** empty log message *** 2009-04-16 00:00:33 +00:00
Tom Tromey 732f6a935c gdb
* c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
	(c_printstr): Likewise.
	* charset.c: Include gdb_wait.h.
	(make_wchar_iterator): Use INTERMEDIATE_ENCODING.
	(find_charset_names): Use pexecute.  Handle libiconv's output.
	Detect errors.
	(_initialize_charset): Use xstrdup.
	* gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
	cases.
	(INTERMEDIATE_ENCODING): New define.
	* configure, config.in: Rebuild.
	* configure.ac: Check for btowc.
gdb/doc
	* gdb.texinfo (Character Sets): Document default character set.
2009-04-15 22:20:32 +00:00
Tom Tromey 334cc82d44 gdb
* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
gdb/testsuite
	* gdb.base/charset.exp: Add regression test.
2009-04-15 21:55:04 +00:00
Eli Zaretskii 27e3013dec * utils.c (parse_escape): Initialize target_char to pacify GCC. 2009-04-15 20:40:51 +00:00
gdbadmin 65cd573b7d *** empty log message *** 2009-04-15 00:00:02 +00:00
Jan Kratochvil 8ea5dfdf09 gdb/
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
2009-04-14 21:54:33 +00:00
Pierre Muller 88c15c3400 ARI fix: sprintf rule.
* ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
	* ada-lang.c (add_angle_brackets): Use xstrprintf.
	(ada_decode): Replace sprintf by xsnprintf.
	(find_old_style_renaming_symbol): Ditto.
	(ada_to_fixed_type_1, ada_enum_name): Ditto.
2009-04-14 19:04:24 +00:00
Pierre Muller 87f9adc166 * gdbint.texinfo: Change server name from sources.redhat.com to
sourceware.org throughout.
2009-04-14 18:18:41 +00:00
Joel Brobecker d12672ccc7 * gdb.base/exe-lock.exp: New testcase. 2009-04-14 16:49:57 +00:00
Joel Brobecker efbd6e753f * target.c (target_mourn_inferior): Call bfd_cache_close_all
after having executed the target mourn_inferior routine.
2009-04-14 16:48:07 +00:00
Eli Zaretskii b46df7a18c config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if undefined. 2009-04-14 14:25:12 +00:00
David Daney 2facfe5cc4 2009-04-13 David Daney <ddaney@caviumnetworks.com>
* infrun.c (maybe_software_singlestep): New function.
	(resume): Call maybe_software_singlestep.
	(handle_inferior_event): Same.
2009-04-14 00:59:47 +00:00
gdbadmin bf21c8117e *** empty log message *** 2009-04-14 00:00:33 +00:00
Tom Tromey 18e8c3bc8a gdb
* python/python-frame.c (frapy_richcompare): Return
	Py_NotImplemented, not an error.  Handle Py_NE as well.
gdb/testsuite
	* gdb.python/python-frame.exp (gdb_py_test_silent_cmd): Test !=
	operator on Frame.
2009-04-13 20:54:59 +00:00
Eli Zaretskii 76208fec87 Fix typo in the last change. 2009-04-13 18:55:15 +00:00
Eli Zaretskii e726d7841c * charset.c (EILSEQ): Define if not defined by system headers. 2009-04-13 18:49:27 +00:00
gdbadmin 2be757dd2a *** empty log message *** 2009-04-13 00:00:33 +00:00
gdbadmin f41305e143 *** empty log message *** 2009-04-12 00:00:03 +00:00
Eli Zaretskii c03b3c325a *** empty log message *** 2009-04-11 19:21:10 +00:00
Eli Zaretskii a2effb2e8e *** empty log message *** 2009-04-11 18:06:02 +00:00
Eli Zaretskii 238f4807d1 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
to be consistent with renaming config.intl.h into config_intl.h.
2009-04-11 18:03:52 +00:00
Eli Zaretskii 685af672ca * go32-nat.c (go32_attach, go32_detach:) Fix prototypes to be
consistent with the change from 2009-03-17.
2009-04-11 17:57:34 +00:00
gdbadmin e4169056cc *** empty log message *** 2009-04-11 00:00:33 +00:00
Jan Kratochvil f4a34a0895 gdb/
* varobj.c (varobj_invalidate): Fix formatting text width.
2009-04-10 16:00:49 +00:00
Jan Kratochvil 2dbd25e5eb gdb/
* varobj.c (varobj_invalidate): Fix indentation.
2009-04-10 15:57:54 +00:00
Jan Kratochvil c16abbdefa * gdbtypes.c: Remove excessive parentheses at the return keywords. 2009-04-10 03:36:32 +00:00
gdbadmin da5302886c *** empty log message *** 2009-04-10 00:00:03 +00:00
Joel Brobecker 2c88c651a4 * gdb.texinfo (Set Breaks): Rewrite a paragraph to avoid a warning
about a missing dot or coma after @xref.
2009-04-09 20:11:57 +00:00
gdbadmin c69cb0bd0d *** empty log message *** 2009-04-09 00:00:33 +00:00
Vladimir Prus 143260c9bf Implement -exec-jump.
* mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
	* mi/mi-main.c (mi_cmd_exec_jump): New.
	* mi/mi-cmds.c (mi_cmds): Register exec-jump.
2009-04-08 06:58:37 +00:00
gdbadmin a8094b241e *** empty log message *** 2009-04-08 00:00:33 +00:00
Doug Evans d10c338de3 * symfile.c (symbol_file_clear): Fix indentation. 2009-04-07 20:43:51 +00:00
gdbadmin 0531ad6f23 *** empty log message *** 2009-04-07 00:00:33 +00:00
gdbadmin c71301cd1f *** empty log message *** 2009-04-06 00:00:03 +00:00
Mark Kettenis e5a6ba44d9 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment. 2009-04-05 22:37:20 +00:00
gdbadmin 6eed0d08a8 *** empty log message *** 2009-04-05 00:00:33 +00:00
gdbadmin da276d977f *** empty log message *** 2009-04-04 00:00:34 +00:00
Ulrich Weigand 7fe519cb21 * inferiors.c (get_thread_process): Make global.
* server.h (get_thread_process): Add prototype.
	* thread-db.c (find_one_thread): Use get_thread_process
	instead of current_process.
	(thread_db_get_tls_address): Do not crash if called when
	thread layer is not yet initialized.
2009-04-03 20:15:51 +00:00
Ulrich Weigand 409c383c98 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
(ppc_linux_auxv_parse): New function.
	(ppc_linux_read_description): Use ppc_linux_target_wordsize.
	(_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
2009-04-03 16:07:04 +00:00
Ulrich Weigand 5472f405e2 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
* spu-low.c (current_tid): Rename to ...
	(current_ptid): ... this.
	(fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
	spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
	ptid_get_lwp (current_ptid) instead of current_tid.
	(spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
	instead of current_tid.  Use find_process_pid to verify pid
	argument is valid.  Pass proper argument to remove_process.
	(spu_thread_alive): Compare current_ptid instead of current_tid.
	(spu_resume): Likewise.
2009-04-03 14:38:39 +00:00
Ulrich Weigand 9592c5d011 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
BFD to contents of SPU name note.
	(spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
	with "from_tty" argument 1 instead of 0.
2009-04-03 14:37:57 +00:00
Ulrich Weigand 5ecd5cbe98 * gdb.base/attach.exp: Re-enable for spu*-*-* targets.
* gdb.server/ext-attach.exp: Likewise.
2009-04-03 14:37:04 +00:00
Pedro Alves 55ac2b9961 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
variable.
2009-04-03 11:40:02 +00:00
Vladimir Prus 7309f75664 Eliminate some sleep usage.
* gdb.mi/basics.c (do_nothing): New.
        (main): Use do_nothing instead of printf, so that
        not to introduce race condition between output of
        inferiour and output of gdb. Do not use sleep as it
        is not generally available on embedded targets.
2009-04-03 11:23:19 +00:00
gdbadmin 0ab72a231d *** empty log message *** 2009-04-03 00:00:03 +00:00
Pedro Alves f4b95f6ffd * gdb.server/ext-attach.exp: Expect an optional process id after
"Detached from remote process".
2009-04-02 22:40:10 +00:00
Jan Kratochvil de40b933e2 gdb/
* dwarf2read.c
	(new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
	Create the symbol in local scope.
	* symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.

gdb/testsuite/
	* gdb.dwarf2/dw2-unresolved-main.c, gdb.dwarf2/dw2-unresolved.S,
	gdb.dwarf2/dw2-unresolved.exp: New.
2009-04-02 21:01:41 +00:00
Keith Seitz 6cbbcdfe20 * stabsread.c (read_member_functions): GCC may emit an extra space
at the end of the names "__base_ctor" and "__base_dtor"; so ignore
	whitespace when looking for these functions.
2009-04-02 17:34:25 +00:00
Pedro Alves 2ae101a454 * gdb.mi/mi-nonstop-exit.exp: Don't check isnative. Use
mi_run_to_main.
2009-04-02 16:11:48 +00:00
Joel Brobecker 4f5376b2eb * gdb.texinfo (Backtrace): Add a parameter in frame 1 of the first
example, and add a small explanation about it.
        (Print Settings): Change the documentation of the "set print
        frame-arguments" to reflect the fact that the default is now "scalars".
2009-04-02 15:56:08 +00:00
Joel Brobecker a0381d3a18 * gdb.texinfo (Print Settings): Add kindex for command "set
print frame-arguments".
2009-04-02 15:54:50 +00:00
Pedro Alves 56a8e183d2 * gdb.mi/mi-nonstop.exp: Don't check isnative. Use
mi_run_to_main.  Skip thread exit test on remote targets.
	* gdb.mi/mi-nsintrall.exp: Don't check isnative.  Use
	mi_run_to_main.
	* gdb.mi/mi-nsmoribund.exp: Don't check isnative.  Use
	mi_run_to_main.
	* lib/mi-support.exp (mi_gdb_target_cmd): Remove trailing anchor
	when expecting ^connected.  Detect when the target doesn't support
	non-stop mode.
	(mi_run_cmd): Detect if non-stop mode was requested by isn't
	supported.  Return -1 on error, 0 on success.
	(mi_runto_helper): Don't expect a stop if mi_run_cmd failed.
	(mi_runto): Return mi_runto_helper's result explicitly.
2009-04-02 15:43:10 +00:00
gdbadmin d429cf9352 *** empty log message *** 2009-04-02 00:00:03 +00:00
Pedro Alves 95954743cb 2009-04-01 Pedro Alves <pedro@codesourcery.com>
Implement the multiprocess extensions, and add linux multiprocess
	support.

	* server.h (ULONGEST): Declare.
	(struct ptid, ptid_t): New.
	(minus_one_ptid, null_ptid): Declare.
	(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
	(ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
	(struct inferior_list_entry): Change `id' type from unsigned from
	to ptid_t.
	(struct sym_cache, struct breakpoint, struct
	process_info_private): Forward declare.
	(struct process_info): Declare.
	(current_process): Declare.
	(all_processes): Declare.
	(initialize_inferiors): Declare.
	(add_thread): Adjust to use ptid_t.
	(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
	(add_process, remove_process, find_thread_pid): Declare.
	(find_inferior_id): Adjust to use ptid_t.
	(cont_thread, general_thread, step_thread): Change type to ptid_t.
	(multi_process): Declare.
	(push_event): Adjust to use ptid_t.
	(read_ptid, write_ptid): Declare.
	(prepare_resume_reply): Adjust to use ptid_t.
	(clear_symbol_cache): Declare.
	* inferiors.c (all_processes): New.
	(null_ptid, minus_one_ptid): New.
	(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
	(ptid_get_tid, ptid_equal, ptid_is_pid): New.
	(add_thread): Change unsigned long to ptid.  Remove gdb_id
	parameter.  Adjust.
	(thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
	(gdb_id_to_thread): Rename to ...
	(find_thread_pid): ... this.  Change unsigned long to ptid.
	(gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
	(loaded_dll, pull_pid_from_list): Adjust.
	(add_process, remove_process, find_process_pid)
	(get_thread_process, current_process, initialize_inferiors): New.
	* target.h (struct thread_resume) <thread>: Change type to ptid_t.
	(struct target_waitstatus) <related_pid>: Ditto.
	(struct target_ops) <kill, detach>: Add `pid' argument.  Change
	return type to int.
	(struct target_ops) <join>: Add `pid' argument.
	(struct target_ops) <thread_alive>: Change pid's type to ptid_t.
	(struct target_ops) <wait>: Add `ptid' field.  Change return type
	to ptid.
	(kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
	(mywait): Add `ptid' argument.  Change return type to ptid_t.
	(target_pid_to_str): Declare.
	* target.c (set_desired_inferior): Adjust to use ptids.
	(mywait): Add new `ptid' argument.  Adjust.
	(target_pid_to_str): New.
	* mem-break.h (free_all_breakpoints): Declare.
	* mem-break.c (breakpoints): Delelete.
	(set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
	(check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
	to use per-process breakpoint list.
	(free_all_breakpoints): New.
	* remote-utils.c (struct sym_cache) <name>: Drop `const'.
	(symbol_cache, all_symbols_looked_up): Delete.
	(hexchars): New.
	(ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
	read_ptid): New.
	(prepare_resume_reply): Change ptid argument's type from unsigned
	long to ptid_t.  Adjust.  Implement W;process and X;process.
	(free_sym_cache, clear_symbol_cache): New.
	(look_up_one_symbol): Adjust to per-process symbol cache.  *
	* server.c (cont_thread, general_thread, step_thread): Change type
	to ptid_t.
	(attached): Delete.
	(multi_process): New.
	(last_ptid): Change type to ptid_t.
	(struct vstop_notif) <ptid>: Change type to ptid_t.
	(queue_stop_reply, push_event): Change `ptid' argument's type to
	ptid_t.
	(discard_queued_stop_replies): Add `pid' argument.
	(start_inferior): Adjust to use ptids.  Adjust to mywait interface
	changes.  Don't reference the `attached' global.
	(attach_inferior): Adjust to mywait interface changes.
	(handle_query): Adjust to use ptids.  Parse GDB's qSupported
	features.  Handle and report "multiprocess+".  Handle
	"qAttached:PID".
	(handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
	changes.
	(handle_v_kill): New.
	(handle_v_stopped): Adjust to use target_pid_to_str.
	(handle_v_requests): Allow multiple attaches and runs when
	multiprocess extensions are in effect.  Handle "vKill".
	(myresume): Adjust to use ptids.
	(queue_stop_reply_callback): Add `arg' parameter.  Handle it.
	(handle_status): Adjust to discard_queued_stop_replies interface
	change.
	(first_thread_of, kill_inferior_callback)
	(detach_or_kill_inferior_callback, join_inferiors_callback): New.
	(main): Call initialize_inferiors.  Adjust to use ptids, killing
	and detaching from all inferiors.  Handle multiprocess packet
	variants.
	* linux-low.h: Include gdb_proc_service.h.
	(struct process_info_private): New.
	(struct linux_target_ops) <pid_of>: Use ptid_get_pid.
	<lwpid_of>: Use ptid_get_lwp.
	(get_lwp_thread): Adjust.
	(struct lwp_info): Add `dead' member.
	(find_lwp_pid): Declare.
	* linux-low.c (thread_db_active): Delete.
	(new_inferior): Adjust comment.
	(inferior_pid): Delete.
	(linux_add_process): New.
	(handle_extended_wait): Adjust.
	(add_lwp): Change unsigned long to ptid.
	(linux_create_inferior): Add process to processes table.  Adjust
	to use ptids.  Don't set new_inferior here.
	(linux_attach_lwp): Rename to ...
	(linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
	it.  Adjust to use ptids.
	(linux_attach_lwp): New.
	(linux_attach): Add process to processes table.  Don't set
	new_inferior here.
	(struct counter): New.
	(second_thread_of_pid_p, last_thread_of_process_p): New.
	(linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
	multiple processes.
	(linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
	processes.  Remove process from process table.
	(linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
	to multiple processes.
	(any_thread_of): New.
	(linux_detach): Add `pid' argument, and handle it.  Remove process
	from processes table.
	(linux_join): Add `pid' argument.  Handle it.
	(linux_thread_alive): Change unsighed long argument to ptid_t.
	Consider dead lwps as not being alive.
	(status_pending_p): Rename `dummy' argument to `arg'.  Filter out
	threads we're not interested in.
	(same_lwp, find_lwp_pid): New.
	(linux_wait_for_lwp): Change `pid' argument's type from int to
	ptid_t.  Adjust.
	(linux_wait_for_event): Rename to ...
	(linux_wait_for_event_1): ... this.  Change `pid' argument's type
	from int to ptid_t.  Adjust.
	(linux_wait_for_event): New.
	(linux_wait_1): Add `ptid' argument.  Change return type to
	ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
	that exit from the process table.
	(linux_wait): Add `ptid' argument.  Change return type to ptid_t.
	Adjust.
	(mark_lwp_dead): New.
	(wait_for_sigstop): Adjust to use ptids.  If a process exits while
	stopping all threads, mark its main lwp as dead.
	(linux_set_resume_request, linux_resume_one_thread): Adjust to use
	ptids.
	(fetch_register, usr_store_inferior_registers)
	(regsets_fetch_inferior_registers)
	(regsets_store_inferior_registers, linux_read_memory)
	(linux_write_memory): Inline `inferior_pid'.
	(linux_look_up_symbols): Adjust to use per-process
	`thread_db_active'.
	(linux_request_interrupt): Adjust to use ptids.
	(linux_read_auxv): Inline `inferior_pid'.
	(initialize_low): Don't reference thread_db_active.
	* gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
	* proc-service.c (ps_lgetregs): Use find_lwp_pid.
	(ps_getpid): Return the pid of the current inferior.
	* thread-db.c (proc_handle, thread_agent): Delete.
	(thread_db_create_event, thread_db_enable_reporting): Adjust to
	per-process data.
	(find_one_thread): Change argument type to ptid_t.  Adjust to
	per-process data.
	(maybe_attach_thread): Adjust to per-process data and ptids.
	(thread_db_find_new_threads): Ditto.
	(thread_db_init): Ditto.
	* spu-low.c (spu_create_inferior, spu_attach): Add process to
	processes table.  Adjust to use ptids.
	(spu_kill, spu_detach): Adjust interface.  Remove process from
	processes table.
	(spu_join, spu_thread_alive): Adjust interface.
	(spu_wait): Adjust interface.  Remove process from processes
	table.  Adjust to use ptids.
	* win32-low.c (current_inferior_tid): Delete.
	(current_inferior_ptid): New.
	(debug_event_ptid): New.
	(thread_rec): Take a ptid.  Adjust.
	(child_add_thread): Add `pid' argument.  Adjust to use ptids.
	(child_delete_thread): Ditto.
	(do_initial_child_stuff): Add `attached' argument.  Add process to
	processes table.
	(child_fetch_inferior_registers, child_store_inferior_registers):
	Adjust.
	(win32_create_inferior): Pass 0 to do_initial_child_stuff.
	(win32_attach): Pass 1 to do_initial_child_stuff.
	(win32_kill): Adjust interface.  Remove process from processes
	table.
	(win32_detach): Ditto.
	(win32_join): Adjust interface.
	(win32_thread_alive): Take a ptid.
	(win32_resume): Adjust to use ptids.
	(get_child_debug_event): Ditto.
	(win32_wait): Adjust interface.  Remove exiting process from
	processes table.
2009-04-01 22:50:24 +00:00
Pedro Alves bd99dc8583 Non-stop mode support.
* server.h (non_stop): Declare.
	(gdb_client_data, handler_func): Declare.
	(delete_file_handler, add_file_handler, start_event_loop):
	Declare.
	(handle_serial_event, handle_target_event, push_event)
	(putpkt_notif): Declare.
	* target.h (enum resume_kind): New.
	(struct thread_resume): Replace `step' field by `kind' field.
	(TARGET_WNOHANG): Define.
	(struct target_ops) <wait>: Add `options' argument.
	<supports_non_stop, async, start_non_stop>: New fields.
	(target_supports_non_stop, target_async): New.
	(start_non_stop): Declare.
	(mywait): Add `options' argument.
	* target.c (mywait): Add `options' argument.  Print child exit
	notifications here.
	(start_non_stop): New.
	* server.c (non_stop, own_buf, mem_buf): New globals.
	(struct vstop_notif): New.
	(notif_queue): New global.
	(queue_stop_reply, push_event, discard_queued_stop_replies)
	(send_next_stop_reply): New.
	(start_inferior): Adjust to use resume_kind.  Adjust to mywait
	interface changes.
	(attach_inferior): In non-stop mode, don't wait for the target
	here.
	(handle_general_set): Handle QNonStop.
	(handle_query): When handling qC, return the current general
	thread, instead of the first thread of the list.
	(handle_query): If the backend supports non-stop mode, include
	QNonStop+ in the qSupported query response.
	(handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
	and non-stop mode.
	(handle_v_attach, handle_v_run): Handle non-stop mode.
	(handle_v_stopped): New.
	(handle_v_requests): Report support for vCont;t.  Handle vStopped.
	(myresume): Adjust to use resume_kind.  Handle non-stop.
	(queue_stop_reply_callback): New.
	(handle_status): Handle non-stop mode.
	(main): Clear non_stop flag on reconnection.  Use the event-loop.
	Refactor serial protocol handling from here ...
	(process_serial_event): ... to this new function.  When GDB
	selects any thread, select one here.  In non-stop mode, wait until
	GDB acks all pending events before exiting.
	(handle_serial_event, handle_target_event): New.
	* remote-utils.c (remote_open): Install remote_desc in the event
	loop.
	(remote_close): Remove remote_desc from the event loop.
	(putpkt_binary): Rename to...
	(putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
	(putpkt_binary): New as wrapper around putpkt_binary_1.
	(putpkt_notif): New.
	(prepare_resume_reply): In non-stop mode, don't change the
	general_thread.
	* event-loop.c: New.
	* Makefile.in (OBJ): Add event-loop.o.
	(event-loop.o): New rule.

	* linux-low.h (pid_of): Moved here.
	(lwpid_of): New.
	(get_lwp_thread): Use lwpid_of.
	(struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
	* linux-low.c (pid_of): Delete.
	(inferior_pid): Use lwpid_of.
	(linux_event_pipe): New.
	(target_is_async_p): New.
	(delete_lwp): New.
	(handle_extended_wait): Use lwpid_of.
	(add_lwp): Don't set lwpid field.
	(linux_attach_lwp): Adjust debug output.  Use lwpid_of.
	(linux_kill_one_lwp): If killing a running lwp, stop it first.
	Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
	(linux_detach_one_lwp): If detaching from a running lwp, stop it
	first.  Adjust to linux_wait_for_event interface changes.  Use
	lwpid_of.
	(linux_detach): Don't delete the main lwp here.
	(linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
	(status_pending_p): Don't consider explicitly suspended lwps.
	(linux_wait_for_lwp): Take an integer pid instead of a lwp_info
	pointer.  Add OPTIONS argument.  Change return type to int.  Use
	my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
	(linux_wait_for_event): Take an integer pid instead of a lwp_info
	pointer.  Add status pointer argument.  Return a pid instead of a
	status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
	changes.  In non-stop mode, don't switch to a random thread.
	(linux_wait): Rename to...
	(linux_wait_1): ... this.  Add target_options argument, and handle
	it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
	don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
	clean exit and signal exit code.  Don't stop all threads in
	non-stop mode.  In all-stop mode, only stop all threads when
	reporting a stop to GDB.  Handle explicit thread stop requests.
	(async_file_flush, async_file_mark): New.
	(linux_wait): New.
	(send_sigstop): Use lwpid_of.
	(wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
	interface changes.  In non-stop mode, don't switch to a random
	thread.
	(linux_resume_one_lwp): Use lwpid_of.
	(linux_continue_one_thread, linux_queue_one_thread): Merge into ...
	(linux_resume_one_thread): ... this.  Handle resume_stop.  In
	non-stop mode, don't look for pending flag in all threads.
	(resume_status_pending_p): Don't consider explicitly suspended
	threads.
	(my_waitpid): Reimplement.  Emulate __WALL.
	(linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
	Use lwpid_of.
	(sigchld_handler, linux_supports_non_stop, linux_async)
	(linux_start_non_stop): New.
	(linux_target_ops): Register linux_supports_non_stop, linux_async
	and linux_start_non_stop.
	(initialize_low): Install SIGCHLD handler.
	* thread-db.c (thread_db_create_event, find_one_thread)
	(thread_db_get_tls_address): Use lwpid_of.
	* win32-low.c (win32_detach): Adjust to use resume_kind.
	(win32_wait): Add `options' argument.
	* spu-low.c (spu_resume): Adjust to use resume_kind.
	(spu_wait): Add `options' argument.
2009-04-01 22:48:05 +00:00
Pedro Alves 5b1c542ea1 Decouple target code from remote protocol.
* target.h (enum target_waitkind): New.
	(struct target_waitstatus): New.
	(struct target_ops) <wait>: Return an unsigned long.  Take a
	target_waitstatus pointer instead of a char pointer.
	(mywait): Likewise.
	* target.c (mywait): Change prototype to return an unsigned long.
	Take a target_waitstatus pointer instead of a char pointer.  Adjust.
	* server.h (thread_from_wait, old_thread_from_wait): Delete
	declarations.
	(prepare_resume_reply): Change prototype to take a
	target_waitstatus.
	* server.c (thread_from_wait, old_thread_from_wait): Delete.
	(last_status, last_ptid): New.
	(start_inferior): Remove "statusptr" argument.  Adjust.  Return a
	pid instead of a signal.
	(attach_inferior): Remove "status" and "signal" parameters.
	Adjust.
	(handle_query): For qGetTLSAddr, parse the thread id with strtol,
	not as an address.
	(handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
	(handle_v_requests, myresume): Remove "status" and "signal"
	parameters.  Adjust.
	(handle_status): New.
	(main): Delete local `status'.  Adjust.
	* remote-utils.c: Include target.h.
	(prepare_resume_reply): Change prototype to take a
	target_waitstatus.  Adjust.

	* linux-low.c (linux_wait): Adjust to new target_ops->wait
	interface.
	* spu-low.c (spu_wait): Adjust.
	* win32-low.c (enum target_waitkind, struct target_waitstatus):
	Delete.
	(win32_wait): Adjust.
2009-04-01 22:31:45 +00:00
Pedro Alves 2bd7c093f6 * target.h (struct thread_resume): Delete leave_stopped member.
(struct target_ops): Add a `n' argument to the `resume' callback.
	* server.c (start_inferior): Adjust.
	(handle_v_cont, myresume): Adjust.
	* linux-low.c (check_removed_breakpoint): Adjust to resume
	interface change, and to removed leave_stopped field.
	(resume_ptr): Delete.
	(struct thread_resume_array): New.
	(linux_set_resume_request): Add new `arg' parameter.  Adjust to
	resume interface change.
	(linux_continue_one_thread, linux_queue_one_thread)
	(resume_status_pending_p): Check if the resume field is NULL
	instead of checking the leave_stopped member.
	(linux_resume): Adjust to the target resume interface change.
	* spu-low.c (spu_resume): Adjust to the target resume interface
	change.
	* win32-low.c (win32_detach, win32_resume): Ditto.
2009-04-01 22:29:33 +00:00
Pedro Alves c35fafde7c gdb/gdbserver/
* linux-low.c (linux_wait_for_event): Don't clear the `stepping'
	flag.
	(wait_for_sigstop): Don't leave a finished single-step SIGTRAP
	pending.
	(linux_continue_one_thread): Only preserve the stepping flag if
	there's a pending breakpoint.

gdb/testsuite/

	* gdb.threads/pending-step.c, gdb.threads/pending-step.exp: New.
2009-04-01 22:25:44 +00:00
Joel Brobecker f8a8dce68f * gdb.base/funcargs.exp: Set print frame-arguments to "all".
* gdb.base/call-ar-st.exp: Set print frame-arguments to "all".
        * gdb.ada/ref_param.exp: Set print frame-arguments to "all".
        * gdb.ada/lang_switch.exp: Set print frame-arguments to "all".
2009-04-01 22:08:03 +00:00
Joel Brobecker 476f7b68eb * stack.c (print_frame_arguments): Set initial value to "scalars". 2009-04-01 22:05:30 +00:00
Aleksandar Ristovski 865093a3bf * mips-tdep.c (mips_numeric_register_alieses): New definition.
(mips_gdbarch_init): Add user registers from
mips_numeric_register_aliases.
2009-04-01 19:13:42 +00:00
Joel Brobecker 5d3b6af6f9 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting. 2009-04-01 19:07:50 +00:00
Joel Brobecker 9db037429b * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
this is the last one.
2009-04-01 18:56:30 +00:00
Pedro Alves 0d8f58ca94 * remote.c (append_resumption): New.
(remote_vcont_resume): Use it.
2009-04-01 17:42:03 +00:00
Joel Brobecker 1e2f1c5caa * windows-nat.c (+windows_get_ada_task_ptid): New function.
(init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
2009-04-01 16:35:41 +00:00
gdbadmin 3f36520177 *** empty log message *** 2009-04-01 00:00:03 +00:00
Pedro Alves 0a59d50b2d * server.c (main): After the inferior having exited, call
remote_close before exiting gdbserver.
2009-03-31 22:46:36 +00:00
Paul Pluzhnikov 1b88d5c487 [obvious] Kill left-over merge marker 2009-03-31 22:39:27 +00:00
Tom Tromey 71c25deab3 gdb
2009-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
	    Keith Seitz  <keiths@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/6817
	* Makefile.in (dbxread.o): Update.
	* dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
	* dwarf2read.c (GDB_FORM_cached_string): New.
	(read_partial_die): Use dwarf2_canonicalize_name.
	(dwarf2_linkage_name): Use dwarf2_name.
	(dwarf2_canonicalize_name): New.
	(dwarf2_name): Use dwarf2_canonicalize_name.
	(dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
	* stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
	* symtab.c (lookup_symbol_in_language): Canonicalize input before
	searching.
	* cp-name-parser.y: operator() requires two parameters,
	according to libiberty.
	* minsyms.c (lookup_minimal_symbol): Canonicalize input
	before searching.
	* NEWS: Update.

gdb/testsuite

2009-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/931
	* gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical
	output.
	* gdb.cp/templates.exp: Allow canonical output.  Remove KFAILs
	for gdb/931.
	* dw2-strp.S (DW_AT_language): Change to C++.
	(DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New.
2009-03-31 20:21:08 +00:00
Joel Brobecker 45ac276db3 * gdb.texinfo (Ada Tasks): Add documentation about task-specific
breakpoints.
        (Set Breaks): Add reference to thread-specific and task-specific
        breakpoints.
2009-03-31 16:51:02 +00:00
Joel Brobecker 02d9a9cebf * gdb.ada/tasks: New testcase. 2009-03-31 16:48:49 +00:00
Joel Brobecker 4a306c9a89 Provide support for (Ada) task-specific breakpoints.
* ada-lang.h (ada_get_task_number): Add declaration.
        (breakpoint_ada_task_match): Delete declaration.
        * ada-tasks.c (ada_get_task_number): Make non-static.
        * breakpoint.h (struct breakpoint): Add field "task".
        * breakpoint.c (print_one_breakpoint_location): Add handling of
        task-specific breakpoints.
        (create_breakpoint, create_breakpoints, find_condition_and_thread):
        New parameter "task".
        (break_command_really): Update calls to find_condition_and_thread
        and create_breakpoints.
        (breakpoint_re_set_one): Update call to find_condition_and_thread.
        Set b->task.
2009-03-31 16:44:18 +00:00
Joel Brobecker 32cd1edcd2 * gdb.texinfo (Ada Tasks): Remove the documentation about
the "Running" state, as this state has been eliminated.
        Now all runnable tasks are shown as "Runnable".
2009-03-31 16:33:37 +00:00
Joel Brobecker 4a5a99175a * ada-tasks.c (short_task_info): Eliminate the "Running" task state. 2009-03-31 16:31:24 +00:00
Pedro Alves bad34192e5 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
if the thread's ptid without a thread id field is in the list
	before calling thread_change_ptid.
	(extended_remote_attach_1): In non-stop mode, do not rely on
	querying the current thread, instead, query the thread list, and
	select the first thread of the process.
	* gdbthread.h (first_thread_of_process): Declare.
	* thread.c (first_thread_of_process): Define.
2009-03-31 15:23:57 +00:00
Stan Shebs 1042e4c058 2009-03-30 Stan Shebs <stan@codesourcery.com>
Make tracepoints into a type of breakpoint.
	* breakpoint.h (enum bptype): Add bp_tracepoint.
	(struct breakpoint): Add fields step_count, pass_count, actions.
	(get_tracepoint, get_tracepoint_by_number): Declare.
	(all_tracepoints): Declare.
	* breakpoint.c: Include tracepoint.h, readline.h.
	(ALL_TRACEPOINTS): Move here from tracepoint.c.
	(tracepoint_count): Ditto.
	(should_be_inserted): GDB does not insert tracepoints itself.
	(print_it_typical): Add tracepoint case.
	(bpstat_what): Ditto.
	(print_one_breakpoint_location): Ditto, and add printing for
	pass count, step count, and action list.
	(user_settable_breakpoint): Add tracepoint case.
	(allocate_bp_location): Ditto.
	(set_breakpoint_location_function): Ditto.
	(disable_breakpoints_in_shlibs): Ditto.
	(mention): Ditto.
	(break_command_really): Add argument traceflag, use to choose
	basic breakpoint type.
	(break_command_1): Pass extra argument.
	(set_breakpoint, handle_gnu_v3_exceptions): Ditto.
	(breakpoint_re_set_one): Add tracepoint case.
	(disable_command, enable_command): Ditto.
	(set_tracepoint_count): Move here from tracepoint.c.
	(trace_command): Move here from tracepoint.c and use
	break_command_really.
	(tracepoints_info): Move here from tracepoint.c and call
	breakpoints_info.
	(enable_trace_command): Move here from tracepoint.c and call
	enable_command.
	(disable_trace_command): Move here from tracepoint.c and call
	disable_command.
	(delete_trace_command): Move here from tracepoint.c and call
	delete_breakpoint.
	(trace_pass_command): Move here from tracepoint.c.
	(get_tracepoint_by_number): Ditto.
	(tracepoint_save_command): Ditto.
	(get_tracepoint): New function.
	(all_tracepoints): New function.
	(_initialize_breakpoint): Move tracepoint init from tracepoint.c,
	deprecate "enable trace" and "disable trace" commands.
	* tracepoint.h (struct tracepoint): Remove.
	(tracepoint_chain): Remove decl.
	(deprecated_create_tracepoint_hook): Remove decl.
	(deprecated_delete_tracepoint_hook): Remove decl.
	(deprecated_modify_tracepoint_hook): Remove decl.
	(ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
	(free_actions): Update signature.
	(validate_actionline): Update signature.
	(end_actions_pseudocommand): Declare.
	(while_stepping_pseudocommand): Declare.
	* tracepoint.c: Include breakpoint.h.
	(tracepoint_chain, tracepoint_count): Remove.
	(free_actions, make_cleanup_free_actions): Update signature.
	(trace_command, set_raw_tracepoint): Remove.
	(trace_mention): Remove.
	(tracepoints_info): Remove.
	(tracepoint_operation, map_args_over_tracepoints): Remove.
	(get_tracepoint_by_number): Remove.
	(enable_trace_command, disable_trace_command): Remove.
	(delete_trace_command, trace_pass_command): Remove.
	(trace_actions_command, read_actions): Update signature.
	(validate_actionline): Update signature, use bp loc.
	(encode_actions): Ditto.
	(download_tracepoint): New function, body of trace_start_command.
	(trace_start_command): Call it, use all_tracepoints.
	(tracepoint_save_command): Remove.
	(tracepoint_dump_command): Use get_tracepoint.
	(end_actions_pseudocommand): Make globally visible.
	(while_stepping_pseudocommand): Ditto.
	(_initialize_tracepoint): Move command definitions to breakpoint.c.

	doc/
	* gdb.texinfo (Tracepoints): Describe tracepoints as a
	special case of breakpoints.
	(Enable and Disable Tracepoints): Mention deprecation.
	(Listing Tracepoints): Update description and example.

	testsuite/
	* gdb.trace/actions.exp: Update to match new info trace format.
	* gdb.trace/deltrace.exp: Ditto.
	* gdb.trace/infotrace.exp: Ditto.
	* gdb.trace/passcount.exp: Ditto.
	* gdb.trace/save-trace.exp: Ditto.
	* gdb.trace/while-stepping.exp: Ditto.
	* gdb.trace/tracecmd.exp: Ditto, plus don't allow pending option.

	gdbtk/
	* generic/gdbtk-bp.c (gdb_actions_command): Update to handle
	tracepoints as breakpoints.
	(gdb_get_tracepoint_info): Ditto, plus use get_tracepoint and
	breakpoint locations.
	(tracepoint_exists): Ditto, plus use all_tracepoints.
2009-03-31 05:08:37 +00:00
gdbadmin 4da75b00e8 *** empty log message *** 2009-03-31 00:00:03 +00:00
Thiago Jung Bauermann f8f6f20b6e gdb/
Expose frames to Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
	(SUBDIR_PYTHON_SRCS): Add python-frame.c.
	(python-frame.o): New target.
	* python/python-frame.c: New file.
	* python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
	gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
	gdbpy_initialize_frames): New prototypes.
	* python/python.c (_initialize_python): Call gdbpy_initialize_frames.
	(GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
	entries.
	* stack.c (find_frame_funname): New function, factored out of
	print_frame.
	(print_frame): Call find_frame_funname.
	* stack.h (find_frame_funname): Add prototype.

gdb/doc/
	* gdb.texinfo (Frames in Python): New node.
	(Python API): Update.

gdb/testsuite/
	* gdb.python/python-frame.c: New file.
	* gdb.python/python-frame.exp: New file.
2009-03-30 19:54:33 +00:00
gdbadmin 4104b747d5 *** empty log message *** 2009-03-30 00:00:33 +00:00
Thiago Jung Bauermann 77316f4c7e Remove unused value_object attribute `owned_by_gdb'.
* python/python-value.c (value_object): Remove owned_by_gdb
	attribute.
	(valpy_dealloc): Remove reference to self->owned_by_gdb.
	(valpy_new): Likewise.
	(value_to_value_object): Likewise.
2009-03-29 21:19:40 +00:00
Thiago Jung Bauermann c0c6f77785 gdb/
Change gdb.Value.address from a method to an attribute.
	* python/python-value.c (value_object): Add `address' element.
	(valpy_dealloc): Decrement reference to self->address if set.
	(valpy_new): Initialize val_obj->address.
	(valpy_address): Rename to ...
	(valpy_get_address): ... this.  Change signature from method to
	attribute.  Update self->address if not set.
	(value_to_value_object): Initialize val_obj->address.
	(value_object_getset): Add `address' element.
	(value_object_methods): Remove `address' element.

gdb/testsuite/
	* gdb.python/python-value.exp: Add tests for the address
	attribute.

gdb/doc/
	* gdb.texinfo (Values From Inferior): Change gdb.Value.address
	from a method to an attribute.
2009-03-29 21:11:11 +00:00
Andreas Schwab 3cb5190557 * gdb.arch/powerpc-prologue.exp: Update for disassemble-next-line. 2009-03-29 14:52:54 +00:00
Andreas Schwab c2c8d75b34 * observer.sh: Set LANG/LC_ALL to C, not c. 2009-03-29 13:36:27 +00:00
gdbadmin 9259819687 *** empty log message *** 2009-03-29 00:00:33 +00:00
Kevin Buettner 1b31f75d63 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
`char' is unsigned.
2009-03-28 04:56:42 +00:00
Pedro Alves f91d3df5c6 * remote.c (remote_stop_ns): If multi-process extensions are off,
and GDB is requesting the whole process to stop, sent "vCont;t",
	not "vCont;t:-1"
2009-03-28 01:15:13 +00:00
Pedro Alves 7b0e805131 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
null inferior_ptid.
2009-03-28 00:58:31 +00:00
gdbadmin 11fe854022 *** empty log message *** 2009-03-28 00:00:03 +00:00
Eli Zaretskii 20ec62945d Add one more tweak for readline/examples. 2009-03-27 13:59:38 +00:00
Eli Zaretskii 5362e076aa * config/djgpp/fnchange.lst: Update to fix ARI-reported problems. 2009-03-27 13:38:31 +00:00
Doug Evans 88fc996f58 * thread.c (do_restore_current_thread_cleanup): Redo test for
whether to restore old->inferior_ptid.

	* gdb.mi/mi-nonstop-exit.exp: New file.
	* gdb.mi/non-stop-exit.c: New file.
2009-03-27 02:44:51 +00:00
gdbadmin 5cff901f31 *** empty log message *** 2009-03-27 00:00:34 +00:00
Tom Tromey 56ef84b1f1 gdb
* breakpoint.c (resolve_sal_pc): Preserve original line number
	when skipping prologue.
gdb/testsuite
	Update for change to prologue skipping:
	* gdb.mi/mi2-simplerun.exp: Update.
	* gdb.mi/mi2-break.exp: Update.
	* gdb.mi/mi-simplerun.exp: Update.
	* gdb.mi/mi-break.exp: Update.
	* gdb.base/ending-run.exp: Update.
2009-03-26 23:30:12 +00:00
Doug Evans a5321aa4d5 * thread.c (inferior_thread) Remove "extern" in definition. 2009-03-26 21:30:26 +00:00
Thiago Jung Bauermann def2b0009c gdb/
Add gdb.Value.is_optimized_out attribute.
	* python/python-value.c (valpy_get_is_optimized_out): New
	function.
	(value_object_getset): New variable.
	(value_object_type): Initialize tp_getset element.

gdb/doc/
	* gdb.texinfo (Values From Inferior): Document is_optimized_out
	attribute.

gdb/testsuite/
	* gdb.python/python-value.exp (test_value_in_inferior): Test
	gdb.Value.is_optimized_out attribute.
2009-03-26 20:58:11 +00:00
Jan Kratochvil 442ddf5987 gdb/
Recognize missing DW_AT_location as <value optimized out>.
	* dwarf2read.c
	(new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
	Call add_symbol_to_list.

gdb/testsuite/
	* gdb.dwarf2/dw2-noloc-main.c: New file.
	* gdb.dwarf2/dw2-noloc.S: New symbols matrix.
	(.text): Remove.
	(.data): New.
	(DW_AT_stmt_list, .debug_line, DW_AT_frame_base): Remove.
	(DW_AT_low_pc, DW_AT_high_pc): Reference `dw2-noloc-main.c'.
	(DW_TAG_subprogram func_cu1, noloc): Remove.
	(main): New.
	* gdb.dwarf2/dw2-noloc.exp: Use prepare_for_testing, compile also
	`dw2-noloc-main.c'.  Test the new DIEs from `dw2-noloc.S'.
	(file_symbols): New procedure.
2009-03-26 14:47:19 +00:00
Tom Tromey 78485d59c6 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
* stack.c (print_this_frame_argument_p): Use check_typedef.
2009-03-26 01:27:45 +00:00
Tom Tromey 94ae171419 * configure: Rebuild.
* acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
	Rearrange flags setting.  Add comments.
2009-03-26 01:18:35 +00:00
Pierre Muller 2bc57ae31d * config/i386/nm-i386.h: Remove code within
I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
	* config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
	macro.
	* config/i386/nm-cygwin64.h: Ditto.
	* config/i386/nm-fbsd.h: Ditto.
	* config/i386/nm-go32.h: Ditto.
	* config/i386/nm-linux.h: Ditto.
	* config/i386/nm-linux64.h: Ditto.
2009-03-26 00:18:46 +00:00
gdbadmin 1bdc3addc5 *** empty log message *** 2009-03-26 00:00:03 +00:00
Pierre Muller 549ba0f80a ARI fix: "xasprintf" rule.
* printcmd.c (sym_info): Replace xasprintf by xstrprintf.
2009-03-25 22:38:46 +00:00
Pedro Alves 68c976001a * remote.c (remote_start_remote): In non-stop mode, call
init_wait_for_inferior before adding threads and inferiors.
2009-03-25 22:27:49 +00:00
Joel Brobecker a6f1cd9667 * breakpoint.c (breakpoint_thread_match): Split a large condition
into several smaller conditions.  No behavior change.
2009-03-25 22:08:29 +00:00
Joel Brobecker dbfb4bc7c9 Fix the date in the last entry. 2009-03-25 22:07:16 +00:00
Pedro Alves a07daef34e gdb/
* infrun.c (infrun_thread_thread_exit): New.
	(_initialize_infrun): Attach it to the thread_exit observer.
	* thread.c (delete_thread_1): Always call the observer, passing it
	the silent flag.
	* mi/mi-interp.c (mi_thread_exit): Add "silent" parameter.  If
	SILENT, return immediately.

gdb/doc/
	* observer.texi (thread_exit): Add "silent" parameter.
2009-03-25 21:53:11 +00:00
Pedro Alves d729566a19 * infrun.c (normal_stop): Use has_stack_frames instead of
target_has_stack.
	* mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
	when there is no thread selected.
	(mi_cmd_execute): Don't special case commands that can run without
	a valid selected thread.
	* top.c (execute_command): Don't special case commands that can
	run without a valid selected thread.  Use has_stack_frames.
	* infcmd.c (ensure_valid_thread): New.
	(continue_1, step_1, jump_command, signal_command): Use it.
	(detach_command): Error out if there's no selected thread/inferior.
	* thread.c (print_thread_info): Allow having no thread selected.
	(switch_to_thread): Don't read the PC if there is no current thread.
	(do_restore_current_thread_cleanup): Don't record the current
	frame if there is no current thread.
	(make_cleanup_restore_current_thread): Don't read frame info if
	there is no selected thread.
	(_initialize_thread): Don't mark commands as
	"no_selected_thread_ok".
	* frame.c (get_current_frame): Error out if there is no valid
	selected thread.
	(has_stack_frames): Return false if there is no valid
	selected thread.
	* cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
	"no_selected_thread_ok".
	* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
	(get_cmd_no_selected_thread_ok): Delete.
	* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
	(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
	Delete declaration.
	* stack.c (get_selected_block): Use has_stack_frames.
2009-03-25 21:42:35 +00:00
Thiago Jung Bauermann f04c6d38e2 gdb/
Fix size of FPSCR in Power 7 processors.
	* ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
	(PPC_FEATURE_HAS_DFP): New #define.
	(ppc_linux_read_description): Check for DFP feature instead of
	ISA 2.05 to decide on size of the FPSCR.

gdbserver/
	Fix size of FPSCR in Power 7 processors.
	* linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
	(PPC_FEATURE_HAS_DFP): New #define.
	(ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
	size of the FPSCR.
2009-03-25 21:15:04 +00:00
Tom Tromey a8df5de46d * gdb.base/charset.exp (valid_target_charset): New proc.
Use it to skip tests on invalid charsets.
2009-03-25 19:25:49 +00:00
Kevin Buettner 6c02c64c31 * mn10300-tdep.c (trad-frame.h): Don't include.
(prologue-value.h): Include.
	(mn10300_frame_unwind_cache, set_reg_offsets): Delete.
	(struct mn10300_prologue): Define.
	(push_reg, translate_rreg, check_for_saved): New functions.
	(mn10300_analyze_prologue): Rewrite, using prologue-value
	machinery.  Handle more instructions than before.  Permit
	instructions to occur in any order.
	(mn10300_skip_prologue): Find the extents of the function
	in question; mn10300_analyze_prologue no longer does this.
	(mn10300_analyze_frame_prologue): New function.
	(mn10300_frame_base): New function.
	(mn10300_frame_this_id): Rewrite, no longer using trad-frame
	implementation.
	(mn10300_frame_prev_register): Likewise.
	(mn10300_frame_base_address, mn10300_frame_base struct): Delete.
	(mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
	`this_frame'.
	(mn10300_frame_unwind_init): Don't call frame_base_set_default().
2009-03-25 13:40:05 +00:00
Pierre Muller cc1d7add9b * gdb.base/completion.exp: Add a test for directory completion. 2009-03-25 10:52:22 +00:00
Pierre Muller 67c296a2d7 Fix completer problem for filename completion on the first try.
* gdb/completer.h (gdb_completion_word_break_characters): New function.
	* gdb/completer.c: Include gdb_assert.h.
	(complete_line_internal_reason): New enum.
	(complete_line_internal): Change last argument type to
	complete_line_internal_reason.
	Modify function to handle the different complete_line_internal_reason
	argument values.
	(complete_line): Adapt to change in complete_line_internal.
	(command_completer): Ditto.
	(gdb_completion_word_break_characters): Implement new function.
	* top.c (init_main): Set  rl_completion_word_break_hook to
	gdb_completion_word_break_characters.
2009-03-25 10:50:57 +00:00
Pierre Muller 1a6d2f2ff6 ARI fix: "strlen d_name" rule.
* linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
2009-03-25 10:02:13 +00:00
Tom Tromey fc3b640d97 2009-03-24 Tom Tromey <tromey@redhat.com>
Pedro Alves  <pedro@codesourcery.com>

	* configure, config.in: Rebuild.
	* configure.ac: Check for libiconvlist.
	* charset.c: Check HAVE_LIBICONVLIST.
	* acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
	LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
	* Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
	Remove.
	(INTERNAL_CFLAGS_BASE): Update.
	(INTERNAL_LDFLAGS): Update.
	(CLIBS): Update.
2009-03-25 00:58:37 +00:00
gdbadmin fa5074cf96 *** empty log message *** 2009-03-25 00:00:02 +00:00
Jan Kratochvil 76a39ba7a1 * configure.ac: Initialize the variable $PREFER_CURSES.
* configure: Regenerated.
2009-03-24 17:01:34 +00:00
Jan Kratochvil bd8a8e1b9c * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
* configure: Regenerated.
2009-03-24 16:54:35 +00:00
Pierre Muller a3224241d3 ARI fix: "strerror" rule.
* darwin-nat.c (darwin_ptrace): Use safe_strerror.
	(darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
2009-03-24 07:19:46 +00:00
Joel Brobecker 6cdd57f45d * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
before looking up the fields inside our struct type.
2009-03-24 02:08:23 +00:00
Joel Brobecker 17466c1a8a * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
trying to resolve the type qualification.
2009-03-24 02:07:07 +00:00
Joel Brobecker 8008e2653f * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
we try to apply the attribute on the real type, rather than
        its associated typedef.
2009-03-24 02:04:19 +00:00
Joel Brobecker 31dedfee60 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
to make sure we try to get the modulus of the actual type, not the
        associated typedef.
2009-03-24 02:00:51 +00:00
Joel Brobecker 5bc23cb38a * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
[OP_ATR_LENGTH]: When using the attribute on a type, make sure
        to get the real type, not the associated typedef.
2009-03-24 01:58:22 +00:00
Joel Brobecker e0cfd8e38b Fix typo (sleep -> usleep). 2009-03-24 01:52:16 +00:00
Joel Brobecker 872c8b510d * ada-lang.c (ada_get_field_index): Add handling of the case
when TYPE is a typedef of a struct.
2009-03-24 01:51:48 +00:00
Joel Brobecker dcb626be9b * gdb_usleep.h, gdb_usleep.c: New files.
* Makefile.in (SFILES): Add gdb_usleep.c.
            (HFILES_NO_SRCDIR): Add gdb_usleep.h.
            (COMMON_OBS): Add gdb_usleep.o.
            * ser-unix.c (hardwire_send_break): Replace call to gdb_select
            by call to gdb_usleep.
2009-03-24 01:37:48 +00:00
Joel Brobecker 24be086dc4 * buildsym.c (end_symtab): If we ignore the subfiles, then
unlink the associated symtabs if they were already allocated.
2009-03-24 01:32:46 +00:00
Joel Brobecker cb01cfba2c Provide a way to force building of GDB with libcurses.
* configure.ac: Add --with-curses.
        * configure: Regenerated.
2009-03-24 01:19:27 +00:00
gdbadmin fc635112e6 *** empty log message *** 2009-03-24 00:00:03 +00:00
Tom Tromey 9c482037a9 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
error message.
2009-03-23 21:06:08 +00:00
Paul Pluzhnikov e2dd7057cf 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
	solib_contains_address_p instead of searching.
2009-03-23 18:34:03 +00:00
Tom Tromey 0dd7fb99eb * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
(iconv): Make 'inbuf' argument const.
	(convert_between_encodings): Use ICONV_CONST.
	(wchar_iterate): Likewise.
2009-03-23 17:48:09 +00:00
Pedro Alves 78e5cee680 * server.c (handle_query) Whitespace and formatting. 2009-03-23 00:22:54 +00:00
gdbadmin ba0f336fa5 *** empty log message *** 2009-03-23 00:00:33 +00:00
Pedro Alves 1b3f60162b * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
	linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
	linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
	regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
	thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
	Makefile.in, configure.ac: Fix whitespace throughout.
	* configure: Regenerate.
2009-03-22 23:57:10 +00:00
Pedro Alves a07b2135db * inferiors.c (find_inferior): Make it safe for the callback
function to delete the currently iterated inferior.
2009-03-22 22:34:04 +00:00
Pedro Alves 67cc2626af * Makefile.in (linuw_low_h): Move higher.
(thread-db.o): Depend on $(linux_low_h).
2009-03-22 22:19:34 +00:00
Christopher Faylor 418c6cb3ce * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
dynamically loaded function.
(LookupPrivilegeValueA): Ditto.
(OpenProcessToken): Ditto.
(AdjustTokenPrivileges): Rename and define placeholder for address of
dynamically loaded function.
(LookupPrivilegeValueA): Ditto.
(OpenProcessToken): Ditto.
(set_process_privilege): Remove check for loaded functions.
(bad_OpenProcessToken): Define.
(_initialize_loadable): Load token functions from advapi here, setting
OpenProcessToken function to a dummy static function which always return error
if OS doesn't support this functionality.
2009-03-22 22:13:21 +00:00
Christopher Faylor 695de547fc * win32-nat.c (ctrl_c_handler): New function.
(win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior is run
in a separate console.
2009-03-22 21:43:56 +00:00
Christopher Faylor 2b008701dc * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound for
dynamically loaded function.
(DebugBreakProcess): Ditto.
(DebugSetProcessKillOnExit): Ditto.
(EnumProcessModules): Ditto.
(GetModuleFileNameExA): Ditto.
(GetModuleInformation): Ditto.
(DebugActiveProcessStop): Rename and define placeholder for address of
dynamically loaded function.  for dynamically loaded function.
(DebugBreakProcess): Ditto.
(DebugSetProcessKillOnExit): Ditto.
(EnumProcessModules): Ditto.
(GetModuleFileNameExA): Ditto.
(GetModuleInformation): Ditto.
(psapi_loaded): Delete.
(get_module_name): Don't check psapi_loaded, just rely on the fact that
dynamically loaded functions will return failure if they weren't previously
found.
(has_detach_ability): Delete.
(windows_attach): Remove call to has_detach_ability ().  Just rely on functions
being callable.
(bad_DebugActiveProcessStop): Define.
(bad_DebugBreakProcess): Ditto.
(bad_DebugSetProcessKillOnExit): Ditto.
(bad_EnumProcessModules): Ditto.
(bad_GetModuleFileNameExA): Ditto.
(bad_GetModuleInformation): Ditto.
(_initialize_loadable): Rename from _initialize_psapi.  Initialize all dynamic
storage here, setting nonexistent functions to dummy static functions which
always return error.
2009-03-22 21:27:30 +00:00
Jan Kratochvil bcd5727bdd Fix a racy FAIL.
* gdb.base/auxv.exp (fetch_auxv): Fix trailing newlines consumption.
	* gdb.base/callfuncs.exp (fetch_all_registers): Likewise.
2009-03-22 21:11:45 +00:00
Pedro Alves f3b1572e1a gdb/
* mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
	to the about_to_proceed observer notification.
	(mi_about_to_proceed): New.
	(mi_on_resume): Only output ^running and the prompt here if the
	target was proceeded.
	* breakpoint.c (breakpoint_proceeded): New static.
	(breakpoint_about_to_proceed): New.
	(_initialize_breakpoints): Attach breakpoint_about_to_proceed to
	the about_to_proceed observer notification.
	* inferior.h (breakpoint_proceeded): Delete declaration.
	* infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
	Notify the about_to_proceed observers.
	(struct inferior_status): Delete breakpoint_proceeded member.
	(save_inferior_status): Don't save it.
	(restore_inferior_status): Don't restore it.
	* mi-main.h (mi_proceeded): Declare.
	* mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
	a command.

gdb/doc/

	* observer.texi (about_to_proceed): New.
2009-03-22 18:06:07 +00:00
Pedro Alves c5a4d20bb9 * gdbthread.h (struct thread_info): Add in_infcall member.
* infcall.c (run_inferior_call): Save, set and restore in_infcall.
	Remove reverences to suppress_resume_observer.  Refresh
	`call_thread' after returning from `proceed'.
	* infcmd.c (suppress_resume_observer): Delete.
	* inferior.h (suppress_resume_observer): Delete declaration.
	* mi/mi-interp.c (mi_on_resume): Suppress output while calling an
	inferior function.
	* thread.c (set_running): Remove references to
	suppress_resume_observer.
	* infrun.c (struct inferior_status): Add in_infcall member.
	(save_inferior_status): Save it.
	(restore_inferior_status): Restore it.
2009-03-22 17:59:59 +00:00
Pedro Alves 41d2bdb467 * infcall.c (run_inferior_call): Remove references to
suppress_stop_observer.
	* infcmd.c (suppress_stop_observer): Delete.
	(finish_command_continuation): Remove NOTE.  Don't clear
	suppress_stop_observer anymore.
	(finish_command_continuation_free_arg): Likewise.
	(finish_forward): Remove references to suppress_stop_observer.
	Call normal_stop observer if we haven't already.
	* inferior.h (suppress_stop_observer): Delete.
	* infrun.c (normal_stop): When deciding to suppress the
	normal_stop observer, check for proceed_to_finish instead of
	suppress_stop_observer.
2009-03-22 17:57:11 +00:00
Pedro Alves 065a2c74b5 * symfile.c (symfile_relocate_debug_section): Remove check for
SEC_DEBUGGING.
2009-03-22 17:32:16 +00:00
gdbadmin bb668620ab *** empty log message *** 2009-03-22 00:00:03 +00:00
Eli Zaretskii 1db612985f From Jeremy Bennett <jeremy.bennett@embecosm.com>:
* stack_frame.eps: Version of image for TeX DVI output.
2009-03-21 14:35:04 +00:00
Eli Zaretskii 587afa3811 From Jeremy Bennett <jeremy.bennett@embecosm.com>:
* gdbint.texinfo (everywhere): Use braces {} in @deftypeXX type
	field throughout to handle types with spaces in them.  Fix typos
	found by aspell.
	(Summary, Requirements, Contributors): New first chapter,
	"Summary" added, old Requirements section moved there, and new
	section, "Contributors" added.
	(Initializing a New Architecture, Register Representation)
	(Frame Interpretation, Inferior Call Setup, Adding a New Target)
	(Porting gdb): These sections extended and updated.
	(Compiler Characteristics): This section (empty) deleted.
	(Defining Other Architecture Features): This section renamed and
	duplicate material removed from (formerly "Target Conditionals").
	Use braces {} in @deftypeXX type field throughout to handle types
	with spaces in them. Typos found by aspell fixed.

	* stack_frame.svg: New file, source of image for gdbint.texinfo.
	* stack_frame.pdf: Version of image for PDF output.
	* stack_frame.png: Version of image for HTML output and for Emacs.
	* stack_frame.txt: Version of image for Info output.
2009-03-21 10:24:35 +00:00
Eli Zaretskii 10af6951e8 * gdb.texinfo (Character Sets): Fix last change. 2009-03-21 08:33:14 +00:00
Thiago Jung Bauermann cc924cad91 gdb/
2009-03-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Jim Blandy  <jimb@red-bean.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	Miscellaneous fixes to the Python code.
	* python/python-cmd.c (cmdpy_init): Accept keyword
	arguments.
	* python/python-value.c (valpy_string): Accept keyword
	arguments.
	(valpy_binop): Use `break' to exit from the TRY_CATCH block.
	Do not call value_to_value_object on NULL RES_VAL.
	(value_object_methods): Change `string' entry to also accept
	keyword arguments.
	(convert_value_from_python): Return a copy of the value if obj is
	a gdb.Value object.
	(value_object_methods): Mark the `string' method as accepting
	keywords, and show method "prototype" in the doc string.
	* python/python.c (get_parameter): Don't return inside a
	TRY_CATCH.

gdb/doc/
2009-03-21  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.texinfo (Values From Inferior): Fix optional arguments
	markup.
	(Commands In Python): Adjust argument names of gdb.Command.__init__
	to what the function accepts as keywords.

gdb/testsuite/
2009-03-21  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-cmd.exp: Add tests for keyword arguments.
	* gdb.python/python-function.exp: Add test for function returning
	a GDB value.
2009-03-21 03:13:02 +00:00
Thiago Jung Bauermann bc3b79fd1a gdb/
2009-03-05  Tom Tromey  <tromey@redhat.com>

	Add support for convenience functions in Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
	(SUBDIR_PYTHON_SRCS): Add python-function.c.
	(python-function.o): New target.
	* eval.c: Include "python/python.h" and <ctype.h>.
	(evaluate_subexp_standard): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
	* parse.c (write_exp_string): Remove duplicate word in comment.
	* python/python-function.c: New file.
	* python/python-internal.h (gdbpy_initialize_functions): Add
	prototype.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_functions.
	* valprint.c (value_check_printable): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* value.c: Include "cli/cli-decode.h".
	(internal_function): New struct.
	(functionlist, internal_fn_type): New static variables.
	(lookup_only_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(create_internalvar): Likewise.  Initialize new field.
	(set_internal_var): Fix typo in comment.  Don't allow assignment
	to canonical variable.
	(value_create_internal_function, value_internal_function_name,
	call_internal_function, function_command, function_destroyer,
	add_internal_function): New functions.
	(_initialize_values): Create `function' placeholder command.
	Initialize internal_fn_type.
	* value.h (lookup_only_internalvar, create_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(internal_function_fn, add_internal_function, call_internal_function,
	value_internal_function_name): Add prototypes.
	(struct internalvar) <canonical>: New field.

gdb/doc/
2008-03-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Convenience Vars): Document convenience functions.
	(Functions In Python): New node.
	(Python API): Update.

gdb/testsuite/
2009-03-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-function.exp: New file.
2009-03-21 03:03:56 +00:00
Tom Tromey 546e879ee8 * c-lang.c (evaluate_subexp_c): Call check_typedef. 2009-03-21 00:46:17 +00:00
gdbadmin ced4bf0cb4 *** empty log message *** 2009-03-21 00:00:33 +00:00
Tom Tromey 6c7a06a3fa gdb:
2009-03-19  Tom Tromey  <tromey@redhat.com>
	    Julian Brown  <julian@codesourcery.com>

	PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
	PR i18n/9401, PR exp/9613:
	* NEWS: Update
	* value.h (value_typed_string): Declare.
	(val_print_string): Update.
	* valprint.h (print_char_chars): Update.
	* valprint.c (print_char_chars): Add type argument.  Update.
	(val_print_string): Likewise.
	* valops.c (value_typed_string): New function.
	* utils.c (host_char_to_target): New function.
	(parse_escape): Use host_char_to_target, host_hex_value.  Update.
	Remove '^' case.
	(no_control_char_error): Remove.
	* typeprint.c (print_type_scalar): Update.
	* scm-valprint.c (scm_scmval_print): Update.
	* scm-lang.h (scm_printchar, scm_printstr): Update.
	* scm-lang.c (scm_printchar): Add type argument.
	(scm_printstr): Likewise.
	* printcmd.c (print_formatted): Update.
	(print_scalar_formatted): Update.
	(printf_command) <wide_string_arg, wide_char_arg>: New constants.
	Handle '%lc' and '%ls'.
	* parser-defs.h (struct typed_stoken): New type.
	(struct stoken_vector): Likewise.
	(write_exp_string_vector): Declare.
	* parse.c (write_exp_string_vector): New function.
	* p-valprint.c (pascal_val_print): Update.
	* p-lang.h (is_pascal_string_type, pascal_printchar,
	pascal_printstr): Update.
	* p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
	Add 'char_type' argument.
	(pascal_emit_char): Add type argument.
	(pascal_printchar): Likewise.
	(pascal_printstr): Likewise.
	* objc-lang.c (objc_emit_char): Add type argument.
	(objc_printchar): Likewise.
	(objc_printstr): Likewise.
	* macroexp.c (get_character_constant): Handle unicode characters.
	Use c_parse_escape.
	(get_string_literal): Handle unicode strings.  Use
	c_parse_escape.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Update.
	(m2_val_print): Update.
	* m2-lang.c (m2_emit_char): Add type argument.
	(m2_printchar): Likewise.
	(m2_printstr): Likewise.
	* language.h (struct language_defn) <la_printchar>: Add type
	argument.
	<la_printstr, la_emitchar>: Likewise.
	(LA_PRINT_CHAR): Likewise.
	(LA_PRINT_STRING): Likewise.
	(LA_EMIT_CHAR): Likewise.
	* language.c (unk_lang_emit_char): Add type argument.
	(unk_lang_printchar): Likewise.
	(unk_lang_printstr): Likewise.
	* jv-valprint.c (java_val_print): Update.
	* jv-lang.c (java_emit_char): Add type argument.
	* f-valprint.c (f_val_print): Update.
	* f-lang.c (f_emit_char): Add type argument.
	(f_printchar): Likewise.
	(f_printstr): Likewise.
	* expprint.c (print_subexp_standard): Update.
	* charset.h (target_wide_charset): Declare.
	(c_target_char_has_backslash_escape, c_parse_backslash,
	host_char_print_literally, host_char_to_target,
	target_char_to_host, target_char_to_control_char): Remove.
	(enum transliterations): New type.
	(convert_between_encodings): Declare.
	(HOST_ESCAPE_CHAR): New define.
	(host_letter_to_control_character, host_hex_value): Declare.
	(enum wchar_iterate_result): New enum.
	(struct wchar_iterator): Declare.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): Declare.
	* charset-list.h: New file.
	* c-valprint.c (textual_name): New function.
	(textual_element_type): Handle wide character types.
	(c_val_print): Pass original type to textual_element_type.  Handle
	wide character types.
	(c_value_print): Use textual_element_type.  Pass original type of
	value to val_print.
	* c-lang.h (enum c_string_type): New type.
	(c_printchar, c_printstr): Update.
	* c-lang.c (classify_type): New function.
	(print_wchar): Likewise.
	(c_emit_char): Add type argument.  Handle wide characters.
	(c_printchar): Likewise.
	(c_printstr): Add type argument.  Handle wide and multibyte
	character sets.
	(convert_ucn): New function.
	(emit_numeric_character): Likewise.
	(convert_octal): Likewise.
	(convert_hex): Likewise.
	(ADVANCE): New macro.
	(convert_escape): New function.
	(parse_one_string): Likewise.
	(evaluate_subexp_c): Likewise.
	(exp_descriptor_c): New global.
	(c_language_defn): Use exp_descriptor_c.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	(charset_for_string_type): New function.
	* c-exp.y (%union): Add 'svec' and 'tsval'.
	(CHAR): New token.
	(exp): Add CHAR production.
	(string_exp): Rewrite.
	(exp) <string_exp>: Rewrite.
	(tempbuf): Now global.
	(tempbuf_init): New global.
	(parse_string_or_char): New function.
	(yylex) <tempbuf>: Now global.
	<tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
	Remove.
	Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
	(c_parse_escape): New function.
	* auxv.c (fprint_target_auxv): Update.
	* ada-valprint.c (ada_emit_char): Add type argument.
	(ada_printchar): Likewise.
	(ada_print_scalar): Update.
	(printstr): Add type argument.  Update calls to ada_emit_char.
	(ada_printstr): Add type argument.
	(ada_val_print_array): Update.
	(ada_val_print_1): Likewise.
	* ada-lang.c (emit_char): Add type argument.
	* ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
	type arguments.
	* gdb_locale.h: Include langinfo.h.
	* charset.c (_initialize_charset): Set default host charset from
	the locale.  Don't register charsets.  Add target-wide-charset
	commands.  Call find_charset_names.
	(struct charset, struct translation): Remove.
	(GDB_DEFAULT_HOST_CHARSET): Remove.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
	(target_wide_charset_name): New global.
	(show_host_charset_name): Handle "auto".
	(show_target_wide_charset_name): New function.
	(host_charset_enum, target_charset_enum): Remove.
	(charset_enum): New global.
	(all_charsets, register_charset, lookup_charset, all_translations,
	register_translation, lookup_translation): Remove.
	(simple_charset, ascii_print_literally, ascii_to_control): Remove.
	(iso_8859_print_literally, iso_8859_to_control,
	iso_8859_family_charset): Remove.
	(ebcdic_print_literally, ebcdic_to_control,
	ebcdic_family_charset): Remove.
	(struct cached_iconv, check_iconv_cache, cached_iconv_convert,
	register_iconv_charsets): Remove.
	(target_wide_charset_be_name, target_wide_charset_le_name): New
	globals.
	(identity_either_char_to_other): Remove.
	(set_be_le_names, validate): New functions.
	(backslashable, backslashed, represented): Remove.
	(default_c_target_char_has_backslash_escape): Remove.
	(default_c_parse_backslash, iconv_convert): Remove.
	(ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
	ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
	iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
	ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
	ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
	ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
	(table_convert_char, table_translation, simple_table_translation):
	Remove.
	(current_host_charset, current_target_charset,
	c_target_char_has_backslash_escape_func,
	c_target_char_has_backslash_escape_baton): Remove.
	(c_parse_backslash_func, c_parse_backslash_baton): Remove.
	(host_char_to_target_func, host_char_to_target_baton): Remove.
	(target_char_to_host_func, target_char_to_host_baton): Remove.
	(cached_iconv_host_to_target, cached_iconv_target_to_host):
	Remove.
	(lookup_charset_or_error, check_valid_host_charset): Remove.
	(set_host_and_target_charsets): Remove.
	(set_host_charset, set_target_charset): Remove.
	(set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
	(set_target_wide_charset_sfunc): New function.
	(show_charset): Print target wide character set.
	(host_charset, target_charset): Rewrite.
	(target_wide_charset): New function.
	(c_target_char_has_backslash_escape): Remove.
	(c_parse_backslash): Remove.
	(host_letter_to_control_character): New function.
	(host_char_print_literally): Remove.
	(host_hex_value): New function.
	(target_char_to_control_char): Remove.
	(cleanup_iconv): New function.
	(convert_between_encodings): New function.
	(target_char_to_host): Remove.
	(struct wchar_iterator): Define.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): New functions.
	(do_cleanup_iterator): New function.
	(char_ptr): New typedef.
	(charsets): New global.
	(add_one, find_charset_names): New functions.
	(default_charset_names): New global.
	(auto_host_charset_name): Likewise.
	* aclocal.m4, config.in, configure: Rebuild.
	* configure.ac: Call AM_LANGINFO_CODESET.
	(GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
	(AM_ICONV): Invoke earlier.
	* acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
	LIBICONV_LIBDIR.  Check for libiconv in build tree.
	* Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
	(INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
	(INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
	* gdb_obstack.h (obstack_grow_wstr): New define.
        * gdb_wchar.h: New file.
        * defs.h: Include it.
gdb/testsuite:
	* gdb.base/store.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp (fetch_all_registers): Update for change
	to escape output.
	* gdb.base/pointers.exp: Update for change to escape output.
	* gdb.base/long_long.exp (gdb_test_long_long): Update for change
	to escape output.
	* gdb.base/constvars.exp (do_constvar_tests): Update for change to
	escape output.
	* gdb.base/call-rt-st.exp (print_struct_call): Update for change
	to escape output.
	* gdb.cp/ref-types.exp (gdb_start_again): Update for change to
	escape output.
	* gdb.base/setvar.exp: Update for change to escape output.
	* lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C.
	* gdb.base/printcmds.exp (test_print_all_chars): Update for change
	to escape output.
	(test_print_string_constants): Likewise.
	* gdb.base/charset.exp (valid_host_charset): Check size of
	wchar_t.  Handle UCS-2 and UCS-4.  Add tests for wide and unicode
	cases.  Handle "auto"-related output.
	* gdb.base/charset.c (char16_t, char32_t): New typedefs.
	(uvar, Uvar): New globals.
gdb/doc:
	* gdb.texinfo (Character Sets): Remove obsolete text.  Document
	set target-wide-charset.
	(Requirements): Mention iconv.
2009-03-20 23:04:40 +00:00
Tom Tromey cb249c71f6 2009-03-20 Tom Tromey <tromey@redhat.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>

	* dwarf2read.c (process_die): Handle DW_TAG_typedef.
	* eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
	typedef.
	* ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
	SYMBOL_TYPE result.
	* ada-typeprint.c (print_array_type): Do the NULL check
	unconditionally.
2009-03-20 22:00:11 +00:00
gdbadmin e00e5ec5a1 *** empty log message *** 2009-03-20 00:00:33 +00:00
Tom Tromey 16ad93705c * utils.c (do_obstack_free): New function.
(make_cleanup_obstack_free): Likewise.
	* defs.h (make_cleanup_obstack_free): Declare.
2009-03-19 17:39:31 +00:00
Jerome Guitton c31af87b2e * gdb.ada/fixed_points/fixed_points.adb: Add a test on overprecise
deltas.
	* gdb.ada/fixed_points.exp: Ditto.
2009-03-19 14:08:50 +00:00
gdbadmin 7728216e03 *** empty log message *** 2009-03-19 00:00:33 +00:00
Doug Evans 89ecc4f5e7 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
int, not a long long.
	(linux_nat_info_proc_cmd): Store pid in long instead of long long.
2009-03-18 16:47:45 +00:00
Doug Evans a411cd0e60 * expprint.c (dump_raw_expression): Print note if non-NULL. 2009-03-18 16:38:18 +00:00
Doug Evans 36dc683c52 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
backwards.
2009-03-18 16:22:50 +00:00
Pedro Alves 51272cf2e9 * return-nodebug.c: Don't include stdio.h.
(init): Delete.
	(func): Delete definition and provide extern declaration.
	(t): New.
	(main): Don't call printf.  Call func and store its result in t.
	* return-nodebug1.c: New.
	* return-nodebug.exp: Don't expect stdio output.  Instead, print
	the global variable t.  Drop printf formatters and cast types from
	foreach loop.  Don't use prepare_for_testing.  Compile
	return-nodebug.c and return-nodebug1.c in separate steps.  Don't
	define FORMAT or CAST.
2009-03-18 15:36:01 +00:00
Nathan Sidwell 5b1ba0e546 * Makefile.in: Update license to GPLv3.
* ada-exp.y: Update license to GPLv3.
	* ada-lex.l: Update license to GPLv3.
	* c-exp.y: Update license to GPLv3.
	* cp-name-parser.y: Update license to GPLv3.
	* darwin-nat-info.c: Update license to GPLv3.
	* f-exp.y: Update license to GPLv3.
	* gdb_thread_db.h: Update license to GPLv3.
	* hppanbsd-nat.c: Update license to GPLv3.
	* hppanbsd-tdep.c: Update license to GPLv3.
	* hppaobsd-tdep.c: Update license to GPLv3.
	* jv-exp.y: Update license to GPLv3.
	* m2-exp.y: Update license to GPLv3.
	* objc-exp.y: Update license to GPLv3.
	* p-exp.y: Update license to GPLv3.
	* reply_mig_hack.awk: Update license to GPLv3.
	* reverse.c: Update license to GPLv3.
	* xtensa-xtregs.c: Update license to GPLv3.
2009-03-18 08:51:11 +00:00
Paul Pluzhnikov d24948ac99 2009-03-17 Paul Pluzhnikov <ppluzhnikov@google.com>
* gdb.base/solib-display.exp: Disable test for remote targers.
2009-03-18 05:43:55 +00:00
Pedro Alves 8a2492ee53 * remote.c (remote_close): Don't call generic_mourn_inferior.
(remote_mourn_1): Call generic_mourn_inferior after closing the
	target.
2009-03-18 02:24:02 +00:00
Pedro Alves 5338cef16a * remote.c (remote_start_remote): Add missing call to
init_wait_for_inferior in non-stop mode.
2009-03-18 01:29:27 +00:00
Pedro Alves 717a8278b1 * breakpoint.c (bpstat_should_step): Only consider software
watchpoints that have a location.
2009-03-18 01:13:19 +00:00
gdbadmin 5b548f9aa4 *** empty log message *** 2009-03-18 00:00:33 +00:00
Christopher Faylor f3b6bd6097 Correct typo which gave me an accidental promotion. 2009-03-17 22:57:34 +00:00
Pedro Alves 54a0b537b8 Rename "process" to "lwp" throughout.
* linux-low.c (all_processes): Rename to...
	(all_lwps): ... this.
	(inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
	(add_process): Rename to ...
	(add_lwp): ... this.  Adjust.
	(linux_create_inferior): Adjust.
	(linux_attach_lwp): Adjust.
	(linux_attach): Adjust.
	(linux_kill_one_process): Rename to ...
	(linux_kill_one_lwp): ... this.  Adjust.
	(linux_kill): Adjust.
	(linux_detach_one_process): Rename to ...
	(linux_detach_one_lwp): ... this.  Adjust.
	(linux_detach): Adjust.
	(check_removed_breakpoint): Adjust.
	(status_pending_p): Adjust.
	(linux_wait_for_process): Rename to ...
	(linux_wait_for_lwp): ... this.  Adjust.
	(linux_wait_for_event): Adjust.
	(send_sigstop): Adjust.
	(wait_for_sigstop): Adjust.
	(stop_all_processes): Rename to ...
	(stop_all_lwps): ... this.
	(linux_resume_one_process): Rename to ...
	(linux_resume_one_lwp): ... this.  Adjust.
	(linux_set_resume_request, linux_continue_one_thread)
	(linux_queue_one_thread, resume_status_pending_p)
	(usr_store_inferior_registers, regsets_store_inferior_registers)
	(linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
	Adjust.
	* linux-low.h (get_process): Rename to ...
	(get_lwp): ... this.  Adjust.
	(get_thread_process): Rename to ...
	(get_thread_lwp): ... this.  Adjust.
	(get_process_thread): Rename to ...
	(get_lwp_thread): ... this.  Adjust.
	(struct process_info): Rename to ...
	(struct lwp_info): ... this.
	(all_processes): Rename to ...
	(all_lwps): ... this.
	* proc-service.c (ps_lgetregs): Adjust.
	* thread-db.c (thread_db_create_event, find_one_thread)
	(maybe_attach_thread, thread_db_get_tls_address): Adjust.
2009-03-17 20:25:35 +00:00
Joel Brobecker 7d85a9c0e3 Add a target_ops parameter to the to_kill method in struct target_ops.
* target.h (struct target_ops): Add a "target_ops *" parameter to
        method to_kill.
        (target_kill): Remove macro. Add declaration.
        * target.c (debug_to_kill): Delete, no longer necessary.
        (target_kill): New function.
        (update_current_target):  Stop inheriting the to_kill method.
        Do not de_fault it to no_process either.
        (setup_target_debug): Do not set current_target.to_kill.
        * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
        linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
        remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
        accordingly.
2009-03-17 19:28:09 +00:00
Doug Evans 14064aa202 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
glibc 2.3.2 and earlier.
2009-03-17 18:39:08 +00:00
Joel Brobecker f06eadd9d4 * frame.c (get_prev_frame_1): Do not perform the inner_frame
sanity check if this_frame is not NORMAL.
        (frame_id_inner): Update the description of this function.
2009-03-17 17:26:52 +00:00
Hui Zhu b646ddd43a * gdb.texinfo: Change the introduce of "disassemble-next-line". 2009-03-17 06:01:10 +00:00
Hui Zhu 481df73e07 * stack.c: Change the introduce of "disassemble-next-line". 2009-03-17 05:59:34 +00:00
Pedro Alves 6b251945f5 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
declare as extern.
2009-03-17 05:18:45 +00:00
Pedro Alves dafb3b4167 Add missing space. 2009-03-17 05:17:37 +00:00
Hui Zhu 91440f573c * gdb.texinfo: Add documentation for disassemble-next-line. 2009-03-17 05:14:01 +00:00
Hui Zhu 30c33a9f4b *stack.c: Include valprint.h.
(disassemble_next_line): New enum.
	(show_disassemble_next_line): New function.  Show the current
	value of disassemble-next-line.
	(gdb_disassembly_stub_args): New struct for argument passing
	between function do_gdb_disassembly and function
	gdb_disassembly_stub.
	(gdb_disassembly_stub): New function.  Helper for
	gdb_disassembly.
	(do_gdb_disassembly): New function.  Use TRY_CATCH to catch
	the exception from the gdb_disassembly because it will be
	broken by filter sometime.
	(print_frame_info): If disassemble-next-line is set to auto
	or on and doesn't have the line debug messages for $pc,
	output the next instruction.
	If disassemble-next-line is set to on and there is line debug
	messages, output assembly codes for next line.
	(_initialize_stack): Make the "set disassemble-next-line"
	command an auto-boolean command.  Change its class to
	class_stack.  Place it in the top level set list.  Extend help
	to describe the auto mode.
2009-03-17 05:11:40 +00:00
Pedro Alves fee0be5dee * infrun.c (normal_stop): Don't overwrite old_chain. 2009-03-17 04:49:47 +00:00
gdbadmin 2df6516ba2 *** empty log message *** 2009-03-17 00:00:03 +00:00
Joel Brobecker a624e1115a * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
which is undefined, by call to regcache_invalidate, which should
        do what the original author wanted to do.
2009-03-16 21:12:46 +00:00
Joel Brobecker 383c038998 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
(mips_create_inferior): Likewise.
2009-03-16 19:38:33 +00:00
Joel Brobecker 267fbcde30 * go32-nat.c (go32_create_inferior): Add missing ops parameter. 2009-03-16 19:00:27 +00:00
Joel Brobecker da66f6a6bc * darwin-nat.c (darwin_resume): Fix a compiler warning when
building on x86_64-darwin.
2009-03-16 15:57:08 +00:00
Joel Brobecker 58529c0267 * configure.tgt: Add handling for x86_64-darwin. 2009-03-16 15:04:15 +00:00
Jan Kratochvil ba30a4e951 gdb/
* auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
2009-03-16 09:58:25 +00:00
Thiago Jung Bauermann 8fd4122798 * gdb.texinfo (Commands In Python): Remove tindex entries. 2009-03-16 03:34:45 +00:00
gdbadmin fc7593dfa0 *** empty log message *** 2009-03-16 00:00:32 +00:00
Joel Brobecker 7fc0c7b58f * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
Use the ops parameter to get to the target beneath, rather than
        using the current_target global.  Using the current_target global
        was an unintended accident.
2009-03-15 21:05:41 +00:00
Joel Brobecker 1ba0a4eebc Fix an error happening while loading symbols from a core file
(on AIX).

        * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
        to detect whether we're debugging a core file or not.
2009-03-15 20:26:11 +00:00
Joel Brobecker d30acaa715 Modernize the aix-thread later by getting rid of the base_target
global.  This brings back to life the AIX port which was otherwise
        crashing all the time.

        * aix-thread.c (base_target): Delete.
        (pd_enable): Do not set base_target.
        (aix_thread_attach): Use find_target_beneath instead of base_target.
        (aix_thread_detach, aix_thread_resume, aix_thread_wait)
        (aix_thread_fetch_registers, aix_thread_store_registers),
        (aix_thread_xfer_partial, aix_thread_mourn_inferior)
        (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
        (aix_thread_kill): Delete. Does not seem necessary.
        (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
2009-03-15 19:38:42 +00:00
Jan Kratochvil 61ff14c69a gdb/
* stack.c (return_command <retval_exp>): New variables retval_expr
	and old_chain.  Inline parse_and_eval to initialize retval_expr.  Check
	RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
	if RETURN_TYPE is NULL.

gdb/doc/
	* gdb.texinfo (Returning): New description for missing debug info.

gdb/testsuite/
	* gdb.base/return-nodebug.exp, gdb.base/return-nodebug.c: New.
2009-03-15 09:19:40 +00:00
gdbadmin 0d34de9aea *** empty log message *** 2009-03-15 00:00:32 +00:00
Jan Kratochvil cb4dce936e Fix a racy FAIL.
* gdb.base/multi-forks.exp (continue_to_exit_bp_loc): New function with
	code from `follow parent, print pids'.
	(`follow child, print pids', `follow parent, print pids'): Call it.
	Replace `gdb_test "break..."' by gdb_breakpoint.
2009-03-14 14:25:55 +00:00