1 2012-04-19 Yao Qi <yao@codesourcery.com>
3 * remote-utils.c (prepare_resume_reply): Replace with macro
5 * server.c (handle_qxfer_threads_proper): Likewise.
6 * target.h (traget_core_of_thread): New macro.
8 2012-04-16 Yao Qi <yao@codesourcery.com>
10 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11 duplicated on address.
13 2012-04-16 Yao Qi <yao@codesourcery.com>
15 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
16 (struct tracepoint_action_ops) <send>: New field.
17 (m_tracepoint_action_send, r_tracepoint_action_send): New.
18 (agent_expr_send, x_tracepoint_action_send): New.
19 (l_tracepoint_action_send): New.
20 (cmd_qtdp): Download and install tracepoint
21 according to `use_agent'.
22 (run_inferior_command): Add one more parameter `len'.
24 (tracepoint_send_agent): New.
25 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
27 2012-04-16 Yao Qi <yao@codesourcery.com>
29 * tracepoint.c (download_tracepoints): Moved to ...
30 (cmd_qtstart): ... here.
32 2012-04-14 Yao Qi <yao@codesourcery.com>
34 * tracepoint.c: Include inttypes.h.
35 (struct collect_memory_action): Use sized types.
36 (struct tracepoint): Likewise.
37 (cmd_qtdp, stop_tracing): Update print specifiers.
38 (cmd_qtp, response_tracepoint): Likewise.
39 (collect_data_at_tracepoint): Likewise.
40 (collect_data_at_step): Likewise.
42 2012-04-14 Yao Qi <yao@codesourcery.com>
44 Import gnulib module inttypes.
45 * aclocal.m4, config.in, configure: Regenerated.
47 2012-04-14 Yao Qi <yao@codesourcery.com>
49 * Makefile.in (maintainer-clean, realclean, distclean): Remove
50 Makefile and config.status at last.
52 2012-04-13 Yao Qi <yao@codesourcery.com>
54 * tracepoint.c: Include stdint.h unconditionally.
56 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
58 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
59 on BFD_HAVE_SYS_PROCFS_TYPE.
60 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
61 * configure: Regenerate.
62 * config.in: Likewise.
64 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
66 * Makefile.in (clean): Also remove x32.c x32-linux.c
67 x32-avx.c x32-avx-linux.c.
70 (x32-linux.o): Likewise.
71 (x32-linux.c): Likewise.
72 (x32-avx.o): Likewise.
73 (x32-avx.c): Likewise.
74 (x32-avx-linux.o): Likewise.
75 (x32-avx-linux.c): Likewise.
77 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
78 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
79 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
80 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
81 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
82 i386/x32-avx-linux.xml.
84 * linux-x86-low.c (init_registers_x32_linux): New prototype.
85 (init_registers_x32_avx_linux): Likwise.
86 (x86_linux_update_xmltarget): Call init_registers_x32_linux
87 or init_registers_x32_avx_linux if linux_is_elf64 is false.
89 2012-04-13 Pedro Alves <palves@redhat.com>
91 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
92 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
93 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
94 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
97 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
99 * linux-x86-low.c (compat_x32_clock_t): New.
100 (compat_x32_siginfo_t): Likewise.
101 (compat_x32_siginfo_from_siginfo): Likewise.
102 (siginfo_from_compat_x32_siginfo): Likewise.
103 (linux_is_elf64): Likewise.
104 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
105 and siginfo_from_compat_x32_siginfo for x32.
106 (x86_arch_setup): Set linux_is_elf64.
108 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
111 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
113 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
114 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
115 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
116 compatible with process.
118 2012-04-12 Yao Qi <yao@codesourcery.com>
120 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
121 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
122 (install-only, install-info, clean): Handle sub dir gnulib.
123 (all-lib, am--refresh): New targets.
124 (memmem.o): Remove target.
125 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
126 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
127 (AC_REPLACE_FUNCS): Remove memmem.
128 Invoke gl_INIT and AM_INIT_AUTOMAKE.
129 (AC_OUTPUT): Generate Makefile in gnulib/.
130 * aclocal.m4, config.in, configure: Regenerated.
132 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
134 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
136 2012-04-05 Pedro Alves <palves@redhat.com>
138 -Werror=strict-aliasing
140 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
143 2012-04-04 Pedro Alves <palves@redhat.com>
145 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
146 (sparc_store_gregset_from_stack, sparc_store_gregset)
147 (sparc_breakpoint_at): Fix formatting.
149 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
151 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
153 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
154 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
155 * config.in: Regenerate.
156 * configure: Likewise.
158 2012-03-29 Pedro Alves <palves@redhat.com>
160 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
161 Correct ptrace arguments.
163 2012-03-28 Pedro Alves <palves@redhat.com>
165 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
166 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
167 (IA64_FR1_REGNUM): New defines.
168 (ia64_fetch_register): New.
169 (the_low_target): Install it.
170 * linux-low.h (struct linux_target_ops) <fetch_register>: New
172 * linux-low.c (linux_fetch_registers): Try the
173 the_low_target.fetch_register hook first.
175 * linux-arm-low.c (the_low_target): Adjust.
176 * linux-bfin-low.c (the_low_target): Adjust.
177 * linux-cris-low.c (the_low_target): Adjust.
178 * linux-crisv32-low.c (the_low_target): Adjust.
179 * linux-m32r-low.c (the_low_target): Adjust.
180 * linux-m68k-low.c (the_low_target): Adjust.
181 * linux-mips-low.c (the_low_target): Adjust.
182 * linux-ppc-low.c (the_low_target): Adjust.
183 * linux-s390-low.c (the_low_target): Adjust.
184 * linux-sh-low.c (the_low_target): Adjust.
185 * linux-sparc-low.c (the_low_target): Adjust.
186 * linux-tic6x-low.c (the_low_target): Adjust.
187 * linux-x86-low.c (the_low_target): Adjust.
188 * linux-xtensa-low.c (the_low_target): Adjust.
190 2012-03-26 Pedro Alves <palves@redhat.com>
192 * server.c (handle_qxfer_libraries): Don't bail early if
193 the_target->qxfer_libraries_svr4 is not NULL.
195 2012-03-26 Pedro Alves <palves@redhat.com>
197 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
199 2012-03-23 Pedro Alves <palves@redhat.com>
201 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
202 "library-list-svr4" element's start tag when the the DSO list is
205 2012-03-23 Pedro Alves <palves@redhat.com>
207 * linux-low.c (read_one_ptr): Read the inferior's pointer through
208 a variable whose type size is the same as the inferior's pointer
211 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
213 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
215 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
216 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
217 * linux-low.h: Include <signal.h>.
218 (struct siginfo): Remove forward declaration.
219 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
222 2012-03-21 Mike Frysinger <vapier@gentoo.org>
224 * .gitignore: Ignore more files.
226 2012-03-19 Pedro Alves <palves@redhat.com>
227 Jan Kratochvil <jan.kratochvil@redhat.com>
229 * server.c (cont_thread, general_thread): Add describing comments.
230 (start_inferior): Clear `cont_thread'.
231 (handle_v_cont): Don't set `cont_thread' if resuming all threads
234 2012-03-15 Yao Qi <yao@codesourcery.com>
236 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
238 (cmd_qtdp): ... here.
240 2012-03-15 Yao Qi <yao@codesourcery.com>
242 * tracepoint.c (struct tracepoint_action_ops): New.
243 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
244 (m_tracepoint_action_download): New.
245 (r_tracepoint_action_download): New.
246 (x_tracepoint_action_download): New.
247 (l_tracepoint_action_download): New.
248 (add_tracepoint_action): Install `action->ops' according type.
249 (download_tracepoint_1): Move code `download' function pointer
250 of various tracepoint_action_ops.
252 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
254 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
255 linux_ptrace_attach_warnings.
257 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
259 * Makefile.in (linux-ptrace.o): New.
260 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
261 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
262 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
263 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
264 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
266 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
268 2012-03-08 Yao Qi <yao@codesourcery.com>
269 Pedro Alves <palves@redhat.com>
272 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
274 * tracepoint.c (remove_tracepoint): New.
275 (cmd_qtdp): Call remove_tracepoint when failed to install.
277 2012-03-07 Pedro Alves <palves@redhat.com>
279 * linux-low.c (get_detach_signal): New.
280 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
281 Pass on pending signals to PTRACE_DETACH. Check the result of the
283 * server.c (program_signals, program_signals_p): New.
284 (handle_general_set): Handle QProgramSignals.
285 * server.h (program_signals, program_signals_p): Declare.
287 2012-03-05 Pedro Alves <palves@redhat.com>
288 Jan Kratochvil <jan.kratochvil@redhat.com>
290 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
293 2012-03-03 Yao Qi <yao@codesourcery.com>
295 * tracepoint.c (tracepoint_look_up_symbols): Update call to
296 agent_look_up_symbols.
298 2012-03-03 Yao Qi <yao@codesourcery.com>
300 * Makefile.in (linux-low.o): Keep dependence on agent.h.
301 (linux-x86-low.o): Likewise.
302 * server.h: Remove in_process_agent_loaded.
303 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
307 2012-03-03 Yao Qi <yao@codesourcery.com>
309 * tracepoint.c (gdb_agent_capability): New global.
310 (in_process_agent_loaded_ust): Renamed to
311 `in_process_agent_supports_ust'.
313 (in_process_agent_supports_ust): Call agent_capability_check.
314 (clear_installed_tracepoints): Assert that agent supports
317 2012-03-03 Yao Qi <yao@codesourcery.com>
319 * linux-low.c (linux_supports_agent): New.
320 (linux_target_ops): Initialize field `supports_agent' with
321 linux_supports_agent.
322 * target.h (struct target_ops) <supports_agent>: New.
323 (target_supports_agent): New macro.
324 * server.c (handle_general_set): Handle packet 'QAgent'.
325 (handle_query): Send `QAgent+'.
326 * Makefile.in (server.o): Depends on agent.h.
328 2012-03-03 Yao Qi <yao@codesourcery.com>
330 * Makefile.in (OBS): Add agent.o.
331 Add new rule for agent.o.
332 Track dependence of tracepoint.c on agent.h.
333 * tracepoint.c (run_inferior_command_1):
334 (run_inferior_command): Call agent_run_command.
335 (gdb_ust_connect_sync_socket): Deleted. Move it to
337 (resume_thread, stop_thread): Likewise.
338 (gdb_ust_socket_init): Renamed to ...
339 (gdb_agent_socket_init): ... New.
340 (gdb_ust_thread): Renamed to ...
341 (gdb_agent_helper_thread): ... New.
342 (gdb_ust_init): Move some code to ...
343 (gdb_agent_init): ... here. New.
344 [HAVE_UST]: Call gdb_ust_init.
345 (initialize_tracepoint_ftlib): Call gdb_agent_init.
346 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
347 * config.in, configure: Regenerated.
349 2012-03-02 Pedro Alves <palves@redhat.com>
351 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
352 * linux-low.c (struct simple_pid_list): New.
353 (stopped_pids): New a struct simple_pid_list pointer.
354 (add_to_pid_list, pull_pid_from_list): New.
355 (handle_extended_wait): Don't assume the first signal new children
356 report is SIGSTOP. Adjust call to pull_pid_from_list.
357 (linux_wait_for_lwp): Adjust.
359 2012-03-02 Yao Qi <yao@codesourcery.com>
361 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
364 2012-03-02 Yao Qi <yao@codesourcery.com>
366 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
367 `stop_pc' and `tpoint'. Update caller.
369 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
371 * linux-low.h (linux_target_ops): Add regset_bitmap member.
372 * linux-low.c (use_linux_regsets): New macro.
373 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
374 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
375 (linux_register_in_regsets): New function.
376 (usr_fetch_inferior_registers): Skip registers covered by
378 (usr_store_inferior_registers): Likewise.
379 (usr_fetch_inferior_registers): New macro.
380 (usr_store_inferior_registers): Likewise.
381 (linux_fetch_registers): Handle mixed regset/non-regset targets.
382 (linux_store_registers): Likewise.
383 * linux-mips-low.c (init_registers_mips_dsp_linux): New
385 (init_registers_mips64_dsp_linux): Likewise.
386 (init_registers_mips_linux): New macro.
387 (init_registers_mips_dsp_linux): Likewise.
388 (mips_dsp_num_regs): Likewise.
389 (DSP_BASE, DSP_CONTROL): New fallback macros.
390 (mips_base_regs): New macro.
391 (mips_regmap): Use it. Fix the size.
392 (mips_dsp_regmap): New variable.
393 (mips_dsp_regset_bitmap): Likewise.
394 (mips_arch_setup): New function.
395 (mips_cannot_fetch_register): Use the_low_target.regmap rather
397 (mips_cannot_store_register): Likewise.
398 (the_low_target): Update .arch_setup, .num_regs and .regmap
399 initializers. Add .regset_bitmap initializer.
400 * linux-arm-low.c (the_low_target): Add .regset_bitmap
402 * linux-bfin-low.c (the_low_target): Likewise.
403 * linux-cris-low.c (the_low_target): Likewise.
404 * linux-crisv32-low.c (the_low_target): Likewise.
405 * linux-ia64-low.c (the_low_target): Likewise.
406 * linux-m32r-low.c (the_low_target): Likewise.
407 * linux-m68k-low.c (the_low_target): Likewise.
408 * linux-ppc-low.c (the_low_target): Likewise.
409 * linux-s390-low.c (the_low_target): Likewise.
410 * linux-sh-low.c (the_low_target): Likewise.
411 * linux-sparc-low.c (the_low_target): Likewise.
412 * linux-tic6x-low.c (the_low_target): Likewise.
413 * linux-x86-low.c (the_low_target): Likewise.
414 * linux-xtensa-low.c (the_low_target): Likewise.
415 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
416 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
417 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
419 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
420 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
422 2012-02-29 Yao Qi <yao@codesourcery.com>
423 Pedro Alves <palves@redhat.com>
425 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
426 `step_over_finished' is true.
428 2012-02-27 Pedro Alves <palves@redhat.com>
430 * linux-low.c (pid_is_stopped): Delete, moved to common/.
431 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
433 2012-02-27 Pedro Alves <palves@redhat.com>
436 * linux-low.c (pid_is_stopped): New.
437 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
439 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
441 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
444 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
446 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
448 2012-02-24 Luis Machado <lgustavo@codesourcery>
450 * server.c (handle_query): Advertise support for target-side
451 breakpoint condition evaluation.
452 (process_point_options): New function.
453 (process_serial_event): When inserting a breakpoint, check for
454 a target-side condition that should be evaluated.
456 * mem-break.c: Include regcache.h and ax.h.
457 (point_cond_list_t): New data structure.
458 (breakpoint) <cond_list>: New field.
459 (find_gdb_breakpoint_at): Make non-static.
460 (delete_gdb_breakpoint_at): Clear any target-side
462 (clear_gdb_breakpoint_conditions): New function.
463 (add_condition_to_breakpoint): Likewise.
464 (add_breakpoint_condition): Likewise.
465 (gdb_condition_true_at_breakpoint): Likewise.
466 (gdb_breakpoint_here): Return result directly instead
467 of going through a local variable.
469 * mem-break.h (find_gdb_breakpoint_at): New prototype.
470 (clear_gdb_breakpoint_conditions): Likewise.
471 (add_breakpoint_condition): Likewise.
472 (gdb_condition_true_at_breakpoint): Likewise.
474 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
475 (need_step_over_p): Take target-side breakpoint condition into
478 2012-02-24 Luis Machado <lgustavo@codesourcery>
480 * server.h: Include tracepoint.h.
481 (agent_mem_read, agent_get_trace_state_variable_value,
482 agent_set_trace_state_variable_value,
483 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
484 get_set_tsv_func_addr): New prototypes.
486 * ax.h: New include file.
487 * ax.c: New source file.
489 * tracepoint.c: Include ax.h.
490 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
491 agent_expr, eval_result_type): Move to ax.h.
492 (parse_agent_expr): Rename to ...
493 (gdb_parse_agent_expr): ... this, make it non-static and move
495 (unparse_agent_expr) Rename to ...
496 (gdb_unparse_agent_expr): ... this, make it non-static and move
498 (eval_agent_expr): Rename to ...
499 (eval_tracepoint_agent_expr): ... this.
500 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
501 forward declarations.
502 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
503 (agent_get_trace_state_variable_value): New function.
504 (agent_set_trace_state_variable_value): New function.
505 (cmd_qtdp): Call gdb_parse_agent_expr (...).
506 (response_tracepoint): Call gdb_unparse_agent_expr (...).
507 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
508 (condition_true_at_tracepoint): Likewise.
509 (parse_agent_expr): Rename to ...
510 (gdb_parse_agent_expr): ... this and move to ax.c.
511 (unparse_agent_expr): Rename to ...
512 (gdb_unparse_agent_expr): ... this and move to ax.c.
513 (gdb_agent_op_name): Move to ax.c.
514 (eval_agent_expr): Rename to ...
515 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
517 (eval_tracepoint_agent_expr): New function.
518 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
520 (current_insn_ptr, emit_error, struct bytecode_address): Move to
522 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
523 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
524 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
525 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
526 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
527 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
528 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
529 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
530 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
531 (compile_bytecodes): Remove forward declaration.
532 (is_goto_target): Move to ax.c.
533 (compile_bytecodes): Move to ax.c and call
534 agent_get_trace_state_variable_value (...) and
535 agent_set_trace_state_variable_value (...).
537 * Makefile.in: Update ax.c and IPA dependencies.
539 2012-02-24 Pedro Alves <palves@redhat.com>
541 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
542 (cmd_bigqtbuffer_circular): ... this. Only handle
543 'QTBuffer:circular:'.
544 (handle_tracepoint_general_set): Adjust.
546 2012-02-16 Yao Qi <yao@codesourcery.com>
548 * inferiors.c: Move code to ...
549 * dll.c: .... here. New.
550 * server.h: Declare clear_dlls.
551 * Makefile.in (SFILES): Add dll.c.
555 2012-02-11 Yao Qi <yao@codesourcery.com>
557 * server.c: (handle_monitor_command): Add a new parameter
559 (handle_query): Update caller.
561 2012-02-09 Joel Brobecker <brobecker@adacore.com>
563 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
564 * configure, config.in: Regenerate.
565 * hostio.c: Provide an alternate implementation if HAVE_READLINK
568 2012-02-02 Pedro Alves <palves@redhat.com>
570 Try SIGKILL first, then PTRACE_KILL.
571 * linux-low.c (linux_kill_one_lwp): New.
572 (linux_kill_one_lwp): Rename to ...
573 (kill_one_lwp_callback): ... this. Use the new
576 2012-02-02 Pedro Alves <palves@redhat.com>
578 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
581 2012-01-27 Pedro Alves <palves@redhat.com>
583 * linux-low.c (linux_child_pid_to_exec_file): Delete.
584 (elf_64_file_p): Make static.
585 (linux_pid_exe_is_elf_64_file): New.
586 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
588 (linux_pid_exe_is_elf_64_file): Declare.
589 * linux-x86-low.c (x86_arch_setup): Use
590 linux_pid_exe_is_elf_64_file.
592 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
594 * linux-low.c (linux_wait_for_event_1): Rename to ...
595 (linux_wait_for_event): ... here and merge it with former
596 linux_wait_for_event - new variable wait_ptid, use it.
597 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
599 2012-01-23 Pedro Alves <palves@redhat.com>
601 * server.c (main): Avoid yet another case of infinite loop while
602 detaching/killing after a longjmp.
604 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
607 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
609 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
611 * hostio.c (handle_readlink): New function.
612 (handle_vFile): Call it to handle "vFile:readlink" packets.
614 2012-01-20 Pedro Alves <palves@redhat.com>
615 Ulrich Weigand <ulrich.weigand@linaro.org>
617 * server.c (handle_v_requests): Only support vAttach and vRun to
618 start multiple processes when in extended protocol mode.
620 2012-01-17 Pedro Alves <palves@redhat.com>
622 * tracepoint.c (initialize_tracepoint): Use mmap instead of
623 memalign plus mprotect to allocate the scratch buffer.
625 2012-01-13 Pedro Alves <palves@redhat.com>
627 * server.c (attach_inferior): Clear `cont_thread'.
629 2012-01-13 Pedro Alves <palves@redhat.com>
631 * server.c (main): Avoid infinite loop while detaching/killing
634 2012-01-09 Doug Evans <dje@google.com>
636 * server.c (start_inferior): Set last_ptid in --wrapper case.
638 2012-01-06 Yao Qi <yao@codesourcery.com>
640 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
642 [IN_PROCESS_AGENT] (debug_agent): New global variable.
644 2012-01-04 Yao Qi <yao@codesourcery.com>
646 * tracepoint.c (cmd_qtdp): Print debug message
647 for static tracepoint.
649 2012-01-04 Yao Qi <yao@codesourcery.com>
651 * tracepoint.c (trace_vdebug): Differentiate debug message
652 between gdbserver and IPA.
654 2012-01-03 Yao Qi <yao@codesourcery.com>
656 * tracepoint.c (tracepoint_was_hit): Don't collect for
659 2012-01-02 Joel Brobecker <brobecker@adacore.com>
661 * terminal.h: Reformat copyright header.
663 2012-01-02 Joel Brobecker <brobecker@adacore.com>
665 * server.c (gdbserver_version): Update copyright year.
666 * gdbreplay.c (gdbreplay_version): Likewise.
668 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
670 * linux-low.c (linux_create_inferior): Put empty if clause for write.
673 2011-12-18 Hui Zhu <teawater@gmail.com>
674 * linux-low.c (linux_create_inferior): Save return value to ret.
676 2011-12-18 Hui Zhu <teawater@gmail.com>
678 * linux-low.c (linux_create_inferior): Save return value to ret.
680 2011-12-16 Doug Evans <dje@google.com>
682 * linux-low.c (linux_create_inferior): If stdio connection,
683 redirect stdin from /dev/null, stdout to stderr.
684 * remote-utils.c (remote_is_stdio): New static global.
685 (remote_connection_is_stdio): New function.
686 (remote_prepare): Handle stdio connection.
687 (remote_open): Ditto.
688 (remote_close): Don't close stdin for stdio connections.
689 (read_prim,write_prim): New functions. Replace all calls to
691 * server.c (main): Watch for "-" argument. Move call to
692 remote_prepare before start_inferior.
693 * server.h (STDIO_CONNECTION_NAME): New macro.
694 (remote_connection_is_stdio): Declare.
696 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
699 2011-12-15 Yao Qi <yao@codesourcery.com>
701 * tracepoint.c: Include sys/syscall.h.
702 (gdb_ust_thread): Remove preprocessor conditional.
704 2011-12-14 Pedro Alves <pedro@codesourcery.com>
706 * linux-low.c (linux_detach_one_lwp): Call
707 the_low_target.prepare_to_resume before detaching.
709 2011-12-14 Yao Qi <yao@codesourcery.com>
711 * tracepoint.c (gdb_ust_thread): Don't ignore return value
714 2011-12-14 Yao Qi <yao@codesourcery.com>
716 * i386-low.c (i386_low_stopped_data_address): Initialize local
719 2011-12-13 Pedro Alves <pedro@codesourcery.com>
723 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
724 DR_CONTROL unless necessary. Extend comments.
725 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
726 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
728 2011-12-13 Yao Qi <yao@codesourcery.com>
730 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
732 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
734 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
736 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
737 Print new debug message for such case.
739 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
741 Fix overlapping memcpy.
742 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
743 the read_inferior_memory transfer.
744 (delete_fast_tracepoint_jump): New variable buf. Use it for the
745 write_inferior_memory transfer.
746 (set_fast_tracepoint_jump): New variable buf. Use it for the
747 read_inferior_memory and write_inferior_memory transfers.
748 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
749 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
750 Use it for the write_inferior_memory transfer.
751 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
754 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
756 * linux-low.c (fetch_register, store_register): Make code
757 consistent, fix formatting.
759 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
761 * linux-low.c (usr_store_inferior_registers): Factor out code
762 to handle individual registers into...
763 (store_register): ... this new function.
765 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
767 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
768 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
769 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
770 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
771 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
772 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
773 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
774 (srv_xmlfiles): Add new XML files.
776 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
778 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
779 (init_registers_s390_linux32v1): Add prototype.
780 (init_registers_s390_linux32v2): Likewise.
781 (init_registers_s390_linux64v1): Likewise.
782 (init_registers_s390_linux64v2): Likewise.
783 (init_registers_s390x_linux64v1): Likewise.
784 (init_registers_s390x_linux64v2): Likewise.
785 (s390_num_regs): Increment to 52.
786 (s390_regmap): Add orig_r2 register.
787 (s390_num_regs_3264): Increment to 68.
788 (s390_regmap_3264): Add orig_r2 register.
789 (s390_collect_ptrace_register): Handle orig_r2 register.
790 (s390_supply_ptrace_register): Likewise.
791 (s390_fill_last_break): New function.
792 (s390_store_last_break): Likewise.
793 (s390_fill_system_call): New function.
794 (s390_store_system_call): Likewise.
795 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
797 (s390_check_regset): New function.
798 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
799 NT_S390_SYSTEM_CALL regsets and use appropriate description.
800 Update target_regsets for available register sets.
802 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
803 Jan Kratochvil <jan.kratochvil@redhat.com>
805 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
806 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
808 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
809 * linux-low.h (struct process_info_private): New member r_debug.
810 * server.c (handle_qxfer_libraries): Call
811 the_target->qxfer_libraries_svr4.
812 (handle_qxfer_libraries_svr4): New function.
813 (qxfer_packets): New entry "libraries-svr4".
814 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
815 * target.h (struct target_ops): New member qxfer_libraries_svr4.
816 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
817 PACKET_qXfer_libraries_svr4.
819 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
821 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
822 PSW address/mask between 8-byte and 16-byte formats.
823 (s390_supply_ptrace_register): Likewise.
824 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
825 basic addressing mode bit.
827 2011-11-24 Stan Shebs <stan@codesourcery.com>
829 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
831 2011-11-17 Stan Shebs <stan@codesourcery.com>
833 * tracepoint.c (struct tracepoint): New field traceframe_usage.
834 (tracing_start_time): New global.
835 (tracing_stop_time): New global.
836 (tracing_user_name): New global.
837 (tracing_notes): New global.
838 (tracing_stop_note): New global.
839 (cmd_qtstart): Set traceframe_usage, start_time.
840 (stop_tracing): Set stop_time.
841 (cmd_qtstatus): Report additional status.
842 (cmd_qtp): New function.
843 (handle_tracepoint_query): Call it.
844 (cmd_qtnotes): New function.
845 (handle_tracepoint_general_set): Call it.
846 (get_timestamp): Rename from tsv_get_timestamp.
848 2011-11-14 Stan Shebs <stan@codesourcery.com>
849 Kwok Cheung Yeung <kcy@codesourcery.com>
851 * linux-x86-low.c (small_jump_insn): New.
852 (i386_install_fast_tracepoint_jump_pad): Add arguments for
853 trampoline and error message, build a trampoline and issue a small
854 jump instruction to it.
855 (x86_install_fast_tracepoint_jump_pad): Add arguments for
856 trampoline and error message.
857 (x86_get_min_fast_tracepoint_insn_len): New.
858 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
859 * linux-low.h (struct linux_target_ops): Add arguments to
860 install_fast_tracepoint_jump_pad operation, add new operation.
861 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
863 (linux_get_min_fast_tracepoint_insn_len): New function.
864 (linux_target_op): Add new operation.
865 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
866 (gdb_trampoline_buffer_end): Ditto.
867 (gdb_trampoline_buffer_error): Ditto.
868 (struct ipa_sym_addresses): Add fields for new IPA variables.
869 (symbol_list): Add entries for new IPA variables.
870 (struct tracepoint): Add fields to hold the address range of the
871 trampoline used by the tracepoint.
872 (trampoline_buffer_head): New static variable.
873 (trampoline_buffer_tail): Ditto.
874 (claim_trampoline_space): New function.
875 (have_fast_tracepoint_trampoline_buffer): New function.
876 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
878 (install_fast_tracepoint): Ditto, also add error buffer argument.
879 (cmd_qtminftpilen): New function.
880 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
881 (fast_tracepoint_from_trampoline_address): New function.
882 (fast_tracepoint_collecting): Handle trampoline as part of jump
884 (set_trampoline_buffer_space): New function.
885 (initialize_tracepoint): Initialize new IPA variables.
886 * target.h (struct target_ops): Add arguments to
887 install_fast_tracepoint_jump_pad operation, add new
888 get_min_fast_tracepoint_insn_len operation.
889 (target_get_min_fast_tracepoint_insn_len): New.
890 (install_fast_tracepoint_jump_pad): Add arguments.
891 * server.h (IPA_BUFSIZ): Define.
892 * linux-i386-ipa.c: Include extra header files.
893 (initialize_fast_tracepoint_trampoline_buffer): New function.
894 (initialize_low_tracepoint): Call it.
895 * server.h (set_trampoline_buffer_space): Declare.
896 (claim_trampoline_space): Ditto.
897 (have_fast_tracepoint_trampoline_buffer): Ditto.
899 2011-11-14 Yao Qi <yao@codesourcery.com>
901 * server.c (handle_query): Handle InstallInTrace for qSupported.
902 * tracepoint.c (add_tracepoint): Sort list.
903 (install_tracepoint, download_tracepoint): New.
904 (cmd_qtdp): Call them to install and download tracepoints.
905 (sort_tracepoints): Removed.
906 (cmd_qtstart): Update.
908 2011-11-14 Yao Qi <yao@codesourcery.com>
910 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
911 * mem-break.h: Declare.
912 * tracepoint.c (cmd_qtstart): Move some code to ...
913 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
915 (download_tracepoints): Move some code to ...
916 (download_tracepoint_1): ... here. New.
918 2011-11-08 Yao Qi <yao@codesourcery.com>
920 * remote-utils.c (relocate_instruction): A comment fix.
922 2011-11-07 Joel Brobecker <brobecker@adacore.com>
924 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
925 (i386_dr_low_get_control, i386_dr_low_get_status): Use
926 dr_status_mirror and dr_control_mirror from debug_reg_state.
927 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
928 (i386_initial_stuff): Remove use of deleted globals.
929 (i386_get_thread_context, i386_set_thread_context,
930 i386_thread_added): Use dr_status_mirror and dr_control_mirror
931 from debug_reg_state.
933 2011-11-05 Yao Qi <yao@codesourcery.com>
935 * tracepoint.c (gdb_collect): Loop over tracepoints of same
938 2011-11-02 Stan Shebs <stan@codesourcery.com>
940 * tracepoint.c (agent_mem_read_string): New function.
941 (eval_agent_expr): Call it for tracenz.
942 * server.c (handle_query): Report support for tracenz.
944 2011-11-02 Yao Qi <yao@codesourcery.com>
946 * tracepoint.c (cmd_qtstart): Remove unused local variables.
948 2011-11-02 Yao Qi <yao@codesourcery.com>
950 * target.h: Fix a typo in comment.
952 2011-10-31 Pedro Alves <pedro@codesourcery.com>
954 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
955 clobber the breakpoints' shadows with fast tracepoint jumps.
956 * mem-break.h (check_mem_write): Add `myaddr' parameter.
957 * target.c (write_inferior_memory): Also pass MYADDR down to
960 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
962 * configure.ac: Check support for personality routine.
963 * configure: Regenerate.
964 * config.in: Likewise.
965 * linux-low.c: Include <sys/personality.h>.
966 Define ADDR_NO_RANDOMIZE if necessary.
967 (linux_create_inferior): Disable address space randomization when
968 forking inferior, if requested.
969 (linux_supports_disable_randomization): New function.
970 (linux_target_ops): Install it.
971 * server.h (disable_randomization): Declare.
972 * server.c (disable_randomization): New global variable.
973 (handle_general_set): Handle QDisableRandomization.
974 (handle_query): Likewise for qSupported.
975 (main): Support --disable-randomization and --no-disable-randomization
976 command line arguments.
977 * target.h (struct target_ops): Add supports_disable_randomization.
978 (target_supports_disable_randomization): New macro.
980 2011-09-29 Mike Frysinger <vapier@gentoo.org>
982 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
984 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
985 [!PT_GETDSBT] (target_loadmap): New definition.
986 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
987 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
988 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
989 and PT_GETDSBT to LINUX_LOADMAP.
990 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
991 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
993 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
995 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
996 (arm_linux_hwbp_cap): New static variable.
997 (arm_linux_get_hwbp_cap): Replace by ...
998 (arm_linux_init_hwbp_cap): ... this new function.
999 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1000 (arm_linux_get_hw_watchpoint_count): Likewise.
1001 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1002 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1003 (arm_prepare_to_resume): Use perror_with_name instead of error.
1005 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1007 * linux-arm-low.c: Include <signal.h>.
1008 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1009 (struct arm_linux_hwbp_cap): New data type.
1010 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1011 (struct arm_linux_hw_breakpoint): New data type.
1012 (MAX_BPTS, MAX_WPTS): Define.
1013 (struct arch_process_info, struct arch_lwp_info): New data types.
1014 (arm_linux_get_hwbp_cap): New function.
1015 (arm_linux_get_hw_breakpoint_count): Likewise.
1016 (arm_linux_get_hw_watchpoint_count): Likewise.
1017 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1018 (arm_hwbp_control_initialize): Likewise.
1019 (arm_hwbp_control_is_enabled): Likewise.
1020 (arm_hwbp_control_is_initialized): Likewise.
1021 (arm_hwbp_control_disable): Likewise.
1022 (arm_linux_hw_breakpoint_equal): Likewise.
1023 (arm_linux_hw_point_initialize): Likewise.
1024 (struct update_registers_data): New data structure.
1025 (update_registers_callback: New function.
1026 (arm_insert_point): Likewise.
1027 (arm_remove_point): Likewise.
1028 (arm_stopped_by_watchpoint): Likewise.
1029 (arm_stopped_data_address): Likewise.
1030 (arm_new_process): Likewise.
1031 (arm_new_thread): Likewise.
1032 (arm_prepare_to_resume): Likewise.
1033 (the_low_target): Register arm_insert_point, arm_remove_point,
1034 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1035 arm_new_thread, and arm_prepare_to_resume.
1037 2011-09-15 Stan Shebs <stan@codesourcery.com>
1039 * server.h (struct emit_ops): Add compare-goto fields.
1040 * tracepoint.c (gdb_agent_op_sizes): New table.
1041 (emit_eq_goto): New function.
1042 (emit_ne_goto): New function.
1043 (emit_lt_goto): New function.
1044 (emit_le_goto): New function.
1045 (emit_gt_goto): New function.
1046 (emit_ge_goto): New function.
1047 (is_goto_target): New function.
1048 (compile_bytecodes): Recognize special cases of compare-goto
1049 combinations and call specialized emitters for them.
1050 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1051 (amd64_emit_ne_goto): New function.
1052 (amd64_emit_lt_goto): New function.
1053 (amd64_emit_le_goto): New function.
1054 (amd64_emit_gt_goto): New function.
1055 (amd64_emit_ge_goto): New function.
1056 (amd64_emit_ops): Add the new functions.
1057 (i386_emit_eq_goto): New function.
1058 (i386_emit_ne_goto): New function.
1059 (i386_emit_lt_goto): New function.
1060 (i386_emit_le_goto): New function.
1061 (i386_emit_gt_goto): New function.
1062 (i386_emit_ge_goto): New function.
1063 (i386_emit_ops): Add the new functions.
1065 2011-09-08 Stan Shebs <stan@codesourcery.com>
1067 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1068 (i386_emit_epilogue): Restore %ebx.
1070 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1072 * server.c (step_thread): Remove definition.
1073 (process_serial_event): Don't handle Hs.
1074 * server.h (step_thread): Remove declaration.
1075 * target.c (set_desired_inferior): Remove use of step_thread.
1077 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1079 * linux-low.c: Include linux-procfs.h.
1080 (linux_attach_lwp_1): Update comments.
1081 (linux_attach): Scan for existing threads when attaching to a
1082 process that is the tgid.
1083 * Makefile.in: Update dependencies.
1085 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1087 * configure.srv: Add linux-procfs.o dependencies.
1089 2011-08-14 Yao Qi <yao@codesourcery.com>
1091 * target.h (struct target_ops): Fix indent.
1092 * win32-low.c (win32_target_ops): Fix comment.
1094 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1095 Yao Qi <yao@codesourcery.com>
1097 * Makefile.in (clean): Remove tic6x-*.c files.
1098 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1099 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1100 (tic6x-c64xp-linux.c): Likewise.
1101 * configure.srv: Add support for tic6x-*-uclinux.
1102 * linux-tic6x-low.c: New.
1103 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1105 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1106 Yao Qi <yao@codesourcery.com>
1108 * target.h (struct target_ops): Add read_loadmap.
1109 * linux-low.c (struct target_loadseg): New type.
1110 (struct target_loadmap): New type.
1111 (linux_read_loadmap): New function.
1112 (linux_target_ops): Add linux_read_loadmap.
1113 * server.c (handle_query): Support qXfer:fdpic:read packet.
1114 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1116 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1118 * win32-low.c: Include <stdint.h>.
1120 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1122 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1123 to the inferior here.
1124 (i386_remove_aligned_watchpoint): Ditto.
1125 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1126 fit part of the watchpoint in the debug registers.
1127 (i386_update_inferior_debug_regs): New.
1128 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1129 registers, and only update the inferior on success.
1130 (i386_low_remove_watchpoint): Ditto.
1132 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1134 * linux-low.c (compare_ints, unique, list_threads, show_process,
1135 linux_core_of_thread): Delete.
1136 (linux_target_ops): Change linux_core_of_thread to
1137 linux_common_core_of_thread.
1138 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1139 * utils.c (malloc_failure): Change type of argument.
1140 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1141 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1142 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1143 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1144 (IPA_OBJS): Add common-utils-ipa.o.
1145 (ptid_h, linux_osdata_h): New macros.
1146 (server_h): Add common/common-utils.h, common/xml-utils.h,
1147 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1149 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1150 ptid.o, buffer.o): New rules.
1151 (linux-low.o): Add common/linux-osdata.h as a dependency.
1152 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1153 * configure.ac: Add AC_HEADER_DIRENT check.
1154 * config.in: Regenerate.
1155 * configure: Regenerate.
1156 * remote-utils.c (xml_escape_text): Delete.
1157 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1158 buffer_xml_printf): Move to common/buffer.c.
1159 * server.c (main): Remove call to initialize_inferiors.
1160 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1161 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1162 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1163 internal_error, gdb_assert, gdb_assert_fail): Delete.
1164 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1165 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1167 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1168 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1169 initialize_inferiors): Delete.
1171 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1173 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1176 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1178 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1180 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1182 2011-05-26 Yao Qi <yao@codesourcery.com>
1184 * Makefile.in (thread-db.o): Track dependence to
1185 common/gdb_thread_db.h.
1186 * thread-db.c: include gdb_thread_db.h from right place.
1188 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1190 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1191 __FILE__ and __LINE__ to internal_error.
1193 2011-05-13 Doug Evans <dje@google.com>
1195 * thread-db.c (try_thread_db_load_from_sdir): New function.
1196 (try_thread_db_load_from_dir): New function.
1197 (thread_db_load_search): Handle $sdir, ignore $pdir.
1198 Remove trying of system directories if search of
1199 libthread-db-search-path fails, that is now done via $sdir.
1201 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1203 * server.c (handle_query): Add EnableDisableTracepoints to the list
1204 of supported features.
1205 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1207 (cmd_qtenable_disable): New.
1208 (cmd_qtstart): Install tracepoints even if disabled.
1209 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1210 receiving a QTEnable or QTDisable packet.
1211 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1212 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1214 (gdb_probe): Skip data collection if static tracepoint is disabled.
1216 2011-05-10 Doug Evans <dje@google.com>
1218 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1220 2011-05-04 Doug Evans <dje@google.com>
1222 * linux-low.c (linux_join): Skip process lookup.
1223 * spu-low.c (spu_join): Ditto.
1224 * server.c (join_inferiors_callback): Delete.
1225 (process_serial_event): For 'D' packet (detach) call join_inferior
1228 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1230 * README: Don't mention xscale*-*-linux*.
1231 * configure.srv (xscale*-*-linux*): Don't handle target.
1233 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1235 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1237 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1238 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1239 (i386_emit_void_call_2): Likewise.
1241 2011-04-26 Yao Qi <yao@codesourcery.com>
1243 * linux-low.c: Move common macros to linux-ptrace.h.
1244 Include linux-ptrace.h.
1245 * Makefile.in (linux_ptrace_h): New.
1246 (linux-low.o): Depends on linux-ptrace.h.
1248 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1250 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1251 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1252 (remote_prepare): New function with most of the TCP code from ...
1253 (remote_open): ... here. Detect PORT here unconditionally. Move also
1254 setting transport_is_reliable.
1255 * server.c (run_once): New variable.
1256 (gdbserver_usage): Document it.
1257 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1258 the first run if RUN_ONCE.
1259 * server.h (run_once, remote_prepare): New declarations.
1261 2011-04-19 Tom Tromey <tromey@redhat.com>
1263 * win32-low.c (handle_load_dll): Remove duplicate "the".
1265 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1267 Remove support for old Cygwin 1.5 versions.
1268 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1269 function to avoid warning.
1270 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1273 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1275 * gdbserver/server.h (Macro _): Define it if not available.
1277 2011-03-14 Michael Snyder <msnyder@vmware.com>
1279 * hostio.c (handle_close): Remove unnecessary null test.
1281 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1283 * Makefile.in (maintainer-clean realclean distclean): Remove
1284 "make ... subdir_do" command.
1286 2011-03-10 Michael Snyder <msnyder@vmware.com>
1288 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1290 * server.c (handle_v_run): Free alloced buffer on early return.
1292 2011-03-09 Yao Qi <yao@codesourcery.com>
1295 2011-03-04 Yao Qi <yao@codesourcery.com>
1297 * Makefile.in: Remove GNU make feature --directory.
1299 2011-03-05 Yao Qi <yao@codesourcery.com>
1301 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1302 (subdir_do): New make target. Copied from gdb/Makefile.
1303 (maintainer-clean, realclean, distclean, clean): Call corresponding
1304 make targets in common/Makefile.
1306 2011-02-11 Yao Qi <yao@codesourcery.com>
1308 * configure.ac: Call AC_PROG_RANLIB.
1309 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1310 * configure: Regenerate.
1312 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1314 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1316 2011-03-06 Yao Qi <yao@codesourcery.com>
1318 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1320 2011-03-05 Yao Qi <yao@codesourcery.com>
1322 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1323 (subdir_do): New make target. Copied from gdb/Makefile.
1324 (maintainer-clean, realclean, distclean, clean): Call corresponding
1325 make targets in common/Makefile.
1327 2011-03-04 Yao Qi <yao@codesourcery.com>
1329 * Makefile.in: Remove GNU make feature --directory.
1331 2011-03-04 Michael Snyder <msnyder@vmware.com>
1333 * server.c (queue_stop_reply): Call xmalloc not malloc.
1335 2011-03-02 Michael Snyder <msnyder@vmware.com>
1337 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1339 2011-02-28 Michael Snyder <msnyder@vmware.com>
1341 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1342 (cmd_qtframe): Ditto.
1343 (cmd_qtbuffer): Ditto.
1344 (cmd_bigqtbuffer): Ditto.
1346 * utils.c (decimal2str): Initialize 'width' to nine, then
1349 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1351 * hostio.c (require_data): Free *data, not data.
1353 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1355 * hostio.c (require_data): Use free, not xfree.
1357 2011-02-27 Michael Snyder <msnyder@vmware.com>
1359 * server.c (handle_query): Discard unused value.
1361 * hostio.c (require_data): Free malloc memory before returning
1364 2011-02-26 Michael Snyder <msnyder@vmware.com>
1366 * linux-low.c (list_threads): Call closedir for dirent.
1368 2011-02-27 Michael Snyder <msnyder@vmware.com>
1370 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1371 a case statement falls through.
1373 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1375 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1378 2011-02-26 Michael Snyder <msnyder@vmware.com>
1380 * utils.c (decimal2str): Eliminate dead code and dead param.
1381 (pulongest): Drop dead param from call to decimal2str.
1384 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1386 Revert the following patch (not approved yet):
1387 2011-02-21 Hui Zhu <teawater@gmail.com>
1388 * tracepoint.c (tp_printf): New function.
1389 (eval_agent_expr): Handle gdb_agent_op_printf.
1391 2011-02-21 Hui Zhu <teawater@gmail.com>
1393 * tracepoint.c (tp_printf): New function.
1394 (eval_agent_expr): Handle gdb_agent_op_printf.
1396 2011-02-18 Tom Tromey <tromey@redhat.com>
1398 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1399 (tracepoint.o): Likewise.
1400 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1401 (gdb_agent_op_names): Likewise.
1403 2011-02-18 Tom Tromey <tromey@redhat.com>
1405 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1406 gdb_agent_op_rot>: New constants.
1407 (gdb_agent_op_names): Add pick and roll.
1408 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1411 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1413 * aclocal.m4: Regenerated with aclocal-1.11.1.
1415 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1417 * server.c (handle_qxfer_traceframe_info): New.
1418 (qxfer_packets): Register "traceframe-info".
1419 (handle_query): Report support for qXfer:traceframe-info:read+.
1420 * tracepoint.c (match_blocktype): New.
1421 (traceframe_find_block_type): Rename to ...
1422 (traceframe_walk_blocks): ... this. Add callback filter argument,
1424 (traceframe_find_block_type): New, reimplemented on top of
1425 traceframe_walk_blocks.
1426 (build_traceframe_info_xml): New.
1427 (traceframe_read_info): New.
1428 * server.h (traceframe_read_info): Declare.
1430 2011-02-11 Yao Qi <yao@codesourcery.com>
1432 * configure.ac: Call AC_PROG_RANLIB.
1433 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1434 * configure: Regenerate.
1436 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1438 * server.c (gdb_read_memory): Change return semantics to allow
1440 (handle_search_memory_1): Adjust.
1441 (process_serial_event) <'m' packet>: Handle partial transfers.
1442 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1444 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1446 * regcache.c (init_register_cache): Initialize
1447 regcache->register_status.
1448 (free_register_cache): Release regcache->register_status.
1449 (regcache_cpy): Copy register_status.
1450 (registers_to_string): Print 'x's for unavailable registers.
1451 (supply_register): Mark the register's status valid or
1452 unavailable, depending on whether a buffer was passed in or not.
1453 (supply_register_zeroed): New.
1454 (supply_regblock): Mark the registers' status valid or
1455 unavailable, depending on whether a buffer was passed in or not.
1456 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1457 (struct regcache): New `register_status' field.
1458 (supply_register_zeroed): Declare.
1459 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1460 supply_register_zeroed, rather than passing a NULL buffer to
1462 * tracepoint.c (fetch_traceframe_registers): Update comment.
1464 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1466 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1469 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1471 * server.h (decode_xfer_write): Change prototype.
1472 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1473 and don't extract the annex here.
1474 * server.c (decode_xfer_read): Remove `annex' parameter,
1475 and don't extract the annex here.
1477 (struct qxfer): New.
1478 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1479 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1480 (handle_qxfer_statictrace): New functions, abstracted out from
1481 handle_query, and made to use the struct qxfer interface.
1482 (handle_threads_qxfer_proper): Rename to ...
1483 (handle_qxfer_threads_proper): ... this.
1484 (handle_threads_qxfer): Rename to ...
1485 (handle_qxfer_threads): ... this. Adjust.
1486 (qxfer_packets): New array.
1487 (handle_qxfer): New function.
1488 (handle_query): Use handle_qxfer.
1490 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1492 * gdbreplay.c: Shorten lines of >= 80 columns.
1493 * linux-low.c: Ditto.
1494 * linux-ppc-low.c: Ditto.
1495 * linux-s390-low.c: Ditto.
1496 * linux-sparc-low.c: Ditto.
1497 * linux-x86-low.c: Ditto.
1498 * linux-xtensa-low.c: Ditto.
1499 * mem-break.c: Ditto.
1501 * regcache.h: Ditto.
1502 * remote-utils.c: Ditto.
1505 * thread-db.c: Ditto.
1506 * tracepoint.c: Ditto.
1508 * win32-low.h: Ditto.
1510 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1512 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1515 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1517 * server.c (gdbserver_version): Update copyright year in version
1519 * gdbreplay.c (gdbreplay_version): Ditto.
1521 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1523 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1524 * linux-bfin-low.c: New file.
1525 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1526 PT_DATA_ADDR for BFIN targets.
1527 * Makefile.in (SFILES): Add linux-bfin-low.c.
1528 (clean): Remove reg-bfin.c.
1529 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1530 * README: Mention supported Blackfin targets.
1532 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1534 * .gitignore: New file.
1536 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1538 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1540 2010-10-22 Jie Zhang <jie@codesourcery.com>
1542 * Makefile.in: Add FLAGS_TO_PASS variable.
1543 (install): Remove dependency of install-only and recursively
1544 invoke make for install-only.
1546 2010-10-04 Doug Evans <dje@google.com>
1548 * Makefile.in (uninstall): Use $(DESTDIR).
1550 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1554 * linux-x86-low.c (compat_siginfo_from_siginfo)
1555 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1556 si_code is < 0. Check for si_code == SI_TIMER before checking for
1559 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1561 * lynx-i386-low.c: New file.
1562 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1564 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1566 * lynx-low.c (ptrace_request_to_str): Remove handling for
1567 request values that have been removed in LynxOS 5.x.
1569 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1571 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1574 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1576 * configure.ac: Add --enable-inprocess-agent option.
1577 * configure: Rebuilt.
1579 2010-09-06 Yao Qi <yao@codesourcery.com>
1581 * linux-low.c (linux_kill): Remove unused variable.
1582 (linux_stabilize_threads): Likewise.
1583 * server.c (start_inferior): Likewise.
1584 (queue_stop_reply_callback): Likewise.
1585 * tracepoint.c (do_action_at_tracepoint): Likewise.
1587 2010-09-06 Yao Qi <yao@codesourcery.com>
1589 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1592 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1594 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1596 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1598 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1603 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1604 gdbserver/lynx-ppc-low.c: New files.
1605 * Makefile.in (lynx_low_h): New variable.
1606 (lynx-low.o, lynx-ppc-low.o): New rules.
1607 * configure.ac: On LynxOS, link with -lnetinet.
1608 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1609 * configure: regenerate.
1611 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1613 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1614 * configure.ac: Add check for vasprintf and vsnprintf.
1615 * configure, config.in: Regenerate.
1616 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1618 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1620 * gdbreplay.c: Move include of alloca.h up, next to include of
1622 * server.h: Add include of malloc.h.
1623 * mem-break.c: Remove include of malloc.h.
1624 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1626 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1628 * Makefile.in (memmem.o): Build with -Wno-error.
1630 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1632 * utils.c (xsnprintf): Make non-static.
1633 * server.h: Add xsnprintf declaration.
1634 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1635 replace calls to snprintf by calls to xsnprintf throughout.
1637 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1639 * configure.ac: Add configure check for alloca.
1640 * configure, config.in: Regenerate.
1641 * server.h: Include alloca.h if it exists.
1642 * gdbreplay.c: Include alloca.h if it exists.
1644 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1646 * linux-low.c (__SIGRTMIN): Define if not already defined.
1647 (linux_create_inferior): Check for __ANDROID__ rather than
1649 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1650 are already deferred.
1651 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1652 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1653 stopped and already has a pending signal to report.
1654 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1655 a pending signal to report or is moving out of a jump pad.
1656 (linux_init_signals): Check for __ANDROID__ rather than
1659 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1661 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1662 debug_threads check. Avoid a linear search when not doing debug
1665 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1667 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1668 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1669 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1670 (process_event): Change local fd's type to gdb_fildes_t.
1671 (create_file_handler): Adjust prototype.
1672 (delete_file_handler): Adjust prototype.
1673 (handle_file_event): Adjust prototype. Use pfildes.
1674 (create_file_event): Adjsut prototype.
1675 * remote-utils.c (remote_desc, listen_desc): Change type to
1677 * server.h: New gdb_fildes_t typedef.
1678 [USE_WIN32API]: Include winsock2.h.
1679 (delete_file_handler, add_file_handler): Adjust prototypes.
1681 * utils.c (pfildes): New.
1683 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1685 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1686 * configure: Regenerate.
1688 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1690 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1691 (linux_done_accessing_memory): ... this.
1692 (linux_target_ops): Adjust.
1693 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1694 * nto-low.c (nto_target_ops): Adjust comment.
1695 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1696 * spu-low.c (spu_target_ops): Adjust comment.
1697 * target.h (target_ops): Rename unprepare_to_access_memory field
1698 to done_accessing_memory.
1699 (unprepare_to_access_memory): Rename to ...
1700 (done_accessing_memory): ... this.
1702 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1704 * linux-low.c (linux_prepare_to_access_memory): New.
1705 (linux_unprepare_to_access_memory): New.
1706 (linux_target_ops): Install them.
1707 * server.c (read_memory): Rename to ...
1708 (gdb_read_memory): ... this. Use
1709 prepare_to_access_memory/prepare_to_access_memory.
1710 (write_memory): Rename to ...
1711 (gdb_write_memory): ... this. Use
1712 prepare_to_access_memory/prepare_to_access_memory.
1713 (handle_search_memory_1): Adjust.
1714 (process_serial_event): Adjust.
1715 * target.h (struct target_ops): New fields
1716 prepare_to_access_memory and unprepare_to_access_memory.
1717 (prepare_to_access_memory, unprepare_to_access_memory): New.
1718 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1719 prepare_to_access_memory/prepare_to_access_memory.
1720 * nto-low.c (nto_target_ops): Adjust.
1721 * spu-low.c (spu_target_ops): Adjust.
1722 * win32-low.c (win32_target_ops): Adjust.
1724 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1726 * Makefile.in (WARN_CFLAGS): Get it from configure.
1727 (WERROR_CFLAGS): New.
1728 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1729 * configure.ac: Introduce --enable-werror, which adds -Werror to
1730 the compiler command line. Enabled by default. Disable with
1731 --disable-werror. Add -Wdeclaration-after-statement
1732 Wpointer-arith and -Wformat-nonliteral to warning flags.
1733 * configure: Regenerate.
1735 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1737 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1739 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1741 * gdbreplay.c (remote_error): New.
1743 (expect): Use gdbchar. Check for error reading from GDB.
1744 Clarify sync error output.
1745 (play): Check for errors writing to GDB.
1746 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1747 * remote-utils.c (getpkt): Check for errors writing to the remote
1750 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1752 * linux-low.c (linux_wait_1): Move non-debugging code out of
1753 `debug_threads' control.
1755 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1757 * linux-low.c (linux_wait_1): Don't set last_status here.
1758 * server.c (push_event, queue_stop_reply_callback): Assert we're
1759 not pushing a TARGET_WAITKIND_IGNORE event.
1760 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1761 (myresume, handle_target_event): Set the thread's last_resume_kind
1762 and last_status from the target returned status.
1764 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1768 * linux-x86-low.c (update_debug_registers_callback): New.
1769 (i386_dr_low_set_addr): Use it.
1770 (i386_dr_low_get_addr): New.
1771 (i386_dr_low_set_control): Use update_debug_registers_callback.
1772 (i386_dr_low_get_control): New.
1773 (i386_dr_low_get_status): Adjust.
1774 * linux-low.c (linux_stop_lwp): New.
1775 * linux-low.h (linux_stop_lwp): Declare.
1777 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1778 argument instead of a i386_debug_reg_state.
1779 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1780 a i386_debug_reg_state.
1781 (i386_insert_aligned_watchpoint): Adjust.
1782 (i386_remove_aligned_watchpoint): Adjust.
1783 (i386_low_stopped_data_address): Read the debug registers from the
1784 inferior instead of from the mirrors.
1785 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1786 (i386_dr_low_get_addr): Declare.
1787 (i386_dr_low_get_control): Declare.
1788 (i386_dr_low_get_status): Change prototype.
1790 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1791 (i386_dr_low_get_addr): New.
1792 (i386_dr_low_get_control): New.
1793 (i386_dr_low_get_status): Adjust prototype. Return
1795 (i386_initial_stuff): Clear dr_status_mirror and
1797 (i386_get_thread_context): Adjust.
1798 (i386_set_thread_context): Adjust.
1799 (i386_thread_added): Adjust.
1801 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1803 * linux-low.h (linux_thread_area): Delete declaration.
1805 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1807 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1808 after its termination.
1810 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1812 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1813 (gdb_wants_all_stopped): Delete.
1814 (linux_wait_1): Don't call them.
1815 * server.c (handle_v_cont): Tag all threads as want-stopped.
1816 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1817 stopped as "client-wants-stopped".
1819 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1821 * Makefile.in (signals_h): New.
1822 (server_h): Depend on it.
1823 (server.o): Don't depend on $(signals_def).
1824 (signals.o): Depend on $(signals_def).
1826 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1828 * Makefile.in (signals_def): New.
1829 (server_h): Append include/gdb/signals.h and signals_def.
1830 (server.o): Append signals_def.
1832 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1834 * server.c (handle_target_event): Use target_signal_to_host for
1835 resume_info.sig initialization.
1836 * target.h (struct thread_resume) <sig>: New comment.
1838 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1840 * server.c (handle_query): strcpy() the returned string from paddress()
1841 instead of sprintf().
1842 * utils.c (paddress): Return phex_nz().
1844 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1846 * server.c (handle_v_cont): Call mourn_inferior if process
1848 (myresume): Likewise.
1850 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1852 Static tracepoints, and integration with UST.
1854 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1855 * mem-break.c (uninsert_all_breakpoints)
1856 (reinsert_all_breakpoints): New.
1857 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1858 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1859 (gdb_agent_ust_loaded, helper_thread_id)
1860 (gdb_agent_helper_thread_id): New macros.
1861 (struct ipa_sym_addresses): Add addr_ust_loaded,
1862 addr_helper_thread_id, addr_cmd_buf.
1863 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1864 (in_process_agent_loaded_ust): New.
1865 (write_e_ust_not_loaded): New.
1866 (maybe_write_ipa_ust_not_loaded): New.
1867 (struct collect_static_trace_data_action): New.
1868 (enum tracepoint_type) <static_tracepoint>: New.
1869 (struct tracepoint) <handle>: Mention static tracepoints.
1870 (struct static_tracepoint_ctx): New.
1871 (CMD_BUF_SIZE): New.
1872 (add_tracepoint_action): Handle static tracepoint actions.
1873 (unprobe_marker_at): New.
1874 (clear_installed_tracepoints): Handle static tracepoints.
1875 (cmd_qtdp): Handle static tracepoints.
1876 (probe_marker_at): New.
1877 (cmd_qtstart): Handle static tracepoints.
1878 (response_tracepoint): Handle static tracepoints.
1879 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1880 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1881 (get_context_regcache): Handle static tracepoints.
1882 (do_action_at_tracepoint): Handle static tracepoint actions.
1883 (traceframe_find_block_type): Handle static trace data blocks.
1884 (traceframe_read_sdata): New.
1885 (download_tracepoints): Download static tracepoint actions.
1886 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1887 (GDB_PROBE_NAME): New.
1892 (ust_marker_to_static_tracepoint): New.
1894 (collect_ust_data_at_tracepoint): New.
1895 (gdb_ust_probe): New.
1896 (UNIX_PATH_MAX, SOCK_DIR): New.
1897 (gdb_ust_connect_sync_socket): New.
1898 (resume_thread, stop_thread): New.
1899 (run_inferior_command): New.
1900 (init_named_socket): New.
1901 (gdb_ust_socket_init): New.
1902 (cstr_to_hexstr): New.
1904 (first_marker, next_marker): New.
1905 (response_ust_marker): New.
1906 (cmd_qtfstm, cmd_qtsstm): New.
1907 (unprobe_marker_at, probe_marker_at): New.
1908 (cmd_qtstmat, gdb_ust_thread): New.
1909 (gdb_ust_init): New.
1910 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1911 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1913 (x86_64_st_collect_regmap): New.
1914 (X86_64_NUM_ST_COLLECT_GREGS): New.
1915 (AMD64_RIP_REGNUM): New.
1916 (supply_static_tracepoint_registers): New.
1917 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1919 (i386_st_collect_regmap): New.
1920 (i386_NUM_ST_COLLECT_GREGS): New.
1921 (supply_static_tracepoint_registers): New.
1922 * server.c (handle_query): Handle qXfer:statictrace:read.
1923 <qSupported>: Report support for StaticTracepoints, and
1924 qXfer:statictrace:read features.
1925 * server.h (traceframe_read_sdata)
1926 (supply_static_tracepoint_registers): Declare.
1927 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1928 (unpack_varlen_hex): Include in IPA build.
1929 * Makefile.in (ustlibs, ustinc): New.
1930 (IPA_OBJS): Add remote-utils-ipa.o.
1931 ($(IPA_LIB)): Link -ldl and -lpthread.
1933 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1934 * config.in, configure: Regenerate.
1936 2010-06-20 Ian Lance Taylor <iant@google.com>
1937 Pedro Alves <pedro@codesourcery.com>
1939 * linux-x86-low.c (always_true): Delete.
1940 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1941 trying to fool the compiler with always_true.
1943 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1945 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1946 conditions in gdbserver.
1948 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1950 * spu-low.c (spu_read_memory): Wrap around local store limit.
1951 (spu_write_memory): Likewise.
1953 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1955 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1956 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1958 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1960 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1961 uses with LONGEST uses.
1963 2010-06-14 Stan Shebs <stan@codesourcery.com>
1964 Pedro Alves <pedro@codesourcery.com>
1968 * linux-x86-low.c: Include limits.h.
1973 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1974 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1975 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1976 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1977 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1978 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1979 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1980 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1981 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1982 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1983 (amd64_emit_void_call_2): New.
1984 (amd64_emit_ops): New.
1985 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1986 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1987 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1988 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1989 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1990 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1991 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1992 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1993 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1994 (i386_emit_stack_adjust, i386_emit_int_call_1)
1995 (i386_emit_void_call_2): New.
1996 (i386_emit_ops): New.
1997 (x86_emit_ops): New.
1998 (the_low_target): Install x86_emit_ops.
1999 * server.h (struct emit_ops): New.
2000 (get_raw_reg_func_addr): Declare.
2001 (current_insn_ptr, emit_error): Declare.
2002 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2003 (set_trace_state_variable_value): New defines.
2004 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2005 addr_get_trace_state_variable_value and
2006 addr_set_trace_state_variable_value.
2007 (symbol_list): New fields for get_raw_reg,
2008 get_trace_state_variable_value and set_trace_state_variable_value.
2009 (condfn): New typedef.
2010 (struct tracepoint): New field `compiled_cond'.
2011 (do_action_at_tracepoint): Clear compiled_cond.
2012 (get_trace_state_variable_value, set_trace_state_variable_value):
2014 (condition_true_at_tracepoint): If there's a compiled condition,
2016 (current_insn_ptr, emit_error): New globals.
2017 (struct bytecode_address): New.
2018 (get_raw_reg_func_addr): New.
2019 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2020 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2021 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2022 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2023 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2024 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2025 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2026 (compile_tracepoint_condition, compile_bytecodes): New.
2027 * target.h (emit_ops): Forward declare.
2028 (struct target_ops): New field emit_ops.
2029 (target_emit_ops): New.
2030 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2031 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2032 * linux-low.c (linux_emit_ops): New.
2033 (linux_target_ops): Install it.
2034 * linux-low.h (struct linux_target_ops): New field emit_ops.
2036 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2038 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2039 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2041 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2042 Stan Shebs <stan@codesourcery.com>
2044 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2045 (all): Depend on $(extra_libraries).
2046 (install-only): Install the IPA.
2047 (IPA_OBJS, IPA_LIB): New.
2048 (clean): Remove the IPA lib.
2049 (IPAGENT_CFLAGS): New.
2050 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2051 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2052 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2053 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2054 * configure.ac: Check for atomic builtins support in the compiler.
2055 (IPA_DEPFILES, extra_libraries): Define.
2056 * configure.srv (ipa_obj): Add description.
2057 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2058 (i[34567]86-*-linux*): Set ipa_obj.
2059 (x86_64-*-linux*): Set ipa_obj.
2060 * linux-low.c (stabilizing_threads): New.
2061 (supports_fast_tracepoints): New.
2062 (linux_detach): Stabilize threads before detaching.
2063 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2064 the lwp is either not stabilizing, or is moving out of a jump pad.
2065 (linux_fast_tracepoint_collecting): New.
2066 (maybe_move_out_of_jump_pad): New.
2067 (enqueue_one_deferred_signal): New.
2068 (dequeue_one_deferred_signal): New.
2069 (linux_wait_for_event_1): If moving out of a jump pad, defer
2070 pending signals to later.
2071 (linux_stabilize_threads): New.
2072 (linux_wait_1): Check if threads need moving out of jump pads, and
2074 (stuck_in_jump_pad_callback): New.
2075 (move_out_of_jump_pad_callback): New.
2077 (linux_resume_one_lwp): Handle moving out of jump pads.
2078 (linux_set_resume_request): Dequeue deferred signals.
2079 (need_step_over_p): Also step over fast tracepoint jumps.
2080 (start_step_over): Also uninsert fast tracepoint jumps.
2081 (finish_step_over): Also reinsert fast tracepoint jumps.
2082 (linux_install_fast_tracepoint_jump): New.
2083 (linux_target_ops): Install linux_stabilize_threads and
2084 linux_install_fast_tracepoint_jump_pad.
2085 * linux-low.h (linux_target_ops) <get_thread_area,
2086 install_fast_tracepoint_jump_pad>: New fields.
2087 (struct lwp_info) <collecting_fast_tracepoint,
2088 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2089 (linux_get_thread_area): Declare.
2090 * linux-x86-low.c (jump_insn): New.
2091 (x86_get_thread_area): New.
2092 (append_insns): New.
2094 (amd64_install_fast_tracepoint_jump_pad): New.
2095 (i386_install_fast_tracepoint_jump_pad): New.
2096 (x86_install_fast_tracepoint_jump_pad): New.
2097 (the_low_target): Install x86_get_thread_area and
2098 x86_install_fast_tracepoint_jump_pad.
2099 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2100 (struct fast_tracepoint_jump): New.
2101 (fast_tracepoint_jump_insn): New.
2102 (fast_tracepoint_jump_shadow): New.
2103 (find_fast_tracepoint_jump_at): New.
2104 (fast_tracepoint_jump_here): New.
2105 (delete_fast_tracepoint_jump): New.
2106 (set_fast_tracepoint_jump): New.
2107 (uninsert_fast_tracepoint_jumps_at): New.
2108 (reinsert_fast_tracepoint_jumps_at): New.
2109 (set_breakpoint_at): Use write_inferior_memory.
2110 (uninsert_raw_breakpoint): Use write_inferior_memory.
2111 (check_mem_read): Mask out fast tracepoint jumps.
2112 (check_mem_write): Mask out fast tracepoint jumps.
2113 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2114 (set_fast_tracepoint_jump): Declare.
2115 (delete_fast_tracepoint_jump)
2116 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2117 (reinsert_fast_tracepoint_jumps_at): Declare.
2118 * regcache.c: Don't compile many functions when building the
2119 in-process agent library.
2120 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2121 the register buffer in the heap.
2122 (free_register_cache): If the register buffer isn't owned by the
2123 regcache, don't free it.
2124 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2125 pre-existing register caches.
2126 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2128 (convert_ascii_to_int): : Constify `from' parameter type.
2129 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2130 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2131 the needed buffer in-place.
2132 (relocate_instruction): New.
2133 * server.c (handle_query) <qSymbols>: If the target supports
2134 tracepoints, give it a chance of looking up symbols. Report
2135 support for fast tracepoints.
2136 (handle_status): Stabilize threads.
2137 (process_serial_event): Adjust.
2138 * server.h (struct fast_tracepoint_jump): Forward declare.
2139 (struct process_info) <fast_tracepoint_jumps>: New field.
2140 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2141 (decode_X_packet, decode_M_packet): Adjust.
2142 (relocate_instruction): Declare.
2143 (in_process_agent_loaded): Declare.
2144 (tracepoint_look_up_symbols): Declare.
2145 (struct fast_tpoint_collect_status): Declare.
2146 (fast_tracepoint_collecting): Declare.
2147 (force_unlock_trace_buffer): Declare.
2148 (handle_tracepoint_bkpts): Declare.
2149 (initialize_low_tracepoint)
2150 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2151 * target.h (struct target_ops) <stabilize_threads,
2152 install_fast_tracepoint_jump_pad>: New fields.
2153 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2154 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2155 [HAVE_STDINT_H]: Include stdint.h.
2156 (trace_debug_1): Rename to ...
2157 (trace_vdebug): ... this.
2158 (trace_debug): Rename to ...
2159 (trace_debug_1): ... this. Add `level' parameter.
2161 (ATTR_USED, ATTR_NOINLINE): New.
2162 (IP_AGENT_EXPORT): New.
2163 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2164 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2165 (about_to_request_buffer_space, trace_buffer_is_full)
2166 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2167 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2168 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2169 (traceframe_write_count, traceframes_created)
2170 (trace_state_variables)
2171 New renaming defines.
2172 (struct ipa_sym_addresses): New.
2173 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2175 (ipa_sym_addrs): New.
2176 (all_tracepoint_symbols_looked_up): New.
2177 (in_process_agent_loaded): New.
2178 (write_e_ipa_not_loaded): New.
2179 (maybe_write_ipa_not_loaded): New.
2180 (tracepoint_look_up_symbols): New.
2181 (debug_threads) [IN_PROCESS_AGENT]: New.
2182 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2183 (UNKNOWN_SIDE_EFFECTS): New.
2184 (stop_tracing): New.
2185 (flush_trace_buffer): New.
2186 (stop_tracing_bkpt): New.
2187 (flush_trace_buffer_bkpt): New.
2188 (read_inferior_integer): New.
2189 (read_inferior_uinteger): New.
2190 (read_inferior_data_pointer): New.
2191 (write_inferior_data_pointer): New.
2192 (write_inferior_integer): New.
2193 (write_inferior_uinteger): New.
2194 (struct collect_static_trace_data_action): Delete.
2195 (enum tracepoint_type): New.
2196 (struct tracepoint) <type>: New field `type'.
2197 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2198 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2199 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2200 (tracepoints): Use IP_AGENT_EXPORT.
2201 (last_tracepoint): Don't include in the IPA.
2202 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2203 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2204 (alloced_trace_state_variables): New.
2205 (trace_state_variables): Use IP_AGENT_EXPORT.
2206 (traceframe_t): Delete unused variable.
2207 (circular_trace_buffer): Don't include in the IPA.
2208 (trace_buffer_start): Delete.
2209 (struct trace_buffer_control): New.
2210 (trace_buffer_free): Delete.
2211 (struct ipa_trace_buffer_control): New.
2212 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2213 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2215 (trace_buffer_ctrl): New.
2216 (TRACE_BUFFER_CTRL_CURR): New.
2217 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2218 Reimplement as macros.
2219 (trace_buffer_wrap): Delete.
2220 (traceframe_write_count, traceframe_read_count)
2221 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2222 (struct tracepoint_hit_ctx) <type>: New field.
2223 (struct fast_tracepoint_ctx): New.
2224 (memory_barrier): New.
2226 (record_tracepoint_error): Update atomically in the IPA.
2227 (clear_inferior_trace_buffer): New.
2228 (about_to_request_buffer_space): New.
2229 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2230 updating the same buffer.
2231 (add_tracepoint): Default the tracepoint's type to trap
2232 tracepoint, and orig_size to -1.
2233 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2235 (create_trace_state_variable): New parameter `gdb'. Handle it.
2236 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2237 (cmd_qtdp): Handle fast tracepoints.
2239 (max_jump_pad_size): New.
2240 (gdb_jump_pad_head): New.
2241 (get_jump_space_head): New.
2242 (claim_jump_space): New.
2243 (sort_tracepoints): New.
2244 (MAX_JUMP_SIZE): New.
2245 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2247 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2248 support. Upload fast traceframes, and delete internal IPA
2250 (stop_tracing_handler): New.
2251 (flush_trace_buffer_handler): New.
2252 (cmd_qtstop): Upload fast tracepoints.
2253 (response_tracepoint): Handle fast tracepoints.
2254 (tracepoint_finished_step): Upload fast traceframes. Set the
2255 tracepoint hit context's tracepoint type.
2256 (handle_tracepoint_bkpts): New.
2257 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2258 type. Add comment about fast tracepoints.
2259 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2260 non-existing action_str field.
2261 (get_context_regcache): Handle fast tracepoints.
2262 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2264 (fast_tracepoint_from_jump_pad_address): New.
2265 (fast_tracepoint_from_ipa_tpoint_address): New.
2266 (collecting_t): New.
2267 (force_unlock_trace_buffer): New.
2268 (fast_tracepoint_collecting): New.
2271 (write_inferior_data_ptr): New.
2272 (target_tp_heap): New.
2273 (target_malloc): New.
2274 (download_agent_expr): New.
2276 (download_tracepoints): New.
2277 (download_trace_state_variables): New.
2278 (upload_fast_traceframes): New.
2279 (IPA_FIRST_TRACEFRAME): New.
2280 (IPA_NEXT_TRACEFRAME_1): New.
2281 (IPA_NEXT_TRACEFRAME): New.
2282 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2283 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2284 (gdb_jump_pad_buffer_end): New.
2285 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2286 (initialize_tracepoint): Adjust.
2287 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2288 buffer. Initialize the low module.
2289 * utils.c (PREFIX, TOOLNAME): New.
2290 (malloc_failure): Use PREFIX.
2291 (error): In the IPA, an error causes an exit.
2292 (fatal, warning): Use PREFIX.
2293 (internal_error): Use TOOLNAME.
2294 (NUMCELLS): Increase to 10.
2295 * configure, config.in: Regenerate.
2297 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2299 * server.c (handle_query) <qSupported>: Do two passes over the
2300 qSupported string to avoid nesting strtok.
2302 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2304 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2306 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2308 * configure: Regenerate.
2309 * proc-service.list: New.
2311 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2313 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2316 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2318 * gdbreplay.c (remote_open): Check error return from socket() call by
2319 its equality to -1 not by it being negative.
2320 * remote-utils.c (remote_open): Likewise.
2322 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2324 * config.h: Regenerate.
2326 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2328 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2329 doesn't provide PTRACE_GET_THREAD_AREA.
2331 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2333 * linux-m68k-low.c: Include <asm/ptrace.h>
2334 (ps_get_thread_area): Implement.
2336 2010-05-03 Doug Evans <dje@google.com>
2338 * event-loop.c (struct callback_event): New struct.
2339 (callback_list): New global.
2340 (append_callback_event, delete_callback_event): New functions.
2341 (process_callback): New function.
2342 (start_event_loop): Call it.
2343 * remote-utils.c (NOT_SCHEDULED): Define.
2344 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2345 moved out of readchar.
2346 (readchar): Rewrite. Call reschedule before returning.
2347 (reset_readchar): New function.
2348 (remote_close): Call it.
2349 (process_remaining, reschedule): New functions.
2350 * server.h (callback_handler_func): New typedef.
2351 (append_callback_event, delete_callback_event): Declare.
2353 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2355 * proc-service.c (ps_pglobal_lookup): Use
2356 thread_db_look_up_one_symbol.
2357 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2358 parameter. Use it instead of all_symbols_looked_up.
2359 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2361 (all_symbols_looked_up): Don't declare.
2362 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2363 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2365 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2366 Set all_symbols_looked_up here.
2367 (thread_db_look_up_one_symbol): New.
2368 (thread_db_get_tls_address): Adjust.
2369 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2370 thread_db object on the heap, and tentatively set it in the
2372 (thread_db_init): Don't set all_symbols_looked_up here.
2373 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2375 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2377 * linux-low.c (linux_kill, linux_detach): Adjust.
2378 (status_pending_p_callback): Remove redundant statement. Check
2379 for !TARGET_WAITIKIND_IGNORE, instead of
2380 TARGET_WAITKIND_STOPPED.
2381 (handle_tracepoints): Make sure LWP is locked. Adjust.
2382 (linux_wait_for_event_1): Adjust.
2383 (linux_cancel_breakpoints): New.
2384 (unsuspend_one_lwp): New.
2385 (unsuspend_all_lwps): New.
2386 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2387 (send_sigstop_callback): Change return type to int, add new
2388 `except' parameter and handle it.
2389 (suspend_and_send_sigstop_callback): New.
2390 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2391 pass them down. If SUSPEND, also increment the lwp's suspend
2393 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2394 (need_step_over_p): Don't consider suspended LWPs.
2395 (start_step_over): Adjust.
2396 (proceed_one_lwp): Change return type to int, add new `except'
2397 parameter and handle it.
2398 (unsuspend_and_proceed_one_lwp): New.
2399 (proceed_all_lwps): Use find_inferior instead of
2401 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2402 also decrement the suspend count of LWPs. Pass `except' down,
2403 instead of hacking its suspend count.
2404 (linux_pause_all): Add `freeze' parameter. Adjust.
2405 (linux_unpause_all): New.
2406 (linux_target_ops): Install linux_unpause_all.
2407 * server.c (handle_status): Adjust.
2408 * target.h (struct target_ops): New fields `unpause_all' and
2409 `cancel_breakpoints'. Add new parameter to `pause_all'.
2410 (pause_all): Add new `freeze' parameter.
2412 (cancel_breakpoints): New.
2413 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2415 (cmd_qtstart): Pause threads.
2416 (stop_tracing): Pause threads, and cancel breakpoints.
2417 * win32-low.c (win32_target_ops): Adjust.
2419 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2421 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2422 the inferior right away from here...
2423 (linux_wait_1): ... to here, and adjust to check the thread's
2424 last_resume_kind instead of the lwp's step or stop_expected flags.
2426 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2428 * README: Use consistent `GDB' and `GDBserver' spellings.
2430 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2432 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2433 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2434 (linux_detach_one_lwp): Assume the lwp is stopped.
2435 (any_thread_of): Delete.
2436 (linux_detach): Stop all lwps here. Don't blindly delete all
2438 (delete_lwp_callback): New.
2439 (linux_mourn): Delete all lwps of the process that is gone.
2440 (linux_wait_1): Don't delete the last lwp of the process here.
2441 * mem-break.h (mark_breakpoints_out): Declare.
2442 * mem-break.c (mark_breakpoints_out): New.
2443 (free_all_breakpoints): Use it.
2444 * server.c (handle_target_event): If the process is gone, mark
2446 * thread-db.c (struct thread_db) <create_bp>: New field.
2447 (thread_db_enable_reporting): Fix prototype. Store a thread event
2448 breakpoint reference in the thread_db struct.
2449 (thread_db_load_search): Clear the thread_db object.
2450 (try_thread_db_load_1): Ditto.
2451 (switch_to_process): New.
2452 (disable_thread_event_reporting): Use it.
2453 (remove_thread_event_breakpoints): New.
2454 (thread_db_detach, thread_db_mourn): Use it.
2456 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2458 * linux-low.c (linux_enable_event_reporting): New.
2459 (linux_wait_for_event_1, handle_extended_wait): Use it.
2461 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2463 * linux-low.c (linux_kill_one_lwp, linux_kill)
2464 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2465 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2466 SIGSTOP even if the LWP is stopped.
2467 (send_sigstop_callback): New.
2468 (stop_all_lwps): Use send_sigstop_callback instead.
2469 (linux_resume_one_thread): Adjust.
2470 (proceed_one_lwp): Still proceed an LWP that the client has
2471 requested to stop, if we haven't reported it as stopped yet. Make
2472 sure that LWPs the client want stopped, have a pending SIGSTOP.
2474 2010-04-26 Doug Evans <dje@google.com>
2476 * server.c (handle_general_set): Make static.
2478 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2479 Print received char after testing for error/eof instead of before.
2480 (input_interrupt): Tweak comment.
2482 2010-04-23 Doug Evans <dje@google.com>
2484 * server.c (start_inferior): Print inferior argv if --debug.
2486 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2488 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2489 * nto-x86-low.c: Include server.h
2491 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2493 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2494 be consistent with other sources of this directory.
2495 (init_registers_amd64): Correct name of source file of this function
2498 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2500 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2503 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2505 * win32-i386-low.c: Add 64-bit support.
2506 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2507 (init_registers_amd64): Declare.
2508 (mappings): Add 64-bit version of array.
2509 (init_windows_x86): New function.
2510 (the_low_target): Change init_arch field to init_windows_x86.
2512 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2514 * win32-low.c: Adapt to support also 64-bit architecture.
2515 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2516 (get_image_name): Use SIZE_T type for local variable `done'.
2517 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2518 (toolhelp_get_dll_name): Idem.
2519 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2520 Use uintptr_t typecast to avoid warning.
2521 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2522 (handle_exception): Use phex_nz to avoid warning.
2523 (win32_wait): Remove unused local variable `process'.
2525 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2527 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2530 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2532 * configure.ac: Use `ws2_32' library for srv_mingw.
2533 * configure: Regenerate.
2534 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2535 * remote-utils.c: Likewise.
2537 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2539 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2540 if __x86_64__ is defined.
2542 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2544 * configure: Regenerate.
2546 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2548 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2549 * target.h (target_ops): New get_tib_address field.
2550 * win32-low.h (win32_thread_info): Add thread_local_base field.
2551 * win32-low.c (child_add_thread): Add tlb argument.
2552 Set thread_local_base field to TLB.
2553 (get_child_debug_event): Adapt to child_add_thread change.
2554 (win32_get_tib_address): New function.
2555 (win32_target_ops): Set get_tib_address field to
2556 win32_get_tib_address.
2557 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2559 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2561 * linux-low.c (linux_mourn): Also remove the process.
2562 * server.c (handle_target_event): Don't remove the process here.
2563 * nto-low.c (nto_mourn): New.
2564 (nto_target_ops): Install it.
2565 * spu-low.c (spu_mourn): New.
2566 (spu_target_ops): Install it.
2567 * win32-low.c (win32_mourn): New.
2568 (win32_target_ops): Install it.
2570 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2572 * server.h (buffer_xml_printf): Remove redundant `;'.
2574 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2576 * regcache.c (set_register_cache): Invalidate regcaches before
2577 changing the register cache layout.
2578 (regcache_invalidate_one): Allow a NULL regcache.
2579 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2580 regcaches before changing the register cache layout or the target
2583 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2585 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2586 variable warning on Linux/x86-64.
2588 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2590 GDBserver disconnected tracing support.
2592 * linux-low.c (linux_remove_process): Delete.
2593 (add_lwp): Don't set last_resume_kind here.
2594 (linux_kill): Use `mourn'.
2595 (linux_detach): Use `thread_db_detach', and `mourn'.
2597 (linux_attach_lwp_1): Adjust comment.
2598 (linux_attach): last_resume_kind moved the thread_info; adjust.
2599 (status_pending_p_callback): Adjust.
2600 (linux_wait_for_event_1): Adjust.
2601 (count_events_callback, select_singlestep_lwp_callback)
2602 (select_event_lwp_callback, cancel_breakpoints_callback)
2603 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2604 (proceed_one_lwp): Adjust.
2605 (linux_async): Add debug output.
2606 (linux_thread_stopped): New.
2607 (linux_pause_all): New.
2608 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2610 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2611 (thread_db_free): Delete declaration.
2612 (thread_db_detach, thread_db_mourn): Declare.
2613 * thread-db.c (thread_db_init): Use thread_db_mourn.
2614 (thread_db_free): Delete, split in two.
2615 (disable_thread_event_reporting): New.
2616 (thread_db_detach): New.
2617 (thread_db_mourn): New.
2619 * server.h (struct thread_info) <last_resume_kind>: New field.
2620 <attached>: Add comment.
2621 <gdb_detached>: New field.
2622 (handler_func): Change return type to int.
2623 (handle_serial_event, handle_target_event): Ditto.
2624 (gdb_connected): Declare.
2626 (disconnected_tracing): Declare.
2627 (stop_tracing): Declare.
2629 * server.c (handle_query) <qSupported>: Report support for
2630 disconnected tracing.
2631 (queue_stop_reply_callback): Account for running threads.
2632 (gdb_wants_thread_stopped): New.
2633 (gdb_wants_all_threads_stopped): New.
2634 (gdb_reattached_process): New.
2635 (handle_status): Clear the `gdb_detached' flag of all processes.
2636 In all-stop, stop all threads.
2637 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2638 (process_serial_event): If the remote connection breaks, or if an
2639 exit was forced with "monitor exit", force an event loop exit.
2640 Handle disconnected tracing on detach.
2641 (handle_serial_event): Adjust.
2642 (handle_target_event): If GDB isn't connected, forward events back
2643 to the inferior, unless the last process exited, in which case,
2644 exit gdbserver. Adjust interface.
2646 * remote-utils.c (remote_open): Don't block in accept. Instead
2647 register an event loop source on the listen socket file
2648 descriptor. Refactor bits into ...
2649 (listen_desc): ... this new global.
2650 (gdb_connected): ... this new function.
2651 (enable_async_notification): ... this new function.
2652 (handle_accept_event): ... this new function.
2653 (remote_close): Clear remote_desc.
2655 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2657 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2659 (mourn_inferior): Define.
2660 (target_process_qsupported): Avoid the dangling else problem.
2661 (thread_stopped): Define.
2662 (pause_all): Define.
2663 (target_waitstatus_to_string): Declare.
2664 * target.c (target_waitstatus_to_string): New.
2666 * tracepoint.c (tracing): Make extern.
2667 (disconnected_tracing): New.
2668 (stop_tracing): Make extern. Handle tracing stops due to GDB
2670 (cmd_qtdisconnected): New.
2671 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2672 (handle_tracepoint_general_set): Handle QTDisconnected.
2674 * event-loop.c (event_handler_func): Change return type to int.
2675 (process_event): Bail out if the event handler wants the event
2677 (handle_file_event): Ditto.
2678 (start_event_loop): Bail out if the event handler wants the event
2681 * nto-low.c (nto_target_ops): Adjust.
2682 * spu-low.c (spu_wait): Don't remove the process here.
2683 (spu_target_ops): Adjust.
2684 * win32-low.c (win32_wait): Don't remove the process here.
2685 (win32_target_ops): Adjust.
2687 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2689 * regcache.c (realloc_register_cache): Invalidate inferior's
2690 regcache before recreating it.
2692 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2694 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2696 2010-04-09 Stan Shebs <stan@codesourcery.com>
2697 Pedro Alves <pedro@codesourcery.com>
2699 * server.h (LONGEST): New.
2700 (struct thread_info) <while_stepping>: New field.
2701 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2703 (initialize_tracepoint, handle_tracepoint_general_set)
2704 (handle_tracepoint_query, tracepoint_finished_step)
2705 (tracepoint_was_hit, release_while_stepping_state_list):
2706 (current_traceframe): Declare.
2707 * server.c (handle_general_set): Handle tracepoint packets.
2709 (write_memory): New.
2710 (handle_search_memory_1): Use read_memory.
2711 (handle_query): Report support for conditional tracepoints, trace
2712 state variables, and tracepoint sources. Handle tracepoint
2714 (main): Initialize the tracepoints module.
2715 (process_serial_event): Handle traceframe reads/writes.
2717 * linux-low.c (handle_tracepoints): New.
2718 (linux_wait_1): Call it.
2719 (linux_resume_one_lwp): Handle while-stepping.
2720 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2721 (linux_target_ops): Install them.
2722 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2724 * linux-x86-low.c (x86_supports_tracepoints): New.
2725 (the_low_target). Install it.
2727 * mem-break.h (delete_breakpoint): Declare.
2728 * mem-break.c (delete_breakpoint): Make external.
2730 * target.h (struct target_ops): Add `supports_tracepoints',
2731 `read_pc', and `write_pc' fields.
2732 (target_supports_tracepoints): Define.
2733 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2736 * regcache.h (struct regcache) <registers_owned>: New field.
2737 (init_register_cache, regcache_cpy): Declare.
2738 (regcache_read_pc, regcache_write_pc): Declare.
2739 (register_cache_size): Declare.
2740 (supply_regblock): Declare.
2741 * regcache.c (init_register_cache): New.
2742 (new_register_cache): Use it.
2743 (regcache_cpy): New.
2744 (register_cache_size): New.
2745 (supply_regblock): New.
2746 (regcache_read_pc, regcache_write_pc): New.
2748 * tracepoint.c: New.
2750 * Makefile.in (OBS): Add tracepoint.o.
2751 (tracepoint.o): New rule.
2753 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2755 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2757 (i386-mmx.c): Likewise.
2758 (i386-mmx-linux.o): Likewise.
2759 (i386-mmx-linux.c): Likewise.
2761 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2762 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2763 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2764 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2766 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2767 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2768 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2770 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2772 * Makefile.in (clean): Updated.
2774 (i386-avx.c): Likewise.
2775 (i386-avx-linux.o): Likewise.
2776 (i386-avx-linux.c): Likewise.
2777 (amd64-avx.o): Likewise.
2778 (amd64-avx.c): Likewise.
2779 (amd64-avx-linux.o): Likewise.
2780 (amd64-avx-linux.c): Likewise.
2782 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2783 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2784 (srv_amd64_regobj): Add amd64-avx.o.
2785 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2786 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2787 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2788 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2789 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2790 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2791 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2793 * i387-fp.c: Include "i386-xstate.h".
2795 (i387_cache_to_xsave): Likewise.
2796 (i387_xsave_to_cache): Likewise.
2797 (x86_xcr0): Likewise.
2799 * i387-fp.h (i387_cache_to_xsave): Likewise.
2800 (i387_xsave_to_cache): Likewise.
2801 (x86_xcr0): Likewise.
2803 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2804 * linux-crisv32-low.c (target_regsets): Likewise.
2805 * linux-m68k-low.c (target_regsets): Likewise.
2806 * linux-mips-low.c (target_regsets): Likewise.
2807 * linux-ppc-low.c (target_regsets): Likewise.
2808 * linux-s390-low.c (target_regsets): Likewise.
2809 * linux-sh-low.c (target_regsets): Likewise.
2810 * linux-sparc-low.c (target_regsets): Likewise.
2811 * linux-xtensa-low.c (target_regsets): Likewise.
2813 * linux-low.c: Include <sys/uio.h>.
2814 (regsets_fetch_inferior_registers): Support nt_type.
2815 (regsets_store_inferior_registers): Likewise.
2816 (linux_process_qsupported): New.
2817 (linux_target_ops): Add linux_process_qsupported.
2819 * linux-low.h (regset_info): Add nt_type.
2820 (linux_target_ops): Add process_qsupported.
2822 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2824 (init_registers_i386_avx_linux): New.
2825 (init_registers_amd64_avx_linux): Likewise.
2826 (xmltarget_i386_linux_no_xml): Likewise.
2827 (xmltarget_amd64_linux_no_xml): Likewise.
2828 (PTRACE_GETREGSET): Likewise.
2829 (PTRACE_SETREGSET): Likewise.
2830 (x86_fill_xstateregset): Likewise.
2831 (x86_store_xstateregset): Likewise.
2832 (use_xml): Likewise.
2833 (x86_linux_update_xmltarget): Likewise.
2834 (x86_linux_process_qsupported): Likewise.
2835 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2836 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2837 init_registers_i386_linux here. Call
2838 x86_linux_update_xmltarget.
2839 (the_low_target): Add x86_linux_process_qsupported.
2841 * server.c (handle_query): Call target_process_qsupported.
2843 * target.h (target_ops): Add process_qsupported.
2844 (target_process_qsupported): New.
2846 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2848 * inferiors.c (add_thread): Set last_status kind to
2849 TARGET_WAITKIND_IGNORE.
2850 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2851 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2852 (linux_wait_1): Move `thread' local definition to block that uses
2853 it. Don't NULL initialize `event_child'.
2854 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2855 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2856 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2858 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2860 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2861 an extended waitstatus, or by a watchpoint.
2862 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2863 thread was stepping or has been stopped by a watchpoint.
2865 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2867 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2868 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2869 of another, then delete the previous, and validate all
2871 (validate_inserted_breakpoint): New.
2872 (delete_disabled_breakpoints): New.
2873 (validate_breakpoints): New.
2874 (check_mem_read): Validate breakpoints before trusting their
2875 shadow. Delete disabled breakpoints.
2876 (check_mem_write): Validate breakpoints before trusting they
2877 should be inserted. Delete disabled breakpoints.
2878 * mem-break.h (validate_breakpoints):
2879 * server.c (handle_query): Validate breakpoints when we see a
2882 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2884 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2885 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2886 if we could tell there's a GDB breakpoint at stop_pc.
2887 (need_step_over_p): Don't do a step over if we find a GDB
2888 breakpoint at the resume PC.
2890 * mem-break.c (struct raw_breakpoint): New.
2891 (enum bkpt_type): New type `gdb_breakpoint'.
2892 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2893 fields. New field `raw'.
2894 (find_raw_breakpoint_at): New.
2895 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2897 (set_breakpoint_at): Adjust.
2898 (delete_raw_breakpoint): New.
2899 (release_breakpoint): New.
2900 (delete_breakpoint): Rename to...
2901 (delete_breakpoint_1): ... this. Add proc parameter. Use
2902 release_breakpoint. Return ENOENT.
2903 (delete_breakpoint): Reimplement.
2904 (find_breakpoint_at): Delete.
2905 (find_gdb_breakpoint_at): New.
2906 (delete_breakpoint_at): Delete.
2907 (set_gdb_breakpoint_at): New.
2908 (delete_gdb_breakpoint_at): New.
2909 (gdb_breakpoint_here): New.
2910 (set_reinsert_breakpoint): Use release_breakpoint.
2911 (uninsert_breakpoint): Rename to ...
2912 (uninsert_raw_breakpoint): ... this.
2913 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2914 (reinsert_raw_breakpoint): Change parameter type to
2916 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2918 (check_breakpoints): Adjust. Use release_breakpoint.
2919 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2920 (breakpoint_inserted_here): Ditto.
2921 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2922 Don't trust the breakpoint's shadow if it is not inserted.
2923 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2924 (delete_all_breakpoints): Adjust.
2925 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2926 use delete_breakpoint_1.
2928 * mem-break.h (breakpoints_supported): Delete declaration.
2929 (set_gdb_breakpoint_at): Declare.
2930 (gdb_breakpoint_here): Declare.
2931 (delete_breakpoint_at): Delete.
2932 (delete_gdb_breakpoint_at): Declare.
2934 * server.h (struct raw_breakpoint): Forward declare.
2935 (struct process_info): New field `raw_breakpoints'.
2937 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2940 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2942 * linux-low.c (status_pending_p_callback): Fix comment.
2943 (linux_wait_for_event_1): Move most of the internal breakpoint
2944 handling from here...
2945 (linux_wait_1): ... to here.
2946 (count_events_callback): New.
2947 (select_singlestep_lwp_callback): New.
2948 (select_event_lwp_callback): New.
2949 (cancel_breakpoints_callback): New.
2950 (select_event_lwp): New.
2951 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2952 priority to all LWPs that have had events that should be reported
2953 to the client. Cancel breakpoints when about to reporting the
2954 event to the client, not while stopping lwps. No longer cancel
2955 finished single-steps here.
2956 (cancel_finished_single_step): Delete.
2957 (cancel_finished_single_steps): Delete.
2959 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2961 * mem-break.c (enum bkpt_type): New.
2962 (struct breakpoint): New field `type'.
2963 (set_breakpoint_at): Change return type to struct breakpoint
2964 pointer. Set type to `other_breakpoint' by default.
2965 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2966 in the breakpoint list.
2967 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2968 (reinsert_breakpoint): Rename to ...
2969 (reinsert_raw_breakpoint): ... this.
2970 (reinsert_breakpoints_at): Adjust.
2971 * mem-break.h (struct breakpoint): Declare.
2972 (set_breakpoint_at): Change return type to struct breakpoint
2975 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2977 * server.c (handle_query): Assign, not compare.
2979 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2981 Teach linux gdbserver to step-over-breakpoints.
2983 * linux-low.c (can_hardware_single_step): New.
2984 (supports_breakpoints): New.
2985 (handle_extended_wait): If stopping threads, read the stop pc of
2988 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2989 low target doesn't support retrieving the PC.
2990 (add_lwp): Set last_resume_kind to resume_continue.
2991 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2992 (linux_attach): Don't clear stop_expected. Set the lwp's
2993 last_resume_kind to resume_stop.
2994 (linux_detach_one_lwp): Don't check for removed breakpoints.
2995 (check_removed_breakpoint): Delete.
2996 (status_pending_p): Rename to ...
2997 (status_pending_p_callback): ... this. Don't check for removed
2998 breakpoints. Don't consider threads that are stopped from GDB's
3000 (linux_wait_for_lwp): Always read the stop_pc here.
3001 (cancel_breakpoint): New.
3002 (step_over_bkpt): New global.
3003 (linux_wait_for_event_1): Implement stepping over breakpoints.
3004 (gdb_wants_lwp_stopped): New.
3005 (gdb_wants_all_stopped): New.
3006 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3007 single-step traps here. Store the thread's last reported target
3009 (send_sigstop): Don't clear stop_expected. Always set it,
3011 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3012 (cancel_finished_single_step): New.
3013 (cancel_finished_single_steps): New.
3014 (wait_for_sigstop): Don't cancel finished single-step traps here.
3015 (linux_resume_one_lwp): Don't check for removed breakpoints.
3016 Don't set `step' on non-hardware step archs.
3017 (linux_set_resume_request): Ignore resume_stop requests if already
3018 stopping or stopped. Set the lwp's last_resume_kind.
3019 (resume_status_pending_p): Don't check for removed breakpoints.
3020 (need_step_over_p): New.
3021 (start_step_over): New.
3022 (finish_step_over): New.
3023 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3024 requests. Clear the thread's last reported target waitstatus.
3025 Don't use the `suspended' flag. Don't consider pending breakpoints.
3026 (linux_resume): Start a step-over if necessary.
3027 (proceed_one_lwp): New.
3028 (proceed_all_lwps): New.
3029 (unstop_all_lwps): New.
3030 * linux-low.h (struct lwp_info): Rewrite comment for the
3031 `suspended' flag. Add the `stop_pc' field. Delete the
3032 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3033 Add `'last_resume_kind' and `need_step_over' fields.
3034 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3035 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3036 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3037 (set_raw_breakpoint_at): New.
3038 (set_breakpoint_at): Rewrite to use it.
3039 (reinsert_breakpoint_handler): Delete.
3040 (set_reinsert_breakpoint): New.
3041 (reinsert_breakpoint_by_bp): Delete.
3042 (delete_reinsert_breakpoints): New.
3043 (uninsert_breakpoint): Rewrite.
3044 (uninsert_breakpoints_at): New.
3045 (reinsert_breakpoint): Rewrite.
3046 (reinsert_breakpoints_at): New.
3047 (check_breakpoints): Rewrite.
3048 (breakpoint_here): New.
3049 (breakpoint_inserted_here): New.
3050 (check_mem_read): Adjust.
3051 * mem-break.h (breakpoints_supported, breakpoint_here)
3052 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3053 (reinsert_breakpoint_by_bp): Delete declaration.
3054 (delete_reinsert_breakpoints): Declare.
3055 (reinsert_breakpoint): Delete declaration.
3056 (reinsert_breakpoints_at): Declare.
3057 (uninsert_breakpoint): Delete declaration.
3058 (uninsert_breakpoints_at): Declare.
3059 (check_breakpoints): Adjust prototype.
3060 * server.h: Adjust include order.
3061 (struct thread_info): Declare here. Add a `last_status' field.
3063 2010-03-23 Michael Snyder <msnyder@vmware.com>
3065 * server.c (crc32): New function.
3066 (handle_query): Add handling for 'qCRC:' request.
3068 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3070 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3071 lwp had been stopped by a watchpoint.
3073 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3075 * server.h (internal_error): Declare.
3076 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3077 * utils.c (internal_error): New function.
3079 2010-03-15 Andreas Schwab <schwab@redhat.com>
3081 * configure.srv: Fix typo setting srv_regobj.
3083 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3085 * linux-low.c (fetch_register): Avoid passing a non string literal
3087 (usr_store_inferior_registers): Ditto.
3089 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3091 * linux-low.c (linux_write_memory): Bail out early if peeking
3094 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3096 * linux-low.h (struct lwp_info): New fields
3097 `stopped_by_watchpoint' and `stopped_data_address'.
3098 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3099 here, and cache them in the lwp object.
3100 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3102 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3104 (linux_stopped_by_watchpoint): Rewrite.
3105 (linux_stopped_data_address): Rewrite.
3107 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3109 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3110 switching the current inferior, not before.
3112 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3114 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3115 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3116 i386-linux.c and amd64-linux.c.
3117 (reg-i386.o): Removed.
3118 (reg-i386.c): Likewise.
3119 (reg-i386-linux.o): Likewise.
3120 (reg-i386-linux.c): Likewise.
3121 (reg-x86-64.o): Likewise.
3122 (reg-x86-64.c): Likewise.
3123 (reg-x86-64-linux.o): Likewise.
3124 (reg-x86-64-linux.c): Likewise.
3127 (i386-linux.o): Likewise.
3128 (i386-linux.c): Likewise.
3129 (amd64.o): Likewise.
3130 (amd64.c): Likewise.
3131 (amd64-linux.o): Likewise.
3132 (amd64-linux.c): Likewise.
3134 * configure.srv (srv_i386_regobj): New.
3135 (srv_i386_linux_regobj): Likewise.
3136 (srv_amd64_regobj): Likewise.
3137 (srv_amd64_linux_regobj): Likewise.
3138 (srv_i386_32bit_xmlfiles): Likewise.
3139 (srv_i386_64bit_xmlfiles): Likewise.
3140 (srv_i386_xmlfiles): Likewise.
3141 (srv_amd64_xmlfiles): Likewise.
3142 (srv_i386_linux_xmlfiles): Likewise.
3143 (srv_amd64_linux_xmlfiles): Likewise.
3144 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3145 srv_xmlfiles to $srv_i386_xmlfiles.
3146 (i[34567]86-*-mingw32ce*): Likewise.
3147 (i[34567]86-*-mingw*): Likewise.
3148 (i[34567]86-*-nto*): Likewise.
3149 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3150 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3151 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3152 (x86_64-*-linux*): Likewise.
3154 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3155 (init_registers_amd64_linux): New.
3156 (x86_arch_setup): Replace init_registers_x86_64_linux with
3157 init_registers_amd64_linux.
3159 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3161 * configure.ac: Check for libdl. If it is not available link against
3162 static libthread_db.
3163 * configure: Regenerate.
3165 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3169 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3170 handing a read watchpoint.
3171 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3173 2010-02-12 Doug Evans <dje@google.com>
3175 * linux-low.c (linux_supports_tracefork_flag): Document.
3176 (linux_look_up_symbols): Add comment.
3178 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3180 * regcache.c (supply_register): Clear regcache if buf is NULL.
3182 2010-02-02 Nicolas Roche <roche@sourceware.org>
3183 Joel Brobecker <brobecker@adacore.com>
3185 * inferiors.c (find_inferior): Add function documentation.
3186 (unloaded_dll): Handle the case where the unloaded dll has not
3187 been previously registered in the dll list.
3189 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3191 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3192 (thumb2_breakpoint): New.
3193 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3195 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3197 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3198 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3201 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3203 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3205 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3207 * linux-s390-low.c (s390_collect_ptrace_register)
3208 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3210 2010-01-21 Doug Evans <dje@google.com>
3212 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3213 (PTRACE_ARG4_TYPE): New macro.
3214 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3215 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3216 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3217 (usr_store_inferior_registers): Ditto.
3218 (linux_read_memory, linux_write_memory): Ditto.
3219 (linux_test_for_tracefork): Ditto.
3221 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3222 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3224 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3226 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3229 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3231 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3232 prototype to take a regcache. Adjust.
3234 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3236 * regcache.h (struct thread_info): Forward declare.
3237 (struct regcache): New.
3238 (new_register_cache): Adjust prototype.
3239 (get_thread_regcache): Declare.
3240 (free_register_cache): Adjust prototype.
3241 (registers_to_string, registers_from_string): Ditto.
3242 (supply_register, supply_register_by_name, collect_register)
3243 (collect_register_as_string, collect_register_by_name): Ditto.
3244 * regcache.c (struct inferior_regcache_data): Delete.
3245 (get_regcache): Rename to ...
3246 (get_thread_regcache): ... this. Adjust. Switch inferior before
3248 (regcache_invalidate_one): Adjust.
3249 (regcache_invalidate): Fix prototype.
3250 (new_register_cache): Return the new register cache.
3251 (free_register_cache): Change prototype.
3252 (realloc_register_cache): Adjust.
3253 (registers_to_string): Change prototype to take a regcache. Adjust.
3254 (registers_from_string): Ditto.
3255 (register_data): Ditto.
3256 (supply_register): Ditto.
3257 (supply_register_by_name): Ditto.
3258 (collect_register): Ditto.
3259 (collect_register_as_string): Ditto.
3260 (collect_register_by_name): Ditto.
3261 * server.c (process_serial_event): Adjust.
3262 * linux-low.h (regset_fill_func, regset_store_func): Change
3264 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3266 * linux-low.c (get_stop_pc): Adjust.
3267 (check_removed_breakpoint): Adjust.
3268 (linux_wait_for_event): Adjust.
3269 (linux_resume_one_lwp): Adjust.
3270 (fetch_register): Add regcache parameter. Adjust.
3271 (usr_store_inferior_registers): Ditto.
3272 (regsets_fetch_inferior_registers): Ditto.
3273 (regsets_store_inferior_registers): Ditto.
3274 (linux_fetch_registers, linux_store_registers): Ditto.
3275 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3277 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3278 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3279 prototype to take a regcache.
3280 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3281 * remote-utils.c (convert_ascii_to_int, outreg)
3282 (prepare_resume_reply): Change prototype to take a regcache.
3284 * target.h (struct target_ops) <fetch_registers, store_registers>:
3285 Change prototype to take a regcache.
3286 (fetch_inferior_registers, store_inferior_registers): Change
3287 prototype to take a regcache. Adjust.
3288 * proc-service.c (ps_lgetregs): Adjust.
3289 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3290 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3291 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3292 take a regcache. Adjust.
3293 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3294 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3295 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3296 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3297 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3298 (cris_cannot_fetch_register):
3299 (cris_breakpoint_at): Change prototype to take a regcache.
3301 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3302 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3303 to take a regcache. Adjust.
3304 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3306 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3307 take a regcache. Adjust.
3308 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3309 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3310 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3311 * linux-mips-low.c (mips_get_pc):
3312 (mips_set_pc): Change prototype to take a regcache. Adjust.
3313 (mips_reinsert_addr): Adjust.
3314 (mips_collect_register): Change prototype to take a regcache.
3316 (mips_supply_register):
3317 (mips_collect_register_32bit, mips_supply_register_32bit)
3318 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3319 (mips_store_fpregset): Ditto.
3320 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3322 (parse_spufs_run): Adjust.
3323 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3324 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3325 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3326 take a regcache. Adjust.
3327 * linux-s390-low.c (s390_collect_ptrace_register)
3328 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3329 (s390_set_pc): Change prototype to take a regcache. Adjust.
3330 (s390_arch_setup): Adjust.
3331 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3332 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3333 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3334 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3335 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3337 (sparc_breakpoint_at): Adjust.
3338 * linux-xtensa-low.c (xtensa_fill_gregset):
3339 (xtensa_store_gregset):
3340 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3341 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3342 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3343 prototype to take a regcache. Adjust.
3344 * win32-arm-low.c (arm_fetch_inferior_register)
3345 (arm_store_inferior_register): Change prototype to take a
3347 * win32-i386-low.c (i386_fetch_inferior_register)
3348 (i386_store_inferior_register): Change prototype to take a
3350 * win32-low.c (child_fetch_inferior_registers)
3351 (child_store_inferior_registers): Change prototype to take a
3353 (win32_wait): Adjust.
3354 (win32_fetch_inferior_registers): Change prototype to take a
3356 (win32_store_inferior_registers): Adjust.
3357 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3358 store_inferior_register>: Change prototype to take a regcache.
3360 2010-01-20 Doug Evans <dje@google.com>
3362 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3364 (linux_wait_for_event1, linux_init_signals): Ditto.
3365 (W_STOPCODE): Provide definition if missing.
3367 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3369 * linux-low.c (linux_core_of_thread): New.
3370 (compare_ints, show_process, list_threads): New.
3371 (linux_qxfer_osdata): Report threads and cores.
3372 (linux_target_op): Register linux_core_of_thread.
3373 * remote-utils.c (prepare_resume_reply): Report the core.
3374 (buffer_xml_printf): Support %d specifier.
3375 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3377 (handle_query): Handle qXfer:threads. Announce availability
3379 * target.h (struct target_ops): New field core_of_thread.
3381 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3383 * Makefile.in (clean): Remove new generated files.
3384 (reg-s390.o, reg-s390.c): Remove rules.
3385 (reg-s390x.o, reg-s390x.c): Likewise.
3386 (s390-linux32.o, s390-linux32.c): Add rules.
3387 (s390-linux64.o, s390-linux64.c): Likewise.
3388 (s390x-linux64.o, s390x-linux64.c): Likewise.
3389 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3390 * linux-s390-low.c: Include <elf.h>.
3391 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3392 (init_registers_s390): Remove prototype.
3393 (init_registers_s390x): Likewise.
3394 (init_registers_s390_linux32): Add prototype.
3395 (init_registers_s390_linux64): Likewise.
3396 (init_registers_s390x_linux64): Likewise.
3397 (s390_num_regs_3264): New define.
3398 (s390_regmap_3264): New global variable.
3399 (s390_cannot_fetch_register): Remove obsolete check.
3400 (s390_cannot_store_register): Likewise.
3401 (s390_collect_ptrace_register): Handle upper/lower register halves.
3402 (s390_supply_ptrace_register): Likewise.
3403 (s390_fill_gregset): Update to register number changes.
3404 (s390_get_hwcap): New routine.
3405 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3406 Install appropriate regmap and register set.
3408 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3410 * server.c (gdbserver_version): Update copyright year to 2010.
3411 * gdbreplay.c (gdbreplay_version): Likewise.
3413 2009-12-28 Doug Evans <dje@google.com>
3415 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3416 elf/external.h. Include <elf.h> instead but only if necessary.
3418 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3420 * linux-low.c (linux_remove_process): Remove `detaching'
3421 parameter. Don't release/detach from thread_db here.
3422 (linux_kill): Release/detach from thread_db here, ...
3423 (linux_detach): ... and here, before actually detaching.
3424 (linux_wait_1): ... and here, when a process exits.
3425 * thread-db.c (any_thread_of): New.
3426 (thread_db_free): Switch the current inferior to a thread of the
3429 2009-12-21 Doug Evans <dje@google.com>
3431 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3433 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3434 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3435 warning ifndef __NR_tkill. Move setting of errno there too.
3436 Delete unnecessary resetting of errno after syscall.
3437 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3439 * configure.ac: Check for dladdr.
3440 * config.in: Regenerate.
3441 * configure: Regenerate.
3442 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3443 (try_thread_db_load): Update.
3445 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3447 2009-12-18 Doug Evans <dje@google.com>
3449 * event-loop.c: Include unistd.h if it exists.
3451 * linux-low.c (my_waitpid): Move definition away from being in
3452 between linux_tracefork_child/linux_test_for_tracefork.
3454 * gdb_proc_service.h (psaddr_t): Fix type.
3455 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3456 signature to match glibc.
3458 2009-12-16 Doug Evans <dje@google.com>
3460 * linux-low.c (linux_read_memory): Fix argument to read.
3462 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3464 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3465 events, don't leave current_inferior pointing at null.
3467 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3469 * win32-low.c (LOG): Delete.
3470 (OUTMSG): Output to stderr.
3471 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3472 on compile time LOG macro.
3473 (win32_wait): Fix debug output.
3475 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3477 * win32-low.c (win32_add_one_solib): If the dll name is
3478 "ntdll.dll", prepend the system directory to the dll path.
3480 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3482 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3484 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3485 Vladimir Prus <vladimir@codesourcery.com>
3487 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3488 * configure.ac: Check for __mcoldfire__ and set
3489 gdb_cv_m68k_is_coldfire.
3490 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3491 reg-cf.o and reg-m68k.o.
3492 * configure: Regenerated.
3494 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3496 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3497 Pass it to thread_db_free.
3498 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3499 proper `detaching' argument to linux_remove_process.
3500 * linux-low.h (thread_db_free): Add `detaching' parameter.
3501 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3503 (thread_db_free): Add `detaching' parameter. Only
3504 call td_ta_clear_event if detaching from process.
3506 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3508 * thread-db.c (thread_db_free): Fix typo.
3510 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3513 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3515 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3517 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3518 with an i686 compiler.
3519 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3521 * configure: Rebuilt.
3523 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3527 * server.c (handle_search_memory_1): Correct read_addr initialization
3528 in loop for searching subsequent chunks.
3530 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3532 * configure.ac: New --with-libthread-db option.
3533 * thread-db.c: Allow direct dependence on libthread_db.
3534 (thread_db_free): Adjust.
3535 * config.in: Regenerate.
3536 * configure: Likewise.
3538 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3541 * thread-db.c (attach_thread): New function.
3542 (maybe_attach_thread): Return success/failure.
3543 (find_new_threads_callback): Adjust.
3544 (thread_db_find_new_threads): Loop until no new threads.
3546 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3548 * proc-service.c (ps_lgetregs): Formatting.
3550 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3552 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3553 * configure.ac: Adjust.
3554 * linux-low.h (struct process_info_private): Move members to struct
3556 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3557 * linux-low.c (linux_remove_process): Adjust.
3558 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3559 * server.c (handle_query): Move code ...
3560 (handle_monitor_command): ... here. New function.
3561 * target.h (struct target_ops): New member.
3562 * thread-db.c (struct thread_db): New.
3563 (libthread_db_search_path): New variable.
3564 (thread_db_create_event, thread_db_enable_reporting)
3565 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3566 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3567 (try_thread_db_load_1, dladdr_to_soname): New functions.
3568 (try_thread_db_load, thread_db_load_search): New functions.
3569 (thread_db_init): Search for libthread_db.
3570 (thread_db_free): New function.
3571 (thread_db_handle_monitor_command): Likewise.
3572 * config.in: Regenerate.
3573 * configure: Regenerate.
3575 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3577 * spu-low.c (spu_kill): Wait for inferior to terminate.
3578 Call clear_inferiors.
3579 (spu_detach): Call clear_inferiors.
3581 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3583 * aclocal.m4: Regenerate.
3584 * config.in: Likewise.
3585 * configure: Likewise.
3587 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3589 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3590 (parse_spufs_run): New function.
3591 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3592 (ppc_breakpoint_at): Handle SPU breakpoints.
3594 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3596 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3597 (SPUFS_MAGIC): Define.
3598 (spu_enumerate_spu_ids): New function.
3599 (linux_qxfer_spu): New function.
3600 (linux_target_ops): Install linux_qxfer_spu.
3602 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3604 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3605 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3606 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3607 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3608 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3609 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3610 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3611 (init_registers_powerpc_cell32l): Add prototype.
3612 (init_registers_powerpc_cell64l): Likewise.
3613 (ppc_arch_setup): Detect Cell/B.E. architecture.
3615 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3617 * Makefile.in (datarootdir): New variable.
3619 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3621 * linux-low.c (linux_write_memory): Update debugging output.
3622 * Makefile.in (clean): Add new descriptions.
3623 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3624 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3625 * configure.srv: Add new files for arm*-*-linux*.
3626 * linux-arm-low.c: Add new declarations.
3627 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3628 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3629 (HWCAP_VFPv3D16): New.
3630 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3631 instead of __IWMMXT__.
3632 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3633 (arm_arch_setup): New.
3634 (target_regsets): Remove #ifdef. Add VFP regset.
3635 (the_low_target): Use arm_arch_setup.
3637 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3639 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3640 the main thread again.
3642 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3644 Adding Neutrino gdbserver.
3645 * configure: Regenerated.
3646 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3647 * configure.srv (i[34567]86-*-nto*): New target.
3648 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3649 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3650 (nto_comctrl) [__QNX__]: New function.
3651 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3653 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3655 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3658 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3659 Pedro Alves <pedro@codesourcery.com>
3661 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3662 don't support CONTEXT_EXTENDED_REGISTERS.
3663 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3664 (the_low_target): Install them.
3665 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3666 failing with ERROR_PIPE_NOT_CONNECTED.
3668 2009-06-30 Doug Evans <dje@google.com>
3669 Pierre Muller <muller@ics.u-strasbg.fr>
3671 Add h/w watchpoint support to x86-linux, win32-i386.
3672 * Makefile.in (SFILES): Add i386-low.c
3673 (i386_low_h): Define.
3674 (i386-low.o): Add dependencies.
3675 (linux-x86-low.o): Add i386-low.h dependency.
3676 (win32-i386-low.o): Ditto.
3677 * i386-low.c: New file.
3678 * i386-low.h: New file.
3679 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3680 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3681 * linux-low.c (linux_add_process): Initialize arch_private.
3682 (linux_remove_process): Free arch_private.
3683 (add_lwp): Initialize arch_private.
3684 (delete_lwp): Free arch_private.
3685 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3687 * linux-low.h (process_info_private): New member arch_private.
3688 (lwp_info): New member arch_private.
3689 (linux_target_ops): New members new_process, new_thread,
3691 (ptid_of): New macro.
3692 * linux-x86-low.c: Include stddef.h, i386-low.h.
3693 (arch_process_info): New struct.
3694 (arch_lwp_info): New struct.
3695 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3696 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3697 (i386_dr_low_get_status): New function.
3698 (x86_insert_point, x86_remove_point): New functions.
3699 (x86_stopped_by_watchpoint): New function.
3700 (x86_stopped_data_address): New function.
3701 (x86_linux_new_process, x86_linux_new_thread): New functions.
3702 (x86_linux_prepare_to_resume): New function.
3703 (the_low_target): Add entries for insert_point, remove_point,
3704 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3706 * server.c (debug_hw_points): New global.
3707 (monitor_show_help): Document set debug-hw-points.
3708 (handle_query): Process "set debug-hw-points".
3709 * server.h (debug_hw_points): Declare.
3710 (paddress): Declare.
3711 * utils.c (NUMCELLS, CELLSIZE): New macros.
3712 (get_sell, xsnprintf, paddress): New functions.
3713 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3714 remove_point, stopped_by_watchpoint, stopped_data_address.
3715 * win32-i386-low.c: Include i386-low.h.
3716 (debug_reg_state): Replaces dr.
3717 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3718 (i386_dr_low_get_status): New function.
3719 (i386_insert_point, i386_remove_point): New functions.
3720 (i386_stopped_by_watchpoint): New function.
3721 (i386_stopped_data_address): New function.
3722 (i386_initial_stuff): Update.
3723 (get_thread_context,set_thread_context,i386_thread_added): Update.
3724 (the_low_target): Add entries for insert_point,
3725 remove_point, stopped_by_watchpoint, stopped_data_address.
3726 * win32-low.c (win32_insert_watchpoint): New function.
3727 (win32_remove_watchpoint): New function.
3728 (win32_stopped_by_watchpoint): New function.
3729 (win32_stopped_data_address): New function.
3730 (win32_target_ops): Add entries for insert_watchpoint,
3731 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3732 * win32-low.h (win32_target_ops): New members insert_point,
3733 remove_point, stopped_by_watchpoint, stopped_data_address.
3735 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3737 * server.c (process_serial_event): Re-return unsupported, not
3738 error, if the type isn't recognized. Re-allow supporting only
3739 insert or remove packets. Also call require_running for
3740 breakpoints. Add missing break statement to default case. Tidy.
3741 * target.h (struct target_ops): Rename insert_watchpoint to
3742 insert_point, and remove_watchpoint to remove_point.
3744 * linux-low.h (struct linux_target_ops): Likewise.
3745 * linux-low.c (linux_insert_watchpoint): Rename to ...
3746 (linux_insert_point): ... this. Adjust.
3747 (linux_remove_watchpoint): Rename to ...
3748 (linux_remove_point): ... this. Adjust.
3749 (linux_target_ops): Adjust.
3750 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3751 (cris_insert_point): ... this.
3752 (cris_remove_watchpoint): Rename to ...
3753 (cris_remove_point): ... this.
3754 (the_low_target): Adjust.
3756 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3758 * server.c (handle_v_kill): Pass signal_pid to
3759 kill_inferior if multi_process is zero.
3761 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3763 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3764 * target.h (target_ops): Comment for *_watchpoint to make it clear
3765 the functions can get types '0' and '1'.
3767 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3769 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3770 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3771 * regcache.c (get_regcache): Likewise.
3772 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3773 * win32-low.c (child_fetch_inferior_registers): Remove check for
3776 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3777 Pedro Alves <pedro@codesourcery.com>
3779 * target.h (struct target_ops) <supports_multi_process>: New
3781 (target_supports_multi_process): New.
3782 * server.c (handle_query): Even if GDB reports support, only
3783 enable multi-process if the target also supports it. Report
3784 multi-process support only if the target backend supports it.
3785 * linux-low.c (linux_supports_multi_process): New function.
3786 (linux_target_ops): Install it as target_supports_multi_process
3789 2009-05-24 Doug Evans <dje@google.com>
3791 Global renaming of find_thread_pid to find_thread_ptid.
3792 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3793 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3794 All callers updated.
3796 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3797 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3800 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3801 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3802 (linux_resume_one_lwp): Ditto.
3804 2009-05-23 Doug Evans <dje@google.com>
3806 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3807 from struct inferior_list_entry * to struct lwp_info *.
3808 All callers updated.
3810 2009-05-13 Doug Evans <dje@google.com>
3812 * linux-x86-low.c: Don't include assert.h.
3813 (x86_siginfo_fixup): Use fatal, not assert.
3814 (x86_arch_setup): Fix comment.
3816 2009-05-12 Doug Evans <dje@google.com>
3818 Biarch support for i386/amd64 gdbserver.
3819 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3820 Add linux-x86-low.c.
3821 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3822 (linux-x86-low.o): Add.
3823 * linux-x86-64-low.c: Delete.
3824 * linux-i386-low.c: Delete.
3825 * linux-x86-low.c: New file.
3826 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3828 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3830 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3831 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3832 (linux_child_pid_to_exec_file): New function.
3833 (elf_64_header_p, elf_64_file_p): New functions.
3834 (siginfo_fixup): New function.
3835 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3836 give target a chance to convert layout.
3837 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3838 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3840 2009-05-07 Doug Evans <dje@google.com>
3842 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3843 (regsets_store_inferior_registers): Ditto.
3845 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3849 * linux-low.c (must_set_ptrace_flags): Delete.
3850 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3852 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3853 `lwp->must_set_ptrace_flags' instead.
3854 (linux_wait_for_event_1): Set ptrace options here.
3855 (linux_wait_1): ... not here.
3857 2009-04-30 Doug Evans <dje@google.com>
3859 * inferiors.c (started_inferior_callback): New function.
3860 (attached_inferior_callback): New function.
3861 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3862 * server.c (print_started_pid, print_attached_pid): New functions.
3863 (detach_or_kill_for_exit): New function.
3864 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3865 * server.h (have_started_inferiors_p): Declare.
3866 (have_attached_inferiors_p): Declare.
3868 * inferiors.c (remove_process): Fix memory leak, free process.
3869 * linux-low.c (linux_remove_process): New function.
3870 (linux_kill): Call it instead of remove_process.
3871 (linux_detach, linux_wait_1): Ditto.
3873 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3875 * configure.srv: Add x86 Windows CE target.
3877 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3879 * inferiors.c (get_thread_process): Make global.
3880 * server.h (get_thread_process): Add prototype.
3881 * thread-db.c (find_one_thread): Use get_thread_process
3882 instead of current_process.
3883 (thread_db_get_tls_address): Do not crash if called when
3884 thread layer is not yet initialized.
3886 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3888 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3889 * spu-low.c (current_tid): Rename to ...
3890 (current_ptid): ... this.
3891 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3892 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3893 ptid_get_lwp (current_ptid) instead of current_tid.
3894 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3895 instead of current_tid. Use find_process_pid to verify pid
3896 argument is valid. Pass proper argument to remove_process.
3897 (spu_thread_alive): Compare current_ptid instead of current_tid.
3898 (spu_resume): Likewise.
3900 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3902 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3905 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3907 Implement the multiprocess extensions, and add linux multiprocess
3910 * server.h (ULONGEST): Declare.
3911 (struct ptid, ptid_t): New.
3912 (minus_one_ptid, null_ptid): Declare.
3913 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3914 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3915 (struct inferior_list_entry): Change `id' type from unsigned from
3917 (struct sym_cache, struct breakpoint, struct
3918 process_info_private): Forward declare.
3919 (struct process_info): Declare.
3920 (current_process): Declare.
3921 (all_processes): Declare.
3922 (initialize_inferiors): Declare.
3923 (add_thread): Adjust to use ptid_t.
3924 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3925 (add_process, remove_process, find_thread_pid): Declare.
3926 (find_inferior_id): Adjust to use ptid_t.
3927 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3928 (multi_process): Declare.
3929 (push_event): Adjust to use ptid_t.
3930 (read_ptid, write_ptid): Declare.
3931 (prepare_resume_reply): Adjust to use ptid_t.
3932 (clear_symbol_cache): Declare.
3933 * inferiors.c (all_processes): New.
3934 (null_ptid, minus_one_ptid): New.
3935 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3936 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3937 (add_thread): Change unsigned long to ptid. Remove gdb_id
3939 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3940 (gdb_id_to_thread): Rename to ...
3941 (find_thread_pid): ... this. Change unsigned long to ptid.
3942 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3943 (loaded_dll, pull_pid_from_list): Adjust.
3944 (add_process, remove_process, find_process_pid)
3945 (get_thread_process, current_process, initialize_inferiors): New.
3946 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3947 (struct target_waitstatus) <related_pid>: Ditto.
3948 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3950 (struct target_ops) <join>: Add `pid' argument.
3951 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3952 (struct target_ops) <wait>: Add `ptid' field. Change return type
3954 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3955 (mywait): Add `ptid' argument. Change return type to ptid_t.
3956 (target_pid_to_str): Declare.
3957 * target.c (set_desired_inferior): Adjust to use ptids.
3958 (mywait): Add new `ptid' argument. Adjust.
3959 (target_pid_to_str): New.
3960 * mem-break.h (free_all_breakpoints): Declare.
3961 * mem-break.c (breakpoints): Delelete.
3962 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3963 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3964 to use per-process breakpoint list.
3965 (free_all_breakpoints): New.
3966 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3967 (symbol_cache, all_symbols_looked_up): Delete.
3969 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3971 (prepare_resume_reply): Change ptid argument's type from unsigned
3972 long to ptid_t. Adjust. Implement W;process and X;process.
3973 (free_sym_cache, clear_symbol_cache): New.
3974 (look_up_one_symbol): Adjust to per-process symbol cache. *
3975 * server.c (cont_thread, general_thread, step_thread): Change type
3978 (multi_process): New.
3979 (last_ptid): Change type to ptid_t.
3980 (struct vstop_notif) <ptid>: Change type to ptid_t.
3981 (queue_stop_reply, push_event): Change `ptid' argument's type to
3983 (discard_queued_stop_replies): Add `pid' argument.
3984 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3985 changes. Don't reference the `attached' global.
3986 (attach_inferior): Adjust to mywait interface changes.
3987 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3988 features. Handle and report "multiprocess+". Handle
3990 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3992 (handle_v_kill): New.
3993 (handle_v_stopped): Adjust to use target_pid_to_str.
3994 (handle_v_requests): Allow multiple attaches and runs when
3995 multiprocess extensions are in effect. Handle "vKill".
3996 (myresume): Adjust to use ptids.
3997 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3998 (handle_status): Adjust to discard_queued_stop_replies interface
4000 (first_thread_of, kill_inferior_callback)
4001 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4002 (main): Call initialize_inferiors. Adjust to use ptids, killing
4003 and detaching from all inferiors. Handle multiprocess packet
4005 * linux-low.h: Include gdb_proc_service.h.
4006 (struct process_info_private): New.
4007 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4008 <lwpid_of>: Use ptid_get_lwp.
4009 (get_lwp_thread): Adjust.
4010 (struct lwp_info): Add `dead' member.
4011 (find_lwp_pid): Declare.
4012 * linux-low.c (thread_db_active): Delete.
4013 (new_inferior): Adjust comment.
4014 (inferior_pid): Delete.
4015 (linux_add_process): New.
4016 (handle_extended_wait): Adjust.
4017 (add_lwp): Change unsigned long to ptid.
4018 (linux_create_inferior): Add process to processes table. Adjust
4019 to use ptids. Don't set new_inferior here.
4020 (linux_attach_lwp): Rename to ...
4021 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4022 it. Adjust to use ptids.
4023 (linux_attach_lwp): New.
4024 (linux_attach): Add process to processes table. Don't set
4026 (struct counter): New.
4027 (second_thread_of_pid_p, last_thread_of_process_p): New.
4028 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4030 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4031 processes. Remove process from process table.
4032 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4033 to multiple processes.
4034 (any_thread_of): New.
4035 (linux_detach): Add `pid' argument, and handle it. Remove process
4036 from processes table.
4037 (linux_join): Add `pid' argument. Handle it.
4038 (linux_thread_alive): Change unsighed long argument to ptid_t.
4039 Consider dead lwps as not being alive.
4040 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4041 threads we're not interested in.
4042 (same_lwp, find_lwp_pid): New.
4043 (linux_wait_for_lwp): Change `pid' argument's type from int to
4045 (linux_wait_for_event): Rename to ...
4046 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4047 from int to ptid_t. Adjust.
4048 (linux_wait_for_event): New.
4049 (linux_wait_1): Add `ptid' argument. Change return type to
4050 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4051 that exit from the process table.
4052 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4054 (mark_lwp_dead): New.
4055 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4056 stopping all threads, mark its main lwp as dead.
4057 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4059 (fetch_register, usr_store_inferior_registers)
4060 (regsets_fetch_inferior_registers)
4061 (regsets_store_inferior_registers, linux_read_memory)
4062 (linux_write_memory): Inline `inferior_pid'.
4063 (linux_look_up_symbols): Adjust to use per-process
4065 (linux_request_interrupt): Adjust to use ptids.
4066 (linux_read_auxv): Inline `inferior_pid'.
4067 (initialize_low): Don't reference thread_db_active.
4068 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4069 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4070 (ps_getpid): Return the pid of the current inferior.
4071 * thread-db.c (proc_handle, thread_agent): Delete.
4072 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4074 (find_one_thread): Change argument type to ptid_t. Adjust to
4076 (maybe_attach_thread): Adjust to per-process data and ptids.
4077 (thread_db_find_new_threads): Ditto.
4078 (thread_db_init): Ditto.
4079 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4080 processes table. Adjust to use ptids.
4081 (spu_kill, spu_detach): Adjust interface. Remove process from
4083 (spu_join, spu_thread_alive): Adjust interface.
4084 (spu_wait): Adjust interface. Remove process from processes
4085 table. Adjust to use ptids.
4086 * win32-low.c (current_inferior_tid): Delete.
4087 (current_inferior_ptid): New.
4088 (debug_event_ptid): New.
4089 (thread_rec): Take a ptid. Adjust.
4090 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4091 (child_delete_thread): Ditto.
4092 (do_initial_child_stuff): Add `attached' argument. Add process to
4094 (child_fetch_inferior_registers, child_store_inferior_registers):
4096 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4097 (win32_attach): Pass 1 to do_initial_child_stuff.
4098 (win32_kill): Adjust interface. Remove process from processes
4100 (win32_detach): Ditto.
4101 (win32_join): Adjust interface.
4102 (win32_thread_alive): Take a ptid.
4103 (win32_resume): Adjust to use ptids.
4104 (get_child_debug_event): Ditto.
4105 (win32_wait): Adjust interface. Remove exiting process from
4108 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4110 Non-stop mode support.
4112 * server.h (non_stop): Declare.
4113 (gdb_client_data, handler_func): Declare.
4114 (delete_file_handler, add_file_handler, start_event_loop):
4116 (handle_serial_event, handle_target_event, push_event)
4117 (putpkt_notif): Declare.
4118 * target.h (enum resume_kind): New.
4119 (struct thread_resume): Replace `step' field by `kind' field.
4120 (TARGET_WNOHANG): Define.
4121 (struct target_ops) <wait>: Add `options' argument.
4122 <supports_non_stop, async, start_non_stop>: New fields.
4123 (target_supports_non_stop, target_async): New.
4124 (start_non_stop): Declare.
4125 (mywait): Add `options' argument.
4126 * target.c (mywait): Add `options' argument. Print child exit
4128 (start_non_stop): New.
4129 * server.c (non_stop, own_buf, mem_buf): New globals.
4130 (struct vstop_notif): New.
4131 (notif_queue): New global.
4132 (queue_stop_reply, push_event, discard_queued_stop_replies)
4133 (send_next_stop_reply): New.
4134 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4136 (attach_inferior): In non-stop mode, don't wait for the target
4138 (handle_general_set): Handle QNonStop.
4139 (handle_query): When handling qC, return the current general
4140 thread, instead of the first thread of the list.
4141 (handle_query): If the backend supports non-stop mode, include
4142 QNonStop+ in the qSupported query response.
4143 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4145 (handle_v_attach, handle_v_run): Handle non-stop mode.
4146 (handle_v_stopped): New.
4147 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4148 (myresume): Adjust to use resume_kind. Handle non-stop.
4149 (queue_stop_reply_callback): New.
4150 (handle_status): Handle non-stop mode.
4151 (main): Clear non_stop flag on reconnection. Use the event-loop.
4152 Refactor serial protocol handling from here ...
4153 (process_serial_event): ... to this new function. When GDB
4154 selects any thread, select one here. In non-stop mode, wait until
4155 GDB acks all pending events before exiting.
4156 (handle_serial_event, handle_target_event): New.
4157 * remote-utils.c (remote_open): Install remote_desc in the event
4159 (remote_close): Remove remote_desc from the event loop.
4160 (putpkt_binary): Rename to...
4161 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4162 (putpkt_binary): New as wrapper around putpkt_binary_1.
4163 (putpkt_notif): New.
4164 (prepare_resume_reply): In non-stop mode, don't change the
4166 * event-loop.c: New.
4167 * Makefile.in (OBJ): Add event-loop.o.
4168 (event-loop.o): New rule.
4170 * linux-low.h (pid_of): Moved here.
4172 (get_lwp_thread): Use lwpid_of.
4173 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4174 * linux-low.c (pid_of): Delete.
4175 (inferior_pid): Use lwpid_of.
4176 (linux_event_pipe): New.
4177 (target_is_async_p): New.
4179 (handle_extended_wait): Use lwpid_of.
4180 (add_lwp): Don't set lwpid field.
4181 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4182 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4183 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4184 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4185 first. Adjust to linux_wait_for_event interface changes. Use
4187 (linux_detach): Don't delete the main lwp here.
4188 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4189 (status_pending_p): Don't consider explicitly suspended lwps.
4190 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4191 pointer. Add OPTIONS argument. Change return type to int. Use
4192 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4193 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4194 pointer. Add status pointer argument. Return a pid instead of a
4195 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4196 changes. In non-stop mode, don't switch to a random thread.
4197 (linux_wait): Rename to...
4198 (linux_wait_1): ... this. Add target_options argument, and handle
4199 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4200 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4201 clean exit and signal exit code. Don't stop all threads in
4202 non-stop mode. In all-stop mode, only stop all threads when
4203 reporting a stop to GDB. Handle explicit thread stop requests.
4204 (async_file_flush, async_file_mark): New.
4206 (send_sigstop): Use lwpid_of.
4207 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4208 interface changes. In non-stop mode, don't switch to a random
4210 (linux_resume_one_lwp): Use lwpid_of.
4211 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4212 (linux_resume_one_thread): ... this. Handle resume_stop. In
4213 non-stop mode, don't look for pending flag in all threads.
4214 (resume_status_pending_p): Don't consider explicitly suspended
4216 (my_waitpid): Reimplement. Emulate __WALL.
4217 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4219 (sigchld_handler, linux_supports_non_stop, linux_async)
4220 (linux_start_non_stop): New.
4221 (linux_target_ops): Register linux_supports_non_stop, linux_async
4222 and linux_start_non_stop.
4223 (initialize_low): Install SIGCHLD handler.
4224 * thread-db.c (thread_db_create_event, find_one_thread)
4225 (thread_db_get_tls_address): Use lwpid_of.
4226 * win32-low.c (win32_detach): Adjust to use resume_kind.
4227 (win32_wait): Add `options' argument.
4228 * spu-low.c (spu_resume): Adjust to use resume_kind.
4229 (spu_wait): Add `options' argument.
4231 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4233 Decouple target code from remote protocol.
4235 * target.h (enum target_waitkind): New.
4236 (struct target_waitstatus): New.
4237 (struct target_ops) <wait>: Return an unsigned long. Take a
4238 target_waitstatus pointer instead of a char pointer.
4240 * target.c (mywait): Change prototype to return an unsigned long.
4241 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4242 * server.h (thread_from_wait, old_thread_from_wait): Delete
4244 (prepare_resume_reply): Change prototype to take a
4246 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4247 (last_status, last_ptid): New.
4248 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4249 pid instead of a signal.
4250 (attach_inferior): Remove "status" and "signal" parameters.
4252 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4254 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4255 (handle_v_requests, myresume): Remove "status" and "signal"
4257 (handle_status): New.
4258 (main): Delete local `status'. Adjust.
4259 * remote-utils.c: Include target.h.
4260 (prepare_resume_reply): Change prototype to take a
4261 target_waitstatus. Adjust.
4263 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4265 * spu-low.c (spu_wait): Adjust.
4266 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4268 (win32_wait): Adjust.
4270 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4272 * target.h (struct thread_resume): Delete leave_stopped member.
4273 (struct target_ops): Add a `n' argument to the `resume' callback.
4274 * server.c (start_inferior): Adjust.
4275 (handle_v_cont, myresume): Adjust.
4276 * linux-low.c (check_removed_breakpoint): Adjust to resume
4277 interface change, and to removed leave_stopped field.
4278 (resume_ptr): Delete.
4279 (struct thread_resume_array): New.
4280 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4281 resume interface change.
4282 (linux_continue_one_thread, linux_queue_one_thread)
4283 (resume_status_pending_p): Check if the resume field is NULL
4284 instead of checking the leave_stopped member.
4285 (linux_resume): Adjust to the target resume interface change.
4286 * spu-low.c (spu_resume): Adjust to the target resume interface
4288 * win32-low.c (win32_detach, win32_resume): Ditto.
4290 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4292 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4294 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4296 (linux_continue_one_thread): Only preserve the stepping flag if
4297 there's a pending breakpoint.
4299 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4301 * server.c (main): After the inferior having exited, call
4302 remote_close before exiting gdbserver.
4304 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4306 Fix size of FPSCR in Power 7 processors.
4307 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4308 (PPC_FEATURE_HAS_DFP): New #define.
4309 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4312 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4314 * server.c (handle_query) Whitespace and formatting.
4316 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4318 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4319 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4320 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4321 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4322 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4323 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4324 Makefile.in, configure.ac: Fix whitespace throughout.
4325 * configure: Regenerate.
4327 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4329 * inferiors.c (find_inferior): Make it safe for the callback
4330 function to delete the currently iterated inferior.
4332 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4334 * Makefile.in (linuw_low_h): Move higher.
4335 (thread-db.o): Depend on $(linux_low_h).
4337 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4339 Rename "process" to "lwp" throughout.
4341 * linux-low.c (all_processes): Rename to...
4342 (all_lwps): ... this.
4343 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4344 (add_process): Rename to ...
4345 (add_lwp): ... this. Adjust.
4346 (linux_create_inferior): Adjust.
4347 (linux_attach_lwp): Adjust.
4348 (linux_attach): Adjust.
4349 (linux_kill_one_process): Rename to ...
4350 (linux_kill_one_lwp): ... this. Adjust.
4351 (linux_kill): Adjust.
4352 (linux_detach_one_process): Rename to ...
4353 (linux_detach_one_lwp): ... this. Adjust.
4354 (linux_detach): Adjust.
4355 (check_removed_breakpoint): Adjust.
4356 (status_pending_p): Adjust.
4357 (linux_wait_for_process): Rename to ...
4358 (linux_wait_for_lwp): ... this. Adjust.
4359 (linux_wait_for_event): Adjust.
4360 (send_sigstop): Adjust.
4361 (wait_for_sigstop): Adjust.
4362 (stop_all_processes): Rename to ...
4363 (stop_all_lwps): ... this.
4364 (linux_resume_one_process): Rename to ...
4365 (linux_resume_one_lwp): ... this. Adjust.
4366 (linux_set_resume_request, linux_continue_one_thread)
4367 (linux_queue_one_thread, resume_status_pending_p)
4368 (usr_store_inferior_registers, regsets_store_inferior_registers)
4369 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4371 * linux-low.h (get_process): Rename to ...
4372 (get_lwp): ... this. Adjust.
4373 (get_thread_process): Rename to ...
4374 (get_thread_lwp): ... this. Adjust.
4375 (get_process_thread): Rename to ...
4376 (get_lwp_thread): ... this. Adjust.
4377 (struct process_info): Rename to ...
4378 (struct lwp_info): ... this.
4379 (all_processes): Rename to ...
4380 (all_lwps): ... this.
4381 * proc-service.c (ps_lgetregs): Adjust.
4382 * thread-db.c (thread_db_create_event, find_one_thread)
4383 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4385 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4387 * server.c (handle_query): Handle "qAttached".
4389 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4391 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4392 GPLv3, update license URL.
4394 2009-03-01 Doug Evans <dje@google.com>
4396 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4397 (server_h): Add gdb_signals.h.
4398 (signals.o): Update.
4399 * server.h (target_signal_from_host,target_signal_to_host_p)
4400 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4402 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4404 * remote-utils.c (getpkt): Also generate remote-debug
4405 information if noack_mode is set.
4407 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4409 * server.c (handle_query): Report qXfer:siginfo:read and
4410 qXfer:siginfo:write as supported and handle them.
4411 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4412 * linux-low.c (linux_xfer_siginfo): New.
4413 (linux_target_ops): Set it.
4415 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4417 * server.c (gdbserver_usage): Mention --remote-debug.
4418 (main): Accept '--remote-debug' switch.
4420 2009-01-18 Doug Evans <dje@google.com>
4422 * regcache.c (new_register_cache): No need to check result of xcalloc.
4423 * server.c (handle_search_memory): Back out calls to xmalloc,
4424 result is checked and error is returned to user upon failure.
4425 (handle_query): Ditto. Add more checks for result of malloc.
4426 (handle_v_cont): Check result of malloc, report error back to
4428 (handle_v_run): Ditto. Call freeargv.
4429 * server.h (freeargv): Declare.
4430 * utils.c (freeargv): New fn.
4432 2009-01-15 Doug Evans <dje@google.com>
4434 * gdbreplay.c (perror_with_name): Make arg const char *.
4435 * server.h (target_signal_to_name): Make return type const char *.
4436 * thread-db.c (thread_db_err_str): Make return type const char *.
4437 * utils.c (perror_with_name): Make arg const char *.
4439 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4441 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4442 when handling a EXIT_PROCESS_DEBUG_EVENT.
4444 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4446 * gdbreplay.c (gdbreplay_version): Update copyright year.
4447 * server.c (gdbserver_version): Likewise.
4449 2009-01-05 Doug Evans <dje@google.com>
4451 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4452 (handle_extended_wait): Improve comment.
4454 2008-12-13 Doug Evans <dje@google.com>
4456 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4457 * server.h (ATTR_MALLOC): New macro.
4458 (xmalloc,xcalloc,xstrdup): Declare.
4459 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4460 * inferiors.c: Ditto.
4461 * linux-low.c: Ditto.
4462 * mem-break.c: Ditto.
4463 * regcache.c: Ditto.
4464 * remote-utils.c: Ditto.
4467 * win32-low.c: Ditto.
4469 2008-12-12 Doug Evans <dje@google.com>
4471 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4472 in debugging printf.
4474 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4476 2008-12-09 Doug Evans <dje@google.com>
4478 * linux-low.h (struct process_info): Delete member tid, unused.
4479 * thread-db.c (find_one_thread): Update.
4480 (maybe_attach_thread): Update.
4482 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4484 * target.h (struct target_ops): Add qxfer_osdata member.
4485 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4487 (linux_qxfer_osdata): New functions.
4488 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4490 * server.c (handle_query): Handle "qXfer:osdata:read:".
4491 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4492 (buffer_xml_printf): New functions.
4493 * server.h (struct buffer): New.
4494 (buffer_grow_str, buffer_grow_str0): New macros.
4495 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4496 (buffer_xml_printf): Declare.
4498 2008-11-24 Doug Evans <dje@google.com>
4500 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4502 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4504 * server.c (handle_v_run): Always use the supplied argument list.
4506 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4508 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4509 (xtensa_regmap_table): Add entry for scompare1.
4511 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4513 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4514 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4515 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4516 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4517 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4518 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4519 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4520 XML target descriptions.
4521 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4522 when inferior is running on an ISA 2.05 or later processor. Add
4523 special case to return offset for full 64-bit slot of FPSCR when
4526 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4528 * Makefile.in (SFILES, clean): Added sparc64 files.
4529 (reg-sparc64.o, reg-sparc64.c): New.
4530 * configure.srv (sparc*-*-linux*): New configuration.
4531 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4532 syscall arguments for SPARC.
4533 (regsets_store_inferior_registers): Likewise.
4534 * linux-sparc-low.c: New file.
4536 2008-10-21 Doug Evans <dje@google.com>
4538 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4539 (READLINE_DIR,READLINE_DEP): Delete.
4540 (INTERNAL_CFLAGS): Update.
4541 (LINTFLAGS): Update.
4543 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4545 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4546 whole argv from the last run, not just argv[0].
4548 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4550 * regcache.c (new_register_cache): Return NULL if the register
4551 cache size isn't known yet.
4552 (free_register_cache): Avoid dereferencing a NULL regcache.
4554 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4556 * configure.srv: Merge MIPS and MIPS64.
4558 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4560 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4562 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4564 * Makefile.in: Add required vsx dependencies.
4566 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4567 Declare init_registers_powerpc_vsx32l.
4568 Declare init_registers_powerpc_vsx64l.
4569 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4570 (ppc_arch_setup): Check for VSX in hwcap.
4571 (ppc_fill_vsxregset): New function.
4572 (ppc_store_vsxregset): New function.
4573 Add new VSX entry in regset_info target_regsets.
4575 * configure.srv: Add new VSX dependencies.
4577 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4579 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4580 (remote_open): Set or clear transport_is_reliable.
4581 (putpkt_binary): Don't expect acks in noack mode.
4582 (getpkt): Don't send ack/nac in noack mode.
4583 * server.c (handle_general_set): Handle QStartNoAckMode.
4584 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4586 (main): Reset noack_mode on every connection.
4587 * server.h (noack_mode): Declare.
4589 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4591 * Makefile.in (GDBREPLAY_OBS): New variable.
4592 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4594 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4595 Daniel Jacobowitz <dan@codesourcery.com>
4597 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4598 (usr_store_inferior_registers): Likewise.
4599 (regsets_store_inferior_registers): Likewise.
4601 2008-07-31 Rolf Jansen <rj@surtec.com>
4602 Pedro Alves <pedro@codesourcery.com>
4604 * configure.ac: Check for memmem declaration.
4605 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4606 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4607 (disable_packet_qfThreadInfo): Unconditionally compile.
4608 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4609 * configure, config.in: Regenerate.
4611 2008-07-28 Doug Kwan <dougkwan@google.com>
4613 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4614 (linux_write_memory): Remove declaration of errno.
4616 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4618 * linux-low.c (handle_extended_wait): Do not use "status"
4619 variable uninitialized.
4621 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4623 * server.c (handle_v_attach): Inhibit reporting dll changes.
4625 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4627 * remote-utils.c (prepare_resume_reply): If requested, don't
4628 output "thread:TID" in the T stop reply.
4630 * server.c (disable_packet_vCont, disable_packet_Tthread)
4631 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4632 (handle_query): If requested, disable support for qC, qfThreadInfo
4634 (handle_v_requests): If requested, disable support for vCont.
4635 (gdbserver_show_disableable): New.
4636 (main): Handle --disable-packet and --disable-packet=LIST.
4638 * server.h (disable_packet_vCont, disable_packet_Tthread)
4639 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4641 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4643 * server.c (gdbserver_usage): Mention --version.
4645 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4647 * Makefile.in (gdbreplay.o): New rule.
4649 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4651 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4652 message, not gdbserver.
4654 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4655 Nathan Sidwell <nathan@codesourcery.com>
4656 Joseph Myers <joseph@codesourcery.com>
4658 * acinclude.m4: Include ../../config/acx.m4.
4659 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4660 * configure, config.in: Regenerate.
4661 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4662 * server.c (gdbserver_version): Print PKGVERSION.
4663 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4664 (main): Adjust gdbserver_usage calls.
4665 * gdbreplay.c (version, host_name): Add declarations.
4666 (gdbreplay_version, gdbreplay_usage): New.
4667 (main): Accept --version and --help options.
4669 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4671 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4672 (arm_breakpoint_at): Handle Thumb.
4673 (the_low_target): Add comment.
4675 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4677 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4679 2008-05-09 Doug Evans <dje@google.com>
4681 * server.h (decode_search_memory_packet): Declare.
4682 * remote-utils.c (decode_search_memory_packet): New fn.
4683 * server.c (handle_search_memory_1): New fn.
4684 (handle_search_memory): New fn.
4685 (handle_query): Process qSearch:memory packets.
4687 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4689 * regcache.c (registers_length): Remove.
4690 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4691 full register packet.
4692 * regcache.h (registers_length): Remove prototype.
4693 * server.h (PBUFSIZ): Define to 16384.
4695 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4697 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4698 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4699 powerpc-64l.o, and powerpc-altivec64l.o.
4700 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4701 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4702 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4703 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4704 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4707 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4708 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4709 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4710 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4711 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4712 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4713 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4714 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4715 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4716 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4719 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4720 (init_registers_powerpc_32l): ... this new prototype.
4721 (init_registers_powerpc_32): Remove, replace by ...
4722 (init_registers_powerpc_altivec32l): ... this new prototype.
4723 (init_registers_powerpc_e500): Remove, replace by ...
4724 (init_registers_powerpc_e500l): ... this new prototype.
4725 (init_registers_ppc64): Remove, replace by ...
4726 (init_registers_powerpc_64l): ... this new prototype.
4727 (init_registers_powerpc_64): Remove, replace by ...
4728 (init_registers_powerpc_altivec64l): ... this new prototype.
4729 (ppc_num_regs): Set to 73.
4730 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4731 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4732 (ppc_cannot_store_register): Handle orig_r3 and trap.
4733 (ppc_arch_setup): Update init_registers_... calls.
4734 (ppc_fill_gregset): Handle orig_r3 and trap.
4736 * inferiors.c (clear_inferiors): Reset current_inferior.
4738 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4740 * acinclude.m4: Add override.m4.
4741 * configure: Regenerate.
4743 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4745 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4746 initial call to init_register_ppc64.
4748 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4750 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4751 powerpc*-*-linux* case.
4752 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4754 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4756 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4757 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4759 * linux-ppc-low.c: Include <elf.h>.
4760 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4761 (ppc_hwcap): New global variable.
4762 (ppc_regmap): Remove __SPE__ #ifdef sections.
4763 (ppc_regmap_e500): New global variable.
4764 (ppc_cannot_store_register): Update __SPE__ special case.
4765 (ppc_get_hwcap): New function.
4766 (ppc_arch_setup): Use it to determine whether inferior supports
4767 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4768 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4769 Do not access registers if target does not support AltiVec.
4770 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4771 Do not access registers if target does not support SPE.
4772 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4774 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4776 * linux-low.c (disabled_regsets, num_regsets): New.
4777 (use_regsets_p): Delete.
4778 (linux_wait_for_process): Clear disabled_regsets.
4779 (regsets_fetch_inferior_registers): Check and set it.
4780 (regsets_store_inferior_registers): Likewise.
4781 (linux_fetch_registers, linux_store_registers): Do not use
4783 (initialize_low): Allocate disabled_regsets.
4785 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4787 * Makefile.in (LIBOBJS): New.
4789 (memmem.o): New rule.
4790 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4791 * configure: Regenerated.
4793 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4795 * server.c (handle_query): Never return "unsupported" for
4796 qXfer:features:read queries.
4798 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4800 * server.c (get_features_xml): Fix inverted condition.
4801 (handle_query): Always support qXfer:feature:read.
4803 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4805 * server.c (wrapper_argv): New.
4806 (start_inferior): Handle wrapper_argv. If set, expect an extra
4808 (gdbserver_usage): Document --wrapper.
4809 (main): Parse --wrapper.
4811 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4813 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4814 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4815 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4816 (ppc_set_pc): Likewise.
4817 (ppc_arch_setup): New function.
4818 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4819 of collect_register.
4820 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4822 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4824 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4825 instead of linux-ppc64-low.o.
4826 * linux-ppc64-low.c: Remove file.
4827 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4828 (linux-ppc64-low.o): Remove rule.
4830 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4831 (init_registers_powerpc_64): Likewise.
4832 (ppc_regmap): Conditionally define depending on __powerpc64__.
4833 (ppc_cannot_store_register): Do not special-case "fpscr" when
4834 compiled on __powerpc64__.
4835 (ppc_collect_ptrace_register): New function.
4836 (ppc_supply_ptrace_register): New function.
4837 (ppc_breakpoint): Change type to "unsigned int".
4838 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4839 (the_low_target): Conditionally provide initializers for the
4840 arch_setup member depending on __powerpc64__. Install
4841 collect_ptrace_register and supply_ptrace_register members.
4843 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4845 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4846 * server.c (gdbserver_xmltarget): Define.
4847 (get_features_xml): Use it to replace "target.xml" and arch_string.
4849 * configure.srv: Remove srv_xmltarget. Add XML files that were
4850 mentioned there to srv_xmlfiles instead. Remove conditional tests
4851 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4852 srv_xmlfiles and srv_regobj to include all possible choices.
4853 * configure.ac (srv_xmltarget): Remove.
4854 (srv_xmlfiles): Do not add "target.xml".
4855 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4856 checks for supplementary target information.
4857 * configure: Regenerate.
4858 * Makefile.in (XML_TARGET): Remove.
4859 (target.xml): Remove rule.
4860 (clean): Do not clean up target.xml.
4861 (.PRECIOUS): Do not mention target.xml.
4863 * target.h (struct target_ops): Remove arch_string member.
4864 * linux-low.c (linux_arch_string): Remove.
4865 (linux_target_ops): Remove arch_string initializer.
4866 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4867 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4868 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4869 * spu-low.c (spu_arch_string): Remove.
4870 (spu_target_ops): Remove arch_string initializer.
4871 * win32-low.c (win32_arch_string): Remove.
4872 (win32_target_ops): Remove arch_string initializer.
4873 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4874 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4875 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4877 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4879 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4880 by collect_ptrace_register and supply_ptrace_register hooks.
4881 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4882 instead of checking for the_low_target.left_pad_xfer.
4883 (usr_store_inferior_registers): Use collect_ptrace_register callback
4884 instead of checking for the_low_target.left_pad_xfer.
4886 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4887 (s390_supply_ptrace_register): Likewise.
4888 (s390_fill_gregset): Call s390_collect_ptrace_register.
4889 (the_low_target): Update.
4891 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4892 (ppc_supply_ptrace_register): Likewise.
4893 (the_low_target): Update.
4895 * linux-i386-low.c (the_low_target): Update.
4896 * linux-x86-64-low.c (the_low_target): Update.
4898 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4900 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4901 reg-s390.o and reg-s390x.o.
4903 * linux-low.c (new_inferior): New global variable.
4904 (linux_create_inferior, linux_attach): Set it.
4905 (linux_wait_for_process): Call the_low_target.arch_setup after the
4906 target has stopped for the first time.
4907 (initialize_low): Do not call the_low_target.arch_setup.
4909 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4910 (s390_set_pc): Likewise.
4911 (s390_arch_setup): New function.
4912 (the_low_target): Use s390_arch_setup as arch_setup routine.
4914 * regcache.c (realloc_register_cache): New function.
4915 (set_register_cache): Call it for each existing regcache.
4917 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4919 * server.h (init_registers): Remove prototype.
4921 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4922 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4923 instead of init_registers ().
4924 * linux-arm-low.c (init_registers_arm): Add prototype.
4925 (init_registers_arm_with_iwmmxt): Likewise.
4926 (the_low_target): Add initializer for arch_setup field.
4927 * linux-cris-low.c (init_registers_cris): Add prototype.
4928 (the_low_target): Add initializer for arch_setup field.
4929 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4930 (the_low_target): Add initializer for arch_setup field.
4931 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4932 (the_low_target): Add initializer for arch_setup field.
4933 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4934 (the_low_target): Add initializer for arch_setup field.
4935 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4936 (the_low_target): Add initializer for arch_setup field.
4937 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4938 (the_low_target): Add initializer for arch_setup field.
4939 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4940 (init_registers_mips64_linux): Likewise.
4941 (the_low_target): Add initializer for arch_setup field.
4942 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4943 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4944 (the_low_target): Add initializer for arch_setup field.
4945 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4946 (init_registers_powerpc_64): Likewise.
4947 (the_low_target): Add initializer for arch_setup field.
4948 * linux-s390-low.c (init_registers_s390): Add prototype.
4949 (init_registers_s390x): Likewise.
4950 (the_low_target): Add initializer for arch_setup field.
4951 * linux-sh-low.c (init_registers_sh): Add prototype.
4952 (the_low_target): Add initializer for arch_setup field.
4953 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4954 (the_low_target): Add initializer for arch_setup field.
4955 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4956 (the_low_target): Add initializer for arch_setup field.
4958 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4959 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4960 instead of init_registers ().
4961 * win32-arm-low.c (init_registers_arm): Add prototype.
4962 (the_low_target): Add initializer for arch_setup field.
4963 * win32-i386-low.c (init_registers_i386): Add prototype.
4964 (the_low_target): Add initializer for arch_setup field.
4966 * spu-low.c (init_registers_spu): Add prototype.
4967 (initialize_low): Call initialie_registers_spu () instead of
4968 initialize_registers ().
4970 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4972 * server.c (handle_v_requests): When handling the vRun and vAttach
4973 packets, if already debugging a process, don't kill it. Return an
4976 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4978 * server.c (handle_query): Correct length check.
4980 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4982 * win32-low.c (do_initial_child_stuff): Add process handle
4983 parameter. Set current_process_handle and current_process_id from the
4984 parameters. Clear globals.
4985 (win32_create_inferior): Don't set current_process_handle and
4986 current_process_id here. Instead pass them on the call to
4987 do_initial_child_stuff.
4988 (win32_attach): Likewise.
4989 (win32_clear_inferiors): New.
4990 (win32_kill): Don't close the current process handle or the
4991 current thread handle here. Instead call win32_clear_inferiors.
4992 (win32_detach): Don't open a new handle to the process. Call
4993 win32_clear_inferiors.
4994 (win32_join): Don't rely on current_process_handle; open a new
4995 handle using the process id.
4996 (win32_wait): Call win32_clear_inferiors when the inferior process
4999 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5001 * server.c (monitor_show_help): Add "exit".
5003 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5005 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5006 (clean): Add reg-xtensa.c.
5007 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5008 * configure.srv (xtensa*-*-linux*) New target.
5009 * linux-xtensa-low.c: New.
5010 * xtensa-xtregs.c: New.
5012 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5014 * hostio.c: Don't include errno.h.
5015 (errno_to_fileio_errno): Move to hostio-errno.
5016 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5017 error number outputting to the target->hostio_last_error callback.
5018 (hostio_packet_error): Use FILEIO_EINVAL directly.
5019 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5020 calls to hostio_error.
5021 * hostio-errno.c: New.
5022 * server.h (hostio_last_error_from_errno): Declare.
5023 * target.h (target_ops): Add hostio_last_error member.
5024 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5025 as hostio_last_error handler.
5026 * spu-low.c (spu_target_ops): Likewise.
5027 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5028 (wince_hostio_last_error): New functions.
5029 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5030 as hostio_last_error handler.
5031 (win32_target_ops) [!_WIN32_WCE]: Register
5032 hostio_last_error_from_errno as hostio_last_error handler.
5033 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5034 (hostio-errno.o): New rule.
5035 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5036 * configure.srv (srv_hostio_err_objs): New variable. Default to
5038 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5039 * configure: Regenerate.
5041 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5043 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5044 (linux_kill, linux_detach): Clean up the process list.
5045 * remote-utils.c (remote_open): Improve port number parsing.
5046 (putpkt_binary, input_interrupt): Only send interrupts if the target
5048 * server.c (extended_protocol): Make static.
5049 (attached): Define earlier.
5050 (exit_requested, response_needed, program_argv): New variables.
5051 (target_running): New.
5052 (start_inferior): Clear attached here.
5053 (attach_inferior): Set attached here.
5054 (require_running): Define.
5055 (handle_query): Use require_running and target_running. Implement
5057 (handle_v_attach, handle_v_run): New.
5058 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5059 (gdbserver_usage): Update.
5060 (main): Redo argument parsing. Handle --debug and --multi. Handle
5061 --attach along with other options or after the port. Save
5062 program_argv. Support no initial program. Resynchronize
5063 communication with GDB after an error. Handle "monitor exit".
5064 Use require_running and target_running. Always allow the extended
5065 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5066 restart in extended mode.
5067 * README: Refer to the GDB manual. Update --attach usage.
5069 2007-12-20 Andreas Schwab <schwab@suse.de>
5071 * linux-low.c (STACK_SIZE): Define.
5072 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5073 (linux_test_for_tracefork): Likewise.
5075 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5077 * linux-low.c (linux_wait_for_event): Update messages. Do not
5078 reinsert auto-delete breakpoints.
5079 * mem-break.c (struct breakpoint): Change return type of handler to
5081 (set_breakpoint_at): Update handler type.
5082 (reinsert_breakpoint_handler): Return 1 instead of calling
5084 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5086 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5087 * mem-break.h (set_breakpoint_at): Update handler type.
5088 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5089 * win32-low.c (auto_delete_breakpoint): New.
5090 (get_child_debug_event): Use it.
5092 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5094 * configure.ac: Check for pread and pwrite.
5095 * hostio.c (handle_pread): Fall back to lseek and read.
5096 (handle_pwrite): Fall back to lseek and write.
5097 * config.in, configure: Regenerated.
5099 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5101 * server.c (myresume): Add own_buf argument.
5102 (main): Update calls.
5104 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5106 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5107 * remote-utils.c (remote_open): Do not call disable_async_io.
5108 (block_async_io): Delete.
5109 (unblock_async_io): Make static.
5110 (initialize_async_io): New.
5111 * server.c (handle_v_cont): Handle async I/O here.
5112 (myresume): Likewise. Move other common resume tasks here...
5113 (main): ... from here. Call initialize_async_io. Disable async
5114 I/O before the main loop.
5115 * server.h (initialize_async_io): Declare.
5116 (block_async_io, unblock_async_io): Delete prototypes.
5117 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5119 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5121 * remote-utils.c (readchar): Allow binary data in received messages.
5123 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5125 * win32-low.c (attaching): New global.
5126 (win32_create_inferior): Clear the `attaching' global.
5127 (win32_attach): Set the `attaching' global.
5128 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5129 attaching. Only set a breakpoint at the entry point if not
5132 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5134 * server.c (main): Don't report dll events on the initial
5135 connection on attaches.
5137 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5139 * server.c (main): Relax numerical bases supported for the pid of
5140 the --attach command line argument.
5142 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5144 * win32-low.c (win32_attach): Call OpenProcess before
5145 DebugActiveProcess, not after. Add last error output to error
5148 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5150 * win32-low.c (win32_get_thread_context)
5151 (win32_set_thread_context): New functions.
5152 (thread_rec): Use win32_get_thread_context.
5153 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5154 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5157 2007-12-03 Leo Zayas
5158 Pedro Alves <pedro_alves@portugalmail.pt>
5160 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5162 (child_add_thread): Minor cleanup.
5163 (child_continue): Resume artificially suspended threads before
5164 calling ContinueDebugEvent.
5165 (suspend_one_thread): New.
5166 (fake_breakpoint_event): New.
5167 (get_child_debug_event): Change return type to int. Check here if
5168 gdb sent an interrupt request. If a soft interrupt was requested,
5169 fake a breakpoint event. Return 0 if there is no event to handle,
5171 (win32_wait): Don't check here if gdb sent an interrupt request.
5172 Ensure there is a valid event to handle.
5173 (win32_request_interrupt): Add soft interruption method as last
5176 2007-12-03 Leo Zayas
5177 Pedro Alves <pedro_alves@portugalmail.pt>
5179 * win32-low.h (win32_thread_info): Add descriptions to the
5180 structure members. Replace `suspend_count' counter by a
5182 * win32-low.c (thread_rec): Update condition of when to get the
5183 context from the inferior. Rely on ContextFlags being set if it
5184 has already been retrieved. Only suspend the inferior thread if
5185 we haven't already. Warn if that fails.
5186 (continue_one_thread): s/suspend_count/suspended/. Only call
5187 ResumeThread once. Warn if that fails.
5189 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5191 * win32-low.c (win32_wait): Don't read from the inferior when it
5194 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5196 * Makefile.in (win32_low_h): New variable.
5197 (win32-low.o): Add dependency on $(win32_low_h).
5198 (win32-arm-low.o, win32-i386-low.o): New rules.
5200 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5202 * hostio.c: Correct copyright year.
5204 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5206 * Makefile.in (OBS): Add hostio.o.
5207 (hostio.o): New rule.
5208 * server.h (handle_vFile): Declare.
5209 * hostio.c: New file.
5210 * server.c (handle_v_requests): Take packet_len and new_packet_len
5211 for binary packets. Call handle_vFile.
5212 (main): Update call to handle_v_requests.
5214 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5216 * linux-low.c: Include <sched.h>.
5218 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5220 * linux-low.c (linux_tracefork_grandchild): New.
5221 (linux_tracefork_child): Use clone.
5222 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5224 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5226 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5228 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5230 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5232 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5234 * inferiors.c (change_inferior_id): Delete.
5235 (add_pid_to_list, pull_pid_from_list): New.
5236 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5237 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5238 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5239 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5240 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5241 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5242 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5243 (using_threads): Always set to 1.
5244 (handle_extended_wait): New.
5245 (add_process): Do not set TID.
5246 (linux_create_inferior): Set must_set_ptrace_flags.
5247 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5248 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5249 (linux_thread_alive): Rename TID argument to LWPID.
5250 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5251 (linux_wait_for_event): Do not use TID or check using_threads. Update
5252 call to dead_thread_notify. Call handle_extended_wait.
5253 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5254 (send_sigstop): Delete sigstop_sent.
5255 (wait_for_sigstop): Avoid TID.
5256 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5257 (linux_test_for_tracefork): New.
5258 (linux_lookup_signals): Use thread_db_active and
5259 linux_supports_tracefork_flag.
5260 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5261 * linux-low.h (get_process_thread): Avoid TID.
5262 (struct process_ifo): Move thread_known and tid to the end. Remove
5264 (linux_attach_lwp, thread_db_init): Update prototypes.
5265 * server.h (change_inferior_id): Delete prototype.
5266 (add_pid_to_list, pull_pid_from_list): New prototypes.
5267 * thread-db.c (thread_db_use_events): New.
5268 (find_first_thread): Rename to...
5269 (find_one_thread): ...this. Update callers and messages. Do not
5270 call fatal. Check thread_db_use_events. Do not call
5271 change_inferior_id or new_thread_notify.
5272 (maybe_attach_thread): Update. Do not call new_thread_notify.
5273 (thread_db_init): Set thread_db_use_events. Check use_events.
5274 * utils.c (fatal, warning): Correct message prefix.
5276 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5278 * Makefile.in (clean): Remove new files.
5279 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5280 (powerpc-64.o, powerpc-64.c): New rules.
5281 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5282 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5284 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5286 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5287 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5288 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5289 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5290 (target_regsets): Add AltiVec and SPE register sets.
5291 * configure.ac: Check for AltiVec and SPE.
5292 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5293 (ppc_fill_vrregset, ppc_store_vrregset): New.
5294 (target_regsets): Add AltiVec register set.
5295 * configure: Regenerated.
5297 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5299 * linux-low.c (O_LARGEFILE): Define.
5300 (linux_read_memory): Use /proc/PID/mem.
5301 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5302 * configure, config.in: Regenerated.
5304 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5306 * linux-low.c (linux_wait_for_event): Do not pass signals while
5309 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5311 * win32-low.c (create_process): New.
5312 (win32_create_inferior): Use create_process instead of
5313 CreateProcess. If create_process failed retry appending an ".exe"
5314 suffix. Store the GetLastError result immediatelly after
5315 create_process calls and use it on the call to error.
5317 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5319 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5321 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5323 * configure.ac: Switch license to GPLv3.
5325 2007-08-01 Michael Snyder <msnyder@access-company.com>
5327 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5329 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5331 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5333 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5334 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5335 CloseToolhelp32Snapshot.
5336 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5337 CloseToolhelp32Snapshot.
5339 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5341 * server.c (main): Check for inferior exit before main loop.
5343 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5345 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5346 instead of on tmp_desc.
5348 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5349 Daniel Jacobowitz <dan@codesourcery.com>
5351 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5352 (add_thread): Minor cleanups.
5353 (clear_inferiors): Move lower in the file. Clear the DLL
5355 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5356 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5357 (xml_escape_text): New.
5358 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5360 (handle_v_cont): Report errors.
5361 (gdbserver_version): Update.
5362 (main): Correct size of own_buf. Do not report initial DLL events.
5363 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5364 (unloaded_dll, xml_escape_text): New.
5365 * win32-low.c (enum target_waitkind): Update comments.
5366 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5367 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5368 (win32_EnumProcessModules, win32_GetModuleInformation)
5369 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5370 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5371 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5372 (win32_Module32First, win32_Module32Next, load_toolhelp)
5373 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5374 (get_child_debug_event): Handle DLL events.
5375 (win32_wait): Likewise.
5377 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5379 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5380 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5382 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5384 * win32-low.c (handle_output_debug_string): Ignore event if not
5387 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5389 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5391 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5393 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5395 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5397 * inferiors.c (change_inferior_id): Add comment.
5398 * linux-low.c (check_removed_breakpoint): Add an early
5399 prototype. Improve debug output.
5400 (linux_attach): Doc update.
5401 (linux_detach_one_process, linux_detach): Clean up before releasing
5403 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5404 * linux-low.h (struct process_info): Doc improvement.
5405 * mem-break.c (delete_all_breakpoints): New.
5406 * mem-break.h (delete_all_breakpoints): New prototype.
5407 * thread-db.c (find_first_thread): New.
5408 (thread_db_create_event): Call it instead of
5409 thread_db_find_new_threads. Clean up unused variables.
5410 (maybe_attach_thread): Remove first thread handling.
5411 (thread_db_find_new_threads): Use find_first_thread.
5412 (thread_db_get_tls_address): Likewise.
5414 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5416 * thread-db.c (thread_db_find_new_threads): Add prototype.
5417 (thread_db_create_event): Check for the main thread before adding
5419 (maybe_attach_thread): Only enable event reporting if TID == 0.
5420 (thread_db_get_tls_address): Check for new threads.
5422 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5424 * linux-low.c (linux_create_inferior): Try execv before execvp.
5425 * spu-low.c (spu_create_inferior): Likewise.
5427 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5429 * linux-low.c (linux_create_inferior): Change execv to execvp.
5430 * spu-low.c (spu_create_inferior): Likewies.
5432 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5434 * Makefile.in (clean): Clean new files instead of deleted ones.
5435 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5436 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5438 * configure.srv: Specify XML files and new regformats for MIPS and
5440 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5441 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5442 an entry for the restart register.
5443 (mips_cannot_fetch_register, mips_cannot_store_register)
5444 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5445 register names to match the XML descriptions.
5446 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5447 restart register instead of $0.
5449 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5450 Markus Deuling <deuling@de.ibm.com>
5452 * remote-utils.c (decode_xfer_write): New function.
5453 * server.h (decode_xfer_write): Add prototype.
5454 * server.c (handle_query): Add PACKET_LEN argument. Support
5455 qXfer:spu:read and qXfer:spu:write packets.
5456 (main): Pass packet_len to handle_query.
5457 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5458 * target.h (target_ops): Add qxfer_spu.
5460 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5462 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5463 accessing non-seekable spufs files.
5465 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5467 * server.c (handle_query): Add reply for qC packet.
5469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5470 Leo Zayas <lerele@champenstudios@com>
5472 * server.h (check_remote_input_interrupt_request): New function.
5473 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5474 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5475 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5476 (check_remote_input_interrupt_request): New function.
5477 * server.h (check_remote_input_interrupt_request): Declare.
5478 * win32-low.c (winapi_DebugBreakProcess,
5479 winapi_GenerateConsoleCtrlEvent): New typedefs.
5480 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5482 (win32_wait): Check for remote interrupt request
5483 with check_remote_input_interrupt_request.
5484 (win32_request_interrupt): New function.
5485 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5487 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5489 * win32-low.c (debug_registers_changed,
5490 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5491 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5492 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5493 (thread_rec): Get context using the low target.
5494 (child_add_thread): Call thread_added on the low target,
5495 which does the same thing.
5497 (do_initial_child_stuff): Remove debug registers references.
5498 Set context using the low target. Resume threads after
5499 setting the contexts.
5500 (child_continue): Remove dead variable. Remove debug
5501 registers references.
5502 (child_fetch_inferior_registers): Go through the low target.
5503 (do_child_store_inferior_registers): Remove.
5504 (child_store_inferior_registers): Go through the low target.
5505 (win32_resume): Remove debug registers references.
5506 Set context using the low target.
5507 (handle_exception): Change return type to void. Don't record
5508 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5509 first chance exception.
5510 (get_child_debug_event): Change return type to void. Remove
5511 goto loop. Always return after waiting for debug event.
5512 (win32_wait): Convert to switch statement. Handle spurious
5515 * win32-i386-low.c (debug_registers_changed,
5516 debug_registers_used): New.
5517 (initial_stuff): Rename to ...
5518 (i386_initial_stuff): ... this. Clear debug registers
5520 (store_debug_registers): Delete.
5521 (i386_get_thread_context): New.
5522 (load_debug_registers): Delete.
5523 (i386_set_thread_context): New.
5524 (i386_thread_added): New.
5525 (single_step): Rename to ...
5526 (i386_single_step): ... this.
5527 (do_fetch_inferior_registers): Rename to ...
5528 (i386_fetch_inferior_register): ... this.
5529 (i386_store_inferior_register): New.
5530 (the_low_target): Adapt to new interface.
5532 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5533 (arm_get_thread_context): New.
5534 (arm_set_thread_context): New.
5536 (do_fetch_inferior_registers): Rename to ...
5537 (arm_fetch_inferior_register): ... this.
5538 (arm_store_inferior_register): New.
5539 (arm_wince_breakpoint): Reimplement as unsigned long.
5540 (arm_wince_breakpoint_len): Define.
5541 (the_low_target): Adapt to new interface.
5543 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5544 load_debug_registers. Add get_thread_context, set_thread_context,
5545 thread_added and store_inferior_register. Rename
5546 fetch_inferior_registers to fetch_inferior_register.
5547 (regptr): Remove declaration.
5549 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5551 * linux-low.c (linux_detach): Change return type to int. Return 0.
5552 * spu-low.c (spu_detach): Likewise.
5554 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5556 * target.h (target_ops): Change return type of detach to int.
5558 (join_inferior): New.
5559 * server.c (main): Don't skip detach support on mingw32.
5560 If the inferior doesn't support detaching return error.
5561 Call join_inferior instead of using waitpid.
5562 * linux-low.c (linux_join): New.
5563 (linux_target_op): Add linux_join.
5564 * spu-low.c (spu_join): New.
5565 (spu_target_ops): Add spu_join.
5566 * win32-low.c (win32_detach): Adapt to new interface.
5567 Reopen current_process_handle before detaching. Issue a child
5568 resume before detaching.
5570 (win32_target_op): Add win32_join.
5572 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5574 * win32-low.c (win32-attach): Fix return value.
5575 * target.h (target_ops): Describe ATTACH return values.
5577 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5579 * win32-low.c (GETPROCADDRESS): Define.
5580 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5581 (winapi_DebugSetProcessKillOnExit): Likewise.
5582 (win32_create_inferior): Force usage of ansi CreateProcessA.
5583 (win32_attach): Use GETPROCADDRESS.
5584 (win32_detach): Likewise.
5586 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5588 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5590 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5592 * win32-low.c: Commit leftover changes from 2007-03-29.
5594 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5596 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5597 fields short instead of int. Add explicit padding.
5598 (i387_cache_to_fsave): Remove unnecessary casts.
5599 (i387_fsave_to_cache): Doc fix.
5600 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5602 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5604 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5605 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5607 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5609 * configure.srv (arm*-*-mingw32ce*): Move near the other
5612 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5614 * configure.ac: Add errno checking.
5615 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5616 sys/file.h and malloc.h.
5617 (AC_CHECK_DECLS): Add perror.
5618 (srv_mingwce): Handle.
5619 * configure.srv (i[34567]86-*-cygwin*): Add
5620 win32-i386-low.o to srv_tgtobj.
5621 (i[34567]86-*-mingw*): Likewise.
5622 (arm*-*-mingw32ce*): Add case.
5623 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5624 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5625 [__MINGW32CE__] (strerror): New function.
5626 [__MINGW32CE__] (errno): Define to GetLastError.
5627 [__MINGW32CE__] (COUNTOF): New macro.
5628 (remote_open): Remove extra close call.
5629 * mem-break.c (delete_breakpoint_at): New function.
5630 * mem-break.h (delete_breakpoint_at): Declare.
5631 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5632 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5633 [USE_WIN32API] (read, write): Add char* casts.
5634 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5635 * server.h: Include wincecompat.h on Windows CE.
5636 [HAVE_ERRNO_H]: Check.
5637 (perror): Declare if not declared.
5638 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5639 (perror_with_name): Remove errno declaration.
5640 * wincecompat.h: New.
5641 * wincecompat.c: New.
5643 * win32-arm-low.c: New.
5644 * win32-i386-low.c: New.
5645 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5646 (OUTMSG2): Make it safe.
5648 (COUNTOF): New macro.
5649 (NUM_REGS): Get it from the low target.
5650 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5651 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5652 (thread_rec): Let low target handle debug registers.
5653 (child_add_thread): Likewise.
5654 (child_init_thread_list): Likewise.
5655 (continue_one_thread): Likewise.
5657 (do_child_fetch_inferior_registers): Move to ...
5658 * win32-i386-low.c: ... here, and rename to ...
5659 (do_fetch_inferior_registers): ... this.
5660 * win32-low.c (child_fetch_inferior_registers):
5661 Go through the low target.
5662 (do_child_store_inferior_registers): Use regptr.
5663 (strwinerror): New function.
5664 (win32_create_inferior): Handle Windows CE.
5665 Use strwinerror instead of strerror on Windows error
5666 codes. Add program to the error output.
5667 Don't close the main thread handle on Windows CE.
5668 (win32_attach): Use coredll.dll on Windows CE.
5669 (win32_kill): Close current process and current
5671 (win32_detach): Use coredll.dll on Windows CE.
5672 (win32_resume): Let low target handle debug registers, and
5674 (handle_exception): Add/Remove initial breakpoint. Avoid
5675 non-existant WSTOPSIG on Windows CE.
5676 (win32_read_inferior_memory): Cast to remove warning.
5677 (win32_arch_string): Go through the low target.
5678 (initialize_low): Call set_breakpoint_data with the low
5679 target's breakpoint.
5680 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5681 FOP_REGNUM, mappings): Move to ...
5682 * win32-i386-low.c: ... here.
5683 * win32-low.c (win32_thread_info): Move to ...
5684 * win32-low.h: ... here.
5685 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5686 win32-arm-low.c and wincecompat.c.
5687 (all:): Add $EXEEXT.
5688 (install-only:): Likewise.
5689 (gdbserver:): Likewise.
5690 (gdbreplay:): Likewise.
5691 * config.in: Regenerate.
5692 * configure: Regenerate.
5694 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5696 * win32-low.c: Rename typedef thread_info to
5697 win32_thread_info throughout.
5699 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5701 * win32-i386-low.c: Rename to ...
5702 * win32-low.c: ... this.
5703 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5704 * Makefile.in: Likewise.
5706 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5708 * remote-utils.c (monitor_output): Constify msg parameter.
5709 * server.h (monitor_output): Likewise.
5710 * win32-i386-low.c (handle_output_debug_string): New.
5711 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5712 handle_output_debug_string.
5713 (get_child_debug_event): Likewise.
5715 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5717 * server.c (main): Correct strtoul check.
5719 2007-03-27 Jon Ringle <jon@ringle.org>
5721 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5723 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5725 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5727 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5729 * terminal.h: Check HAVE_SGTTY_H.
5731 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5733 * remote-utils.c (remote_open): Print out the assigned port number.
5735 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5737 * remote-utils.c (monitor_output): New function.
5738 * server.c (debug_threads): Define here.
5739 (monitor_show_help): New function.
5740 (handle_query): Handle qRcmd.
5741 (main): Do not handle 'd' packet.
5742 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5743 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5746 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5748 * Makefile.in (EXEEXT): New.
5749 (clean): Use $(EXEEXT).
5751 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5753 * target.h (target_ops): Rename send_signal to request_interrupt,
5754 and remove enum target_signal parameter.
5755 * linux-low.c (linux_request_interrupt): Rename from
5756 linux_send_signal, and always send SIGINT.
5757 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5758 and always send SIGINT.
5759 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5761 (input_interrupt): Likewise.
5763 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5765 * server.c (get_features_xml): Check if target implemented
5767 * win32-i386-low.c (win32_arch_string): New.
5768 (win32_target_ops): Add win32_arch_string as arch_string member.
5770 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5772 * spu-low.c (spu_arch_string): New.
5773 (spu_target_ops): Add spu_arch_string.
5775 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5777 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5778 * configure.ac: Do not check for terminal.h.
5779 * configure, config.in: Regenerated.
5781 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5783 * Makefile.in (OBS): Add $(XML_BUILTIN).
5784 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5786 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5787 (arm-with-iwmmxt.c): New.
5788 * config.in, configure: Regenerate.
5789 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5790 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5791 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5792 (arm*-*-linux*): Add iWMMXt and regset support.
5793 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5794 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5795 (arm_store_wmmxregset, target_regsets): New.
5796 * server.c (get_features_xml): Take annex argument. Check builtin
5798 (handle_query): Handle multiple annexes.
5800 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5802 * remote-utils.c [USE_WIN32API] (read, write): Define.
5803 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5806 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5808 * linux-i386-low.c (the_low_target): Set arch_string.
5809 * linux-x86-64-low.c (the_low_target): Likewise.
5810 * linux-low.c (linux_arch_string): New.
5811 (linux_target_ops): Add it.
5812 * linux-low.h (struct linux_target_ops): Add arch_string.
5813 * server.c (write_qxfer_response): Use const void * for DATA.
5814 (get_features_xml): New.
5815 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5816 * target.h (struct target_ops): Add arch_string method.
5818 2007-01-03 Denis Pilat <denis.pilat@st.com>
5819 Daniel Jacobowitz <dan@codesourcery.com>
5821 * linux-low.c (linux_kill): Handle being called with no threads.
5822 * win32-i386-low.c (win32_kill): Likewise.
5823 (get_child_debug_event): Clear current_process_handle.
5825 2006-12-30 Denis PILAT <denis.pilat@st.com>
5826 Daniel Jacobowitz <dan@codesourcery.com>
5828 * remote-utils.c (remote_open): Check the type of specified
5829 serial port devices before opening them.
5830 * server.c (main): Kill the inferior if an error occurs during
5831 the first remote_open.
5833 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5835 * README: Update supported targets.
5837 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5839 * Makefile.in (clean): Remove reg-mips64.c.
5840 (reg-mips64.c, reg-mips64.o): New rules.
5841 * configure.srv: Handle mips64. Include regset support for mips.
5842 * linux-mips-low.c (union mips_register): New.
5843 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5844 (mips_breakpoint, mips_breakpoint_at): Use int.
5845 (mips_collect_register, mips_supply_register)
5846 (mips_collect_register_32bit, mips_supply_register_32bit)
5847 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5848 (mips_store_fpregset, target_regsets): New.
5849 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5851 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5853 * configure.srv: Add target "spu*-*-*".
5854 * Makefile.in (clean): Remove reg-spu.c.
5855 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5856 * spu-low.c: New file.
5858 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5860 * configure.ac: Correct td_thr_tls_get_addr test.
5861 * configure: Regenerated.
5863 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5865 * linux-low.c (linux_wait_for_event): Reformat. Use the
5867 * remote-utils.c (decode_address_to_semicolon): New.
5868 * server.c (pass_signals, handle_general_set): New.
5869 (handle_query): Mention QPassSignals for qSupported.
5870 (main): Call handle_general_set.
5871 * server.h (pass_signals, decode_address_to_semicolon): New.
5873 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5875 * server.c (handle_query): Correct error handling for read_auxv.
5877 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5879 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5880 and srv_linux_thread_db to yes.
5881 * linux-s390-low.c (s390_fill_gregset): New function.
5882 (target_regsets): Define data structure.
5884 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5886 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5887 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5888 * config.in, configure: Regenerated.
5889 * inferiors.c (gdb_id_to_thread): New function.
5890 (gdb_id_to_thread_id): Use it.
5891 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5892 * linux-low.h (struct process_info): Add th member.
5893 (thread_db_get_tls_address): New prototype.
5894 * remote-utils.c (decode_address): Make non-static.
5895 * server.c (handle_query): Handle qGetTLSAddr.
5896 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5897 * target.h (struct target_ops): Add get_tls_address.
5898 * thread-db.c (maybe_attach_thread): Save the thread handle.
5899 (thread_db_get_tls_address): New.
5901 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5903 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5904 (linux_resume_one_process): Take a siginfo_t *. Update all
5905 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5906 (struct pending_signals): Add a siginfo_t.
5907 (linux_wait_for_process): Always set last_status.
5908 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5909 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5910 * linux-low.h (struct process_info): Add last_status.
5912 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5914 * remote-utils.c (try_rle): New function.
5915 (putpkt_binary): Use it.
5917 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5919 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5920 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5921 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5922 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5923 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5926 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5928 * server.c (terminal_fd): New variable.
5929 (old_foreground_pgrp): Likewise.
5930 (restore_old_foreground_pgrp): New function.
5931 (start_inferior): Record the terminal file descriptor in terminal_fd
5932 and its original foreground group in old_foreground_pgrp. Register
5933 restore_old_foreground_pgrp with atexit().
5935 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5937 * server.c (handle_query): Correct qPart to qXfer.
5939 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5941 * configure.ac: Check for more headers which are missing on
5942 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5943 * configure.srv: Add Cygwin and mingw32.
5944 * remote-utils.c: Don't include headers unconditionally which
5945 are missing on mingw32. Include <winsock.h> for mingw32.
5946 (remote_open): Adjust for mingw32 support. Flush
5947 standard error after writing to it.
5948 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5949 (unblock_async_io, enable_async_io, disable_async_io)
5950 (readchar, getpkt): Update for Winsock support.
5951 (prepare_resume_reply): Expect a protocol signal number.
5952 * server.c: Disable <sys/wait.h> on mingw32.
5953 (start_inferior): Adjust for mingw32 support. Flush
5954 standard error after writing to it.
5955 (attach_inferior): Likewise. Use protocol signal
5957 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5959 * win32-i386-low.c: New file.
5960 * Makefile.in (XM_CLIBS): Set.
5961 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5962 (win32-i386-low.o): New dependency rule.
5963 * linux-low.c (linux_wait): Use target signal numbers.
5964 * target.h (struct target_ops): Doc fix.
5965 * server.h (target_signal_to_name): New prototype.
5966 * gdbreplay.c: Don't include headers unconditionally which
5967 are missing on mingw32. Include <winsock.h> for mingw32.
5968 (remote_close, remote_open): Adjust for Winsock support.
5969 * configure, config.in: Regenerated.
5971 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5973 * server.c (decode_xfer_read, write_qxfer_response): New.
5974 (handle_query): Take a packet length argument. Handle
5975 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5976 the qSupported response.
5977 (main): Update call to handle_query.
5979 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5981 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5982 (putpkt_binary): Renamed from putpkt and adjusted for binary
5984 (putpkt): New wrapper for putpkt_binary.
5985 (readchar): Don't mask off the high bit.
5986 (decode_X_packet): New function.
5987 * server.c (main): Call putpkt_binary if a handler sets the packet
5988 length. Save the length of the incoming packet. Handle 'X'.
5989 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5991 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5993 * server.c (handle_query): Handle qSupported.
5995 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5997 * remote-utils.c (all_symbols_looked_up): New variable.
5998 (look_up_one_symbol): Check it.
5999 * server.h (look_up_one_symbol): New declaration.
6000 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6002 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6004 * Makefile.in (linux-arm-low.o): Update dependencies.
6005 * linux-arm-low.c: Include "gdb_proc_service.h".
6006 (PTRACE_GET_THREAD_AREA): Define.
6007 (ps_get_thread_area): New function.
6009 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6011 * configure.srv (m68k*-*-uclinux*): New target.
6012 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6013 (linux_resume_one_process): Remove extraneous cast.
6014 (linux_read_offsets): New.
6015 (linux_target_op): Add linux_read_offsets on mmuless systems.
6016 * server.c (handle_query): Add qOffsets logic.
6017 * target.h (struct target_ops): Add read_offsets.
6019 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6021 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6022 (PTRACE_GET_THREAD_AREA): Define.
6023 (ps_get_thread_area): New function.
6024 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6025 (linux-x86-64-low.o): Update.
6027 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6029 * configure.ac: Remove checks for prfpregset_t.
6030 * gdb_proc_service.h: New file.
6031 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6032 new "gdb_proc_service.h".
6033 * proc-service.c: Likewise.
6034 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6035 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6036 * Makefile.in (gdb_proc_service_h): Updated.
6037 * configure, config.in: Regenerated.
6039 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6041 * remote-utils.c (prepare_resume_reply): Move declaration
6042 of gdb_id_from_wait to the top of the block.
6044 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6046 * linux-low.c (regsets_store_inferior_registers): Read the regset
6047 from the target before filling it.
6049 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6051 * server.c (attach_inferior): Return SIGTRAP for a successful
6054 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6056 * Makefile.in (OBS): Add version.o.
6057 (STAGESTUFF): Delete.
6058 (version.o): Add dependencies.
6059 (version.c): Replace rule.
6060 (clean): Remove version.c.
6061 * server.c (gdbserver_version): New.
6062 (gdbserver_usage): Use printf.
6063 (main): Handle --version and --help.
6064 * server.h (version, host_name): Add declarations.
6066 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6078 * linux-x86-64-low.c:
6081 * linux-ppc64-low.c:
6090 * linux-crisv32-low.c:
6102 * gdbserver.1: Add (C) after Copyright. Update the FSF
6105 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6107 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6108 (arm_breakpoint_at): Recognize both breakpoints.
6109 (the_low_target): Use the correct breakpoint instruction.
6111 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6113 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6114 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6115 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6116 (the_low_target): Update.
6118 2005-10-25 Andreas Schwab <schwab@suse.de>
6120 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6122 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6123 (ia64_num_regs): Reduce to 462.
6125 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6127 * acinclude.m4: Correct quoting.
6128 * aclocal.m4: Regenerated.
6130 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6131 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6132 (thread_db_init): Call thread_db_err_str.
6133 * configure.ac: Check for TD_VERSION.
6134 * config.in, configure: Regenerated.
6136 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6138 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6140 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6142 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6143 is not available. Define HAVE_PTRACE_GETREGS if it is.
6144 * config.in, configure: Regenerated.
6145 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6146 * linux-i386-low.c, linux-m68k-low.c: Update to use
6147 HAVE_PTRACE_GETREGS.
6148 * linux-low.c (regsets_fetch_inferior_registers)
6149 (regsets_store_inferior_registers): Only return 0 if we processed
6151 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6152 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6154 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6156 * inferiors.c (struct thread_info): Add gdb_id.
6157 (add_thread): Add gdb_id argument.
6158 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6159 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6160 calls to add_thread.
6161 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6162 * server.c (handle_query): Use thread_to_gdb_id.
6163 (handle_v_cont, main): Use gdb_id_to_thread_id.
6164 * server.h (add_thread): Update prototype.
6165 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6168 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6170 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6171 left-padded registers.
6172 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6173 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6175 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6177 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6178 * configure: Regenerate.
6179 * config.in: Regenerate.
6180 * server.h (NEED_DECLARATION_STRERROR):
6181 Replace with !HAVE_DECL_STRERROR.
6183 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6185 * linux-low.c (linux_wait, linux_send_signal): Don't test
6186 an unsigned long variable for > 0 if it could be MAX_ULONG.
6187 * server.c (myresume): Likewise.
6188 * target.c (set_desired_inferior): Likewise.
6190 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6192 * configure.ac: Simplify and improve check for socklen_t.
6193 * configure, config.in: Regenerate.
6195 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6197 * acconfig.h: Remove.
6198 * configure.ac: Add a test for socklen_t. Use three-argument
6199 AC_DEFINE throughout.
6200 * config.in: Regenerated using autoheader 2.59.
6201 * configure: Regenerated.
6203 * gdbreplay.c (socklen_t): Provide a default.
6204 (remote_open): Use socklen_t.
6205 * remote-utils.c (socklen_t): Provide a default.
6206 (remote_open): Use socklen_t.
6207 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6210 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6212 * linux-low.c (linux_read_memory, linux_write_memory)
6213 (linux_read_auxv): Likewise.
6214 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6215 (check_mem_write): Likewise.
6216 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6218 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6219 (registers_from_string, register_data): Likewise.
6220 * server.c (handle_query, main): Likewise.
6221 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6222 (decode_M_packet): Likewise.
6223 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6224 * target.h (struct target_ops): Update read_memory, write_memory,
6226 (read_inferior_memory, write_inferior_memory): Update.
6227 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6229 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6230 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6231 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6232 linux-s390-low.c, linux-sh-low.c: Update for changes in
6233 read_inferior_memory and the_low_target->breakpoint.
6235 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6237 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6238 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6239 * configure.srv: Add powerpc64-*-linux*.
6240 * linux-ppc64-low.c: New file.
6242 2005-05-23 Orjan Friberg <orjanf@axis.com>
6244 * linux-cris-low.c: New file with support for CRIS.
6245 * linux-crisv32-low.c: Ditto for CRISv32.
6246 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6247 (clean): Add reg-cris.c and reg-crisv32.c.
6248 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6249 reg-crisv32.o, and reg-crisv32.c to make rules.
6250 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6253 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6255 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6256 of sizeof (PTRACE_XFER_TYPE).
6257 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6259 2005-05-12 Orjan Friberg <orjanf@axis.com>
6261 * target.h (struct target_ops): Add insert_watchpoint,
6262 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6263 pointers for hardware watchpoint support.
6264 * linux-low.h (struct linux_target_ops): Ditto.
6265 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6266 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6267 to linux_target_ops.
6268 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6270 * server.c (main): Recognize 'Z' and 'z' packets.
6272 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6274 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6275 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6276 (the_low_target): Add new members.
6278 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6280 * proc-service.c (ps_lgetregs): Search all_processes instead of
6283 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6285 * server.c (start_inferior): Change return type to int.
6286 (attach_inferior): Change sigptr to int *.
6287 (handle_v_cont, handle_v_requests): Change signal to int *.
6288 (main): Change signal to int.
6290 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6292 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6293 * configure.srv: Add m32r*-*-linux*.
6294 * linux-m32r-low.c: New file.
6296 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6298 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6300 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6302 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6303 Take unsigned long arguments for PIDs.
6304 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6305 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6306 (wait_for_sigstop, linux_resume_one_process)
6307 (regsets_fetch_inferior_registers, linux_send_signal)
6308 (linux_read_auxv): Likewise. Update the types of variables holding
6309 PIDs. Update format string specifiers.
6310 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6311 * remote-utils.c (prepare_resume_reply): Likewise.
6312 * server.c (cont_thread, general_thread, step_thread)
6313 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6315 (handle_query): Update format specifiers.
6316 (handle_v_cont, main): Use strtoul for thread IDs.
6317 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6318 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6319 (general_thread, step_thread, thread_from_wait)
6320 (old_thread_from_wait): Update.
6321 * target.h (struct thread_resume): Use unsigned long for THREAD.
6322 (struct target_ops): Use unsigned long for arguments to attach and
6325 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6327 * acinclude.m4: Include bfd/bfd.m4 directly.
6328 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6329 <agriffis@toolchain.org>.
6330 * aclocal.m4, configure: Regenerated.
6332 2005-01-07 Andrew Cagney <cagney@gnu.org>
6334 * configure.ac: Rename configure.in, require autoconf 2.59.
6335 * configure: Re-generate.
6337 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6339 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6341 * aclocal.m4: Regenerated.
6342 * configure: Regenerated.
6344 2004-11-21 Andreas Schwab <schwab@suse.de>
6346 * linux-m68k-low.c (m68k_num_gregs): Define.
6347 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6348 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6349 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6350 (m68k_breakpoint_at): New. Add to the_low_target.
6352 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6353 srv_linux_thread_db to yes.
6355 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6357 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6358 (ARCH_SET_FS): Likewise.
6359 (ARCH_GET_FS): Likewise.
6360 (ARCH_GET_GS): Likewise.
6362 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6364 * linux-i386-low.c (ps_get_thread_area): New.
6365 * linux-x86-64-low.c (ps_get_thread_area): New.
6366 * linux-low.c: Include <sys/syscall.h>.
6367 (linux_kill_one_process): Don't kill the first thread here.
6368 (linux_kill): Kill the first thread here.
6369 (kill_lwp): New function.
6370 (send_sigstop, linux_send_signal): Use it.
6371 * proc-service.c: Clean up #ifdefs.
6372 (fpregset_info): Delete.
6373 (ps_lgetregs): Update and enable implementation.
6374 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6376 * remote-utils.c (struct sym_cache, symbol_cache): New.
6377 (input_interrupt): Print a clearer message.
6378 (async_io_enabled): New variable.
6379 (enable_async_io, disable_async_io): Use it. Update comments.
6380 (look_up_one_symbol): Use the symbol cache.
6381 * thread-db.c (thread_db_look_up_symbols): New function.
6382 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6384 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6386 * configure.in: Test for -rdynamic.
6387 * configure: Regenerated.
6388 * Makefile (INTERNAL_LDFLAGS): New.
6389 (gdbserver, gdbreplay): Use it.
6391 2004-09-02 Andrew Cagney <cagney@gnu.org>
6393 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6395 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6397 * linux-low.c (linux_wait): Clear all_processes list also.
6399 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6401 * linux-low.c: Include <errno.h>. Remove extern declaration of
6404 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6406 * gdbreplay.c, server.h, utils.c: Update copyright years.
6408 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6410 * server.c (main): Print child status or termination signal from
6411 variable 'signal', not 'sig'.
6413 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6415 * linux-low.c (linux_read_memory): Change return type to
6416 int. Check for and return error from ptrace().
6417 * target.c (read_inferior_memory): Change return type to int. Pass
6418 back return status from the_target->read_memory().
6419 * target.h (struct target_ops): Adapt *read_memory() prototype.
6421 (read_inferior_memory): Adapt prototype.
6422 * server.c (main): Return an error packet if
6423 read_inferior_memory() returns an error.
6425 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6427 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6428 Unify with other clean targets.
6430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6432 * server.c (handle_v_cont): Call set_desired_inferior.
6434 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6436 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6438 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6440 * linux-low.c (linux_wait): Unblock async I/O.
6441 (linux_resume): Block and enable async I/O.
6442 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6443 * server.h (block_async_io, unblock_async_io): Add prototypes.
6445 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6447 * remote-utils.c (remote_open): Print a status notice after
6449 * server.c (attach_inferior): Print a status notice after
6452 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6454 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6456 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6458 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6460 * server.c, target.h: Update copyright years.
6462 2004-02-25 Roland McGrath <roland@redhat.com>
6464 * target.h (struct target_ops): New member `read_auxv'.
6465 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6466 * linux-low.c (linux_read_auxv): New function.
6467 (linux_target_ops): Initialize `read_auxv' member to that.
6469 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6471 Committed by Jim Blandy <jimb@redhat.com>.
6473 * linux-s390-low.c (s390_num_regs): Update.
6474 (s390_regmap): Remove control registers. Use __s390x__ predefine
6475 instead of GPR_SIZE to distiguish s390 and s390x targets.
6477 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6479 * linux-low.c: Update copyright year.
6480 (check_removed_breakpoint): Clear pending_is_breakpoint.
6481 (linux_set_resume_request, linux_queue_one_thread)
6482 (resume_status_pending_p): New functions.
6483 (linux_continue_one_thread): Use process->resume.
6484 (linux_resume): Only resume threads if there are no pending events.
6485 * linux-low.h (struct process_info): Add resume request
6488 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6490 * regcache.c (new_register_cache): Clear the allocated register
6491 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6493 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6495 * linux-low.c (linux_resume): Take a struct thread_resume *
6497 (linux_wait): Update call.
6498 (resume_ptr): New static variable.
6499 (linux_continue_one_thread): Renamed from
6500 linux_continue_one_process. Use resume_ptr.
6501 (linux_resume): Use linux_continue_one_thread.
6502 * server.c (handle_v_cont, handle_v_requests): New functions.
6503 (myresume): New function.
6504 (main): Handle 'v' case.
6505 * target.h (struct thread_resume): New type.
6506 (struct target_ops): Change argument of "resume" to struct
6508 (myresume): Delete macro.
6510 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6512 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6513 (uninstall): Support DESTDIR.
6515 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6517 * configure.srv: Add xscale*linux copy of arm*linux entry.
6519 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6521 * linux-arm-low.c (arm_reinsert_addr): New function.
6522 (the_low_target): Add arm_reinsert_addr.
6524 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6526 * mem-break.c: Remove whitespace at end of file.
6528 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6530 * configure.in: Check whether we need to prototype strerror.
6531 * server.h: Optionally prototype strerror.
6532 * gdbreplay.c (perror_with_name): Use strerror.
6533 * linux-low.c (linux_attach_lwp): Use strerror.
6534 * utils.c (perror_with_name): Use strerror.
6535 * config.in, configure: Regenerated.
6537 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6539 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6540 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6542 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6544 * Makefile.in (SFILES): Update.
6545 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6546 low-sun3.c: Remove files.
6548 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6550 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6551 (linux_detach_one_process, linux_detach): New functions.
6552 (linux_target_ops): Add linux_detach.
6553 * server.c (main): Handle 'D' packet.
6554 * target.h (struct target_ops): Add "detach" member.
6555 (detach_inferior): Define.
6557 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6559 From Kelley Cook <kelleycook@wideopenwest.com>:
6560 * configure.srv: Accept i[34567]86 variants.
6562 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6564 * linux-low.c (linux_wait_for_event): Correct comment typos.
6565 (linux_resume_one_process): Call check_removed_breakpoint.
6566 (linux_send_signal): New function.
6567 (linux_target_ops): Add linux_send_signal.
6568 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6570 * target.h (struct target_ops): Add send_signal.
6572 2003-05-29 Jim Blandy <jimb@redhat.com>
6574 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6575 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6576 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6577 away part of the register's value.
6579 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6581 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6582 (linux_wait_for_event, linux_init_signals): Likewise.
6584 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6586 * configure.in: Check for stdlib.h.
6587 * configure: Regenerated.
6588 * config.in: Regenerated.
6590 2003-01-04 Andreas Schwab <schwab@suse.de>
6592 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6594 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6596 * Makefile.in: Remove obsolete code.
6598 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6600 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6601 defined(PT_FPR0_HI).
6603 2002-11-17 Stuart Hughes <seh@zee2.com>
6605 * linux-arm-low.c (arm_num_regs): Increase.
6606 (arm_regmap): Include status register.
6608 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6610 * linux-low.c (register_addr): Remove incorrect -1 check.
6612 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6614 * linux-low.c (linux_create_inferior): Call setpgid. Return
6616 (unstopped_p, linux_signal_pid): Remove.
6617 (linux_target_ops): Remove linux_signal_pid.
6618 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6619 global instead of target method.
6620 * target.h (struct target_ops): Remove signal_pid. Update comment
6621 for create_inferior.
6622 * server.c (signal_pid): New variable.
6623 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6624 gdbserver. Set the child to be the foreground process group.
6625 (attach_inferior): Set signal_pid.
6627 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6629 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6631 2002-08-20 Jim Blandy <jimb@redhat.com>
6633 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6636 2002-08-01 Andrew Cagney <cagney@redhat.com>
6638 * Makefile.in: Make chill references obsolete.
6640 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6642 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6643 * configure: Regenerate.
6644 * config.in: Regenerate.
6646 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6648 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6649 (perror_with_name, remote_close, remote_open, expect, play): Static.
6651 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6653 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6654 byte offsets instead of an array of indexes.
6655 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6657 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6659 * regcache.c: Add comment.
6661 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6663 * thread-db.c: New file.
6664 * proc-service.c: New file.
6665 * acinclude.m4: New file.
6666 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6667 proc-service.o, and thread-db.o.
6668 (linux-low.o): Add USE_THREAD_DB.
6669 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6670 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6671 * aclocal.m4: Regenerated.
6672 * config.in: Regenerated.
6673 * configure: Regenerated.
6674 * configure.in: Check for proc_service.h, sys/procfs.h,
6675 thread_db.h, and linux/elf.h headrs.
6676 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6677 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6678 Check for -lthread_db and thread support.
6679 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6680 PowerPC, and SuperH.
6681 * i387-fp.c: Constify arguments.
6682 * i387-fp.h: Likewise.
6683 * inferiors.c: (struct thread_info): Renamed from
6684 `struct inferior_info'. Remove PID member. Use generic inferior
6685 list header. All uses updated.
6686 (inferiors, signal_pid): Removed.
6687 (all_threads): New variable.
6688 (get_thread): Define.
6689 (add_inferior_to_list): New function.
6690 (for_each_inferior): New function.
6691 (change_inferior_id): New function.
6692 (add_inferior): Removed.
6693 (remove_inferior): New function.
6694 (add_thread): New function.
6695 (free_one_thread): New function.
6696 (remove_thread): New function.
6697 (clear_inferiors): Use for_each_inferior and free_one_thread.
6698 (find_inferior): New function.
6699 (find_inferior_id): New function.
6700 (inferior_target_data): Update argument type.
6701 (set_inferior_target_data): Likewise.
6702 (inferior_regcache_data): Likewise.
6703 (set_inferior_regcache_data): Likewise.
6704 * linux-low.c (linux_bp_reinsert): Remove.
6705 (all_processes, stopping_threads, using_thrads)
6706 (struct pending_signals, debug_threads, pid_of): New.
6707 (inferior_pid): Replace with macro.
6708 (struct inferior_linux_data): Remove.
6709 (get_stop_pc, add_process): New functions.
6710 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6711 Use add_process and add_thread.
6712 (linux_attach_lwp): New function, based on old linux_attach. Use
6713 add_process and add_thread. Set stop_expected for new threads.
6714 (linux_attach): New function.
6715 (linux_kill_one_process): New function.
6716 (linux_kill): Kill all LWPs.
6717 (linux_thread_alive): Use find_inferior_id.
6718 (check_removed_breakpoints, status_pending_p): New functions.
6719 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6720 Update. Use WNOHANG. Wait for cloned processes also. Update process
6721 struct for the found process.
6722 (linux_wait_for_event): New function.
6723 (linux_wait): Use it. Support LWPs.
6724 (send_sigstop, wait_for_sigstop, stop_all_processes)
6725 (linux_resume_one_process, linux_continue_one_process): New functions.
6726 (linux_resume): Support LWPs.
6727 (REGISTER_RAW_SIZE): Remove.
6728 (fetch_register): Use register_size instead. Call supply_register.
6729 (usr_store_inferior_registers): Likewise. Call collect_register.
6731 (regsets_fetch_inferior_registers): Improve error message.
6732 (regsets_store_inferior_registers): Add debugging.
6733 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6734 (unstopped_p, linux_signal_pid): New functions.
6735 (linux_target_ops): Add linux_signal_pid.
6736 (linux_init_signals): New function.
6737 (initialize_low): Call it. Initialize using_threads.
6738 * regcache.c (inferior_regcache_data): Add valid
6740 (get_regcache): Fetch registers lazily. Add fetch argument
6741 and update all callers.
6742 (regcache_invalidate_one, regcache_invalidate): New
6744 (new_register_cache): Renamed from create_register_cache.
6745 Return the new regcache.
6746 (free_register_cache): Change argument to a void *.
6747 (registers_to_string, registers_from_string): Call get_regcache
6748 with fetch flag set.
6749 (register_data): Make static. Pass fetch flag to get_regcache.
6750 (supply_register): Call get_regcache with fetch flag clear.
6751 (collect_register): Call get_regcache with fetch flag set.
6752 (collect_register_as_string): New function.
6753 * regcache.h: Update.
6754 * remote-utils.c (putpkt): Flush after debug output and use
6756 Handle input interrupts while waiting for an ACK.
6757 (input_interrupt): Use signal_pid method.
6758 (getpkt): Flush after debug output and use stderr.
6759 (outreg): Use collect_register_as_string.
6760 (new_thread_notify, dead_thread_notify): New functions.
6761 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6763 (look_up_one_symbol): Flush after debug output.
6764 * server.c (step_thread, server_waiting): New variables.
6765 (start_inferior): Don't use signal_pid. Update call to mywait.
6766 (attach_inferior): Update call to mywait.
6767 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6768 (main): Don't fetch/store registers explicitly. Use
6769 set_desired_inferior. Support proposed ``Hs'' packet. Update
6772 (struct inferior_list, struct_inferior_list_entry): New.
6773 * target.c (set_desired_inferior): New.
6774 (write_inferior_memory): Constify.
6775 (mywait): New function.
6777 (struct target_ops): New signal_pid method.
6778 (mywait): Removed macro, added prototype.
6780 * linux-low.h (regset_func): Removed.
6781 (regset_fill_func, regset_store_func): New.
6782 (enum regset_type): New.
6783 (struct regset_info): Add type field. Use new operation types.
6784 (struct linux_target_ops): stop_pc renamed to get_pc.
6785 Add decr_pc_after_break and breakpoint_at.
6786 (get_process, get_thread_proess, get_process_thread)
6787 (strut process_info, all_processes, linux_attach_lwp)
6788 (thread_db_init): New.
6790 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6791 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6792 (the_low_target): Add new members.
6793 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6794 (i386_store_fpxregset): Constify.
6795 (target_regsets): Add new kind identifier.
6796 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6797 (i386_set_pc): Add debugging.
6798 (i386_breakpoint_at): New function.
6799 (the_low_target): Add new members.
6800 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6801 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6802 (mips_breakpoint_at): New.
6803 (the_low_target): Add new members.
6804 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6805 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6806 (the_low_target): Add new members.
6807 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6808 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6809 (the_low_target): Add new members.
6810 * linux-x86-64-low.c (target_regsets): Add new kind
6813 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6815 From Martin Pool <mbp@samba.org>:
6816 * server.c (gdbserver_usage): New function.
6819 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6821 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6824 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6826 * Makefile.in: Remove obsolete code.
6828 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6830 * linux-low.c (regsets_fetch_inferior_registers),
6831 (regsets_store_inferior_registers): Removed cast to int from
6833 * regcache.h: Added declaration of struct inferior_info.
6835 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6837 * inferiors.c (struct inferior_info): Add regcache_data.
6838 (add_inferior): Call create_register_cache.
6839 (clear_inferiors): Call free_register_cache.
6840 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6841 * regcache.c (struct inferior_regcache_data): New.
6842 (registers): Remove.
6843 (get_regcache): New function.
6844 (create_register_cache, free_register_cache): New functions.
6845 (set_register_cache): Don't initialize the register cache here.
6846 (registers_to_string, registers_from_string, register_data): Call
6848 * regcache.h: Add prototypes.
6849 * server.h: Likewise.
6851 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6853 * mem-break.c: New file.
6854 * mem-break.h: New file.
6855 * Makefile.in: Add mem-break.o rule; update server.h
6857 * inferiors.c (struct inferior_info): Add target_data
6859 (clear_inferiors): Free target_data member if set.
6860 (inferior_target_data, set_inferior_target_data): New functions.
6861 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6862 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6863 * linux-low.c (linux_bp_reinsert): New variable.
6864 (struct inferior_linux_data): New.
6865 (linux_create_inferior): Use set_inferior_target_data.
6866 (linux_attach): Likewise. Call add_inferior.
6867 (linux_wait_for_one_inferior): New function.
6868 (linux_wait): Call it.
6869 (linux_write_memory): Add const.
6870 (initialize_low): Call set_breakpoint_data.
6871 * linux-low.h (struct linux_target_ops): Add breakpoint
6873 * server.c (attach_inferior): Remove extra add_inferior
6875 * server.h: Include mem-break.h. Update inferior.c
6877 * target.c (read_inferior_memory)
6878 (write_inferior_memory): New functions.
6879 * target.h (read_inferior_memory)
6880 (write_inferior_memory): Change macros to prototypes.
6881 (struct target_ops): Update comments. Add const to write_memory
6884 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6886 * linux-low.c (usr_store_inferior_registers): Support
6887 registers which are allowed to fail to store.
6888 * linux-low.h (linux_target_ops): Likewise.
6889 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6890 (ppc_cannot_store_register): FPSCR may not be storable.
6892 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6894 * server.h: Include <string.h> if HAVE_STRING_H.
6895 * ChangeLog: Correct paths in last ChangeLog entry.
6897 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6899 * linux-low.h: Remove obsolete prototypes.
6900 (struct linux_target_ops): New.
6901 (extern the_low_target): New.
6902 * linux-low.c (num_regs, regmap): Remove declarations.
6903 (register_addr): Use the_low_target explicitly.
6904 (fetch_register): Likewise.
6905 (usr_fetch_inferior_registers): Likewise.
6906 (usr_store_inferior_registers): Likewise.
6907 * linux-arm-low.c (num_regs): Remove.
6908 (arm_num_regs): Define.
6909 (arm_regmap): Renamed from regmap, made static.
6910 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6912 (arm_cannot_store_register): Renamed from cannot_store_register,
6914 (the_low_target): New.
6915 * linux-i386-low.c (num_regs): Remove.
6916 (i386_num_regs): Define.
6917 (i386_regmap): Renamed from regmap, made static.
6918 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6920 (i386_cannot_store_register): Renamed from cannot_store_register,
6922 (the_low_target): New.
6923 * linux-ia64-low.c (num_regs): Remove.
6924 (ia64_num_regs): Define.
6925 (ia64_regmap): Renamed from regmap, made static.
6926 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6928 (ia64_cannot_store_register): Renamed from cannot_store_register,
6930 (the_low_target): New.
6931 * linux-m68k-low.c (num_regs): Remove.
6932 (m68k_num_regs): Define.
6933 (m68k_regmap): Renamed from regmap, made static.
6934 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6936 (m68k_cannot_store_register): Renamed from cannot_store_register,
6938 (the_low_target): New.
6939 * linux-mips-low.c (num_regs): Remove.
6940 (mips_num_regs): Define.
6941 (mips_regmap): Renamed from regmap, made static.
6942 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6944 (mips_cannot_store_register): Renamed from cannot_store_register,
6946 (the_low_target): New.
6947 * linux-ppc-low.c (num_regs): Remove.
6948 (ppc_num_regs): Define.
6949 (ppc_regmap): Renamed from regmap, made static.
6950 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6952 (ppc_cannot_store_register): Renamed from cannot_store_register,
6954 (the_low_target): New.
6955 * linux-s390-low.c (num_regs): Remove.
6956 (s390_num_regs): Define.
6957 (s390_regmap): Renamed from regmap, made static.
6958 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6960 (s390_cannot_store_register): Renamed from cannot_store_register,
6962 (the_low_target): New.
6963 * linux-sh-low.c (num_regs): Remove.
6964 (sh_num_regs): Define.
6965 (sh_regmap): Renamed from regmap, made static.
6966 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6968 (sh_cannot_store_register): Renamed from cannot_store_register,
6970 (the_low_target): New.
6971 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6972 (the_low_target): New.
6974 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6976 * Makefile.in: Add stamp-h target.
6977 * configure.in: Create stamp-h.
6978 * configure: Regenerated.
6980 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6982 * inferiors.c: New file.
6983 * target.c: New file.
6984 * target.h: New file.
6985 * Makefile.in: Add target.o and inferiors.o. Update
6987 * linux-low.c (inferior_pid): New static variable,
6988 moved from server.c.
6989 (linux_create_inferior): Renamed from create_inferior.
6990 Call add_inferior. Return 0 on success instead of a PID.
6991 (linux_attach): Renamed from myattach.
6992 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6993 (linux_thread_alive): Renamed from mythread_alive.
6994 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6996 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6997 (regsets_store_inferior_registers): Correct error message.
6998 Add missing ``return 0''.
6999 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7000 (linux_store_registers): Renamed from store_inferior_registers.
7001 (linux_read_memory): Renamed from read_inferior_memory.
7002 (linux_write_memory): Renamed from write_inferior_memory.
7003 (linux_target_ops): New structure.
7004 (initialize_low): Call set_target_ops ().
7005 * remote-utils.c (unhexify): New function.
7006 (hexify): New function.
7007 (input_interrupt): Send signals to ``signal_pid''.
7008 * server.c (inferior_pid): Remove.
7009 (start_inferior): Update create_inferior call.
7010 (attach_inferior): Call add_inferior.
7011 (handle_query): New function.
7012 (main): Call handle_query for `q' packets.
7013 * server.h: Include "target.h". Remove obsolete prototypes.
7014 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7016 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7018 * Makefile.in: Add WARN_CFLAGS. Update configury
7020 * configure.in: Check for <string.h>
7021 * configure: Regenerate.
7022 * config.in: Regenerate.
7023 * gdbreplay.c: Include needed system headers.
7024 (remote_open): Remove strchr prototype.
7025 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7026 * regcache.c (supply_register): Change buf argument to const void *.
7027 (supply_register_by_name): Likewise.
7028 (collect_register): Change buf argument to void *.
7029 (collect_register_by_name): Likewise.
7030 * regcache.h: Add missing prototypes.
7031 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7032 * server.c (handle_query): New function.
7033 (attached): New static variable, moved out of main.
7034 (main): Quiet longjmp clobber warnings.
7035 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7036 * utils.c (error): Remove NORETURN.