summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
Commit message (Collapse)AuthorAgeFilesLines
* 2012-05-11 Yao Qi <yao@codesourcery.com>Pedro Alves2012-05-112-8/+43
| | | | | | | | | | | | | | Pedro Alves <palves@redhat.com> * linux-low.c (enum stopping_threads_kind): New. (stopping_threads): Change type to `enum stopping_threads_kind'. (handle_extended_wait): If stopping and suspending threads, leave the new_lwp suspended too. (linux_wait_for_event): Adjust. (stop_all_lwps): Set `stopping_threads' to STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on whether we're suspending threads or just stopping them. Assert no recursion happens.
* gdb/gdbserver:Yao Qi2012-04-2912-53/+102
| | | | | | | | | | | * server.h: Move some code to ... * gdbthread.h: ... here. New. * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h (remote-utils.o, server.o, target.o tracepoint.o): Likewise. (nto-low.o, win32-low.o): Likewise. * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h. * regcache.c, remote-utils.c, server.c: Likewise. * target.c, tracepoint.c, win32-low.c: Likewise.
* * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.Thiago Jung Bauermann2012-04-244-16/+40
| | | | | | | | | | | | | | | (PTRACE_ARG4_TYPE): Likewise. (PTRACE_XFER_TYPE): Likewise. * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of ptrace to PTRACE_ARG3_TYPE. * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h. (PTRACE_ARG4_TYPE): Likewise. (PTRACE_XFER_TYPE): Likewise. (linux_detach_one_lwp): Cast fourth argument of ptrace to long then PTRACE_ARG4_TYPE. (regsets_fetch_inferior_registers): Cast third argument of ptrace to long then PTRACE_ARG3_TYPE. (regsets_store_inferior_registers): Likewise.
* 2012-04-20 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-202-1/+10
| | | | | | | | | | gdb/ * acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute $srcdir. * configure: Regenerate. gdb/gdbserver/ * configure: Regenerate.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-197-5248/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ * Makefile.in (GNULIB_BUILDDIR): New. (LIBGNU, INCGNU, GNULIB_H): Adjust. (SUBDIRS): Add $(GNULIB_BUILDDIR). (CLEANDIRS). Remove gnulib/import. (REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR). (all-lib): Ditto. (distclean): Remove the $(GNULIB_BUILDDIR) directory. (gnulib/import/Makefile): Replace gnulib/import with $(GNULIB_BUILDDIR). Set CONFIG_FILES to just Makefile. (ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'. (aclocal_m4_deps): Remove the gnulib dependencies. Add acx_configure_dir.m4. * acinclude.m4: Include acx_configure_dir.m4. * acx_configure_dir.m4: New file. * aclocal.m4: Regenerate. * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE calls. Configure gnulib using ACX_CONFIGURE_DIR. (GNULIB): New variable. (GNULIB_STDINT_H): Adjust. (AC_OUTPUT): Don't output gnulib/Makefile. * gdb/defs.h: Include build-gnulib/config.h. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * gnulib/Makefile.in: New file. * gnulib/configure.ac: New file. * gnulib/aclocal.m4: New file. * gnulib/config.in: New file. * gnulib/configure: New file. * gnulib/: Re-run gnulib-tool to adjust. gdb/gdbserver/ * Makefile.in (GNULIB_BUILDDIR): New. (LIBGNU, INCGNU, GNULIB_H): Adjust. (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New. (all, install-only, uninstall, clean-info, all-lib, clean): No longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do. (maintainer-clean realclean distclean): Use subdir_do. (subdir_do): New. (gnulib/import/Makefile): Adjust. Replace gnulib/import with $(GNULIB_BUILDDIR). Don't pass argument to config.status. * acinclude.m4: Include acx_configure_dir.m4. * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE calls. Call AC_PROG_RANLIB. Configure gnulib using ACX_CONFIGURE_DIR. (GNULIB): New. (GNULIB_STDINT_H): Adjust. (AC_OUTPUT): Don't output gnulib/Makefile anymore. * gdbreplay.c: Include build-gnulib/config.h. * server.h: Likewise. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-195-38/+48
| | | | | | | | | | | | | | | | | | | | | gdb/ * gnulib/: Move whole directory ... * gnulib/import/: ... here, and re-rerun gnulib-tool to adjust. * Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS) (REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS) (aclocal_m4_deps): Adjust. * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Adjust AC_OUTPUT output. gdbserver/ * Makefile.in (LIBGNU, INCGNU): Adjust. (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust. (all, install-only, uninstall, clean-info, all-lib, clean) (maintainer-clean, Makefile, gnulib/Makefile): Adjust. * configure.ac: Adjust AC_OUTPUT output. * aclocal.m4: Regenerate. * configure: Regenerate.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-192-2/+14
| | | | | | * Makefile.in (generated_files): New. (server_h): Remove the explicit dependency on config.h, and depend on $generated_files.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-192-1/+5
| | | | * Makefile.in (INCGNU): Add -Ignulib.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-192-6/+14
| | | | | | | | * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ... (INCGNU): ... this, and spell out -I here. (GNULIB_LIB): Rename to ... (LIBGNU): ... this. (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-192-13/+254
| | | | * config.in: Regenerate.
* Move entries to right place. Drop config.in entry, as I forgot toPedro Alves2012-04-191-0/+5
| | | | actually do what it says.
* 2012-04-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-195-19/+8
| | | | | | | * configure.ac: Remove AC_CHECK_DECLS check for memmem. * server.h (memmem): Remove declaration. * config.in: Regenerate. * configure: Regenerate.
* gdb:Yao Qi2012-04-192-1/+12
| | | | | | | | | | | | | | | * Makefile.in (SFILES): Add common/vec.c and remove vec.c. (vec.o): New rule. * vec.c: Move it ... * common/vec.c: ... here. * vec.h: Move it ... * common/vec.h: ... here. gdb/gdbserver: * Makefile.in (SFILES): Add common/vec.c. (OBS): Add vec.o. (vec.o): New rule.
* gdb/gdbserver/Yao Qi2012-04-194-6/+14
| | | | | | | * remote-utils.c (prepare_resume_reply): Replace with macro target_core_of_thread. * server.c (handle_qxfer_threads_proper): Likewise. * target.h (traget_core_of_thread): New macro.
* 2012-04-18 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-183-2114/+1009
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update gnulib from latest git. (639ea5ae15e39fe48d43e04864b2997301e4b969) * gnulib/Makefile.am: Update. * gnulib/dummy.c: Update. * gnulib/extra/arg-nonnull.h: Update. * gnulib/extra/c++defs.h: Update. * gnulib/extra/update-copyright: Update. * gnulib/extra/warn-on-use.h: Update. * gnulib/inttypes.in.h: Update. * gnulib/m4/00gnulib.m4: Update. * gnulib/m4/extensions.m4: Update. * gnulib/m4/gnulib-cache.m4: Update. * gnulib/m4/gnulib-common.m4: Update. * gnulib/m4/gnulib-comp.m4: Update. * gnulib/m4/gnulib-tool.m4: Update. * gnulib/m4/include_next.m4: Update. * gnulib/m4/inttypes-pri.m4: Update. * gnulib/m4/inttypes.m4: Update. * gnulib/m4/longlong.m4: Update. * gnulib/m4/memchr.m4: Update. * gnulib/m4/memmem.m4: Update. * gnulib/m4/mmap-anon.m4: Update. * gnulib/m4/multiarch.m4: Update. * gnulib/m4/onceonly.m4: Update. * gnulib/m4/stddef_h.m4: Update. * gnulib/m4/stdint.m4: Update. * gnulib/m4/string_h.m4: Update. * gnulib/m4/warn-on-use.m4: Update. * gnulib/m4/wchar_h.m4: Update. * gnulib/m4/wchar_t.m4: Update. * gnulib/m4/wint_t.m4: Update. * gnulib/memchr.c: Update. * gnulib/memmem.c: Update. * gnulib/stddef.in.h: Update. * gnulib/stdint.in.h: Update. * gnulib/str-two-way.h: Update. * gnulib/string.in.h: Update. * gnulib/wchar.in.h: Update. * gnulib/extra/arg-nonnull.h: Delete. * gnulib/extra/c++defs.h: Delete. * gnulib/extra/warn-on-use.h: Delete. * gnulib/m4/wchar_h.m4: Delete. * gnulib/m4/wint_t.m4: Delete. * gnulib/wchar.in.h: Delete. * gnulib/extra/snippets/arg-nonnull.h: New. * gnulib/extra/snippets/c++defs.h: New. * gnulib/extra/snippets/warn-on-use.h: New. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * gnulib/Makefile.in: Regenerate. * gdbserver/aclocal.m4: Regenerate. * gdbserver/config.in: Regenerate. * gdbserver/configure: Regenerate.
* gdb/gdbserver/Yao Qi2012-04-162-3/+17
| | | | | * tracepoint.c (cmd_qtstart): Download tracepoints even when they are duplicated on address.
* gdb/Yao Qi2012-04-162-18/+217
| | | | | | | | | | | | | | | | | | | | | | | * common/agent.c (agent_run_command): Add one more parameter `len'. Update callers. * common/agent.h: Update declaration. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): Update. (linux_child_static_tracepoint_markers_by_strid): Ditto. gdb/gdbserver/ * tracepoint.c (COPY_FIELD_TO_BUF): New macro. (struct tracepoint_action_ops) <send>: New field. (m_tracepoint_action_send, r_tracepoint_action_send): New. (agent_expr_send, x_tracepoint_action_send): New. (l_tracepoint_action_send): New. (cmd_qtdp): Download and install tracepoint according to `use_agent'. (run_inferior_command): Add one more parameter `len'. Update callers. (tracepoint_send_agent): New. (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
* gdb/gdbserver/Yao Qi2012-04-162-69/+62
| | | | | * tracepoint.c (download_tracepoints): Moved to ... (cmd_qtstart): ... here.
* gdb/gdbserver/Yao Qi2012-04-142-15/+27
| | | | | | | | | | * tracepoint.c: Include inttypes.h. (struct collect_memory_action): Use sized types. (struct tracepoint): Likewise. (cmd_qtdp, stop_tracing): Update print specifiers. (cmd_qtp, response_tracepoint): Likewise. (collect_data_at_tracepoint): Likewise. (collect_data_at_step): Likewise.
* gdb/Yao Qi2012-04-144-312/+1756
| | | | | | | | | | | | | | | | | | | Import gnulib module inttypes from git (250b80067c1e1d8faa0c42fb572f721975b929c5) * Makefile.in (HFILES_NO_SRCDIR): Add gnulib/inttypes.in.h. (aclocal_m4_deps): Add gnulib/m4/inttypes.m4 and gnulib/m4/inttypes-pri.m4 * aclocal.m4, config.in, configure: Regenerated. * gnulib/Makefile.am: Update. * gnulib/Makefile.in: Update. * gnulib/m4/gnulib-cache.m4: Update. * gnulib/m4/gnulib-comp.m4: Update. * gnulib/inttypes.in.h: New. * gnulib/m4/inttypes-pri.m4: New. * gnulib/m4/inttypes.m4: New. gdb/gdbserver/ Import gnulib module inttypes. * aclocal.m4, config.in, configure: Regenerated.
* gdb/gdbserver/Yao Qi2012-04-142-2/+7
| | | | | * Makefile.in (maintainer-clean, realclean, distclean): Remove Makefile and config.status at last.
* gdb/gdbserver/Yao Qi2012-04-142-2/+5
| | | | * tracepoint.c: Include stdint.h unconditionally.
* * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro basedThiago Jung Bauermann2012-04-135-2/+112
| | | | | | | on BFD_HAVE_SYS_PROCFS_TYPE. * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h. * configure: Regenerate. * config.in: Likewise.
* Enable x32 support in gdbserverH.J. Lu2012-04-134-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (clean): Also remove x32.c x32-linux.c x32-avx.c x32-avx-linux.c. (x32.o): New target. (x32.c): Likewise. (x32-linux.o): Likewise. (x32-linux.c): Likewise. (x32-avx.o): Likewise. (x32-avx.c): Likewise. (x32-avx-linux.o): Likewise. (x32-avx-linux.c): Likewise. * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o. (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o. (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml. (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml. (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml i386/x32-avx-linux.xml. * linux-x86-low.c (init_registers_x32_linux): New prototype. (init_registers_x32_avx_linux): Likwise. (x86_linux_update_xmltarget): Call init_registers_x32_linux or init_registers_x32_avx_linux if linux_is_elf64 is false.
* 2012-04-13 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-132-9/+23
| | | | | | | | * Makefile.in (GNULIB_FLAGS_TO_PASS): New. (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH. (all, uninstall, clean-info, all-lib, clean, maintainer-clean) (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to the sub-make.
* Convert siginfo for x32 in gdbserverH.J. Lu2012-04-122-0/+206
| | | | | | | | | | | * linux-x86-low.c (compat_x32_clock_t): New. (compat_x32_siginfo_t): Likewise. (compat_x32_siginfo_from_siginfo): Likewise. (siginfo_from_compat_x32_siginfo): Likewise. (linux_is_elf64): Likewise. (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo and siginfo_from_compat_x32_siginfo for x32. (x86_arch_setup): Set linux_is_elf64.
* Check if GDBserver is compatible with processH.J. Lu2012-04-124-16/+44
| | | | | | | | | | PR gdb/13969 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the e_machine field. (linux_qxfer_libraries_svr4): Update call to elf_64_file_p. * linux-low.h (linux_pid_exe_is_elf_64_file): Updated. * linux-x86-low.c (x86_arch_setup): Check if GDBserver is compatible with process.
* gdb/gdbserver/Yao Qi2012-04-126-122/+4906
| | | | | | | | | | | | | | * Makefile.in: Define abs_top_srcdir and abs_srcdir. (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR. (install-only, install-info, clean): Handle sub dir gnulib. (all-lib, am--refresh): New targets. (memmem.o): Remove target. * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR. Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make. (AC_REPLACE_FUNCS): Remove memmem. Invoke gl_INIT and AM_INIT_AUTOMAKE. (AC_OUTPUT): Generate Makefile in gnulib/. * aclocal.m4, config.in, configure: Regenerated.
* * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.Maciej W. Rozycki2012-04-102-7/+44
|
* 2012-04-05 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-052-3/+10
| | | | | | | -Werror=strict-aliasing * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned pointer.
* 2012-04-04 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-042-11/+21
| | | | | | * linux-sparc-low.c (sparc_fill_gregset_to_stack) (sparc_store_gregset_from_stack, sparc_store_gregset) (sparc_breakpoint_at): Fix formatting.
* * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_tThiago Jung Bauermann2012-03-305-0/+73
| | | | | | | | are available. * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef. [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise. * config.in: Regenerate. * configure: Likewise.
* 2012-03-29 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-292-1/+6
| | | | | * linux-low.c (regsets_store_inferior_registers) [__sparc__]: Correct ptrace arguments.
* 2012-03-28 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-2818-2/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC. (IA64_GR0_REGNUM, IA64_FR0_REGNUM) (IA64_FR1_REGNUM): New defines. (ia64_fetch_register): New. (the_low_target): Install it. * linux-low.h (struct linux_target_ops) <fetch_register>: New field. * linux-low.c (linux_fetch_registers): Try the the_low_target.fetch_register hook first. * linux-arm-low.c (the_low_target): Adjust. * linux-bfin-low.c (the_low_target): Adjust. * linux-cris-low.c (the_low_target): Adjust. * linux-crisv32-low.c (the_low_target): Adjust. * linux-m32r-low.c (the_low_target): Adjust. * linux-m68k-low.c (the_low_target): Adjust. * linux-mips-low.c (the_low_target): Adjust. * linux-ppc-low.c (the_low_target): Adjust. * linux-s390-low.c (the_low_target): Adjust. * linux-sh-low.c (the_low_target): Adjust. * linux-sparc-low.c (the_low_target): Adjust. * linux-tic6x-low.c (the_low_target): Adjust. * linux-x86-low.c (the_low_target): Adjust. * linux-xtensa-low.c (the_low_target): Adjust.
* 2012-03-26 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-262-4/+5
| | | | | * server.c (handle_qxfer_libraries): Don't bail early if the_target->qxfer_libraries_svr4 is not NULL.
* 2012-03-26 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-262-1/+5
| | | | * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
* 2012-03-23 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-232-1/+13
| | | | | | * linux-low.c (linux_qxfer_libraries_svr4): Terminate the "library-list-svr4" element's start tag when the the DSO list is empty.
* 2012-03-23 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-232-2/+30
| | | | | | * linux-low.c (read_one_ptr): Read the inferior's pointer through a variable whose type size is the same as the inferior's pointer size.
* struct siginfo vs. siginfo_tThomas Schwinge2012-03-215-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ * amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead of struct siginfo. * arm-linux-nat.c (arm_linux_stopped_data_address): Likewise. * ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise. * linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup) (linux_xfer_siginfo, linux_nat_set_siginfo_fixup) (linux_nat_get_siginfo): Likewise. * linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup) (linux_nat_get_siginfo): Likewise. * linux-tdep.c (linux_get_siginfo_type): Likewise. * ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise. * procfs.c (gdb_siginfo_t): Likewise. gdbserver/ * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of struct siginfo. * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise. * linux-x86-low.c (x86_siginfo_fixup): Likewise. * linux-low.h: Include <signal.h>. (struct siginfo): Remove forward declaration. (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of struct siginfo.
* gdbserver: update gitignoreMike Frysinger2012-03-212-0/+12
|
* 2012-03-19 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-192-2/+30
| | | | | | | | | Jan Kratochvil <jan.kratochvil@redhat.com> * server.c (cont_thread, general_thread): Add describing comments. (start_inferior): Clear `cont_thread'. (handle_v_cont): Don't set `cont_thread' if resuming all threads of a process.
* gdb/gdbserver/Yao Qi2012-03-152-25/+42
| | | | | | * tracepoint.c (install_tracepoint): Move duplicated tracepoint handling to ... (cmd_qtdp): ... here.
* gdb/gdbserver/Yao Qi2012-03-152-48/+114
| | | | | | | | | | | | * tracepoint.c (struct tracepoint_action_ops): New. (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field. (m_tracepoint_action_download): New. (r_tracepoint_action_download): New. (x_tracepoint_action_download): New. (l_tracepoint_action_download): New. (add_tracepoint_action): Install `action->ops' according type. (download_tracepoint_1): Move code `download' function pointer of various tracepoint_action_ops.
* gdb/Jan Kratochvil2012-03-132-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | * common/linux-procfs.c (linux_proc_get_int): New, from linux_proc_get_tgid, change its LWPID type to pid_t, add parameter field. (linux_proc_get_tgid): Only call linux_proc_get_int. (linux_proc_get_tracerpid): New. (linux_proc_pid_has_state): New, from linux_proc_pid_is_zombie. (linux_proc_pid_is_stopped, linux_proc_pid_is_zombie): Only call linux_proc_pid_has_state. * common/linux-procfs.h (linux_proc_get_tracerpid): New declaration. * common/linux-ptrace.c: Include linux-procfs.h and buffer.h. (linux_ptrace_attach_warnings): New. * common/linux-ptrace.h (struct buffer, linux_ptrace_attach_warnings): New declaration. * linux-nat.c: Include exceptions.h, linux-ptrace.h and buffer.h. (linux_nat_attach): New variables ex, buffer, message and message_s. Wrap to_attach by TRY_CATCH and call linux_ptrace_attach_warnings. gdb/gdbserver/ * linux-low.c (linux_attach_lwp_1): New variable buffer. Call linux_ptrace_attach_warnings. gdb/testsuite/ * gdb.base/attach-twice.c: New files. * gdb.base/attach-twice.exp: New files.
* gdb/Jan Kratochvil2012-03-134-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (linux-ptrace.o): New. * common/linux-procfs.c (linux_proc_pid_is_zombie): New, from linux-nat.c. * common/linux-procfs.h (linux_proc_pid_is_zombie): New declaration. * common/linux-ptrace.c: New file. * config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-ptrace.o. * config/arm/linux.mh: Likewise. * config/i386/linux.mh: Likewise. * config/i386/linux64.mh: Likewise. * config/ia64/linux.mh: Likewise. * config/m32r/linux.mh: Likewise. * config/m68k/linux.mh: Likewise. * config/mips/linux.mh: Likewise. * config/pa/linux.mh: Likewise. * config/powerpc/linux.mh: Likewise. * config/powerpc/ppc64-linux.mh: Likewise. * config/powerpc/spu-linux.mh: Likewise. * config/s390/s390.mh: Likewise. * config/sparc/linux.mh: Likewise. * config/sparc/linux64.mh: Likewise. * config/xtensa/linux.mh: Likewise. * linux-nat.c (linux_lwp_is_zombie): Remove, move it to common/linux-procfs.c. (wait_lwp): Rename linux_lwp_is_zombie to linux_proc_pid_is_zombie. gdb/gdbserver/ * Makefile.in (linux-ptrace.o): New. * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*) (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*) (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*) (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux) (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ of these targets. * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
* 2012-03-08 Yao Qi <yao@codesourcery.com>Yao Qi2012-03-093-2/+58
| | | | | | | | | | | | | | | | | | | | | | Pedro Alves <palves@redhat.com> Fix PR server/13392. * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check offset of JMP insn. * tracepoint.c (remove_tracepoint): New. (cmd_qtdp): Call remove_tracepoint when failed to install. 2012-03-08 Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> Fix PR server/13392. * gdb.trace/change-loc.exp (tracepoint_change_loc_1): Remove kfail. (tracepoint_change_loc_2): Remove kfail. Return if failed to download tracepoints. * gdb.trace/pending.exp (pending_tracepoint_works): Likewise. (pending_tracepoint_resolved_during_trace): Likewise. (pending_tracepoint_installed_during_trace): Likewise. (pending_tracepoint_with_action_resolved): Likewise.
* Make breakpoint condition detection trace conditional on remote_debug.Joel Brobecker2012-03-081-1/+2
| | | | | | | gdb/gdbserver/ChangeLog: * server.c (process_point_options): If a conditional expression is found, only print a message if remote_debug is nonzero.
* 2012-03-07 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-074-9/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/doc/ * gdb.texinfo (General Query Packets): Document new QProgramSignals packet. * gdb.texinfo (Remote configuration): Mention "program-signals-packet". gdb/gdbserver/ * linux-low.c (get_detach_signal): New. (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT. Pass on pending signals to PTRACE_DETACH. Check the result of the ptrace call. * server.c (program_signals, program_signals_p): New. (handle_general_set): Handle QProgramSignals. * server.h (program_signals, program_signals_p): Declare. gdb/ * NEWS: Mention QProgramSignals. * inferior.h (update_signals_program_target): Declare. * infrun.c: (update_signals_program_target): New. (handle_command): Update the target of the new program signals array changes. * remote.c (PACKET_QProgramSignals): New enum. (last_program_signals_packet): New global. (remote_program_signals): New. (remote_start_remote): Update the target with the program signals list. (remote_protocol_features): Add entry for QPassSignals. (remote_open_1): Free anc clear last_program_signals_packet. (init_remote_ops): Install remote_program_signals. * target.c (update_current_target): Adjust. (target_program_signals): New. * target.h (struct target_ops) <to_program_signals>: New field. (target_program_signals): Declare.
* gdb/gdbserver/Jan Kratochvil2012-03-052-1/+16
| | | | | * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found. New comment why.
* gdb:Yao Qi2012-03-032-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/agent.c (agent_look_up_symbols): Add one parameter 'arg'. * common/agent.h: Update declaration. * inf-child.c (inf_child_use_agent): New. (inf_child_can_use_agent): New. (inf_child_target): Initialize fields `to_use_agent' and `to_can_use_agent'. * agent.c (agent_new_objfile): New. (_initialize_agent): Add agent_new_objfile to new_objfile observer. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): New. (linux_target_install_ops): Initialize field `to_static_tracepoint_markers_by_strid'. * remote.c (free_current_marker): Move it to ... * tracepoint.c (free_current_marker): ... here. New. (cleanup_target_stop): New. * tracepoint.h: Declare free_current_marker. * NEWS: Add one entry about `info static-tracepoint-marker'. gdb/gdbserver: * tracepoint.c (tracepoint_look_up_symbols): Update call to agent_look_up_symbols. gdb/testsuite: * gdb.trace/strace.exp: run strace_info_marker in linux native gdb.