1 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4 * config.in, configure: Regenerated.
6 2013-09-18 Yao Qi <yao@codesourcery.com>
9 * server.c (start_inferior): Clear 'resume_info'.
11 2013-09-16 Jiong Wang <jiwang@tilera.com>
13 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
16 2013-09-16 Jiong Wang <jiwang@tilera.com>
18 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
19 linux-tile-low.o to srv_tgtobj.
21 2013-09-16 Will Newton <will.newton@linaro.org>
23 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
26 2013-09-06 Pedro Alves <palves@redhat.com>
28 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
29 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
30 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
31 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
32 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
33 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
35 2013-09-06 Pedro Alves <palves@redhat.com>
37 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
38 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
40 2013-09-06 Pedro Alves <palves@redhat.com>
42 * linux-amd64-ipa.c: Include tracepoint.h.
43 * linux-i386-ipa.c: Include tracepoint.h.
45 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
47 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
48 (ps_get_thread_area): New function.
50 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
52 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
53 (initialize_low_arch): Call init_registers_crisv32 rather than
54 init_register_crisv32.
56 2013-09-05 Pedro Alves <palves@redhat.com>
58 * server.h (handle_vFile, hostio_last_error_from_errno): Move
60 * hostio.h: ... this new file.
61 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
62 win32-low.c: Include hostio.h.
64 2013-09-05 Pedro Alves <palves@redhat.com>
66 * server.h (gdb_client_data, handler_func, callback_handler_func)
67 (delete_file_handler, add_file_handler, append_callback_event)
68 (delete_callback_event, start_event_loop, initialize_event_loop):
69 Move to event-loop.h and include it.
70 * event-loop.h: New file.
72 2013-09-05 Pedro Alves <palves@redhat.com>
74 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
75 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
76 (loaded_dll, unloaded_dll): Move to ...
77 * dll.h: ... this new file.
78 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
80 2013-09-05 Pedro Alves <palves@redhat.com>
82 * server.h (current_process, get_thread_process, all_processes)
83 (add_inferior_to_list, for_each_inferior, current_inferior)
84 (remove_inferior, add_process, remove_process, find_process_pid)
85 (have_started_inferiors_p, have_attached_inferiors_p)
86 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
87 (clear_inferiors, find_inferior, find_inferior_id)
88 (inferior_target_data, set_inferior_target_data)
89 (inferior_regcache_data, set_inferior_regcache_data): Move to
90 inferiors.h, and include it.
91 * inferiors.h: New file.
93 2013-09-05 Pedro Alves <palves@redhat.com>
95 * server.h (struct emit_ops, current_insn_ptr, emit_error):
99 2013-09-05 Pedro Alves <palves@redhat.com>
101 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
103 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
104 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
105 (handle_tracepoint_general_set, handle_tracepoint_query)
106 (tracepoint_finished_step, tracepoint_was_hit)
107 (release_while_stepping_state_list, current_traceframe)
108 (in_readonly_region, traceframe_read_mem)
109 (fetch_traceframe_registers, traceframe_read_sdata)
110 (traceframe_read_info, struct fast_tpoint_collect_status)
111 (fast_tracepoint_collecting, force_unlock_trace_buffer)
112 (handle_tracepoit_bkpts, initialize_low_tracepoint)
113 (supply_fast_tracepoint_registers)
114 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
115 (ipa_tdesc, claim_trampoline_space)
116 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
117 (agent_mem_read, agent_get_trace_state_variable_value)
118 (agent_set_trace_state_variable_value, agent_tsv_read)
119 (agent_mem_read_string, get_raw_reg_func_addr)
120 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
121 * tracepoint.h: ... this new file.
123 2013-09-05 Pedro Alves <palves@redhat.com>
125 * server.h (perror_with_name, error, fatal, warning, paddress)
126 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
130 2013-09-05 Pedro Alves <palves@redhat.com>
132 * server.h (remote_debug, noack_mode, transport_is_reliable)
133 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
134 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
135 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
136 (write_enn, initialize_async_io, enable_async_io)
137 (disable_async_io, check_remote_input_interrupt_request)
138 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
139 (dead_thread_notify, prepare_resume_reply)
140 (decode_address_to_semicolon, decode_address, decode_m_packet)
141 (decode_M_packet, decode_X_packet, decode_xfer_write)
142 (decode_search_memory_packet, unhexify, hexify)
143 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
144 (look_up_one_symbol, relocate_instruction)
145 (monitor_output): Move to remote-utils.h, and include it.
146 * remote-utils.h: New file.
148 2013-09-05 Pedro Alves <palves@redhat.com>
150 * server.h (_): Delete.
152 2013-09-02 Pedro Alves <palves@redhat.com>
154 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
155 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
157 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
159 2013-09-02 Pierre Muller <muller@sourceware.org>
161 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
162 or WriteProcessMemory complete successfully and handle
163 ERROR_PARTIAL_COPY error.
165 2013-09-02 Pedro Alves <palves@redhat.com>
167 * server.c (gdb_read_memory): Return -1 on traceframe memory read
168 error instead of EIO.
170 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
173 * linux-low.c: Include filestuff.h.
174 (linux_create_inferior) <pid == 0>: Call close_most_fds.
175 * lynx-low.c: Include filestuff.h.
176 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
177 * server.c: Include filestuff.h.
178 (main): Call notice_open_fds.
179 * spu-low.c: Include filestuff.h.
180 (spu_create_inferior) <pid == 0>: Call close_most_fds.
182 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
184 * Makefile.in: Explain why ../target and ../nat are not
185 listed as include file search paths.
186 (linux-waitpid.o): New object file rule.
187 * configure.srv (srv_native_linux_obj): New variable.
188 Replace all occurrences of linux native object files with
189 $srv_native_linux_obj.
190 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
191 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
192 (linux_enable_event_reporting): Remove declaration.
193 (my_waitpid): Moved to common/linux-waitpid.c.
194 (linux_wait_for_event): Pass ptid when calling
195 linux_enable_event_reporting.
196 (linux_supports_tracefork_flag): Remove.
197 (linux_enable_event_reporting): Likewise.
198 (linux_tracefork_grandchild): Remove.
199 (STACK_SIZE): Moved to common/linux-ptrace.c.
200 (linux_tracefork_child): Remove.
201 (linux_test_for_tracefork): Remove.
202 (linux_look_up_symbols): Call linux_supports_traceclone.
203 (initialize_low): Remove call to linux_test_for_tracefork.
204 * linux-low.h (PTRACE_TYPE_ARG3): Move to
205 common/linux-ptrace.h.
206 (PTRACE_TYPE_ARG4): Likewise.
207 Include linux-ptrace.h.
209 2013-08-21 Pedro Alves <palves@redhat.com>
211 * config.in: Renegerate.
213 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
215 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
216 (SFILES): Remove $(srcdir)/common/target-common.c and
217 add $(srcdir)/target/waitstatus.c.
218 (OBS): Remove target-common.o and add waitstatus.o.
219 (server_h): Remove $(srcdir)/../common/target-common.h and
220 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
221 and $(srcdir)/../target/waitstatus.h.
222 (target-common.o): Remove.
223 (waitstatus.o): New target object file.
224 * target.h: Do not include target-common.h and
225 include target/resume.h, target/wait.h and
228 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
230 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
232 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
233 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
235 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
236 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
238 2013-07-27 Jie Zhang <jie@codesourcery.com>
239 Daniel Jacobowitz <dan@codesourcery.com>
240 Yao Qi <yao@codesourcery.com>
242 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
243 (mips-linux-watch.o): New rule.
244 (mips_linux_watch_h): New variable.
245 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
247 * linux-mips-low.c: Include mips-linux-watch.h.
248 (struct arch_process_info, struct arch_lwp_info): New.
249 (update_watch_registers_callback): New function.
250 (mips_linux_new_process, mips_linux_new_thread) New functions.
251 (mips_linux_prepare_to_resume, mips_insert_point): New
253 (mips_remove_point, mips_stopped_by_watchpoint): New
255 (rsp_bp_type_to_target_hw_bp_type): New function.
256 (mips_stopped_data_address): New function.
257 (the_low_target): Add watchpoint support functions.
259 2013-07-27 Yao Qi <yao@codesourcery.com>
261 * i386-low.c: Include break-common.h.
262 (enum target_hw_bp_type): Remove.
264 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
266 * Makefile.in (SFILES): /common/target-common.c.
267 (OBS): Add target-common.o.
268 (server_h): Add $(srcdir)/../common/target-common.h.
269 (target-common.o): New target.
270 * server.c (queue_stop_reply_callback): Free
271 status string after use.
272 * target.c (target_waitstatus_to_string): Remove.
273 * target.h: Include target-common.h.
274 (resume_kind): Likewise.
275 (target_waitkind): Likewise.
276 (target_waitstatus): Likewise.
277 (TARGET_WNOHANG): Likewise.
279 2013-07-04 Yao Qi <yao@codesourcery.com>
281 * Makefile.in (host_alias): Use @host_noncanonical@.
282 (target_alias): Use @target_noncanonical@.
283 * configure.ac: Use ACX_NONCANONICAL_TARGET and
284 ACX_NONCANONICAL_HOST.
285 * configure: Regenerated.
288 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
290 * configure.ac (version_host, version_target): Set and AC_SUBST them.
291 * configure: Rebuild.
292 * Makefile.in (version_host, version_target): Get from configure.
293 (version.c): Use $(version_host) and $(version_target).
295 2013-07-03 Pedro Alves <palves@redhat.com>
297 * Makefile.in (config.status): Depend on development.sh.
298 * acinclude.m4: Include libmcheck.m4.
299 * configure: Regenerate.
301 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
303 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
304 attribute inside the parentheses.
305 (winapi_DebugSetProcessKillOnExit): Ditto.
306 (winapi_DebugBreakProcess): Ditto.
307 (winapi_GenerateConsoleCtrlEvent): Ditto.
309 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
311 * notif.h (notif_event): Add a dummy member to avoid compiler
314 2013-07-01 Pedro Alves <palves@redhat.com>
316 * hostio.c (HOSTIO_PATH_MAX): Define.
317 (require_filename, handle_open, handle_unlink, handle_readlink):
320 2013-07-01 Pedro Alves <palves@redhat.com>
322 * server.h: Include "pathmax.h".
323 * linux-low.c: Don't include sys/param.h.
324 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
326 * win32-low.c: Don't include sys/param.h.
327 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
329 2013-07-01 Pedro Alves <palves@redhat.com>
331 * event-loop.c: Don't check HAVE_UNISTD_H before including
333 * gdbreplay.c: Likewise.
334 * remote-utils.c: Likewise.
335 * server.c: Likewise.
336 * configure.ac: Don't check for unistd.h.
337 * configure: Regenerate.
339 2013-06-28 Tom Tromey <tromey@redhat.com>
341 * Makefile.in (version.c): Use version.in, not
344 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
346 * configure.ac (version_host, version_target): Set and AC_SUBST them.
347 * configure: Rebuild.
348 * Makefile.in (version_host, version_target): Get from configure.
349 (version.c): Use $(version_host) and $(version_target).
351 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
353 Fix trace-status to output user name without trailing colon.
354 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
356 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
358 Fix trace-status to output proper start-time and stop-time.
359 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
360 output start time and stop time in hex as gdb expects.
362 2013-06-26 Pedro Alves <pedro@codesourcery.com>
364 * tracepoint.c (build_traceframe_info_xml): Output trace state
365 variables present in the trace buffer.
367 2013-06-24 Tom Tromey <tromey@redhat.com>
369 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
372 * gdbreplay.c: Include version.h.
373 (version, host_name): Don't declare.
374 * server.h: Include version.h.
375 (version, host_name): Don't declare.
377 2013-06-12 Pedro Alves <palves@redhat.com>
379 * linux-x86-low.c (linux_is_elf64): Delete global.
380 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
381 with local linux_pid_exe_is_elf_64_file use.
383 2013-06-11 Pedro Alves <palves@redhat.com>
385 * linux-low.c (regset_disabled, disable_regset): New functions.
386 (regsets_fetch_inferior_registers)
387 (regsets_store_inferior_registers): Use them.
388 (initialize_regsets_info); Don't allocate the disabled_regsets
390 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
393 2013-06-11 Pedro Alves <palves@redhat.com>
395 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
398 2013-06-11 Pedro Alves <palves@redhat.com>
400 * linux-x86-low.c (initialize_low_arch): Call
401 init_registers_x32_avx_linux.
403 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
405 Fix compatibility with Android Bionic.
406 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
409 2013-06-07 Pedro Alves <palves@redhat.com>
412 * Makefile.in (OBS): Add tdesc.o.
413 (IPA_OBJS): Add tdesc-ipa.o.
414 (tdesc-ipa.o): New rule.
415 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
417 * linux-low.c (new_inferior): Delete.
418 (disabled_regsets, num_regsets): Delete.
419 (linux_add_process): Adjust to set the new per-process
421 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
422 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
423 was a stop. When calling arch_setup, switch the current inferior
424 to the thread that got an event.
425 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
426 (regsets_fetch_inferior_registers)
427 (regsets_store_inferior_registers): New regsets_info parameter.
429 (linux_register_in_regsets): New regs_info parameter. Adjust to
431 (register_addr, fetch_register, store_register): New usrregs_info
432 parameter. Adjust to use it.
433 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
434 parameter regs_info. Adjust to use it.
435 (linux_fetch_registers): Get the current inferior's regs_info, and
437 (linux_store_registers): Ditto.
438 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
439 (initialize_low): Don't initialize the target_regsets here. Call
441 * linux-low.h (target_regsets): Delete declaration.
442 (struct regsets_info): New.
443 (struct usrregs_info): New.
444 (struct regs_info): New.
445 (struct process_info_private) <new_inferior>: New field.
446 (struct linux_target_ops): Delete the num_regs, regmap, and
447 regset_bitmap fields. New field regs_info.
448 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
449 * i387-fp.c (num_xmm_registers): Delete.
450 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
451 calls to new interface.
452 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
453 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
454 Infer the number of xmm registers from the regcache's target
456 * i387-fp.h (num_xmm_registers): Delete.
457 * inferiors.c (add_thread): Don't install the thread's regcache
459 * proc-service.c (gregset_info): Fetch the current inferior's
460 regs_info. Adjust to use it.
461 * regcache.c: Include tdesc.h.
462 (register_bytes, reg_defs, num_registers)
463 (gdbserver_expedite_regs): Delete.
464 (get_thread_regcache): If the thread doesn't have a regcache yet,
465 create one, instead of aborting gdbserver.
466 (regcache_invalidate_one): Rename to ...
467 (regcache_invalidate_thread): ... this.
468 (regcache_invalidate_one): New.
469 (regcache_invalidate): Only invalidate registers of the current
471 (init_register_cache): Add target_desc parameter, and use it.
472 (new_register_cache): Ditto. Assert the target description has a
473 non zero registers_size.
474 (regcache_cpy): Add assertions. Adjust.
475 (realloc_register_cache, set_register_cache): Delete.
476 (registers_to_string, registers_from_string): Adjust.
477 (find_register_by_name, find_regno, find_register_by_number)
478 (register_cache_size): Add target_desc parameter, and use it.
479 (free_register_cache_thread, free_register_cache_thread_one)
480 (regcache_release, register_cache_size): New.
481 (register_size): Add target_desc parameter, and use it.
482 (register_data, supply_register, supply_register_zeroed)
483 (supply_regblock, supply_register_by_name, collect_register)
484 (collect_register_as_string, collect_register_by_name): Adjust.
485 * regcache.h (struct target_desc): Forward declare.
486 (struct regcache) <tdesc>: New field.
487 (init_register_cache, new_register_cache): Add target_desc
489 (regcache_invalidate_thread): Declare.
490 (regcache_invalidate_one): Delete declaration.
491 (regcache_release): Declare.
492 (find_register_by_number, register_cache_size, register_size)
493 (find_regno): Add target_desc parameter.
494 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
496 * remote-utils.c: Include tdesc.h.
497 (outreg, prepare_resume_reply): Adjust.
498 * server.c: Include tdesc.h.
499 (gdbserver_xmltarget): Delete declaration.
500 (get_features_xml, process_serial_event): Adjust.
501 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
503 (struct process_info) <tdesc>: New field.
504 (ipa_tdesc): Declare.
507 * tracepoint.c: Include tdesc.h.
508 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
509 (get_context_regcache): Adjust to pass ipa_tdesc down.
510 (do_action_at_tracepoint): Adjust to get the register cache size
511 from the context regcache's description.
512 (traceframe_walk_blocks): Adjust to get the register cache size
513 from the current trace frame's description.
514 (traceframe_get_pc): Adjust to get current trace frame's
515 description and pass it down.
516 (gdb_collect): Adjust to get the register cache size from the
518 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
519 (gdbserver_xmltarget): Delete.
520 (initialize_low_tracepoint): Set the ipa's target description.
521 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
522 (initialize_low_tracepoint): Set the ipa's target description.
523 * linux-x86-low.c: Include tdesc.h.
524 [__x86_64__] (is_64bit_tdesc): New.
525 (ps_get_thread_area, x86_get_thread_area): Use it.
526 (i386_cannot_store_register): Rename to ...
527 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
528 (i386_cannot_fetch_register): Rename to ...
529 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
530 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
532 (target_regsets): Rename to ...
533 (x86_regsets): ... this.
534 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
536 (x86_siginfo_fixup): Use is_64bit_tdesc.
537 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
538 (tdesc_x32_avx_linux, tdesc_x32_linux)
539 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
541 (x86_linux_update_xmltarget): Delete.
542 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
543 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
544 (AMD64_LINUX_USER64_CS): New.
545 (x86_linux_read_description): New, based on
546 x86_linux_update_xmltarget.
547 (same_process_callback): New.
548 (x86_arch_setup_process_callback): New.
549 (x86_linux_update_xmltarget): New.
550 (x86_regsets_info): New.
551 (amd64_linux_regs_info): New.
552 (i386_linux_usrregs_info): New.
553 (i386_linux_regs_info): New.
554 (x86_linux_regs_info): New.
555 (x86_arch_setup): Reimplement.
556 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
557 (x86_emit_ops): Ditto.
558 (the_low_target): Adjust. Install x86_linux_regs_info,
559 x86_cannot_fetch_register, and x86_cannot_store_register.
560 (initialize_low_arch): New.
561 * linux-ia64-low.c (tdesc_ia64): Declare.
562 (ia64_fetch_register): Adjust.
563 (ia64_usrregs_info, regs_info): New globals.
564 (ia64_regs_info): New function.
565 (the_low_target): Adjust.
566 (initialize_low_arch): New function.
567 * linux-sparc-low.c (tdesc_sparc64): Declare.
568 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
570 (sparc_arch_setup): New function.
571 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
572 (the_low_target): Adjust.
573 (initialize_low_arch): New function.
574 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
575 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
576 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
577 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
578 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
579 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
580 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
581 (tdesc_powerpc_isa205_vsx64l): Declare.
582 (ppc_cannot_store_register, ppc_collect_ptrace_register)
583 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
584 (ppc_set_pc, ppc_get_hwcap): Adjust.
585 (ppc_usrregs_info): Forward declare.
586 (!__powerpc64__) ppc_regmap_adjusted: New global.
587 (ppc_arch_setup): Adjust to the current process'es target
589 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
590 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
591 (ppc_store_evrregset): Adjust.
592 (target_regsets): Rename to ...
593 (ppc_regsets): ... this, and make static.
594 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
595 (ppc_regs_info): New function.
596 (the_low_target): Adjust.
597 (initialize_low_arch): New function.
598 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
599 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
600 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
601 (tdesc_s390x_linux64v2): Declare.
602 (s390_collect_ptrace_register, s390_supply_ptrace_register)
603 (s390_fill_gregset, s390_store_last_break): Adjust.
604 (target_regsets): Rename to ...
605 (s390_regsets): ... this, and make static.
606 (s390_get_pc, s390_set_pc): Adjust.
607 (s390_get_hwcap): New target_desc parameter, and use it.
608 [__s390x__] (have_hwcap_s390_high_gprs): New global.
609 (s390_arch_setup): Adjust to set the current process'es target
610 description. Don't adjust the regmap.
611 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
612 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
613 (regs_info_3264): New globals.
614 (s390_regs_info): New function.
615 (the_low_target): Adjust.
616 (initialize_low_arch): New function.
617 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
618 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
619 [__mips64] (init_registers_mips_linux)
620 (init_registers_mips_dsp_linux): Delete defines.
621 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
622 (have_dsp): New global.
623 (mips_read_description): New, based on mips_arch_setup.
624 (mips_arch_setup): Reimplement.
625 (get_usrregs_info): New function.
626 (mips_cannot_fetch_register, mips_cannot_store_register)
627 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
628 (mips_fill_fpregset, mips_store_fpregset): Adjust.
629 (target_regsets): Rename to ...
630 (mips_regsets): ... this, and make static.
631 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
632 (dsp_regs_info, regs_info): New globals.
633 (mips_regs_info): New function.
634 (the_low_target): Adjust.
635 (initialize_low_arch): New function.
636 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
637 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
639 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
640 (arm_read_description): New, with bits factored from
642 (arm_arch_setup): Reimplement.
643 (target_regsets): Rename to ...
644 (arm_regsets): ... this, and make static.
645 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
646 (arm_regs_info): New function.
647 (the_low_target): Adjust.
648 (initialize_low_arch): New function.
649 * linux-m68k-low.c (tdesc_m68k): Declare.
650 (target_regsets): Rename to ...
651 (m68k_regsets): ... this, and make static.
652 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
653 (m68k_regs_info): New function.
654 (m68k_arch_setup): New function.
655 (the_low_target): Adjust.
656 (initialize_low_arch): New function.
657 * linux-sh-low.c (tdesc_sharch): Declare.
658 (target_regsets): Rename to ...
659 (sh_regsets): ... this, and make static.
660 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
661 (sh_regs_info, sh_arch_setup): New functions.
662 (the_low_target): Adjust.
663 (initialize_low_arch): New function.
664 * linux-bfin-low.c (tdesc_bfin): Declare.
665 (bfin_arch_setup): New function.
666 (bfin_usrregs_info, regs_info): New globals.
667 (bfin_regs_info): New function.
668 (the_low_target): Adjust.
669 (initialize_low_arch): New function.
670 * linux-cris-low.c (tdesc_cris): Declare.
671 (cris_arch_setup): New function.
672 (cris_usrregs_info, regs_info): New globals.
673 (cris_regs_info): New function.
674 (the_low_target): Adjust.
675 (initialize_low_arch): New function.
676 * linux-cris-low.c (tdesc_crisv32): Declare.
677 (cris_arch_setup): New function.
678 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
679 (cris_regs_info): New function.
680 (the_low_target): Adjust.
681 (initialize_low_arch): New function.
682 * linux-m32r-low.c (tdesc_m32r): Declare.
683 (m32r_arch_setup): New function.
684 (m32r_usrregs_info, regs_info): New globals.
685 (m32r_regs_info): Adjust.
686 (initialize_low_arch): New function.
687 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
688 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
689 (tic6x_usrregs_info): Forward declare.
690 (tic6x_read_description): New function, based on ...
691 (tic6x_arch_setup): ... this. Reimplement.
692 (target_regsets): Rename to ...
693 (tic6x_regsets): ... this, and make static.
694 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
695 (tic6x_regs_info): New function.
696 (the_low_target): Adjust.
697 (initialize_low_arch): New function.
698 * linux-xtensa-low.c (tdesc_xtensa): Declare.
699 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
700 (target_regsets): Rename to ...
701 (xtensa_regsets): ... this, and make static.
702 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
704 (xtensa_arch_setup, xtensa_regs_info): New functions.
705 (the_low_target): Adjust.
706 (initialize_low_arch): New function.
707 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
708 (nios2_arch_setup): Set the current process'es tdesc.
709 (target_regsets): Rename to ...
710 (nios2_regsets): ... this.
711 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
712 (nios2_regs_info): New function.
713 (the_low_target): Adjust.
714 (initialize_low_arch): New function.
715 * linux-aarch64-low.c (tdesc_aarch64): Declare.
716 (aarch64_arch_setup): Set the current process'es tdesc.
717 (target_regsets): Rename to ...
718 (aarch64_regsets): ... this.
719 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
720 (aarch64_regs_info): New function.
721 (the_low_target): Adjust.
722 (initialize_low_arch): New function.
723 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
725 (target_regsets): Rename to ...
726 (tile_regsets): ... this.
727 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
728 (tile_regs_info): New function.
729 (tile_arch_setup): Set the current process'es tdesc.
730 (the_low_target): Adjust.
731 (initialize_low_arch): New function.
732 * spu-low.c (tdesc_spu): Declare.
733 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
734 * win32-arm-low.c (tdesc_arm): Declare.
735 (arm_arch_setup): New function.
736 (the_low_target): Install arm_arch_setup instead of
738 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
739 (init_windows_x86): Rename to ...
740 (i386_arch_setup): ... this. Set `win32_tdesc'.
741 (the_low_target): Adjust.
742 * win32-low.c (win32_tdesc): New global.
743 (child_add_thread): Don't create the thread cache here.
744 (do_initial_child_stuff): Set the new process'es tdesc.
745 * win32-low.h (struct target_desc): Forward declare.
746 (win32_tdesc): Declare.
747 * lynx-i386-low.c (tdesc_i386): Declare global.
748 (lynx_i386_arch_setup): Set `lynx_tdesc'.
749 * lynx-low.c (lynx_tdesc): New global.
750 (lynx_add_process): Set the new process'es tdesc.
751 * lynx-low.h (struct target_desc): Forward declare.
752 (lynx_tdesc): Declare global.
753 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
754 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
755 * nto-low.c (nto_tdesc): New global.
756 (do_attach): Set the new process'es tdesc.
757 * nto-low.h (struct target_desc): Forward declare.
758 (nto_tdesc): Declare.
759 * nto-x86-low.c (tdesc_i386): Declare.
760 (nto_x86_arch_setup): Set `nto_tdesc'.
762 2013-06-04 Gary Benson <gbenson@redhat.com>
764 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
765 to qSupported response when appropriate.
766 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
767 with nonzero-length annex.
768 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
769 arguments supplied in annex.
771 2013-05-31 Doug Evans <dje@google.com>
774 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
775 64 bits in 64-cross-32 environment.
777 2013-05-28 Pedro Alves <palves@redhat.com>
779 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
780 (aarch64-without-fpu.c): Delete rule.
781 * configure.srv (aarch64*-*-linux*): Remove references to
782 aarch64-without-fpu.o and aarch64-without-fpu.xml.
783 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
786 2013-05-24 Pedro Alves <palves@redhat.com>
788 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
789 instead of strchr/decode_address. Error if the range isn't split
790 with a ','. Don't assume there's be a ':' in the action.
792 2013-05-23 Yao Qi <yao@codesourcery.com>
793 Pedro Alves <palves@redhat.com>
795 * linux-low.c (lwp_in_step_range): New function.
796 (linux_wait_1): If the thread was range stepping and stopped
797 outside the stepping range, report the stop to GDB. Otherwise,
798 continue stepping. Add range stepping debug output.
799 (linux_set_resume_request): Copy the step range from the resume
801 (linux_supports_range_stepping): New.
802 (linux_target_ops) <supports_range_stepping>: Set to
803 linux_supports_range_stepping.
804 * linux-low.h (struct linux_target_ops)
805 <supports_range_stepping>: New field.
806 (struct lwp_info) <step_range_start, step_range_end>: New fields.
807 * linux-x86-low.c (x86_supports_range_stepping): New.
808 (the_low_target) <supports_range_stepping>: Set to
809 x86_supports_range_stepping.
810 * server.c (handle_v_cont): Handle 'r' action.
811 (handle_v_requests): Append ";r" if the target supports range
813 * target.h (struct thread_resume) <step_range_start,
814 step_range_end>: New fields.
815 (struct target_ops) <supports_range_stepping>:
817 (target_supports_range_stepping): New macro.
819 2013-05-17 Joel Brobecker <brobecker@adacore.com>
821 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
822 confusion in comment.
824 2013-05-17 Joel Brobecker <brobecker@adacore.com>
826 * lynx-low.c (struct process_info_private): New type.
827 (lynx_add_process): New function.
828 (lynx_create_inferior, lynx_attach): Replace calls to
829 add_process by calls to lynx_add_process.
830 (lynx_resume): If PTID is null, then try using
831 current_process()->private->last_wait_event_ptid.
833 (lynx_clear_inferiors): Delete. The contents of that function
834 has been inlined in lynx_mourn;
835 (lynx_wait_1): Save the ptid in the process's private data.
836 (lynx_mourn): Free the process' private data. Replace call
837 to lynx_clear_inferiors by call to clear_inferiors.
839 2013-05-17 Yao Qi <yao@codesourcery.com>
841 * i386-low.c (i386_length_and_rw_bits): Move the comment to
844 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
846 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
847 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
848 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
849 PT_TEXT_END_ADDR guards. Update comments.
850 (linux_target_op) <read_offsets>: Conditionally define to
851 linux_read_offsets if the target is UCLIBC and if it defines
852 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
854 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
855 Andrew Jenner <andrew@codesourcery.com>
857 * Makefile.in (SFILES): Add linux-nios2-low.c.
858 (clean): Add action to delete nios2-linux.c.
859 (nios2-linux.c): New rule.
860 * configure.srv: Add nios2*-*-linux*.
861 * linux-nios2-low.c: New.
863 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
865 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
867 2013-04-25 Hui Zhu <hui@codesourcery.com>
870 * ax.c (ax_printf): Add fflush.
872 2013-04-22 Tom Tromey <tromey@redhat.com>
874 * Makefile.in (SFILES): Add filestuff.c.
875 (OBS): Add filestuff.o.
876 (filestuff.o): New target.
877 * config.in, configure: Rebuild.
878 * configure.ac: Check for fdwalk, pipe2.
880 2013-04-17 Pedro Alves <palves@redhat.com>
882 * configure.ac (USE_THREAD_DB): Delete variable.
883 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
884 Don't AC_SUBST USE_THREAD_DB.
885 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
886 * config.in, configure: Regenerate.
888 2013-04-16 Pedro Alves <palves@redhat.com>
890 * linux-low.h (struct lwp_info) <thread_known>: Move under
891 the USE_THREAD_DB #ifdef.
893 2013-04-16 Pedro Alves <palves@redhat.com>
895 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
896 (linux-low.o): Delete rule.
897 * linux-low.h: Always include "gdb_thread_db.h" instead of
898 conditionally including thread_db.h.
899 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
902 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
904 * Makefile.in (install-only): Fix make install regression.
906 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
908 Convert man pages to texinfo, new gdbinit.5 texinfo page.
909 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
911 * gdbserver.1: Remove.
913 2013-03-22 Pedro Alves <palves@redhat.com>
915 * linux-low.c (handle_extended_wait): Don't call
916 linux_enable_event_reporting.
918 2013-03-15 Tony Theodore <tonyt@logyst.com>
921 * Makefile.in (SHELL): Use @SHELL@.
923 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
925 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
928 2013-03-13 Joel Brobecker <brobecker@adacore.com>
930 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
931 Remove extraneous NULL element.
933 2013-03-13 Yao Qi <yao@codesourcery.com>
935 * tracepoint.c (traceframe_read_tsv): Look for the last matched
936 'V' block in trace frame.
938 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
940 * target.h (struct target_ops): Add btrace ops.
941 (target_supports_btrace): New macro.
942 (target_enable_btrace): New macro.
943 (target_disable_btrace): New macro.
944 (target_read_btrace): New macro.
945 * gdbthread.h (struct thread_info): Add btrace field.
946 * server.c: Include btrace-common.h.
947 (handle_btrace_general_set): New function.
948 (handle_btrace_enable): New function.
949 (handle_btrace_disable): New function.
950 (handle_general_set): Call handle_btrace_general_set.
951 (handle_qxfer_btrace): New function.
952 (struct qxfer qxfer_packets[]): Add btrace entry.
953 * inferiors.c (remove_thread): Disable btrace.
954 * linux-low: Include linux-btrace.h.
955 (linux_low_enable_btrace): New function.
956 (linux_low_read_btrace): New function.
957 (linux_target_ops): Add btrace ops.
958 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
959 Add srv_linux_btrace=yes.
960 (x86_64-*-linux*): Add linux-btrace.o.
961 Add srv_linux_btrace=yes.
962 * configure.ac: Define HAVE_LINUX_BTRACE.
963 * config.in: Regenerated.
964 * configure: Regenerated.
966 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
968 * server.c (handle_qxfer): Preserve error message if -3 is
970 (qxfer): Document the -3 return value.
972 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
974 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
975 (linux_btrace_h): New variable.
976 (linux-btrace.o): New rule.
978 2013-03-08 Stan Shebs <stan@codesourcery.com>
979 Hafiz Abid Qadeer <abidh@codesourcery.com>
981 * tracepoint.c (trace_buffer_size): New global.
982 (DEFAULT_TRACE_BUFFER_SIZE): New define.
983 (init_trace_buffer): Change to one-argument function. Allocate
985 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
986 handle QTBuffer:size packet.
987 (cmd_bigqtbuffer_size): New function.
988 (initialize_tracepoint): Call init_trace_buffer with
989 DEFAULT_TRACE_BUFFER_SIZE.
990 * server.c (handle_query): Add QTBuffer:size in the
993 2013-03-07 Yao Qi <yao@codesourcery.com>
995 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
996 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
998 (cmd_qtsp): Adjust condition. Do post increment.
999 Set cur_action and cur_step_action back to 0.
1001 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1004 * linux-low.c (linux_write_memory): Return early success if LEN is
1007 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1009 * configure.srv: Add x86_64-*-cygwin* as target.
1011 2013-02-28 Tom Tromey <tromey@redhat.com>
1013 * configure.ac: Invoke AC_SYS_LARGEFILE.
1014 * configure, config.in: Rebuild.
1016 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1018 * win32-low.c: Throughout, fix format strings and casts of
1019 printf-like functions to avoid type related warnings on all
1021 (get_child_debug_event): Print dwDebugEventCode as hex since
1022 that's how it's usually documented.
1024 2013-02-28 Yao Qi <yao@codesourcery.com>
1026 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1029 2013-02-27 Jiong Wang <jiwang@tilera.com>
1031 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1032 (reg-tilegx32.c): New rule.
1033 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1034 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1035 different register info initializer according to elf class.
1036 (init_registers_tilgx32): New function. The tilegx32 register info
1038 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1039 (tile_store_gregset): Likewise.
1041 2013-02-27 Yao Qi <yao@codesourcery.com>
1043 * server.c (process_point_options): Print debug message when
1044 debug_threads is true.
1046 2013-02-26 Yao Qi <yao@codesourcery.com>
1048 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1050 2013-02-19 Pedro Alves <palves@redhat.com>
1051 Kai Tietz <ktietz@redhat.com>
1055 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1056 instead of strtoul to extract address from packet.
1057 (process_serial_event) <'z'>: Likewise.
1059 2013-02-18 Yao Qi <yao@codesourcery.com>
1061 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1063 2013-02-14 Pedro Alves <palves@redhat.com>
1067 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1068 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1070 2013-02-14 Pedro Alves <palves@redhat.com>
1072 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1074 2013-02-14 Pedro Alves <palves@redhat.com>
1076 * tracepoint.c (save_string): Delete.
1077 (add_tracepoint_action): Use savestring instead of save_string.
1079 2013-02-12 Pedro Alves <palves@redhat.com>
1081 * linux-xtensa-low.c: Ditto.
1082 * xtensa-xtregs.c: Ditto.
1084 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1086 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1089 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1091 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1092 aarch64_num_wp_regs and aarch64_num_bp_regs to
1093 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1095 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1097 * linux-aarch64-low.c (ps_get_thread_area): Replace
1098 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1100 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1101 Marcus Shawcroft <marcus.shawcroft@arm.com>
1102 Nigel Stephens <nigel.stephens@arm.com>
1103 Yufeng Zhang <yufeng.zhang@arm.com>
1105 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1106 (aarch64.c, aarch64-without-fpu.c): New targets.
1107 * configure.srv (aarch64*-*-linux*): New.
1108 * linux-aarch64-low.c: New file.
1110 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1112 * linux-low.c (handle_extended_wait, linux_create_inferior)
1113 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1114 (dequeue_one_deferred_signal, linux_resume_one_thread)
1115 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1116 (linux_tracefork_grandchild, linux_test_for_tracefork)
1117 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1118 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1119 where the argument is 0.
1121 2013-01-25 Yao Qi <yao@codesourcery.com>
1123 * event-loop.c: Include "queue.h".
1124 (gdb_event_p): New typedef.
1125 (struct gdb_event) <next_event>: Remove.
1126 (event_queue): Change to QUEUE(gdb_event_p).
1127 (async_queue_event): Remove.
1128 (gdb_event_xfree): New.
1129 (initialize_event_loop): New.
1130 (process_event): Use API from QUEUE.
1131 (wait_for_event): Likewise.
1132 * server.c (main): Call initialize_event_loop.
1133 * server.h (initialize_event_loop): Declare.
1135 2013-01-18 Yao Qi <yao@codesourcery.com>
1137 * ax.h (struct eval_agent_expr_context): New.
1138 (gdb_eval_agent_expr): Update declaration.
1139 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1140 TFRAME. Add new argument CTX.
1141 * server.h (struct eval_agent_expr_context): Declare.
1142 (agent_mem_read, agent_tsv_read): Update declaration.
1143 (agent_mem_read_string): Likewise.
1144 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1145 (add_traceframe_block): Add new argument TPOINT.
1146 Increase TPOINT->traceframe_usage.
1147 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1148 eval_tracepoint_agent_expr.
1149 (condition_true_at_tracepoint): Likewise.
1150 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1151 (agent_mem_read_string, agent_tsv_read): Likewise.
1153 2013-01-16 Yao Qi <yao@codesourcery.com>
1155 * linux-low.c (linux_resume_one_lwp): Don't check
1156 'lwp->bp_reinsert != 0'.
1158 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1159 Pedro Alves <palves@redhat.com>
1161 * lynx-low.c (ptrace_request_to_str): Define a temporary
1162 macro and use it to simplify this function's implementation.
1164 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1166 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1169 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1171 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1173 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1175 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1177 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1179 * lynx-low.c (lynx_resume): Use the resume_info parameter
1180 to determine the ptid for the lynx_ptrace call, unless
1181 it is equal to minus_one_ptid, in which case we use the
1182 ptid of the current_inferior.
1183 (lynx_wait_1): After having received a thread create/exit
1184 event, resume the inferior's execution using the signaling
1185 thread's ptid, rather than the old ptid.
1187 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1189 * lynx-low.c (lynx_resume): Delete variable ret.
1191 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1193 * gdbreplay.c (gdbreplay_version): Update copyright year.
1194 * server.c (gdbserver_version): Likewise.
1196 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1198 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1201 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1203 * lynx-low.c (ptrace_request_to_str): Add handling for
1206 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1208 * lynx-low.c (lynx_attach): Delete variable new_process.
1210 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1212 * lynx-low.c (lynx_create_inferior): Delete variable
1215 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1217 * lynx-low.c (ptrace_request_to_str): Do not handle
1218 PTRACE_GETTHREADLIST if this macro does not exist.
1220 2012-12-15 Yao Qi <yao@codesourcery.com>
1222 * Makefile.in (OBS): Add notif.o.
1223 * notif.c, notif.h: New.
1224 * server.c: Include "notif.h".
1225 (struct vstop_notif) <next>: Remove.
1227 (queue_stop_reply): Update.
1228 (push_event, send_next_stop_reply): Remove.
1229 (discard_queued_stop_replies): Update.
1230 (notif_stop): New variable.
1231 (handle_v_stopped): Remove.
1232 (handle_v_requests): Don't call handle_v_stopped. Call
1233 handle_ack_notif instead.
1234 (queue_stop_reply_callback): Call notif_event_enque instead
1235 of queue_stop_reply.
1236 (handle_status): Don't call send_next_stop_reply, call
1237 notif_write_event instead.
1238 (kill_inferior_callback): Likewise.
1239 (detach_or_kill_inferior_callback): Likewise.
1240 (main): Call initialize_notif.
1241 (process_serial_event): Call QUEUE_is_empty.
1242 (handle_target_event): Call notif_push instead of push event.
1243 * server.h (push_event): Remove declaration.
1245 2012-12-10 Tom Tromey <tromey@redhat.com>
1247 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1248 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1251 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1252 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1253 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1254 (amd64-linux-ipa.o, ax.o): Rewrite.
1255 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1256 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1257 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1258 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1259 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1260 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1261 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1262 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1263 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1264 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1265 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1266 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1267 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1268 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1269 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1270 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1271 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1272 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1273 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1274 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1275 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1276 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1277 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1278 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1279 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1280 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1281 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1282 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1283 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1284 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1285 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1286 (reg-tilegx.o): Remove.
1287 (all_object_files): New macro.
1288 Include .deps files.
1289 * aclocal.m4, configure: Rebuild.
1290 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1291 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1292 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1294 2012-12-05 Tom Tromey <tromey@redhat.com>
1297 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1299 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1301 * configure.ac: Check for linux/perf_event.h.
1302 * config.in: Regenerated.
1303 * configure: Regenerated.
1305 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1307 * hostio.c (handle_readlink): Decrease buffer size
1308 parameter passed to readlink by one byte.
1310 2012-11-26 Yao Qi <yao@codesourcery.com>
1312 * configure.ac (build_warnings): Append '-Wempty-body'.
1313 * configure: Regenerated.
1314 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1317 2012-11-15 Pierre Muller <muller@sourceware.org>
1319 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1320 * config.in: Regenerate.
1321 * configure: Regenerate.
1322 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1323 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1324 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1325 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1327 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1328 instead of <sys/wait.h> header.
1329 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1331 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1333 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1334 (various make rules): Remove -DGDBSERVER
1336 2012-11-09 Yao Qi <yao@codesourcery.com>
1338 * spu-low.c (current_ptid): Move it to ..
1339 * gdbthread.h: ... here. New.
1340 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1341 * server.c (myresume, process_serial_event): Likewise.
1342 * thread-db.c (thread_db_find_new_threads): Likewise.
1343 * tracepoint.c (run_inferior_command): Likewise.
1345 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1347 * server.c (handle_search_memory_1): Include access length in
1350 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1352 * linux-crisv32-low.c: Fix compile errors.
1354 2012-09-04 Yao Qi <yao@codesourcery.com>
1356 * tracepoint.c (cmd_qtsv): Adjust debug message.
1357 Don't check CUR_TPOINT.
1359 2012-08-28 Yao Qi <yao@codesourcery.com>
1361 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1362 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1363 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1364 Remove declarations of xmalloc, xreallloc, xstrdup and
1366 * Makefile.in (libiberty_h): New.
1367 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1368 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1370 2012-08-23 Yao Qi <yao@codesourcery.com>
1372 * server.h: Remove declaration of 'xsnprintf'.
1374 2012-08-22 Keith Seitz <keiths@redhat.com>
1376 * server.h: Include build-gnulib-gbserver/config.h.
1377 * gdbreplay.c: Likewise.
1379 2012-08-08 Doug Evans <dje@google.com>
1381 * Makefile.in (SFILES): Add gdb_vecs.c.
1382 (OBS): Add gdb_vecs.o.
1383 (gdb_vecs_h, host_defs_h): New variables.
1384 (thread-db.o): Add $(gdb_vecs_h) dependency.
1385 (gdb_vecs.o): New rule.
1386 * thread-db.c: #include "gdb_vecs.h".
1387 (thread_db_load_search): Use a vector to iterate over path elements.
1388 Handle text appearing after "$pdir".
1390 * configure.ac: Add check for strstr.
1391 * config.in: Regenerate.
1392 * configure: Regenerate.
1394 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1396 * hostio.c (handle_pread): If pread fails, fall back to attempting
1398 (handle_pwrite): Likewise for pwrite.
1400 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1402 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1403 between unsupported TYPE and unimplementable ADDR/LEN combination.
1404 (arm_insert_point): Act on new return value.
1406 2012-07-31 Pedro Alves <palves@redhat.com>
1408 * server.c (process_point_options): Only skip tokens if we find
1409 one that is unrecognized. Don't treat 'X' specially while
1410 skipping unrecognized tokens.
1412 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1414 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1415 to 4-byte-align HW breakpoint addresses for Thumb.
1417 2012-07-27 Yao Qi <yao@codesourcery.com>
1421 * server.h: Declare gdb_agent_about_to_close.
1422 * target.c (kill_inferior): Include "agent.h".
1423 New. Send command 'kill'.
1424 * target.h (kill_inferior): Removed macro.
1425 * tracepoint.c (gdb_agent_about_to_close): New.
1426 (gdb_agent_helper_thread): Handle command 'close'.
1427 Wait endlessly until the inferior stops.
1428 Install gdb_agent_remove_socket to atexit hook.
1429 (agent_socket_name): New static variable.
1430 (gdb_agent_socket_init): Replace local variable 'name' with
1431 'agent_socket_name'.
1432 (gdb_agent_remove_socket): New.
1434 2012-07-27 Yao Qi <yao@codesourcery.com>
1436 * server.c (process_point_options): Stop at 'X' when parsing.
1438 2012-07-19 Michael Eager <eager@eagercon.com>
1440 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1442 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1443 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1444 hardware breakpoint.
1446 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1448 * gdbserver/linux-low.c (initialize_low): Call
1449 linux_ptrace_init_warnings.
1451 2012-07-02 Doug Evans <dje@google.com>
1453 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1456 2012-07-02 Stan Shebs <stan@codesourcery.com>
1458 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1459 (ax.o): Add it to build rule.
1461 (OBS): Add format.o.
1462 (IPA_OBS): Add format.o.
1463 * server.c (handle_query): Claim support for breakpoint commands.
1464 (process_point_options): Add command case.
1465 (process_serial_event): Leave running if there are printfs in
1467 * mem-break.h (any_persistent_commands): Declare.
1468 (add_breakpoint_commands): Declare.
1469 (gdb_no_commands_at_breakpoint): Declare.
1470 (run_breakpoint_commands): Declare.
1471 * mem-break.c (struct point_command_list): New struct.
1472 (struct breakpoint): New field command_list.
1473 (any_persistent_commands): New function.
1474 (add_commands_to_breakpoint): New function.
1475 (add_breakpoint_commands): New function.
1476 (gdb_no_commands_at_breakpoint): New function.
1477 (run_breakpoint_commands): New function.
1478 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1480 * ax.c: Include format.h.
1481 (ax_printf): New function.
1482 (gdb_eval_agent_expr): Add printf opcode.
1484 2012-06-13 Yao Qi <yao@codesourcery.com>
1486 * server.c (start_inferior): Remove duplicated writes to fields
1487 'last_resume_kind' and 'last_status' of 'current_inferior'.
1489 2012-06-12 Yao Qi <yao@codesourcery.com>
1490 Pedro Alves <palves@redhat.com>
1492 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1494 * server.c (handle_v_cont): Extend comment.
1496 2012-06-11 Yao Qi <yao@codesourcery.com>
1498 * linux-low.c (linux_attach): Add 'static'.
1500 2012-06-06 Yao Qi <yao@codesourcery.com>
1502 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1504 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1506 Fix gcc -flto compilation warning.
1507 * server.c (main): Make variable multi_mode and attach volatile.
1509 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1511 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1512 if the platform doesn't know about it.
1514 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1516 * Makefile.in (SFILES): Add linux-tile-low.c.
1517 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1518 * configure.srv: Handle tilegx-*-linux*.
1519 * linux-tile-low.c: New file.
1521 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1523 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1525 2012-05-24 Pedro Alves <palves@redhat.com>
1529 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1531 2012-05-24 Pedro Alves <palves@redhat.com>
1535 Replace target_signal with gdb_signal throughout.
1537 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1539 * linux-low.c (linux_store_registers): Avoid the copying sequence
1540 when no data has been retrieved by ptrace.
1542 2012-05-22 Will Deacon <will.deacon@arm.com>
1544 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1545 Include asm/ptrace.h.
1546 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1549 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1551 * linux-low.c (linux_store_registers): Don't re-retrieve data
1552 with ptrace that has already been obtained from /proc. Always
1553 copy any data retrieved with ptrace to the buffer supplied.
1555 2012-05-11 Yao Qi <yao@codesourcery.com>
1556 Pedro Alves <palves@redhat.com>
1558 * linux-low.c (enum stopping_threads_kind): New.
1559 (stopping_threads): Change type to `enum stopping_threads_kind'.
1560 (handle_extended_wait): If stopping and suspending threads, leave
1561 the new_lwp suspended too.
1562 (linux_wait_for_event): Adjust.
1563 (stop_all_lwps): Set `stopping_threads' to
1564 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1565 whether we're suspending threads or just stopping them. Assert no
1568 2012-04-29 Yao Qi <yao@codesourcery.com>
1570 * server.h: Move some code to ...
1571 * gdbthread.h: ... here. New.
1572 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1573 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1574 (nto-low.o, win32-low.o): Likewise.
1575 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1576 * regcache.c, remote-utils.c, server.c: Likewise.
1577 * target.c, tracepoint.c, win32-low.c: Likewise.
1579 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1581 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1582 (PTRACE_ARG4_TYPE): Likewise.
1583 (PTRACE_XFER_TYPE): Likewise.
1584 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1585 ptrace to PTRACE_ARG3_TYPE.
1586 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1587 (PTRACE_ARG4_TYPE): Likewise.
1588 (PTRACE_XFER_TYPE): Likewise.
1589 (linux_detach_one_lwp): Cast fourth argument of
1590 ptrace to long then PTRACE_ARG4_TYPE.
1591 (regsets_fetch_inferior_registers): Cast third argument of
1592 ptrace to long then PTRACE_ARG3_TYPE.
1593 (regsets_store_inferior_registers): Likewise.
1595 2012-04-20 Pedro Alves <palves@redhat.com>
1597 * configure: Regenerate.
1599 2012-04-19 Pedro Alves <palves@redhat.com>
1601 * Makefile.in (GNULIB_BUILDDIR): New.
1602 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1603 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1604 (all, install-only, uninstall, clean-info, all-lib, clean): No
1605 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1606 (maintainer-clean realclean distclean): Use subdir_do.
1608 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1609 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1610 * acinclude.m4: Include acx_configure_dir.m4.
1611 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1612 calls. Call AC_PROG_RANLIB. Configure gnulib using
1615 (GNULIB_STDINT_H): Adjust.
1616 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1617 * gdbreplay.c: Include build-gnulib/config.h.
1618 * server.h: Likewise.
1619 * aclocal.m4: Regenerate.
1620 * config.in: Regenerate.
1621 * configure: Regenerate.
1623 2012-04-19 Pedro Alves <palves@redhat.com>
1625 * Makefile.in (LIBGNU, INCGNU): Adjust.
1626 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1627 (all, install-only, uninstall, clean-info, all-lib, clean)
1628 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1629 * configure.ac: Adjust AC_OUTPUT output.
1630 * aclocal.m4: Regenerate.
1631 * configure: Regenerate.
1633 2012-04-19 Pedro Alves <palves@redhat.com>
1635 * Makefile.in (generated_files): New.
1636 (server_h): Remove the explicit dependency on config.h, and depend
1637 on $generated_files.
1639 2012-04-19 Pedro Alves <palves@redhat.com>
1641 * Makefile.in (INCGNU): Add -Ignulib.
1643 2012-04-19 Pedro Alves <palves@redhat.com>
1645 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1646 (INCGNU): ... this, and spell out -I here.
1647 (GNULIB_LIB): Rename to ...
1649 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1651 2012-04-19 Pedro Alves <palves@redhat.com>
1653 * config.in: Regenerate.
1655 2012-04-19 Pedro Alves <palves@redhat.com>
1657 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1658 * server.h (memmem): Remove declaration.
1659 * config.in: Regenerate.
1660 * configure: Regenerate.
1662 2012-04-19 Yao Qi <yao@codesourcery.com>
1664 * Makefile.in (SFILES): Add common/vec.c.
1668 2012-04-19 Yao Qi <yao@codesourcery.com>
1670 * remote-utils.c (prepare_resume_reply): Replace with macro
1671 target_core_of_thread.
1672 * server.c (handle_qxfer_threads_proper): Likewise.
1673 * target.h (traget_core_of_thread): New macro.
1675 2012-04-18 Pedro Alves <palves@redhat.com>
1677 * aclocal.m4: Regenerate.
1678 * configure: Regenerate.
1680 2012-04-16 Yao Qi <yao@codesourcery.com>
1682 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1683 duplicated on address.
1685 2012-04-16 Yao Qi <yao@codesourcery.com>
1687 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1688 (struct tracepoint_action_ops) <send>: New field.
1689 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1690 (agent_expr_send, x_tracepoint_action_send): New.
1691 (l_tracepoint_action_send): New.
1692 (cmd_qtdp): Download and install tracepoint
1693 according to `use_agent'.
1694 (run_inferior_command): Add one more parameter `len'.
1696 (tracepoint_send_agent): New.
1697 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1699 2012-04-16 Yao Qi <yao@codesourcery.com>
1701 * tracepoint.c (download_tracepoints): Moved to ...
1702 (cmd_qtstart): ... here.
1704 2012-04-14 Yao Qi <yao@codesourcery.com>
1706 * tracepoint.c: Include inttypes.h.
1707 (struct collect_memory_action): Use sized types.
1708 (struct tracepoint): Likewise.
1709 (cmd_qtdp, stop_tracing): Update print specifiers.
1710 (cmd_qtp, response_tracepoint): Likewise.
1711 (collect_data_at_tracepoint): Likewise.
1712 (collect_data_at_step): Likewise.
1714 2012-04-14 Yao Qi <yao@codesourcery.com>
1716 Import gnulib module inttypes.
1717 * aclocal.m4, config.in, configure: Regenerated.
1719 2012-04-14 Yao Qi <yao@codesourcery.com>
1721 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1722 Makefile and config.status at last.
1724 2012-04-13 Yao Qi <yao@codesourcery.com>
1726 * tracepoint.c: Include stdint.h unconditionally.
1728 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1730 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1731 on BFD_HAVE_SYS_PROCFS_TYPE.
1732 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1733 * configure: Regenerate.
1734 * config.in: Likewise.
1736 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1738 * Makefile.in (clean): Also remove x32.c x32-linux.c
1739 x32-avx.c x32-avx-linux.c.
1740 (x32.o): New target.
1742 (x32-linux.o): Likewise.
1743 (x32-linux.c): Likewise.
1744 (x32-avx.o): Likewise.
1745 (x32-avx.c): Likewise.
1746 (x32-avx-linux.o): Likewise.
1747 (x32-avx-linux.c): Likewise.
1749 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1750 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1751 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1752 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1753 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1754 i386/x32-avx-linux.xml.
1756 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1757 (init_registers_x32_avx_linux): Likwise.
1758 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1759 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1761 2012-04-13 Pedro Alves <palves@redhat.com>
1763 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1764 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1765 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1766 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1769 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1771 * linux-x86-low.c (compat_x32_clock_t): New.
1772 (compat_x32_siginfo_t): Likewise.
1773 (compat_x32_siginfo_from_siginfo): Likewise.
1774 (siginfo_from_compat_x32_siginfo): Likewise.
1775 (linux_is_elf64): Likewise.
1776 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1777 and siginfo_from_compat_x32_siginfo for x32.
1778 (x86_arch_setup): Set linux_is_elf64.
1780 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1783 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1785 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1786 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1787 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1788 compatible with process.
1790 2012-04-12 Yao Qi <yao@codesourcery.com>
1792 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1793 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1794 (install-only, install-info, clean): Handle sub dir gnulib.
1795 (all-lib, am--refresh): New targets.
1796 (memmem.o): Remove target.
1797 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1798 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1799 (AC_REPLACE_FUNCS): Remove memmem.
1800 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1801 (AC_OUTPUT): Generate Makefile in gnulib/.
1802 * aclocal.m4, config.in, configure: Regenerated.
1804 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1806 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1808 2012-04-05 Pedro Alves <palves@redhat.com>
1810 -Werror=strict-aliasing
1812 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1815 2012-04-04 Pedro Alves <palves@redhat.com>
1817 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1818 (sparc_store_gregset_from_stack, sparc_store_gregset)
1819 (sparc_breakpoint_at): Fix formatting.
1821 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1823 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1825 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1826 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1827 * config.in: Regenerate.
1828 * configure: Likewise.
1830 2012-03-29 Pedro Alves <palves@redhat.com>
1832 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1833 Correct ptrace arguments.
1835 2012-03-28 Pedro Alves <palves@redhat.com>
1837 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1838 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1839 (IA64_FR1_REGNUM): New defines.
1840 (ia64_fetch_register): New.
1841 (the_low_target): Install it.
1842 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1844 * linux-low.c (linux_fetch_registers): Try the
1845 the_low_target.fetch_register hook first.
1847 * linux-arm-low.c (the_low_target): Adjust.
1848 * linux-bfin-low.c (the_low_target): Adjust.
1849 * linux-cris-low.c (the_low_target): Adjust.
1850 * linux-crisv32-low.c (the_low_target): Adjust.
1851 * linux-m32r-low.c (the_low_target): Adjust.
1852 * linux-m68k-low.c (the_low_target): Adjust.
1853 * linux-mips-low.c (the_low_target): Adjust.
1854 * linux-ppc-low.c (the_low_target): Adjust.
1855 * linux-s390-low.c (the_low_target): Adjust.
1856 * linux-sh-low.c (the_low_target): Adjust.
1857 * linux-sparc-low.c (the_low_target): Adjust.
1858 * linux-tic6x-low.c (the_low_target): Adjust.
1859 * linux-x86-low.c (the_low_target): Adjust.
1860 * linux-xtensa-low.c (the_low_target): Adjust.
1862 2012-03-26 Pedro Alves <palves@redhat.com>
1864 * server.c (handle_qxfer_libraries): Don't bail early if
1865 the_target->qxfer_libraries_svr4 is not NULL.
1867 2012-03-26 Pedro Alves <palves@redhat.com>
1869 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1871 2012-03-23 Pedro Alves <palves@redhat.com>
1873 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1874 "library-list-svr4" element's start tag when the the DSO list is
1877 2012-03-23 Pedro Alves <palves@redhat.com>
1879 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1880 a variable whose type size is the same as the inferior's pointer
1883 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1885 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1887 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1888 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1889 * linux-low.h: Include <signal.h>.
1890 (struct siginfo): Remove forward declaration.
1891 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1894 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1896 * .gitignore: Ignore more files.
1898 2012-03-19 Pedro Alves <palves@redhat.com>
1899 Jan Kratochvil <jan.kratochvil@redhat.com>
1901 * server.c (cont_thread, general_thread): Add describing comments.
1902 (start_inferior): Clear `cont_thread'.
1903 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1906 2012-03-15 Yao Qi <yao@codesourcery.com>
1908 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1910 (cmd_qtdp): ... here.
1912 2012-03-15 Yao Qi <yao@codesourcery.com>
1914 * tracepoint.c (struct tracepoint_action_ops): New.
1915 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1916 (m_tracepoint_action_download): New.
1917 (r_tracepoint_action_download): New.
1918 (x_tracepoint_action_download): New.
1919 (l_tracepoint_action_download): New.
1920 (add_tracepoint_action): Install `action->ops' according type.
1921 (download_tracepoint_1): Move code `download' function pointer
1922 of various tracepoint_action_ops.
1924 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1926 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1927 linux_ptrace_attach_warnings.
1929 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1931 * Makefile.in (linux-ptrace.o): New.
1932 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1933 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1934 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1935 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1936 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1938 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1940 2012-03-08 Yao Qi <yao@codesourcery.com>
1941 Pedro Alves <palves@redhat.com>
1943 Fix PR server/13392.
1944 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1946 * tracepoint.c (remove_tracepoint): New.
1947 (cmd_qtdp): Call remove_tracepoint when failed to install.
1949 2012-03-07 Pedro Alves <palves@redhat.com>
1951 * linux-low.c (get_detach_signal): New.
1952 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1953 Pass on pending signals to PTRACE_DETACH. Check the result of the
1955 * server.c (program_signals, program_signals_p): New.
1956 (handle_general_set): Handle QProgramSignals.
1957 * server.h (program_signals, program_signals_p): Declare.
1959 2012-03-05 Pedro Alves <palves@redhat.com>
1960 Jan Kratochvil <jan.kratochvil@redhat.com>
1962 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1965 2012-03-03 Yao Qi <yao@codesourcery.com>
1967 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1968 agent_look_up_symbols.
1970 2012-03-03 Yao Qi <yao@codesourcery.com>
1972 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1973 (linux-x86-low.o): Likewise.
1974 * server.h: Remove in_process_agent_loaded.
1975 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1979 2012-03-03 Yao Qi <yao@codesourcery.com>
1981 * tracepoint.c (gdb_agent_capability): New global.
1982 (in_process_agent_loaded_ust): Renamed to
1983 `in_process_agent_supports_ust'.
1985 (in_process_agent_supports_ust): Call agent_capability_check.
1986 (clear_installed_tracepoints): Assert that agent supports
1989 2012-03-03 Yao Qi <yao@codesourcery.com>
1991 * linux-low.c (linux_supports_agent): New.
1992 (linux_target_ops): Initialize field `supports_agent' with
1993 linux_supports_agent.
1994 * target.h (struct target_ops) <supports_agent>: New.
1995 (target_supports_agent): New macro.
1996 * server.c (handle_general_set): Handle packet 'QAgent'.
1997 (handle_query): Send `QAgent+'.
1998 * Makefile.in (server.o): Depends on agent.h.
2000 2012-03-03 Yao Qi <yao@codesourcery.com>
2002 * Makefile.in (OBS): Add agent.o.
2003 Add new rule for agent.o.
2004 Track dependence of tracepoint.c on agent.h.
2005 * tracepoint.c (run_inferior_command_1):
2006 (run_inferior_command): Call agent_run_command.
2007 (gdb_ust_connect_sync_socket): Deleted. Move it to
2009 (resume_thread, stop_thread): Likewise.
2010 (gdb_ust_socket_init): Renamed to ...
2011 (gdb_agent_socket_init): ... New.
2012 (gdb_ust_thread): Renamed to ...
2013 (gdb_agent_helper_thread): ... New.
2014 (gdb_ust_init): Move some code to ...
2015 (gdb_agent_init): ... here. New.
2016 [HAVE_UST]: Call gdb_ust_init.
2017 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2018 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2019 * config.in, configure: Regenerated.
2021 2012-03-02 Pedro Alves <palves@redhat.com>
2023 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2024 * linux-low.c (struct simple_pid_list): New.
2025 (stopped_pids): New a struct simple_pid_list pointer.
2026 (add_to_pid_list, pull_pid_from_list): New.
2027 (handle_extended_wait): Don't assume the first signal new children
2028 report is SIGSTOP. Adjust call to pull_pid_from_list.
2029 (linux_wait_for_lwp): Adjust.
2031 2012-03-02 Yao Qi <yao@codesourcery.com>
2033 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2036 2012-03-02 Yao Qi <yao@codesourcery.com>
2038 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2039 `stop_pc' and `tpoint'. Update caller.
2041 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2043 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2044 * linux-low.c (use_linux_regsets): New macro.
2045 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2046 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2047 (linux_register_in_regsets): New function.
2048 (usr_fetch_inferior_registers): Skip registers covered by
2050 (usr_store_inferior_registers): Likewise.
2051 (usr_fetch_inferior_registers): New macro.
2052 (usr_store_inferior_registers): Likewise.
2053 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2054 (linux_store_registers): Likewise.
2055 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2057 (init_registers_mips64_dsp_linux): Likewise.
2058 (init_registers_mips_linux): New macro.
2059 (init_registers_mips_dsp_linux): Likewise.
2060 (mips_dsp_num_regs): Likewise.
2061 (DSP_BASE, DSP_CONTROL): New fallback macros.
2062 (mips_base_regs): New macro.
2063 (mips_regmap): Use it. Fix the size.
2064 (mips_dsp_regmap): New variable.
2065 (mips_dsp_regset_bitmap): Likewise.
2066 (mips_arch_setup): New function.
2067 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2069 (mips_cannot_store_register): Likewise.
2070 (the_low_target): Update .arch_setup, .num_regs and .regmap
2071 initializers. Add .regset_bitmap initializer.
2072 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2074 * linux-bfin-low.c (the_low_target): Likewise.
2075 * linux-cris-low.c (the_low_target): Likewise.
2076 * linux-crisv32-low.c (the_low_target): Likewise.
2077 * linux-ia64-low.c (the_low_target): Likewise.
2078 * linux-m32r-low.c (the_low_target): Likewise.
2079 * linux-m68k-low.c (the_low_target): Likewise.
2080 * linux-ppc-low.c (the_low_target): Likewise.
2081 * linux-s390-low.c (the_low_target): Likewise.
2082 * linux-sh-low.c (the_low_target): Likewise.
2083 * linux-sparc-low.c (the_low_target): Likewise.
2084 * linux-tic6x-low.c (the_low_target): Likewise.
2085 * linux-x86-low.c (the_low_target): Likewise.
2086 * linux-xtensa-low.c (the_low_target): Likewise.
2087 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2088 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2089 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2091 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2092 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2094 2012-02-29 Yao Qi <yao@codesourcery.com>
2095 Pedro Alves <palves@redhat.com>
2097 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2098 `step_over_finished' is true.
2100 2012-02-27 Pedro Alves <palves@redhat.com>
2102 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2103 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2105 2012-02-27 Pedro Alves <palves@redhat.com>
2108 * linux-low.c (pid_is_stopped): New.
2109 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2111 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2113 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2116 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2118 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2120 2012-02-24 Luis Machado <lgustavo@codesourcery>
2122 * server.c (handle_query): Advertise support for target-side
2123 breakpoint condition evaluation.
2124 (process_point_options): New function.
2125 (process_serial_event): When inserting a breakpoint, check for
2126 a target-side condition that should be evaluated.
2128 * mem-break.c: Include regcache.h and ax.h.
2129 (point_cond_list_t): New data structure.
2130 (breakpoint) <cond_list>: New field.
2131 (find_gdb_breakpoint_at): Make non-static.
2132 (delete_gdb_breakpoint_at): Clear any target-side
2134 (clear_gdb_breakpoint_conditions): New function.
2135 (add_condition_to_breakpoint): Likewise.
2136 (add_breakpoint_condition): Likewise.
2137 (gdb_condition_true_at_breakpoint): Likewise.
2138 (gdb_breakpoint_here): Return result directly instead
2139 of going through a local variable.
2141 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2142 (clear_gdb_breakpoint_conditions): Likewise.
2143 (add_breakpoint_condition): Likewise.
2144 (gdb_condition_true_at_breakpoint): Likewise.
2146 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2147 (need_step_over_p): Take target-side breakpoint condition into
2150 2012-02-24 Luis Machado <lgustavo@codesourcery>
2152 * server.h: Include tracepoint.h.
2153 (agent_mem_read, agent_get_trace_state_variable_value,
2154 agent_set_trace_state_variable_value,
2155 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2156 get_set_tsv_func_addr): New prototypes.
2158 * ax.h: New include file.
2159 * ax.c: New source file.
2161 * tracepoint.c: Include ax.h.
2162 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2163 agent_expr, eval_result_type): Move to ax.h.
2164 (parse_agent_expr): Rename to ...
2165 (gdb_parse_agent_expr): ... this, make it non-static and move
2167 (unparse_agent_expr) Rename to ...
2168 (gdb_unparse_agent_expr): ... this, make it non-static and move
2170 (eval_agent_expr): Rename to ...
2171 (eval_tracepoint_agent_expr): ... this.
2172 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2173 forward declarations.
2174 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2175 (agent_get_trace_state_variable_value): New function.
2176 (agent_set_trace_state_variable_value): New function.
2177 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2178 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2179 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2180 (condition_true_at_tracepoint): Likewise.
2181 (parse_agent_expr): Rename to ...
2182 (gdb_parse_agent_expr): ... this and move to ax.c.
2183 (unparse_agent_expr): Rename to ...
2184 (gdb_unparse_agent_expr): ... this and move to ax.c.
2185 (gdb_agent_op_name): Move to ax.c.
2186 (eval_agent_expr): Rename to ...
2187 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2189 (eval_tracepoint_agent_expr): New function.
2190 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2192 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2194 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2195 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2196 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2197 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2198 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2199 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2200 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2201 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2202 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2203 (compile_bytecodes): Remove forward declaration.
2204 (is_goto_target): Move to ax.c.
2205 (compile_bytecodes): Move to ax.c and call
2206 agent_get_trace_state_variable_value (...) and
2207 agent_set_trace_state_variable_value (...).
2209 * Makefile.in: Update ax.c and IPA dependencies.
2211 2012-02-24 Pedro Alves <palves@redhat.com>
2213 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2214 (cmd_bigqtbuffer_circular): ... this. Only handle
2215 'QTBuffer:circular:'.
2216 (handle_tracepoint_general_set): Adjust.
2218 2012-02-16 Yao Qi <yao@codesourcery.com>
2220 * inferiors.c: Move code to ...
2221 * dll.c: .... here. New.
2222 * server.h: Declare clear_dlls.
2223 * Makefile.in (SFILES): Add dll.c.
2227 2012-02-11 Yao Qi <yao@codesourcery.com>
2229 * server.c: (handle_monitor_command): Add a new parameter
2231 (handle_query): Update caller.
2233 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2235 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2236 * configure, config.in: Regenerate.
2237 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2240 2012-02-02 Pedro Alves <palves@redhat.com>
2242 Try SIGKILL first, then PTRACE_KILL.
2243 * linux-low.c (linux_kill_one_lwp): New.
2244 (linux_kill_one_lwp): Rename to ...
2245 (kill_one_lwp_callback): ... this. Use the new
2248 2012-02-02 Pedro Alves <palves@redhat.com>
2250 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2253 2012-01-27 Pedro Alves <palves@redhat.com>
2255 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2256 (elf_64_file_p): Make static.
2257 (linux_pid_exe_is_elf_64_file): New.
2258 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2259 Delete declarations.
2260 (linux_pid_exe_is_elf_64_file): Declare.
2261 * linux-x86-low.c (x86_arch_setup): Use
2262 linux_pid_exe_is_elf_64_file.
2264 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2266 * linux-low.c (linux_wait_for_event_1): Rename to ...
2267 (linux_wait_for_event): ... here and merge it with former
2268 linux_wait_for_event - new variable wait_ptid, use it.
2269 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2271 2012-01-23 Pedro Alves <palves@redhat.com>
2273 * server.c (main): Avoid yet another case of infinite loop while
2274 detaching/killing after a longjmp.
2276 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2279 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2281 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2283 * hostio.c (handle_readlink): New function.
2284 (handle_vFile): Call it to handle "vFile:readlink" packets.
2286 2012-01-20 Pedro Alves <palves@redhat.com>
2287 Ulrich Weigand <ulrich.weigand@linaro.org>
2289 * server.c (handle_v_requests): Only support vAttach and vRun to
2290 start multiple processes when in extended protocol mode.
2292 2012-01-17 Pedro Alves <palves@redhat.com>
2294 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2295 memalign plus mprotect to allocate the scratch buffer.
2297 2012-01-13 Pedro Alves <palves@redhat.com>
2299 * server.c (attach_inferior): Clear `cont_thread'.
2301 2012-01-13 Pedro Alves <palves@redhat.com>
2303 * server.c (main): Avoid infinite loop while detaching/killing
2306 2012-01-09 Doug Evans <dje@google.com>
2308 * server.c (start_inferior): Set last_ptid in --wrapper case.
2310 2012-01-06 Yao Qi <yao@codesourcery.com>
2312 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2314 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2316 2012-01-04 Yao Qi <yao@codesourcery.com>
2318 * tracepoint.c (cmd_qtdp): Print debug message
2319 for static tracepoint.
2321 2012-01-04 Yao Qi <yao@codesourcery.com>
2323 * tracepoint.c (trace_vdebug): Differentiate debug message
2324 between gdbserver and IPA.
2326 2012-01-03 Yao Qi <yao@codesourcery.com>
2328 * tracepoint.c (tracepoint_was_hit): Don't collect for
2331 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2333 * terminal.h: Reformat copyright header.
2335 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2337 * server.c (gdbserver_version): Update copyright year.
2338 * gdbreplay.c (gdbreplay_version): Likewise.
2340 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2342 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2345 2011-12-18 Hui Zhu <teawater@gmail.com>
2346 * linux-low.c (linux_create_inferior): Save return value to ret.
2348 2011-12-18 Hui Zhu <teawater@gmail.com>
2350 * linux-low.c (linux_create_inferior): Save return value to ret.
2352 2011-12-16 Doug Evans <dje@google.com>
2354 * linux-low.c (linux_create_inferior): If stdio connection,
2355 redirect stdin from /dev/null, stdout to stderr.
2356 * remote-utils.c (remote_is_stdio): New static global.
2357 (remote_connection_is_stdio): New function.
2358 (remote_prepare): Handle stdio connection.
2359 (remote_open): Ditto.
2360 (remote_close): Don't close stdin for stdio connections.
2361 (read_prim,write_prim): New functions. Replace all calls to
2362 read/write to these.
2363 * server.c (main): Watch for "-" argument. Move call to
2364 remote_prepare before start_inferior.
2365 * server.h (STDIO_CONNECTION_NAME): New macro.
2366 (remote_connection_is_stdio): Declare.
2368 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2369 in debugging output.
2371 2011-12-15 Yao Qi <yao@codesourcery.com>
2373 * tracepoint.c: Include sys/syscall.h.
2374 (gdb_ust_thread): Remove preprocessor conditional.
2376 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2378 * linux-low.c (linux_detach_one_lwp): Call
2379 the_low_target.prepare_to_resume before detaching.
2381 2011-12-14 Yao Qi <yao@codesourcery.com>
2383 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2386 2011-12-14 Yao Qi <yao@codesourcery.com>
2388 * i386-low.c (i386_low_stopped_data_address): Initialize local
2391 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2395 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2396 DR_CONTROL unless necessary. Extend comments.
2397 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2398 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2400 2011-12-13 Yao Qi <yao@codesourcery.com>
2402 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2404 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2406 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2408 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2409 Print new debug message for such case.
2411 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2413 Fix overlapping memcpy.
2414 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2415 the read_inferior_memory transfer.
2416 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2417 write_inferior_memory transfer.
2418 (set_fast_tracepoint_jump): New variable buf. Use it for the
2419 read_inferior_memory and write_inferior_memory transfers.
2420 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2421 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2422 Use it for the write_inferior_memory transfer.
2423 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2426 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2428 * linux-low.c (fetch_register, store_register): Make code
2429 consistent, fix formatting.
2431 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2433 * linux-low.c (usr_store_inferior_registers): Factor out code
2434 to handle individual registers into...
2435 (store_register): ... this new function.
2437 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2439 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2440 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2441 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2442 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2443 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2444 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2445 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2446 (srv_xmlfiles): Add new XML files.
2448 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2450 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2451 (init_registers_s390_linux32v1): Add prototype.
2452 (init_registers_s390_linux32v2): Likewise.
2453 (init_registers_s390_linux64v1): Likewise.
2454 (init_registers_s390_linux64v2): Likewise.
2455 (init_registers_s390x_linux64v1): Likewise.
2456 (init_registers_s390x_linux64v2): Likewise.
2457 (s390_num_regs): Increment to 52.
2458 (s390_regmap): Add orig_r2 register.
2459 (s390_num_regs_3264): Increment to 68.
2460 (s390_regmap_3264): Add orig_r2 register.
2461 (s390_collect_ptrace_register): Handle orig_r2 register.
2462 (s390_supply_ptrace_register): Likewise.
2463 (s390_fill_last_break): New function.
2464 (s390_store_last_break): Likewise.
2465 (s390_fill_system_call): New function.
2466 (s390_store_system_call): Likewise.
2467 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2469 (s390_check_regset): New function.
2470 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2471 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2472 Update target_regsets for available register sets.
2474 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2475 Jan Kratochvil <jan.kratochvil@redhat.com>
2477 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2478 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2480 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2481 * linux-low.h (struct process_info_private): New member r_debug.
2482 * server.c (handle_qxfer_libraries): Call
2483 the_target->qxfer_libraries_svr4.
2484 (handle_qxfer_libraries_svr4): New function.
2485 (qxfer_packets): New entry "libraries-svr4".
2486 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2487 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2488 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2489 PACKET_qXfer_libraries_svr4.
2491 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2493 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2494 PSW address/mask between 8-byte and 16-byte formats.
2495 (s390_supply_ptrace_register): Likewise.
2496 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2497 basic addressing mode bit.
2499 2011-11-24 Stan Shebs <stan@codesourcery.com>
2501 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2503 2011-11-17 Stan Shebs <stan@codesourcery.com>
2505 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2506 (tracing_start_time): New global.
2507 (tracing_stop_time): New global.
2508 (tracing_user_name): New global.
2509 (tracing_notes): New global.
2510 (tracing_stop_note): New global.
2511 (cmd_qtstart): Set traceframe_usage, start_time.
2512 (stop_tracing): Set stop_time.
2513 (cmd_qtstatus): Report additional status.
2514 (cmd_qtp): New function.
2515 (handle_tracepoint_query): Call it.
2516 (cmd_qtnotes): New function.
2517 (handle_tracepoint_general_set): Call it.
2518 (get_timestamp): Rename from tsv_get_timestamp.
2520 2011-11-14 Stan Shebs <stan@codesourcery.com>
2521 Kwok Cheung Yeung <kcy@codesourcery.com>
2523 * linux-x86-low.c (small_jump_insn): New.
2524 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2525 trampoline and error message, build a trampoline and issue a small
2526 jump instruction to it.
2527 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2528 trampoline and error message.
2529 (x86_get_min_fast_tracepoint_insn_len): New.
2530 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2531 * linux-low.h (struct linux_target_ops): Add arguments to
2532 install_fast_tracepoint_jump_pad operation, add new operation.
2533 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2535 (linux_get_min_fast_tracepoint_insn_len): New function.
2536 (linux_target_op): Add new operation.
2537 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2538 (gdb_trampoline_buffer_end): Ditto.
2539 (gdb_trampoline_buffer_error): Ditto.
2540 (struct ipa_sym_addresses): Add fields for new IPA variables.
2541 (symbol_list): Add entries for new IPA variables.
2542 (struct tracepoint): Add fields to hold the address range of the
2543 trampoline used by the tracepoint.
2544 (trampoline_buffer_head): New static variable.
2545 (trampoline_buffer_tail): Ditto.
2546 (claim_trampoline_space): New function.
2547 (have_fast_tracepoint_trampoline_buffer): New function.
2548 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2550 (install_fast_tracepoint): Ditto, also add error buffer argument.
2551 (cmd_qtminftpilen): New function.
2552 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2553 (fast_tracepoint_from_trampoline_address): New function.
2554 (fast_tracepoint_collecting): Handle trampoline as part of jump
2556 (set_trampoline_buffer_space): New function.
2557 (initialize_tracepoint): Initialize new IPA variables.
2558 * target.h (struct target_ops): Add arguments to
2559 install_fast_tracepoint_jump_pad operation, add new
2560 get_min_fast_tracepoint_insn_len operation.
2561 (target_get_min_fast_tracepoint_insn_len): New.
2562 (install_fast_tracepoint_jump_pad): Add arguments.
2563 * server.h (IPA_BUFSIZ): Define.
2564 * linux-i386-ipa.c: Include extra header files.
2565 (initialize_fast_tracepoint_trampoline_buffer): New function.
2566 (initialize_low_tracepoint): Call it.
2567 * server.h (set_trampoline_buffer_space): Declare.
2568 (claim_trampoline_space): Ditto.
2569 (have_fast_tracepoint_trampoline_buffer): Ditto.
2571 2011-11-14 Yao Qi <yao@codesourcery.com>
2573 * server.c (handle_query): Handle InstallInTrace for qSupported.
2574 * tracepoint.c (add_tracepoint): Sort list.
2575 (install_tracepoint, download_tracepoint): New.
2576 (cmd_qtdp): Call them to install and download tracepoints.
2577 (sort_tracepoints): Removed.
2578 (cmd_qtstart): Update.
2580 2011-11-14 Yao Qi <yao@codesourcery.com>
2582 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2583 * mem-break.h: Declare.
2584 * tracepoint.c (cmd_qtstart): Move some code to ...
2585 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2587 (download_tracepoints): Move some code to ...
2588 (download_tracepoint_1): ... here. New.
2590 2011-11-08 Yao Qi <yao@codesourcery.com>
2592 * remote-utils.c (relocate_instruction): A comment fix.
2594 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2596 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2597 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2598 dr_status_mirror and dr_control_mirror from debug_reg_state.
2599 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2600 (i386_initial_stuff): Remove use of deleted globals.
2601 (i386_get_thread_context, i386_set_thread_context,
2602 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2603 from debug_reg_state.
2605 2011-11-05 Yao Qi <yao@codesourcery.com>
2607 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2608 address as TPOINT's.
2610 2011-11-02 Stan Shebs <stan@codesourcery.com>
2612 * tracepoint.c (agent_mem_read_string): New function.
2613 (eval_agent_expr): Call it for tracenz.
2614 * server.c (handle_query): Report support for tracenz.
2616 2011-11-02 Yao Qi <yao@codesourcery.com>
2618 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2620 2011-11-02 Yao Qi <yao@codesourcery.com>
2622 * target.h: Fix a typo in comment.
2624 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2626 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2627 clobber the breakpoints' shadows with fast tracepoint jumps.
2628 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2629 * target.c (write_inferior_memory): Also pass MYADDR down to
2632 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2634 * configure.ac: Check support for personality routine.
2635 * configure: Regenerate.
2636 * config.in: Likewise.
2637 * linux-low.c: Include <sys/personality.h>.
2638 Define ADDR_NO_RANDOMIZE if necessary.
2639 (linux_create_inferior): Disable address space randomization when
2640 forking inferior, if requested.
2641 (linux_supports_disable_randomization): New function.
2642 (linux_target_ops): Install it.
2643 * server.h (disable_randomization): Declare.
2644 * server.c (disable_randomization): New global variable.
2645 (handle_general_set): Handle QDisableRandomization.
2646 (handle_query): Likewise for qSupported.
2647 (main): Support --disable-randomization and --no-disable-randomization
2648 command line arguments.
2649 * target.h (struct target_ops): Add supports_disable_randomization.
2650 (target_supports_disable_randomization): New macro.
2652 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2654 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2656 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2657 [!PT_GETDSBT] (target_loadmap): New definition.
2658 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2659 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2660 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2661 and PT_GETDSBT to LINUX_LOADMAP.
2662 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2663 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2665 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2667 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2668 (arm_linux_hwbp_cap): New static variable.
2669 (arm_linux_get_hwbp_cap): Replace by ...
2670 (arm_linux_init_hwbp_cap): ... this new function.
2671 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2672 (arm_linux_get_hw_watchpoint_count): Likewise.
2673 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2674 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2675 (arm_prepare_to_resume): Use perror_with_name instead of error.
2677 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2679 * linux-arm-low.c: Include <signal.h>.
2680 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2681 (struct arm_linux_hwbp_cap): New data type.
2682 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2683 (struct arm_linux_hw_breakpoint): New data type.
2684 (MAX_BPTS, MAX_WPTS): Define.
2685 (struct arch_process_info, struct arch_lwp_info): New data types.
2686 (arm_linux_get_hwbp_cap): New function.
2687 (arm_linux_get_hw_breakpoint_count): Likewise.
2688 (arm_linux_get_hw_watchpoint_count): Likewise.
2689 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2690 (arm_hwbp_control_initialize): Likewise.
2691 (arm_hwbp_control_is_enabled): Likewise.
2692 (arm_hwbp_control_is_initialized): Likewise.
2693 (arm_hwbp_control_disable): Likewise.
2694 (arm_linux_hw_breakpoint_equal): Likewise.
2695 (arm_linux_hw_point_initialize): Likewise.
2696 (struct update_registers_data): New data structure.
2697 (update_registers_callback: New function.
2698 (arm_insert_point): Likewise.
2699 (arm_remove_point): Likewise.
2700 (arm_stopped_by_watchpoint): Likewise.
2701 (arm_stopped_data_address): Likewise.
2702 (arm_new_process): Likewise.
2703 (arm_new_thread): Likewise.
2704 (arm_prepare_to_resume): Likewise.
2705 (the_low_target): Register arm_insert_point, arm_remove_point,
2706 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2707 arm_new_thread, and arm_prepare_to_resume.
2709 2011-09-15 Stan Shebs <stan@codesourcery.com>
2711 * server.h (struct emit_ops): Add compare-goto fields.
2712 * tracepoint.c (gdb_agent_op_sizes): New table.
2713 (emit_eq_goto): New function.
2714 (emit_ne_goto): New function.
2715 (emit_lt_goto): New function.
2716 (emit_le_goto): New function.
2717 (emit_gt_goto): New function.
2718 (emit_ge_goto): New function.
2719 (is_goto_target): New function.
2720 (compile_bytecodes): Recognize special cases of compare-goto
2721 combinations and call specialized emitters for them.
2722 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2723 (amd64_emit_ne_goto): New function.
2724 (amd64_emit_lt_goto): New function.
2725 (amd64_emit_le_goto): New function.
2726 (amd64_emit_gt_goto): New function.
2727 (amd64_emit_ge_goto): New function.
2728 (amd64_emit_ops): Add the new functions.
2729 (i386_emit_eq_goto): New function.
2730 (i386_emit_ne_goto): New function.
2731 (i386_emit_lt_goto): New function.
2732 (i386_emit_le_goto): New function.
2733 (i386_emit_gt_goto): New function.
2734 (i386_emit_ge_goto): New function.
2735 (i386_emit_ops): Add the new functions.
2737 2011-09-08 Stan Shebs <stan@codesourcery.com>
2739 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2740 (i386_emit_epilogue): Restore %ebx.
2742 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2744 * server.c (step_thread): Remove definition.
2745 (process_serial_event): Don't handle Hs.
2746 * server.h (step_thread): Remove declaration.
2747 * target.c (set_desired_inferior): Remove use of step_thread.
2749 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2751 * linux-low.c: Include linux-procfs.h.
2752 (linux_attach_lwp_1): Update comments.
2753 (linux_attach): Scan for existing threads when attaching to a
2754 process that is the tgid.
2755 * Makefile.in: Update dependencies.
2757 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2759 * configure.srv: Add linux-procfs.o dependencies.
2761 2011-08-14 Yao Qi <yao@codesourcery.com>
2763 * target.h (struct target_ops): Fix indent.
2764 * win32-low.c (win32_target_ops): Fix comment.
2766 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2767 Yao Qi <yao@codesourcery.com>
2769 * Makefile.in (clean): Remove tic6x-*.c files.
2770 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2771 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2772 (tic6x-c64xp-linux.c): Likewise.
2773 * configure.srv: Add support for tic6x-*-uclinux.
2774 * linux-tic6x-low.c: New.
2775 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2777 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2778 Yao Qi <yao@codesourcery.com>
2780 * target.h (struct target_ops): Add read_loadmap.
2781 * linux-low.c (struct target_loadseg): New type.
2782 (struct target_loadmap): New type.
2783 (linux_read_loadmap): New function.
2784 (linux_target_ops): Add linux_read_loadmap.
2785 * server.c (handle_query): Support qXfer:fdpic:read packet.
2786 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2789 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2791 * win32-low.c: Include <stdint.h>.
2793 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2795 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2796 to the inferior here.
2797 (i386_remove_aligned_watchpoint): Ditto.
2798 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2799 fit part of the watchpoint in the debug registers.
2800 (i386_update_inferior_debug_regs): New.
2801 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2802 registers, and only update the inferior on success.
2803 (i386_low_remove_watchpoint): Ditto.
2805 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2807 * linux-low.c (compare_ints, unique, list_threads, show_process,
2808 linux_core_of_thread): Delete.
2809 (linux_target_ops): Change linux_core_of_thread to
2810 linux_common_core_of_thread.
2811 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2812 * utils.c (malloc_failure): Change type of argument.
2813 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2814 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2815 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2816 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2817 (IPA_OBJS): Add common-utils-ipa.o.
2818 (ptid_h, linux_osdata_h): New macros.
2819 (server_h): Add common/common-utils.h, common/xml-utils.h,
2820 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2822 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2823 ptid.o, buffer.o): New rules.
2824 (linux-low.o): Add common/linux-osdata.h as a dependency.
2825 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2826 * configure.ac: Add AC_HEADER_DIRENT check.
2827 * config.in: Regenerate.
2828 * configure: Regenerate.
2829 * remote-utils.c (xml_escape_text): Delete.
2830 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2831 buffer_xml_printf): Move to common/buffer.c.
2832 * server.c (main): Remove call to initialize_inferiors.
2833 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2834 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2835 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2836 internal_error, gdb_assert, gdb_assert_fail): Delete.
2837 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2838 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2840 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2841 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2842 initialize_inferiors): Delete.
2844 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2846 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2849 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2851 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2853 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2855 2011-05-26 Yao Qi <yao@codesourcery.com>
2857 * Makefile.in (thread-db.o): Track dependence to
2858 common/gdb_thread_db.h.
2859 * thread-db.c: include gdb_thread_db.h from right place.
2861 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2863 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2864 __FILE__ and __LINE__ to internal_error.
2866 2011-05-13 Doug Evans <dje@google.com>
2868 * thread-db.c (try_thread_db_load_from_sdir): New function.
2869 (try_thread_db_load_from_dir): New function.
2870 (thread_db_load_search): Handle $sdir, ignore $pdir.
2871 Remove trying of system directories if search of
2872 libthread-db-search-path fails, that is now done via $sdir.
2874 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2876 * server.c (handle_query): Add EnableDisableTracepoints to the list
2877 of supported features.
2878 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2880 (cmd_qtenable_disable): New.
2881 (cmd_qtstart): Install tracepoints even if disabled.
2882 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2883 receiving a QTEnable or QTDisable packet.
2884 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2885 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2887 (gdb_probe): Skip data collection if static tracepoint is disabled.
2889 2011-05-10 Doug Evans <dje@google.com>
2891 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2893 2011-05-04 Doug Evans <dje@google.com>
2895 * linux-low.c (linux_join): Skip process lookup.
2896 * spu-low.c (spu_join): Ditto.
2897 * server.c (join_inferiors_callback): Delete.
2898 (process_serial_event): For 'D' packet (detach) call join_inferior
2901 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2903 * README: Don't mention xscale*-*-linux*.
2904 * configure.srv (xscale*-*-linux*): Don't handle target.
2906 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2908 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2910 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2911 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2912 (i386_emit_void_call_2): Likewise.
2914 2011-04-26 Yao Qi <yao@codesourcery.com>
2916 * linux-low.c: Move common macros to linux-ptrace.h.
2917 Include linux-ptrace.h.
2918 * Makefile.in (linux_ptrace_h): New.
2919 (linux-low.o): Depends on linux-ptrace.h.
2921 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2923 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2924 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2925 (remote_prepare): New function with most of the TCP code from ...
2926 (remote_open): ... here. Detect PORT here unconditionally. Move also
2927 setting transport_is_reliable.
2928 * server.c (run_once): New variable.
2929 (gdbserver_usage): Document it.
2930 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2931 the first run if RUN_ONCE.
2932 * server.h (run_once, remote_prepare): New declarations.
2934 2011-04-19 Tom Tromey <tromey@redhat.com>
2936 * win32-low.c (handle_load_dll): Remove duplicate "the".
2938 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2940 Remove support for old Cygwin 1.5 versions.
2941 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2942 function to avoid warning.
2943 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2946 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2948 * gdbserver/server.h (Macro _): Define it if not available.
2950 2011-03-14 Michael Snyder <msnyder@vmware.com>
2952 * hostio.c (handle_close): Remove unnecessary null test.
2954 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2956 * Makefile.in (maintainer-clean realclean distclean): Remove
2957 "make ... subdir_do" command.
2959 2011-03-10 Michael Snyder <msnyder@vmware.com>
2961 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2963 * server.c (handle_v_run): Free alloced buffer on early return.
2965 2011-03-09 Yao Qi <yao@codesourcery.com>
2968 2011-03-04 Yao Qi <yao@codesourcery.com>
2970 * Makefile.in: Remove GNU make feature --directory.
2972 2011-03-05 Yao Qi <yao@codesourcery.com>
2974 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2975 (subdir_do): New make target. Copied from gdb/Makefile.
2976 (maintainer-clean, realclean, distclean, clean): Call corresponding
2977 make targets in common/Makefile.
2979 2011-02-11 Yao Qi <yao@codesourcery.com>
2981 * configure.ac: Call AC_PROG_RANLIB.
2982 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2983 * configure: Regenerate.
2985 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2987 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2989 2011-03-06 Yao Qi <yao@codesourcery.com>
2991 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2993 2011-03-05 Yao Qi <yao@codesourcery.com>
2995 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2996 (subdir_do): New make target. Copied from gdb/Makefile.
2997 (maintainer-clean, realclean, distclean, clean): Call corresponding
2998 make targets in common/Makefile.
3000 2011-03-04 Yao Qi <yao@codesourcery.com>
3002 * Makefile.in: Remove GNU make feature --directory.
3004 2011-03-04 Michael Snyder <msnyder@vmware.com>
3006 * server.c (queue_stop_reply): Call xmalloc not malloc.
3008 2011-03-02 Michael Snyder <msnyder@vmware.com>
3010 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3012 2011-02-28 Michael Snyder <msnyder@vmware.com>
3014 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3015 (cmd_qtframe): Ditto.
3016 (cmd_qtbuffer): Ditto.
3017 (cmd_bigqtbuffer): Ditto.
3019 * utils.c (decimal2str): Initialize 'width' to nine, then
3022 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3024 * hostio.c (require_data): Free *data, not data.
3026 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3028 * hostio.c (require_data): Use free, not xfree.
3030 2011-02-27 Michael Snyder <msnyder@vmware.com>
3032 * server.c (handle_query): Discard unused value.
3034 * hostio.c (require_data): Free malloc memory before returning
3037 2011-02-26 Michael Snyder <msnyder@vmware.com>
3039 * linux-low.c (list_threads): Call closedir for dirent.
3041 2011-02-27 Michael Snyder <msnyder@vmware.com>
3043 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3044 a case statement falls through.
3046 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3048 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3051 2011-02-26 Michael Snyder <msnyder@vmware.com>
3053 * utils.c (decimal2str): Eliminate dead code and dead param.
3054 (pulongest): Drop dead param from call to decimal2str.
3057 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3059 Revert the following patch (not approved yet):
3060 2011-02-21 Hui Zhu <teawater@gmail.com>
3061 * tracepoint.c (tp_printf): New function.
3062 (eval_agent_expr): Handle gdb_agent_op_printf.
3064 2011-02-21 Hui Zhu <teawater@gmail.com>
3066 * tracepoint.c (tp_printf): New function.
3067 (eval_agent_expr): Handle gdb_agent_op_printf.
3069 2011-02-18 Tom Tromey <tromey@redhat.com>
3071 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3072 (tracepoint.o): Likewise.
3073 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3074 (gdb_agent_op_names): Likewise.
3076 2011-02-18 Tom Tromey <tromey@redhat.com>
3078 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3079 gdb_agent_op_rot>: New constants.
3080 (gdb_agent_op_names): Add pick and roll.
3081 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3084 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3086 * aclocal.m4: Regenerated with aclocal-1.11.1.
3088 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3090 * server.c (handle_qxfer_traceframe_info): New.
3091 (qxfer_packets): Register "traceframe-info".
3092 (handle_query): Report support for qXfer:traceframe-info:read+.
3093 * tracepoint.c (match_blocktype): New.
3094 (traceframe_find_block_type): Rename to ...
3095 (traceframe_walk_blocks): ... this. Add callback filter argument,
3097 (traceframe_find_block_type): New, reimplemented on top of
3098 traceframe_walk_blocks.
3099 (build_traceframe_info_xml): New.
3100 (traceframe_read_info): New.
3101 * server.h (traceframe_read_info): Declare.
3103 2011-02-11 Yao Qi <yao@codesourcery.com>
3105 * configure.ac: Call AC_PROG_RANLIB.
3106 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3107 * configure: Regenerate.
3109 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3111 * server.c (gdb_read_memory): Change return semantics to allow
3113 (handle_search_memory_1): Adjust.
3114 (process_serial_event) <'m' packet>: Handle partial transfers.
3115 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3117 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3119 * regcache.c (init_register_cache): Initialize
3120 regcache->register_status.
3121 (free_register_cache): Release regcache->register_status.
3122 (regcache_cpy): Copy register_status.
3123 (registers_to_string): Print 'x's for unavailable registers.
3124 (supply_register): Mark the register's status valid or
3125 unavailable, depending on whether a buffer was passed in or not.
3126 (supply_register_zeroed): New.
3127 (supply_regblock): Mark the registers' status valid or
3128 unavailable, depending on whether a buffer was passed in or not.
3129 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3130 (struct regcache): New `register_status' field.
3131 (supply_register_zeroed): Declare.
3132 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3133 supply_register_zeroed, rather than passing a NULL buffer to
3135 * tracepoint.c (fetch_traceframe_registers): Update comment.
3137 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3139 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3142 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3144 * server.h (decode_xfer_write): Change prototype.
3145 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3146 and don't extract the annex here.
3147 * server.c (decode_xfer_read): Remove `annex' parameter,
3148 and don't extract the annex here.
3150 (struct qxfer): New.
3151 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3152 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3153 (handle_qxfer_statictrace): New functions, abstracted out from
3154 handle_query, and made to use the struct qxfer interface.
3155 (handle_threads_qxfer_proper): Rename to ...
3156 (handle_qxfer_threads_proper): ... this.
3157 (handle_threads_qxfer): Rename to ...
3158 (handle_qxfer_threads): ... this. Adjust.
3159 (qxfer_packets): New array.
3160 (handle_qxfer): New function.
3161 (handle_query): Use handle_qxfer.
3163 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3165 * gdbreplay.c: Shorten lines of >= 80 columns.
3166 * linux-low.c: Ditto.
3167 * linux-ppc-low.c: Ditto.
3168 * linux-s390-low.c: Ditto.
3169 * linux-sparc-low.c: Ditto.
3170 * linux-x86-low.c: Ditto.
3171 * linux-xtensa-low.c: Ditto.
3172 * mem-break.c: Ditto.
3174 * regcache.h: Ditto.
3175 * remote-utils.c: Ditto.
3178 * thread-db.c: Ditto.
3179 * tracepoint.c: Ditto.
3181 * win32-low.h: Ditto.
3183 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3185 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3188 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3190 * server.c (gdbserver_version): Update copyright year in version
3192 * gdbreplay.c (gdbreplay_version): Ditto.
3194 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3196 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3197 * linux-bfin-low.c: New file.
3198 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3199 PT_DATA_ADDR for BFIN targets.
3200 * Makefile.in (SFILES): Add linux-bfin-low.c.
3201 (clean): Remove reg-bfin.c.
3202 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3203 * README: Mention supported Blackfin targets.
3205 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3207 * .gitignore: New file.
3209 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3211 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3213 2010-10-22 Jie Zhang <jie@codesourcery.com>
3215 * Makefile.in: Add FLAGS_TO_PASS variable.
3216 (install): Remove dependency of install-only and recursively
3217 invoke make for install-only.
3219 2010-10-04 Doug Evans <dje@google.com>
3221 * Makefile.in (uninstall): Use $(DESTDIR).
3223 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3227 * linux-x86-low.c (compat_siginfo_from_siginfo)
3228 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3229 si_code is < 0. Check for si_code == SI_TIMER before checking for
3232 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3234 * lynx-i386-low.c: New file.
3235 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3237 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3239 * lynx-low.c (ptrace_request_to_str): Remove handling for
3240 request values that have been removed in LynxOS 5.x.
3242 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3244 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3247 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3249 * configure.ac: Add --enable-inprocess-agent option.
3250 * configure: Rebuilt.
3252 2010-09-06 Yao Qi <yao@codesourcery.com>
3254 * linux-low.c (linux_kill): Remove unused variable.
3255 (linux_stabilize_threads): Likewise.
3256 * server.c (start_inferior): Likewise.
3257 (queue_stop_reply_callback): Likewise.
3258 * tracepoint.c (do_action_at_tracepoint): Likewise.
3260 2010-09-06 Yao Qi <yao@codesourcery.com>
3262 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3265 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3267 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3269 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3271 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3274 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3276 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3277 gdbserver/lynx-ppc-low.c: New files.
3278 * Makefile.in (lynx_low_h): New variable.
3279 (lynx-low.o, lynx-ppc-low.o): New rules.
3280 * configure.ac: On LynxOS, link with -lnetinet.
3281 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3282 * configure: regenerate.
3284 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3286 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3287 * configure.ac: Add check for vasprintf and vsnprintf.
3288 * configure, config.in: Regenerate.
3289 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3291 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3293 * gdbreplay.c: Move include of alloca.h up, next to include of
3295 * server.h: Add include of malloc.h.
3296 * mem-break.c: Remove include of malloc.h.
3297 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3299 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3301 * Makefile.in (memmem.o): Build with -Wno-error.
3303 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3305 * utils.c (xsnprintf): Make non-static.
3306 * server.h: Add xsnprintf declaration.
3307 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3308 replace calls to snprintf by calls to xsnprintf throughout.
3310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3312 * configure.ac: Add configure check for alloca.
3313 * configure, config.in: Regenerate.
3314 * server.h: Include alloca.h if it exists.
3315 * gdbreplay.c: Include alloca.h if it exists.
3317 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3319 * linux-low.c (__SIGRTMIN): Define if not already defined.
3320 (linux_create_inferior): Check for __ANDROID__ rather than
3322 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3323 are already deferred.
3324 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3325 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3326 stopped and already has a pending signal to report.
3327 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3328 a pending signal to report or is moving out of a jump pad.
3329 (linux_init_signals): Check for __ANDROID__ rather than
3332 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3334 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3335 debug_threads check. Avoid a linear search when not doing debug
3338 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3340 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3341 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3342 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3343 (process_event): Change local fd's type to gdb_fildes_t.
3344 (create_file_handler): Adjust prototype.
3345 (delete_file_handler): Adjust prototype.
3346 (handle_file_event): Adjust prototype. Use pfildes.
3347 (create_file_event): Adjsut prototype.
3348 * remote-utils.c (remote_desc, listen_desc): Change type to
3350 * server.h: New gdb_fildes_t typedef.
3351 [USE_WIN32API]: Include winsock2.h.
3352 (delete_file_handler, add_file_handler): Adjust prototypes.
3354 * utils.c (pfildes): New.
3356 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3358 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3359 * configure: Regenerate.
3361 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3363 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3364 (linux_done_accessing_memory): ... this.
3365 (linux_target_ops): Adjust.
3366 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3367 * nto-low.c (nto_target_ops): Adjust comment.
3368 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3369 * spu-low.c (spu_target_ops): Adjust comment.
3370 * target.h (target_ops): Rename unprepare_to_access_memory field
3371 to done_accessing_memory.
3372 (unprepare_to_access_memory): Rename to ...
3373 (done_accessing_memory): ... this.
3375 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3377 * linux-low.c (linux_prepare_to_access_memory): New.
3378 (linux_unprepare_to_access_memory): New.
3379 (linux_target_ops): Install them.
3380 * server.c (read_memory): Rename to ...
3381 (gdb_read_memory): ... this. Use
3382 prepare_to_access_memory/prepare_to_access_memory.
3383 (write_memory): Rename to ...
3384 (gdb_write_memory): ... this. Use
3385 prepare_to_access_memory/prepare_to_access_memory.
3386 (handle_search_memory_1): Adjust.
3387 (process_serial_event): Adjust.
3388 * target.h (struct target_ops): New fields
3389 prepare_to_access_memory and unprepare_to_access_memory.
3390 (prepare_to_access_memory, unprepare_to_access_memory): New.
3391 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3392 prepare_to_access_memory/prepare_to_access_memory.
3393 * nto-low.c (nto_target_ops): Adjust.
3394 * spu-low.c (spu_target_ops): Adjust.
3395 * win32-low.c (win32_target_ops): Adjust.
3397 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3399 * Makefile.in (WARN_CFLAGS): Get it from configure.
3400 (WERROR_CFLAGS): New.
3401 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3402 * configure.ac: Introduce --enable-werror, which adds -Werror to
3403 the compiler command line. Enabled by default. Disable with
3404 --disable-werror. Add -Wdeclaration-after-statement
3405 Wpointer-arith and -Wformat-nonliteral to warning flags.
3406 * configure: Regenerate.
3408 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3410 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3412 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3414 * gdbreplay.c (remote_error): New.
3416 (expect): Use gdbchar. Check for error reading from GDB.
3417 Clarify sync error output.
3418 (play): Check for errors writing to GDB.
3419 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3420 * remote-utils.c (getpkt): Check for errors writing to the remote
3423 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3425 * linux-low.c (linux_wait_1): Move non-debugging code out of
3426 `debug_threads' control.
3428 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3430 * linux-low.c (linux_wait_1): Don't set last_status here.
3431 * server.c (push_event, queue_stop_reply_callback): Assert we're
3432 not pushing a TARGET_WAITKIND_IGNORE event.
3433 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3434 (myresume, handle_target_event): Set the thread's last_resume_kind
3435 and last_status from the target returned status.
3437 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3441 * linux-x86-low.c (update_debug_registers_callback): New.
3442 (i386_dr_low_set_addr): Use it.
3443 (i386_dr_low_get_addr): New.
3444 (i386_dr_low_set_control): Use update_debug_registers_callback.
3445 (i386_dr_low_get_control): New.
3446 (i386_dr_low_get_status): Adjust.
3447 * linux-low.c (linux_stop_lwp): New.
3448 * linux-low.h (linux_stop_lwp): Declare.
3450 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3451 argument instead of a i386_debug_reg_state.
3452 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3453 a i386_debug_reg_state.
3454 (i386_insert_aligned_watchpoint): Adjust.
3455 (i386_remove_aligned_watchpoint): Adjust.
3456 (i386_low_stopped_data_address): Read the debug registers from the
3457 inferior instead of from the mirrors.
3458 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3459 (i386_dr_low_get_addr): Declare.
3460 (i386_dr_low_get_control): Declare.
3461 (i386_dr_low_get_status): Change prototype.
3463 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3464 (i386_dr_low_get_addr): New.
3465 (i386_dr_low_get_control): New.
3466 (i386_dr_low_get_status): Adjust prototype. Return
3468 (i386_initial_stuff): Clear dr_status_mirror and
3470 (i386_get_thread_context): Adjust.
3471 (i386_set_thread_context): Adjust.
3472 (i386_thread_added): Adjust.
3474 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3476 * linux-low.h (linux_thread_area): Delete declaration.
3478 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3480 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3481 after its termination.
3483 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3485 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3486 (gdb_wants_all_stopped): Delete.
3487 (linux_wait_1): Don't call them.
3488 * server.c (handle_v_cont): Tag all threads as want-stopped.
3489 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3490 stopped as "client-wants-stopped".
3492 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3494 * Makefile.in (signals_h): New.
3495 (server_h): Depend on it.
3496 (server.o): Don't depend on $(signals_def).
3497 (signals.o): Depend on $(signals_def).
3499 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3501 * Makefile.in (signals_def): New.
3502 (server_h): Append include/gdb/signals.h and signals_def.
3503 (server.o): Append signals_def.
3505 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3507 * server.c (handle_target_event): Use target_signal_to_host for
3508 resume_info.sig initialization.
3509 * target.h (struct thread_resume) <sig>: New comment.
3511 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3513 * server.c (handle_query): strcpy() the returned string from paddress()
3514 instead of sprintf().
3515 * utils.c (paddress): Return phex_nz().
3517 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3519 * server.c (handle_v_cont): Call mourn_inferior if process
3521 (myresume): Likewise.
3523 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3525 Static tracepoints, and integration with UST.
3527 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3528 * mem-break.c (uninsert_all_breakpoints)
3529 (reinsert_all_breakpoints): New.
3530 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3531 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3532 (gdb_agent_ust_loaded, helper_thread_id)
3533 (gdb_agent_helper_thread_id): New macros.
3534 (struct ipa_sym_addresses): Add addr_ust_loaded,
3535 addr_helper_thread_id, addr_cmd_buf.
3536 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3537 (in_process_agent_loaded_ust): New.
3538 (write_e_ust_not_loaded): New.
3539 (maybe_write_ipa_ust_not_loaded): New.
3540 (struct collect_static_trace_data_action): New.
3541 (enum tracepoint_type) <static_tracepoint>: New.
3542 (struct tracepoint) <handle>: Mention static tracepoints.
3543 (struct static_tracepoint_ctx): New.
3544 (CMD_BUF_SIZE): New.
3545 (add_tracepoint_action): Handle static tracepoint actions.
3546 (unprobe_marker_at): New.
3547 (clear_installed_tracepoints): Handle static tracepoints.
3548 (cmd_qtdp): Handle static tracepoints.
3549 (probe_marker_at): New.
3550 (cmd_qtstart): Handle static tracepoints.
3551 (response_tracepoint): Handle static tracepoints.
3552 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3553 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3554 (get_context_regcache): Handle static tracepoints.
3555 (do_action_at_tracepoint): Handle static tracepoint actions.
3556 (traceframe_find_block_type): Handle static trace data blocks.
3557 (traceframe_read_sdata): New.
3558 (download_tracepoints): Download static tracepoint actions.
3559 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3560 (GDB_PROBE_NAME): New.
3565 (ust_marker_to_static_tracepoint): New.
3567 (collect_ust_data_at_tracepoint): New.
3568 (gdb_ust_probe): New.
3569 (UNIX_PATH_MAX, SOCK_DIR): New.
3570 (gdb_ust_connect_sync_socket): New.
3571 (resume_thread, stop_thread): New.
3572 (run_inferior_command): New.
3573 (init_named_socket): New.
3574 (gdb_ust_socket_init): New.
3575 (cstr_to_hexstr): New.
3577 (first_marker, next_marker): New.
3578 (response_ust_marker): New.
3579 (cmd_qtfstm, cmd_qtsstm): New.
3580 (unprobe_marker_at, probe_marker_at): New.
3581 (cmd_qtstmat, gdb_ust_thread): New.
3582 (gdb_ust_init): New.
3583 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3584 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3586 (x86_64_st_collect_regmap): New.
3587 (X86_64_NUM_ST_COLLECT_GREGS): New.
3588 (AMD64_RIP_REGNUM): New.
3589 (supply_static_tracepoint_registers): New.
3590 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3592 (i386_st_collect_regmap): New.
3593 (i386_NUM_ST_COLLECT_GREGS): New.
3594 (supply_static_tracepoint_registers): New.
3595 * server.c (handle_query): Handle qXfer:statictrace:read.
3596 <qSupported>: Report support for StaticTracepoints, and
3597 qXfer:statictrace:read features.
3598 * server.h (traceframe_read_sdata)
3599 (supply_static_tracepoint_registers): Declare.
3600 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3601 (unpack_varlen_hex): Include in IPA build.
3602 * Makefile.in (ustlibs, ustinc): New.
3603 (IPA_OBJS): Add remote-utils-ipa.o.
3604 ($(IPA_LIB)): Link -ldl and -lpthread.
3606 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3607 * config.in, configure: Regenerate.
3609 2010-06-20 Ian Lance Taylor <iant@google.com>
3610 Pedro Alves <pedro@codesourcery.com>
3612 * linux-x86-low.c (always_true): Delete.
3613 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3614 trying to fool the compiler with always_true.
3616 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3618 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3619 conditions in gdbserver.
3621 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3623 * spu-low.c (spu_read_memory): Wrap around local store limit.
3624 (spu_write_memory): Likewise.
3626 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3628 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3629 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3631 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3633 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3634 uses with LONGEST uses.
3636 2010-06-14 Stan Shebs <stan@codesourcery.com>
3637 Pedro Alves <pedro@codesourcery.com>
3641 * linux-x86-low.c: Include limits.h.
3646 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3647 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3648 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3649 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3650 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3651 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3652 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3653 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3654 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3655 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3656 (amd64_emit_void_call_2): New.
3657 (amd64_emit_ops): New.
3658 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3659 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3660 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3661 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3662 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3663 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3664 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3665 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3666 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3667 (i386_emit_stack_adjust, i386_emit_int_call_1)
3668 (i386_emit_void_call_2): New.
3669 (i386_emit_ops): New.
3670 (x86_emit_ops): New.
3671 (the_low_target): Install x86_emit_ops.
3672 * server.h (struct emit_ops): New.
3673 (get_raw_reg_func_addr): Declare.
3674 (current_insn_ptr, emit_error): Declare.
3675 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3676 (set_trace_state_variable_value): New defines.
3677 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3678 addr_get_trace_state_variable_value and
3679 addr_set_trace_state_variable_value.
3680 (symbol_list): New fields for get_raw_reg,
3681 get_trace_state_variable_value and set_trace_state_variable_value.
3682 (condfn): New typedef.
3683 (struct tracepoint): New field `compiled_cond'.
3684 (do_action_at_tracepoint): Clear compiled_cond.
3685 (get_trace_state_variable_value, set_trace_state_variable_value):
3687 (condition_true_at_tracepoint): If there's a compiled condition,
3689 (current_insn_ptr, emit_error): New globals.
3690 (struct bytecode_address): New.
3691 (get_raw_reg_func_addr): New.
3692 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3693 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3694 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3695 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3696 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3697 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3698 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3699 (compile_tracepoint_condition, compile_bytecodes): New.
3700 * target.h (emit_ops): Forward declare.
3701 (struct target_ops): New field emit_ops.
3702 (target_emit_ops): New.
3703 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3704 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3705 * linux-low.c (linux_emit_ops): New.
3706 (linux_target_ops): Install it.
3707 * linux-low.h (struct linux_target_ops): New field emit_ops.
3709 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3711 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3712 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3714 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3715 Stan Shebs <stan@codesourcery.com>
3717 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3718 (all): Depend on $(extra_libraries).
3719 (install-only): Install the IPA.
3720 (IPA_OBJS, IPA_LIB): New.
3721 (clean): Remove the IPA lib.
3722 (IPAGENT_CFLAGS): New.
3723 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3724 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3725 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3726 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3727 * configure.ac: Check for atomic builtins support in the compiler.
3728 (IPA_DEPFILES, extra_libraries): Define.
3729 * configure.srv (ipa_obj): Add description.
3730 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3731 (i[34567]86-*-linux*): Set ipa_obj.
3732 (x86_64-*-linux*): Set ipa_obj.
3733 * linux-low.c (stabilizing_threads): New.
3734 (supports_fast_tracepoints): New.
3735 (linux_detach): Stabilize threads before detaching.
3736 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3737 the lwp is either not stabilizing, or is moving out of a jump pad.
3738 (linux_fast_tracepoint_collecting): New.
3739 (maybe_move_out_of_jump_pad): New.
3740 (enqueue_one_deferred_signal): New.
3741 (dequeue_one_deferred_signal): New.
3742 (linux_wait_for_event_1): If moving out of a jump pad, defer
3743 pending signals to later.
3744 (linux_stabilize_threads): New.
3745 (linux_wait_1): Check if threads need moving out of jump pads, and
3747 (stuck_in_jump_pad_callback): New.
3748 (move_out_of_jump_pad_callback): New.
3750 (linux_resume_one_lwp): Handle moving out of jump pads.
3751 (linux_set_resume_request): Dequeue deferred signals.
3752 (need_step_over_p): Also step over fast tracepoint jumps.
3753 (start_step_over): Also uninsert fast tracepoint jumps.
3754 (finish_step_over): Also reinsert fast tracepoint jumps.
3755 (linux_install_fast_tracepoint_jump): New.
3756 (linux_target_ops): Install linux_stabilize_threads and
3757 linux_install_fast_tracepoint_jump_pad.
3758 * linux-low.h (linux_target_ops) <get_thread_area,
3759 install_fast_tracepoint_jump_pad>: New fields.
3760 (struct lwp_info) <collecting_fast_tracepoint,
3761 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3762 (linux_get_thread_area): Declare.
3763 * linux-x86-low.c (jump_insn): New.
3764 (x86_get_thread_area): New.
3765 (append_insns): New.
3767 (amd64_install_fast_tracepoint_jump_pad): New.
3768 (i386_install_fast_tracepoint_jump_pad): New.
3769 (x86_install_fast_tracepoint_jump_pad): New.
3770 (the_low_target): Install x86_get_thread_area and
3771 x86_install_fast_tracepoint_jump_pad.
3772 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3773 (struct fast_tracepoint_jump): New.
3774 (fast_tracepoint_jump_insn): New.
3775 (fast_tracepoint_jump_shadow): New.
3776 (find_fast_tracepoint_jump_at): New.
3777 (fast_tracepoint_jump_here): New.
3778 (delete_fast_tracepoint_jump): New.
3779 (set_fast_tracepoint_jump): New.
3780 (uninsert_fast_tracepoint_jumps_at): New.
3781 (reinsert_fast_tracepoint_jumps_at): New.
3782 (set_breakpoint_at): Use write_inferior_memory.
3783 (uninsert_raw_breakpoint): Use write_inferior_memory.
3784 (check_mem_read): Mask out fast tracepoint jumps.
3785 (check_mem_write): Mask out fast tracepoint jumps.
3786 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3787 (set_fast_tracepoint_jump): Declare.
3788 (delete_fast_tracepoint_jump)
3789 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3790 (reinsert_fast_tracepoint_jumps_at): Declare.
3791 * regcache.c: Don't compile many functions when building the
3792 in-process agent library.
3793 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3794 the register buffer in the heap.
3795 (free_register_cache): If the register buffer isn't owned by the
3796 regcache, don't free it.
3797 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3798 pre-existing register caches.
3799 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3801 (convert_ascii_to_int): : Constify `from' parameter type.
3802 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3803 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3804 the needed buffer in-place.
3805 (relocate_instruction): New.
3806 * server.c (handle_query) <qSymbols>: If the target supports
3807 tracepoints, give it a chance of looking up symbols. Report
3808 support for fast tracepoints.
3809 (handle_status): Stabilize threads.
3810 (process_serial_event): Adjust.
3811 * server.h (struct fast_tracepoint_jump): Forward declare.
3812 (struct process_info) <fast_tracepoint_jumps>: New field.
3813 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3814 (decode_X_packet, decode_M_packet): Adjust.
3815 (relocate_instruction): Declare.
3816 (in_process_agent_loaded): Declare.
3817 (tracepoint_look_up_symbols): Declare.
3818 (struct fast_tpoint_collect_status): Declare.
3819 (fast_tracepoint_collecting): Declare.
3820 (force_unlock_trace_buffer): Declare.
3821 (handle_tracepoint_bkpts): Declare.
3822 (initialize_low_tracepoint)
3823 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3824 * target.h (struct target_ops) <stabilize_threads,
3825 install_fast_tracepoint_jump_pad>: New fields.
3826 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3827 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3828 [HAVE_STDINT_H]: Include stdint.h.
3829 (trace_debug_1): Rename to ...
3830 (trace_vdebug): ... this.
3831 (trace_debug): Rename to ...
3832 (trace_debug_1): ... this. Add `level' parameter.
3834 (ATTR_USED, ATTR_NOINLINE): New.
3835 (IP_AGENT_EXPORT): New.
3836 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3837 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3838 (about_to_request_buffer_space, trace_buffer_is_full)
3839 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3840 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3841 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3842 (traceframe_write_count, traceframes_created)
3843 (trace_state_variables)
3844 New renaming defines.
3845 (struct ipa_sym_addresses): New.
3846 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3848 (ipa_sym_addrs): New.
3849 (all_tracepoint_symbols_looked_up): New.
3850 (in_process_agent_loaded): New.
3851 (write_e_ipa_not_loaded): New.
3852 (maybe_write_ipa_not_loaded): New.
3853 (tracepoint_look_up_symbols): New.
3854 (debug_threads) [IN_PROCESS_AGENT]: New.
3855 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3856 (UNKNOWN_SIDE_EFFECTS): New.
3857 (stop_tracing): New.
3858 (flush_trace_buffer): New.
3859 (stop_tracing_bkpt): New.
3860 (flush_trace_buffer_bkpt): New.
3861 (read_inferior_integer): New.
3862 (read_inferior_uinteger): New.
3863 (read_inferior_data_pointer): New.
3864 (write_inferior_data_pointer): New.
3865 (write_inferior_integer): New.
3866 (write_inferior_uinteger): New.
3867 (struct collect_static_trace_data_action): Delete.
3868 (enum tracepoint_type): New.
3869 (struct tracepoint) <type>: New field `type'.
3870 <actions_str, step_actions, step_actions_str>: Only include in
3872 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3873 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3874 (tracepoints): Use IP_AGENT_EXPORT.
3875 (last_tracepoint): Don't include in the IPA.
3876 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3877 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3878 (alloced_trace_state_variables): New.
3879 (trace_state_variables): Use IP_AGENT_EXPORT.
3880 (traceframe_t): Delete unused variable.
3881 (circular_trace_buffer): Don't include in the IPA.
3882 (trace_buffer_start): Delete.
3883 (struct trace_buffer_control): New.
3884 (trace_buffer_free): Delete.
3885 (struct ipa_trace_buffer_control): New.
3886 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3887 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3889 (trace_buffer_ctrl): New.
3890 (TRACE_BUFFER_CTRL_CURR): New.
3891 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3892 Reimplement as macros.
3893 (trace_buffer_wrap): Delete.
3894 (traceframe_write_count, traceframe_read_count)
3895 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3896 (struct tracepoint_hit_ctx) <type>: New field.
3897 (struct fast_tracepoint_ctx): New.
3898 (memory_barrier): New.
3900 (record_tracepoint_error): Update atomically in the IPA.
3901 (clear_inferior_trace_buffer): New.
3902 (about_to_request_buffer_space): New.
3903 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3904 updating the same buffer.
3905 (add_tracepoint): Default the tracepoint's type to trap
3906 tracepoint, and orig_size to -1.
3907 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3909 (create_trace_state_variable): New parameter `gdb'. Handle it.
3910 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3911 (cmd_qtdp): Handle fast tracepoints.
3913 (max_jump_pad_size): New.
3914 (gdb_jump_pad_head): New.
3915 (get_jump_space_head): New.
3916 (claim_jump_space): New.
3917 (sort_tracepoints): New.
3918 (MAX_JUMP_SIZE): New.
3919 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3921 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3922 support. Upload fast traceframes, and delete internal IPA
3924 (stop_tracing_handler): New.
3925 (flush_trace_buffer_handler): New.
3926 (cmd_qtstop): Upload fast tracepoints.
3927 (response_tracepoint): Handle fast tracepoints.
3928 (tracepoint_finished_step): Upload fast traceframes. Set the
3929 tracepoint hit context's tracepoint type.
3930 (handle_tracepoint_bkpts): New.
3931 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3932 type. Add comment about fast tracepoints.
3933 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3934 non-existing action_str field.
3935 (get_context_regcache): Handle fast tracepoints.
3936 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3938 (fast_tracepoint_from_jump_pad_address): New.
3939 (fast_tracepoint_from_ipa_tpoint_address): New.
3940 (collecting_t): New.
3941 (force_unlock_trace_buffer): New.
3942 (fast_tracepoint_collecting): New.
3945 (write_inferior_data_ptr): New.
3946 (target_tp_heap): New.
3947 (target_malloc): New.
3948 (download_agent_expr): New.
3950 (download_tracepoints): New.
3951 (download_trace_state_variables): New.
3952 (upload_fast_traceframes): New.
3953 (IPA_FIRST_TRACEFRAME): New.
3954 (IPA_NEXT_TRACEFRAME_1): New.
3955 (IPA_NEXT_TRACEFRAME): New.
3956 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3957 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3958 (gdb_jump_pad_buffer_end): New.
3959 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3960 (initialize_tracepoint): Adjust.
3961 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3962 buffer. Initialize the low module.
3963 * utils.c (PREFIX, TOOLNAME): New.
3964 (malloc_failure): Use PREFIX.
3965 (error): In the IPA, an error causes an exit.
3966 (fatal, warning): Use PREFIX.
3967 (internal_error): Use TOOLNAME.
3968 (NUMCELLS): Increase to 10.
3969 * configure, config.in: Regenerate.
3971 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3973 * server.c (handle_query) <qSupported>: Do two passes over the
3974 qSupported string to avoid nesting strtok.
3976 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3978 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3980 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3982 * configure: Regenerate.
3983 * proc-service.list: New.
3985 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3987 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3990 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3992 * gdbreplay.c (remote_open): Check error return from socket() call by
3993 its equality to -1 not by it being negative.
3994 * remote-utils.c (remote_open): Likewise.
3996 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3998 * config.h: Regenerate.
4000 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4002 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4003 doesn't provide PTRACE_GET_THREAD_AREA.
4005 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4007 * linux-m68k-low.c: Include <asm/ptrace.h>
4008 (ps_get_thread_area): Implement.
4010 2010-05-03 Doug Evans <dje@google.com>
4012 * event-loop.c (struct callback_event): New struct.
4013 (callback_list): New global.
4014 (append_callback_event, delete_callback_event): New functions.
4015 (process_callback): New function.
4016 (start_event_loop): Call it.
4017 * remote-utils.c (NOT_SCHEDULED): Define.
4018 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4019 moved out of readchar.
4020 (readchar): Rewrite. Call reschedule before returning.
4021 (reset_readchar): New function.
4022 (remote_close): Call it.
4023 (process_remaining, reschedule): New functions.
4024 * server.h (callback_handler_func): New typedef.
4025 (append_callback_event, delete_callback_event): Declare.
4027 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4029 * proc-service.c (ps_pglobal_lookup): Use
4030 thread_db_look_up_one_symbol.
4031 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4032 parameter. Use it instead of all_symbols_looked_up.
4033 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4035 (all_symbols_looked_up): Don't declare.
4036 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4037 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4039 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4040 Set all_symbols_looked_up here.
4041 (thread_db_look_up_one_symbol): New.
4042 (thread_db_get_tls_address): Adjust.
4043 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4044 thread_db object on the heap, and tentatively set it in the
4046 (thread_db_init): Don't set all_symbols_looked_up here.
4047 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4049 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4051 * linux-low.c (linux_kill, linux_detach): Adjust.
4052 (status_pending_p_callback): Remove redundant statement. Check
4053 for !TARGET_WAITIKIND_IGNORE, instead of
4054 TARGET_WAITKIND_STOPPED.
4055 (handle_tracepoints): Make sure LWP is locked. Adjust.
4056 (linux_wait_for_event_1): Adjust.
4057 (linux_cancel_breakpoints): New.
4058 (unsuspend_one_lwp): New.
4059 (unsuspend_all_lwps): New.
4060 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4061 (send_sigstop_callback): Change return type to int, add new
4062 `except' parameter and handle it.
4063 (suspend_and_send_sigstop_callback): New.
4064 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4065 pass them down. If SUSPEND, also increment the lwp's suspend
4067 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4068 (need_step_over_p): Don't consider suspended LWPs.
4069 (start_step_over): Adjust.
4070 (proceed_one_lwp): Change return type to int, add new `except'
4071 parameter and handle it.
4072 (unsuspend_and_proceed_one_lwp): New.
4073 (proceed_all_lwps): Use find_inferior instead of
4075 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4076 also decrement the suspend count of LWPs. Pass `except' down,
4077 instead of hacking its suspend count.
4078 (linux_pause_all): Add `freeze' parameter. Adjust.
4079 (linux_unpause_all): New.
4080 (linux_target_ops): Install linux_unpause_all.
4081 * server.c (handle_status): Adjust.
4082 * target.h (struct target_ops): New fields `unpause_all' and
4083 `cancel_breakpoints'. Add new parameter to `pause_all'.
4084 (pause_all): Add new `freeze' parameter.
4086 (cancel_breakpoints): New.
4087 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4089 (cmd_qtstart): Pause threads.
4090 (stop_tracing): Pause threads, and cancel breakpoints.
4091 * win32-low.c (win32_target_ops): Adjust.
4093 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4095 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4096 the inferior right away from here...
4097 (linux_wait_1): ... to here, and adjust to check the thread's
4098 last_resume_kind instead of the lwp's step or stop_expected flags.
4100 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4102 * README: Use consistent `GDB' and `GDBserver' spellings.
4104 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4106 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4107 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4108 (linux_detach_one_lwp): Assume the lwp is stopped.
4109 (any_thread_of): Delete.
4110 (linux_detach): Stop all lwps here. Don't blindly delete all
4112 (delete_lwp_callback): New.
4113 (linux_mourn): Delete all lwps of the process that is gone.
4114 (linux_wait_1): Don't delete the last lwp of the process here.
4115 * mem-break.h (mark_breakpoints_out): Declare.
4116 * mem-break.c (mark_breakpoints_out): New.
4117 (free_all_breakpoints): Use it.
4118 * server.c (handle_target_event): If the process is gone, mark
4120 * thread-db.c (struct thread_db) <create_bp>: New field.
4121 (thread_db_enable_reporting): Fix prototype. Store a thread event
4122 breakpoint reference in the thread_db struct.
4123 (thread_db_load_search): Clear the thread_db object.
4124 (try_thread_db_load_1): Ditto.
4125 (switch_to_process): New.
4126 (disable_thread_event_reporting): Use it.
4127 (remove_thread_event_breakpoints): New.
4128 (thread_db_detach, thread_db_mourn): Use it.
4130 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4132 * linux-low.c (linux_enable_event_reporting): New.
4133 (linux_wait_for_event_1, handle_extended_wait): Use it.
4135 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4137 * linux-low.c (linux_kill_one_lwp, linux_kill)
4138 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4139 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4140 SIGSTOP even if the LWP is stopped.
4141 (send_sigstop_callback): New.
4142 (stop_all_lwps): Use send_sigstop_callback instead.
4143 (linux_resume_one_thread): Adjust.
4144 (proceed_one_lwp): Still proceed an LWP that the client has
4145 requested to stop, if we haven't reported it as stopped yet. Make
4146 sure that LWPs the client want stopped, have a pending SIGSTOP.
4148 2010-04-26 Doug Evans <dje@google.com>
4150 * server.c (handle_general_set): Make static.
4152 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4153 Print received char after testing for error/eof instead of before.
4154 (input_interrupt): Tweak comment.
4156 2010-04-23 Doug Evans <dje@google.com>
4158 * server.c (start_inferior): Print inferior argv if --debug.
4160 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4162 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4163 * nto-x86-low.c: Include server.h
4165 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4167 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4168 be consistent with other sources of this directory.
4169 (init_registers_amd64): Correct name of source file of this function
4172 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4174 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4177 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4179 * win32-i386-low.c: Add 64-bit support.
4180 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4181 (init_registers_amd64): Declare.
4182 (mappings): Add 64-bit version of array.
4183 (init_windows_x86): New function.
4184 (the_low_target): Change init_arch field to init_windows_x86.
4186 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4188 * win32-low.c: Adapt to support also 64-bit architecture.
4189 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4190 (get_image_name): Use SIZE_T type for local variable `done'.
4191 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4192 (toolhelp_get_dll_name): Idem.
4193 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4194 Use uintptr_t typecast to avoid warning.
4195 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4196 (handle_exception): Use phex_nz to avoid warning.
4197 (win32_wait): Remove unused local variable `process'.
4199 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4201 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4204 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4206 * configure.ac: Use `ws2_32' library for srv_mingw.
4207 * configure: Regenerate.
4208 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4209 * remote-utils.c: Likewise.
4211 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4213 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4214 if __x86_64__ is defined.
4216 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4218 * configure: Regenerate.
4220 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4222 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4223 * target.h (target_ops): New get_tib_address field.
4224 * win32-low.h (win32_thread_info): Add thread_local_base field.
4225 * win32-low.c (child_add_thread): Add tlb argument.
4226 Set thread_local_base field to TLB.
4227 (get_child_debug_event): Adapt to child_add_thread change.
4228 (win32_get_tib_address): New function.
4229 (win32_target_ops): Set get_tib_address field to
4230 win32_get_tib_address.
4231 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4233 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4235 * linux-low.c (linux_mourn): Also remove the process.
4236 * server.c (handle_target_event): Don't remove the process here.
4237 * nto-low.c (nto_mourn): New.
4238 (nto_target_ops): Install it.
4239 * spu-low.c (spu_mourn): New.
4240 (spu_target_ops): Install it.
4241 * win32-low.c (win32_mourn): New.
4242 (win32_target_ops): Install it.
4244 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4246 * server.h (buffer_xml_printf): Remove redundant `;'.
4248 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4250 * regcache.c (set_register_cache): Invalidate regcaches before
4251 changing the register cache layout.
4252 (regcache_invalidate_one): Allow a NULL regcache.
4253 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4254 regcaches before changing the register cache layout or the target
4257 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4259 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4260 variable warning on Linux/x86-64.
4262 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4264 GDBserver disconnected tracing support.
4266 * linux-low.c (linux_remove_process): Delete.
4267 (add_lwp): Don't set last_resume_kind here.
4268 (linux_kill): Use `mourn'.
4269 (linux_detach): Use `thread_db_detach', and `mourn'.
4271 (linux_attach_lwp_1): Adjust comment.
4272 (linux_attach): last_resume_kind moved the thread_info; adjust.
4273 (status_pending_p_callback): Adjust.
4274 (linux_wait_for_event_1): Adjust.
4275 (count_events_callback, select_singlestep_lwp_callback)
4276 (select_event_lwp_callback, cancel_breakpoints_callback)
4277 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4278 (proceed_one_lwp): Adjust.
4279 (linux_async): Add debug output.
4280 (linux_thread_stopped): New.
4281 (linux_pause_all): New.
4282 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4284 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4285 (thread_db_free): Delete declaration.
4286 (thread_db_detach, thread_db_mourn): Declare.
4287 * thread-db.c (thread_db_init): Use thread_db_mourn.
4288 (thread_db_free): Delete, split in two.
4289 (disable_thread_event_reporting): New.
4290 (thread_db_detach): New.
4291 (thread_db_mourn): New.
4293 * server.h (struct thread_info) <last_resume_kind>: New field.
4294 <attached>: Add comment.
4295 <gdb_detached>: New field.
4296 (handler_func): Change return type to int.
4297 (handle_serial_event, handle_target_event): Ditto.
4298 (gdb_connected): Declare.
4300 (disconnected_tracing): Declare.
4301 (stop_tracing): Declare.
4303 * server.c (handle_query) <qSupported>: Report support for
4304 disconnected tracing.
4305 (queue_stop_reply_callback): Account for running threads.
4306 (gdb_wants_thread_stopped): New.
4307 (gdb_wants_all_threads_stopped): New.
4308 (gdb_reattached_process): New.
4309 (handle_status): Clear the `gdb_detached' flag of all processes.
4310 In all-stop, stop all threads.
4311 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4312 (process_serial_event): If the remote connection breaks, or if an
4313 exit was forced with "monitor exit", force an event loop exit.
4314 Handle disconnected tracing on detach.
4315 (handle_serial_event): Adjust.
4316 (handle_target_event): If GDB isn't connected, forward events back
4317 to the inferior, unless the last process exited, in which case,
4318 exit gdbserver. Adjust interface.
4320 * remote-utils.c (remote_open): Don't block in accept. Instead
4321 register an event loop source on the listen socket file
4322 descriptor. Refactor bits into ...
4323 (listen_desc): ... this new global.
4324 (gdb_connected): ... this new function.
4325 (enable_async_notification): ... this new function.
4326 (handle_accept_event): ... this new function.
4327 (remote_close): Clear remote_desc.
4329 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4331 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4333 (mourn_inferior): Define.
4334 (target_process_qsupported): Avoid the dangling else problem.
4335 (thread_stopped): Define.
4336 (pause_all): Define.
4337 (target_waitstatus_to_string): Declare.
4338 * target.c (target_waitstatus_to_string): New.
4340 * tracepoint.c (tracing): Make extern.
4341 (disconnected_tracing): New.
4342 (stop_tracing): Make extern. Handle tracing stops due to GDB
4344 (cmd_qtdisconnected): New.
4345 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4346 (handle_tracepoint_general_set): Handle QTDisconnected.
4348 * event-loop.c (event_handler_func): Change return type to int.
4349 (process_event): Bail out if the event handler wants the event
4351 (handle_file_event): Ditto.
4352 (start_event_loop): Bail out if the event handler wants the event
4355 * nto-low.c (nto_target_ops): Adjust.
4356 * spu-low.c (spu_wait): Don't remove the process here.
4357 (spu_target_ops): Adjust.
4358 * win32-low.c (win32_wait): Don't remove the process here.
4359 (win32_target_ops): Adjust.
4361 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4363 * regcache.c (realloc_register_cache): Invalidate inferior's
4364 regcache before recreating it.
4366 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4368 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4370 2010-04-09 Stan Shebs <stan@codesourcery.com>
4371 Pedro Alves <pedro@codesourcery.com>
4373 * server.h (LONGEST): New.
4374 (struct thread_info) <while_stepping>: New field.
4375 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4377 (initialize_tracepoint, handle_tracepoint_general_set)
4378 (handle_tracepoint_query, tracepoint_finished_step)
4379 (tracepoint_was_hit, release_while_stepping_state_list):
4380 (current_traceframe): Declare.
4381 * server.c (handle_general_set): Handle tracepoint packets.
4383 (write_memory): New.
4384 (handle_search_memory_1): Use read_memory.
4385 (handle_query): Report support for conditional tracepoints, trace
4386 state variables, and tracepoint sources. Handle tracepoint
4388 (main): Initialize the tracepoints module.
4389 (process_serial_event): Handle traceframe reads/writes.
4391 * linux-low.c (handle_tracepoints): New.
4392 (linux_wait_1): Call it.
4393 (linux_resume_one_lwp): Handle while-stepping.
4394 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4395 (linux_target_ops): Install them.
4396 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4398 * linux-x86-low.c (x86_supports_tracepoints): New.
4399 (the_low_target). Install it.
4401 * mem-break.h (delete_breakpoint): Declare.
4402 * mem-break.c (delete_breakpoint): Make external.
4404 * target.h (struct target_ops): Add `supports_tracepoints',
4405 `read_pc', and `write_pc' fields.
4406 (target_supports_tracepoints): Define.
4407 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4410 * regcache.h (struct regcache) <registers_owned>: New field.
4411 (init_register_cache, regcache_cpy): Declare.
4412 (regcache_read_pc, regcache_write_pc): Declare.
4413 (register_cache_size): Declare.
4414 (supply_regblock): Declare.
4415 * regcache.c (init_register_cache): New.
4416 (new_register_cache): Use it.
4417 (regcache_cpy): New.
4418 (register_cache_size): New.
4419 (supply_regblock): New.
4420 (regcache_read_pc, regcache_write_pc): New.
4422 * tracepoint.c: New.
4424 * Makefile.in (OBS): Add tracepoint.o.
4425 (tracepoint.o): New rule.
4427 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4429 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4431 (i386-mmx.c): Likewise.
4432 (i386-mmx-linux.o): Likewise.
4433 (i386-mmx-linux.c): Likewise.
4435 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4436 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4437 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4438 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4440 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4441 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4442 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4444 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4446 * Makefile.in (clean): Updated.
4448 (i386-avx.c): Likewise.
4449 (i386-avx-linux.o): Likewise.
4450 (i386-avx-linux.c): Likewise.
4451 (amd64-avx.o): Likewise.
4452 (amd64-avx.c): Likewise.
4453 (amd64-avx-linux.o): Likewise.
4454 (amd64-avx-linux.c): Likewise.
4456 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4457 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4458 (srv_amd64_regobj): Add amd64-avx.o.
4459 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4460 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4461 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4462 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4463 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4464 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4465 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4467 * i387-fp.c: Include "i386-xstate.h".
4469 (i387_cache_to_xsave): Likewise.
4470 (i387_xsave_to_cache): Likewise.
4471 (x86_xcr0): Likewise.
4473 * i387-fp.h (i387_cache_to_xsave): Likewise.
4474 (i387_xsave_to_cache): Likewise.
4475 (x86_xcr0): Likewise.
4477 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4478 * linux-crisv32-low.c (target_regsets): Likewise.
4479 * linux-m68k-low.c (target_regsets): Likewise.
4480 * linux-mips-low.c (target_regsets): Likewise.
4481 * linux-ppc-low.c (target_regsets): Likewise.
4482 * linux-s390-low.c (target_regsets): Likewise.
4483 * linux-sh-low.c (target_regsets): Likewise.
4484 * linux-sparc-low.c (target_regsets): Likewise.
4485 * linux-xtensa-low.c (target_regsets): Likewise.
4487 * linux-low.c: Include <sys/uio.h>.
4488 (regsets_fetch_inferior_registers): Support nt_type.
4489 (regsets_store_inferior_registers): Likewise.
4490 (linux_process_qsupported): New.
4491 (linux_target_ops): Add linux_process_qsupported.
4493 * linux-low.h (regset_info): Add nt_type.
4494 (linux_target_ops): Add process_qsupported.
4496 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4498 (init_registers_i386_avx_linux): New.
4499 (init_registers_amd64_avx_linux): Likewise.
4500 (xmltarget_i386_linux_no_xml): Likewise.
4501 (xmltarget_amd64_linux_no_xml): Likewise.
4502 (PTRACE_GETREGSET): Likewise.
4503 (PTRACE_SETREGSET): Likewise.
4504 (x86_fill_xstateregset): Likewise.
4505 (x86_store_xstateregset): Likewise.
4506 (use_xml): Likewise.
4507 (x86_linux_update_xmltarget): Likewise.
4508 (x86_linux_process_qsupported): Likewise.
4509 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4510 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4511 init_registers_i386_linux here. Call
4512 x86_linux_update_xmltarget.
4513 (the_low_target): Add x86_linux_process_qsupported.
4515 * server.c (handle_query): Call target_process_qsupported.
4517 * target.h (target_ops): Add process_qsupported.
4518 (target_process_qsupported): New.
4520 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4522 * inferiors.c (add_thread): Set last_status kind to
4523 TARGET_WAITKIND_IGNORE.
4524 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4525 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4526 (linux_wait_1): Move `thread' local definition to block that uses
4527 it. Don't NULL initialize `event_child'.
4528 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4529 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4530 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4532 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4534 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4535 an extended waitstatus, or by a watchpoint.
4536 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4537 thread was stepping or has been stopped by a watchpoint.
4539 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4541 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4542 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4543 of another, then delete the previous, and validate all
4545 (validate_inserted_breakpoint): New.
4546 (delete_disabled_breakpoints): New.
4547 (validate_breakpoints): New.
4548 (check_mem_read): Validate breakpoints before trusting their
4549 shadow. Delete disabled breakpoints.
4550 (check_mem_write): Validate breakpoints before trusting they
4551 should be inserted. Delete disabled breakpoints.
4552 * mem-break.h (validate_breakpoints):
4553 * server.c (handle_query): Validate breakpoints when we see a
4556 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4558 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4559 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4560 if we could tell there's a GDB breakpoint at stop_pc.
4561 (need_step_over_p): Don't do a step over if we find a GDB
4562 breakpoint at the resume PC.
4564 * mem-break.c (struct raw_breakpoint): New.
4565 (enum bkpt_type): New type `gdb_breakpoint'.
4566 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4567 fields. New field `raw'.
4568 (find_raw_breakpoint_at): New.
4569 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4571 (set_breakpoint_at): Adjust.
4572 (delete_raw_breakpoint): New.
4573 (release_breakpoint): New.
4574 (delete_breakpoint): Rename to...
4575 (delete_breakpoint_1): ... this. Add proc parameter. Use
4576 release_breakpoint. Return ENOENT.
4577 (delete_breakpoint): Reimplement.
4578 (find_breakpoint_at): Delete.
4579 (find_gdb_breakpoint_at): New.
4580 (delete_breakpoint_at): Delete.
4581 (set_gdb_breakpoint_at): New.
4582 (delete_gdb_breakpoint_at): New.
4583 (gdb_breakpoint_here): New.
4584 (set_reinsert_breakpoint): Use release_breakpoint.
4585 (uninsert_breakpoint): Rename to ...
4586 (uninsert_raw_breakpoint): ... this.
4587 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4588 (reinsert_raw_breakpoint): Change parameter type to
4590 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4592 (check_breakpoints): Adjust. Use release_breakpoint.
4593 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4594 (breakpoint_inserted_here): Ditto.
4595 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4596 Don't trust the breakpoint's shadow if it is not inserted.
4597 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4598 (delete_all_breakpoints): Adjust.
4599 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4600 use delete_breakpoint_1.
4602 * mem-break.h (breakpoints_supported): Delete declaration.
4603 (set_gdb_breakpoint_at): Declare.
4604 (gdb_breakpoint_here): Declare.
4605 (delete_breakpoint_at): Delete.
4606 (delete_gdb_breakpoint_at): Declare.
4608 * server.h (struct raw_breakpoint): Forward declare.
4609 (struct process_info): New field `raw_breakpoints'.
4611 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4614 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4616 * linux-low.c (status_pending_p_callback): Fix comment.
4617 (linux_wait_for_event_1): Move most of the internal breakpoint
4618 handling from here...
4619 (linux_wait_1): ... to here.
4620 (count_events_callback): New.
4621 (select_singlestep_lwp_callback): New.
4622 (select_event_lwp_callback): New.
4623 (cancel_breakpoints_callback): New.
4624 (select_event_lwp): New.
4625 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4626 priority to all LWPs that have had events that should be reported
4627 to the client. Cancel breakpoints when about to reporting the
4628 event to the client, not while stopping lwps. No longer cancel
4629 finished single-steps here.
4630 (cancel_finished_single_step): Delete.
4631 (cancel_finished_single_steps): Delete.
4633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4635 * mem-break.c (enum bkpt_type): New.
4636 (struct breakpoint): New field `type'.
4637 (set_breakpoint_at): Change return type to struct breakpoint
4638 pointer. Set type to `other_breakpoint' by default.
4639 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4640 in the breakpoint list.
4641 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4642 (reinsert_breakpoint): Rename to ...
4643 (reinsert_raw_breakpoint): ... this.
4644 (reinsert_breakpoints_at): Adjust.
4645 * mem-break.h (struct breakpoint): Declare.
4646 (set_breakpoint_at): Change return type to struct breakpoint
4649 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4651 * server.c (handle_query): Assign, not compare.
4653 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4655 Teach linux gdbserver to step-over-breakpoints.
4657 * linux-low.c (can_hardware_single_step): New.
4658 (supports_breakpoints): New.
4659 (handle_extended_wait): If stopping threads, read the stop pc of
4662 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4663 low target doesn't support retrieving the PC.
4664 (add_lwp): Set last_resume_kind to resume_continue.
4665 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4666 (linux_attach): Don't clear stop_expected. Set the lwp's
4667 last_resume_kind to resume_stop.
4668 (linux_detach_one_lwp): Don't check for removed breakpoints.
4669 (check_removed_breakpoint): Delete.
4670 (status_pending_p): Rename to ...
4671 (status_pending_p_callback): ... this. Don't check for removed
4672 breakpoints. Don't consider threads that are stopped from GDB's
4674 (linux_wait_for_lwp): Always read the stop_pc here.
4675 (cancel_breakpoint): New.
4676 (step_over_bkpt): New global.
4677 (linux_wait_for_event_1): Implement stepping over breakpoints.
4678 (gdb_wants_lwp_stopped): New.
4679 (gdb_wants_all_stopped): New.
4680 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4681 single-step traps here. Store the thread's last reported target
4683 (send_sigstop): Don't clear stop_expected. Always set it,
4685 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4686 (cancel_finished_single_step): New.
4687 (cancel_finished_single_steps): New.
4688 (wait_for_sigstop): Don't cancel finished single-step traps here.
4689 (linux_resume_one_lwp): Don't check for removed breakpoints.
4690 Don't set `step' on non-hardware step archs.
4691 (linux_set_resume_request): Ignore resume_stop requests if already
4692 stopping or stopped. Set the lwp's last_resume_kind.
4693 (resume_status_pending_p): Don't check for removed breakpoints.
4694 (need_step_over_p): New.
4695 (start_step_over): New.
4696 (finish_step_over): New.
4697 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4698 requests. Clear the thread's last reported target waitstatus.
4699 Don't use the `suspended' flag. Don't consider pending breakpoints.
4700 (linux_resume): Start a step-over if necessary.
4701 (proceed_one_lwp): New.
4702 (proceed_all_lwps): New.
4703 (unstop_all_lwps): New.
4704 * linux-low.h (struct lwp_info): Rewrite comment for the
4705 `suspended' flag. Add the `stop_pc' field. Delete the
4706 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4707 Add `'last_resume_kind' and `need_step_over' fields.
4708 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4709 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4710 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4711 (set_raw_breakpoint_at): New.
4712 (set_breakpoint_at): Rewrite to use it.
4713 (reinsert_breakpoint_handler): Delete.
4714 (set_reinsert_breakpoint): New.
4715 (reinsert_breakpoint_by_bp): Delete.
4716 (delete_reinsert_breakpoints): New.
4717 (uninsert_breakpoint): Rewrite.
4718 (uninsert_breakpoints_at): New.
4719 (reinsert_breakpoint): Rewrite.
4720 (reinsert_breakpoints_at): New.
4721 (check_breakpoints): Rewrite.
4722 (breakpoint_here): New.
4723 (breakpoint_inserted_here): New.
4724 (check_mem_read): Adjust.
4725 * mem-break.h (breakpoints_supported, breakpoint_here)
4726 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4727 (reinsert_breakpoint_by_bp): Delete declaration.
4728 (delete_reinsert_breakpoints): Declare.
4729 (reinsert_breakpoint): Delete declaration.
4730 (reinsert_breakpoints_at): Declare.
4731 (uninsert_breakpoint): Delete declaration.
4732 (uninsert_breakpoints_at): Declare.
4733 (check_breakpoints): Adjust prototype.
4734 * server.h: Adjust include order.
4735 (struct thread_info): Declare here. Add a `last_status' field.
4737 2010-03-23 Michael Snyder <msnyder@vmware.com>
4739 * server.c (crc32): New function.
4740 (handle_query): Add handling for 'qCRC:' request.
4742 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4744 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4745 lwp had been stopped by a watchpoint.
4747 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4749 * server.h (internal_error): Declare.
4750 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4751 * utils.c (internal_error): New function.
4753 2010-03-15 Andreas Schwab <schwab@redhat.com>
4755 * configure.srv: Fix typo setting srv_regobj.
4757 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4759 * linux-low.c (fetch_register): Avoid passing a non string literal
4761 (usr_store_inferior_registers): Ditto.
4763 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4765 * linux-low.c (linux_write_memory): Bail out early if peeking
4768 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4770 * linux-low.h (struct lwp_info): New fields
4771 `stopped_by_watchpoint' and `stopped_data_address'.
4772 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4773 here, and cache them in the lwp object.
4774 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4776 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4778 (linux_stopped_by_watchpoint): Rewrite.
4779 (linux_stopped_data_address): Rewrite.
4781 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4783 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4784 switching the current inferior, not before.
4786 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4788 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4789 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4790 i386-linux.c and amd64-linux.c.
4791 (reg-i386.o): Removed.
4792 (reg-i386.c): Likewise.
4793 (reg-i386-linux.o): Likewise.
4794 (reg-i386-linux.c): Likewise.
4795 (reg-x86-64.o): Likewise.
4796 (reg-x86-64.c): Likewise.
4797 (reg-x86-64-linux.o): Likewise.
4798 (reg-x86-64-linux.c): Likewise.
4801 (i386-linux.o): Likewise.
4802 (i386-linux.c): Likewise.
4803 (amd64.o): Likewise.
4804 (amd64.c): Likewise.
4805 (amd64-linux.o): Likewise.
4806 (amd64-linux.c): Likewise.
4808 * configure.srv (srv_i386_regobj): New.
4809 (srv_i386_linux_regobj): Likewise.
4810 (srv_amd64_regobj): Likewise.
4811 (srv_amd64_linux_regobj): Likewise.
4812 (srv_i386_32bit_xmlfiles): Likewise.
4813 (srv_i386_64bit_xmlfiles): Likewise.
4814 (srv_i386_xmlfiles): Likewise.
4815 (srv_amd64_xmlfiles): Likewise.
4816 (srv_i386_linux_xmlfiles): Likewise.
4817 (srv_amd64_linux_xmlfiles): Likewise.
4818 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4819 srv_xmlfiles to $srv_i386_xmlfiles.
4820 (i[34567]86-*-mingw32ce*): Likewise.
4821 (i[34567]86-*-mingw*): Likewise.
4822 (i[34567]86-*-nto*): Likewise.
4823 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4824 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4825 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4826 (x86_64-*-linux*): Likewise.
4828 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4829 (init_registers_amd64_linux): New.
4830 (x86_arch_setup): Replace init_registers_x86_64_linux with
4831 init_registers_amd64_linux.
4833 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4835 * configure.ac: Check for libdl. If it is not available link against
4836 static libthread_db.
4837 * configure: Regenerate.
4839 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4843 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4844 handing a read watchpoint.
4845 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4847 2010-02-12 Doug Evans <dje@google.com>
4849 * linux-low.c (linux_supports_tracefork_flag): Document.
4850 (linux_look_up_symbols): Add comment.
4852 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4854 * regcache.c (supply_register): Clear regcache if buf is NULL.
4856 2010-02-02 Nicolas Roche <roche@sourceware.org>
4857 Joel Brobecker <brobecker@adacore.com>
4859 * inferiors.c (find_inferior): Add function documentation.
4860 (unloaded_dll): Handle the case where the unloaded dll has not
4861 been previously registered in the dll list.
4863 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4865 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4866 (thumb2_breakpoint): New.
4867 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4869 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4871 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4872 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4875 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4877 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4879 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4881 * linux-s390-low.c (s390_collect_ptrace_register)
4882 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4884 2010-01-21 Doug Evans <dje@google.com>
4886 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4887 (PTRACE_ARG4_TYPE): New macro.
4888 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4889 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4890 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4891 (usr_store_inferior_registers): Ditto.
4892 (linux_read_memory, linux_write_memory): Ditto.
4893 (linux_test_for_tracefork): Ditto.
4895 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4896 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4898 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4900 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4903 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4905 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4906 prototype to take a regcache. Adjust.
4908 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4910 * regcache.h (struct thread_info): Forward declare.
4911 (struct regcache): New.
4912 (new_register_cache): Adjust prototype.
4913 (get_thread_regcache): Declare.
4914 (free_register_cache): Adjust prototype.
4915 (registers_to_string, registers_from_string): Ditto.
4916 (supply_register, supply_register_by_name, collect_register)
4917 (collect_register_as_string, collect_register_by_name): Ditto.
4918 * regcache.c (struct inferior_regcache_data): Delete.
4919 (get_regcache): Rename to ...
4920 (get_thread_regcache): ... this. Adjust. Switch inferior before
4922 (regcache_invalidate_one): Adjust.
4923 (regcache_invalidate): Fix prototype.
4924 (new_register_cache): Return the new register cache.
4925 (free_register_cache): Change prototype.
4926 (realloc_register_cache): Adjust.
4927 (registers_to_string): Change prototype to take a regcache. Adjust.
4928 (registers_from_string): Ditto.
4929 (register_data): Ditto.
4930 (supply_register): Ditto.
4931 (supply_register_by_name): Ditto.
4932 (collect_register): Ditto.
4933 (collect_register_as_string): Ditto.
4934 (collect_register_by_name): Ditto.
4935 * server.c (process_serial_event): Adjust.
4936 * linux-low.h (regset_fill_func, regset_store_func): Change
4938 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4940 * linux-low.c (get_stop_pc): Adjust.
4941 (check_removed_breakpoint): Adjust.
4942 (linux_wait_for_event): Adjust.
4943 (linux_resume_one_lwp): Adjust.
4944 (fetch_register): Add regcache parameter. Adjust.
4945 (usr_store_inferior_registers): Ditto.
4946 (regsets_fetch_inferior_registers): Ditto.
4947 (regsets_store_inferior_registers): Ditto.
4948 (linux_fetch_registers, linux_store_registers): Ditto.
4949 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4951 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4953 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4954 prototype to take a regcache.
4955 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4956 * remote-utils.c (convert_ascii_to_int, outreg)
4957 (prepare_resume_reply): Change prototype to take a regcache.
4959 * target.h (struct target_ops) <fetch_registers, store_registers>:
4960 Change prototype to take a regcache.
4961 (fetch_inferior_registers, store_inferior_registers): Change
4962 prototype to take a regcache. Adjust.
4963 * proc-service.c (ps_lgetregs): Adjust.
4964 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4965 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4966 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4967 take a regcache. Adjust.
4968 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4969 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4970 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4971 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4972 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4973 (cris_cannot_fetch_register):
4974 (cris_breakpoint_at): Change prototype to take a regcache.
4976 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4977 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4978 to take a regcache. Adjust.
4979 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4981 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4982 take a regcache. Adjust.
4983 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4984 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4985 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4986 * linux-mips-low.c (mips_get_pc):
4987 (mips_set_pc): Change prototype to take a regcache. Adjust.
4988 (mips_reinsert_addr): Adjust.
4989 (mips_collect_register): Change prototype to take a regcache.
4991 (mips_supply_register):
4992 (mips_collect_register_32bit, mips_supply_register_32bit)
4993 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4994 (mips_store_fpregset): Ditto.
4995 * linux-ppc-low.c (ppc_supply_ptrace_register)
4996 (ppc_supply_ptrace_register): Ditto.
4997 (parse_spufs_run): Adjust.
4998 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4999 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5000 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5001 take a regcache. Adjust.
5002 * linux-s390-low.c (s390_collect_ptrace_register)
5003 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5004 (s390_set_pc): Change prototype to take a regcache. Adjust.
5005 (s390_arch_setup): Adjust.
5006 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5007 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5008 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5009 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5010 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5012 (sparc_breakpoint_at): Adjust.
5013 * linux-xtensa-low.c (xtensa_fill_gregset):
5014 (xtensa_store_gregset):
5015 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5016 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5017 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5018 prototype to take a regcache. Adjust.
5019 * win32-arm-low.c (arm_fetch_inferior_register)
5020 (arm_store_inferior_register): Change prototype to take a
5022 * win32-i386-low.c (i386_fetch_inferior_register)
5023 (i386_store_inferior_register): Change prototype to take a
5025 * win32-low.c (child_fetch_inferior_registers)
5026 (child_store_inferior_registers): Change prototype to take a
5028 (win32_wait): Adjust.
5029 (win32_fetch_inferior_registers): Change prototype to take a
5031 (win32_store_inferior_registers): Adjust.
5032 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5033 store_inferior_register>: Change prototype to take a regcache.
5035 2010-01-20 Doug Evans <dje@google.com>
5037 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5039 (linux_wait_for_event1, linux_init_signals): Ditto.
5040 (W_STOPCODE): Provide definition if missing.
5042 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5044 * linux-low.c (linux_core_of_thread): New.
5045 (compare_ints, show_process, list_threads): New.
5046 (linux_qxfer_osdata): Report threads and cores.
5047 (linux_target_op): Register linux_core_of_thread.
5048 * remote-utils.c (prepare_resume_reply): Report the core.
5049 (buffer_xml_printf): Support %d specifier.
5050 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5052 (handle_query): Handle qXfer:threads. Announce availability
5054 * target.h (struct target_ops): New field core_of_thread.
5056 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5058 * Makefile.in (clean): Remove new generated files.
5059 (reg-s390.o, reg-s390.c): Remove rules.
5060 (reg-s390x.o, reg-s390x.c): Likewise.
5061 (s390-linux32.o, s390-linux32.c): Add rules.
5062 (s390-linux64.o, s390-linux64.c): Likewise.
5063 (s390x-linux64.o, s390x-linux64.c): Likewise.
5064 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5065 * linux-s390-low.c: Include <elf.h>.
5066 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5067 (init_registers_s390): Remove prototype.
5068 (init_registers_s390x): Likewise.
5069 (init_registers_s390_linux32): Add prototype.
5070 (init_registers_s390_linux64): Likewise.
5071 (init_registers_s390x_linux64): Likewise.
5072 (s390_num_regs_3264): New define.
5073 (s390_regmap_3264): New global variable.
5074 (s390_cannot_fetch_register): Remove obsolete check.
5075 (s390_cannot_store_register): Likewise.
5076 (s390_collect_ptrace_register): Handle upper/lower register halves.
5077 (s390_supply_ptrace_register): Likewise.
5078 (s390_fill_gregset): Update to register number changes.
5079 (s390_get_hwcap): New routine.
5080 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5081 Install appropriate regmap and register set.
5083 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5085 * server.c (gdbserver_version): Update copyright year to 2010.
5086 * gdbreplay.c (gdbreplay_version): Likewise.
5088 2009-12-28 Doug Evans <dje@google.com>
5090 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5091 elf/external.h. Include <elf.h> instead but only if necessary.
5093 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5095 * linux-low.c (linux_remove_process): Remove `detaching'
5096 parameter. Don't release/detach from thread_db here.
5097 (linux_kill): Release/detach from thread_db here, ...
5098 (linux_detach): ... and here, before actually detaching.
5099 (linux_wait_1): ... and here, when a process exits.
5100 * thread-db.c (any_thread_of): New.
5101 (thread_db_free): Switch the current inferior to a thread of the
5104 2009-12-21 Doug Evans <dje@google.com>
5106 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5108 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5109 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5110 warning ifndef __NR_tkill. Move setting of errno there too.
5111 Delete unnecessary resetting of errno after syscall.
5112 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5114 * configure.ac: Check for dladdr.
5115 * config.in: Regenerate.
5116 * configure: Regenerate.
5117 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5118 (try_thread_db_load): Update.
5120 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5122 2009-12-18 Doug Evans <dje@google.com>
5124 * event-loop.c: Include unistd.h if it exists.
5126 * linux-low.c (my_waitpid): Move definition away from being in
5127 between linux_tracefork_child/linux_test_for_tracefork.
5129 * gdb_proc_service.h (psaddr_t): Fix type.
5130 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5131 signature to match glibc.
5133 2009-12-16 Doug Evans <dje@google.com>
5135 * linux-low.c (linux_read_memory): Fix argument to read.
5137 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5139 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5140 events, don't leave current_inferior pointing at null.
5142 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5144 * win32-low.c (LOG): Delete.
5145 (OUTMSG): Output to stderr.
5146 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5147 on compile time LOG macro.
5148 (win32_wait): Fix debug output.
5150 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5152 * win32-low.c (win32_add_one_solib): If the dll name is
5153 "ntdll.dll", prepend the system directory to the dll path.
5155 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5157 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5159 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5160 Vladimir Prus <vladimir@codesourcery.com>
5162 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5163 * configure.ac: Check for __mcoldfire__ and set
5164 gdb_cv_m68k_is_coldfire.
5165 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5166 reg-cf.o and reg-m68k.o.
5167 * configure: Regenerated.
5169 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5171 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5172 Pass it to thread_db_free.
5173 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5174 proper `detaching' argument to linux_remove_process.
5175 * linux-low.h (thread_db_free): Add `detaching' parameter.
5176 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5178 (thread_db_free): Add `detaching' parameter. Only
5179 call td_ta_clear_event if detaching from process.
5181 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5183 * thread-db.c (thread_db_free): Fix typo.
5185 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5188 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5190 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5192 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5193 with an i686 compiler.
5194 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5196 * configure: Rebuilt.
5198 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5202 * server.c (handle_search_memory_1): Correct read_addr initialization
5203 in loop for searching subsequent chunks.
5205 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5207 * configure.ac: New --with-libthread-db option.
5208 * thread-db.c: Allow direct dependence on libthread_db.
5209 (thread_db_free): Adjust.
5210 * config.in: Regenerate.
5211 * configure: Likewise.
5213 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5216 * thread-db.c (attach_thread): New function.
5217 (maybe_attach_thread): Return success/failure.
5218 (find_new_threads_callback): Adjust.
5219 (thread_db_find_new_threads): Loop until no new threads.
5221 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5223 * proc-service.c (ps_lgetregs): Formatting.
5225 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5227 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5228 * configure.ac: Adjust.
5229 * linux-low.h (struct process_info_private): Move members to struct
5231 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5232 * linux-low.c (linux_remove_process): Adjust.
5233 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5234 * server.c (handle_query): Move code ...
5235 (handle_monitor_command): ... here. New function.
5236 * target.h (struct target_ops): New member.
5237 * thread-db.c (struct thread_db): New.
5238 (libthread_db_search_path): New variable.
5239 (thread_db_create_event, thread_db_enable_reporting)
5240 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5241 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5242 (try_thread_db_load_1, dladdr_to_soname): New functions.
5243 (try_thread_db_load, thread_db_load_search): New functions.
5244 (thread_db_init): Search for libthread_db.
5245 (thread_db_free): New function.
5246 (thread_db_handle_monitor_command): Likewise.
5247 * config.in: Regenerate.
5248 * configure: Regenerate.
5250 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5252 * spu-low.c (spu_kill): Wait for inferior to terminate.
5253 Call clear_inferiors.
5254 (spu_detach): Call clear_inferiors.
5256 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5258 * aclocal.m4: Regenerate.
5259 * config.in: Likewise.
5260 * configure: Likewise.
5262 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5264 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5265 (parse_spufs_run): New function.
5266 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5267 (ppc_breakpoint_at): Handle SPU breakpoints.
5269 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5271 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5272 (SPUFS_MAGIC): Define.
5273 (spu_enumerate_spu_ids): New function.
5274 (linux_qxfer_spu): New function.
5275 (linux_target_ops): Install linux_qxfer_spu.
5277 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5279 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5280 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5281 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5282 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5283 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5284 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5285 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5286 (init_registers_powerpc_cell32l): Add prototype.
5287 (init_registers_powerpc_cell64l): Likewise.
5288 (ppc_arch_setup): Detect Cell/B.E. architecture.
5290 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5292 * Makefile.in (datarootdir): New variable.
5294 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5296 * linux-low.c (linux_write_memory): Update debugging output.
5297 * Makefile.in (clean): Add new descriptions.
5298 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5299 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5300 * configure.srv: Add new files for arm*-*-linux*.
5301 * linux-arm-low.c: Add new declarations.
5302 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5303 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5304 (HWCAP_VFPv3D16): New.
5305 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5306 instead of __IWMMXT__.
5307 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5308 (arm_arch_setup): New.
5309 (target_regsets): Remove #ifdef. Add VFP regset.
5310 (the_low_target): Use arm_arch_setup.
5312 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5314 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5315 the main thread again.
5317 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5319 Adding Neutrino gdbserver.
5320 * configure: Regenerated.
5321 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5322 * configure.srv (i[34567]86-*-nto*): New target.
5323 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5324 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5325 (nto_comctrl) [__QNX__]: New function.
5326 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5328 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5330 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5333 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5334 Pedro Alves <pedro@codesourcery.com>
5336 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5337 don't support CONTEXT_EXTENDED_REGISTERS.
5338 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5339 (the_low_target): Install them.
5340 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5341 failing with ERROR_PIPE_NOT_CONNECTED.
5343 2009-06-30 Doug Evans <dje@google.com>
5344 Pierre Muller <muller@ics.u-strasbg.fr>
5346 Add h/w watchpoint support to x86-linux, win32-i386.
5347 * Makefile.in (SFILES): Add i386-low.c
5348 (i386_low_h): Define.
5349 (i386-low.o): Add dependencies.
5350 (linux-x86-low.o): Add i386-low.h dependency.
5351 (win32-i386-low.o): Ditto.
5352 * i386-low.c: New file.
5353 * i386-low.h: New file.
5354 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5355 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5356 * linux-low.c (linux_add_process): Initialize arch_private.
5357 (linux_remove_process): Free arch_private.
5358 (add_lwp): Initialize arch_private.
5359 (delete_lwp): Free arch_private.
5360 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5362 * linux-low.h (process_info_private): New member arch_private.
5363 (lwp_info): New member arch_private.
5364 (linux_target_ops): New members new_process, new_thread,
5366 (ptid_of): New macro.
5367 * linux-x86-low.c: Include stddef.h, i386-low.h.
5368 (arch_process_info): New struct.
5369 (arch_lwp_info): New struct.
5370 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5371 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5372 (i386_dr_low_get_status): New function.
5373 (x86_insert_point, x86_remove_point): New functions.
5374 (x86_stopped_by_watchpoint): New function.
5375 (x86_stopped_data_address): New function.
5376 (x86_linux_new_process, x86_linux_new_thread): New functions.
5377 (x86_linux_prepare_to_resume): New function.
5378 (the_low_target): Add entries for insert_point, remove_point,
5379 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5381 * server.c (debug_hw_points): New global.
5382 (monitor_show_help): Document set debug-hw-points.
5383 (handle_query): Process "set debug-hw-points".
5384 * server.h (debug_hw_points): Declare.
5385 (paddress): Declare.
5386 * utils.c (NUMCELLS, CELLSIZE): New macros.
5387 (get_sell, xsnprintf, paddress): New functions.
5388 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5389 remove_point, stopped_by_watchpoint, stopped_data_address.
5390 * win32-i386-low.c: Include i386-low.h.
5391 (debug_reg_state): Replaces dr.
5392 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5393 (i386_dr_low_get_status): New function.
5394 (i386_insert_point, i386_remove_point): New functions.
5395 (i386_stopped_by_watchpoint): New function.
5396 (i386_stopped_data_address): New function.
5397 (i386_initial_stuff): Update.
5398 (get_thread_context,set_thread_context,i386_thread_added): Update.
5399 (the_low_target): Add entries for insert_point,
5400 remove_point, stopped_by_watchpoint, stopped_data_address.
5401 * win32-low.c (win32_insert_watchpoint): New function.
5402 (win32_remove_watchpoint): New function.
5403 (win32_stopped_by_watchpoint): New function.
5404 (win32_stopped_data_address): New function.
5405 (win32_target_ops): Add entries for insert_watchpoint,
5406 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5407 * win32-low.h (win32_target_ops): New members insert_point,
5408 remove_point, stopped_by_watchpoint, stopped_data_address.
5410 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5412 * server.c (process_serial_event): Re-return unsupported, not
5413 error, if the type isn't recognized. Re-allow supporting only
5414 insert or remove packets. Also call require_running for
5415 breakpoints. Add missing break statement to default case. Tidy.
5416 * target.h (struct target_ops): Rename insert_watchpoint to
5417 insert_point, and remove_watchpoint to remove_point.
5419 * linux-low.h (struct linux_target_ops): Likewise.
5420 * linux-low.c (linux_insert_watchpoint): Rename to ...
5421 (linux_insert_point): ... this. Adjust.
5422 (linux_remove_watchpoint): Rename to ...
5423 (linux_remove_point): ... this. Adjust.
5424 (linux_target_ops): Adjust.
5425 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5426 (cris_insert_point): ... this.
5427 (cris_remove_watchpoint): Rename to ...
5428 (cris_remove_point): ... this.
5429 (the_low_target): Adjust.
5431 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5433 * server.c (handle_v_kill): Pass signal_pid to
5434 kill_inferior if multi_process is zero.
5436 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5438 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5439 * target.h (target_ops): Comment for *_watchpoint to make it clear
5440 the functions can get types '0' and '1'.
5442 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5444 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5445 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5446 * regcache.c (get_regcache): Likewise.
5447 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5448 * win32-low.c (child_fetch_inferior_registers): Remove check for
5451 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5452 Pedro Alves <pedro@codesourcery.com>
5454 * target.h (struct target_ops) <supports_multi_process>: New
5456 (target_supports_multi_process): New.
5457 * server.c (handle_query): Even if GDB reports support, only
5458 enable multi-process if the target also supports it. Report
5459 multi-process support only if the target backend supports it.
5460 * linux-low.c (linux_supports_multi_process): New function.
5461 (linux_target_ops): Install it as target_supports_multi_process
5464 2009-05-24 Doug Evans <dje@google.com>
5466 Global renaming of find_thread_pid to find_thread_ptid.
5467 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5468 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5469 All callers updated.
5471 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5472 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5475 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5476 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5477 (linux_resume_one_lwp): Ditto.
5479 2009-05-23 Doug Evans <dje@google.com>
5481 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5482 from struct inferior_list_entry * to struct lwp_info *.
5483 All callers updated.
5485 2009-05-13 Doug Evans <dje@google.com>
5487 * linux-x86-low.c: Don't include assert.h.
5488 (x86_siginfo_fixup): Use fatal, not assert.
5489 (x86_arch_setup): Fix comment.
5491 2009-05-12 Doug Evans <dje@google.com>
5493 Biarch support for i386/amd64 gdbserver.
5494 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5495 Add linux-x86-low.c.
5496 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5497 (linux-x86-low.o): Add.
5498 * linux-x86-64-low.c: Delete.
5499 * linux-i386-low.c: Delete.
5500 * linux-x86-low.c: New file.
5501 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5503 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5505 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5506 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5507 (linux_child_pid_to_exec_file): New function.
5508 (elf_64_header_p, elf_64_file_p): New functions.
5509 (siginfo_fixup): New function.
5510 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5511 give target a chance to convert layout.
5512 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5513 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5515 2009-05-07 Doug Evans <dje@google.com>
5517 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5518 (regsets_store_inferior_registers): Ditto.
5520 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5524 * linux-low.c (must_set_ptrace_flags): Delete.
5525 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5527 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5528 `lwp->must_set_ptrace_flags' instead.
5529 (linux_wait_for_event_1): Set ptrace options here.
5530 (linux_wait_1): ... not here.
5532 2009-04-30 Doug Evans <dje@google.com>
5534 * inferiors.c (started_inferior_callback): New function.
5535 (attached_inferior_callback): New function.
5536 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5537 * server.c (print_started_pid, print_attached_pid): New functions.
5538 (detach_or_kill_for_exit): New function.
5539 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5540 * server.h (have_started_inferiors_p): Declare.
5541 (have_attached_inferiors_p): Declare.
5543 * inferiors.c (remove_process): Fix memory leak, free process.
5544 * linux-low.c (linux_remove_process): New function.
5545 (linux_kill): Call it instead of remove_process.
5546 (linux_detach, linux_wait_1): Ditto.
5548 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5550 * configure.srv: Add x86 Windows CE target.
5552 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5554 * inferiors.c (get_thread_process): Make global.
5555 * server.h (get_thread_process): Add prototype.
5556 * thread-db.c (find_one_thread): Use get_thread_process
5557 instead of current_process.
5558 (thread_db_get_tls_address): Do not crash if called when
5559 thread layer is not yet initialized.
5561 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5563 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5564 * spu-low.c (current_tid): Rename to ...
5565 (current_ptid): ... this.
5566 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5567 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5568 ptid_get_lwp (current_ptid) instead of current_tid.
5569 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5570 instead of current_tid. Use find_process_pid to verify pid
5571 argument is valid. Pass proper argument to remove_process.
5572 (spu_thread_alive): Compare current_ptid instead of current_tid.
5573 (spu_resume): Likewise.
5575 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5577 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5580 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5582 Implement the multiprocess extensions, and add linux multiprocess
5585 * server.h (ULONGEST): Declare.
5586 (struct ptid, ptid_t): New.
5587 (minus_one_ptid, null_ptid): Declare.
5588 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5589 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5590 (struct inferior_list_entry): Change `id' type from unsigned from
5592 (struct sym_cache, struct breakpoint, struct
5593 process_info_private): Forward declare.
5594 (struct process_info): Declare.
5595 (current_process): Declare.
5596 (all_processes): Declare.
5597 (initialize_inferiors): Declare.
5598 (add_thread): Adjust to use ptid_t.
5599 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5600 (add_process, remove_process, find_thread_pid): Declare.
5601 (find_inferior_id): Adjust to use ptid_t.
5602 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5603 (multi_process): Declare.
5604 (push_event): Adjust to use ptid_t.
5605 (read_ptid, write_ptid): Declare.
5606 (prepare_resume_reply): Adjust to use ptid_t.
5607 (clear_symbol_cache): Declare.
5608 * inferiors.c (all_processes): New.
5609 (null_ptid, minus_one_ptid): New.
5610 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5611 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5612 (add_thread): Change unsigned long to ptid. Remove gdb_id
5614 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5615 (gdb_id_to_thread): Rename to ...
5616 (find_thread_pid): ... this. Change unsigned long to ptid.
5617 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5618 (loaded_dll, pull_pid_from_list): Adjust.
5619 (add_process, remove_process, find_process_pid)
5620 (get_thread_process, current_process, initialize_inferiors): New.
5621 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5622 (struct target_waitstatus) <related_pid>: Ditto.
5623 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5625 (struct target_ops) <join>: Add `pid' argument.
5626 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5627 (struct target_ops) <wait>: Add `ptid' field. Change return type
5629 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5630 (mywait): Add `ptid' argument. Change return type to ptid_t.
5631 (target_pid_to_str): Declare.
5632 * target.c (set_desired_inferior): Adjust to use ptids.
5633 (mywait): Add new `ptid' argument. Adjust.
5634 (target_pid_to_str): New.
5635 * mem-break.h (free_all_breakpoints): Declare.
5636 * mem-break.c (breakpoints): Delelete.
5637 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5638 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5639 to use per-process breakpoint list.
5640 (free_all_breakpoints): New.
5641 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5642 (symbol_cache, all_symbols_looked_up): Delete.
5644 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5646 (prepare_resume_reply): Change ptid argument's type from unsigned
5647 long to ptid_t. Adjust. Implement W;process and X;process.
5648 (free_sym_cache, clear_symbol_cache): New.
5649 (look_up_one_symbol): Adjust to per-process symbol cache. *
5650 * server.c (cont_thread, general_thread, step_thread): Change type
5653 (multi_process): New.
5654 (last_ptid): Change type to ptid_t.
5655 (struct vstop_notif) <ptid>: Change type to ptid_t.
5656 (queue_stop_reply, push_event): Change `ptid' argument's type to
5658 (discard_queued_stop_replies): Add `pid' argument.
5659 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5660 changes. Don't reference the `attached' global.
5661 (attach_inferior): Adjust to mywait interface changes.
5662 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5663 features. Handle and report "multiprocess+". Handle
5665 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5667 (handle_v_kill): New.
5668 (handle_v_stopped): Adjust to use target_pid_to_str.
5669 (handle_v_requests): Allow multiple attaches and runs when
5670 multiprocess extensions are in effect. Handle "vKill".
5671 (myresume): Adjust to use ptids.
5672 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5673 (handle_status): Adjust to discard_queued_stop_replies interface
5675 (first_thread_of, kill_inferior_callback)
5676 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5677 (main): Call initialize_inferiors. Adjust to use ptids, killing
5678 and detaching from all inferiors. Handle multiprocess packet
5680 * linux-low.h: Include gdb_proc_service.h.
5681 (struct process_info_private): New.
5682 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5683 <lwpid_of>: Use ptid_get_lwp.
5684 (get_lwp_thread): Adjust.
5685 (struct lwp_info): Add `dead' member.
5686 (find_lwp_pid): Declare.
5687 * linux-low.c (thread_db_active): Delete.
5688 (new_inferior): Adjust comment.
5689 (inferior_pid): Delete.
5690 (linux_add_process): New.
5691 (handle_extended_wait): Adjust.
5692 (add_lwp): Change unsigned long to ptid.
5693 (linux_create_inferior): Add process to processes table. Adjust
5694 to use ptids. Don't set new_inferior here.
5695 (linux_attach_lwp): Rename to ...
5696 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5697 it. Adjust to use ptids.
5698 (linux_attach_lwp): New.
5699 (linux_attach): Add process to processes table. Don't set
5701 (struct counter): New.
5702 (second_thread_of_pid_p, last_thread_of_process_p): New.
5703 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5705 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5706 processes. Remove process from process table.
5707 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5708 to multiple processes.
5709 (any_thread_of): New.
5710 (linux_detach): Add `pid' argument, and handle it. Remove process
5711 from processes table.
5712 (linux_join): Add `pid' argument. Handle it.
5713 (linux_thread_alive): Change unsighed long argument to ptid_t.
5714 Consider dead lwps as not being alive.
5715 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5716 threads we're not interested in.
5717 (same_lwp, find_lwp_pid): New.
5718 (linux_wait_for_lwp): Change `pid' argument's type from int to
5720 (linux_wait_for_event): Rename to ...
5721 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5722 from int to ptid_t. Adjust.
5723 (linux_wait_for_event): New.
5724 (linux_wait_1): Add `ptid' argument. Change return type to
5725 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5726 that exit from the process table.
5727 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5729 (mark_lwp_dead): New.
5730 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5731 stopping all threads, mark its main lwp as dead.
5732 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5734 (fetch_register, usr_store_inferior_registers)
5735 (regsets_fetch_inferior_registers)
5736 (regsets_store_inferior_registers, linux_read_memory)
5737 (linux_write_memory): Inline `inferior_pid'.
5738 (linux_look_up_symbols): Adjust to use per-process
5740 (linux_request_interrupt): Adjust to use ptids.
5741 (linux_read_auxv): Inline `inferior_pid'.
5742 (initialize_low): Don't reference thread_db_active.
5743 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5744 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5745 (ps_getpid): Return the pid of the current inferior.
5746 * thread-db.c (proc_handle, thread_agent): Delete.
5747 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5749 (find_one_thread): Change argument type to ptid_t. Adjust to
5751 (maybe_attach_thread): Adjust to per-process data and ptids.
5752 (thread_db_find_new_threads): Ditto.
5753 (thread_db_init): Ditto.
5754 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5755 processes table. Adjust to use ptids.
5756 (spu_kill, spu_detach): Adjust interface. Remove process from
5758 (spu_join, spu_thread_alive): Adjust interface.
5759 (spu_wait): Adjust interface. Remove process from processes
5760 table. Adjust to use ptids.
5761 * win32-low.c (current_inferior_tid): Delete.
5762 (current_inferior_ptid): New.
5763 (debug_event_ptid): New.
5764 (thread_rec): Take a ptid. Adjust.
5765 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5766 (child_delete_thread): Ditto.
5767 (do_initial_child_stuff): Add `attached' argument. Add process to
5769 (child_fetch_inferior_registers, child_store_inferior_registers):
5771 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5772 (win32_attach): Pass 1 to do_initial_child_stuff.
5773 (win32_kill): Adjust interface. Remove process from processes
5775 (win32_detach): Ditto.
5776 (win32_join): Adjust interface.
5777 (win32_thread_alive): Take a ptid.
5778 (win32_resume): Adjust to use ptids.
5779 (get_child_debug_event): Ditto.
5780 (win32_wait): Adjust interface. Remove exiting process from
5783 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5785 Non-stop mode support.
5787 * server.h (non_stop): Declare.
5788 (gdb_client_data, handler_func): Declare.
5789 (delete_file_handler, add_file_handler, start_event_loop):
5791 (handle_serial_event, handle_target_event, push_event)
5792 (putpkt_notif): Declare.
5793 * target.h (enum resume_kind): New.
5794 (struct thread_resume): Replace `step' field by `kind' field.
5795 (TARGET_WNOHANG): Define.
5796 (struct target_ops) <wait>: Add `options' argument.
5797 <supports_non_stop, async, start_non_stop>: New fields.
5798 (target_supports_non_stop, target_async): New.
5799 (start_non_stop): Declare.
5800 (mywait): Add `options' argument.
5801 * target.c (mywait): Add `options' argument. Print child exit
5803 (start_non_stop): New.
5804 * server.c (non_stop, own_buf, mem_buf): New globals.
5805 (struct vstop_notif): New.
5806 (notif_queue): New global.
5807 (queue_stop_reply, push_event, discard_queued_stop_replies)
5808 (send_next_stop_reply): New.
5809 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5811 (attach_inferior): In non-stop mode, don't wait for the target
5813 (handle_general_set): Handle QNonStop.
5814 (handle_query): When handling qC, return the current general
5815 thread, instead of the first thread of the list.
5816 (handle_query): If the backend supports non-stop mode, include
5817 QNonStop+ in the qSupported query response.
5818 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5820 (handle_v_attach, handle_v_run): Handle non-stop mode.
5821 (handle_v_stopped): New.
5822 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5823 (myresume): Adjust to use resume_kind. Handle non-stop.
5824 (queue_stop_reply_callback): New.
5825 (handle_status): Handle non-stop mode.
5826 (main): Clear non_stop flag on reconnection. Use the event-loop.
5827 Refactor serial protocol handling from here ...
5828 (process_serial_event): ... to this new function. When GDB
5829 selects any thread, select one here. In non-stop mode, wait until
5830 GDB acks all pending events before exiting.
5831 (handle_serial_event, handle_target_event): New.
5832 * remote-utils.c (remote_open): Install remote_desc in the event
5834 (remote_close): Remove remote_desc from the event loop.
5835 (putpkt_binary): Rename to...
5836 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5837 (putpkt_binary): New as wrapper around putpkt_binary_1.
5838 (putpkt_notif): New.
5839 (prepare_resume_reply): In non-stop mode, don't change the
5841 * event-loop.c: New.
5842 * Makefile.in (OBJ): Add event-loop.o.
5843 (event-loop.o): New rule.
5845 * linux-low.h (pid_of): Moved here.
5847 (get_lwp_thread): Use lwpid_of.
5848 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5849 * linux-low.c (pid_of): Delete.
5850 (inferior_pid): Use lwpid_of.
5851 (linux_event_pipe): New.
5852 (target_is_async_p): New.
5854 (handle_extended_wait): Use lwpid_of.
5855 (add_lwp): Don't set lwpid field.
5856 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5857 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5858 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5859 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5860 first. Adjust to linux_wait_for_event interface changes. Use
5862 (linux_detach): Don't delete the main lwp here.
5863 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5864 (status_pending_p): Don't consider explicitly suspended lwps.
5865 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5866 pointer. Add OPTIONS argument. Change return type to int. Use
5867 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5868 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5869 pointer. Add status pointer argument. Return a pid instead of a
5870 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5871 changes. In non-stop mode, don't switch to a random thread.
5872 (linux_wait): Rename to...
5873 (linux_wait_1): ... this. Add target_options argument, and handle
5874 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5875 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5876 clean exit and signal exit code. Don't stop all threads in
5877 non-stop mode. In all-stop mode, only stop all threads when
5878 reporting a stop to GDB. Handle explicit thread stop requests.
5879 (async_file_flush, async_file_mark): New.
5881 (send_sigstop): Use lwpid_of.
5882 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5883 interface changes. In non-stop mode, don't switch to a random
5885 (linux_resume_one_lwp): Use lwpid_of.
5886 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5887 (linux_resume_one_thread): ... this. Handle resume_stop. In
5888 non-stop mode, don't look for pending flag in all threads.
5889 (resume_status_pending_p): Don't consider explicitly suspended
5891 (my_waitpid): Reimplement. Emulate __WALL.
5892 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5894 (sigchld_handler, linux_supports_non_stop, linux_async)
5895 (linux_start_non_stop): New.
5896 (linux_target_ops): Register linux_supports_non_stop, linux_async
5897 and linux_start_non_stop.
5898 (initialize_low): Install SIGCHLD handler.
5899 * thread-db.c (thread_db_create_event, find_one_thread)
5900 (thread_db_get_tls_address): Use lwpid_of.
5901 * win32-low.c (win32_detach): Adjust to use resume_kind.
5902 (win32_wait): Add `options' argument.
5903 * spu-low.c (spu_resume): Adjust to use resume_kind.
5904 (spu_wait): Add `options' argument.
5906 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5908 Decouple target code from remote protocol.
5910 * target.h (enum target_waitkind): New.
5911 (struct target_waitstatus): New.
5912 (struct target_ops) <wait>: Return an unsigned long. Take a
5913 target_waitstatus pointer instead of a char pointer.
5915 * target.c (mywait): Change prototype to return an unsigned long.
5916 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5917 * server.h (thread_from_wait, old_thread_from_wait): Delete
5919 (prepare_resume_reply): Change prototype to take a
5921 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5922 (last_status, last_ptid): New.
5923 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5924 pid instead of a signal.
5925 (attach_inferior): Remove "status" and "signal" parameters.
5927 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5929 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5930 (handle_v_requests, myresume): Remove "status" and "signal"
5932 (handle_status): New.
5933 (main): Delete local `status'. Adjust.
5934 * remote-utils.c: Include target.h.
5935 (prepare_resume_reply): Change prototype to take a
5936 target_waitstatus. Adjust.
5938 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5940 * spu-low.c (spu_wait): Adjust.
5941 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5943 (win32_wait): Adjust.
5945 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5947 * target.h (struct thread_resume): Delete leave_stopped member.
5948 (struct target_ops): Add a `n' argument to the `resume' callback.
5949 * server.c (start_inferior): Adjust.
5950 (handle_v_cont, myresume): Adjust.
5951 * linux-low.c (check_removed_breakpoint): Adjust to resume
5952 interface change, and to removed leave_stopped field.
5953 (resume_ptr): Delete.
5954 (struct thread_resume_array): New.
5955 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5956 resume interface change.
5957 (linux_continue_one_thread, linux_queue_one_thread)
5958 (resume_status_pending_p): Check if the resume field is NULL
5959 instead of checking the leave_stopped member.
5960 (linux_resume): Adjust to the target resume interface change.
5961 * spu-low.c (spu_resume): Adjust to the target resume interface
5963 * win32-low.c (win32_detach, win32_resume): Ditto.
5965 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5967 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5969 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5971 (linux_continue_one_thread): Only preserve the stepping flag if
5972 there's a pending breakpoint.
5974 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5976 * server.c (main): After the inferior having exited, call
5977 remote_close before exiting gdbserver.
5979 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5981 Fix size of FPSCR in Power 7 processors.
5982 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5983 (PPC_FEATURE_HAS_DFP): New #define.
5984 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5987 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5989 * server.c (handle_query) Whitespace and formatting.
5991 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5993 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5994 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5995 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5996 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5997 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5998 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5999 Makefile.in, configure.ac: Fix whitespace throughout.
6000 * configure: Regenerate.
6002 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6004 * inferiors.c (find_inferior): Make it safe for the callback
6005 function to delete the currently iterated inferior.
6007 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6009 * Makefile.in (linuw_low_h): Move higher.
6010 (thread-db.o): Depend on $(linux_low_h).
6012 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6014 Rename "process" to "lwp" throughout.
6016 * linux-low.c (all_processes): Rename to...
6017 (all_lwps): ... this.
6018 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6019 (add_process): Rename to ...
6020 (add_lwp): ... this. Adjust.
6021 (linux_create_inferior): Adjust.
6022 (linux_attach_lwp): Adjust.
6023 (linux_attach): Adjust.
6024 (linux_kill_one_process): Rename to ...
6025 (linux_kill_one_lwp): ... this. Adjust.
6026 (linux_kill): Adjust.
6027 (linux_detach_one_process): Rename to ...
6028 (linux_detach_one_lwp): ... this. Adjust.
6029 (linux_detach): Adjust.
6030 (check_removed_breakpoint): Adjust.
6031 (status_pending_p): Adjust.
6032 (linux_wait_for_process): Rename to ...
6033 (linux_wait_for_lwp): ... this. Adjust.
6034 (linux_wait_for_event): Adjust.
6035 (send_sigstop): Adjust.
6036 (wait_for_sigstop): Adjust.
6037 (stop_all_processes): Rename to ...
6038 (stop_all_lwps): ... this.
6039 (linux_resume_one_process): Rename to ...
6040 (linux_resume_one_lwp): ... this. Adjust.
6041 (linux_set_resume_request, linux_continue_one_thread)
6042 (linux_queue_one_thread, resume_status_pending_p)
6043 (usr_store_inferior_registers, regsets_store_inferior_registers)
6044 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6046 * linux-low.h (get_process): Rename to ...
6047 (get_lwp): ... this. Adjust.
6048 (get_thread_process): Rename to ...
6049 (get_thread_lwp): ... this. Adjust.
6050 (get_process_thread): Rename to ...
6051 (get_lwp_thread): ... this. Adjust.
6052 (struct process_info): Rename to ...
6053 (struct lwp_info): ... this.
6054 (all_processes): Rename to ...
6055 (all_lwps): ... this.
6056 * proc-service.c (ps_lgetregs): Adjust.
6057 * thread-db.c (thread_db_create_event, find_one_thread)
6058 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6060 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6062 * server.c (handle_query): Handle "qAttached".
6064 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6066 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6067 GPLv3, update license URL.
6069 2009-03-01 Doug Evans <dje@google.com>
6071 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6072 (server_h): Add gdb_signals.h.
6073 (signals.o): Update.
6074 * server.h (target_signal_from_host,target_signal_to_host_p)
6075 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6077 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6079 * remote-utils.c (getpkt): Also generate remote-debug
6080 information if noack_mode is set.
6082 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6084 * server.c (handle_query): Report qXfer:siginfo:read and
6085 qXfer:siginfo:write as supported and handle them.
6086 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6087 * linux-low.c (linux_xfer_siginfo): New.
6088 (linux_target_ops): Set it.
6090 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6092 * server.c (gdbserver_usage): Mention --remote-debug.
6093 (main): Accept '--remote-debug' switch.
6095 2009-01-18 Doug Evans <dje@google.com>
6097 * regcache.c (new_register_cache): No need to check result of xcalloc.
6098 * server.c (handle_search_memory): Back out calls to xmalloc,
6099 result is checked and error is returned to user upon failure.
6100 (handle_query): Ditto. Add more checks for result of malloc.
6101 (handle_v_cont): Check result of malloc, report error back to
6103 (handle_v_run): Ditto. Call freeargv.
6104 * server.h (freeargv): Declare.
6105 * utils.c (freeargv): New fn.
6107 2009-01-15 Doug Evans <dje@google.com>
6109 * gdbreplay.c (perror_with_name): Make arg const char *.
6110 * server.h (target_signal_to_name): Make return type const char *.
6111 * thread-db.c (thread_db_err_str): Make return type const char *.
6112 * utils.c (perror_with_name): Make arg const char *.
6114 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6116 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6117 when handling a EXIT_PROCESS_DEBUG_EVENT.
6119 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6121 * gdbreplay.c (gdbreplay_version): Update copyright year.
6122 * server.c (gdbserver_version): Likewise.
6124 2009-01-05 Doug Evans <dje@google.com>
6126 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6127 (handle_extended_wait): Improve comment.
6129 2008-12-13 Doug Evans <dje@google.com>
6131 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6132 * server.h (ATTR_MALLOC): New macro.
6133 (xmalloc,xcalloc,xstrdup): Declare.
6134 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6135 * inferiors.c: Ditto.
6136 * linux-low.c: Ditto.
6137 * mem-break.c: Ditto.
6138 * regcache.c: Ditto.
6139 * remote-utils.c: Ditto.
6142 * win32-low.c: Ditto.
6144 2008-12-12 Doug Evans <dje@google.com>
6146 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6147 in debugging printf.
6149 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6151 2008-12-09 Doug Evans <dje@google.com>
6153 * linux-low.h (struct process_info): Delete member tid, unused.
6154 * thread-db.c (find_one_thread): Update.
6155 (maybe_attach_thread): Update.
6157 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6159 * target.h (struct target_ops): Add qxfer_osdata member.
6160 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6162 (linux_qxfer_osdata): New functions.
6163 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6165 * server.c (handle_query): Handle "qXfer:osdata:read:".
6166 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6167 (buffer_xml_printf): New functions.
6168 * server.h (struct buffer): New.
6169 (buffer_grow_str, buffer_grow_str0): New macros.
6170 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6171 (buffer_xml_printf): Declare.
6173 2008-11-24 Doug Evans <dje@google.com>
6175 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6177 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6179 * server.c (handle_v_run): Always use the supplied argument list.
6181 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6183 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6184 (xtensa_regmap_table): Add entry for scompare1.
6186 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6188 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6189 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6190 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6191 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6192 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6193 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6194 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6195 XML target descriptions.
6196 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6197 when inferior is running on an ISA 2.05 or later processor. Add
6198 special case to return offset for full 64-bit slot of FPSCR when
6201 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6203 * Makefile.in (SFILES, clean): Added sparc64 files.
6204 (reg-sparc64.o, reg-sparc64.c): New.
6205 * configure.srv (sparc*-*-linux*): New configuration.
6206 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6207 syscall arguments for SPARC.
6208 (regsets_store_inferior_registers): Likewise.
6209 * linux-sparc-low.c: New file.
6211 2008-10-21 Doug Evans <dje@google.com>
6213 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6214 (READLINE_DIR,READLINE_DEP): Delete.
6215 (INTERNAL_CFLAGS): Update.
6216 (LINTFLAGS): Update.
6218 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6220 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6221 whole argv from the last run, not just argv[0].
6223 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6225 * regcache.c (new_register_cache): Return NULL if the register
6226 cache size isn't known yet.
6227 (free_register_cache): Avoid dereferencing a NULL regcache.
6229 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6231 * configure.srv: Merge MIPS and MIPS64.
6233 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6235 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6237 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6239 * Makefile.in: Add required vsx dependencies.
6241 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6242 Declare init_registers_powerpc_vsx32l.
6243 Declare init_registers_powerpc_vsx64l.
6244 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6245 (ppc_arch_setup): Check for VSX in hwcap.
6246 (ppc_fill_vsxregset): New function.
6247 (ppc_store_vsxregset): New function.
6248 Add new VSX entry in regset_info target_regsets.
6250 * configure.srv: Add new VSX dependencies.
6252 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6254 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6255 (remote_open): Set or clear transport_is_reliable.
6256 (putpkt_binary): Don't expect acks in noack mode.
6257 (getpkt): Don't send ack/nac in noack mode.
6258 * server.c (handle_general_set): Handle QStartNoAckMode.
6259 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6261 (main): Reset noack_mode on every connection.
6262 * server.h (noack_mode): Declare.
6264 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6266 * Makefile.in (GDBREPLAY_OBS): New variable.
6267 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6269 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6270 Daniel Jacobowitz <dan@codesourcery.com>
6272 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6273 (usr_store_inferior_registers): Likewise.
6274 (regsets_store_inferior_registers): Likewise.
6276 2008-07-31 Rolf Jansen <rj@surtec.com>
6277 Pedro Alves <pedro@codesourcery.com>
6279 * configure.ac: Check for memmem declaration.
6280 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6281 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6282 (disable_packet_qfThreadInfo): Unconditionally compile.
6283 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6284 * configure, config.in: Regenerate.
6286 2008-07-28 Doug Kwan <dougkwan@google.com>
6288 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6289 (linux_write_memory): Remove declaration of errno.
6291 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6293 * linux-low.c (handle_extended_wait): Do not use "status"
6294 variable uninitialized.
6296 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6298 * server.c (handle_v_attach): Inhibit reporting dll changes.
6300 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6302 * remote-utils.c (prepare_resume_reply): If requested, don't
6303 output "thread:TID" in the T stop reply.
6305 * server.c (disable_packet_vCont, disable_packet_Tthread)
6306 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6307 (handle_query): If requested, disable support for qC, qfThreadInfo
6309 (handle_v_requests): If requested, disable support for vCont.
6310 (gdbserver_show_disableable): New.
6311 (main): Handle --disable-packet and --disable-packet=LIST.
6313 * server.h (disable_packet_vCont, disable_packet_Tthread)
6314 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6316 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6318 * server.c (gdbserver_usage): Mention --version.
6320 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6322 * Makefile.in (gdbreplay.o): New rule.
6324 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6326 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6327 message, not gdbserver.
6329 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6330 Nathan Sidwell <nathan@codesourcery.com>
6331 Joseph Myers <joseph@codesourcery.com>
6333 * acinclude.m4: Include ../../config/acx.m4.
6334 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6335 * configure, config.in: Regenerate.
6336 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6337 * server.c (gdbserver_version): Print PKGVERSION.
6338 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6339 (main): Adjust gdbserver_usage calls.
6340 * gdbreplay.c (version, host_name): Add declarations.
6341 (gdbreplay_version, gdbreplay_usage): New.
6342 (main): Accept --version and --help options.
6344 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6346 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6347 (arm_breakpoint_at): Handle Thumb.
6348 (the_low_target): Add comment.
6350 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6352 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6354 2008-05-09 Doug Evans <dje@google.com>
6356 * server.h (decode_search_memory_packet): Declare.
6357 * remote-utils.c (decode_search_memory_packet): New fn.
6358 * server.c (handle_search_memory_1): New fn.
6359 (handle_search_memory): New fn.
6360 (handle_query): Process qSearch:memory packets.
6362 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6364 * regcache.c (registers_length): Remove.
6365 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6366 full register packet.
6367 * regcache.h (registers_length): Remove prototype.
6368 * server.h (PBUFSIZ): Define to 16384.
6370 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6372 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6373 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6374 powerpc-64l.o, and powerpc-altivec64l.o.
6375 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6376 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6377 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6378 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6379 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6382 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6383 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6384 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6385 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6386 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6387 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6388 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6389 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6390 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6391 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6394 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6395 (init_registers_powerpc_32l): ... this new prototype.
6396 (init_registers_powerpc_32): Remove, replace by ...
6397 (init_registers_powerpc_altivec32l): ... this new prototype.
6398 (init_registers_powerpc_e500): Remove, replace by ...
6399 (init_registers_powerpc_e500l): ... this new prototype.
6400 (init_registers_ppc64): Remove, replace by ...
6401 (init_registers_powerpc_64l): ... this new prototype.
6402 (init_registers_powerpc_64): Remove, replace by ...
6403 (init_registers_powerpc_altivec64l): ... this new prototype.
6404 (ppc_num_regs): Set to 73.
6405 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6406 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6407 (ppc_cannot_store_register): Handle orig_r3 and trap.
6408 (ppc_arch_setup): Update init_registers_... calls.
6409 (ppc_fill_gregset): Handle orig_r3 and trap.
6411 * inferiors.c (clear_inferiors): Reset current_inferior.
6413 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6415 * acinclude.m4: Add override.m4.
6416 * configure: Regenerate.
6418 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6420 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6421 initial call to init_register_ppc64.
6423 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6425 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6426 single powerpc*-*-linux* case.
6427 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6429 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6431 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6432 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6434 * linux-ppc-low.c: Include <elf.h>.
6435 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6436 (ppc_hwcap): New global variable.
6437 (ppc_regmap): Remove __SPE__ #ifdef sections.
6438 (ppc_regmap_e500): New global variable.
6439 (ppc_cannot_store_register): Update __SPE__ special case.
6440 (ppc_get_hwcap): New function.
6441 (ppc_arch_setup): Use it to determine whether inferior supports
6442 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6443 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6444 Do not access registers if target does not support AltiVec.
6445 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6446 Do not access registers if target does not support SPE.
6447 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6449 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6451 * linux-low.c (disabled_regsets, num_regsets): New.
6452 (use_regsets_p): Delete.
6453 (linux_wait_for_process): Clear disabled_regsets.
6454 (regsets_fetch_inferior_registers): Check and set it.
6455 (regsets_store_inferior_registers): Likewise.
6456 (linux_fetch_registers, linux_store_registers): Do not use
6458 (initialize_low): Allocate disabled_regsets.
6460 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6462 * Makefile.in (LIBOBJS): New.
6464 (memmem.o): New rule.
6465 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6466 * configure: Regenerated.
6468 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6470 * server.c (handle_query): Never return "unsupported" for
6471 qXfer:features:read queries.
6473 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6475 * server.c (get_features_xml): Fix inverted condition.
6476 (handle_query): Always support qXfer:feature:read.
6478 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6480 * server.c (wrapper_argv): New.
6481 (start_inferior): Handle wrapper_argv. If set, expect an extra
6483 (gdbserver_usage): Document --wrapper.
6484 (main): Parse --wrapper.
6486 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6488 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6489 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6490 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6491 (ppc_set_pc): Likewise.
6492 (ppc_arch_setup): New function.
6493 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6494 of collect_register.
6495 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6497 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6499 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6500 instead of linux-ppc64-low.o.
6501 * linux-ppc64-low.c: Remove file.
6502 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6503 (linux-ppc64-low.o): Remove rule.
6505 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6506 (init_registers_powerpc_64): Likewise.
6507 (ppc_regmap): Conditionally define depending on __powerpc64__.
6508 (ppc_cannot_store_register): Do not special-case "fpscr" when
6509 compiled on __powerpc64__.
6510 (ppc_collect_ptrace_register): New function.
6511 (ppc_supply_ptrace_register): New function.
6512 (ppc_breakpoint): Change type to "unsigned int".
6513 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6514 (the_low_target): Conditionally provide initializers for the
6515 arch_setup member depending on __powerpc64__. Install
6516 collect_ptrace_register and supply_ptrace_register members.
6518 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6520 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6521 * server.c (gdbserver_xmltarget): Define.
6522 (get_features_xml): Use it to replace "target.xml" and arch_string.
6524 * configure.srv: Remove srv_xmltarget. Add XML files that were
6525 mentioned there to srv_xmlfiles instead. Remove conditional tests
6526 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6527 srv_xmlfiles and srv_regobj to include all possible choices.
6528 * configure.ac (srv_xmltarget): Remove.
6529 (srv_xmlfiles): Do not add "target.xml".
6530 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6531 checks for supplementary target information.
6532 * configure: Regenerate.
6533 * Makefile.in (XML_TARGET): Remove.
6534 (target.xml): Remove rule.
6535 (clean): Do not clean up target.xml.
6536 (.PRECIOUS): Do not mention target.xml.
6538 * target.h (struct target_ops): Remove arch_string member.
6539 * linux-low.c (linux_arch_string): Remove.
6540 (linux_target_ops): Remove arch_string initializer.
6541 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6542 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6543 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6544 * spu-low.c (spu_arch_string): Remove.
6545 (spu_target_ops): Remove arch_string initializer.
6546 * win32-low.c (win32_arch_string): Remove.
6547 (win32_target_ops): Remove arch_string initializer.
6548 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6549 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6550 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6552 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6554 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6555 by collect_ptrace_register and supply_ptrace_register hooks.
6556 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6557 instead of checking for the_low_target.left_pad_xfer.
6558 (usr_store_inferior_registers): Use collect_ptrace_register callback
6559 instead of checking for the_low_target.left_pad_xfer.
6561 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6562 (s390_supply_ptrace_register): Likewise.
6563 (s390_fill_gregset): Call s390_collect_ptrace_register.
6564 (the_low_target): Update.
6566 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6567 (ppc_supply_ptrace_register): Likewise.
6568 (the_low_target): Update.
6570 * linux-i386-low.c (the_low_target): Update.
6571 * linux-x86-64-low.c (the_low_target): Update.
6573 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6575 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6576 reg-s390.o and reg-s390x.o.
6578 * linux-low.c (new_inferior): New global variable.
6579 (linux_create_inferior, linux_attach): Set it.
6580 (linux_wait_for_process): Call the_low_target.arch_setup after the
6581 target has stopped for the first time.
6582 (initialize_low): Do not call the_low_target.arch_setup.
6584 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6585 (s390_set_pc): Likewise.
6586 (s390_arch_setup): New function.
6587 (the_low_target): Use s390_arch_setup as arch_setup routine.
6589 * regcache.c (realloc_register_cache): New function.
6590 (set_register_cache): Call it for each existing regcache.
6592 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6594 * server.h (init_registers): Remove prototype.
6596 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6597 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6598 instead of init_registers ().
6599 * linux-arm-low.c (init_registers_arm): Add prototype.
6600 (init_registers_arm_with_iwmmxt): Likewise.
6601 (the_low_target): Add initializer for arch_setup field.
6602 * linux-cris-low.c (init_registers_cris): Add prototype.
6603 (the_low_target): Add initializer for arch_setup field.
6604 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6605 (the_low_target): Add initializer for arch_setup field.
6606 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6607 (the_low_target): Add initializer for arch_setup field.
6608 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6609 (the_low_target): Add initializer for arch_setup field.
6610 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6611 (the_low_target): Add initializer for arch_setup field.
6612 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6613 (the_low_target): Add initializer for arch_setup field.
6614 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6615 (init_registers_mips64_linux): Likewise.
6616 (the_low_target): Add initializer for arch_setup field.
6617 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6618 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6619 (the_low_target): Add initializer for arch_setup field.
6620 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6621 (init_registers_powerpc_64): Likewise.
6622 (the_low_target): Add initializer for arch_setup field.
6623 * linux-s390-low.c (init_registers_s390): Add prototype.
6624 (init_registers_s390x): Likewise.
6625 (the_low_target): Add initializer for arch_setup field.
6626 * linux-sh-low.c (init_registers_sh): Add prototype.
6627 (the_low_target): Add initializer for arch_setup field.
6628 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6629 (the_low_target): Add initializer for arch_setup field.
6630 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6631 (the_low_target): Add initializer for arch_setup field.
6633 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6634 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6635 instead of init_registers ().
6636 * win32-arm-low.c (init_registers_arm): Add prototype.
6637 (the_low_target): Add initializer for arch_setup field.
6638 * win32-i386-low.c (init_registers_i386): Add prototype.
6639 (the_low_target): Add initializer for arch_setup field.
6641 * spu-low.c (init_registers_spu): Add prototype.
6642 (initialize_low): Call initialie_registers_spu () instead of
6643 initialize_registers ().
6645 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6647 * server.c (handle_v_requests): When handling the vRun and vAttach
6648 packets, if already debugging a process, don't kill it. Return an
6651 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6653 * server.c (handle_query): Correct length check.
6655 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6657 * win32-low.c (do_initial_child_stuff): Add process handle
6658 parameter. Set current_process_handle and current_process_id from the
6659 parameters. Clear globals.
6660 (win32_create_inferior): Don't set current_process_handle and
6661 current_process_id here. Instead pass them on the call to
6662 do_initial_child_stuff.
6663 (win32_attach): Likewise.
6664 (win32_clear_inferiors): New.
6665 (win32_kill): Don't close the current process handle or the
6666 current thread handle here. Instead call win32_clear_inferiors.
6667 (win32_detach): Don't open a new handle to the process. Call
6668 win32_clear_inferiors.
6669 (win32_join): Don't rely on current_process_handle; open a new
6670 handle using the process id.
6671 (win32_wait): Call win32_clear_inferiors when the inferior process
6674 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6676 * server.c (monitor_show_help): Add "exit".
6678 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6680 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6681 (clean): Add reg-xtensa.c.
6682 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6683 * configure.srv (xtensa*-*-linux*) New target.
6684 * linux-xtensa-low.c: New.
6685 * xtensa-xtregs.c: New.
6687 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6689 * hostio.c: Don't include errno.h.
6690 (errno_to_fileio_errno): Move to hostio-errno.
6691 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6692 error number outputting to the target->hostio_last_error callback.
6693 (hostio_packet_error): Use FILEIO_EINVAL directly.
6694 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6695 calls to hostio_error.
6696 * hostio-errno.c: New.
6697 * server.h (hostio_last_error_from_errno): Declare.
6698 * target.h (target_ops): Add hostio_last_error member.
6699 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6700 as hostio_last_error handler.
6701 * spu-low.c (spu_target_ops): Likewise.
6702 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6703 (wince_hostio_last_error): New functions.
6704 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6705 as hostio_last_error handler.
6706 (win32_target_ops) [!_WIN32_WCE]: Register
6707 hostio_last_error_from_errno as hostio_last_error handler.
6708 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6709 (hostio-errno.o): New rule.
6710 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6711 * configure.srv (srv_hostio_err_objs): New variable. Default to
6713 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6714 * configure: Regenerate.
6716 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6718 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6719 (linux_kill, linux_detach): Clean up the process list.
6720 * remote-utils.c (remote_open): Improve port number parsing.
6721 (putpkt_binary, input_interrupt): Only send interrupts if the target
6723 * server.c (extended_protocol): Make static.
6724 (attached): Define earlier.
6725 (exit_requested, response_needed, program_argv): New variables.
6726 (target_running): New.
6727 (start_inferior): Clear attached here.
6728 (attach_inferior): Set attached here.
6729 (require_running): Define.
6730 (handle_query): Use require_running and target_running. Implement
6732 (handle_v_attach, handle_v_run): New.
6733 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6734 (gdbserver_usage): Update.
6735 (main): Redo argument parsing. Handle --debug and --multi. Handle
6736 --attach along with other options or after the port. Save
6737 program_argv. Support no initial program. Resynchronize
6738 communication with GDB after an error. Handle "monitor exit".
6739 Use require_running and target_running. Always allow the extended
6740 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6741 restart in extended mode.
6742 * README: Refer to the GDB manual. Update --attach usage.
6744 2007-12-20 Andreas Schwab <schwab@suse.de>
6746 * linux-low.c (STACK_SIZE): Define.
6747 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6748 (linux_test_for_tracefork): Likewise.
6750 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6752 * linux-low.c (linux_wait_for_event): Update messages. Do not
6753 reinsert auto-delete breakpoints.
6754 * mem-break.c (struct breakpoint): Change return type of handler to
6756 (set_breakpoint_at): Update handler type.
6757 (reinsert_breakpoint_handler): Return 1 instead of calling
6759 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6761 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6762 * mem-break.h (set_breakpoint_at): Update handler type.
6763 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6764 * win32-low.c (auto_delete_breakpoint): New.
6765 (get_child_debug_event): Use it.
6767 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6769 * configure.ac: Check for pread and pwrite.
6770 * hostio.c (handle_pread): Fall back to lseek and read.
6771 (handle_pwrite): Fall back to lseek and write.
6772 * config.in, configure: Regenerated.
6774 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6776 * server.c (myresume): Add own_buf argument.
6777 (main): Update calls.
6779 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6781 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6782 * remote-utils.c (remote_open): Do not call disable_async_io.
6783 (block_async_io): Delete.
6784 (unblock_async_io): Make static.
6785 (initialize_async_io): New.
6786 * server.c (handle_v_cont): Handle async I/O here.
6787 (myresume): Likewise. Move other common resume tasks here...
6788 (main): ... from here. Call initialize_async_io. Disable async
6789 I/O before the main loop.
6790 * server.h (initialize_async_io): Declare.
6791 (block_async_io, unblock_async_io): Delete prototypes.
6792 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6794 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6796 * remote-utils.c (readchar): Allow binary data in received messages.
6798 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6800 * win32-low.c (attaching): New global.
6801 (win32_create_inferior): Clear the `attaching' global.
6802 (win32_attach): Set the `attaching' global.
6803 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6804 attaching. Only set a breakpoint at the entry point if not
6807 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6809 * server.c (main): Don't report dll events on the initial
6810 connection on attaches.
6812 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6814 * server.c (main): Relax numerical bases supported for the pid of
6815 the --attach command line argument.
6817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6819 * win32-low.c (win32_attach): Call OpenProcess before
6820 DebugActiveProcess, not after. Add last error output to error
6823 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6825 * win32-low.c (win32_get_thread_context)
6826 (win32_set_thread_context): New functions.
6827 (thread_rec): Use win32_get_thread_context.
6828 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6829 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6832 2007-12-03 Leo Zayas
6833 Pedro Alves <pedro_alves@portugalmail.pt>
6835 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6837 (child_add_thread): Minor cleanup.
6838 (child_continue): Resume artificially suspended threads before
6839 calling ContinueDebugEvent.
6840 (suspend_one_thread): New.
6841 (fake_breakpoint_event): New.
6842 (get_child_debug_event): Change return type to int. Check here if
6843 gdb sent an interrupt request. If a soft interrupt was requested,
6844 fake a breakpoint event. Return 0 if there is no event to handle,
6846 (win32_wait): Don't check here if gdb sent an interrupt request.
6847 Ensure there is a valid event to handle.
6848 (win32_request_interrupt): Add soft interruption method as last
6851 2007-12-03 Leo Zayas
6852 Pedro Alves <pedro_alves@portugalmail.pt>
6854 * win32-low.h (win32_thread_info): Add descriptions to the
6855 structure members. Replace `suspend_count' counter by a
6857 * win32-low.c (thread_rec): Update condition of when to get the
6858 context from the inferior. Rely on ContextFlags being set if it
6859 has already been retrieved. Only suspend the inferior thread if
6860 we haven't already. Warn if that fails.
6861 (continue_one_thread): s/suspend_count/suspended/. Only call
6862 ResumeThread once. Warn if that fails.
6864 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6866 * win32-low.c (win32_wait): Don't read from the inferior when it
6869 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6871 * Makefile.in (win32_low_h): New variable.
6872 (win32-low.o): Add dependency on $(win32_low_h).
6873 (win32-arm-low.o, win32-i386-low.o): New rules.
6875 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6877 * hostio.c: Correct copyright year.
6879 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6881 * Makefile.in (OBS): Add hostio.o.
6882 (hostio.o): New rule.
6883 * server.h (handle_vFile): Declare.
6884 * hostio.c: New file.
6885 * server.c (handle_v_requests): Take packet_len and new_packet_len
6886 for binary packets. Call handle_vFile.
6887 (main): Update call to handle_v_requests.
6889 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6891 * linux-low.c: Include <sched.h>.
6893 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6895 * linux-low.c (linux_tracefork_grandchild): New.
6896 (linux_tracefork_child): Use clone.
6897 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6899 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6901 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6903 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6905 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6907 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6909 * inferiors.c (change_inferior_id): Delete.
6910 (add_pid_to_list, pull_pid_from_list): New.
6911 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6912 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6913 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6914 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6915 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6916 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6917 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6918 (using_threads): Always set to 1.
6919 (handle_extended_wait): New.
6920 (add_process): Do not set TID.
6921 (linux_create_inferior): Set must_set_ptrace_flags.
6922 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6923 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6924 (linux_thread_alive): Rename TID argument to LWPID.
6925 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6926 (linux_wait_for_event): Do not use TID or check using_threads. Update
6927 call to dead_thread_notify. Call handle_extended_wait.
6928 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6929 (send_sigstop): Delete sigstop_sent.
6930 (wait_for_sigstop): Avoid TID.
6931 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6932 (linux_test_for_tracefork): New.
6933 (linux_lookup_signals): Use thread_db_active and
6934 linux_supports_tracefork_flag.
6935 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6936 * linux-low.h (get_process_thread): Avoid TID.
6937 (struct process_ifo): Move thread_known and tid to the end. Remove
6939 (linux_attach_lwp, thread_db_init): Update prototypes.
6940 * server.h (change_inferior_id): Delete prototype.
6941 (add_pid_to_list, pull_pid_from_list): New prototypes.
6942 * thread-db.c (thread_db_use_events): New.
6943 (find_first_thread): Rename to...
6944 (find_one_thread): ...this. Update callers and messages. Do not
6945 call fatal. Check thread_db_use_events. Do not call
6946 change_inferior_id or new_thread_notify.
6947 (maybe_attach_thread): Update. Do not call new_thread_notify.
6948 (thread_db_init): Set thread_db_use_events. Check use_events.
6949 * utils.c (fatal, warning): Correct message prefix.
6951 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6953 * Makefile.in (clean): Remove new files.
6954 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6955 (powerpc-64.o, powerpc-64.c): New rules.
6956 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6957 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6959 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6961 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6962 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6963 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6964 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6965 (target_regsets): Add AltiVec and SPE register sets.
6966 * configure.ac: Check for AltiVec and SPE.
6967 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6968 (ppc_fill_vrregset, ppc_store_vrregset): New.
6969 (target_regsets): Add AltiVec register set.
6970 * configure: Regenerated.
6972 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6974 * linux-low.c (O_LARGEFILE): Define.
6975 (linux_read_memory): Use /proc/PID/mem.
6976 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6977 * configure, config.in: Regenerated.
6979 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6981 * linux-low.c (linux_wait_for_event): Do not pass signals while
6984 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6986 * win32-low.c (create_process): New.
6987 (win32_create_inferior): Use create_process instead of
6988 CreateProcess. If create_process failed retry appending an ".exe"
6989 suffix. Store the GetLastError result immediatelly after
6990 create_process calls and use it on the call to error.
6992 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6994 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6996 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6998 * configure.ac: Switch license to GPLv3.
7000 2007-08-01 Michael Snyder <msnyder@access-company.com>
7002 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7004 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7006 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7008 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7009 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7010 CloseToolhelp32Snapshot.
7011 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7012 CloseToolhelp32Snapshot.
7014 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7016 * server.c (main): Check for inferior exit before main loop.
7018 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7020 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7021 instead of on tmp_desc.
7023 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7024 Daniel Jacobowitz <dan@codesourcery.com>
7026 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7027 (add_thread): Minor cleanups.
7028 (clear_inferiors): Move lower in the file. Clear the DLL
7030 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7031 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7032 (xml_escape_text): New.
7033 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7035 (handle_v_cont): Report errors.
7036 (gdbserver_version): Update.
7037 (main): Correct size of own_buf. Do not report initial DLL events.
7038 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7039 (unloaded_dll, xml_escape_text): New.
7040 * win32-low.c (enum target_waitkind): Update comments.
7041 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7042 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7043 (win32_EnumProcessModules, win32_GetModuleInformation)
7044 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7045 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7046 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7047 (win32_Module32First, win32_Module32Next, load_toolhelp)
7048 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7049 (get_child_debug_event): Handle DLL events.
7050 (win32_wait): Likewise.
7052 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7054 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7055 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7057 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7059 * win32-low.c (handle_output_debug_string): Ignore event if not
7062 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7064 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7066 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7068 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7070 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7072 * inferiors.c (change_inferior_id): Add comment.
7073 * linux-low.c (check_removed_breakpoint): Add an early
7074 prototype. Improve debug output.
7075 (linux_attach): Doc update.
7076 (linux_detach_one_process, linux_detach): Clean up before releasing
7078 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7079 * linux-low.h (struct process_info): Doc improvement.
7080 * mem-break.c (delete_all_breakpoints): New.
7081 * mem-break.h (delete_all_breakpoints): New prototype.
7082 * thread-db.c (find_first_thread): New.
7083 (thread_db_create_event): Call it instead of
7084 thread_db_find_new_threads. Clean up unused variables.
7085 (maybe_attach_thread): Remove first thread handling.
7086 (thread_db_find_new_threads): Use find_first_thread.
7087 (thread_db_get_tls_address): Likewise.
7089 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7091 * thread-db.c (thread_db_find_new_threads): Add prototype.
7092 (thread_db_create_event): Check for the main thread before adding
7094 (maybe_attach_thread): Only enable event reporting if TID == 0.
7095 (thread_db_get_tls_address): Check for new threads.
7097 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7099 * linux-low.c (linux_create_inferior): Try execv before execvp.
7100 * spu-low.c (spu_create_inferior): Likewise.
7102 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7104 * linux-low.c (linux_create_inferior): Change execv to execvp.
7105 * spu-low.c (spu_create_inferior): Likewies.
7107 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7109 * Makefile.in (clean): Clean new files instead of deleted ones.
7110 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7111 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7113 * configure.srv: Specify XML files and new regformats for MIPS and
7115 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7116 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7117 an entry for the restart register.
7118 (mips_cannot_fetch_register, mips_cannot_store_register)
7119 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7120 register names to match the XML descriptions.
7121 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7122 restart register instead of $0.
7124 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7125 Markus Deuling <deuling@de.ibm.com>
7127 * remote-utils.c (decode_xfer_write): New function.
7128 * server.h (decode_xfer_write): Add prototype.
7129 * server.c (handle_query): Add PACKET_LEN argument. Support
7130 qXfer:spu:read and qXfer:spu:write packets.
7131 (main): Pass packet_len to handle_query.
7132 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7133 * target.h (target_ops): Add qxfer_spu.
7135 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7137 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7138 accessing non-seekable spufs files.
7140 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7142 * server.c (handle_query): Add reply for qC packet.
7144 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7145 Leo Zayas <lerele@champenstudios@com>
7147 * server.h (check_remote_input_interrupt_request): New function.
7148 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7149 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7150 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7151 (check_remote_input_interrupt_request): New function.
7152 * server.h (check_remote_input_interrupt_request): Declare.
7153 * win32-low.c (winapi_DebugBreakProcess,
7154 winapi_GenerateConsoleCtrlEvent): New typedefs.
7155 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7157 (win32_wait): Check for remote interrupt request
7158 with check_remote_input_interrupt_request.
7159 (win32_request_interrupt): New function.
7160 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7162 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7164 * win32-low.c (debug_registers_changed,
7165 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7166 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7167 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7168 (thread_rec): Get context using the low target.
7169 (child_add_thread): Call thread_added on the low target,
7170 which does the same thing.
7172 (do_initial_child_stuff): Remove debug registers references.
7173 Set context using the low target. Resume threads after
7174 setting the contexts.
7175 (child_continue): Remove dead variable. Remove debug
7176 registers references.
7177 (child_fetch_inferior_registers): Go through the low target.
7178 (do_child_store_inferior_registers): Remove.
7179 (child_store_inferior_registers): Go through the low target.
7180 (win32_resume): Remove debug registers references.
7181 Set context using the low target.
7182 (handle_exception): Change return type to void. Don't record
7183 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7184 first chance exception.
7185 (get_child_debug_event): Change return type to void. Remove
7186 goto loop. Always return after waiting for debug event.
7187 (win32_wait): Convert to switch statement. Handle spurious
7190 * win32-i386-low.c (debug_registers_changed,
7191 debug_registers_used): New.
7192 (initial_stuff): Rename to ...
7193 (i386_initial_stuff): ... this. Clear debug registers
7195 (store_debug_registers): Delete.
7196 (i386_get_thread_context): New.
7197 (load_debug_registers): Delete.
7198 (i386_set_thread_context): New.
7199 (i386_thread_added): New.
7200 (single_step): Rename to ...
7201 (i386_single_step): ... this.
7202 (do_fetch_inferior_registers): Rename to ...
7203 (i386_fetch_inferior_register): ... this.
7204 (i386_store_inferior_register): New.
7205 (the_low_target): Adapt to new interface.
7207 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7208 (arm_get_thread_context): New.
7209 (arm_set_thread_context): New.
7211 (do_fetch_inferior_registers): Rename to ...
7212 (arm_fetch_inferior_register): ... this.
7213 (arm_store_inferior_register): New.
7214 (arm_wince_breakpoint): Reimplement as unsigned long.
7215 (arm_wince_breakpoint_len): Define.
7216 (the_low_target): Adapt to new interface.
7218 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7219 load_debug_registers. Add get_thread_context, set_thread_context,
7220 thread_added and store_inferior_register. Rename
7221 fetch_inferior_registers to fetch_inferior_register.
7222 (regptr): Remove declaration.
7224 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7226 * linux-low.c (linux_detach): Change return type to int. Return 0.
7227 * spu-low.c (spu_detach): Likewise.
7229 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7231 * target.h (target_ops): Change return type of detach to int.
7233 (join_inferior): New.
7234 * server.c (main): Don't skip detach support on mingw32.
7235 If the inferior doesn't support detaching return error.
7236 Call join_inferior instead of using waitpid.
7237 * linux-low.c (linux_join): New.
7238 (linux_target_op): Add linux_join.
7239 * spu-low.c (spu_join): New.
7240 (spu_target_ops): Add spu_join.
7241 * win32-low.c (win32_detach): Adapt to new interface.
7242 Reopen current_process_handle before detaching. Issue a child
7243 resume before detaching.
7245 (win32_target_op): Add win32_join.
7247 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7249 * win32-low.c (win32-attach): Fix return value.
7250 * target.h (target_ops): Describe ATTACH return values.
7252 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7254 * win32-low.c (GETPROCADDRESS): Define.
7255 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7256 (winapi_DebugSetProcessKillOnExit): Likewise.
7257 (win32_create_inferior): Force usage of ansi CreateProcessA.
7258 (win32_attach): Use GETPROCADDRESS.
7259 (win32_detach): Likewise.
7261 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7263 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7265 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7267 * win32-low.c: Commit leftover changes from 2007-03-29.
7269 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7271 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7272 fields short instead of int. Add explicit padding.
7273 (i387_cache_to_fsave): Remove unnecessary casts.
7274 (i387_fsave_to_cache): Doc fix.
7275 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7277 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7279 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7280 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7282 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7284 * configure.srv (arm*-*-mingw32ce*): Move near the other
7287 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7289 * configure.ac: Add errno checking.
7290 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7291 sys/file.h and malloc.h.
7292 (AC_CHECK_DECLS): Add perror.
7293 (srv_mingwce): Handle.
7294 * configure.srv (i[34567]86-*-cygwin*): Add
7295 win32-i386-low.o to srv_tgtobj.
7296 (i[34567]86-*-mingw*): Likewise.
7297 (arm*-*-mingw32ce*): Add case.
7298 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7299 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7300 [__MINGW32CE__] (strerror): New function.
7301 [__MINGW32CE__] (errno): Define to GetLastError.
7302 [__MINGW32CE__] (COUNTOF): New macro.
7303 (remote_open): Remove extra close call.
7304 * mem-break.c (delete_breakpoint_at): New function.
7305 * mem-break.h (delete_breakpoint_at): Declare.
7306 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7307 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7308 [USE_WIN32API] (read, write): Add char* casts.
7309 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7310 * server.h: Include wincecompat.h on Windows CE.
7311 [HAVE_ERRNO_H]: Check.
7312 (perror): Declare if not declared.
7313 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7314 (perror_with_name): Remove errno declaration.
7315 * wincecompat.h: New.
7316 * wincecompat.c: New.
7318 * win32-arm-low.c: New.
7319 * win32-i386-low.c: New.
7320 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7321 (OUTMSG2): Make it safe.
7323 (COUNTOF): New macro.
7324 (NUM_REGS): Get it from the low target.
7325 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7326 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7327 (thread_rec): Let low target handle debug registers.
7328 (child_add_thread): Likewise.
7329 (child_init_thread_list): Likewise.
7330 (continue_one_thread): Likewise.
7332 (do_child_fetch_inferior_registers): Move to ...
7333 * win32-i386-low.c: ... here, and rename to ...
7334 (do_fetch_inferior_registers): ... this.
7335 * win32-low.c (child_fetch_inferior_registers):
7336 Go through the low target.
7337 (do_child_store_inferior_registers): Use regptr.
7338 (strwinerror): New function.
7339 (win32_create_inferior): Handle Windows CE.
7340 Use strwinerror instead of strerror on Windows error
7341 codes. Add program to the error output.
7342 Don't close the main thread handle on Windows CE.
7343 (win32_attach): Use coredll.dll on Windows CE.
7344 (win32_kill): Close current process and current
7346 (win32_detach): Use coredll.dll on Windows CE.
7347 (win32_resume): Let low target handle debug registers, and
7349 (handle_exception): Add/Remove initial breakpoint. Avoid
7350 non-existant WSTOPSIG on Windows CE.
7351 (win32_read_inferior_memory): Cast to remove warning.
7352 (win32_arch_string): Go through the low target.
7353 (initialize_low): Call set_breakpoint_data with the low
7354 target's breakpoint.
7355 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7356 FOP_REGNUM, mappings): Move to ...
7357 * win32-i386-low.c: ... here.
7358 * win32-low.c (win32_thread_info): Move to ...
7359 * win32-low.h: ... here.
7360 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7361 win32-arm-low.c and wincecompat.c.
7362 (all:): Add $EXEEXT.
7363 (install-only:): Likewise.
7364 (gdbserver:): Likewise.
7365 (gdbreplay:): Likewise.
7366 * config.in: Regenerate.
7367 * configure: Regenerate.
7369 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7371 * win32-low.c: Rename typedef thread_info to
7372 win32_thread_info throughout.
7374 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7376 * win32-i386-low.c: Rename to ...
7377 * win32-low.c: ... this.
7378 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7379 * Makefile.in: Likewise.
7381 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7383 * remote-utils.c (monitor_output): Constify msg parameter.
7384 * server.h (monitor_output): Likewise.
7385 * win32-i386-low.c (handle_output_debug_string): New.
7386 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7387 handle_output_debug_string.
7388 (get_child_debug_event): Likewise.
7390 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7392 * server.c (main): Correct strtoul check.
7394 2007-03-27 Jon Ringle <jon@ringle.org>
7396 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7398 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7400 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7402 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7404 * terminal.h: Check HAVE_SGTTY_H.
7406 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7408 * remote-utils.c (remote_open): Print out the assigned port number.
7410 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7412 * remote-utils.c (monitor_output): New function.
7413 * server.c (debug_threads): Define here.
7414 (monitor_show_help): New function.
7415 (handle_query): Handle qRcmd.
7416 (main): Do not handle 'd' packet.
7417 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7418 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7421 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7423 * Makefile.in (EXEEXT): New.
7424 (clean): Use $(EXEEXT).
7426 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7428 * target.h (target_ops): Rename send_signal to request_interrupt,
7429 and remove enum target_signal parameter.
7430 * linux-low.c (linux_request_interrupt): Rename from
7431 linux_send_signal, and always send SIGINT.
7432 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7433 and always send SIGINT.
7434 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7436 (input_interrupt): Likewise.
7438 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7440 * server.c (get_features_xml): Check if target implemented
7442 * win32-i386-low.c (win32_arch_string): New.
7443 (win32_target_ops): Add win32_arch_string as arch_string member.
7445 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7447 * spu-low.c (spu_arch_string): New.
7448 (spu_target_ops): Add spu_arch_string.
7450 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7452 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7453 * configure.ac: Do not check for terminal.h.
7454 * configure, config.in: Regenerated.
7456 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7458 * Makefile.in (OBS): Add $(XML_BUILTIN).
7459 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7461 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7462 (arm-with-iwmmxt.c): New.
7463 * config.in, configure: Regenerate.
7464 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7465 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7466 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7467 (arm*-*-linux*): Add iWMMXt and regset support.
7468 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7469 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7470 (arm_store_wmmxregset, target_regsets): New.
7471 * server.c (get_features_xml): Take annex argument. Check builtin
7473 (handle_query): Handle multiple annexes.
7475 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7477 * remote-utils.c [USE_WIN32API] (read, write): Define.
7478 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7481 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7483 * linux-i386-low.c (the_low_target): Set arch_string.
7484 * linux-x86-64-low.c (the_low_target): Likewise.
7485 * linux-low.c (linux_arch_string): New.
7486 (linux_target_ops): Add it.
7487 * linux-low.h (struct linux_target_ops): Add arch_string.
7488 * server.c (write_qxfer_response): Use const void * for DATA.
7489 (get_features_xml): New.
7490 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7491 * target.h (struct target_ops): Add arch_string method.
7493 2007-01-03 Denis Pilat <denis.pilat@st.com>
7494 Daniel Jacobowitz <dan@codesourcery.com>
7496 * linux-low.c (linux_kill): Handle being called with no threads.
7497 * win32-i386-low.c (win32_kill): Likewise.
7498 (get_child_debug_event): Clear current_process_handle.
7500 2006-12-30 Denis PILAT <denis.pilat@st.com>
7501 Daniel Jacobowitz <dan@codesourcery.com>
7503 * remote-utils.c (remote_open): Check the type of specified
7504 serial port devices before opening them.
7505 * server.c (main): Kill the inferior if an error occurs during
7506 the first remote_open.
7508 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7510 * README: Update supported targets.
7512 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7514 * Makefile.in (clean): Remove reg-mips64.c.
7515 (reg-mips64.c, reg-mips64.o): New rules.
7516 * configure.srv: Handle mips64. Include regset support for mips.
7517 * linux-mips-low.c (union mips_register): New.
7518 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7519 (mips_breakpoint, mips_breakpoint_at): Use int.
7520 (mips_collect_register, mips_supply_register)
7521 (mips_collect_register_32bit, mips_supply_register_32bit)
7522 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7523 (mips_store_fpregset, target_regsets): New.
7524 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7526 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7528 * configure.srv: Add target "spu*-*-*".
7529 * Makefile.in (clean): Remove reg-spu.c.
7530 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7531 * spu-low.c: New file.
7533 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7535 * configure.ac: Correct td_thr_tls_get_addr test.
7536 * configure: Regenerated.
7538 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7540 * linux-low.c (linux_wait_for_event): Reformat. Use the
7542 * remote-utils.c (decode_address_to_semicolon): New.
7543 * server.c (pass_signals, handle_general_set): New.
7544 (handle_query): Mention QPassSignals for qSupported.
7545 (main): Call handle_general_set.
7546 * server.h (pass_signals, decode_address_to_semicolon): New.
7548 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7550 * server.c (handle_query): Correct error handling for read_auxv.
7552 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7554 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7555 and srv_linux_thread_db to yes.
7556 * linux-s390-low.c (s390_fill_gregset): New function.
7557 (target_regsets): Define data structure.
7559 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7561 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7562 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7563 * config.in, configure: Regenerated.
7564 * inferiors.c (gdb_id_to_thread): New function.
7565 (gdb_id_to_thread_id): Use it.
7566 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7567 * linux-low.h (struct process_info): Add th member.
7568 (thread_db_get_tls_address): New prototype.
7569 * remote-utils.c (decode_address): Make non-static.
7570 * server.c (handle_query): Handle qGetTLSAddr.
7571 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7572 * target.h (struct target_ops): Add get_tls_address.
7573 * thread-db.c (maybe_attach_thread): Save the thread handle.
7574 (thread_db_get_tls_address): New.
7576 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7578 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7579 (linux_resume_one_process): Take a siginfo_t *. Update all
7580 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7581 (struct pending_signals): Add a siginfo_t.
7582 (linux_wait_for_process): Always set last_status.
7583 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7584 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7585 * linux-low.h (struct process_info): Add last_status.
7587 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7589 * remote-utils.c (try_rle): New function.
7590 (putpkt_binary): Use it.
7592 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7594 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7595 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7596 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7597 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7598 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7601 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7603 * server.c (terminal_fd): New variable.
7604 (old_foreground_pgrp): Likewise.
7605 (restore_old_foreground_pgrp): New function.
7606 (start_inferior): Record the terminal file descriptor in terminal_fd
7607 and its original foreground group in old_foreground_pgrp. Register
7608 restore_old_foreground_pgrp with atexit().
7610 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7612 * server.c (handle_query): Correct qPart to qXfer.
7614 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7616 * configure.ac: Check for more headers which are missing on
7617 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7618 * configure.srv: Add Cygwin and mingw32.
7619 * remote-utils.c: Don't include headers unconditionally which
7620 are missing on mingw32. Include <winsock.h> for mingw32.
7621 (remote_open): Adjust for mingw32 support. Flush
7622 standard error after writing to it.
7623 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7624 (unblock_async_io, enable_async_io, disable_async_io)
7625 (readchar, getpkt): Update for Winsock support.
7626 (prepare_resume_reply): Expect a protocol signal number.
7627 * server.c: Disable <sys/wait.h> on mingw32.
7628 (start_inferior): Adjust for mingw32 support. Flush
7629 standard error after writing to it.
7630 (attach_inferior): Likewise. Use protocol signal
7632 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7634 * win32-i386-low.c: New file.
7635 * Makefile.in (XM_CLIBS): Set.
7636 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7637 (win32-i386-low.o): New dependency rule.
7638 * linux-low.c (linux_wait): Use target signal numbers.
7639 * target.h (struct target_ops): Doc fix.
7640 * server.h (target_signal_to_name): New prototype.
7641 * gdbreplay.c: Don't include headers unconditionally which
7642 are missing on mingw32. Include <winsock.h> for mingw32.
7643 (remote_close, remote_open): Adjust for Winsock support.
7644 * configure, config.in: Regenerated.
7646 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7648 * server.c (decode_xfer_read, write_qxfer_response): New.
7649 (handle_query): Take a packet length argument. Handle
7650 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7651 the qSupported response.
7652 (main): Update call to handle_query.
7654 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7656 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7657 (putpkt_binary): Renamed from putpkt and adjusted for binary
7659 (putpkt): New wrapper for putpkt_binary.
7660 (readchar): Don't mask off the high bit.
7661 (decode_X_packet): New function.
7662 * server.c (main): Call putpkt_binary if a handler sets the packet
7663 length. Save the length of the incoming packet. Handle 'X'.
7664 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7666 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7668 * server.c (handle_query): Handle qSupported.
7670 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7672 * remote-utils.c (all_symbols_looked_up): New variable.
7673 (look_up_one_symbol): Check it.
7674 * server.h (look_up_one_symbol): New declaration.
7675 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7677 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7679 * Makefile.in (linux-arm-low.o): Update dependencies.
7680 * linux-arm-low.c: Include "gdb_proc_service.h".
7681 (PTRACE_GET_THREAD_AREA): Define.
7682 (ps_get_thread_area): New function.
7684 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7686 * configure.srv (m68k*-*-uclinux*): New target.
7687 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7688 (linux_resume_one_process): Remove extraneous cast.
7689 (linux_read_offsets): New.
7690 (linux_target_op): Add linux_read_offsets on mmuless systems.
7691 * server.c (handle_query): Add qOffsets logic.
7692 * target.h (struct target_ops): Add read_offsets.
7694 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7696 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7697 (PTRACE_GET_THREAD_AREA): Define.
7698 (ps_get_thread_area): New function.
7699 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7700 (linux-x86-64-low.o): Update.
7702 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7704 * configure.ac: Remove checks for prfpregset_t.
7705 * gdb_proc_service.h: New file.
7706 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7707 new "gdb_proc_service.h".
7708 * proc-service.c: Likewise.
7709 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7710 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7711 * Makefile.in (gdb_proc_service_h): Updated.
7712 * configure, config.in: Regenerated.
7714 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7716 * remote-utils.c (prepare_resume_reply): Move declaration
7717 of gdb_id_from_wait to the top of the block.
7719 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7721 * linux-low.c (regsets_store_inferior_registers): Read the regset
7722 from the target before filling it.
7724 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7726 * server.c (attach_inferior): Return SIGTRAP for a successful
7729 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7731 * Makefile.in (OBS): Add version.o.
7732 (STAGESTUFF): Delete.
7733 (version.o): Add dependencies.
7734 (version.c): Replace rule.
7735 (clean): Remove version.c.
7736 * server.c (gdbserver_version): New.
7737 (gdbserver_usage): Use printf.
7738 (main): Handle --version and --help.
7739 * server.h (version, host_name): Add declarations.
7741 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7753 * linux-x86-64-low.c:
7756 * linux-ppc64-low.c:
7765 * linux-crisv32-low.c:
7777 * gdbserver.1: Add (C) after Copyright. Update the FSF
7780 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7782 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7783 (arm_breakpoint_at): Recognize both breakpoints.
7784 (the_low_target): Use the correct breakpoint instruction.
7786 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7788 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7789 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7790 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7791 (the_low_target): Update.
7793 2005-10-25 Andreas Schwab <schwab@suse.de>
7795 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7797 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7798 (ia64_num_regs): Reduce to 462.
7800 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7802 * acinclude.m4: Correct quoting.
7803 * aclocal.m4: Regenerated.
7805 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7806 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7807 (thread_db_init): Call thread_db_err_str.
7808 * configure.ac: Check for TD_VERSION.
7809 * config.in, configure: Regenerated.
7811 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7813 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7815 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7817 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7818 is not available. Define HAVE_PTRACE_GETREGS if it is.
7819 * config.in, configure: Regenerated.
7820 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7821 * linux-i386-low.c, linux-m68k-low.c: Update to use
7822 HAVE_PTRACE_GETREGS.
7823 * linux-low.c (regsets_fetch_inferior_registers)
7824 (regsets_store_inferior_registers): Only return 0 if we processed
7826 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7827 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7829 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7831 * inferiors.c (struct thread_info): Add gdb_id.
7832 (add_thread): Add gdb_id argument.
7833 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7834 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7835 calls to add_thread.
7836 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7837 * server.c (handle_query): Use thread_to_gdb_id.
7838 (handle_v_cont, main): Use gdb_id_to_thread_id.
7839 * server.h (add_thread): Update prototype.
7840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7843 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7845 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7846 left-padded registers.
7847 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7848 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7850 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7852 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7853 * configure: Regenerate.
7854 * config.in: Regenerate.
7855 * server.h (NEED_DECLARATION_STRERROR):
7856 Replace with !HAVE_DECL_STRERROR.
7858 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7860 * linux-low.c (linux_wait, linux_send_signal): Don't test
7861 an unsigned long variable for > 0 if it could be MAX_ULONG.
7862 * server.c (myresume): Likewise.
7863 * target.c (set_desired_inferior): Likewise.
7865 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7867 * configure.ac: Simplify and improve check for socklen_t.
7868 * configure, config.in: Regenerate.
7870 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7872 * acconfig.h: Remove.
7873 * configure.ac: Add a test for socklen_t. Use three-argument
7874 AC_DEFINE throughout.
7875 * config.in: Regenerated using autoheader 2.59.
7876 * configure: Regenerated.
7878 * gdbreplay.c (socklen_t): Provide a default.
7879 (remote_open): Use socklen_t.
7880 * remote-utils.c (socklen_t): Provide a default.
7881 (remote_open): Use socklen_t.
7882 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7885 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7887 * linux-low.c (linux_read_memory, linux_write_memory)
7888 (linux_read_auxv): Likewise.
7889 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7890 (check_mem_write): Likewise.
7891 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7893 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7894 (registers_from_string, register_data): Likewise.
7895 * server.c (handle_query, main): Likewise.
7896 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7897 (decode_M_packet): Likewise.
7898 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7899 * target.h (struct target_ops): Update read_memory, write_memory,
7901 (read_inferior_memory, write_inferior_memory): Update.
7902 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7904 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7905 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7906 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7907 linux-s390-low.c, linux-sh-low.c: Update for changes in
7908 read_inferior_memory and the_low_target->breakpoint.
7910 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7912 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7913 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7914 * configure.srv: Add powerpc64-*-linux*.
7915 * linux-ppc64-low.c: New file.
7917 2005-05-23 Orjan Friberg <orjanf@axis.com>
7919 * linux-cris-low.c: New file with support for CRIS.
7920 * linux-crisv32-low.c: Ditto for CRISv32.
7921 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7922 (clean): Add reg-cris.c and reg-crisv32.c.
7923 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7924 reg-crisv32.o, and reg-crisv32.c to make rules.
7925 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7928 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7930 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7931 of sizeof (PTRACE_XFER_TYPE).
7932 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7934 2005-05-12 Orjan Friberg <orjanf@axis.com>
7936 * target.h (struct target_ops): Add insert_watchpoint,
7937 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7938 pointers for hardware watchpoint support.
7939 * linux-low.h (struct linux_target_ops): Ditto.
7940 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7941 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7942 to linux_target_ops.
7943 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7945 * server.c (main): Recognize 'Z' and 'z' packets.
7947 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7949 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7950 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7951 (the_low_target): Add new members.
7953 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7955 * proc-service.c (ps_lgetregs): Search all_processes instead of
7958 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7960 * server.c (start_inferior): Change return type to int.
7961 (attach_inferior): Change sigptr to int *.
7962 (handle_v_cont, handle_v_requests): Change signal to int *.
7963 (main): Change signal to int.
7965 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7967 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7968 * configure.srv: Add m32r*-*-linux*.
7969 * linux-m32r-low.c: New file.
7971 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7973 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7975 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7977 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7978 Take unsigned long arguments for PIDs.
7979 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7980 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7981 (wait_for_sigstop, linux_resume_one_process)
7982 (regsets_fetch_inferior_registers, linux_send_signal)
7983 (linux_read_auxv): Likewise. Update the types of variables holding
7984 PIDs. Update format string specifiers.
7985 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7986 * remote-utils.c (prepare_resume_reply): Likewise.
7987 * server.c (cont_thread, general_thread, step_thread)
7988 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7990 (handle_query): Update format specifiers.
7991 (handle_v_cont, main): Use strtoul for thread IDs.
7992 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7993 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7994 (general_thread, step_thread, thread_from_wait)
7995 (old_thread_from_wait): Update.
7996 * target.h (struct thread_resume): Use unsigned long for THREAD.
7997 (struct target_ops): Use unsigned long for arguments to attach and
8000 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8002 * acinclude.m4: Include bfd/bfd.m4 directly.
8003 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8004 <agriffis@toolchain.org>.
8005 * aclocal.m4, configure: Regenerated.
8007 2005-01-07 Andrew Cagney <cagney@gnu.org>
8009 * configure.ac: Rename configure.in, require autoconf 2.59.
8010 * configure: Re-generate.
8012 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8014 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8016 * aclocal.m4: Regenerated.
8017 * configure: Regenerated.
8019 2004-11-21 Andreas Schwab <schwab@suse.de>
8021 * linux-m68k-low.c (m68k_num_gregs): Define.
8022 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8023 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8024 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8025 (m68k_breakpoint_at): New. Add to the_low_target.
8027 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8028 srv_linux_thread_db to yes.
8030 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8032 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8033 (ARCH_SET_FS): Likewise.
8034 (ARCH_GET_FS): Likewise.
8035 (ARCH_GET_GS): Likewise.
8037 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8039 * linux-i386-low.c (ps_get_thread_area): New.
8040 * linux-x86-64-low.c (ps_get_thread_area): New.
8041 * linux-low.c: Include <sys/syscall.h>.
8042 (linux_kill_one_process): Don't kill the first thread here.
8043 (linux_kill): Kill the first thread here.
8044 (kill_lwp): New function.
8045 (send_sigstop, linux_send_signal): Use it.
8046 * proc-service.c: Clean up #ifdefs.
8047 (fpregset_info): Delete.
8048 (ps_lgetregs): Update and enable implementation.
8049 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8051 * remote-utils.c (struct sym_cache, symbol_cache): New.
8052 (input_interrupt): Print a clearer message.
8053 (async_io_enabled): New variable.
8054 (enable_async_io, disable_async_io): Use it. Update comments.
8055 (look_up_one_symbol): Use the symbol cache.
8056 * thread-db.c (thread_db_look_up_symbols): New function.
8057 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8059 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8061 * configure.in: Test for -rdynamic.
8062 * configure: Regenerated.
8063 * Makefile (INTERNAL_LDFLAGS): New.
8064 (gdbserver, gdbreplay): Use it.
8066 2004-09-02 Andrew Cagney <cagney@gnu.org>
8068 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8070 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8072 * linux-low.c (linux_wait): Clear all_processes list also.
8074 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8076 * linux-low.c: Include <errno.h>. Remove extern declaration of
8079 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8081 * gdbreplay.c, server.h, utils.c: Update copyright years.
8083 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8085 * server.c (main): Print child status or termination signal from
8086 variable 'signal', not 'sig'.
8088 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8090 * linux-low.c (linux_read_memory): Change return type to
8091 int. Check for and return error from ptrace().
8092 * target.c (read_inferior_memory): Change return type to int. Pass
8093 back return status from the_target->read_memory().
8094 * target.h (struct target_ops): Adapt *read_memory() prototype.
8096 (read_inferior_memory): Adapt prototype.
8097 * server.c (main): Return an error packet if
8098 read_inferior_memory() returns an error.
8100 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8102 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8103 Unify with other clean targets.
8105 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8107 * server.c (handle_v_cont): Call set_desired_inferior.
8109 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8111 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8113 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8115 * linux-low.c (linux_wait): Unblock async I/O.
8116 (linux_resume): Block and enable async I/O.
8117 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8118 * server.h (block_async_io, unblock_async_io): Add prototypes.
8120 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8122 * remote-utils.c (remote_open): Print a status notice after
8124 * server.c (attach_inferior): Print a status notice after
8127 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8129 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8131 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8133 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8135 * server.c, target.h: Update copyright years.
8137 2004-02-25 Roland McGrath <roland@redhat.com>
8139 * target.h (struct target_ops): New member `read_auxv'.
8140 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8141 * linux-low.c (linux_read_auxv): New function.
8142 (linux_target_ops): Initialize `read_auxv' member to that.
8144 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8146 Committed by Jim Blandy <jimb@redhat.com>.
8148 * linux-s390-low.c (s390_num_regs): Update.
8149 (s390_regmap): Remove control registers. Use __s390x__ predefine
8150 instead of GPR_SIZE to distiguish s390 and s390x targets.
8152 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8154 * linux-low.c: Update copyright year.
8155 (check_removed_breakpoint): Clear pending_is_breakpoint.
8156 (linux_set_resume_request, linux_queue_one_thread)
8157 (resume_status_pending_p): New functions.
8158 (linux_continue_one_thread): Use process->resume.
8159 (linux_resume): Only resume threads if there are no pending events.
8160 * linux-low.h (struct process_info): Add resume request
8163 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8165 * regcache.c (new_register_cache): Clear the allocated register
8166 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8168 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8170 * linux-low.c (linux_resume): Take a struct thread_resume *
8172 (linux_wait): Update call.
8173 (resume_ptr): New static variable.
8174 (linux_continue_one_thread): Renamed from
8175 linux_continue_one_process. Use resume_ptr.
8176 (linux_resume): Use linux_continue_one_thread.
8177 * server.c (handle_v_cont, handle_v_requests): New functions.
8178 (myresume): New function.
8179 (main): Handle 'v' case.
8180 * target.h (struct thread_resume): New type.
8181 (struct target_ops): Change argument of "resume" to struct
8183 (myresume): Delete macro.
8185 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8187 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8188 (uninstall): Support DESTDIR.
8190 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8192 * configure.srv: Add xscale*linux copy of arm*linux entry.
8194 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8196 * linux-arm-low.c (arm_reinsert_addr): New function.
8197 (the_low_target): Add arm_reinsert_addr.
8199 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8201 * mem-break.c: Remove whitespace at end of file.
8203 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8205 * configure.in: Check whether we need to prototype strerror.
8206 * server.h: Optionally prototype strerror.
8207 * gdbreplay.c (perror_with_name): Use strerror.
8208 * linux-low.c (linux_attach_lwp): Use strerror.
8209 * utils.c (perror_with_name): Use strerror.
8210 * config.in, configure: Regenerated.
8212 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8214 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8215 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8217 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8219 * Makefile.in (SFILES): Update.
8220 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8221 low-sun3.c: Remove files.
8223 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8225 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8226 (linux_detach_one_process, linux_detach): New functions.
8227 (linux_target_ops): Add linux_detach.
8228 * server.c (main): Handle 'D' packet.
8229 * target.h (struct target_ops): Add "detach" member.
8230 (detach_inferior): Define.
8232 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8234 From Kelley Cook <kelleycook@wideopenwest.com>:
8235 * configure.srv: Accept i[34567]86 variants.
8237 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8239 * linux-low.c (linux_wait_for_event): Correct comment typos.
8240 (linux_resume_one_process): Call check_removed_breakpoint.
8241 (linux_send_signal): New function.
8242 (linux_target_ops): Add linux_send_signal.
8243 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8245 * target.h (struct target_ops): Add send_signal.
8247 2003-05-29 Jim Blandy <jimb@redhat.com>
8249 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8250 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8251 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8252 away part of the register's value.
8254 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8256 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8257 (linux_wait_for_event, linux_init_signals): Likewise.
8259 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8261 * configure.in: Check for stdlib.h.
8262 * configure: Regenerated.
8263 * config.in: Regenerated.
8265 2003-01-04 Andreas Schwab <schwab@suse.de>
8267 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8269 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8271 * Makefile.in: Remove obsolete code.
8273 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8275 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8276 defined(PT_FPR0_HI).
8278 2002-11-17 Stuart Hughes <seh@zee2.com>
8280 * linux-arm-low.c (arm_num_regs): Increase.
8281 (arm_regmap): Include status register.
8283 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8285 * linux-low.c (register_addr): Remove incorrect -1 check.
8287 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8289 * linux-low.c (linux_create_inferior): Call setpgid. Return
8291 (unstopped_p, linux_signal_pid): Remove.
8292 (linux_target_ops): Remove linux_signal_pid.
8293 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8294 global instead of target method.
8295 * target.h (struct target_ops): Remove signal_pid. Update comment
8296 for create_inferior.
8297 * server.c (signal_pid): New variable.
8298 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8299 gdbserver. Set the child to be the foreground process group.
8300 (attach_inferior): Set signal_pid.
8302 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8304 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8306 2002-08-20 Jim Blandy <jimb@redhat.com>
8308 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8311 2002-08-01 Andrew Cagney <cagney@redhat.com>
8313 * Makefile.in: Make chill references obsolete.
8315 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8317 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8318 * configure: Regenerate.
8319 * config.in: Regenerate.
8321 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8323 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8324 (perror_with_name, remote_close, remote_open, expect, play): Static.
8326 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8328 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8329 byte offsets instead of an array of indexes.
8330 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8332 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8334 * regcache.c: Add comment.
8336 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8338 * thread-db.c: New file.
8339 * proc-service.c: New file.
8340 * acinclude.m4: New file.
8341 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8342 proc-service.o, and thread-db.o.
8343 (linux-low.o): Add USE_THREAD_DB.
8344 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8345 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8346 * aclocal.m4: Regenerated.
8347 * config.in: Regenerated.
8348 * configure: Regenerated.
8349 * configure.in: Check for proc_service.h, sys/procfs.h,
8350 thread_db.h, and linux/elf.h headrs.
8351 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8352 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8353 Check for -lthread_db and thread support.
8354 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8355 PowerPC, and SuperH.
8356 * i387-fp.c: Constify arguments.
8357 * i387-fp.h: Likewise.
8358 * inferiors.c: (struct thread_info): Renamed from
8359 `struct inferior_info'. Remove PID member. Use generic inferior
8360 list header. All uses updated.
8361 (inferiors, signal_pid): Removed.
8362 (all_threads): New variable.
8363 (get_thread): Define.
8364 (add_inferior_to_list): New function.
8365 (for_each_inferior): New function.
8366 (change_inferior_id): New function.
8367 (add_inferior): Removed.
8368 (remove_inferior): New function.
8369 (add_thread): New function.
8370 (free_one_thread): New function.
8371 (remove_thread): New function.
8372 (clear_inferiors): Use for_each_inferior and free_one_thread.
8373 (find_inferior): New function.
8374 (find_inferior_id): New function.
8375 (inferior_target_data): Update argument type.
8376 (set_inferior_target_data): Likewise.
8377 (inferior_regcache_data): Likewise.
8378 (set_inferior_regcache_data): Likewise.
8379 * linux-low.c (linux_bp_reinsert): Remove.
8380 (all_processes, stopping_threads, using_thrads)
8381 (struct pending_signals, debug_threads, pid_of): New.
8382 (inferior_pid): Replace with macro.
8383 (struct inferior_linux_data): Remove.
8384 (get_stop_pc, add_process): New functions.
8385 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8386 Use add_process and add_thread.
8387 (linux_attach_lwp): New function, based on old linux_attach. Use
8388 add_process and add_thread. Set stop_expected for new threads.
8389 (linux_attach): New function.
8390 (linux_kill_one_process): New function.
8391 (linux_kill): Kill all LWPs.
8392 (linux_thread_alive): Use find_inferior_id.
8393 (check_removed_breakpoints, status_pending_p): New functions.
8394 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8395 Update. Use WNOHANG. Wait for cloned processes also. Update process
8396 struct for the found process.
8397 (linux_wait_for_event): New function.
8398 (linux_wait): Use it. Support LWPs.
8399 (send_sigstop, wait_for_sigstop, stop_all_processes)
8400 (linux_resume_one_process, linux_continue_one_process): New functions.
8401 (linux_resume): Support LWPs.
8402 (REGISTER_RAW_SIZE): Remove.
8403 (fetch_register): Use register_size instead. Call supply_register.
8404 (usr_store_inferior_registers): Likewise. Call collect_register.
8406 (regsets_fetch_inferior_registers): Improve error message.
8407 (regsets_store_inferior_registers): Add debugging.
8408 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8409 (unstopped_p, linux_signal_pid): New functions.
8410 (linux_target_ops): Add linux_signal_pid.
8411 (linux_init_signals): New function.
8412 (initialize_low): Call it. Initialize using_threads.
8413 * regcache.c (inferior_regcache_data): Add valid
8415 (get_regcache): Fetch registers lazily. Add fetch argument
8416 and update all callers.
8417 (regcache_invalidate_one, regcache_invalidate): New
8419 (new_register_cache): Renamed from create_register_cache.
8420 Return the new regcache.
8421 (free_register_cache): Change argument to a void *.
8422 (registers_to_string, registers_from_string): Call get_regcache
8423 with fetch flag set.
8424 (register_data): Make static. Pass fetch flag to get_regcache.
8425 (supply_register): Call get_regcache with fetch flag clear.
8426 (collect_register): Call get_regcache with fetch flag set.
8427 (collect_register_as_string): New function.
8428 * regcache.h: Update.
8429 * remote-utils.c (putpkt): Flush after debug output and use
8431 Handle input interrupts while waiting for an ACK.
8432 (input_interrupt): Use signal_pid method.
8433 (getpkt): Flush after debug output and use stderr.
8434 (outreg): Use collect_register_as_string.
8435 (new_thread_notify, dead_thread_notify): New functions.
8436 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8438 (look_up_one_symbol): Flush after debug output.
8439 * server.c (step_thread, server_waiting): New variables.
8440 (start_inferior): Don't use signal_pid. Update call to mywait.
8441 (attach_inferior): Update call to mywait.
8442 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8443 (main): Don't fetch/store registers explicitly. Use
8444 set_desired_inferior. Support proposed ``Hs'' packet. Update
8447 (struct inferior_list, struct_inferior_list_entry): New.
8448 * target.c (set_desired_inferior): New.
8449 (write_inferior_memory): Constify.
8450 (mywait): New function.
8452 (struct target_ops): New signal_pid method.
8453 (mywait): Removed macro, added prototype.
8455 * linux-low.h (regset_func): Removed.
8456 (regset_fill_func, regset_store_func): New.
8457 (enum regset_type): New.
8458 (struct regset_info): Add type field. Use new operation types.
8459 (struct linux_target_ops): stop_pc renamed to get_pc.
8460 Add decr_pc_after_break and breakpoint_at.
8461 (get_process, get_thread_proess, get_process_thread)
8462 (strut process_info, all_processes, linux_attach_lwp)
8463 (thread_db_init): New.
8465 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8466 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8467 (the_low_target): Add new members.
8468 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8469 (i386_store_fpxregset): Constify.
8470 (target_regsets): Add new kind identifier.
8471 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8472 (i386_set_pc): Add debugging.
8473 (i386_breakpoint_at): New function.
8474 (the_low_target): Add new members.
8475 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8476 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8477 (mips_breakpoint_at): New.
8478 (the_low_target): Add new members.
8479 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8480 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8481 (the_low_target): Add new members.
8482 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8483 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8484 (the_low_target): Add new members.
8485 * linux-x86-64-low.c (target_regsets): Add new kind
8488 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8490 From Martin Pool <mbp@samba.org>:
8491 * server.c (gdbserver_usage): New function.
8494 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8496 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8499 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8501 * Makefile.in: Remove obsolete code.
8503 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8505 * linux-low.c (regsets_fetch_inferior_registers),
8506 (regsets_store_inferior_registers): Removed cast to int from
8508 * regcache.h: Added declaration of struct inferior_info.
8510 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8512 * inferiors.c (struct inferior_info): Add regcache_data.
8513 (add_inferior): Call create_register_cache.
8514 (clear_inferiors): Call free_register_cache.
8515 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8516 * regcache.c (struct inferior_regcache_data): New.
8517 (registers): Remove.
8518 (get_regcache): New function.
8519 (create_register_cache, free_register_cache): New functions.
8520 (set_register_cache): Don't initialize the register cache here.
8521 (registers_to_string, registers_from_string, register_data): Call
8523 * regcache.h: Add prototypes.
8524 * server.h: Likewise.
8526 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8528 * mem-break.c: New file.
8529 * mem-break.h: New file.
8530 * Makefile.in: Add mem-break.o rule; update server.h
8532 * inferiors.c (struct inferior_info): Add target_data
8534 (clear_inferiors): Free target_data member if set.
8535 (inferior_target_data, set_inferior_target_data): New functions.
8536 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8537 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8538 * linux-low.c (linux_bp_reinsert): New variable.
8539 (struct inferior_linux_data): New.
8540 (linux_create_inferior): Use set_inferior_target_data.
8541 (linux_attach): Likewise. Call add_inferior.
8542 (linux_wait_for_one_inferior): New function.
8543 (linux_wait): Call it.
8544 (linux_write_memory): Add const.
8545 (initialize_low): Call set_breakpoint_data.
8546 * linux-low.h (struct linux_target_ops): Add breakpoint
8548 * server.c (attach_inferior): Remove extra add_inferior
8550 * server.h: Include mem-break.h. Update inferior.c
8552 * target.c (read_inferior_memory)
8553 (write_inferior_memory): New functions.
8554 * target.h (read_inferior_memory)
8555 (write_inferior_memory): Change macros to prototypes.
8556 (struct target_ops): Update comments. Add const to write_memory
8559 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8561 * linux-low.c (usr_store_inferior_registers): Support
8562 registers which are allowed to fail to store.
8563 * linux-low.h (linux_target_ops): Likewise.
8564 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8565 (ppc_cannot_store_register): FPSCR may not be storable.
8567 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8569 * server.h: Include <string.h> if HAVE_STRING_H.
8570 * ChangeLog: Correct paths in last ChangeLog entry.
8572 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8574 * linux-low.h: Remove obsolete prototypes.
8575 (struct linux_target_ops): New.
8576 (extern the_low_target): New.
8577 * linux-low.c (num_regs, regmap): Remove declarations.
8578 (register_addr): Use the_low_target explicitly.
8579 (fetch_register): Likewise.
8580 (usr_fetch_inferior_registers): Likewise.
8581 (usr_store_inferior_registers): Likewise.
8582 * linux-arm-low.c (num_regs): Remove.
8583 (arm_num_regs): Define.
8584 (arm_regmap): Renamed from regmap, made static.
8585 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8587 (arm_cannot_store_register): Renamed from cannot_store_register,
8589 (the_low_target): New.
8590 * linux-i386-low.c (num_regs): Remove.
8591 (i386_num_regs): Define.
8592 (i386_regmap): Renamed from regmap, made static.
8593 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8595 (i386_cannot_store_register): Renamed from cannot_store_register,
8597 (the_low_target): New.
8598 * linux-ia64-low.c (num_regs): Remove.
8599 (ia64_num_regs): Define.
8600 (ia64_regmap): Renamed from regmap, made static.
8601 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8603 (ia64_cannot_store_register): Renamed from cannot_store_register,
8605 (the_low_target): New.
8606 * linux-m68k-low.c (num_regs): Remove.
8607 (m68k_num_regs): Define.
8608 (m68k_regmap): Renamed from regmap, made static.
8609 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8611 (m68k_cannot_store_register): Renamed from cannot_store_register,
8613 (the_low_target): New.
8614 * linux-mips-low.c (num_regs): Remove.
8615 (mips_num_regs): Define.
8616 (mips_regmap): Renamed from regmap, made static.
8617 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8619 (mips_cannot_store_register): Renamed from cannot_store_register,
8621 (the_low_target): New.
8622 * linux-ppc-low.c (num_regs): Remove.
8623 (ppc_num_regs): Define.
8624 (ppc_regmap): Renamed from regmap, made static.
8625 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8627 (ppc_cannot_store_register): Renamed from cannot_store_register,
8629 (the_low_target): New.
8630 * linux-s390-low.c (num_regs): Remove.
8631 (s390_num_regs): Define.
8632 (s390_regmap): Renamed from regmap, made static.
8633 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8635 (s390_cannot_store_register): Renamed from cannot_store_register,
8637 (the_low_target): New.
8638 * linux-sh-low.c (num_regs): Remove.
8639 (sh_num_regs): Define.
8640 (sh_regmap): Renamed from regmap, made static.
8641 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8643 (sh_cannot_store_register): Renamed from cannot_store_register,
8645 (the_low_target): New.
8646 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8647 (the_low_target): New.
8649 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8651 * Makefile.in: Add stamp-h target.
8652 * configure.in: Create stamp-h.
8653 * configure: Regenerated.
8655 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8657 * inferiors.c: New file.
8658 * target.c: New file.
8659 * target.h: New file.
8660 * Makefile.in: Add target.o and inferiors.o. Update
8662 * linux-low.c (inferior_pid): New static variable,
8663 moved from server.c.
8664 (linux_create_inferior): Renamed from create_inferior.
8665 Call add_inferior. Return 0 on success instead of a PID.
8666 (linux_attach): Renamed from myattach.
8667 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8668 (linux_thread_alive): Renamed from mythread_alive.
8669 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8671 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8672 (regsets_store_inferior_registers): Correct error message.
8673 Add missing ``return 0''.
8674 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8675 (linux_store_registers): Renamed from store_inferior_registers.
8676 (linux_read_memory): Renamed from read_inferior_memory.
8677 (linux_write_memory): Renamed from write_inferior_memory.
8678 (linux_target_ops): New structure.
8679 (initialize_low): Call set_target_ops ().
8680 * remote-utils.c (unhexify): New function.
8681 (hexify): New function.
8682 (input_interrupt): Send signals to ``signal_pid''.
8683 * server.c (inferior_pid): Remove.
8684 (start_inferior): Update create_inferior call.
8685 (attach_inferior): Call add_inferior.
8686 (handle_query): New function.
8687 (main): Call handle_query for `q' packets.
8688 * server.h: Include "target.h". Remove obsolete prototypes.
8689 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8691 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8693 * Makefile.in: Add WARN_CFLAGS. Update configury
8695 * configure.in: Check for <string.h>
8696 * configure: Regenerate.
8697 * config.in: Regenerate.
8698 * gdbreplay.c: Include needed system headers.
8699 (remote_open): Remove strchr prototype.
8700 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8701 * regcache.c (supply_register): Change buf argument to const void *.
8702 (supply_register_by_name): Likewise.
8703 (collect_register): Change buf argument to void *.
8704 (collect_register_by_name): Likewise.
8705 * regcache.h: Add missing prototypes.
8706 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8707 * server.c (handle_query): New function.
8708 (attached): New static variable, moved out of main.
8709 (main): Quiet longjmp clobber warnings.
8710 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8711 * utils.c (error): Remove NORETURN.