1 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7 Stan Shebs <stan@codesourcery.com>
9 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10 (all): Depend on $(extra_libraries).
11 (install-only): Install the IPA.
12 (IPA_OBJS, IPA_LIB): New.
13 (clean): Remove the IPA lib.
14 (IPAGENT_CFLAGS): New.
15 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
18 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
19 * configure.ac: Check for atomic builtins support in the compiler.
20 (IPA_DEPFILES, extra_libraries): Define.
21 * configure.srv (ipa_obj): Add description.
22 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
23 (i[34567]86-*-linux*): Set ipa_obj.
24 (x86_64-*-linux*): Set ipa_obj.
25 * linux-low.c (stabilizing_threads): New.
26 (supports_fast_tracepoints): New.
27 (linux_detach): Stabilize threads before detaching.
28 (handle_tracepoints): Handle internal tracing breakpoints. Assert
29 the lwp is either not stabilizing, or is moving out of a jump pad.
30 (linux_fast_tracepoint_collecting): New.
31 (maybe_move_out_of_jump_pad): New.
32 (enqueue_one_deferred_signal): New.
33 (dequeue_one_deferred_signal): New.
34 (linux_wait_for_event_1): If moving out of a jump pad, defer
35 pending signals to later.
36 (linux_stabilize_threads): New.
37 (linux_wait_1): Check if threads need moving out of jump pads, and
39 (stuck_in_jump_pad_callback): New.
40 (move_out_of_jump_pad_callback): New.
42 (linux_resume_one_lwp): Handle moving out of jump pads.
43 (linux_set_resume_request): Dequeue deferred signals.
44 (need_step_over_p): Also step over fast tracepoint jumps.
45 (start_step_over): Also uninsert fast tracepoint jumps.
46 (finish_step_over): Also reinsert fast tracepoint jumps.
47 (linux_install_fast_tracepoint_jump): New.
48 (linux_target_ops): Install linux_stabilize_threads and
49 linux_install_fast_tracepoint_jump_pad.
50 * linux-low.h (linux_target_ops) <get_thread_area,
51 install_fast_tracepoint_jump_pad>: New fields.
52 (struct lwp_info) <collecting_fast_tracepoint,
53 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
54 (linux_get_thread_area): Declare.
55 * linux-x86-low.c (jump_insn): New.
56 (x86_get_thread_area): New.
59 (amd64_install_fast_tracepoint_jump_pad): New.
60 (i386_install_fast_tracepoint_jump_pad): New.
61 (x86_install_fast_tracepoint_jump_pad): New.
62 (the_low_target): Install x86_get_thread_area and
63 x86_install_fast_tracepoint_jump_pad.
64 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
65 (struct fast_tracepoint_jump): New.
66 (fast_tracepoint_jump_insn): New.
67 (fast_tracepoint_jump_shadow): New.
68 (find_fast_tracepoint_jump_at): New.
69 (fast_tracepoint_jump_here): New.
70 (delete_fast_tracepoint_jump): New.
71 (set_fast_tracepoint_jump): New.
72 (uninsert_fast_tracepoint_jumps_at): New.
73 (reinsert_fast_tracepoint_jumps_at): New.
74 (set_breakpoint_at): Use write_inferior_memory.
75 (uninsert_raw_breakpoint): Use write_inferior_memory.
76 (check_mem_read): Mask out fast tracepoint jumps.
77 (check_mem_write): Mask out fast tracepoint jumps.
78 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
79 (set_fast_tracepoint_jump): Declare.
80 (delete_fast_tracepoint_jump)
81 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
82 (reinsert_fast_tracepoint_jumps_at): Declare.
83 * regcache.c: Don't compile many functions when building the
84 in-process agent library.
85 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
86 the register buffer in the heap.
87 (free_register_cache): If the register buffer isn't owned by the
88 regcache, don't free it.
89 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
90 pre-existing register caches.
91 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
93 (convert_ascii_to_int): : Constify `from' parameter type.
94 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
95 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
96 the needed buffer in-place.
97 (relocate_instruction): New.
98 * server.c (handle_query) <qSymbols>: If the target supports
99 tracepoints, give it a chance of looking up symbols. Report
100 support for fast tracepoints.
101 (handle_status): Stabilize threads.
102 (process_serial_event): Adjust.
103 * server.h (struct fast_tracepoint_jump): Forward declare.
104 (struct process_info) <fast_tracepoint_jumps>: New field.
105 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
106 (decode_X_packet, decode_M_packet): Adjust.
107 (relocate_instruction): Declare.
108 (in_process_agent_loaded): Declare.
109 (tracepoint_look_up_symbols): Declare.
110 (struct fast_tpoint_collect_status): Declare.
111 (fast_tracepoint_collecting): Declare.
112 (force_unlock_trace_buffer): Declare.
113 (handle_tracepoint_bkpts): Declare.
114 (initialize_low_tracepoint)
115 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
116 * target.h (struct target_ops) <stabilize_threads,
117 install_fast_tracepoint_jump_pad>: New fields.
118 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
119 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
120 [HAVE_STDINT_H]: Include stdint.h.
121 (trace_debug_1): Rename to ...
122 (trace_vdebug): ... this.
123 (trace_debug): Rename to ...
124 (trace_debug_1): ... this. Add `level' parameter.
126 (ATTR_USED, ATTR_NOINLINE): New.
127 (IP_AGENT_EXPORT): New.
128 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
129 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
130 (about_to_request_buffer_space, trace_buffer_is_full)
131 (stopping_tracepoint, expr_eval_result, error_tracepoint)
132 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
133 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
134 (traceframe_write_count, traceframes_created)
135 (trace_state_variables)
136 New renaming defines.
137 (struct ipa_sym_addresses): New.
138 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
140 (ipa_sym_addrs): New.
141 (all_tracepoint_symbols_looked_up): New.
142 (in_process_agent_loaded): New.
143 (write_e_ipa_not_loaded): New.
144 (maybe_write_ipa_not_loaded): New.
145 (tracepoint_look_up_symbols): New.
146 (debug_threads) [IN_PROCESS_AGENT]: New.
147 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
148 (UNKNOWN_SIDE_EFFECTS): New.
150 (flush_trace_buffer): New.
151 (stop_tracing_bkpt): New.
152 (flush_trace_buffer_bkpt): New.
153 (read_inferior_integer): New.
154 (read_inferior_uinteger): New.
155 (read_inferior_data_pointer): New.
156 (write_inferior_data_pointer): New.
157 (write_inferior_integer): New.
158 (write_inferior_uinteger): New.
159 (struct collect_static_trace_data_action): Delete.
160 (enum tracepoint_type): New.
161 (struct tracepoint) <type>: New field `type'.
162 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
163 <orig_size, obj_addr_on_target, adjusted_insn_addr>
164 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
165 (tracepoints): Use IP_AGENT_EXPORT.
166 (last_tracepoint): Don't include in the IPA.
167 (stopping_tracepoint): Use IP_AGENT_EXPORT.
168 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
169 (alloced_trace_state_variables): New.
170 (trace_state_variables): Use IP_AGENT_EXPORT.
171 (traceframe_t): Delete unused variable.
172 (circular_trace_buffer): Don't include in the IPA.
173 (trace_buffer_start): Delete.
174 (struct trace_buffer_control): New.
175 (trace_buffer_free): Delete.
176 (struct ipa_trace_buffer_control): New.
177 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
178 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
180 (trace_buffer_ctrl): New.
181 (TRACE_BUFFER_CTRL_CURR): New.
182 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
183 Reimplement as macros.
184 (trace_buffer_wrap): Delete.
185 (traceframe_write_count, traceframe_read_count)
186 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
187 (struct tracepoint_hit_ctx) <type>: New field.
188 (struct fast_tracepoint_ctx): New.
189 (memory_barrier): New.
191 (record_tracepoint_error): Update atomically in the IPA.
192 (clear_inferior_trace_buffer): New.
193 (about_to_request_buffer_space): New.
194 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
195 updating the same buffer.
196 (add_tracepoint): Default the tracepoint's type to trap
197 tracepoint, and orig_size to -1.
198 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
200 (create_trace_state_variable): New parameter `gdb'. Handle it.
201 (clear_installed_tracepoints): Clear fast tracepoint jumps.
202 (cmd_qtdp): Handle fast tracepoints.
204 (max_jump_pad_size): New.
205 (gdb_jump_pad_head): New.
206 (get_jump_space_head): New.
207 (claim_jump_space): New.
208 (sort_tracepoints): New.
209 (MAX_JUMP_SIZE): New.
210 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
212 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
213 support. Upload fast traceframes, and delete internal IPA
215 (stop_tracing_handler): New.
216 (flush_trace_buffer_handler): New.
217 (cmd_qtstop): Upload fast tracepoints.
218 (response_tracepoint): Handle fast tracepoints.
219 (tracepoint_finished_step): Upload fast traceframes. Set the
220 tracepoint hit context's tracepoint type.
221 (handle_tracepoint_bkpts): New.
222 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
223 type. Add comment about fast tracepoints.
224 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
225 non-existing action_str field.
226 (get_context_regcache): Handle fast tracepoints.
227 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
229 (fast_tracepoint_from_jump_pad_address): New.
230 (fast_tracepoint_from_ipa_tpoint_address): New.
232 (force_unlock_trace_buffer): New.
233 (fast_tracepoint_collecting): New.
236 (write_inferior_data_ptr): New.
237 (target_tp_heap): New.
238 (target_malloc): New.
239 (download_agent_expr): New.
241 (download_tracepoints): New.
242 (download_trace_state_variables): New.
243 (upload_fast_traceframes): New.
244 (IPA_FIRST_TRACEFRAME): New.
245 (IPA_NEXT_TRACEFRAME_1): New.
246 (IPA_NEXT_TRACEFRAME): New.
247 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
248 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
249 (gdb_jump_pad_buffer_end): New.
250 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
251 (initialize_tracepoint): Adjust.
252 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
253 buffer. Initialize the low module.
254 * utils.c (PREFIX, TOOLNAME): New.
255 (malloc_failure): Use PREFIX.
256 (error): In the IPA, an error causes an exit.
257 (fatal, warning): Use PREFIX.
258 (internal_error): Use TOOLNAME.
259 (NUMCELLS): Increase to 10.
260 * configure, config.in: Regenerate.
262 2010-06-01 Pedro Alves <pedro@codesourcery.com>
264 * server.c (handle_query) <qSupported>: Do two passes over the
265 qSupported string to avoid nesting strtok.
267 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
269 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
271 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
273 * configure: Regenerate.
274 * proc-service.list: New.
276 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
278 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
281 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
283 * gdbreplay.c (remote_open): Check error return from socket() call by
284 its equality to -1 not by it being negative.
285 * remote-utils.c (remote_open): Likewise.
287 2010-05-23 Pedro Alves <pedro@codesourcery.com>
289 * config.h: Regenerate.
291 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
293 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
294 doesn't provide PTRACE_GET_THREAD_AREA.
296 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
298 * linux-m68k-low.c: Include <asm/ptrace.h>
299 (ps_get_thread_area): Implement.
301 2010-05-03 Doug Evans <dje@google.com>
303 * event-loop.c (struct callback_event): New struct.
304 (callback_list): New global.
305 (append_callback_event, delete_callback_event): New functions.
306 (process_callback): New function.
307 (start_event_loop): Call it.
308 * remote-utils.c (NOT_SCHEDULED): Define.
309 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
310 moved out of readchar.
311 (readchar): Rewrite. Call reschedule before returning.
312 (reset_readchar): New function.
313 (remote_close): Call it.
314 (process_remaining, reschedule): New functions.
315 * server.h (callback_handler_func): New typedef.
316 (append_callback_event, delete_callback_event): Declare.
318 2010-05-03 Pedro Alves <pedro@codesourcery.com>
320 * proc-service.c (ps_pglobal_lookup): Use
321 thread_db_look_up_one_symbol.
322 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
323 parameter. Use it instead of all_symbols_looked_up.
324 * server.h (struct process_info) <all_symbols_looked_up>: Delete
326 (all_symbols_looked_up): Don't declare.
327 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
328 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
330 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
331 Set all_symbols_looked_up here.
332 (thread_db_look_up_one_symbol): New.
333 (thread_db_get_tls_address): Adjust.
334 (thread_db_load_search, try_thread_db_load_1): Always allocate the
335 thread_db object on the heap, and tentatively set it in the
337 (thread_db_init): Don't set all_symbols_looked_up here.
338 * linux-low.h (thread_db_look_up_one_symbol): Declare.
340 2010-05-03 Pedro Alves <pedro@codesourcery.com>
342 * linux-low.c (linux_kill, linux_detach): Adjust.
343 (status_pending_p_callback): Remove redundant statement. Check
344 for !TARGET_WAITIKIND_IGNORE, instead of
345 TARGET_WAITKIND_STOPPED.
346 (handle_tracepoints): Make sure LWP is locked. Adjust.
347 (linux_wait_for_event_1): Adjust.
348 (linux_cancel_breakpoints): New.
349 (unsuspend_one_lwp): New.
350 (unsuspend_all_lwps): New.
351 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
352 (send_sigstop_callback): Change return type to int, add new
353 `except' parameter and handle it.
354 (suspend_and_send_sigstop_callback): New.
355 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
356 pass them down. If SUSPEND, also increment the lwp's suspend
358 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
359 (need_step_over_p): Don't consider suspended LWPs.
360 (start_step_over): Adjust.
361 (proceed_one_lwp): Change return type to int, add new `except'
362 parameter and handle it.
363 (unsuspend_and_proceed_one_lwp): New.
364 (proceed_all_lwps): Use find_inferior instead of
366 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
367 also decrement the suspend count of LWPs. Pass `except' down,
368 instead of hacking its suspend count.
369 (linux_pause_all): Add `freeze' parameter. Adjust.
370 (linux_unpause_all): New.
371 (linux_target_ops): Install linux_unpause_all.
372 * server.c (handle_status): Adjust.
373 * target.h (struct target_ops): New fields `unpause_all' and
374 `cancel_breakpoints'. Add new parameter to `pause_all'.
375 (pause_all): Add new `freeze' parameter.
377 (cancel_breakpoints): New.
378 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
380 (cmd_qtstart): Pause threads.
381 (stop_tracing): Pause threads, and cancel breakpoints.
382 * win32-low.c (win32_target_ops): Adjust.
384 2010-05-03 Pedro Alves <pedro@codesourcery.com>
386 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
387 the inferior right away from here...
388 (linux_wait_1): ... to here, and adjust to check the thread's
389 last_resume_kind instead of the lwp's step or stop_expected flags.
391 2010-05-02 Pedro Alves <pedro@codesourcery.com>
393 * README: Use consistent `GDB' and `GDBserver' spellings.
395 2010-05-02 Pedro Alves <pedro@codesourcery.com>
397 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
398 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
399 (linux_detach_one_lwp): Assume the lwp is stopped.
400 (any_thread_of): Delete.
401 (linux_detach): Stop all lwps here. Don't blindly delete all
403 (delete_lwp_callback): New.
404 (linux_mourn): Delete all lwps of the process that is gone.
405 (linux_wait_1): Don't delete the last lwp of the process here.
406 * mem-break.h (mark_breakpoints_out): Declare.
407 * mem-break.c (mark_breakpoints_out): New.
408 (free_all_breakpoints): Use it.
409 * server.c (handle_target_event): If the process is gone, mark
411 * thread-db.c (struct thread_db) <create_bp>: New field.
412 (thread_db_enable_reporting): Fix prototype. Store a thread event
413 breakpoint reference in the thread_db struct.
414 (thread_db_load_search): Clear the thread_db object.
415 (try_thread_db_load_1): Ditto.
416 (switch_to_process): New.
417 (disable_thread_event_reporting): Use it.
418 (remove_thread_event_breakpoints): New.
419 (thread_db_detach, thread_db_mourn): Use it.
421 2010-05-01 Pedro Alves <pedro@codesourcery.com>
423 * linux-low.c (linux_enable_event_reporting): New.
424 (linux_wait_for_event_1, handle_extended_wait): Use it.
426 2010-04-30 Pedro Alves <pedro@codesourcery.com>
428 * linux-low.c (linux_kill_one_lwp, linux_kill)
429 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
430 (send_sigstop): Take an lwp_info as parameter instead. Queue a
431 SIGSTOP even if the LWP is stopped.
432 (send_sigstop_callback): New.
433 (stop_all_lwps): Use send_sigstop_callback instead.
434 (linux_resume_one_thread): Adjust.
435 (proceed_one_lwp): Still proceed an LWP that the client has
436 requested to stop, if we haven't reported it as stopped yet. Make
437 sure that LWPs the client want stopped, have a pending SIGSTOP.
439 2010-04-26 Doug Evans <dje@google.com>
441 * server.c (handle_general_set): Make static.
443 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
444 Print received char after testing for error/eof instead of before.
445 (input_interrupt): Tweak comment.
447 2010-04-23 Doug Evans <dje@google.com>
449 * server.c (start_inferior): Print inferior argv if --debug.
451 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
453 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
454 * nto-x86-low.c: Include server.h
456 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
458 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
459 be consistent with other sources of this directory.
460 (init_registers_amd64): Correct name of source file of this function
463 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
465 * configure.srv (x86_64-*-mingw*): New configuration for Windows
468 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
470 * win32-i386-low.c: Add 64-bit support.
471 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
472 (init_registers_amd64): Declare.
473 (mappings): Add 64-bit version of array.
474 (init_windows_x86): New function.
475 (the_low_target): Change init_arch field to init_windows_x86.
477 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
479 * win32-low.c: Adapt to support also 64-bit architecture.
480 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
481 (get_image_name): Use SIZE_T type for local variable `done'.
482 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
483 (toolhelp_get_dll_name): Idem.
484 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
485 Use uintptr_t typecast to avoid warning.
486 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
487 (handle_exception): Use phex_nz to avoid warning.
488 (win32_wait): Remove unused local variable `process'.
490 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
492 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
495 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
497 * configure.ac: Use `ws2_32' library for srv_mingw.
498 * configure: Regenerate.
499 * gdbreplay.c: Include winsock2.h instead of winsock.h.
500 * remote-utils.c: Likewise.
502 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
504 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
505 if __x86_64__ is defined.
507 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
509 * configure: Regenerate.
511 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
513 * server.c (handle_query): Handle 'qGetTIBAddr' query.
514 * target.h (target_ops): New get_tib_address field.
515 * win32-low.h (win32_thread_info): Add thread_local_base field.
516 * win32-low.c (child_add_thread): Add tlb argument.
517 Set thread_local_base field to TLB.
518 (get_child_debug_event): Adapt to child_add_thread change.
519 (win32_get_tib_address): New function.
520 (win32_target_ops): Set get_tib_address field to
521 win32_get_tib_address.
522 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
524 2010-04-12 Pedro Alves <pedro@codesourcery.com>
526 * linux-low.c (linux_mourn): Also remove the process.
527 * server.c (handle_target_event): Don't remove the process here.
528 * nto-low.c (nto_mourn): New.
529 (nto_target_ops): Install it.
530 * spu-low.c (spu_mourn): New.
531 (spu_target_ops): Install it.
532 * win32-low.c (win32_mourn): New.
533 (win32_target_ops): Install it.
535 2010-04-12 Pedro Alves <pedro@codesourcery.com>
537 * server.h (buffer_xml_printf): Remove redundant `;'.
539 2010-04-12 Pedro Alves <pedro@codesourcery.com>
541 * regcache.c (set_register_cache): Invalidate regcaches before
542 changing the register cache layout.
543 (regcache_invalidate_one): Allow a NULL regcache.
544 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
545 regcaches before changing the register cache layout or the target
548 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
550 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
551 variable warning on Linux/x86-64.
553 2010-04-11 Pedro Alves <pedro@codesourcery.com>
555 GDBserver disconnected tracing support.
557 * linux-low.c (linux_remove_process): Delete.
558 (add_lwp): Don't set last_resume_kind here.
559 (linux_kill): Use `mourn'.
560 (linux_detach): Use `thread_db_detach', and `mourn'.
562 (linux_attach_lwp_1): Adjust comment.
563 (linux_attach): last_resume_kind moved the thread_info; adjust.
564 (status_pending_p_callback): Adjust.
565 (linux_wait_for_event_1): Adjust.
566 (count_events_callback, select_singlestep_lwp_callback)
567 (select_event_lwp_callback, cancel_breakpoints_callback)
568 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
569 (proceed_one_lwp): Adjust.
570 (linux_async): Add debug output.
571 (linux_thread_stopped): New.
572 (linux_pause_all): New.
573 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
575 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
576 (thread_db_free): Delete declaration.
577 (thread_db_detach, thread_db_mourn): Declare.
578 * thread-db.c (thread_db_init): Use thread_db_mourn.
579 (thread_db_free): Delete, split in two.
580 (disable_thread_event_reporting): New.
581 (thread_db_detach): New.
582 (thread_db_mourn): New.
584 * server.h (struct thread_info) <last_resume_kind>: New field.
585 <attached>: Add comment.
586 <gdb_detached>: New field.
587 (handler_func): Change return type to int.
588 (handle_serial_event, handle_target_event): Ditto.
589 (gdb_connected): Declare.
591 (disconnected_tracing): Declare.
592 (stop_tracing): Declare.
594 * server.c (handle_query) <qSupported>: Report support for
595 disconnected tracing.
596 (queue_stop_reply_callback): Account for running threads.
597 (gdb_wants_thread_stopped): New.
598 (gdb_wants_all_threads_stopped): New.
599 (gdb_reattached_process): New.
600 (handle_status): Clear the `gdb_detached' flag of all processes.
601 In all-stop, stop all threads.
602 (main): Be sure to leave tfind mode. Handle disconnected tracing.
603 (process_serial_event): If the remote connection breaks, or if an
604 exit was forced with "monitor exit", force an event loop exit.
605 Handle disconnected tracing on detach.
606 (handle_serial_event): Adjust.
607 (handle_target_event): If GDB isn't connected, forward events back
608 to the inferior, unless the last process exited, in which case,
609 exit gdbserver. Adjust interface.
611 * remote-utils.c (remote_open): Don't block in accept. Instead
612 register an event loop source on the listen socket file
613 descriptor. Refactor bits into ...
614 (listen_desc): ... this new global.
615 (gdb_connected): ... this new function.
616 (enable_async_notification): ... this new function.
617 (handle_accept_event): ... this new function.
618 (remote_close): Clear remote_desc.
620 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
622 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
624 (mourn_inferior): Define.
625 (target_process_qsupported): Avoid the dangling else problem.
626 (thread_stopped): Define.
628 (target_waitstatus_to_string): Declare.
629 * target.c (target_waitstatus_to_string): New.
631 * tracepoint.c (tracing): Make extern.
632 (disconnected_tracing): New.
633 (stop_tracing): Make extern. Handle tracing stops due to GDB
635 (cmd_qtdisconnected): New.
636 (cmd_qtstatus): Report disconnected tracing status in trace reply.
637 (handle_tracepoint_general_set): Handle QTDisconnected.
639 * event-loop.c (event_handler_func): Change return type to int.
640 (process_event): Bail out if the event handler wants the event
642 (handle_file_event): Ditto.
643 (start_event_loop): Bail out if the event handler wants the event
646 * nto-low.c (nto_target_ops): Adjust.
647 * spu-low.c (spu_wait): Don't remove the process here.
648 (spu_target_ops): Adjust.
649 * win32-low.c (win32_wait): Don't remove the process here.
650 (win32_target_ops): Adjust.
652 2010-04-11 Pedro Alves <pedro@codesourcery.com>
654 * regcache.c (realloc_register_cache): Invalidate inferior's
655 regcache before recreating it.
657 2010-04-09 Pedro Alves <pedro@codesourcery.com>
659 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
661 2010-04-09 Stan Shebs <stan@codesourcery.com>
662 Pedro Alves <pedro@codesourcery.com>
664 * server.h (LONGEST): New.
665 (struct thread_info) <while_stepping>: New field.
666 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
668 (initialize_tracepoint, handle_tracepoint_general_set)
669 (handle_tracepoint_query, tracepoint_finished_step)
670 (tracepoint_was_hit, release_while_stepping_state_list):
671 (current_traceframe): Declare.
672 * server.c (handle_general_set): Handle tracepoint packets.
675 (handle_search_memory_1): Use read_memory.
676 (handle_query): Report support for conditional tracepoints, trace
677 state variables, and tracepoint sources. Handle tracepoint
679 (main): Initialize the tracepoints module.
680 (process_serial_event): Handle traceframe reads/writes.
682 * linux-low.c (handle_tracepoints): New.
683 (linux_wait_1): Call it.
684 (linux_resume_one_lwp): Handle while-stepping.
685 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
686 (linux_target_ops): Install them.
687 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
689 * linux-x86-low.c (x86_supports_tracepoints): New.
690 (the_low_target). Install it.
692 * mem-break.h (delete_breakpoint): Declare.
693 * mem-break.c (delete_breakpoint): Make external.
695 * target.h (struct target_ops): Add `supports_tracepoints',
696 `read_pc', and `write_pc' fields.
697 (target_supports_tracepoints): Define.
698 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
701 * regcache.h (struct regcache) <registers_owned>: New field.
702 (init_register_cache, regcache_cpy): Declare.
703 (regcache_read_pc, regcache_write_pc): Declare.
704 (register_cache_size): Declare.
705 (supply_regblock): Declare.
706 * regcache.c (init_register_cache): New.
707 (new_register_cache): Use it.
709 (register_cache_size): New.
710 (supply_regblock): New.
711 (regcache_read_pc, regcache_write_pc): New.
715 * Makefile.in (OBS): Add tracepoint.o.
716 (tracepoint.o): New rule.
718 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
720 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
722 (i386-mmx.c): Likewise.
723 (i386-mmx-linux.o): Likewise.
724 (i386-mmx-linux.c): Likewise.
726 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
727 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
728 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
729 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
731 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
732 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
733 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
735 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
737 * Makefile.in (clean): Updated.
739 (i386-avx.c): Likewise.
740 (i386-avx-linux.o): Likewise.
741 (i386-avx-linux.c): Likewise.
742 (amd64-avx.o): Likewise.
743 (amd64-avx.c): Likewise.
744 (amd64-avx-linux.o): Likewise.
745 (amd64-avx-linux.c): Likewise.
747 * configure.srv (srv_i386_regobj): Add i386-avx.o.
748 (srv_i386_linux_regobj): Add i386-avx-linux.o.
749 (srv_amd64_regobj): Add amd64-avx.o.
750 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
751 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
752 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
753 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
754 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
755 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
758 * i387-fp.c: Include "i386-xstate.h".
760 (i387_cache_to_xsave): Likewise.
761 (i387_xsave_to_cache): Likewise.
762 (x86_xcr0): Likewise.
764 * i387-fp.h (i387_cache_to_xsave): Likewise.
765 (i387_xsave_to_cache): Likewise.
766 (x86_xcr0): Likewise.
768 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
769 * linux-crisv32-low.c (target_regsets): Likewise.
770 * linux-m68k-low.c (target_regsets): Likewise.
771 * linux-mips-low.c (target_regsets): Likewise.
772 * linux-ppc-low.c (target_regsets): Likewise.
773 * linux-s390-low.c (target_regsets): Likewise.
774 * linux-sh-low.c (target_regsets): Likewise.
775 * linux-sparc-low.c (target_regsets): Likewise.
776 * linux-xtensa-low.c (target_regsets): Likewise.
778 * linux-low.c: Include <sys/uio.h>.
779 (regsets_fetch_inferior_registers): Support nt_type.
780 (regsets_store_inferior_registers): Likewise.
781 (linux_process_qsupported): New.
782 (linux_target_ops): Add linux_process_qsupported.
784 * linux-low.h (regset_info): Add nt_type.
785 (linux_target_ops): Add process_qsupported.
787 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
789 (init_registers_i386_avx_linux): New.
790 (init_registers_amd64_avx_linux): Likewise.
791 (xmltarget_i386_linux_no_xml): Likewise.
792 (xmltarget_amd64_linux_no_xml): Likewise.
793 (PTRACE_GETREGSET): Likewise.
794 (PTRACE_SETREGSET): Likewise.
795 (x86_fill_xstateregset): Likewise.
796 (x86_store_xstateregset): Likewise.
798 (x86_linux_update_xmltarget): Likewise.
799 (x86_linux_process_qsupported): Likewise.
800 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
801 (x86_arch_setup): Don't call init_registers_amd64_linux nor
802 init_registers_i386_linux here. Call
803 x86_linux_update_xmltarget.
804 (the_low_target): Add x86_linux_process_qsupported.
806 * server.c (handle_query): Call target_process_qsupported.
808 * target.h (target_ops): Add process_qsupported.
809 (target_process_qsupported): New.
811 2010-04-03 Pedro Alves <pedro@codesourcery.com>
813 * inferiors.c (add_thread): Set last_status kind to
814 TARGET_WAITKIND_IGNORE.
815 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
816 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
817 (linux_wait_1): Move `thread' local definition to block that uses
818 it. Don't NULL initialize `event_child'.
819 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
820 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
821 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
823 2010-04-01 Pedro Alves <pedro@codesourcery.com>
825 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
826 an extended waitstatus, or by a watchpoint.
827 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
828 thread was stepping or has been stopped by a watchpoint.
830 2010-04-01 Pedro Alves <pedro@codesourcery.com>
832 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
833 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
834 of another, then delete the previous, and validate all
836 (validate_inserted_breakpoint): New.
837 (delete_disabled_breakpoints): New.
838 (validate_breakpoints): New.
839 (check_mem_read): Validate breakpoints before trusting their
840 shadow. Delete disabled breakpoints.
841 (check_mem_write): Validate breakpoints before trusting they
842 should be inserted. Delete disabled breakpoints.
843 * mem-break.h (validate_breakpoints):
844 * server.c (handle_query): Validate breakpoints when we see a
847 2010-04-01 Pedro Alves <pedro@codesourcery.com>
849 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
850 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
851 if we could tell there's a GDB breakpoint at stop_pc.
852 (need_step_over_p): Don't do a step over if we find a GDB
853 breakpoint at the resume PC.
855 * mem-break.c (struct raw_breakpoint): New.
856 (enum bkpt_type): New type `gdb_breakpoint'.
857 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
858 fields. New field `raw'.
859 (find_raw_breakpoint_at): New.
860 (set_raw_breakpoint_at): Handle refcounting. Create a raw
862 (set_breakpoint_at): Adjust.
863 (delete_raw_breakpoint): New.
864 (release_breakpoint): New.
865 (delete_breakpoint): Rename to...
866 (delete_breakpoint_1): ... this. Add proc parameter. Use
867 release_breakpoint. Return ENOENT.
868 (delete_breakpoint): Reimplement.
869 (find_breakpoint_at): Delete.
870 (find_gdb_breakpoint_at): New.
871 (delete_breakpoint_at): Delete.
872 (set_gdb_breakpoint_at): New.
873 (delete_gdb_breakpoint_at): New.
874 (gdb_breakpoint_here): New.
875 (set_reinsert_breakpoint): Use release_breakpoint.
876 (uninsert_breakpoint): Rename to ...
877 (uninsert_raw_breakpoint): ... this.
878 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
879 (reinsert_raw_breakpoint): Change parameter type to
881 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
883 (check_breakpoints): Adjust. Use release_breakpoint.
884 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
885 (breakpoint_inserted_here): Ditto.
886 (check_mem_read): Adjust to iterate over raw breakpoints instead.
887 Don't trust the breakpoint's shadow if it is not inserted.
888 (check_mem_write): Adjust to iterate over raw breakpoints instead.
889 (delete_all_breakpoints): Adjust.
890 (free_all_breakpoints): Mark all breakpoints as uninserted, and
891 use delete_breakpoint_1.
893 * mem-break.h (breakpoints_supported): Delete declaration.
894 (set_gdb_breakpoint_at): Declare.
895 (gdb_breakpoint_here): Declare.
896 (delete_breakpoint_at): Delete.
897 (delete_gdb_breakpoint_at): Declare.
899 * server.h (struct raw_breakpoint): Forward declare.
900 (struct process_info): New field `raw_breakpoints'.
902 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
905 2010-03-24 Pedro Alves <pedro@codesourcery.com>
907 * linux-low.c (status_pending_p_callback): Fix comment.
908 (linux_wait_for_event_1): Move most of the internal breakpoint
909 handling from here...
910 (linux_wait_1): ... to here.
911 (count_events_callback): New.
912 (select_singlestep_lwp_callback): New.
913 (select_event_lwp_callback): New.
914 (cancel_breakpoints_callback): New.
915 (select_event_lwp): New.
916 (linux_wait_1): Simplify internal breakpoint handling. Give equal
917 priority to all LWPs that have had events that should be reported
918 to the client. Cancel breakpoints when about to reporting the
919 event to the client, not while stopping lwps. No longer cancel
920 finished single-steps here.
921 (cancel_finished_single_step): Delete.
922 (cancel_finished_single_steps): Delete.
924 2010-03-24 Pedro Alves <pedro@codesourcery.com>
926 * mem-break.c (enum bkpt_type): New.
927 (struct breakpoint): New field `type'.
928 (set_breakpoint_at): Change return type to struct breakpoint
929 pointer. Set type to `other_breakpoint' by default.
930 (delete_breakpoint): Rewrite, supporting more than one breakpoint
931 in the breakpoint list.
932 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
933 (reinsert_breakpoint): Rename to ...
934 (reinsert_raw_breakpoint): ... this.
935 (reinsert_breakpoints_at): Adjust.
936 * mem-break.h (struct breakpoint): Declare.
937 (set_breakpoint_at): Change return type to struct breakpoint
940 2010-03-24 Pedro Alves <pedro@codesourcery.com>
942 * server.c (handle_query): Assign, not compare.
944 2010-03-24 Pedro Alves <pedro@codesourcery.com>
946 Teach linux gdbserver to step-over-breakpoints.
948 * linux-low.c (can_hardware_single_step): New.
949 (supports_breakpoints): New.
950 (handle_extended_wait): If stopping threads, read the stop pc of
953 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
954 low target doesn't support retrieving the PC.
955 (add_lwp): Set last_resume_kind to resume_continue.
956 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
957 (linux_attach): Don't clear stop_expected. Set the lwp's
958 last_resume_kind to resume_stop.
959 (linux_detach_one_lwp): Don't check for removed breakpoints.
960 (check_removed_breakpoint): Delete.
961 (status_pending_p): Rename to ...
962 (status_pending_p_callback): ... this. Don't check for removed
963 breakpoints. Don't consider threads that are stopped from GDB's
965 (linux_wait_for_lwp): Always read the stop_pc here.
966 (cancel_breakpoint): New.
967 (step_over_bkpt): New global.
968 (linux_wait_for_event_1): Implement stepping over breakpoints.
969 (gdb_wants_lwp_stopped): New.
970 (gdb_wants_all_stopped): New.
971 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
972 single-step traps here. Store the thread's last reported target
974 (send_sigstop): Don't clear stop_expected. Always set it,
976 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
977 (cancel_finished_single_step): New.
978 (cancel_finished_single_steps): New.
979 (wait_for_sigstop): Don't cancel finished single-step traps here.
980 (linux_resume_one_lwp): Don't check for removed breakpoints.
981 Don't set `step' on non-hardware step archs.
982 (linux_set_resume_request): Ignore resume_stop requests if already
983 stopping or stopped. Set the lwp's last_resume_kind.
984 (resume_status_pending_p): Don't check for removed breakpoints.
985 (need_step_over_p): New.
986 (start_step_over): New.
987 (finish_step_over): New.
988 (linux_resume_one_thread): Always queue a sigstop for resume_stop
989 requests. Clear the thread's last reported target waitstatus.
990 Don't use the `suspended' flag. Don't consider pending breakpoints.
991 (linux_resume): Start a step-over if necessary.
992 (proceed_one_lwp): New.
993 (proceed_all_lwps): New.
994 (unstop_all_lwps): New.
995 * linux-low.h (struct lwp_info): Rewrite comment for the
996 `suspended' flag. Add the `stop_pc' field. Delete the
997 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
998 Add `'last_resume_kind' and `need_step_over' fields.
999 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1000 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1001 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1002 (set_raw_breakpoint_at): New.
1003 (set_breakpoint_at): Rewrite to use it.
1004 (reinsert_breakpoint_handler): Delete.
1005 (set_reinsert_breakpoint): New.
1006 (reinsert_breakpoint_by_bp): Delete.
1007 (delete_reinsert_breakpoints): New.
1008 (uninsert_breakpoint): Rewrite.
1009 (uninsert_breakpoints_at): New.
1010 (reinsert_breakpoint): Rewrite.
1011 (reinsert_breakpoints_at): New.
1012 (check_breakpoints): Rewrite.
1013 (breakpoint_here): New.
1014 (breakpoint_inserted_here): New.
1015 (check_mem_read): Adjust.
1016 * mem-break.h (breakpoints_supported, breakpoint_here)
1017 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1018 (reinsert_breakpoint_by_bp): Delete declaration.
1019 (delete_reinsert_breakpoints): Declare.
1020 (reinsert_breakpoint): Delete declaration.
1021 (reinsert_breakpoints_at): Declare.
1022 (uninsert_breakpoint): Delete declaration.
1023 (uninsert_breakpoints_at): Declare.
1024 (check_breakpoints): Adjust prototype.
1025 * server.h: Adjust include order.
1026 (struct thread_info): Declare here. Add a `last_status' field.
1028 2010-03-23 Michael Snyder <msnyder@vmware.com>
1030 * server.c (crc32): New function.
1031 (handle_query): Add handling for 'qCRC:' request.
1033 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1035 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1036 lwp had been stopped by a watchpoint.
1038 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1040 * server.h (internal_error): Declare.
1041 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1042 * utils.c (internal_error): New function.
1044 2010-03-15 Andreas Schwab <schwab@redhat.com>
1046 * configure.srv: Fix typo setting srv_regobj.
1048 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1050 * linux-low.c (fetch_register): Avoid passing a non string literal
1052 (usr_store_inferior_registers): Ditto.
1054 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1056 * linux-low.c (linux_write_memory): Bail out early if peeking
1059 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1061 * linux-low.h (struct lwp_info): New fields
1062 `stopped_by_watchpoint' and `stopped_data_address'.
1063 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1064 here, and cache them in the lwp object.
1065 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1067 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1069 (linux_stopped_by_watchpoint): Rewrite.
1070 (linux_stopped_data_address): Rewrite.
1072 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1074 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1075 switching the current inferior, not before.
1077 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1079 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1080 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1081 i386-linux.c and amd64-linux.c.
1082 (reg-i386.o): Removed.
1083 (reg-i386.c): Likewise.
1084 (reg-i386-linux.o): Likewise.
1085 (reg-i386-linux.c): Likewise.
1086 (reg-x86-64.o): Likewise.
1087 (reg-x86-64.c): Likewise.
1088 (reg-x86-64-linux.o): Likewise.
1089 (reg-x86-64-linux.c): Likewise.
1092 (i386-linux.o): Likewise.
1093 (i386-linux.c): Likewise.
1094 (amd64.o): Likewise.
1095 (amd64.c): Likewise.
1096 (amd64-linux.o): Likewise.
1097 (amd64-linux.c): Likewise.
1099 * configure.srv (srv_i386_regobj): New.
1100 (srv_i386_linux_regobj): Likewise.
1101 (srv_amd64_regobj): Likewise.
1102 (srv_amd64_linux_regobj): Likewise.
1103 (srv_i386_32bit_xmlfiles): Likewise.
1104 (srv_i386_64bit_xmlfiles): Likewise.
1105 (srv_i386_xmlfiles): Likewise.
1106 (srv_amd64_xmlfiles): Likewise.
1107 (srv_i386_linux_xmlfiles): Likewise.
1108 (srv_amd64_linux_xmlfiles): Likewise.
1109 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1110 srv_xmlfiles to $srv_i386_xmlfiles.
1111 (i[34567]86-*-mingw32ce*): Likewise.
1112 (i[34567]86-*-mingw*): Likewise.
1113 (i[34567]86-*-nto*): Likewise.
1114 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1115 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1116 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1117 (x86_64-*-linux*): Likewise.
1119 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1120 (init_registers_amd64_linux): New.
1121 (x86_arch_setup): Replace init_registers_x86_64_linux with
1122 init_registers_amd64_linux.
1124 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1126 * configure.ac: Check for libdl. If it is not available link against
1127 static libthread_db.
1128 * configure: Regenerate.
1130 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1134 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1135 handing a read watchpoint.
1136 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1138 2010-02-12 Doug Evans <dje@google.com>
1140 * linux-low.c (linux_supports_tracefork_flag): Document.
1141 (linux_look_up_symbols): Add comment.
1143 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1145 * regcache.c (supply_register): Clear regcache if buf is NULL.
1147 2010-02-02 Nicolas Roche <roche@sourceware.org>
1148 Joel Brobecker <brobecker@adacore.com>
1150 * inferiors.c (find_inferior): Add function documentation.
1151 (unloaded_dll): Handle the case where the unloaded dll has not
1152 been previously registered in the dll list.
1154 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1156 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1157 (thumb2_breakpoint): New.
1158 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1160 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1162 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1163 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1166 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1168 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1170 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1172 * linux-s390-low.c (s390_collect_ptrace_register)
1173 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1175 2010-01-21 Doug Evans <dje@google.com>
1177 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1178 (PTRACE_ARG4_TYPE): New macro.
1179 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1180 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1181 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1182 (usr_store_inferior_registers): Ditto.
1183 (linux_read_memory, linux_write_memory): Ditto.
1184 (linux_test_for_tracefork): Ditto.
1186 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1187 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1189 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1191 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1194 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1196 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1197 prototype to take a regcache. Adjust.
1199 2010-01-20 Pedro Alves <pedro@codesourcery.com>
1201 * regcache.h (struct thread_info): Forward declare.
1202 (struct regcache): New.
1203 (new_register_cache): Adjust prototype.
1204 (get_thread_regcache): Declare.
1205 (free_register_cache): Adjust prototype.
1206 (registers_to_string, registers_from_string): Ditto.
1207 (supply_register, supply_register_by_name, collect_register)
1208 (collect_register_as_string, collect_register_by_name): Ditto.
1209 * regcache.c (struct inferior_regcache_data): Delete.
1210 (get_regcache): Rename to ...
1211 (get_thread_regcache): ... this. Adjust. Switch inferior before
1213 (regcache_invalidate_one): Adjust.
1214 (regcache_invalidate): Fix prototype.
1215 (new_register_cache): Return the new register cache.
1216 (free_register_cache): Change prototype.
1217 (realloc_register_cache): Adjust.
1218 (registers_to_string): Change prototype to take a regcache. Adjust.
1219 (registers_from_string): Ditto.
1220 (register_data): Ditto.
1221 (supply_register): Ditto.
1222 (supply_register_by_name): Ditto.
1223 (collect_register): Ditto.
1224 (collect_register_as_string): Ditto.
1225 (collect_register_by_name): Ditto.
1226 * server.c (process_serial_event): Adjust.
1227 * linux-low.h (regset_fill_func, regset_store_func): Change
1229 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1231 * linux-low.c (get_stop_pc): Adjust.
1232 (check_removed_breakpoint): Adjust.
1233 (linux_wait_for_event): Adjust.
1234 (linux_resume_one_lwp): Adjust.
1235 (fetch_register): Add regcache parameter. Adjust.
1236 (usr_store_inferior_registers): Ditto.
1237 (regsets_fetch_inferior_registers): Ditto.
1238 (regsets_store_inferior_registers): Ditto.
1239 (linux_fetch_registers, linux_store_registers): Ditto.
1240 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1242 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1243 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1244 prototype to take a regcache.
1245 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1246 * remote-utils.c (convert_ascii_to_int, outreg)
1247 (prepare_resume_reply): Change prototype to take a regcache.
1249 * target.h (struct target_ops) <fetch_registers, store_registers>:
1250 Change prototype to take a regcache.
1251 (fetch_inferior_registers, store_inferior_registers): Change
1252 prototype to take a regcache. Adjust.
1253 * proc-service.c (ps_lgetregs): Adjust.
1254 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1255 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1256 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1257 take a regcache. Adjust.
1258 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1259 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1260 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1261 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1262 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1263 (cris_cannot_fetch_register):
1264 (cris_breakpoint_at): Change prototype to take a regcache.
1266 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1267 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1268 to take a regcache. Adjust.
1269 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1271 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1272 take a regcache. Adjust.
1273 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1274 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1275 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1276 * linux-mips-low.c (mips_get_pc):
1277 (mips_set_pc): Change prototype to take a regcache. Adjust.
1278 (mips_reinsert_addr): Adjust.
1279 (mips_collect_register): Change prototype to take a regcache.
1281 (mips_supply_register):
1282 (mips_collect_register_32bit, mips_supply_register_32bit)
1283 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1284 (mips_store_fpregset): Ditto.
1285 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1287 (parse_spufs_run): Adjust.
1288 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1289 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1290 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1291 take a regcache. Adjust.
1292 * linux-s390-low.c (s390_collect_ptrace_register)
1293 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1294 (s390_set_pc): Change prototype to take a regcache. Adjust.
1295 (s390_arch_setup): Adjust.
1296 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1297 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1298 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1299 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1300 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1302 (sparc_breakpoint_at): Adjust.
1303 * linux-xtensa-low.c (xtensa_fill_gregset):
1304 (xtensa_store_gregset):
1305 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1306 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1307 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1308 prototype to take a regcache. Adjust.
1309 * win32-arm-low.c (arm_fetch_inferior_register)
1310 (arm_store_inferior_register): Change prototype to take a
1312 * win32-i386-low.c (i386_fetch_inferior_register)
1313 (i386_store_inferior_register): Change prototype to take a
1315 * win32-low.c (child_fetch_inferior_registers)
1316 (child_store_inferior_registers): Change prototype to take a
1318 (win32_wait): Adjust.
1319 (win32_fetch_inferior_registers): Change prototype to take a
1321 (win32_store_inferior_registers): Adjust.
1322 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1323 store_inferior_register>: Change prototype to take a regcache.
1325 2010-01-20 Doug Evans <dje@google.com>
1327 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1329 (linux_wait_for_event1, linux_init_signals): Ditto.
1330 (W_STOPCODE): Provide definition if missing.
1332 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1334 * linux-low.c (linux_core_of_thread): New.
1335 (compare_ints, show_process, list_threads): New.
1336 (linux_qxfer_osdata): Report threads and cores.
1337 (linux_target_op): Register linux_core_of_thread.
1338 * remote-utils.c (prepare_resume_reply): Report the core.
1339 (buffer_xml_printf): Support %d specifier.
1340 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1342 (handle_query): Handle qXfer:threads. Announce availability
1344 * target.h (struct target_ops): New field core_of_thread.
1346 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1348 * Makefile.in (clean): Remove new generated files.
1349 (reg-s390.o, reg-s390.c): Remove rules.
1350 (reg-s390x.o, reg-s390x.c): Likewise.
1351 (s390-linux32.o, s390-linux32.c): Add rules.
1352 (s390-linux64.o, s390-linux64.c): Likewise.
1353 (s390x-linux64.o, s390x-linux64.c): Likewise.
1354 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1355 * linux-s390-low.c: Include <elf.h>.
1356 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1357 (init_registers_s390): Remove prototype.
1358 (init_registers_s390x): Likewise.
1359 (init_registers_s390_linux32): Add prototype.
1360 (init_registers_s390_linux64): Likewise.
1361 (init_registers_s390x_linux64): Likewise.
1362 (s390_num_regs_3264): New define.
1363 (s390_regmap_3264): New global variable.
1364 (s390_cannot_fetch_register): Remove obsolete check.
1365 (s390_cannot_store_register): Likewise.
1366 (s390_collect_ptrace_register): Handle upper/lower register halves.
1367 (s390_supply_ptrace_register): Likewise.
1368 (s390_fill_gregset): Update to register number changes.
1369 (s390_get_hwcap): New routine.
1370 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1371 Install appropriate regmap and register set.
1373 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1375 * server.c (gdbserver_version): Update copyright year to 2010.
1376 * gdbreplay.c (gdbreplay_version): Likewise.
1378 2009-12-28 Doug Evans <dje@google.com>
1380 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1381 elf/external.h. Include <elf.h> instead but only if necessary.
1383 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1385 * linux-low.c (linux_remove_process): Remove `detaching'
1386 parameter. Don't release/detach from thread_db here.
1387 (linux_kill): Release/detach from thread_db here, ...
1388 (linux_detach): ... and here, before actually detaching.
1389 (linux_wait_1): ... and here, when a process exits.
1390 * thread-db.c (any_thread_of): New.
1391 (thread_db_free): Switch the current inferior to a thread of the
1394 2009-12-21 Doug Evans <dje@google.com>
1396 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1398 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1399 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1400 warning ifndef __NR_tkill. Move setting of errno there too.
1401 Delete unnecessary resetting of errno after syscall.
1402 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1404 * configure.ac: Check for dladdr.
1405 * config.in: Regenerate.
1406 * configure: Regenerate.
1407 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1408 (try_thread_db_load): Update.
1410 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1412 2009-12-18 Doug Evans <dje@google.com>
1414 * event-loop.c: Include unistd.h if it exists.
1416 * linux-low.c (my_waitpid): Move definition away from being in
1417 between linux_tracefork_child/linux_test_for_tracefork.
1419 * gdb_proc_service.h (psaddr_t): Fix type.
1420 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1421 signature to match glibc.
1423 2009-12-16 Doug Evans <dje@google.com>
1425 * linux-low.c (linux_read_memory): Fix argument to read.
1427 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1429 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1430 events, don't leave current_inferior pointing at null.
1432 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1434 * win32-low.c (LOG): Delete.
1435 (OUTMSG): Output to stderr.
1436 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1437 on compile time LOG macro.
1438 (win32_wait): Fix debug output.
1440 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1442 * win32-low.c (win32_add_one_solib): If the dll name is
1443 "ntdll.dll", prepend the system directory to the dll path.
1445 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1447 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1449 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1450 Vladimir Prus <vladimir@codesourcery.com>
1452 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1453 * configure.ac: Check for __mcoldfire__ and set
1454 gdb_cv_m68k_is_coldfire.
1455 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1456 reg-cf.o and reg-m68k.o.
1457 * configure: Regenerated.
1459 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1461 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1462 Pass it to thread_db_free.
1463 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1464 proper `detaching' argument to linux_remove_process.
1465 * linux-low.h (thread_db_free): Add `detaching' parameter.
1466 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1468 (thread_db_free): Add `detaching' parameter. Only
1469 call td_ta_clear_event if detaching from process.
1471 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1473 * thread-db.c (thread_db_free): Fix typo.
1475 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1478 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1480 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1482 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1483 with an i686 compiler.
1484 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1486 * configure: Rebuilt.
1488 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1492 * server.c (handle_search_memory_1): Correct read_addr initialization
1493 in loop for searching subsequent chunks.
1495 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1497 * configure.ac: New --with-libthread-db option.
1498 * thread-db.c: Allow direct dependence on libthread_db.
1499 (thread_db_free): Adjust.
1500 * config.in: Regenerate.
1501 * configure: Likewise.
1503 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1506 * thread-db.c (attach_thread): New function.
1507 (maybe_attach_thread): Return success/failure.
1508 (find_new_threads_callback): Adjust.
1509 (thread_db_find_new_threads): Loop until no new threads.
1511 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1513 * proc-service.c (ps_lgetregs): Formatting.
1515 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1517 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1518 * configure.ac: Adjust.
1519 * linux-low.h (struct process_info_private): Move members to struct
1521 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1522 * linux-low.c (linux_remove_process): Adjust.
1523 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1524 * server.c (handle_query): Move code ...
1525 (handle_monitor_command): ... here. New function.
1526 * target.h (struct target_ops): New member.
1527 * thread-db.c (struct thread_db): New.
1528 (libthread_db_search_path): New variable.
1529 (thread_db_create_event, thread_db_enable_reporting)
1530 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1531 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1532 (try_thread_db_load_1, dladdr_to_soname): New functions.
1533 (try_thread_db_load, thread_db_load_search): New functions.
1534 (thread_db_init): Search for libthread_db.
1535 (thread_db_free): New function.
1536 (thread_db_handle_monitor_command): Likewise.
1537 * config.in: Regenerate.
1538 * configure: Regenerate.
1540 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1542 * spu-low.c (spu_kill): Wait for inferior to terminate.
1543 Call clear_inferiors.
1544 (spu_detach): Call clear_inferiors.
1546 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1548 * aclocal.m4: Regenerate.
1549 * config.in: Likewise.
1550 * configure: Likewise.
1552 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1554 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1555 (parse_spufs_run): New function.
1556 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1557 (ppc_breakpoint_at): Handle SPU breakpoints.
1559 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1561 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1562 (SPUFS_MAGIC): Define.
1563 (spu_enumerate_spu_ids): New function.
1564 (linux_qxfer_spu): New function.
1565 (linux_target_ops): Install linux_qxfer_spu.
1567 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1569 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1570 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1571 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1572 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1573 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1574 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1575 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1576 (init_registers_powerpc_cell32l): Add prototype.
1577 (init_registers_powerpc_cell64l): Likewise.
1578 (ppc_arch_setup): Detect Cell/B.E. architecture.
1580 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1582 * Makefile.in (datarootdir): New variable.
1584 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1586 * linux-low.c (linux_write_memory): Update debugging output.
1587 * Makefile.in (clean): Add new descriptions.
1588 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1589 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1590 * configure.srv: Add new files for arm*-*-linux*.
1591 * linux-arm-low.c: Add new declarations.
1592 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1593 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1594 (HWCAP_VFPv3D16): New.
1595 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1596 instead of __IWMMXT__.
1597 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1598 (arm_arch_setup): New.
1599 (target_regsets): Remove #ifdef. Add VFP regset.
1600 (the_low_target): Use arm_arch_setup.
1602 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1604 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1605 the main thread again.
1607 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1609 Adding Neutrino gdbserver.
1610 * configure: Regenerated.
1611 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1612 * configure.srv (i[34567]86-*-nto*): New target.
1613 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1614 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1615 (nto_comctrl) [__QNX__]: New function.
1616 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1618 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1620 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1623 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1624 Pedro Alves <pedro@codesourcery.com>
1626 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1627 don't support CONTEXT_EXTENDED_REGISTERS.
1628 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1629 (the_low_target): Install them.
1630 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1631 failing with ERROR_PIPE_NOT_CONNECTED.
1633 2009-06-30 Doug Evans <dje@google.com>
1634 Pierre Muller <muller@ics.u-strasbg.fr>
1636 Add h/w watchpoint support to x86-linux, win32-i386.
1637 * Makefile.in (SFILES): Add i386-low.c
1638 (i386_low_h): Define.
1639 (i386-low.o): Add dependencies.
1640 (linux-x86-low.o): Add i386-low.h dependency.
1641 (win32-i386-low.o): Ditto.
1642 * i386-low.c: New file.
1643 * i386-low.h: New file.
1644 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1645 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1646 * linux-low.c (linux_add_process): Initialize arch_private.
1647 (linux_remove_process): Free arch_private.
1648 (add_lwp): Initialize arch_private.
1649 (delete_lwp): Free arch_private.
1650 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1652 * linux-low.h (process_info_private): New member arch_private.
1653 (lwp_info): New member arch_private.
1654 (linux_target_ops): New members new_process, new_thread,
1656 (ptid_of): New macro.
1657 * linux-x86-low.c: Include stddef.h, i386-low.h.
1658 (arch_process_info): New struct.
1659 (arch_lwp_info): New struct.
1660 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1661 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1662 (i386_dr_low_get_status): New function.
1663 (x86_insert_point, x86_remove_point): New functions.
1664 (x86_stopped_by_watchpoint): New function.
1665 (x86_stopped_data_address): New function.
1666 (x86_linux_new_process, x86_linux_new_thread): New functions.
1667 (x86_linux_prepare_to_resume): New function.
1668 (the_low_target): Add entries for insert_point, remove_point,
1669 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1671 * server.c (debug_hw_points): New global.
1672 (monitor_show_help): Document set debug-hw-points.
1673 (handle_query): Process "set debug-hw-points".
1674 * server.h (debug_hw_points): Declare.
1675 (paddress): Declare.
1676 * utils.c (NUMCELLS, CELLSIZE): New macros.
1677 (get_sell, xsnprintf, paddress): New functions.
1678 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1679 remove_point, stopped_by_watchpoint, stopped_data_address.
1680 * win32-i386-low.c: Include i386-low.h.
1681 (debug_reg_state): Replaces dr.
1682 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1683 (i386_dr_low_get_status): New function.
1684 (i386_insert_point, i386_remove_point): New functions.
1685 (i386_stopped_by_watchpoint): New function.
1686 (i386_stopped_data_address): New function.
1687 (i386_initial_stuff): Update.
1688 (get_thread_context,set_thread_context,i386_thread_added): Update.
1689 (the_low_target): Add entries for insert_point,
1690 remove_point, stopped_by_watchpoint, stopped_data_address.
1691 * win32-low.c (win32_insert_watchpoint): New function.
1692 (win32_remove_watchpoint): New function.
1693 (win32_stopped_by_watchpoint): New function.
1694 (win32_stopped_data_address): New function.
1695 (win32_target_ops): Add entries for insert_watchpoint,
1696 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1697 * win32-low.h (win32_target_ops): New members insert_point,
1698 remove_point, stopped_by_watchpoint, stopped_data_address.
1700 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1702 * server.c (process_serial_event): Re-return unsupported, not
1703 error, if the type isn't recognized. Re-allow supporting only
1704 insert or remove packets. Also call require_running for
1705 breakpoints. Add missing break statement to default case. Tidy.
1706 * target.h (struct target_ops): Rename insert_watchpoint to
1707 insert_point, and remove_watchpoint to remove_point.
1709 * linux-low.h (struct linux_target_ops): Likewise.
1710 * linux-low.c (linux_insert_watchpoint): Rename to ...
1711 (linux_insert_point): ... this. Adjust.
1712 (linux_remove_watchpoint): Rename to ...
1713 (linux_remove_point): ... this. Adjust.
1714 (linux_target_ops): Adjust.
1715 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1716 (cris_insert_point): ... this.
1717 (cris_remove_watchpoint): Rename to ...
1718 (cris_remove_point): ... this.
1719 (the_low_target): Adjust.
1721 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1723 * server.c (handle_v_kill): Pass signal_pid to
1724 kill_inferior if multi_process is zero.
1726 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1728 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1729 * target.h (target_ops): Comment for *_watchpoint to make it clear
1730 the functions can get types '0' and '1'.
1732 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1734 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1735 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1736 * regcache.c (get_regcache): Likewise.
1737 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1738 * win32-low.c (child_fetch_inferior_registers): Remove check for
1741 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1742 Pedro Alves <pedro@codesourcery.com>
1744 * target.h (struct target_ops) <supports_multi_process>: New
1746 (target_supports_multi_process): New.
1747 * server.c (handle_query): Even if GDB reports support, only
1748 enable multi-process if the target also supports it. Report
1749 multi-process support only if the target backend supports it.
1750 * linux-low.c (linux_supports_multi_process): New function.
1751 (linux_target_ops): Install it as target_supports_multi_process
1754 2009-05-24 Doug Evans <dje@google.com>
1756 Global renaming of find_thread_pid to find_thread_ptid.
1757 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1758 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1759 All callers updated.
1761 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1762 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1765 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1766 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1767 (linux_resume_one_lwp): Ditto.
1769 2009-05-23 Doug Evans <dje@google.com>
1771 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1772 from struct inferior_list_entry * to struct lwp_info *.
1773 All callers updated.
1775 2009-05-13 Doug Evans <dje@google.com>
1777 * linux-x86-low.c: Don't include assert.h.
1778 (x86_siginfo_fixup): Use fatal, not assert.
1779 (x86_arch_setup): Fix comment.
1781 2009-05-12 Doug Evans <dje@google.com>
1783 Biarch support for i386/amd64 gdbserver.
1784 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1785 Add linux-x86-low.c.
1786 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1787 (linux-x86-low.o): Add.
1788 * linux-x86-64-low.c: Delete.
1789 * linux-i386-low.c: Delete.
1790 * linux-x86-low.c: New file.
1791 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1793 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1795 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1796 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1797 (linux_child_pid_to_exec_file): New function.
1798 (elf_64_header_p, elf_64_file_p): New functions.
1799 (siginfo_fixup): New function.
1800 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1801 give target a chance to convert layout.
1802 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1803 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1805 2009-05-07 Doug Evans <dje@google.com>
1807 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1808 (regsets_store_inferior_registers): Ditto.
1810 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1814 * linux-low.c (must_set_ptrace_flags): Delete.
1815 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1817 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1818 `lwp->must_set_ptrace_flags' instead.
1819 (linux_wait_for_event_1): Set ptrace options here.
1820 (linux_wait_1): ... not here.
1822 2009-04-30 Doug Evans <dje@google.com>
1824 * inferiors.c (started_inferior_callback): New function.
1825 (attached_inferior_callback): New function.
1826 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1827 * server.c (print_started_pid, print_attached_pid): New functions.
1828 (detach_or_kill_for_exit): New function.
1829 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1830 * server.h (have_started_inferiors_p): Declare.
1831 (have_attached_inferiors_p): Declare.
1833 * inferiors.c (remove_process): Fix memory leak, free process.
1834 * linux-low.c (linux_remove_process): New function.
1835 (linux_kill): Call it instead of remove_process.
1836 (linux_detach, linux_wait_1): Ditto.
1838 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1840 * configure.srv: Add x86 Windows CE target.
1842 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1844 * inferiors.c (get_thread_process): Make global.
1845 * server.h (get_thread_process): Add prototype.
1846 * thread-db.c (find_one_thread): Use get_thread_process
1847 instead of current_process.
1848 (thread_db_get_tls_address): Do not crash if called when
1849 thread layer is not yet initialized.
1851 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1853 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1854 * spu-low.c (current_tid): Rename to ...
1855 (current_ptid): ... this.
1856 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1857 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1858 ptid_get_lwp (current_ptid) instead of current_tid.
1859 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1860 instead of current_tid. Use find_process_pid to verify pid
1861 argument is valid. Pass proper argument to remove_process.
1862 (spu_thread_alive): Compare current_ptid instead of current_tid.
1863 (spu_resume): Likewise.
1865 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1867 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1870 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1872 Implement the multiprocess extensions, and add linux multiprocess
1875 * server.h (ULONGEST): Declare.
1876 (struct ptid, ptid_t): New.
1877 (minus_one_ptid, null_ptid): Declare.
1878 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1879 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1880 (struct inferior_list_entry): Change `id' type from unsigned from
1882 (struct sym_cache, struct breakpoint, struct
1883 process_info_private): Forward declare.
1884 (struct process_info): Declare.
1885 (current_process): Declare.
1886 (all_processes): Declare.
1887 (initialize_inferiors): Declare.
1888 (add_thread): Adjust to use ptid_t.
1889 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1890 (add_process, remove_process, find_thread_pid): Declare.
1891 (find_inferior_id): Adjust to use ptid_t.
1892 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1893 (multi_process): Declare.
1894 (push_event): Adjust to use ptid_t.
1895 (read_ptid, write_ptid): Declare.
1896 (prepare_resume_reply): Adjust to use ptid_t.
1897 (clear_symbol_cache): Declare.
1898 * inferiors.c (all_processes): New.
1899 (null_ptid, minus_one_ptid): New.
1900 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1901 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1902 (add_thread): Change unsigned long to ptid. Remove gdb_id
1904 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1905 (gdb_id_to_thread): Rename to ...
1906 (find_thread_pid): ... this. Change unsigned long to ptid.
1907 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1908 (loaded_dll, pull_pid_from_list): Adjust.
1909 (add_process, remove_process, find_process_pid)
1910 (get_thread_process, current_process, initialize_inferiors): New.
1911 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1912 (struct target_waitstatus) <related_pid>: Ditto.
1913 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1915 (struct target_ops) <join>: Add `pid' argument.
1916 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1917 (struct target_ops) <wait>: Add `ptid' field. Change return type
1919 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1920 (mywait): Add `ptid' argument. Change return type to ptid_t.
1921 (target_pid_to_str): Declare.
1922 * target.c (set_desired_inferior): Adjust to use ptids.
1923 (mywait): Add new `ptid' argument. Adjust.
1924 (target_pid_to_str): New.
1925 * mem-break.h (free_all_breakpoints): Declare.
1926 * mem-break.c (breakpoints): Delelete.
1927 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1928 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1929 to use per-process breakpoint list.
1930 (free_all_breakpoints): New.
1931 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1932 (symbol_cache, all_symbols_looked_up): Delete.
1934 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1936 (prepare_resume_reply): Change ptid argument's type from unsigned
1937 long to ptid_t. Adjust. Implement W;process and X;process.
1938 (free_sym_cache, clear_symbol_cache): New.
1939 (look_up_one_symbol): Adjust to per-process symbol cache. *
1940 * server.c (cont_thread, general_thread, step_thread): Change type
1943 (multi_process): New.
1944 (last_ptid): Change type to ptid_t.
1945 (struct vstop_notif) <ptid>: Change type to ptid_t.
1946 (queue_stop_reply, push_event): Change `ptid' argument's type to
1948 (discard_queued_stop_replies): Add `pid' argument.
1949 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1950 changes. Don't reference the `attached' global.
1951 (attach_inferior): Adjust to mywait interface changes.
1952 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1953 features. Handle and report "multiprocess+". Handle
1955 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1957 (handle_v_kill): New.
1958 (handle_v_stopped): Adjust to use target_pid_to_str.
1959 (handle_v_requests): Allow multiple attaches and runs when
1960 multiprocess extensions are in effect. Handle "vKill".
1961 (myresume): Adjust to use ptids.
1962 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1963 (handle_status): Adjust to discard_queued_stop_replies interface
1965 (first_thread_of, kill_inferior_callback)
1966 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1967 (main): Call initialize_inferiors. Adjust to use ptids, killing
1968 and detaching from all inferiors. Handle multiprocess packet
1970 * linux-low.h: Include gdb_proc_service.h.
1971 (struct process_info_private): New.
1972 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1973 <lwpid_of>: Use ptid_get_lwp.
1974 (get_lwp_thread): Adjust.
1975 (struct lwp_info): Add `dead' member.
1976 (find_lwp_pid): Declare.
1977 * linux-low.c (thread_db_active): Delete.
1978 (new_inferior): Adjust comment.
1979 (inferior_pid): Delete.
1980 (linux_add_process): New.
1981 (handle_extended_wait): Adjust.
1982 (add_lwp): Change unsigned long to ptid.
1983 (linux_create_inferior): Add process to processes table. Adjust
1984 to use ptids. Don't set new_inferior here.
1985 (linux_attach_lwp): Rename to ...
1986 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1987 it. Adjust to use ptids.
1988 (linux_attach_lwp): New.
1989 (linux_attach): Add process to processes table. Don't set
1991 (struct counter): New.
1992 (second_thread_of_pid_p, last_thread_of_process_p): New.
1993 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1995 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1996 processes. Remove process from process table.
1997 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1998 to multiple processes.
1999 (any_thread_of): New.
2000 (linux_detach): Add `pid' argument, and handle it. Remove process
2001 from processes table.
2002 (linux_join): Add `pid' argument. Handle it.
2003 (linux_thread_alive): Change unsighed long argument to ptid_t.
2004 Consider dead lwps as not being alive.
2005 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2006 threads we're not interested in.
2007 (same_lwp, find_lwp_pid): New.
2008 (linux_wait_for_lwp): Change `pid' argument's type from int to
2010 (linux_wait_for_event): Rename to ...
2011 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2012 from int to ptid_t. Adjust.
2013 (linux_wait_for_event): New.
2014 (linux_wait_1): Add `ptid' argument. Change return type to
2015 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2016 that exit from the process table.
2017 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2019 (mark_lwp_dead): New.
2020 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2021 stopping all threads, mark its main lwp as dead.
2022 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2024 (fetch_register, usr_store_inferior_registers)
2025 (regsets_fetch_inferior_registers)
2026 (regsets_store_inferior_registers, linux_read_memory)
2027 (linux_write_memory): Inline `inferior_pid'.
2028 (linux_look_up_symbols): Adjust to use per-process
2030 (linux_request_interrupt): Adjust to use ptids.
2031 (linux_read_auxv): Inline `inferior_pid'.
2032 (initialize_low): Don't reference thread_db_active.
2033 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2034 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2035 (ps_getpid): Return the pid of the current inferior.
2036 * thread-db.c (proc_handle, thread_agent): Delete.
2037 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2039 (find_one_thread): Change argument type to ptid_t. Adjust to
2041 (maybe_attach_thread): Adjust to per-process data and ptids.
2042 (thread_db_find_new_threads): Ditto.
2043 (thread_db_init): Ditto.
2044 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2045 processes table. Adjust to use ptids.
2046 (spu_kill, spu_detach): Adjust interface. Remove process from
2048 (spu_join, spu_thread_alive): Adjust interface.
2049 (spu_wait): Adjust interface. Remove process from processes
2050 table. Adjust to use ptids.
2051 * win32-low.c (current_inferior_tid): Delete.
2052 (current_inferior_ptid): New.
2053 (debug_event_ptid): New.
2054 (thread_rec): Take a ptid. Adjust.
2055 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2056 (child_delete_thread): Ditto.
2057 (do_initial_child_stuff): Add `attached' argument. Add process to
2059 (child_fetch_inferior_registers, child_store_inferior_registers):
2061 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2062 (win32_attach): Pass 1 to do_initial_child_stuff.
2063 (win32_kill): Adjust interface. Remove process from processes
2065 (win32_detach): Ditto.
2066 (win32_join): Adjust interface.
2067 (win32_thread_alive): Take a ptid.
2068 (win32_resume): Adjust to use ptids.
2069 (get_child_debug_event): Ditto.
2070 (win32_wait): Adjust interface. Remove exiting process from
2073 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2075 Non-stop mode support.
2077 * server.h (non_stop): Declare.
2078 (gdb_client_data, handler_func): Declare.
2079 (delete_file_handler, add_file_handler, start_event_loop):
2081 (handle_serial_event, handle_target_event, push_event)
2082 (putpkt_notif): Declare.
2083 * target.h (enum resume_kind): New.
2084 (struct thread_resume): Replace `step' field by `kind' field.
2085 (TARGET_WNOHANG): Define.
2086 (struct target_ops) <wait>: Add `options' argument.
2087 <supports_non_stop, async, start_non_stop>: New fields.
2088 (target_supports_non_stop, target_async): New.
2089 (start_non_stop): Declare.
2090 (mywait): Add `options' argument.
2091 * target.c (mywait): Add `options' argument. Print child exit
2093 (start_non_stop): New.
2094 * server.c (non_stop, own_buf, mem_buf): New globals.
2095 (struct vstop_notif): New.
2096 (notif_queue): New global.
2097 (queue_stop_reply, push_event, discard_queued_stop_replies)
2098 (send_next_stop_reply): New.
2099 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2101 (attach_inferior): In non-stop mode, don't wait for the target
2103 (handle_general_set): Handle QNonStop.
2104 (handle_query): When handling qC, return the current general
2105 thread, instead of the first thread of the list.
2106 (handle_query): If the backend supports non-stop mode, include
2107 QNonStop+ in the qSupported query response.
2108 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2110 (handle_v_attach, handle_v_run): Handle non-stop mode.
2111 (handle_v_stopped): New.
2112 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2113 (myresume): Adjust to use resume_kind. Handle non-stop.
2114 (queue_stop_reply_callback): New.
2115 (handle_status): Handle non-stop mode.
2116 (main): Clear non_stop flag on reconnection. Use the event-loop.
2117 Refactor serial protocol handling from here ...
2118 (process_serial_event): ... to this new function. When GDB
2119 selects any thread, select one here. In non-stop mode, wait until
2120 GDB acks all pending events before exiting.
2121 (handle_serial_event, handle_target_event): New.
2122 * remote-utils.c (remote_open): Install remote_desc in the event
2124 (remote_close): Remove remote_desc from the event loop.
2125 (putpkt_binary): Rename to...
2126 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2127 (putpkt_binary): New as wrapper around putpkt_binary_1.
2128 (putpkt_notif): New.
2129 (prepare_resume_reply): In non-stop mode, don't change the
2131 * event-loop.c: New.
2132 * Makefile.in (OBJ): Add event-loop.o.
2133 (event-loop.o): New rule.
2135 * linux-low.h (pid_of): Moved here.
2137 (get_lwp_thread): Use lwpid_of.
2138 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2139 * linux-low.c (pid_of): Delete.
2140 (inferior_pid): Use lwpid_of.
2141 (linux_event_pipe): New.
2142 (target_is_async_p): New.
2144 (handle_extended_wait): Use lwpid_of.
2145 (add_lwp): Don't set lwpid field.
2146 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2147 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2148 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2149 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2150 first. Adjust to linux_wait_for_event interface changes. Use
2152 (linux_detach): Don't delete the main lwp here.
2153 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2154 (status_pending_p): Don't consider explicitly suspended lwps.
2155 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2156 pointer. Add OPTIONS argument. Change return type to int. Use
2157 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2158 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2159 pointer. Add status pointer argument. Return a pid instead of a
2160 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2161 changes. In non-stop mode, don't switch to a random thread.
2162 (linux_wait): Rename to...
2163 (linux_wait_1): ... this. Add target_options argument, and handle
2164 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2165 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2166 clean exit and signal exit code. Don't stop all threads in
2167 non-stop mode. In all-stop mode, only stop all threads when
2168 reporting a stop to GDB. Handle explicit thread stop requests.
2169 (async_file_flush, async_file_mark): New.
2171 (send_sigstop): Use lwpid_of.
2172 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2173 interface changes. In non-stop mode, don't switch to a random
2175 (linux_resume_one_lwp): Use lwpid_of.
2176 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2177 (linux_resume_one_thread): ... this. Handle resume_stop. In
2178 non-stop mode, don't look for pending flag in all threads.
2179 (resume_status_pending_p): Don't consider explicitly suspended
2181 (my_waitpid): Reimplement. Emulate __WALL.
2182 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2184 (sigchld_handler, linux_supports_non_stop, linux_async)
2185 (linux_start_non_stop): New.
2186 (linux_target_ops): Register linux_supports_non_stop, linux_async
2187 and linux_start_non_stop.
2188 (initialize_low): Install SIGCHLD handler.
2189 * thread-db.c (thread_db_create_event, find_one_thread)
2190 (thread_db_get_tls_address): Use lwpid_of.
2191 * win32-low.c (win32_detach): Adjust to use resume_kind.
2192 (win32_wait): Add `options' argument.
2193 * spu-low.c (spu_resume): Adjust to use resume_kind.
2194 (spu_wait): Add `options' argument.
2196 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2198 Decouple target code from remote protocol.
2200 * target.h (enum target_waitkind): New.
2201 (struct target_waitstatus): New.
2202 (struct target_ops) <wait>: Return an unsigned long. Take a
2203 target_waitstatus pointer instead of a char pointer.
2205 * target.c (mywait): Change prototype to return an unsigned long.
2206 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2207 * server.h (thread_from_wait, old_thread_from_wait): Delete
2209 (prepare_resume_reply): Change prototype to take a
2211 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2212 (last_status, last_ptid): New.
2213 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2214 pid instead of a signal.
2215 (attach_inferior): Remove "status" and "signal" parameters.
2217 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2219 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2220 (handle_v_requests, myresume): Remove "status" and "signal"
2222 (handle_status): New.
2223 (main): Delete local `status'. Adjust.
2224 * remote-utils.c: Include target.h.
2225 (prepare_resume_reply): Change prototype to take a
2226 target_waitstatus. Adjust.
2228 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2230 * spu-low.c (spu_wait): Adjust.
2231 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2233 (win32_wait): Adjust.
2235 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2237 * target.h (struct thread_resume): Delete leave_stopped member.
2238 (struct target_ops): Add a `n' argument to the `resume' callback.
2239 * server.c (start_inferior): Adjust.
2240 (handle_v_cont, myresume): Adjust.
2241 * linux-low.c (check_removed_breakpoint): Adjust to resume
2242 interface change, and to removed leave_stopped field.
2243 (resume_ptr): Delete.
2244 (struct thread_resume_array): New.
2245 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2246 resume interface change.
2247 (linux_continue_one_thread, linux_queue_one_thread)
2248 (resume_status_pending_p): Check if the resume field is NULL
2249 instead of checking the leave_stopped member.
2250 (linux_resume): Adjust to the target resume interface change.
2251 * spu-low.c (spu_resume): Adjust to the target resume interface
2253 * win32-low.c (win32_detach, win32_resume): Ditto.
2255 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2257 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2259 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2261 (linux_continue_one_thread): Only preserve the stepping flag if
2262 there's a pending breakpoint.
2264 2009-03-31 Pedro Alves <pedro@codesourcery.com>
2266 * server.c (main): After the inferior having exited, call
2267 remote_close before exiting gdbserver.
2269 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2271 Fix size of FPSCR in Power 7 processors.
2272 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2273 (PPC_FEATURE_HAS_DFP): New #define.
2274 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2277 2009-03-23 Pedro Alves <pedro@codesourcery.com>
2279 * server.c (handle_query) Whitespace and formatting.
2281 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2283 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2284 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2285 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2286 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2287 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2288 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2289 Makefile.in, configure.ac: Fix whitespace throughout.
2290 * configure: Regenerate.
2292 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2294 * inferiors.c (find_inferior): Make it safe for the callback
2295 function to delete the currently iterated inferior.
2297 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2299 * Makefile.in (linuw_low_h): Move higher.
2300 (thread-db.o): Depend on $(linux_low_h).
2302 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2304 Rename "process" to "lwp" throughout.
2306 * linux-low.c (all_processes): Rename to...
2307 (all_lwps): ... this.
2308 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2309 (add_process): Rename to ...
2310 (add_lwp): ... this. Adjust.
2311 (linux_create_inferior): Adjust.
2312 (linux_attach_lwp): Adjust.
2313 (linux_attach): Adjust.
2314 (linux_kill_one_process): Rename to ...
2315 (linux_kill_one_lwp): ... this. Adjust.
2316 (linux_kill): Adjust.
2317 (linux_detach_one_process): Rename to ...
2318 (linux_detach_one_lwp): ... this. Adjust.
2319 (linux_detach): Adjust.
2320 (check_removed_breakpoint): Adjust.
2321 (status_pending_p): Adjust.
2322 (linux_wait_for_process): Rename to ...
2323 (linux_wait_for_lwp): ... this. Adjust.
2324 (linux_wait_for_event): Adjust.
2325 (send_sigstop): Adjust.
2326 (wait_for_sigstop): Adjust.
2327 (stop_all_processes): Rename to ...
2328 (stop_all_lwps): ... this.
2329 (linux_resume_one_process): Rename to ...
2330 (linux_resume_one_lwp): ... this. Adjust.
2331 (linux_set_resume_request, linux_continue_one_thread)
2332 (linux_queue_one_thread, resume_status_pending_p)
2333 (usr_store_inferior_registers, regsets_store_inferior_registers)
2334 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2336 * linux-low.h (get_process): Rename to ...
2337 (get_lwp): ... this. Adjust.
2338 (get_thread_process): Rename to ...
2339 (get_thread_lwp): ... this. Adjust.
2340 (get_process_thread): Rename to ...
2341 (get_lwp_thread): ... this. Adjust.
2342 (struct process_info): Rename to ...
2343 (struct lwp_info): ... this.
2344 (all_processes): Rename to ...
2345 (all_lwps): ... this.
2346 * proc-service.c (ps_lgetregs): Adjust.
2347 * thread-db.c (thread_db_create_event, find_one_thread)
2348 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2350 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2352 * server.c (handle_query): Handle "qAttached".
2354 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2356 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2357 GPLv3, update license URL.
2359 2009-03-01 Doug Evans <dje@google.com>
2361 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2362 (server_h): Add gdb_signals.h.
2363 (signals.o): Update.
2364 * server.h (target_signal_from_host,target_signal_to_host_p)
2365 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2367 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2369 * remote-utils.c (getpkt): Also generate remote-debug
2370 information if noack_mode is set.
2372 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2374 * server.c (handle_query): Report qXfer:siginfo:read and
2375 qXfer:siginfo:write as supported and handle them.
2376 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2377 * linux-low.c (linux_xfer_siginfo): New.
2378 (linux_target_ops): Set it.
2380 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2382 * server.c (gdbserver_usage): Mention --remote-debug.
2383 (main): Accept '--remote-debug' switch.
2385 2009-01-18 Doug Evans <dje@google.com>
2387 * regcache.c (new_register_cache): No need to check result of xcalloc.
2388 * server.c (handle_search_memory): Back out calls to xmalloc,
2389 result is checked and error is returned to user upon failure.
2390 (handle_query): Ditto. Add more checks for result of malloc.
2391 (handle_v_cont): Check result of malloc, report error back to
2393 (handle_v_run): Ditto. Call freeargv.
2394 * server.h (freeargv): Declare.
2395 * utils.c (freeargv): New fn.
2397 2009-01-15 Doug Evans <dje@google.com>
2399 * gdbreplay.c (perror_with_name): Make arg const char *.
2400 * server.h (target_signal_to_name): Make return type const char *.
2401 * thread-db.c (thread_db_err_str): Make return type const char *.
2402 * utils.c (perror_with_name): Make arg const char *.
2404 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2406 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2407 when handling a EXIT_PROCESS_DEBUG_EVENT.
2409 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2411 * gdbreplay.c (gdbreplay_version): Update copyright year.
2412 * server.c (gdbserver_version): Likewise.
2414 2009-01-05 Doug Evans <dje@google.com>
2416 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2417 (handle_extended_wait): Improve comment.
2419 2008-12-13 Doug Evans <dje@google.com>
2421 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2422 * server.h (ATTR_MALLOC): New macro.
2423 (xmalloc,xcalloc,xstrdup): Declare.
2424 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2425 * inferiors.c: Ditto.
2426 * linux-low.c: Ditto.
2427 * mem-break.c: Ditto.
2428 * regcache.c: Ditto.
2429 * remote-utils.c: Ditto.
2432 * win32-low.c: Ditto.
2434 2008-12-12 Doug Evans <dje@google.com>
2436 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2437 in debugging printf.
2439 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2441 2008-12-09 Doug Evans <dje@google.com>
2443 * linux-low.h (struct process_info): Delete member tid, unused.
2444 * thread-db.c (find_one_thread): Update.
2445 (maybe_attach_thread): Update.
2447 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2449 * target.h (struct target_ops): Add qxfer_osdata member.
2450 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2452 (linux_qxfer_osdata): New functions.
2453 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2455 * server.c (handle_query): Handle "qXfer:osdata:read:".
2456 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2457 (buffer_xml_printf): New functions.
2458 * server.h (struct buffer): New.
2459 (buffer_grow_str, buffer_grow_str0): New macros.
2460 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2461 (buffer_xml_printf): Declare.
2463 2008-11-24 Doug Evans <dje@google.com>
2465 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2467 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2469 * server.c (handle_v_run): Always use the supplied argument list.
2471 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2473 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2474 (xtensa_regmap_table): Add entry for scompare1.
2476 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2478 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2479 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2480 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2481 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2482 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2483 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2484 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2485 XML target descriptions.
2486 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2487 when inferior is running on an ISA 2.05 or later processor. Add
2488 special case to return offset for full 64-bit slot of FPSCR when
2491 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2493 * Makefile.in (SFILES, clean): Added sparc64 files.
2494 (reg-sparc64.o, reg-sparc64.c): New.
2495 * configure.srv (sparc*-*-linux*): New configuration.
2496 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2497 syscall arguments for SPARC.
2498 (regsets_store_inferior_registers): Likewise.
2499 * linux-sparc-low.c: New file.
2501 2008-10-21 Doug Evans <dje@google.com>
2503 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2504 (READLINE_DIR,READLINE_DEP): Delete.
2505 (INTERNAL_CFLAGS): Update.
2506 (LINTFLAGS): Update.
2508 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2510 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2511 whole argv from the last run, not just argv[0].
2513 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2515 * regcache.c (new_register_cache): Return NULL if the register
2516 cache size isn't known yet.
2517 (free_register_cache): Avoid dereferencing a NULL regcache.
2519 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2521 * configure.srv: Merge MIPS and MIPS64.
2523 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2525 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2527 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2529 * Makefile.in: Add required vsx dependencies.
2531 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2532 Declare init_registers_powerpc_vsx32l.
2533 Declare init_registers_powerpc_vsx64l.
2534 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2535 (ppc_arch_setup): Check for VSX in hwcap.
2536 (ppc_fill_vsxregset): New function.
2537 (ppc_store_vsxregset): New function.
2538 Add new VSX entry in regset_info target_regsets.
2540 * configure.srv: Add new VSX dependencies.
2542 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2544 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2545 (remote_open): Set or clear transport_is_reliable.
2546 (putpkt_binary): Don't expect acks in noack mode.
2547 (getpkt): Don't send ack/nac in noack mode.
2548 * server.c (handle_general_set): Handle QStartNoAckMode.
2549 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2551 (main): Reset noack_mode on every connection.
2552 * server.h (noack_mode): Declare.
2554 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2556 * Makefile.in (GDBREPLAY_OBS): New variable.
2557 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2559 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2560 Daniel Jacobowitz <dan@codesourcery.com>
2562 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2563 (usr_store_inferior_registers): Likewise.
2564 (regsets_store_inferior_registers): Likewise.
2566 2008-07-31 Rolf Jansen <rj@surtec.com>
2567 Pedro Alves <pedro@codesourcery.com>
2569 * configure.ac: Check for memmem declaration.
2570 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2571 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2572 (disable_packet_qfThreadInfo): Unconditionally compile.
2573 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2574 * configure, config.in: Regenerate.
2576 2008-07-28 Doug Kwan <dougkwan@google.com>
2578 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2579 (linux_write_memory): Remove declaration of errno.
2581 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2583 * linux-low.c (handle_extended_wait): Do not use "status"
2584 variable uninitialized.
2586 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2588 * server.c (handle_v_attach): Inhibit reporting dll changes.
2590 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2592 * remote-utils.c (prepare_resume_reply): If requested, don't
2593 output "thread:TID" in the T stop reply.
2595 * server.c (disable_packet_vCont, disable_packet_Tthread)
2596 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2597 (handle_query): If requested, disable support for qC, qfThreadInfo
2599 (handle_v_requests): If requested, disable support for vCont.
2600 (gdbserver_show_disableable): New.
2601 (main): Handle --disable-packet and --disable-packet=LIST.
2603 * server.h (disable_packet_vCont, disable_packet_Tthread)
2604 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2606 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2608 * server.c (gdbserver_usage): Mention --version.
2610 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2612 * Makefile.in (gdbreplay.o): New rule.
2614 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2616 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2617 message, not gdbserver.
2619 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2620 Nathan Sidwell <nathan@codesourcery.com>
2621 Joseph Myers <joseph@codesourcery.com>
2623 * acinclude.m4: Include ../../config/acx.m4.
2624 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2625 * configure, config.in: Regenerate.
2626 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2627 * server.c (gdbserver_version): Print PKGVERSION.
2628 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2629 (main): Adjust gdbserver_usage calls.
2630 * gdbreplay.c (version, host_name): Add declarations.
2631 (gdbreplay_version, gdbreplay_usage): New.
2632 (main): Accept --version and --help options.
2634 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2636 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2637 (arm_breakpoint_at): Handle Thumb.
2638 (the_low_target): Add comment.
2640 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2642 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2644 2008-05-09 Doug Evans <dje@google.com>
2646 * server.h (decode_search_memory_packet): Declare.
2647 * remote-utils.c (decode_search_memory_packet): New fn.
2648 * server.c (handle_search_memory_1): New fn.
2649 (handle_search_memory): New fn.
2650 (handle_query): Process qSearch:memory packets.
2652 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2654 * regcache.c (registers_length): Remove.
2655 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2656 full register packet.
2657 * regcache.h (registers_length): Remove prototype.
2658 * server.h (PBUFSIZ): Define to 16384.
2660 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2662 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2663 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2664 powerpc-64l.o, and powerpc-altivec64l.o.
2665 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2666 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2667 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2668 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2669 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2672 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2673 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2674 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2675 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2676 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2677 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2678 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2679 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2680 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2681 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2684 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2685 (init_registers_powerpc_32l): ... this new prototype.
2686 (init_registers_powerpc_32): Remove, replace by ...
2687 (init_registers_powerpc_altivec32l): ... this new prototype.
2688 (init_registers_powerpc_e500): Remove, replace by ...
2689 (init_registers_powerpc_e500l): ... this new prototype.
2690 (init_registers_ppc64): Remove, replace by ...
2691 (init_registers_powerpc_64l): ... this new prototype.
2692 (init_registers_powerpc_64): Remove, replace by ...
2693 (init_registers_powerpc_altivec64l): ... this new prototype.
2694 (ppc_num_regs): Set to 73.
2695 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2696 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2697 (ppc_cannot_store_register): Handle orig_r3 and trap.
2698 (ppc_arch_setup): Update init_registers_... calls.
2699 (ppc_fill_gregset): Handle orig_r3 and trap.
2701 * inferiors.c (clear_inferiors): Reset current_inferior.
2703 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2705 * acinclude.m4: Add override.m4.
2706 * configure: Regenerate.
2708 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2710 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2711 initial call to init_register_ppc64.
2713 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2715 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2716 powerpc*-*-linux* case.
2717 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2719 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2721 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2722 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2724 * linux-ppc-low.c: Include <elf.h>.
2725 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2726 (ppc_hwcap): New global variable.
2727 (ppc_regmap): Remove __SPE__ #ifdef sections.
2728 (ppc_regmap_e500): New global variable.
2729 (ppc_cannot_store_register): Update __SPE__ special case.
2730 (ppc_get_hwcap): New function.
2731 (ppc_arch_setup): Use it to determine whether inferior supports
2732 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2733 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2734 Do not access registers if target does not support AltiVec.
2735 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2736 Do not access registers if target does not support SPE.
2737 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2739 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2741 * linux-low.c (disabled_regsets, num_regsets): New.
2742 (use_regsets_p): Delete.
2743 (linux_wait_for_process): Clear disabled_regsets.
2744 (regsets_fetch_inferior_registers): Check and set it.
2745 (regsets_store_inferior_registers): Likewise.
2746 (linux_fetch_registers, linux_store_registers): Do not use
2748 (initialize_low): Allocate disabled_regsets.
2750 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2752 * Makefile.in (LIBOBJS): New.
2754 (memmem.o): New rule.
2755 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2756 * configure: Regenerated.
2758 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2760 * server.c (handle_query): Never return "unsupported" for
2761 qXfer:features:read queries.
2763 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2765 * server.c (get_features_xml): Fix inverted condition.
2766 (handle_query): Always support qXfer:feature:read.
2768 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2770 * server.c (wrapper_argv): New.
2771 (start_inferior): Handle wrapper_argv. If set, expect an extra
2773 (gdbserver_usage): Document --wrapper.
2774 (main): Parse --wrapper.
2776 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2778 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2779 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2780 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2781 (ppc_set_pc): Likewise.
2782 (ppc_arch_setup): New function.
2783 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2784 of collect_register.
2785 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2787 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2789 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2790 instead of linux-ppc64-low.o.
2791 * linux-ppc64-low.c: Remove file.
2792 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2793 (linux-ppc64-low.o): Remove rule.
2795 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2796 (init_registers_powerpc_64): Likewise.
2797 (ppc_regmap): Conditionally define depending on __powerpc64__.
2798 (ppc_cannot_store_register): Do not special-case "fpscr" when
2799 compiled on __powerpc64__.
2800 (ppc_collect_ptrace_register): New function.
2801 (ppc_supply_ptrace_register): New function.
2802 (ppc_breakpoint): Change type to "unsigned int".
2803 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2804 (the_low_target): Conditionally provide initializers for the
2805 arch_setup member depending on __powerpc64__. Install
2806 collect_ptrace_register and supply_ptrace_register members.
2808 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2810 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2811 * server.c (gdbserver_xmltarget): Define.
2812 (get_features_xml): Use it to replace "target.xml" and arch_string.
2814 * configure.srv: Remove srv_xmltarget. Add XML files that were
2815 mentioned there to srv_xmlfiles instead. Remove conditional tests
2816 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2817 srv_xmlfiles and srv_regobj to include all possible choices.
2818 * configure.ac (srv_xmltarget): Remove.
2819 (srv_xmlfiles): Do not add "target.xml".
2820 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2821 checks for supplementary target information.
2822 * configure: Regenerate.
2823 * Makefile.in (XML_TARGET): Remove.
2824 (target.xml): Remove rule.
2825 (clean): Do not clean up target.xml.
2826 (.PRECIOUS): Do not mention target.xml.
2828 * target.h (struct target_ops): Remove arch_string member.
2829 * linux-low.c (linux_arch_string): Remove.
2830 (linux_target_ops): Remove arch_string initializer.
2831 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2832 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2833 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2834 * spu-low.c (spu_arch_string): Remove.
2835 (spu_target_ops): Remove arch_string initializer.
2836 * win32-low.c (win32_arch_string): Remove.
2837 (win32_target_ops): Remove arch_string initializer.
2838 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2839 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2840 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2842 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2844 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2845 by collect_ptrace_register and supply_ptrace_register hooks.
2846 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2847 instead of checking for the_low_target.left_pad_xfer.
2848 (usr_store_inferior_registers): Use collect_ptrace_register callback
2849 instead of checking for the_low_target.left_pad_xfer.
2851 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2852 (s390_supply_ptrace_register): Likewise.
2853 (s390_fill_gregset): Call s390_collect_ptrace_register.
2854 (the_low_target): Update.
2856 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2857 (ppc_supply_ptrace_register): Likewise.
2858 (the_low_target): Update.
2860 * linux-i386-low.c (the_low_target): Update.
2861 * linux-x86-64-low.c (the_low_target): Update.
2863 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2865 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2866 reg-s390.o and reg-s390x.o.
2868 * linux-low.c (new_inferior): New global variable.
2869 (linux_create_inferior, linux_attach): Set it.
2870 (linux_wait_for_process): Call the_low_target.arch_setup after the
2871 target has stopped for the first time.
2872 (initialize_low): Do not call the_low_target.arch_setup.
2874 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2875 (s390_set_pc): Likewise.
2876 (s390_arch_setup): New function.
2877 (the_low_target): Use s390_arch_setup as arch_setup routine.
2879 * regcache.c (realloc_register_cache): New function.
2880 (set_register_cache): Call it for each existing regcache.
2882 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2884 * server.h (init_registers): Remove prototype.
2886 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2887 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2888 instead of init_registers ().
2889 * linux-arm-low.c (init_registers_arm): Add prototype.
2890 (init_registers_arm_with_iwmmxt): Likewise.
2891 (the_low_target): Add initializer for arch_setup field.
2892 * linux-cris-low.c (init_registers_cris): Add prototype.
2893 (the_low_target): Add initializer for arch_setup field.
2894 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2895 (the_low_target): Add initializer for arch_setup field.
2896 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2897 (the_low_target): Add initializer for arch_setup field.
2898 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2899 (the_low_target): Add initializer for arch_setup field.
2900 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2901 (the_low_target): Add initializer for arch_setup field.
2902 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2903 (the_low_target): Add initializer for arch_setup field.
2904 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2905 (init_registers_mips64_linux): Likewise.
2906 (the_low_target): Add initializer for arch_setup field.
2907 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2908 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2909 (the_low_target): Add initializer for arch_setup field.
2910 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2911 (init_registers_powerpc_64): Likewise.
2912 (the_low_target): Add initializer for arch_setup field.
2913 * linux-s390-low.c (init_registers_s390): Add prototype.
2914 (init_registers_s390x): Likewise.
2915 (the_low_target): Add initializer for arch_setup field.
2916 * linux-sh-low.c (init_registers_sh): Add prototype.
2917 (the_low_target): Add initializer for arch_setup field.
2918 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2919 (the_low_target): Add initializer for arch_setup field.
2920 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2921 (the_low_target): Add initializer for arch_setup field.
2923 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2924 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2925 instead of init_registers ().
2926 * win32-arm-low.c (init_registers_arm): Add prototype.
2927 (the_low_target): Add initializer for arch_setup field.
2928 * win32-i386-low.c (init_registers_i386): Add prototype.
2929 (the_low_target): Add initializer for arch_setup field.
2931 * spu-low.c (init_registers_spu): Add prototype.
2932 (initialize_low): Call initialie_registers_spu () instead of
2933 initialize_registers ().
2935 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2937 * server.c (handle_v_requests): When handling the vRun and vAttach
2938 packets, if already debugging a process, don't kill it. Return an
2941 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2943 * server.c (handle_query): Correct length check.
2945 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2947 * win32-low.c (do_initial_child_stuff): Add process handle
2948 parameter. Set current_process_handle and current_process_id from the
2949 parameters. Clear globals.
2950 (win32_create_inferior): Don't set current_process_handle and
2951 current_process_id here. Instead pass them on the call to
2952 do_initial_child_stuff.
2953 (win32_attach): Likewise.
2954 (win32_clear_inferiors): New.
2955 (win32_kill): Don't close the current process handle or the
2956 current thread handle here. Instead call win32_clear_inferiors.
2957 (win32_detach): Don't open a new handle to the process. Call
2958 win32_clear_inferiors.
2959 (win32_join): Don't rely on current_process_handle; open a new
2960 handle using the process id.
2961 (win32_wait): Call win32_clear_inferiors when the inferior process
2964 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2966 * server.c (monitor_show_help): Add "exit".
2968 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2970 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2971 (clean): Add reg-xtensa.c.
2972 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2973 * configure.srv (xtensa*-*-linux*) New target.
2974 * linux-xtensa-low.c: New.
2975 * xtensa-xtregs.c: New.
2977 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2979 * hostio.c: Don't include errno.h.
2980 (errno_to_fileio_errno): Move to hostio-errno.
2981 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2982 error number outputting to the target->hostio_last_error callback.
2983 (hostio_packet_error): Use FILEIO_EINVAL directly.
2984 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2985 calls to hostio_error.
2986 * hostio-errno.c: New.
2987 * server.h (hostio_last_error_from_errno): Declare.
2988 * target.h (target_ops): Add hostio_last_error member.
2989 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2990 as hostio_last_error handler.
2991 * spu-low.c (spu_target_ops): Likewise.
2992 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2993 (wince_hostio_last_error): New functions.
2994 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2995 as hostio_last_error handler.
2996 (win32_target_ops) [!_WIN32_WCE]: Register
2997 hostio_last_error_from_errno as hostio_last_error handler.
2998 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2999 (hostio-errno.o): New rule.
3000 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3001 * configure.srv (srv_hostio_err_objs): New variable. Default to
3003 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3004 * configure: Regenerate.
3006 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3008 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3009 (linux_kill, linux_detach): Clean up the process list.
3010 * remote-utils.c (remote_open): Improve port number parsing.
3011 (putpkt_binary, input_interrupt): Only send interrupts if the target
3013 * server.c (extended_protocol): Make static.
3014 (attached): Define earlier.
3015 (exit_requested, response_needed, program_argv): New variables.
3016 (target_running): New.
3017 (start_inferior): Clear attached here.
3018 (attach_inferior): Set attached here.
3019 (require_running): Define.
3020 (handle_query): Use require_running and target_running. Implement
3022 (handle_v_attach, handle_v_run): New.
3023 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3024 (gdbserver_usage): Update.
3025 (main): Redo argument parsing. Handle --debug and --multi. Handle
3026 --attach along with other options or after the port. Save
3027 program_argv. Support no initial program. Resynchronize
3028 communication with GDB after an error. Handle "monitor exit".
3029 Use require_running and target_running. Always allow the extended
3030 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3031 restart in extended mode.
3032 * README: Refer to the GDB manual. Update --attach usage.
3034 2007-12-20 Andreas Schwab <schwab@suse.de>
3036 * linux-low.c (STACK_SIZE): Define.
3037 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3038 (linux_test_for_tracefork): Likewise.
3040 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3042 * linux-low.c (linux_wait_for_event): Update messages. Do not
3043 reinsert auto-delete breakpoints.
3044 * mem-break.c (struct breakpoint): Change return type of handler to
3046 (set_breakpoint_at): Update handler type.
3047 (reinsert_breakpoint_handler): Return 1 instead of calling
3049 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3051 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3052 * mem-break.h (set_breakpoint_at): Update handler type.
3053 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3054 * win32-low.c (auto_delete_breakpoint): New.
3055 (get_child_debug_event): Use it.
3057 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3059 * configure.ac: Check for pread and pwrite.
3060 * hostio.c (handle_pread): Fall back to lseek and read.
3061 (handle_pwrite): Fall back to lseek and write.
3062 * config.in, configure: Regenerated.
3064 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3066 * server.c (myresume): Add own_buf argument.
3067 (main): Update calls.
3069 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3071 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3072 * remote-utils.c (remote_open): Do not call disable_async_io.
3073 (block_async_io): Delete.
3074 (unblock_async_io): Make static.
3075 (initialize_async_io): New.
3076 * server.c (handle_v_cont): Handle async I/O here.
3077 (myresume): Likewise. Move other common resume tasks here...
3078 (main): ... from here. Call initialize_async_io. Disable async
3079 I/O before the main loop.
3080 * server.h (initialize_async_io): Declare.
3081 (block_async_io, unblock_async_io): Delete prototypes.
3082 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3084 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3086 * remote-utils.c (readchar): Allow binary data in received messages.
3088 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3090 * win32-low.c (attaching): New global.
3091 (win32_create_inferior): Clear the `attaching' global.
3092 (win32_attach): Set the `attaching' global.
3093 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3094 attaching. Only set a breakpoint at the entry point if not
3097 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3099 * server.c (main): Don't report dll events on the initial
3100 connection on attaches.
3102 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3104 * server.c (main): Relax numerical bases supported for the pid of
3105 the --attach command line argument.
3107 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3109 * win32-low.c (win32_attach): Call OpenProcess before
3110 DebugActiveProcess, not after. Add last error output to error
3113 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3115 * win32-low.c (win32_get_thread_context)
3116 (win32_set_thread_context): New functions.
3117 (thread_rec): Use win32_get_thread_context.
3118 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3119 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3122 2007-12-03 Leo Zayas
3123 Pedro Alves <pedro_alves@portugalmail.pt>
3125 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3127 (child_add_thread): Minor cleanup.
3128 (child_continue): Resume artificially suspended threads before
3129 calling ContinueDebugEvent.
3130 (suspend_one_thread): New.
3131 (fake_breakpoint_event): New.
3132 (get_child_debug_event): Change return type to int. Check here if
3133 gdb sent an interrupt request. If a soft interrupt was requested,
3134 fake a breakpoint event. Return 0 if there is no event to handle,
3136 (win32_wait): Don't check here if gdb sent an interrupt request.
3137 Ensure there is a valid event to handle.
3138 (win32_request_interrupt): Add soft interruption method as last
3141 2007-12-03 Leo Zayas
3142 Pedro Alves <pedro_alves@portugalmail.pt>
3144 * win32-low.h (win32_thread_info): Add descriptions to the
3145 structure members. Replace `suspend_count' counter by a
3147 * win32-low.c (thread_rec): Update condition of when to get the
3148 context from the inferior. Rely on ContextFlags being set if it
3149 has already been retrieved. Only suspend the inferior thread if
3150 we haven't already. Warn if that fails.
3151 (continue_one_thread): s/suspend_count/suspended/. Only call
3152 ResumeThread once. Warn if that fails.
3154 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3156 * win32-low.c (win32_wait): Don't read from the inferior when it
3159 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3161 * Makefile.in (win32_low_h): New variable.
3162 (win32-low.o): Add dependency on $(win32_low_h).
3163 (win32-arm-low.o, win32-i386-low.o): New rules.
3165 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3167 * hostio.c: Correct copyright year.
3169 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3171 * Makefile.in (OBS): Add hostio.o.
3172 (hostio.o): New rule.
3173 * server.h (handle_vFile): Declare.
3174 * hostio.c: New file.
3175 * server.c (handle_v_requests): Take packet_len and new_packet_len
3176 for binary packets. Call handle_vFile.
3177 (main): Update call to handle_v_requests.
3179 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3181 * linux-low.c: Include <sched.h>.
3183 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3185 * linux-low.c (linux_tracefork_grandchild): New.
3186 (linux_tracefork_child): Use clone.
3187 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3189 2007-10-31 Joel Brobecker <brobecker@adacore.com>
3191 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3193 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3195 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3197 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3199 * inferiors.c (change_inferior_id): Delete.
3200 (add_pid_to_list, pull_pid_from_list): New.
3201 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3202 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3203 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3204 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3205 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3206 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3207 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3208 (using_threads): Always set to 1.
3209 (handle_extended_wait): New.
3210 (add_process): Do not set TID.
3211 (linux_create_inferior): Set must_set_ptrace_flags.
3212 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3213 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3214 (linux_thread_alive): Rename TID argument to LWPID.
3215 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3216 (linux_wait_for_event): Do not use TID or check using_threads. Update
3217 call to dead_thread_notify. Call handle_extended_wait.
3218 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3219 (send_sigstop): Delete sigstop_sent.
3220 (wait_for_sigstop): Avoid TID.
3221 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3222 (linux_test_for_tracefork): New.
3223 (linux_lookup_signals): Use thread_db_active and
3224 linux_supports_tracefork_flag.
3225 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3226 * linux-low.h (get_process_thread): Avoid TID.
3227 (struct process_ifo): Move thread_known and tid to the end. Remove
3229 (linux_attach_lwp, thread_db_init): Update prototypes.
3230 * server.h (change_inferior_id): Delete prototype.
3231 (add_pid_to_list, pull_pid_from_list): New prototypes.
3232 * thread-db.c (thread_db_use_events): New.
3233 (find_first_thread): Rename to...
3234 (find_one_thread): ...this. Update callers and messages. Do not
3235 call fatal. Check thread_db_use_events. Do not call
3236 change_inferior_id or new_thread_notify.
3237 (maybe_attach_thread): Update. Do not call new_thread_notify.
3238 (thread_db_init): Set thread_db_use_events. Check use_events.
3239 * utils.c (fatal, warning): Correct message prefix.
3241 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3243 * Makefile.in (clean): Remove new files.
3244 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3245 (powerpc-64.o, powerpc-64.c): New rules.
3246 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3247 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3249 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3251 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3252 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3253 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3254 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3255 (target_regsets): Add AltiVec and SPE register sets.
3256 * configure.ac: Check for AltiVec and SPE.
3257 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3258 (ppc_fill_vrregset, ppc_store_vrregset): New.
3259 (target_regsets): Add AltiVec register set.
3260 * configure: Regenerated.
3262 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3264 * linux-low.c (O_LARGEFILE): Define.
3265 (linux_read_memory): Use /proc/PID/mem.
3266 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3267 * configure, config.in: Regenerated.
3269 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3271 * linux-low.c (linux_wait_for_event): Do not pass signals while
3274 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3276 * win32-low.c (create_process): New.
3277 (win32_create_inferior): Use create_process instead of
3278 CreateProcess. If create_process failed retry appending an ".exe"
3279 suffix. Store the GetLastError result immediatelly after
3280 create_process calls and use it on the call to error.
3282 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3284 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3286 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3288 * configure.ac: Switch license to GPLv3.
3290 2007-08-01 Michael Snyder <msnyder@access-company.com>
3292 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3294 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3296 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3298 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3299 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3300 CloseToolhelp32Snapshot.
3301 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3302 CloseToolhelp32Snapshot.
3304 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3306 * server.c (main): Check for inferior exit before main loop.
3308 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3310 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3311 instead of on tmp_desc.
3313 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3314 Daniel Jacobowitz <dan@codesourcery.com>
3316 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3317 (add_thread): Minor cleanups.
3318 (clear_inferiors): Move lower in the file. Clear the DLL
3320 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3321 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3322 (xml_escape_text): New.
3323 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3325 (handle_v_cont): Report errors.
3326 (gdbserver_version): Update.
3327 (main): Correct size of own_buf. Do not report initial DLL events.
3328 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3329 (unloaded_dll, xml_escape_text): New.
3330 * win32-low.c (enum target_waitkind): Update comments.
3331 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3332 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3333 (win32_EnumProcessModules, win32_GetModuleInformation)
3334 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3335 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3336 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3337 (win32_Module32First, win32_Module32Next, load_toolhelp)
3338 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3339 (get_child_debug_event): Handle DLL events.
3340 (win32_wait): Likewise.
3342 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3344 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3345 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3347 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3349 * win32-low.c (handle_output_debug_string): Ignore event if not
3352 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3354 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3356 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3358 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3360 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3362 * inferiors.c (change_inferior_id): Add comment.
3363 * linux-low.c (check_removed_breakpoint): Add an early
3364 prototype. Improve debug output.
3365 (linux_attach): Doc update.
3366 (linux_detach_one_process, linux_detach): Clean up before releasing
3368 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3369 * linux-low.h (struct process_info): Doc improvement.
3370 * mem-break.c (delete_all_breakpoints): New.
3371 * mem-break.h (delete_all_breakpoints): New prototype.
3372 * thread-db.c (find_first_thread): New.
3373 (thread_db_create_event): Call it instead of
3374 thread_db_find_new_threads. Clean up unused variables.
3375 (maybe_attach_thread): Remove first thread handling.
3376 (thread_db_find_new_threads): Use find_first_thread.
3377 (thread_db_get_tls_address): Likewise.
3379 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3381 * thread-db.c (thread_db_find_new_threads): Add prototype.
3382 (thread_db_create_event): Check for the main thread before adding
3384 (maybe_attach_thread): Only enable event reporting if TID == 0.
3385 (thread_db_get_tls_address): Check for new threads.
3387 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3389 * linux-low.c (linux_create_inferior): Try execv before execvp.
3390 * spu-low.c (spu_create_inferior): Likewise.
3392 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3394 * linux-low.c (linux_create_inferior): Change execv to execvp.
3395 * spu-low.c (spu_create_inferior): Likewies.
3397 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3399 * Makefile.in (clean): Clean new files instead of deleted ones.
3400 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3401 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3403 * configure.srv: Specify XML files and new regformats for MIPS and
3405 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3406 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3407 an entry for the restart register.
3408 (mips_cannot_fetch_register, mips_cannot_store_register)
3409 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3410 register names to match the XML descriptions.
3411 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3412 restart register instead of $0.
3414 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3415 Markus Deuling <deuling@de.ibm.com>
3417 * remote-utils.c (decode_xfer_write): New function.
3418 * server.h (decode_xfer_write): Add prototype.
3419 * server.c (handle_query): Add PACKET_LEN argument. Support
3420 qXfer:spu:read and qXfer:spu:write packets.
3421 (main): Pass packet_len to handle_query.
3422 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3423 * target.h (target_ops): Add qxfer_spu.
3425 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3427 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3428 accessing non-seekable spufs files.
3430 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3432 * server.c (handle_query): Add reply for qC packet.
3434 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3435 Leo Zayas <lerele@champenstudios@com>
3437 * server.h (check_remote_input_interrupt_request): New function.
3438 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3439 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3440 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3441 (check_remote_input_interrupt_request): New function.
3442 * server.h (check_remote_input_interrupt_request): Declare.
3443 * win32-low.c (winapi_DebugBreakProcess,
3444 winapi_GenerateConsoleCtrlEvent): New typedefs.
3445 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3447 (win32_wait): Check for remote interrupt request
3448 with check_remote_input_interrupt_request.
3449 (win32_request_interrupt): New function.
3450 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3452 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3454 * win32-low.c (debug_registers_changed,
3455 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3456 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3457 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3458 (thread_rec): Get context using the low target.
3459 (child_add_thread): Call thread_added on the low target,
3460 which does the same thing.
3462 (do_initial_child_stuff): Remove debug registers references.
3463 Set context using the low target. Resume threads after
3464 setting the contexts.
3465 (child_continue): Remove dead variable. Remove debug
3466 registers references.
3467 (child_fetch_inferior_registers): Go through the low target.
3468 (do_child_store_inferior_registers): Remove.
3469 (child_store_inferior_registers): Go through the low target.
3470 (win32_resume): Remove debug registers references.
3471 Set context using the low target.
3472 (handle_exception): Change return type to void. Don't record
3473 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3474 first chance exception.
3475 (get_child_debug_event): Change return type to void. Remove
3476 goto loop. Always return after waiting for debug event.
3477 (win32_wait): Convert to switch statement. Handle spurious
3480 * win32-i386-low.c (debug_registers_changed,
3481 debug_registers_used): New.
3482 (initial_stuff): Rename to ...
3483 (i386_initial_stuff): ... this. Clear debug registers
3485 (store_debug_registers): Delete.
3486 (i386_get_thread_context): New.
3487 (load_debug_registers): Delete.
3488 (i386_set_thread_context): New.
3489 (i386_thread_added): New.
3490 (single_step): Rename to ...
3491 (i386_single_step): ... this.
3492 (do_fetch_inferior_registers): Rename to ...
3493 (i386_fetch_inferior_register): ... this.
3494 (i386_store_inferior_register): New.
3495 (the_low_target): Adapt to new interface.
3497 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3498 (arm_get_thread_context): New.
3499 (arm_set_thread_context): New.
3501 (do_fetch_inferior_registers): Rename to ...
3502 (arm_fetch_inferior_register): ... this.
3503 (arm_store_inferior_register): New.
3504 (arm_wince_breakpoint): Reimplement as unsigned long.
3505 (arm_wince_breakpoint_len): Define.
3506 (the_low_target): Adapt to new interface.
3508 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3509 load_debug_registers. Add get_thread_context, set_thread_context,
3510 thread_added and store_inferior_register. Rename
3511 fetch_inferior_registers to fetch_inferior_register.
3512 (regptr): Remove declaration.
3514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3516 * linux-low.c (linux_detach): Change return type to int. Return 0.
3517 * spu-low.c (spu_detach): Likewise.
3519 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3521 * target.h (target_ops): Change return type of detach to int.
3523 (join_inferior): New.
3524 * server.c (main): Don't skip detach support on mingw32.
3525 If the inferior doesn't support detaching return error.
3526 Call join_inferior instead of using waitpid.
3527 * linux-low.c (linux_join): New.
3528 (linux_target_op): Add linux_join.
3529 * spu-low.c (spu_join): New.
3530 (spu_target_ops): Add spu_join.
3531 * win32-low.c (win32_detach): Adapt to new interface.
3532 Reopen current_process_handle before detaching. Issue a child
3533 resume before detaching.
3535 (win32_target_op): Add win32_join.
3537 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3539 * win32-low.c (win32-attach): Fix return value.
3540 * target.h (target_ops): Describe ATTACH return values.
3542 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3544 * win32-low.c (GETPROCADDRESS): Define.
3545 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3546 (winapi_DebugSetProcessKillOnExit): Likewise.
3547 (win32_create_inferior): Force usage of ansi CreateProcessA.
3548 (win32_attach): Use GETPROCADDRESS.
3549 (win32_detach): Likewise.
3551 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3553 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3555 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3557 * win32-low.c: Commit leftover changes from 2007-03-29.
3559 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3561 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3562 fields short instead of int. Add explicit padding.
3563 (i387_cache_to_fsave): Remove unnecessary casts.
3564 (i387_fsave_to_cache): Doc fix.
3565 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3567 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3569 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3570 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3572 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3574 * configure.srv (arm*-*-mingw32ce*): Move near the other
3577 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3579 * configure.ac: Add errno checking.
3580 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3581 sys/file.h and malloc.h.
3582 (AC_CHECK_DECLS): Add perror.
3583 (srv_mingwce): Handle.
3584 * configure.srv (i[34567]86-*-cygwin*): Add
3585 win32-i386-low.o to srv_tgtobj.
3586 (i[34567]86-*-mingw*): Likewise.
3587 (arm*-*-mingw32ce*): Add case.
3588 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3589 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3590 [__MINGW32CE__] (strerror): New function.
3591 [__MINGW32CE__] (errno): Define to GetLastError.
3592 [__MINGW32CE__] (COUNTOF): New macro.
3593 (remote_open): Remove extra close call.
3594 * mem-break.c (delete_breakpoint_at): New function.
3595 * mem-break.h (delete_breakpoint_at): Declare.
3596 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3597 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3598 [USE_WIN32API] (read, write): Add char* casts.
3599 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3600 * server.h: Include wincecompat.h on Windows CE.
3601 [HAVE_ERRNO_H]: Check.
3602 (perror): Declare if not declared.
3603 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3604 (perror_with_name): Remove errno declaration.
3605 * wincecompat.h: New.
3606 * wincecompat.c: New.
3608 * win32-arm-low.c: New.
3609 * win32-i386-low.c: New.
3610 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3611 (OUTMSG2): Make it safe.
3613 (COUNTOF): New macro.
3614 (NUM_REGS): Get it from the low target.
3615 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3616 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3617 (thread_rec): Let low target handle debug registers.
3618 (child_add_thread): Likewise.
3619 (child_init_thread_list): Likewise.
3620 (continue_one_thread): Likewise.
3622 (do_child_fetch_inferior_registers): Move to ...
3623 * win32-i386-low.c: ... here, and rename to ...
3624 (do_fetch_inferior_registers): ... this.
3625 * win32-low.c (child_fetch_inferior_registers):
3626 Go through the low target.
3627 (do_child_store_inferior_registers): Use regptr.
3628 (strwinerror): New function.
3629 (win32_create_inferior): Handle Windows CE.
3630 Use strwinerror instead of strerror on Windows error
3631 codes. Add program to the error output.
3632 Don't close the main thread handle on Windows CE.
3633 (win32_attach): Use coredll.dll on Windows CE.
3634 (win32_kill): Close current process and current
3636 (win32_detach): Use coredll.dll on Windows CE.
3637 (win32_resume): Let low target handle debug registers, and
3639 (handle_exception): Add/Remove initial breakpoint. Avoid
3640 non-existant WSTOPSIG on Windows CE.
3641 (win32_read_inferior_memory): Cast to remove warning.
3642 (win32_arch_string): Go through the low target.
3643 (initialize_low): Call set_breakpoint_data with the low
3644 target's breakpoint.
3645 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3646 FOP_REGNUM, mappings): Move to ...
3647 * win32-i386-low.c: ... here.
3648 * win32-low.c (win32_thread_info): Move to ...
3649 * win32-low.h: ... here.
3650 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3651 win32-arm-low.c and wincecompat.c.
3652 (all:): Add $EXEEXT.
3653 (install-only:): Likewise.
3654 (gdbserver:): Likewise.
3655 (gdbreplay:): Likewise.
3656 * config.in: Regenerate.
3657 * configure: Regenerate.
3659 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3661 * win32-low.c: Rename typedef thread_info to
3662 win32_thread_info throughout.
3664 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3666 * win32-i386-low.c: Rename to ...
3667 * win32-low.c: ... this.
3668 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3669 * Makefile.in: Likewise.
3671 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3673 * remote-utils.c (monitor_output): Constify msg parameter.
3674 * server.h (monitor_output): Likewise.
3675 * win32-i386-low.c (handle_output_debug_string): New.
3676 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3677 handle_output_debug_string.
3678 (get_child_debug_event): Likewise.
3680 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3682 * server.c (main): Correct strtoul check.
3684 2007-03-27 Jon Ringle <jon@ringle.org>
3686 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3688 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3690 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3692 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3694 * terminal.h: Check HAVE_SGTTY_H.
3696 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3698 * remote-utils.c (remote_open): Print out the assigned port number.
3700 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3702 * remote-utils.c (monitor_output): New function.
3703 * server.c (debug_threads): Define here.
3704 (monitor_show_help): New function.
3705 (handle_query): Handle qRcmd.
3706 (main): Do not handle 'd' packet.
3707 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3708 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3711 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3713 * Makefile.in (EXEEXT): New.
3714 (clean): Use $(EXEEXT).
3716 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3718 * target.h (target_ops): Rename send_signal to request_interrupt,
3719 and remove enum target_signal parameter.
3720 * linux-low.c (linux_request_interrupt): Rename from
3721 linux_send_signal, and always send SIGINT.
3722 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3723 and always send SIGINT.
3724 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3726 (input_interrupt): Likewise.
3728 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3730 * server.c (get_features_xml): Check if target implemented
3732 * win32-i386-low.c (win32_arch_string): New.
3733 (win32_target_ops): Add win32_arch_string as arch_string member.
3735 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3737 * spu-low.c (spu_arch_string): New.
3738 (spu_target_ops): Add spu_arch_string.
3740 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3742 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3743 * configure.ac: Do not check for terminal.h.
3744 * configure, config.in: Regenerated.
3746 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3748 * Makefile.in (OBS): Add $(XML_BUILTIN).
3749 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3751 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3752 (arm-with-iwmmxt.c): New.
3753 * config.in, configure: Regenerate.
3754 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3755 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3756 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3757 (arm*-*-linux*): Add iWMMXt and regset support.
3758 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3759 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3760 (arm_store_wmmxregset, target_regsets): New.
3761 * server.c (get_features_xml): Take annex argument. Check builtin
3763 (handle_query): Handle multiple annexes.
3765 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3767 * remote-utils.c [USE_WIN32API] (read, write): Define.
3768 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3771 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3773 * linux-i386-low.c (the_low_target): Set arch_string.
3774 * linux-x86-64-low.c (the_low_target): Likewise.
3775 * linux-low.c (linux_arch_string): New.
3776 (linux_target_ops): Add it.
3777 * linux-low.h (struct linux_target_ops): Add arch_string.
3778 * server.c (write_qxfer_response): Use const void * for DATA.
3779 (get_features_xml): New.
3780 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3781 * target.h (struct target_ops): Add arch_string method.
3783 2007-01-03 Denis Pilat <denis.pilat@st.com>
3784 Daniel Jacobowitz <dan@codesourcery.com>
3786 * linux-low.c (linux_kill): Handle being called with no threads.
3787 * win32-i386-low.c (win32_kill): Likewise.
3788 (get_child_debug_event): Clear current_process_handle.
3790 2006-12-30 Denis PILAT <denis.pilat@st.com>
3791 Daniel Jacobowitz <dan@codesourcery.com>
3793 * remote-utils.c (remote_open): Check the type of specified
3794 serial port devices before opening them.
3795 * server.c (main): Kill the inferior if an error occurs during
3796 the first remote_open.
3798 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3800 * README: Update supported targets.
3802 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3804 * Makefile.in (clean): Remove reg-mips64.c.
3805 (reg-mips64.c, reg-mips64.o): New rules.
3806 * configure.srv: Handle mips64. Include regset support for mips.
3807 * linux-mips-low.c (union mips_register): New.
3808 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3809 (mips_breakpoint, mips_breakpoint_at): Use int.
3810 (mips_collect_register, mips_supply_register)
3811 (mips_collect_register_32bit, mips_supply_register_32bit)
3812 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3813 (mips_store_fpregset, target_regsets): New.
3814 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3816 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3818 * configure.srv: Add target "spu*-*-*".
3819 * Makefile.in (clean): Remove reg-spu.c.
3820 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3821 * spu-low.c: New file.
3823 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3825 * configure.ac: Correct td_thr_tls_get_addr test.
3826 * configure: Regenerated.
3828 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3830 * linux-low.c (linux_wait_for_event): Reformat. Use the
3832 * remote-utils.c (decode_address_to_semicolon): New.
3833 * server.c (pass_signals, handle_general_set): New.
3834 (handle_query): Mention QPassSignals for qSupported.
3835 (main): Call handle_general_set.
3836 * server.h (pass_signals, decode_address_to_semicolon): New.
3838 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3840 * server.c (handle_query): Correct error handling for read_auxv.
3842 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3844 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3845 and srv_linux_thread_db to yes.
3846 * linux-s390-low.c (s390_fill_gregset): New function.
3847 (target_regsets): Define data structure.
3849 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3851 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3852 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3853 * config.in, configure: Regenerated.
3854 * inferiors.c (gdb_id_to_thread): New function.
3855 (gdb_id_to_thread_id): Use it.
3856 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3857 * linux-low.h (struct process_info): Add th member.
3858 (thread_db_get_tls_address): New prototype.
3859 * remote-utils.c (decode_address): Make non-static.
3860 * server.c (handle_query): Handle qGetTLSAddr.
3861 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3862 * target.h (struct target_ops): Add get_tls_address.
3863 * thread-db.c (maybe_attach_thread): Save the thread handle.
3864 (thread_db_get_tls_address): New.
3866 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3868 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3869 (linux_resume_one_process): Take a siginfo_t *. Update all
3870 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3871 (struct pending_signals): Add a siginfo_t.
3872 (linux_wait_for_process): Always set last_status.
3873 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3874 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3875 * linux-low.h (struct process_info): Add last_status.
3877 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3879 * remote-utils.c (try_rle): New function.
3880 (putpkt_binary): Use it.
3882 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3884 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3885 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3886 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3887 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3888 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3891 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3893 * server.c (terminal_fd): New variable.
3894 (old_foreground_pgrp): Likewise.
3895 (restore_old_foreground_pgrp): New function.
3896 (start_inferior): Record the terminal file descriptor in terminal_fd
3897 and its original foreground group in old_foreground_pgrp. Register
3898 restore_old_foreground_pgrp with atexit().
3900 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3902 * server.c (handle_query): Correct qPart to qXfer.
3904 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3906 * configure.ac: Check for more headers which are missing on
3907 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3908 * configure.srv: Add Cygwin and mingw32.
3909 * remote-utils.c: Don't include headers unconditionally which
3910 are missing on mingw32. Include <winsock.h> for mingw32.
3911 (remote_open): Adjust for mingw32 support. Flush
3912 standard error after writing to it.
3913 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3914 (unblock_async_io, enable_async_io, disable_async_io)
3915 (readchar, getpkt): Update for Winsock support.
3916 (prepare_resume_reply): Expect a protocol signal number.
3917 * server.c: Disable <sys/wait.h> on mingw32.
3918 (start_inferior): Adjust for mingw32 support. Flush
3919 standard error after writing to it.
3920 (attach_inferior): Likewise. Use protocol signal
3922 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3924 * win32-i386-low.c: New file.
3925 * Makefile.in (XM_CLIBS): Set.
3926 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3927 (win32-i386-low.o): New dependency rule.
3928 * linux-low.c (linux_wait): Use target signal numbers.
3929 * target.h (struct target_ops): Doc fix.
3930 * server.h (target_signal_to_name): New prototype.
3931 * gdbreplay.c: Don't include headers unconditionally which
3932 are missing on mingw32. Include <winsock.h> for mingw32.
3933 (remote_close, remote_open): Adjust for Winsock support.
3934 * configure, config.in: Regenerated.
3936 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3938 * server.c (decode_xfer_read, write_qxfer_response): New.
3939 (handle_query): Take a packet length argument. Handle
3940 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3941 the qSupported response.
3942 (main): Update call to handle_query.
3944 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3946 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3947 (putpkt_binary): Renamed from putpkt and adjusted for binary
3949 (putpkt): New wrapper for putpkt_binary.
3950 (readchar): Don't mask off the high bit.
3951 (decode_X_packet): New function.
3952 * server.c (main): Call putpkt_binary if a handler sets the packet
3953 length. Save the length of the incoming packet. Handle 'X'.
3954 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3956 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3958 * server.c (handle_query): Handle qSupported.
3960 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3962 * remote-utils.c (all_symbols_looked_up): New variable.
3963 (look_up_one_symbol): Check it.
3964 * server.h (look_up_one_symbol): New declaration.
3965 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3967 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3969 * Makefile.in (linux-arm-low.o): Update dependencies.
3970 * linux-arm-low.c: Include "gdb_proc_service.h".
3971 (PTRACE_GET_THREAD_AREA): Define.
3972 (ps_get_thread_area): New function.
3974 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3976 * configure.srv (m68k*-*-uclinux*): New target.
3977 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3978 (linux_resume_one_process): Remove extraneous cast.
3979 (linux_read_offsets): New.
3980 (linux_target_op): Add linux_read_offsets on mmuless systems.
3981 * server.c (handle_query): Add qOffsets logic.
3982 * target.h (struct target_ops): Add read_offsets.
3984 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3986 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3987 (PTRACE_GET_THREAD_AREA): Define.
3988 (ps_get_thread_area): New function.
3989 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3990 (linux-x86-64-low.o): Update.
3992 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3994 * configure.ac: Remove checks for prfpregset_t.
3995 * gdb_proc_service.h: New file.
3996 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3997 new "gdb_proc_service.h".
3998 * proc-service.c: Likewise.
3999 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4000 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4001 * Makefile.in (gdb_proc_service_h): Updated.
4002 * configure, config.in: Regenerated.
4004 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4006 * remote-utils.c (prepare_resume_reply): Move declaration
4007 of gdb_id_from_wait to the top of the block.
4009 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4011 * linux-low.c (regsets_store_inferior_registers): Read the regset
4012 from the target before filling it.
4014 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4016 * server.c (attach_inferior): Return SIGTRAP for a successful
4019 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4021 * Makefile.in (OBS): Add version.o.
4022 (STAGESTUFF): Delete.
4023 (version.o): Add dependencies.
4024 (version.c): Replace rule.
4025 (clean): Remove version.c.
4026 * server.c (gdbserver_version): New.
4027 (gdbserver_usage): Use printf.
4028 (main): Handle --version and --help.
4029 * server.h (version, host_name): Add declarations.
4031 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4043 * linux-x86-64-low.c:
4046 * linux-ppc64-low.c:
4055 * linux-crisv32-low.c:
4067 * gdbserver.1: Add (C) after Copyright. Update the FSF
4070 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4072 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4073 (arm_breakpoint_at): Recognize both breakpoints.
4074 (the_low_target): Use the correct breakpoint instruction.
4076 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4078 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4079 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4080 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4081 (the_low_target): Update.
4083 2005-10-25 Andreas Schwab <schwab@suse.de>
4085 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4087 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4088 (ia64_num_regs): Reduce to 462.
4090 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4092 * acinclude.m4: Correct quoting.
4093 * aclocal.m4: Regenerated.
4095 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4096 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4097 (thread_db_init): Call thread_db_err_str.
4098 * configure.ac: Check for TD_VERSION.
4099 * config.in, configure: Regenerated.
4101 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4103 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4105 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4107 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4108 is not available. Define HAVE_PTRACE_GETREGS if it is.
4109 * config.in, configure: Regenerated.
4110 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4111 * linux-i386-low.c, linux-m68k-low.c: Update to use
4112 HAVE_PTRACE_GETREGS.
4113 * linux-low.c (regsets_fetch_inferior_registers)
4114 (regsets_store_inferior_registers): Only return 0 if we processed
4116 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4117 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4119 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4121 * inferiors.c (struct thread_info): Add gdb_id.
4122 (add_thread): Add gdb_id argument.
4123 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4124 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4125 calls to add_thread.
4126 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4127 * server.c (handle_query): Use thread_to_gdb_id.
4128 (handle_v_cont, main): Use gdb_id_to_thread_id.
4129 * server.h (add_thread): Update prototype.
4130 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4133 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4135 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4136 left-padded registers.
4137 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4138 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4140 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4142 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4143 * configure: Regenerate.
4144 * config.in: Regenerate.
4145 * server.h (NEED_DECLARATION_STRERROR):
4146 Replace with !HAVE_DECL_STRERROR.
4148 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4150 * linux-low.c (linux_wait, linux_send_signal): Don't test
4151 an unsigned long variable for > 0 if it could be MAX_ULONG.
4152 * server.c (myresume): Likewise.
4153 * target.c (set_desired_inferior): Likewise.
4155 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4157 * configure.ac: Simplify and improve check for socklen_t.
4158 * configure, config.in: Regenerate.
4160 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4162 * acconfig.h: Remove.
4163 * configure.ac: Add a test for socklen_t. Use three-argument
4164 AC_DEFINE throughout.
4165 * config.in: Regenerated using autoheader 2.59.
4166 * configure: Regenerated.
4168 * gdbreplay.c (socklen_t): Provide a default.
4169 (remote_open): Use socklen_t.
4170 * remote-utils.c (socklen_t): Provide a default.
4171 (remote_open): Use socklen_t.
4172 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4175 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4177 * linux-low.c (linux_read_memory, linux_write_memory)
4178 (linux_read_auxv): Likewise.
4179 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4180 (check_mem_write): Likewise.
4181 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4183 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4184 (registers_from_string, register_data): Likewise.
4185 * server.c (handle_query, main): Likewise.
4186 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4187 (decode_M_packet): Likewise.
4188 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4189 * target.h (struct target_ops): Update read_memory, write_memory,
4191 (read_inferior_memory, write_inferior_memory): Update.
4192 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4194 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4195 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4196 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4197 linux-s390-low.c, linux-sh-low.c: Update for changes in
4198 read_inferior_memory and the_low_target->breakpoint.
4200 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4202 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4203 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4204 * configure.srv: Add powerpc64-*-linux*.
4205 * linux-ppc64-low.c: New file.
4207 2005-05-23 Orjan Friberg <orjanf@axis.com>
4209 * linux-cris-low.c: New file with support for CRIS.
4210 * linux-crisv32-low.c: Ditto for CRISv32.
4211 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4212 (clean): Add reg-cris.c and reg-crisv32.c.
4213 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4214 reg-crisv32.o, and reg-crisv32.c to make rules.
4215 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4218 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4220 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4221 of sizeof (PTRACE_XFER_TYPE).
4222 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4224 2005-05-12 Orjan Friberg <orjanf@axis.com>
4226 * target.h (struct target_ops): Add insert_watchpoint,
4227 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4228 pointers for hardware watchpoint support.
4229 * linux-low.h (struct linux_target_ops): Ditto.
4230 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4231 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4232 to linux_target_ops.
4233 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4235 * server.c (main): Recognize 'Z' and 'z' packets.
4237 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4239 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4240 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4241 (the_low_target): Add new members.
4243 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4245 * proc-service.c (ps_lgetregs): Search all_processes instead of
4248 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4250 * server.c (start_inferior): Change return type to int.
4251 (attach_inferior): Change sigptr to int *.
4252 (handle_v_cont, handle_v_requests): Change signal to int *.
4253 (main): Change signal to int.
4255 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
4257 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4258 * configure.srv: Add m32r*-*-linux*.
4259 * linux-m32r-low.c: New file.
4261 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4263 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4265 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4267 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4268 Take unsigned long arguments for PIDs.
4269 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4270 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4271 (wait_for_sigstop, linux_resume_one_process)
4272 (regsets_fetch_inferior_registers, linux_send_signal)
4273 (linux_read_auxv): Likewise. Update the types of variables holding
4274 PIDs. Update format string specifiers.
4275 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4276 * remote-utils.c (prepare_resume_reply): Likewise.
4277 * server.c (cont_thread, general_thread, step_thread)
4278 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4280 (handle_query): Update format specifiers.
4281 (handle_v_cont, main): Use strtoul for thread IDs.
4282 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4283 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4284 (general_thread, step_thread, thread_from_wait)
4285 (old_thread_from_wait): Update.
4286 * target.h (struct thread_resume): Use unsigned long for THREAD.
4287 (struct target_ops): Use unsigned long for arguments to attach and
4290 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4292 * acinclude.m4: Include bfd/bfd.m4 directly.
4293 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4294 <agriffis@toolchain.org>.
4295 * aclocal.m4, configure: Regenerated.
4297 2005-01-07 Andrew Cagney <cagney@gnu.org>
4299 * configure.ac: Rename configure.in, require autoconf 2.59.
4300 * configure: Re-generate.
4302 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4304 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4306 * aclocal.m4: Regenerated.
4307 * configure: Regenerated.
4309 2004-11-21 Andreas Schwab <schwab@suse.de>
4311 * linux-m68k-low.c (m68k_num_gregs): Define.
4312 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4313 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4314 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4315 (m68k_breakpoint_at): New. Add to the_low_target.
4317 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4318 srv_linux_thread_db to yes.
4320 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4322 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4323 (ARCH_SET_FS): Likewise.
4324 (ARCH_GET_FS): Likewise.
4325 (ARCH_GET_GS): Likewise.
4327 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4329 * linux-i386-low.c (ps_get_thread_area): New.
4330 * linux-x86-64-low.c (ps_get_thread_area): New.
4331 * linux-low.c: Include <sys/syscall.h>.
4332 (linux_kill_one_process): Don't kill the first thread here.
4333 (linux_kill): Kill the first thread here.
4334 (kill_lwp): New function.
4335 (send_sigstop, linux_send_signal): Use it.
4336 * proc-service.c: Clean up #ifdefs.
4337 (fpregset_info): Delete.
4338 (ps_lgetregs): Update and enable implementation.
4339 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4341 * remote-utils.c (struct sym_cache, symbol_cache): New.
4342 (input_interrupt): Print a clearer message.
4343 (async_io_enabled): New variable.
4344 (enable_async_io, disable_async_io): Use it. Update comments.
4345 (look_up_one_symbol): Use the symbol cache.
4346 * thread-db.c (thread_db_look_up_symbols): New function.
4347 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4349 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4351 * configure.in: Test for -rdynamic.
4352 * configure: Regenerated.
4353 * Makefile (INTERNAL_LDFLAGS): New.
4354 (gdbserver, gdbreplay): Use it.
4356 2004-09-02 Andrew Cagney <cagney@gnu.org>
4358 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4360 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4362 * linux-low.c (linux_wait): Clear all_processes list also.
4364 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4366 * linux-low.c: Include <errno.h>. Remove extern declaration of
4369 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4371 * gdbreplay.c, server.h, utils.c: Update copyright years.
4373 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4375 * server.c (main): Print child status or termination signal from
4376 variable 'signal', not 'sig'.
4378 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4380 * linux-low.c (linux_read_memory): Change return type to
4381 int. Check for and return error from ptrace().
4382 * target.c (read_inferior_memory): Change return type to int. Pass
4383 back return status from the_target->read_memory().
4384 * target.h (struct target_ops): Adapt *read_memory() prototype.
4386 (read_inferior_memory): Adapt prototype.
4387 * server.c (main): Return an error packet if
4388 read_inferior_memory() returns an error.
4390 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4392 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4393 Unify with other clean targets.
4395 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4397 * server.c (handle_v_cont): Call set_desired_inferior.
4399 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4401 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4403 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4405 * linux-low.c (linux_wait): Unblock async I/O.
4406 (linux_resume): Block and enable async I/O.
4407 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4408 * server.h (block_async_io, unblock_async_io): Add prototypes.
4410 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4412 * remote-utils.c (remote_open): Print a status notice after
4414 * server.c (attach_inferior): Print a status notice after
4417 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4419 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4421 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4423 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4425 * server.c, target.h: Update copyright years.
4427 2004-02-25 Roland McGrath <roland@redhat.com>
4429 * target.h (struct target_ops): New member `read_auxv'.
4430 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4431 * linux-low.c (linux_read_auxv): New function.
4432 (linux_target_ops): Initialize `read_auxv' member to that.
4434 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4436 Committed by Jim Blandy <jimb@redhat.com>.
4438 * linux-s390-low.c (s390_num_regs): Update.
4439 (s390_regmap): Remove control registers. Use __s390x__ predefine
4440 instead of GPR_SIZE to distiguish s390 and s390x targets.
4442 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4444 * linux-low.c: Update copyright year.
4445 (check_removed_breakpoint): Clear pending_is_breakpoint.
4446 (linux_set_resume_request, linux_queue_one_thread)
4447 (resume_status_pending_p): New functions.
4448 (linux_continue_one_thread): Use process->resume.
4449 (linux_resume): Only resume threads if there are no pending events.
4450 * linux-low.h (struct process_info): Add resume request
4453 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4455 * regcache.c (new_register_cache): Clear the allocated register
4456 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4458 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4460 * linux-low.c (linux_resume): Take a struct thread_resume *
4462 (linux_wait): Update call.
4463 (resume_ptr): New static variable.
4464 (linux_continue_one_thread): Renamed from
4465 linux_continue_one_process. Use resume_ptr.
4466 (linux_resume): Use linux_continue_one_thread.
4467 * server.c (handle_v_cont, handle_v_requests): New functions.
4468 (myresume): New function.
4469 (main): Handle 'v' case.
4470 * target.h (struct thread_resume): New type.
4471 (struct target_ops): Change argument of "resume" to struct
4473 (myresume): Delete macro.
4475 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4477 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4478 (uninstall): Support DESTDIR.
4480 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4482 * configure.srv: Add xscale*linux copy of arm*linux entry.
4484 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4486 * linux-arm-low.c (arm_reinsert_addr): New function.
4487 (the_low_target): Add arm_reinsert_addr.
4489 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4491 * mem-break.c: Remove whitespace at end of file.
4493 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4495 * configure.in: Check whether we need to prototype strerror.
4496 * server.h: Optionally prototype strerror.
4497 * gdbreplay.c (perror_with_name): Use strerror.
4498 * linux-low.c (linux_attach_lwp): Use strerror.
4499 * utils.c (perror_with_name): Use strerror.
4500 * config.in, configure: Regenerated.
4502 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4504 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4505 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4507 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4509 * Makefile.in (SFILES): Update.
4510 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4511 low-sun3.c: Remove files.
4513 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4515 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4516 (linux_detach_one_process, linux_detach): New functions.
4517 (linux_target_ops): Add linux_detach.
4518 * server.c (main): Handle 'D' packet.
4519 * target.h (struct target_ops): Add "detach" member.
4520 (detach_inferior): Define.
4522 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4524 From Kelley Cook <kelleycook@wideopenwest.com>:
4525 * configure.srv: Accept i[34567]86 variants.
4527 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4529 * linux-low.c (linux_wait_for_event): Correct comment typos.
4530 (linux_resume_one_process): Call check_removed_breakpoint.
4531 (linux_send_signal): New function.
4532 (linux_target_ops): Add linux_send_signal.
4533 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4535 * target.h (struct target_ops): Add send_signal.
4537 2003-05-29 Jim Blandy <jimb@redhat.com>
4539 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4540 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4541 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4542 away part of the register's value.
4544 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4546 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4547 (linux_wait_for_event, linux_init_signals): Likewise.
4549 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4551 * configure.in: Check for stdlib.h.
4552 * configure: Regenerated.
4553 * config.in: Regenerated.
4555 2003-01-04 Andreas Schwab <schwab@suse.de>
4557 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4559 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4561 * Makefile.in: Remove obsolete code.
4563 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4565 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4566 defined(PT_FPR0_HI).
4568 2002-11-17 Stuart Hughes <seh@zee2.com>
4570 * linux-arm-low.c (arm_num_regs): Increase.
4571 (arm_regmap): Include status register.
4573 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4575 * linux-low.c (register_addr): Remove incorrect -1 check.
4577 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4579 * linux-low.c (linux_create_inferior): Call setpgid. Return
4581 (unstopped_p, linux_signal_pid): Remove.
4582 (linux_target_ops): Remove linux_signal_pid.
4583 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4584 global instead of target method.
4585 * target.h (struct target_ops): Remove signal_pid. Update comment
4586 for create_inferior.
4587 * server.c (signal_pid): New variable.
4588 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4589 gdbserver. Set the child to be the foreground process group.
4590 (attach_inferior): Set signal_pid.
4592 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4594 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4596 2002-08-20 Jim Blandy <jimb@redhat.com>
4598 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4601 2002-08-01 Andrew Cagney <cagney@redhat.com>
4603 * Makefile.in: Make chill references obsolete.
4605 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4607 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4608 * configure: Regenerate.
4609 * config.in: Regenerate.
4611 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4613 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4614 (perror_with_name, remote_close, remote_open, expect, play): Static.
4616 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4618 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4619 byte offsets instead of an array of indexes.
4620 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4622 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4624 * regcache.c: Add comment.
4626 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4628 * thread-db.c: New file.
4629 * proc-service.c: New file.
4630 * acinclude.m4: New file.
4631 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4632 proc-service.o, and thread-db.o.
4633 (linux-low.o): Add USE_THREAD_DB.
4634 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4635 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4636 * aclocal.m4: Regenerated.
4637 * config.in: Regenerated.
4638 * configure: Regenerated.
4639 * configure.in: Check for proc_service.h, sys/procfs.h,
4640 thread_db.h, and linux/elf.h headrs.
4641 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4642 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4643 Check for -lthread_db and thread support.
4644 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4645 PowerPC, and SuperH.
4646 * i387-fp.c: Constify arguments.
4647 * i387-fp.h: Likewise.
4648 * inferiors.c: (struct thread_info): Renamed from
4649 `struct inferior_info'. Remove PID member. Use generic inferior
4650 list header. All uses updated.
4651 (inferiors, signal_pid): Removed.
4652 (all_threads): New variable.
4653 (get_thread): Define.
4654 (add_inferior_to_list): New function.
4655 (for_each_inferior): New function.
4656 (change_inferior_id): New function.
4657 (add_inferior): Removed.
4658 (remove_inferior): New function.
4659 (add_thread): New function.
4660 (free_one_thread): New function.
4661 (remove_thread): New function.
4662 (clear_inferiors): Use for_each_inferior and free_one_thread.
4663 (find_inferior): New function.
4664 (find_inferior_id): New function.
4665 (inferior_target_data): Update argument type.
4666 (set_inferior_target_data): Likewise.
4667 (inferior_regcache_data): Likewise.
4668 (set_inferior_regcache_data): Likewise.
4669 * linux-low.c (linux_bp_reinsert): Remove.
4670 (all_processes, stopping_threads, using_thrads)
4671 (struct pending_signals, debug_threads, pid_of): New.
4672 (inferior_pid): Replace with macro.
4673 (struct inferior_linux_data): Remove.
4674 (get_stop_pc, add_process): New functions.
4675 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4676 Use add_process and add_thread.
4677 (linux_attach_lwp): New function, based on old linux_attach. Use
4678 add_process and add_thread. Set stop_expected for new threads.
4679 (linux_attach): New function.
4680 (linux_kill_one_process): New function.
4681 (linux_kill): Kill all LWPs.
4682 (linux_thread_alive): Use find_inferior_id.
4683 (check_removed_breakpoints, status_pending_p): New functions.
4684 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4685 Update. Use WNOHANG. Wait for cloned processes also. Update process
4686 struct for the found process.
4687 (linux_wait_for_event): New function.
4688 (linux_wait): Use it. Support LWPs.
4689 (send_sigstop, wait_for_sigstop, stop_all_processes)
4690 (linux_resume_one_process, linux_continue_one_process): New functions.
4691 (linux_resume): Support LWPs.
4692 (REGISTER_RAW_SIZE): Remove.
4693 (fetch_register): Use register_size instead. Call supply_register.
4694 (usr_store_inferior_registers): Likewise. Call collect_register.
4696 (regsets_fetch_inferior_registers): Improve error message.
4697 (regsets_store_inferior_registers): Add debugging.
4698 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4699 (unstopped_p, linux_signal_pid): New functions.
4700 (linux_target_ops): Add linux_signal_pid.
4701 (linux_init_signals): New function.
4702 (initialize_low): Call it. Initialize using_threads.
4703 * regcache.c (inferior_regcache_data): Add valid
4705 (get_regcache): Fetch registers lazily. Add fetch argument
4706 and update all callers.
4707 (regcache_invalidate_one, regcache_invalidate): New
4709 (new_register_cache): Renamed from create_register_cache.
4710 Return the new regcache.
4711 (free_register_cache): Change argument to a void *.
4712 (registers_to_string, registers_from_string): Call get_regcache
4713 with fetch flag set.
4714 (register_data): Make static. Pass fetch flag to get_regcache.
4715 (supply_register): Call get_regcache with fetch flag clear.
4716 (collect_register): Call get_regcache with fetch flag set.
4717 (collect_register_as_string): New function.
4718 * regcache.h: Update.
4719 * remote-utils.c (putpkt): Flush after debug output and use
4721 Handle input interrupts while waiting for an ACK.
4722 (input_interrupt): Use signal_pid method.
4723 (getpkt): Flush after debug output and use stderr.
4724 (outreg): Use collect_register_as_string.
4725 (new_thread_notify, dead_thread_notify): New functions.
4726 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4728 (look_up_one_symbol): Flush after debug output.
4729 * server.c (step_thread, server_waiting): New variables.
4730 (start_inferior): Don't use signal_pid. Update call to mywait.
4731 (attach_inferior): Update call to mywait.
4732 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4733 (main): Don't fetch/store registers explicitly. Use
4734 set_desired_inferior. Support proposed ``Hs'' packet. Update
4737 (struct inferior_list, struct_inferior_list_entry): New.
4738 * target.c (set_desired_inferior): New.
4739 (write_inferior_memory): Constify.
4740 (mywait): New function.
4742 (struct target_ops): New signal_pid method.
4743 (mywait): Removed macro, added prototype.
4745 * linux-low.h (regset_func): Removed.
4746 (regset_fill_func, regset_store_func): New.
4747 (enum regset_type): New.
4748 (struct regset_info): Add type field. Use new operation types.
4749 (struct linux_target_ops): stop_pc renamed to get_pc.
4750 Add decr_pc_after_break and breakpoint_at.
4751 (get_process, get_thread_proess, get_process_thread)
4752 (strut process_info, all_processes, linux_attach_lwp)
4753 (thread_db_init): New.
4755 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4756 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4757 (the_low_target): Add new members.
4758 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4759 (i386_store_fpxregset): Constify.
4760 (target_regsets): Add new kind identifier.
4761 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4762 (i386_set_pc): Add debugging.
4763 (i386_breakpoint_at): New function.
4764 (the_low_target): Add new members.
4765 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4766 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4767 (mips_breakpoint_at): New.
4768 (the_low_target): Add new members.
4769 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4770 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4771 (the_low_target): Add new members.
4772 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4773 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4774 (the_low_target): Add new members.
4775 * linux-x86-64-low.c (target_regsets): Add new kind
4778 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4780 From Martin Pool <mbp@samba.org>:
4781 * server.c (gdbserver_usage): New function.
4784 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4786 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4789 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4791 * Makefile.in: Remove obsolete code.
4793 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4795 * linux-low.c (regsets_fetch_inferior_registers),
4796 (regsets_store_inferior_registers): Removed cast to int from
4798 * regcache.h: Added declaration of struct inferior_info.
4800 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4802 * inferiors.c (struct inferior_info): Add regcache_data.
4803 (add_inferior): Call create_register_cache.
4804 (clear_inferiors): Call free_register_cache.
4805 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4806 * regcache.c (struct inferior_regcache_data): New.
4807 (registers): Remove.
4808 (get_regcache): New function.
4809 (create_register_cache, free_register_cache): New functions.
4810 (set_register_cache): Don't initialize the register cache here.
4811 (registers_to_string, registers_from_string, register_data): Call
4813 * regcache.h: Add prototypes.
4814 * server.h: Likewise.
4816 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4818 * mem-break.c: New file.
4819 * mem-break.h: New file.
4820 * Makefile.in: Add mem-break.o rule; update server.h
4822 * inferiors.c (struct inferior_info): Add target_data
4824 (clear_inferiors): Free target_data member if set.
4825 (inferior_target_data, set_inferior_target_data): New functions.
4826 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4827 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4828 * linux-low.c (linux_bp_reinsert): New variable.
4829 (struct inferior_linux_data): New.
4830 (linux_create_inferior): Use set_inferior_target_data.
4831 (linux_attach): Likewise. Call add_inferior.
4832 (linux_wait_for_one_inferior): New function.
4833 (linux_wait): Call it.
4834 (linux_write_memory): Add const.
4835 (initialize_low): Call set_breakpoint_data.
4836 * linux-low.h (struct linux_target_ops): Add breakpoint
4838 * server.c (attach_inferior): Remove extra add_inferior
4840 * server.h: Include mem-break.h. Update inferior.c
4842 * target.c (read_inferior_memory)
4843 (write_inferior_memory): New functions.
4844 * target.h (read_inferior_memory)
4845 (write_inferior_memory): Change macros to prototypes.
4846 (struct target_ops): Update comments. Add const to write_memory
4849 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4851 * linux-low.c (usr_store_inferior_registers): Support
4852 registers which are allowed to fail to store.
4853 * linux-low.h (linux_target_ops): Likewise.
4854 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4855 (ppc_cannot_store_register): FPSCR may not be storable.
4857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4859 * server.h: Include <string.h> if HAVE_STRING_H.
4860 * ChangeLog: Correct paths in last ChangeLog entry.
4862 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4864 * linux-low.h: Remove obsolete prototypes.
4865 (struct linux_target_ops): New.
4866 (extern the_low_target): New.
4867 * linux-low.c (num_regs, regmap): Remove declarations.
4868 (register_addr): Use the_low_target explicitly.
4869 (fetch_register): Likewise.
4870 (usr_fetch_inferior_registers): Likewise.
4871 (usr_store_inferior_registers): Likewise.
4872 * linux-arm-low.c (num_regs): Remove.
4873 (arm_num_regs): Define.
4874 (arm_regmap): Renamed from regmap, made static.
4875 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4877 (arm_cannot_store_register): Renamed from cannot_store_register,
4879 (the_low_target): New.
4880 * linux-i386-low.c (num_regs): Remove.
4881 (i386_num_regs): Define.
4882 (i386_regmap): Renamed from regmap, made static.
4883 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4885 (i386_cannot_store_register): Renamed from cannot_store_register,
4887 (the_low_target): New.
4888 * linux-ia64-low.c (num_regs): Remove.
4889 (ia64_num_regs): Define.
4890 (ia64_regmap): Renamed from regmap, made static.
4891 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4893 (ia64_cannot_store_register): Renamed from cannot_store_register,
4895 (the_low_target): New.
4896 * linux-m68k-low.c (num_regs): Remove.
4897 (m68k_num_regs): Define.
4898 (m68k_regmap): Renamed from regmap, made static.
4899 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4901 (m68k_cannot_store_register): Renamed from cannot_store_register,
4903 (the_low_target): New.
4904 * linux-mips-low.c (num_regs): Remove.
4905 (mips_num_regs): Define.
4906 (mips_regmap): Renamed from regmap, made static.
4907 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4909 (mips_cannot_store_register): Renamed from cannot_store_register,
4911 (the_low_target): New.
4912 * linux-ppc-low.c (num_regs): Remove.
4913 (ppc_num_regs): Define.
4914 (ppc_regmap): Renamed from regmap, made static.
4915 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4917 (ppc_cannot_store_register): Renamed from cannot_store_register,
4919 (the_low_target): New.
4920 * linux-s390-low.c (num_regs): Remove.
4921 (s390_num_regs): Define.
4922 (s390_regmap): Renamed from regmap, made static.
4923 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4925 (s390_cannot_store_register): Renamed from cannot_store_register,
4927 (the_low_target): New.
4928 * linux-sh-low.c (num_regs): Remove.
4929 (sh_num_regs): Define.
4930 (sh_regmap): Renamed from regmap, made static.
4931 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4933 (sh_cannot_store_register): Renamed from cannot_store_register,
4935 (the_low_target): New.
4936 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4937 (the_low_target): New.
4939 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4941 * Makefile.in: Add stamp-h target.
4942 * configure.in: Create stamp-h.
4943 * configure: Regenerated.
4945 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4947 * inferiors.c: New file.
4948 * target.c: New file.
4949 * target.h: New file.
4950 * Makefile.in: Add target.o and inferiors.o. Update
4952 * linux-low.c (inferior_pid): New static variable,
4953 moved from server.c.
4954 (linux_create_inferior): Renamed from create_inferior.
4955 Call add_inferior. Return 0 on success instead of a PID.
4956 (linux_attach): Renamed from myattach.
4957 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4958 (linux_thread_alive): Renamed from mythread_alive.
4959 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4961 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4962 (regsets_store_inferior_registers): Correct error message.
4963 Add missing ``return 0''.
4964 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4965 (linux_store_registers): Renamed from store_inferior_registers.
4966 (linux_read_memory): Renamed from read_inferior_memory.
4967 (linux_write_memory): Renamed from write_inferior_memory.
4968 (linux_target_ops): New structure.
4969 (initialize_low): Call set_target_ops ().
4970 * remote-utils.c (unhexify): New function.
4971 (hexify): New function.
4972 (input_interrupt): Send signals to ``signal_pid''.
4973 * server.c (inferior_pid): Remove.
4974 (start_inferior): Update create_inferior call.
4975 (attach_inferior): Call add_inferior.
4976 (handle_query): New function.
4977 (main): Call handle_query for `q' packets.
4978 * server.h: Include "target.h". Remove obsolete prototypes.
4979 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4981 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4983 * Makefile.in: Add WARN_CFLAGS. Update configury
4985 * configure.in: Check for <string.h>
4986 * configure: Regenerate.
4987 * config.in: Regenerate.
4988 * gdbreplay.c: Include needed system headers.
4989 (remote_open): Remove strchr prototype.
4990 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4991 * regcache.c (supply_register): Change buf argument to const void *.
4992 (supply_register_by_name): Likewise.
4993 (collect_register): Change buf argument to void *.
4994 (collect_register_by_name): Likewise.
4995 * regcache.h: Add missing prototypes.
4996 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4997 * server.c (handle_query): New function.
4998 (attached): New static variable, moved out of main.
4999 (main): Quiet longjmp clobber warnings.
5000 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5001 * utils.c (error): Remove NORETURN.