1 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3 * Makefile.in (SFILES): Add linux-tile-low.c.
4 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5 * configure.srv: Handle tilegx-*-linux*.
6 * linux-tile-low.c: New file.
8 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12 2012-05-24 Pedro Alves <palves@redhat.com>
16 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
18 2012-05-24 Pedro Alves <palves@redhat.com>
22 Replace target_signal with gdb_signal throughout.
24 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
26 * linux-low.c (linux_store_registers): Avoid the copying sequence
27 when no data has been retrieved by ptrace.
29 2012-05-22 Will Deacon <will.deacon@arm.com>
31 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
33 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
36 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
38 * linux-low.c (linux_store_registers): Don't re-retrieve data
39 with ptrace that has already been obtained from /proc. Always
40 copy any data retrieved with ptrace to the buffer supplied.
42 2012-05-11 Yao Qi <yao@codesourcery.com>
43 Pedro Alves <palves@redhat.com>
45 * linux-low.c (enum stopping_threads_kind): New.
46 (stopping_threads): Change type to `enum stopping_threads_kind'.
47 (handle_extended_wait): If stopping and suspending threads, leave
48 the new_lwp suspended too.
49 (linux_wait_for_event): Adjust.
50 (stop_all_lwps): Set `stopping_threads' to
51 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
52 whether we're suspending threads or just stopping them. Assert no
55 2012-04-29 Yao Qi <yao@codesourcery.com>
57 * server.h: Move some code to ...
58 * gdbthread.h: ... here. New.
59 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
60 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
61 (nto-low.o, win32-low.o): Likewise.
62 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
63 * regcache.c, remote-utils.c, server.c: Likewise.
64 * target.c, tracepoint.c, win32-low.c: Likewise.
66 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
68 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
69 (PTRACE_ARG4_TYPE): Likewise.
70 (PTRACE_XFER_TYPE): Likewise.
71 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
72 ptrace to PTRACE_ARG3_TYPE.
73 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
74 (PTRACE_ARG4_TYPE): Likewise.
75 (PTRACE_XFER_TYPE): Likewise.
76 (linux_detach_one_lwp): Cast fourth argument of
77 ptrace to long then PTRACE_ARG4_TYPE.
78 (regsets_fetch_inferior_registers): Cast third argument of
79 ptrace to long then PTRACE_ARG3_TYPE.
80 (regsets_store_inferior_registers): Likewise.
82 2012-04-20 Pedro Alves <palves@redhat.com>
84 * configure: Regenerate.
86 2012-04-19 Pedro Alves <palves@redhat.com>
88 * Makefile.in (GNULIB_BUILDDIR): New.
89 (LIBGNU, INCGNU, GNULIB_H): Adjust.
90 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
91 (all, install-only, uninstall, clean-info, all-lib, clean): No
92 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
93 (maintainer-clean realclean distclean): Use subdir_do.
95 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
96 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
97 * acinclude.m4: Include acx_configure_dir.m4.
98 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
99 calls. Call AC_PROG_RANLIB. Configure gnulib using
102 (GNULIB_STDINT_H): Adjust.
103 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
104 * gdbreplay.c: Include build-gnulib/config.h.
105 * server.h: Likewise.
106 * aclocal.m4: Regenerate.
107 * config.in: Regenerate.
108 * configure: Regenerate.
110 2012-04-19 Pedro Alves <palves@redhat.com>
112 * Makefile.in (LIBGNU, INCGNU): Adjust.
113 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
114 (all, install-only, uninstall, clean-info, all-lib, clean)
115 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
116 * configure.ac: Adjust AC_OUTPUT output.
117 * aclocal.m4: Regenerate.
118 * configure: Regenerate.
120 2012-04-19 Pedro Alves <palves@redhat.com>
122 * Makefile.in (generated_files): New.
123 (server_h): Remove the explicit dependency on config.h, and depend
126 2012-04-19 Pedro Alves <palves@redhat.com>
128 * Makefile.in (INCGNU): Add -Ignulib.
130 2012-04-19 Pedro Alves <palves@redhat.com>
132 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
133 (INCGNU): ... this, and spell out -I here.
134 (GNULIB_LIB): Rename to ...
136 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
138 2012-04-19 Pedro Alves <palves@redhat.com>
140 * config.in: Regenerate.
142 2012-04-19 Pedro Alves <palves@redhat.com>
144 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
145 * server.h (memmem): Remove declaration.
146 * config.in: Regenerate.
147 * configure: Regenerate.
149 2012-04-19 Yao Qi <yao@codesourcery.com>
151 * Makefile.in (SFILES): Add common/vec.c.
155 2012-04-19 Yao Qi <yao@codesourcery.com>
157 * remote-utils.c (prepare_resume_reply): Replace with macro
158 target_core_of_thread.
159 * server.c (handle_qxfer_threads_proper): Likewise.
160 * target.h (traget_core_of_thread): New macro.
162 2012-04-18 Pedro Alves <palves@redhat.com>
164 * aclocal.m4: Regenerate.
165 * configure: Regenerate.
167 2012-04-16 Yao Qi <yao@codesourcery.com>
169 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
170 duplicated on address.
172 2012-04-16 Yao Qi <yao@codesourcery.com>
174 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
175 (struct tracepoint_action_ops) <send>: New field.
176 (m_tracepoint_action_send, r_tracepoint_action_send): New.
177 (agent_expr_send, x_tracepoint_action_send): New.
178 (l_tracepoint_action_send): New.
179 (cmd_qtdp): Download and install tracepoint
180 according to `use_agent'.
181 (run_inferior_command): Add one more parameter `len'.
183 (tracepoint_send_agent): New.
184 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
186 2012-04-16 Yao Qi <yao@codesourcery.com>
188 * tracepoint.c (download_tracepoints): Moved to ...
189 (cmd_qtstart): ... here.
191 2012-04-14 Yao Qi <yao@codesourcery.com>
193 * tracepoint.c: Include inttypes.h.
194 (struct collect_memory_action): Use sized types.
195 (struct tracepoint): Likewise.
196 (cmd_qtdp, stop_tracing): Update print specifiers.
197 (cmd_qtp, response_tracepoint): Likewise.
198 (collect_data_at_tracepoint): Likewise.
199 (collect_data_at_step): Likewise.
201 2012-04-14 Yao Qi <yao@codesourcery.com>
203 Import gnulib module inttypes.
204 * aclocal.m4, config.in, configure: Regenerated.
206 2012-04-14 Yao Qi <yao@codesourcery.com>
208 * Makefile.in (maintainer-clean, realclean, distclean): Remove
209 Makefile and config.status at last.
211 2012-04-13 Yao Qi <yao@codesourcery.com>
213 * tracepoint.c: Include stdint.h unconditionally.
215 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
217 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
218 on BFD_HAVE_SYS_PROCFS_TYPE.
219 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
220 * configure: Regenerate.
221 * config.in: Likewise.
223 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
225 * Makefile.in (clean): Also remove x32.c x32-linux.c
226 x32-avx.c x32-avx-linux.c.
229 (x32-linux.o): Likewise.
230 (x32-linux.c): Likewise.
231 (x32-avx.o): Likewise.
232 (x32-avx.c): Likewise.
233 (x32-avx-linux.o): Likewise.
234 (x32-avx-linux.c): Likewise.
236 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
237 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
238 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
239 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
240 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
241 i386/x32-avx-linux.xml.
243 * linux-x86-low.c (init_registers_x32_linux): New prototype.
244 (init_registers_x32_avx_linux): Likwise.
245 (x86_linux_update_xmltarget): Call init_registers_x32_linux
246 or init_registers_x32_avx_linux if linux_is_elf64 is false.
248 2012-04-13 Pedro Alves <palves@redhat.com>
250 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
251 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
252 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
253 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
256 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
258 * linux-x86-low.c (compat_x32_clock_t): New.
259 (compat_x32_siginfo_t): Likewise.
260 (compat_x32_siginfo_from_siginfo): Likewise.
261 (siginfo_from_compat_x32_siginfo): Likewise.
262 (linux_is_elf64): Likewise.
263 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
264 and siginfo_from_compat_x32_siginfo for x32.
265 (x86_arch_setup): Set linux_is_elf64.
267 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
270 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
272 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
273 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
274 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
275 compatible with process.
277 2012-04-12 Yao Qi <yao@codesourcery.com>
279 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
280 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
281 (install-only, install-info, clean): Handle sub dir gnulib.
282 (all-lib, am--refresh): New targets.
283 (memmem.o): Remove target.
284 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
285 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
286 (AC_REPLACE_FUNCS): Remove memmem.
287 Invoke gl_INIT and AM_INIT_AUTOMAKE.
288 (AC_OUTPUT): Generate Makefile in gnulib/.
289 * aclocal.m4, config.in, configure: Regenerated.
291 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
293 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
295 2012-04-05 Pedro Alves <palves@redhat.com>
297 -Werror=strict-aliasing
299 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
302 2012-04-04 Pedro Alves <palves@redhat.com>
304 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
305 (sparc_store_gregset_from_stack, sparc_store_gregset)
306 (sparc_breakpoint_at): Fix formatting.
308 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
310 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
312 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
313 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
314 * config.in: Regenerate.
315 * configure: Likewise.
317 2012-03-29 Pedro Alves <palves@redhat.com>
319 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
320 Correct ptrace arguments.
322 2012-03-28 Pedro Alves <palves@redhat.com>
324 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
325 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
326 (IA64_FR1_REGNUM): New defines.
327 (ia64_fetch_register): New.
328 (the_low_target): Install it.
329 * linux-low.h (struct linux_target_ops) <fetch_register>: New
331 * linux-low.c (linux_fetch_registers): Try the
332 the_low_target.fetch_register hook first.
334 * linux-arm-low.c (the_low_target): Adjust.
335 * linux-bfin-low.c (the_low_target): Adjust.
336 * linux-cris-low.c (the_low_target): Adjust.
337 * linux-crisv32-low.c (the_low_target): Adjust.
338 * linux-m32r-low.c (the_low_target): Adjust.
339 * linux-m68k-low.c (the_low_target): Adjust.
340 * linux-mips-low.c (the_low_target): Adjust.
341 * linux-ppc-low.c (the_low_target): Adjust.
342 * linux-s390-low.c (the_low_target): Adjust.
343 * linux-sh-low.c (the_low_target): Adjust.
344 * linux-sparc-low.c (the_low_target): Adjust.
345 * linux-tic6x-low.c (the_low_target): Adjust.
346 * linux-x86-low.c (the_low_target): Adjust.
347 * linux-xtensa-low.c (the_low_target): Adjust.
349 2012-03-26 Pedro Alves <palves@redhat.com>
351 * server.c (handle_qxfer_libraries): Don't bail early if
352 the_target->qxfer_libraries_svr4 is not NULL.
354 2012-03-26 Pedro Alves <palves@redhat.com>
356 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
358 2012-03-23 Pedro Alves <palves@redhat.com>
360 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
361 "library-list-svr4" element's start tag when the the DSO list is
364 2012-03-23 Pedro Alves <palves@redhat.com>
366 * linux-low.c (read_one_ptr): Read the inferior's pointer through
367 a variable whose type size is the same as the inferior's pointer
370 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
372 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
374 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
375 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
376 * linux-low.h: Include <signal.h>.
377 (struct siginfo): Remove forward declaration.
378 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
381 2012-03-21 Mike Frysinger <vapier@gentoo.org>
383 * .gitignore: Ignore more files.
385 2012-03-19 Pedro Alves <palves@redhat.com>
386 Jan Kratochvil <jan.kratochvil@redhat.com>
388 * server.c (cont_thread, general_thread): Add describing comments.
389 (start_inferior): Clear `cont_thread'.
390 (handle_v_cont): Don't set `cont_thread' if resuming all threads
393 2012-03-15 Yao Qi <yao@codesourcery.com>
395 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
397 (cmd_qtdp): ... here.
399 2012-03-15 Yao Qi <yao@codesourcery.com>
401 * tracepoint.c (struct tracepoint_action_ops): New.
402 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
403 (m_tracepoint_action_download): New.
404 (r_tracepoint_action_download): New.
405 (x_tracepoint_action_download): New.
406 (l_tracepoint_action_download): New.
407 (add_tracepoint_action): Install `action->ops' according type.
408 (download_tracepoint_1): Move code `download' function pointer
409 of various tracepoint_action_ops.
411 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
413 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
414 linux_ptrace_attach_warnings.
416 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
418 * Makefile.in (linux-ptrace.o): New.
419 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
420 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
421 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
422 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
423 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
425 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
427 2012-03-08 Yao Qi <yao@codesourcery.com>
428 Pedro Alves <palves@redhat.com>
431 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
433 * tracepoint.c (remove_tracepoint): New.
434 (cmd_qtdp): Call remove_tracepoint when failed to install.
436 2012-03-07 Pedro Alves <palves@redhat.com>
438 * linux-low.c (get_detach_signal): New.
439 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
440 Pass on pending signals to PTRACE_DETACH. Check the result of the
442 * server.c (program_signals, program_signals_p): New.
443 (handle_general_set): Handle QProgramSignals.
444 * server.h (program_signals, program_signals_p): Declare.
446 2012-03-05 Pedro Alves <palves@redhat.com>
447 Jan Kratochvil <jan.kratochvil@redhat.com>
449 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
452 2012-03-03 Yao Qi <yao@codesourcery.com>
454 * tracepoint.c (tracepoint_look_up_symbols): Update call to
455 agent_look_up_symbols.
457 2012-03-03 Yao Qi <yao@codesourcery.com>
459 * Makefile.in (linux-low.o): Keep dependence on agent.h.
460 (linux-x86-low.o): Likewise.
461 * server.h: Remove in_process_agent_loaded.
462 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
466 2012-03-03 Yao Qi <yao@codesourcery.com>
468 * tracepoint.c (gdb_agent_capability): New global.
469 (in_process_agent_loaded_ust): Renamed to
470 `in_process_agent_supports_ust'.
472 (in_process_agent_supports_ust): Call agent_capability_check.
473 (clear_installed_tracepoints): Assert that agent supports
476 2012-03-03 Yao Qi <yao@codesourcery.com>
478 * linux-low.c (linux_supports_agent): New.
479 (linux_target_ops): Initialize field `supports_agent' with
480 linux_supports_agent.
481 * target.h (struct target_ops) <supports_agent>: New.
482 (target_supports_agent): New macro.
483 * server.c (handle_general_set): Handle packet 'QAgent'.
484 (handle_query): Send `QAgent+'.
485 * Makefile.in (server.o): Depends on agent.h.
487 2012-03-03 Yao Qi <yao@codesourcery.com>
489 * Makefile.in (OBS): Add agent.o.
490 Add new rule for agent.o.
491 Track dependence of tracepoint.c on agent.h.
492 * tracepoint.c (run_inferior_command_1):
493 (run_inferior_command): Call agent_run_command.
494 (gdb_ust_connect_sync_socket): Deleted. Move it to
496 (resume_thread, stop_thread): Likewise.
497 (gdb_ust_socket_init): Renamed to ...
498 (gdb_agent_socket_init): ... New.
499 (gdb_ust_thread): Renamed to ...
500 (gdb_agent_helper_thread): ... New.
501 (gdb_ust_init): Move some code to ...
502 (gdb_agent_init): ... here. New.
503 [HAVE_UST]: Call gdb_ust_init.
504 (initialize_tracepoint_ftlib): Call gdb_agent_init.
505 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
506 * config.in, configure: Regenerated.
508 2012-03-02 Pedro Alves <palves@redhat.com>
510 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
511 * linux-low.c (struct simple_pid_list): New.
512 (stopped_pids): New a struct simple_pid_list pointer.
513 (add_to_pid_list, pull_pid_from_list): New.
514 (handle_extended_wait): Don't assume the first signal new children
515 report is SIGSTOP. Adjust call to pull_pid_from_list.
516 (linux_wait_for_lwp): Adjust.
518 2012-03-02 Yao Qi <yao@codesourcery.com>
520 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
523 2012-03-02 Yao Qi <yao@codesourcery.com>
525 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
526 `stop_pc' and `tpoint'. Update caller.
528 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
530 * linux-low.h (linux_target_ops): Add regset_bitmap member.
531 * linux-low.c (use_linux_regsets): New macro.
532 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
533 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
534 (linux_register_in_regsets): New function.
535 (usr_fetch_inferior_registers): Skip registers covered by
537 (usr_store_inferior_registers): Likewise.
538 (usr_fetch_inferior_registers): New macro.
539 (usr_store_inferior_registers): Likewise.
540 (linux_fetch_registers): Handle mixed regset/non-regset targets.
541 (linux_store_registers): Likewise.
542 * linux-mips-low.c (init_registers_mips_dsp_linux): New
544 (init_registers_mips64_dsp_linux): Likewise.
545 (init_registers_mips_linux): New macro.
546 (init_registers_mips_dsp_linux): Likewise.
547 (mips_dsp_num_regs): Likewise.
548 (DSP_BASE, DSP_CONTROL): New fallback macros.
549 (mips_base_regs): New macro.
550 (mips_regmap): Use it. Fix the size.
551 (mips_dsp_regmap): New variable.
552 (mips_dsp_regset_bitmap): Likewise.
553 (mips_arch_setup): New function.
554 (mips_cannot_fetch_register): Use the_low_target.regmap rather
556 (mips_cannot_store_register): Likewise.
557 (the_low_target): Update .arch_setup, .num_regs and .regmap
558 initializers. Add .regset_bitmap initializer.
559 * linux-arm-low.c (the_low_target): Add .regset_bitmap
561 * linux-bfin-low.c (the_low_target): Likewise.
562 * linux-cris-low.c (the_low_target): Likewise.
563 * linux-crisv32-low.c (the_low_target): Likewise.
564 * linux-ia64-low.c (the_low_target): Likewise.
565 * linux-m32r-low.c (the_low_target): Likewise.
566 * linux-m68k-low.c (the_low_target): Likewise.
567 * linux-ppc-low.c (the_low_target): Likewise.
568 * linux-s390-low.c (the_low_target): Likewise.
569 * linux-sh-low.c (the_low_target): Likewise.
570 * linux-sparc-low.c (the_low_target): Likewise.
571 * linux-tic6x-low.c (the_low_target): Likewise.
572 * linux-x86-low.c (the_low_target): Likewise.
573 * linux-xtensa-low.c (the_low_target): Likewise.
574 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
575 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
576 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
578 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
579 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
581 2012-02-29 Yao Qi <yao@codesourcery.com>
582 Pedro Alves <palves@redhat.com>
584 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
585 `step_over_finished' is true.
587 2012-02-27 Pedro Alves <palves@redhat.com>
589 * linux-low.c (pid_is_stopped): Delete, moved to common/.
590 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
592 2012-02-27 Pedro Alves <palves@redhat.com>
595 * linux-low.c (pid_is_stopped): New.
596 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
598 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
600 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
603 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
605 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
607 2012-02-24 Luis Machado <lgustavo@codesourcery>
609 * server.c (handle_query): Advertise support for target-side
610 breakpoint condition evaluation.
611 (process_point_options): New function.
612 (process_serial_event): When inserting a breakpoint, check for
613 a target-side condition that should be evaluated.
615 * mem-break.c: Include regcache.h and ax.h.
616 (point_cond_list_t): New data structure.
617 (breakpoint) <cond_list>: New field.
618 (find_gdb_breakpoint_at): Make non-static.
619 (delete_gdb_breakpoint_at): Clear any target-side
621 (clear_gdb_breakpoint_conditions): New function.
622 (add_condition_to_breakpoint): Likewise.
623 (add_breakpoint_condition): Likewise.
624 (gdb_condition_true_at_breakpoint): Likewise.
625 (gdb_breakpoint_here): Return result directly instead
626 of going through a local variable.
628 * mem-break.h (find_gdb_breakpoint_at): New prototype.
629 (clear_gdb_breakpoint_conditions): Likewise.
630 (add_breakpoint_condition): Likewise.
631 (gdb_condition_true_at_breakpoint): Likewise.
633 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
634 (need_step_over_p): Take target-side breakpoint condition into
637 2012-02-24 Luis Machado <lgustavo@codesourcery>
639 * server.h: Include tracepoint.h.
640 (agent_mem_read, agent_get_trace_state_variable_value,
641 agent_set_trace_state_variable_value,
642 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
643 get_set_tsv_func_addr): New prototypes.
645 * ax.h: New include file.
646 * ax.c: New source file.
648 * tracepoint.c: Include ax.h.
649 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
650 agent_expr, eval_result_type): Move to ax.h.
651 (parse_agent_expr): Rename to ...
652 (gdb_parse_agent_expr): ... this, make it non-static and move
654 (unparse_agent_expr) Rename to ...
655 (gdb_unparse_agent_expr): ... this, make it non-static and move
657 (eval_agent_expr): Rename to ...
658 (eval_tracepoint_agent_expr): ... this.
659 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
660 forward declarations.
661 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
662 (agent_get_trace_state_variable_value): New function.
663 (agent_set_trace_state_variable_value): New function.
664 (cmd_qtdp): Call gdb_parse_agent_expr (...).
665 (response_tracepoint): Call gdb_unparse_agent_expr (...).
666 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
667 (condition_true_at_tracepoint): Likewise.
668 (parse_agent_expr): Rename to ...
669 (gdb_parse_agent_expr): ... this and move to ax.c.
670 (unparse_agent_expr): Rename to ...
671 (gdb_unparse_agent_expr): ... this and move to ax.c.
672 (gdb_agent_op_name): Move to ax.c.
673 (eval_agent_expr): Rename to ...
674 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
676 (eval_tracepoint_agent_expr): New function.
677 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
679 (current_insn_ptr, emit_error, struct bytecode_address): Move to
681 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
682 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
683 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
684 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
685 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
686 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
687 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
688 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
689 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
690 (compile_bytecodes): Remove forward declaration.
691 (is_goto_target): Move to ax.c.
692 (compile_bytecodes): Move to ax.c and call
693 agent_get_trace_state_variable_value (...) and
694 agent_set_trace_state_variable_value (...).
696 * Makefile.in: Update ax.c and IPA dependencies.
698 2012-02-24 Pedro Alves <palves@redhat.com>
700 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
701 (cmd_bigqtbuffer_circular): ... this. Only handle
702 'QTBuffer:circular:'.
703 (handle_tracepoint_general_set): Adjust.
705 2012-02-16 Yao Qi <yao@codesourcery.com>
707 * inferiors.c: Move code to ...
708 * dll.c: .... here. New.
709 * server.h: Declare clear_dlls.
710 * Makefile.in (SFILES): Add dll.c.
714 2012-02-11 Yao Qi <yao@codesourcery.com>
716 * server.c: (handle_monitor_command): Add a new parameter
718 (handle_query): Update caller.
720 2012-02-09 Joel Brobecker <brobecker@adacore.com>
722 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
723 * configure, config.in: Regenerate.
724 * hostio.c: Provide an alternate implementation if HAVE_READLINK
727 2012-02-02 Pedro Alves <palves@redhat.com>
729 Try SIGKILL first, then PTRACE_KILL.
730 * linux-low.c (linux_kill_one_lwp): New.
731 (linux_kill_one_lwp): Rename to ...
732 (kill_one_lwp_callback): ... this. Use the new
735 2012-02-02 Pedro Alves <palves@redhat.com>
737 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
740 2012-01-27 Pedro Alves <palves@redhat.com>
742 * linux-low.c (linux_child_pid_to_exec_file): Delete.
743 (elf_64_file_p): Make static.
744 (linux_pid_exe_is_elf_64_file): New.
745 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
747 (linux_pid_exe_is_elf_64_file): Declare.
748 * linux-x86-low.c (x86_arch_setup): Use
749 linux_pid_exe_is_elf_64_file.
751 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
753 * linux-low.c (linux_wait_for_event_1): Rename to ...
754 (linux_wait_for_event): ... here and merge it with former
755 linux_wait_for_event - new variable wait_ptid, use it.
756 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
758 2012-01-23 Pedro Alves <palves@redhat.com>
760 * server.c (main): Avoid yet another case of infinite loop while
761 detaching/killing after a longjmp.
763 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
766 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
768 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
770 * hostio.c (handle_readlink): New function.
771 (handle_vFile): Call it to handle "vFile:readlink" packets.
773 2012-01-20 Pedro Alves <palves@redhat.com>
774 Ulrich Weigand <ulrich.weigand@linaro.org>
776 * server.c (handle_v_requests): Only support vAttach and vRun to
777 start multiple processes when in extended protocol mode.
779 2012-01-17 Pedro Alves <palves@redhat.com>
781 * tracepoint.c (initialize_tracepoint): Use mmap instead of
782 memalign plus mprotect to allocate the scratch buffer.
784 2012-01-13 Pedro Alves <palves@redhat.com>
786 * server.c (attach_inferior): Clear `cont_thread'.
788 2012-01-13 Pedro Alves <palves@redhat.com>
790 * server.c (main): Avoid infinite loop while detaching/killing
793 2012-01-09 Doug Evans <dje@google.com>
795 * server.c (start_inferior): Set last_ptid in --wrapper case.
797 2012-01-06 Yao Qi <yao@codesourcery.com>
799 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
801 [IN_PROCESS_AGENT] (debug_agent): New global variable.
803 2012-01-04 Yao Qi <yao@codesourcery.com>
805 * tracepoint.c (cmd_qtdp): Print debug message
806 for static tracepoint.
808 2012-01-04 Yao Qi <yao@codesourcery.com>
810 * tracepoint.c (trace_vdebug): Differentiate debug message
811 between gdbserver and IPA.
813 2012-01-03 Yao Qi <yao@codesourcery.com>
815 * tracepoint.c (tracepoint_was_hit): Don't collect for
818 2012-01-02 Joel Brobecker <brobecker@adacore.com>
820 * terminal.h: Reformat copyright header.
822 2012-01-02 Joel Brobecker <brobecker@adacore.com>
824 * server.c (gdbserver_version): Update copyright year.
825 * gdbreplay.c (gdbreplay_version): Likewise.
827 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
829 * linux-low.c (linux_create_inferior): Put empty if clause for write.
832 2011-12-18 Hui Zhu <teawater@gmail.com>
833 * linux-low.c (linux_create_inferior): Save return value to ret.
835 2011-12-18 Hui Zhu <teawater@gmail.com>
837 * linux-low.c (linux_create_inferior): Save return value to ret.
839 2011-12-16 Doug Evans <dje@google.com>
841 * linux-low.c (linux_create_inferior): If stdio connection,
842 redirect stdin from /dev/null, stdout to stderr.
843 * remote-utils.c (remote_is_stdio): New static global.
844 (remote_connection_is_stdio): New function.
845 (remote_prepare): Handle stdio connection.
846 (remote_open): Ditto.
847 (remote_close): Don't close stdin for stdio connections.
848 (read_prim,write_prim): New functions. Replace all calls to
850 * server.c (main): Watch for "-" argument. Move call to
851 remote_prepare before start_inferior.
852 * server.h (STDIO_CONNECTION_NAME): New macro.
853 (remote_connection_is_stdio): Declare.
855 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
858 2011-12-15 Yao Qi <yao@codesourcery.com>
860 * tracepoint.c: Include sys/syscall.h.
861 (gdb_ust_thread): Remove preprocessor conditional.
863 2011-12-14 Pedro Alves <pedro@codesourcery.com>
865 * linux-low.c (linux_detach_one_lwp): Call
866 the_low_target.prepare_to_resume before detaching.
868 2011-12-14 Yao Qi <yao@codesourcery.com>
870 * tracepoint.c (gdb_ust_thread): Don't ignore return value
873 2011-12-14 Yao Qi <yao@codesourcery.com>
875 * i386-low.c (i386_low_stopped_data_address): Initialize local
878 2011-12-13 Pedro Alves <pedro@codesourcery.com>
882 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
883 DR_CONTROL unless necessary. Extend comments.
884 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
885 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
887 2011-12-13 Yao Qi <yao@codesourcery.com>
889 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
891 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
893 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
895 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
896 Print new debug message for such case.
898 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
900 Fix overlapping memcpy.
901 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
902 the read_inferior_memory transfer.
903 (delete_fast_tracepoint_jump): New variable buf. Use it for the
904 write_inferior_memory transfer.
905 (set_fast_tracepoint_jump): New variable buf. Use it for the
906 read_inferior_memory and write_inferior_memory transfers.
907 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
908 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
909 Use it for the write_inferior_memory transfer.
910 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
913 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
915 * linux-low.c (fetch_register, store_register): Make code
916 consistent, fix formatting.
918 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
920 * linux-low.c (usr_store_inferior_registers): Factor out code
921 to handle individual registers into...
922 (store_register): ... this new function.
924 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
926 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
927 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
928 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
929 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
930 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
931 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
932 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
933 (srv_xmlfiles): Add new XML files.
935 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
937 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
938 (init_registers_s390_linux32v1): Add prototype.
939 (init_registers_s390_linux32v2): Likewise.
940 (init_registers_s390_linux64v1): Likewise.
941 (init_registers_s390_linux64v2): Likewise.
942 (init_registers_s390x_linux64v1): Likewise.
943 (init_registers_s390x_linux64v2): Likewise.
944 (s390_num_regs): Increment to 52.
945 (s390_regmap): Add orig_r2 register.
946 (s390_num_regs_3264): Increment to 68.
947 (s390_regmap_3264): Add orig_r2 register.
948 (s390_collect_ptrace_register): Handle orig_r2 register.
949 (s390_supply_ptrace_register): Likewise.
950 (s390_fill_last_break): New function.
951 (s390_store_last_break): Likewise.
952 (s390_fill_system_call): New function.
953 (s390_store_system_call): Likewise.
954 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
956 (s390_check_regset): New function.
957 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
958 NT_S390_SYSTEM_CALL regsets and use appropriate description.
959 Update target_regsets for available register sets.
961 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
962 Jan Kratochvil <jan.kratochvil@redhat.com>
964 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
965 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
967 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
968 * linux-low.h (struct process_info_private): New member r_debug.
969 * server.c (handle_qxfer_libraries): Call
970 the_target->qxfer_libraries_svr4.
971 (handle_qxfer_libraries_svr4): New function.
972 (qxfer_packets): New entry "libraries-svr4".
973 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
974 * target.h (struct target_ops): New member qxfer_libraries_svr4.
975 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
976 PACKET_qXfer_libraries_svr4.
978 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
980 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
981 PSW address/mask between 8-byte and 16-byte formats.
982 (s390_supply_ptrace_register): Likewise.
983 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
984 basic addressing mode bit.
986 2011-11-24 Stan Shebs <stan@codesourcery.com>
988 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
990 2011-11-17 Stan Shebs <stan@codesourcery.com>
992 * tracepoint.c (struct tracepoint): New field traceframe_usage.
993 (tracing_start_time): New global.
994 (tracing_stop_time): New global.
995 (tracing_user_name): New global.
996 (tracing_notes): New global.
997 (tracing_stop_note): New global.
998 (cmd_qtstart): Set traceframe_usage, start_time.
999 (stop_tracing): Set stop_time.
1000 (cmd_qtstatus): Report additional status.
1001 (cmd_qtp): New function.
1002 (handle_tracepoint_query): Call it.
1003 (cmd_qtnotes): New function.
1004 (handle_tracepoint_general_set): Call it.
1005 (get_timestamp): Rename from tsv_get_timestamp.
1007 2011-11-14 Stan Shebs <stan@codesourcery.com>
1008 Kwok Cheung Yeung <kcy@codesourcery.com>
1010 * linux-x86-low.c (small_jump_insn): New.
1011 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1012 trampoline and error message, build a trampoline and issue a small
1013 jump instruction to it.
1014 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1015 trampoline and error message.
1016 (x86_get_min_fast_tracepoint_insn_len): New.
1017 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1018 * linux-low.h (struct linux_target_ops): Add arguments to
1019 install_fast_tracepoint_jump_pad operation, add new operation.
1020 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1022 (linux_get_min_fast_tracepoint_insn_len): New function.
1023 (linux_target_op): Add new operation.
1024 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1025 (gdb_trampoline_buffer_end): Ditto.
1026 (gdb_trampoline_buffer_error): Ditto.
1027 (struct ipa_sym_addresses): Add fields for new IPA variables.
1028 (symbol_list): Add entries for new IPA variables.
1029 (struct tracepoint): Add fields to hold the address range of the
1030 trampoline used by the tracepoint.
1031 (trampoline_buffer_head): New static variable.
1032 (trampoline_buffer_tail): Ditto.
1033 (claim_trampoline_space): New function.
1034 (have_fast_tracepoint_trampoline_buffer): New function.
1035 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1037 (install_fast_tracepoint): Ditto, also add error buffer argument.
1038 (cmd_qtminftpilen): New function.
1039 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1040 (fast_tracepoint_from_trampoline_address): New function.
1041 (fast_tracepoint_collecting): Handle trampoline as part of jump
1043 (set_trampoline_buffer_space): New function.
1044 (initialize_tracepoint): Initialize new IPA variables.
1045 * target.h (struct target_ops): Add arguments to
1046 install_fast_tracepoint_jump_pad operation, add new
1047 get_min_fast_tracepoint_insn_len operation.
1048 (target_get_min_fast_tracepoint_insn_len): New.
1049 (install_fast_tracepoint_jump_pad): Add arguments.
1050 * server.h (IPA_BUFSIZ): Define.
1051 * linux-i386-ipa.c: Include extra header files.
1052 (initialize_fast_tracepoint_trampoline_buffer): New function.
1053 (initialize_low_tracepoint): Call it.
1054 * server.h (set_trampoline_buffer_space): Declare.
1055 (claim_trampoline_space): Ditto.
1056 (have_fast_tracepoint_trampoline_buffer): Ditto.
1058 2011-11-14 Yao Qi <yao@codesourcery.com>
1060 * server.c (handle_query): Handle InstallInTrace for qSupported.
1061 * tracepoint.c (add_tracepoint): Sort list.
1062 (install_tracepoint, download_tracepoint): New.
1063 (cmd_qtdp): Call them to install and download tracepoints.
1064 (sort_tracepoints): Removed.
1065 (cmd_qtstart): Update.
1067 2011-11-14 Yao Qi <yao@codesourcery.com>
1069 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1070 * mem-break.h: Declare.
1071 * tracepoint.c (cmd_qtstart): Move some code to ...
1072 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1074 (download_tracepoints): Move some code to ...
1075 (download_tracepoint_1): ... here. New.
1077 2011-11-08 Yao Qi <yao@codesourcery.com>
1079 * remote-utils.c (relocate_instruction): A comment fix.
1081 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1083 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1084 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1085 dr_status_mirror and dr_control_mirror from debug_reg_state.
1086 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1087 (i386_initial_stuff): Remove use of deleted globals.
1088 (i386_get_thread_context, i386_set_thread_context,
1089 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1090 from debug_reg_state.
1092 2011-11-05 Yao Qi <yao@codesourcery.com>
1094 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1095 address as TPOINT's.
1097 2011-11-02 Stan Shebs <stan@codesourcery.com>
1099 * tracepoint.c (agent_mem_read_string): New function.
1100 (eval_agent_expr): Call it for tracenz.
1101 * server.c (handle_query): Report support for tracenz.
1103 2011-11-02 Yao Qi <yao@codesourcery.com>
1105 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1107 2011-11-02 Yao Qi <yao@codesourcery.com>
1109 * target.h: Fix a typo in comment.
1111 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1113 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1114 clobber the breakpoints' shadows with fast tracepoint jumps.
1115 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1116 * target.c (write_inferior_memory): Also pass MYADDR down to
1119 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1121 * configure.ac: Check support for personality routine.
1122 * configure: Regenerate.
1123 * config.in: Likewise.
1124 * linux-low.c: Include <sys/personality.h>.
1125 Define ADDR_NO_RANDOMIZE if necessary.
1126 (linux_create_inferior): Disable address space randomization when
1127 forking inferior, if requested.
1128 (linux_supports_disable_randomization): New function.
1129 (linux_target_ops): Install it.
1130 * server.h (disable_randomization): Declare.
1131 * server.c (disable_randomization): New global variable.
1132 (handle_general_set): Handle QDisableRandomization.
1133 (handle_query): Likewise for qSupported.
1134 (main): Support --disable-randomization and --no-disable-randomization
1135 command line arguments.
1136 * target.h (struct target_ops): Add supports_disable_randomization.
1137 (target_supports_disable_randomization): New macro.
1139 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1141 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1143 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1144 [!PT_GETDSBT] (target_loadmap): New definition.
1145 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1146 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1147 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1148 and PT_GETDSBT to LINUX_LOADMAP.
1149 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1150 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1152 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1154 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1155 (arm_linux_hwbp_cap): New static variable.
1156 (arm_linux_get_hwbp_cap): Replace by ...
1157 (arm_linux_init_hwbp_cap): ... this new function.
1158 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1159 (arm_linux_get_hw_watchpoint_count): Likewise.
1160 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1161 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1162 (arm_prepare_to_resume): Use perror_with_name instead of error.
1164 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1166 * linux-arm-low.c: Include <signal.h>.
1167 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1168 (struct arm_linux_hwbp_cap): New data type.
1169 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1170 (struct arm_linux_hw_breakpoint): New data type.
1171 (MAX_BPTS, MAX_WPTS): Define.
1172 (struct arch_process_info, struct arch_lwp_info): New data types.
1173 (arm_linux_get_hwbp_cap): New function.
1174 (arm_linux_get_hw_breakpoint_count): Likewise.
1175 (arm_linux_get_hw_watchpoint_count): Likewise.
1176 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1177 (arm_hwbp_control_initialize): Likewise.
1178 (arm_hwbp_control_is_enabled): Likewise.
1179 (arm_hwbp_control_is_initialized): Likewise.
1180 (arm_hwbp_control_disable): Likewise.
1181 (arm_linux_hw_breakpoint_equal): Likewise.
1182 (arm_linux_hw_point_initialize): Likewise.
1183 (struct update_registers_data): New data structure.
1184 (update_registers_callback: New function.
1185 (arm_insert_point): Likewise.
1186 (arm_remove_point): Likewise.
1187 (arm_stopped_by_watchpoint): Likewise.
1188 (arm_stopped_data_address): Likewise.
1189 (arm_new_process): Likewise.
1190 (arm_new_thread): Likewise.
1191 (arm_prepare_to_resume): Likewise.
1192 (the_low_target): Register arm_insert_point, arm_remove_point,
1193 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1194 arm_new_thread, and arm_prepare_to_resume.
1196 2011-09-15 Stan Shebs <stan@codesourcery.com>
1198 * server.h (struct emit_ops): Add compare-goto fields.
1199 * tracepoint.c (gdb_agent_op_sizes): New table.
1200 (emit_eq_goto): New function.
1201 (emit_ne_goto): New function.
1202 (emit_lt_goto): New function.
1203 (emit_le_goto): New function.
1204 (emit_gt_goto): New function.
1205 (emit_ge_goto): New function.
1206 (is_goto_target): New function.
1207 (compile_bytecodes): Recognize special cases of compare-goto
1208 combinations and call specialized emitters for them.
1209 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1210 (amd64_emit_ne_goto): New function.
1211 (amd64_emit_lt_goto): New function.
1212 (amd64_emit_le_goto): New function.
1213 (amd64_emit_gt_goto): New function.
1214 (amd64_emit_ge_goto): New function.
1215 (amd64_emit_ops): Add the new functions.
1216 (i386_emit_eq_goto): New function.
1217 (i386_emit_ne_goto): New function.
1218 (i386_emit_lt_goto): New function.
1219 (i386_emit_le_goto): New function.
1220 (i386_emit_gt_goto): New function.
1221 (i386_emit_ge_goto): New function.
1222 (i386_emit_ops): Add the new functions.
1224 2011-09-08 Stan Shebs <stan@codesourcery.com>
1226 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1227 (i386_emit_epilogue): Restore %ebx.
1229 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1231 * server.c (step_thread): Remove definition.
1232 (process_serial_event): Don't handle Hs.
1233 * server.h (step_thread): Remove declaration.
1234 * target.c (set_desired_inferior): Remove use of step_thread.
1236 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1238 * linux-low.c: Include linux-procfs.h.
1239 (linux_attach_lwp_1): Update comments.
1240 (linux_attach): Scan for existing threads when attaching to a
1241 process that is the tgid.
1242 * Makefile.in: Update dependencies.
1244 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1246 * configure.srv: Add linux-procfs.o dependencies.
1248 2011-08-14 Yao Qi <yao@codesourcery.com>
1250 * target.h (struct target_ops): Fix indent.
1251 * win32-low.c (win32_target_ops): Fix comment.
1253 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1254 Yao Qi <yao@codesourcery.com>
1256 * Makefile.in (clean): Remove tic6x-*.c files.
1257 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1258 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1259 (tic6x-c64xp-linux.c): Likewise.
1260 * configure.srv: Add support for tic6x-*-uclinux.
1261 * linux-tic6x-low.c: New.
1262 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1264 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1265 Yao Qi <yao@codesourcery.com>
1267 * target.h (struct target_ops): Add read_loadmap.
1268 * linux-low.c (struct target_loadseg): New type.
1269 (struct target_loadmap): New type.
1270 (linux_read_loadmap): New function.
1271 (linux_target_ops): Add linux_read_loadmap.
1272 * server.c (handle_query): Support qXfer:fdpic:read packet.
1273 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1275 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1277 * win32-low.c: Include <stdint.h>.
1279 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1281 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1282 to the inferior here.
1283 (i386_remove_aligned_watchpoint): Ditto.
1284 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1285 fit part of the watchpoint in the debug registers.
1286 (i386_update_inferior_debug_regs): New.
1287 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1288 registers, and only update the inferior on success.
1289 (i386_low_remove_watchpoint): Ditto.
1291 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1293 * linux-low.c (compare_ints, unique, list_threads, show_process,
1294 linux_core_of_thread): Delete.
1295 (linux_target_ops): Change linux_core_of_thread to
1296 linux_common_core_of_thread.
1297 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1298 * utils.c (malloc_failure): Change type of argument.
1299 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1300 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1301 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1302 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1303 (IPA_OBJS): Add common-utils-ipa.o.
1304 (ptid_h, linux_osdata_h): New macros.
1305 (server_h): Add common/common-utils.h, common/xml-utils.h,
1306 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1308 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1309 ptid.o, buffer.o): New rules.
1310 (linux-low.o): Add common/linux-osdata.h as a dependency.
1311 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1312 * configure.ac: Add AC_HEADER_DIRENT check.
1313 * config.in: Regenerate.
1314 * configure: Regenerate.
1315 * remote-utils.c (xml_escape_text): Delete.
1316 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1317 buffer_xml_printf): Move to common/buffer.c.
1318 * server.c (main): Remove call to initialize_inferiors.
1319 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1320 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1321 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1322 internal_error, gdb_assert, gdb_assert_fail): Delete.
1323 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1324 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1326 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1327 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1328 initialize_inferiors): Delete.
1330 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1332 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1335 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1337 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1339 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1341 2011-05-26 Yao Qi <yao@codesourcery.com>
1343 * Makefile.in (thread-db.o): Track dependence to
1344 common/gdb_thread_db.h.
1345 * thread-db.c: include gdb_thread_db.h from right place.
1347 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1349 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1350 __FILE__ and __LINE__ to internal_error.
1352 2011-05-13 Doug Evans <dje@google.com>
1354 * thread-db.c (try_thread_db_load_from_sdir): New function.
1355 (try_thread_db_load_from_dir): New function.
1356 (thread_db_load_search): Handle $sdir, ignore $pdir.
1357 Remove trying of system directories if search of
1358 libthread-db-search-path fails, that is now done via $sdir.
1360 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1362 * server.c (handle_query): Add EnableDisableTracepoints to the list
1363 of supported features.
1364 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1366 (cmd_qtenable_disable): New.
1367 (cmd_qtstart): Install tracepoints even if disabled.
1368 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1369 receiving a QTEnable or QTDisable packet.
1370 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1371 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1373 (gdb_probe): Skip data collection if static tracepoint is disabled.
1375 2011-05-10 Doug Evans <dje@google.com>
1377 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1379 2011-05-04 Doug Evans <dje@google.com>
1381 * linux-low.c (linux_join): Skip process lookup.
1382 * spu-low.c (spu_join): Ditto.
1383 * server.c (join_inferiors_callback): Delete.
1384 (process_serial_event): For 'D' packet (detach) call join_inferior
1387 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1389 * README: Don't mention xscale*-*-linux*.
1390 * configure.srv (xscale*-*-linux*): Don't handle target.
1392 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1394 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1396 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1397 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1398 (i386_emit_void_call_2): Likewise.
1400 2011-04-26 Yao Qi <yao@codesourcery.com>
1402 * linux-low.c: Move common macros to linux-ptrace.h.
1403 Include linux-ptrace.h.
1404 * Makefile.in (linux_ptrace_h): New.
1405 (linux-low.o): Depends on linux-ptrace.h.
1407 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1409 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1410 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1411 (remote_prepare): New function with most of the TCP code from ...
1412 (remote_open): ... here. Detect PORT here unconditionally. Move also
1413 setting transport_is_reliable.
1414 * server.c (run_once): New variable.
1415 (gdbserver_usage): Document it.
1416 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1417 the first run if RUN_ONCE.
1418 * server.h (run_once, remote_prepare): New declarations.
1420 2011-04-19 Tom Tromey <tromey@redhat.com>
1422 * win32-low.c (handle_load_dll): Remove duplicate "the".
1424 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1426 Remove support for old Cygwin 1.5 versions.
1427 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1428 function to avoid warning.
1429 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1432 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1434 * gdbserver/server.h (Macro _): Define it if not available.
1436 2011-03-14 Michael Snyder <msnyder@vmware.com>
1438 * hostio.c (handle_close): Remove unnecessary null test.
1440 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1442 * Makefile.in (maintainer-clean realclean distclean): Remove
1443 "make ... subdir_do" command.
1445 2011-03-10 Michael Snyder <msnyder@vmware.com>
1447 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1449 * server.c (handle_v_run): Free alloced buffer on early return.
1451 2011-03-09 Yao Qi <yao@codesourcery.com>
1454 2011-03-04 Yao Qi <yao@codesourcery.com>
1456 * Makefile.in: Remove GNU make feature --directory.
1458 2011-03-05 Yao Qi <yao@codesourcery.com>
1460 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1461 (subdir_do): New make target. Copied from gdb/Makefile.
1462 (maintainer-clean, realclean, distclean, clean): Call corresponding
1463 make targets in common/Makefile.
1465 2011-02-11 Yao Qi <yao@codesourcery.com>
1467 * configure.ac: Call AC_PROG_RANLIB.
1468 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1469 * configure: Regenerate.
1471 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1473 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1475 2011-03-06 Yao Qi <yao@codesourcery.com>
1477 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1479 2011-03-05 Yao Qi <yao@codesourcery.com>
1481 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1482 (subdir_do): New make target. Copied from gdb/Makefile.
1483 (maintainer-clean, realclean, distclean, clean): Call corresponding
1484 make targets in common/Makefile.
1486 2011-03-04 Yao Qi <yao@codesourcery.com>
1488 * Makefile.in: Remove GNU make feature --directory.
1490 2011-03-04 Michael Snyder <msnyder@vmware.com>
1492 * server.c (queue_stop_reply): Call xmalloc not malloc.
1494 2011-03-02 Michael Snyder <msnyder@vmware.com>
1496 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1498 2011-02-28 Michael Snyder <msnyder@vmware.com>
1500 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1501 (cmd_qtframe): Ditto.
1502 (cmd_qtbuffer): Ditto.
1503 (cmd_bigqtbuffer): Ditto.
1505 * utils.c (decimal2str): Initialize 'width' to nine, then
1508 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1510 * hostio.c (require_data): Free *data, not data.
1512 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1514 * hostio.c (require_data): Use free, not xfree.
1516 2011-02-27 Michael Snyder <msnyder@vmware.com>
1518 * server.c (handle_query): Discard unused value.
1520 * hostio.c (require_data): Free malloc memory before returning
1523 2011-02-26 Michael Snyder <msnyder@vmware.com>
1525 * linux-low.c (list_threads): Call closedir for dirent.
1527 2011-02-27 Michael Snyder <msnyder@vmware.com>
1529 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1530 a case statement falls through.
1532 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1534 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1537 2011-02-26 Michael Snyder <msnyder@vmware.com>
1539 * utils.c (decimal2str): Eliminate dead code and dead param.
1540 (pulongest): Drop dead param from call to decimal2str.
1543 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1545 Revert the following patch (not approved yet):
1546 2011-02-21 Hui Zhu <teawater@gmail.com>
1547 * tracepoint.c (tp_printf): New function.
1548 (eval_agent_expr): Handle gdb_agent_op_printf.
1550 2011-02-21 Hui Zhu <teawater@gmail.com>
1552 * tracepoint.c (tp_printf): New function.
1553 (eval_agent_expr): Handle gdb_agent_op_printf.
1555 2011-02-18 Tom Tromey <tromey@redhat.com>
1557 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1558 (tracepoint.o): Likewise.
1559 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1560 (gdb_agent_op_names): Likewise.
1562 2011-02-18 Tom Tromey <tromey@redhat.com>
1564 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1565 gdb_agent_op_rot>: New constants.
1566 (gdb_agent_op_names): Add pick and roll.
1567 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1570 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1572 * aclocal.m4: Regenerated with aclocal-1.11.1.
1574 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1576 * server.c (handle_qxfer_traceframe_info): New.
1577 (qxfer_packets): Register "traceframe-info".
1578 (handle_query): Report support for qXfer:traceframe-info:read+.
1579 * tracepoint.c (match_blocktype): New.
1580 (traceframe_find_block_type): Rename to ...
1581 (traceframe_walk_blocks): ... this. Add callback filter argument,
1583 (traceframe_find_block_type): New, reimplemented on top of
1584 traceframe_walk_blocks.
1585 (build_traceframe_info_xml): New.
1586 (traceframe_read_info): New.
1587 * server.h (traceframe_read_info): Declare.
1589 2011-02-11 Yao Qi <yao@codesourcery.com>
1591 * configure.ac: Call AC_PROG_RANLIB.
1592 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1593 * configure: Regenerate.
1595 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1597 * server.c (gdb_read_memory): Change return semantics to allow
1599 (handle_search_memory_1): Adjust.
1600 (process_serial_event) <'m' packet>: Handle partial transfers.
1601 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1603 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1605 * regcache.c (init_register_cache): Initialize
1606 regcache->register_status.
1607 (free_register_cache): Release regcache->register_status.
1608 (regcache_cpy): Copy register_status.
1609 (registers_to_string): Print 'x's for unavailable registers.
1610 (supply_register): Mark the register's status valid or
1611 unavailable, depending on whether a buffer was passed in or not.
1612 (supply_register_zeroed): New.
1613 (supply_regblock): Mark the registers' status valid or
1614 unavailable, depending on whether a buffer was passed in or not.
1615 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1616 (struct regcache): New `register_status' field.
1617 (supply_register_zeroed): Declare.
1618 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1619 supply_register_zeroed, rather than passing a NULL buffer to
1621 * tracepoint.c (fetch_traceframe_registers): Update comment.
1623 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1625 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1628 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1630 * server.h (decode_xfer_write): Change prototype.
1631 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1632 and don't extract the annex here.
1633 * server.c (decode_xfer_read): Remove `annex' parameter,
1634 and don't extract the annex here.
1636 (struct qxfer): New.
1637 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1638 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1639 (handle_qxfer_statictrace): New functions, abstracted out from
1640 handle_query, and made to use the struct qxfer interface.
1641 (handle_threads_qxfer_proper): Rename to ...
1642 (handle_qxfer_threads_proper): ... this.
1643 (handle_threads_qxfer): Rename to ...
1644 (handle_qxfer_threads): ... this. Adjust.
1645 (qxfer_packets): New array.
1646 (handle_qxfer): New function.
1647 (handle_query): Use handle_qxfer.
1649 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1651 * gdbreplay.c: Shorten lines of >= 80 columns.
1652 * linux-low.c: Ditto.
1653 * linux-ppc-low.c: Ditto.
1654 * linux-s390-low.c: Ditto.
1655 * linux-sparc-low.c: Ditto.
1656 * linux-x86-low.c: Ditto.
1657 * linux-xtensa-low.c: Ditto.
1658 * mem-break.c: Ditto.
1660 * regcache.h: Ditto.
1661 * remote-utils.c: Ditto.
1664 * thread-db.c: Ditto.
1665 * tracepoint.c: Ditto.
1667 * win32-low.h: Ditto.
1669 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1671 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1674 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1676 * server.c (gdbserver_version): Update copyright year in version
1678 * gdbreplay.c (gdbreplay_version): Ditto.
1680 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1682 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1683 * linux-bfin-low.c: New file.
1684 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1685 PT_DATA_ADDR for BFIN targets.
1686 * Makefile.in (SFILES): Add linux-bfin-low.c.
1687 (clean): Remove reg-bfin.c.
1688 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1689 * README: Mention supported Blackfin targets.
1691 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1693 * .gitignore: New file.
1695 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1697 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1699 2010-10-22 Jie Zhang <jie@codesourcery.com>
1701 * Makefile.in: Add FLAGS_TO_PASS variable.
1702 (install): Remove dependency of install-only and recursively
1703 invoke make for install-only.
1705 2010-10-04 Doug Evans <dje@google.com>
1707 * Makefile.in (uninstall): Use $(DESTDIR).
1709 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1713 * linux-x86-low.c (compat_siginfo_from_siginfo)
1714 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1715 si_code is < 0. Check for si_code == SI_TIMER before checking for
1718 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1720 * lynx-i386-low.c: New file.
1721 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1723 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1725 * lynx-low.c (ptrace_request_to_str): Remove handling for
1726 request values that have been removed in LynxOS 5.x.
1728 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1730 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1733 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1735 * configure.ac: Add --enable-inprocess-agent option.
1736 * configure: Rebuilt.
1738 2010-09-06 Yao Qi <yao@codesourcery.com>
1740 * linux-low.c (linux_kill): Remove unused variable.
1741 (linux_stabilize_threads): Likewise.
1742 * server.c (start_inferior): Likewise.
1743 (queue_stop_reply_callback): Likewise.
1744 * tracepoint.c (do_action_at_tracepoint): Likewise.
1746 2010-09-06 Yao Qi <yao@codesourcery.com>
1748 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1751 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1753 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1755 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1757 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1760 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1762 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1763 gdbserver/lynx-ppc-low.c: New files.
1764 * Makefile.in (lynx_low_h): New variable.
1765 (lynx-low.o, lynx-ppc-low.o): New rules.
1766 * configure.ac: On LynxOS, link with -lnetinet.
1767 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1768 * configure: regenerate.
1770 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1772 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1773 * configure.ac: Add check for vasprintf and vsnprintf.
1774 * configure, config.in: Regenerate.
1775 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1777 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1779 * gdbreplay.c: Move include of alloca.h up, next to include of
1781 * server.h: Add include of malloc.h.
1782 * mem-break.c: Remove include of malloc.h.
1783 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1785 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1787 * Makefile.in (memmem.o): Build with -Wno-error.
1789 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1791 * utils.c (xsnprintf): Make non-static.
1792 * server.h: Add xsnprintf declaration.
1793 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1794 replace calls to snprintf by calls to xsnprintf throughout.
1796 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1798 * configure.ac: Add configure check for alloca.
1799 * configure, config.in: Regenerate.
1800 * server.h: Include alloca.h if it exists.
1801 * gdbreplay.c: Include alloca.h if it exists.
1803 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1805 * linux-low.c (__SIGRTMIN): Define if not already defined.
1806 (linux_create_inferior): Check for __ANDROID__ rather than
1808 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1809 are already deferred.
1810 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1811 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1812 stopped and already has a pending signal to report.
1813 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1814 a pending signal to report or is moving out of a jump pad.
1815 (linux_init_signals): Check for __ANDROID__ rather than
1818 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1820 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1821 debug_threads check. Avoid a linear search when not doing debug
1824 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1826 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1827 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1828 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1829 (process_event): Change local fd's type to gdb_fildes_t.
1830 (create_file_handler): Adjust prototype.
1831 (delete_file_handler): Adjust prototype.
1832 (handle_file_event): Adjust prototype. Use pfildes.
1833 (create_file_event): Adjsut prototype.
1834 * remote-utils.c (remote_desc, listen_desc): Change type to
1836 * server.h: New gdb_fildes_t typedef.
1837 [USE_WIN32API]: Include winsock2.h.
1838 (delete_file_handler, add_file_handler): Adjust prototypes.
1840 * utils.c (pfildes): New.
1842 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1844 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1845 * configure: Regenerate.
1847 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1849 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1850 (linux_done_accessing_memory): ... this.
1851 (linux_target_ops): Adjust.
1852 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1853 * nto-low.c (nto_target_ops): Adjust comment.
1854 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1855 * spu-low.c (spu_target_ops): Adjust comment.
1856 * target.h (target_ops): Rename unprepare_to_access_memory field
1857 to done_accessing_memory.
1858 (unprepare_to_access_memory): Rename to ...
1859 (done_accessing_memory): ... this.
1861 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1863 * linux-low.c (linux_prepare_to_access_memory): New.
1864 (linux_unprepare_to_access_memory): New.
1865 (linux_target_ops): Install them.
1866 * server.c (read_memory): Rename to ...
1867 (gdb_read_memory): ... this. Use
1868 prepare_to_access_memory/prepare_to_access_memory.
1869 (write_memory): Rename to ...
1870 (gdb_write_memory): ... this. Use
1871 prepare_to_access_memory/prepare_to_access_memory.
1872 (handle_search_memory_1): Adjust.
1873 (process_serial_event): Adjust.
1874 * target.h (struct target_ops): New fields
1875 prepare_to_access_memory and unprepare_to_access_memory.
1876 (prepare_to_access_memory, unprepare_to_access_memory): New.
1877 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1878 prepare_to_access_memory/prepare_to_access_memory.
1879 * nto-low.c (nto_target_ops): Adjust.
1880 * spu-low.c (spu_target_ops): Adjust.
1881 * win32-low.c (win32_target_ops): Adjust.
1883 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1885 * Makefile.in (WARN_CFLAGS): Get it from configure.
1886 (WERROR_CFLAGS): New.
1887 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1888 * configure.ac: Introduce --enable-werror, which adds -Werror to
1889 the compiler command line. Enabled by default. Disable with
1890 --disable-werror. Add -Wdeclaration-after-statement
1891 Wpointer-arith and -Wformat-nonliteral to warning flags.
1892 * configure: Regenerate.
1894 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1896 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1898 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1900 * gdbreplay.c (remote_error): New.
1902 (expect): Use gdbchar. Check for error reading from GDB.
1903 Clarify sync error output.
1904 (play): Check for errors writing to GDB.
1905 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1906 * remote-utils.c (getpkt): Check for errors writing to the remote
1909 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1911 * linux-low.c (linux_wait_1): Move non-debugging code out of
1912 `debug_threads' control.
1914 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1916 * linux-low.c (linux_wait_1): Don't set last_status here.
1917 * server.c (push_event, queue_stop_reply_callback): Assert we're
1918 not pushing a TARGET_WAITKIND_IGNORE event.
1919 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1920 (myresume, handle_target_event): Set the thread's last_resume_kind
1921 and last_status from the target returned status.
1923 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1927 * linux-x86-low.c (update_debug_registers_callback): New.
1928 (i386_dr_low_set_addr): Use it.
1929 (i386_dr_low_get_addr): New.
1930 (i386_dr_low_set_control): Use update_debug_registers_callback.
1931 (i386_dr_low_get_control): New.
1932 (i386_dr_low_get_status): Adjust.
1933 * linux-low.c (linux_stop_lwp): New.
1934 * linux-low.h (linux_stop_lwp): Declare.
1936 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1937 argument instead of a i386_debug_reg_state.
1938 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1939 a i386_debug_reg_state.
1940 (i386_insert_aligned_watchpoint): Adjust.
1941 (i386_remove_aligned_watchpoint): Adjust.
1942 (i386_low_stopped_data_address): Read the debug registers from the
1943 inferior instead of from the mirrors.
1944 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1945 (i386_dr_low_get_addr): Declare.
1946 (i386_dr_low_get_control): Declare.
1947 (i386_dr_low_get_status): Change prototype.
1949 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1950 (i386_dr_low_get_addr): New.
1951 (i386_dr_low_get_control): New.
1952 (i386_dr_low_get_status): Adjust prototype. Return
1954 (i386_initial_stuff): Clear dr_status_mirror and
1956 (i386_get_thread_context): Adjust.
1957 (i386_set_thread_context): Adjust.
1958 (i386_thread_added): Adjust.
1960 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1962 * linux-low.h (linux_thread_area): Delete declaration.
1964 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1966 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1967 after its termination.
1969 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1971 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1972 (gdb_wants_all_stopped): Delete.
1973 (linux_wait_1): Don't call them.
1974 * server.c (handle_v_cont): Tag all threads as want-stopped.
1975 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1976 stopped as "client-wants-stopped".
1978 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1980 * Makefile.in (signals_h): New.
1981 (server_h): Depend on it.
1982 (server.o): Don't depend on $(signals_def).
1983 (signals.o): Depend on $(signals_def).
1985 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1987 * Makefile.in (signals_def): New.
1988 (server_h): Append include/gdb/signals.h and signals_def.
1989 (server.o): Append signals_def.
1991 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1993 * server.c (handle_target_event): Use target_signal_to_host for
1994 resume_info.sig initialization.
1995 * target.h (struct thread_resume) <sig>: New comment.
1997 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1999 * server.c (handle_query): strcpy() the returned string from paddress()
2000 instead of sprintf().
2001 * utils.c (paddress): Return phex_nz().
2003 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2005 * server.c (handle_v_cont): Call mourn_inferior if process
2007 (myresume): Likewise.
2009 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2011 Static tracepoints, and integration with UST.
2013 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2014 * mem-break.c (uninsert_all_breakpoints)
2015 (reinsert_all_breakpoints): New.
2016 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2017 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2018 (gdb_agent_ust_loaded, helper_thread_id)
2019 (gdb_agent_helper_thread_id): New macros.
2020 (struct ipa_sym_addresses): Add addr_ust_loaded,
2021 addr_helper_thread_id, addr_cmd_buf.
2022 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2023 (in_process_agent_loaded_ust): New.
2024 (write_e_ust_not_loaded): New.
2025 (maybe_write_ipa_ust_not_loaded): New.
2026 (struct collect_static_trace_data_action): New.
2027 (enum tracepoint_type) <static_tracepoint>: New.
2028 (struct tracepoint) <handle>: Mention static tracepoints.
2029 (struct static_tracepoint_ctx): New.
2030 (CMD_BUF_SIZE): New.
2031 (add_tracepoint_action): Handle static tracepoint actions.
2032 (unprobe_marker_at): New.
2033 (clear_installed_tracepoints): Handle static tracepoints.
2034 (cmd_qtdp): Handle static tracepoints.
2035 (probe_marker_at): New.
2036 (cmd_qtstart): Handle static tracepoints.
2037 (response_tracepoint): Handle static tracepoints.
2038 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2039 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2040 (get_context_regcache): Handle static tracepoints.
2041 (do_action_at_tracepoint): Handle static tracepoint actions.
2042 (traceframe_find_block_type): Handle static trace data blocks.
2043 (traceframe_read_sdata): New.
2044 (download_tracepoints): Download static tracepoint actions.
2045 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2046 (GDB_PROBE_NAME): New.
2051 (ust_marker_to_static_tracepoint): New.
2053 (collect_ust_data_at_tracepoint): New.
2054 (gdb_ust_probe): New.
2055 (UNIX_PATH_MAX, SOCK_DIR): New.
2056 (gdb_ust_connect_sync_socket): New.
2057 (resume_thread, stop_thread): New.
2058 (run_inferior_command): New.
2059 (init_named_socket): New.
2060 (gdb_ust_socket_init): New.
2061 (cstr_to_hexstr): New.
2063 (first_marker, next_marker): New.
2064 (response_ust_marker): New.
2065 (cmd_qtfstm, cmd_qtsstm): New.
2066 (unprobe_marker_at, probe_marker_at): New.
2067 (cmd_qtstmat, gdb_ust_thread): New.
2068 (gdb_ust_init): New.
2069 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2070 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2072 (x86_64_st_collect_regmap): New.
2073 (X86_64_NUM_ST_COLLECT_GREGS): New.
2074 (AMD64_RIP_REGNUM): New.
2075 (supply_static_tracepoint_registers): New.
2076 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2078 (i386_st_collect_regmap): New.
2079 (i386_NUM_ST_COLLECT_GREGS): New.
2080 (supply_static_tracepoint_registers): New.
2081 * server.c (handle_query): Handle qXfer:statictrace:read.
2082 <qSupported>: Report support for StaticTracepoints, and
2083 qXfer:statictrace:read features.
2084 * server.h (traceframe_read_sdata)
2085 (supply_static_tracepoint_registers): Declare.
2086 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2087 (unpack_varlen_hex): Include in IPA build.
2088 * Makefile.in (ustlibs, ustinc): New.
2089 (IPA_OBJS): Add remote-utils-ipa.o.
2090 ($(IPA_LIB)): Link -ldl and -lpthread.
2092 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2093 * config.in, configure: Regenerate.
2095 2010-06-20 Ian Lance Taylor <iant@google.com>
2096 Pedro Alves <pedro@codesourcery.com>
2098 * linux-x86-low.c (always_true): Delete.
2099 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2100 trying to fool the compiler with always_true.
2102 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2104 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2105 conditions in gdbserver.
2107 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2109 * spu-low.c (spu_read_memory): Wrap around local store limit.
2110 (spu_write_memory): Likewise.
2112 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2114 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2115 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2117 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2119 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2120 uses with LONGEST uses.
2122 2010-06-14 Stan Shebs <stan@codesourcery.com>
2123 Pedro Alves <pedro@codesourcery.com>
2127 * linux-x86-low.c: Include limits.h.
2132 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2133 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2134 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2135 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2136 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2137 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2138 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2139 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2140 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2141 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2142 (amd64_emit_void_call_2): New.
2143 (amd64_emit_ops): New.
2144 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2145 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2146 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2147 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2148 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2149 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2150 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2151 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2152 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2153 (i386_emit_stack_adjust, i386_emit_int_call_1)
2154 (i386_emit_void_call_2): New.
2155 (i386_emit_ops): New.
2156 (x86_emit_ops): New.
2157 (the_low_target): Install x86_emit_ops.
2158 * server.h (struct emit_ops): New.
2159 (get_raw_reg_func_addr): Declare.
2160 (current_insn_ptr, emit_error): Declare.
2161 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2162 (set_trace_state_variable_value): New defines.
2163 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2164 addr_get_trace_state_variable_value and
2165 addr_set_trace_state_variable_value.
2166 (symbol_list): New fields for get_raw_reg,
2167 get_trace_state_variable_value and set_trace_state_variable_value.
2168 (condfn): New typedef.
2169 (struct tracepoint): New field `compiled_cond'.
2170 (do_action_at_tracepoint): Clear compiled_cond.
2171 (get_trace_state_variable_value, set_trace_state_variable_value):
2173 (condition_true_at_tracepoint): If there's a compiled condition,
2175 (current_insn_ptr, emit_error): New globals.
2176 (struct bytecode_address): New.
2177 (get_raw_reg_func_addr): New.
2178 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2179 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2180 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2181 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2182 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2183 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2184 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2185 (compile_tracepoint_condition, compile_bytecodes): New.
2186 * target.h (emit_ops): Forward declare.
2187 (struct target_ops): New field emit_ops.
2188 (target_emit_ops): New.
2189 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2190 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2191 * linux-low.c (linux_emit_ops): New.
2192 (linux_target_ops): Install it.
2193 * linux-low.h (struct linux_target_ops): New field emit_ops.
2195 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2197 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2198 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2200 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2201 Stan Shebs <stan@codesourcery.com>
2203 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2204 (all): Depend on $(extra_libraries).
2205 (install-only): Install the IPA.
2206 (IPA_OBJS, IPA_LIB): New.
2207 (clean): Remove the IPA lib.
2208 (IPAGENT_CFLAGS): New.
2209 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2210 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2211 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2212 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2213 * configure.ac: Check for atomic builtins support in the compiler.
2214 (IPA_DEPFILES, extra_libraries): Define.
2215 * configure.srv (ipa_obj): Add description.
2216 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2217 (i[34567]86-*-linux*): Set ipa_obj.
2218 (x86_64-*-linux*): Set ipa_obj.
2219 * linux-low.c (stabilizing_threads): New.
2220 (supports_fast_tracepoints): New.
2221 (linux_detach): Stabilize threads before detaching.
2222 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2223 the lwp is either not stabilizing, or is moving out of a jump pad.
2224 (linux_fast_tracepoint_collecting): New.
2225 (maybe_move_out_of_jump_pad): New.
2226 (enqueue_one_deferred_signal): New.
2227 (dequeue_one_deferred_signal): New.
2228 (linux_wait_for_event_1): If moving out of a jump pad, defer
2229 pending signals to later.
2230 (linux_stabilize_threads): New.
2231 (linux_wait_1): Check if threads need moving out of jump pads, and
2233 (stuck_in_jump_pad_callback): New.
2234 (move_out_of_jump_pad_callback): New.
2236 (linux_resume_one_lwp): Handle moving out of jump pads.
2237 (linux_set_resume_request): Dequeue deferred signals.
2238 (need_step_over_p): Also step over fast tracepoint jumps.
2239 (start_step_over): Also uninsert fast tracepoint jumps.
2240 (finish_step_over): Also reinsert fast tracepoint jumps.
2241 (linux_install_fast_tracepoint_jump): New.
2242 (linux_target_ops): Install linux_stabilize_threads and
2243 linux_install_fast_tracepoint_jump_pad.
2244 * linux-low.h (linux_target_ops) <get_thread_area,
2245 install_fast_tracepoint_jump_pad>: New fields.
2246 (struct lwp_info) <collecting_fast_tracepoint,
2247 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2248 (linux_get_thread_area): Declare.
2249 * linux-x86-low.c (jump_insn): New.
2250 (x86_get_thread_area): New.
2251 (append_insns): New.
2253 (amd64_install_fast_tracepoint_jump_pad): New.
2254 (i386_install_fast_tracepoint_jump_pad): New.
2255 (x86_install_fast_tracepoint_jump_pad): New.
2256 (the_low_target): Install x86_get_thread_area and
2257 x86_install_fast_tracepoint_jump_pad.
2258 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2259 (struct fast_tracepoint_jump): New.
2260 (fast_tracepoint_jump_insn): New.
2261 (fast_tracepoint_jump_shadow): New.
2262 (find_fast_tracepoint_jump_at): New.
2263 (fast_tracepoint_jump_here): New.
2264 (delete_fast_tracepoint_jump): New.
2265 (set_fast_tracepoint_jump): New.
2266 (uninsert_fast_tracepoint_jumps_at): New.
2267 (reinsert_fast_tracepoint_jumps_at): New.
2268 (set_breakpoint_at): Use write_inferior_memory.
2269 (uninsert_raw_breakpoint): Use write_inferior_memory.
2270 (check_mem_read): Mask out fast tracepoint jumps.
2271 (check_mem_write): Mask out fast tracepoint jumps.
2272 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2273 (set_fast_tracepoint_jump): Declare.
2274 (delete_fast_tracepoint_jump)
2275 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2276 (reinsert_fast_tracepoint_jumps_at): Declare.
2277 * regcache.c: Don't compile many functions when building the
2278 in-process agent library.
2279 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2280 the register buffer in the heap.
2281 (free_register_cache): If the register buffer isn't owned by the
2282 regcache, don't free it.
2283 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2284 pre-existing register caches.
2285 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2287 (convert_ascii_to_int): : Constify `from' parameter type.
2288 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2289 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2290 the needed buffer in-place.
2291 (relocate_instruction): New.
2292 * server.c (handle_query) <qSymbols>: If the target supports
2293 tracepoints, give it a chance of looking up symbols. Report
2294 support for fast tracepoints.
2295 (handle_status): Stabilize threads.
2296 (process_serial_event): Adjust.
2297 * server.h (struct fast_tracepoint_jump): Forward declare.
2298 (struct process_info) <fast_tracepoint_jumps>: New field.
2299 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2300 (decode_X_packet, decode_M_packet): Adjust.
2301 (relocate_instruction): Declare.
2302 (in_process_agent_loaded): Declare.
2303 (tracepoint_look_up_symbols): Declare.
2304 (struct fast_tpoint_collect_status): Declare.
2305 (fast_tracepoint_collecting): Declare.
2306 (force_unlock_trace_buffer): Declare.
2307 (handle_tracepoint_bkpts): Declare.
2308 (initialize_low_tracepoint)
2309 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2310 * target.h (struct target_ops) <stabilize_threads,
2311 install_fast_tracepoint_jump_pad>: New fields.
2312 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2313 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2314 [HAVE_STDINT_H]: Include stdint.h.
2315 (trace_debug_1): Rename to ...
2316 (trace_vdebug): ... this.
2317 (trace_debug): Rename to ...
2318 (trace_debug_1): ... this. Add `level' parameter.
2320 (ATTR_USED, ATTR_NOINLINE): New.
2321 (IP_AGENT_EXPORT): New.
2322 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2323 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2324 (about_to_request_buffer_space, trace_buffer_is_full)
2325 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2326 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2327 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2328 (traceframe_write_count, traceframes_created)
2329 (trace_state_variables)
2330 New renaming defines.
2331 (struct ipa_sym_addresses): New.
2332 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2334 (ipa_sym_addrs): New.
2335 (all_tracepoint_symbols_looked_up): New.
2336 (in_process_agent_loaded): New.
2337 (write_e_ipa_not_loaded): New.
2338 (maybe_write_ipa_not_loaded): New.
2339 (tracepoint_look_up_symbols): New.
2340 (debug_threads) [IN_PROCESS_AGENT]: New.
2341 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2342 (UNKNOWN_SIDE_EFFECTS): New.
2343 (stop_tracing): New.
2344 (flush_trace_buffer): New.
2345 (stop_tracing_bkpt): New.
2346 (flush_trace_buffer_bkpt): New.
2347 (read_inferior_integer): New.
2348 (read_inferior_uinteger): New.
2349 (read_inferior_data_pointer): New.
2350 (write_inferior_data_pointer): New.
2351 (write_inferior_integer): New.
2352 (write_inferior_uinteger): New.
2353 (struct collect_static_trace_data_action): Delete.
2354 (enum tracepoint_type): New.
2355 (struct tracepoint) <type>: New field `type'.
2356 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2357 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2358 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2359 (tracepoints): Use IP_AGENT_EXPORT.
2360 (last_tracepoint): Don't include in the IPA.
2361 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2362 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2363 (alloced_trace_state_variables): New.
2364 (trace_state_variables): Use IP_AGENT_EXPORT.
2365 (traceframe_t): Delete unused variable.
2366 (circular_trace_buffer): Don't include in the IPA.
2367 (trace_buffer_start): Delete.
2368 (struct trace_buffer_control): New.
2369 (trace_buffer_free): Delete.
2370 (struct ipa_trace_buffer_control): New.
2371 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2372 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2374 (trace_buffer_ctrl): New.
2375 (TRACE_BUFFER_CTRL_CURR): New.
2376 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2377 Reimplement as macros.
2378 (trace_buffer_wrap): Delete.
2379 (traceframe_write_count, traceframe_read_count)
2380 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2381 (struct tracepoint_hit_ctx) <type>: New field.
2382 (struct fast_tracepoint_ctx): New.
2383 (memory_barrier): New.
2385 (record_tracepoint_error): Update atomically in the IPA.
2386 (clear_inferior_trace_buffer): New.
2387 (about_to_request_buffer_space): New.
2388 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2389 updating the same buffer.
2390 (add_tracepoint): Default the tracepoint's type to trap
2391 tracepoint, and orig_size to -1.
2392 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2394 (create_trace_state_variable): New parameter `gdb'. Handle it.
2395 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2396 (cmd_qtdp): Handle fast tracepoints.
2398 (max_jump_pad_size): New.
2399 (gdb_jump_pad_head): New.
2400 (get_jump_space_head): New.
2401 (claim_jump_space): New.
2402 (sort_tracepoints): New.
2403 (MAX_JUMP_SIZE): New.
2404 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2406 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2407 support. Upload fast traceframes, and delete internal IPA
2409 (stop_tracing_handler): New.
2410 (flush_trace_buffer_handler): New.
2411 (cmd_qtstop): Upload fast tracepoints.
2412 (response_tracepoint): Handle fast tracepoints.
2413 (tracepoint_finished_step): Upload fast traceframes. Set the
2414 tracepoint hit context's tracepoint type.
2415 (handle_tracepoint_bkpts): New.
2416 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2417 type. Add comment about fast tracepoints.
2418 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2419 non-existing action_str field.
2420 (get_context_regcache): Handle fast tracepoints.
2421 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2423 (fast_tracepoint_from_jump_pad_address): New.
2424 (fast_tracepoint_from_ipa_tpoint_address): New.
2425 (collecting_t): New.
2426 (force_unlock_trace_buffer): New.
2427 (fast_tracepoint_collecting): New.
2430 (write_inferior_data_ptr): New.
2431 (target_tp_heap): New.
2432 (target_malloc): New.
2433 (download_agent_expr): New.
2435 (download_tracepoints): New.
2436 (download_trace_state_variables): New.
2437 (upload_fast_traceframes): New.
2438 (IPA_FIRST_TRACEFRAME): New.
2439 (IPA_NEXT_TRACEFRAME_1): New.
2440 (IPA_NEXT_TRACEFRAME): New.
2441 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2442 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2443 (gdb_jump_pad_buffer_end): New.
2444 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2445 (initialize_tracepoint): Adjust.
2446 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2447 buffer. Initialize the low module.
2448 * utils.c (PREFIX, TOOLNAME): New.
2449 (malloc_failure): Use PREFIX.
2450 (error): In the IPA, an error causes an exit.
2451 (fatal, warning): Use PREFIX.
2452 (internal_error): Use TOOLNAME.
2453 (NUMCELLS): Increase to 10.
2454 * configure, config.in: Regenerate.
2456 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2458 * server.c (handle_query) <qSupported>: Do two passes over the
2459 qSupported string to avoid nesting strtok.
2461 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2463 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2465 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2467 * configure: Regenerate.
2468 * proc-service.list: New.
2470 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2472 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2475 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2477 * gdbreplay.c (remote_open): Check error return from socket() call by
2478 its equality to -1 not by it being negative.
2479 * remote-utils.c (remote_open): Likewise.
2481 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2483 * config.h: Regenerate.
2485 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2487 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2488 doesn't provide PTRACE_GET_THREAD_AREA.
2490 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2492 * linux-m68k-low.c: Include <asm/ptrace.h>
2493 (ps_get_thread_area): Implement.
2495 2010-05-03 Doug Evans <dje@google.com>
2497 * event-loop.c (struct callback_event): New struct.
2498 (callback_list): New global.
2499 (append_callback_event, delete_callback_event): New functions.
2500 (process_callback): New function.
2501 (start_event_loop): Call it.
2502 * remote-utils.c (NOT_SCHEDULED): Define.
2503 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2504 moved out of readchar.
2505 (readchar): Rewrite. Call reschedule before returning.
2506 (reset_readchar): New function.
2507 (remote_close): Call it.
2508 (process_remaining, reschedule): New functions.
2509 * server.h (callback_handler_func): New typedef.
2510 (append_callback_event, delete_callback_event): Declare.
2512 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2514 * proc-service.c (ps_pglobal_lookup): Use
2515 thread_db_look_up_one_symbol.
2516 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2517 parameter. Use it instead of all_symbols_looked_up.
2518 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2520 (all_symbols_looked_up): Don't declare.
2521 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2522 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2524 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2525 Set all_symbols_looked_up here.
2526 (thread_db_look_up_one_symbol): New.
2527 (thread_db_get_tls_address): Adjust.
2528 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2529 thread_db object on the heap, and tentatively set it in the
2531 (thread_db_init): Don't set all_symbols_looked_up here.
2532 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2534 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2536 * linux-low.c (linux_kill, linux_detach): Adjust.
2537 (status_pending_p_callback): Remove redundant statement. Check
2538 for !TARGET_WAITIKIND_IGNORE, instead of
2539 TARGET_WAITKIND_STOPPED.
2540 (handle_tracepoints): Make sure LWP is locked. Adjust.
2541 (linux_wait_for_event_1): Adjust.
2542 (linux_cancel_breakpoints): New.
2543 (unsuspend_one_lwp): New.
2544 (unsuspend_all_lwps): New.
2545 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2546 (send_sigstop_callback): Change return type to int, add new
2547 `except' parameter and handle it.
2548 (suspend_and_send_sigstop_callback): New.
2549 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2550 pass them down. If SUSPEND, also increment the lwp's suspend
2552 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2553 (need_step_over_p): Don't consider suspended LWPs.
2554 (start_step_over): Adjust.
2555 (proceed_one_lwp): Change return type to int, add new `except'
2556 parameter and handle it.
2557 (unsuspend_and_proceed_one_lwp): New.
2558 (proceed_all_lwps): Use find_inferior instead of
2560 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2561 also decrement the suspend count of LWPs. Pass `except' down,
2562 instead of hacking its suspend count.
2563 (linux_pause_all): Add `freeze' parameter. Adjust.
2564 (linux_unpause_all): New.
2565 (linux_target_ops): Install linux_unpause_all.
2566 * server.c (handle_status): Adjust.
2567 * target.h (struct target_ops): New fields `unpause_all' and
2568 `cancel_breakpoints'. Add new parameter to `pause_all'.
2569 (pause_all): Add new `freeze' parameter.
2571 (cancel_breakpoints): New.
2572 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2574 (cmd_qtstart): Pause threads.
2575 (stop_tracing): Pause threads, and cancel breakpoints.
2576 * win32-low.c (win32_target_ops): Adjust.
2578 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2580 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2581 the inferior right away from here...
2582 (linux_wait_1): ... to here, and adjust to check the thread's
2583 last_resume_kind instead of the lwp's step or stop_expected flags.
2585 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2587 * README: Use consistent `GDB' and `GDBserver' spellings.
2589 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2591 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2592 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2593 (linux_detach_one_lwp): Assume the lwp is stopped.
2594 (any_thread_of): Delete.
2595 (linux_detach): Stop all lwps here. Don't blindly delete all
2597 (delete_lwp_callback): New.
2598 (linux_mourn): Delete all lwps of the process that is gone.
2599 (linux_wait_1): Don't delete the last lwp of the process here.
2600 * mem-break.h (mark_breakpoints_out): Declare.
2601 * mem-break.c (mark_breakpoints_out): New.
2602 (free_all_breakpoints): Use it.
2603 * server.c (handle_target_event): If the process is gone, mark
2605 * thread-db.c (struct thread_db) <create_bp>: New field.
2606 (thread_db_enable_reporting): Fix prototype. Store a thread event
2607 breakpoint reference in the thread_db struct.
2608 (thread_db_load_search): Clear the thread_db object.
2609 (try_thread_db_load_1): Ditto.
2610 (switch_to_process): New.
2611 (disable_thread_event_reporting): Use it.
2612 (remove_thread_event_breakpoints): New.
2613 (thread_db_detach, thread_db_mourn): Use it.
2615 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2617 * linux-low.c (linux_enable_event_reporting): New.
2618 (linux_wait_for_event_1, handle_extended_wait): Use it.
2620 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2622 * linux-low.c (linux_kill_one_lwp, linux_kill)
2623 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2624 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2625 SIGSTOP even if the LWP is stopped.
2626 (send_sigstop_callback): New.
2627 (stop_all_lwps): Use send_sigstop_callback instead.
2628 (linux_resume_one_thread): Adjust.
2629 (proceed_one_lwp): Still proceed an LWP that the client has
2630 requested to stop, if we haven't reported it as stopped yet. Make
2631 sure that LWPs the client want stopped, have a pending SIGSTOP.
2633 2010-04-26 Doug Evans <dje@google.com>
2635 * server.c (handle_general_set): Make static.
2637 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2638 Print received char after testing for error/eof instead of before.
2639 (input_interrupt): Tweak comment.
2641 2010-04-23 Doug Evans <dje@google.com>
2643 * server.c (start_inferior): Print inferior argv if --debug.
2645 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2647 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2648 * nto-x86-low.c: Include server.h
2650 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2652 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2653 be consistent with other sources of this directory.
2654 (init_registers_amd64): Correct name of source file of this function
2657 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2659 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2662 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2664 * win32-i386-low.c: Add 64-bit support.
2665 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2666 (init_registers_amd64): Declare.
2667 (mappings): Add 64-bit version of array.
2668 (init_windows_x86): New function.
2669 (the_low_target): Change init_arch field to init_windows_x86.
2671 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2673 * win32-low.c: Adapt to support also 64-bit architecture.
2674 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2675 (get_image_name): Use SIZE_T type for local variable `done'.
2676 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2677 (toolhelp_get_dll_name): Idem.
2678 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2679 Use uintptr_t typecast to avoid warning.
2680 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2681 (handle_exception): Use phex_nz to avoid warning.
2682 (win32_wait): Remove unused local variable `process'.
2684 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2686 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2689 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2691 * configure.ac: Use `ws2_32' library for srv_mingw.
2692 * configure: Regenerate.
2693 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2694 * remote-utils.c: Likewise.
2696 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2698 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2699 if __x86_64__ is defined.
2701 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2703 * configure: Regenerate.
2705 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2707 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2708 * target.h (target_ops): New get_tib_address field.
2709 * win32-low.h (win32_thread_info): Add thread_local_base field.
2710 * win32-low.c (child_add_thread): Add tlb argument.
2711 Set thread_local_base field to TLB.
2712 (get_child_debug_event): Adapt to child_add_thread change.
2713 (win32_get_tib_address): New function.
2714 (win32_target_ops): Set get_tib_address field to
2715 win32_get_tib_address.
2716 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2718 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2720 * linux-low.c (linux_mourn): Also remove the process.
2721 * server.c (handle_target_event): Don't remove the process here.
2722 * nto-low.c (nto_mourn): New.
2723 (nto_target_ops): Install it.
2724 * spu-low.c (spu_mourn): New.
2725 (spu_target_ops): Install it.
2726 * win32-low.c (win32_mourn): New.
2727 (win32_target_ops): Install it.
2729 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2731 * server.h (buffer_xml_printf): Remove redundant `;'.
2733 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2735 * regcache.c (set_register_cache): Invalidate regcaches before
2736 changing the register cache layout.
2737 (regcache_invalidate_one): Allow a NULL regcache.
2738 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2739 regcaches before changing the register cache layout or the target
2742 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2744 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2745 variable warning on Linux/x86-64.
2747 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2749 GDBserver disconnected tracing support.
2751 * linux-low.c (linux_remove_process): Delete.
2752 (add_lwp): Don't set last_resume_kind here.
2753 (linux_kill): Use `mourn'.
2754 (linux_detach): Use `thread_db_detach', and `mourn'.
2756 (linux_attach_lwp_1): Adjust comment.
2757 (linux_attach): last_resume_kind moved the thread_info; adjust.
2758 (status_pending_p_callback): Adjust.
2759 (linux_wait_for_event_1): Adjust.
2760 (count_events_callback, select_singlestep_lwp_callback)
2761 (select_event_lwp_callback, cancel_breakpoints_callback)
2762 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2763 (proceed_one_lwp): Adjust.
2764 (linux_async): Add debug output.
2765 (linux_thread_stopped): New.
2766 (linux_pause_all): New.
2767 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2769 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2770 (thread_db_free): Delete declaration.
2771 (thread_db_detach, thread_db_mourn): Declare.
2772 * thread-db.c (thread_db_init): Use thread_db_mourn.
2773 (thread_db_free): Delete, split in two.
2774 (disable_thread_event_reporting): New.
2775 (thread_db_detach): New.
2776 (thread_db_mourn): New.
2778 * server.h (struct thread_info) <last_resume_kind>: New field.
2779 <attached>: Add comment.
2780 <gdb_detached>: New field.
2781 (handler_func): Change return type to int.
2782 (handle_serial_event, handle_target_event): Ditto.
2783 (gdb_connected): Declare.
2785 (disconnected_tracing): Declare.
2786 (stop_tracing): Declare.
2788 * server.c (handle_query) <qSupported>: Report support for
2789 disconnected tracing.
2790 (queue_stop_reply_callback): Account for running threads.
2791 (gdb_wants_thread_stopped): New.
2792 (gdb_wants_all_threads_stopped): New.
2793 (gdb_reattached_process): New.
2794 (handle_status): Clear the `gdb_detached' flag of all processes.
2795 In all-stop, stop all threads.
2796 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2797 (process_serial_event): If the remote connection breaks, or if an
2798 exit was forced with "monitor exit", force an event loop exit.
2799 Handle disconnected tracing on detach.
2800 (handle_serial_event): Adjust.
2801 (handle_target_event): If GDB isn't connected, forward events back
2802 to the inferior, unless the last process exited, in which case,
2803 exit gdbserver. Adjust interface.
2805 * remote-utils.c (remote_open): Don't block in accept. Instead
2806 register an event loop source on the listen socket file
2807 descriptor. Refactor bits into ...
2808 (listen_desc): ... this new global.
2809 (gdb_connected): ... this new function.
2810 (enable_async_notification): ... this new function.
2811 (handle_accept_event): ... this new function.
2812 (remote_close): Clear remote_desc.
2814 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2816 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2818 (mourn_inferior): Define.
2819 (target_process_qsupported): Avoid the dangling else problem.
2820 (thread_stopped): Define.
2821 (pause_all): Define.
2822 (target_waitstatus_to_string): Declare.
2823 * target.c (target_waitstatus_to_string): New.
2825 * tracepoint.c (tracing): Make extern.
2826 (disconnected_tracing): New.
2827 (stop_tracing): Make extern. Handle tracing stops due to GDB
2829 (cmd_qtdisconnected): New.
2830 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2831 (handle_tracepoint_general_set): Handle QTDisconnected.
2833 * event-loop.c (event_handler_func): Change return type to int.
2834 (process_event): Bail out if the event handler wants the event
2836 (handle_file_event): Ditto.
2837 (start_event_loop): Bail out if the event handler wants the event
2840 * nto-low.c (nto_target_ops): Adjust.
2841 * spu-low.c (spu_wait): Don't remove the process here.
2842 (spu_target_ops): Adjust.
2843 * win32-low.c (win32_wait): Don't remove the process here.
2844 (win32_target_ops): Adjust.
2846 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2848 * regcache.c (realloc_register_cache): Invalidate inferior's
2849 regcache before recreating it.
2851 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2853 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2855 2010-04-09 Stan Shebs <stan@codesourcery.com>
2856 Pedro Alves <pedro@codesourcery.com>
2858 * server.h (LONGEST): New.
2859 (struct thread_info) <while_stepping>: New field.
2860 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2862 (initialize_tracepoint, handle_tracepoint_general_set)
2863 (handle_tracepoint_query, tracepoint_finished_step)
2864 (tracepoint_was_hit, release_while_stepping_state_list):
2865 (current_traceframe): Declare.
2866 * server.c (handle_general_set): Handle tracepoint packets.
2868 (write_memory): New.
2869 (handle_search_memory_1): Use read_memory.
2870 (handle_query): Report support for conditional tracepoints, trace
2871 state variables, and tracepoint sources. Handle tracepoint
2873 (main): Initialize the tracepoints module.
2874 (process_serial_event): Handle traceframe reads/writes.
2876 * linux-low.c (handle_tracepoints): New.
2877 (linux_wait_1): Call it.
2878 (linux_resume_one_lwp): Handle while-stepping.
2879 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2880 (linux_target_ops): Install them.
2881 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2883 * linux-x86-low.c (x86_supports_tracepoints): New.
2884 (the_low_target). Install it.
2886 * mem-break.h (delete_breakpoint): Declare.
2887 * mem-break.c (delete_breakpoint): Make external.
2889 * target.h (struct target_ops): Add `supports_tracepoints',
2890 `read_pc', and `write_pc' fields.
2891 (target_supports_tracepoints): Define.
2892 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2895 * regcache.h (struct regcache) <registers_owned>: New field.
2896 (init_register_cache, regcache_cpy): Declare.
2897 (regcache_read_pc, regcache_write_pc): Declare.
2898 (register_cache_size): Declare.
2899 (supply_regblock): Declare.
2900 * regcache.c (init_register_cache): New.
2901 (new_register_cache): Use it.
2902 (regcache_cpy): New.
2903 (register_cache_size): New.
2904 (supply_regblock): New.
2905 (regcache_read_pc, regcache_write_pc): New.
2907 * tracepoint.c: New.
2909 * Makefile.in (OBS): Add tracepoint.o.
2910 (tracepoint.o): New rule.
2912 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2914 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2916 (i386-mmx.c): Likewise.
2917 (i386-mmx-linux.o): Likewise.
2918 (i386-mmx-linux.c): Likewise.
2920 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2921 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2922 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2923 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2925 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2926 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2927 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2929 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2931 * Makefile.in (clean): Updated.
2933 (i386-avx.c): Likewise.
2934 (i386-avx-linux.o): Likewise.
2935 (i386-avx-linux.c): Likewise.
2936 (amd64-avx.o): Likewise.
2937 (amd64-avx.c): Likewise.
2938 (amd64-avx-linux.o): Likewise.
2939 (amd64-avx-linux.c): Likewise.
2941 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2942 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2943 (srv_amd64_regobj): Add amd64-avx.o.
2944 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2945 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2946 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2947 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2948 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2949 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2950 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2952 * i387-fp.c: Include "i386-xstate.h".
2954 (i387_cache_to_xsave): Likewise.
2955 (i387_xsave_to_cache): Likewise.
2956 (x86_xcr0): Likewise.
2958 * i387-fp.h (i387_cache_to_xsave): Likewise.
2959 (i387_xsave_to_cache): Likewise.
2960 (x86_xcr0): Likewise.
2962 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2963 * linux-crisv32-low.c (target_regsets): Likewise.
2964 * linux-m68k-low.c (target_regsets): Likewise.
2965 * linux-mips-low.c (target_regsets): Likewise.
2966 * linux-ppc-low.c (target_regsets): Likewise.
2967 * linux-s390-low.c (target_regsets): Likewise.
2968 * linux-sh-low.c (target_regsets): Likewise.
2969 * linux-sparc-low.c (target_regsets): Likewise.
2970 * linux-xtensa-low.c (target_regsets): Likewise.
2972 * linux-low.c: Include <sys/uio.h>.
2973 (regsets_fetch_inferior_registers): Support nt_type.
2974 (regsets_store_inferior_registers): Likewise.
2975 (linux_process_qsupported): New.
2976 (linux_target_ops): Add linux_process_qsupported.
2978 * linux-low.h (regset_info): Add nt_type.
2979 (linux_target_ops): Add process_qsupported.
2981 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2983 (init_registers_i386_avx_linux): New.
2984 (init_registers_amd64_avx_linux): Likewise.
2985 (xmltarget_i386_linux_no_xml): Likewise.
2986 (xmltarget_amd64_linux_no_xml): Likewise.
2987 (PTRACE_GETREGSET): Likewise.
2988 (PTRACE_SETREGSET): Likewise.
2989 (x86_fill_xstateregset): Likewise.
2990 (x86_store_xstateregset): Likewise.
2991 (use_xml): Likewise.
2992 (x86_linux_update_xmltarget): Likewise.
2993 (x86_linux_process_qsupported): Likewise.
2994 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2995 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2996 init_registers_i386_linux here. Call
2997 x86_linux_update_xmltarget.
2998 (the_low_target): Add x86_linux_process_qsupported.
3000 * server.c (handle_query): Call target_process_qsupported.
3002 * target.h (target_ops): Add process_qsupported.
3003 (target_process_qsupported): New.
3005 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3007 * inferiors.c (add_thread): Set last_status kind to
3008 TARGET_WAITKIND_IGNORE.
3009 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3010 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3011 (linux_wait_1): Move `thread' local definition to block that uses
3012 it. Don't NULL initialize `event_child'.
3013 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3014 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3015 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3017 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3019 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3020 an extended waitstatus, or by a watchpoint.
3021 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3022 thread was stepping or has been stopped by a watchpoint.
3024 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3026 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3027 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3028 of another, then delete the previous, and validate all
3030 (validate_inserted_breakpoint): New.
3031 (delete_disabled_breakpoints): New.
3032 (validate_breakpoints): New.
3033 (check_mem_read): Validate breakpoints before trusting their
3034 shadow. Delete disabled breakpoints.
3035 (check_mem_write): Validate breakpoints before trusting they
3036 should be inserted. Delete disabled breakpoints.
3037 * mem-break.h (validate_breakpoints):
3038 * server.c (handle_query): Validate breakpoints when we see a
3041 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3043 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3044 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3045 if we could tell there's a GDB breakpoint at stop_pc.
3046 (need_step_over_p): Don't do a step over if we find a GDB
3047 breakpoint at the resume PC.
3049 * mem-break.c (struct raw_breakpoint): New.
3050 (enum bkpt_type): New type `gdb_breakpoint'.
3051 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3052 fields. New field `raw'.
3053 (find_raw_breakpoint_at): New.
3054 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3056 (set_breakpoint_at): Adjust.
3057 (delete_raw_breakpoint): New.
3058 (release_breakpoint): New.
3059 (delete_breakpoint): Rename to...
3060 (delete_breakpoint_1): ... this. Add proc parameter. Use
3061 release_breakpoint. Return ENOENT.
3062 (delete_breakpoint): Reimplement.
3063 (find_breakpoint_at): Delete.
3064 (find_gdb_breakpoint_at): New.
3065 (delete_breakpoint_at): Delete.
3066 (set_gdb_breakpoint_at): New.
3067 (delete_gdb_breakpoint_at): New.
3068 (gdb_breakpoint_here): New.
3069 (set_reinsert_breakpoint): Use release_breakpoint.
3070 (uninsert_breakpoint): Rename to ...
3071 (uninsert_raw_breakpoint): ... this.
3072 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3073 (reinsert_raw_breakpoint): Change parameter type to
3075 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3077 (check_breakpoints): Adjust. Use release_breakpoint.
3078 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3079 (breakpoint_inserted_here): Ditto.
3080 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3081 Don't trust the breakpoint's shadow if it is not inserted.
3082 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3083 (delete_all_breakpoints): Adjust.
3084 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3085 use delete_breakpoint_1.
3087 * mem-break.h (breakpoints_supported): Delete declaration.
3088 (set_gdb_breakpoint_at): Declare.
3089 (gdb_breakpoint_here): Declare.
3090 (delete_breakpoint_at): Delete.
3091 (delete_gdb_breakpoint_at): Declare.
3093 * server.h (struct raw_breakpoint): Forward declare.
3094 (struct process_info): New field `raw_breakpoints'.
3096 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3099 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3101 * linux-low.c (status_pending_p_callback): Fix comment.
3102 (linux_wait_for_event_1): Move most of the internal breakpoint
3103 handling from here...
3104 (linux_wait_1): ... to here.
3105 (count_events_callback): New.
3106 (select_singlestep_lwp_callback): New.
3107 (select_event_lwp_callback): New.
3108 (cancel_breakpoints_callback): New.
3109 (select_event_lwp): New.
3110 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3111 priority to all LWPs that have had events that should be reported
3112 to the client. Cancel breakpoints when about to reporting the
3113 event to the client, not while stopping lwps. No longer cancel
3114 finished single-steps here.
3115 (cancel_finished_single_step): Delete.
3116 (cancel_finished_single_steps): Delete.
3118 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3120 * mem-break.c (enum bkpt_type): New.
3121 (struct breakpoint): New field `type'.
3122 (set_breakpoint_at): Change return type to struct breakpoint
3123 pointer. Set type to `other_breakpoint' by default.
3124 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3125 in the breakpoint list.
3126 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3127 (reinsert_breakpoint): Rename to ...
3128 (reinsert_raw_breakpoint): ... this.
3129 (reinsert_breakpoints_at): Adjust.
3130 * mem-break.h (struct breakpoint): Declare.
3131 (set_breakpoint_at): Change return type to struct breakpoint
3134 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3136 * server.c (handle_query): Assign, not compare.
3138 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3140 Teach linux gdbserver to step-over-breakpoints.
3142 * linux-low.c (can_hardware_single_step): New.
3143 (supports_breakpoints): New.
3144 (handle_extended_wait): If stopping threads, read the stop pc of
3147 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3148 low target doesn't support retrieving the PC.
3149 (add_lwp): Set last_resume_kind to resume_continue.
3150 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3151 (linux_attach): Don't clear stop_expected. Set the lwp's
3152 last_resume_kind to resume_stop.
3153 (linux_detach_one_lwp): Don't check for removed breakpoints.
3154 (check_removed_breakpoint): Delete.
3155 (status_pending_p): Rename to ...
3156 (status_pending_p_callback): ... this. Don't check for removed
3157 breakpoints. Don't consider threads that are stopped from GDB's
3159 (linux_wait_for_lwp): Always read the stop_pc here.
3160 (cancel_breakpoint): New.
3161 (step_over_bkpt): New global.
3162 (linux_wait_for_event_1): Implement stepping over breakpoints.
3163 (gdb_wants_lwp_stopped): New.
3164 (gdb_wants_all_stopped): New.
3165 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3166 single-step traps here. Store the thread's last reported target
3168 (send_sigstop): Don't clear stop_expected. Always set it,
3170 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3171 (cancel_finished_single_step): New.
3172 (cancel_finished_single_steps): New.
3173 (wait_for_sigstop): Don't cancel finished single-step traps here.
3174 (linux_resume_one_lwp): Don't check for removed breakpoints.
3175 Don't set `step' on non-hardware step archs.
3176 (linux_set_resume_request): Ignore resume_stop requests if already
3177 stopping or stopped. Set the lwp's last_resume_kind.
3178 (resume_status_pending_p): Don't check for removed breakpoints.
3179 (need_step_over_p): New.
3180 (start_step_over): New.
3181 (finish_step_over): New.
3182 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3183 requests. Clear the thread's last reported target waitstatus.
3184 Don't use the `suspended' flag. Don't consider pending breakpoints.
3185 (linux_resume): Start a step-over if necessary.
3186 (proceed_one_lwp): New.
3187 (proceed_all_lwps): New.
3188 (unstop_all_lwps): New.
3189 * linux-low.h (struct lwp_info): Rewrite comment for the
3190 `suspended' flag. Add the `stop_pc' field. Delete the
3191 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3192 Add `'last_resume_kind' and `need_step_over' fields.
3193 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3194 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3195 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3196 (set_raw_breakpoint_at): New.
3197 (set_breakpoint_at): Rewrite to use it.
3198 (reinsert_breakpoint_handler): Delete.
3199 (set_reinsert_breakpoint): New.
3200 (reinsert_breakpoint_by_bp): Delete.
3201 (delete_reinsert_breakpoints): New.
3202 (uninsert_breakpoint): Rewrite.
3203 (uninsert_breakpoints_at): New.
3204 (reinsert_breakpoint): Rewrite.
3205 (reinsert_breakpoints_at): New.
3206 (check_breakpoints): Rewrite.
3207 (breakpoint_here): New.
3208 (breakpoint_inserted_here): New.
3209 (check_mem_read): Adjust.
3210 * mem-break.h (breakpoints_supported, breakpoint_here)
3211 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3212 (reinsert_breakpoint_by_bp): Delete declaration.
3213 (delete_reinsert_breakpoints): Declare.
3214 (reinsert_breakpoint): Delete declaration.
3215 (reinsert_breakpoints_at): Declare.
3216 (uninsert_breakpoint): Delete declaration.
3217 (uninsert_breakpoints_at): Declare.
3218 (check_breakpoints): Adjust prototype.
3219 * server.h: Adjust include order.
3220 (struct thread_info): Declare here. Add a `last_status' field.
3222 2010-03-23 Michael Snyder <msnyder@vmware.com>
3224 * server.c (crc32): New function.
3225 (handle_query): Add handling for 'qCRC:' request.
3227 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3229 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3230 lwp had been stopped by a watchpoint.
3232 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3234 * server.h (internal_error): Declare.
3235 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3236 * utils.c (internal_error): New function.
3238 2010-03-15 Andreas Schwab <schwab@redhat.com>
3240 * configure.srv: Fix typo setting srv_regobj.
3242 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3244 * linux-low.c (fetch_register): Avoid passing a non string literal
3246 (usr_store_inferior_registers): Ditto.
3248 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3250 * linux-low.c (linux_write_memory): Bail out early if peeking
3253 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3255 * linux-low.h (struct lwp_info): New fields
3256 `stopped_by_watchpoint' and `stopped_data_address'.
3257 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3258 here, and cache them in the lwp object.
3259 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3261 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3263 (linux_stopped_by_watchpoint): Rewrite.
3264 (linux_stopped_data_address): Rewrite.
3266 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3268 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3269 switching the current inferior, not before.
3271 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3273 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3274 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3275 i386-linux.c and amd64-linux.c.
3276 (reg-i386.o): Removed.
3277 (reg-i386.c): Likewise.
3278 (reg-i386-linux.o): Likewise.
3279 (reg-i386-linux.c): Likewise.
3280 (reg-x86-64.o): Likewise.
3281 (reg-x86-64.c): Likewise.
3282 (reg-x86-64-linux.o): Likewise.
3283 (reg-x86-64-linux.c): Likewise.
3286 (i386-linux.o): Likewise.
3287 (i386-linux.c): Likewise.
3288 (amd64.o): Likewise.
3289 (amd64.c): Likewise.
3290 (amd64-linux.o): Likewise.
3291 (amd64-linux.c): Likewise.
3293 * configure.srv (srv_i386_regobj): New.
3294 (srv_i386_linux_regobj): Likewise.
3295 (srv_amd64_regobj): Likewise.
3296 (srv_amd64_linux_regobj): Likewise.
3297 (srv_i386_32bit_xmlfiles): Likewise.
3298 (srv_i386_64bit_xmlfiles): Likewise.
3299 (srv_i386_xmlfiles): Likewise.
3300 (srv_amd64_xmlfiles): Likewise.
3301 (srv_i386_linux_xmlfiles): Likewise.
3302 (srv_amd64_linux_xmlfiles): Likewise.
3303 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3304 srv_xmlfiles to $srv_i386_xmlfiles.
3305 (i[34567]86-*-mingw32ce*): Likewise.
3306 (i[34567]86-*-mingw*): Likewise.
3307 (i[34567]86-*-nto*): Likewise.
3308 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3309 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3310 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3311 (x86_64-*-linux*): Likewise.
3313 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3314 (init_registers_amd64_linux): New.
3315 (x86_arch_setup): Replace init_registers_x86_64_linux with
3316 init_registers_amd64_linux.
3318 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3320 * configure.ac: Check for libdl. If it is not available link against
3321 static libthread_db.
3322 * configure: Regenerate.
3324 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3328 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3329 handing a read watchpoint.
3330 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3332 2010-02-12 Doug Evans <dje@google.com>
3334 * linux-low.c (linux_supports_tracefork_flag): Document.
3335 (linux_look_up_symbols): Add comment.
3337 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3339 * regcache.c (supply_register): Clear regcache if buf is NULL.
3341 2010-02-02 Nicolas Roche <roche@sourceware.org>
3342 Joel Brobecker <brobecker@adacore.com>
3344 * inferiors.c (find_inferior): Add function documentation.
3345 (unloaded_dll): Handle the case where the unloaded dll has not
3346 been previously registered in the dll list.
3348 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3350 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3351 (thumb2_breakpoint): New.
3352 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3354 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3356 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3357 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3360 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3362 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3364 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3366 * linux-s390-low.c (s390_collect_ptrace_register)
3367 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3369 2010-01-21 Doug Evans <dje@google.com>
3371 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3372 (PTRACE_ARG4_TYPE): New macro.
3373 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3374 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3375 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3376 (usr_store_inferior_registers): Ditto.
3377 (linux_read_memory, linux_write_memory): Ditto.
3378 (linux_test_for_tracefork): Ditto.
3380 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3381 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3383 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3385 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3388 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3390 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3391 prototype to take a regcache. Adjust.
3393 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3395 * regcache.h (struct thread_info): Forward declare.
3396 (struct regcache): New.
3397 (new_register_cache): Adjust prototype.
3398 (get_thread_regcache): Declare.
3399 (free_register_cache): Adjust prototype.
3400 (registers_to_string, registers_from_string): Ditto.
3401 (supply_register, supply_register_by_name, collect_register)
3402 (collect_register_as_string, collect_register_by_name): Ditto.
3403 * regcache.c (struct inferior_regcache_data): Delete.
3404 (get_regcache): Rename to ...
3405 (get_thread_regcache): ... this. Adjust. Switch inferior before
3407 (regcache_invalidate_one): Adjust.
3408 (regcache_invalidate): Fix prototype.
3409 (new_register_cache): Return the new register cache.
3410 (free_register_cache): Change prototype.
3411 (realloc_register_cache): Adjust.
3412 (registers_to_string): Change prototype to take a regcache. Adjust.
3413 (registers_from_string): Ditto.
3414 (register_data): Ditto.
3415 (supply_register): Ditto.
3416 (supply_register_by_name): Ditto.
3417 (collect_register): Ditto.
3418 (collect_register_as_string): Ditto.
3419 (collect_register_by_name): Ditto.
3420 * server.c (process_serial_event): Adjust.
3421 * linux-low.h (regset_fill_func, regset_store_func): Change
3423 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3425 * linux-low.c (get_stop_pc): Adjust.
3426 (check_removed_breakpoint): Adjust.
3427 (linux_wait_for_event): Adjust.
3428 (linux_resume_one_lwp): Adjust.
3429 (fetch_register): Add regcache parameter. Adjust.
3430 (usr_store_inferior_registers): Ditto.
3431 (regsets_fetch_inferior_registers): Ditto.
3432 (regsets_store_inferior_registers): Ditto.
3433 (linux_fetch_registers, linux_store_registers): Ditto.
3434 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3436 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3437 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3438 prototype to take a regcache.
3439 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3440 * remote-utils.c (convert_ascii_to_int, outreg)
3441 (prepare_resume_reply): Change prototype to take a regcache.
3443 * target.h (struct target_ops) <fetch_registers, store_registers>:
3444 Change prototype to take a regcache.
3445 (fetch_inferior_registers, store_inferior_registers): Change
3446 prototype to take a regcache. Adjust.
3447 * proc-service.c (ps_lgetregs): Adjust.
3448 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3449 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3450 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3451 take a regcache. Adjust.
3452 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3453 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3454 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3455 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3456 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3457 (cris_cannot_fetch_register):
3458 (cris_breakpoint_at): Change prototype to take a regcache.
3460 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3461 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3462 to take a regcache. Adjust.
3463 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3465 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3466 take a regcache. Adjust.
3467 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3468 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3469 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3470 * linux-mips-low.c (mips_get_pc):
3471 (mips_set_pc): Change prototype to take a regcache. Adjust.
3472 (mips_reinsert_addr): Adjust.
3473 (mips_collect_register): Change prototype to take a regcache.
3475 (mips_supply_register):
3476 (mips_collect_register_32bit, mips_supply_register_32bit)
3477 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3478 (mips_store_fpregset): Ditto.
3479 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3481 (parse_spufs_run): Adjust.
3482 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3483 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3484 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3485 take a regcache. Adjust.
3486 * linux-s390-low.c (s390_collect_ptrace_register)
3487 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3488 (s390_set_pc): Change prototype to take a regcache. Adjust.
3489 (s390_arch_setup): Adjust.
3490 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3491 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3492 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3493 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3494 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3496 (sparc_breakpoint_at): Adjust.
3497 * linux-xtensa-low.c (xtensa_fill_gregset):
3498 (xtensa_store_gregset):
3499 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3500 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3501 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3502 prototype to take a regcache. Adjust.
3503 * win32-arm-low.c (arm_fetch_inferior_register)
3504 (arm_store_inferior_register): Change prototype to take a
3506 * win32-i386-low.c (i386_fetch_inferior_register)
3507 (i386_store_inferior_register): Change prototype to take a
3509 * win32-low.c (child_fetch_inferior_registers)
3510 (child_store_inferior_registers): Change prototype to take a
3512 (win32_wait): Adjust.
3513 (win32_fetch_inferior_registers): Change prototype to take a
3515 (win32_store_inferior_registers): Adjust.
3516 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3517 store_inferior_register>: Change prototype to take a regcache.
3519 2010-01-20 Doug Evans <dje@google.com>
3521 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3523 (linux_wait_for_event1, linux_init_signals): Ditto.
3524 (W_STOPCODE): Provide definition if missing.
3526 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3528 * linux-low.c (linux_core_of_thread): New.
3529 (compare_ints, show_process, list_threads): New.
3530 (linux_qxfer_osdata): Report threads and cores.
3531 (linux_target_op): Register linux_core_of_thread.
3532 * remote-utils.c (prepare_resume_reply): Report the core.
3533 (buffer_xml_printf): Support %d specifier.
3534 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3536 (handle_query): Handle qXfer:threads. Announce availability
3538 * target.h (struct target_ops): New field core_of_thread.
3540 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3542 * Makefile.in (clean): Remove new generated files.
3543 (reg-s390.o, reg-s390.c): Remove rules.
3544 (reg-s390x.o, reg-s390x.c): Likewise.
3545 (s390-linux32.o, s390-linux32.c): Add rules.
3546 (s390-linux64.o, s390-linux64.c): Likewise.
3547 (s390x-linux64.o, s390x-linux64.c): Likewise.
3548 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3549 * linux-s390-low.c: Include <elf.h>.
3550 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3551 (init_registers_s390): Remove prototype.
3552 (init_registers_s390x): Likewise.
3553 (init_registers_s390_linux32): Add prototype.
3554 (init_registers_s390_linux64): Likewise.
3555 (init_registers_s390x_linux64): Likewise.
3556 (s390_num_regs_3264): New define.
3557 (s390_regmap_3264): New global variable.
3558 (s390_cannot_fetch_register): Remove obsolete check.
3559 (s390_cannot_store_register): Likewise.
3560 (s390_collect_ptrace_register): Handle upper/lower register halves.
3561 (s390_supply_ptrace_register): Likewise.
3562 (s390_fill_gregset): Update to register number changes.
3563 (s390_get_hwcap): New routine.
3564 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3565 Install appropriate regmap and register set.
3567 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3569 * server.c (gdbserver_version): Update copyright year to 2010.
3570 * gdbreplay.c (gdbreplay_version): Likewise.
3572 2009-12-28 Doug Evans <dje@google.com>
3574 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3575 elf/external.h. Include <elf.h> instead but only if necessary.
3577 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3579 * linux-low.c (linux_remove_process): Remove `detaching'
3580 parameter. Don't release/detach from thread_db here.
3581 (linux_kill): Release/detach from thread_db here, ...
3582 (linux_detach): ... and here, before actually detaching.
3583 (linux_wait_1): ... and here, when a process exits.
3584 * thread-db.c (any_thread_of): New.
3585 (thread_db_free): Switch the current inferior to a thread of the
3588 2009-12-21 Doug Evans <dje@google.com>
3590 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3592 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3593 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3594 warning ifndef __NR_tkill. Move setting of errno there too.
3595 Delete unnecessary resetting of errno after syscall.
3596 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3598 * configure.ac: Check for dladdr.
3599 * config.in: Regenerate.
3600 * configure: Regenerate.
3601 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3602 (try_thread_db_load): Update.
3604 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3606 2009-12-18 Doug Evans <dje@google.com>
3608 * event-loop.c: Include unistd.h if it exists.
3610 * linux-low.c (my_waitpid): Move definition away from being in
3611 between linux_tracefork_child/linux_test_for_tracefork.
3613 * gdb_proc_service.h (psaddr_t): Fix type.
3614 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3615 signature to match glibc.
3617 2009-12-16 Doug Evans <dje@google.com>
3619 * linux-low.c (linux_read_memory): Fix argument to read.
3621 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3623 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3624 events, don't leave current_inferior pointing at null.
3626 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3628 * win32-low.c (LOG): Delete.
3629 (OUTMSG): Output to stderr.
3630 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3631 on compile time LOG macro.
3632 (win32_wait): Fix debug output.
3634 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3636 * win32-low.c (win32_add_one_solib): If the dll name is
3637 "ntdll.dll", prepend the system directory to the dll path.
3639 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3641 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3643 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3644 Vladimir Prus <vladimir@codesourcery.com>
3646 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3647 * configure.ac: Check for __mcoldfire__ and set
3648 gdb_cv_m68k_is_coldfire.
3649 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3650 reg-cf.o and reg-m68k.o.
3651 * configure: Regenerated.
3653 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3655 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3656 Pass it to thread_db_free.
3657 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3658 proper `detaching' argument to linux_remove_process.
3659 * linux-low.h (thread_db_free): Add `detaching' parameter.
3660 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3662 (thread_db_free): Add `detaching' parameter. Only
3663 call td_ta_clear_event if detaching from process.
3665 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3667 * thread-db.c (thread_db_free): Fix typo.
3669 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3672 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3674 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3676 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3677 with an i686 compiler.
3678 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3680 * configure: Rebuilt.
3682 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3686 * server.c (handle_search_memory_1): Correct read_addr initialization
3687 in loop for searching subsequent chunks.
3689 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3691 * configure.ac: New --with-libthread-db option.
3692 * thread-db.c: Allow direct dependence on libthread_db.
3693 (thread_db_free): Adjust.
3694 * config.in: Regenerate.
3695 * configure: Likewise.
3697 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3700 * thread-db.c (attach_thread): New function.
3701 (maybe_attach_thread): Return success/failure.
3702 (find_new_threads_callback): Adjust.
3703 (thread_db_find_new_threads): Loop until no new threads.
3705 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3707 * proc-service.c (ps_lgetregs): Formatting.
3709 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3711 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3712 * configure.ac: Adjust.
3713 * linux-low.h (struct process_info_private): Move members to struct
3715 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3716 * linux-low.c (linux_remove_process): Adjust.
3717 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3718 * server.c (handle_query): Move code ...
3719 (handle_monitor_command): ... here. New function.
3720 * target.h (struct target_ops): New member.
3721 * thread-db.c (struct thread_db): New.
3722 (libthread_db_search_path): New variable.
3723 (thread_db_create_event, thread_db_enable_reporting)
3724 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3725 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3726 (try_thread_db_load_1, dladdr_to_soname): New functions.
3727 (try_thread_db_load, thread_db_load_search): New functions.
3728 (thread_db_init): Search for libthread_db.
3729 (thread_db_free): New function.
3730 (thread_db_handle_monitor_command): Likewise.
3731 * config.in: Regenerate.
3732 * configure: Regenerate.
3734 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3736 * spu-low.c (spu_kill): Wait for inferior to terminate.
3737 Call clear_inferiors.
3738 (spu_detach): Call clear_inferiors.
3740 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3742 * aclocal.m4: Regenerate.
3743 * config.in: Likewise.
3744 * configure: Likewise.
3746 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3748 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3749 (parse_spufs_run): New function.
3750 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3751 (ppc_breakpoint_at): Handle SPU breakpoints.
3753 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3755 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3756 (SPUFS_MAGIC): Define.
3757 (spu_enumerate_spu_ids): New function.
3758 (linux_qxfer_spu): New function.
3759 (linux_target_ops): Install linux_qxfer_spu.
3761 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3763 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3764 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3765 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3766 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3767 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3768 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3769 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3770 (init_registers_powerpc_cell32l): Add prototype.
3771 (init_registers_powerpc_cell64l): Likewise.
3772 (ppc_arch_setup): Detect Cell/B.E. architecture.
3774 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3776 * Makefile.in (datarootdir): New variable.
3778 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3780 * linux-low.c (linux_write_memory): Update debugging output.
3781 * Makefile.in (clean): Add new descriptions.
3782 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3783 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3784 * configure.srv: Add new files for arm*-*-linux*.
3785 * linux-arm-low.c: Add new declarations.
3786 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3787 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3788 (HWCAP_VFPv3D16): New.
3789 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3790 instead of __IWMMXT__.
3791 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3792 (arm_arch_setup): New.
3793 (target_regsets): Remove #ifdef. Add VFP regset.
3794 (the_low_target): Use arm_arch_setup.
3796 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3798 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3799 the main thread again.
3801 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3803 Adding Neutrino gdbserver.
3804 * configure: Regenerated.
3805 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3806 * configure.srv (i[34567]86-*-nto*): New target.
3807 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3808 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3809 (nto_comctrl) [__QNX__]: New function.
3810 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3812 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3814 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3817 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3818 Pedro Alves <pedro@codesourcery.com>
3820 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3821 don't support CONTEXT_EXTENDED_REGISTERS.
3822 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3823 (the_low_target): Install them.
3824 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3825 failing with ERROR_PIPE_NOT_CONNECTED.
3827 2009-06-30 Doug Evans <dje@google.com>
3828 Pierre Muller <muller@ics.u-strasbg.fr>
3830 Add h/w watchpoint support to x86-linux, win32-i386.
3831 * Makefile.in (SFILES): Add i386-low.c
3832 (i386_low_h): Define.
3833 (i386-low.o): Add dependencies.
3834 (linux-x86-low.o): Add i386-low.h dependency.
3835 (win32-i386-low.o): Ditto.
3836 * i386-low.c: New file.
3837 * i386-low.h: New file.
3838 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3839 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3840 * linux-low.c (linux_add_process): Initialize arch_private.
3841 (linux_remove_process): Free arch_private.
3842 (add_lwp): Initialize arch_private.
3843 (delete_lwp): Free arch_private.
3844 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3846 * linux-low.h (process_info_private): New member arch_private.
3847 (lwp_info): New member arch_private.
3848 (linux_target_ops): New members new_process, new_thread,
3850 (ptid_of): New macro.
3851 * linux-x86-low.c: Include stddef.h, i386-low.h.
3852 (arch_process_info): New struct.
3853 (arch_lwp_info): New struct.
3854 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3855 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3856 (i386_dr_low_get_status): New function.
3857 (x86_insert_point, x86_remove_point): New functions.
3858 (x86_stopped_by_watchpoint): New function.
3859 (x86_stopped_data_address): New function.
3860 (x86_linux_new_process, x86_linux_new_thread): New functions.
3861 (x86_linux_prepare_to_resume): New function.
3862 (the_low_target): Add entries for insert_point, remove_point,
3863 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3865 * server.c (debug_hw_points): New global.
3866 (monitor_show_help): Document set debug-hw-points.
3867 (handle_query): Process "set debug-hw-points".
3868 * server.h (debug_hw_points): Declare.
3869 (paddress): Declare.
3870 * utils.c (NUMCELLS, CELLSIZE): New macros.
3871 (get_sell, xsnprintf, paddress): New functions.
3872 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3873 remove_point, stopped_by_watchpoint, stopped_data_address.
3874 * win32-i386-low.c: Include i386-low.h.
3875 (debug_reg_state): Replaces dr.
3876 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3877 (i386_dr_low_get_status): New function.
3878 (i386_insert_point, i386_remove_point): New functions.
3879 (i386_stopped_by_watchpoint): New function.
3880 (i386_stopped_data_address): New function.
3881 (i386_initial_stuff): Update.
3882 (get_thread_context,set_thread_context,i386_thread_added): Update.
3883 (the_low_target): Add entries for insert_point,
3884 remove_point, stopped_by_watchpoint, stopped_data_address.
3885 * win32-low.c (win32_insert_watchpoint): New function.
3886 (win32_remove_watchpoint): New function.
3887 (win32_stopped_by_watchpoint): New function.
3888 (win32_stopped_data_address): New function.
3889 (win32_target_ops): Add entries for insert_watchpoint,
3890 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3891 * win32-low.h (win32_target_ops): New members insert_point,
3892 remove_point, stopped_by_watchpoint, stopped_data_address.
3894 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3896 * server.c (process_serial_event): Re-return unsupported, not
3897 error, if the type isn't recognized. Re-allow supporting only
3898 insert or remove packets. Also call require_running for
3899 breakpoints. Add missing break statement to default case. Tidy.
3900 * target.h (struct target_ops): Rename insert_watchpoint to
3901 insert_point, and remove_watchpoint to remove_point.
3903 * linux-low.h (struct linux_target_ops): Likewise.
3904 * linux-low.c (linux_insert_watchpoint): Rename to ...
3905 (linux_insert_point): ... this. Adjust.
3906 (linux_remove_watchpoint): Rename to ...
3907 (linux_remove_point): ... this. Adjust.
3908 (linux_target_ops): Adjust.
3909 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3910 (cris_insert_point): ... this.
3911 (cris_remove_watchpoint): Rename to ...
3912 (cris_remove_point): ... this.
3913 (the_low_target): Adjust.
3915 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3917 * server.c (handle_v_kill): Pass signal_pid to
3918 kill_inferior if multi_process is zero.
3920 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3922 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3923 * target.h (target_ops): Comment for *_watchpoint to make it clear
3924 the functions can get types '0' and '1'.
3926 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3928 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3929 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3930 * regcache.c (get_regcache): Likewise.
3931 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3932 * win32-low.c (child_fetch_inferior_registers): Remove check for
3935 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3936 Pedro Alves <pedro@codesourcery.com>
3938 * target.h (struct target_ops) <supports_multi_process>: New
3940 (target_supports_multi_process): New.
3941 * server.c (handle_query): Even if GDB reports support, only
3942 enable multi-process if the target also supports it. Report
3943 multi-process support only if the target backend supports it.
3944 * linux-low.c (linux_supports_multi_process): New function.
3945 (linux_target_ops): Install it as target_supports_multi_process
3948 2009-05-24 Doug Evans <dje@google.com>
3950 Global renaming of find_thread_pid to find_thread_ptid.
3951 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3952 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3953 All callers updated.
3955 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3956 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3959 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3960 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3961 (linux_resume_one_lwp): Ditto.
3963 2009-05-23 Doug Evans <dje@google.com>
3965 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3966 from struct inferior_list_entry * to struct lwp_info *.
3967 All callers updated.
3969 2009-05-13 Doug Evans <dje@google.com>
3971 * linux-x86-low.c: Don't include assert.h.
3972 (x86_siginfo_fixup): Use fatal, not assert.
3973 (x86_arch_setup): Fix comment.
3975 2009-05-12 Doug Evans <dje@google.com>
3977 Biarch support for i386/amd64 gdbserver.
3978 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3979 Add linux-x86-low.c.
3980 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3981 (linux-x86-low.o): Add.
3982 * linux-x86-64-low.c: Delete.
3983 * linux-i386-low.c: Delete.
3984 * linux-x86-low.c: New file.
3985 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3987 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3989 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3990 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3991 (linux_child_pid_to_exec_file): New function.
3992 (elf_64_header_p, elf_64_file_p): New functions.
3993 (siginfo_fixup): New function.
3994 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3995 give target a chance to convert layout.
3996 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3997 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3999 2009-05-07 Doug Evans <dje@google.com>
4001 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4002 (regsets_store_inferior_registers): Ditto.
4004 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4008 * linux-low.c (must_set_ptrace_flags): Delete.
4009 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4011 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4012 `lwp->must_set_ptrace_flags' instead.
4013 (linux_wait_for_event_1): Set ptrace options here.
4014 (linux_wait_1): ... not here.
4016 2009-04-30 Doug Evans <dje@google.com>
4018 * inferiors.c (started_inferior_callback): New function.
4019 (attached_inferior_callback): New function.
4020 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4021 * server.c (print_started_pid, print_attached_pid): New functions.
4022 (detach_or_kill_for_exit): New function.
4023 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4024 * server.h (have_started_inferiors_p): Declare.
4025 (have_attached_inferiors_p): Declare.
4027 * inferiors.c (remove_process): Fix memory leak, free process.
4028 * linux-low.c (linux_remove_process): New function.
4029 (linux_kill): Call it instead of remove_process.
4030 (linux_detach, linux_wait_1): Ditto.
4032 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4034 * configure.srv: Add x86 Windows CE target.
4036 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4038 * inferiors.c (get_thread_process): Make global.
4039 * server.h (get_thread_process): Add prototype.
4040 * thread-db.c (find_one_thread): Use get_thread_process
4041 instead of current_process.
4042 (thread_db_get_tls_address): Do not crash if called when
4043 thread layer is not yet initialized.
4045 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4047 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4048 * spu-low.c (current_tid): Rename to ...
4049 (current_ptid): ... this.
4050 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4051 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4052 ptid_get_lwp (current_ptid) instead of current_tid.
4053 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4054 instead of current_tid. Use find_process_pid to verify pid
4055 argument is valid. Pass proper argument to remove_process.
4056 (spu_thread_alive): Compare current_ptid instead of current_tid.
4057 (spu_resume): Likewise.
4059 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4061 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4064 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4066 Implement the multiprocess extensions, and add linux multiprocess
4069 * server.h (ULONGEST): Declare.
4070 (struct ptid, ptid_t): New.
4071 (minus_one_ptid, null_ptid): Declare.
4072 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4073 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4074 (struct inferior_list_entry): Change `id' type from unsigned from
4076 (struct sym_cache, struct breakpoint, struct
4077 process_info_private): Forward declare.
4078 (struct process_info): Declare.
4079 (current_process): Declare.
4080 (all_processes): Declare.
4081 (initialize_inferiors): Declare.
4082 (add_thread): Adjust to use ptid_t.
4083 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4084 (add_process, remove_process, find_thread_pid): Declare.
4085 (find_inferior_id): Adjust to use ptid_t.
4086 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4087 (multi_process): Declare.
4088 (push_event): Adjust to use ptid_t.
4089 (read_ptid, write_ptid): Declare.
4090 (prepare_resume_reply): Adjust to use ptid_t.
4091 (clear_symbol_cache): Declare.
4092 * inferiors.c (all_processes): New.
4093 (null_ptid, minus_one_ptid): New.
4094 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4095 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4096 (add_thread): Change unsigned long to ptid. Remove gdb_id
4098 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4099 (gdb_id_to_thread): Rename to ...
4100 (find_thread_pid): ... this. Change unsigned long to ptid.
4101 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4102 (loaded_dll, pull_pid_from_list): Adjust.
4103 (add_process, remove_process, find_process_pid)
4104 (get_thread_process, current_process, initialize_inferiors): New.
4105 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4106 (struct target_waitstatus) <related_pid>: Ditto.
4107 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4109 (struct target_ops) <join>: Add `pid' argument.
4110 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4111 (struct target_ops) <wait>: Add `ptid' field. Change return type
4113 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4114 (mywait): Add `ptid' argument. Change return type to ptid_t.
4115 (target_pid_to_str): Declare.
4116 * target.c (set_desired_inferior): Adjust to use ptids.
4117 (mywait): Add new `ptid' argument. Adjust.
4118 (target_pid_to_str): New.
4119 * mem-break.h (free_all_breakpoints): Declare.
4120 * mem-break.c (breakpoints): Delelete.
4121 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4122 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4123 to use per-process breakpoint list.
4124 (free_all_breakpoints): New.
4125 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4126 (symbol_cache, all_symbols_looked_up): Delete.
4128 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4130 (prepare_resume_reply): Change ptid argument's type from unsigned
4131 long to ptid_t. Adjust. Implement W;process and X;process.
4132 (free_sym_cache, clear_symbol_cache): New.
4133 (look_up_one_symbol): Adjust to per-process symbol cache. *
4134 * server.c (cont_thread, general_thread, step_thread): Change type
4137 (multi_process): New.
4138 (last_ptid): Change type to ptid_t.
4139 (struct vstop_notif) <ptid>: Change type to ptid_t.
4140 (queue_stop_reply, push_event): Change `ptid' argument's type to
4142 (discard_queued_stop_replies): Add `pid' argument.
4143 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4144 changes. Don't reference the `attached' global.
4145 (attach_inferior): Adjust to mywait interface changes.
4146 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4147 features. Handle and report "multiprocess+". Handle
4149 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4151 (handle_v_kill): New.
4152 (handle_v_stopped): Adjust to use target_pid_to_str.
4153 (handle_v_requests): Allow multiple attaches and runs when
4154 multiprocess extensions are in effect. Handle "vKill".
4155 (myresume): Adjust to use ptids.
4156 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4157 (handle_status): Adjust to discard_queued_stop_replies interface
4159 (first_thread_of, kill_inferior_callback)
4160 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4161 (main): Call initialize_inferiors. Adjust to use ptids, killing
4162 and detaching from all inferiors. Handle multiprocess packet
4164 * linux-low.h: Include gdb_proc_service.h.
4165 (struct process_info_private): New.
4166 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4167 <lwpid_of>: Use ptid_get_lwp.
4168 (get_lwp_thread): Adjust.
4169 (struct lwp_info): Add `dead' member.
4170 (find_lwp_pid): Declare.
4171 * linux-low.c (thread_db_active): Delete.
4172 (new_inferior): Adjust comment.
4173 (inferior_pid): Delete.
4174 (linux_add_process): New.
4175 (handle_extended_wait): Adjust.
4176 (add_lwp): Change unsigned long to ptid.
4177 (linux_create_inferior): Add process to processes table. Adjust
4178 to use ptids. Don't set new_inferior here.
4179 (linux_attach_lwp): Rename to ...
4180 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4181 it. Adjust to use ptids.
4182 (linux_attach_lwp): New.
4183 (linux_attach): Add process to processes table. Don't set
4185 (struct counter): New.
4186 (second_thread_of_pid_p, last_thread_of_process_p): New.
4187 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4189 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4190 processes. Remove process from process table.
4191 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4192 to multiple processes.
4193 (any_thread_of): New.
4194 (linux_detach): Add `pid' argument, and handle it. Remove process
4195 from processes table.
4196 (linux_join): Add `pid' argument. Handle it.
4197 (linux_thread_alive): Change unsighed long argument to ptid_t.
4198 Consider dead lwps as not being alive.
4199 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4200 threads we're not interested in.
4201 (same_lwp, find_lwp_pid): New.
4202 (linux_wait_for_lwp): Change `pid' argument's type from int to
4204 (linux_wait_for_event): Rename to ...
4205 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4206 from int to ptid_t. Adjust.
4207 (linux_wait_for_event): New.
4208 (linux_wait_1): Add `ptid' argument. Change return type to
4209 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4210 that exit from the process table.
4211 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4213 (mark_lwp_dead): New.
4214 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4215 stopping all threads, mark its main lwp as dead.
4216 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4218 (fetch_register, usr_store_inferior_registers)
4219 (regsets_fetch_inferior_registers)
4220 (regsets_store_inferior_registers, linux_read_memory)
4221 (linux_write_memory): Inline `inferior_pid'.
4222 (linux_look_up_symbols): Adjust to use per-process
4224 (linux_request_interrupt): Adjust to use ptids.
4225 (linux_read_auxv): Inline `inferior_pid'.
4226 (initialize_low): Don't reference thread_db_active.
4227 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4228 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4229 (ps_getpid): Return the pid of the current inferior.
4230 * thread-db.c (proc_handle, thread_agent): Delete.
4231 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4233 (find_one_thread): Change argument type to ptid_t. Adjust to
4235 (maybe_attach_thread): Adjust to per-process data and ptids.
4236 (thread_db_find_new_threads): Ditto.
4237 (thread_db_init): Ditto.
4238 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4239 processes table. Adjust to use ptids.
4240 (spu_kill, spu_detach): Adjust interface. Remove process from
4242 (spu_join, spu_thread_alive): Adjust interface.
4243 (spu_wait): Adjust interface. Remove process from processes
4244 table. Adjust to use ptids.
4245 * win32-low.c (current_inferior_tid): Delete.
4246 (current_inferior_ptid): New.
4247 (debug_event_ptid): New.
4248 (thread_rec): Take a ptid. Adjust.
4249 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4250 (child_delete_thread): Ditto.
4251 (do_initial_child_stuff): Add `attached' argument. Add process to
4253 (child_fetch_inferior_registers, child_store_inferior_registers):
4255 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4256 (win32_attach): Pass 1 to do_initial_child_stuff.
4257 (win32_kill): Adjust interface. Remove process from processes
4259 (win32_detach): Ditto.
4260 (win32_join): Adjust interface.
4261 (win32_thread_alive): Take a ptid.
4262 (win32_resume): Adjust to use ptids.
4263 (get_child_debug_event): Ditto.
4264 (win32_wait): Adjust interface. Remove exiting process from
4267 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4269 Non-stop mode support.
4271 * server.h (non_stop): Declare.
4272 (gdb_client_data, handler_func): Declare.
4273 (delete_file_handler, add_file_handler, start_event_loop):
4275 (handle_serial_event, handle_target_event, push_event)
4276 (putpkt_notif): Declare.
4277 * target.h (enum resume_kind): New.
4278 (struct thread_resume): Replace `step' field by `kind' field.
4279 (TARGET_WNOHANG): Define.
4280 (struct target_ops) <wait>: Add `options' argument.
4281 <supports_non_stop, async, start_non_stop>: New fields.
4282 (target_supports_non_stop, target_async): New.
4283 (start_non_stop): Declare.
4284 (mywait): Add `options' argument.
4285 * target.c (mywait): Add `options' argument. Print child exit
4287 (start_non_stop): New.
4288 * server.c (non_stop, own_buf, mem_buf): New globals.
4289 (struct vstop_notif): New.
4290 (notif_queue): New global.
4291 (queue_stop_reply, push_event, discard_queued_stop_replies)
4292 (send_next_stop_reply): New.
4293 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4295 (attach_inferior): In non-stop mode, don't wait for the target
4297 (handle_general_set): Handle QNonStop.
4298 (handle_query): When handling qC, return the current general
4299 thread, instead of the first thread of the list.
4300 (handle_query): If the backend supports non-stop mode, include
4301 QNonStop+ in the qSupported query response.
4302 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4304 (handle_v_attach, handle_v_run): Handle non-stop mode.
4305 (handle_v_stopped): New.
4306 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4307 (myresume): Adjust to use resume_kind. Handle non-stop.
4308 (queue_stop_reply_callback): New.
4309 (handle_status): Handle non-stop mode.
4310 (main): Clear non_stop flag on reconnection. Use the event-loop.
4311 Refactor serial protocol handling from here ...
4312 (process_serial_event): ... to this new function. When GDB
4313 selects any thread, select one here. In non-stop mode, wait until
4314 GDB acks all pending events before exiting.
4315 (handle_serial_event, handle_target_event): New.
4316 * remote-utils.c (remote_open): Install remote_desc in the event
4318 (remote_close): Remove remote_desc from the event loop.
4319 (putpkt_binary): Rename to...
4320 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4321 (putpkt_binary): New as wrapper around putpkt_binary_1.
4322 (putpkt_notif): New.
4323 (prepare_resume_reply): In non-stop mode, don't change the
4325 * event-loop.c: New.
4326 * Makefile.in (OBJ): Add event-loop.o.
4327 (event-loop.o): New rule.
4329 * linux-low.h (pid_of): Moved here.
4331 (get_lwp_thread): Use lwpid_of.
4332 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4333 * linux-low.c (pid_of): Delete.
4334 (inferior_pid): Use lwpid_of.
4335 (linux_event_pipe): New.
4336 (target_is_async_p): New.
4338 (handle_extended_wait): Use lwpid_of.
4339 (add_lwp): Don't set lwpid field.
4340 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4341 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4342 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4343 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4344 first. Adjust to linux_wait_for_event interface changes. Use
4346 (linux_detach): Don't delete the main lwp here.
4347 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4348 (status_pending_p): Don't consider explicitly suspended lwps.
4349 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4350 pointer. Add OPTIONS argument. Change return type to int. Use
4351 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4352 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4353 pointer. Add status pointer argument. Return a pid instead of a
4354 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4355 changes. In non-stop mode, don't switch to a random thread.
4356 (linux_wait): Rename to...
4357 (linux_wait_1): ... this. Add target_options argument, and handle
4358 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4359 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4360 clean exit and signal exit code. Don't stop all threads in
4361 non-stop mode. In all-stop mode, only stop all threads when
4362 reporting a stop to GDB. Handle explicit thread stop requests.
4363 (async_file_flush, async_file_mark): New.
4365 (send_sigstop): Use lwpid_of.
4366 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4367 interface changes. In non-stop mode, don't switch to a random
4369 (linux_resume_one_lwp): Use lwpid_of.
4370 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4371 (linux_resume_one_thread): ... this. Handle resume_stop. In
4372 non-stop mode, don't look for pending flag in all threads.
4373 (resume_status_pending_p): Don't consider explicitly suspended
4375 (my_waitpid): Reimplement. Emulate __WALL.
4376 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4378 (sigchld_handler, linux_supports_non_stop, linux_async)
4379 (linux_start_non_stop): New.
4380 (linux_target_ops): Register linux_supports_non_stop, linux_async
4381 and linux_start_non_stop.
4382 (initialize_low): Install SIGCHLD handler.
4383 * thread-db.c (thread_db_create_event, find_one_thread)
4384 (thread_db_get_tls_address): Use lwpid_of.
4385 * win32-low.c (win32_detach): Adjust to use resume_kind.
4386 (win32_wait): Add `options' argument.
4387 * spu-low.c (spu_resume): Adjust to use resume_kind.
4388 (spu_wait): Add `options' argument.
4390 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4392 Decouple target code from remote protocol.
4394 * target.h (enum target_waitkind): New.
4395 (struct target_waitstatus): New.
4396 (struct target_ops) <wait>: Return an unsigned long. Take a
4397 target_waitstatus pointer instead of a char pointer.
4399 * target.c (mywait): Change prototype to return an unsigned long.
4400 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4401 * server.h (thread_from_wait, old_thread_from_wait): Delete
4403 (prepare_resume_reply): Change prototype to take a
4405 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4406 (last_status, last_ptid): New.
4407 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4408 pid instead of a signal.
4409 (attach_inferior): Remove "status" and "signal" parameters.
4411 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4413 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4414 (handle_v_requests, myresume): Remove "status" and "signal"
4416 (handle_status): New.
4417 (main): Delete local `status'. Adjust.
4418 * remote-utils.c: Include target.h.
4419 (prepare_resume_reply): Change prototype to take a
4420 target_waitstatus. Adjust.
4422 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4424 * spu-low.c (spu_wait): Adjust.
4425 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4427 (win32_wait): Adjust.
4429 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4431 * target.h (struct thread_resume): Delete leave_stopped member.
4432 (struct target_ops): Add a `n' argument to the `resume' callback.
4433 * server.c (start_inferior): Adjust.
4434 (handle_v_cont, myresume): Adjust.
4435 * linux-low.c (check_removed_breakpoint): Adjust to resume
4436 interface change, and to removed leave_stopped field.
4437 (resume_ptr): Delete.
4438 (struct thread_resume_array): New.
4439 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4440 resume interface change.
4441 (linux_continue_one_thread, linux_queue_one_thread)
4442 (resume_status_pending_p): Check if the resume field is NULL
4443 instead of checking the leave_stopped member.
4444 (linux_resume): Adjust to the target resume interface change.
4445 * spu-low.c (spu_resume): Adjust to the target resume interface
4447 * win32-low.c (win32_detach, win32_resume): Ditto.
4449 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4451 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4453 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4455 (linux_continue_one_thread): Only preserve the stepping flag if
4456 there's a pending breakpoint.
4458 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4460 * server.c (main): After the inferior having exited, call
4461 remote_close before exiting gdbserver.
4463 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4465 Fix size of FPSCR in Power 7 processors.
4466 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4467 (PPC_FEATURE_HAS_DFP): New #define.
4468 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4471 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4473 * server.c (handle_query) Whitespace and formatting.
4475 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4477 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4478 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4479 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4480 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4481 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4482 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4483 Makefile.in, configure.ac: Fix whitespace throughout.
4484 * configure: Regenerate.
4486 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4488 * inferiors.c (find_inferior): Make it safe for the callback
4489 function to delete the currently iterated inferior.
4491 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4493 * Makefile.in (linuw_low_h): Move higher.
4494 (thread-db.o): Depend on $(linux_low_h).
4496 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4498 Rename "process" to "lwp" throughout.
4500 * linux-low.c (all_processes): Rename to...
4501 (all_lwps): ... this.
4502 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4503 (add_process): Rename to ...
4504 (add_lwp): ... this. Adjust.
4505 (linux_create_inferior): Adjust.
4506 (linux_attach_lwp): Adjust.
4507 (linux_attach): Adjust.
4508 (linux_kill_one_process): Rename to ...
4509 (linux_kill_one_lwp): ... this. Adjust.
4510 (linux_kill): Adjust.
4511 (linux_detach_one_process): Rename to ...
4512 (linux_detach_one_lwp): ... this. Adjust.
4513 (linux_detach): Adjust.
4514 (check_removed_breakpoint): Adjust.
4515 (status_pending_p): Adjust.
4516 (linux_wait_for_process): Rename to ...
4517 (linux_wait_for_lwp): ... this. Adjust.
4518 (linux_wait_for_event): Adjust.
4519 (send_sigstop): Adjust.
4520 (wait_for_sigstop): Adjust.
4521 (stop_all_processes): Rename to ...
4522 (stop_all_lwps): ... this.
4523 (linux_resume_one_process): Rename to ...
4524 (linux_resume_one_lwp): ... this. Adjust.
4525 (linux_set_resume_request, linux_continue_one_thread)
4526 (linux_queue_one_thread, resume_status_pending_p)
4527 (usr_store_inferior_registers, regsets_store_inferior_registers)
4528 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4530 * linux-low.h (get_process): Rename to ...
4531 (get_lwp): ... this. Adjust.
4532 (get_thread_process): Rename to ...
4533 (get_thread_lwp): ... this. Adjust.
4534 (get_process_thread): Rename to ...
4535 (get_lwp_thread): ... this. Adjust.
4536 (struct process_info): Rename to ...
4537 (struct lwp_info): ... this.
4538 (all_processes): Rename to ...
4539 (all_lwps): ... this.
4540 * proc-service.c (ps_lgetregs): Adjust.
4541 * thread-db.c (thread_db_create_event, find_one_thread)
4542 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4544 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4546 * server.c (handle_query): Handle "qAttached".
4548 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4550 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4551 GPLv3, update license URL.
4553 2009-03-01 Doug Evans <dje@google.com>
4555 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4556 (server_h): Add gdb_signals.h.
4557 (signals.o): Update.
4558 * server.h (target_signal_from_host,target_signal_to_host_p)
4559 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4561 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4563 * remote-utils.c (getpkt): Also generate remote-debug
4564 information if noack_mode is set.
4566 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4568 * server.c (handle_query): Report qXfer:siginfo:read and
4569 qXfer:siginfo:write as supported and handle them.
4570 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4571 * linux-low.c (linux_xfer_siginfo): New.
4572 (linux_target_ops): Set it.
4574 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4576 * server.c (gdbserver_usage): Mention --remote-debug.
4577 (main): Accept '--remote-debug' switch.
4579 2009-01-18 Doug Evans <dje@google.com>
4581 * regcache.c (new_register_cache): No need to check result of xcalloc.
4582 * server.c (handle_search_memory): Back out calls to xmalloc,
4583 result is checked and error is returned to user upon failure.
4584 (handle_query): Ditto. Add more checks for result of malloc.
4585 (handle_v_cont): Check result of malloc, report error back to
4587 (handle_v_run): Ditto. Call freeargv.
4588 * server.h (freeargv): Declare.
4589 * utils.c (freeargv): New fn.
4591 2009-01-15 Doug Evans <dje@google.com>
4593 * gdbreplay.c (perror_with_name): Make arg const char *.
4594 * server.h (target_signal_to_name): Make return type const char *.
4595 * thread-db.c (thread_db_err_str): Make return type const char *.
4596 * utils.c (perror_with_name): Make arg const char *.
4598 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4600 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4601 when handling a EXIT_PROCESS_DEBUG_EVENT.
4603 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4605 * gdbreplay.c (gdbreplay_version): Update copyright year.
4606 * server.c (gdbserver_version): Likewise.
4608 2009-01-05 Doug Evans <dje@google.com>
4610 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4611 (handle_extended_wait): Improve comment.
4613 2008-12-13 Doug Evans <dje@google.com>
4615 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4616 * server.h (ATTR_MALLOC): New macro.
4617 (xmalloc,xcalloc,xstrdup): Declare.
4618 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4619 * inferiors.c: Ditto.
4620 * linux-low.c: Ditto.
4621 * mem-break.c: Ditto.
4622 * regcache.c: Ditto.
4623 * remote-utils.c: Ditto.
4626 * win32-low.c: Ditto.
4628 2008-12-12 Doug Evans <dje@google.com>
4630 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4631 in debugging printf.
4633 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4635 2008-12-09 Doug Evans <dje@google.com>
4637 * linux-low.h (struct process_info): Delete member tid, unused.
4638 * thread-db.c (find_one_thread): Update.
4639 (maybe_attach_thread): Update.
4641 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4643 * target.h (struct target_ops): Add qxfer_osdata member.
4644 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4646 (linux_qxfer_osdata): New functions.
4647 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4649 * server.c (handle_query): Handle "qXfer:osdata:read:".
4650 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4651 (buffer_xml_printf): New functions.
4652 * server.h (struct buffer): New.
4653 (buffer_grow_str, buffer_grow_str0): New macros.
4654 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4655 (buffer_xml_printf): Declare.
4657 2008-11-24 Doug Evans <dje@google.com>
4659 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4661 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4663 * server.c (handle_v_run): Always use the supplied argument list.
4665 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4667 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4668 (xtensa_regmap_table): Add entry for scompare1.
4670 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4672 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4673 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4674 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4675 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4676 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4677 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4678 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4679 XML target descriptions.
4680 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4681 when inferior is running on an ISA 2.05 or later processor. Add
4682 special case to return offset for full 64-bit slot of FPSCR when
4685 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4687 * Makefile.in (SFILES, clean): Added sparc64 files.
4688 (reg-sparc64.o, reg-sparc64.c): New.
4689 * configure.srv (sparc*-*-linux*): New configuration.
4690 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4691 syscall arguments for SPARC.
4692 (regsets_store_inferior_registers): Likewise.
4693 * linux-sparc-low.c: New file.
4695 2008-10-21 Doug Evans <dje@google.com>
4697 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4698 (READLINE_DIR,READLINE_DEP): Delete.
4699 (INTERNAL_CFLAGS): Update.
4700 (LINTFLAGS): Update.
4702 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4704 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4705 whole argv from the last run, not just argv[0].
4707 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4709 * regcache.c (new_register_cache): Return NULL if the register
4710 cache size isn't known yet.
4711 (free_register_cache): Avoid dereferencing a NULL regcache.
4713 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4715 * configure.srv: Merge MIPS and MIPS64.
4717 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4719 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4721 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4723 * Makefile.in: Add required vsx dependencies.
4725 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4726 Declare init_registers_powerpc_vsx32l.
4727 Declare init_registers_powerpc_vsx64l.
4728 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4729 (ppc_arch_setup): Check for VSX in hwcap.
4730 (ppc_fill_vsxregset): New function.
4731 (ppc_store_vsxregset): New function.
4732 Add new VSX entry in regset_info target_regsets.
4734 * configure.srv: Add new VSX dependencies.
4736 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4738 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4739 (remote_open): Set or clear transport_is_reliable.
4740 (putpkt_binary): Don't expect acks in noack mode.
4741 (getpkt): Don't send ack/nac in noack mode.
4742 * server.c (handle_general_set): Handle QStartNoAckMode.
4743 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4745 (main): Reset noack_mode on every connection.
4746 * server.h (noack_mode): Declare.
4748 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4750 * Makefile.in (GDBREPLAY_OBS): New variable.
4751 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4753 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4754 Daniel Jacobowitz <dan@codesourcery.com>
4756 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4757 (usr_store_inferior_registers): Likewise.
4758 (regsets_store_inferior_registers): Likewise.
4760 2008-07-31 Rolf Jansen <rj@surtec.com>
4761 Pedro Alves <pedro@codesourcery.com>
4763 * configure.ac: Check for memmem declaration.
4764 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4765 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4766 (disable_packet_qfThreadInfo): Unconditionally compile.
4767 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4768 * configure, config.in: Regenerate.
4770 2008-07-28 Doug Kwan <dougkwan@google.com>
4772 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4773 (linux_write_memory): Remove declaration of errno.
4775 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4777 * linux-low.c (handle_extended_wait): Do not use "status"
4778 variable uninitialized.
4780 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4782 * server.c (handle_v_attach): Inhibit reporting dll changes.
4784 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4786 * remote-utils.c (prepare_resume_reply): If requested, don't
4787 output "thread:TID" in the T stop reply.
4789 * server.c (disable_packet_vCont, disable_packet_Tthread)
4790 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4791 (handle_query): If requested, disable support for qC, qfThreadInfo
4793 (handle_v_requests): If requested, disable support for vCont.
4794 (gdbserver_show_disableable): New.
4795 (main): Handle --disable-packet and --disable-packet=LIST.
4797 * server.h (disable_packet_vCont, disable_packet_Tthread)
4798 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4800 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4802 * server.c (gdbserver_usage): Mention --version.
4804 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4806 * Makefile.in (gdbreplay.o): New rule.
4808 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4810 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4811 message, not gdbserver.
4813 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4814 Nathan Sidwell <nathan@codesourcery.com>
4815 Joseph Myers <joseph@codesourcery.com>
4817 * acinclude.m4: Include ../../config/acx.m4.
4818 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4819 * configure, config.in: Regenerate.
4820 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4821 * server.c (gdbserver_version): Print PKGVERSION.
4822 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4823 (main): Adjust gdbserver_usage calls.
4824 * gdbreplay.c (version, host_name): Add declarations.
4825 (gdbreplay_version, gdbreplay_usage): New.
4826 (main): Accept --version and --help options.
4828 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4830 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4831 (arm_breakpoint_at): Handle Thumb.
4832 (the_low_target): Add comment.
4834 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4836 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4838 2008-05-09 Doug Evans <dje@google.com>
4840 * server.h (decode_search_memory_packet): Declare.
4841 * remote-utils.c (decode_search_memory_packet): New fn.
4842 * server.c (handle_search_memory_1): New fn.
4843 (handle_search_memory): New fn.
4844 (handle_query): Process qSearch:memory packets.
4846 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4848 * regcache.c (registers_length): Remove.
4849 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4850 full register packet.
4851 * regcache.h (registers_length): Remove prototype.
4852 * server.h (PBUFSIZ): Define to 16384.
4854 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4856 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4857 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4858 powerpc-64l.o, and powerpc-altivec64l.o.
4859 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4860 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4861 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4862 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4863 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4866 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4867 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4868 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4869 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4870 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4871 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4872 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4873 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4874 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4875 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4878 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4879 (init_registers_powerpc_32l): ... this new prototype.
4880 (init_registers_powerpc_32): Remove, replace by ...
4881 (init_registers_powerpc_altivec32l): ... this new prototype.
4882 (init_registers_powerpc_e500): Remove, replace by ...
4883 (init_registers_powerpc_e500l): ... this new prototype.
4884 (init_registers_ppc64): Remove, replace by ...
4885 (init_registers_powerpc_64l): ... this new prototype.
4886 (init_registers_powerpc_64): Remove, replace by ...
4887 (init_registers_powerpc_altivec64l): ... this new prototype.
4888 (ppc_num_regs): Set to 73.
4889 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4890 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4891 (ppc_cannot_store_register): Handle orig_r3 and trap.
4892 (ppc_arch_setup): Update init_registers_... calls.
4893 (ppc_fill_gregset): Handle orig_r3 and trap.
4895 * inferiors.c (clear_inferiors): Reset current_inferior.
4897 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4899 * acinclude.m4: Add override.m4.
4900 * configure: Regenerate.
4902 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4904 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4905 initial call to init_register_ppc64.
4907 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4909 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4910 powerpc*-*-linux* case.
4911 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4913 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4915 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4916 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4918 * linux-ppc-low.c: Include <elf.h>.
4919 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4920 (ppc_hwcap): New global variable.
4921 (ppc_regmap): Remove __SPE__ #ifdef sections.
4922 (ppc_regmap_e500): New global variable.
4923 (ppc_cannot_store_register): Update __SPE__ special case.
4924 (ppc_get_hwcap): New function.
4925 (ppc_arch_setup): Use it to determine whether inferior supports
4926 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4927 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4928 Do not access registers if target does not support AltiVec.
4929 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4930 Do not access registers if target does not support SPE.
4931 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4933 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4935 * linux-low.c (disabled_regsets, num_regsets): New.
4936 (use_regsets_p): Delete.
4937 (linux_wait_for_process): Clear disabled_regsets.
4938 (regsets_fetch_inferior_registers): Check and set it.
4939 (regsets_store_inferior_registers): Likewise.
4940 (linux_fetch_registers, linux_store_registers): Do not use
4942 (initialize_low): Allocate disabled_regsets.
4944 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4946 * Makefile.in (LIBOBJS): New.
4948 (memmem.o): New rule.
4949 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4950 * configure: Regenerated.
4952 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4954 * server.c (handle_query): Never return "unsupported" for
4955 qXfer:features:read queries.
4957 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4959 * server.c (get_features_xml): Fix inverted condition.
4960 (handle_query): Always support qXfer:feature:read.
4962 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4964 * server.c (wrapper_argv): New.
4965 (start_inferior): Handle wrapper_argv. If set, expect an extra
4967 (gdbserver_usage): Document --wrapper.
4968 (main): Parse --wrapper.
4970 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4972 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4973 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4974 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4975 (ppc_set_pc): Likewise.
4976 (ppc_arch_setup): New function.
4977 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4978 of collect_register.
4979 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4981 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4983 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4984 instead of linux-ppc64-low.o.
4985 * linux-ppc64-low.c: Remove file.
4986 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4987 (linux-ppc64-low.o): Remove rule.
4989 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4990 (init_registers_powerpc_64): Likewise.
4991 (ppc_regmap): Conditionally define depending on __powerpc64__.
4992 (ppc_cannot_store_register): Do not special-case "fpscr" when
4993 compiled on __powerpc64__.
4994 (ppc_collect_ptrace_register): New function.
4995 (ppc_supply_ptrace_register): New function.
4996 (ppc_breakpoint): Change type to "unsigned int".
4997 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4998 (the_low_target): Conditionally provide initializers for the
4999 arch_setup member depending on __powerpc64__. Install
5000 collect_ptrace_register and supply_ptrace_register members.
5002 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5004 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5005 * server.c (gdbserver_xmltarget): Define.
5006 (get_features_xml): Use it to replace "target.xml" and arch_string.
5008 * configure.srv: Remove srv_xmltarget. Add XML files that were
5009 mentioned there to srv_xmlfiles instead. Remove conditional tests
5010 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5011 srv_xmlfiles and srv_regobj to include all possible choices.
5012 * configure.ac (srv_xmltarget): Remove.
5013 (srv_xmlfiles): Do not add "target.xml".
5014 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5015 checks for supplementary target information.
5016 * configure: Regenerate.
5017 * Makefile.in (XML_TARGET): Remove.
5018 (target.xml): Remove rule.
5019 (clean): Do not clean up target.xml.
5020 (.PRECIOUS): Do not mention target.xml.
5022 * target.h (struct target_ops): Remove arch_string member.
5023 * linux-low.c (linux_arch_string): Remove.
5024 (linux_target_ops): Remove arch_string initializer.
5025 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5026 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5027 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5028 * spu-low.c (spu_arch_string): Remove.
5029 (spu_target_ops): Remove arch_string initializer.
5030 * win32-low.c (win32_arch_string): Remove.
5031 (win32_target_ops): Remove arch_string initializer.
5032 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5033 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5034 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5036 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5038 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5039 by collect_ptrace_register and supply_ptrace_register hooks.
5040 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5041 instead of checking for the_low_target.left_pad_xfer.
5042 (usr_store_inferior_registers): Use collect_ptrace_register callback
5043 instead of checking for the_low_target.left_pad_xfer.
5045 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5046 (s390_supply_ptrace_register): Likewise.
5047 (s390_fill_gregset): Call s390_collect_ptrace_register.
5048 (the_low_target): Update.
5050 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5051 (ppc_supply_ptrace_register): Likewise.
5052 (the_low_target): Update.
5054 * linux-i386-low.c (the_low_target): Update.
5055 * linux-x86-64-low.c (the_low_target): Update.
5057 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5059 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5060 reg-s390.o and reg-s390x.o.
5062 * linux-low.c (new_inferior): New global variable.
5063 (linux_create_inferior, linux_attach): Set it.
5064 (linux_wait_for_process): Call the_low_target.arch_setup after the
5065 target has stopped for the first time.
5066 (initialize_low): Do not call the_low_target.arch_setup.
5068 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5069 (s390_set_pc): Likewise.
5070 (s390_arch_setup): New function.
5071 (the_low_target): Use s390_arch_setup as arch_setup routine.
5073 * regcache.c (realloc_register_cache): New function.
5074 (set_register_cache): Call it for each existing regcache.
5076 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5078 * server.h (init_registers): Remove prototype.
5080 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5081 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5082 instead of init_registers ().
5083 * linux-arm-low.c (init_registers_arm): Add prototype.
5084 (init_registers_arm_with_iwmmxt): Likewise.
5085 (the_low_target): Add initializer for arch_setup field.
5086 * linux-cris-low.c (init_registers_cris): Add prototype.
5087 (the_low_target): Add initializer for arch_setup field.
5088 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5089 (the_low_target): Add initializer for arch_setup field.
5090 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5091 (the_low_target): Add initializer for arch_setup field.
5092 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5093 (the_low_target): Add initializer for arch_setup field.
5094 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5095 (the_low_target): Add initializer for arch_setup field.
5096 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5097 (the_low_target): Add initializer for arch_setup field.
5098 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5099 (init_registers_mips64_linux): Likewise.
5100 (the_low_target): Add initializer for arch_setup field.
5101 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5102 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5103 (the_low_target): Add initializer for arch_setup field.
5104 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5105 (init_registers_powerpc_64): Likewise.
5106 (the_low_target): Add initializer for arch_setup field.
5107 * linux-s390-low.c (init_registers_s390): Add prototype.
5108 (init_registers_s390x): Likewise.
5109 (the_low_target): Add initializer for arch_setup field.
5110 * linux-sh-low.c (init_registers_sh): Add prototype.
5111 (the_low_target): Add initializer for arch_setup field.
5112 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5113 (the_low_target): Add initializer for arch_setup field.
5114 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5115 (the_low_target): Add initializer for arch_setup field.
5117 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5118 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5119 instead of init_registers ().
5120 * win32-arm-low.c (init_registers_arm): Add prototype.
5121 (the_low_target): Add initializer for arch_setup field.
5122 * win32-i386-low.c (init_registers_i386): Add prototype.
5123 (the_low_target): Add initializer for arch_setup field.
5125 * spu-low.c (init_registers_spu): Add prototype.
5126 (initialize_low): Call initialie_registers_spu () instead of
5127 initialize_registers ().
5129 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5131 * server.c (handle_v_requests): When handling the vRun and vAttach
5132 packets, if already debugging a process, don't kill it. Return an
5135 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5137 * server.c (handle_query): Correct length check.
5139 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5141 * win32-low.c (do_initial_child_stuff): Add process handle
5142 parameter. Set current_process_handle and current_process_id from the
5143 parameters. Clear globals.
5144 (win32_create_inferior): Don't set current_process_handle and
5145 current_process_id here. Instead pass them on the call to
5146 do_initial_child_stuff.
5147 (win32_attach): Likewise.
5148 (win32_clear_inferiors): New.
5149 (win32_kill): Don't close the current process handle or the
5150 current thread handle here. Instead call win32_clear_inferiors.
5151 (win32_detach): Don't open a new handle to the process. Call
5152 win32_clear_inferiors.
5153 (win32_join): Don't rely on current_process_handle; open a new
5154 handle using the process id.
5155 (win32_wait): Call win32_clear_inferiors when the inferior process
5158 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5160 * server.c (monitor_show_help): Add "exit".
5162 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5164 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5165 (clean): Add reg-xtensa.c.
5166 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5167 * configure.srv (xtensa*-*-linux*) New target.
5168 * linux-xtensa-low.c: New.
5169 * xtensa-xtregs.c: New.
5171 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5173 * hostio.c: Don't include errno.h.
5174 (errno_to_fileio_errno): Move to hostio-errno.
5175 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5176 error number outputting to the target->hostio_last_error callback.
5177 (hostio_packet_error): Use FILEIO_EINVAL directly.
5178 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5179 calls to hostio_error.
5180 * hostio-errno.c: New.
5181 * server.h (hostio_last_error_from_errno): Declare.
5182 * target.h (target_ops): Add hostio_last_error member.
5183 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5184 as hostio_last_error handler.
5185 * spu-low.c (spu_target_ops): Likewise.
5186 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5187 (wince_hostio_last_error): New functions.
5188 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5189 as hostio_last_error handler.
5190 (win32_target_ops) [!_WIN32_WCE]: Register
5191 hostio_last_error_from_errno as hostio_last_error handler.
5192 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5193 (hostio-errno.o): New rule.
5194 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5195 * configure.srv (srv_hostio_err_objs): New variable. Default to
5197 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5198 * configure: Regenerate.
5200 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5202 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5203 (linux_kill, linux_detach): Clean up the process list.
5204 * remote-utils.c (remote_open): Improve port number parsing.
5205 (putpkt_binary, input_interrupt): Only send interrupts if the target
5207 * server.c (extended_protocol): Make static.
5208 (attached): Define earlier.
5209 (exit_requested, response_needed, program_argv): New variables.
5210 (target_running): New.
5211 (start_inferior): Clear attached here.
5212 (attach_inferior): Set attached here.
5213 (require_running): Define.
5214 (handle_query): Use require_running and target_running. Implement
5216 (handle_v_attach, handle_v_run): New.
5217 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5218 (gdbserver_usage): Update.
5219 (main): Redo argument parsing. Handle --debug and --multi. Handle
5220 --attach along with other options or after the port. Save
5221 program_argv. Support no initial program. Resynchronize
5222 communication with GDB after an error. Handle "monitor exit".
5223 Use require_running and target_running. Always allow the extended
5224 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5225 restart in extended mode.
5226 * README: Refer to the GDB manual. Update --attach usage.
5228 2007-12-20 Andreas Schwab <schwab@suse.de>
5230 * linux-low.c (STACK_SIZE): Define.
5231 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5232 (linux_test_for_tracefork): Likewise.
5234 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5236 * linux-low.c (linux_wait_for_event): Update messages. Do not
5237 reinsert auto-delete breakpoints.
5238 * mem-break.c (struct breakpoint): Change return type of handler to
5240 (set_breakpoint_at): Update handler type.
5241 (reinsert_breakpoint_handler): Return 1 instead of calling
5243 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5245 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5246 * mem-break.h (set_breakpoint_at): Update handler type.
5247 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5248 * win32-low.c (auto_delete_breakpoint): New.
5249 (get_child_debug_event): Use it.
5251 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5253 * configure.ac: Check for pread and pwrite.
5254 * hostio.c (handle_pread): Fall back to lseek and read.
5255 (handle_pwrite): Fall back to lseek and write.
5256 * config.in, configure: Regenerated.
5258 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5260 * server.c (myresume): Add own_buf argument.
5261 (main): Update calls.
5263 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5265 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5266 * remote-utils.c (remote_open): Do not call disable_async_io.
5267 (block_async_io): Delete.
5268 (unblock_async_io): Make static.
5269 (initialize_async_io): New.
5270 * server.c (handle_v_cont): Handle async I/O here.
5271 (myresume): Likewise. Move other common resume tasks here...
5272 (main): ... from here. Call initialize_async_io. Disable async
5273 I/O before the main loop.
5274 * server.h (initialize_async_io): Declare.
5275 (block_async_io, unblock_async_io): Delete prototypes.
5276 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5278 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5280 * remote-utils.c (readchar): Allow binary data in received messages.
5282 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5284 * win32-low.c (attaching): New global.
5285 (win32_create_inferior): Clear the `attaching' global.
5286 (win32_attach): Set the `attaching' global.
5287 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5288 attaching. Only set a breakpoint at the entry point if not
5291 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5293 * server.c (main): Don't report dll events on the initial
5294 connection on attaches.
5296 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5298 * server.c (main): Relax numerical bases supported for the pid of
5299 the --attach command line argument.
5301 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5303 * win32-low.c (win32_attach): Call OpenProcess before
5304 DebugActiveProcess, not after. Add last error output to error
5307 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5309 * win32-low.c (win32_get_thread_context)
5310 (win32_set_thread_context): New functions.
5311 (thread_rec): Use win32_get_thread_context.
5312 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5313 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5316 2007-12-03 Leo Zayas
5317 Pedro Alves <pedro_alves@portugalmail.pt>
5319 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5321 (child_add_thread): Minor cleanup.
5322 (child_continue): Resume artificially suspended threads before
5323 calling ContinueDebugEvent.
5324 (suspend_one_thread): New.
5325 (fake_breakpoint_event): New.
5326 (get_child_debug_event): Change return type to int. Check here if
5327 gdb sent an interrupt request. If a soft interrupt was requested,
5328 fake a breakpoint event. Return 0 if there is no event to handle,
5330 (win32_wait): Don't check here if gdb sent an interrupt request.
5331 Ensure there is a valid event to handle.
5332 (win32_request_interrupt): Add soft interruption method as last
5335 2007-12-03 Leo Zayas
5336 Pedro Alves <pedro_alves@portugalmail.pt>
5338 * win32-low.h (win32_thread_info): Add descriptions to the
5339 structure members. Replace `suspend_count' counter by a
5341 * win32-low.c (thread_rec): Update condition of when to get the
5342 context from the inferior. Rely on ContextFlags being set if it
5343 has already been retrieved. Only suspend the inferior thread if
5344 we haven't already. Warn if that fails.
5345 (continue_one_thread): s/suspend_count/suspended/. Only call
5346 ResumeThread once. Warn if that fails.
5348 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5350 * win32-low.c (win32_wait): Don't read from the inferior when it
5353 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5355 * Makefile.in (win32_low_h): New variable.
5356 (win32-low.o): Add dependency on $(win32_low_h).
5357 (win32-arm-low.o, win32-i386-low.o): New rules.
5359 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5361 * hostio.c: Correct copyright year.
5363 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5365 * Makefile.in (OBS): Add hostio.o.
5366 (hostio.o): New rule.
5367 * server.h (handle_vFile): Declare.
5368 * hostio.c: New file.
5369 * server.c (handle_v_requests): Take packet_len and new_packet_len
5370 for binary packets. Call handle_vFile.
5371 (main): Update call to handle_v_requests.
5373 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5375 * linux-low.c: Include <sched.h>.
5377 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5379 * linux-low.c (linux_tracefork_grandchild): New.
5380 (linux_tracefork_child): Use clone.
5381 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5383 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5385 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5387 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5389 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5391 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5393 * inferiors.c (change_inferior_id): Delete.
5394 (add_pid_to_list, pull_pid_from_list): New.
5395 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5396 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5397 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5398 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5399 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5400 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5401 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5402 (using_threads): Always set to 1.
5403 (handle_extended_wait): New.
5404 (add_process): Do not set TID.
5405 (linux_create_inferior): Set must_set_ptrace_flags.
5406 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5407 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5408 (linux_thread_alive): Rename TID argument to LWPID.
5409 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5410 (linux_wait_for_event): Do not use TID or check using_threads. Update
5411 call to dead_thread_notify. Call handle_extended_wait.
5412 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5413 (send_sigstop): Delete sigstop_sent.
5414 (wait_for_sigstop): Avoid TID.
5415 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5416 (linux_test_for_tracefork): New.
5417 (linux_lookup_signals): Use thread_db_active and
5418 linux_supports_tracefork_flag.
5419 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5420 * linux-low.h (get_process_thread): Avoid TID.
5421 (struct process_ifo): Move thread_known and tid to the end. Remove
5423 (linux_attach_lwp, thread_db_init): Update prototypes.
5424 * server.h (change_inferior_id): Delete prototype.
5425 (add_pid_to_list, pull_pid_from_list): New prototypes.
5426 * thread-db.c (thread_db_use_events): New.
5427 (find_first_thread): Rename to...
5428 (find_one_thread): ...this. Update callers and messages. Do not
5429 call fatal. Check thread_db_use_events. Do not call
5430 change_inferior_id or new_thread_notify.
5431 (maybe_attach_thread): Update. Do not call new_thread_notify.
5432 (thread_db_init): Set thread_db_use_events. Check use_events.
5433 * utils.c (fatal, warning): Correct message prefix.
5435 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5437 * Makefile.in (clean): Remove new files.
5438 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5439 (powerpc-64.o, powerpc-64.c): New rules.
5440 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5441 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5443 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5445 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5446 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5447 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5448 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5449 (target_regsets): Add AltiVec and SPE register sets.
5450 * configure.ac: Check for AltiVec and SPE.
5451 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5452 (ppc_fill_vrregset, ppc_store_vrregset): New.
5453 (target_regsets): Add AltiVec register set.
5454 * configure: Regenerated.
5456 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5458 * linux-low.c (O_LARGEFILE): Define.
5459 (linux_read_memory): Use /proc/PID/mem.
5460 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5461 * configure, config.in: Regenerated.
5463 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5465 * linux-low.c (linux_wait_for_event): Do not pass signals while
5468 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5470 * win32-low.c (create_process): New.
5471 (win32_create_inferior): Use create_process instead of
5472 CreateProcess. If create_process failed retry appending an ".exe"
5473 suffix. Store the GetLastError result immediatelly after
5474 create_process calls and use it on the call to error.
5476 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5478 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5480 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5482 * configure.ac: Switch license to GPLv3.
5484 2007-08-01 Michael Snyder <msnyder@access-company.com>
5486 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5488 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5490 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5492 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5493 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5494 CloseToolhelp32Snapshot.
5495 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5496 CloseToolhelp32Snapshot.
5498 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5500 * server.c (main): Check for inferior exit before main loop.
5502 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5504 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5505 instead of on tmp_desc.
5507 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5508 Daniel Jacobowitz <dan@codesourcery.com>
5510 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5511 (add_thread): Minor cleanups.
5512 (clear_inferiors): Move lower in the file. Clear the DLL
5514 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5515 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5516 (xml_escape_text): New.
5517 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5519 (handle_v_cont): Report errors.
5520 (gdbserver_version): Update.
5521 (main): Correct size of own_buf. Do not report initial DLL events.
5522 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5523 (unloaded_dll, xml_escape_text): New.
5524 * win32-low.c (enum target_waitkind): Update comments.
5525 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5526 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5527 (win32_EnumProcessModules, win32_GetModuleInformation)
5528 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5529 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5530 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5531 (win32_Module32First, win32_Module32Next, load_toolhelp)
5532 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5533 (get_child_debug_event): Handle DLL events.
5534 (win32_wait): Likewise.
5536 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5538 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5539 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5541 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5543 * win32-low.c (handle_output_debug_string): Ignore event if not
5546 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5548 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5550 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5552 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5554 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5556 * inferiors.c (change_inferior_id): Add comment.
5557 * linux-low.c (check_removed_breakpoint): Add an early
5558 prototype. Improve debug output.
5559 (linux_attach): Doc update.
5560 (linux_detach_one_process, linux_detach): Clean up before releasing
5562 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5563 * linux-low.h (struct process_info): Doc improvement.
5564 * mem-break.c (delete_all_breakpoints): New.
5565 * mem-break.h (delete_all_breakpoints): New prototype.
5566 * thread-db.c (find_first_thread): New.
5567 (thread_db_create_event): Call it instead of
5568 thread_db_find_new_threads. Clean up unused variables.
5569 (maybe_attach_thread): Remove first thread handling.
5570 (thread_db_find_new_threads): Use find_first_thread.
5571 (thread_db_get_tls_address): Likewise.
5573 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5575 * thread-db.c (thread_db_find_new_threads): Add prototype.
5576 (thread_db_create_event): Check for the main thread before adding
5578 (maybe_attach_thread): Only enable event reporting if TID == 0.
5579 (thread_db_get_tls_address): Check for new threads.
5581 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5583 * linux-low.c (linux_create_inferior): Try execv before execvp.
5584 * spu-low.c (spu_create_inferior): Likewise.
5586 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5588 * linux-low.c (linux_create_inferior): Change execv to execvp.
5589 * spu-low.c (spu_create_inferior): Likewies.
5591 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5593 * Makefile.in (clean): Clean new files instead of deleted ones.
5594 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5595 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5597 * configure.srv: Specify XML files and new regformats for MIPS and
5599 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5600 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5601 an entry for the restart register.
5602 (mips_cannot_fetch_register, mips_cannot_store_register)
5603 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5604 register names to match the XML descriptions.
5605 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5606 restart register instead of $0.
5608 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5609 Markus Deuling <deuling@de.ibm.com>
5611 * remote-utils.c (decode_xfer_write): New function.
5612 * server.h (decode_xfer_write): Add prototype.
5613 * server.c (handle_query): Add PACKET_LEN argument. Support
5614 qXfer:spu:read and qXfer:spu:write packets.
5615 (main): Pass packet_len to handle_query.
5616 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5617 * target.h (target_ops): Add qxfer_spu.
5619 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5621 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5622 accessing non-seekable spufs files.
5624 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5626 * server.c (handle_query): Add reply for qC packet.
5628 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5629 Leo Zayas <lerele@champenstudios@com>
5631 * server.h (check_remote_input_interrupt_request): New function.
5632 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5633 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5634 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5635 (check_remote_input_interrupt_request): New function.
5636 * server.h (check_remote_input_interrupt_request): Declare.
5637 * win32-low.c (winapi_DebugBreakProcess,
5638 winapi_GenerateConsoleCtrlEvent): New typedefs.
5639 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5641 (win32_wait): Check for remote interrupt request
5642 with check_remote_input_interrupt_request.
5643 (win32_request_interrupt): New function.
5644 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5646 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5648 * win32-low.c (debug_registers_changed,
5649 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5650 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5651 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5652 (thread_rec): Get context using the low target.
5653 (child_add_thread): Call thread_added on the low target,
5654 which does the same thing.
5656 (do_initial_child_stuff): Remove debug registers references.
5657 Set context using the low target. Resume threads after
5658 setting the contexts.
5659 (child_continue): Remove dead variable. Remove debug
5660 registers references.
5661 (child_fetch_inferior_registers): Go through the low target.
5662 (do_child_store_inferior_registers): Remove.
5663 (child_store_inferior_registers): Go through the low target.
5664 (win32_resume): Remove debug registers references.
5665 Set context using the low target.
5666 (handle_exception): Change return type to void. Don't record
5667 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5668 first chance exception.
5669 (get_child_debug_event): Change return type to void. Remove
5670 goto loop. Always return after waiting for debug event.
5671 (win32_wait): Convert to switch statement. Handle spurious
5674 * win32-i386-low.c (debug_registers_changed,
5675 debug_registers_used): New.
5676 (initial_stuff): Rename to ...
5677 (i386_initial_stuff): ... this. Clear debug registers
5679 (store_debug_registers): Delete.
5680 (i386_get_thread_context): New.
5681 (load_debug_registers): Delete.
5682 (i386_set_thread_context): New.
5683 (i386_thread_added): New.
5684 (single_step): Rename to ...
5685 (i386_single_step): ... this.
5686 (do_fetch_inferior_registers): Rename to ...
5687 (i386_fetch_inferior_register): ... this.
5688 (i386_store_inferior_register): New.
5689 (the_low_target): Adapt to new interface.
5691 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5692 (arm_get_thread_context): New.
5693 (arm_set_thread_context): New.
5695 (do_fetch_inferior_registers): Rename to ...
5696 (arm_fetch_inferior_register): ... this.
5697 (arm_store_inferior_register): New.
5698 (arm_wince_breakpoint): Reimplement as unsigned long.
5699 (arm_wince_breakpoint_len): Define.
5700 (the_low_target): Adapt to new interface.
5702 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5703 load_debug_registers. Add get_thread_context, set_thread_context,
5704 thread_added and store_inferior_register. Rename
5705 fetch_inferior_registers to fetch_inferior_register.
5706 (regptr): Remove declaration.
5708 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5710 * linux-low.c (linux_detach): Change return type to int. Return 0.
5711 * spu-low.c (spu_detach): Likewise.
5713 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5715 * target.h (target_ops): Change return type of detach to int.
5717 (join_inferior): New.
5718 * server.c (main): Don't skip detach support on mingw32.
5719 If the inferior doesn't support detaching return error.
5720 Call join_inferior instead of using waitpid.
5721 * linux-low.c (linux_join): New.
5722 (linux_target_op): Add linux_join.
5723 * spu-low.c (spu_join): New.
5724 (spu_target_ops): Add spu_join.
5725 * win32-low.c (win32_detach): Adapt to new interface.
5726 Reopen current_process_handle before detaching. Issue a child
5727 resume before detaching.
5729 (win32_target_op): Add win32_join.
5731 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5733 * win32-low.c (win32-attach): Fix return value.
5734 * target.h (target_ops): Describe ATTACH return values.
5736 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5738 * win32-low.c (GETPROCADDRESS): Define.
5739 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5740 (winapi_DebugSetProcessKillOnExit): Likewise.
5741 (win32_create_inferior): Force usage of ansi CreateProcessA.
5742 (win32_attach): Use GETPROCADDRESS.
5743 (win32_detach): Likewise.
5745 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5747 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5749 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5751 * win32-low.c: Commit leftover changes from 2007-03-29.
5753 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5755 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5756 fields short instead of int. Add explicit padding.
5757 (i387_cache_to_fsave): Remove unnecessary casts.
5758 (i387_fsave_to_cache): Doc fix.
5759 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5761 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5763 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5764 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5766 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5768 * configure.srv (arm*-*-mingw32ce*): Move near the other
5771 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5773 * configure.ac: Add errno checking.
5774 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5775 sys/file.h and malloc.h.
5776 (AC_CHECK_DECLS): Add perror.
5777 (srv_mingwce): Handle.
5778 * configure.srv (i[34567]86-*-cygwin*): Add
5779 win32-i386-low.o to srv_tgtobj.
5780 (i[34567]86-*-mingw*): Likewise.
5781 (arm*-*-mingw32ce*): Add case.
5782 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5783 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5784 [__MINGW32CE__] (strerror): New function.
5785 [__MINGW32CE__] (errno): Define to GetLastError.
5786 [__MINGW32CE__] (COUNTOF): New macro.
5787 (remote_open): Remove extra close call.
5788 * mem-break.c (delete_breakpoint_at): New function.
5789 * mem-break.h (delete_breakpoint_at): Declare.
5790 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5791 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5792 [USE_WIN32API] (read, write): Add char* casts.
5793 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5794 * server.h: Include wincecompat.h on Windows CE.
5795 [HAVE_ERRNO_H]: Check.
5796 (perror): Declare if not declared.
5797 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5798 (perror_with_name): Remove errno declaration.
5799 * wincecompat.h: New.
5800 * wincecompat.c: New.
5802 * win32-arm-low.c: New.
5803 * win32-i386-low.c: New.
5804 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5805 (OUTMSG2): Make it safe.
5807 (COUNTOF): New macro.
5808 (NUM_REGS): Get it from the low target.
5809 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5810 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5811 (thread_rec): Let low target handle debug registers.
5812 (child_add_thread): Likewise.
5813 (child_init_thread_list): Likewise.
5814 (continue_one_thread): Likewise.
5816 (do_child_fetch_inferior_registers): Move to ...
5817 * win32-i386-low.c: ... here, and rename to ...
5818 (do_fetch_inferior_registers): ... this.
5819 * win32-low.c (child_fetch_inferior_registers):
5820 Go through the low target.
5821 (do_child_store_inferior_registers): Use regptr.
5822 (strwinerror): New function.
5823 (win32_create_inferior): Handle Windows CE.
5824 Use strwinerror instead of strerror on Windows error
5825 codes. Add program to the error output.
5826 Don't close the main thread handle on Windows CE.
5827 (win32_attach): Use coredll.dll on Windows CE.
5828 (win32_kill): Close current process and current
5830 (win32_detach): Use coredll.dll on Windows CE.
5831 (win32_resume): Let low target handle debug registers, and
5833 (handle_exception): Add/Remove initial breakpoint. Avoid
5834 non-existant WSTOPSIG on Windows CE.
5835 (win32_read_inferior_memory): Cast to remove warning.
5836 (win32_arch_string): Go through the low target.
5837 (initialize_low): Call set_breakpoint_data with the low
5838 target's breakpoint.
5839 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5840 FOP_REGNUM, mappings): Move to ...
5841 * win32-i386-low.c: ... here.
5842 * win32-low.c (win32_thread_info): Move to ...
5843 * win32-low.h: ... here.
5844 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5845 win32-arm-low.c and wincecompat.c.
5846 (all:): Add $EXEEXT.
5847 (install-only:): Likewise.
5848 (gdbserver:): Likewise.
5849 (gdbreplay:): Likewise.
5850 * config.in: Regenerate.
5851 * configure: Regenerate.
5853 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5855 * win32-low.c: Rename typedef thread_info to
5856 win32_thread_info throughout.
5858 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5860 * win32-i386-low.c: Rename to ...
5861 * win32-low.c: ... this.
5862 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5863 * Makefile.in: Likewise.
5865 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5867 * remote-utils.c (monitor_output): Constify msg parameter.
5868 * server.h (monitor_output): Likewise.
5869 * win32-i386-low.c (handle_output_debug_string): New.
5870 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5871 handle_output_debug_string.
5872 (get_child_debug_event): Likewise.
5874 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5876 * server.c (main): Correct strtoul check.
5878 2007-03-27 Jon Ringle <jon@ringle.org>
5880 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5882 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5884 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5886 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5888 * terminal.h: Check HAVE_SGTTY_H.
5890 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5892 * remote-utils.c (remote_open): Print out the assigned port number.
5894 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5896 * remote-utils.c (monitor_output): New function.
5897 * server.c (debug_threads): Define here.
5898 (monitor_show_help): New function.
5899 (handle_query): Handle qRcmd.
5900 (main): Do not handle 'd' packet.
5901 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5902 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5905 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5907 * Makefile.in (EXEEXT): New.
5908 (clean): Use $(EXEEXT).
5910 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5912 * target.h (target_ops): Rename send_signal to request_interrupt,
5913 and remove enum target_signal parameter.
5914 * linux-low.c (linux_request_interrupt): Rename from
5915 linux_send_signal, and always send SIGINT.
5916 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5917 and always send SIGINT.
5918 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5920 (input_interrupt): Likewise.
5922 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5924 * server.c (get_features_xml): Check if target implemented
5926 * win32-i386-low.c (win32_arch_string): New.
5927 (win32_target_ops): Add win32_arch_string as arch_string member.
5929 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5931 * spu-low.c (spu_arch_string): New.
5932 (spu_target_ops): Add spu_arch_string.
5934 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5936 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5937 * configure.ac: Do not check for terminal.h.
5938 * configure, config.in: Regenerated.
5940 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5942 * Makefile.in (OBS): Add $(XML_BUILTIN).
5943 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5945 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5946 (arm-with-iwmmxt.c): New.
5947 * config.in, configure: Regenerate.
5948 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5949 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5950 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5951 (arm*-*-linux*): Add iWMMXt and regset support.
5952 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5953 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5954 (arm_store_wmmxregset, target_regsets): New.
5955 * server.c (get_features_xml): Take annex argument. Check builtin
5957 (handle_query): Handle multiple annexes.
5959 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5961 * remote-utils.c [USE_WIN32API] (read, write): Define.
5962 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5965 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5967 * linux-i386-low.c (the_low_target): Set arch_string.
5968 * linux-x86-64-low.c (the_low_target): Likewise.
5969 * linux-low.c (linux_arch_string): New.
5970 (linux_target_ops): Add it.
5971 * linux-low.h (struct linux_target_ops): Add arch_string.
5972 * server.c (write_qxfer_response): Use const void * for DATA.
5973 (get_features_xml): New.
5974 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5975 * target.h (struct target_ops): Add arch_string method.
5977 2007-01-03 Denis Pilat <denis.pilat@st.com>
5978 Daniel Jacobowitz <dan@codesourcery.com>
5980 * linux-low.c (linux_kill): Handle being called with no threads.
5981 * win32-i386-low.c (win32_kill): Likewise.
5982 (get_child_debug_event): Clear current_process_handle.
5984 2006-12-30 Denis PILAT <denis.pilat@st.com>
5985 Daniel Jacobowitz <dan@codesourcery.com>
5987 * remote-utils.c (remote_open): Check the type of specified
5988 serial port devices before opening them.
5989 * server.c (main): Kill the inferior if an error occurs during
5990 the first remote_open.
5992 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5994 * README: Update supported targets.
5996 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5998 * Makefile.in (clean): Remove reg-mips64.c.
5999 (reg-mips64.c, reg-mips64.o): New rules.
6000 * configure.srv: Handle mips64. Include regset support for mips.
6001 * linux-mips-low.c (union mips_register): New.
6002 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6003 (mips_breakpoint, mips_breakpoint_at): Use int.
6004 (mips_collect_register, mips_supply_register)
6005 (mips_collect_register_32bit, mips_supply_register_32bit)
6006 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6007 (mips_store_fpregset, target_regsets): New.
6008 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6010 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6012 * configure.srv: Add target "spu*-*-*".
6013 * Makefile.in (clean): Remove reg-spu.c.
6014 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6015 * spu-low.c: New file.
6017 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6019 * configure.ac: Correct td_thr_tls_get_addr test.
6020 * configure: Regenerated.
6022 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6024 * linux-low.c (linux_wait_for_event): Reformat. Use the
6026 * remote-utils.c (decode_address_to_semicolon): New.
6027 * server.c (pass_signals, handle_general_set): New.
6028 (handle_query): Mention QPassSignals for qSupported.
6029 (main): Call handle_general_set.
6030 * server.h (pass_signals, decode_address_to_semicolon): New.
6032 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6034 * server.c (handle_query): Correct error handling for read_auxv.
6036 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6038 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6039 and srv_linux_thread_db to yes.
6040 * linux-s390-low.c (s390_fill_gregset): New function.
6041 (target_regsets): Define data structure.
6043 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6045 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6046 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6047 * config.in, configure: Regenerated.
6048 * inferiors.c (gdb_id_to_thread): New function.
6049 (gdb_id_to_thread_id): Use it.
6050 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6051 * linux-low.h (struct process_info): Add th member.
6052 (thread_db_get_tls_address): New prototype.
6053 * remote-utils.c (decode_address): Make non-static.
6054 * server.c (handle_query): Handle qGetTLSAddr.
6055 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6056 * target.h (struct target_ops): Add get_tls_address.
6057 * thread-db.c (maybe_attach_thread): Save the thread handle.
6058 (thread_db_get_tls_address): New.
6060 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6062 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6063 (linux_resume_one_process): Take a siginfo_t *. Update all
6064 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6065 (struct pending_signals): Add a siginfo_t.
6066 (linux_wait_for_process): Always set last_status.
6067 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6068 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6069 * linux-low.h (struct process_info): Add last_status.
6071 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6073 * remote-utils.c (try_rle): New function.
6074 (putpkt_binary): Use it.
6076 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6078 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6079 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6080 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6081 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6082 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6085 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6087 * server.c (terminal_fd): New variable.
6088 (old_foreground_pgrp): Likewise.
6089 (restore_old_foreground_pgrp): New function.
6090 (start_inferior): Record the terminal file descriptor in terminal_fd
6091 and its original foreground group in old_foreground_pgrp. Register
6092 restore_old_foreground_pgrp with atexit().
6094 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6096 * server.c (handle_query): Correct qPart to qXfer.
6098 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6100 * configure.ac: Check for more headers which are missing on
6101 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6102 * configure.srv: Add Cygwin and mingw32.
6103 * remote-utils.c: Don't include headers unconditionally which
6104 are missing on mingw32. Include <winsock.h> for mingw32.
6105 (remote_open): Adjust for mingw32 support. Flush
6106 standard error after writing to it.
6107 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6108 (unblock_async_io, enable_async_io, disable_async_io)
6109 (readchar, getpkt): Update for Winsock support.
6110 (prepare_resume_reply): Expect a protocol signal number.
6111 * server.c: Disable <sys/wait.h> on mingw32.
6112 (start_inferior): Adjust for mingw32 support. Flush
6113 standard error after writing to it.
6114 (attach_inferior): Likewise. Use protocol signal
6116 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6118 * win32-i386-low.c: New file.
6119 * Makefile.in (XM_CLIBS): Set.
6120 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6121 (win32-i386-low.o): New dependency rule.
6122 * linux-low.c (linux_wait): Use target signal numbers.
6123 * target.h (struct target_ops): Doc fix.
6124 * server.h (target_signal_to_name): New prototype.
6125 * gdbreplay.c: Don't include headers unconditionally which
6126 are missing on mingw32. Include <winsock.h> for mingw32.
6127 (remote_close, remote_open): Adjust for Winsock support.
6128 * configure, config.in: Regenerated.
6130 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6132 * server.c (decode_xfer_read, write_qxfer_response): New.
6133 (handle_query): Take a packet length argument. Handle
6134 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6135 the qSupported response.
6136 (main): Update call to handle_query.
6138 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6140 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6141 (putpkt_binary): Renamed from putpkt and adjusted for binary
6143 (putpkt): New wrapper for putpkt_binary.
6144 (readchar): Don't mask off the high bit.
6145 (decode_X_packet): New function.
6146 * server.c (main): Call putpkt_binary if a handler sets the packet
6147 length. Save the length of the incoming packet. Handle 'X'.
6148 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6150 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6152 * server.c (handle_query): Handle qSupported.
6154 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6156 * remote-utils.c (all_symbols_looked_up): New variable.
6157 (look_up_one_symbol): Check it.
6158 * server.h (look_up_one_symbol): New declaration.
6159 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6161 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6163 * Makefile.in (linux-arm-low.o): Update dependencies.
6164 * linux-arm-low.c: Include "gdb_proc_service.h".
6165 (PTRACE_GET_THREAD_AREA): Define.
6166 (ps_get_thread_area): New function.
6168 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6170 * configure.srv (m68k*-*-uclinux*): New target.
6171 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6172 (linux_resume_one_process): Remove extraneous cast.
6173 (linux_read_offsets): New.
6174 (linux_target_op): Add linux_read_offsets on mmuless systems.
6175 * server.c (handle_query): Add qOffsets logic.
6176 * target.h (struct target_ops): Add read_offsets.
6178 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6180 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6181 (PTRACE_GET_THREAD_AREA): Define.
6182 (ps_get_thread_area): New function.
6183 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6184 (linux-x86-64-low.o): Update.
6186 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6188 * configure.ac: Remove checks for prfpregset_t.
6189 * gdb_proc_service.h: New file.
6190 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6191 new "gdb_proc_service.h".
6192 * proc-service.c: Likewise.
6193 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6194 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6195 * Makefile.in (gdb_proc_service_h): Updated.
6196 * configure, config.in: Regenerated.
6198 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6200 * remote-utils.c (prepare_resume_reply): Move declaration
6201 of gdb_id_from_wait to the top of the block.
6203 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6205 * linux-low.c (regsets_store_inferior_registers): Read the regset
6206 from the target before filling it.
6208 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6210 * server.c (attach_inferior): Return SIGTRAP for a successful
6213 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6215 * Makefile.in (OBS): Add version.o.
6216 (STAGESTUFF): Delete.
6217 (version.o): Add dependencies.
6218 (version.c): Replace rule.
6219 (clean): Remove version.c.
6220 * server.c (gdbserver_version): New.
6221 (gdbserver_usage): Use printf.
6222 (main): Handle --version and --help.
6223 * server.h (version, host_name): Add declarations.
6225 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6237 * linux-x86-64-low.c:
6240 * linux-ppc64-low.c:
6249 * linux-crisv32-low.c:
6261 * gdbserver.1: Add (C) after Copyright. Update the FSF
6264 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6266 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6267 (arm_breakpoint_at): Recognize both breakpoints.
6268 (the_low_target): Use the correct breakpoint instruction.
6270 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6272 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6273 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6274 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6275 (the_low_target): Update.
6277 2005-10-25 Andreas Schwab <schwab@suse.de>
6279 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6281 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6282 (ia64_num_regs): Reduce to 462.
6284 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6286 * acinclude.m4: Correct quoting.
6287 * aclocal.m4: Regenerated.
6289 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6290 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6291 (thread_db_init): Call thread_db_err_str.
6292 * configure.ac: Check for TD_VERSION.
6293 * config.in, configure: Regenerated.
6295 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6297 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6299 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6301 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6302 is not available. Define HAVE_PTRACE_GETREGS if it is.
6303 * config.in, configure: Regenerated.
6304 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6305 * linux-i386-low.c, linux-m68k-low.c: Update to use
6306 HAVE_PTRACE_GETREGS.
6307 * linux-low.c (regsets_fetch_inferior_registers)
6308 (regsets_store_inferior_registers): Only return 0 if we processed
6310 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6311 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6313 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6315 * inferiors.c (struct thread_info): Add gdb_id.
6316 (add_thread): Add gdb_id argument.
6317 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6318 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6319 calls to add_thread.
6320 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6321 * server.c (handle_query): Use thread_to_gdb_id.
6322 (handle_v_cont, main): Use gdb_id_to_thread_id.
6323 * server.h (add_thread): Update prototype.
6324 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6327 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6329 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6330 left-padded registers.
6331 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6332 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6334 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6336 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6337 * configure: Regenerate.
6338 * config.in: Regenerate.
6339 * server.h (NEED_DECLARATION_STRERROR):
6340 Replace with !HAVE_DECL_STRERROR.
6342 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6344 * linux-low.c (linux_wait, linux_send_signal): Don't test
6345 an unsigned long variable for > 0 if it could be MAX_ULONG.
6346 * server.c (myresume): Likewise.
6347 * target.c (set_desired_inferior): Likewise.
6349 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6351 * configure.ac: Simplify and improve check for socklen_t.
6352 * configure, config.in: Regenerate.
6354 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6356 * acconfig.h: Remove.
6357 * configure.ac: Add a test for socklen_t. Use three-argument
6358 AC_DEFINE throughout.
6359 * config.in: Regenerated using autoheader 2.59.
6360 * configure: Regenerated.
6362 * gdbreplay.c (socklen_t): Provide a default.
6363 (remote_open): Use socklen_t.
6364 * remote-utils.c (socklen_t): Provide a default.
6365 (remote_open): Use socklen_t.
6366 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6369 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6371 * linux-low.c (linux_read_memory, linux_write_memory)
6372 (linux_read_auxv): Likewise.
6373 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6374 (check_mem_write): Likewise.
6375 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6377 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6378 (registers_from_string, register_data): Likewise.
6379 * server.c (handle_query, main): Likewise.
6380 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6381 (decode_M_packet): Likewise.
6382 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6383 * target.h (struct target_ops): Update read_memory, write_memory,
6385 (read_inferior_memory, write_inferior_memory): Update.
6386 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6388 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6389 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6390 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6391 linux-s390-low.c, linux-sh-low.c: Update for changes in
6392 read_inferior_memory and the_low_target->breakpoint.
6394 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6396 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6397 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6398 * configure.srv: Add powerpc64-*-linux*.
6399 * linux-ppc64-low.c: New file.
6401 2005-05-23 Orjan Friberg <orjanf@axis.com>
6403 * linux-cris-low.c: New file with support for CRIS.
6404 * linux-crisv32-low.c: Ditto for CRISv32.
6405 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6406 (clean): Add reg-cris.c and reg-crisv32.c.
6407 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6408 reg-crisv32.o, and reg-crisv32.c to make rules.
6409 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6412 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6414 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6415 of sizeof (PTRACE_XFER_TYPE).
6416 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6418 2005-05-12 Orjan Friberg <orjanf@axis.com>
6420 * target.h (struct target_ops): Add insert_watchpoint,
6421 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6422 pointers for hardware watchpoint support.
6423 * linux-low.h (struct linux_target_ops): Ditto.
6424 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6425 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6426 to linux_target_ops.
6427 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6429 * server.c (main): Recognize 'Z' and 'z' packets.
6431 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6433 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6434 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6435 (the_low_target): Add new members.
6437 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6439 * proc-service.c (ps_lgetregs): Search all_processes instead of
6442 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6444 * server.c (start_inferior): Change return type to int.
6445 (attach_inferior): Change sigptr to int *.
6446 (handle_v_cont, handle_v_requests): Change signal to int *.
6447 (main): Change signal to int.
6449 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6451 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6452 * configure.srv: Add m32r*-*-linux*.
6453 * linux-m32r-low.c: New file.
6455 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6457 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6459 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6461 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6462 Take unsigned long arguments for PIDs.
6463 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6464 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6465 (wait_for_sigstop, linux_resume_one_process)
6466 (regsets_fetch_inferior_registers, linux_send_signal)
6467 (linux_read_auxv): Likewise. Update the types of variables holding
6468 PIDs. Update format string specifiers.
6469 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6470 * remote-utils.c (prepare_resume_reply): Likewise.
6471 * server.c (cont_thread, general_thread, step_thread)
6472 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6474 (handle_query): Update format specifiers.
6475 (handle_v_cont, main): Use strtoul for thread IDs.
6476 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6477 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6478 (general_thread, step_thread, thread_from_wait)
6479 (old_thread_from_wait): Update.
6480 * target.h (struct thread_resume): Use unsigned long for THREAD.
6481 (struct target_ops): Use unsigned long for arguments to attach and
6484 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6486 * acinclude.m4: Include bfd/bfd.m4 directly.
6487 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6488 <agriffis@toolchain.org>.
6489 * aclocal.m4, configure: Regenerated.
6491 2005-01-07 Andrew Cagney <cagney@gnu.org>
6493 * configure.ac: Rename configure.in, require autoconf 2.59.
6494 * configure: Re-generate.
6496 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6498 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6500 * aclocal.m4: Regenerated.
6501 * configure: Regenerated.
6503 2004-11-21 Andreas Schwab <schwab@suse.de>
6505 * linux-m68k-low.c (m68k_num_gregs): Define.
6506 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6507 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6508 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6509 (m68k_breakpoint_at): New. Add to the_low_target.
6511 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6512 srv_linux_thread_db to yes.
6514 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6516 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6517 (ARCH_SET_FS): Likewise.
6518 (ARCH_GET_FS): Likewise.
6519 (ARCH_GET_GS): Likewise.
6521 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6523 * linux-i386-low.c (ps_get_thread_area): New.
6524 * linux-x86-64-low.c (ps_get_thread_area): New.
6525 * linux-low.c: Include <sys/syscall.h>.
6526 (linux_kill_one_process): Don't kill the first thread here.
6527 (linux_kill): Kill the first thread here.
6528 (kill_lwp): New function.
6529 (send_sigstop, linux_send_signal): Use it.
6530 * proc-service.c: Clean up #ifdefs.
6531 (fpregset_info): Delete.
6532 (ps_lgetregs): Update and enable implementation.
6533 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6535 * remote-utils.c (struct sym_cache, symbol_cache): New.
6536 (input_interrupt): Print a clearer message.
6537 (async_io_enabled): New variable.
6538 (enable_async_io, disable_async_io): Use it. Update comments.
6539 (look_up_one_symbol): Use the symbol cache.
6540 * thread-db.c (thread_db_look_up_symbols): New function.
6541 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6543 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6545 * configure.in: Test for -rdynamic.
6546 * configure: Regenerated.
6547 * Makefile (INTERNAL_LDFLAGS): New.
6548 (gdbserver, gdbreplay): Use it.
6550 2004-09-02 Andrew Cagney <cagney@gnu.org>
6552 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6554 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6556 * linux-low.c (linux_wait): Clear all_processes list also.
6558 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6560 * linux-low.c: Include <errno.h>. Remove extern declaration of
6563 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6565 * gdbreplay.c, server.h, utils.c: Update copyright years.
6567 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6569 * server.c (main): Print child status or termination signal from
6570 variable 'signal', not 'sig'.
6572 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6574 * linux-low.c (linux_read_memory): Change return type to
6575 int. Check for and return error from ptrace().
6576 * target.c (read_inferior_memory): Change return type to int. Pass
6577 back return status from the_target->read_memory().
6578 * target.h (struct target_ops): Adapt *read_memory() prototype.
6580 (read_inferior_memory): Adapt prototype.
6581 * server.c (main): Return an error packet if
6582 read_inferior_memory() returns an error.
6584 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6586 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6587 Unify with other clean targets.
6589 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6591 * server.c (handle_v_cont): Call set_desired_inferior.
6593 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6595 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6597 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6599 * linux-low.c (linux_wait): Unblock async I/O.
6600 (linux_resume): Block and enable async I/O.
6601 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6602 * server.h (block_async_io, unblock_async_io): Add prototypes.
6604 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6606 * remote-utils.c (remote_open): Print a status notice after
6608 * server.c (attach_inferior): Print a status notice after
6611 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6613 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6615 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6617 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6619 * server.c, target.h: Update copyright years.
6621 2004-02-25 Roland McGrath <roland@redhat.com>
6623 * target.h (struct target_ops): New member `read_auxv'.
6624 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6625 * linux-low.c (linux_read_auxv): New function.
6626 (linux_target_ops): Initialize `read_auxv' member to that.
6628 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6630 Committed by Jim Blandy <jimb@redhat.com>.
6632 * linux-s390-low.c (s390_num_regs): Update.
6633 (s390_regmap): Remove control registers. Use __s390x__ predefine
6634 instead of GPR_SIZE to distiguish s390 and s390x targets.
6636 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6638 * linux-low.c: Update copyright year.
6639 (check_removed_breakpoint): Clear pending_is_breakpoint.
6640 (linux_set_resume_request, linux_queue_one_thread)
6641 (resume_status_pending_p): New functions.
6642 (linux_continue_one_thread): Use process->resume.
6643 (linux_resume): Only resume threads if there are no pending events.
6644 * linux-low.h (struct process_info): Add resume request
6647 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6649 * regcache.c (new_register_cache): Clear the allocated register
6650 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6652 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6654 * linux-low.c (linux_resume): Take a struct thread_resume *
6656 (linux_wait): Update call.
6657 (resume_ptr): New static variable.
6658 (linux_continue_one_thread): Renamed from
6659 linux_continue_one_process. Use resume_ptr.
6660 (linux_resume): Use linux_continue_one_thread.
6661 * server.c (handle_v_cont, handle_v_requests): New functions.
6662 (myresume): New function.
6663 (main): Handle 'v' case.
6664 * target.h (struct thread_resume): New type.
6665 (struct target_ops): Change argument of "resume" to struct
6667 (myresume): Delete macro.
6669 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6671 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6672 (uninstall): Support DESTDIR.
6674 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6676 * configure.srv: Add xscale*linux copy of arm*linux entry.
6678 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6680 * linux-arm-low.c (arm_reinsert_addr): New function.
6681 (the_low_target): Add arm_reinsert_addr.
6683 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6685 * mem-break.c: Remove whitespace at end of file.
6687 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6689 * configure.in: Check whether we need to prototype strerror.
6690 * server.h: Optionally prototype strerror.
6691 * gdbreplay.c (perror_with_name): Use strerror.
6692 * linux-low.c (linux_attach_lwp): Use strerror.
6693 * utils.c (perror_with_name): Use strerror.
6694 * config.in, configure: Regenerated.
6696 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6698 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6699 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6701 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6703 * Makefile.in (SFILES): Update.
6704 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6705 low-sun3.c: Remove files.
6707 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6709 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6710 (linux_detach_one_process, linux_detach): New functions.
6711 (linux_target_ops): Add linux_detach.
6712 * server.c (main): Handle 'D' packet.
6713 * target.h (struct target_ops): Add "detach" member.
6714 (detach_inferior): Define.
6716 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6718 From Kelley Cook <kelleycook@wideopenwest.com>:
6719 * configure.srv: Accept i[34567]86 variants.
6721 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6723 * linux-low.c (linux_wait_for_event): Correct comment typos.
6724 (linux_resume_one_process): Call check_removed_breakpoint.
6725 (linux_send_signal): New function.
6726 (linux_target_ops): Add linux_send_signal.
6727 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6729 * target.h (struct target_ops): Add send_signal.
6731 2003-05-29 Jim Blandy <jimb@redhat.com>
6733 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6734 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6735 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6736 away part of the register's value.
6738 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6740 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6741 (linux_wait_for_event, linux_init_signals): Likewise.
6743 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6745 * configure.in: Check for stdlib.h.
6746 * configure: Regenerated.
6747 * config.in: Regenerated.
6749 2003-01-04 Andreas Schwab <schwab@suse.de>
6751 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6753 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6755 * Makefile.in: Remove obsolete code.
6757 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6759 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6760 defined(PT_FPR0_HI).
6762 2002-11-17 Stuart Hughes <seh@zee2.com>
6764 * linux-arm-low.c (arm_num_regs): Increase.
6765 (arm_regmap): Include status register.
6767 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6769 * linux-low.c (register_addr): Remove incorrect -1 check.
6771 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6773 * linux-low.c (linux_create_inferior): Call setpgid. Return
6775 (unstopped_p, linux_signal_pid): Remove.
6776 (linux_target_ops): Remove linux_signal_pid.
6777 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6778 global instead of target method.
6779 * target.h (struct target_ops): Remove signal_pid. Update comment
6780 for create_inferior.
6781 * server.c (signal_pid): New variable.
6782 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6783 gdbserver. Set the child to be the foreground process group.
6784 (attach_inferior): Set signal_pid.
6786 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6788 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6790 2002-08-20 Jim Blandy <jimb@redhat.com>
6792 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6795 2002-08-01 Andrew Cagney <cagney@redhat.com>
6797 * Makefile.in: Make chill references obsolete.
6799 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6801 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6802 * configure: Regenerate.
6803 * config.in: Regenerate.
6805 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6807 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6808 (perror_with_name, remote_close, remote_open, expect, play): Static.
6810 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6812 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6813 byte offsets instead of an array of indexes.
6814 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6816 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6818 * regcache.c: Add comment.
6820 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6822 * thread-db.c: New file.
6823 * proc-service.c: New file.
6824 * acinclude.m4: New file.
6825 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6826 proc-service.o, and thread-db.o.
6827 (linux-low.o): Add USE_THREAD_DB.
6828 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6829 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6830 * aclocal.m4: Regenerated.
6831 * config.in: Regenerated.
6832 * configure: Regenerated.
6833 * configure.in: Check for proc_service.h, sys/procfs.h,
6834 thread_db.h, and linux/elf.h headrs.
6835 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6836 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6837 Check for -lthread_db and thread support.
6838 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6839 PowerPC, and SuperH.
6840 * i387-fp.c: Constify arguments.
6841 * i387-fp.h: Likewise.
6842 * inferiors.c: (struct thread_info): Renamed from
6843 `struct inferior_info'. Remove PID member. Use generic inferior
6844 list header. All uses updated.
6845 (inferiors, signal_pid): Removed.
6846 (all_threads): New variable.
6847 (get_thread): Define.
6848 (add_inferior_to_list): New function.
6849 (for_each_inferior): New function.
6850 (change_inferior_id): New function.
6851 (add_inferior): Removed.
6852 (remove_inferior): New function.
6853 (add_thread): New function.
6854 (free_one_thread): New function.
6855 (remove_thread): New function.
6856 (clear_inferiors): Use for_each_inferior and free_one_thread.
6857 (find_inferior): New function.
6858 (find_inferior_id): New function.
6859 (inferior_target_data): Update argument type.
6860 (set_inferior_target_data): Likewise.
6861 (inferior_regcache_data): Likewise.
6862 (set_inferior_regcache_data): Likewise.
6863 * linux-low.c (linux_bp_reinsert): Remove.
6864 (all_processes, stopping_threads, using_thrads)
6865 (struct pending_signals, debug_threads, pid_of): New.
6866 (inferior_pid): Replace with macro.
6867 (struct inferior_linux_data): Remove.
6868 (get_stop_pc, add_process): New functions.
6869 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6870 Use add_process and add_thread.
6871 (linux_attach_lwp): New function, based on old linux_attach. Use
6872 add_process and add_thread. Set stop_expected for new threads.
6873 (linux_attach): New function.
6874 (linux_kill_one_process): New function.
6875 (linux_kill): Kill all LWPs.
6876 (linux_thread_alive): Use find_inferior_id.
6877 (check_removed_breakpoints, status_pending_p): New functions.
6878 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6879 Update. Use WNOHANG. Wait for cloned processes also. Update process
6880 struct for the found process.
6881 (linux_wait_for_event): New function.
6882 (linux_wait): Use it. Support LWPs.
6883 (send_sigstop, wait_for_sigstop, stop_all_processes)
6884 (linux_resume_one_process, linux_continue_one_process): New functions.
6885 (linux_resume): Support LWPs.
6886 (REGISTER_RAW_SIZE): Remove.
6887 (fetch_register): Use register_size instead. Call supply_register.
6888 (usr_store_inferior_registers): Likewise. Call collect_register.
6890 (regsets_fetch_inferior_registers): Improve error message.
6891 (regsets_store_inferior_registers): Add debugging.
6892 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6893 (unstopped_p, linux_signal_pid): New functions.
6894 (linux_target_ops): Add linux_signal_pid.
6895 (linux_init_signals): New function.
6896 (initialize_low): Call it. Initialize using_threads.
6897 * regcache.c (inferior_regcache_data): Add valid
6899 (get_regcache): Fetch registers lazily. Add fetch argument
6900 and update all callers.
6901 (regcache_invalidate_one, regcache_invalidate): New
6903 (new_register_cache): Renamed from create_register_cache.
6904 Return the new regcache.
6905 (free_register_cache): Change argument to a void *.
6906 (registers_to_string, registers_from_string): Call get_regcache
6907 with fetch flag set.
6908 (register_data): Make static. Pass fetch flag to get_regcache.
6909 (supply_register): Call get_regcache with fetch flag clear.
6910 (collect_register): Call get_regcache with fetch flag set.
6911 (collect_register_as_string): New function.
6912 * regcache.h: Update.
6913 * remote-utils.c (putpkt): Flush after debug output and use
6915 Handle input interrupts while waiting for an ACK.
6916 (input_interrupt): Use signal_pid method.
6917 (getpkt): Flush after debug output and use stderr.
6918 (outreg): Use collect_register_as_string.
6919 (new_thread_notify, dead_thread_notify): New functions.
6920 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6922 (look_up_one_symbol): Flush after debug output.
6923 * server.c (step_thread, server_waiting): New variables.
6924 (start_inferior): Don't use signal_pid. Update call to mywait.
6925 (attach_inferior): Update call to mywait.
6926 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6927 (main): Don't fetch/store registers explicitly. Use
6928 set_desired_inferior. Support proposed ``Hs'' packet. Update
6931 (struct inferior_list, struct_inferior_list_entry): New.
6932 * target.c (set_desired_inferior): New.
6933 (write_inferior_memory): Constify.
6934 (mywait): New function.
6936 (struct target_ops): New signal_pid method.
6937 (mywait): Removed macro, added prototype.
6939 * linux-low.h (regset_func): Removed.
6940 (regset_fill_func, regset_store_func): New.
6941 (enum regset_type): New.
6942 (struct regset_info): Add type field. Use new operation types.
6943 (struct linux_target_ops): stop_pc renamed to get_pc.
6944 Add decr_pc_after_break and breakpoint_at.
6945 (get_process, get_thread_proess, get_process_thread)
6946 (strut process_info, all_processes, linux_attach_lwp)
6947 (thread_db_init): New.
6949 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6950 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6951 (the_low_target): Add new members.
6952 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6953 (i386_store_fpxregset): Constify.
6954 (target_regsets): Add new kind identifier.
6955 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6956 (i386_set_pc): Add debugging.
6957 (i386_breakpoint_at): New function.
6958 (the_low_target): Add new members.
6959 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6960 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6961 (mips_breakpoint_at): New.
6962 (the_low_target): Add new members.
6963 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6964 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6965 (the_low_target): Add new members.
6966 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6967 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6968 (the_low_target): Add new members.
6969 * linux-x86-64-low.c (target_regsets): Add new kind
6972 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6974 From Martin Pool <mbp@samba.org>:
6975 * server.c (gdbserver_usage): New function.
6978 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6980 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6983 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6985 * Makefile.in: Remove obsolete code.
6987 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6989 * linux-low.c (regsets_fetch_inferior_registers),
6990 (regsets_store_inferior_registers): Removed cast to int from
6992 * regcache.h: Added declaration of struct inferior_info.
6994 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6996 * inferiors.c (struct inferior_info): Add regcache_data.
6997 (add_inferior): Call create_register_cache.
6998 (clear_inferiors): Call free_register_cache.
6999 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7000 * regcache.c (struct inferior_regcache_data): New.
7001 (registers): Remove.
7002 (get_regcache): New function.
7003 (create_register_cache, free_register_cache): New functions.
7004 (set_register_cache): Don't initialize the register cache here.
7005 (registers_to_string, registers_from_string, register_data): Call
7007 * regcache.h: Add prototypes.
7008 * server.h: Likewise.
7010 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7012 * mem-break.c: New file.
7013 * mem-break.h: New file.
7014 * Makefile.in: Add mem-break.o rule; update server.h
7016 * inferiors.c (struct inferior_info): Add target_data
7018 (clear_inferiors): Free target_data member if set.
7019 (inferior_target_data, set_inferior_target_data): New functions.
7020 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7021 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7022 * linux-low.c (linux_bp_reinsert): New variable.
7023 (struct inferior_linux_data): New.
7024 (linux_create_inferior): Use set_inferior_target_data.
7025 (linux_attach): Likewise. Call add_inferior.
7026 (linux_wait_for_one_inferior): New function.
7027 (linux_wait): Call it.
7028 (linux_write_memory): Add const.
7029 (initialize_low): Call set_breakpoint_data.
7030 * linux-low.h (struct linux_target_ops): Add breakpoint
7032 * server.c (attach_inferior): Remove extra add_inferior
7034 * server.h: Include mem-break.h. Update inferior.c
7036 * target.c (read_inferior_memory)
7037 (write_inferior_memory): New functions.
7038 * target.h (read_inferior_memory)
7039 (write_inferior_memory): Change macros to prototypes.
7040 (struct target_ops): Update comments. Add const to write_memory
7043 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7045 * linux-low.c (usr_store_inferior_registers): Support
7046 registers which are allowed to fail to store.
7047 * linux-low.h (linux_target_ops): Likewise.
7048 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7049 (ppc_cannot_store_register): FPSCR may not be storable.
7051 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7053 * server.h: Include <string.h> if HAVE_STRING_H.
7054 * ChangeLog: Correct paths in last ChangeLog entry.
7056 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7058 * linux-low.h: Remove obsolete prototypes.
7059 (struct linux_target_ops): New.
7060 (extern the_low_target): New.
7061 * linux-low.c (num_regs, regmap): Remove declarations.
7062 (register_addr): Use the_low_target explicitly.
7063 (fetch_register): Likewise.
7064 (usr_fetch_inferior_registers): Likewise.
7065 (usr_store_inferior_registers): Likewise.
7066 * linux-arm-low.c (num_regs): Remove.
7067 (arm_num_regs): Define.
7068 (arm_regmap): Renamed from regmap, made static.
7069 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7071 (arm_cannot_store_register): Renamed from cannot_store_register,
7073 (the_low_target): New.
7074 * linux-i386-low.c (num_regs): Remove.
7075 (i386_num_regs): Define.
7076 (i386_regmap): Renamed from regmap, made static.
7077 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7079 (i386_cannot_store_register): Renamed from cannot_store_register,
7081 (the_low_target): New.
7082 * linux-ia64-low.c (num_regs): Remove.
7083 (ia64_num_regs): Define.
7084 (ia64_regmap): Renamed from regmap, made static.
7085 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7087 (ia64_cannot_store_register): Renamed from cannot_store_register,
7089 (the_low_target): New.
7090 * linux-m68k-low.c (num_regs): Remove.
7091 (m68k_num_regs): Define.
7092 (m68k_regmap): Renamed from regmap, made static.
7093 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7095 (m68k_cannot_store_register): Renamed from cannot_store_register,
7097 (the_low_target): New.
7098 * linux-mips-low.c (num_regs): Remove.
7099 (mips_num_regs): Define.
7100 (mips_regmap): Renamed from regmap, made static.
7101 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7103 (mips_cannot_store_register): Renamed from cannot_store_register,
7105 (the_low_target): New.
7106 * linux-ppc-low.c (num_regs): Remove.
7107 (ppc_num_regs): Define.
7108 (ppc_regmap): Renamed from regmap, made static.
7109 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7111 (ppc_cannot_store_register): Renamed from cannot_store_register,
7113 (the_low_target): New.
7114 * linux-s390-low.c (num_regs): Remove.
7115 (s390_num_regs): Define.
7116 (s390_regmap): Renamed from regmap, made static.
7117 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7119 (s390_cannot_store_register): Renamed from cannot_store_register,
7121 (the_low_target): New.
7122 * linux-sh-low.c (num_regs): Remove.
7123 (sh_num_regs): Define.
7124 (sh_regmap): Renamed from regmap, made static.
7125 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7127 (sh_cannot_store_register): Renamed from cannot_store_register,
7129 (the_low_target): New.
7130 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7131 (the_low_target): New.
7133 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7135 * Makefile.in: Add stamp-h target.
7136 * configure.in: Create stamp-h.
7137 * configure: Regenerated.
7139 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7141 * inferiors.c: New file.
7142 * target.c: New file.
7143 * target.h: New file.
7144 * Makefile.in: Add target.o and inferiors.o. Update
7146 * linux-low.c (inferior_pid): New static variable,
7147 moved from server.c.
7148 (linux_create_inferior): Renamed from create_inferior.
7149 Call add_inferior. Return 0 on success instead of a PID.
7150 (linux_attach): Renamed from myattach.
7151 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7152 (linux_thread_alive): Renamed from mythread_alive.
7153 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7155 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7156 (regsets_store_inferior_registers): Correct error message.
7157 Add missing ``return 0''.
7158 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7159 (linux_store_registers): Renamed from store_inferior_registers.
7160 (linux_read_memory): Renamed from read_inferior_memory.
7161 (linux_write_memory): Renamed from write_inferior_memory.
7162 (linux_target_ops): New structure.
7163 (initialize_low): Call set_target_ops ().
7164 * remote-utils.c (unhexify): New function.
7165 (hexify): New function.
7166 (input_interrupt): Send signals to ``signal_pid''.
7167 * server.c (inferior_pid): Remove.
7168 (start_inferior): Update create_inferior call.
7169 (attach_inferior): Call add_inferior.
7170 (handle_query): New function.
7171 (main): Call handle_query for `q' packets.
7172 * server.h: Include "target.h". Remove obsolete prototypes.
7173 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7175 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7177 * Makefile.in: Add WARN_CFLAGS. Update configury
7179 * configure.in: Check for <string.h>
7180 * configure: Regenerate.
7181 * config.in: Regenerate.
7182 * gdbreplay.c: Include needed system headers.
7183 (remote_open): Remove strchr prototype.
7184 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7185 * regcache.c (supply_register): Change buf argument to const void *.
7186 (supply_register_by_name): Likewise.
7187 (collect_register): Change buf argument to void *.
7188 (collect_register_by_name): Likewise.
7189 * regcache.h: Add missing prototypes.
7190 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7191 * server.c (handle_query): New function.
7192 (attached): New static variable, moved out of main.
7193 (main): Quiet longjmp clobber warnings.
7194 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7195 * utils.c (error): Remove NORETURN.