1 2012-04-19 Pedro Alves <palves@redhat.com>
3 * Makefile.in (GNULIB_BUILDDIR): New.
4 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6 (all, install-only, uninstall, clean-info, all-lib, clean): No
7 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8 (maintainer-clean realclean distclean): Use subdir_do.
10 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12 * acinclude.m4: Include acx_configure_dir.m4.
13 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14 calls. Call AC_PROG_RANLIB. Configure gnulib using
17 (GNULIB_STDINT_H): Adjust.
18 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
19 * gdbreplay.c: Include build-gnulib/config.h.
21 * aclocal.m4: Regenerate.
22 * config.in: Regenerate.
23 * configure: Regenerate.
25 2012-04-19 Pedro Alves <palves@redhat.com>
27 * Makefile.in (LIBGNU, INCGNU): Adjust.
28 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
29 (all, install-only, uninstall, clean-info, all-lib, clean)
30 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
31 * configure.ac: Adjust AC_OUTPUT output.
32 * aclocal.m4: Regenerate.
33 * configure: Regenerate.
35 2012-04-19 Pedro Alves <palves@redhat.com>
37 * Makefile.in (generated_files): New.
38 (server_h): Remove the explicit dependency on config.h, and depend
41 2012-04-19 Pedro Alves <palves@redhat.com>
43 * Makefile.in (INCGNU): Add -Ignulib.
45 2012-04-19 Pedro Alves <palves@redhat.com>
47 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
48 (INCGNU): ... this, and spell out -I here.
49 (GNULIB_LIB): Rename to ...
51 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
53 2012-04-19 Pedro Alves <palves@redhat.com>
55 * config.in: Regenerate.
57 2012-04-19 Pedro Alves <palves@redhat.com>
59 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
60 * server.h (memmem): Remove declaration.
61 * config.in: Regenerate.
62 * configure: Regenerate.
64 2012-04-19 Yao Qi <yao@codesourcery.com>
66 * Makefile.in (SFILES): Add common/vec.c.
70 2012-04-19 Yao Qi <yao@codesourcery.com>
72 * remote-utils.c (prepare_resume_reply): Replace with macro
73 target_core_of_thread.
74 * server.c (handle_qxfer_threads_proper): Likewise.
75 * target.h (traget_core_of_thread): New macro.
77 2012-04-18 Pedro Alves <palves@redhat.com>
79 * aclocal.m4: Regenerate.
80 * configure: Regenerate.
82 2012-04-16 Yao Qi <yao@codesourcery.com>
84 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
85 duplicated on address.
87 2012-04-16 Yao Qi <yao@codesourcery.com>
89 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
90 (struct tracepoint_action_ops) <send>: New field.
91 (m_tracepoint_action_send, r_tracepoint_action_send): New.
92 (agent_expr_send, x_tracepoint_action_send): New.
93 (l_tracepoint_action_send): New.
94 (cmd_qtdp): Download and install tracepoint
95 according to `use_agent'.
96 (run_inferior_command): Add one more parameter `len'.
98 (tracepoint_send_agent): New.
99 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
101 2012-04-16 Yao Qi <yao@codesourcery.com>
103 * tracepoint.c (download_tracepoints): Moved to ...
104 (cmd_qtstart): ... here.
106 2012-04-14 Yao Qi <yao@codesourcery.com>
108 * tracepoint.c: Include inttypes.h.
109 (struct collect_memory_action): Use sized types.
110 (struct tracepoint): Likewise.
111 (cmd_qtdp, stop_tracing): Update print specifiers.
112 (cmd_qtp, response_tracepoint): Likewise.
113 (collect_data_at_tracepoint): Likewise.
114 (collect_data_at_step): Likewise.
116 2012-04-14 Yao Qi <yao@codesourcery.com>
118 Import gnulib module inttypes.
119 * aclocal.m4, config.in, configure: Regenerated.
121 2012-04-14 Yao Qi <yao@codesourcery.com>
123 * Makefile.in (maintainer-clean, realclean, distclean): Remove
124 Makefile and config.status at last.
126 2012-04-13 Yao Qi <yao@codesourcery.com>
128 * tracepoint.c: Include stdint.h unconditionally.
130 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
132 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
133 on BFD_HAVE_SYS_PROCFS_TYPE.
134 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
135 * configure: Regenerate.
136 * config.in: Likewise.
138 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
140 * Makefile.in (clean): Also remove x32.c x32-linux.c
141 x32-avx.c x32-avx-linux.c.
144 (x32-linux.o): Likewise.
145 (x32-linux.c): Likewise.
146 (x32-avx.o): Likewise.
147 (x32-avx.c): Likewise.
148 (x32-avx-linux.o): Likewise.
149 (x32-avx-linux.c): Likewise.
151 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
152 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
153 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
154 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
155 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
156 i386/x32-avx-linux.xml.
158 * linux-x86-low.c (init_registers_x32_linux): New prototype.
159 (init_registers_x32_avx_linux): Likwise.
160 (x86_linux_update_xmltarget): Call init_registers_x32_linux
161 or init_registers_x32_avx_linux if linux_is_elf64 is false.
163 2012-04-13 Pedro Alves <palves@redhat.com>
165 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
166 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
167 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
168 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
171 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
173 * linux-x86-low.c (compat_x32_clock_t): New.
174 (compat_x32_siginfo_t): Likewise.
175 (compat_x32_siginfo_from_siginfo): Likewise.
176 (siginfo_from_compat_x32_siginfo): Likewise.
177 (linux_is_elf64): Likewise.
178 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
179 and siginfo_from_compat_x32_siginfo for x32.
180 (x86_arch_setup): Set linux_is_elf64.
182 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
185 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
187 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
188 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
189 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
190 compatible with process.
192 2012-04-12 Yao Qi <yao@codesourcery.com>
194 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
195 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
196 (install-only, install-info, clean): Handle sub dir gnulib.
197 (all-lib, am--refresh): New targets.
198 (memmem.o): Remove target.
199 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
200 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
201 (AC_REPLACE_FUNCS): Remove memmem.
202 Invoke gl_INIT and AM_INIT_AUTOMAKE.
203 (AC_OUTPUT): Generate Makefile in gnulib/.
204 * aclocal.m4, config.in, configure: Regenerated.
206 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
208 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
210 2012-04-05 Pedro Alves <palves@redhat.com>
212 -Werror=strict-aliasing
214 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
217 2012-04-04 Pedro Alves <palves@redhat.com>
219 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
220 (sparc_store_gregset_from_stack, sparc_store_gregset)
221 (sparc_breakpoint_at): Fix formatting.
223 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
225 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
227 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
228 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
229 * config.in: Regenerate.
230 * configure: Likewise.
232 2012-03-29 Pedro Alves <palves@redhat.com>
234 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
235 Correct ptrace arguments.
237 2012-03-28 Pedro Alves <palves@redhat.com>
239 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
240 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
241 (IA64_FR1_REGNUM): New defines.
242 (ia64_fetch_register): New.
243 (the_low_target): Install it.
244 * linux-low.h (struct linux_target_ops) <fetch_register>: New
246 * linux-low.c (linux_fetch_registers): Try the
247 the_low_target.fetch_register hook first.
249 * linux-arm-low.c (the_low_target): Adjust.
250 * linux-bfin-low.c (the_low_target): Adjust.
251 * linux-cris-low.c (the_low_target): Adjust.
252 * linux-crisv32-low.c (the_low_target): Adjust.
253 * linux-m32r-low.c (the_low_target): Adjust.
254 * linux-m68k-low.c (the_low_target): Adjust.
255 * linux-mips-low.c (the_low_target): Adjust.
256 * linux-ppc-low.c (the_low_target): Adjust.
257 * linux-s390-low.c (the_low_target): Adjust.
258 * linux-sh-low.c (the_low_target): Adjust.
259 * linux-sparc-low.c (the_low_target): Adjust.
260 * linux-tic6x-low.c (the_low_target): Adjust.
261 * linux-x86-low.c (the_low_target): Adjust.
262 * linux-xtensa-low.c (the_low_target): Adjust.
264 2012-03-26 Pedro Alves <palves@redhat.com>
266 * server.c (handle_qxfer_libraries): Don't bail early if
267 the_target->qxfer_libraries_svr4 is not NULL.
269 2012-03-26 Pedro Alves <palves@redhat.com>
271 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
273 2012-03-23 Pedro Alves <palves@redhat.com>
275 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
276 "library-list-svr4" element's start tag when the the DSO list is
279 2012-03-23 Pedro Alves <palves@redhat.com>
281 * linux-low.c (read_one_ptr): Read the inferior's pointer through
282 a variable whose type size is the same as the inferior's pointer
285 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
287 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
289 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
290 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
291 * linux-low.h: Include <signal.h>.
292 (struct siginfo): Remove forward declaration.
293 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
296 2012-03-21 Mike Frysinger <vapier@gentoo.org>
298 * .gitignore: Ignore more files.
300 2012-03-19 Pedro Alves <palves@redhat.com>
301 Jan Kratochvil <jan.kratochvil@redhat.com>
303 * server.c (cont_thread, general_thread): Add describing comments.
304 (start_inferior): Clear `cont_thread'.
305 (handle_v_cont): Don't set `cont_thread' if resuming all threads
308 2012-03-15 Yao Qi <yao@codesourcery.com>
310 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
312 (cmd_qtdp): ... here.
314 2012-03-15 Yao Qi <yao@codesourcery.com>
316 * tracepoint.c (struct tracepoint_action_ops): New.
317 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
318 (m_tracepoint_action_download): New.
319 (r_tracepoint_action_download): New.
320 (x_tracepoint_action_download): New.
321 (l_tracepoint_action_download): New.
322 (add_tracepoint_action): Install `action->ops' according type.
323 (download_tracepoint_1): Move code `download' function pointer
324 of various tracepoint_action_ops.
326 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
328 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
329 linux_ptrace_attach_warnings.
331 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
333 * Makefile.in (linux-ptrace.o): New.
334 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
335 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
336 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
337 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
338 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
340 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
342 2012-03-08 Yao Qi <yao@codesourcery.com>
343 Pedro Alves <palves@redhat.com>
346 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
348 * tracepoint.c (remove_tracepoint): New.
349 (cmd_qtdp): Call remove_tracepoint when failed to install.
351 2012-03-07 Pedro Alves <palves@redhat.com>
353 * linux-low.c (get_detach_signal): New.
354 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
355 Pass on pending signals to PTRACE_DETACH. Check the result of the
357 * server.c (program_signals, program_signals_p): New.
358 (handle_general_set): Handle QProgramSignals.
359 * server.h (program_signals, program_signals_p): Declare.
361 2012-03-05 Pedro Alves <palves@redhat.com>
362 Jan Kratochvil <jan.kratochvil@redhat.com>
364 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
367 2012-03-03 Yao Qi <yao@codesourcery.com>
369 * tracepoint.c (tracepoint_look_up_symbols): Update call to
370 agent_look_up_symbols.
372 2012-03-03 Yao Qi <yao@codesourcery.com>
374 * Makefile.in (linux-low.o): Keep dependence on agent.h.
375 (linux-x86-low.o): Likewise.
376 * server.h: Remove in_process_agent_loaded.
377 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
381 2012-03-03 Yao Qi <yao@codesourcery.com>
383 * tracepoint.c (gdb_agent_capability): New global.
384 (in_process_agent_loaded_ust): Renamed to
385 `in_process_agent_supports_ust'.
387 (in_process_agent_supports_ust): Call agent_capability_check.
388 (clear_installed_tracepoints): Assert that agent supports
391 2012-03-03 Yao Qi <yao@codesourcery.com>
393 * linux-low.c (linux_supports_agent): New.
394 (linux_target_ops): Initialize field `supports_agent' with
395 linux_supports_agent.
396 * target.h (struct target_ops) <supports_agent>: New.
397 (target_supports_agent): New macro.
398 * server.c (handle_general_set): Handle packet 'QAgent'.
399 (handle_query): Send `QAgent+'.
400 * Makefile.in (server.o): Depends on agent.h.
402 2012-03-03 Yao Qi <yao@codesourcery.com>
404 * Makefile.in (OBS): Add agent.o.
405 Add new rule for agent.o.
406 Track dependence of tracepoint.c on agent.h.
407 * tracepoint.c (run_inferior_command_1):
408 (run_inferior_command): Call agent_run_command.
409 (gdb_ust_connect_sync_socket): Deleted. Move it to
411 (resume_thread, stop_thread): Likewise.
412 (gdb_ust_socket_init): Renamed to ...
413 (gdb_agent_socket_init): ... New.
414 (gdb_ust_thread): Renamed to ...
415 (gdb_agent_helper_thread): ... New.
416 (gdb_ust_init): Move some code to ...
417 (gdb_agent_init): ... here. New.
418 [HAVE_UST]: Call gdb_ust_init.
419 (initialize_tracepoint_ftlib): Call gdb_agent_init.
420 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
421 * config.in, configure: Regenerated.
423 2012-03-02 Pedro Alves <palves@redhat.com>
425 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
426 * linux-low.c (struct simple_pid_list): New.
427 (stopped_pids): New a struct simple_pid_list pointer.
428 (add_to_pid_list, pull_pid_from_list): New.
429 (handle_extended_wait): Don't assume the first signal new children
430 report is SIGSTOP. Adjust call to pull_pid_from_list.
431 (linux_wait_for_lwp): Adjust.
433 2012-03-02 Yao Qi <yao@codesourcery.com>
435 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
438 2012-03-02 Yao Qi <yao@codesourcery.com>
440 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
441 `stop_pc' and `tpoint'. Update caller.
443 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
445 * linux-low.h (linux_target_ops): Add regset_bitmap member.
446 * linux-low.c (use_linux_regsets): New macro.
447 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
448 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
449 (linux_register_in_regsets): New function.
450 (usr_fetch_inferior_registers): Skip registers covered by
452 (usr_store_inferior_registers): Likewise.
453 (usr_fetch_inferior_registers): New macro.
454 (usr_store_inferior_registers): Likewise.
455 (linux_fetch_registers): Handle mixed regset/non-regset targets.
456 (linux_store_registers): Likewise.
457 * linux-mips-low.c (init_registers_mips_dsp_linux): New
459 (init_registers_mips64_dsp_linux): Likewise.
460 (init_registers_mips_linux): New macro.
461 (init_registers_mips_dsp_linux): Likewise.
462 (mips_dsp_num_regs): Likewise.
463 (DSP_BASE, DSP_CONTROL): New fallback macros.
464 (mips_base_regs): New macro.
465 (mips_regmap): Use it. Fix the size.
466 (mips_dsp_regmap): New variable.
467 (mips_dsp_regset_bitmap): Likewise.
468 (mips_arch_setup): New function.
469 (mips_cannot_fetch_register): Use the_low_target.regmap rather
471 (mips_cannot_store_register): Likewise.
472 (the_low_target): Update .arch_setup, .num_regs and .regmap
473 initializers. Add .regset_bitmap initializer.
474 * linux-arm-low.c (the_low_target): Add .regset_bitmap
476 * linux-bfin-low.c (the_low_target): Likewise.
477 * linux-cris-low.c (the_low_target): Likewise.
478 * linux-crisv32-low.c (the_low_target): Likewise.
479 * linux-ia64-low.c (the_low_target): Likewise.
480 * linux-m32r-low.c (the_low_target): Likewise.
481 * linux-m68k-low.c (the_low_target): Likewise.
482 * linux-ppc-low.c (the_low_target): Likewise.
483 * linux-s390-low.c (the_low_target): Likewise.
484 * linux-sh-low.c (the_low_target): Likewise.
485 * linux-sparc-low.c (the_low_target): Likewise.
486 * linux-tic6x-low.c (the_low_target): Likewise.
487 * linux-x86-low.c (the_low_target): Likewise.
488 * linux-xtensa-low.c (the_low_target): Likewise.
489 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
490 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
491 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
493 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
494 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
496 2012-02-29 Yao Qi <yao@codesourcery.com>
497 Pedro Alves <palves@redhat.com>
499 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
500 `step_over_finished' is true.
502 2012-02-27 Pedro Alves <palves@redhat.com>
504 * linux-low.c (pid_is_stopped): Delete, moved to common/.
505 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
507 2012-02-27 Pedro Alves <palves@redhat.com>
510 * linux-low.c (pid_is_stopped): New.
511 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
513 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
515 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
518 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
520 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
522 2012-02-24 Luis Machado <lgustavo@codesourcery>
524 * server.c (handle_query): Advertise support for target-side
525 breakpoint condition evaluation.
526 (process_point_options): New function.
527 (process_serial_event): When inserting a breakpoint, check for
528 a target-side condition that should be evaluated.
530 * mem-break.c: Include regcache.h and ax.h.
531 (point_cond_list_t): New data structure.
532 (breakpoint) <cond_list>: New field.
533 (find_gdb_breakpoint_at): Make non-static.
534 (delete_gdb_breakpoint_at): Clear any target-side
536 (clear_gdb_breakpoint_conditions): New function.
537 (add_condition_to_breakpoint): Likewise.
538 (add_breakpoint_condition): Likewise.
539 (gdb_condition_true_at_breakpoint): Likewise.
540 (gdb_breakpoint_here): Return result directly instead
541 of going through a local variable.
543 * mem-break.h (find_gdb_breakpoint_at): New prototype.
544 (clear_gdb_breakpoint_conditions): Likewise.
545 (add_breakpoint_condition): Likewise.
546 (gdb_condition_true_at_breakpoint): Likewise.
548 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
549 (need_step_over_p): Take target-side breakpoint condition into
552 2012-02-24 Luis Machado <lgustavo@codesourcery>
554 * server.h: Include tracepoint.h.
555 (agent_mem_read, agent_get_trace_state_variable_value,
556 agent_set_trace_state_variable_value,
557 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
558 get_set_tsv_func_addr): New prototypes.
560 * ax.h: New include file.
561 * ax.c: New source file.
563 * tracepoint.c: Include ax.h.
564 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
565 agent_expr, eval_result_type): Move to ax.h.
566 (parse_agent_expr): Rename to ...
567 (gdb_parse_agent_expr): ... this, make it non-static and move
569 (unparse_agent_expr) Rename to ...
570 (gdb_unparse_agent_expr): ... this, make it non-static and move
572 (eval_agent_expr): Rename to ...
573 (eval_tracepoint_agent_expr): ... this.
574 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
575 forward declarations.
576 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
577 (agent_get_trace_state_variable_value): New function.
578 (agent_set_trace_state_variable_value): New function.
579 (cmd_qtdp): Call gdb_parse_agent_expr (...).
580 (response_tracepoint): Call gdb_unparse_agent_expr (...).
581 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
582 (condition_true_at_tracepoint): Likewise.
583 (parse_agent_expr): Rename to ...
584 (gdb_parse_agent_expr): ... this and move to ax.c.
585 (unparse_agent_expr): Rename to ...
586 (gdb_unparse_agent_expr): ... this and move to ax.c.
587 (gdb_agent_op_name): Move to ax.c.
588 (eval_agent_expr): Rename to ...
589 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
591 (eval_tracepoint_agent_expr): New function.
592 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
594 (current_insn_ptr, emit_error, struct bytecode_address): Move to
596 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
597 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
598 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
599 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
600 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
601 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
602 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
603 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
604 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
605 (compile_bytecodes): Remove forward declaration.
606 (is_goto_target): Move to ax.c.
607 (compile_bytecodes): Move to ax.c and call
608 agent_get_trace_state_variable_value (...) and
609 agent_set_trace_state_variable_value (...).
611 * Makefile.in: Update ax.c and IPA dependencies.
613 2012-02-24 Pedro Alves <palves@redhat.com>
615 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
616 (cmd_bigqtbuffer_circular): ... this. Only handle
617 'QTBuffer:circular:'.
618 (handle_tracepoint_general_set): Adjust.
620 2012-02-16 Yao Qi <yao@codesourcery.com>
622 * inferiors.c: Move code to ...
623 * dll.c: .... here. New.
624 * server.h: Declare clear_dlls.
625 * Makefile.in (SFILES): Add dll.c.
629 2012-02-11 Yao Qi <yao@codesourcery.com>
631 * server.c: (handle_monitor_command): Add a new parameter
633 (handle_query): Update caller.
635 2012-02-09 Joel Brobecker <brobecker@adacore.com>
637 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
638 * configure, config.in: Regenerate.
639 * hostio.c: Provide an alternate implementation if HAVE_READLINK
642 2012-02-02 Pedro Alves <palves@redhat.com>
644 Try SIGKILL first, then PTRACE_KILL.
645 * linux-low.c (linux_kill_one_lwp): New.
646 (linux_kill_one_lwp): Rename to ...
647 (kill_one_lwp_callback): ... this. Use the new
650 2012-02-02 Pedro Alves <palves@redhat.com>
652 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
655 2012-01-27 Pedro Alves <palves@redhat.com>
657 * linux-low.c (linux_child_pid_to_exec_file): Delete.
658 (elf_64_file_p): Make static.
659 (linux_pid_exe_is_elf_64_file): New.
660 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
662 (linux_pid_exe_is_elf_64_file): Declare.
663 * linux-x86-low.c (x86_arch_setup): Use
664 linux_pid_exe_is_elf_64_file.
666 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
668 * linux-low.c (linux_wait_for_event_1): Rename to ...
669 (linux_wait_for_event): ... here and merge it with former
670 linux_wait_for_event - new variable wait_ptid, use it.
671 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
673 2012-01-23 Pedro Alves <palves@redhat.com>
675 * server.c (main): Avoid yet another case of infinite loop while
676 detaching/killing after a longjmp.
678 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
681 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
683 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
685 * hostio.c (handle_readlink): New function.
686 (handle_vFile): Call it to handle "vFile:readlink" packets.
688 2012-01-20 Pedro Alves <palves@redhat.com>
689 Ulrich Weigand <ulrich.weigand@linaro.org>
691 * server.c (handle_v_requests): Only support vAttach and vRun to
692 start multiple processes when in extended protocol mode.
694 2012-01-17 Pedro Alves <palves@redhat.com>
696 * tracepoint.c (initialize_tracepoint): Use mmap instead of
697 memalign plus mprotect to allocate the scratch buffer.
699 2012-01-13 Pedro Alves <palves@redhat.com>
701 * server.c (attach_inferior): Clear `cont_thread'.
703 2012-01-13 Pedro Alves <palves@redhat.com>
705 * server.c (main): Avoid infinite loop while detaching/killing
708 2012-01-09 Doug Evans <dje@google.com>
710 * server.c (start_inferior): Set last_ptid in --wrapper case.
712 2012-01-06 Yao Qi <yao@codesourcery.com>
714 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
716 [IN_PROCESS_AGENT] (debug_agent): New global variable.
718 2012-01-04 Yao Qi <yao@codesourcery.com>
720 * tracepoint.c (cmd_qtdp): Print debug message
721 for static tracepoint.
723 2012-01-04 Yao Qi <yao@codesourcery.com>
725 * tracepoint.c (trace_vdebug): Differentiate debug message
726 between gdbserver and IPA.
728 2012-01-03 Yao Qi <yao@codesourcery.com>
730 * tracepoint.c (tracepoint_was_hit): Don't collect for
733 2012-01-02 Joel Brobecker <brobecker@adacore.com>
735 * terminal.h: Reformat copyright header.
737 2012-01-02 Joel Brobecker <brobecker@adacore.com>
739 * server.c (gdbserver_version): Update copyright year.
740 * gdbreplay.c (gdbreplay_version): Likewise.
742 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
744 * linux-low.c (linux_create_inferior): Put empty if clause for write.
747 2011-12-18 Hui Zhu <teawater@gmail.com>
748 * linux-low.c (linux_create_inferior): Save return value to ret.
750 2011-12-18 Hui Zhu <teawater@gmail.com>
752 * linux-low.c (linux_create_inferior): Save return value to ret.
754 2011-12-16 Doug Evans <dje@google.com>
756 * linux-low.c (linux_create_inferior): If stdio connection,
757 redirect stdin from /dev/null, stdout to stderr.
758 * remote-utils.c (remote_is_stdio): New static global.
759 (remote_connection_is_stdio): New function.
760 (remote_prepare): Handle stdio connection.
761 (remote_open): Ditto.
762 (remote_close): Don't close stdin for stdio connections.
763 (read_prim,write_prim): New functions. Replace all calls to
765 * server.c (main): Watch for "-" argument. Move call to
766 remote_prepare before start_inferior.
767 * server.h (STDIO_CONNECTION_NAME): New macro.
768 (remote_connection_is_stdio): Declare.
770 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
773 2011-12-15 Yao Qi <yao@codesourcery.com>
775 * tracepoint.c: Include sys/syscall.h.
776 (gdb_ust_thread): Remove preprocessor conditional.
778 2011-12-14 Pedro Alves <pedro@codesourcery.com>
780 * linux-low.c (linux_detach_one_lwp): Call
781 the_low_target.prepare_to_resume before detaching.
783 2011-12-14 Yao Qi <yao@codesourcery.com>
785 * tracepoint.c (gdb_ust_thread): Don't ignore return value
788 2011-12-14 Yao Qi <yao@codesourcery.com>
790 * i386-low.c (i386_low_stopped_data_address): Initialize local
793 2011-12-13 Pedro Alves <pedro@codesourcery.com>
797 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
798 DR_CONTROL unless necessary. Extend comments.
799 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
800 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
802 2011-12-13 Yao Qi <yao@codesourcery.com>
804 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
806 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
808 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
810 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
811 Print new debug message for such case.
813 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
815 Fix overlapping memcpy.
816 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
817 the read_inferior_memory transfer.
818 (delete_fast_tracepoint_jump): New variable buf. Use it for the
819 write_inferior_memory transfer.
820 (set_fast_tracepoint_jump): New variable buf. Use it for the
821 read_inferior_memory and write_inferior_memory transfers.
822 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
823 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
824 Use it for the write_inferior_memory transfer.
825 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
828 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
830 * linux-low.c (fetch_register, store_register): Make code
831 consistent, fix formatting.
833 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
835 * linux-low.c (usr_store_inferior_registers): Factor out code
836 to handle individual registers into...
837 (store_register): ... this new function.
839 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
841 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
842 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
843 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
844 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
845 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
846 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
847 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
848 (srv_xmlfiles): Add new XML files.
850 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
852 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
853 (init_registers_s390_linux32v1): Add prototype.
854 (init_registers_s390_linux32v2): Likewise.
855 (init_registers_s390_linux64v1): Likewise.
856 (init_registers_s390_linux64v2): Likewise.
857 (init_registers_s390x_linux64v1): Likewise.
858 (init_registers_s390x_linux64v2): Likewise.
859 (s390_num_regs): Increment to 52.
860 (s390_regmap): Add orig_r2 register.
861 (s390_num_regs_3264): Increment to 68.
862 (s390_regmap_3264): Add orig_r2 register.
863 (s390_collect_ptrace_register): Handle orig_r2 register.
864 (s390_supply_ptrace_register): Likewise.
865 (s390_fill_last_break): New function.
866 (s390_store_last_break): Likewise.
867 (s390_fill_system_call): New function.
868 (s390_store_system_call): Likewise.
869 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
871 (s390_check_regset): New function.
872 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
873 NT_S390_SYSTEM_CALL regsets and use appropriate description.
874 Update target_regsets for available register sets.
876 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
877 Jan Kratochvil <jan.kratochvil@redhat.com>
879 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
880 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
882 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
883 * linux-low.h (struct process_info_private): New member r_debug.
884 * server.c (handle_qxfer_libraries): Call
885 the_target->qxfer_libraries_svr4.
886 (handle_qxfer_libraries_svr4): New function.
887 (qxfer_packets): New entry "libraries-svr4".
888 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
889 * target.h (struct target_ops): New member qxfer_libraries_svr4.
890 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
891 PACKET_qXfer_libraries_svr4.
893 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
895 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
896 PSW address/mask between 8-byte and 16-byte formats.
897 (s390_supply_ptrace_register): Likewise.
898 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
899 basic addressing mode bit.
901 2011-11-24 Stan Shebs <stan@codesourcery.com>
903 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
905 2011-11-17 Stan Shebs <stan@codesourcery.com>
907 * tracepoint.c (struct tracepoint): New field traceframe_usage.
908 (tracing_start_time): New global.
909 (tracing_stop_time): New global.
910 (tracing_user_name): New global.
911 (tracing_notes): New global.
912 (tracing_stop_note): New global.
913 (cmd_qtstart): Set traceframe_usage, start_time.
914 (stop_tracing): Set stop_time.
915 (cmd_qtstatus): Report additional status.
916 (cmd_qtp): New function.
917 (handle_tracepoint_query): Call it.
918 (cmd_qtnotes): New function.
919 (handle_tracepoint_general_set): Call it.
920 (get_timestamp): Rename from tsv_get_timestamp.
922 2011-11-14 Stan Shebs <stan@codesourcery.com>
923 Kwok Cheung Yeung <kcy@codesourcery.com>
925 * linux-x86-low.c (small_jump_insn): New.
926 (i386_install_fast_tracepoint_jump_pad): Add arguments for
927 trampoline and error message, build a trampoline and issue a small
928 jump instruction to it.
929 (x86_install_fast_tracepoint_jump_pad): Add arguments for
930 trampoline and error message.
931 (x86_get_min_fast_tracepoint_insn_len): New.
932 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
933 * linux-low.h (struct linux_target_ops): Add arguments to
934 install_fast_tracepoint_jump_pad operation, add new operation.
935 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
937 (linux_get_min_fast_tracepoint_insn_len): New function.
938 (linux_target_op): Add new operation.
939 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
940 (gdb_trampoline_buffer_end): Ditto.
941 (gdb_trampoline_buffer_error): Ditto.
942 (struct ipa_sym_addresses): Add fields for new IPA variables.
943 (symbol_list): Add entries for new IPA variables.
944 (struct tracepoint): Add fields to hold the address range of the
945 trampoline used by the tracepoint.
946 (trampoline_buffer_head): New static variable.
947 (trampoline_buffer_tail): Ditto.
948 (claim_trampoline_space): New function.
949 (have_fast_tracepoint_trampoline_buffer): New function.
950 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
952 (install_fast_tracepoint): Ditto, also add error buffer argument.
953 (cmd_qtminftpilen): New function.
954 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
955 (fast_tracepoint_from_trampoline_address): New function.
956 (fast_tracepoint_collecting): Handle trampoline as part of jump
958 (set_trampoline_buffer_space): New function.
959 (initialize_tracepoint): Initialize new IPA variables.
960 * target.h (struct target_ops): Add arguments to
961 install_fast_tracepoint_jump_pad operation, add new
962 get_min_fast_tracepoint_insn_len operation.
963 (target_get_min_fast_tracepoint_insn_len): New.
964 (install_fast_tracepoint_jump_pad): Add arguments.
965 * server.h (IPA_BUFSIZ): Define.
966 * linux-i386-ipa.c: Include extra header files.
967 (initialize_fast_tracepoint_trampoline_buffer): New function.
968 (initialize_low_tracepoint): Call it.
969 * server.h (set_trampoline_buffer_space): Declare.
970 (claim_trampoline_space): Ditto.
971 (have_fast_tracepoint_trampoline_buffer): Ditto.
973 2011-11-14 Yao Qi <yao@codesourcery.com>
975 * server.c (handle_query): Handle InstallInTrace for qSupported.
976 * tracepoint.c (add_tracepoint): Sort list.
977 (install_tracepoint, download_tracepoint): New.
978 (cmd_qtdp): Call them to install and download tracepoints.
979 (sort_tracepoints): Removed.
980 (cmd_qtstart): Update.
982 2011-11-14 Yao Qi <yao@codesourcery.com>
984 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
985 * mem-break.h: Declare.
986 * tracepoint.c (cmd_qtstart): Move some code to ...
987 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
989 (download_tracepoints): Move some code to ...
990 (download_tracepoint_1): ... here. New.
992 2011-11-08 Yao Qi <yao@codesourcery.com>
994 * remote-utils.c (relocate_instruction): A comment fix.
996 2011-11-07 Joel Brobecker <brobecker@adacore.com>
998 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
999 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1000 dr_status_mirror and dr_control_mirror from debug_reg_state.
1001 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1002 (i386_initial_stuff): Remove use of deleted globals.
1003 (i386_get_thread_context, i386_set_thread_context,
1004 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1005 from debug_reg_state.
1007 2011-11-05 Yao Qi <yao@codesourcery.com>
1009 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1010 address as TPOINT's.
1012 2011-11-02 Stan Shebs <stan@codesourcery.com>
1014 * tracepoint.c (agent_mem_read_string): New function.
1015 (eval_agent_expr): Call it for tracenz.
1016 * server.c (handle_query): Report support for tracenz.
1018 2011-11-02 Yao Qi <yao@codesourcery.com>
1020 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1022 2011-11-02 Yao Qi <yao@codesourcery.com>
1024 * target.h: Fix a typo in comment.
1026 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1028 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1029 clobber the breakpoints' shadows with fast tracepoint jumps.
1030 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1031 * target.c (write_inferior_memory): Also pass MYADDR down to
1034 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1036 * configure.ac: Check support for personality routine.
1037 * configure: Regenerate.
1038 * config.in: Likewise.
1039 * linux-low.c: Include <sys/personality.h>.
1040 Define ADDR_NO_RANDOMIZE if necessary.
1041 (linux_create_inferior): Disable address space randomization when
1042 forking inferior, if requested.
1043 (linux_supports_disable_randomization): New function.
1044 (linux_target_ops): Install it.
1045 * server.h (disable_randomization): Declare.
1046 * server.c (disable_randomization): New global variable.
1047 (handle_general_set): Handle QDisableRandomization.
1048 (handle_query): Likewise for qSupported.
1049 (main): Support --disable-randomization and --no-disable-randomization
1050 command line arguments.
1051 * target.h (struct target_ops): Add supports_disable_randomization.
1052 (target_supports_disable_randomization): New macro.
1054 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1056 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1058 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1059 [!PT_GETDSBT] (target_loadmap): New definition.
1060 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1061 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1062 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1063 and PT_GETDSBT to LINUX_LOADMAP.
1064 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1065 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1067 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1069 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1070 (arm_linux_hwbp_cap): New static variable.
1071 (arm_linux_get_hwbp_cap): Replace by ...
1072 (arm_linux_init_hwbp_cap): ... this new function.
1073 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1074 (arm_linux_get_hw_watchpoint_count): Likewise.
1075 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1076 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1077 (arm_prepare_to_resume): Use perror_with_name instead of error.
1079 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1081 * linux-arm-low.c: Include <signal.h>.
1082 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1083 (struct arm_linux_hwbp_cap): New data type.
1084 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1085 (struct arm_linux_hw_breakpoint): New data type.
1086 (MAX_BPTS, MAX_WPTS): Define.
1087 (struct arch_process_info, struct arch_lwp_info): New data types.
1088 (arm_linux_get_hwbp_cap): New function.
1089 (arm_linux_get_hw_breakpoint_count): Likewise.
1090 (arm_linux_get_hw_watchpoint_count): Likewise.
1091 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1092 (arm_hwbp_control_initialize): Likewise.
1093 (arm_hwbp_control_is_enabled): Likewise.
1094 (arm_hwbp_control_is_initialized): Likewise.
1095 (arm_hwbp_control_disable): Likewise.
1096 (arm_linux_hw_breakpoint_equal): Likewise.
1097 (arm_linux_hw_point_initialize): Likewise.
1098 (struct update_registers_data): New data structure.
1099 (update_registers_callback: New function.
1100 (arm_insert_point): Likewise.
1101 (arm_remove_point): Likewise.
1102 (arm_stopped_by_watchpoint): Likewise.
1103 (arm_stopped_data_address): Likewise.
1104 (arm_new_process): Likewise.
1105 (arm_new_thread): Likewise.
1106 (arm_prepare_to_resume): Likewise.
1107 (the_low_target): Register arm_insert_point, arm_remove_point,
1108 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1109 arm_new_thread, and arm_prepare_to_resume.
1111 2011-09-15 Stan Shebs <stan@codesourcery.com>
1113 * server.h (struct emit_ops): Add compare-goto fields.
1114 * tracepoint.c (gdb_agent_op_sizes): New table.
1115 (emit_eq_goto): New function.
1116 (emit_ne_goto): New function.
1117 (emit_lt_goto): New function.
1118 (emit_le_goto): New function.
1119 (emit_gt_goto): New function.
1120 (emit_ge_goto): New function.
1121 (is_goto_target): New function.
1122 (compile_bytecodes): Recognize special cases of compare-goto
1123 combinations and call specialized emitters for them.
1124 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1125 (amd64_emit_ne_goto): New function.
1126 (amd64_emit_lt_goto): New function.
1127 (amd64_emit_le_goto): New function.
1128 (amd64_emit_gt_goto): New function.
1129 (amd64_emit_ge_goto): New function.
1130 (amd64_emit_ops): Add the new functions.
1131 (i386_emit_eq_goto): New function.
1132 (i386_emit_ne_goto): New function.
1133 (i386_emit_lt_goto): New function.
1134 (i386_emit_le_goto): New function.
1135 (i386_emit_gt_goto): New function.
1136 (i386_emit_ge_goto): New function.
1137 (i386_emit_ops): Add the new functions.
1139 2011-09-08 Stan Shebs <stan@codesourcery.com>
1141 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1142 (i386_emit_epilogue): Restore %ebx.
1144 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1146 * server.c (step_thread): Remove definition.
1147 (process_serial_event): Don't handle Hs.
1148 * server.h (step_thread): Remove declaration.
1149 * target.c (set_desired_inferior): Remove use of step_thread.
1151 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1153 * linux-low.c: Include linux-procfs.h.
1154 (linux_attach_lwp_1): Update comments.
1155 (linux_attach): Scan for existing threads when attaching to a
1156 process that is the tgid.
1157 * Makefile.in: Update dependencies.
1159 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1161 * configure.srv: Add linux-procfs.o dependencies.
1163 2011-08-14 Yao Qi <yao@codesourcery.com>
1165 * target.h (struct target_ops): Fix indent.
1166 * win32-low.c (win32_target_ops): Fix comment.
1168 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1169 Yao Qi <yao@codesourcery.com>
1171 * Makefile.in (clean): Remove tic6x-*.c files.
1172 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1173 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1174 (tic6x-c64xp-linux.c): Likewise.
1175 * configure.srv: Add support for tic6x-*-uclinux.
1176 * linux-tic6x-low.c: New.
1177 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1179 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1180 Yao Qi <yao@codesourcery.com>
1182 * target.h (struct target_ops): Add read_loadmap.
1183 * linux-low.c (struct target_loadseg): New type.
1184 (struct target_loadmap): New type.
1185 (linux_read_loadmap): New function.
1186 (linux_target_ops): Add linux_read_loadmap.
1187 * server.c (handle_query): Support qXfer:fdpic:read packet.
1188 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1190 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1192 * win32-low.c: Include <stdint.h>.
1194 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1196 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1197 to the inferior here.
1198 (i386_remove_aligned_watchpoint): Ditto.
1199 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1200 fit part of the watchpoint in the debug registers.
1201 (i386_update_inferior_debug_regs): New.
1202 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1203 registers, and only update the inferior on success.
1204 (i386_low_remove_watchpoint): Ditto.
1206 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1208 * linux-low.c (compare_ints, unique, list_threads, show_process,
1209 linux_core_of_thread): Delete.
1210 (linux_target_ops): Change linux_core_of_thread to
1211 linux_common_core_of_thread.
1212 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1213 * utils.c (malloc_failure): Change type of argument.
1214 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1215 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1216 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1217 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1218 (IPA_OBJS): Add common-utils-ipa.o.
1219 (ptid_h, linux_osdata_h): New macros.
1220 (server_h): Add common/common-utils.h, common/xml-utils.h,
1221 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1223 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1224 ptid.o, buffer.o): New rules.
1225 (linux-low.o): Add common/linux-osdata.h as a dependency.
1226 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1227 * configure.ac: Add AC_HEADER_DIRENT check.
1228 * config.in: Regenerate.
1229 * configure: Regenerate.
1230 * remote-utils.c (xml_escape_text): Delete.
1231 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1232 buffer_xml_printf): Move to common/buffer.c.
1233 * server.c (main): Remove call to initialize_inferiors.
1234 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1235 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1236 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1237 internal_error, gdb_assert, gdb_assert_fail): Delete.
1238 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1239 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1241 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1242 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1243 initialize_inferiors): Delete.
1245 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1247 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1250 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1252 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1254 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1256 2011-05-26 Yao Qi <yao@codesourcery.com>
1258 * Makefile.in (thread-db.o): Track dependence to
1259 common/gdb_thread_db.h.
1260 * thread-db.c: include gdb_thread_db.h from right place.
1262 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1264 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1265 __FILE__ and __LINE__ to internal_error.
1267 2011-05-13 Doug Evans <dje@google.com>
1269 * thread-db.c (try_thread_db_load_from_sdir): New function.
1270 (try_thread_db_load_from_dir): New function.
1271 (thread_db_load_search): Handle $sdir, ignore $pdir.
1272 Remove trying of system directories if search of
1273 libthread-db-search-path fails, that is now done via $sdir.
1275 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1277 * server.c (handle_query): Add EnableDisableTracepoints to the list
1278 of supported features.
1279 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1281 (cmd_qtenable_disable): New.
1282 (cmd_qtstart): Install tracepoints even if disabled.
1283 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1284 receiving a QTEnable or QTDisable packet.
1285 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1286 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1288 (gdb_probe): Skip data collection if static tracepoint is disabled.
1290 2011-05-10 Doug Evans <dje@google.com>
1292 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1294 2011-05-04 Doug Evans <dje@google.com>
1296 * linux-low.c (linux_join): Skip process lookup.
1297 * spu-low.c (spu_join): Ditto.
1298 * server.c (join_inferiors_callback): Delete.
1299 (process_serial_event): For 'D' packet (detach) call join_inferior
1302 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1304 * README: Don't mention xscale*-*-linux*.
1305 * configure.srv (xscale*-*-linux*): Don't handle target.
1307 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1309 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1311 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1312 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1313 (i386_emit_void_call_2): Likewise.
1315 2011-04-26 Yao Qi <yao@codesourcery.com>
1317 * linux-low.c: Move common macros to linux-ptrace.h.
1318 Include linux-ptrace.h.
1319 * Makefile.in (linux_ptrace_h): New.
1320 (linux-low.o): Depends on linux-ptrace.h.
1322 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1324 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1325 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1326 (remote_prepare): New function with most of the TCP code from ...
1327 (remote_open): ... here. Detect PORT here unconditionally. Move also
1328 setting transport_is_reliable.
1329 * server.c (run_once): New variable.
1330 (gdbserver_usage): Document it.
1331 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1332 the first run if RUN_ONCE.
1333 * server.h (run_once, remote_prepare): New declarations.
1335 2011-04-19 Tom Tromey <tromey@redhat.com>
1337 * win32-low.c (handle_load_dll): Remove duplicate "the".
1339 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1341 Remove support for old Cygwin 1.5 versions.
1342 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1343 function to avoid warning.
1344 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1347 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1349 * gdbserver/server.h (Macro _): Define it if not available.
1351 2011-03-14 Michael Snyder <msnyder@vmware.com>
1353 * hostio.c (handle_close): Remove unnecessary null test.
1355 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1357 * Makefile.in (maintainer-clean realclean distclean): Remove
1358 "make ... subdir_do" command.
1360 2011-03-10 Michael Snyder <msnyder@vmware.com>
1362 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1364 * server.c (handle_v_run): Free alloced buffer on early return.
1366 2011-03-09 Yao Qi <yao@codesourcery.com>
1369 2011-03-04 Yao Qi <yao@codesourcery.com>
1371 * Makefile.in: Remove GNU make feature --directory.
1373 2011-03-05 Yao Qi <yao@codesourcery.com>
1375 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1376 (subdir_do): New make target. Copied from gdb/Makefile.
1377 (maintainer-clean, realclean, distclean, clean): Call corresponding
1378 make targets in common/Makefile.
1380 2011-02-11 Yao Qi <yao@codesourcery.com>
1382 * configure.ac: Call AC_PROG_RANLIB.
1383 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1384 * configure: Regenerate.
1386 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1388 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1390 2011-03-06 Yao Qi <yao@codesourcery.com>
1392 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1394 2011-03-05 Yao Qi <yao@codesourcery.com>
1396 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1397 (subdir_do): New make target. Copied from gdb/Makefile.
1398 (maintainer-clean, realclean, distclean, clean): Call corresponding
1399 make targets in common/Makefile.
1401 2011-03-04 Yao Qi <yao@codesourcery.com>
1403 * Makefile.in: Remove GNU make feature --directory.
1405 2011-03-04 Michael Snyder <msnyder@vmware.com>
1407 * server.c (queue_stop_reply): Call xmalloc not malloc.
1409 2011-03-02 Michael Snyder <msnyder@vmware.com>
1411 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1413 2011-02-28 Michael Snyder <msnyder@vmware.com>
1415 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1416 (cmd_qtframe): Ditto.
1417 (cmd_qtbuffer): Ditto.
1418 (cmd_bigqtbuffer): Ditto.
1420 * utils.c (decimal2str): Initialize 'width' to nine, then
1423 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1425 * hostio.c (require_data): Free *data, not data.
1427 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1429 * hostio.c (require_data): Use free, not xfree.
1431 2011-02-27 Michael Snyder <msnyder@vmware.com>
1433 * server.c (handle_query): Discard unused value.
1435 * hostio.c (require_data): Free malloc memory before returning
1438 2011-02-26 Michael Snyder <msnyder@vmware.com>
1440 * linux-low.c (list_threads): Call closedir for dirent.
1442 2011-02-27 Michael Snyder <msnyder@vmware.com>
1444 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1445 a case statement falls through.
1447 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1449 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1452 2011-02-26 Michael Snyder <msnyder@vmware.com>
1454 * utils.c (decimal2str): Eliminate dead code and dead param.
1455 (pulongest): Drop dead param from call to decimal2str.
1458 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1460 Revert the following patch (not approved yet):
1461 2011-02-21 Hui Zhu <teawater@gmail.com>
1462 * tracepoint.c (tp_printf): New function.
1463 (eval_agent_expr): Handle gdb_agent_op_printf.
1465 2011-02-21 Hui Zhu <teawater@gmail.com>
1467 * tracepoint.c (tp_printf): New function.
1468 (eval_agent_expr): Handle gdb_agent_op_printf.
1470 2011-02-18 Tom Tromey <tromey@redhat.com>
1472 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1473 (tracepoint.o): Likewise.
1474 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1475 (gdb_agent_op_names): Likewise.
1477 2011-02-18 Tom Tromey <tromey@redhat.com>
1479 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1480 gdb_agent_op_rot>: New constants.
1481 (gdb_agent_op_names): Add pick and roll.
1482 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1485 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1487 * aclocal.m4: Regenerated with aclocal-1.11.1.
1489 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1491 * server.c (handle_qxfer_traceframe_info): New.
1492 (qxfer_packets): Register "traceframe-info".
1493 (handle_query): Report support for qXfer:traceframe-info:read+.
1494 * tracepoint.c (match_blocktype): New.
1495 (traceframe_find_block_type): Rename to ...
1496 (traceframe_walk_blocks): ... this. Add callback filter argument,
1498 (traceframe_find_block_type): New, reimplemented on top of
1499 traceframe_walk_blocks.
1500 (build_traceframe_info_xml): New.
1501 (traceframe_read_info): New.
1502 * server.h (traceframe_read_info): Declare.
1504 2011-02-11 Yao Qi <yao@codesourcery.com>
1506 * configure.ac: Call AC_PROG_RANLIB.
1507 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1508 * configure: Regenerate.
1510 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1512 * server.c (gdb_read_memory): Change return semantics to allow
1514 (handle_search_memory_1): Adjust.
1515 (process_serial_event) <'m' packet>: Handle partial transfers.
1516 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1518 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1520 * regcache.c (init_register_cache): Initialize
1521 regcache->register_status.
1522 (free_register_cache): Release regcache->register_status.
1523 (regcache_cpy): Copy register_status.
1524 (registers_to_string): Print 'x's for unavailable registers.
1525 (supply_register): Mark the register's status valid or
1526 unavailable, depending on whether a buffer was passed in or not.
1527 (supply_register_zeroed): New.
1528 (supply_regblock): Mark the registers' status valid or
1529 unavailable, depending on whether a buffer was passed in or not.
1530 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1531 (struct regcache): New `register_status' field.
1532 (supply_register_zeroed): Declare.
1533 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1534 supply_register_zeroed, rather than passing a NULL buffer to
1536 * tracepoint.c (fetch_traceframe_registers): Update comment.
1538 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1540 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1543 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1545 * server.h (decode_xfer_write): Change prototype.
1546 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1547 and don't extract the annex here.
1548 * server.c (decode_xfer_read): Remove `annex' parameter,
1549 and don't extract the annex here.
1551 (struct qxfer): New.
1552 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1553 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1554 (handle_qxfer_statictrace): New functions, abstracted out from
1555 handle_query, and made to use the struct qxfer interface.
1556 (handle_threads_qxfer_proper): Rename to ...
1557 (handle_qxfer_threads_proper): ... this.
1558 (handle_threads_qxfer): Rename to ...
1559 (handle_qxfer_threads): ... this. Adjust.
1560 (qxfer_packets): New array.
1561 (handle_qxfer): New function.
1562 (handle_query): Use handle_qxfer.
1564 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1566 * gdbreplay.c: Shorten lines of >= 80 columns.
1567 * linux-low.c: Ditto.
1568 * linux-ppc-low.c: Ditto.
1569 * linux-s390-low.c: Ditto.
1570 * linux-sparc-low.c: Ditto.
1571 * linux-x86-low.c: Ditto.
1572 * linux-xtensa-low.c: Ditto.
1573 * mem-break.c: Ditto.
1575 * regcache.h: Ditto.
1576 * remote-utils.c: Ditto.
1579 * thread-db.c: Ditto.
1580 * tracepoint.c: Ditto.
1582 * win32-low.h: Ditto.
1584 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1586 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1589 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1591 * server.c (gdbserver_version): Update copyright year in version
1593 * gdbreplay.c (gdbreplay_version): Ditto.
1595 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1597 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1598 * linux-bfin-low.c: New file.
1599 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1600 PT_DATA_ADDR for BFIN targets.
1601 * Makefile.in (SFILES): Add linux-bfin-low.c.
1602 (clean): Remove reg-bfin.c.
1603 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1604 * README: Mention supported Blackfin targets.
1606 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1608 * .gitignore: New file.
1610 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1612 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1614 2010-10-22 Jie Zhang <jie@codesourcery.com>
1616 * Makefile.in: Add FLAGS_TO_PASS variable.
1617 (install): Remove dependency of install-only and recursively
1618 invoke make for install-only.
1620 2010-10-04 Doug Evans <dje@google.com>
1622 * Makefile.in (uninstall): Use $(DESTDIR).
1624 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1628 * linux-x86-low.c (compat_siginfo_from_siginfo)
1629 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1630 si_code is < 0. Check for si_code == SI_TIMER before checking for
1633 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1635 * lynx-i386-low.c: New file.
1636 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1638 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1640 * lynx-low.c (ptrace_request_to_str): Remove handling for
1641 request values that have been removed in LynxOS 5.x.
1643 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1645 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1648 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1650 * configure.ac: Add --enable-inprocess-agent option.
1651 * configure: Rebuilt.
1653 2010-09-06 Yao Qi <yao@codesourcery.com>
1655 * linux-low.c (linux_kill): Remove unused variable.
1656 (linux_stabilize_threads): Likewise.
1657 * server.c (start_inferior): Likewise.
1658 (queue_stop_reply_callback): Likewise.
1659 * tracepoint.c (do_action_at_tracepoint): Likewise.
1661 2010-09-06 Yao Qi <yao@codesourcery.com>
1663 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1666 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1668 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1670 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1672 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1675 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1677 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1678 gdbserver/lynx-ppc-low.c: New files.
1679 * Makefile.in (lynx_low_h): New variable.
1680 (lynx-low.o, lynx-ppc-low.o): New rules.
1681 * configure.ac: On LynxOS, link with -lnetinet.
1682 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1683 * configure: regenerate.
1685 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1687 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1688 * configure.ac: Add check for vasprintf and vsnprintf.
1689 * configure, config.in: Regenerate.
1690 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1692 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1694 * gdbreplay.c: Move include of alloca.h up, next to include of
1696 * server.h: Add include of malloc.h.
1697 * mem-break.c: Remove include of malloc.h.
1698 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1700 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1702 * Makefile.in (memmem.o): Build with -Wno-error.
1704 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1706 * utils.c (xsnprintf): Make non-static.
1707 * server.h: Add xsnprintf declaration.
1708 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1709 replace calls to snprintf by calls to xsnprintf throughout.
1711 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1713 * configure.ac: Add configure check for alloca.
1714 * configure, config.in: Regenerate.
1715 * server.h: Include alloca.h if it exists.
1716 * gdbreplay.c: Include alloca.h if it exists.
1718 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1720 * linux-low.c (__SIGRTMIN): Define if not already defined.
1721 (linux_create_inferior): Check for __ANDROID__ rather than
1723 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1724 are already deferred.
1725 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1726 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1727 stopped and already has a pending signal to report.
1728 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1729 a pending signal to report or is moving out of a jump pad.
1730 (linux_init_signals): Check for __ANDROID__ rather than
1733 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1735 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1736 debug_threads check. Avoid a linear search when not doing debug
1739 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1741 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1742 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1743 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1744 (process_event): Change local fd's type to gdb_fildes_t.
1745 (create_file_handler): Adjust prototype.
1746 (delete_file_handler): Adjust prototype.
1747 (handle_file_event): Adjust prototype. Use pfildes.
1748 (create_file_event): Adjsut prototype.
1749 * remote-utils.c (remote_desc, listen_desc): Change type to
1751 * server.h: New gdb_fildes_t typedef.
1752 [USE_WIN32API]: Include winsock2.h.
1753 (delete_file_handler, add_file_handler): Adjust prototypes.
1755 * utils.c (pfildes): New.
1757 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1759 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1760 * configure: Regenerate.
1762 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1764 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1765 (linux_done_accessing_memory): ... this.
1766 (linux_target_ops): Adjust.
1767 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1768 * nto-low.c (nto_target_ops): Adjust comment.
1769 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1770 * spu-low.c (spu_target_ops): Adjust comment.
1771 * target.h (target_ops): Rename unprepare_to_access_memory field
1772 to done_accessing_memory.
1773 (unprepare_to_access_memory): Rename to ...
1774 (done_accessing_memory): ... this.
1776 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1778 * linux-low.c (linux_prepare_to_access_memory): New.
1779 (linux_unprepare_to_access_memory): New.
1780 (linux_target_ops): Install them.
1781 * server.c (read_memory): Rename to ...
1782 (gdb_read_memory): ... this. Use
1783 prepare_to_access_memory/prepare_to_access_memory.
1784 (write_memory): Rename to ...
1785 (gdb_write_memory): ... this. Use
1786 prepare_to_access_memory/prepare_to_access_memory.
1787 (handle_search_memory_1): Adjust.
1788 (process_serial_event): Adjust.
1789 * target.h (struct target_ops): New fields
1790 prepare_to_access_memory and unprepare_to_access_memory.
1791 (prepare_to_access_memory, unprepare_to_access_memory): New.
1792 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1793 prepare_to_access_memory/prepare_to_access_memory.
1794 * nto-low.c (nto_target_ops): Adjust.
1795 * spu-low.c (spu_target_ops): Adjust.
1796 * win32-low.c (win32_target_ops): Adjust.
1798 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1800 * Makefile.in (WARN_CFLAGS): Get it from configure.
1801 (WERROR_CFLAGS): New.
1802 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1803 * configure.ac: Introduce --enable-werror, which adds -Werror to
1804 the compiler command line. Enabled by default. Disable with
1805 --disable-werror. Add -Wdeclaration-after-statement
1806 Wpointer-arith and -Wformat-nonliteral to warning flags.
1807 * configure: Regenerate.
1809 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1811 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1813 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1815 * gdbreplay.c (remote_error): New.
1817 (expect): Use gdbchar. Check for error reading from GDB.
1818 Clarify sync error output.
1819 (play): Check for errors writing to GDB.
1820 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1821 * remote-utils.c (getpkt): Check for errors writing to the remote
1824 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1826 * linux-low.c (linux_wait_1): Move non-debugging code out of
1827 `debug_threads' control.
1829 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1831 * linux-low.c (linux_wait_1): Don't set last_status here.
1832 * server.c (push_event, queue_stop_reply_callback): Assert we're
1833 not pushing a TARGET_WAITKIND_IGNORE event.
1834 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1835 (myresume, handle_target_event): Set the thread's last_resume_kind
1836 and last_status from the target returned status.
1838 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1842 * linux-x86-low.c (update_debug_registers_callback): New.
1843 (i386_dr_low_set_addr): Use it.
1844 (i386_dr_low_get_addr): New.
1845 (i386_dr_low_set_control): Use update_debug_registers_callback.
1846 (i386_dr_low_get_control): New.
1847 (i386_dr_low_get_status): Adjust.
1848 * linux-low.c (linux_stop_lwp): New.
1849 * linux-low.h (linux_stop_lwp): Declare.
1851 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1852 argument instead of a i386_debug_reg_state.
1853 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1854 a i386_debug_reg_state.
1855 (i386_insert_aligned_watchpoint): Adjust.
1856 (i386_remove_aligned_watchpoint): Adjust.
1857 (i386_low_stopped_data_address): Read the debug registers from the
1858 inferior instead of from the mirrors.
1859 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1860 (i386_dr_low_get_addr): Declare.
1861 (i386_dr_low_get_control): Declare.
1862 (i386_dr_low_get_status): Change prototype.
1864 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1865 (i386_dr_low_get_addr): New.
1866 (i386_dr_low_get_control): New.
1867 (i386_dr_low_get_status): Adjust prototype. Return
1869 (i386_initial_stuff): Clear dr_status_mirror and
1871 (i386_get_thread_context): Adjust.
1872 (i386_set_thread_context): Adjust.
1873 (i386_thread_added): Adjust.
1875 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1877 * linux-low.h (linux_thread_area): Delete declaration.
1879 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1881 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1882 after its termination.
1884 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1886 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1887 (gdb_wants_all_stopped): Delete.
1888 (linux_wait_1): Don't call them.
1889 * server.c (handle_v_cont): Tag all threads as want-stopped.
1890 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1891 stopped as "client-wants-stopped".
1893 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1895 * Makefile.in (signals_h): New.
1896 (server_h): Depend on it.
1897 (server.o): Don't depend on $(signals_def).
1898 (signals.o): Depend on $(signals_def).
1900 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1902 * Makefile.in (signals_def): New.
1903 (server_h): Append include/gdb/signals.h and signals_def.
1904 (server.o): Append signals_def.
1906 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1908 * server.c (handle_target_event): Use target_signal_to_host for
1909 resume_info.sig initialization.
1910 * target.h (struct thread_resume) <sig>: New comment.
1912 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1914 * server.c (handle_query): strcpy() the returned string from paddress()
1915 instead of sprintf().
1916 * utils.c (paddress): Return phex_nz().
1918 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1920 * server.c (handle_v_cont): Call mourn_inferior if process
1922 (myresume): Likewise.
1924 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1926 Static tracepoints, and integration with UST.
1928 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1929 * mem-break.c (uninsert_all_breakpoints)
1930 (reinsert_all_breakpoints): New.
1931 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1932 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1933 (gdb_agent_ust_loaded, helper_thread_id)
1934 (gdb_agent_helper_thread_id): New macros.
1935 (struct ipa_sym_addresses): Add addr_ust_loaded,
1936 addr_helper_thread_id, addr_cmd_buf.
1937 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1938 (in_process_agent_loaded_ust): New.
1939 (write_e_ust_not_loaded): New.
1940 (maybe_write_ipa_ust_not_loaded): New.
1941 (struct collect_static_trace_data_action): New.
1942 (enum tracepoint_type) <static_tracepoint>: New.
1943 (struct tracepoint) <handle>: Mention static tracepoints.
1944 (struct static_tracepoint_ctx): New.
1945 (CMD_BUF_SIZE): New.
1946 (add_tracepoint_action): Handle static tracepoint actions.
1947 (unprobe_marker_at): New.
1948 (clear_installed_tracepoints): Handle static tracepoints.
1949 (cmd_qtdp): Handle static tracepoints.
1950 (probe_marker_at): New.
1951 (cmd_qtstart): Handle static tracepoints.
1952 (response_tracepoint): Handle static tracepoints.
1953 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1954 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1955 (get_context_regcache): Handle static tracepoints.
1956 (do_action_at_tracepoint): Handle static tracepoint actions.
1957 (traceframe_find_block_type): Handle static trace data blocks.
1958 (traceframe_read_sdata): New.
1959 (download_tracepoints): Download static tracepoint actions.
1960 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1961 (GDB_PROBE_NAME): New.
1966 (ust_marker_to_static_tracepoint): New.
1968 (collect_ust_data_at_tracepoint): New.
1969 (gdb_ust_probe): New.
1970 (UNIX_PATH_MAX, SOCK_DIR): New.
1971 (gdb_ust_connect_sync_socket): New.
1972 (resume_thread, stop_thread): New.
1973 (run_inferior_command): New.
1974 (init_named_socket): New.
1975 (gdb_ust_socket_init): New.
1976 (cstr_to_hexstr): New.
1978 (first_marker, next_marker): New.
1979 (response_ust_marker): New.
1980 (cmd_qtfstm, cmd_qtsstm): New.
1981 (unprobe_marker_at, probe_marker_at): New.
1982 (cmd_qtstmat, gdb_ust_thread): New.
1983 (gdb_ust_init): New.
1984 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1985 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1987 (x86_64_st_collect_regmap): New.
1988 (X86_64_NUM_ST_COLLECT_GREGS): New.
1989 (AMD64_RIP_REGNUM): New.
1990 (supply_static_tracepoint_registers): New.
1991 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1993 (i386_st_collect_regmap): New.
1994 (i386_NUM_ST_COLLECT_GREGS): New.
1995 (supply_static_tracepoint_registers): New.
1996 * server.c (handle_query): Handle qXfer:statictrace:read.
1997 <qSupported>: Report support for StaticTracepoints, and
1998 qXfer:statictrace:read features.
1999 * server.h (traceframe_read_sdata)
2000 (supply_static_tracepoint_registers): Declare.
2001 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2002 (unpack_varlen_hex): Include in IPA build.
2003 * Makefile.in (ustlibs, ustinc): New.
2004 (IPA_OBJS): Add remote-utils-ipa.o.
2005 ($(IPA_LIB)): Link -ldl and -lpthread.
2007 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2008 * config.in, configure: Regenerate.
2010 2010-06-20 Ian Lance Taylor <iant@google.com>
2011 Pedro Alves <pedro@codesourcery.com>
2013 * linux-x86-low.c (always_true): Delete.
2014 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2015 trying to fool the compiler with always_true.
2017 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2019 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2020 conditions in gdbserver.
2022 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2024 * spu-low.c (spu_read_memory): Wrap around local store limit.
2025 (spu_write_memory): Likewise.
2027 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2029 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2030 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2032 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2034 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2035 uses with LONGEST uses.
2037 2010-06-14 Stan Shebs <stan@codesourcery.com>
2038 Pedro Alves <pedro@codesourcery.com>
2042 * linux-x86-low.c: Include limits.h.
2047 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2048 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2049 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2050 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2051 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2052 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2053 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2054 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2055 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2056 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2057 (amd64_emit_void_call_2): New.
2058 (amd64_emit_ops): New.
2059 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2060 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2061 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2062 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2063 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2064 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2065 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2066 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2067 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2068 (i386_emit_stack_adjust, i386_emit_int_call_1)
2069 (i386_emit_void_call_2): New.
2070 (i386_emit_ops): New.
2071 (x86_emit_ops): New.
2072 (the_low_target): Install x86_emit_ops.
2073 * server.h (struct emit_ops): New.
2074 (get_raw_reg_func_addr): Declare.
2075 (current_insn_ptr, emit_error): Declare.
2076 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2077 (set_trace_state_variable_value): New defines.
2078 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2079 addr_get_trace_state_variable_value and
2080 addr_set_trace_state_variable_value.
2081 (symbol_list): New fields for get_raw_reg,
2082 get_trace_state_variable_value and set_trace_state_variable_value.
2083 (condfn): New typedef.
2084 (struct tracepoint): New field `compiled_cond'.
2085 (do_action_at_tracepoint): Clear compiled_cond.
2086 (get_trace_state_variable_value, set_trace_state_variable_value):
2088 (condition_true_at_tracepoint): If there's a compiled condition,
2090 (current_insn_ptr, emit_error): New globals.
2091 (struct bytecode_address): New.
2092 (get_raw_reg_func_addr): New.
2093 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2094 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2095 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2096 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2097 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2098 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2099 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2100 (compile_tracepoint_condition, compile_bytecodes): New.
2101 * target.h (emit_ops): Forward declare.
2102 (struct target_ops): New field emit_ops.
2103 (target_emit_ops): New.
2104 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2105 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2106 * linux-low.c (linux_emit_ops): New.
2107 (linux_target_ops): Install it.
2108 * linux-low.h (struct linux_target_ops): New field emit_ops.
2110 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2112 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2113 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2115 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2116 Stan Shebs <stan@codesourcery.com>
2118 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2119 (all): Depend on $(extra_libraries).
2120 (install-only): Install the IPA.
2121 (IPA_OBJS, IPA_LIB): New.
2122 (clean): Remove the IPA lib.
2123 (IPAGENT_CFLAGS): New.
2124 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2125 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2126 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2127 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2128 * configure.ac: Check for atomic builtins support in the compiler.
2129 (IPA_DEPFILES, extra_libraries): Define.
2130 * configure.srv (ipa_obj): Add description.
2131 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2132 (i[34567]86-*-linux*): Set ipa_obj.
2133 (x86_64-*-linux*): Set ipa_obj.
2134 * linux-low.c (stabilizing_threads): New.
2135 (supports_fast_tracepoints): New.
2136 (linux_detach): Stabilize threads before detaching.
2137 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2138 the lwp is either not stabilizing, or is moving out of a jump pad.
2139 (linux_fast_tracepoint_collecting): New.
2140 (maybe_move_out_of_jump_pad): New.
2141 (enqueue_one_deferred_signal): New.
2142 (dequeue_one_deferred_signal): New.
2143 (linux_wait_for_event_1): If moving out of a jump pad, defer
2144 pending signals to later.
2145 (linux_stabilize_threads): New.
2146 (linux_wait_1): Check if threads need moving out of jump pads, and
2148 (stuck_in_jump_pad_callback): New.
2149 (move_out_of_jump_pad_callback): New.
2151 (linux_resume_one_lwp): Handle moving out of jump pads.
2152 (linux_set_resume_request): Dequeue deferred signals.
2153 (need_step_over_p): Also step over fast tracepoint jumps.
2154 (start_step_over): Also uninsert fast tracepoint jumps.
2155 (finish_step_over): Also reinsert fast tracepoint jumps.
2156 (linux_install_fast_tracepoint_jump): New.
2157 (linux_target_ops): Install linux_stabilize_threads and
2158 linux_install_fast_tracepoint_jump_pad.
2159 * linux-low.h (linux_target_ops) <get_thread_area,
2160 install_fast_tracepoint_jump_pad>: New fields.
2161 (struct lwp_info) <collecting_fast_tracepoint,
2162 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2163 (linux_get_thread_area): Declare.
2164 * linux-x86-low.c (jump_insn): New.
2165 (x86_get_thread_area): New.
2166 (append_insns): New.
2168 (amd64_install_fast_tracepoint_jump_pad): New.
2169 (i386_install_fast_tracepoint_jump_pad): New.
2170 (x86_install_fast_tracepoint_jump_pad): New.
2171 (the_low_target): Install x86_get_thread_area and
2172 x86_install_fast_tracepoint_jump_pad.
2173 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2174 (struct fast_tracepoint_jump): New.
2175 (fast_tracepoint_jump_insn): New.
2176 (fast_tracepoint_jump_shadow): New.
2177 (find_fast_tracepoint_jump_at): New.
2178 (fast_tracepoint_jump_here): New.
2179 (delete_fast_tracepoint_jump): New.
2180 (set_fast_tracepoint_jump): New.
2181 (uninsert_fast_tracepoint_jumps_at): New.
2182 (reinsert_fast_tracepoint_jumps_at): New.
2183 (set_breakpoint_at): Use write_inferior_memory.
2184 (uninsert_raw_breakpoint): Use write_inferior_memory.
2185 (check_mem_read): Mask out fast tracepoint jumps.
2186 (check_mem_write): Mask out fast tracepoint jumps.
2187 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2188 (set_fast_tracepoint_jump): Declare.
2189 (delete_fast_tracepoint_jump)
2190 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2191 (reinsert_fast_tracepoint_jumps_at): Declare.
2192 * regcache.c: Don't compile many functions when building the
2193 in-process agent library.
2194 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2195 the register buffer in the heap.
2196 (free_register_cache): If the register buffer isn't owned by the
2197 regcache, don't free it.
2198 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2199 pre-existing register caches.
2200 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2202 (convert_ascii_to_int): : Constify `from' parameter type.
2203 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2204 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2205 the needed buffer in-place.
2206 (relocate_instruction): New.
2207 * server.c (handle_query) <qSymbols>: If the target supports
2208 tracepoints, give it a chance of looking up symbols. Report
2209 support for fast tracepoints.
2210 (handle_status): Stabilize threads.
2211 (process_serial_event): Adjust.
2212 * server.h (struct fast_tracepoint_jump): Forward declare.
2213 (struct process_info) <fast_tracepoint_jumps>: New field.
2214 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2215 (decode_X_packet, decode_M_packet): Adjust.
2216 (relocate_instruction): Declare.
2217 (in_process_agent_loaded): Declare.
2218 (tracepoint_look_up_symbols): Declare.
2219 (struct fast_tpoint_collect_status): Declare.
2220 (fast_tracepoint_collecting): Declare.
2221 (force_unlock_trace_buffer): Declare.
2222 (handle_tracepoint_bkpts): Declare.
2223 (initialize_low_tracepoint)
2224 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2225 * target.h (struct target_ops) <stabilize_threads,
2226 install_fast_tracepoint_jump_pad>: New fields.
2227 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2228 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2229 [HAVE_STDINT_H]: Include stdint.h.
2230 (trace_debug_1): Rename to ...
2231 (trace_vdebug): ... this.
2232 (trace_debug): Rename to ...
2233 (trace_debug_1): ... this. Add `level' parameter.
2235 (ATTR_USED, ATTR_NOINLINE): New.
2236 (IP_AGENT_EXPORT): New.
2237 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2238 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2239 (about_to_request_buffer_space, trace_buffer_is_full)
2240 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2241 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2242 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2243 (traceframe_write_count, traceframes_created)
2244 (trace_state_variables)
2245 New renaming defines.
2246 (struct ipa_sym_addresses): New.
2247 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2249 (ipa_sym_addrs): New.
2250 (all_tracepoint_symbols_looked_up): New.
2251 (in_process_agent_loaded): New.
2252 (write_e_ipa_not_loaded): New.
2253 (maybe_write_ipa_not_loaded): New.
2254 (tracepoint_look_up_symbols): New.
2255 (debug_threads) [IN_PROCESS_AGENT]: New.
2256 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2257 (UNKNOWN_SIDE_EFFECTS): New.
2258 (stop_tracing): New.
2259 (flush_trace_buffer): New.
2260 (stop_tracing_bkpt): New.
2261 (flush_trace_buffer_bkpt): New.
2262 (read_inferior_integer): New.
2263 (read_inferior_uinteger): New.
2264 (read_inferior_data_pointer): New.
2265 (write_inferior_data_pointer): New.
2266 (write_inferior_integer): New.
2267 (write_inferior_uinteger): New.
2268 (struct collect_static_trace_data_action): Delete.
2269 (enum tracepoint_type): New.
2270 (struct tracepoint) <type>: New field `type'.
2271 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2272 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2273 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2274 (tracepoints): Use IP_AGENT_EXPORT.
2275 (last_tracepoint): Don't include in the IPA.
2276 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2277 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2278 (alloced_trace_state_variables): New.
2279 (trace_state_variables): Use IP_AGENT_EXPORT.
2280 (traceframe_t): Delete unused variable.
2281 (circular_trace_buffer): Don't include in the IPA.
2282 (trace_buffer_start): Delete.
2283 (struct trace_buffer_control): New.
2284 (trace_buffer_free): Delete.
2285 (struct ipa_trace_buffer_control): New.
2286 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2287 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2289 (trace_buffer_ctrl): New.
2290 (TRACE_BUFFER_CTRL_CURR): New.
2291 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2292 Reimplement as macros.
2293 (trace_buffer_wrap): Delete.
2294 (traceframe_write_count, traceframe_read_count)
2295 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2296 (struct tracepoint_hit_ctx) <type>: New field.
2297 (struct fast_tracepoint_ctx): New.
2298 (memory_barrier): New.
2300 (record_tracepoint_error): Update atomically in the IPA.
2301 (clear_inferior_trace_buffer): New.
2302 (about_to_request_buffer_space): New.
2303 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2304 updating the same buffer.
2305 (add_tracepoint): Default the tracepoint's type to trap
2306 tracepoint, and orig_size to -1.
2307 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2309 (create_trace_state_variable): New parameter `gdb'. Handle it.
2310 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2311 (cmd_qtdp): Handle fast tracepoints.
2313 (max_jump_pad_size): New.
2314 (gdb_jump_pad_head): New.
2315 (get_jump_space_head): New.
2316 (claim_jump_space): New.
2317 (sort_tracepoints): New.
2318 (MAX_JUMP_SIZE): New.
2319 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2321 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2322 support. Upload fast traceframes, and delete internal IPA
2324 (stop_tracing_handler): New.
2325 (flush_trace_buffer_handler): New.
2326 (cmd_qtstop): Upload fast tracepoints.
2327 (response_tracepoint): Handle fast tracepoints.
2328 (tracepoint_finished_step): Upload fast traceframes. Set the
2329 tracepoint hit context's tracepoint type.
2330 (handle_tracepoint_bkpts): New.
2331 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2332 type. Add comment about fast tracepoints.
2333 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2334 non-existing action_str field.
2335 (get_context_regcache): Handle fast tracepoints.
2336 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2338 (fast_tracepoint_from_jump_pad_address): New.
2339 (fast_tracepoint_from_ipa_tpoint_address): New.
2340 (collecting_t): New.
2341 (force_unlock_trace_buffer): New.
2342 (fast_tracepoint_collecting): New.
2345 (write_inferior_data_ptr): New.
2346 (target_tp_heap): New.
2347 (target_malloc): New.
2348 (download_agent_expr): New.
2350 (download_tracepoints): New.
2351 (download_trace_state_variables): New.
2352 (upload_fast_traceframes): New.
2353 (IPA_FIRST_TRACEFRAME): New.
2354 (IPA_NEXT_TRACEFRAME_1): New.
2355 (IPA_NEXT_TRACEFRAME): New.
2356 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2357 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2358 (gdb_jump_pad_buffer_end): New.
2359 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2360 (initialize_tracepoint): Adjust.
2361 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2362 buffer. Initialize the low module.
2363 * utils.c (PREFIX, TOOLNAME): New.
2364 (malloc_failure): Use PREFIX.
2365 (error): In the IPA, an error causes an exit.
2366 (fatal, warning): Use PREFIX.
2367 (internal_error): Use TOOLNAME.
2368 (NUMCELLS): Increase to 10.
2369 * configure, config.in: Regenerate.
2371 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2373 * server.c (handle_query) <qSupported>: Do two passes over the
2374 qSupported string to avoid nesting strtok.
2376 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2378 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2380 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2382 * configure: Regenerate.
2383 * proc-service.list: New.
2385 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2387 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2390 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2392 * gdbreplay.c (remote_open): Check error return from socket() call by
2393 its equality to -1 not by it being negative.
2394 * remote-utils.c (remote_open): Likewise.
2396 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2398 * config.h: Regenerate.
2400 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2402 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2403 doesn't provide PTRACE_GET_THREAD_AREA.
2405 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2407 * linux-m68k-low.c: Include <asm/ptrace.h>
2408 (ps_get_thread_area): Implement.
2410 2010-05-03 Doug Evans <dje@google.com>
2412 * event-loop.c (struct callback_event): New struct.
2413 (callback_list): New global.
2414 (append_callback_event, delete_callback_event): New functions.
2415 (process_callback): New function.
2416 (start_event_loop): Call it.
2417 * remote-utils.c (NOT_SCHEDULED): Define.
2418 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2419 moved out of readchar.
2420 (readchar): Rewrite. Call reschedule before returning.
2421 (reset_readchar): New function.
2422 (remote_close): Call it.
2423 (process_remaining, reschedule): New functions.
2424 * server.h (callback_handler_func): New typedef.
2425 (append_callback_event, delete_callback_event): Declare.
2427 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2429 * proc-service.c (ps_pglobal_lookup): Use
2430 thread_db_look_up_one_symbol.
2431 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2432 parameter. Use it instead of all_symbols_looked_up.
2433 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2435 (all_symbols_looked_up): Don't declare.
2436 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2437 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2439 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2440 Set all_symbols_looked_up here.
2441 (thread_db_look_up_one_symbol): New.
2442 (thread_db_get_tls_address): Adjust.
2443 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2444 thread_db object on the heap, and tentatively set it in the
2446 (thread_db_init): Don't set all_symbols_looked_up here.
2447 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2449 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2451 * linux-low.c (linux_kill, linux_detach): Adjust.
2452 (status_pending_p_callback): Remove redundant statement. Check
2453 for !TARGET_WAITIKIND_IGNORE, instead of
2454 TARGET_WAITKIND_STOPPED.
2455 (handle_tracepoints): Make sure LWP is locked. Adjust.
2456 (linux_wait_for_event_1): Adjust.
2457 (linux_cancel_breakpoints): New.
2458 (unsuspend_one_lwp): New.
2459 (unsuspend_all_lwps): New.
2460 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2461 (send_sigstop_callback): Change return type to int, add new
2462 `except' parameter and handle it.
2463 (suspend_and_send_sigstop_callback): New.
2464 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2465 pass them down. If SUSPEND, also increment the lwp's suspend
2467 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2468 (need_step_over_p): Don't consider suspended LWPs.
2469 (start_step_over): Adjust.
2470 (proceed_one_lwp): Change return type to int, add new `except'
2471 parameter and handle it.
2472 (unsuspend_and_proceed_one_lwp): New.
2473 (proceed_all_lwps): Use find_inferior instead of
2475 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2476 also decrement the suspend count of LWPs. Pass `except' down,
2477 instead of hacking its suspend count.
2478 (linux_pause_all): Add `freeze' parameter. Adjust.
2479 (linux_unpause_all): New.
2480 (linux_target_ops): Install linux_unpause_all.
2481 * server.c (handle_status): Adjust.
2482 * target.h (struct target_ops): New fields `unpause_all' and
2483 `cancel_breakpoints'. Add new parameter to `pause_all'.
2484 (pause_all): Add new `freeze' parameter.
2486 (cancel_breakpoints): New.
2487 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2489 (cmd_qtstart): Pause threads.
2490 (stop_tracing): Pause threads, and cancel breakpoints.
2491 * win32-low.c (win32_target_ops): Adjust.
2493 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2495 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2496 the inferior right away from here...
2497 (linux_wait_1): ... to here, and adjust to check the thread's
2498 last_resume_kind instead of the lwp's step or stop_expected flags.
2500 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2502 * README: Use consistent `GDB' and `GDBserver' spellings.
2504 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2506 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2507 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2508 (linux_detach_one_lwp): Assume the lwp is stopped.
2509 (any_thread_of): Delete.
2510 (linux_detach): Stop all lwps here. Don't blindly delete all
2512 (delete_lwp_callback): New.
2513 (linux_mourn): Delete all lwps of the process that is gone.
2514 (linux_wait_1): Don't delete the last lwp of the process here.
2515 * mem-break.h (mark_breakpoints_out): Declare.
2516 * mem-break.c (mark_breakpoints_out): New.
2517 (free_all_breakpoints): Use it.
2518 * server.c (handle_target_event): If the process is gone, mark
2520 * thread-db.c (struct thread_db) <create_bp>: New field.
2521 (thread_db_enable_reporting): Fix prototype. Store a thread event
2522 breakpoint reference in the thread_db struct.
2523 (thread_db_load_search): Clear the thread_db object.
2524 (try_thread_db_load_1): Ditto.
2525 (switch_to_process): New.
2526 (disable_thread_event_reporting): Use it.
2527 (remove_thread_event_breakpoints): New.
2528 (thread_db_detach, thread_db_mourn): Use it.
2530 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2532 * linux-low.c (linux_enable_event_reporting): New.
2533 (linux_wait_for_event_1, handle_extended_wait): Use it.
2535 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2537 * linux-low.c (linux_kill_one_lwp, linux_kill)
2538 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2539 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2540 SIGSTOP even if the LWP is stopped.
2541 (send_sigstop_callback): New.
2542 (stop_all_lwps): Use send_sigstop_callback instead.
2543 (linux_resume_one_thread): Adjust.
2544 (proceed_one_lwp): Still proceed an LWP that the client has
2545 requested to stop, if we haven't reported it as stopped yet. Make
2546 sure that LWPs the client want stopped, have a pending SIGSTOP.
2548 2010-04-26 Doug Evans <dje@google.com>
2550 * server.c (handle_general_set): Make static.
2552 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2553 Print received char after testing for error/eof instead of before.
2554 (input_interrupt): Tweak comment.
2556 2010-04-23 Doug Evans <dje@google.com>
2558 * server.c (start_inferior): Print inferior argv if --debug.
2560 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2562 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2563 * nto-x86-low.c: Include server.h
2565 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2567 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2568 be consistent with other sources of this directory.
2569 (init_registers_amd64): Correct name of source file of this function
2572 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2574 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2577 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2579 * win32-i386-low.c: Add 64-bit support.
2580 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2581 (init_registers_amd64): Declare.
2582 (mappings): Add 64-bit version of array.
2583 (init_windows_x86): New function.
2584 (the_low_target): Change init_arch field to init_windows_x86.
2586 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2588 * win32-low.c: Adapt to support also 64-bit architecture.
2589 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2590 (get_image_name): Use SIZE_T type for local variable `done'.
2591 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2592 (toolhelp_get_dll_name): Idem.
2593 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2594 Use uintptr_t typecast to avoid warning.
2595 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2596 (handle_exception): Use phex_nz to avoid warning.
2597 (win32_wait): Remove unused local variable `process'.
2599 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2601 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2604 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2606 * configure.ac: Use `ws2_32' library for srv_mingw.
2607 * configure: Regenerate.
2608 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2609 * remote-utils.c: Likewise.
2611 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2613 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2614 if __x86_64__ is defined.
2616 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2618 * configure: Regenerate.
2620 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2622 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2623 * target.h (target_ops): New get_tib_address field.
2624 * win32-low.h (win32_thread_info): Add thread_local_base field.
2625 * win32-low.c (child_add_thread): Add tlb argument.
2626 Set thread_local_base field to TLB.
2627 (get_child_debug_event): Adapt to child_add_thread change.
2628 (win32_get_tib_address): New function.
2629 (win32_target_ops): Set get_tib_address field to
2630 win32_get_tib_address.
2631 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2633 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2635 * linux-low.c (linux_mourn): Also remove the process.
2636 * server.c (handle_target_event): Don't remove the process here.
2637 * nto-low.c (nto_mourn): New.
2638 (nto_target_ops): Install it.
2639 * spu-low.c (spu_mourn): New.
2640 (spu_target_ops): Install it.
2641 * win32-low.c (win32_mourn): New.
2642 (win32_target_ops): Install it.
2644 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2646 * server.h (buffer_xml_printf): Remove redundant `;'.
2648 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2650 * regcache.c (set_register_cache): Invalidate regcaches before
2651 changing the register cache layout.
2652 (regcache_invalidate_one): Allow a NULL regcache.
2653 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2654 regcaches before changing the register cache layout or the target
2657 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2659 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2660 variable warning on Linux/x86-64.
2662 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2664 GDBserver disconnected tracing support.
2666 * linux-low.c (linux_remove_process): Delete.
2667 (add_lwp): Don't set last_resume_kind here.
2668 (linux_kill): Use `mourn'.
2669 (linux_detach): Use `thread_db_detach', and `mourn'.
2671 (linux_attach_lwp_1): Adjust comment.
2672 (linux_attach): last_resume_kind moved the thread_info; adjust.
2673 (status_pending_p_callback): Adjust.
2674 (linux_wait_for_event_1): Adjust.
2675 (count_events_callback, select_singlestep_lwp_callback)
2676 (select_event_lwp_callback, cancel_breakpoints_callback)
2677 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2678 (proceed_one_lwp): Adjust.
2679 (linux_async): Add debug output.
2680 (linux_thread_stopped): New.
2681 (linux_pause_all): New.
2682 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2684 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2685 (thread_db_free): Delete declaration.
2686 (thread_db_detach, thread_db_mourn): Declare.
2687 * thread-db.c (thread_db_init): Use thread_db_mourn.
2688 (thread_db_free): Delete, split in two.
2689 (disable_thread_event_reporting): New.
2690 (thread_db_detach): New.
2691 (thread_db_mourn): New.
2693 * server.h (struct thread_info) <last_resume_kind>: New field.
2694 <attached>: Add comment.
2695 <gdb_detached>: New field.
2696 (handler_func): Change return type to int.
2697 (handle_serial_event, handle_target_event): Ditto.
2698 (gdb_connected): Declare.
2700 (disconnected_tracing): Declare.
2701 (stop_tracing): Declare.
2703 * server.c (handle_query) <qSupported>: Report support for
2704 disconnected tracing.
2705 (queue_stop_reply_callback): Account for running threads.
2706 (gdb_wants_thread_stopped): New.
2707 (gdb_wants_all_threads_stopped): New.
2708 (gdb_reattached_process): New.
2709 (handle_status): Clear the `gdb_detached' flag of all processes.
2710 In all-stop, stop all threads.
2711 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2712 (process_serial_event): If the remote connection breaks, or if an
2713 exit was forced with "monitor exit", force an event loop exit.
2714 Handle disconnected tracing on detach.
2715 (handle_serial_event): Adjust.
2716 (handle_target_event): If GDB isn't connected, forward events back
2717 to the inferior, unless the last process exited, in which case,
2718 exit gdbserver. Adjust interface.
2720 * remote-utils.c (remote_open): Don't block in accept. Instead
2721 register an event loop source on the listen socket file
2722 descriptor. Refactor bits into ...
2723 (listen_desc): ... this new global.
2724 (gdb_connected): ... this new function.
2725 (enable_async_notification): ... this new function.
2726 (handle_accept_event): ... this new function.
2727 (remote_close): Clear remote_desc.
2729 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2731 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2733 (mourn_inferior): Define.
2734 (target_process_qsupported): Avoid the dangling else problem.
2735 (thread_stopped): Define.
2736 (pause_all): Define.
2737 (target_waitstatus_to_string): Declare.
2738 * target.c (target_waitstatus_to_string): New.
2740 * tracepoint.c (tracing): Make extern.
2741 (disconnected_tracing): New.
2742 (stop_tracing): Make extern. Handle tracing stops due to GDB
2744 (cmd_qtdisconnected): New.
2745 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2746 (handle_tracepoint_general_set): Handle QTDisconnected.
2748 * event-loop.c (event_handler_func): Change return type to int.
2749 (process_event): Bail out if the event handler wants the event
2751 (handle_file_event): Ditto.
2752 (start_event_loop): Bail out if the event handler wants the event
2755 * nto-low.c (nto_target_ops): Adjust.
2756 * spu-low.c (spu_wait): Don't remove the process here.
2757 (spu_target_ops): Adjust.
2758 * win32-low.c (win32_wait): Don't remove the process here.
2759 (win32_target_ops): Adjust.
2761 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2763 * regcache.c (realloc_register_cache): Invalidate inferior's
2764 regcache before recreating it.
2766 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2768 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2770 2010-04-09 Stan Shebs <stan@codesourcery.com>
2771 Pedro Alves <pedro@codesourcery.com>
2773 * server.h (LONGEST): New.
2774 (struct thread_info) <while_stepping>: New field.
2775 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2777 (initialize_tracepoint, handle_tracepoint_general_set)
2778 (handle_tracepoint_query, tracepoint_finished_step)
2779 (tracepoint_was_hit, release_while_stepping_state_list):
2780 (current_traceframe): Declare.
2781 * server.c (handle_general_set): Handle tracepoint packets.
2783 (write_memory): New.
2784 (handle_search_memory_1): Use read_memory.
2785 (handle_query): Report support for conditional tracepoints, trace
2786 state variables, and tracepoint sources. Handle tracepoint
2788 (main): Initialize the tracepoints module.
2789 (process_serial_event): Handle traceframe reads/writes.
2791 * linux-low.c (handle_tracepoints): New.
2792 (linux_wait_1): Call it.
2793 (linux_resume_one_lwp): Handle while-stepping.
2794 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2795 (linux_target_ops): Install them.
2796 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2798 * linux-x86-low.c (x86_supports_tracepoints): New.
2799 (the_low_target). Install it.
2801 * mem-break.h (delete_breakpoint): Declare.
2802 * mem-break.c (delete_breakpoint): Make external.
2804 * target.h (struct target_ops): Add `supports_tracepoints',
2805 `read_pc', and `write_pc' fields.
2806 (target_supports_tracepoints): Define.
2807 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2810 * regcache.h (struct regcache) <registers_owned>: New field.
2811 (init_register_cache, regcache_cpy): Declare.
2812 (regcache_read_pc, regcache_write_pc): Declare.
2813 (register_cache_size): Declare.
2814 (supply_regblock): Declare.
2815 * regcache.c (init_register_cache): New.
2816 (new_register_cache): Use it.
2817 (regcache_cpy): New.
2818 (register_cache_size): New.
2819 (supply_regblock): New.
2820 (regcache_read_pc, regcache_write_pc): New.
2822 * tracepoint.c: New.
2824 * Makefile.in (OBS): Add tracepoint.o.
2825 (tracepoint.o): New rule.
2827 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2829 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2831 (i386-mmx.c): Likewise.
2832 (i386-mmx-linux.o): Likewise.
2833 (i386-mmx-linux.c): Likewise.
2835 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2836 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2837 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2838 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2840 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2841 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2842 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2844 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2846 * Makefile.in (clean): Updated.
2848 (i386-avx.c): Likewise.
2849 (i386-avx-linux.o): Likewise.
2850 (i386-avx-linux.c): Likewise.
2851 (amd64-avx.o): Likewise.
2852 (amd64-avx.c): Likewise.
2853 (amd64-avx-linux.o): Likewise.
2854 (amd64-avx-linux.c): Likewise.
2856 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2857 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2858 (srv_amd64_regobj): Add amd64-avx.o.
2859 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2860 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2861 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2862 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2863 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2864 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2865 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2867 * i387-fp.c: Include "i386-xstate.h".
2869 (i387_cache_to_xsave): Likewise.
2870 (i387_xsave_to_cache): Likewise.
2871 (x86_xcr0): Likewise.
2873 * i387-fp.h (i387_cache_to_xsave): Likewise.
2874 (i387_xsave_to_cache): Likewise.
2875 (x86_xcr0): Likewise.
2877 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2878 * linux-crisv32-low.c (target_regsets): Likewise.
2879 * linux-m68k-low.c (target_regsets): Likewise.
2880 * linux-mips-low.c (target_regsets): Likewise.
2881 * linux-ppc-low.c (target_regsets): Likewise.
2882 * linux-s390-low.c (target_regsets): Likewise.
2883 * linux-sh-low.c (target_regsets): Likewise.
2884 * linux-sparc-low.c (target_regsets): Likewise.
2885 * linux-xtensa-low.c (target_regsets): Likewise.
2887 * linux-low.c: Include <sys/uio.h>.
2888 (regsets_fetch_inferior_registers): Support nt_type.
2889 (regsets_store_inferior_registers): Likewise.
2890 (linux_process_qsupported): New.
2891 (linux_target_ops): Add linux_process_qsupported.
2893 * linux-low.h (regset_info): Add nt_type.
2894 (linux_target_ops): Add process_qsupported.
2896 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2898 (init_registers_i386_avx_linux): New.
2899 (init_registers_amd64_avx_linux): Likewise.
2900 (xmltarget_i386_linux_no_xml): Likewise.
2901 (xmltarget_amd64_linux_no_xml): Likewise.
2902 (PTRACE_GETREGSET): Likewise.
2903 (PTRACE_SETREGSET): Likewise.
2904 (x86_fill_xstateregset): Likewise.
2905 (x86_store_xstateregset): Likewise.
2906 (use_xml): Likewise.
2907 (x86_linux_update_xmltarget): Likewise.
2908 (x86_linux_process_qsupported): Likewise.
2909 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2910 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2911 init_registers_i386_linux here. Call
2912 x86_linux_update_xmltarget.
2913 (the_low_target): Add x86_linux_process_qsupported.
2915 * server.c (handle_query): Call target_process_qsupported.
2917 * target.h (target_ops): Add process_qsupported.
2918 (target_process_qsupported): New.
2920 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2922 * inferiors.c (add_thread): Set last_status kind to
2923 TARGET_WAITKIND_IGNORE.
2924 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2925 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2926 (linux_wait_1): Move `thread' local definition to block that uses
2927 it. Don't NULL initialize `event_child'.
2928 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2929 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2930 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2932 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2934 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2935 an extended waitstatus, or by a watchpoint.
2936 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2937 thread was stepping or has been stopped by a watchpoint.
2939 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2941 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2942 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2943 of another, then delete the previous, and validate all
2945 (validate_inserted_breakpoint): New.
2946 (delete_disabled_breakpoints): New.
2947 (validate_breakpoints): New.
2948 (check_mem_read): Validate breakpoints before trusting their
2949 shadow. Delete disabled breakpoints.
2950 (check_mem_write): Validate breakpoints before trusting they
2951 should be inserted. Delete disabled breakpoints.
2952 * mem-break.h (validate_breakpoints):
2953 * server.c (handle_query): Validate breakpoints when we see a
2956 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2958 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2959 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2960 if we could tell there's a GDB breakpoint at stop_pc.
2961 (need_step_over_p): Don't do a step over if we find a GDB
2962 breakpoint at the resume PC.
2964 * mem-break.c (struct raw_breakpoint): New.
2965 (enum bkpt_type): New type `gdb_breakpoint'.
2966 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2967 fields. New field `raw'.
2968 (find_raw_breakpoint_at): New.
2969 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2971 (set_breakpoint_at): Adjust.
2972 (delete_raw_breakpoint): New.
2973 (release_breakpoint): New.
2974 (delete_breakpoint): Rename to...
2975 (delete_breakpoint_1): ... this. Add proc parameter. Use
2976 release_breakpoint. Return ENOENT.
2977 (delete_breakpoint): Reimplement.
2978 (find_breakpoint_at): Delete.
2979 (find_gdb_breakpoint_at): New.
2980 (delete_breakpoint_at): Delete.
2981 (set_gdb_breakpoint_at): New.
2982 (delete_gdb_breakpoint_at): New.
2983 (gdb_breakpoint_here): New.
2984 (set_reinsert_breakpoint): Use release_breakpoint.
2985 (uninsert_breakpoint): Rename to ...
2986 (uninsert_raw_breakpoint): ... this.
2987 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2988 (reinsert_raw_breakpoint): Change parameter type to
2990 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2992 (check_breakpoints): Adjust. Use release_breakpoint.
2993 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2994 (breakpoint_inserted_here): Ditto.
2995 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2996 Don't trust the breakpoint's shadow if it is not inserted.
2997 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2998 (delete_all_breakpoints): Adjust.
2999 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3000 use delete_breakpoint_1.
3002 * mem-break.h (breakpoints_supported): Delete declaration.
3003 (set_gdb_breakpoint_at): Declare.
3004 (gdb_breakpoint_here): Declare.
3005 (delete_breakpoint_at): Delete.
3006 (delete_gdb_breakpoint_at): Declare.
3008 * server.h (struct raw_breakpoint): Forward declare.
3009 (struct process_info): New field `raw_breakpoints'.
3011 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3014 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3016 * linux-low.c (status_pending_p_callback): Fix comment.
3017 (linux_wait_for_event_1): Move most of the internal breakpoint
3018 handling from here...
3019 (linux_wait_1): ... to here.
3020 (count_events_callback): New.
3021 (select_singlestep_lwp_callback): New.
3022 (select_event_lwp_callback): New.
3023 (cancel_breakpoints_callback): New.
3024 (select_event_lwp): New.
3025 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3026 priority to all LWPs that have had events that should be reported
3027 to the client. Cancel breakpoints when about to reporting the
3028 event to the client, not while stopping lwps. No longer cancel
3029 finished single-steps here.
3030 (cancel_finished_single_step): Delete.
3031 (cancel_finished_single_steps): Delete.
3033 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3035 * mem-break.c (enum bkpt_type): New.
3036 (struct breakpoint): New field `type'.
3037 (set_breakpoint_at): Change return type to struct breakpoint
3038 pointer. Set type to `other_breakpoint' by default.
3039 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3040 in the breakpoint list.
3041 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3042 (reinsert_breakpoint): Rename to ...
3043 (reinsert_raw_breakpoint): ... this.
3044 (reinsert_breakpoints_at): Adjust.
3045 * mem-break.h (struct breakpoint): Declare.
3046 (set_breakpoint_at): Change return type to struct breakpoint
3049 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3051 * server.c (handle_query): Assign, not compare.
3053 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3055 Teach linux gdbserver to step-over-breakpoints.
3057 * linux-low.c (can_hardware_single_step): New.
3058 (supports_breakpoints): New.
3059 (handle_extended_wait): If stopping threads, read the stop pc of
3062 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3063 low target doesn't support retrieving the PC.
3064 (add_lwp): Set last_resume_kind to resume_continue.
3065 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3066 (linux_attach): Don't clear stop_expected. Set the lwp's
3067 last_resume_kind to resume_stop.
3068 (linux_detach_one_lwp): Don't check for removed breakpoints.
3069 (check_removed_breakpoint): Delete.
3070 (status_pending_p): Rename to ...
3071 (status_pending_p_callback): ... this. Don't check for removed
3072 breakpoints. Don't consider threads that are stopped from GDB's
3074 (linux_wait_for_lwp): Always read the stop_pc here.
3075 (cancel_breakpoint): New.
3076 (step_over_bkpt): New global.
3077 (linux_wait_for_event_1): Implement stepping over breakpoints.
3078 (gdb_wants_lwp_stopped): New.
3079 (gdb_wants_all_stopped): New.
3080 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3081 single-step traps here. Store the thread's last reported target
3083 (send_sigstop): Don't clear stop_expected. Always set it,
3085 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3086 (cancel_finished_single_step): New.
3087 (cancel_finished_single_steps): New.
3088 (wait_for_sigstop): Don't cancel finished single-step traps here.
3089 (linux_resume_one_lwp): Don't check for removed breakpoints.
3090 Don't set `step' on non-hardware step archs.
3091 (linux_set_resume_request): Ignore resume_stop requests if already
3092 stopping or stopped. Set the lwp's last_resume_kind.
3093 (resume_status_pending_p): Don't check for removed breakpoints.
3094 (need_step_over_p): New.
3095 (start_step_over): New.
3096 (finish_step_over): New.
3097 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3098 requests. Clear the thread's last reported target waitstatus.
3099 Don't use the `suspended' flag. Don't consider pending breakpoints.
3100 (linux_resume): Start a step-over if necessary.
3101 (proceed_one_lwp): New.
3102 (proceed_all_lwps): New.
3103 (unstop_all_lwps): New.
3104 * linux-low.h (struct lwp_info): Rewrite comment for the
3105 `suspended' flag. Add the `stop_pc' field. Delete the
3106 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3107 Add `'last_resume_kind' and `need_step_over' fields.
3108 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3109 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3110 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3111 (set_raw_breakpoint_at): New.
3112 (set_breakpoint_at): Rewrite to use it.
3113 (reinsert_breakpoint_handler): Delete.
3114 (set_reinsert_breakpoint): New.
3115 (reinsert_breakpoint_by_bp): Delete.
3116 (delete_reinsert_breakpoints): New.
3117 (uninsert_breakpoint): Rewrite.
3118 (uninsert_breakpoints_at): New.
3119 (reinsert_breakpoint): Rewrite.
3120 (reinsert_breakpoints_at): New.
3121 (check_breakpoints): Rewrite.
3122 (breakpoint_here): New.
3123 (breakpoint_inserted_here): New.
3124 (check_mem_read): Adjust.
3125 * mem-break.h (breakpoints_supported, breakpoint_here)
3126 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3127 (reinsert_breakpoint_by_bp): Delete declaration.
3128 (delete_reinsert_breakpoints): Declare.
3129 (reinsert_breakpoint): Delete declaration.
3130 (reinsert_breakpoints_at): Declare.
3131 (uninsert_breakpoint): Delete declaration.
3132 (uninsert_breakpoints_at): Declare.
3133 (check_breakpoints): Adjust prototype.
3134 * server.h: Adjust include order.
3135 (struct thread_info): Declare here. Add a `last_status' field.
3137 2010-03-23 Michael Snyder <msnyder@vmware.com>
3139 * server.c (crc32): New function.
3140 (handle_query): Add handling for 'qCRC:' request.
3142 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3144 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3145 lwp had been stopped by a watchpoint.
3147 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3149 * server.h (internal_error): Declare.
3150 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3151 * utils.c (internal_error): New function.
3153 2010-03-15 Andreas Schwab <schwab@redhat.com>
3155 * configure.srv: Fix typo setting srv_regobj.
3157 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3159 * linux-low.c (fetch_register): Avoid passing a non string literal
3161 (usr_store_inferior_registers): Ditto.
3163 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3165 * linux-low.c (linux_write_memory): Bail out early if peeking
3168 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3170 * linux-low.h (struct lwp_info): New fields
3171 `stopped_by_watchpoint' and `stopped_data_address'.
3172 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3173 here, and cache them in the lwp object.
3174 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3176 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3178 (linux_stopped_by_watchpoint): Rewrite.
3179 (linux_stopped_data_address): Rewrite.
3181 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3183 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3184 switching the current inferior, not before.
3186 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3188 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3189 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3190 i386-linux.c and amd64-linux.c.
3191 (reg-i386.o): Removed.
3192 (reg-i386.c): Likewise.
3193 (reg-i386-linux.o): Likewise.
3194 (reg-i386-linux.c): Likewise.
3195 (reg-x86-64.o): Likewise.
3196 (reg-x86-64.c): Likewise.
3197 (reg-x86-64-linux.o): Likewise.
3198 (reg-x86-64-linux.c): Likewise.
3201 (i386-linux.o): Likewise.
3202 (i386-linux.c): Likewise.
3203 (amd64.o): Likewise.
3204 (amd64.c): Likewise.
3205 (amd64-linux.o): Likewise.
3206 (amd64-linux.c): Likewise.
3208 * configure.srv (srv_i386_regobj): New.
3209 (srv_i386_linux_regobj): Likewise.
3210 (srv_amd64_regobj): Likewise.
3211 (srv_amd64_linux_regobj): Likewise.
3212 (srv_i386_32bit_xmlfiles): Likewise.
3213 (srv_i386_64bit_xmlfiles): Likewise.
3214 (srv_i386_xmlfiles): Likewise.
3215 (srv_amd64_xmlfiles): Likewise.
3216 (srv_i386_linux_xmlfiles): Likewise.
3217 (srv_amd64_linux_xmlfiles): Likewise.
3218 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3219 srv_xmlfiles to $srv_i386_xmlfiles.
3220 (i[34567]86-*-mingw32ce*): Likewise.
3221 (i[34567]86-*-mingw*): Likewise.
3222 (i[34567]86-*-nto*): Likewise.
3223 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3224 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3225 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3226 (x86_64-*-linux*): Likewise.
3228 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3229 (init_registers_amd64_linux): New.
3230 (x86_arch_setup): Replace init_registers_x86_64_linux with
3231 init_registers_amd64_linux.
3233 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3235 * configure.ac: Check for libdl. If it is not available link against
3236 static libthread_db.
3237 * configure: Regenerate.
3239 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3243 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3244 handing a read watchpoint.
3245 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3247 2010-02-12 Doug Evans <dje@google.com>
3249 * linux-low.c (linux_supports_tracefork_flag): Document.
3250 (linux_look_up_symbols): Add comment.
3252 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3254 * regcache.c (supply_register): Clear regcache if buf is NULL.
3256 2010-02-02 Nicolas Roche <roche@sourceware.org>
3257 Joel Brobecker <brobecker@adacore.com>
3259 * inferiors.c (find_inferior): Add function documentation.
3260 (unloaded_dll): Handle the case where the unloaded dll has not
3261 been previously registered in the dll list.
3263 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3265 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3266 (thumb2_breakpoint): New.
3267 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3269 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3271 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3272 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3275 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3277 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3279 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3281 * linux-s390-low.c (s390_collect_ptrace_register)
3282 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3284 2010-01-21 Doug Evans <dje@google.com>
3286 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3287 (PTRACE_ARG4_TYPE): New macro.
3288 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3289 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3290 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3291 (usr_store_inferior_registers): Ditto.
3292 (linux_read_memory, linux_write_memory): Ditto.
3293 (linux_test_for_tracefork): Ditto.
3295 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3296 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3298 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3300 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3303 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3305 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3306 prototype to take a regcache. Adjust.
3308 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3310 * regcache.h (struct thread_info): Forward declare.
3311 (struct regcache): New.
3312 (new_register_cache): Adjust prototype.
3313 (get_thread_regcache): Declare.
3314 (free_register_cache): Adjust prototype.
3315 (registers_to_string, registers_from_string): Ditto.
3316 (supply_register, supply_register_by_name, collect_register)
3317 (collect_register_as_string, collect_register_by_name): Ditto.
3318 * regcache.c (struct inferior_regcache_data): Delete.
3319 (get_regcache): Rename to ...
3320 (get_thread_regcache): ... this. Adjust. Switch inferior before
3322 (regcache_invalidate_one): Adjust.
3323 (regcache_invalidate): Fix prototype.
3324 (new_register_cache): Return the new register cache.
3325 (free_register_cache): Change prototype.
3326 (realloc_register_cache): Adjust.
3327 (registers_to_string): Change prototype to take a regcache. Adjust.
3328 (registers_from_string): Ditto.
3329 (register_data): Ditto.
3330 (supply_register): Ditto.
3331 (supply_register_by_name): Ditto.
3332 (collect_register): Ditto.
3333 (collect_register_as_string): Ditto.
3334 (collect_register_by_name): Ditto.
3335 * server.c (process_serial_event): Adjust.
3336 * linux-low.h (regset_fill_func, regset_store_func): Change
3338 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3340 * linux-low.c (get_stop_pc): Adjust.
3341 (check_removed_breakpoint): Adjust.
3342 (linux_wait_for_event): Adjust.
3343 (linux_resume_one_lwp): Adjust.
3344 (fetch_register): Add regcache parameter. Adjust.
3345 (usr_store_inferior_registers): Ditto.
3346 (regsets_fetch_inferior_registers): Ditto.
3347 (regsets_store_inferior_registers): Ditto.
3348 (linux_fetch_registers, linux_store_registers): Ditto.
3349 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3351 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3352 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3353 prototype to take a regcache.
3354 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3355 * remote-utils.c (convert_ascii_to_int, outreg)
3356 (prepare_resume_reply): Change prototype to take a regcache.
3358 * target.h (struct target_ops) <fetch_registers, store_registers>:
3359 Change prototype to take a regcache.
3360 (fetch_inferior_registers, store_inferior_registers): Change
3361 prototype to take a regcache. Adjust.
3362 * proc-service.c (ps_lgetregs): Adjust.
3363 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3364 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3365 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3366 take a regcache. Adjust.
3367 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3368 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3369 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3370 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3371 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3372 (cris_cannot_fetch_register):
3373 (cris_breakpoint_at): Change prototype to take a regcache.
3375 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3376 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3377 to take a regcache. Adjust.
3378 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3380 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3381 take a regcache. Adjust.
3382 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3383 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3384 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3385 * linux-mips-low.c (mips_get_pc):
3386 (mips_set_pc): Change prototype to take a regcache. Adjust.
3387 (mips_reinsert_addr): Adjust.
3388 (mips_collect_register): Change prototype to take a regcache.
3390 (mips_supply_register):
3391 (mips_collect_register_32bit, mips_supply_register_32bit)
3392 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3393 (mips_store_fpregset): Ditto.
3394 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3396 (parse_spufs_run): Adjust.
3397 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3398 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3399 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3400 take a regcache. Adjust.
3401 * linux-s390-low.c (s390_collect_ptrace_register)
3402 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3403 (s390_set_pc): Change prototype to take a regcache. Adjust.
3404 (s390_arch_setup): Adjust.
3405 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3406 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3407 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3408 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3409 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3411 (sparc_breakpoint_at): Adjust.
3412 * linux-xtensa-low.c (xtensa_fill_gregset):
3413 (xtensa_store_gregset):
3414 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3415 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3416 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3417 prototype to take a regcache. Adjust.
3418 * win32-arm-low.c (arm_fetch_inferior_register)
3419 (arm_store_inferior_register): Change prototype to take a
3421 * win32-i386-low.c (i386_fetch_inferior_register)
3422 (i386_store_inferior_register): Change prototype to take a
3424 * win32-low.c (child_fetch_inferior_registers)
3425 (child_store_inferior_registers): Change prototype to take a
3427 (win32_wait): Adjust.
3428 (win32_fetch_inferior_registers): Change prototype to take a
3430 (win32_store_inferior_registers): Adjust.
3431 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3432 store_inferior_register>: Change prototype to take a regcache.
3434 2010-01-20 Doug Evans <dje@google.com>
3436 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3438 (linux_wait_for_event1, linux_init_signals): Ditto.
3439 (W_STOPCODE): Provide definition if missing.
3441 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3443 * linux-low.c (linux_core_of_thread): New.
3444 (compare_ints, show_process, list_threads): New.
3445 (linux_qxfer_osdata): Report threads and cores.
3446 (linux_target_op): Register linux_core_of_thread.
3447 * remote-utils.c (prepare_resume_reply): Report the core.
3448 (buffer_xml_printf): Support %d specifier.
3449 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3451 (handle_query): Handle qXfer:threads. Announce availability
3453 * target.h (struct target_ops): New field core_of_thread.
3455 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3457 * Makefile.in (clean): Remove new generated files.
3458 (reg-s390.o, reg-s390.c): Remove rules.
3459 (reg-s390x.o, reg-s390x.c): Likewise.
3460 (s390-linux32.o, s390-linux32.c): Add rules.
3461 (s390-linux64.o, s390-linux64.c): Likewise.
3462 (s390x-linux64.o, s390x-linux64.c): Likewise.
3463 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3464 * linux-s390-low.c: Include <elf.h>.
3465 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3466 (init_registers_s390): Remove prototype.
3467 (init_registers_s390x): Likewise.
3468 (init_registers_s390_linux32): Add prototype.
3469 (init_registers_s390_linux64): Likewise.
3470 (init_registers_s390x_linux64): Likewise.
3471 (s390_num_regs_3264): New define.
3472 (s390_regmap_3264): New global variable.
3473 (s390_cannot_fetch_register): Remove obsolete check.
3474 (s390_cannot_store_register): Likewise.
3475 (s390_collect_ptrace_register): Handle upper/lower register halves.
3476 (s390_supply_ptrace_register): Likewise.
3477 (s390_fill_gregset): Update to register number changes.
3478 (s390_get_hwcap): New routine.
3479 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3480 Install appropriate regmap and register set.
3482 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3484 * server.c (gdbserver_version): Update copyright year to 2010.
3485 * gdbreplay.c (gdbreplay_version): Likewise.
3487 2009-12-28 Doug Evans <dje@google.com>
3489 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3490 elf/external.h. Include <elf.h> instead but only if necessary.
3492 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3494 * linux-low.c (linux_remove_process): Remove `detaching'
3495 parameter. Don't release/detach from thread_db here.
3496 (linux_kill): Release/detach from thread_db here, ...
3497 (linux_detach): ... and here, before actually detaching.
3498 (linux_wait_1): ... and here, when a process exits.
3499 * thread-db.c (any_thread_of): New.
3500 (thread_db_free): Switch the current inferior to a thread of the
3503 2009-12-21 Doug Evans <dje@google.com>
3505 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3507 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3508 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3509 warning ifndef __NR_tkill. Move setting of errno there too.
3510 Delete unnecessary resetting of errno after syscall.
3511 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3513 * configure.ac: Check for dladdr.
3514 * config.in: Regenerate.
3515 * configure: Regenerate.
3516 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3517 (try_thread_db_load): Update.
3519 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3521 2009-12-18 Doug Evans <dje@google.com>
3523 * event-loop.c: Include unistd.h if it exists.
3525 * linux-low.c (my_waitpid): Move definition away from being in
3526 between linux_tracefork_child/linux_test_for_tracefork.
3528 * gdb_proc_service.h (psaddr_t): Fix type.
3529 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3530 signature to match glibc.
3532 2009-12-16 Doug Evans <dje@google.com>
3534 * linux-low.c (linux_read_memory): Fix argument to read.
3536 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3538 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3539 events, don't leave current_inferior pointing at null.
3541 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3543 * win32-low.c (LOG): Delete.
3544 (OUTMSG): Output to stderr.
3545 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3546 on compile time LOG macro.
3547 (win32_wait): Fix debug output.
3549 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3551 * win32-low.c (win32_add_one_solib): If the dll name is
3552 "ntdll.dll", prepend the system directory to the dll path.
3554 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3556 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3558 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3559 Vladimir Prus <vladimir@codesourcery.com>
3561 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3562 * configure.ac: Check for __mcoldfire__ and set
3563 gdb_cv_m68k_is_coldfire.
3564 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3565 reg-cf.o and reg-m68k.o.
3566 * configure: Regenerated.
3568 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3570 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3571 Pass it to thread_db_free.
3572 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3573 proper `detaching' argument to linux_remove_process.
3574 * linux-low.h (thread_db_free): Add `detaching' parameter.
3575 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3577 (thread_db_free): Add `detaching' parameter. Only
3578 call td_ta_clear_event if detaching from process.
3580 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3582 * thread-db.c (thread_db_free): Fix typo.
3584 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3587 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3589 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3591 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3592 with an i686 compiler.
3593 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3595 * configure: Rebuilt.
3597 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3601 * server.c (handle_search_memory_1): Correct read_addr initialization
3602 in loop for searching subsequent chunks.
3604 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3606 * configure.ac: New --with-libthread-db option.
3607 * thread-db.c: Allow direct dependence on libthread_db.
3608 (thread_db_free): Adjust.
3609 * config.in: Regenerate.
3610 * configure: Likewise.
3612 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3615 * thread-db.c (attach_thread): New function.
3616 (maybe_attach_thread): Return success/failure.
3617 (find_new_threads_callback): Adjust.
3618 (thread_db_find_new_threads): Loop until no new threads.
3620 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3622 * proc-service.c (ps_lgetregs): Formatting.
3624 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3626 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3627 * configure.ac: Adjust.
3628 * linux-low.h (struct process_info_private): Move members to struct
3630 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3631 * linux-low.c (linux_remove_process): Adjust.
3632 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3633 * server.c (handle_query): Move code ...
3634 (handle_monitor_command): ... here. New function.
3635 * target.h (struct target_ops): New member.
3636 * thread-db.c (struct thread_db): New.
3637 (libthread_db_search_path): New variable.
3638 (thread_db_create_event, thread_db_enable_reporting)
3639 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3640 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3641 (try_thread_db_load_1, dladdr_to_soname): New functions.
3642 (try_thread_db_load, thread_db_load_search): New functions.
3643 (thread_db_init): Search for libthread_db.
3644 (thread_db_free): New function.
3645 (thread_db_handle_monitor_command): Likewise.
3646 * config.in: Regenerate.
3647 * configure: Regenerate.
3649 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3651 * spu-low.c (spu_kill): Wait for inferior to terminate.
3652 Call clear_inferiors.
3653 (spu_detach): Call clear_inferiors.
3655 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3657 * aclocal.m4: Regenerate.
3658 * config.in: Likewise.
3659 * configure: Likewise.
3661 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3663 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3664 (parse_spufs_run): New function.
3665 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3666 (ppc_breakpoint_at): Handle SPU breakpoints.
3668 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3670 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3671 (SPUFS_MAGIC): Define.
3672 (spu_enumerate_spu_ids): New function.
3673 (linux_qxfer_spu): New function.
3674 (linux_target_ops): Install linux_qxfer_spu.
3676 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3678 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3679 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3680 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3681 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3682 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3683 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3684 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3685 (init_registers_powerpc_cell32l): Add prototype.
3686 (init_registers_powerpc_cell64l): Likewise.
3687 (ppc_arch_setup): Detect Cell/B.E. architecture.
3689 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3691 * Makefile.in (datarootdir): New variable.
3693 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3695 * linux-low.c (linux_write_memory): Update debugging output.
3696 * Makefile.in (clean): Add new descriptions.
3697 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3698 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3699 * configure.srv: Add new files for arm*-*-linux*.
3700 * linux-arm-low.c: Add new declarations.
3701 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3702 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3703 (HWCAP_VFPv3D16): New.
3704 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3705 instead of __IWMMXT__.
3706 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3707 (arm_arch_setup): New.
3708 (target_regsets): Remove #ifdef. Add VFP regset.
3709 (the_low_target): Use arm_arch_setup.
3711 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3713 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3714 the main thread again.
3716 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3718 Adding Neutrino gdbserver.
3719 * configure: Regenerated.
3720 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3721 * configure.srv (i[34567]86-*-nto*): New target.
3722 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3723 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3724 (nto_comctrl) [__QNX__]: New function.
3725 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3727 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3729 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3732 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3733 Pedro Alves <pedro@codesourcery.com>
3735 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3736 don't support CONTEXT_EXTENDED_REGISTERS.
3737 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3738 (the_low_target): Install them.
3739 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3740 failing with ERROR_PIPE_NOT_CONNECTED.
3742 2009-06-30 Doug Evans <dje@google.com>
3743 Pierre Muller <muller@ics.u-strasbg.fr>
3745 Add h/w watchpoint support to x86-linux, win32-i386.
3746 * Makefile.in (SFILES): Add i386-low.c
3747 (i386_low_h): Define.
3748 (i386-low.o): Add dependencies.
3749 (linux-x86-low.o): Add i386-low.h dependency.
3750 (win32-i386-low.o): Ditto.
3751 * i386-low.c: New file.
3752 * i386-low.h: New file.
3753 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3754 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3755 * linux-low.c (linux_add_process): Initialize arch_private.
3756 (linux_remove_process): Free arch_private.
3757 (add_lwp): Initialize arch_private.
3758 (delete_lwp): Free arch_private.
3759 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3761 * linux-low.h (process_info_private): New member arch_private.
3762 (lwp_info): New member arch_private.
3763 (linux_target_ops): New members new_process, new_thread,
3765 (ptid_of): New macro.
3766 * linux-x86-low.c: Include stddef.h, i386-low.h.
3767 (arch_process_info): New struct.
3768 (arch_lwp_info): New struct.
3769 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3770 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3771 (i386_dr_low_get_status): New function.
3772 (x86_insert_point, x86_remove_point): New functions.
3773 (x86_stopped_by_watchpoint): New function.
3774 (x86_stopped_data_address): New function.
3775 (x86_linux_new_process, x86_linux_new_thread): New functions.
3776 (x86_linux_prepare_to_resume): New function.
3777 (the_low_target): Add entries for insert_point, remove_point,
3778 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3780 * server.c (debug_hw_points): New global.
3781 (monitor_show_help): Document set debug-hw-points.
3782 (handle_query): Process "set debug-hw-points".
3783 * server.h (debug_hw_points): Declare.
3784 (paddress): Declare.
3785 * utils.c (NUMCELLS, CELLSIZE): New macros.
3786 (get_sell, xsnprintf, paddress): New functions.
3787 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3788 remove_point, stopped_by_watchpoint, stopped_data_address.
3789 * win32-i386-low.c: Include i386-low.h.
3790 (debug_reg_state): Replaces dr.
3791 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3792 (i386_dr_low_get_status): New function.
3793 (i386_insert_point, i386_remove_point): New functions.
3794 (i386_stopped_by_watchpoint): New function.
3795 (i386_stopped_data_address): New function.
3796 (i386_initial_stuff): Update.
3797 (get_thread_context,set_thread_context,i386_thread_added): Update.
3798 (the_low_target): Add entries for insert_point,
3799 remove_point, stopped_by_watchpoint, stopped_data_address.
3800 * win32-low.c (win32_insert_watchpoint): New function.
3801 (win32_remove_watchpoint): New function.
3802 (win32_stopped_by_watchpoint): New function.
3803 (win32_stopped_data_address): New function.
3804 (win32_target_ops): Add entries for insert_watchpoint,
3805 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3806 * win32-low.h (win32_target_ops): New members insert_point,
3807 remove_point, stopped_by_watchpoint, stopped_data_address.
3809 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3811 * server.c (process_serial_event): Re-return unsupported, not
3812 error, if the type isn't recognized. Re-allow supporting only
3813 insert or remove packets. Also call require_running for
3814 breakpoints. Add missing break statement to default case. Tidy.
3815 * target.h (struct target_ops): Rename insert_watchpoint to
3816 insert_point, and remove_watchpoint to remove_point.
3818 * linux-low.h (struct linux_target_ops): Likewise.
3819 * linux-low.c (linux_insert_watchpoint): Rename to ...
3820 (linux_insert_point): ... this. Adjust.
3821 (linux_remove_watchpoint): Rename to ...
3822 (linux_remove_point): ... this. Adjust.
3823 (linux_target_ops): Adjust.
3824 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3825 (cris_insert_point): ... this.
3826 (cris_remove_watchpoint): Rename to ...
3827 (cris_remove_point): ... this.
3828 (the_low_target): Adjust.
3830 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3832 * server.c (handle_v_kill): Pass signal_pid to
3833 kill_inferior if multi_process is zero.
3835 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3837 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3838 * target.h (target_ops): Comment for *_watchpoint to make it clear
3839 the functions can get types '0' and '1'.
3841 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3843 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3844 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3845 * regcache.c (get_regcache): Likewise.
3846 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3847 * win32-low.c (child_fetch_inferior_registers): Remove check for
3850 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3851 Pedro Alves <pedro@codesourcery.com>
3853 * target.h (struct target_ops) <supports_multi_process>: New
3855 (target_supports_multi_process): New.
3856 * server.c (handle_query): Even if GDB reports support, only
3857 enable multi-process if the target also supports it. Report
3858 multi-process support only if the target backend supports it.
3859 * linux-low.c (linux_supports_multi_process): New function.
3860 (linux_target_ops): Install it as target_supports_multi_process
3863 2009-05-24 Doug Evans <dje@google.com>
3865 Global renaming of find_thread_pid to find_thread_ptid.
3866 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3867 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3868 All callers updated.
3870 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3871 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3874 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3875 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3876 (linux_resume_one_lwp): Ditto.
3878 2009-05-23 Doug Evans <dje@google.com>
3880 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3881 from struct inferior_list_entry * to struct lwp_info *.
3882 All callers updated.
3884 2009-05-13 Doug Evans <dje@google.com>
3886 * linux-x86-low.c: Don't include assert.h.
3887 (x86_siginfo_fixup): Use fatal, not assert.
3888 (x86_arch_setup): Fix comment.
3890 2009-05-12 Doug Evans <dje@google.com>
3892 Biarch support for i386/amd64 gdbserver.
3893 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3894 Add linux-x86-low.c.
3895 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3896 (linux-x86-low.o): Add.
3897 * linux-x86-64-low.c: Delete.
3898 * linux-i386-low.c: Delete.
3899 * linux-x86-low.c: New file.
3900 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3902 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3904 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3905 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3906 (linux_child_pid_to_exec_file): New function.
3907 (elf_64_header_p, elf_64_file_p): New functions.
3908 (siginfo_fixup): New function.
3909 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3910 give target a chance to convert layout.
3911 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3912 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3914 2009-05-07 Doug Evans <dje@google.com>
3916 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3917 (regsets_store_inferior_registers): Ditto.
3919 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3923 * linux-low.c (must_set_ptrace_flags): Delete.
3924 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3926 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3927 `lwp->must_set_ptrace_flags' instead.
3928 (linux_wait_for_event_1): Set ptrace options here.
3929 (linux_wait_1): ... not here.
3931 2009-04-30 Doug Evans <dje@google.com>
3933 * inferiors.c (started_inferior_callback): New function.
3934 (attached_inferior_callback): New function.
3935 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3936 * server.c (print_started_pid, print_attached_pid): New functions.
3937 (detach_or_kill_for_exit): New function.
3938 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3939 * server.h (have_started_inferiors_p): Declare.
3940 (have_attached_inferiors_p): Declare.
3942 * inferiors.c (remove_process): Fix memory leak, free process.
3943 * linux-low.c (linux_remove_process): New function.
3944 (linux_kill): Call it instead of remove_process.
3945 (linux_detach, linux_wait_1): Ditto.
3947 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3949 * configure.srv: Add x86 Windows CE target.
3951 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3953 * inferiors.c (get_thread_process): Make global.
3954 * server.h (get_thread_process): Add prototype.
3955 * thread-db.c (find_one_thread): Use get_thread_process
3956 instead of current_process.
3957 (thread_db_get_tls_address): Do not crash if called when
3958 thread layer is not yet initialized.
3960 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3962 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3963 * spu-low.c (current_tid): Rename to ...
3964 (current_ptid): ... this.
3965 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3966 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3967 ptid_get_lwp (current_ptid) instead of current_tid.
3968 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3969 instead of current_tid. Use find_process_pid to verify pid
3970 argument is valid. Pass proper argument to remove_process.
3971 (spu_thread_alive): Compare current_ptid instead of current_tid.
3972 (spu_resume): Likewise.
3974 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3976 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3979 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3981 Implement the multiprocess extensions, and add linux multiprocess
3984 * server.h (ULONGEST): Declare.
3985 (struct ptid, ptid_t): New.
3986 (minus_one_ptid, null_ptid): Declare.
3987 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3988 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3989 (struct inferior_list_entry): Change `id' type from unsigned from
3991 (struct sym_cache, struct breakpoint, struct
3992 process_info_private): Forward declare.
3993 (struct process_info): Declare.
3994 (current_process): Declare.
3995 (all_processes): Declare.
3996 (initialize_inferiors): Declare.
3997 (add_thread): Adjust to use ptid_t.
3998 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3999 (add_process, remove_process, find_thread_pid): Declare.
4000 (find_inferior_id): Adjust to use ptid_t.
4001 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4002 (multi_process): Declare.
4003 (push_event): Adjust to use ptid_t.
4004 (read_ptid, write_ptid): Declare.
4005 (prepare_resume_reply): Adjust to use ptid_t.
4006 (clear_symbol_cache): Declare.
4007 * inferiors.c (all_processes): New.
4008 (null_ptid, minus_one_ptid): New.
4009 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4010 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4011 (add_thread): Change unsigned long to ptid. Remove gdb_id
4013 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4014 (gdb_id_to_thread): Rename to ...
4015 (find_thread_pid): ... this. Change unsigned long to ptid.
4016 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4017 (loaded_dll, pull_pid_from_list): Adjust.
4018 (add_process, remove_process, find_process_pid)
4019 (get_thread_process, current_process, initialize_inferiors): New.
4020 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4021 (struct target_waitstatus) <related_pid>: Ditto.
4022 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4024 (struct target_ops) <join>: Add `pid' argument.
4025 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4026 (struct target_ops) <wait>: Add `ptid' field. Change return type
4028 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4029 (mywait): Add `ptid' argument. Change return type to ptid_t.
4030 (target_pid_to_str): Declare.
4031 * target.c (set_desired_inferior): Adjust to use ptids.
4032 (mywait): Add new `ptid' argument. Adjust.
4033 (target_pid_to_str): New.
4034 * mem-break.h (free_all_breakpoints): Declare.
4035 * mem-break.c (breakpoints): Delelete.
4036 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4037 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4038 to use per-process breakpoint list.
4039 (free_all_breakpoints): New.
4040 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4041 (symbol_cache, all_symbols_looked_up): Delete.
4043 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4045 (prepare_resume_reply): Change ptid argument's type from unsigned
4046 long to ptid_t. Adjust. Implement W;process and X;process.
4047 (free_sym_cache, clear_symbol_cache): New.
4048 (look_up_one_symbol): Adjust to per-process symbol cache. *
4049 * server.c (cont_thread, general_thread, step_thread): Change type
4052 (multi_process): New.
4053 (last_ptid): Change type to ptid_t.
4054 (struct vstop_notif) <ptid>: Change type to ptid_t.
4055 (queue_stop_reply, push_event): Change `ptid' argument's type to
4057 (discard_queued_stop_replies): Add `pid' argument.
4058 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4059 changes. Don't reference the `attached' global.
4060 (attach_inferior): Adjust to mywait interface changes.
4061 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4062 features. Handle and report "multiprocess+". Handle
4064 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4066 (handle_v_kill): New.
4067 (handle_v_stopped): Adjust to use target_pid_to_str.
4068 (handle_v_requests): Allow multiple attaches and runs when
4069 multiprocess extensions are in effect. Handle "vKill".
4070 (myresume): Adjust to use ptids.
4071 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4072 (handle_status): Adjust to discard_queued_stop_replies interface
4074 (first_thread_of, kill_inferior_callback)
4075 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4076 (main): Call initialize_inferiors. Adjust to use ptids, killing
4077 and detaching from all inferiors. Handle multiprocess packet
4079 * linux-low.h: Include gdb_proc_service.h.
4080 (struct process_info_private): New.
4081 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4082 <lwpid_of>: Use ptid_get_lwp.
4083 (get_lwp_thread): Adjust.
4084 (struct lwp_info): Add `dead' member.
4085 (find_lwp_pid): Declare.
4086 * linux-low.c (thread_db_active): Delete.
4087 (new_inferior): Adjust comment.
4088 (inferior_pid): Delete.
4089 (linux_add_process): New.
4090 (handle_extended_wait): Adjust.
4091 (add_lwp): Change unsigned long to ptid.
4092 (linux_create_inferior): Add process to processes table. Adjust
4093 to use ptids. Don't set new_inferior here.
4094 (linux_attach_lwp): Rename to ...
4095 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4096 it. Adjust to use ptids.
4097 (linux_attach_lwp): New.
4098 (linux_attach): Add process to processes table. Don't set
4100 (struct counter): New.
4101 (second_thread_of_pid_p, last_thread_of_process_p): New.
4102 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4104 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4105 processes. Remove process from process table.
4106 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4107 to multiple processes.
4108 (any_thread_of): New.
4109 (linux_detach): Add `pid' argument, and handle it. Remove process
4110 from processes table.
4111 (linux_join): Add `pid' argument. Handle it.
4112 (linux_thread_alive): Change unsighed long argument to ptid_t.
4113 Consider dead lwps as not being alive.
4114 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4115 threads we're not interested in.
4116 (same_lwp, find_lwp_pid): New.
4117 (linux_wait_for_lwp): Change `pid' argument's type from int to
4119 (linux_wait_for_event): Rename to ...
4120 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4121 from int to ptid_t. Adjust.
4122 (linux_wait_for_event): New.
4123 (linux_wait_1): Add `ptid' argument. Change return type to
4124 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4125 that exit from the process table.
4126 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4128 (mark_lwp_dead): New.
4129 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4130 stopping all threads, mark its main lwp as dead.
4131 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4133 (fetch_register, usr_store_inferior_registers)
4134 (regsets_fetch_inferior_registers)
4135 (regsets_store_inferior_registers, linux_read_memory)
4136 (linux_write_memory): Inline `inferior_pid'.
4137 (linux_look_up_symbols): Adjust to use per-process
4139 (linux_request_interrupt): Adjust to use ptids.
4140 (linux_read_auxv): Inline `inferior_pid'.
4141 (initialize_low): Don't reference thread_db_active.
4142 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4143 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4144 (ps_getpid): Return the pid of the current inferior.
4145 * thread-db.c (proc_handle, thread_agent): Delete.
4146 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4148 (find_one_thread): Change argument type to ptid_t. Adjust to
4150 (maybe_attach_thread): Adjust to per-process data and ptids.
4151 (thread_db_find_new_threads): Ditto.
4152 (thread_db_init): Ditto.
4153 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4154 processes table. Adjust to use ptids.
4155 (spu_kill, spu_detach): Adjust interface. Remove process from
4157 (spu_join, spu_thread_alive): Adjust interface.
4158 (spu_wait): Adjust interface. Remove process from processes
4159 table. Adjust to use ptids.
4160 * win32-low.c (current_inferior_tid): Delete.
4161 (current_inferior_ptid): New.
4162 (debug_event_ptid): New.
4163 (thread_rec): Take a ptid. Adjust.
4164 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4165 (child_delete_thread): Ditto.
4166 (do_initial_child_stuff): Add `attached' argument. Add process to
4168 (child_fetch_inferior_registers, child_store_inferior_registers):
4170 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4171 (win32_attach): Pass 1 to do_initial_child_stuff.
4172 (win32_kill): Adjust interface. Remove process from processes
4174 (win32_detach): Ditto.
4175 (win32_join): Adjust interface.
4176 (win32_thread_alive): Take a ptid.
4177 (win32_resume): Adjust to use ptids.
4178 (get_child_debug_event): Ditto.
4179 (win32_wait): Adjust interface. Remove exiting process from
4182 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4184 Non-stop mode support.
4186 * server.h (non_stop): Declare.
4187 (gdb_client_data, handler_func): Declare.
4188 (delete_file_handler, add_file_handler, start_event_loop):
4190 (handle_serial_event, handle_target_event, push_event)
4191 (putpkt_notif): Declare.
4192 * target.h (enum resume_kind): New.
4193 (struct thread_resume): Replace `step' field by `kind' field.
4194 (TARGET_WNOHANG): Define.
4195 (struct target_ops) <wait>: Add `options' argument.
4196 <supports_non_stop, async, start_non_stop>: New fields.
4197 (target_supports_non_stop, target_async): New.
4198 (start_non_stop): Declare.
4199 (mywait): Add `options' argument.
4200 * target.c (mywait): Add `options' argument. Print child exit
4202 (start_non_stop): New.
4203 * server.c (non_stop, own_buf, mem_buf): New globals.
4204 (struct vstop_notif): New.
4205 (notif_queue): New global.
4206 (queue_stop_reply, push_event, discard_queued_stop_replies)
4207 (send_next_stop_reply): New.
4208 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4210 (attach_inferior): In non-stop mode, don't wait for the target
4212 (handle_general_set): Handle QNonStop.
4213 (handle_query): When handling qC, return the current general
4214 thread, instead of the first thread of the list.
4215 (handle_query): If the backend supports non-stop mode, include
4216 QNonStop+ in the qSupported query response.
4217 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4219 (handle_v_attach, handle_v_run): Handle non-stop mode.
4220 (handle_v_stopped): New.
4221 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4222 (myresume): Adjust to use resume_kind. Handle non-stop.
4223 (queue_stop_reply_callback): New.
4224 (handle_status): Handle non-stop mode.
4225 (main): Clear non_stop flag on reconnection. Use the event-loop.
4226 Refactor serial protocol handling from here ...
4227 (process_serial_event): ... to this new function. When GDB
4228 selects any thread, select one here. In non-stop mode, wait until
4229 GDB acks all pending events before exiting.
4230 (handle_serial_event, handle_target_event): New.
4231 * remote-utils.c (remote_open): Install remote_desc in the event
4233 (remote_close): Remove remote_desc from the event loop.
4234 (putpkt_binary): Rename to...
4235 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4236 (putpkt_binary): New as wrapper around putpkt_binary_1.
4237 (putpkt_notif): New.
4238 (prepare_resume_reply): In non-stop mode, don't change the
4240 * event-loop.c: New.
4241 * Makefile.in (OBJ): Add event-loop.o.
4242 (event-loop.o): New rule.
4244 * linux-low.h (pid_of): Moved here.
4246 (get_lwp_thread): Use lwpid_of.
4247 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4248 * linux-low.c (pid_of): Delete.
4249 (inferior_pid): Use lwpid_of.
4250 (linux_event_pipe): New.
4251 (target_is_async_p): New.
4253 (handle_extended_wait): Use lwpid_of.
4254 (add_lwp): Don't set lwpid field.
4255 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4256 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4257 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4258 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4259 first. Adjust to linux_wait_for_event interface changes. Use
4261 (linux_detach): Don't delete the main lwp here.
4262 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4263 (status_pending_p): Don't consider explicitly suspended lwps.
4264 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4265 pointer. Add OPTIONS argument. Change return type to int. Use
4266 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4267 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4268 pointer. Add status pointer argument. Return a pid instead of a
4269 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4270 changes. In non-stop mode, don't switch to a random thread.
4271 (linux_wait): Rename to...
4272 (linux_wait_1): ... this. Add target_options argument, and handle
4273 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4274 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4275 clean exit and signal exit code. Don't stop all threads in
4276 non-stop mode. In all-stop mode, only stop all threads when
4277 reporting a stop to GDB. Handle explicit thread stop requests.
4278 (async_file_flush, async_file_mark): New.
4280 (send_sigstop): Use lwpid_of.
4281 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4282 interface changes. In non-stop mode, don't switch to a random
4284 (linux_resume_one_lwp): Use lwpid_of.
4285 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4286 (linux_resume_one_thread): ... this. Handle resume_stop. In
4287 non-stop mode, don't look for pending flag in all threads.
4288 (resume_status_pending_p): Don't consider explicitly suspended
4290 (my_waitpid): Reimplement. Emulate __WALL.
4291 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4293 (sigchld_handler, linux_supports_non_stop, linux_async)
4294 (linux_start_non_stop): New.
4295 (linux_target_ops): Register linux_supports_non_stop, linux_async
4296 and linux_start_non_stop.
4297 (initialize_low): Install SIGCHLD handler.
4298 * thread-db.c (thread_db_create_event, find_one_thread)
4299 (thread_db_get_tls_address): Use lwpid_of.
4300 * win32-low.c (win32_detach): Adjust to use resume_kind.
4301 (win32_wait): Add `options' argument.
4302 * spu-low.c (spu_resume): Adjust to use resume_kind.
4303 (spu_wait): Add `options' argument.
4305 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4307 Decouple target code from remote protocol.
4309 * target.h (enum target_waitkind): New.
4310 (struct target_waitstatus): New.
4311 (struct target_ops) <wait>: Return an unsigned long. Take a
4312 target_waitstatus pointer instead of a char pointer.
4314 * target.c (mywait): Change prototype to return an unsigned long.
4315 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4316 * server.h (thread_from_wait, old_thread_from_wait): Delete
4318 (prepare_resume_reply): Change prototype to take a
4320 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4321 (last_status, last_ptid): New.
4322 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4323 pid instead of a signal.
4324 (attach_inferior): Remove "status" and "signal" parameters.
4326 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4328 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4329 (handle_v_requests, myresume): Remove "status" and "signal"
4331 (handle_status): New.
4332 (main): Delete local `status'. Adjust.
4333 * remote-utils.c: Include target.h.
4334 (prepare_resume_reply): Change prototype to take a
4335 target_waitstatus. Adjust.
4337 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4339 * spu-low.c (spu_wait): Adjust.
4340 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4342 (win32_wait): Adjust.
4344 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4346 * target.h (struct thread_resume): Delete leave_stopped member.
4347 (struct target_ops): Add a `n' argument to the `resume' callback.
4348 * server.c (start_inferior): Adjust.
4349 (handle_v_cont, myresume): Adjust.
4350 * linux-low.c (check_removed_breakpoint): Adjust to resume
4351 interface change, and to removed leave_stopped field.
4352 (resume_ptr): Delete.
4353 (struct thread_resume_array): New.
4354 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4355 resume interface change.
4356 (linux_continue_one_thread, linux_queue_one_thread)
4357 (resume_status_pending_p): Check if the resume field is NULL
4358 instead of checking the leave_stopped member.
4359 (linux_resume): Adjust to the target resume interface change.
4360 * spu-low.c (spu_resume): Adjust to the target resume interface
4362 * win32-low.c (win32_detach, win32_resume): Ditto.
4364 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4366 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4368 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4370 (linux_continue_one_thread): Only preserve the stepping flag if
4371 there's a pending breakpoint.
4373 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4375 * server.c (main): After the inferior having exited, call
4376 remote_close before exiting gdbserver.
4378 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4380 Fix size of FPSCR in Power 7 processors.
4381 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4382 (PPC_FEATURE_HAS_DFP): New #define.
4383 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4386 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4388 * server.c (handle_query) Whitespace and formatting.
4390 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4392 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4393 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4394 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4395 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4396 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4397 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4398 Makefile.in, configure.ac: Fix whitespace throughout.
4399 * configure: Regenerate.
4401 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4403 * inferiors.c (find_inferior): Make it safe for the callback
4404 function to delete the currently iterated inferior.
4406 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4408 * Makefile.in (linuw_low_h): Move higher.
4409 (thread-db.o): Depend on $(linux_low_h).
4411 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4413 Rename "process" to "lwp" throughout.
4415 * linux-low.c (all_processes): Rename to...
4416 (all_lwps): ... this.
4417 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4418 (add_process): Rename to ...
4419 (add_lwp): ... this. Adjust.
4420 (linux_create_inferior): Adjust.
4421 (linux_attach_lwp): Adjust.
4422 (linux_attach): Adjust.
4423 (linux_kill_one_process): Rename to ...
4424 (linux_kill_one_lwp): ... this. Adjust.
4425 (linux_kill): Adjust.
4426 (linux_detach_one_process): Rename to ...
4427 (linux_detach_one_lwp): ... this. Adjust.
4428 (linux_detach): Adjust.
4429 (check_removed_breakpoint): Adjust.
4430 (status_pending_p): Adjust.
4431 (linux_wait_for_process): Rename to ...
4432 (linux_wait_for_lwp): ... this. Adjust.
4433 (linux_wait_for_event): Adjust.
4434 (send_sigstop): Adjust.
4435 (wait_for_sigstop): Adjust.
4436 (stop_all_processes): Rename to ...
4437 (stop_all_lwps): ... this.
4438 (linux_resume_one_process): Rename to ...
4439 (linux_resume_one_lwp): ... this. Adjust.
4440 (linux_set_resume_request, linux_continue_one_thread)
4441 (linux_queue_one_thread, resume_status_pending_p)
4442 (usr_store_inferior_registers, regsets_store_inferior_registers)
4443 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4445 * linux-low.h (get_process): Rename to ...
4446 (get_lwp): ... this. Adjust.
4447 (get_thread_process): Rename to ...
4448 (get_thread_lwp): ... this. Adjust.
4449 (get_process_thread): Rename to ...
4450 (get_lwp_thread): ... this. Adjust.
4451 (struct process_info): Rename to ...
4452 (struct lwp_info): ... this.
4453 (all_processes): Rename to ...
4454 (all_lwps): ... this.
4455 * proc-service.c (ps_lgetregs): Adjust.
4456 * thread-db.c (thread_db_create_event, find_one_thread)
4457 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4459 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4461 * server.c (handle_query): Handle "qAttached".
4463 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4465 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4466 GPLv3, update license URL.
4468 2009-03-01 Doug Evans <dje@google.com>
4470 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4471 (server_h): Add gdb_signals.h.
4472 (signals.o): Update.
4473 * server.h (target_signal_from_host,target_signal_to_host_p)
4474 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4476 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4478 * remote-utils.c (getpkt): Also generate remote-debug
4479 information if noack_mode is set.
4481 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4483 * server.c (handle_query): Report qXfer:siginfo:read and
4484 qXfer:siginfo:write as supported and handle them.
4485 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4486 * linux-low.c (linux_xfer_siginfo): New.
4487 (linux_target_ops): Set it.
4489 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4491 * server.c (gdbserver_usage): Mention --remote-debug.
4492 (main): Accept '--remote-debug' switch.
4494 2009-01-18 Doug Evans <dje@google.com>
4496 * regcache.c (new_register_cache): No need to check result of xcalloc.
4497 * server.c (handle_search_memory): Back out calls to xmalloc,
4498 result is checked and error is returned to user upon failure.
4499 (handle_query): Ditto. Add more checks for result of malloc.
4500 (handle_v_cont): Check result of malloc, report error back to
4502 (handle_v_run): Ditto. Call freeargv.
4503 * server.h (freeargv): Declare.
4504 * utils.c (freeargv): New fn.
4506 2009-01-15 Doug Evans <dje@google.com>
4508 * gdbreplay.c (perror_with_name): Make arg const char *.
4509 * server.h (target_signal_to_name): Make return type const char *.
4510 * thread-db.c (thread_db_err_str): Make return type const char *.
4511 * utils.c (perror_with_name): Make arg const char *.
4513 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4515 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4516 when handling a EXIT_PROCESS_DEBUG_EVENT.
4518 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4520 * gdbreplay.c (gdbreplay_version): Update copyright year.
4521 * server.c (gdbserver_version): Likewise.
4523 2009-01-05 Doug Evans <dje@google.com>
4525 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4526 (handle_extended_wait): Improve comment.
4528 2008-12-13 Doug Evans <dje@google.com>
4530 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4531 * server.h (ATTR_MALLOC): New macro.
4532 (xmalloc,xcalloc,xstrdup): Declare.
4533 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4534 * inferiors.c: Ditto.
4535 * linux-low.c: Ditto.
4536 * mem-break.c: Ditto.
4537 * regcache.c: Ditto.
4538 * remote-utils.c: Ditto.
4541 * win32-low.c: Ditto.
4543 2008-12-12 Doug Evans <dje@google.com>
4545 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4546 in debugging printf.
4548 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4550 2008-12-09 Doug Evans <dje@google.com>
4552 * linux-low.h (struct process_info): Delete member tid, unused.
4553 * thread-db.c (find_one_thread): Update.
4554 (maybe_attach_thread): Update.
4556 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4558 * target.h (struct target_ops): Add qxfer_osdata member.
4559 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4561 (linux_qxfer_osdata): New functions.
4562 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4564 * server.c (handle_query): Handle "qXfer:osdata:read:".
4565 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4566 (buffer_xml_printf): New functions.
4567 * server.h (struct buffer): New.
4568 (buffer_grow_str, buffer_grow_str0): New macros.
4569 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4570 (buffer_xml_printf): Declare.
4572 2008-11-24 Doug Evans <dje@google.com>
4574 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4576 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4578 * server.c (handle_v_run): Always use the supplied argument list.
4580 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4582 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4583 (xtensa_regmap_table): Add entry for scompare1.
4585 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4587 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4588 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4589 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4590 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4591 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4592 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4593 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4594 XML target descriptions.
4595 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4596 when inferior is running on an ISA 2.05 or later processor. Add
4597 special case to return offset for full 64-bit slot of FPSCR when
4600 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4602 * Makefile.in (SFILES, clean): Added sparc64 files.
4603 (reg-sparc64.o, reg-sparc64.c): New.
4604 * configure.srv (sparc*-*-linux*): New configuration.
4605 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4606 syscall arguments for SPARC.
4607 (regsets_store_inferior_registers): Likewise.
4608 * linux-sparc-low.c: New file.
4610 2008-10-21 Doug Evans <dje@google.com>
4612 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4613 (READLINE_DIR,READLINE_DEP): Delete.
4614 (INTERNAL_CFLAGS): Update.
4615 (LINTFLAGS): Update.
4617 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4619 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4620 whole argv from the last run, not just argv[0].
4622 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4624 * regcache.c (new_register_cache): Return NULL if the register
4625 cache size isn't known yet.
4626 (free_register_cache): Avoid dereferencing a NULL regcache.
4628 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4630 * configure.srv: Merge MIPS and MIPS64.
4632 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4634 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4636 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4638 * Makefile.in: Add required vsx dependencies.
4640 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4641 Declare init_registers_powerpc_vsx32l.
4642 Declare init_registers_powerpc_vsx64l.
4643 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4644 (ppc_arch_setup): Check for VSX in hwcap.
4645 (ppc_fill_vsxregset): New function.
4646 (ppc_store_vsxregset): New function.
4647 Add new VSX entry in regset_info target_regsets.
4649 * configure.srv: Add new VSX dependencies.
4651 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4653 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4654 (remote_open): Set or clear transport_is_reliable.
4655 (putpkt_binary): Don't expect acks in noack mode.
4656 (getpkt): Don't send ack/nac in noack mode.
4657 * server.c (handle_general_set): Handle QStartNoAckMode.
4658 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4660 (main): Reset noack_mode on every connection.
4661 * server.h (noack_mode): Declare.
4663 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4665 * Makefile.in (GDBREPLAY_OBS): New variable.
4666 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4668 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4669 Daniel Jacobowitz <dan@codesourcery.com>
4671 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4672 (usr_store_inferior_registers): Likewise.
4673 (regsets_store_inferior_registers): Likewise.
4675 2008-07-31 Rolf Jansen <rj@surtec.com>
4676 Pedro Alves <pedro@codesourcery.com>
4678 * configure.ac: Check for memmem declaration.
4679 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4680 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4681 (disable_packet_qfThreadInfo): Unconditionally compile.
4682 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4683 * configure, config.in: Regenerate.
4685 2008-07-28 Doug Kwan <dougkwan@google.com>
4687 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4688 (linux_write_memory): Remove declaration of errno.
4690 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4692 * linux-low.c (handle_extended_wait): Do not use "status"
4693 variable uninitialized.
4695 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4697 * server.c (handle_v_attach): Inhibit reporting dll changes.
4699 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4701 * remote-utils.c (prepare_resume_reply): If requested, don't
4702 output "thread:TID" in the T stop reply.
4704 * server.c (disable_packet_vCont, disable_packet_Tthread)
4705 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4706 (handle_query): If requested, disable support for qC, qfThreadInfo
4708 (handle_v_requests): If requested, disable support for vCont.
4709 (gdbserver_show_disableable): New.
4710 (main): Handle --disable-packet and --disable-packet=LIST.
4712 * server.h (disable_packet_vCont, disable_packet_Tthread)
4713 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4715 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4717 * server.c (gdbserver_usage): Mention --version.
4719 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4721 * Makefile.in (gdbreplay.o): New rule.
4723 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4725 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4726 message, not gdbserver.
4728 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4729 Nathan Sidwell <nathan@codesourcery.com>
4730 Joseph Myers <joseph@codesourcery.com>
4732 * acinclude.m4: Include ../../config/acx.m4.
4733 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4734 * configure, config.in: Regenerate.
4735 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4736 * server.c (gdbserver_version): Print PKGVERSION.
4737 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4738 (main): Adjust gdbserver_usage calls.
4739 * gdbreplay.c (version, host_name): Add declarations.
4740 (gdbreplay_version, gdbreplay_usage): New.
4741 (main): Accept --version and --help options.
4743 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4745 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4746 (arm_breakpoint_at): Handle Thumb.
4747 (the_low_target): Add comment.
4749 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4751 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4753 2008-05-09 Doug Evans <dje@google.com>
4755 * server.h (decode_search_memory_packet): Declare.
4756 * remote-utils.c (decode_search_memory_packet): New fn.
4757 * server.c (handle_search_memory_1): New fn.
4758 (handle_search_memory): New fn.
4759 (handle_query): Process qSearch:memory packets.
4761 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4763 * regcache.c (registers_length): Remove.
4764 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4765 full register packet.
4766 * regcache.h (registers_length): Remove prototype.
4767 * server.h (PBUFSIZ): Define to 16384.
4769 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4771 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4772 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4773 powerpc-64l.o, and powerpc-altivec64l.o.
4774 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4775 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4776 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4777 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4778 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4781 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4782 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4783 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4784 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4785 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4786 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4787 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4788 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4789 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4790 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4793 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4794 (init_registers_powerpc_32l): ... this new prototype.
4795 (init_registers_powerpc_32): Remove, replace by ...
4796 (init_registers_powerpc_altivec32l): ... this new prototype.
4797 (init_registers_powerpc_e500): Remove, replace by ...
4798 (init_registers_powerpc_e500l): ... this new prototype.
4799 (init_registers_ppc64): Remove, replace by ...
4800 (init_registers_powerpc_64l): ... this new prototype.
4801 (init_registers_powerpc_64): Remove, replace by ...
4802 (init_registers_powerpc_altivec64l): ... this new prototype.
4803 (ppc_num_regs): Set to 73.
4804 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4805 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4806 (ppc_cannot_store_register): Handle orig_r3 and trap.
4807 (ppc_arch_setup): Update init_registers_... calls.
4808 (ppc_fill_gregset): Handle orig_r3 and trap.
4810 * inferiors.c (clear_inferiors): Reset current_inferior.
4812 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4814 * acinclude.m4: Add override.m4.
4815 * configure: Regenerate.
4817 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4819 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4820 initial call to init_register_ppc64.
4822 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4824 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4825 powerpc*-*-linux* case.
4826 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4828 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4830 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4831 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4833 * linux-ppc-low.c: Include <elf.h>.
4834 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4835 (ppc_hwcap): New global variable.
4836 (ppc_regmap): Remove __SPE__ #ifdef sections.
4837 (ppc_regmap_e500): New global variable.
4838 (ppc_cannot_store_register): Update __SPE__ special case.
4839 (ppc_get_hwcap): New function.
4840 (ppc_arch_setup): Use it to determine whether inferior supports
4841 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4842 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4843 Do not access registers if target does not support AltiVec.
4844 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4845 Do not access registers if target does not support SPE.
4846 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4848 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4850 * linux-low.c (disabled_regsets, num_regsets): New.
4851 (use_regsets_p): Delete.
4852 (linux_wait_for_process): Clear disabled_regsets.
4853 (regsets_fetch_inferior_registers): Check and set it.
4854 (regsets_store_inferior_registers): Likewise.
4855 (linux_fetch_registers, linux_store_registers): Do not use
4857 (initialize_low): Allocate disabled_regsets.
4859 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4861 * Makefile.in (LIBOBJS): New.
4863 (memmem.o): New rule.
4864 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4865 * configure: Regenerated.
4867 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4869 * server.c (handle_query): Never return "unsupported" for
4870 qXfer:features:read queries.
4872 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4874 * server.c (get_features_xml): Fix inverted condition.
4875 (handle_query): Always support qXfer:feature:read.
4877 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4879 * server.c (wrapper_argv): New.
4880 (start_inferior): Handle wrapper_argv. If set, expect an extra
4882 (gdbserver_usage): Document --wrapper.
4883 (main): Parse --wrapper.
4885 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4887 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4888 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4889 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4890 (ppc_set_pc): Likewise.
4891 (ppc_arch_setup): New function.
4892 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4893 of collect_register.
4894 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4896 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4898 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4899 instead of linux-ppc64-low.o.
4900 * linux-ppc64-low.c: Remove file.
4901 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4902 (linux-ppc64-low.o): Remove rule.
4904 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4905 (init_registers_powerpc_64): Likewise.
4906 (ppc_regmap): Conditionally define depending on __powerpc64__.
4907 (ppc_cannot_store_register): Do not special-case "fpscr" when
4908 compiled on __powerpc64__.
4909 (ppc_collect_ptrace_register): New function.
4910 (ppc_supply_ptrace_register): New function.
4911 (ppc_breakpoint): Change type to "unsigned int".
4912 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4913 (the_low_target): Conditionally provide initializers for the
4914 arch_setup member depending on __powerpc64__. Install
4915 collect_ptrace_register and supply_ptrace_register members.
4917 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4919 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4920 * server.c (gdbserver_xmltarget): Define.
4921 (get_features_xml): Use it to replace "target.xml" and arch_string.
4923 * configure.srv: Remove srv_xmltarget. Add XML files that were
4924 mentioned there to srv_xmlfiles instead. Remove conditional tests
4925 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4926 srv_xmlfiles and srv_regobj to include all possible choices.
4927 * configure.ac (srv_xmltarget): Remove.
4928 (srv_xmlfiles): Do not add "target.xml".
4929 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4930 checks for supplementary target information.
4931 * configure: Regenerate.
4932 * Makefile.in (XML_TARGET): Remove.
4933 (target.xml): Remove rule.
4934 (clean): Do not clean up target.xml.
4935 (.PRECIOUS): Do not mention target.xml.
4937 * target.h (struct target_ops): Remove arch_string member.
4938 * linux-low.c (linux_arch_string): Remove.
4939 (linux_target_ops): Remove arch_string initializer.
4940 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4941 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4942 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4943 * spu-low.c (spu_arch_string): Remove.
4944 (spu_target_ops): Remove arch_string initializer.
4945 * win32-low.c (win32_arch_string): Remove.
4946 (win32_target_ops): Remove arch_string initializer.
4947 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4948 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4949 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4951 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4953 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4954 by collect_ptrace_register and supply_ptrace_register hooks.
4955 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4956 instead of checking for the_low_target.left_pad_xfer.
4957 (usr_store_inferior_registers): Use collect_ptrace_register callback
4958 instead of checking for the_low_target.left_pad_xfer.
4960 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4961 (s390_supply_ptrace_register): Likewise.
4962 (s390_fill_gregset): Call s390_collect_ptrace_register.
4963 (the_low_target): Update.
4965 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4966 (ppc_supply_ptrace_register): Likewise.
4967 (the_low_target): Update.
4969 * linux-i386-low.c (the_low_target): Update.
4970 * linux-x86-64-low.c (the_low_target): Update.
4972 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4974 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4975 reg-s390.o and reg-s390x.o.
4977 * linux-low.c (new_inferior): New global variable.
4978 (linux_create_inferior, linux_attach): Set it.
4979 (linux_wait_for_process): Call the_low_target.arch_setup after the
4980 target has stopped for the first time.
4981 (initialize_low): Do not call the_low_target.arch_setup.
4983 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4984 (s390_set_pc): Likewise.
4985 (s390_arch_setup): New function.
4986 (the_low_target): Use s390_arch_setup as arch_setup routine.
4988 * regcache.c (realloc_register_cache): New function.
4989 (set_register_cache): Call it for each existing regcache.
4991 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4993 * server.h (init_registers): Remove prototype.
4995 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4996 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4997 instead of init_registers ().
4998 * linux-arm-low.c (init_registers_arm): Add prototype.
4999 (init_registers_arm_with_iwmmxt): Likewise.
5000 (the_low_target): Add initializer for arch_setup field.
5001 * linux-cris-low.c (init_registers_cris): Add prototype.
5002 (the_low_target): Add initializer for arch_setup field.
5003 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5004 (the_low_target): Add initializer for arch_setup field.
5005 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5006 (the_low_target): Add initializer for arch_setup field.
5007 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5008 (the_low_target): Add initializer for arch_setup field.
5009 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5010 (the_low_target): Add initializer for arch_setup field.
5011 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5012 (the_low_target): Add initializer for arch_setup field.
5013 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5014 (init_registers_mips64_linux): Likewise.
5015 (the_low_target): Add initializer for arch_setup field.
5016 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5017 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5018 (the_low_target): Add initializer for arch_setup field.
5019 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5020 (init_registers_powerpc_64): Likewise.
5021 (the_low_target): Add initializer for arch_setup field.
5022 * linux-s390-low.c (init_registers_s390): Add prototype.
5023 (init_registers_s390x): Likewise.
5024 (the_low_target): Add initializer for arch_setup field.
5025 * linux-sh-low.c (init_registers_sh): Add prototype.
5026 (the_low_target): Add initializer for arch_setup field.
5027 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5028 (the_low_target): Add initializer for arch_setup field.
5029 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5030 (the_low_target): Add initializer for arch_setup field.
5032 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5033 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5034 instead of init_registers ().
5035 * win32-arm-low.c (init_registers_arm): Add prototype.
5036 (the_low_target): Add initializer for arch_setup field.
5037 * win32-i386-low.c (init_registers_i386): Add prototype.
5038 (the_low_target): Add initializer for arch_setup field.
5040 * spu-low.c (init_registers_spu): Add prototype.
5041 (initialize_low): Call initialie_registers_spu () instead of
5042 initialize_registers ().
5044 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5046 * server.c (handle_v_requests): When handling the vRun and vAttach
5047 packets, if already debugging a process, don't kill it. Return an
5050 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5052 * server.c (handle_query): Correct length check.
5054 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5056 * win32-low.c (do_initial_child_stuff): Add process handle
5057 parameter. Set current_process_handle and current_process_id from the
5058 parameters. Clear globals.
5059 (win32_create_inferior): Don't set current_process_handle and
5060 current_process_id here. Instead pass them on the call to
5061 do_initial_child_stuff.
5062 (win32_attach): Likewise.
5063 (win32_clear_inferiors): New.
5064 (win32_kill): Don't close the current process handle or the
5065 current thread handle here. Instead call win32_clear_inferiors.
5066 (win32_detach): Don't open a new handle to the process. Call
5067 win32_clear_inferiors.
5068 (win32_join): Don't rely on current_process_handle; open a new
5069 handle using the process id.
5070 (win32_wait): Call win32_clear_inferiors when the inferior process
5073 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5075 * server.c (monitor_show_help): Add "exit".
5077 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5079 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5080 (clean): Add reg-xtensa.c.
5081 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5082 * configure.srv (xtensa*-*-linux*) New target.
5083 * linux-xtensa-low.c: New.
5084 * xtensa-xtregs.c: New.
5086 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5088 * hostio.c: Don't include errno.h.
5089 (errno_to_fileio_errno): Move to hostio-errno.
5090 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5091 error number outputting to the target->hostio_last_error callback.
5092 (hostio_packet_error): Use FILEIO_EINVAL directly.
5093 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5094 calls to hostio_error.
5095 * hostio-errno.c: New.
5096 * server.h (hostio_last_error_from_errno): Declare.
5097 * target.h (target_ops): Add hostio_last_error member.
5098 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5099 as hostio_last_error handler.
5100 * spu-low.c (spu_target_ops): Likewise.
5101 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5102 (wince_hostio_last_error): New functions.
5103 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5104 as hostio_last_error handler.
5105 (win32_target_ops) [!_WIN32_WCE]: Register
5106 hostio_last_error_from_errno as hostio_last_error handler.
5107 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5108 (hostio-errno.o): New rule.
5109 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5110 * configure.srv (srv_hostio_err_objs): New variable. Default to
5112 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5113 * configure: Regenerate.
5115 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5117 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5118 (linux_kill, linux_detach): Clean up the process list.
5119 * remote-utils.c (remote_open): Improve port number parsing.
5120 (putpkt_binary, input_interrupt): Only send interrupts if the target
5122 * server.c (extended_protocol): Make static.
5123 (attached): Define earlier.
5124 (exit_requested, response_needed, program_argv): New variables.
5125 (target_running): New.
5126 (start_inferior): Clear attached here.
5127 (attach_inferior): Set attached here.
5128 (require_running): Define.
5129 (handle_query): Use require_running and target_running. Implement
5131 (handle_v_attach, handle_v_run): New.
5132 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5133 (gdbserver_usage): Update.
5134 (main): Redo argument parsing. Handle --debug and --multi. Handle
5135 --attach along with other options or after the port. Save
5136 program_argv. Support no initial program. Resynchronize
5137 communication with GDB after an error. Handle "monitor exit".
5138 Use require_running and target_running. Always allow the extended
5139 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5140 restart in extended mode.
5141 * README: Refer to the GDB manual. Update --attach usage.
5143 2007-12-20 Andreas Schwab <schwab@suse.de>
5145 * linux-low.c (STACK_SIZE): Define.
5146 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5147 (linux_test_for_tracefork): Likewise.
5149 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5151 * linux-low.c (linux_wait_for_event): Update messages. Do not
5152 reinsert auto-delete breakpoints.
5153 * mem-break.c (struct breakpoint): Change return type of handler to
5155 (set_breakpoint_at): Update handler type.
5156 (reinsert_breakpoint_handler): Return 1 instead of calling
5158 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5160 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5161 * mem-break.h (set_breakpoint_at): Update handler type.
5162 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5163 * win32-low.c (auto_delete_breakpoint): New.
5164 (get_child_debug_event): Use it.
5166 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5168 * configure.ac: Check for pread and pwrite.
5169 * hostio.c (handle_pread): Fall back to lseek and read.
5170 (handle_pwrite): Fall back to lseek and write.
5171 * config.in, configure: Regenerated.
5173 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5175 * server.c (myresume): Add own_buf argument.
5176 (main): Update calls.
5178 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5180 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5181 * remote-utils.c (remote_open): Do not call disable_async_io.
5182 (block_async_io): Delete.
5183 (unblock_async_io): Make static.
5184 (initialize_async_io): New.
5185 * server.c (handle_v_cont): Handle async I/O here.
5186 (myresume): Likewise. Move other common resume tasks here...
5187 (main): ... from here. Call initialize_async_io. Disable async
5188 I/O before the main loop.
5189 * server.h (initialize_async_io): Declare.
5190 (block_async_io, unblock_async_io): Delete prototypes.
5191 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5193 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5195 * remote-utils.c (readchar): Allow binary data in received messages.
5197 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5199 * win32-low.c (attaching): New global.
5200 (win32_create_inferior): Clear the `attaching' global.
5201 (win32_attach): Set the `attaching' global.
5202 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5203 attaching. Only set a breakpoint at the entry point if not
5206 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5208 * server.c (main): Don't report dll events on the initial
5209 connection on attaches.
5211 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5213 * server.c (main): Relax numerical bases supported for the pid of
5214 the --attach command line argument.
5216 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5218 * win32-low.c (win32_attach): Call OpenProcess before
5219 DebugActiveProcess, not after. Add last error output to error
5222 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5224 * win32-low.c (win32_get_thread_context)
5225 (win32_set_thread_context): New functions.
5226 (thread_rec): Use win32_get_thread_context.
5227 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5228 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5231 2007-12-03 Leo Zayas
5232 Pedro Alves <pedro_alves@portugalmail.pt>
5234 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5236 (child_add_thread): Minor cleanup.
5237 (child_continue): Resume artificially suspended threads before
5238 calling ContinueDebugEvent.
5239 (suspend_one_thread): New.
5240 (fake_breakpoint_event): New.
5241 (get_child_debug_event): Change return type to int. Check here if
5242 gdb sent an interrupt request. If a soft interrupt was requested,
5243 fake a breakpoint event. Return 0 if there is no event to handle,
5245 (win32_wait): Don't check here if gdb sent an interrupt request.
5246 Ensure there is a valid event to handle.
5247 (win32_request_interrupt): Add soft interruption method as last
5250 2007-12-03 Leo Zayas
5251 Pedro Alves <pedro_alves@portugalmail.pt>
5253 * win32-low.h (win32_thread_info): Add descriptions to the
5254 structure members. Replace `suspend_count' counter by a
5256 * win32-low.c (thread_rec): Update condition of when to get the
5257 context from the inferior. Rely on ContextFlags being set if it
5258 has already been retrieved. Only suspend the inferior thread if
5259 we haven't already. Warn if that fails.
5260 (continue_one_thread): s/suspend_count/suspended/. Only call
5261 ResumeThread once. Warn if that fails.
5263 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5265 * win32-low.c (win32_wait): Don't read from the inferior when it
5268 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5270 * Makefile.in (win32_low_h): New variable.
5271 (win32-low.o): Add dependency on $(win32_low_h).
5272 (win32-arm-low.o, win32-i386-low.o): New rules.
5274 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5276 * hostio.c: Correct copyright year.
5278 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5280 * Makefile.in (OBS): Add hostio.o.
5281 (hostio.o): New rule.
5282 * server.h (handle_vFile): Declare.
5283 * hostio.c: New file.
5284 * server.c (handle_v_requests): Take packet_len and new_packet_len
5285 for binary packets. Call handle_vFile.
5286 (main): Update call to handle_v_requests.
5288 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5290 * linux-low.c: Include <sched.h>.
5292 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5294 * linux-low.c (linux_tracefork_grandchild): New.
5295 (linux_tracefork_child): Use clone.
5296 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5298 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5300 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5302 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5304 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5306 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5308 * inferiors.c (change_inferior_id): Delete.
5309 (add_pid_to_list, pull_pid_from_list): New.
5310 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5311 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5312 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5313 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5314 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5315 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5316 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5317 (using_threads): Always set to 1.
5318 (handle_extended_wait): New.
5319 (add_process): Do not set TID.
5320 (linux_create_inferior): Set must_set_ptrace_flags.
5321 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5322 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5323 (linux_thread_alive): Rename TID argument to LWPID.
5324 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5325 (linux_wait_for_event): Do not use TID or check using_threads. Update
5326 call to dead_thread_notify. Call handle_extended_wait.
5327 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5328 (send_sigstop): Delete sigstop_sent.
5329 (wait_for_sigstop): Avoid TID.
5330 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5331 (linux_test_for_tracefork): New.
5332 (linux_lookup_signals): Use thread_db_active and
5333 linux_supports_tracefork_flag.
5334 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5335 * linux-low.h (get_process_thread): Avoid TID.
5336 (struct process_ifo): Move thread_known and tid to the end. Remove
5338 (linux_attach_lwp, thread_db_init): Update prototypes.
5339 * server.h (change_inferior_id): Delete prototype.
5340 (add_pid_to_list, pull_pid_from_list): New prototypes.
5341 * thread-db.c (thread_db_use_events): New.
5342 (find_first_thread): Rename to...
5343 (find_one_thread): ...this. Update callers and messages. Do not
5344 call fatal. Check thread_db_use_events. Do not call
5345 change_inferior_id or new_thread_notify.
5346 (maybe_attach_thread): Update. Do not call new_thread_notify.
5347 (thread_db_init): Set thread_db_use_events. Check use_events.
5348 * utils.c (fatal, warning): Correct message prefix.
5350 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5352 * Makefile.in (clean): Remove new files.
5353 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5354 (powerpc-64.o, powerpc-64.c): New rules.
5355 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5356 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5358 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5360 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5361 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5362 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5363 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5364 (target_regsets): Add AltiVec and SPE register sets.
5365 * configure.ac: Check for AltiVec and SPE.
5366 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5367 (ppc_fill_vrregset, ppc_store_vrregset): New.
5368 (target_regsets): Add AltiVec register set.
5369 * configure: Regenerated.
5371 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5373 * linux-low.c (O_LARGEFILE): Define.
5374 (linux_read_memory): Use /proc/PID/mem.
5375 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5376 * configure, config.in: Regenerated.
5378 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5380 * linux-low.c (linux_wait_for_event): Do not pass signals while
5383 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5385 * win32-low.c (create_process): New.
5386 (win32_create_inferior): Use create_process instead of
5387 CreateProcess. If create_process failed retry appending an ".exe"
5388 suffix. Store the GetLastError result immediatelly after
5389 create_process calls and use it on the call to error.
5391 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5393 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5395 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5397 * configure.ac: Switch license to GPLv3.
5399 2007-08-01 Michael Snyder <msnyder@access-company.com>
5401 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5403 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5405 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5407 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5408 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5409 CloseToolhelp32Snapshot.
5410 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5411 CloseToolhelp32Snapshot.
5413 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5415 * server.c (main): Check for inferior exit before main loop.
5417 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5419 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5420 instead of on tmp_desc.
5422 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5423 Daniel Jacobowitz <dan@codesourcery.com>
5425 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5426 (add_thread): Minor cleanups.
5427 (clear_inferiors): Move lower in the file. Clear the DLL
5429 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5430 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5431 (xml_escape_text): New.
5432 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5434 (handle_v_cont): Report errors.
5435 (gdbserver_version): Update.
5436 (main): Correct size of own_buf. Do not report initial DLL events.
5437 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5438 (unloaded_dll, xml_escape_text): New.
5439 * win32-low.c (enum target_waitkind): Update comments.
5440 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5441 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5442 (win32_EnumProcessModules, win32_GetModuleInformation)
5443 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5444 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5445 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5446 (win32_Module32First, win32_Module32Next, load_toolhelp)
5447 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5448 (get_child_debug_event): Handle DLL events.
5449 (win32_wait): Likewise.
5451 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5453 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5454 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5456 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5458 * win32-low.c (handle_output_debug_string): Ignore event if not
5461 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5463 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5465 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5467 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5469 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5471 * inferiors.c (change_inferior_id): Add comment.
5472 * linux-low.c (check_removed_breakpoint): Add an early
5473 prototype. Improve debug output.
5474 (linux_attach): Doc update.
5475 (linux_detach_one_process, linux_detach): Clean up before releasing
5477 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5478 * linux-low.h (struct process_info): Doc improvement.
5479 * mem-break.c (delete_all_breakpoints): New.
5480 * mem-break.h (delete_all_breakpoints): New prototype.
5481 * thread-db.c (find_first_thread): New.
5482 (thread_db_create_event): Call it instead of
5483 thread_db_find_new_threads. Clean up unused variables.
5484 (maybe_attach_thread): Remove first thread handling.
5485 (thread_db_find_new_threads): Use find_first_thread.
5486 (thread_db_get_tls_address): Likewise.
5488 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5490 * thread-db.c (thread_db_find_new_threads): Add prototype.
5491 (thread_db_create_event): Check for the main thread before adding
5493 (maybe_attach_thread): Only enable event reporting if TID == 0.
5494 (thread_db_get_tls_address): Check for new threads.
5496 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5498 * linux-low.c (linux_create_inferior): Try execv before execvp.
5499 * spu-low.c (spu_create_inferior): Likewise.
5501 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5503 * linux-low.c (linux_create_inferior): Change execv to execvp.
5504 * spu-low.c (spu_create_inferior): Likewies.
5506 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5508 * Makefile.in (clean): Clean new files instead of deleted ones.
5509 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5510 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5512 * configure.srv: Specify XML files and new regformats for MIPS and
5514 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5515 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5516 an entry for the restart register.
5517 (mips_cannot_fetch_register, mips_cannot_store_register)
5518 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5519 register names to match the XML descriptions.
5520 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5521 restart register instead of $0.
5523 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5524 Markus Deuling <deuling@de.ibm.com>
5526 * remote-utils.c (decode_xfer_write): New function.
5527 * server.h (decode_xfer_write): Add prototype.
5528 * server.c (handle_query): Add PACKET_LEN argument. Support
5529 qXfer:spu:read and qXfer:spu:write packets.
5530 (main): Pass packet_len to handle_query.
5531 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5532 * target.h (target_ops): Add qxfer_spu.
5534 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5536 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5537 accessing non-seekable spufs files.
5539 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5541 * server.c (handle_query): Add reply for qC packet.
5543 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5544 Leo Zayas <lerele@champenstudios@com>
5546 * server.h (check_remote_input_interrupt_request): New function.
5547 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5548 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5549 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5550 (check_remote_input_interrupt_request): New function.
5551 * server.h (check_remote_input_interrupt_request): Declare.
5552 * win32-low.c (winapi_DebugBreakProcess,
5553 winapi_GenerateConsoleCtrlEvent): New typedefs.
5554 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5556 (win32_wait): Check for remote interrupt request
5557 with check_remote_input_interrupt_request.
5558 (win32_request_interrupt): New function.
5559 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5561 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5563 * win32-low.c (debug_registers_changed,
5564 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5565 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5566 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5567 (thread_rec): Get context using the low target.
5568 (child_add_thread): Call thread_added on the low target,
5569 which does the same thing.
5571 (do_initial_child_stuff): Remove debug registers references.
5572 Set context using the low target. Resume threads after
5573 setting the contexts.
5574 (child_continue): Remove dead variable. Remove debug
5575 registers references.
5576 (child_fetch_inferior_registers): Go through the low target.
5577 (do_child_store_inferior_registers): Remove.
5578 (child_store_inferior_registers): Go through the low target.
5579 (win32_resume): Remove debug registers references.
5580 Set context using the low target.
5581 (handle_exception): Change return type to void. Don't record
5582 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5583 first chance exception.
5584 (get_child_debug_event): Change return type to void. Remove
5585 goto loop. Always return after waiting for debug event.
5586 (win32_wait): Convert to switch statement. Handle spurious
5589 * win32-i386-low.c (debug_registers_changed,
5590 debug_registers_used): New.
5591 (initial_stuff): Rename to ...
5592 (i386_initial_stuff): ... this. Clear debug registers
5594 (store_debug_registers): Delete.
5595 (i386_get_thread_context): New.
5596 (load_debug_registers): Delete.
5597 (i386_set_thread_context): New.
5598 (i386_thread_added): New.
5599 (single_step): Rename to ...
5600 (i386_single_step): ... this.
5601 (do_fetch_inferior_registers): Rename to ...
5602 (i386_fetch_inferior_register): ... this.
5603 (i386_store_inferior_register): New.
5604 (the_low_target): Adapt to new interface.
5606 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5607 (arm_get_thread_context): New.
5608 (arm_set_thread_context): New.
5610 (do_fetch_inferior_registers): Rename to ...
5611 (arm_fetch_inferior_register): ... this.
5612 (arm_store_inferior_register): New.
5613 (arm_wince_breakpoint): Reimplement as unsigned long.
5614 (arm_wince_breakpoint_len): Define.
5615 (the_low_target): Adapt to new interface.
5617 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5618 load_debug_registers. Add get_thread_context, set_thread_context,
5619 thread_added and store_inferior_register. Rename
5620 fetch_inferior_registers to fetch_inferior_register.
5621 (regptr): Remove declaration.
5623 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5625 * linux-low.c (linux_detach): Change return type to int. Return 0.
5626 * spu-low.c (spu_detach): Likewise.
5628 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5630 * target.h (target_ops): Change return type of detach to int.
5632 (join_inferior): New.
5633 * server.c (main): Don't skip detach support on mingw32.
5634 If the inferior doesn't support detaching return error.
5635 Call join_inferior instead of using waitpid.
5636 * linux-low.c (linux_join): New.
5637 (linux_target_op): Add linux_join.
5638 * spu-low.c (spu_join): New.
5639 (spu_target_ops): Add spu_join.
5640 * win32-low.c (win32_detach): Adapt to new interface.
5641 Reopen current_process_handle before detaching. Issue a child
5642 resume before detaching.
5644 (win32_target_op): Add win32_join.
5646 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5648 * win32-low.c (win32-attach): Fix return value.
5649 * target.h (target_ops): Describe ATTACH return values.
5651 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5653 * win32-low.c (GETPROCADDRESS): Define.
5654 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5655 (winapi_DebugSetProcessKillOnExit): Likewise.
5656 (win32_create_inferior): Force usage of ansi CreateProcessA.
5657 (win32_attach): Use GETPROCADDRESS.
5658 (win32_detach): Likewise.
5660 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5662 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5664 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5666 * win32-low.c: Commit leftover changes from 2007-03-29.
5668 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5670 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5671 fields short instead of int. Add explicit padding.
5672 (i387_cache_to_fsave): Remove unnecessary casts.
5673 (i387_fsave_to_cache): Doc fix.
5674 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5676 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5678 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5679 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5681 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5683 * configure.srv (arm*-*-mingw32ce*): Move near the other
5686 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5688 * configure.ac: Add errno checking.
5689 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5690 sys/file.h and malloc.h.
5691 (AC_CHECK_DECLS): Add perror.
5692 (srv_mingwce): Handle.
5693 * configure.srv (i[34567]86-*-cygwin*): Add
5694 win32-i386-low.o to srv_tgtobj.
5695 (i[34567]86-*-mingw*): Likewise.
5696 (arm*-*-mingw32ce*): Add case.
5697 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5698 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5699 [__MINGW32CE__] (strerror): New function.
5700 [__MINGW32CE__] (errno): Define to GetLastError.
5701 [__MINGW32CE__] (COUNTOF): New macro.
5702 (remote_open): Remove extra close call.
5703 * mem-break.c (delete_breakpoint_at): New function.
5704 * mem-break.h (delete_breakpoint_at): Declare.
5705 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5706 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5707 [USE_WIN32API] (read, write): Add char* casts.
5708 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5709 * server.h: Include wincecompat.h on Windows CE.
5710 [HAVE_ERRNO_H]: Check.
5711 (perror): Declare if not declared.
5712 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5713 (perror_with_name): Remove errno declaration.
5714 * wincecompat.h: New.
5715 * wincecompat.c: New.
5717 * win32-arm-low.c: New.
5718 * win32-i386-low.c: New.
5719 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5720 (OUTMSG2): Make it safe.
5722 (COUNTOF): New macro.
5723 (NUM_REGS): Get it from the low target.
5724 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5725 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5726 (thread_rec): Let low target handle debug registers.
5727 (child_add_thread): Likewise.
5728 (child_init_thread_list): Likewise.
5729 (continue_one_thread): Likewise.
5731 (do_child_fetch_inferior_registers): Move to ...
5732 * win32-i386-low.c: ... here, and rename to ...
5733 (do_fetch_inferior_registers): ... this.
5734 * win32-low.c (child_fetch_inferior_registers):
5735 Go through the low target.
5736 (do_child_store_inferior_registers): Use regptr.
5737 (strwinerror): New function.
5738 (win32_create_inferior): Handle Windows CE.
5739 Use strwinerror instead of strerror on Windows error
5740 codes. Add program to the error output.
5741 Don't close the main thread handle on Windows CE.
5742 (win32_attach): Use coredll.dll on Windows CE.
5743 (win32_kill): Close current process and current
5745 (win32_detach): Use coredll.dll on Windows CE.
5746 (win32_resume): Let low target handle debug registers, and
5748 (handle_exception): Add/Remove initial breakpoint. Avoid
5749 non-existant WSTOPSIG on Windows CE.
5750 (win32_read_inferior_memory): Cast to remove warning.
5751 (win32_arch_string): Go through the low target.
5752 (initialize_low): Call set_breakpoint_data with the low
5753 target's breakpoint.
5754 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5755 FOP_REGNUM, mappings): Move to ...
5756 * win32-i386-low.c: ... here.
5757 * win32-low.c (win32_thread_info): Move to ...
5758 * win32-low.h: ... here.
5759 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5760 win32-arm-low.c and wincecompat.c.
5761 (all:): Add $EXEEXT.
5762 (install-only:): Likewise.
5763 (gdbserver:): Likewise.
5764 (gdbreplay:): Likewise.
5765 * config.in: Regenerate.
5766 * configure: Regenerate.
5768 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5770 * win32-low.c: Rename typedef thread_info to
5771 win32_thread_info throughout.
5773 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5775 * win32-i386-low.c: Rename to ...
5776 * win32-low.c: ... this.
5777 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5778 * Makefile.in: Likewise.
5780 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5782 * remote-utils.c (monitor_output): Constify msg parameter.
5783 * server.h (monitor_output): Likewise.
5784 * win32-i386-low.c (handle_output_debug_string): New.
5785 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5786 handle_output_debug_string.
5787 (get_child_debug_event): Likewise.
5789 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5791 * server.c (main): Correct strtoul check.
5793 2007-03-27 Jon Ringle <jon@ringle.org>
5795 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5797 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5799 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5801 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5803 * terminal.h: Check HAVE_SGTTY_H.
5805 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5807 * remote-utils.c (remote_open): Print out the assigned port number.
5809 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5811 * remote-utils.c (monitor_output): New function.
5812 * server.c (debug_threads): Define here.
5813 (monitor_show_help): New function.
5814 (handle_query): Handle qRcmd.
5815 (main): Do not handle 'd' packet.
5816 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5817 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5820 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5822 * Makefile.in (EXEEXT): New.
5823 (clean): Use $(EXEEXT).
5825 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5827 * target.h (target_ops): Rename send_signal to request_interrupt,
5828 and remove enum target_signal parameter.
5829 * linux-low.c (linux_request_interrupt): Rename from
5830 linux_send_signal, and always send SIGINT.
5831 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5832 and always send SIGINT.
5833 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5835 (input_interrupt): Likewise.
5837 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5839 * server.c (get_features_xml): Check if target implemented
5841 * win32-i386-low.c (win32_arch_string): New.
5842 (win32_target_ops): Add win32_arch_string as arch_string member.
5844 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5846 * spu-low.c (spu_arch_string): New.
5847 (spu_target_ops): Add spu_arch_string.
5849 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5851 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5852 * configure.ac: Do not check for terminal.h.
5853 * configure, config.in: Regenerated.
5855 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5857 * Makefile.in (OBS): Add $(XML_BUILTIN).
5858 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5860 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5861 (arm-with-iwmmxt.c): New.
5862 * config.in, configure: Regenerate.
5863 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5864 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5865 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5866 (arm*-*-linux*): Add iWMMXt and regset support.
5867 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5868 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5869 (arm_store_wmmxregset, target_regsets): New.
5870 * server.c (get_features_xml): Take annex argument. Check builtin
5872 (handle_query): Handle multiple annexes.
5874 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5876 * remote-utils.c [USE_WIN32API] (read, write): Define.
5877 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5880 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5882 * linux-i386-low.c (the_low_target): Set arch_string.
5883 * linux-x86-64-low.c (the_low_target): Likewise.
5884 * linux-low.c (linux_arch_string): New.
5885 (linux_target_ops): Add it.
5886 * linux-low.h (struct linux_target_ops): Add arch_string.
5887 * server.c (write_qxfer_response): Use const void * for DATA.
5888 (get_features_xml): New.
5889 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5890 * target.h (struct target_ops): Add arch_string method.
5892 2007-01-03 Denis Pilat <denis.pilat@st.com>
5893 Daniel Jacobowitz <dan@codesourcery.com>
5895 * linux-low.c (linux_kill): Handle being called with no threads.
5896 * win32-i386-low.c (win32_kill): Likewise.
5897 (get_child_debug_event): Clear current_process_handle.
5899 2006-12-30 Denis PILAT <denis.pilat@st.com>
5900 Daniel Jacobowitz <dan@codesourcery.com>
5902 * remote-utils.c (remote_open): Check the type of specified
5903 serial port devices before opening them.
5904 * server.c (main): Kill the inferior if an error occurs during
5905 the first remote_open.
5907 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5909 * README: Update supported targets.
5911 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5913 * Makefile.in (clean): Remove reg-mips64.c.
5914 (reg-mips64.c, reg-mips64.o): New rules.
5915 * configure.srv: Handle mips64. Include regset support for mips.
5916 * linux-mips-low.c (union mips_register): New.
5917 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5918 (mips_breakpoint, mips_breakpoint_at): Use int.
5919 (mips_collect_register, mips_supply_register)
5920 (mips_collect_register_32bit, mips_supply_register_32bit)
5921 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5922 (mips_store_fpregset, target_regsets): New.
5923 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5925 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5927 * configure.srv: Add target "spu*-*-*".
5928 * Makefile.in (clean): Remove reg-spu.c.
5929 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5930 * spu-low.c: New file.
5932 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5934 * configure.ac: Correct td_thr_tls_get_addr test.
5935 * configure: Regenerated.
5937 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5939 * linux-low.c (linux_wait_for_event): Reformat. Use the
5941 * remote-utils.c (decode_address_to_semicolon): New.
5942 * server.c (pass_signals, handle_general_set): New.
5943 (handle_query): Mention QPassSignals for qSupported.
5944 (main): Call handle_general_set.
5945 * server.h (pass_signals, decode_address_to_semicolon): New.
5947 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5949 * server.c (handle_query): Correct error handling for read_auxv.
5951 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5953 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5954 and srv_linux_thread_db to yes.
5955 * linux-s390-low.c (s390_fill_gregset): New function.
5956 (target_regsets): Define data structure.
5958 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5960 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5961 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5962 * config.in, configure: Regenerated.
5963 * inferiors.c (gdb_id_to_thread): New function.
5964 (gdb_id_to_thread_id): Use it.
5965 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5966 * linux-low.h (struct process_info): Add th member.
5967 (thread_db_get_tls_address): New prototype.
5968 * remote-utils.c (decode_address): Make non-static.
5969 * server.c (handle_query): Handle qGetTLSAddr.
5970 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5971 * target.h (struct target_ops): Add get_tls_address.
5972 * thread-db.c (maybe_attach_thread): Save the thread handle.
5973 (thread_db_get_tls_address): New.
5975 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5977 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5978 (linux_resume_one_process): Take a siginfo_t *. Update all
5979 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5980 (struct pending_signals): Add a siginfo_t.
5981 (linux_wait_for_process): Always set last_status.
5982 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5983 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5984 * linux-low.h (struct process_info): Add last_status.
5986 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5988 * remote-utils.c (try_rle): New function.
5989 (putpkt_binary): Use it.
5991 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5993 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5994 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5995 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5996 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5997 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6000 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6002 * server.c (terminal_fd): New variable.
6003 (old_foreground_pgrp): Likewise.
6004 (restore_old_foreground_pgrp): New function.
6005 (start_inferior): Record the terminal file descriptor in terminal_fd
6006 and its original foreground group in old_foreground_pgrp. Register
6007 restore_old_foreground_pgrp with atexit().
6009 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6011 * server.c (handle_query): Correct qPart to qXfer.
6013 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6015 * configure.ac: Check for more headers which are missing on
6016 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6017 * configure.srv: Add Cygwin and mingw32.
6018 * remote-utils.c: Don't include headers unconditionally which
6019 are missing on mingw32. Include <winsock.h> for mingw32.
6020 (remote_open): Adjust for mingw32 support. Flush
6021 standard error after writing to it.
6022 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6023 (unblock_async_io, enable_async_io, disable_async_io)
6024 (readchar, getpkt): Update for Winsock support.
6025 (prepare_resume_reply): Expect a protocol signal number.
6026 * server.c: Disable <sys/wait.h> on mingw32.
6027 (start_inferior): Adjust for mingw32 support. Flush
6028 standard error after writing to it.
6029 (attach_inferior): Likewise. Use protocol signal
6031 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6033 * win32-i386-low.c: New file.
6034 * Makefile.in (XM_CLIBS): Set.
6035 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6036 (win32-i386-low.o): New dependency rule.
6037 * linux-low.c (linux_wait): Use target signal numbers.
6038 * target.h (struct target_ops): Doc fix.
6039 * server.h (target_signal_to_name): New prototype.
6040 * gdbreplay.c: Don't include headers unconditionally which
6041 are missing on mingw32. Include <winsock.h> for mingw32.
6042 (remote_close, remote_open): Adjust for Winsock support.
6043 * configure, config.in: Regenerated.
6045 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6047 * server.c (decode_xfer_read, write_qxfer_response): New.
6048 (handle_query): Take a packet length argument. Handle
6049 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6050 the qSupported response.
6051 (main): Update call to handle_query.
6053 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6055 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6056 (putpkt_binary): Renamed from putpkt and adjusted for binary
6058 (putpkt): New wrapper for putpkt_binary.
6059 (readchar): Don't mask off the high bit.
6060 (decode_X_packet): New function.
6061 * server.c (main): Call putpkt_binary if a handler sets the packet
6062 length. Save the length of the incoming packet. Handle 'X'.
6063 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6065 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6067 * server.c (handle_query): Handle qSupported.
6069 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6071 * remote-utils.c (all_symbols_looked_up): New variable.
6072 (look_up_one_symbol): Check it.
6073 * server.h (look_up_one_symbol): New declaration.
6074 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6076 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6078 * Makefile.in (linux-arm-low.o): Update dependencies.
6079 * linux-arm-low.c: Include "gdb_proc_service.h".
6080 (PTRACE_GET_THREAD_AREA): Define.
6081 (ps_get_thread_area): New function.
6083 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6085 * configure.srv (m68k*-*-uclinux*): New target.
6086 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6087 (linux_resume_one_process): Remove extraneous cast.
6088 (linux_read_offsets): New.
6089 (linux_target_op): Add linux_read_offsets on mmuless systems.
6090 * server.c (handle_query): Add qOffsets logic.
6091 * target.h (struct target_ops): Add read_offsets.
6093 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6095 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6096 (PTRACE_GET_THREAD_AREA): Define.
6097 (ps_get_thread_area): New function.
6098 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6099 (linux-x86-64-low.o): Update.
6101 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6103 * configure.ac: Remove checks for prfpregset_t.
6104 * gdb_proc_service.h: New file.
6105 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6106 new "gdb_proc_service.h".
6107 * proc-service.c: Likewise.
6108 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6109 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6110 * Makefile.in (gdb_proc_service_h): Updated.
6111 * configure, config.in: Regenerated.
6113 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6115 * remote-utils.c (prepare_resume_reply): Move declaration
6116 of gdb_id_from_wait to the top of the block.
6118 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6120 * linux-low.c (regsets_store_inferior_registers): Read the regset
6121 from the target before filling it.
6123 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6125 * server.c (attach_inferior): Return SIGTRAP for a successful
6128 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6130 * Makefile.in (OBS): Add version.o.
6131 (STAGESTUFF): Delete.
6132 (version.o): Add dependencies.
6133 (version.c): Replace rule.
6134 (clean): Remove version.c.
6135 * server.c (gdbserver_version): New.
6136 (gdbserver_usage): Use printf.
6137 (main): Handle --version and --help.
6138 * server.h (version, host_name): Add declarations.
6140 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6152 * linux-x86-64-low.c:
6155 * linux-ppc64-low.c:
6164 * linux-crisv32-low.c:
6176 * gdbserver.1: Add (C) after Copyright. Update the FSF
6179 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6181 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6182 (arm_breakpoint_at): Recognize both breakpoints.
6183 (the_low_target): Use the correct breakpoint instruction.
6185 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6187 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6188 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6189 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6190 (the_low_target): Update.
6192 2005-10-25 Andreas Schwab <schwab@suse.de>
6194 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6196 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6197 (ia64_num_regs): Reduce to 462.
6199 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6201 * acinclude.m4: Correct quoting.
6202 * aclocal.m4: Regenerated.
6204 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6205 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6206 (thread_db_init): Call thread_db_err_str.
6207 * configure.ac: Check for TD_VERSION.
6208 * config.in, configure: Regenerated.
6210 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6212 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6214 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6216 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6217 is not available. Define HAVE_PTRACE_GETREGS if it is.
6218 * config.in, configure: Regenerated.
6219 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6220 * linux-i386-low.c, linux-m68k-low.c: Update to use
6221 HAVE_PTRACE_GETREGS.
6222 * linux-low.c (regsets_fetch_inferior_registers)
6223 (regsets_store_inferior_registers): Only return 0 if we processed
6225 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6226 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6228 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6230 * inferiors.c (struct thread_info): Add gdb_id.
6231 (add_thread): Add gdb_id argument.
6232 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6233 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6234 calls to add_thread.
6235 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6236 * server.c (handle_query): Use thread_to_gdb_id.
6237 (handle_v_cont, main): Use gdb_id_to_thread_id.
6238 * server.h (add_thread): Update prototype.
6239 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6242 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6244 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6245 left-padded registers.
6246 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6247 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6249 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6251 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6252 * configure: Regenerate.
6253 * config.in: Regenerate.
6254 * server.h (NEED_DECLARATION_STRERROR):
6255 Replace with !HAVE_DECL_STRERROR.
6257 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6259 * linux-low.c (linux_wait, linux_send_signal): Don't test
6260 an unsigned long variable for > 0 if it could be MAX_ULONG.
6261 * server.c (myresume): Likewise.
6262 * target.c (set_desired_inferior): Likewise.
6264 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6266 * configure.ac: Simplify and improve check for socklen_t.
6267 * configure, config.in: Regenerate.
6269 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6271 * acconfig.h: Remove.
6272 * configure.ac: Add a test for socklen_t. Use three-argument
6273 AC_DEFINE throughout.
6274 * config.in: Regenerated using autoheader 2.59.
6275 * configure: Regenerated.
6277 * gdbreplay.c (socklen_t): Provide a default.
6278 (remote_open): Use socklen_t.
6279 * remote-utils.c (socklen_t): Provide a default.
6280 (remote_open): Use socklen_t.
6281 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6284 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6286 * linux-low.c (linux_read_memory, linux_write_memory)
6287 (linux_read_auxv): Likewise.
6288 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6289 (check_mem_write): Likewise.
6290 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6292 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6293 (registers_from_string, register_data): Likewise.
6294 * server.c (handle_query, main): Likewise.
6295 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6296 (decode_M_packet): Likewise.
6297 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6298 * target.h (struct target_ops): Update read_memory, write_memory,
6300 (read_inferior_memory, write_inferior_memory): Update.
6301 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6303 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6304 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6305 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6306 linux-s390-low.c, linux-sh-low.c: Update for changes in
6307 read_inferior_memory and the_low_target->breakpoint.
6309 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6311 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6312 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6313 * configure.srv: Add powerpc64-*-linux*.
6314 * linux-ppc64-low.c: New file.
6316 2005-05-23 Orjan Friberg <orjanf@axis.com>
6318 * linux-cris-low.c: New file with support for CRIS.
6319 * linux-crisv32-low.c: Ditto for CRISv32.
6320 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6321 (clean): Add reg-cris.c and reg-crisv32.c.
6322 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6323 reg-crisv32.o, and reg-crisv32.c to make rules.
6324 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6327 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6329 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6330 of sizeof (PTRACE_XFER_TYPE).
6331 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6333 2005-05-12 Orjan Friberg <orjanf@axis.com>
6335 * target.h (struct target_ops): Add insert_watchpoint,
6336 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6337 pointers for hardware watchpoint support.
6338 * linux-low.h (struct linux_target_ops): Ditto.
6339 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6340 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6341 to linux_target_ops.
6342 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6344 * server.c (main): Recognize 'Z' and 'z' packets.
6346 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6348 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6349 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6350 (the_low_target): Add new members.
6352 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6354 * proc-service.c (ps_lgetregs): Search all_processes instead of
6357 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6359 * server.c (start_inferior): Change return type to int.
6360 (attach_inferior): Change sigptr to int *.
6361 (handle_v_cont, handle_v_requests): Change signal to int *.
6362 (main): Change signal to int.
6364 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6366 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6367 * configure.srv: Add m32r*-*-linux*.
6368 * linux-m32r-low.c: New file.
6370 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6372 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6374 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6376 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6377 Take unsigned long arguments for PIDs.
6378 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6379 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6380 (wait_for_sigstop, linux_resume_one_process)
6381 (regsets_fetch_inferior_registers, linux_send_signal)
6382 (linux_read_auxv): Likewise. Update the types of variables holding
6383 PIDs. Update format string specifiers.
6384 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6385 * remote-utils.c (prepare_resume_reply): Likewise.
6386 * server.c (cont_thread, general_thread, step_thread)
6387 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6389 (handle_query): Update format specifiers.
6390 (handle_v_cont, main): Use strtoul for thread IDs.
6391 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6392 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6393 (general_thread, step_thread, thread_from_wait)
6394 (old_thread_from_wait): Update.
6395 * target.h (struct thread_resume): Use unsigned long for THREAD.
6396 (struct target_ops): Use unsigned long for arguments to attach and
6399 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6401 * acinclude.m4: Include bfd/bfd.m4 directly.
6402 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6403 <agriffis@toolchain.org>.
6404 * aclocal.m4, configure: Regenerated.
6406 2005-01-07 Andrew Cagney <cagney@gnu.org>
6408 * configure.ac: Rename configure.in, require autoconf 2.59.
6409 * configure: Re-generate.
6411 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6413 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6415 * aclocal.m4: Regenerated.
6416 * configure: Regenerated.
6418 2004-11-21 Andreas Schwab <schwab@suse.de>
6420 * linux-m68k-low.c (m68k_num_gregs): Define.
6421 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6422 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6423 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6424 (m68k_breakpoint_at): New. Add to the_low_target.
6426 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6427 srv_linux_thread_db to yes.
6429 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6431 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6432 (ARCH_SET_FS): Likewise.
6433 (ARCH_GET_FS): Likewise.
6434 (ARCH_GET_GS): Likewise.
6436 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6438 * linux-i386-low.c (ps_get_thread_area): New.
6439 * linux-x86-64-low.c (ps_get_thread_area): New.
6440 * linux-low.c: Include <sys/syscall.h>.
6441 (linux_kill_one_process): Don't kill the first thread here.
6442 (linux_kill): Kill the first thread here.
6443 (kill_lwp): New function.
6444 (send_sigstop, linux_send_signal): Use it.
6445 * proc-service.c: Clean up #ifdefs.
6446 (fpregset_info): Delete.
6447 (ps_lgetregs): Update and enable implementation.
6448 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6450 * remote-utils.c (struct sym_cache, symbol_cache): New.
6451 (input_interrupt): Print a clearer message.
6452 (async_io_enabled): New variable.
6453 (enable_async_io, disable_async_io): Use it. Update comments.
6454 (look_up_one_symbol): Use the symbol cache.
6455 * thread-db.c (thread_db_look_up_symbols): New function.
6456 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6458 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6460 * configure.in: Test for -rdynamic.
6461 * configure: Regenerated.
6462 * Makefile (INTERNAL_LDFLAGS): New.
6463 (gdbserver, gdbreplay): Use it.
6465 2004-09-02 Andrew Cagney <cagney@gnu.org>
6467 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6469 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6471 * linux-low.c (linux_wait): Clear all_processes list also.
6473 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6475 * linux-low.c: Include <errno.h>. Remove extern declaration of
6478 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6480 * gdbreplay.c, server.h, utils.c: Update copyright years.
6482 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6484 * server.c (main): Print child status or termination signal from
6485 variable 'signal', not 'sig'.
6487 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6489 * linux-low.c (linux_read_memory): Change return type to
6490 int. Check for and return error from ptrace().
6491 * target.c (read_inferior_memory): Change return type to int. Pass
6492 back return status from the_target->read_memory().
6493 * target.h (struct target_ops): Adapt *read_memory() prototype.
6495 (read_inferior_memory): Adapt prototype.
6496 * server.c (main): Return an error packet if
6497 read_inferior_memory() returns an error.
6499 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6501 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6502 Unify with other clean targets.
6504 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6506 * server.c (handle_v_cont): Call set_desired_inferior.
6508 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6510 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6512 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6514 * linux-low.c (linux_wait): Unblock async I/O.
6515 (linux_resume): Block and enable async I/O.
6516 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6517 * server.h (block_async_io, unblock_async_io): Add prototypes.
6519 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6521 * remote-utils.c (remote_open): Print a status notice after
6523 * server.c (attach_inferior): Print a status notice after
6526 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6528 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6530 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6532 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6534 * server.c, target.h: Update copyright years.
6536 2004-02-25 Roland McGrath <roland@redhat.com>
6538 * target.h (struct target_ops): New member `read_auxv'.
6539 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6540 * linux-low.c (linux_read_auxv): New function.
6541 (linux_target_ops): Initialize `read_auxv' member to that.
6543 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6545 Committed by Jim Blandy <jimb@redhat.com>.
6547 * linux-s390-low.c (s390_num_regs): Update.
6548 (s390_regmap): Remove control registers. Use __s390x__ predefine
6549 instead of GPR_SIZE to distiguish s390 and s390x targets.
6551 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6553 * linux-low.c: Update copyright year.
6554 (check_removed_breakpoint): Clear pending_is_breakpoint.
6555 (linux_set_resume_request, linux_queue_one_thread)
6556 (resume_status_pending_p): New functions.
6557 (linux_continue_one_thread): Use process->resume.
6558 (linux_resume): Only resume threads if there are no pending events.
6559 * linux-low.h (struct process_info): Add resume request
6562 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6564 * regcache.c (new_register_cache): Clear the allocated register
6565 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6567 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6569 * linux-low.c (linux_resume): Take a struct thread_resume *
6571 (linux_wait): Update call.
6572 (resume_ptr): New static variable.
6573 (linux_continue_one_thread): Renamed from
6574 linux_continue_one_process. Use resume_ptr.
6575 (linux_resume): Use linux_continue_one_thread.
6576 * server.c (handle_v_cont, handle_v_requests): New functions.
6577 (myresume): New function.
6578 (main): Handle 'v' case.
6579 * target.h (struct thread_resume): New type.
6580 (struct target_ops): Change argument of "resume" to struct
6582 (myresume): Delete macro.
6584 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6586 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6587 (uninstall): Support DESTDIR.
6589 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6591 * configure.srv: Add xscale*linux copy of arm*linux entry.
6593 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6595 * linux-arm-low.c (arm_reinsert_addr): New function.
6596 (the_low_target): Add arm_reinsert_addr.
6598 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6600 * mem-break.c: Remove whitespace at end of file.
6602 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6604 * configure.in: Check whether we need to prototype strerror.
6605 * server.h: Optionally prototype strerror.
6606 * gdbreplay.c (perror_with_name): Use strerror.
6607 * linux-low.c (linux_attach_lwp): Use strerror.
6608 * utils.c (perror_with_name): Use strerror.
6609 * config.in, configure: Regenerated.
6611 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6613 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6614 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6616 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6618 * Makefile.in (SFILES): Update.
6619 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6620 low-sun3.c: Remove files.
6622 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6624 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6625 (linux_detach_one_process, linux_detach): New functions.
6626 (linux_target_ops): Add linux_detach.
6627 * server.c (main): Handle 'D' packet.
6628 * target.h (struct target_ops): Add "detach" member.
6629 (detach_inferior): Define.
6631 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6633 From Kelley Cook <kelleycook@wideopenwest.com>:
6634 * configure.srv: Accept i[34567]86 variants.
6636 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6638 * linux-low.c (linux_wait_for_event): Correct comment typos.
6639 (linux_resume_one_process): Call check_removed_breakpoint.
6640 (linux_send_signal): New function.
6641 (linux_target_ops): Add linux_send_signal.
6642 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6644 * target.h (struct target_ops): Add send_signal.
6646 2003-05-29 Jim Blandy <jimb@redhat.com>
6648 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6649 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6650 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6651 away part of the register's value.
6653 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6655 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6656 (linux_wait_for_event, linux_init_signals): Likewise.
6658 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6660 * configure.in: Check for stdlib.h.
6661 * configure: Regenerated.
6662 * config.in: Regenerated.
6664 2003-01-04 Andreas Schwab <schwab@suse.de>
6666 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6668 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6670 * Makefile.in: Remove obsolete code.
6672 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6674 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6675 defined(PT_FPR0_HI).
6677 2002-11-17 Stuart Hughes <seh@zee2.com>
6679 * linux-arm-low.c (arm_num_regs): Increase.
6680 (arm_regmap): Include status register.
6682 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6684 * linux-low.c (register_addr): Remove incorrect -1 check.
6686 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6688 * linux-low.c (linux_create_inferior): Call setpgid. Return
6690 (unstopped_p, linux_signal_pid): Remove.
6691 (linux_target_ops): Remove linux_signal_pid.
6692 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6693 global instead of target method.
6694 * target.h (struct target_ops): Remove signal_pid. Update comment
6695 for create_inferior.
6696 * server.c (signal_pid): New variable.
6697 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6698 gdbserver. Set the child to be the foreground process group.
6699 (attach_inferior): Set signal_pid.
6701 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6703 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6705 2002-08-20 Jim Blandy <jimb@redhat.com>
6707 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6710 2002-08-01 Andrew Cagney <cagney@redhat.com>
6712 * Makefile.in: Make chill references obsolete.
6714 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6716 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6717 * configure: Regenerate.
6718 * config.in: Regenerate.
6720 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6722 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6723 (perror_with_name, remote_close, remote_open, expect, play): Static.
6725 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6727 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6728 byte offsets instead of an array of indexes.
6729 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6731 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6733 * regcache.c: Add comment.
6735 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6737 * thread-db.c: New file.
6738 * proc-service.c: New file.
6739 * acinclude.m4: New file.
6740 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6741 proc-service.o, and thread-db.o.
6742 (linux-low.o): Add USE_THREAD_DB.
6743 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6744 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6745 * aclocal.m4: Regenerated.
6746 * config.in: Regenerated.
6747 * configure: Regenerated.
6748 * configure.in: Check for proc_service.h, sys/procfs.h,
6749 thread_db.h, and linux/elf.h headrs.
6750 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6751 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6752 Check for -lthread_db and thread support.
6753 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6754 PowerPC, and SuperH.
6755 * i387-fp.c: Constify arguments.
6756 * i387-fp.h: Likewise.
6757 * inferiors.c: (struct thread_info): Renamed from
6758 `struct inferior_info'. Remove PID member. Use generic inferior
6759 list header. All uses updated.
6760 (inferiors, signal_pid): Removed.
6761 (all_threads): New variable.
6762 (get_thread): Define.
6763 (add_inferior_to_list): New function.
6764 (for_each_inferior): New function.
6765 (change_inferior_id): New function.
6766 (add_inferior): Removed.
6767 (remove_inferior): New function.
6768 (add_thread): New function.
6769 (free_one_thread): New function.
6770 (remove_thread): New function.
6771 (clear_inferiors): Use for_each_inferior and free_one_thread.
6772 (find_inferior): New function.
6773 (find_inferior_id): New function.
6774 (inferior_target_data): Update argument type.
6775 (set_inferior_target_data): Likewise.
6776 (inferior_regcache_data): Likewise.
6777 (set_inferior_regcache_data): Likewise.
6778 * linux-low.c (linux_bp_reinsert): Remove.
6779 (all_processes, stopping_threads, using_thrads)
6780 (struct pending_signals, debug_threads, pid_of): New.
6781 (inferior_pid): Replace with macro.
6782 (struct inferior_linux_data): Remove.
6783 (get_stop_pc, add_process): New functions.
6784 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6785 Use add_process and add_thread.
6786 (linux_attach_lwp): New function, based on old linux_attach. Use
6787 add_process and add_thread. Set stop_expected for new threads.
6788 (linux_attach): New function.
6789 (linux_kill_one_process): New function.
6790 (linux_kill): Kill all LWPs.
6791 (linux_thread_alive): Use find_inferior_id.
6792 (check_removed_breakpoints, status_pending_p): New functions.
6793 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6794 Update. Use WNOHANG. Wait for cloned processes also. Update process
6795 struct for the found process.
6796 (linux_wait_for_event): New function.
6797 (linux_wait): Use it. Support LWPs.
6798 (send_sigstop, wait_for_sigstop, stop_all_processes)
6799 (linux_resume_one_process, linux_continue_one_process): New functions.
6800 (linux_resume): Support LWPs.
6801 (REGISTER_RAW_SIZE): Remove.
6802 (fetch_register): Use register_size instead. Call supply_register.
6803 (usr_store_inferior_registers): Likewise. Call collect_register.
6805 (regsets_fetch_inferior_registers): Improve error message.
6806 (regsets_store_inferior_registers): Add debugging.
6807 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6808 (unstopped_p, linux_signal_pid): New functions.
6809 (linux_target_ops): Add linux_signal_pid.
6810 (linux_init_signals): New function.
6811 (initialize_low): Call it. Initialize using_threads.
6812 * regcache.c (inferior_regcache_data): Add valid
6814 (get_regcache): Fetch registers lazily. Add fetch argument
6815 and update all callers.
6816 (regcache_invalidate_one, regcache_invalidate): New
6818 (new_register_cache): Renamed from create_register_cache.
6819 Return the new regcache.
6820 (free_register_cache): Change argument to a void *.
6821 (registers_to_string, registers_from_string): Call get_regcache
6822 with fetch flag set.
6823 (register_data): Make static. Pass fetch flag to get_regcache.
6824 (supply_register): Call get_regcache with fetch flag clear.
6825 (collect_register): Call get_regcache with fetch flag set.
6826 (collect_register_as_string): New function.
6827 * regcache.h: Update.
6828 * remote-utils.c (putpkt): Flush after debug output and use
6830 Handle input interrupts while waiting for an ACK.
6831 (input_interrupt): Use signal_pid method.
6832 (getpkt): Flush after debug output and use stderr.
6833 (outreg): Use collect_register_as_string.
6834 (new_thread_notify, dead_thread_notify): New functions.
6835 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6837 (look_up_one_symbol): Flush after debug output.
6838 * server.c (step_thread, server_waiting): New variables.
6839 (start_inferior): Don't use signal_pid. Update call to mywait.
6840 (attach_inferior): Update call to mywait.
6841 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6842 (main): Don't fetch/store registers explicitly. Use
6843 set_desired_inferior. Support proposed ``Hs'' packet. Update
6846 (struct inferior_list, struct_inferior_list_entry): New.
6847 * target.c (set_desired_inferior): New.
6848 (write_inferior_memory): Constify.
6849 (mywait): New function.
6851 (struct target_ops): New signal_pid method.
6852 (mywait): Removed macro, added prototype.
6854 * linux-low.h (regset_func): Removed.
6855 (regset_fill_func, regset_store_func): New.
6856 (enum regset_type): New.
6857 (struct regset_info): Add type field. Use new operation types.
6858 (struct linux_target_ops): stop_pc renamed to get_pc.
6859 Add decr_pc_after_break and breakpoint_at.
6860 (get_process, get_thread_proess, get_process_thread)
6861 (strut process_info, all_processes, linux_attach_lwp)
6862 (thread_db_init): New.
6864 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6865 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6866 (the_low_target): Add new members.
6867 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6868 (i386_store_fpxregset): Constify.
6869 (target_regsets): Add new kind identifier.
6870 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6871 (i386_set_pc): Add debugging.
6872 (i386_breakpoint_at): New function.
6873 (the_low_target): Add new members.
6874 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6875 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6876 (mips_breakpoint_at): New.
6877 (the_low_target): Add new members.
6878 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6879 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6880 (the_low_target): Add new members.
6881 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6882 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6883 (the_low_target): Add new members.
6884 * linux-x86-64-low.c (target_regsets): Add new kind
6887 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6889 From Martin Pool <mbp@samba.org>:
6890 * server.c (gdbserver_usage): New function.
6893 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6895 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6898 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6900 * Makefile.in: Remove obsolete code.
6902 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6904 * linux-low.c (regsets_fetch_inferior_registers),
6905 (regsets_store_inferior_registers): Removed cast to int from
6907 * regcache.h: Added declaration of struct inferior_info.
6909 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6911 * inferiors.c (struct inferior_info): Add regcache_data.
6912 (add_inferior): Call create_register_cache.
6913 (clear_inferiors): Call free_register_cache.
6914 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6915 * regcache.c (struct inferior_regcache_data): New.
6916 (registers): Remove.
6917 (get_regcache): New function.
6918 (create_register_cache, free_register_cache): New functions.
6919 (set_register_cache): Don't initialize the register cache here.
6920 (registers_to_string, registers_from_string, register_data): Call
6922 * regcache.h: Add prototypes.
6923 * server.h: Likewise.
6925 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6927 * mem-break.c: New file.
6928 * mem-break.h: New file.
6929 * Makefile.in: Add mem-break.o rule; update server.h
6931 * inferiors.c (struct inferior_info): Add target_data
6933 (clear_inferiors): Free target_data member if set.
6934 (inferior_target_data, set_inferior_target_data): New functions.
6935 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6936 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6937 * linux-low.c (linux_bp_reinsert): New variable.
6938 (struct inferior_linux_data): New.
6939 (linux_create_inferior): Use set_inferior_target_data.
6940 (linux_attach): Likewise. Call add_inferior.
6941 (linux_wait_for_one_inferior): New function.
6942 (linux_wait): Call it.
6943 (linux_write_memory): Add const.
6944 (initialize_low): Call set_breakpoint_data.
6945 * linux-low.h (struct linux_target_ops): Add breakpoint
6947 * server.c (attach_inferior): Remove extra add_inferior
6949 * server.h: Include mem-break.h. Update inferior.c
6951 * target.c (read_inferior_memory)
6952 (write_inferior_memory): New functions.
6953 * target.h (read_inferior_memory)
6954 (write_inferior_memory): Change macros to prototypes.
6955 (struct target_ops): Update comments. Add const to write_memory
6958 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6960 * linux-low.c (usr_store_inferior_registers): Support
6961 registers which are allowed to fail to store.
6962 * linux-low.h (linux_target_ops): Likewise.
6963 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6964 (ppc_cannot_store_register): FPSCR may not be storable.
6966 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6968 * server.h: Include <string.h> if HAVE_STRING_H.
6969 * ChangeLog: Correct paths in last ChangeLog entry.
6971 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6973 * linux-low.h: Remove obsolete prototypes.
6974 (struct linux_target_ops): New.
6975 (extern the_low_target): New.
6976 * linux-low.c (num_regs, regmap): Remove declarations.
6977 (register_addr): Use the_low_target explicitly.
6978 (fetch_register): Likewise.
6979 (usr_fetch_inferior_registers): Likewise.
6980 (usr_store_inferior_registers): Likewise.
6981 * linux-arm-low.c (num_regs): Remove.
6982 (arm_num_regs): Define.
6983 (arm_regmap): Renamed from regmap, made static.
6984 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6986 (arm_cannot_store_register): Renamed from cannot_store_register,
6988 (the_low_target): New.
6989 * linux-i386-low.c (num_regs): Remove.
6990 (i386_num_regs): Define.
6991 (i386_regmap): Renamed from regmap, made static.
6992 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6994 (i386_cannot_store_register): Renamed from cannot_store_register,
6996 (the_low_target): New.
6997 * linux-ia64-low.c (num_regs): Remove.
6998 (ia64_num_regs): Define.
6999 (ia64_regmap): Renamed from regmap, made static.
7000 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7002 (ia64_cannot_store_register): Renamed from cannot_store_register,
7004 (the_low_target): New.
7005 * linux-m68k-low.c (num_regs): Remove.
7006 (m68k_num_regs): Define.
7007 (m68k_regmap): Renamed from regmap, made static.
7008 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7010 (m68k_cannot_store_register): Renamed from cannot_store_register,
7012 (the_low_target): New.
7013 * linux-mips-low.c (num_regs): Remove.
7014 (mips_num_regs): Define.
7015 (mips_regmap): Renamed from regmap, made static.
7016 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7018 (mips_cannot_store_register): Renamed from cannot_store_register,
7020 (the_low_target): New.
7021 * linux-ppc-low.c (num_regs): Remove.
7022 (ppc_num_regs): Define.
7023 (ppc_regmap): Renamed from regmap, made static.
7024 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7026 (ppc_cannot_store_register): Renamed from cannot_store_register,
7028 (the_low_target): New.
7029 * linux-s390-low.c (num_regs): Remove.
7030 (s390_num_regs): Define.
7031 (s390_regmap): Renamed from regmap, made static.
7032 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7034 (s390_cannot_store_register): Renamed from cannot_store_register,
7036 (the_low_target): New.
7037 * linux-sh-low.c (num_regs): Remove.
7038 (sh_num_regs): Define.
7039 (sh_regmap): Renamed from regmap, made static.
7040 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7042 (sh_cannot_store_register): Renamed from cannot_store_register,
7044 (the_low_target): New.
7045 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7046 (the_low_target): New.
7048 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7050 * Makefile.in: Add stamp-h target.
7051 * configure.in: Create stamp-h.
7052 * configure: Regenerated.
7054 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7056 * inferiors.c: New file.
7057 * target.c: New file.
7058 * target.h: New file.
7059 * Makefile.in: Add target.o and inferiors.o. Update
7061 * linux-low.c (inferior_pid): New static variable,
7062 moved from server.c.
7063 (linux_create_inferior): Renamed from create_inferior.
7064 Call add_inferior. Return 0 on success instead of a PID.
7065 (linux_attach): Renamed from myattach.
7066 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7067 (linux_thread_alive): Renamed from mythread_alive.
7068 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7070 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7071 (regsets_store_inferior_registers): Correct error message.
7072 Add missing ``return 0''.
7073 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7074 (linux_store_registers): Renamed from store_inferior_registers.
7075 (linux_read_memory): Renamed from read_inferior_memory.
7076 (linux_write_memory): Renamed from write_inferior_memory.
7077 (linux_target_ops): New structure.
7078 (initialize_low): Call set_target_ops ().
7079 * remote-utils.c (unhexify): New function.
7080 (hexify): New function.
7081 (input_interrupt): Send signals to ``signal_pid''.
7082 * server.c (inferior_pid): Remove.
7083 (start_inferior): Update create_inferior call.
7084 (attach_inferior): Call add_inferior.
7085 (handle_query): New function.
7086 (main): Call handle_query for `q' packets.
7087 * server.h: Include "target.h". Remove obsolete prototypes.
7088 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7090 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7092 * Makefile.in: Add WARN_CFLAGS. Update configury
7094 * configure.in: Check for <string.h>
7095 * configure: Regenerate.
7096 * config.in: Regenerate.
7097 * gdbreplay.c: Include needed system headers.
7098 (remote_open): Remove strchr prototype.
7099 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7100 * regcache.c (supply_register): Change buf argument to const void *.
7101 (supply_register_by_name): Likewise.
7102 (collect_register): Change buf argument to void *.
7103 (collect_register_by_name): Likewise.
7104 * regcache.h: Add missing prototypes.
7105 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7106 * server.c (handle_query): New function.
7107 (attached): New static variable, moved out of main.
7108 (main): Quiet longjmp clobber warnings.
7109 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7110 * utils.c (error): Remove NORETURN.