1 2012-06-06 Yao Qi <yao@codesourcery.com>
3 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7 Fix gcc -flto compilation warning.
8 * server.c (main): Make variable multi_mode and attach volatile.
10 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13 if the platform doesn't know about it.
15 2012-05-30 Jeff Kenton <jkenton@tilera.com>
17 * Makefile.in (SFILES): Add linux-tile-low.c.
18 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
19 * configure.srv: Handle tilegx-*-linux*.
20 * linux-tile-low.c: New file.
22 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
24 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
26 2012-05-24 Pedro Alves <palves@redhat.com>
30 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
32 2012-05-24 Pedro Alves <palves@redhat.com>
36 Replace target_signal with gdb_signal throughout.
38 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
40 * linux-low.c (linux_store_registers): Avoid the copying sequence
41 when no data has been retrieved by ptrace.
43 2012-05-22 Will Deacon <will.deacon@arm.com>
45 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
47 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
50 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
52 * linux-low.c (linux_store_registers): Don't re-retrieve data
53 with ptrace that has already been obtained from /proc. Always
54 copy any data retrieved with ptrace to the buffer supplied.
56 2012-05-11 Yao Qi <yao@codesourcery.com>
57 Pedro Alves <palves@redhat.com>
59 * linux-low.c (enum stopping_threads_kind): New.
60 (stopping_threads): Change type to `enum stopping_threads_kind'.
61 (handle_extended_wait): If stopping and suspending threads, leave
62 the new_lwp suspended too.
63 (linux_wait_for_event): Adjust.
64 (stop_all_lwps): Set `stopping_threads' to
65 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
66 whether we're suspending threads or just stopping them. Assert no
69 2012-04-29 Yao Qi <yao@codesourcery.com>
71 * server.h: Move some code to ...
72 * gdbthread.h: ... here. New.
73 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
74 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
75 (nto-low.o, win32-low.o): Likewise.
76 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
77 * regcache.c, remote-utils.c, server.c: Likewise.
78 * target.c, tracepoint.c, win32-low.c: Likewise.
80 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
82 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
83 (PTRACE_ARG4_TYPE): Likewise.
84 (PTRACE_XFER_TYPE): Likewise.
85 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
86 ptrace to PTRACE_ARG3_TYPE.
87 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
88 (PTRACE_ARG4_TYPE): Likewise.
89 (PTRACE_XFER_TYPE): Likewise.
90 (linux_detach_one_lwp): Cast fourth argument of
91 ptrace to long then PTRACE_ARG4_TYPE.
92 (regsets_fetch_inferior_registers): Cast third argument of
93 ptrace to long then PTRACE_ARG3_TYPE.
94 (regsets_store_inferior_registers): Likewise.
96 2012-04-20 Pedro Alves <palves@redhat.com>
98 * configure: Regenerate.
100 2012-04-19 Pedro Alves <palves@redhat.com>
102 * Makefile.in (GNULIB_BUILDDIR): New.
103 (LIBGNU, INCGNU, GNULIB_H): Adjust.
104 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
105 (all, install-only, uninstall, clean-info, all-lib, clean): No
106 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
107 (maintainer-clean realclean distclean): Use subdir_do.
109 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
110 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
111 * acinclude.m4: Include acx_configure_dir.m4.
112 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
113 calls. Call AC_PROG_RANLIB. Configure gnulib using
116 (GNULIB_STDINT_H): Adjust.
117 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
118 * gdbreplay.c: Include build-gnulib/config.h.
119 * server.h: Likewise.
120 * aclocal.m4: Regenerate.
121 * config.in: Regenerate.
122 * configure: Regenerate.
124 2012-04-19 Pedro Alves <palves@redhat.com>
126 * Makefile.in (LIBGNU, INCGNU): Adjust.
127 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
128 (all, install-only, uninstall, clean-info, all-lib, clean)
129 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
130 * configure.ac: Adjust AC_OUTPUT output.
131 * aclocal.m4: Regenerate.
132 * configure: Regenerate.
134 2012-04-19 Pedro Alves <palves@redhat.com>
136 * Makefile.in (generated_files): New.
137 (server_h): Remove the explicit dependency on config.h, and depend
140 2012-04-19 Pedro Alves <palves@redhat.com>
142 * Makefile.in (INCGNU): Add -Ignulib.
144 2012-04-19 Pedro Alves <palves@redhat.com>
146 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
147 (INCGNU): ... this, and spell out -I here.
148 (GNULIB_LIB): Rename to ...
150 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
152 2012-04-19 Pedro Alves <palves@redhat.com>
154 * config.in: Regenerate.
156 2012-04-19 Pedro Alves <palves@redhat.com>
158 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
159 * server.h (memmem): Remove declaration.
160 * config.in: Regenerate.
161 * configure: Regenerate.
163 2012-04-19 Yao Qi <yao@codesourcery.com>
165 * Makefile.in (SFILES): Add common/vec.c.
169 2012-04-19 Yao Qi <yao@codesourcery.com>
171 * remote-utils.c (prepare_resume_reply): Replace with macro
172 target_core_of_thread.
173 * server.c (handle_qxfer_threads_proper): Likewise.
174 * target.h (traget_core_of_thread): New macro.
176 2012-04-18 Pedro Alves <palves@redhat.com>
178 * aclocal.m4: Regenerate.
179 * configure: Regenerate.
181 2012-04-16 Yao Qi <yao@codesourcery.com>
183 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
184 duplicated on address.
186 2012-04-16 Yao Qi <yao@codesourcery.com>
188 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
189 (struct tracepoint_action_ops) <send>: New field.
190 (m_tracepoint_action_send, r_tracepoint_action_send): New.
191 (agent_expr_send, x_tracepoint_action_send): New.
192 (l_tracepoint_action_send): New.
193 (cmd_qtdp): Download and install tracepoint
194 according to `use_agent'.
195 (run_inferior_command): Add one more parameter `len'.
197 (tracepoint_send_agent): New.
198 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
200 2012-04-16 Yao Qi <yao@codesourcery.com>
202 * tracepoint.c (download_tracepoints): Moved to ...
203 (cmd_qtstart): ... here.
205 2012-04-14 Yao Qi <yao@codesourcery.com>
207 * tracepoint.c: Include inttypes.h.
208 (struct collect_memory_action): Use sized types.
209 (struct tracepoint): Likewise.
210 (cmd_qtdp, stop_tracing): Update print specifiers.
211 (cmd_qtp, response_tracepoint): Likewise.
212 (collect_data_at_tracepoint): Likewise.
213 (collect_data_at_step): Likewise.
215 2012-04-14 Yao Qi <yao@codesourcery.com>
217 Import gnulib module inttypes.
218 * aclocal.m4, config.in, configure: Regenerated.
220 2012-04-14 Yao Qi <yao@codesourcery.com>
222 * Makefile.in (maintainer-clean, realclean, distclean): Remove
223 Makefile and config.status at last.
225 2012-04-13 Yao Qi <yao@codesourcery.com>
227 * tracepoint.c: Include stdint.h unconditionally.
229 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
231 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
232 on BFD_HAVE_SYS_PROCFS_TYPE.
233 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
234 * configure: Regenerate.
235 * config.in: Likewise.
237 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
239 * Makefile.in (clean): Also remove x32.c x32-linux.c
240 x32-avx.c x32-avx-linux.c.
243 (x32-linux.o): Likewise.
244 (x32-linux.c): Likewise.
245 (x32-avx.o): Likewise.
246 (x32-avx.c): Likewise.
247 (x32-avx-linux.o): Likewise.
248 (x32-avx-linux.c): Likewise.
250 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
251 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
252 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
253 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
254 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
255 i386/x32-avx-linux.xml.
257 * linux-x86-low.c (init_registers_x32_linux): New prototype.
258 (init_registers_x32_avx_linux): Likwise.
259 (x86_linux_update_xmltarget): Call init_registers_x32_linux
260 or init_registers_x32_avx_linux if linux_is_elf64 is false.
262 2012-04-13 Pedro Alves <palves@redhat.com>
264 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
265 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
266 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
267 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
270 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
272 * linux-x86-low.c (compat_x32_clock_t): New.
273 (compat_x32_siginfo_t): Likewise.
274 (compat_x32_siginfo_from_siginfo): Likewise.
275 (siginfo_from_compat_x32_siginfo): Likewise.
276 (linux_is_elf64): Likewise.
277 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
278 and siginfo_from_compat_x32_siginfo for x32.
279 (x86_arch_setup): Set linux_is_elf64.
281 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
284 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
286 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
287 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
288 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
289 compatible with process.
291 2012-04-12 Yao Qi <yao@codesourcery.com>
293 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
294 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
295 (install-only, install-info, clean): Handle sub dir gnulib.
296 (all-lib, am--refresh): New targets.
297 (memmem.o): Remove target.
298 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
299 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
300 (AC_REPLACE_FUNCS): Remove memmem.
301 Invoke gl_INIT and AM_INIT_AUTOMAKE.
302 (AC_OUTPUT): Generate Makefile in gnulib/.
303 * aclocal.m4, config.in, configure: Regenerated.
305 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
307 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
309 2012-04-05 Pedro Alves <palves@redhat.com>
311 -Werror=strict-aliasing
313 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
316 2012-04-04 Pedro Alves <palves@redhat.com>
318 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
319 (sparc_store_gregset_from_stack, sparc_store_gregset)
320 (sparc_breakpoint_at): Fix formatting.
322 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
324 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
326 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
327 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
328 * config.in: Regenerate.
329 * configure: Likewise.
331 2012-03-29 Pedro Alves <palves@redhat.com>
333 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
334 Correct ptrace arguments.
336 2012-03-28 Pedro Alves <palves@redhat.com>
338 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
339 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
340 (IA64_FR1_REGNUM): New defines.
341 (ia64_fetch_register): New.
342 (the_low_target): Install it.
343 * linux-low.h (struct linux_target_ops) <fetch_register>: New
345 * linux-low.c (linux_fetch_registers): Try the
346 the_low_target.fetch_register hook first.
348 * linux-arm-low.c (the_low_target): Adjust.
349 * linux-bfin-low.c (the_low_target): Adjust.
350 * linux-cris-low.c (the_low_target): Adjust.
351 * linux-crisv32-low.c (the_low_target): Adjust.
352 * linux-m32r-low.c (the_low_target): Adjust.
353 * linux-m68k-low.c (the_low_target): Adjust.
354 * linux-mips-low.c (the_low_target): Adjust.
355 * linux-ppc-low.c (the_low_target): Adjust.
356 * linux-s390-low.c (the_low_target): Adjust.
357 * linux-sh-low.c (the_low_target): Adjust.
358 * linux-sparc-low.c (the_low_target): Adjust.
359 * linux-tic6x-low.c (the_low_target): Adjust.
360 * linux-x86-low.c (the_low_target): Adjust.
361 * linux-xtensa-low.c (the_low_target): Adjust.
363 2012-03-26 Pedro Alves <palves@redhat.com>
365 * server.c (handle_qxfer_libraries): Don't bail early if
366 the_target->qxfer_libraries_svr4 is not NULL.
368 2012-03-26 Pedro Alves <palves@redhat.com>
370 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
372 2012-03-23 Pedro Alves <palves@redhat.com>
374 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
375 "library-list-svr4" element's start tag when the the DSO list is
378 2012-03-23 Pedro Alves <palves@redhat.com>
380 * linux-low.c (read_one_ptr): Read the inferior's pointer through
381 a variable whose type size is the same as the inferior's pointer
384 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
386 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
388 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
389 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
390 * linux-low.h: Include <signal.h>.
391 (struct siginfo): Remove forward declaration.
392 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
395 2012-03-21 Mike Frysinger <vapier@gentoo.org>
397 * .gitignore: Ignore more files.
399 2012-03-19 Pedro Alves <palves@redhat.com>
400 Jan Kratochvil <jan.kratochvil@redhat.com>
402 * server.c (cont_thread, general_thread): Add describing comments.
403 (start_inferior): Clear `cont_thread'.
404 (handle_v_cont): Don't set `cont_thread' if resuming all threads
407 2012-03-15 Yao Qi <yao@codesourcery.com>
409 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
411 (cmd_qtdp): ... here.
413 2012-03-15 Yao Qi <yao@codesourcery.com>
415 * tracepoint.c (struct tracepoint_action_ops): New.
416 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
417 (m_tracepoint_action_download): New.
418 (r_tracepoint_action_download): New.
419 (x_tracepoint_action_download): New.
420 (l_tracepoint_action_download): New.
421 (add_tracepoint_action): Install `action->ops' according type.
422 (download_tracepoint_1): Move code `download' function pointer
423 of various tracepoint_action_ops.
425 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
427 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
428 linux_ptrace_attach_warnings.
430 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
432 * Makefile.in (linux-ptrace.o): New.
433 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
434 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
435 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
436 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
437 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
439 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
441 2012-03-08 Yao Qi <yao@codesourcery.com>
442 Pedro Alves <palves@redhat.com>
445 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
447 * tracepoint.c (remove_tracepoint): New.
448 (cmd_qtdp): Call remove_tracepoint when failed to install.
450 2012-03-07 Pedro Alves <palves@redhat.com>
452 * linux-low.c (get_detach_signal): New.
453 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
454 Pass on pending signals to PTRACE_DETACH. Check the result of the
456 * server.c (program_signals, program_signals_p): New.
457 (handle_general_set): Handle QProgramSignals.
458 * server.h (program_signals, program_signals_p): Declare.
460 2012-03-05 Pedro Alves <palves@redhat.com>
461 Jan Kratochvil <jan.kratochvil@redhat.com>
463 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
466 2012-03-03 Yao Qi <yao@codesourcery.com>
468 * tracepoint.c (tracepoint_look_up_symbols): Update call to
469 agent_look_up_symbols.
471 2012-03-03 Yao Qi <yao@codesourcery.com>
473 * Makefile.in (linux-low.o): Keep dependence on agent.h.
474 (linux-x86-low.o): Likewise.
475 * server.h: Remove in_process_agent_loaded.
476 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
480 2012-03-03 Yao Qi <yao@codesourcery.com>
482 * tracepoint.c (gdb_agent_capability): New global.
483 (in_process_agent_loaded_ust): Renamed to
484 `in_process_agent_supports_ust'.
486 (in_process_agent_supports_ust): Call agent_capability_check.
487 (clear_installed_tracepoints): Assert that agent supports
490 2012-03-03 Yao Qi <yao@codesourcery.com>
492 * linux-low.c (linux_supports_agent): New.
493 (linux_target_ops): Initialize field `supports_agent' with
494 linux_supports_agent.
495 * target.h (struct target_ops) <supports_agent>: New.
496 (target_supports_agent): New macro.
497 * server.c (handle_general_set): Handle packet 'QAgent'.
498 (handle_query): Send `QAgent+'.
499 * Makefile.in (server.o): Depends on agent.h.
501 2012-03-03 Yao Qi <yao@codesourcery.com>
503 * Makefile.in (OBS): Add agent.o.
504 Add new rule for agent.o.
505 Track dependence of tracepoint.c on agent.h.
506 * tracepoint.c (run_inferior_command_1):
507 (run_inferior_command): Call agent_run_command.
508 (gdb_ust_connect_sync_socket): Deleted. Move it to
510 (resume_thread, stop_thread): Likewise.
511 (gdb_ust_socket_init): Renamed to ...
512 (gdb_agent_socket_init): ... New.
513 (gdb_ust_thread): Renamed to ...
514 (gdb_agent_helper_thread): ... New.
515 (gdb_ust_init): Move some code to ...
516 (gdb_agent_init): ... here. New.
517 [HAVE_UST]: Call gdb_ust_init.
518 (initialize_tracepoint_ftlib): Call gdb_agent_init.
519 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
520 * config.in, configure: Regenerated.
522 2012-03-02 Pedro Alves <palves@redhat.com>
524 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
525 * linux-low.c (struct simple_pid_list): New.
526 (stopped_pids): New a struct simple_pid_list pointer.
527 (add_to_pid_list, pull_pid_from_list): New.
528 (handle_extended_wait): Don't assume the first signal new children
529 report is SIGSTOP. Adjust call to pull_pid_from_list.
530 (linux_wait_for_lwp): Adjust.
532 2012-03-02 Yao Qi <yao@codesourcery.com>
534 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
537 2012-03-02 Yao Qi <yao@codesourcery.com>
539 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
540 `stop_pc' and `tpoint'. Update caller.
542 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
544 * linux-low.h (linux_target_ops): Add regset_bitmap member.
545 * linux-low.c (use_linux_regsets): New macro.
546 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
547 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
548 (linux_register_in_regsets): New function.
549 (usr_fetch_inferior_registers): Skip registers covered by
551 (usr_store_inferior_registers): Likewise.
552 (usr_fetch_inferior_registers): New macro.
553 (usr_store_inferior_registers): Likewise.
554 (linux_fetch_registers): Handle mixed regset/non-regset targets.
555 (linux_store_registers): Likewise.
556 * linux-mips-low.c (init_registers_mips_dsp_linux): New
558 (init_registers_mips64_dsp_linux): Likewise.
559 (init_registers_mips_linux): New macro.
560 (init_registers_mips_dsp_linux): Likewise.
561 (mips_dsp_num_regs): Likewise.
562 (DSP_BASE, DSP_CONTROL): New fallback macros.
563 (mips_base_regs): New macro.
564 (mips_regmap): Use it. Fix the size.
565 (mips_dsp_regmap): New variable.
566 (mips_dsp_regset_bitmap): Likewise.
567 (mips_arch_setup): New function.
568 (mips_cannot_fetch_register): Use the_low_target.regmap rather
570 (mips_cannot_store_register): Likewise.
571 (the_low_target): Update .arch_setup, .num_regs and .regmap
572 initializers. Add .regset_bitmap initializer.
573 * linux-arm-low.c (the_low_target): Add .regset_bitmap
575 * linux-bfin-low.c (the_low_target): Likewise.
576 * linux-cris-low.c (the_low_target): Likewise.
577 * linux-crisv32-low.c (the_low_target): Likewise.
578 * linux-ia64-low.c (the_low_target): Likewise.
579 * linux-m32r-low.c (the_low_target): Likewise.
580 * linux-m68k-low.c (the_low_target): Likewise.
581 * linux-ppc-low.c (the_low_target): Likewise.
582 * linux-s390-low.c (the_low_target): Likewise.
583 * linux-sh-low.c (the_low_target): Likewise.
584 * linux-sparc-low.c (the_low_target): Likewise.
585 * linux-tic6x-low.c (the_low_target): Likewise.
586 * linux-x86-low.c (the_low_target): Likewise.
587 * linux-xtensa-low.c (the_low_target): Likewise.
588 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
589 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
590 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
592 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
593 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
595 2012-02-29 Yao Qi <yao@codesourcery.com>
596 Pedro Alves <palves@redhat.com>
598 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
599 `step_over_finished' is true.
601 2012-02-27 Pedro Alves <palves@redhat.com>
603 * linux-low.c (pid_is_stopped): Delete, moved to common/.
604 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
606 2012-02-27 Pedro Alves <palves@redhat.com>
609 * linux-low.c (pid_is_stopped): New.
610 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
612 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
614 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
617 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
619 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
621 2012-02-24 Luis Machado <lgustavo@codesourcery>
623 * server.c (handle_query): Advertise support for target-side
624 breakpoint condition evaluation.
625 (process_point_options): New function.
626 (process_serial_event): When inserting a breakpoint, check for
627 a target-side condition that should be evaluated.
629 * mem-break.c: Include regcache.h and ax.h.
630 (point_cond_list_t): New data structure.
631 (breakpoint) <cond_list>: New field.
632 (find_gdb_breakpoint_at): Make non-static.
633 (delete_gdb_breakpoint_at): Clear any target-side
635 (clear_gdb_breakpoint_conditions): New function.
636 (add_condition_to_breakpoint): Likewise.
637 (add_breakpoint_condition): Likewise.
638 (gdb_condition_true_at_breakpoint): Likewise.
639 (gdb_breakpoint_here): Return result directly instead
640 of going through a local variable.
642 * mem-break.h (find_gdb_breakpoint_at): New prototype.
643 (clear_gdb_breakpoint_conditions): Likewise.
644 (add_breakpoint_condition): Likewise.
645 (gdb_condition_true_at_breakpoint): Likewise.
647 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
648 (need_step_over_p): Take target-side breakpoint condition into
651 2012-02-24 Luis Machado <lgustavo@codesourcery>
653 * server.h: Include tracepoint.h.
654 (agent_mem_read, agent_get_trace_state_variable_value,
655 agent_set_trace_state_variable_value,
656 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
657 get_set_tsv_func_addr): New prototypes.
659 * ax.h: New include file.
660 * ax.c: New source file.
662 * tracepoint.c: Include ax.h.
663 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
664 agent_expr, eval_result_type): Move to ax.h.
665 (parse_agent_expr): Rename to ...
666 (gdb_parse_agent_expr): ... this, make it non-static and move
668 (unparse_agent_expr) Rename to ...
669 (gdb_unparse_agent_expr): ... this, make it non-static and move
671 (eval_agent_expr): Rename to ...
672 (eval_tracepoint_agent_expr): ... this.
673 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
674 forward declarations.
675 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
676 (agent_get_trace_state_variable_value): New function.
677 (agent_set_trace_state_variable_value): New function.
678 (cmd_qtdp): Call gdb_parse_agent_expr (...).
679 (response_tracepoint): Call gdb_unparse_agent_expr (...).
680 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
681 (condition_true_at_tracepoint): Likewise.
682 (parse_agent_expr): Rename to ...
683 (gdb_parse_agent_expr): ... this and move to ax.c.
684 (unparse_agent_expr): Rename to ...
685 (gdb_unparse_agent_expr): ... this and move to ax.c.
686 (gdb_agent_op_name): Move to ax.c.
687 (eval_agent_expr): Rename to ...
688 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
690 (eval_tracepoint_agent_expr): New function.
691 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
693 (current_insn_ptr, emit_error, struct bytecode_address): Move to
695 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
696 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
697 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
698 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
699 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
700 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
701 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
702 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
703 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
704 (compile_bytecodes): Remove forward declaration.
705 (is_goto_target): Move to ax.c.
706 (compile_bytecodes): Move to ax.c and call
707 agent_get_trace_state_variable_value (...) and
708 agent_set_trace_state_variable_value (...).
710 * Makefile.in: Update ax.c and IPA dependencies.
712 2012-02-24 Pedro Alves <palves@redhat.com>
714 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
715 (cmd_bigqtbuffer_circular): ... this. Only handle
716 'QTBuffer:circular:'.
717 (handle_tracepoint_general_set): Adjust.
719 2012-02-16 Yao Qi <yao@codesourcery.com>
721 * inferiors.c: Move code to ...
722 * dll.c: .... here. New.
723 * server.h: Declare clear_dlls.
724 * Makefile.in (SFILES): Add dll.c.
728 2012-02-11 Yao Qi <yao@codesourcery.com>
730 * server.c: (handle_monitor_command): Add a new parameter
732 (handle_query): Update caller.
734 2012-02-09 Joel Brobecker <brobecker@adacore.com>
736 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
737 * configure, config.in: Regenerate.
738 * hostio.c: Provide an alternate implementation if HAVE_READLINK
741 2012-02-02 Pedro Alves <palves@redhat.com>
743 Try SIGKILL first, then PTRACE_KILL.
744 * linux-low.c (linux_kill_one_lwp): New.
745 (linux_kill_one_lwp): Rename to ...
746 (kill_one_lwp_callback): ... this. Use the new
749 2012-02-02 Pedro Alves <palves@redhat.com>
751 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
754 2012-01-27 Pedro Alves <palves@redhat.com>
756 * linux-low.c (linux_child_pid_to_exec_file): Delete.
757 (elf_64_file_p): Make static.
758 (linux_pid_exe_is_elf_64_file): New.
759 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
761 (linux_pid_exe_is_elf_64_file): Declare.
762 * linux-x86-low.c (x86_arch_setup): Use
763 linux_pid_exe_is_elf_64_file.
765 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
767 * linux-low.c (linux_wait_for_event_1): Rename to ...
768 (linux_wait_for_event): ... here and merge it with former
769 linux_wait_for_event - new variable wait_ptid, use it.
770 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
772 2012-01-23 Pedro Alves <palves@redhat.com>
774 * server.c (main): Avoid yet another case of infinite loop while
775 detaching/killing after a longjmp.
777 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
780 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
782 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
784 * hostio.c (handle_readlink): New function.
785 (handle_vFile): Call it to handle "vFile:readlink" packets.
787 2012-01-20 Pedro Alves <palves@redhat.com>
788 Ulrich Weigand <ulrich.weigand@linaro.org>
790 * server.c (handle_v_requests): Only support vAttach and vRun to
791 start multiple processes when in extended protocol mode.
793 2012-01-17 Pedro Alves <palves@redhat.com>
795 * tracepoint.c (initialize_tracepoint): Use mmap instead of
796 memalign plus mprotect to allocate the scratch buffer.
798 2012-01-13 Pedro Alves <palves@redhat.com>
800 * server.c (attach_inferior): Clear `cont_thread'.
802 2012-01-13 Pedro Alves <palves@redhat.com>
804 * server.c (main): Avoid infinite loop while detaching/killing
807 2012-01-09 Doug Evans <dje@google.com>
809 * server.c (start_inferior): Set last_ptid in --wrapper case.
811 2012-01-06 Yao Qi <yao@codesourcery.com>
813 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
815 [IN_PROCESS_AGENT] (debug_agent): New global variable.
817 2012-01-04 Yao Qi <yao@codesourcery.com>
819 * tracepoint.c (cmd_qtdp): Print debug message
820 for static tracepoint.
822 2012-01-04 Yao Qi <yao@codesourcery.com>
824 * tracepoint.c (trace_vdebug): Differentiate debug message
825 between gdbserver and IPA.
827 2012-01-03 Yao Qi <yao@codesourcery.com>
829 * tracepoint.c (tracepoint_was_hit): Don't collect for
832 2012-01-02 Joel Brobecker <brobecker@adacore.com>
834 * terminal.h: Reformat copyright header.
836 2012-01-02 Joel Brobecker <brobecker@adacore.com>
838 * server.c (gdbserver_version): Update copyright year.
839 * gdbreplay.c (gdbreplay_version): Likewise.
841 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
843 * linux-low.c (linux_create_inferior): Put empty if clause for write.
846 2011-12-18 Hui Zhu <teawater@gmail.com>
847 * linux-low.c (linux_create_inferior): Save return value to ret.
849 2011-12-18 Hui Zhu <teawater@gmail.com>
851 * linux-low.c (linux_create_inferior): Save return value to ret.
853 2011-12-16 Doug Evans <dje@google.com>
855 * linux-low.c (linux_create_inferior): If stdio connection,
856 redirect stdin from /dev/null, stdout to stderr.
857 * remote-utils.c (remote_is_stdio): New static global.
858 (remote_connection_is_stdio): New function.
859 (remote_prepare): Handle stdio connection.
860 (remote_open): Ditto.
861 (remote_close): Don't close stdin for stdio connections.
862 (read_prim,write_prim): New functions. Replace all calls to
864 * server.c (main): Watch for "-" argument. Move call to
865 remote_prepare before start_inferior.
866 * server.h (STDIO_CONNECTION_NAME): New macro.
867 (remote_connection_is_stdio): Declare.
869 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
872 2011-12-15 Yao Qi <yao@codesourcery.com>
874 * tracepoint.c: Include sys/syscall.h.
875 (gdb_ust_thread): Remove preprocessor conditional.
877 2011-12-14 Pedro Alves <pedro@codesourcery.com>
879 * linux-low.c (linux_detach_one_lwp): Call
880 the_low_target.prepare_to_resume before detaching.
882 2011-12-14 Yao Qi <yao@codesourcery.com>
884 * tracepoint.c (gdb_ust_thread): Don't ignore return value
887 2011-12-14 Yao Qi <yao@codesourcery.com>
889 * i386-low.c (i386_low_stopped_data_address): Initialize local
892 2011-12-13 Pedro Alves <pedro@codesourcery.com>
896 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
897 DR_CONTROL unless necessary. Extend comments.
898 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
899 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
901 2011-12-13 Yao Qi <yao@codesourcery.com>
903 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
905 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
907 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
909 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
910 Print new debug message for such case.
912 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
914 Fix overlapping memcpy.
915 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
916 the read_inferior_memory transfer.
917 (delete_fast_tracepoint_jump): New variable buf. Use it for the
918 write_inferior_memory transfer.
919 (set_fast_tracepoint_jump): New variable buf. Use it for the
920 read_inferior_memory and write_inferior_memory transfers.
921 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
922 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
923 Use it for the write_inferior_memory transfer.
924 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
927 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
929 * linux-low.c (fetch_register, store_register): Make code
930 consistent, fix formatting.
932 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
934 * linux-low.c (usr_store_inferior_registers): Factor out code
935 to handle individual registers into...
936 (store_register): ... this new function.
938 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
940 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
941 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
942 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
943 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
944 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
945 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
946 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
947 (srv_xmlfiles): Add new XML files.
949 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
951 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
952 (init_registers_s390_linux32v1): Add prototype.
953 (init_registers_s390_linux32v2): Likewise.
954 (init_registers_s390_linux64v1): Likewise.
955 (init_registers_s390_linux64v2): Likewise.
956 (init_registers_s390x_linux64v1): Likewise.
957 (init_registers_s390x_linux64v2): Likewise.
958 (s390_num_regs): Increment to 52.
959 (s390_regmap): Add orig_r2 register.
960 (s390_num_regs_3264): Increment to 68.
961 (s390_regmap_3264): Add orig_r2 register.
962 (s390_collect_ptrace_register): Handle orig_r2 register.
963 (s390_supply_ptrace_register): Likewise.
964 (s390_fill_last_break): New function.
965 (s390_store_last_break): Likewise.
966 (s390_fill_system_call): New function.
967 (s390_store_system_call): Likewise.
968 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
970 (s390_check_regset): New function.
971 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
972 NT_S390_SYSTEM_CALL regsets and use appropriate description.
973 Update target_regsets for available register sets.
975 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
976 Jan Kratochvil <jan.kratochvil@redhat.com>
978 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
979 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
981 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
982 * linux-low.h (struct process_info_private): New member r_debug.
983 * server.c (handle_qxfer_libraries): Call
984 the_target->qxfer_libraries_svr4.
985 (handle_qxfer_libraries_svr4): New function.
986 (qxfer_packets): New entry "libraries-svr4".
987 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
988 * target.h (struct target_ops): New member qxfer_libraries_svr4.
989 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
990 PACKET_qXfer_libraries_svr4.
992 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
994 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
995 PSW address/mask between 8-byte and 16-byte formats.
996 (s390_supply_ptrace_register): Likewise.
997 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
998 basic addressing mode bit.
1000 2011-11-24 Stan Shebs <stan@codesourcery.com>
1002 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1004 2011-11-17 Stan Shebs <stan@codesourcery.com>
1006 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1007 (tracing_start_time): New global.
1008 (tracing_stop_time): New global.
1009 (tracing_user_name): New global.
1010 (tracing_notes): New global.
1011 (tracing_stop_note): New global.
1012 (cmd_qtstart): Set traceframe_usage, start_time.
1013 (stop_tracing): Set stop_time.
1014 (cmd_qtstatus): Report additional status.
1015 (cmd_qtp): New function.
1016 (handle_tracepoint_query): Call it.
1017 (cmd_qtnotes): New function.
1018 (handle_tracepoint_general_set): Call it.
1019 (get_timestamp): Rename from tsv_get_timestamp.
1021 2011-11-14 Stan Shebs <stan@codesourcery.com>
1022 Kwok Cheung Yeung <kcy@codesourcery.com>
1024 * linux-x86-low.c (small_jump_insn): New.
1025 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1026 trampoline and error message, build a trampoline and issue a small
1027 jump instruction to it.
1028 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1029 trampoline and error message.
1030 (x86_get_min_fast_tracepoint_insn_len): New.
1031 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1032 * linux-low.h (struct linux_target_ops): Add arguments to
1033 install_fast_tracepoint_jump_pad operation, add new operation.
1034 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1036 (linux_get_min_fast_tracepoint_insn_len): New function.
1037 (linux_target_op): Add new operation.
1038 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1039 (gdb_trampoline_buffer_end): Ditto.
1040 (gdb_trampoline_buffer_error): Ditto.
1041 (struct ipa_sym_addresses): Add fields for new IPA variables.
1042 (symbol_list): Add entries for new IPA variables.
1043 (struct tracepoint): Add fields to hold the address range of the
1044 trampoline used by the tracepoint.
1045 (trampoline_buffer_head): New static variable.
1046 (trampoline_buffer_tail): Ditto.
1047 (claim_trampoline_space): New function.
1048 (have_fast_tracepoint_trampoline_buffer): New function.
1049 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1051 (install_fast_tracepoint): Ditto, also add error buffer argument.
1052 (cmd_qtminftpilen): New function.
1053 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1054 (fast_tracepoint_from_trampoline_address): New function.
1055 (fast_tracepoint_collecting): Handle trampoline as part of jump
1057 (set_trampoline_buffer_space): New function.
1058 (initialize_tracepoint): Initialize new IPA variables.
1059 * target.h (struct target_ops): Add arguments to
1060 install_fast_tracepoint_jump_pad operation, add new
1061 get_min_fast_tracepoint_insn_len operation.
1062 (target_get_min_fast_tracepoint_insn_len): New.
1063 (install_fast_tracepoint_jump_pad): Add arguments.
1064 * server.h (IPA_BUFSIZ): Define.
1065 * linux-i386-ipa.c: Include extra header files.
1066 (initialize_fast_tracepoint_trampoline_buffer): New function.
1067 (initialize_low_tracepoint): Call it.
1068 * server.h (set_trampoline_buffer_space): Declare.
1069 (claim_trampoline_space): Ditto.
1070 (have_fast_tracepoint_trampoline_buffer): Ditto.
1072 2011-11-14 Yao Qi <yao@codesourcery.com>
1074 * server.c (handle_query): Handle InstallInTrace for qSupported.
1075 * tracepoint.c (add_tracepoint): Sort list.
1076 (install_tracepoint, download_tracepoint): New.
1077 (cmd_qtdp): Call them to install and download tracepoints.
1078 (sort_tracepoints): Removed.
1079 (cmd_qtstart): Update.
1081 2011-11-14 Yao Qi <yao@codesourcery.com>
1083 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1084 * mem-break.h: Declare.
1085 * tracepoint.c (cmd_qtstart): Move some code to ...
1086 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1088 (download_tracepoints): Move some code to ...
1089 (download_tracepoint_1): ... here. New.
1091 2011-11-08 Yao Qi <yao@codesourcery.com>
1093 * remote-utils.c (relocate_instruction): A comment fix.
1095 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1097 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1098 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1099 dr_status_mirror and dr_control_mirror from debug_reg_state.
1100 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1101 (i386_initial_stuff): Remove use of deleted globals.
1102 (i386_get_thread_context, i386_set_thread_context,
1103 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1104 from debug_reg_state.
1106 2011-11-05 Yao Qi <yao@codesourcery.com>
1108 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1109 address as TPOINT's.
1111 2011-11-02 Stan Shebs <stan@codesourcery.com>
1113 * tracepoint.c (agent_mem_read_string): New function.
1114 (eval_agent_expr): Call it for tracenz.
1115 * server.c (handle_query): Report support for tracenz.
1117 2011-11-02 Yao Qi <yao@codesourcery.com>
1119 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1121 2011-11-02 Yao Qi <yao@codesourcery.com>
1123 * target.h: Fix a typo in comment.
1125 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1127 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1128 clobber the breakpoints' shadows with fast tracepoint jumps.
1129 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1130 * target.c (write_inferior_memory): Also pass MYADDR down to
1133 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1135 * configure.ac: Check support for personality routine.
1136 * configure: Regenerate.
1137 * config.in: Likewise.
1138 * linux-low.c: Include <sys/personality.h>.
1139 Define ADDR_NO_RANDOMIZE if necessary.
1140 (linux_create_inferior): Disable address space randomization when
1141 forking inferior, if requested.
1142 (linux_supports_disable_randomization): New function.
1143 (linux_target_ops): Install it.
1144 * server.h (disable_randomization): Declare.
1145 * server.c (disable_randomization): New global variable.
1146 (handle_general_set): Handle QDisableRandomization.
1147 (handle_query): Likewise for qSupported.
1148 (main): Support --disable-randomization and --no-disable-randomization
1149 command line arguments.
1150 * target.h (struct target_ops): Add supports_disable_randomization.
1151 (target_supports_disable_randomization): New macro.
1153 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1155 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1157 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1158 [!PT_GETDSBT] (target_loadmap): New definition.
1159 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1160 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1161 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1162 and PT_GETDSBT to LINUX_LOADMAP.
1163 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1164 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1166 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1168 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1169 (arm_linux_hwbp_cap): New static variable.
1170 (arm_linux_get_hwbp_cap): Replace by ...
1171 (arm_linux_init_hwbp_cap): ... this new function.
1172 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1173 (arm_linux_get_hw_watchpoint_count): Likewise.
1174 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1175 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1176 (arm_prepare_to_resume): Use perror_with_name instead of error.
1178 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1180 * linux-arm-low.c: Include <signal.h>.
1181 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1182 (struct arm_linux_hwbp_cap): New data type.
1183 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1184 (struct arm_linux_hw_breakpoint): New data type.
1185 (MAX_BPTS, MAX_WPTS): Define.
1186 (struct arch_process_info, struct arch_lwp_info): New data types.
1187 (arm_linux_get_hwbp_cap): New function.
1188 (arm_linux_get_hw_breakpoint_count): Likewise.
1189 (arm_linux_get_hw_watchpoint_count): Likewise.
1190 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1191 (arm_hwbp_control_initialize): Likewise.
1192 (arm_hwbp_control_is_enabled): Likewise.
1193 (arm_hwbp_control_is_initialized): Likewise.
1194 (arm_hwbp_control_disable): Likewise.
1195 (arm_linux_hw_breakpoint_equal): Likewise.
1196 (arm_linux_hw_point_initialize): Likewise.
1197 (struct update_registers_data): New data structure.
1198 (update_registers_callback: New function.
1199 (arm_insert_point): Likewise.
1200 (arm_remove_point): Likewise.
1201 (arm_stopped_by_watchpoint): Likewise.
1202 (arm_stopped_data_address): Likewise.
1203 (arm_new_process): Likewise.
1204 (arm_new_thread): Likewise.
1205 (arm_prepare_to_resume): Likewise.
1206 (the_low_target): Register arm_insert_point, arm_remove_point,
1207 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1208 arm_new_thread, and arm_prepare_to_resume.
1210 2011-09-15 Stan Shebs <stan@codesourcery.com>
1212 * server.h (struct emit_ops): Add compare-goto fields.
1213 * tracepoint.c (gdb_agent_op_sizes): New table.
1214 (emit_eq_goto): New function.
1215 (emit_ne_goto): New function.
1216 (emit_lt_goto): New function.
1217 (emit_le_goto): New function.
1218 (emit_gt_goto): New function.
1219 (emit_ge_goto): New function.
1220 (is_goto_target): New function.
1221 (compile_bytecodes): Recognize special cases of compare-goto
1222 combinations and call specialized emitters for them.
1223 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1224 (amd64_emit_ne_goto): New function.
1225 (amd64_emit_lt_goto): New function.
1226 (amd64_emit_le_goto): New function.
1227 (amd64_emit_gt_goto): New function.
1228 (amd64_emit_ge_goto): New function.
1229 (amd64_emit_ops): Add the new functions.
1230 (i386_emit_eq_goto): New function.
1231 (i386_emit_ne_goto): New function.
1232 (i386_emit_lt_goto): New function.
1233 (i386_emit_le_goto): New function.
1234 (i386_emit_gt_goto): New function.
1235 (i386_emit_ge_goto): New function.
1236 (i386_emit_ops): Add the new functions.
1238 2011-09-08 Stan Shebs <stan@codesourcery.com>
1240 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1241 (i386_emit_epilogue): Restore %ebx.
1243 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1245 * server.c (step_thread): Remove definition.
1246 (process_serial_event): Don't handle Hs.
1247 * server.h (step_thread): Remove declaration.
1248 * target.c (set_desired_inferior): Remove use of step_thread.
1250 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1252 * linux-low.c: Include linux-procfs.h.
1253 (linux_attach_lwp_1): Update comments.
1254 (linux_attach): Scan for existing threads when attaching to a
1255 process that is the tgid.
1256 * Makefile.in: Update dependencies.
1258 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1260 * configure.srv: Add linux-procfs.o dependencies.
1262 2011-08-14 Yao Qi <yao@codesourcery.com>
1264 * target.h (struct target_ops): Fix indent.
1265 * win32-low.c (win32_target_ops): Fix comment.
1267 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1268 Yao Qi <yao@codesourcery.com>
1270 * Makefile.in (clean): Remove tic6x-*.c files.
1271 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1272 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1273 (tic6x-c64xp-linux.c): Likewise.
1274 * configure.srv: Add support for tic6x-*-uclinux.
1275 * linux-tic6x-low.c: New.
1276 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1278 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1279 Yao Qi <yao@codesourcery.com>
1281 * target.h (struct target_ops): Add read_loadmap.
1282 * linux-low.c (struct target_loadseg): New type.
1283 (struct target_loadmap): New type.
1284 (linux_read_loadmap): New function.
1285 (linux_target_ops): Add linux_read_loadmap.
1286 * server.c (handle_query): Support qXfer:fdpic:read packet.
1287 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1289 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1291 * win32-low.c: Include <stdint.h>.
1293 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1295 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1296 to the inferior here.
1297 (i386_remove_aligned_watchpoint): Ditto.
1298 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1299 fit part of the watchpoint in the debug registers.
1300 (i386_update_inferior_debug_regs): New.
1301 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1302 registers, and only update the inferior on success.
1303 (i386_low_remove_watchpoint): Ditto.
1305 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1307 * linux-low.c (compare_ints, unique, list_threads, show_process,
1308 linux_core_of_thread): Delete.
1309 (linux_target_ops): Change linux_core_of_thread to
1310 linux_common_core_of_thread.
1311 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1312 * utils.c (malloc_failure): Change type of argument.
1313 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1314 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1315 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1316 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1317 (IPA_OBJS): Add common-utils-ipa.o.
1318 (ptid_h, linux_osdata_h): New macros.
1319 (server_h): Add common/common-utils.h, common/xml-utils.h,
1320 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1322 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1323 ptid.o, buffer.o): New rules.
1324 (linux-low.o): Add common/linux-osdata.h as a dependency.
1325 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1326 * configure.ac: Add AC_HEADER_DIRENT check.
1327 * config.in: Regenerate.
1328 * configure: Regenerate.
1329 * remote-utils.c (xml_escape_text): Delete.
1330 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1331 buffer_xml_printf): Move to common/buffer.c.
1332 * server.c (main): Remove call to initialize_inferiors.
1333 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1334 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1335 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1336 internal_error, gdb_assert, gdb_assert_fail): Delete.
1337 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1338 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1340 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1341 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1342 initialize_inferiors): Delete.
1344 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1346 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1349 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1351 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1353 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1355 2011-05-26 Yao Qi <yao@codesourcery.com>
1357 * Makefile.in (thread-db.o): Track dependence to
1358 common/gdb_thread_db.h.
1359 * thread-db.c: include gdb_thread_db.h from right place.
1361 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1363 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1364 __FILE__ and __LINE__ to internal_error.
1366 2011-05-13 Doug Evans <dje@google.com>
1368 * thread-db.c (try_thread_db_load_from_sdir): New function.
1369 (try_thread_db_load_from_dir): New function.
1370 (thread_db_load_search): Handle $sdir, ignore $pdir.
1371 Remove trying of system directories if search of
1372 libthread-db-search-path fails, that is now done via $sdir.
1374 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1376 * server.c (handle_query): Add EnableDisableTracepoints to the list
1377 of supported features.
1378 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1380 (cmd_qtenable_disable): New.
1381 (cmd_qtstart): Install tracepoints even if disabled.
1382 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1383 receiving a QTEnable or QTDisable packet.
1384 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1385 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1387 (gdb_probe): Skip data collection if static tracepoint is disabled.
1389 2011-05-10 Doug Evans <dje@google.com>
1391 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1393 2011-05-04 Doug Evans <dje@google.com>
1395 * linux-low.c (linux_join): Skip process lookup.
1396 * spu-low.c (spu_join): Ditto.
1397 * server.c (join_inferiors_callback): Delete.
1398 (process_serial_event): For 'D' packet (detach) call join_inferior
1401 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1403 * README: Don't mention xscale*-*-linux*.
1404 * configure.srv (xscale*-*-linux*): Don't handle target.
1406 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1408 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1410 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1411 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1412 (i386_emit_void_call_2): Likewise.
1414 2011-04-26 Yao Qi <yao@codesourcery.com>
1416 * linux-low.c: Move common macros to linux-ptrace.h.
1417 Include linux-ptrace.h.
1418 * Makefile.in (linux_ptrace_h): New.
1419 (linux-low.o): Depends on linux-ptrace.h.
1421 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1423 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1424 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1425 (remote_prepare): New function with most of the TCP code from ...
1426 (remote_open): ... here. Detect PORT here unconditionally. Move also
1427 setting transport_is_reliable.
1428 * server.c (run_once): New variable.
1429 (gdbserver_usage): Document it.
1430 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1431 the first run if RUN_ONCE.
1432 * server.h (run_once, remote_prepare): New declarations.
1434 2011-04-19 Tom Tromey <tromey@redhat.com>
1436 * win32-low.c (handle_load_dll): Remove duplicate "the".
1438 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1440 Remove support for old Cygwin 1.5 versions.
1441 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1442 function to avoid warning.
1443 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1446 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1448 * gdbserver/server.h (Macro _): Define it if not available.
1450 2011-03-14 Michael Snyder <msnyder@vmware.com>
1452 * hostio.c (handle_close): Remove unnecessary null test.
1454 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1456 * Makefile.in (maintainer-clean realclean distclean): Remove
1457 "make ... subdir_do" command.
1459 2011-03-10 Michael Snyder <msnyder@vmware.com>
1461 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1463 * server.c (handle_v_run): Free alloced buffer on early return.
1465 2011-03-09 Yao Qi <yao@codesourcery.com>
1468 2011-03-04 Yao Qi <yao@codesourcery.com>
1470 * Makefile.in: Remove GNU make feature --directory.
1472 2011-03-05 Yao Qi <yao@codesourcery.com>
1474 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1475 (subdir_do): New make target. Copied from gdb/Makefile.
1476 (maintainer-clean, realclean, distclean, clean): Call corresponding
1477 make targets in common/Makefile.
1479 2011-02-11 Yao Qi <yao@codesourcery.com>
1481 * configure.ac: Call AC_PROG_RANLIB.
1482 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1483 * configure: Regenerate.
1485 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1487 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1489 2011-03-06 Yao Qi <yao@codesourcery.com>
1491 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1493 2011-03-05 Yao Qi <yao@codesourcery.com>
1495 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1496 (subdir_do): New make target. Copied from gdb/Makefile.
1497 (maintainer-clean, realclean, distclean, clean): Call corresponding
1498 make targets in common/Makefile.
1500 2011-03-04 Yao Qi <yao@codesourcery.com>
1502 * Makefile.in: Remove GNU make feature --directory.
1504 2011-03-04 Michael Snyder <msnyder@vmware.com>
1506 * server.c (queue_stop_reply): Call xmalloc not malloc.
1508 2011-03-02 Michael Snyder <msnyder@vmware.com>
1510 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1512 2011-02-28 Michael Snyder <msnyder@vmware.com>
1514 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1515 (cmd_qtframe): Ditto.
1516 (cmd_qtbuffer): Ditto.
1517 (cmd_bigqtbuffer): Ditto.
1519 * utils.c (decimal2str): Initialize 'width' to nine, then
1522 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1524 * hostio.c (require_data): Free *data, not data.
1526 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1528 * hostio.c (require_data): Use free, not xfree.
1530 2011-02-27 Michael Snyder <msnyder@vmware.com>
1532 * server.c (handle_query): Discard unused value.
1534 * hostio.c (require_data): Free malloc memory before returning
1537 2011-02-26 Michael Snyder <msnyder@vmware.com>
1539 * linux-low.c (list_threads): Call closedir for dirent.
1541 2011-02-27 Michael Snyder <msnyder@vmware.com>
1543 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1544 a case statement falls through.
1546 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1548 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1551 2011-02-26 Michael Snyder <msnyder@vmware.com>
1553 * utils.c (decimal2str): Eliminate dead code and dead param.
1554 (pulongest): Drop dead param from call to decimal2str.
1557 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1559 Revert the following patch (not approved yet):
1560 2011-02-21 Hui Zhu <teawater@gmail.com>
1561 * tracepoint.c (tp_printf): New function.
1562 (eval_agent_expr): Handle gdb_agent_op_printf.
1564 2011-02-21 Hui Zhu <teawater@gmail.com>
1566 * tracepoint.c (tp_printf): New function.
1567 (eval_agent_expr): Handle gdb_agent_op_printf.
1569 2011-02-18 Tom Tromey <tromey@redhat.com>
1571 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1572 (tracepoint.o): Likewise.
1573 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1574 (gdb_agent_op_names): Likewise.
1576 2011-02-18 Tom Tromey <tromey@redhat.com>
1578 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1579 gdb_agent_op_rot>: New constants.
1580 (gdb_agent_op_names): Add pick and roll.
1581 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1584 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1586 * aclocal.m4: Regenerated with aclocal-1.11.1.
1588 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1590 * server.c (handle_qxfer_traceframe_info): New.
1591 (qxfer_packets): Register "traceframe-info".
1592 (handle_query): Report support for qXfer:traceframe-info:read+.
1593 * tracepoint.c (match_blocktype): New.
1594 (traceframe_find_block_type): Rename to ...
1595 (traceframe_walk_blocks): ... this. Add callback filter argument,
1597 (traceframe_find_block_type): New, reimplemented on top of
1598 traceframe_walk_blocks.
1599 (build_traceframe_info_xml): New.
1600 (traceframe_read_info): New.
1601 * server.h (traceframe_read_info): Declare.
1603 2011-02-11 Yao Qi <yao@codesourcery.com>
1605 * configure.ac: Call AC_PROG_RANLIB.
1606 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1607 * configure: Regenerate.
1609 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1611 * server.c (gdb_read_memory): Change return semantics to allow
1613 (handle_search_memory_1): Adjust.
1614 (process_serial_event) <'m' packet>: Handle partial transfers.
1615 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1617 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1619 * regcache.c (init_register_cache): Initialize
1620 regcache->register_status.
1621 (free_register_cache): Release regcache->register_status.
1622 (regcache_cpy): Copy register_status.
1623 (registers_to_string): Print 'x's for unavailable registers.
1624 (supply_register): Mark the register's status valid or
1625 unavailable, depending on whether a buffer was passed in or not.
1626 (supply_register_zeroed): New.
1627 (supply_regblock): Mark the registers' status valid or
1628 unavailable, depending on whether a buffer was passed in or not.
1629 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1630 (struct regcache): New `register_status' field.
1631 (supply_register_zeroed): Declare.
1632 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1633 supply_register_zeroed, rather than passing a NULL buffer to
1635 * tracepoint.c (fetch_traceframe_registers): Update comment.
1637 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1639 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1642 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1644 * server.h (decode_xfer_write): Change prototype.
1645 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1646 and don't extract the annex here.
1647 * server.c (decode_xfer_read): Remove `annex' parameter,
1648 and don't extract the annex here.
1650 (struct qxfer): New.
1651 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1652 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1653 (handle_qxfer_statictrace): New functions, abstracted out from
1654 handle_query, and made to use the struct qxfer interface.
1655 (handle_threads_qxfer_proper): Rename to ...
1656 (handle_qxfer_threads_proper): ... this.
1657 (handle_threads_qxfer): Rename to ...
1658 (handle_qxfer_threads): ... this. Adjust.
1659 (qxfer_packets): New array.
1660 (handle_qxfer): New function.
1661 (handle_query): Use handle_qxfer.
1663 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1665 * gdbreplay.c: Shorten lines of >= 80 columns.
1666 * linux-low.c: Ditto.
1667 * linux-ppc-low.c: Ditto.
1668 * linux-s390-low.c: Ditto.
1669 * linux-sparc-low.c: Ditto.
1670 * linux-x86-low.c: Ditto.
1671 * linux-xtensa-low.c: Ditto.
1672 * mem-break.c: Ditto.
1674 * regcache.h: Ditto.
1675 * remote-utils.c: Ditto.
1678 * thread-db.c: Ditto.
1679 * tracepoint.c: Ditto.
1681 * win32-low.h: Ditto.
1683 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1685 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1688 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1690 * server.c (gdbserver_version): Update copyright year in version
1692 * gdbreplay.c (gdbreplay_version): Ditto.
1694 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1696 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1697 * linux-bfin-low.c: New file.
1698 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1699 PT_DATA_ADDR for BFIN targets.
1700 * Makefile.in (SFILES): Add linux-bfin-low.c.
1701 (clean): Remove reg-bfin.c.
1702 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1703 * README: Mention supported Blackfin targets.
1705 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1707 * .gitignore: New file.
1709 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1711 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1713 2010-10-22 Jie Zhang <jie@codesourcery.com>
1715 * Makefile.in: Add FLAGS_TO_PASS variable.
1716 (install): Remove dependency of install-only and recursively
1717 invoke make for install-only.
1719 2010-10-04 Doug Evans <dje@google.com>
1721 * Makefile.in (uninstall): Use $(DESTDIR).
1723 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1727 * linux-x86-low.c (compat_siginfo_from_siginfo)
1728 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1729 si_code is < 0. Check for si_code == SI_TIMER before checking for
1732 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1734 * lynx-i386-low.c: New file.
1735 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1737 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1739 * lynx-low.c (ptrace_request_to_str): Remove handling for
1740 request values that have been removed in LynxOS 5.x.
1742 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1744 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1747 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1749 * configure.ac: Add --enable-inprocess-agent option.
1750 * configure: Rebuilt.
1752 2010-09-06 Yao Qi <yao@codesourcery.com>
1754 * linux-low.c (linux_kill): Remove unused variable.
1755 (linux_stabilize_threads): Likewise.
1756 * server.c (start_inferior): Likewise.
1757 (queue_stop_reply_callback): Likewise.
1758 * tracepoint.c (do_action_at_tracepoint): Likewise.
1760 2010-09-06 Yao Qi <yao@codesourcery.com>
1762 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1765 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1767 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1769 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1771 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1774 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1776 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1777 gdbserver/lynx-ppc-low.c: New files.
1778 * Makefile.in (lynx_low_h): New variable.
1779 (lynx-low.o, lynx-ppc-low.o): New rules.
1780 * configure.ac: On LynxOS, link with -lnetinet.
1781 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1782 * configure: regenerate.
1784 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1786 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1787 * configure.ac: Add check for vasprintf and vsnprintf.
1788 * configure, config.in: Regenerate.
1789 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1791 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1793 * gdbreplay.c: Move include of alloca.h up, next to include of
1795 * server.h: Add include of malloc.h.
1796 * mem-break.c: Remove include of malloc.h.
1797 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1799 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1801 * Makefile.in (memmem.o): Build with -Wno-error.
1803 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1805 * utils.c (xsnprintf): Make non-static.
1806 * server.h: Add xsnprintf declaration.
1807 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1808 replace calls to snprintf by calls to xsnprintf throughout.
1810 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1812 * configure.ac: Add configure check for alloca.
1813 * configure, config.in: Regenerate.
1814 * server.h: Include alloca.h if it exists.
1815 * gdbreplay.c: Include alloca.h if it exists.
1817 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1819 * linux-low.c (__SIGRTMIN): Define if not already defined.
1820 (linux_create_inferior): Check for __ANDROID__ rather than
1822 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1823 are already deferred.
1824 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1825 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1826 stopped and already has a pending signal to report.
1827 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1828 a pending signal to report or is moving out of a jump pad.
1829 (linux_init_signals): Check for __ANDROID__ rather than
1832 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1834 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1835 debug_threads check. Avoid a linear search when not doing debug
1838 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1840 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1841 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1842 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1843 (process_event): Change local fd's type to gdb_fildes_t.
1844 (create_file_handler): Adjust prototype.
1845 (delete_file_handler): Adjust prototype.
1846 (handle_file_event): Adjust prototype. Use pfildes.
1847 (create_file_event): Adjsut prototype.
1848 * remote-utils.c (remote_desc, listen_desc): Change type to
1850 * server.h: New gdb_fildes_t typedef.
1851 [USE_WIN32API]: Include winsock2.h.
1852 (delete_file_handler, add_file_handler): Adjust prototypes.
1854 * utils.c (pfildes): New.
1856 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1858 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1859 * configure: Regenerate.
1861 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1863 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1864 (linux_done_accessing_memory): ... this.
1865 (linux_target_ops): Adjust.
1866 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1867 * nto-low.c (nto_target_ops): Adjust comment.
1868 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1869 * spu-low.c (spu_target_ops): Adjust comment.
1870 * target.h (target_ops): Rename unprepare_to_access_memory field
1871 to done_accessing_memory.
1872 (unprepare_to_access_memory): Rename to ...
1873 (done_accessing_memory): ... this.
1875 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1877 * linux-low.c (linux_prepare_to_access_memory): New.
1878 (linux_unprepare_to_access_memory): New.
1879 (linux_target_ops): Install them.
1880 * server.c (read_memory): Rename to ...
1881 (gdb_read_memory): ... this. Use
1882 prepare_to_access_memory/prepare_to_access_memory.
1883 (write_memory): Rename to ...
1884 (gdb_write_memory): ... this. Use
1885 prepare_to_access_memory/prepare_to_access_memory.
1886 (handle_search_memory_1): Adjust.
1887 (process_serial_event): Adjust.
1888 * target.h (struct target_ops): New fields
1889 prepare_to_access_memory and unprepare_to_access_memory.
1890 (prepare_to_access_memory, unprepare_to_access_memory): New.
1891 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1892 prepare_to_access_memory/prepare_to_access_memory.
1893 * nto-low.c (nto_target_ops): Adjust.
1894 * spu-low.c (spu_target_ops): Adjust.
1895 * win32-low.c (win32_target_ops): Adjust.
1897 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1899 * Makefile.in (WARN_CFLAGS): Get it from configure.
1900 (WERROR_CFLAGS): New.
1901 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1902 * configure.ac: Introduce --enable-werror, which adds -Werror to
1903 the compiler command line. Enabled by default. Disable with
1904 --disable-werror. Add -Wdeclaration-after-statement
1905 Wpointer-arith and -Wformat-nonliteral to warning flags.
1906 * configure: Regenerate.
1908 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1910 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1912 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1914 * gdbreplay.c (remote_error): New.
1916 (expect): Use gdbchar. Check for error reading from GDB.
1917 Clarify sync error output.
1918 (play): Check for errors writing to GDB.
1919 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1920 * remote-utils.c (getpkt): Check for errors writing to the remote
1923 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1925 * linux-low.c (linux_wait_1): Move non-debugging code out of
1926 `debug_threads' control.
1928 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1930 * linux-low.c (linux_wait_1): Don't set last_status here.
1931 * server.c (push_event, queue_stop_reply_callback): Assert we're
1932 not pushing a TARGET_WAITKIND_IGNORE event.
1933 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1934 (myresume, handle_target_event): Set the thread's last_resume_kind
1935 and last_status from the target returned status.
1937 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1941 * linux-x86-low.c (update_debug_registers_callback): New.
1942 (i386_dr_low_set_addr): Use it.
1943 (i386_dr_low_get_addr): New.
1944 (i386_dr_low_set_control): Use update_debug_registers_callback.
1945 (i386_dr_low_get_control): New.
1946 (i386_dr_low_get_status): Adjust.
1947 * linux-low.c (linux_stop_lwp): New.
1948 * linux-low.h (linux_stop_lwp): Declare.
1950 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1951 argument instead of a i386_debug_reg_state.
1952 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1953 a i386_debug_reg_state.
1954 (i386_insert_aligned_watchpoint): Adjust.
1955 (i386_remove_aligned_watchpoint): Adjust.
1956 (i386_low_stopped_data_address): Read the debug registers from the
1957 inferior instead of from the mirrors.
1958 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1959 (i386_dr_low_get_addr): Declare.
1960 (i386_dr_low_get_control): Declare.
1961 (i386_dr_low_get_status): Change prototype.
1963 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1964 (i386_dr_low_get_addr): New.
1965 (i386_dr_low_get_control): New.
1966 (i386_dr_low_get_status): Adjust prototype. Return
1968 (i386_initial_stuff): Clear dr_status_mirror and
1970 (i386_get_thread_context): Adjust.
1971 (i386_set_thread_context): Adjust.
1972 (i386_thread_added): Adjust.
1974 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1976 * linux-low.h (linux_thread_area): Delete declaration.
1978 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1980 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1981 after its termination.
1983 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1985 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1986 (gdb_wants_all_stopped): Delete.
1987 (linux_wait_1): Don't call them.
1988 * server.c (handle_v_cont): Tag all threads as want-stopped.
1989 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1990 stopped as "client-wants-stopped".
1992 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1994 * Makefile.in (signals_h): New.
1995 (server_h): Depend on it.
1996 (server.o): Don't depend on $(signals_def).
1997 (signals.o): Depend on $(signals_def).
1999 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2001 * Makefile.in (signals_def): New.
2002 (server_h): Append include/gdb/signals.h and signals_def.
2003 (server.o): Append signals_def.
2005 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2007 * server.c (handle_target_event): Use target_signal_to_host for
2008 resume_info.sig initialization.
2009 * target.h (struct thread_resume) <sig>: New comment.
2011 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2013 * server.c (handle_query): strcpy() the returned string from paddress()
2014 instead of sprintf().
2015 * utils.c (paddress): Return phex_nz().
2017 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2019 * server.c (handle_v_cont): Call mourn_inferior if process
2021 (myresume): Likewise.
2023 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2025 Static tracepoints, and integration with UST.
2027 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2028 * mem-break.c (uninsert_all_breakpoints)
2029 (reinsert_all_breakpoints): New.
2030 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2031 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2032 (gdb_agent_ust_loaded, helper_thread_id)
2033 (gdb_agent_helper_thread_id): New macros.
2034 (struct ipa_sym_addresses): Add addr_ust_loaded,
2035 addr_helper_thread_id, addr_cmd_buf.
2036 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2037 (in_process_agent_loaded_ust): New.
2038 (write_e_ust_not_loaded): New.
2039 (maybe_write_ipa_ust_not_loaded): New.
2040 (struct collect_static_trace_data_action): New.
2041 (enum tracepoint_type) <static_tracepoint>: New.
2042 (struct tracepoint) <handle>: Mention static tracepoints.
2043 (struct static_tracepoint_ctx): New.
2044 (CMD_BUF_SIZE): New.
2045 (add_tracepoint_action): Handle static tracepoint actions.
2046 (unprobe_marker_at): New.
2047 (clear_installed_tracepoints): Handle static tracepoints.
2048 (cmd_qtdp): Handle static tracepoints.
2049 (probe_marker_at): New.
2050 (cmd_qtstart): Handle static tracepoints.
2051 (response_tracepoint): Handle static tracepoints.
2052 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2053 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2054 (get_context_regcache): Handle static tracepoints.
2055 (do_action_at_tracepoint): Handle static tracepoint actions.
2056 (traceframe_find_block_type): Handle static trace data blocks.
2057 (traceframe_read_sdata): New.
2058 (download_tracepoints): Download static tracepoint actions.
2059 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2060 (GDB_PROBE_NAME): New.
2065 (ust_marker_to_static_tracepoint): New.
2067 (collect_ust_data_at_tracepoint): New.
2068 (gdb_ust_probe): New.
2069 (UNIX_PATH_MAX, SOCK_DIR): New.
2070 (gdb_ust_connect_sync_socket): New.
2071 (resume_thread, stop_thread): New.
2072 (run_inferior_command): New.
2073 (init_named_socket): New.
2074 (gdb_ust_socket_init): New.
2075 (cstr_to_hexstr): New.
2077 (first_marker, next_marker): New.
2078 (response_ust_marker): New.
2079 (cmd_qtfstm, cmd_qtsstm): New.
2080 (unprobe_marker_at, probe_marker_at): New.
2081 (cmd_qtstmat, gdb_ust_thread): New.
2082 (gdb_ust_init): New.
2083 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2084 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2086 (x86_64_st_collect_regmap): New.
2087 (X86_64_NUM_ST_COLLECT_GREGS): New.
2088 (AMD64_RIP_REGNUM): New.
2089 (supply_static_tracepoint_registers): New.
2090 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2092 (i386_st_collect_regmap): New.
2093 (i386_NUM_ST_COLLECT_GREGS): New.
2094 (supply_static_tracepoint_registers): New.
2095 * server.c (handle_query): Handle qXfer:statictrace:read.
2096 <qSupported>: Report support for StaticTracepoints, and
2097 qXfer:statictrace:read features.
2098 * server.h (traceframe_read_sdata)
2099 (supply_static_tracepoint_registers): Declare.
2100 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2101 (unpack_varlen_hex): Include in IPA build.
2102 * Makefile.in (ustlibs, ustinc): New.
2103 (IPA_OBJS): Add remote-utils-ipa.o.
2104 ($(IPA_LIB)): Link -ldl and -lpthread.
2106 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2107 * config.in, configure: Regenerate.
2109 2010-06-20 Ian Lance Taylor <iant@google.com>
2110 Pedro Alves <pedro@codesourcery.com>
2112 * linux-x86-low.c (always_true): Delete.
2113 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2114 trying to fool the compiler with always_true.
2116 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2118 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2119 conditions in gdbserver.
2121 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2123 * spu-low.c (spu_read_memory): Wrap around local store limit.
2124 (spu_write_memory): Likewise.
2126 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2128 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2129 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2131 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2133 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2134 uses with LONGEST uses.
2136 2010-06-14 Stan Shebs <stan@codesourcery.com>
2137 Pedro Alves <pedro@codesourcery.com>
2141 * linux-x86-low.c: Include limits.h.
2146 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2147 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2148 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2149 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2150 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2151 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2152 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2153 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2154 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2155 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2156 (amd64_emit_void_call_2): New.
2157 (amd64_emit_ops): New.
2158 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2159 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2160 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2161 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2162 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2163 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2164 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2165 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2166 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2167 (i386_emit_stack_adjust, i386_emit_int_call_1)
2168 (i386_emit_void_call_2): New.
2169 (i386_emit_ops): New.
2170 (x86_emit_ops): New.
2171 (the_low_target): Install x86_emit_ops.
2172 * server.h (struct emit_ops): New.
2173 (get_raw_reg_func_addr): Declare.
2174 (current_insn_ptr, emit_error): Declare.
2175 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2176 (set_trace_state_variable_value): New defines.
2177 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2178 addr_get_trace_state_variable_value and
2179 addr_set_trace_state_variable_value.
2180 (symbol_list): New fields for get_raw_reg,
2181 get_trace_state_variable_value and set_trace_state_variable_value.
2182 (condfn): New typedef.
2183 (struct tracepoint): New field `compiled_cond'.
2184 (do_action_at_tracepoint): Clear compiled_cond.
2185 (get_trace_state_variable_value, set_trace_state_variable_value):
2187 (condition_true_at_tracepoint): If there's a compiled condition,
2189 (current_insn_ptr, emit_error): New globals.
2190 (struct bytecode_address): New.
2191 (get_raw_reg_func_addr): New.
2192 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2193 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2194 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2195 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2196 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2197 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2198 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2199 (compile_tracepoint_condition, compile_bytecodes): New.
2200 * target.h (emit_ops): Forward declare.
2201 (struct target_ops): New field emit_ops.
2202 (target_emit_ops): New.
2203 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2204 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2205 * linux-low.c (linux_emit_ops): New.
2206 (linux_target_ops): Install it.
2207 * linux-low.h (struct linux_target_ops): New field emit_ops.
2209 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2211 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2212 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2214 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2215 Stan Shebs <stan@codesourcery.com>
2217 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2218 (all): Depend on $(extra_libraries).
2219 (install-only): Install the IPA.
2220 (IPA_OBJS, IPA_LIB): New.
2221 (clean): Remove the IPA lib.
2222 (IPAGENT_CFLAGS): New.
2223 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2224 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2225 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2226 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2227 * configure.ac: Check for atomic builtins support in the compiler.
2228 (IPA_DEPFILES, extra_libraries): Define.
2229 * configure.srv (ipa_obj): Add description.
2230 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2231 (i[34567]86-*-linux*): Set ipa_obj.
2232 (x86_64-*-linux*): Set ipa_obj.
2233 * linux-low.c (stabilizing_threads): New.
2234 (supports_fast_tracepoints): New.
2235 (linux_detach): Stabilize threads before detaching.
2236 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2237 the lwp is either not stabilizing, or is moving out of a jump pad.
2238 (linux_fast_tracepoint_collecting): New.
2239 (maybe_move_out_of_jump_pad): New.
2240 (enqueue_one_deferred_signal): New.
2241 (dequeue_one_deferred_signal): New.
2242 (linux_wait_for_event_1): If moving out of a jump pad, defer
2243 pending signals to later.
2244 (linux_stabilize_threads): New.
2245 (linux_wait_1): Check if threads need moving out of jump pads, and
2247 (stuck_in_jump_pad_callback): New.
2248 (move_out_of_jump_pad_callback): New.
2250 (linux_resume_one_lwp): Handle moving out of jump pads.
2251 (linux_set_resume_request): Dequeue deferred signals.
2252 (need_step_over_p): Also step over fast tracepoint jumps.
2253 (start_step_over): Also uninsert fast tracepoint jumps.
2254 (finish_step_over): Also reinsert fast tracepoint jumps.
2255 (linux_install_fast_tracepoint_jump): New.
2256 (linux_target_ops): Install linux_stabilize_threads and
2257 linux_install_fast_tracepoint_jump_pad.
2258 * linux-low.h (linux_target_ops) <get_thread_area,
2259 install_fast_tracepoint_jump_pad>: New fields.
2260 (struct lwp_info) <collecting_fast_tracepoint,
2261 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2262 (linux_get_thread_area): Declare.
2263 * linux-x86-low.c (jump_insn): New.
2264 (x86_get_thread_area): New.
2265 (append_insns): New.
2267 (amd64_install_fast_tracepoint_jump_pad): New.
2268 (i386_install_fast_tracepoint_jump_pad): New.
2269 (x86_install_fast_tracepoint_jump_pad): New.
2270 (the_low_target): Install x86_get_thread_area and
2271 x86_install_fast_tracepoint_jump_pad.
2272 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2273 (struct fast_tracepoint_jump): New.
2274 (fast_tracepoint_jump_insn): New.
2275 (fast_tracepoint_jump_shadow): New.
2276 (find_fast_tracepoint_jump_at): New.
2277 (fast_tracepoint_jump_here): New.
2278 (delete_fast_tracepoint_jump): New.
2279 (set_fast_tracepoint_jump): New.
2280 (uninsert_fast_tracepoint_jumps_at): New.
2281 (reinsert_fast_tracepoint_jumps_at): New.
2282 (set_breakpoint_at): Use write_inferior_memory.
2283 (uninsert_raw_breakpoint): Use write_inferior_memory.
2284 (check_mem_read): Mask out fast tracepoint jumps.
2285 (check_mem_write): Mask out fast tracepoint jumps.
2286 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2287 (set_fast_tracepoint_jump): Declare.
2288 (delete_fast_tracepoint_jump)
2289 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2290 (reinsert_fast_tracepoint_jumps_at): Declare.
2291 * regcache.c: Don't compile many functions when building the
2292 in-process agent library.
2293 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2294 the register buffer in the heap.
2295 (free_register_cache): If the register buffer isn't owned by the
2296 regcache, don't free it.
2297 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2298 pre-existing register caches.
2299 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2301 (convert_ascii_to_int): : Constify `from' parameter type.
2302 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2303 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2304 the needed buffer in-place.
2305 (relocate_instruction): New.
2306 * server.c (handle_query) <qSymbols>: If the target supports
2307 tracepoints, give it a chance of looking up symbols. Report
2308 support for fast tracepoints.
2309 (handle_status): Stabilize threads.
2310 (process_serial_event): Adjust.
2311 * server.h (struct fast_tracepoint_jump): Forward declare.
2312 (struct process_info) <fast_tracepoint_jumps>: New field.
2313 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2314 (decode_X_packet, decode_M_packet): Adjust.
2315 (relocate_instruction): Declare.
2316 (in_process_agent_loaded): Declare.
2317 (tracepoint_look_up_symbols): Declare.
2318 (struct fast_tpoint_collect_status): Declare.
2319 (fast_tracepoint_collecting): Declare.
2320 (force_unlock_trace_buffer): Declare.
2321 (handle_tracepoint_bkpts): Declare.
2322 (initialize_low_tracepoint)
2323 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2324 * target.h (struct target_ops) <stabilize_threads,
2325 install_fast_tracepoint_jump_pad>: New fields.
2326 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2327 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2328 [HAVE_STDINT_H]: Include stdint.h.
2329 (trace_debug_1): Rename to ...
2330 (trace_vdebug): ... this.
2331 (trace_debug): Rename to ...
2332 (trace_debug_1): ... this. Add `level' parameter.
2334 (ATTR_USED, ATTR_NOINLINE): New.
2335 (IP_AGENT_EXPORT): New.
2336 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2337 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2338 (about_to_request_buffer_space, trace_buffer_is_full)
2339 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2340 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2341 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2342 (traceframe_write_count, traceframes_created)
2343 (trace_state_variables)
2344 New renaming defines.
2345 (struct ipa_sym_addresses): New.
2346 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2348 (ipa_sym_addrs): New.
2349 (all_tracepoint_symbols_looked_up): New.
2350 (in_process_agent_loaded): New.
2351 (write_e_ipa_not_loaded): New.
2352 (maybe_write_ipa_not_loaded): New.
2353 (tracepoint_look_up_symbols): New.
2354 (debug_threads) [IN_PROCESS_AGENT]: New.
2355 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2356 (UNKNOWN_SIDE_EFFECTS): New.
2357 (stop_tracing): New.
2358 (flush_trace_buffer): New.
2359 (stop_tracing_bkpt): New.
2360 (flush_trace_buffer_bkpt): New.
2361 (read_inferior_integer): New.
2362 (read_inferior_uinteger): New.
2363 (read_inferior_data_pointer): New.
2364 (write_inferior_data_pointer): New.
2365 (write_inferior_integer): New.
2366 (write_inferior_uinteger): New.
2367 (struct collect_static_trace_data_action): Delete.
2368 (enum tracepoint_type): New.
2369 (struct tracepoint) <type>: New field `type'.
2370 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2371 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2372 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2373 (tracepoints): Use IP_AGENT_EXPORT.
2374 (last_tracepoint): Don't include in the IPA.
2375 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2376 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2377 (alloced_trace_state_variables): New.
2378 (trace_state_variables): Use IP_AGENT_EXPORT.
2379 (traceframe_t): Delete unused variable.
2380 (circular_trace_buffer): Don't include in the IPA.
2381 (trace_buffer_start): Delete.
2382 (struct trace_buffer_control): New.
2383 (trace_buffer_free): Delete.
2384 (struct ipa_trace_buffer_control): New.
2385 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2386 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2388 (trace_buffer_ctrl): New.
2389 (TRACE_BUFFER_CTRL_CURR): New.
2390 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2391 Reimplement as macros.
2392 (trace_buffer_wrap): Delete.
2393 (traceframe_write_count, traceframe_read_count)
2394 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2395 (struct tracepoint_hit_ctx) <type>: New field.
2396 (struct fast_tracepoint_ctx): New.
2397 (memory_barrier): New.
2399 (record_tracepoint_error): Update atomically in the IPA.
2400 (clear_inferior_trace_buffer): New.
2401 (about_to_request_buffer_space): New.
2402 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2403 updating the same buffer.
2404 (add_tracepoint): Default the tracepoint's type to trap
2405 tracepoint, and orig_size to -1.
2406 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2408 (create_trace_state_variable): New parameter `gdb'. Handle it.
2409 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2410 (cmd_qtdp): Handle fast tracepoints.
2412 (max_jump_pad_size): New.
2413 (gdb_jump_pad_head): New.
2414 (get_jump_space_head): New.
2415 (claim_jump_space): New.
2416 (sort_tracepoints): New.
2417 (MAX_JUMP_SIZE): New.
2418 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2420 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2421 support. Upload fast traceframes, and delete internal IPA
2423 (stop_tracing_handler): New.
2424 (flush_trace_buffer_handler): New.
2425 (cmd_qtstop): Upload fast tracepoints.
2426 (response_tracepoint): Handle fast tracepoints.
2427 (tracepoint_finished_step): Upload fast traceframes. Set the
2428 tracepoint hit context's tracepoint type.
2429 (handle_tracepoint_bkpts): New.
2430 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2431 type. Add comment about fast tracepoints.
2432 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2433 non-existing action_str field.
2434 (get_context_regcache): Handle fast tracepoints.
2435 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2437 (fast_tracepoint_from_jump_pad_address): New.
2438 (fast_tracepoint_from_ipa_tpoint_address): New.
2439 (collecting_t): New.
2440 (force_unlock_trace_buffer): New.
2441 (fast_tracepoint_collecting): New.
2444 (write_inferior_data_ptr): New.
2445 (target_tp_heap): New.
2446 (target_malloc): New.
2447 (download_agent_expr): New.
2449 (download_tracepoints): New.
2450 (download_trace_state_variables): New.
2451 (upload_fast_traceframes): New.
2452 (IPA_FIRST_TRACEFRAME): New.
2453 (IPA_NEXT_TRACEFRAME_1): New.
2454 (IPA_NEXT_TRACEFRAME): New.
2455 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2456 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2457 (gdb_jump_pad_buffer_end): New.
2458 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2459 (initialize_tracepoint): Adjust.
2460 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2461 buffer. Initialize the low module.
2462 * utils.c (PREFIX, TOOLNAME): New.
2463 (malloc_failure): Use PREFIX.
2464 (error): In the IPA, an error causes an exit.
2465 (fatal, warning): Use PREFIX.
2466 (internal_error): Use TOOLNAME.
2467 (NUMCELLS): Increase to 10.
2468 * configure, config.in: Regenerate.
2470 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2472 * server.c (handle_query) <qSupported>: Do two passes over the
2473 qSupported string to avoid nesting strtok.
2475 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2477 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2479 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2481 * configure: Regenerate.
2482 * proc-service.list: New.
2484 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2486 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2489 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2491 * gdbreplay.c (remote_open): Check error return from socket() call by
2492 its equality to -1 not by it being negative.
2493 * remote-utils.c (remote_open): Likewise.
2495 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2497 * config.h: Regenerate.
2499 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2501 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2502 doesn't provide PTRACE_GET_THREAD_AREA.
2504 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2506 * linux-m68k-low.c: Include <asm/ptrace.h>
2507 (ps_get_thread_area): Implement.
2509 2010-05-03 Doug Evans <dje@google.com>
2511 * event-loop.c (struct callback_event): New struct.
2512 (callback_list): New global.
2513 (append_callback_event, delete_callback_event): New functions.
2514 (process_callback): New function.
2515 (start_event_loop): Call it.
2516 * remote-utils.c (NOT_SCHEDULED): Define.
2517 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2518 moved out of readchar.
2519 (readchar): Rewrite. Call reschedule before returning.
2520 (reset_readchar): New function.
2521 (remote_close): Call it.
2522 (process_remaining, reschedule): New functions.
2523 * server.h (callback_handler_func): New typedef.
2524 (append_callback_event, delete_callback_event): Declare.
2526 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2528 * proc-service.c (ps_pglobal_lookup): Use
2529 thread_db_look_up_one_symbol.
2530 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2531 parameter. Use it instead of all_symbols_looked_up.
2532 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2534 (all_symbols_looked_up): Don't declare.
2535 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2536 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2538 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2539 Set all_symbols_looked_up here.
2540 (thread_db_look_up_one_symbol): New.
2541 (thread_db_get_tls_address): Adjust.
2542 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2543 thread_db object on the heap, and tentatively set it in the
2545 (thread_db_init): Don't set all_symbols_looked_up here.
2546 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2548 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2550 * linux-low.c (linux_kill, linux_detach): Adjust.
2551 (status_pending_p_callback): Remove redundant statement. Check
2552 for !TARGET_WAITIKIND_IGNORE, instead of
2553 TARGET_WAITKIND_STOPPED.
2554 (handle_tracepoints): Make sure LWP is locked. Adjust.
2555 (linux_wait_for_event_1): Adjust.
2556 (linux_cancel_breakpoints): New.
2557 (unsuspend_one_lwp): New.
2558 (unsuspend_all_lwps): New.
2559 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2560 (send_sigstop_callback): Change return type to int, add new
2561 `except' parameter and handle it.
2562 (suspend_and_send_sigstop_callback): New.
2563 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2564 pass them down. If SUSPEND, also increment the lwp's suspend
2566 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2567 (need_step_over_p): Don't consider suspended LWPs.
2568 (start_step_over): Adjust.
2569 (proceed_one_lwp): Change return type to int, add new `except'
2570 parameter and handle it.
2571 (unsuspend_and_proceed_one_lwp): New.
2572 (proceed_all_lwps): Use find_inferior instead of
2574 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2575 also decrement the suspend count of LWPs. Pass `except' down,
2576 instead of hacking its suspend count.
2577 (linux_pause_all): Add `freeze' parameter. Adjust.
2578 (linux_unpause_all): New.
2579 (linux_target_ops): Install linux_unpause_all.
2580 * server.c (handle_status): Adjust.
2581 * target.h (struct target_ops): New fields `unpause_all' and
2582 `cancel_breakpoints'. Add new parameter to `pause_all'.
2583 (pause_all): Add new `freeze' parameter.
2585 (cancel_breakpoints): New.
2586 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2588 (cmd_qtstart): Pause threads.
2589 (stop_tracing): Pause threads, and cancel breakpoints.
2590 * win32-low.c (win32_target_ops): Adjust.
2592 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2594 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2595 the inferior right away from here...
2596 (linux_wait_1): ... to here, and adjust to check the thread's
2597 last_resume_kind instead of the lwp's step or stop_expected flags.
2599 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2601 * README: Use consistent `GDB' and `GDBserver' spellings.
2603 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2605 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2606 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2607 (linux_detach_one_lwp): Assume the lwp is stopped.
2608 (any_thread_of): Delete.
2609 (linux_detach): Stop all lwps here. Don't blindly delete all
2611 (delete_lwp_callback): New.
2612 (linux_mourn): Delete all lwps of the process that is gone.
2613 (linux_wait_1): Don't delete the last lwp of the process here.
2614 * mem-break.h (mark_breakpoints_out): Declare.
2615 * mem-break.c (mark_breakpoints_out): New.
2616 (free_all_breakpoints): Use it.
2617 * server.c (handle_target_event): If the process is gone, mark
2619 * thread-db.c (struct thread_db) <create_bp>: New field.
2620 (thread_db_enable_reporting): Fix prototype. Store a thread event
2621 breakpoint reference in the thread_db struct.
2622 (thread_db_load_search): Clear the thread_db object.
2623 (try_thread_db_load_1): Ditto.
2624 (switch_to_process): New.
2625 (disable_thread_event_reporting): Use it.
2626 (remove_thread_event_breakpoints): New.
2627 (thread_db_detach, thread_db_mourn): Use it.
2629 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2631 * linux-low.c (linux_enable_event_reporting): New.
2632 (linux_wait_for_event_1, handle_extended_wait): Use it.
2634 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2636 * linux-low.c (linux_kill_one_lwp, linux_kill)
2637 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2638 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2639 SIGSTOP even if the LWP is stopped.
2640 (send_sigstop_callback): New.
2641 (stop_all_lwps): Use send_sigstop_callback instead.
2642 (linux_resume_one_thread): Adjust.
2643 (proceed_one_lwp): Still proceed an LWP that the client has
2644 requested to stop, if we haven't reported it as stopped yet. Make
2645 sure that LWPs the client want stopped, have a pending SIGSTOP.
2647 2010-04-26 Doug Evans <dje@google.com>
2649 * server.c (handle_general_set): Make static.
2651 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2652 Print received char after testing for error/eof instead of before.
2653 (input_interrupt): Tweak comment.
2655 2010-04-23 Doug Evans <dje@google.com>
2657 * server.c (start_inferior): Print inferior argv if --debug.
2659 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2661 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2662 * nto-x86-low.c: Include server.h
2664 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2666 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2667 be consistent with other sources of this directory.
2668 (init_registers_amd64): Correct name of source file of this function
2671 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2673 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2676 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2678 * win32-i386-low.c: Add 64-bit support.
2679 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2680 (init_registers_amd64): Declare.
2681 (mappings): Add 64-bit version of array.
2682 (init_windows_x86): New function.
2683 (the_low_target): Change init_arch field to init_windows_x86.
2685 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2687 * win32-low.c: Adapt to support also 64-bit architecture.
2688 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2689 (get_image_name): Use SIZE_T type for local variable `done'.
2690 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2691 (toolhelp_get_dll_name): Idem.
2692 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2693 Use uintptr_t typecast to avoid warning.
2694 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2695 (handle_exception): Use phex_nz to avoid warning.
2696 (win32_wait): Remove unused local variable `process'.
2698 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2700 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2703 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2705 * configure.ac: Use `ws2_32' library for srv_mingw.
2706 * configure: Regenerate.
2707 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2708 * remote-utils.c: Likewise.
2710 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2712 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2713 if __x86_64__ is defined.
2715 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2717 * configure: Regenerate.
2719 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2721 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2722 * target.h (target_ops): New get_tib_address field.
2723 * win32-low.h (win32_thread_info): Add thread_local_base field.
2724 * win32-low.c (child_add_thread): Add tlb argument.
2725 Set thread_local_base field to TLB.
2726 (get_child_debug_event): Adapt to child_add_thread change.
2727 (win32_get_tib_address): New function.
2728 (win32_target_ops): Set get_tib_address field to
2729 win32_get_tib_address.
2730 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2732 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2734 * linux-low.c (linux_mourn): Also remove the process.
2735 * server.c (handle_target_event): Don't remove the process here.
2736 * nto-low.c (nto_mourn): New.
2737 (nto_target_ops): Install it.
2738 * spu-low.c (spu_mourn): New.
2739 (spu_target_ops): Install it.
2740 * win32-low.c (win32_mourn): New.
2741 (win32_target_ops): Install it.
2743 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2745 * server.h (buffer_xml_printf): Remove redundant `;'.
2747 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2749 * regcache.c (set_register_cache): Invalidate regcaches before
2750 changing the register cache layout.
2751 (regcache_invalidate_one): Allow a NULL regcache.
2752 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2753 regcaches before changing the register cache layout or the target
2756 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2758 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2759 variable warning on Linux/x86-64.
2761 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2763 GDBserver disconnected tracing support.
2765 * linux-low.c (linux_remove_process): Delete.
2766 (add_lwp): Don't set last_resume_kind here.
2767 (linux_kill): Use `mourn'.
2768 (linux_detach): Use `thread_db_detach', and `mourn'.
2770 (linux_attach_lwp_1): Adjust comment.
2771 (linux_attach): last_resume_kind moved the thread_info; adjust.
2772 (status_pending_p_callback): Adjust.
2773 (linux_wait_for_event_1): Adjust.
2774 (count_events_callback, select_singlestep_lwp_callback)
2775 (select_event_lwp_callback, cancel_breakpoints_callback)
2776 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2777 (proceed_one_lwp): Adjust.
2778 (linux_async): Add debug output.
2779 (linux_thread_stopped): New.
2780 (linux_pause_all): New.
2781 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2783 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2784 (thread_db_free): Delete declaration.
2785 (thread_db_detach, thread_db_mourn): Declare.
2786 * thread-db.c (thread_db_init): Use thread_db_mourn.
2787 (thread_db_free): Delete, split in two.
2788 (disable_thread_event_reporting): New.
2789 (thread_db_detach): New.
2790 (thread_db_mourn): New.
2792 * server.h (struct thread_info) <last_resume_kind>: New field.
2793 <attached>: Add comment.
2794 <gdb_detached>: New field.
2795 (handler_func): Change return type to int.
2796 (handle_serial_event, handle_target_event): Ditto.
2797 (gdb_connected): Declare.
2799 (disconnected_tracing): Declare.
2800 (stop_tracing): Declare.
2802 * server.c (handle_query) <qSupported>: Report support for
2803 disconnected tracing.
2804 (queue_stop_reply_callback): Account for running threads.
2805 (gdb_wants_thread_stopped): New.
2806 (gdb_wants_all_threads_stopped): New.
2807 (gdb_reattached_process): New.
2808 (handle_status): Clear the `gdb_detached' flag of all processes.
2809 In all-stop, stop all threads.
2810 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2811 (process_serial_event): If the remote connection breaks, or if an
2812 exit was forced with "monitor exit", force an event loop exit.
2813 Handle disconnected tracing on detach.
2814 (handle_serial_event): Adjust.
2815 (handle_target_event): If GDB isn't connected, forward events back
2816 to the inferior, unless the last process exited, in which case,
2817 exit gdbserver. Adjust interface.
2819 * remote-utils.c (remote_open): Don't block in accept. Instead
2820 register an event loop source on the listen socket file
2821 descriptor. Refactor bits into ...
2822 (listen_desc): ... this new global.
2823 (gdb_connected): ... this new function.
2824 (enable_async_notification): ... this new function.
2825 (handle_accept_event): ... this new function.
2826 (remote_close): Clear remote_desc.
2828 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2830 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2832 (mourn_inferior): Define.
2833 (target_process_qsupported): Avoid the dangling else problem.
2834 (thread_stopped): Define.
2835 (pause_all): Define.
2836 (target_waitstatus_to_string): Declare.
2837 * target.c (target_waitstatus_to_string): New.
2839 * tracepoint.c (tracing): Make extern.
2840 (disconnected_tracing): New.
2841 (stop_tracing): Make extern. Handle tracing stops due to GDB
2843 (cmd_qtdisconnected): New.
2844 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2845 (handle_tracepoint_general_set): Handle QTDisconnected.
2847 * event-loop.c (event_handler_func): Change return type to int.
2848 (process_event): Bail out if the event handler wants the event
2850 (handle_file_event): Ditto.
2851 (start_event_loop): Bail out if the event handler wants the event
2854 * nto-low.c (nto_target_ops): Adjust.
2855 * spu-low.c (spu_wait): Don't remove the process here.
2856 (spu_target_ops): Adjust.
2857 * win32-low.c (win32_wait): Don't remove the process here.
2858 (win32_target_ops): Adjust.
2860 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2862 * regcache.c (realloc_register_cache): Invalidate inferior's
2863 regcache before recreating it.
2865 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2867 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2869 2010-04-09 Stan Shebs <stan@codesourcery.com>
2870 Pedro Alves <pedro@codesourcery.com>
2872 * server.h (LONGEST): New.
2873 (struct thread_info) <while_stepping>: New field.
2874 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2876 (initialize_tracepoint, handle_tracepoint_general_set)
2877 (handle_tracepoint_query, tracepoint_finished_step)
2878 (tracepoint_was_hit, release_while_stepping_state_list):
2879 (current_traceframe): Declare.
2880 * server.c (handle_general_set): Handle tracepoint packets.
2882 (write_memory): New.
2883 (handle_search_memory_1): Use read_memory.
2884 (handle_query): Report support for conditional tracepoints, trace
2885 state variables, and tracepoint sources. Handle tracepoint
2887 (main): Initialize the tracepoints module.
2888 (process_serial_event): Handle traceframe reads/writes.
2890 * linux-low.c (handle_tracepoints): New.
2891 (linux_wait_1): Call it.
2892 (linux_resume_one_lwp): Handle while-stepping.
2893 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2894 (linux_target_ops): Install them.
2895 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2897 * linux-x86-low.c (x86_supports_tracepoints): New.
2898 (the_low_target). Install it.
2900 * mem-break.h (delete_breakpoint): Declare.
2901 * mem-break.c (delete_breakpoint): Make external.
2903 * target.h (struct target_ops): Add `supports_tracepoints',
2904 `read_pc', and `write_pc' fields.
2905 (target_supports_tracepoints): Define.
2906 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2909 * regcache.h (struct regcache) <registers_owned>: New field.
2910 (init_register_cache, regcache_cpy): Declare.
2911 (regcache_read_pc, regcache_write_pc): Declare.
2912 (register_cache_size): Declare.
2913 (supply_regblock): Declare.
2914 * regcache.c (init_register_cache): New.
2915 (new_register_cache): Use it.
2916 (regcache_cpy): New.
2917 (register_cache_size): New.
2918 (supply_regblock): New.
2919 (regcache_read_pc, regcache_write_pc): New.
2921 * tracepoint.c: New.
2923 * Makefile.in (OBS): Add tracepoint.o.
2924 (tracepoint.o): New rule.
2926 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2928 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2930 (i386-mmx.c): Likewise.
2931 (i386-mmx-linux.o): Likewise.
2932 (i386-mmx-linux.c): Likewise.
2934 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2935 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2936 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2937 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2939 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2940 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2941 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2943 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2945 * Makefile.in (clean): Updated.
2947 (i386-avx.c): Likewise.
2948 (i386-avx-linux.o): Likewise.
2949 (i386-avx-linux.c): Likewise.
2950 (amd64-avx.o): Likewise.
2951 (amd64-avx.c): Likewise.
2952 (amd64-avx-linux.o): Likewise.
2953 (amd64-avx-linux.c): Likewise.
2955 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2956 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2957 (srv_amd64_regobj): Add amd64-avx.o.
2958 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2959 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2960 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2961 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2962 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2963 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2964 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2966 * i387-fp.c: Include "i386-xstate.h".
2968 (i387_cache_to_xsave): Likewise.
2969 (i387_xsave_to_cache): Likewise.
2970 (x86_xcr0): Likewise.
2972 * i387-fp.h (i387_cache_to_xsave): Likewise.
2973 (i387_xsave_to_cache): Likewise.
2974 (x86_xcr0): Likewise.
2976 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2977 * linux-crisv32-low.c (target_regsets): Likewise.
2978 * linux-m68k-low.c (target_regsets): Likewise.
2979 * linux-mips-low.c (target_regsets): Likewise.
2980 * linux-ppc-low.c (target_regsets): Likewise.
2981 * linux-s390-low.c (target_regsets): Likewise.
2982 * linux-sh-low.c (target_regsets): Likewise.
2983 * linux-sparc-low.c (target_regsets): Likewise.
2984 * linux-xtensa-low.c (target_regsets): Likewise.
2986 * linux-low.c: Include <sys/uio.h>.
2987 (regsets_fetch_inferior_registers): Support nt_type.
2988 (regsets_store_inferior_registers): Likewise.
2989 (linux_process_qsupported): New.
2990 (linux_target_ops): Add linux_process_qsupported.
2992 * linux-low.h (regset_info): Add nt_type.
2993 (linux_target_ops): Add process_qsupported.
2995 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2997 (init_registers_i386_avx_linux): New.
2998 (init_registers_amd64_avx_linux): Likewise.
2999 (xmltarget_i386_linux_no_xml): Likewise.
3000 (xmltarget_amd64_linux_no_xml): Likewise.
3001 (PTRACE_GETREGSET): Likewise.
3002 (PTRACE_SETREGSET): Likewise.
3003 (x86_fill_xstateregset): Likewise.
3004 (x86_store_xstateregset): Likewise.
3005 (use_xml): Likewise.
3006 (x86_linux_update_xmltarget): Likewise.
3007 (x86_linux_process_qsupported): Likewise.
3008 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3009 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3010 init_registers_i386_linux here. Call
3011 x86_linux_update_xmltarget.
3012 (the_low_target): Add x86_linux_process_qsupported.
3014 * server.c (handle_query): Call target_process_qsupported.
3016 * target.h (target_ops): Add process_qsupported.
3017 (target_process_qsupported): New.
3019 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3021 * inferiors.c (add_thread): Set last_status kind to
3022 TARGET_WAITKIND_IGNORE.
3023 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3024 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3025 (linux_wait_1): Move `thread' local definition to block that uses
3026 it. Don't NULL initialize `event_child'.
3027 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3028 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3029 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3031 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3033 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3034 an extended waitstatus, or by a watchpoint.
3035 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3036 thread was stepping or has been stopped by a watchpoint.
3038 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3040 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3041 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3042 of another, then delete the previous, and validate all
3044 (validate_inserted_breakpoint): New.
3045 (delete_disabled_breakpoints): New.
3046 (validate_breakpoints): New.
3047 (check_mem_read): Validate breakpoints before trusting their
3048 shadow. Delete disabled breakpoints.
3049 (check_mem_write): Validate breakpoints before trusting they
3050 should be inserted. Delete disabled breakpoints.
3051 * mem-break.h (validate_breakpoints):
3052 * server.c (handle_query): Validate breakpoints when we see a
3055 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3057 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3058 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3059 if we could tell there's a GDB breakpoint at stop_pc.
3060 (need_step_over_p): Don't do a step over if we find a GDB
3061 breakpoint at the resume PC.
3063 * mem-break.c (struct raw_breakpoint): New.
3064 (enum bkpt_type): New type `gdb_breakpoint'.
3065 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3066 fields. New field `raw'.
3067 (find_raw_breakpoint_at): New.
3068 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3070 (set_breakpoint_at): Adjust.
3071 (delete_raw_breakpoint): New.
3072 (release_breakpoint): New.
3073 (delete_breakpoint): Rename to...
3074 (delete_breakpoint_1): ... this. Add proc parameter. Use
3075 release_breakpoint. Return ENOENT.
3076 (delete_breakpoint): Reimplement.
3077 (find_breakpoint_at): Delete.
3078 (find_gdb_breakpoint_at): New.
3079 (delete_breakpoint_at): Delete.
3080 (set_gdb_breakpoint_at): New.
3081 (delete_gdb_breakpoint_at): New.
3082 (gdb_breakpoint_here): New.
3083 (set_reinsert_breakpoint): Use release_breakpoint.
3084 (uninsert_breakpoint): Rename to ...
3085 (uninsert_raw_breakpoint): ... this.
3086 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3087 (reinsert_raw_breakpoint): Change parameter type to
3089 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3091 (check_breakpoints): Adjust. Use release_breakpoint.
3092 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3093 (breakpoint_inserted_here): Ditto.
3094 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3095 Don't trust the breakpoint's shadow if it is not inserted.
3096 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3097 (delete_all_breakpoints): Adjust.
3098 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3099 use delete_breakpoint_1.
3101 * mem-break.h (breakpoints_supported): Delete declaration.
3102 (set_gdb_breakpoint_at): Declare.
3103 (gdb_breakpoint_here): Declare.
3104 (delete_breakpoint_at): Delete.
3105 (delete_gdb_breakpoint_at): Declare.
3107 * server.h (struct raw_breakpoint): Forward declare.
3108 (struct process_info): New field `raw_breakpoints'.
3110 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3113 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3115 * linux-low.c (status_pending_p_callback): Fix comment.
3116 (linux_wait_for_event_1): Move most of the internal breakpoint
3117 handling from here...
3118 (linux_wait_1): ... to here.
3119 (count_events_callback): New.
3120 (select_singlestep_lwp_callback): New.
3121 (select_event_lwp_callback): New.
3122 (cancel_breakpoints_callback): New.
3123 (select_event_lwp): New.
3124 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3125 priority to all LWPs that have had events that should be reported
3126 to the client. Cancel breakpoints when about to reporting the
3127 event to the client, not while stopping lwps. No longer cancel
3128 finished single-steps here.
3129 (cancel_finished_single_step): Delete.
3130 (cancel_finished_single_steps): Delete.
3132 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3134 * mem-break.c (enum bkpt_type): New.
3135 (struct breakpoint): New field `type'.
3136 (set_breakpoint_at): Change return type to struct breakpoint
3137 pointer. Set type to `other_breakpoint' by default.
3138 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3139 in the breakpoint list.
3140 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3141 (reinsert_breakpoint): Rename to ...
3142 (reinsert_raw_breakpoint): ... this.
3143 (reinsert_breakpoints_at): Adjust.
3144 * mem-break.h (struct breakpoint): Declare.
3145 (set_breakpoint_at): Change return type to struct breakpoint
3148 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3150 * server.c (handle_query): Assign, not compare.
3152 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3154 Teach linux gdbserver to step-over-breakpoints.
3156 * linux-low.c (can_hardware_single_step): New.
3157 (supports_breakpoints): New.
3158 (handle_extended_wait): If stopping threads, read the stop pc of
3161 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3162 low target doesn't support retrieving the PC.
3163 (add_lwp): Set last_resume_kind to resume_continue.
3164 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3165 (linux_attach): Don't clear stop_expected. Set the lwp's
3166 last_resume_kind to resume_stop.
3167 (linux_detach_one_lwp): Don't check for removed breakpoints.
3168 (check_removed_breakpoint): Delete.
3169 (status_pending_p): Rename to ...
3170 (status_pending_p_callback): ... this. Don't check for removed
3171 breakpoints. Don't consider threads that are stopped from GDB's
3173 (linux_wait_for_lwp): Always read the stop_pc here.
3174 (cancel_breakpoint): New.
3175 (step_over_bkpt): New global.
3176 (linux_wait_for_event_1): Implement stepping over breakpoints.
3177 (gdb_wants_lwp_stopped): New.
3178 (gdb_wants_all_stopped): New.
3179 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3180 single-step traps here. Store the thread's last reported target
3182 (send_sigstop): Don't clear stop_expected. Always set it,
3184 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3185 (cancel_finished_single_step): New.
3186 (cancel_finished_single_steps): New.
3187 (wait_for_sigstop): Don't cancel finished single-step traps here.
3188 (linux_resume_one_lwp): Don't check for removed breakpoints.
3189 Don't set `step' on non-hardware step archs.
3190 (linux_set_resume_request): Ignore resume_stop requests if already
3191 stopping or stopped. Set the lwp's last_resume_kind.
3192 (resume_status_pending_p): Don't check for removed breakpoints.
3193 (need_step_over_p): New.
3194 (start_step_over): New.
3195 (finish_step_over): New.
3196 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3197 requests. Clear the thread's last reported target waitstatus.
3198 Don't use the `suspended' flag. Don't consider pending breakpoints.
3199 (linux_resume): Start a step-over if necessary.
3200 (proceed_one_lwp): New.
3201 (proceed_all_lwps): New.
3202 (unstop_all_lwps): New.
3203 * linux-low.h (struct lwp_info): Rewrite comment for the
3204 `suspended' flag. Add the `stop_pc' field. Delete the
3205 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3206 Add `'last_resume_kind' and `need_step_over' fields.
3207 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3208 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3209 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3210 (set_raw_breakpoint_at): New.
3211 (set_breakpoint_at): Rewrite to use it.
3212 (reinsert_breakpoint_handler): Delete.
3213 (set_reinsert_breakpoint): New.
3214 (reinsert_breakpoint_by_bp): Delete.
3215 (delete_reinsert_breakpoints): New.
3216 (uninsert_breakpoint): Rewrite.
3217 (uninsert_breakpoints_at): New.
3218 (reinsert_breakpoint): Rewrite.
3219 (reinsert_breakpoints_at): New.
3220 (check_breakpoints): Rewrite.
3221 (breakpoint_here): New.
3222 (breakpoint_inserted_here): New.
3223 (check_mem_read): Adjust.
3224 * mem-break.h (breakpoints_supported, breakpoint_here)
3225 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3226 (reinsert_breakpoint_by_bp): Delete declaration.
3227 (delete_reinsert_breakpoints): Declare.
3228 (reinsert_breakpoint): Delete declaration.
3229 (reinsert_breakpoints_at): Declare.
3230 (uninsert_breakpoint): Delete declaration.
3231 (uninsert_breakpoints_at): Declare.
3232 (check_breakpoints): Adjust prototype.
3233 * server.h: Adjust include order.
3234 (struct thread_info): Declare here. Add a `last_status' field.
3236 2010-03-23 Michael Snyder <msnyder@vmware.com>
3238 * server.c (crc32): New function.
3239 (handle_query): Add handling for 'qCRC:' request.
3241 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3243 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3244 lwp had been stopped by a watchpoint.
3246 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3248 * server.h (internal_error): Declare.
3249 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3250 * utils.c (internal_error): New function.
3252 2010-03-15 Andreas Schwab <schwab@redhat.com>
3254 * configure.srv: Fix typo setting srv_regobj.
3256 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3258 * linux-low.c (fetch_register): Avoid passing a non string literal
3260 (usr_store_inferior_registers): Ditto.
3262 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3264 * linux-low.c (linux_write_memory): Bail out early if peeking
3267 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3269 * linux-low.h (struct lwp_info): New fields
3270 `stopped_by_watchpoint' and `stopped_data_address'.
3271 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3272 here, and cache them in the lwp object.
3273 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3275 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3277 (linux_stopped_by_watchpoint): Rewrite.
3278 (linux_stopped_data_address): Rewrite.
3280 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3282 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3283 switching the current inferior, not before.
3285 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3287 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3288 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3289 i386-linux.c and amd64-linux.c.
3290 (reg-i386.o): Removed.
3291 (reg-i386.c): Likewise.
3292 (reg-i386-linux.o): Likewise.
3293 (reg-i386-linux.c): Likewise.
3294 (reg-x86-64.o): Likewise.
3295 (reg-x86-64.c): Likewise.
3296 (reg-x86-64-linux.o): Likewise.
3297 (reg-x86-64-linux.c): Likewise.
3300 (i386-linux.o): Likewise.
3301 (i386-linux.c): Likewise.
3302 (amd64.o): Likewise.
3303 (amd64.c): Likewise.
3304 (amd64-linux.o): Likewise.
3305 (amd64-linux.c): Likewise.
3307 * configure.srv (srv_i386_regobj): New.
3308 (srv_i386_linux_regobj): Likewise.
3309 (srv_amd64_regobj): Likewise.
3310 (srv_amd64_linux_regobj): Likewise.
3311 (srv_i386_32bit_xmlfiles): Likewise.
3312 (srv_i386_64bit_xmlfiles): Likewise.
3313 (srv_i386_xmlfiles): Likewise.
3314 (srv_amd64_xmlfiles): Likewise.
3315 (srv_i386_linux_xmlfiles): Likewise.
3316 (srv_amd64_linux_xmlfiles): Likewise.
3317 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3318 srv_xmlfiles to $srv_i386_xmlfiles.
3319 (i[34567]86-*-mingw32ce*): Likewise.
3320 (i[34567]86-*-mingw*): Likewise.
3321 (i[34567]86-*-nto*): Likewise.
3322 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3323 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3324 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3325 (x86_64-*-linux*): Likewise.
3327 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3328 (init_registers_amd64_linux): New.
3329 (x86_arch_setup): Replace init_registers_x86_64_linux with
3330 init_registers_amd64_linux.
3332 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3334 * configure.ac: Check for libdl. If it is not available link against
3335 static libthread_db.
3336 * configure: Regenerate.
3338 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3342 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3343 handing a read watchpoint.
3344 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3346 2010-02-12 Doug Evans <dje@google.com>
3348 * linux-low.c (linux_supports_tracefork_flag): Document.
3349 (linux_look_up_symbols): Add comment.
3351 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3353 * regcache.c (supply_register): Clear regcache if buf is NULL.
3355 2010-02-02 Nicolas Roche <roche@sourceware.org>
3356 Joel Brobecker <brobecker@adacore.com>
3358 * inferiors.c (find_inferior): Add function documentation.
3359 (unloaded_dll): Handle the case where the unloaded dll has not
3360 been previously registered in the dll list.
3362 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3364 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3365 (thumb2_breakpoint): New.
3366 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3368 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3370 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3371 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3374 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3376 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3378 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3380 * linux-s390-low.c (s390_collect_ptrace_register)
3381 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3383 2010-01-21 Doug Evans <dje@google.com>
3385 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3386 (PTRACE_ARG4_TYPE): New macro.
3387 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3388 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3389 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3390 (usr_store_inferior_registers): Ditto.
3391 (linux_read_memory, linux_write_memory): Ditto.
3392 (linux_test_for_tracefork): Ditto.
3394 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3395 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3397 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3399 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3402 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3404 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3405 prototype to take a regcache. Adjust.
3407 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3409 * regcache.h (struct thread_info): Forward declare.
3410 (struct regcache): New.
3411 (new_register_cache): Adjust prototype.
3412 (get_thread_regcache): Declare.
3413 (free_register_cache): Adjust prototype.
3414 (registers_to_string, registers_from_string): Ditto.
3415 (supply_register, supply_register_by_name, collect_register)
3416 (collect_register_as_string, collect_register_by_name): Ditto.
3417 * regcache.c (struct inferior_regcache_data): Delete.
3418 (get_regcache): Rename to ...
3419 (get_thread_regcache): ... this. Adjust. Switch inferior before
3421 (regcache_invalidate_one): Adjust.
3422 (regcache_invalidate): Fix prototype.
3423 (new_register_cache): Return the new register cache.
3424 (free_register_cache): Change prototype.
3425 (realloc_register_cache): Adjust.
3426 (registers_to_string): Change prototype to take a regcache. Adjust.
3427 (registers_from_string): Ditto.
3428 (register_data): Ditto.
3429 (supply_register): Ditto.
3430 (supply_register_by_name): Ditto.
3431 (collect_register): Ditto.
3432 (collect_register_as_string): Ditto.
3433 (collect_register_by_name): Ditto.
3434 * server.c (process_serial_event): Adjust.
3435 * linux-low.h (regset_fill_func, regset_store_func): Change
3437 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3439 * linux-low.c (get_stop_pc): Adjust.
3440 (check_removed_breakpoint): Adjust.
3441 (linux_wait_for_event): Adjust.
3442 (linux_resume_one_lwp): Adjust.
3443 (fetch_register): Add regcache parameter. Adjust.
3444 (usr_store_inferior_registers): Ditto.
3445 (regsets_fetch_inferior_registers): Ditto.
3446 (regsets_store_inferior_registers): Ditto.
3447 (linux_fetch_registers, linux_store_registers): Ditto.
3448 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3450 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3451 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3452 prototype to take a regcache.
3453 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3454 * remote-utils.c (convert_ascii_to_int, outreg)
3455 (prepare_resume_reply): Change prototype to take a regcache.
3457 * target.h (struct target_ops) <fetch_registers, store_registers>:
3458 Change prototype to take a regcache.
3459 (fetch_inferior_registers, store_inferior_registers): Change
3460 prototype to take a regcache. Adjust.
3461 * proc-service.c (ps_lgetregs): Adjust.
3462 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3463 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3464 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3465 take a regcache. Adjust.
3466 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3467 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3468 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3469 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3470 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3471 (cris_cannot_fetch_register):
3472 (cris_breakpoint_at): Change prototype to take a regcache.
3474 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3475 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3476 to take a regcache. Adjust.
3477 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3479 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3480 take a regcache. Adjust.
3481 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3482 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3483 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3484 * linux-mips-low.c (mips_get_pc):
3485 (mips_set_pc): Change prototype to take a regcache. Adjust.
3486 (mips_reinsert_addr): Adjust.
3487 (mips_collect_register): Change prototype to take a regcache.
3489 (mips_supply_register):
3490 (mips_collect_register_32bit, mips_supply_register_32bit)
3491 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3492 (mips_store_fpregset): Ditto.
3493 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3495 (parse_spufs_run): Adjust.
3496 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3497 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3498 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3499 take a regcache. Adjust.
3500 * linux-s390-low.c (s390_collect_ptrace_register)
3501 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3502 (s390_set_pc): Change prototype to take a regcache. Adjust.
3503 (s390_arch_setup): Adjust.
3504 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3505 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3506 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3507 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3508 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3510 (sparc_breakpoint_at): Adjust.
3511 * linux-xtensa-low.c (xtensa_fill_gregset):
3512 (xtensa_store_gregset):
3513 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3514 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3515 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3516 prototype to take a regcache. Adjust.
3517 * win32-arm-low.c (arm_fetch_inferior_register)
3518 (arm_store_inferior_register): Change prototype to take a
3520 * win32-i386-low.c (i386_fetch_inferior_register)
3521 (i386_store_inferior_register): Change prototype to take a
3523 * win32-low.c (child_fetch_inferior_registers)
3524 (child_store_inferior_registers): Change prototype to take a
3526 (win32_wait): Adjust.
3527 (win32_fetch_inferior_registers): Change prototype to take a
3529 (win32_store_inferior_registers): Adjust.
3530 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3531 store_inferior_register>: Change prototype to take a regcache.
3533 2010-01-20 Doug Evans <dje@google.com>
3535 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3537 (linux_wait_for_event1, linux_init_signals): Ditto.
3538 (W_STOPCODE): Provide definition if missing.
3540 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3542 * linux-low.c (linux_core_of_thread): New.
3543 (compare_ints, show_process, list_threads): New.
3544 (linux_qxfer_osdata): Report threads and cores.
3545 (linux_target_op): Register linux_core_of_thread.
3546 * remote-utils.c (prepare_resume_reply): Report the core.
3547 (buffer_xml_printf): Support %d specifier.
3548 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3550 (handle_query): Handle qXfer:threads. Announce availability
3552 * target.h (struct target_ops): New field core_of_thread.
3554 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3556 * Makefile.in (clean): Remove new generated files.
3557 (reg-s390.o, reg-s390.c): Remove rules.
3558 (reg-s390x.o, reg-s390x.c): Likewise.
3559 (s390-linux32.o, s390-linux32.c): Add rules.
3560 (s390-linux64.o, s390-linux64.c): Likewise.
3561 (s390x-linux64.o, s390x-linux64.c): Likewise.
3562 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3563 * linux-s390-low.c: Include <elf.h>.
3564 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3565 (init_registers_s390): Remove prototype.
3566 (init_registers_s390x): Likewise.
3567 (init_registers_s390_linux32): Add prototype.
3568 (init_registers_s390_linux64): Likewise.
3569 (init_registers_s390x_linux64): Likewise.
3570 (s390_num_regs_3264): New define.
3571 (s390_regmap_3264): New global variable.
3572 (s390_cannot_fetch_register): Remove obsolete check.
3573 (s390_cannot_store_register): Likewise.
3574 (s390_collect_ptrace_register): Handle upper/lower register halves.
3575 (s390_supply_ptrace_register): Likewise.
3576 (s390_fill_gregset): Update to register number changes.
3577 (s390_get_hwcap): New routine.
3578 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3579 Install appropriate regmap and register set.
3581 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3583 * server.c (gdbserver_version): Update copyright year to 2010.
3584 * gdbreplay.c (gdbreplay_version): Likewise.
3586 2009-12-28 Doug Evans <dje@google.com>
3588 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3589 elf/external.h. Include <elf.h> instead but only if necessary.
3591 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3593 * linux-low.c (linux_remove_process): Remove `detaching'
3594 parameter. Don't release/detach from thread_db here.
3595 (linux_kill): Release/detach from thread_db here, ...
3596 (linux_detach): ... and here, before actually detaching.
3597 (linux_wait_1): ... and here, when a process exits.
3598 * thread-db.c (any_thread_of): New.
3599 (thread_db_free): Switch the current inferior to a thread of the
3602 2009-12-21 Doug Evans <dje@google.com>
3604 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3606 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3607 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3608 warning ifndef __NR_tkill. Move setting of errno there too.
3609 Delete unnecessary resetting of errno after syscall.
3610 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3612 * configure.ac: Check for dladdr.
3613 * config.in: Regenerate.
3614 * configure: Regenerate.
3615 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3616 (try_thread_db_load): Update.
3618 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3620 2009-12-18 Doug Evans <dje@google.com>
3622 * event-loop.c: Include unistd.h if it exists.
3624 * linux-low.c (my_waitpid): Move definition away from being in
3625 between linux_tracefork_child/linux_test_for_tracefork.
3627 * gdb_proc_service.h (psaddr_t): Fix type.
3628 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3629 signature to match glibc.
3631 2009-12-16 Doug Evans <dje@google.com>
3633 * linux-low.c (linux_read_memory): Fix argument to read.
3635 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3637 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3638 events, don't leave current_inferior pointing at null.
3640 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3642 * win32-low.c (LOG): Delete.
3643 (OUTMSG): Output to stderr.
3644 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3645 on compile time LOG macro.
3646 (win32_wait): Fix debug output.
3648 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3650 * win32-low.c (win32_add_one_solib): If the dll name is
3651 "ntdll.dll", prepend the system directory to the dll path.
3653 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3655 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3657 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3658 Vladimir Prus <vladimir@codesourcery.com>
3660 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3661 * configure.ac: Check for __mcoldfire__ and set
3662 gdb_cv_m68k_is_coldfire.
3663 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3664 reg-cf.o and reg-m68k.o.
3665 * configure: Regenerated.
3667 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3669 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3670 Pass it to thread_db_free.
3671 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3672 proper `detaching' argument to linux_remove_process.
3673 * linux-low.h (thread_db_free): Add `detaching' parameter.
3674 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3676 (thread_db_free): Add `detaching' parameter. Only
3677 call td_ta_clear_event if detaching from process.
3679 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3681 * thread-db.c (thread_db_free): Fix typo.
3683 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3686 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3688 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3690 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3691 with an i686 compiler.
3692 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3694 * configure: Rebuilt.
3696 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3700 * server.c (handle_search_memory_1): Correct read_addr initialization
3701 in loop for searching subsequent chunks.
3703 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3705 * configure.ac: New --with-libthread-db option.
3706 * thread-db.c: Allow direct dependence on libthread_db.
3707 (thread_db_free): Adjust.
3708 * config.in: Regenerate.
3709 * configure: Likewise.
3711 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3714 * thread-db.c (attach_thread): New function.
3715 (maybe_attach_thread): Return success/failure.
3716 (find_new_threads_callback): Adjust.
3717 (thread_db_find_new_threads): Loop until no new threads.
3719 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3721 * proc-service.c (ps_lgetregs): Formatting.
3723 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3725 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3726 * configure.ac: Adjust.
3727 * linux-low.h (struct process_info_private): Move members to struct
3729 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3730 * linux-low.c (linux_remove_process): Adjust.
3731 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3732 * server.c (handle_query): Move code ...
3733 (handle_monitor_command): ... here. New function.
3734 * target.h (struct target_ops): New member.
3735 * thread-db.c (struct thread_db): New.
3736 (libthread_db_search_path): New variable.
3737 (thread_db_create_event, thread_db_enable_reporting)
3738 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3739 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3740 (try_thread_db_load_1, dladdr_to_soname): New functions.
3741 (try_thread_db_load, thread_db_load_search): New functions.
3742 (thread_db_init): Search for libthread_db.
3743 (thread_db_free): New function.
3744 (thread_db_handle_monitor_command): Likewise.
3745 * config.in: Regenerate.
3746 * configure: Regenerate.
3748 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3750 * spu-low.c (spu_kill): Wait for inferior to terminate.
3751 Call clear_inferiors.
3752 (spu_detach): Call clear_inferiors.
3754 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3756 * aclocal.m4: Regenerate.
3757 * config.in: Likewise.
3758 * configure: Likewise.
3760 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3762 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3763 (parse_spufs_run): New function.
3764 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3765 (ppc_breakpoint_at): Handle SPU breakpoints.
3767 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3769 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3770 (SPUFS_MAGIC): Define.
3771 (spu_enumerate_spu_ids): New function.
3772 (linux_qxfer_spu): New function.
3773 (linux_target_ops): Install linux_qxfer_spu.
3775 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3777 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3778 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3779 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3780 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3781 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3782 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3783 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3784 (init_registers_powerpc_cell32l): Add prototype.
3785 (init_registers_powerpc_cell64l): Likewise.
3786 (ppc_arch_setup): Detect Cell/B.E. architecture.
3788 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3790 * Makefile.in (datarootdir): New variable.
3792 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3794 * linux-low.c (linux_write_memory): Update debugging output.
3795 * Makefile.in (clean): Add new descriptions.
3796 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3797 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3798 * configure.srv: Add new files for arm*-*-linux*.
3799 * linux-arm-low.c: Add new declarations.
3800 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3801 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3802 (HWCAP_VFPv3D16): New.
3803 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3804 instead of __IWMMXT__.
3805 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3806 (arm_arch_setup): New.
3807 (target_regsets): Remove #ifdef. Add VFP regset.
3808 (the_low_target): Use arm_arch_setup.
3810 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3812 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3813 the main thread again.
3815 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3817 Adding Neutrino gdbserver.
3818 * configure: Regenerated.
3819 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3820 * configure.srv (i[34567]86-*-nto*): New target.
3821 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3822 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3823 (nto_comctrl) [__QNX__]: New function.
3824 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3826 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3828 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3831 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3832 Pedro Alves <pedro@codesourcery.com>
3834 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3835 don't support CONTEXT_EXTENDED_REGISTERS.
3836 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3837 (the_low_target): Install them.
3838 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3839 failing with ERROR_PIPE_NOT_CONNECTED.
3841 2009-06-30 Doug Evans <dje@google.com>
3842 Pierre Muller <muller@ics.u-strasbg.fr>
3844 Add h/w watchpoint support to x86-linux, win32-i386.
3845 * Makefile.in (SFILES): Add i386-low.c
3846 (i386_low_h): Define.
3847 (i386-low.o): Add dependencies.
3848 (linux-x86-low.o): Add i386-low.h dependency.
3849 (win32-i386-low.o): Ditto.
3850 * i386-low.c: New file.
3851 * i386-low.h: New file.
3852 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3853 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3854 * linux-low.c (linux_add_process): Initialize arch_private.
3855 (linux_remove_process): Free arch_private.
3856 (add_lwp): Initialize arch_private.
3857 (delete_lwp): Free arch_private.
3858 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3860 * linux-low.h (process_info_private): New member arch_private.
3861 (lwp_info): New member arch_private.
3862 (linux_target_ops): New members new_process, new_thread,
3864 (ptid_of): New macro.
3865 * linux-x86-low.c: Include stddef.h, i386-low.h.
3866 (arch_process_info): New struct.
3867 (arch_lwp_info): New struct.
3868 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3869 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3870 (i386_dr_low_get_status): New function.
3871 (x86_insert_point, x86_remove_point): New functions.
3872 (x86_stopped_by_watchpoint): New function.
3873 (x86_stopped_data_address): New function.
3874 (x86_linux_new_process, x86_linux_new_thread): New functions.
3875 (x86_linux_prepare_to_resume): New function.
3876 (the_low_target): Add entries for insert_point, remove_point,
3877 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3879 * server.c (debug_hw_points): New global.
3880 (monitor_show_help): Document set debug-hw-points.
3881 (handle_query): Process "set debug-hw-points".
3882 * server.h (debug_hw_points): Declare.
3883 (paddress): Declare.
3884 * utils.c (NUMCELLS, CELLSIZE): New macros.
3885 (get_sell, xsnprintf, paddress): New functions.
3886 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3887 remove_point, stopped_by_watchpoint, stopped_data_address.
3888 * win32-i386-low.c: Include i386-low.h.
3889 (debug_reg_state): Replaces dr.
3890 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3891 (i386_dr_low_get_status): New function.
3892 (i386_insert_point, i386_remove_point): New functions.
3893 (i386_stopped_by_watchpoint): New function.
3894 (i386_stopped_data_address): New function.
3895 (i386_initial_stuff): Update.
3896 (get_thread_context,set_thread_context,i386_thread_added): Update.
3897 (the_low_target): Add entries for insert_point,
3898 remove_point, stopped_by_watchpoint, stopped_data_address.
3899 * win32-low.c (win32_insert_watchpoint): New function.
3900 (win32_remove_watchpoint): New function.
3901 (win32_stopped_by_watchpoint): New function.
3902 (win32_stopped_data_address): New function.
3903 (win32_target_ops): Add entries for insert_watchpoint,
3904 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3905 * win32-low.h (win32_target_ops): New members insert_point,
3906 remove_point, stopped_by_watchpoint, stopped_data_address.
3908 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3910 * server.c (process_serial_event): Re-return unsupported, not
3911 error, if the type isn't recognized. Re-allow supporting only
3912 insert or remove packets. Also call require_running for
3913 breakpoints. Add missing break statement to default case. Tidy.
3914 * target.h (struct target_ops): Rename insert_watchpoint to
3915 insert_point, and remove_watchpoint to remove_point.
3917 * linux-low.h (struct linux_target_ops): Likewise.
3918 * linux-low.c (linux_insert_watchpoint): Rename to ...
3919 (linux_insert_point): ... this. Adjust.
3920 (linux_remove_watchpoint): Rename to ...
3921 (linux_remove_point): ... this. Adjust.
3922 (linux_target_ops): Adjust.
3923 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3924 (cris_insert_point): ... this.
3925 (cris_remove_watchpoint): Rename to ...
3926 (cris_remove_point): ... this.
3927 (the_low_target): Adjust.
3929 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3931 * server.c (handle_v_kill): Pass signal_pid to
3932 kill_inferior if multi_process is zero.
3934 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3936 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3937 * target.h (target_ops): Comment for *_watchpoint to make it clear
3938 the functions can get types '0' and '1'.
3940 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3942 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3943 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3944 * regcache.c (get_regcache): Likewise.
3945 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3946 * win32-low.c (child_fetch_inferior_registers): Remove check for
3949 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3950 Pedro Alves <pedro@codesourcery.com>
3952 * target.h (struct target_ops) <supports_multi_process>: New
3954 (target_supports_multi_process): New.
3955 * server.c (handle_query): Even if GDB reports support, only
3956 enable multi-process if the target also supports it. Report
3957 multi-process support only if the target backend supports it.
3958 * linux-low.c (linux_supports_multi_process): New function.
3959 (linux_target_ops): Install it as target_supports_multi_process
3962 2009-05-24 Doug Evans <dje@google.com>
3964 Global renaming of find_thread_pid to find_thread_ptid.
3965 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3966 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3967 All callers updated.
3969 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3970 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3973 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3974 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3975 (linux_resume_one_lwp): Ditto.
3977 2009-05-23 Doug Evans <dje@google.com>
3979 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3980 from struct inferior_list_entry * to struct lwp_info *.
3981 All callers updated.
3983 2009-05-13 Doug Evans <dje@google.com>
3985 * linux-x86-low.c: Don't include assert.h.
3986 (x86_siginfo_fixup): Use fatal, not assert.
3987 (x86_arch_setup): Fix comment.
3989 2009-05-12 Doug Evans <dje@google.com>
3991 Biarch support for i386/amd64 gdbserver.
3992 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3993 Add linux-x86-low.c.
3994 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3995 (linux-x86-low.o): Add.
3996 * linux-x86-64-low.c: Delete.
3997 * linux-i386-low.c: Delete.
3998 * linux-x86-low.c: New file.
3999 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4001 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4003 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4004 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4005 (linux_child_pid_to_exec_file): New function.
4006 (elf_64_header_p, elf_64_file_p): New functions.
4007 (siginfo_fixup): New function.
4008 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4009 give target a chance to convert layout.
4010 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4011 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4013 2009-05-07 Doug Evans <dje@google.com>
4015 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4016 (regsets_store_inferior_registers): Ditto.
4018 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4022 * linux-low.c (must_set_ptrace_flags): Delete.
4023 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4025 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4026 `lwp->must_set_ptrace_flags' instead.
4027 (linux_wait_for_event_1): Set ptrace options here.
4028 (linux_wait_1): ... not here.
4030 2009-04-30 Doug Evans <dje@google.com>
4032 * inferiors.c (started_inferior_callback): New function.
4033 (attached_inferior_callback): New function.
4034 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4035 * server.c (print_started_pid, print_attached_pid): New functions.
4036 (detach_or_kill_for_exit): New function.
4037 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4038 * server.h (have_started_inferiors_p): Declare.
4039 (have_attached_inferiors_p): Declare.
4041 * inferiors.c (remove_process): Fix memory leak, free process.
4042 * linux-low.c (linux_remove_process): New function.
4043 (linux_kill): Call it instead of remove_process.
4044 (linux_detach, linux_wait_1): Ditto.
4046 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4048 * configure.srv: Add x86 Windows CE target.
4050 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4052 * inferiors.c (get_thread_process): Make global.
4053 * server.h (get_thread_process): Add prototype.
4054 * thread-db.c (find_one_thread): Use get_thread_process
4055 instead of current_process.
4056 (thread_db_get_tls_address): Do not crash if called when
4057 thread layer is not yet initialized.
4059 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4061 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4062 * spu-low.c (current_tid): Rename to ...
4063 (current_ptid): ... this.
4064 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4065 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4066 ptid_get_lwp (current_ptid) instead of current_tid.
4067 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4068 instead of current_tid. Use find_process_pid to verify pid
4069 argument is valid. Pass proper argument to remove_process.
4070 (spu_thread_alive): Compare current_ptid instead of current_tid.
4071 (spu_resume): Likewise.
4073 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4075 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4078 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4080 Implement the multiprocess extensions, and add linux multiprocess
4083 * server.h (ULONGEST): Declare.
4084 (struct ptid, ptid_t): New.
4085 (minus_one_ptid, null_ptid): Declare.
4086 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4087 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4088 (struct inferior_list_entry): Change `id' type from unsigned from
4090 (struct sym_cache, struct breakpoint, struct
4091 process_info_private): Forward declare.
4092 (struct process_info): Declare.
4093 (current_process): Declare.
4094 (all_processes): Declare.
4095 (initialize_inferiors): Declare.
4096 (add_thread): Adjust to use ptid_t.
4097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4098 (add_process, remove_process, find_thread_pid): Declare.
4099 (find_inferior_id): Adjust to use ptid_t.
4100 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4101 (multi_process): Declare.
4102 (push_event): Adjust to use ptid_t.
4103 (read_ptid, write_ptid): Declare.
4104 (prepare_resume_reply): Adjust to use ptid_t.
4105 (clear_symbol_cache): Declare.
4106 * inferiors.c (all_processes): New.
4107 (null_ptid, minus_one_ptid): New.
4108 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4109 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4110 (add_thread): Change unsigned long to ptid. Remove gdb_id
4112 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4113 (gdb_id_to_thread): Rename to ...
4114 (find_thread_pid): ... this. Change unsigned long to ptid.
4115 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4116 (loaded_dll, pull_pid_from_list): Adjust.
4117 (add_process, remove_process, find_process_pid)
4118 (get_thread_process, current_process, initialize_inferiors): New.
4119 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4120 (struct target_waitstatus) <related_pid>: Ditto.
4121 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4123 (struct target_ops) <join>: Add `pid' argument.
4124 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4125 (struct target_ops) <wait>: Add `ptid' field. Change return type
4127 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4128 (mywait): Add `ptid' argument. Change return type to ptid_t.
4129 (target_pid_to_str): Declare.
4130 * target.c (set_desired_inferior): Adjust to use ptids.
4131 (mywait): Add new `ptid' argument. Adjust.
4132 (target_pid_to_str): New.
4133 * mem-break.h (free_all_breakpoints): Declare.
4134 * mem-break.c (breakpoints): Delelete.
4135 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4136 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4137 to use per-process breakpoint list.
4138 (free_all_breakpoints): New.
4139 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4140 (symbol_cache, all_symbols_looked_up): Delete.
4142 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4144 (prepare_resume_reply): Change ptid argument's type from unsigned
4145 long to ptid_t. Adjust. Implement W;process and X;process.
4146 (free_sym_cache, clear_symbol_cache): New.
4147 (look_up_one_symbol): Adjust to per-process symbol cache. *
4148 * server.c (cont_thread, general_thread, step_thread): Change type
4151 (multi_process): New.
4152 (last_ptid): Change type to ptid_t.
4153 (struct vstop_notif) <ptid>: Change type to ptid_t.
4154 (queue_stop_reply, push_event): Change `ptid' argument's type to
4156 (discard_queued_stop_replies): Add `pid' argument.
4157 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4158 changes. Don't reference the `attached' global.
4159 (attach_inferior): Adjust to mywait interface changes.
4160 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4161 features. Handle and report "multiprocess+". Handle
4163 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4165 (handle_v_kill): New.
4166 (handle_v_stopped): Adjust to use target_pid_to_str.
4167 (handle_v_requests): Allow multiple attaches and runs when
4168 multiprocess extensions are in effect. Handle "vKill".
4169 (myresume): Adjust to use ptids.
4170 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4171 (handle_status): Adjust to discard_queued_stop_replies interface
4173 (first_thread_of, kill_inferior_callback)
4174 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4175 (main): Call initialize_inferiors. Adjust to use ptids, killing
4176 and detaching from all inferiors. Handle multiprocess packet
4178 * linux-low.h: Include gdb_proc_service.h.
4179 (struct process_info_private): New.
4180 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4181 <lwpid_of>: Use ptid_get_lwp.
4182 (get_lwp_thread): Adjust.
4183 (struct lwp_info): Add `dead' member.
4184 (find_lwp_pid): Declare.
4185 * linux-low.c (thread_db_active): Delete.
4186 (new_inferior): Adjust comment.
4187 (inferior_pid): Delete.
4188 (linux_add_process): New.
4189 (handle_extended_wait): Adjust.
4190 (add_lwp): Change unsigned long to ptid.
4191 (linux_create_inferior): Add process to processes table. Adjust
4192 to use ptids. Don't set new_inferior here.
4193 (linux_attach_lwp): Rename to ...
4194 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4195 it. Adjust to use ptids.
4196 (linux_attach_lwp): New.
4197 (linux_attach): Add process to processes table. Don't set
4199 (struct counter): New.
4200 (second_thread_of_pid_p, last_thread_of_process_p): New.
4201 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4203 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4204 processes. Remove process from process table.
4205 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4206 to multiple processes.
4207 (any_thread_of): New.
4208 (linux_detach): Add `pid' argument, and handle it. Remove process
4209 from processes table.
4210 (linux_join): Add `pid' argument. Handle it.
4211 (linux_thread_alive): Change unsighed long argument to ptid_t.
4212 Consider dead lwps as not being alive.
4213 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4214 threads we're not interested in.
4215 (same_lwp, find_lwp_pid): New.
4216 (linux_wait_for_lwp): Change `pid' argument's type from int to
4218 (linux_wait_for_event): Rename to ...
4219 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4220 from int to ptid_t. Adjust.
4221 (linux_wait_for_event): New.
4222 (linux_wait_1): Add `ptid' argument. Change return type to
4223 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4224 that exit from the process table.
4225 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4227 (mark_lwp_dead): New.
4228 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4229 stopping all threads, mark its main lwp as dead.
4230 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4232 (fetch_register, usr_store_inferior_registers)
4233 (regsets_fetch_inferior_registers)
4234 (regsets_store_inferior_registers, linux_read_memory)
4235 (linux_write_memory): Inline `inferior_pid'.
4236 (linux_look_up_symbols): Adjust to use per-process
4238 (linux_request_interrupt): Adjust to use ptids.
4239 (linux_read_auxv): Inline `inferior_pid'.
4240 (initialize_low): Don't reference thread_db_active.
4241 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4242 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4243 (ps_getpid): Return the pid of the current inferior.
4244 * thread-db.c (proc_handle, thread_agent): Delete.
4245 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4247 (find_one_thread): Change argument type to ptid_t. Adjust to
4249 (maybe_attach_thread): Adjust to per-process data and ptids.
4250 (thread_db_find_new_threads): Ditto.
4251 (thread_db_init): Ditto.
4252 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4253 processes table. Adjust to use ptids.
4254 (spu_kill, spu_detach): Adjust interface. Remove process from
4256 (spu_join, spu_thread_alive): Adjust interface.
4257 (spu_wait): Adjust interface. Remove process from processes
4258 table. Adjust to use ptids.
4259 * win32-low.c (current_inferior_tid): Delete.
4260 (current_inferior_ptid): New.
4261 (debug_event_ptid): New.
4262 (thread_rec): Take a ptid. Adjust.
4263 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4264 (child_delete_thread): Ditto.
4265 (do_initial_child_stuff): Add `attached' argument. Add process to
4267 (child_fetch_inferior_registers, child_store_inferior_registers):
4269 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4270 (win32_attach): Pass 1 to do_initial_child_stuff.
4271 (win32_kill): Adjust interface. Remove process from processes
4273 (win32_detach): Ditto.
4274 (win32_join): Adjust interface.
4275 (win32_thread_alive): Take a ptid.
4276 (win32_resume): Adjust to use ptids.
4277 (get_child_debug_event): Ditto.
4278 (win32_wait): Adjust interface. Remove exiting process from
4281 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4283 Non-stop mode support.
4285 * server.h (non_stop): Declare.
4286 (gdb_client_data, handler_func): Declare.
4287 (delete_file_handler, add_file_handler, start_event_loop):
4289 (handle_serial_event, handle_target_event, push_event)
4290 (putpkt_notif): Declare.
4291 * target.h (enum resume_kind): New.
4292 (struct thread_resume): Replace `step' field by `kind' field.
4293 (TARGET_WNOHANG): Define.
4294 (struct target_ops) <wait>: Add `options' argument.
4295 <supports_non_stop, async, start_non_stop>: New fields.
4296 (target_supports_non_stop, target_async): New.
4297 (start_non_stop): Declare.
4298 (mywait): Add `options' argument.
4299 * target.c (mywait): Add `options' argument. Print child exit
4301 (start_non_stop): New.
4302 * server.c (non_stop, own_buf, mem_buf): New globals.
4303 (struct vstop_notif): New.
4304 (notif_queue): New global.
4305 (queue_stop_reply, push_event, discard_queued_stop_replies)
4306 (send_next_stop_reply): New.
4307 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4309 (attach_inferior): In non-stop mode, don't wait for the target
4311 (handle_general_set): Handle QNonStop.
4312 (handle_query): When handling qC, return the current general
4313 thread, instead of the first thread of the list.
4314 (handle_query): If the backend supports non-stop mode, include
4315 QNonStop+ in the qSupported query response.
4316 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4318 (handle_v_attach, handle_v_run): Handle non-stop mode.
4319 (handle_v_stopped): New.
4320 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4321 (myresume): Adjust to use resume_kind. Handle non-stop.
4322 (queue_stop_reply_callback): New.
4323 (handle_status): Handle non-stop mode.
4324 (main): Clear non_stop flag on reconnection. Use the event-loop.
4325 Refactor serial protocol handling from here ...
4326 (process_serial_event): ... to this new function. When GDB
4327 selects any thread, select one here. In non-stop mode, wait until
4328 GDB acks all pending events before exiting.
4329 (handle_serial_event, handle_target_event): New.
4330 * remote-utils.c (remote_open): Install remote_desc in the event
4332 (remote_close): Remove remote_desc from the event loop.
4333 (putpkt_binary): Rename to...
4334 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4335 (putpkt_binary): New as wrapper around putpkt_binary_1.
4336 (putpkt_notif): New.
4337 (prepare_resume_reply): In non-stop mode, don't change the
4339 * event-loop.c: New.
4340 * Makefile.in (OBJ): Add event-loop.o.
4341 (event-loop.o): New rule.
4343 * linux-low.h (pid_of): Moved here.
4345 (get_lwp_thread): Use lwpid_of.
4346 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4347 * linux-low.c (pid_of): Delete.
4348 (inferior_pid): Use lwpid_of.
4349 (linux_event_pipe): New.
4350 (target_is_async_p): New.
4352 (handle_extended_wait): Use lwpid_of.
4353 (add_lwp): Don't set lwpid field.
4354 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4355 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4356 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4357 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4358 first. Adjust to linux_wait_for_event interface changes. Use
4360 (linux_detach): Don't delete the main lwp here.
4361 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4362 (status_pending_p): Don't consider explicitly suspended lwps.
4363 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4364 pointer. Add OPTIONS argument. Change return type to int. Use
4365 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4366 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4367 pointer. Add status pointer argument. Return a pid instead of a
4368 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4369 changes. In non-stop mode, don't switch to a random thread.
4370 (linux_wait): Rename to...
4371 (linux_wait_1): ... this. Add target_options argument, and handle
4372 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4373 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4374 clean exit and signal exit code. Don't stop all threads in
4375 non-stop mode. In all-stop mode, only stop all threads when
4376 reporting a stop to GDB. Handle explicit thread stop requests.
4377 (async_file_flush, async_file_mark): New.
4379 (send_sigstop): Use lwpid_of.
4380 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4381 interface changes. In non-stop mode, don't switch to a random
4383 (linux_resume_one_lwp): Use lwpid_of.
4384 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4385 (linux_resume_one_thread): ... this. Handle resume_stop. In
4386 non-stop mode, don't look for pending flag in all threads.
4387 (resume_status_pending_p): Don't consider explicitly suspended
4389 (my_waitpid): Reimplement. Emulate __WALL.
4390 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4392 (sigchld_handler, linux_supports_non_stop, linux_async)
4393 (linux_start_non_stop): New.
4394 (linux_target_ops): Register linux_supports_non_stop, linux_async
4395 and linux_start_non_stop.
4396 (initialize_low): Install SIGCHLD handler.
4397 * thread-db.c (thread_db_create_event, find_one_thread)
4398 (thread_db_get_tls_address): Use lwpid_of.
4399 * win32-low.c (win32_detach): Adjust to use resume_kind.
4400 (win32_wait): Add `options' argument.
4401 * spu-low.c (spu_resume): Adjust to use resume_kind.
4402 (spu_wait): Add `options' argument.
4404 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4406 Decouple target code from remote protocol.
4408 * target.h (enum target_waitkind): New.
4409 (struct target_waitstatus): New.
4410 (struct target_ops) <wait>: Return an unsigned long. Take a
4411 target_waitstatus pointer instead of a char pointer.
4413 * target.c (mywait): Change prototype to return an unsigned long.
4414 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4415 * server.h (thread_from_wait, old_thread_from_wait): Delete
4417 (prepare_resume_reply): Change prototype to take a
4419 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4420 (last_status, last_ptid): New.
4421 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4422 pid instead of a signal.
4423 (attach_inferior): Remove "status" and "signal" parameters.
4425 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4427 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4428 (handle_v_requests, myresume): Remove "status" and "signal"
4430 (handle_status): New.
4431 (main): Delete local `status'. Adjust.
4432 * remote-utils.c: Include target.h.
4433 (prepare_resume_reply): Change prototype to take a
4434 target_waitstatus. Adjust.
4436 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4438 * spu-low.c (spu_wait): Adjust.
4439 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4441 (win32_wait): Adjust.
4443 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4445 * target.h (struct thread_resume): Delete leave_stopped member.
4446 (struct target_ops): Add a `n' argument to the `resume' callback.
4447 * server.c (start_inferior): Adjust.
4448 (handle_v_cont, myresume): Adjust.
4449 * linux-low.c (check_removed_breakpoint): Adjust to resume
4450 interface change, and to removed leave_stopped field.
4451 (resume_ptr): Delete.
4452 (struct thread_resume_array): New.
4453 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4454 resume interface change.
4455 (linux_continue_one_thread, linux_queue_one_thread)
4456 (resume_status_pending_p): Check if the resume field is NULL
4457 instead of checking the leave_stopped member.
4458 (linux_resume): Adjust to the target resume interface change.
4459 * spu-low.c (spu_resume): Adjust to the target resume interface
4461 * win32-low.c (win32_detach, win32_resume): Ditto.
4463 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4465 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4467 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4469 (linux_continue_one_thread): Only preserve the stepping flag if
4470 there's a pending breakpoint.
4472 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4474 * server.c (main): After the inferior having exited, call
4475 remote_close before exiting gdbserver.
4477 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4479 Fix size of FPSCR in Power 7 processors.
4480 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4481 (PPC_FEATURE_HAS_DFP): New #define.
4482 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4485 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4487 * server.c (handle_query) Whitespace and formatting.
4489 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4491 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4492 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4493 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4494 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4495 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4496 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4497 Makefile.in, configure.ac: Fix whitespace throughout.
4498 * configure: Regenerate.
4500 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4502 * inferiors.c (find_inferior): Make it safe for the callback
4503 function to delete the currently iterated inferior.
4505 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4507 * Makefile.in (linuw_low_h): Move higher.
4508 (thread-db.o): Depend on $(linux_low_h).
4510 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4512 Rename "process" to "lwp" throughout.
4514 * linux-low.c (all_processes): Rename to...
4515 (all_lwps): ... this.
4516 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4517 (add_process): Rename to ...
4518 (add_lwp): ... this. Adjust.
4519 (linux_create_inferior): Adjust.
4520 (linux_attach_lwp): Adjust.
4521 (linux_attach): Adjust.
4522 (linux_kill_one_process): Rename to ...
4523 (linux_kill_one_lwp): ... this. Adjust.
4524 (linux_kill): Adjust.
4525 (linux_detach_one_process): Rename to ...
4526 (linux_detach_one_lwp): ... this. Adjust.
4527 (linux_detach): Adjust.
4528 (check_removed_breakpoint): Adjust.
4529 (status_pending_p): Adjust.
4530 (linux_wait_for_process): Rename to ...
4531 (linux_wait_for_lwp): ... this. Adjust.
4532 (linux_wait_for_event): Adjust.
4533 (send_sigstop): Adjust.
4534 (wait_for_sigstop): Adjust.
4535 (stop_all_processes): Rename to ...
4536 (stop_all_lwps): ... this.
4537 (linux_resume_one_process): Rename to ...
4538 (linux_resume_one_lwp): ... this. Adjust.
4539 (linux_set_resume_request, linux_continue_one_thread)
4540 (linux_queue_one_thread, resume_status_pending_p)
4541 (usr_store_inferior_registers, regsets_store_inferior_registers)
4542 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4544 * linux-low.h (get_process): Rename to ...
4545 (get_lwp): ... this. Adjust.
4546 (get_thread_process): Rename to ...
4547 (get_thread_lwp): ... this. Adjust.
4548 (get_process_thread): Rename to ...
4549 (get_lwp_thread): ... this. Adjust.
4550 (struct process_info): Rename to ...
4551 (struct lwp_info): ... this.
4552 (all_processes): Rename to ...
4553 (all_lwps): ... this.
4554 * proc-service.c (ps_lgetregs): Adjust.
4555 * thread-db.c (thread_db_create_event, find_one_thread)
4556 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4558 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4560 * server.c (handle_query): Handle "qAttached".
4562 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4564 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4565 GPLv3, update license URL.
4567 2009-03-01 Doug Evans <dje@google.com>
4569 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4570 (server_h): Add gdb_signals.h.
4571 (signals.o): Update.
4572 * server.h (target_signal_from_host,target_signal_to_host_p)
4573 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4575 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4577 * remote-utils.c (getpkt): Also generate remote-debug
4578 information if noack_mode is set.
4580 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4582 * server.c (handle_query): Report qXfer:siginfo:read and
4583 qXfer:siginfo:write as supported and handle them.
4584 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4585 * linux-low.c (linux_xfer_siginfo): New.
4586 (linux_target_ops): Set it.
4588 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4590 * server.c (gdbserver_usage): Mention --remote-debug.
4591 (main): Accept '--remote-debug' switch.
4593 2009-01-18 Doug Evans <dje@google.com>
4595 * regcache.c (new_register_cache): No need to check result of xcalloc.
4596 * server.c (handle_search_memory): Back out calls to xmalloc,
4597 result is checked and error is returned to user upon failure.
4598 (handle_query): Ditto. Add more checks for result of malloc.
4599 (handle_v_cont): Check result of malloc, report error back to
4601 (handle_v_run): Ditto. Call freeargv.
4602 * server.h (freeargv): Declare.
4603 * utils.c (freeargv): New fn.
4605 2009-01-15 Doug Evans <dje@google.com>
4607 * gdbreplay.c (perror_with_name): Make arg const char *.
4608 * server.h (target_signal_to_name): Make return type const char *.
4609 * thread-db.c (thread_db_err_str): Make return type const char *.
4610 * utils.c (perror_with_name): Make arg const char *.
4612 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4614 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4615 when handling a EXIT_PROCESS_DEBUG_EVENT.
4617 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4619 * gdbreplay.c (gdbreplay_version): Update copyright year.
4620 * server.c (gdbserver_version): Likewise.
4622 2009-01-05 Doug Evans <dje@google.com>
4624 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4625 (handle_extended_wait): Improve comment.
4627 2008-12-13 Doug Evans <dje@google.com>
4629 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4630 * server.h (ATTR_MALLOC): New macro.
4631 (xmalloc,xcalloc,xstrdup): Declare.
4632 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4633 * inferiors.c: Ditto.
4634 * linux-low.c: Ditto.
4635 * mem-break.c: Ditto.
4636 * regcache.c: Ditto.
4637 * remote-utils.c: Ditto.
4640 * win32-low.c: Ditto.
4642 2008-12-12 Doug Evans <dje@google.com>
4644 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4645 in debugging printf.
4647 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4649 2008-12-09 Doug Evans <dje@google.com>
4651 * linux-low.h (struct process_info): Delete member tid, unused.
4652 * thread-db.c (find_one_thread): Update.
4653 (maybe_attach_thread): Update.
4655 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4657 * target.h (struct target_ops): Add qxfer_osdata member.
4658 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4660 (linux_qxfer_osdata): New functions.
4661 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4663 * server.c (handle_query): Handle "qXfer:osdata:read:".
4664 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4665 (buffer_xml_printf): New functions.
4666 * server.h (struct buffer): New.
4667 (buffer_grow_str, buffer_grow_str0): New macros.
4668 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4669 (buffer_xml_printf): Declare.
4671 2008-11-24 Doug Evans <dje@google.com>
4673 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4675 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4677 * server.c (handle_v_run): Always use the supplied argument list.
4679 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4681 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4682 (xtensa_regmap_table): Add entry for scompare1.
4684 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4686 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4687 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4688 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4689 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4690 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4691 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4692 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4693 XML target descriptions.
4694 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4695 when inferior is running on an ISA 2.05 or later processor. Add
4696 special case to return offset for full 64-bit slot of FPSCR when
4699 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4701 * Makefile.in (SFILES, clean): Added sparc64 files.
4702 (reg-sparc64.o, reg-sparc64.c): New.
4703 * configure.srv (sparc*-*-linux*): New configuration.
4704 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4705 syscall arguments for SPARC.
4706 (regsets_store_inferior_registers): Likewise.
4707 * linux-sparc-low.c: New file.
4709 2008-10-21 Doug Evans <dje@google.com>
4711 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4712 (READLINE_DIR,READLINE_DEP): Delete.
4713 (INTERNAL_CFLAGS): Update.
4714 (LINTFLAGS): Update.
4716 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4718 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4719 whole argv from the last run, not just argv[0].
4721 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4723 * regcache.c (new_register_cache): Return NULL if the register
4724 cache size isn't known yet.
4725 (free_register_cache): Avoid dereferencing a NULL regcache.
4727 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4729 * configure.srv: Merge MIPS and MIPS64.
4731 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4733 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4735 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4737 * Makefile.in: Add required vsx dependencies.
4739 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4740 Declare init_registers_powerpc_vsx32l.
4741 Declare init_registers_powerpc_vsx64l.
4742 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4743 (ppc_arch_setup): Check for VSX in hwcap.
4744 (ppc_fill_vsxregset): New function.
4745 (ppc_store_vsxregset): New function.
4746 Add new VSX entry in regset_info target_regsets.
4748 * configure.srv: Add new VSX dependencies.
4750 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4752 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4753 (remote_open): Set or clear transport_is_reliable.
4754 (putpkt_binary): Don't expect acks in noack mode.
4755 (getpkt): Don't send ack/nac in noack mode.
4756 * server.c (handle_general_set): Handle QStartNoAckMode.
4757 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4759 (main): Reset noack_mode on every connection.
4760 * server.h (noack_mode): Declare.
4762 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4764 * Makefile.in (GDBREPLAY_OBS): New variable.
4765 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4767 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4768 Daniel Jacobowitz <dan@codesourcery.com>
4770 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4771 (usr_store_inferior_registers): Likewise.
4772 (regsets_store_inferior_registers): Likewise.
4774 2008-07-31 Rolf Jansen <rj@surtec.com>
4775 Pedro Alves <pedro@codesourcery.com>
4777 * configure.ac: Check for memmem declaration.
4778 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4779 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4780 (disable_packet_qfThreadInfo): Unconditionally compile.
4781 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4782 * configure, config.in: Regenerate.
4784 2008-07-28 Doug Kwan <dougkwan@google.com>
4786 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4787 (linux_write_memory): Remove declaration of errno.
4789 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4791 * linux-low.c (handle_extended_wait): Do not use "status"
4792 variable uninitialized.
4794 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4796 * server.c (handle_v_attach): Inhibit reporting dll changes.
4798 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4800 * remote-utils.c (prepare_resume_reply): If requested, don't
4801 output "thread:TID" in the T stop reply.
4803 * server.c (disable_packet_vCont, disable_packet_Tthread)
4804 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4805 (handle_query): If requested, disable support for qC, qfThreadInfo
4807 (handle_v_requests): If requested, disable support for vCont.
4808 (gdbserver_show_disableable): New.
4809 (main): Handle --disable-packet and --disable-packet=LIST.
4811 * server.h (disable_packet_vCont, disable_packet_Tthread)
4812 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4814 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4816 * server.c (gdbserver_usage): Mention --version.
4818 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4820 * Makefile.in (gdbreplay.o): New rule.
4822 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4824 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4825 message, not gdbserver.
4827 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4828 Nathan Sidwell <nathan@codesourcery.com>
4829 Joseph Myers <joseph@codesourcery.com>
4831 * acinclude.m4: Include ../../config/acx.m4.
4832 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4833 * configure, config.in: Regenerate.
4834 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4835 * server.c (gdbserver_version): Print PKGVERSION.
4836 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4837 (main): Adjust gdbserver_usage calls.
4838 * gdbreplay.c (version, host_name): Add declarations.
4839 (gdbreplay_version, gdbreplay_usage): New.
4840 (main): Accept --version and --help options.
4842 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4844 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4845 (arm_breakpoint_at): Handle Thumb.
4846 (the_low_target): Add comment.
4848 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4850 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4852 2008-05-09 Doug Evans <dje@google.com>
4854 * server.h (decode_search_memory_packet): Declare.
4855 * remote-utils.c (decode_search_memory_packet): New fn.
4856 * server.c (handle_search_memory_1): New fn.
4857 (handle_search_memory): New fn.
4858 (handle_query): Process qSearch:memory packets.
4860 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4862 * regcache.c (registers_length): Remove.
4863 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4864 full register packet.
4865 * regcache.h (registers_length): Remove prototype.
4866 * server.h (PBUFSIZ): Define to 16384.
4868 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4870 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4871 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4872 powerpc-64l.o, and powerpc-altivec64l.o.
4873 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4874 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4875 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4876 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4877 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4880 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4881 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4882 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4883 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4884 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4885 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4886 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4887 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4888 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4889 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4892 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4893 (init_registers_powerpc_32l): ... this new prototype.
4894 (init_registers_powerpc_32): Remove, replace by ...
4895 (init_registers_powerpc_altivec32l): ... this new prototype.
4896 (init_registers_powerpc_e500): Remove, replace by ...
4897 (init_registers_powerpc_e500l): ... this new prototype.
4898 (init_registers_ppc64): Remove, replace by ...
4899 (init_registers_powerpc_64l): ... this new prototype.
4900 (init_registers_powerpc_64): Remove, replace by ...
4901 (init_registers_powerpc_altivec64l): ... this new prototype.
4902 (ppc_num_regs): Set to 73.
4903 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4904 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4905 (ppc_cannot_store_register): Handle orig_r3 and trap.
4906 (ppc_arch_setup): Update init_registers_... calls.
4907 (ppc_fill_gregset): Handle orig_r3 and trap.
4909 * inferiors.c (clear_inferiors): Reset current_inferior.
4911 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4913 * acinclude.m4: Add override.m4.
4914 * configure: Regenerate.
4916 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4918 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4919 initial call to init_register_ppc64.
4921 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4923 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4924 powerpc*-*-linux* case.
4925 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4927 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4929 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4930 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4932 * linux-ppc-low.c: Include <elf.h>.
4933 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4934 (ppc_hwcap): New global variable.
4935 (ppc_regmap): Remove __SPE__ #ifdef sections.
4936 (ppc_regmap_e500): New global variable.
4937 (ppc_cannot_store_register): Update __SPE__ special case.
4938 (ppc_get_hwcap): New function.
4939 (ppc_arch_setup): Use it to determine whether inferior supports
4940 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4941 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4942 Do not access registers if target does not support AltiVec.
4943 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4944 Do not access registers if target does not support SPE.
4945 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4947 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4949 * linux-low.c (disabled_regsets, num_regsets): New.
4950 (use_regsets_p): Delete.
4951 (linux_wait_for_process): Clear disabled_regsets.
4952 (regsets_fetch_inferior_registers): Check and set it.
4953 (regsets_store_inferior_registers): Likewise.
4954 (linux_fetch_registers, linux_store_registers): Do not use
4956 (initialize_low): Allocate disabled_regsets.
4958 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4960 * Makefile.in (LIBOBJS): New.
4962 (memmem.o): New rule.
4963 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4964 * configure: Regenerated.
4966 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4968 * server.c (handle_query): Never return "unsupported" for
4969 qXfer:features:read queries.
4971 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4973 * server.c (get_features_xml): Fix inverted condition.
4974 (handle_query): Always support qXfer:feature:read.
4976 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4978 * server.c (wrapper_argv): New.
4979 (start_inferior): Handle wrapper_argv. If set, expect an extra
4981 (gdbserver_usage): Document --wrapper.
4982 (main): Parse --wrapper.
4984 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4986 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4987 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4988 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4989 (ppc_set_pc): Likewise.
4990 (ppc_arch_setup): New function.
4991 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4992 of collect_register.
4993 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4995 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4997 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4998 instead of linux-ppc64-low.o.
4999 * linux-ppc64-low.c: Remove file.
5000 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5001 (linux-ppc64-low.o): Remove rule.
5003 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5004 (init_registers_powerpc_64): Likewise.
5005 (ppc_regmap): Conditionally define depending on __powerpc64__.
5006 (ppc_cannot_store_register): Do not special-case "fpscr" when
5007 compiled on __powerpc64__.
5008 (ppc_collect_ptrace_register): New function.
5009 (ppc_supply_ptrace_register): New function.
5010 (ppc_breakpoint): Change type to "unsigned int".
5011 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5012 (the_low_target): Conditionally provide initializers for the
5013 arch_setup member depending on __powerpc64__. Install
5014 collect_ptrace_register and supply_ptrace_register members.
5016 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5018 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5019 * server.c (gdbserver_xmltarget): Define.
5020 (get_features_xml): Use it to replace "target.xml" and arch_string.
5022 * configure.srv: Remove srv_xmltarget. Add XML files that were
5023 mentioned there to srv_xmlfiles instead. Remove conditional tests
5024 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5025 srv_xmlfiles and srv_regobj to include all possible choices.
5026 * configure.ac (srv_xmltarget): Remove.
5027 (srv_xmlfiles): Do not add "target.xml".
5028 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5029 checks for supplementary target information.
5030 * configure: Regenerate.
5031 * Makefile.in (XML_TARGET): Remove.
5032 (target.xml): Remove rule.
5033 (clean): Do not clean up target.xml.
5034 (.PRECIOUS): Do not mention target.xml.
5036 * target.h (struct target_ops): Remove arch_string member.
5037 * linux-low.c (linux_arch_string): Remove.
5038 (linux_target_ops): Remove arch_string initializer.
5039 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5040 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5041 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5042 * spu-low.c (spu_arch_string): Remove.
5043 (spu_target_ops): Remove arch_string initializer.
5044 * win32-low.c (win32_arch_string): Remove.
5045 (win32_target_ops): Remove arch_string initializer.
5046 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5047 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5048 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5050 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5052 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5053 by collect_ptrace_register and supply_ptrace_register hooks.
5054 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5055 instead of checking for the_low_target.left_pad_xfer.
5056 (usr_store_inferior_registers): Use collect_ptrace_register callback
5057 instead of checking for the_low_target.left_pad_xfer.
5059 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5060 (s390_supply_ptrace_register): Likewise.
5061 (s390_fill_gregset): Call s390_collect_ptrace_register.
5062 (the_low_target): Update.
5064 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5065 (ppc_supply_ptrace_register): Likewise.
5066 (the_low_target): Update.
5068 * linux-i386-low.c (the_low_target): Update.
5069 * linux-x86-64-low.c (the_low_target): Update.
5071 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5073 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5074 reg-s390.o and reg-s390x.o.
5076 * linux-low.c (new_inferior): New global variable.
5077 (linux_create_inferior, linux_attach): Set it.
5078 (linux_wait_for_process): Call the_low_target.arch_setup after the
5079 target has stopped for the first time.
5080 (initialize_low): Do not call the_low_target.arch_setup.
5082 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5083 (s390_set_pc): Likewise.
5084 (s390_arch_setup): New function.
5085 (the_low_target): Use s390_arch_setup as arch_setup routine.
5087 * regcache.c (realloc_register_cache): New function.
5088 (set_register_cache): Call it for each existing regcache.
5090 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5092 * server.h (init_registers): Remove prototype.
5094 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5095 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5096 instead of init_registers ().
5097 * linux-arm-low.c (init_registers_arm): Add prototype.
5098 (init_registers_arm_with_iwmmxt): Likewise.
5099 (the_low_target): Add initializer for arch_setup field.
5100 * linux-cris-low.c (init_registers_cris): Add prototype.
5101 (the_low_target): Add initializer for arch_setup field.
5102 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5103 (the_low_target): Add initializer for arch_setup field.
5104 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5105 (the_low_target): Add initializer for arch_setup field.
5106 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5107 (the_low_target): Add initializer for arch_setup field.
5108 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5109 (the_low_target): Add initializer for arch_setup field.
5110 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5111 (the_low_target): Add initializer for arch_setup field.
5112 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5113 (init_registers_mips64_linux): Likewise.
5114 (the_low_target): Add initializer for arch_setup field.
5115 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5116 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5117 (the_low_target): Add initializer for arch_setup field.
5118 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5119 (init_registers_powerpc_64): Likewise.
5120 (the_low_target): Add initializer for arch_setup field.
5121 * linux-s390-low.c (init_registers_s390): Add prototype.
5122 (init_registers_s390x): Likewise.
5123 (the_low_target): Add initializer for arch_setup field.
5124 * linux-sh-low.c (init_registers_sh): Add prototype.
5125 (the_low_target): Add initializer for arch_setup field.
5126 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5127 (the_low_target): Add initializer for arch_setup field.
5128 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5129 (the_low_target): Add initializer for arch_setup field.
5131 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5132 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5133 instead of init_registers ().
5134 * win32-arm-low.c (init_registers_arm): Add prototype.
5135 (the_low_target): Add initializer for arch_setup field.
5136 * win32-i386-low.c (init_registers_i386): Add prototype.
5137 (the_low_target): Add initializer for arch_setup field.
5139 * spu-low.c (init_registers_spu): Add prototype.
5140 (initialize_low): Call initialie_registers_spu () instead of
5141 initialize_registers ().
5143 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5145 * server.c (handle_v_requests): When handling the vRun and vAttach
5146 packets, if already debugging a process, don't kill it. Return an
5149 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5151 * server.c (handle_query): Correct length check.
5153 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5155 * win32-low.c (do_initial_child_stuff): Add process handle
5156 parameter. Set current_process_handle and current_process_id from the
5157 parameters. Clear globals.
5158 (win32_create_inferior): Don't set current_process_handle and
5159 current_process_id here. Instead pass them on the call to
5160 do_initial_child_stuff.
5161 (win32_attach): Likewise.
5162 (win32_clear_inferiors): New.
5163 (win32_kill): Don't close the current process handle or the
5164 current thread handle here. Instead call win32_clear_inferiors.
5165 (win32_detach): Don't open a new handle to the process. Call
5166 win32_clear_inferiors.
5167 (win32_join): Don't rely on current_process_handle; open a new
5168 handle using the process id.
5169 (win32_wait): Call win32_clear_inferiors when the inferior process
5172 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5174 * server.c (monitor_show_help): Add "exit".
5176 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5178 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5179 (clean): Add reg-xtensa.c.
5180 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5181 * configure.srv (xtensa*-*-linux*) New target.
5182 * linux-xtensa-low.c: New.
5183 * xtensa-xtregs.c: New.
5185 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5187 * hostio.c: Don't include errno.h.
5188 (errno_to_fileio_errno): Move to hostio-errno.
5189 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5190 error number outputting to the target->hostio_last_error callback.
5191 (hostio_packet_error): Use FILEIO_EINVAL directly.
5192 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5193 calls to hostio_error.
5194 * hostio-errno.c: New.
5195 * server.h (hostio_last_error_from_errno): Declare.
5196 * target.h (target_ops): Add hostio_last_error member.
5197 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5198 as hostio_last_error handler.
5199 * spu-low.c (spu_target_ops): Likewise.
5200 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5201 (wince_hostio_last_error): New functions.
5202 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5203 as hostio_last_error handler.
5204 (win32_target_ops) [!_WIN32_WCE]: Register
5205 hostio_last_error_from_errno as hostio_last_error handler.
5206 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5207 (hostio-errno.o): New rule.
5208 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5209 * configure.srv (srv_hostio_err_objs): New variable. Default to
5211 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5212 * configure: Regenerate.
5214 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5216 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5217 (linux_kill, linux_detach): Clean up the process list.
5218 * remote-utils.c (remote_open): Improve port number parsing.
5219 (putpkt_binary, input_interrupt): Only send interrupts if the target
5221 * server.c (extended_protocol): Make static.
5222 (attached): Define earlier.
5223 (exit_requested, response_needed, program_argv): New variables.
5224 (target_running): New.
5225 (start_inferior): Clear attached here.
5226 (attach_inferior): Set attached here.
5227 (require_running): Define.
5228 (handle_query): Use require_running and target_running. Implement
5230 (handle_v_attach, handle_v_run): New.
5231 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5232 (gdbserver_usage): Update.
5233 (main): Redo argument parsing. Handle --debug and --multi. Handle
5234 --attach along with other options or after the port. Save
5235 program_argv. Support no initial program. Resynchronize
5236 communication with GDB after an error. Handle "monitor exit".
5237 Use require_running and target_running. Always allow the extended
5238 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5239 restart in extended mode.
5240 * README: Refer to the GDB manual. Update --attach usage.
5242 2007-12-20 Andreas Schwab <schwab@suse.de>
5244 * linux-low.c (STACK_SIZE): Define.
5245 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5246 (linux_test_for_tracefork): Likewise.
5248 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5250 * linux-low.c (linux_wait_for_event): Update messages. Do not
5251 reinsert auto-delete breakpoints.
5252 * mem-break.c (struct breakpoint): Change return type of handler to
5254 (set_breakpoint_at): Update handler type.
5255 (reinsert_breakpoint_handler): Return 1 instead of calling
5257 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5259 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5260 * mem-break.h (set_breakpoint_at): Update handler type.
5261 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5262 * win32-low.c (auto_delete_breakpoint): New.
5263 (get_child_debug_event): Use it.
5265 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5267 * configure.ac: Check for pread and pwrite.
5268 * hostio.c (handle_pread): Fall back to lseek and read.
5269 (handle_pwrite): Fall back to lseek and write.
5270 * config.in, configure: Regenerated.
5272 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5274 * server.c (myresume): Add own_buf argument.
5275 (main): Update calls.
5277 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5279 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5280 * remote-utils.c (remote_open): Do not call disable_async_io.
5281 (block_async_io): Delete.
5282 (unblock_async_io): Make static.
5283 (initialize_async_io): New.
5284 * server.c (handle_v_cont): Handle async I/O here.
5285 (myresume): Likewise. Move other common resume tasks here...
5286 (main): ... from here. Call initialize_async_io. Disable async
5287 I/O before the main loop.
5288 * server.h (initialize_async_io): Declare.
5289 (block_async_io, unblock_async_io): Delete prototypes.
5290 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5292 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5294 * remote-utils.c (readchar): Allow binary data in received messages.
5296 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5298 * win32-low.c (attaching): New global.
5299 (win32_create_inferior): Clear the `attaching' global.
5300 (win32_attach): Set the `attaching' global.
5301 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5302 attaching. Only set a breakpoint at the entry point if not
5305 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5307 * server.c (main): Don't report dll events on the initial
5308 connection on attaches.
5310 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5312 * server.c (main): Relax numerical bases supported for the pid of
5313 the --attach command line argument.
5315 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5317 * win32-low.c (win32_attach): Call OpenProcess before
5318 DebugActiveProcess, not after. Add last error output to error
5321 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5323 * win32-low.c (win32_get_thread_context)
5324 (win32_set_thread_context): New functions.
5325 (thread_rec): Use win32_get_thread_context.
5326 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5327 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5330 2007-12-03 Leo Zayas
5331 Pedro Alves <pedro_alves@portugalmail.pt>
5333 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5335 (child_add_thread): Minor cleanup.
5336 (child_continue): Resume artificially suspended threads before
5337 calling ContinueDebugEvent.
5338 (suspend_one_thread): New.
5339 (fake_breakpoint_event): New.
5340 (get_child_debug_event): Change return type to int. Check here if
5341 gdb sent an interrupt request. If a soft interrupt was requested,
5342 fake a breakpoint event. Return 0 if there is no event to handle,
5344 (win32_wait): Don't check here if gdb sent an interrupt request.
5345 Ensure there is a valid event to handle.
5346 (win32_request_interrupt): Add soft interruption method as last
5349 2007-12-03 Leo Zayas
5350 Pedro Alves <pedro_alves@portugalmail.pt>
5352 * win32-low.h (win32_thread_info): Add descriptions to the
5353 structure members. Replace `suspend_count' counter by a
5355 * win32-low.c (thread_rec): Update condition of when to get the
5356 context from the inferior. Rely on ContextFlags being set if it
5357 has already been retrieved. Only suspend the inferior thread if
5358 we haven't already. Warn if that fails.
5359 (continue_one_thread): s/suspend_count/suspended/. Only call
5360 ResumeThread once. Warn if that fails.
5362 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5364 * win32-low.c (win32_wait): Don't read from the inferior when it
5367 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5369 * Makefile.in (win32_low_h): New variable.
5370 (win32-low.o): Add dependency on $(win32_low_h).
5371 (win32-arm-low.o, win32-i386-low.o): New rules.
5373 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5375 * hostio.c: Correct copyright year.
5377 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5379 * Makefile.in (OBS): Add hostio.o.
5380 (hostio.o): New rule.
5381 * server.h (handle_vFile): Declare.
5382 * hostio.c: New file.
5383 * server.c (handle_v_requests): Take packet_len and new_packet_len
5384 for binary packets. Call handle_vFile.
5385 (main): Update call to handle_v_requests.
5387 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5389 * linux-low.c: Include <sched.h>.
5391 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5393 * linux-low.c (linux_tracefork_grandchild): New.
5394 (linux_tracefork_child): Use clone.
5395 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5397 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5399 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5401 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5403 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5405 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5407 * inferiors.c (change_inferior_id): Delete.
5408 (add_pid_to_list, pull_pid_from_list): New.
5409 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5410 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5411 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5412 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5413 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5414 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5415 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5416 (using_threads): Always set to 1.
5417 (handle_extended_wait): New.
5418 (add_process): Do not set TID.
5419 (linux_create_inferior): Set must_set_ptrace_flags.
5420 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5421 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5422 (linux_thread_alive): Rename TID argument to LWPID.
5423 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5424 (linux_wait_for_event): Do not use TID or check using_threads. Update
5425 call to dead_thread_notify. Call handle_extended_wait.
5426 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5427 (send_sigstop): Delete sigstop_sent.
5428 (wait_for_sigstop): Avoid TID.
5429 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5430 (linux_test_for_tracefork): New.
5431 (linux_lookup_signals): Use thread_db_active and
5432 linux_supports_tracefork_flag.
5433 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5434 * linux-low.h (get_process_thread): Avoid TID.
5435 (struct process_ifo): Move thread_known and tid to the end. Remove
5437 (linux_attach_lwp, thread_db_init): Update prototypes.
5438 * server.h (change_inferior_id): Delete prototype.
5439 (add_pid_to_list, pull_pid_from_list): New prototypes.
5440 * thread-db.c (thread_db_use_events): New.
5441 (find_first_thread): Rename to...
5442 (find_one_thread): ...this. Update callers and messages. Do not
5443 call fatal. Check thread_db_use_events. Do not call
5444 change_inferior_id or new_thread_notify.
5445 (maybe_attach_thread): Update. Do not call new_thread_notify.
5446 (thread_db_init): Set thread_db_use_events. Check use_events.
5447 * utils.c (fatal, warning): Correct message prefix.
5449 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5451 * Makefile.in (clean): Remove new files.
5452 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5453 (powerpc-64.o, powerpc-64.c): New rules.
5454 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5455 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5457 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5459 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5460 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5461 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5462 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5463 (target_regsets): Add AltiVec and SPE register sets.
5464 * configure.ac: Check for AltiVec and SPE.
5465 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5466 (ppc_fill_vrregset, ppc_store_vrregset): New.
5467 (target_regsets): Add AltiVec register set.
5468 * configure: Regenerated.
5470 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5472 * linux-low.c (O_LARGEFILE): Define.
5473 (linux_read_memory): Use /proc/PID/mem.
5474 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5475 * configure, config.in: Regenerated.
5477 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5479 * linux-low.c (linux_wait_for_event): Do not pass signals while
5482 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5484 * win32-low.c (create_process): New.
5485 (win32_create_inferior): Use create_process instead of
5486 CreateProcess. If create_process failed retry appending an ".exe"
5487 suffix. Store the GetLastError result immediatelly after
5488 create_process calls and use it on the call to error.
5490 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5492 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5494 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5496 * configure.ac: Switch license to GPLv3.
5498 2007-08-01 Michael Snyder <msnyder@access-company.com>
5500 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5502 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5504 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5506 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5507 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5508 CloseToolhelp32Snapshot.
5509 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5510 CloseToolhelp32Snapshot.
5512 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5514 * server.c (main): Check for inferior exit before main loop.
5516 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5518 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5519 instead of on tmp_desc.
5521 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5522 Daniel Jacobowitz <dan@codesourcery.com>
5524 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5525 (add_thread): Minor cleanups.
5526 (clear_inferiors): Move lower in the file. Clear the DLL
5528 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5529 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5530 (xml_escape_text): New.
5531 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5533 (handle_v_cont): Report errors.
5534 (gdbserver_version): Update.
5535 (main): Correct size of own_buf. Do not report initial DLL events.
5536 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5537 (unloaded_dll, xml_escape_text): New.
5538 * win32-low.c (enum target_waitkind): Update comments.
5539 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5540 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5541 (win32_EnumProcessModules, win32_GetModuleInformation)
5542 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5543 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5544 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5545 (win32_Module32First, win32_Module32Next, load_toolhelp)
5546 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5547 (get_child_debug_event): Handle DLL events.
5548 (win32_wait): Likewise.
5550 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5552 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5553 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5555 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5557 * win32-low.c (handle_output_debug_string): Ignore event if not
5560 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5562 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5564 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5566 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5568 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5570 * inferiors.c (change_inferior_id): Add comment.
5571 * linux-low.c (check_removed_breakpoint): Add an early
5572 prototype. Improve debug output.
5573 (linux_attach): Doc update.
5574 (linux_detach_one_process, linux_detach): Clean up before releasing
5576 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5577 * linux-low.h (struct process_info): Doc improvement.
5578 * mem-break.c (delete_all_breakpoints): New.
5579 * mem-break.h (delete_all_breakpoints): New prototype.
5580 * thread-db.c (find_first_thread): New.
5581 (thread_db_create_event): Call it instead of
5582 thread_db_find_new_threads. Clean up unused variables.
5583 (maybe_attach_thread): Remove first thread handling.
5584 (thread_db_find_new_threads): Use find_first_thread.
5585 (thread_db_get_tls_address): Likewise.
5587 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5589 * thread-db.c (thread_db_find_new_threads): Add prototype.
5590 (thread_db_create_event): Check for the main thread before adding
5592 (maybe_attach_thread): Only enable event reporting if TID == 0.
5593 (thread_db_get_tls_address): Check for new threads.
5595 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5597 * linux-low.c (linux_create_inferior): Try execv before execvp.
5598 * spu-low.c (spu_create_inferior): Likewise.
5600 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5602 * linux-low.c (linux_create_inferior): Change execv to execvp.
5603 * spu-low.c (spu_create_inferior): Likewies.
5605 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5607 * Makefile.in (clean): Clean new files instead of deleted ones.
5608 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5609 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5611 * configure.srv: Specify XML files and new regformats for MIPS and
5613 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5614 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5615 an entry for the restart register.
5616 (mips_cannot_fetch_register, mips_cannot_store_register)
5617 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5618 register names to match the XML descriptions.
5619 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5620 restart register instead of $0.
5622 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5623 Markus Deuling <deuling@de.ibm.com>
5625 * remote-utils.c (decode_xfer_write): New function.
5626 * server.h (decode_xfer_write): Add prototype.
5627 * server.c (handle_query): Add PACKET_LEN argument. Support
5628 qXfer:spu:read and qXfer:spu:write packets.
5629 (main): Pass packet_len to handle_query.
5630 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5631 * target.h (target_ops): Add qxfer_spu.
5633 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5635 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5636 accessing non-seekable spufs files.
5638 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5640 * server.c (handle_query): Add reply for qC packet.
5642 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5643 Leo Zayas <lerele@champenstudios@com>
5645 * server.h (check_remote_input_interrupt_request): New function.
5646 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5647 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5648 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5649 (check_remote_input_interrupt_request): New function.
5650 * server.h (check_remote_input_interrupt_request): Declare.
5651 * win32-low.c (winapi_DebugBreakProcess,
5652 winapi_GenerateConsoleCtrlEvent): New typedefs.
5653 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5655 (win32_wait): Check for remote interrupt request
5656 with check_remote_input_interrupt_request.
5657 (win32_request_interrupt): New function.
5658 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5660 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5662 * win32-low.c (debug_registers_changed,
5663 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5664 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5665 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5666 (thread_rec): Get context using the low target.
5667 (child_add_thread): Call thread_added on the low target,
5668 which does the same thing.
5670 (do_initial_child_stuff): Remove debug registers references.
5671 Set context using the low target. Resume threads after
5672 setting the contexts.
5673 (child_continue): Remove dead variable. Remove debug
5674 registers references.
5675 (child_fetch_inferior_registers): Go through the low target.
5676 (do_child_store_inferior_registers): Remove.
5677 (child_store_inferior_registers): Go through the low target.
5678 (win32_resume): Remove debug registers references.
5679 Set context using the low target.
5680 (handle_exception): Change return type to void. Don't record
5681 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5682 first chance exception.
5683 (get_child_debug_event): Change return type to void. Remove
5684 goto loop. Always return after waiting for debug event.
5685 (win32_wait): Convert to switch statement. Handle spurious
5688 * win32-i386-low.c (debug_registers_changed,
5689 debug_registers_used): New.
5690 (initial_stuff): Rename to ...
5691 (i386_initial_stuff): ... this. Clear debug registers
5693 (store_debug_registers): Delete.
5694 (i386_get_thread_context): New.
5695 (load_debug_registers): Delete.
5696 (i386_set_thread_context): New.
5697 (i386_thread_added): New.
5698 (single_step): Rename to ...
5699 (i386_single_step): ... this.
5700 (do_fetch_inferior_registers): Rename to ...
5701 (i386_fetch_inferior_register): ... this.
5702 (i386_store_inferior_register): New.
5703 (the_low_target): Adapt to new interface.
5705 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5706 (arm_get_thread_context): New.
5707 (arm_set_thread_context): New.
5709 (do_fetch_inferior_registers): Rename to ...
5710 (arm_fetch_inferior_register): ... this.
5711 (arm_store_inferior_register): New.
5712 (arm_wince_breakpoint): Reimplement as unsigned long.
5713 (arm_wince_breakpoint_len): Define.
5714 (the_low_target): Adapt to new interface.
5716 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5717 load_debug_registers. Add get_thread_context, set_thread_context,
5718 thread_added and store_inferior_register. Rename
5719 fetch_inferior_registers to fetch_inferior_register.
5720 (regptr): Remove declaration.
5722 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5724 * linux-low.c (linux_detach): Change return type to int. Return 0.
5725 * spu-low.c (spu_detach): Likewise.
5727 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5729 * target.h (target_ops): Change return type of detach to int.
5731 (join_inferior): New.
5732 * server.c (main): Don't skip detach support on mingw32.
5733 If the inferior doesn't support detaching return error.
5734 Call join_inferior instead of using waitpid.
5735 * linux-low.c (linux_join): New.
5736 (linux_target_op): Add linux_join.
5737 * spu-low.c (spu_join): New.
5738 (spu_target_ops): Add spu_join.
5739 * win32-low.c (win32_detach): Adapt to new interface.
5740 Reopen current_process_handle before detaching. Issue a child
5741 resume before detaching.
5743 (win32_target_op): Add win32_join.
5745 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5747 * win32-low.c (win32-attach): Fix return value.
5748 * target.h (target_ops): Describe ATTACH return values.
5750 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5752 * win32-low.c (GETPROCADDRESS): Define.
5753 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5754 (winapi_DebugSetProcessKillOnExit): Likewise.
5755 (win32_create_inferior): Force usage of ansi CreateProcessA.
5756 (win32_attach): Use GETPROCADDRESS.
5757 (win32_detach): Likewise.
5759 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5761 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5763 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5765 * win32-low.c: Commit leftover changes from 2007-03-29.
5767 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5769 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5770 fields short instead of int. Add explicit padding.
5771 (i387_cache_to_fsave): Remove unnecessary casts.
5772 (i387_fsave_to_cache): Doc fix.
5773 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5775 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5777 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5778 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5780 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5782 * configure.srv (arm*-*-mingw32ce*): Move near the other
5785 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5787 * configure.ac: Add errno checking.
5788 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5789 sys/file.h and malloc.h.
5790 (AC_CHECK_DECLS): Add perror.
5791 (srv_mingwce): Handle.
5792 * configure.srv (i[34567]86-*-cygwin*): Add
5793 win32-i386-low.o to srv_tgtobj.
5794 (i[34567]86-*-mingw*): Likewise.
5795 (arm*-*-mingw32ce*): Add case.
5796 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5797 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5798 [__MINGW32CE__] (strerror): New function.
5799 [__MINGW32CE__] (errno): Define to GetLastError.
5800 [__MINGW32CE__] (COUNTOF): New macro.
5801 (remote_open): Remove extra close call.
5802 * mem-break.c (delete_breakpoint_at): New function.
5803 * mem-break.h (delete_breakpoint_at): Declare.
5804 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5805 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5806 [USE_WIN32API] (read, write): Add char* casts.
5807 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5808 * server.h: Include wincecompat.h on Windows CE.
5809 [HAVE_ERRNO_H]: Check.
5810 (perror): Declare if not declared.
5811 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5812 (perror_with_name): Remove errno declaration.
5813 * wincecompat.h: New.
5814 * wincecompat.c: New.
5816 * win32-arm-low.c: New.
5817 * win32-i386-low.c: New.
5818 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5819 (OUTMSG2): Make it safe.
5821 (COUNTOF): New macro.
5822 (NUM_REGS): Get it from the low target.
5823 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5824 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5825 (thread_rec): Let low target handle debug registers.
5826 (child_add_thread): Likewise.
5827 (child_init_thread_list): Likewise.
5828 (continue_one_thread): Likewise.
5830 (do_child_fetch_inferior_registers): Move to ...
5831 * win32-i386-low.c: ... here, and rename to ...
5832 (do_fetch_inferior_registers): ... this.
5833 * win32-low.c (child_fetch_inferior_registers):
5834 Go through the low target.
5835 (do_child_store_inferior_registers): Use regptr.
5836 (strwinerror): New function.
5837 (win32_create_inferior): Handle Windows CE.
5838 Use strwinerror instead of strerror on Windows error
5839 codes. Add program to the error output.
5840 Don't close the main thread handle on Windows CE.
5841 (win32_attach): Use coredll.dll on Windows CE.
5842 (win32_kill): Close current process and current
5844 (win32_detach): Use coredll.dll on Windows CE.
5845 (win32_resume): Let low target handle debug registers, and
5847 (handle_exception): Add/Remove initial breakpoint. Avoid
5848 non-existant WSTOPSIG on Windows CE.
5849 (win32_read_inferior_memory): Cast to remove warning.
5850 (win32_arch_string): Go through the low target.
5851 (initialize_low): Call set_breakpoint_data with the low
5852 target's breakpoint.
5853 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5854 FOP_REGNUM, mappings): Move to ...
5855 * win32-i386-low.c: ... here.
5856 * win32-low.c (win32_thread_info): Move to ...
5857 * win32-low.h: ... here.
5858 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5859 win32-arm-low.c and wincecompat.c.
5860 (all:): Add $EXEEXT.
5861 (install-only:): Likewise.
5862 (gdbserver:): Likewise.
5863 (gdbreplay:): Likewise.
5864 * config.in: Regenerate.
5865 * configure: Regenerate.
5867 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5869 * win32-low.c: Rename typedef thread_info to
5870 win32_thread_info throughout.
5872 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5874 * win32-i386-low.c: Rename to ...
5875 * win32-low.c: ... this.
5876 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5877 * Makefile.in: Likewise.
5879 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5881 * remote-utils.c (monitor_output): Constify msg parameter.
5882 * server.h (monitor_output): Likewise.
5883 * win32-i386-low.c (handle_output_debug_string): New.
5884 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5885 handle_output_debug_string.
5886 (get_child_debug_event): Likewise.
5888 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5890 * server.c (main): Correct strtoul check.
5892 2007-03-27 Jon Ringle <jon@ringle.org>
5894 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5896 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5898 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5900 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5902 * terminal.h: Check HAVE_SGTTY_H.
5904 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5906 * remote-utils.c (remote_open): Print out the assigned port number.
5908 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5910 * remote-utils.c (monitor_output): New function.
5911 * server.c (debug_threads): Define here.
5912 (monitor_show_help): New function.
5913 (handle_query): Handle qRcmd.
5914 (main): Do not handle 'd' packet.
5915 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5916 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5919 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5921 * Makefile.in (EXEEXT): New.
5922 (clean): Use $(EXEEXT).
5924 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5926 * target.h (target_ops): Rename send_signal to request_interrupt,
5927 and remove enum target_signal parameter.
5928 * linux-low.c (linux_request_interrupt): Rename from
5929 linux_send_signal, and always send SIGINT.
5930 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5931 and always send SIGINT.
5932 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5934 (input_interrupt): Likewise.
5936 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5938 * server.c (get_features_xml): Check if target implemented
5940 * win32-i386-low.c (win32_arch_string): New.
5941 (win32_target_ops): Add win32_arch_string as arch_string member.
5943 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5945 * spu-low.c (spu_arch_string): New.
5946 (spu_target_ops): Add spu_arch_string.
5948 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5950 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5951 * configure.ac: Do not check for terminal.h.
5952 * configure, config.in: Regenerated.
5954 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5956 * Makefile.in (OBS): Add $(XML_BUILTIN).
5957 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5959 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5960 (arm-with-iwmmxt.c): New.
5961 * config.in, configure: Regenerate.
5962 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5963 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5964 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5965 (arm*-*-linux*): Add iWMMXt and regset support.
5966 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5967 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5968 (arm_store_wmmxregset, target_regsets): New.
5969 * server.c (get_features_xml): Take annex argument. Check builtin
5971 (handle_query): Handle multiple annexes.
5973 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5975 * remote-utils.c [USE_WIN32API] (read, write): Define.
5976 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5979 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5981 * linux-i386-low.c (the_low_target): Set arch_string.
5982 * linux-x86-64-low.c (the_low_target): Likewise.
5983 * linux-low.c (linux_arch_string): New.
5984 (linux_target_ops): Add it.
5985 * linux-low.h (struct linux_target_ops): Add arch_string.
5986 * server.c (write_qxfer_response): Use const void * for DATA.
5987 (get_features_xml): New.
5988 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5989 * target.h (struct target_ops): Add arch_string method.
5991 2007-01-03 Denis Pilat <denis.pilat@st.com>
5992 Daniel Jacobowitz <dan@codesourcery.com>
5994 * linux-low.c (linux_kill): Handle being called with no threads.
5995 * win32-i386-low.c (win32_kill): Likewise.
5996 (get_child_debug_event): Clear current_process_handle.
5998 2006-12-30 Denis PILAT <denis.pilat@st.com>
5999 Daniel Jacobowitz <dan@codesourcery.com>
6001 * remote-utils.c (remote_open): Check the type of specified
6002 serial port devices before opening them.
6003 * server.c (main): Kill the inferior if an error occurs during
6004 the first remote_open.
6006 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6008 * README: Update supported targets.
6010 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6012 * Makefile.in (clean): Remove reg-mips64.c.
6013 (reg-mips64.c, reg-mips64.o): New rules.
6014 * configure.srv: Handle mips64. Include regset support for mips.
6015 * linux-mips-low.c (union mips_register): New.
6016 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6017 (mips_breakpoint, mips_breakpoint_at): Use int.
6018 (mips_collect_register, mips_supply_register)
6019 (mips_collect_register_32bit, mips_supply_register_32bit)
6020 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6021 (mips_store_fpregset, target_regsets): New.
6022 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6024 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6026 * configure.srv: Add target "spu*-*-*".
6027 * Makefile.in (clean): Remove reg-spu.c.
6028 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6029 * spu-low.c: New file.
6031 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6033 * configure.ac: Correct td_thr_tls_get_addr test.
6034 * configure: Regenerated.
6036 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6038 * linux-low.c (linux_wait_for_event): Reformat. Use the
6040 * remote-utils.c (decode_address_to_semicolon): New.
6041 * server.c (pass_signals, handle_general_set): New.
6042 (handle_query): Mention QPassSignals for qSupported.
6043 (main): Call handle_general_set.
6044 * server.h (pass_signals, decode_address_to_semicolon): New.
6046 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6048 * server.c (handle_query): Correct error handling for read_auxv.
6050 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6052 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6053 and srv_linux_thread_db to yes.
6054 * linux-s390-low.c (s390_fill_gregset): New function.
6055 (target_regsets): Define data structure.
6057 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6059 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6060 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6061 * config.in, configure: Regenerated.
6062 * inferiors.c (gdb_id_to_thread): New function.
6063 (gdb_id_to_thread_id): Use it.
6064 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6065 * linux-low.h (struct process_info): Add th member.
6066 (thread_db_get_tls_address): New prototype.
6067 * remote-utils.c (decode_address): Make non-static.
6068 * server.c (handle_query): Handle qGetTLSAddr.
6069 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6070 * target.h (struct target_ops): Add get_tls_address.
6071 * thread-db.c (maybe_attach_thread): Save the thread handle.
6072 (thread_db_get_tls_address): New.
6074 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6076 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6077 (linux_resume_one_process): Take a siginfo_t *. Update all
6078 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6079 (struct pending_signals): Add a siginfo_t.
6080 (linux_wait_for_process): Always set last_status.
6081 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6082 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6083 * linux-low.h (struct process_info): Add last_status.
6085 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6087 * remote-utils.c (try_rle): New function.
6088 (putpkt_binary): Use it.
6090 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6092 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6093 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6094 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6095 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6096 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6099 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6101 * server.c (terminal_fd): New variable.
6102 (old_foreground_pgrp): Likewise.
6103 (restore_old_foreground_pgrp): New function.
6104 (start_inferior): Record the terminal file descriptor in terminal_fd
6105 and its original foreground group in old_foreground_pgrp. Register
6106 restore_old_foreground_pgrp with atexit().
6108 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6110 * server.c (handle_query): Correct qPart to qXfer.
6112 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6114 * configure.ac: Check for more headers which are missing on
6115 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6116 * configure.srv: Add Cygwin and mingw32.
6117 * remote-utils.c: Don't include headers unconditionally which
6118 are missing on mingw32. Include <winsock.h> for mingw32.
6119 (remote_open): Adjust for mingw32 support. Flush
6120 standard error after writing to it.
6121 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6122 (unblock_async_io, enable_async_io, disable_async_io)
6123 (readchar, getpkt): Update for Winsock support.
6124 (prepare_resume_reply): Expect a protocol signal number.
6125 * server.c: Disable <sys/wait.h> on mingw32.
6126 (start_inferior): Adjust for mingw32 support. Flush
6127 standard error after writing to it.
6128 (attach_inferior): Likewise. Use protocol signal
6130 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6132 * win32-i386-low.c: New file.
6133 * Makefile.in (XM_CLIBS): Set.
6134 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6135 (win32-i386-low.o): New dependency rule.
6136 * linux-low.c (linux_wait): Use target signal numbers.
6137 * target.h (struct target_ops): Doc fix.
6138 * server.h (target_signal_to_name): New prototype.
6139 * gdbreplay.c: Don't include headers unconditionally which
6140 are missing on mingw32. Include <winsock.h> for mingw32.
6141 (remote_close, remote_open): Adjust for Winsock support.
6142 * configure, config.in: Regenerated.
6144 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6146 * server.c (decode_xfer_read, write_qxfer_response): New.
6147 (handle_query): Take a packet length argument. Handle
6148 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6149 the qSupported response.
6150 (main): Update call to handle_query.
6152 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6154 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6155 (putpkt_binary): Renamed from putpkt and adjusted for binary
6157 (putpkt): New wrapper for putpkt_binary.
6158 (readchar): Don't mask off the high bit.
6159 (decode_X_packet): New function.
6160 * server.c (main): Call putpkt_binary if a handler sets the packet
6161 length. Save the length of the incoming packet. Handle 'X'.
6162 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6164 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6166 * server.c (handle_query): Handle qSupported.
6168 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6170 * remote-utils.c (all_symbols_looked_up): New variable.
6171 (look_up_one_symbol): Check it.
6172 * server.h (look_up_one_symbol): New declaration.
6173 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6175 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6177 * Makefile.in (linux-arm-low.o): Update dependencies.
6178 * linux-arm-low.c: Include "gdb_proc_service.h".
6179 (PTRACE_GET_THREAD_AREA): Define.
6180 (ps_get_thread_area): New function.
6182 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6184 * configure.srv (m68k*-*-uclinux*): New target.
6185 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6186 (linux_resume_one_process): Remove extraneous cast.
6187 (linux_read_offsets): New.
6188 (linux_target_op): Add linux_read_offsets on mmuless systems.
6189 * server.c (handle_query): Add qOffsets logic.
6190 * target.h (struct target_ops): Add read_offsets.
6192 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6194 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6195 (PTRACE_GET_THREAD_AREA): Define.
6196 (ps_get_thread_area): New function.
6197 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6198 (linux-x86-64-low.o): Update.
6200 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6202 * configure.ac: Remove checks for prfpregset_t.
6203 * gdb_proc_service.h: New file.
6204 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6205 new "gdb_proc_service.h".
6206 * proc-service.c: Likewise.
6207 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6208 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6209 * Makefile.in (gdb_proc_service_h): Updated.
6210 * configure, config.in: Regenerated.
6212 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6214 * remote-utils.c (prepare_resume_reply): Move declaration
6215 of gdb_id_from_wait to the top of the block.
6217 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6219 * linux-low.c (regsets_store_inferior_registers): Read the regset
6220 from the target before filling it.
6222 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6224 * server.c (attach_inferior): Return SIGTRAP for a successful
6227 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6229 * Makefile.in (OBS): Add version.o.
6230 (STAGESTUFF): Delete.
6231 (version.o): Add dependencies.
6232 (version.c): Replace rule.
6233 (clean): Remove version.c.
6234 * server.c (gdbserver_version): New.
6235 (gdbserver_usage): Use printf.
6236 (main): Handle --version and --help.
6237 * server.h (version, host_name): Add declarations.
6239 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6251 * linux-x86-64-low.c:
6254 * linux-ppc64-low.c:
6263 * linux-crisv32-low.c:
6275 * gdbserver.1: Add (C) after Copyright. Update the FSF
6278 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6280 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6281 (arm_breakpoint_at): Recognize both breakpoints.
6282 (the_low_target): Use the correct breakpoint instruction.
6284 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6286 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6287 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6288 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6289 (the_low_target): Update.
6291 2005-10-25 Andreas Schwab <schwab@suse.de>
6293 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6295 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6296 (ia64_num_regs): Reduce to 462.
6298 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6300 * acinclude.m4: Correct quoting.
6301 * aclocal.m4: Regenerated.
6303 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6304 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6305 (thread_db_init): Call thread_db_err_str.
6306 * configure.ac: Check for TD_VERSION.
6307 * config.in, configure: Regenerated.
6309 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6311 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6313 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6315 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6316 is not available. Define HAVE_PTRACE_GETREGS if it is.
6317 * config.in, configure: Regenerated.
6318 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6319 * linux-i386-low.c, linux-m68k-low.c: Update to use
6320 HAVE_PTRACE_GETREGS.
6321 * linux-low.c (regsets_fetch_inferior_registers)
6322 (regsets_store_inferior_registers): Only return 0 if we processed
6324 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6325 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6327 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6329 * inferiors.c (struct thread_info): Add gdb_id.
6330 (add_thread): Add gdb_id argument.
6331 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6332 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6333 calls to add_thread.
6334 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6335 * server.c (handle_query): Use thread_to_gdb_id.
6336 (handle_v_cont, main): Use gdb_id_to_thread_id.
6337 * server.h (add_thread): Update prototype.
6338 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6341 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6343 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6344 left-padded registers.
6345 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6346 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6348 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6350 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6351 * configure: Regenerate.
6352 * config.in: Regenerate.
6353 * server.h (NEED_DECLARATION_STRERROR):
6354 Replace with !HAVE_DECL_STRERROR.
6356 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6358 * linux-low.c (linux_wait, linux_send_signal): Don't test
6359 an unsigned long variable for > 0 if it could be MAX_ULONG.
6360 * server.c (myresume): Likewise.
6361 * target.c (set_desired_inferior): Likewise.
6363 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6365 * configure.ac: Simplify and improve check for socklen_t.
6366 * configure, config.in: Regenerate.
6368 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6370 * acconfig.h: Remove.
6371 * configure.ac: Add a test for socklen_t. Use three-argument
6372 AC_DEFINE throughout.
6373 * config.in: Regenerated using autoheader 2.59.
6374 * configure: Regenerated.
6376 * gdbreplay.c (socklen_t): Provide a default.
6377 (remote_open): Use socklen_t.
6378 * remote-utils.c (socklen_t): Provide a default.
6379 (remote_open): Use socklen_t.
6380 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6383 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6385 * linux-low.c (linux_read_memory, linux_write_memory)
6386 (linux_read_auxv): Likewise.
6387 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6388 (check_mem_write): Likewise.
6389 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6391 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6392 (registers_from_string, register_data): Likewise.
6393 * server.c (handle_query, main): Likewise.
6394 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6395 (decode_M_packet): Likewise.
6396 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6397 * target.h (struct target_ops): Update read_memory, write_memory,
6399 (read_inferior_memory, write_inferior_memory): Update.
6400 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6402 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6403 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6404 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6405 linux-s390-low.c, linux-sh-low.c: Update for changes in
6406 read_inferior_memory and the_low_target->breakpoint.
6408 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6410 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6411 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6412 * configure.srv: Add powerpc64-*-linux*.
6413 * linux-ppc64-low.c: New file.
6415 2005-05-23 Orjan Friberg <orjanf@axis.com>
6417 * linux-cris-low.c: New file with support for CRIS.
6418 * linux-crisv32-low.c: Ditto for CRISv32.
6419 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6420 (clean): Add reg-cris.c and reg-crisv32.c.
6421 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6422 reg-crisv32.o, and reg-crisv32.c to make rules.
6423 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6426 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6428 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6429 of sizeof (PTRACE_XFER_TYPE).
6430 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6432 2005-05-12 Orjan Friberg <orjanf@axis.com>
6434 * target.h (struct target_ops): Add insert_watchpoint,
6435 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6436 pointers for hardware watchpoint support.
6437 * linux-low.h (struct linux_target_ops): Ditto.
6438 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6439 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6440 to linux_target_ops.
6441 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6443 * server.c (main): Recognize 'Z' and 'z' packets.
6445 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6447 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6448 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6449 (the_low_target): Add new members.
6451 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6453 * proc-service.c (ps_lgetregs): Search all_processes instead of
6456 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6458 * server.c (start_inferior): Change return type to int.
6459 (attach_inferior): Change sigptr to int *.
6460 (handle_v_cont, handle_v_requests): Change signal to int *.
6461 (main): Change signal to int.
6463 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6465 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6466 * configure.srv: Add m32r*-*-linux*.
6467 * linux-m32r-low.c: New file.
6469 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6471 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6473 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6475 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6476 Take unsigned long arguments for PIDs.
6477 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6478 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6479 (wait_for_sigstop, linux_resume_one_process)
6480 (regsets_fetch_inferior_registers, linux_send_signal)
6481 (linux_read_auxv): Likewise. Update the types of variables holding
6482 PIDs. Update format string specifiers.
6483 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6484 * remote-utils.c (prepare_resume_reply): Likewise.
6485 * server.c (cont_thread, general_thread, step_thread)
6486 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6488 (handle_query): Update format specifiers.
6489 (handle_v_cont, main): Use strtoul for thread IDs.
6490 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6491 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6492 (general_thread, step_thread, thread_from_wait)
6493 (old_thread_from_wait): Update.
6494 * target.h (struct thread_resume): Use unsigned long for THREAD.
6495 (struct target_ops): Use unsigned long for arguments to attach and
6498 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6500 * acinclude.m4: Include bfd/bfd.m4 directly.
6501 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6502 <agriffis@toolchain.org>.
6503 * aclocal.m4, configure: Regenerated.
6505 2005-01-07 Andrew Cagney <cagney@gnu.org>
6507 * configure.ac: Rename configure.in, require autoconf 2.59.
6508 * configure: Re-generate.
6510 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6512 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6514 * aclocal.m4: Regenerated.
6515 * configure: Regenerated.
6517 2004-11-21 Andreas Schwab <schwab@suse.de>
6519 * linux-m68k-low.c (m68k_num_gregs): Define.
6520 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6521 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6522 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6523 (m68k_breakpoint_at): New. Add to the_low_target.
6525 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6526 srv_linux_thread_db to yes.
6528 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6530 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6531 (ARCH_SET_FS): Likewise.
6532 (ARCH_GET_FS): Likewise.
6533 (ARCH_GET_GS): Likewise.
6535 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6537 * linux-i386-low.c (ps_get_thread_area): New.
6538 * linux-x86-64-low.c (ps_get_thread_area): New.
6539 * linux-low.c: Include <sys/syscall.h>.
6540 (linux_kill_one_process): Don't kill the first thread here.
6541 (linux_kill): Kill the first thread here.
6542 (kill_lwp): New function.
6543 (send_sigstop, linux_send_signal): Use it.
6544 * proc-service.c: Clean up #ifdefs.
6545 (fpregset_info): Delete.
6546 (ps_lgetregs): Update and enable implementation.
6547 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6549 * remote-utils.c (struct sym_cache, symbol_cache): New.
6550 (input_interrupt): Print a clearer message.
6551 (async_io_enabled): New variable.
6552 (enable_async_io, disable_async_io): Use it. Update comments.
6553 (look_up_one_symbol): Use the symbol cache.
6554 * thread-db.c (thread_db_look_up_symbols): New function.
6555 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6557 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6559 * configure.in: Test for -rdynamic.
6560 * configure: Regenerated.
6561 * Makefile (INTERNAL_LDFLAGS): New.
6562 (gdbserver, gdbreplay): Use it.
6564 2004-09-02 Andrew Cagney <cagney@gnu.org>
6566 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6568 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6570 * linux-low.c (linux_wait): Clear all_processes list also.
6572 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6574 * linux-low.c: Include <errno.h>. Remove extern declaration of
6577 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6579 * gdbreplay.c, server.h, utils.c: Update copyright years.
6581 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6583 * server.c (main): Print child status or termination signal from
6584 variable 'signal', not 'sig'.
6586 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6588 * linux-low.c (linux_read_memory): Change return type to
6589 int. Check for and return error from ptrace().
6590 * target.c (read_inferior_memory): Change return type to int. Pass
6591 back return status from the_target->read_memory().
6592 * target.h (struct target_ops): Adapt *read_memory() prototype.
6594 (read_inferior_memory): Adapt prototype.
6595 * server.c (main): Return an error packet if
6596 read_inferior_memory() returns an error.
6598 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6600 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6601 Unify with other clean targets.
6603 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6605 * server.c (handle_v_cont): Call set_desired_inferior.
6607 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6609 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6611 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6613 * linux-low.c (linux_wait): Unblock async I/O.
6614 (linux_resume): Block and enable async I/O.
6615 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6616 * server.h (block_async_io, unblock_async_io): Add prototypes.
6618 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6620 * remote-utils.c (remote_open): Print a status notice after
6622 * server.c (attach_inferior): Print a status notice after
6625 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6627 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6629 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6631 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6633 * server.c, target.h: Update copyright years.
6635 2004-02-25 Roland McGrath <roland@redhat.com>
6637 * target.h (struct target_ops): New member `read_auxv'.
6638 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6639 * linux-low.c (linux_read_auxv): New function.
6640 (linux_target_ops): Initialize `read_auxv' member to that.
6642 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6644 Committed by Jim Blandy <jimb@redhat.com>.
6646 * linux-s390-low.c (s390_num_regs): Update.
6647 (s390_regmap): Remove control registers. Use __s390x__ predefine
6648 instead of GPR_SIZE to distiguish s390 and s390x targets.
6650 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6652 * linux-low.c: Update copyright year.
6653 (check_removed_breakpoint): Clear pending_is_breakpoint.
6654 (linux_set_resume_request, linux_queue_one_thread)
6655 (resume_status_pending_p): New functions.
6656 (linux_continue_one_thread): Use process->resume.
6657 (linux_resume): Only resume threads if there are no pending events.
6658 * linux-low.h (struct process_info): Add resume request
6661 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6663 * regcache.c (new_register_cache): Clear the allocated register
6664 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6666 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6668 * linux-low.c (linux_resume): Take a struct thread_resume *
6670 (linux_wait): Update call.
6671 (resume_ptr): New static variable.
6672 (linux_continue_one_thread): Renamed from
6673 linux_continue_one_process. Use resume_ptr.
6674 (linux_resume): Use linux_continue_one_thread.
6675 * server.c (handle_v_cont, handle_v_requests): New functions.
6676 (myresume): New function.
6677 (main): Handle 'v' case.
6678 * target.h (struct thread_resume): New type.
6679 (struct target_ops): Change argument of "resume" to struct
6681 (myresume): Delete macro.
6683 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6685 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6686 (uninstall): Support DESTDIR.
6688 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6690 * configure.srv: Add xscale*linux copy of arm*linux entry.
6692 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6694 * linux-arm-low.c (arm_reinsert_addr): New function.
6695 (the_low_target): Add arm_reinsert_addr.
6697 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6699 * mem-break.c: Remove whitespace at end of file.
6701 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6703 * configure.in: Check whether we need to prototype strerror.
6704 * server.h: Optionally prototype strerror.
6705 * gdbreplay.c (perror_with_name): Use strerror.
6706 * linux-low.c (linux_attach_lwp): Use strerror.
6707 * utils.c (perror_with_name): Use strerror.
6708 * config.in, configure: Regenerated.
6710 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6712 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6713 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6715 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6717 * Makefile.in (SFILES): Update.
6718 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6719 low-sun3.c: Remove files.
6721 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6723 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6724 (linux_detach_one_process, linux_detach): New functions.
6725 (linux_target_ops): Add linux_detach.
6726 * server.c (main): Handle 'D' packet.
6727 * target.h (struct target_ops): Add "detach" member.
6728 (detach_inferior): Define.
6730 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6732 From Kelley Cook <kelleycook@wideopenwest.com>:
6733 * configure.srv: Accept i[34567]86 variants.
6735 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6737 * linux-low.c (linux_wait_for_event): Correct comment typos.
6738 (linux_resume_one_process): Call check_removed_breakpoint.
6739 (linux_send_signal): New function.
6740 (linux_target_ops): Add linux_send_signal.
6741 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6743 * target.h (struct target_ops): Add send_signal.
6745 2003-05-29 Jim Blandy <jimb@redhat.com>
6747 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6748 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6749 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6750 away part of the register's value.
6752 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6754 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6755 (linux_wait_for_event, linux_init_signals): Likewise.
6757 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6759 * configure.in: Check for stdlib.h.
6760 * configure: Regenerated.
6761 * config.in: Regenerated.
6763 2003-01-04 Andreas Schwab <schwab@suse.de>
6765 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6767 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6769 * Makefile.in: Remove obsolete code.
6771 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6773 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6774 defined(PT_FPR0_HI).
6776 2002-11-17 Stuart Hughes <seh@zee2.com>
6778 * linux-arm-low.c (arm_num_regs): Increase.
6779 (arm_regmap): Include status register.
6781 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6783 * linux-low.c (register_addr): Remove incorrect -1 check.
6785 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6787 * linux-low.c (linux_create_inferior): Call setpgid. Return
6789 (unstopped_p, linux_signal_pid): Remove.
6790 (linux_target_ops): Remove linux_signal_pid.
6791 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6792 global instead of target method.
6793 * target.h (struct target_ops): Remove signal_pid. Update comment
6794 for create_inferior.
6795 * server.c (signal_pid): New variable.
6796 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6797 gdbserver. Set the child to be the foreground process group.
6798 (attach_inferior): Set signal_pid.
6800 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6802 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6804 2002-08-20 Jim Blandy <jimb@redhat.com>
6806 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6809 2002-08-01 Andrew Cagney <cagney@redhat.com>
6811 * Makefile.in: Make chill references obsolete.
6813 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6815 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6816 * configure: Regenerate.
6817 * config.in: Regenerate.
6819 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6821 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6822 (perror_with_name, remote_close, remote_open, expect, play): Static.
6824 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6826 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6827 byte offsets instead of an array of indexes.
6828 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6830 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6832 * regcache.c: Add comment.
6834 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6836 * thread-db.c: New file.
6837 * proc-service.c: New file.
6838 * acinclude.m4: New file.
6839 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6840 proc-service.o, and thread-db.o.
6841 (linux-low.o): Add USE_THREAD_DB.
6842 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6843 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6844 * aclocal.m4: Regenerated.
6845 * config.in: Regenerated.
6846 * configure: Regenerated.
6847 * configure.in: Check for proc_service.h, sys/procfs.h,
6848 thread_db.h, and linux/elf.h headrs.
6849 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6850 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6851 Check for -lthread_db and thread support.
6852 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6853 PowerPC, and SuperH.
6854 * i387-fp.c: Constify arguments.
6855 * i387-fp.h: Likewise.
6856 * inferiors.c: (struct thread_info): Renamed from
6857 `struct inferior_info'. Remove PID member. Use generic inferior
6858 list header. All uses updated.
6859 (inferiors, signal_pid): Removed.
6860 (all_threads): New variable.
6861 (get_thread): Define.
6862 (add_inferior_to_list): New function.
6863 (for_each_inferior): New function.
6864 (change_inferior_id): New function.
6865 (add_inferior): Removed.
6866 (remove_inferior): New function.
6867 (add_thread): New function.
6868 (free_one_thread): New function.
6869 (remove_thread): New function.
6870 (clear_inferiors): Use for_each_inferior and free_one_thread.
6871 (find_inferior): New function.
6872 (find_inferior_id): New function.
6873 (inferior_target_data): Update argument type.
6874 (set_inferior_target_data): Likewise.
6875 (inferior_regcache_data): Likewise.
6876 (set_inferior_regcache_data): Likewise.
6877 * linux-low.c (linux_bp_reinsert): Remove.
6878 (all_processes, stopping_threads, using_thrads)
6879 (struct pending_signals, debug_threads, pid_of): New.
6880 (inferior_pid): Replace with macro.
6881 (struct inferior_linux_data): Remove.
6882 (get_stop_pc, add_process): New functions.
6883 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6884 Use add_process and add_thread.
6885 (linux_attach_lwp): New function, based on old linux_attach. Use
6886 add_process and add_thread. Set stop_expected for new threads.
6887 (linux_attach): New function.
6888 (linux_kill_one_process): New function.
6889 (linux_kill): Kill all LWPs.
6890 (linux_thread_alive): Use find_inferior_id.
6891 (check_removed_breakpoints, status_pending_p): New functions.
6892 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6893 Update. Use WNOHANG. Wait for cloned processes also. Update process
6894 struct for the found process.
6895 (linux_wait_for_event): New function.
6896 (linux_wait): Use it. Support LWPs.
6897 (send_sigstop, wait_for_sigstop, stop_all_processes)
6898 (linux_resume_one_process, linux_continue_one_process): New functions.
6899 (linux_resume): Support LWPs.
6900 (REGISTER_RAW_SIZE): Remove.
6901 (fetch_register): Use register_size instead. Call supply_register.
6902 (usr_store_inferior_registers): Likewise. Call collect_register.
6904 (regsets_fetch_inferior_registers): Improve error message.
6905 (regsets_store_inferior_registers): Add debugging.
6906 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6907 (unstopped_p, linux_signal_pid): New functions.
6908 (linux_target_ops): Add linux_signal_pid.
6909 (linux_init_signals): New function.
6910 (initialize_low): Call it. Initialize using_threads.
6911 * regcache.c (inferior_regcache_data): Add valid
6913 (get_regcache): Fetch registers lazily. Add fetch argument
6914 and update all callers.
6915 (regcache_invalidate_one, regcache_invalidate): New
6917 (new_register_cache): Renamed from create_register_cache.
6918 Return the new regcache.
6919 (free_register_cache): Change argument to a void *.
6920 (registers_to_string, registers_from_string): Call get_regcache
6921 with fetch flag set.
6922 (register_data): Make static. Pass fetch flag to get_regcache.
6923 (supply_register): Call get_regcache with fetch flag clear.
6924 (collect_register): Call get_regcache with fetch flag set.
6925 (collect_register_as_string): New function.
6926 * regcache.h: Update.
6927 * remote-utils.c (putpkt): Flush after debug output and use
6929 Handle input interrupts while waiting for an ACK.
6930 (input_interrupt): Use signal_pid method.
6931 (getpkt): Flush after debug output and use stderr.
6932 (outreg): Use collect_register_as_string.
6933 (new_thread_notify, dead_thread_notify): New functions.
6934 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6936 (look_up_one_symbol): Flush after debug output.
6937 * server.c (step_thread, server_waiting): New variables.
6938 (start_inferior): Don't use signal_pid. Update call to mywait.
6939 (attach_inferior): Update call to mywait.
6940 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6941 (main): Don't fetch/store registers explicitly. Use
6942 set_desired_inferior. Support proposed ``Hs'' packet. Update
6945 (struct inferior_list, struct_inferior_list_entry): New.
6946 * target.c (set_desired_inferior): New.
6947 (write_inferior_memory): Constify.
6948 (mywait): New function.
6950 (struct target_ops): New signal_pid method.
6951 (mywait): Removed macro, added prototype.
6953 * linux-low.h (regset_func): Removed.
6954 (regset_fill_func, regset_store_func): New.
6955 (enum regset_type): New.
6956 (struct regset_info): Add type field. Use new operation types.
6957 (struct linux_target_ops): stop_pc renamed to get_pc.
6958 Add decr_pc_after_break and breakpoint_at.
6959 (get_process, get_thread_proess, get_process_thread)
6960 (strut process_info, all_processes, linux_attach_lwp)
6961 (thread_db_init): New.
6963 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6964 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6965 (the_low_target): Add new members.
6966 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6967 (i386_store_fpxregset): Constify.
6968 (target_regsets): Add new kind identifier.
6969 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6970 (i386_set_pc): Add debugging.
6971 (i386_breakpoint_at): New function.
6972 (the_low_target): Add new members.
6973 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6974 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6975 (mips_breakpoint_at): New.
6976 (the_low_target): Add new members.
6977 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6978 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6979 (the_low_target): Add new members.
6980 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6981 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6982 (the_low_target): Add new members.
6983 * linux-x86-64-low.c (target_regsets): Add new kind
6986 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6988 From Martin Pool <mbp@samba.org>:
6989 * server.c (gdbserver_usage): New function.
6992 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6994 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6997 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6999 * Makefile.in: Remove obsolete code.
7001 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7003 * linux-low.c (regsets_fetch_inferior_registers),
7004 (regsets_store_inferior_registers): Removed cast to int from
7006 * regcache.h: Added declaration of struct inferior_info.
7008 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7010 * inferiors.c (struct inferior_info): Add regcache_data.
7011 (add_inferior): Call create_register_cache.
7012 (clear_inferiors): Call free_register_cache.
7013 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7014 * regcache.c (struct inferior_regcache_data): New.
7015 (registers): Remove.
7016 (get_regcache): New function.
7017 (create_register_cache, free_register_cache): New functions.
7018 (set_register_cache): Don't initialize the register cache here.
7019 (registers_to_string, registers_from_string, register_data): Call
7021 * regcache.h: Add prototypes.
7022 * server.h: Likewise.
7024 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7026 * mem-break.c: New file.
7027 * mem-break.h: New file.
7028 * Makefile.in: Add mem-break.o rule; update server.h
7030 * inferiors.c (struct inferior_info): Add target_data
7032 (clear_inferiors): Free target_data member if set.
7033 (inferior_target_data, set_inferior_target_data): New functions.
7034 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7035 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7036 * linux-low.c (linux_bp_reinsert): New variable.
7037 (struct inferior_linux_data): New.
7038 (linux_create_inferior): Use set_inferior_target_data.
7039 (linux_attach): Likewise. Call add_inferior.
7040 (linux_wait_for_one_inferior): New function.
7041 (linux_wait): Call it.
7042 (linux_write_memory): Add const.
7043 (initialize_low): Call set_breakpoint_data.
7044 * linux-low.h (struct linux_target_ops): Add breakpoint
7046 * server.c (attach_inferior): Remove extra add_inferior
7048 * server.h: Include mem-break.h. Update inferior.c
7050 * target.c (read_inferior_memory)
7051 (write_inferior_memory): New functions.
7052 * target.h (read_inferior_memory)
7053 (write_inferior_memory): Change macros to prototypes.
7054 (struct target_ops): Update comments. Add const to write_memory
7057 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7059 * linux-low.c (usr_store_inferior_registers): Support
7060 registers which are allowed to fail to store.
7061 * linux-low.h (linux_target_ops): Likewise.
7062 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7063 (ppc_cannot_store_register): FPSCR may not be storable.
7065 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7067 * server.h: Include <string.h> if HAVE_STRING_H.
7068 * ChangeLog: Correct paths in last ChangeLog entry.
7070 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7072 * linux-low.h: Remove obsolete prototypes.
7073 (struct linux_target_ops): New.
7074 (extern the_low_target): New.
7075 * linux-low.c (num_regs, regmap): Remove declarations.
7076 (register_addr): Use the_low_target explicitly.
7077 (fetch_register): Likewise.
7078 (usr_fetch_inferior_registers): Likewise.
7079 (usr_store_inferior_registers): Likewise.
7080 * linux-arm-low.c (num_regs): Remove.
7081 (arm_num_regs): Define.
7082 (arm_regmap): Renamed from regmap, made static.
7083 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7085 (arm_cannot_store_register): Renamed from cannot_store_register,
7087 (the_low_target): New.
7088 * linux-i386-low.c (num_regs): Remove.
7089 (i386_num_regs): Define.
7090 (i386_regmap): Renamed from regmap, made static.
7091 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7093 (i386_cannot_store_register): Renamed from cannot_store_register,
7095 (the_low_target): New.
7096 * linux-ia64-low.c (num_regs): Remove.
7097 (ia64_num_regs): Define.
7098 (ia64_regmap): Renamed from regmap, made static.
7099 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7101 (ia64_cannot_store_register): Renamed from cannot_store_register,
7103 (the_low_target): New.
7104 * linux-m68k-low.c (num_regs): Remove.
7105 (m68k_num_regs): Define.
7106 (m68k_regmap): Renamed from regmap, made static.
7107 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7109 (m68k_cannot_store_register): Renamed from cannot_store_register,
7111 (the_low_target): New.
7112 * linux-mips-low.c (num_regs): Remove.
7113 (mips_num_regs): Define.
7114 (mips_regmap): Renamed from regmap, made static.
7115 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7117 (mips_cannot_store_register): Renamed from cannot_store_register,
7119 (the_low_target): New.
7120 * linux-ppc-low.c (num_regs): Remove.
7121 (ppc_num_regs): Define.
7122 (ppc_regmap): Renamed from regmap, made static.
7123 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7125 (ppc_cannot_store_register): Renamed from cannot_store_register,
7127 (the_low_target): New.
7128 * linux-s390-low.c (num_regs): Remove.
7129 (s390_num_regs): Define.
7130 (s390_regmap): Renamed from regmap, made static.
7131 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7133 (s390_cannot_store_register): Renamed from cannot_store_register,
7135 (the_low_target): New.
7136 * linux-sh-low.c (num_regs): Remove.
7137 (sh_num_regs): Define.
7138 (sh_regmap): Renamed from regmap, made static.
7139 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7141 (sh_cannot_store_register): Renamed from cannot_store_register,
7143 (the_low_target): New.
7144 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7145 (the_low_target): New.
7147 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7149 * Makefile.in: Add stamp-h target.
7150 * configure.in: Create stamp-h.
7151 * configure: Regenerated.
7153 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7155 * inferiors.c: New file.
7156 * target.c: New file.
7157 * target.h: New file.
7158 * Makefile.in: Add target.o and inferiors.o. Update
7160 * linux-low.c (inferior_pid): New static variable,
7161 moved from server.c.
7162 (linux_create_inferior): Renamed from create_inferior.
7163 Call add_inferior. Return 0 on success instead of a PID.
7164 (linux_attach): Renamed from myattach.
7165 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7166 (linux_thread_alive): Renamed from mythread_alive.
7167 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7169 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7170 (regsets_store_inferior_registers): Correct error message.
7171 Add missing ``return 0''.
7172 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7173 (linux_store_registers): Renamed from store_inferior_registers.
7174 (linux_read_memory): Renamed from read_inferior_memory.
7175 (linux_write_memory): Renamed from write_inferior_memory.
7176 (linux_target_ops): New structure.
7177 (initialize_low): Call set_target_ops ().
7178 * remote-utils.c (unhexify): New function.
7179 (hexify): New function.
7180 (input_interrupt): Send signals to ``signal_pid''.
7181 * server.c (inferior_pid): Remove.
7182 (start_inferior): Update create_inferior call.
7183 (attach_inferior): Call add_inferior.
7184 (handle_query): New function.
7185 (main): Call handle_query for `q' packets.
7186 * server.h: Include "target.h". Remove obsolete prototypes.
7187 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7189 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7191 * Makefile.in: Add WARN_CFLAGS. Update configury
7193 * configure.in: Check for <string.h>
7194 * configure: Regenerate.
7195 * config.in: Regenerate.
7196 * gdbreplay.c: Include needed system headers.
7197 (remote_open): Remove strchr prototype.
7198 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7199 * regcache.c (supply_register): Change buf argument to const void *.
7200 (supply_register_by_name): Likewise.
7201 (collect_register): Change buf argument to void *.
7202 (collect_register_by_name): Likewise.
7203 * regcache.h: Add missing prototypes.
7204 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7205 * server.c (handle_query): New function.
7206 (attached): New static variable, moved out of main.
7207 (main): Quiet longjmp clobber warnings.
7208 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7209 * utils.c (error): Remove NORETURN.