1 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3 * linux-low.c (linux_wait_1): Move non-debugging code out of
4 `debug_threads' control.
6 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8 * linux-low.c (linux_wait_1): Don't set last_status here.
9 * server.c (push_event, queue_stop_reply_callback): Assert we're
10 not pushing a TARGET_WAITKIND_IGNORE event.
11 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12 (myresume, handle_target_event): Set the thread's last_resume_kind
13 and last_status from the target returned status.
15 2010-08-25 Pedro Alves <pedro@codesourcery.com>
19 * linux-x86-low.c (update_debug_registers_callback): New.
20 (i386_dr_low_set_addr): Use it.
21 (i386_dr_low_get_addr): New.
22 (i386_dr_low_set_control): Use update_debug_registers_callback.
23 (i386_dr_low_get_control): New.
24 (i386_dr_low_get_status): Adjust.
25 * linux-low.c (linux_stop_lwp): New.
26 * linux-low.h (linux_stop_lwp): Declare.
28 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
29 argument instead of a i386_debug_reg_state.
30 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
31 a i386_debug_reg_state.
32 (i386_insert_aligned_watchpoint): Adjust.
33 (i386_remove_aligned_watchpoint): Adjust.
34 (i386_low_stopped_data_address): Read the debug registers from the
35 inferior instead of from the mirrors.
36 * i386-low.h (struct i386_debug_reg_state): Extend comment.
37 (i386_dr_low_get_addr): Declare.
38 (i386_dr_low_get_control): Declare.
39 (i386_dr_low_get_status): Change prototype.
41 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
42 (i386_dr_low_get_addr): New.
43 (i386_dr_low_get_control): New.
44 (i386_dr_low_get_status): Adjust prototype. Return
46 (i386_initial_stuff): Clear dr_status_mirror and
48 (i386_get_thread_context): Adjust.
49 (i386_set_thread_context): Adjust.
50 (i386_thread_added): Adjust.
52 2010-08-24 Pedro Alves <pedro@codesourcery.com>
54 * linux-low.h (linux_thread_area): Delete declaration.
56 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
58 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
59 after its termination.
61 2010-08-09 Pedro Alves <pedro@codesourcery.com>
63 * linux-low.c (gdb_wants_lwp_stopped): Delete.
64 (gdb_wants_all_stopped): Delete.
65 (linux_wait_1): Don't call them.
66 * server.c (handle_v_cont): Tag all threads as want-stopped.
67 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
68 stopped as "client-wants-stopped".
70 2010-07-31 Pedro Alves <pedro@codesourcery.com>
72 * Makefile.in (signals_h): New.
73 (server_h): Depend on it.
74 (server.o): Don't depend on $(signals_def).
75 (signals.o): Depend on $(signals_def).
77 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
79 * Makefile.in (signals_def): New.
80 (server_h): Append include/gdb/signals.h and signals_def.
81 (server.o): Append signals_def.
83 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
85 * server.c (handle_target_event): Use target_signal_to_host for
86 resume_info.sig initialization.
87 * target.h (struct thread_resume) <sig>: New comment.
89 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
91 * server.c (handle_query): strcpy() the returned string from paddress()
93 * utils.c (paddress): Return phex_nz().
95 2010-07-07 Joel Brobecker <brobecker@adacore.com>
97 * server.c (handle_v_cont): Call mourn_inferior if process
101 2010-07-01 Pedro Alves <pedro@codesourcery.com>
103 Static tracepoints, and integration with UST.
105 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
106 * mem-break.c (uninsert_all_breakpoints)
107 (reinsert_all_breakpoints): New.
108 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
109 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
110 (gdb_agent_ust_loaded, helper_thread_id)
111 (gdb_agent_helper_thread_id): New macros.
112 (struct ipa_sym_addresses): Add addr_ust_loaded,
113 addr_helper_thread_id, addr_cmd_buf.
114 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
115 (in_process_agent_loaded_ust): New.
116 (write_e_ust_not_loaded): New.
117 (maybe_write_ipa_ust_not_loaded): New.
118 (struct collect_static_trace_data_action): New.
119 (enum tracepoint_type) <static_tracepoint>: New.
120 (struct tracepoint) <handle>: Mention static tracepoints.
121 (struct static_tracepoint_ctx): New.
123 (add_tracepoint_action): Handle static tracepoint actions.
124 (unprobe_marker_at): New.
125 (clear_installed_tracepoints): Handle static tracepoints.
126 (cmd_qtdp): Handle static tracepoints.
127 (probe_marker_at): New.
128 (cmd_qtstart): Handle static tracepoints.
129 (response_tracepoint): Handle static tracepoints.
130 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
131 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
132 (get_context_regcache): Handle static tracepoints.
133 (do_action_at_tracepoint): Handle static tracepoint actions.
134 (traceframe_find_block_type): Handle static trace data blocks.
135 (traceframe_read_sdata): New.
136 (download_tracepoints): Download static tracepoint actions.
137 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
138 (GDB_PROBE_NAME): New.
143 (ust_marker_to_static_tracepoint): New.
145 (collect_ust_data_at_tracepoint): New.
146 (gdb_ust_probe): New.
147 (UNIX_PATH_MAX, SOCK_DIR): New.
148 (gdb_ust_connect_sync_socket): New.
149 (resume_thread, stop_thread): New.
150 (run_inferior_command): New.
151 (init_named_socket): New.
152 (gdb_ust_socket_init): New.
153 (cstr_to_hexstr): New.
155 (first_marker, next_marker): New.
156 (response_ust_marker): New.
157 (cmd_qtfstm, cmd_qtsstm): New.
158 (unprobe_marker_at, probe_marker_at): New.
159 (cmd_qtstmat, gdb_ust_thread): New.
161 (initialize_tracepoint_ftlib): Call gdb_ust_init.
162 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
164 (x86_64_st_collect_regmap): New.
165 (X86_64_NUM_ST_COLLECT_GREGS): New.
166 (AMD64_RIP_REGNUM): New.
167 (supply_static_tracepoint_registers): New.
168 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
170 (i386_st_collect_regmap): New.
171 (i386_NUM_ST_COLLECT_GREGS): New.
172 (supply_static_tracepoint_registers): New.
173 * server.c (handle_query): Handle qXfer:statictrace:read.
174 <qSupported>: Report support for StaticTracepoints, and
175 qXfer:statictrace:read features.
176 * server.h (traceframe_read_sdata)
177 (supply_static_tracepoint_registers): Declare.
178 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
179 (unpack_varlen_hex): Include in IPA build.
180 * Makefile.in (ustlibs, ustinc): New.
181 (IPA_OBJS): Add remote-utils-ipa.o.
182 ($(IPA_LIB)): Link -ldl and -lpthread.
184 (IPAGENT_CFLAGS): Add UST_CFLAGS.
185 * config.in, configure: Regenerate.
187 2010-06-20 Ian Lance Taylor <iant@google.com>
188 Pedro Alves <pedro@codesourcery.com>
190 * linux-x86-low.c (always_true): Delete.
191 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
192 trying to fool the compiler with always_true.
194 2010-06-20 Pedro Alves <pedro@codesourcery.com>
196 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
197 conditions in gdbserver.
199 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
201 * spu-low.c (spu_read_memory): Wrap around local store limit.
202 (spu_write_memory): Likewise.
204 2010-06-15 Pedro Alves <pedro@codesourcery.com>
206 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
207 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
209 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
211 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
212 uses with LONGEST uses.
214 2010-06-14 Stan Shebs <stan@codesourcery.com>
215 Pedro Alves <pedro@codesourcery.com>
219 * linux-x86-low.c: Include limits.h.
224 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
225 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
226 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
227 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
228 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
229 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
230 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
231 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
232 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
233 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
234 (amd64_emit_void_call_2): New.
235 (amd64_emit_ops): New.
236 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
237 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
238 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
239 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
240 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
241 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
242 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
243 (i386_emit_call, i386_emit_reg, i386_emit_pop)
244 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
245 (i386_emit_stack_adjust, i386_emit_int_call_1)
246 (i386_emit_void_call_2): New.
247 (i386_emit_ops): New.
249 (the_low_target): Install x86_emit_ops.
250 * server.h (struct emit_ops): New.
251 (get_raw_reg_func_addr): Declare.
252 (current_insn_ptr, emit_error): Declare.
253 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
254 (set_trace_state_variable_value): New defines.
255 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
256 addr_get_trace_state_variable_value and
257 addr_set_trace_state_variable_value.
258 (symbol_list): New fields for get_raw_reg,
259 get_trace_state_variable_value and set_trace_state_variable_value.
260 (condfn): New typedef.
261 (struct tracepoint): New field `compiled_cond'.
262 (do_action_at_tracepoint): Clear compiled_cond.
263 (get_trace_state_variable_value, set_trace_state_variable_value):
265 (condition_true_at_tracepoint): If there's a compiled condition,
267 (current_insn_ptr, emit_error): New globals.
268 (struct bytecode_address): New.
269 (get_raw_reg_func_addr): New.
270 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
271 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
272 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
273 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
274 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
275 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
276 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
277 (compile_tracepoint_condition, compile_bytecodes): New.
278 * target.h (emit_ops): Forward declare.
279 (struct target_ops): New field emit_ops.
280 (target_emit_ops): New.
281 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
282 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
283 * linux-low.c (linux_emit_ops): New.
284 (linux_target_ops): Install it.
285 * linux-low.h (struct linux_target_ops): New field emit_ops.
287 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
289 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
290 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
292 2010-06-01 Pedro Alves <pedro@codesourcery.com>
293 Stan Shebs <stan@codesourcery.com>
295 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
296 (all): Depend on $(extra_libraries).
297 (install-only): Install the IPA.
298 (IPA_OBJS, IPA_LIB): New.
299 (clean): Remove the IPA lib.
300 (IPAGENT_CFLAGS): New.
301 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
302 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
303 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
304 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
305 * configure.ac: Check for atomic builtins support in the compiler.
306 (IPA_DEPFILES, extra_libraries): Define.
307 * configure.srv (ipa_obj): Add description.
308 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
309 (i[34567]86-*-linux*): Set ipa_obj.
310 (x86_64-*-linux*): Set ipa_obj.
311 * linux-low.c (stabilizing_threads): New.
312 (supports_fast_tracepoints): New.
313 (linux_detach): Stabilize threads before detaching.
314 (handle_tracepoints): Handle internal tracing breakpoints. Assert
315 the lwp is either not stabilizing, or is moving out of a jump pad.
316 (linux_fast_tracepoint_collecting): New.
317 (maybe_move_out_of_jump_pad): New.
318 (enqueue_one_deferred_signal): New.
319 (dequeue_one_deferred_signal): New.
320 (linux_wait_for_event_1): If moving out of a jump pad, defer
321 pending signals to later.
322 (linux_stabilize_threads): New.
323 (linux_wait_1): Check if threads need moving out of jump pads, and
325 (stuck_in_jump_pad_callback): New.
326 (move_out_of_jump_pad_callback): New.
328 (linux_resume_one_lwp): Handle moving out of jump pads.
329 (linux_set_resume_request): Dequeue deferred signals.
330 (need_step_over_p): Also step over fast tracepoint jumps.
331 (start_step_over): Also uninsert fast tracepoint jumps.
332 (finish_step_over): Also reinsert fast tracepoint jumps.
333 (linux_install_fast_tracepoint_jump): New.
334 (linux_target_ops): Install linux_stabilize_threads and
335 linux_install_fast_tracepoint_jump_pad.
336 * linux-low.h (linux_target_ops) <get_thread_area,
337 install_fast_tracepoint_jump_pad>: New fields.
338 (struct lwp_info) <collecting_fast_tracepoint,
339 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
340 (linux_get_thread_area): Declare.
341 * linux-x86-low.c (jump_insn): New.
342 (x86_get_thread_area): New.
345 (amd64_install_fast_tracepoint_jump_pad): New.
346 (i386_install_fast_tracepoint_jump_pad): New.
347 (x86_install_fast_tracepoint_jump_pad): New.
348 (the_low_target): Install x86_get_thread_area and
349 x86_install_fast_tracepoint_jump_pad.
350 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
351 (struct fast_tracepoint_jump): New.
352 (fast_tracepoint_jump_insn): New.
353 (fast_tracepoint_jump_shadow): New.
354 (find_fast_tracepoint_jump_at): New.
355 (fast_tracepoint_jump_here): New.
356 (delete_fast_tracepoint_jump): New.
357 (set_fast_tracepoint_jump): New.
358 (uninsert_fast_tracepoint_jumps_at): New.
359 (reinsert_fast_tracepoint_jumps_at): New.
360 (set_breakpoint_at): Use write_inferior_memory.
361 (uninsert_raw_breakpoint): Use write_inferior_memory.
362 (check_mem_read): Mask out fast tracepoint jumps.
363 (check_mem_write): Mask out fast tracepoint jumps.
364 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
365 (set_fast_tracepoint_jump): Declare.
366 (delete_fast_tracepoint_jump)
367 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
368 (reinsert_fast_tracepoint_jumps_at): Declare.
369 * regcache.c: Don't compile many functions when building the
370 in-process agent library.
371 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
372 the register buffer in the heap.
373 (free_register_cache): If the register buffer isn't owned by the
374 regcache, don't free it.
375 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
376 pre-existing register caches.
377 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
379 (convert_ascii_to_int): : Constify `from' parameter type.
380 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
381 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
382 the needed buffer in-place.
383 (relocate_instruction): New.
384 * server.c (handle_query) <qSymbols>: If the target supports
385 tracepoints, give it a chance of looking up symbols. Report
386 support for fast tracepoints.
387 (handle_status): Stabilize threads.
388 (process_serial_event): Adjust.
389 * server.h (struct fast_tracepoint_jump): Forward declare.
390 (struct process_info) <fast_tracepoint_jumps>: New field.
391 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
392 (decode_X_packet, decode_M_packet): Adjust.
393 (relocate_instruction): Declare.
394 (in_process_agent_loaded): Declare.
395 (tracepoint_look_up_symbols): Declare.
396 (struct fast_tpoint_collect_status): Declare.
397 (fast_tracepoint_collecting): Declare.
398 (force_unlock_trace_buffer): Declare.
399 (handle_tracepoint_bkpts): Declare.
400 (initialize_low_tracepoint)
401 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
402 * target.h (struct target_ops) <stabilize_threads,
403 install_fast_tracepoint_jump_pad>: New fields.
404 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
405 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
406 [HAVE_STDINT_H]: Include stdint.h.
407 (trace_debug_1): Rename to ...
408 (trace_vdebug): ... this.
409 (trace_debug): Rename to ...
410 (trace_debug_1): ... this. Add `level' parameter.
412 (ATTR_USED, ATTR_NOINLINE): New.
413 (IP_AGENT_EXPORT): New.
414 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
415 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
416 (about_to_request_buffer_space, trace_buffer_is_full)
417 (stopping_tracepoint, expr_eval_result, error_tracepoint)
418 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
419 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
420 (traceframe_write_count, traceframes_created)
421 (trace_state_variables)
422 New renaming defines.
423 (struct ipa_sym_addresses): New.
424 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
426 (ipa_sym_addrs): New.
427 (all_tracepoint_symbols_looked_up): New.
428 (in_process_agent_loaded): New.
429 (write_e_ipa_not_loaded): New.
430 (maybe_write_ipa_not_loaded): New.
431 (tracepoint_look_up_symbols): New.
432 (debug_threads) [IN_PROCESS_AGENT]: New.
433 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
434 (UNKNOWN_SIDE_EFFECTS): New.
436 (flush_trace_buffer): New.
437 (stop_tracing_bkpt): New.
438 (flush_trace_buffer_bkpt): New.
439 (read_inferior_integer): New.
440 (read_inferior_uinteger): New.
441 (read_inferior_data_pointer): New.
442 (write_inferior_data_pointer): New.
443 (write_inferior_integer): New.
444 (write_inferior_uinteger): New.
445 (struct collect_static_trace_data_action): Delete.
446 (enum tracepoint_type): New.
447 (struct tracepoint) <type>: New field `type'.
448 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
449 <orig_size, obj_addr_on_target, adjusted_insn_addr>
450 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
451 (tracepoints): Use IP_AGENT_EXPORT.
452 (last_tracepoint): Don't include in the IPA.
453 (stopping_tracepoint): Use IP_AGENT_EXPORT.
454 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
455 (alloced_trace_state_variables): New.
456 (trace_state_variables): Use IP_AGENT_EXPORT.
457 (traceframe_t): Delete unused variable.
458 (circular_trace_buffer): Don't include in the IPA.
459 (trace_buffer_start): Delete.
460 (struct trace_buffer_control): New.
461 (trace_buffer_free): Delete.
462 (struct ipa_trace_buffer_control): New.
463 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
464 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
466 (trace_buffer_ctrl): New.
467 (TRACE_BUFFER_CTRL_CURR): New.
468 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
469 Reimplement as macros.
470 (trace_buffer_wrap): Delete.
471 (traceframe_write_count, traceframe_read_count)
472 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
473 (struct tracepoint_hit_ctx) <type>: New field.
474 (struct fast_tracepoint_ctx): New.
475 (memory_barrier): New.
477 (record_tracepoint_error): Update atomically in the IPA.
478 (clear_inferior_trace_buffer): New.
479 (about_to_request_buffer_space): New.
480 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
481 updating the same buffer.
482 (add_tracepoint): Default the tracepoint's type to trap
483 tracepoint, and orig_size to -1.
484 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
486 (create_trace_state_variable): New parameter `gdb'. Handle it.
487 (clear_installed_tracepoints): Clear fast tracepoint jumps.
488 (cmd_qtdp): Handle fast tracepoints.
490 (max_jump_pad_size): New.
491 (gdb_jump_pad_head): New.
492 (get_jump_space_head): New.
493 (claim_jump_space): New.
494 (sort_tracepoints): New.
495 (MAX_JUMP_SIZE): New.
496 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
498 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
499 support. Upload fast traceframes, and delete internal IPA
501 (stop_tracing_handler): New.
502 (flush_trace_buffer_handler): New.
503 (cmd_qtstop): Upload fast tracepoints.
504 (response_tracepoint): Handle fast tracepoints.
505 (tracepoint_finished_step): Upload fast traceframes. Set the
506 tracepoint hit context's tracepoint type.
507 (handle_tracepoint_bkpts): New.
508 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
509 type. Add comment about fast tracepoints.
510 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
511 non-existing action_str field.
512 (get_context_regcache): Handle fast tracepoints.
513 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
515 (fast_tracepoint_from_jump_pad_address): New.
516 (fast_tracepoint_from_ipa_tpoint_address): New.
518 (force_unlock_trace_buffer): New.
519 (fast_tracepoint_collecting): New.
522 (write_inferior_data_ptr): New.
523 (target_tp_heap): New.
524 (target_malloc): New.
525 (download_agent_expr): New.
527 (download_tracepoints): New.
528 (download_trace_state_variables): New.
529 (upload_fast_traceframes): New.
530 (IPA_FIRST_TRACEFRAME): New.
531 (IPA_NEXT_TRACEFRAME_1): New.
532 (IPA_NEXT_TRACEFRAME): New.
533 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
534 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
535 (gdb_jump_pad_buffer_end): New.
536 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
537 (initialize_tracepoint): Adjust.
538 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
539 buffer. Initialize the low module.
540 * utils.c (PREFIX, TOOLNAME): New.
541 (malloc_failure): Use PREFIX.
542 (error): In the IPA, an error causes an exit.
543 (fatal, warning): Use PREFIX.
544 (internal_error): Use TOOLNAME.
545 (NUMCELLS): Increase to 10.
546 * configure, config.in: Regenerate.
548 2010-06-01 Pedro Alves <pedro@codesourcery.com>
550 * server.c (handle_query) <qSupported>: Do two passes over the
551 qSupported string to avoid nesting strtok.
553 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
555 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
557 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
559 * configure: Regenerate.
560 * proc-service.list: New.
562 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
564 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
567 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
569 * gdbreplay.c (remote_open): Check error return from socket() call by
570 its equality to -1 not by it being negative.
571 * remote-utils.c (remote_open): Likewise.
573 2010-05-23 Pedro Alves <pedro@codesourcery.com>
575 * config.h: Regenerate.
577 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
579 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
580 doesn't provide PTRACE_GET_THREAD_AREA.
582 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
584 * linux-m68k-low.c: Include <asm/ptrace.h>
585 (ps_get_thread_area): Implement.
587 2010-05-03 Doug Evans <dje@google.com>
589 * event-loop.c (struct callback_event): New struct.
590 (callback_list): New global.
591 (append_callback_event, delete_callback_event): New functions.
592 (process_callback): New function.
593 (start_event_loop): Call it.
594 * remote-utils.c (NOT_SCHEDULED): Define.
595 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
596 moved out of readchar.
597 (readchar): Rewrite. Call reschedule before returning.
598 (reset_readchar): New function.
599 (remote_close): Call it.
600 (process_remaining, reschedule): New functions.
601 * server.h (callback_handler_func): New typedef.
602 (append_callback_event, delete_callback_event): Declare.
604 2010-05-03 Pedro Alves <pedro@codesourcery.com>
606 * proc-service.c (ps_pglobal_lookup): Use
607 thread_db_look_up_one_symbol.
608 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
609 parameter. Use it instead of all_symbols_looked_up.
610 * server.h (struct process_info) <all_symbols_looked_up>: Delete
612 (all_symbols_looked_up): Don't declare.
613 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
614 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
616 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
617 Set all_symbols_looked_up here.
618 (thread_db_look_up_one_symbol): New.
619 (thread_db_get_tls_address): Adjust.
620 (thread_db_load_search, try_thread_db_load_1): Always allocate the
621 thread_db object on the heap, and tentatively set it in the
623 (thread_db_init): Don't set all_symbols_looked_up here.
624 * linux-low.h (thread_db_look_up_one_symbol): Declare.
626 2010-05-03 Pedro Alves <pedro@codesourcery.com>
628 * linux-low.c (linux_kill, linux_detach): Adjust.
629 (status_pending_p_callback): Remove redundant statement. Check
630 for !TARGET_WAITIKIND_IGNORE, instead of
631 TARGET_WAITKIND_STOPPED.
632 (handle_tracepoints): Make sure LWP is locked. Adjust.
633 (linux_wait_for_event_1): Adjust.
634 (linux_cancel_breakpoints): New.
635 (unsuspend_one_lwp): New.
636 (unsuspend_all_lwps): New.
637 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
638 (send_sigstop_callback): Change return type to int, add new
639 `except' parameter and handle it.
640 (suspend_and_send_sigstop_callback): New.
641 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
642 pass them down. If SUSPEND, also increment the lwp's suspend
644 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
645 (need_step_over_p): Don't consider suspended LWPs.
646 (start_step_over): Adjust.
647 (proceed_one_lwp): Change return type to int, add new `except'
648 parameter and handle it.
649 (unsuspend_and_proceed_one_lwp): New.
650 (proceed_all_lwps): Use find_inferior instead of
652 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
653 also decrement the suspend count of LWPs. Pass `except' down,
654 instead of hacking its suspend count.
655 (linux_pause_all): Add `freeze' parameter. Adjust.
656 (linux_unpause_all): New.
657 (linux_target_ops): Install linux_unpause_all.
658 * server.c (handle_status): Adjust.
659 * target.h (struct target_ops): New fields `unpause_all' and
660 `cancel_breakpoints'. Add new parameter to `pause_all'.
661 (pause_all): Add new `freeze' parameter.
663 (cancel_breakpoints): New.
664 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
666 (cmd_qtstart): Pause threads.
667 (stop_tracing): Pause threads, and cancel breakpoints.
668 * win32-low.c (win32_target_ops): Adjust.
670 2010-05-03 Pedro Alves <pedro@codesourcery.com>
672 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
673 the inferior right away from here...
674 (linux_wait_1): ... to here, and adjust to check the thread's
675 last_resume_kind instead of the lwp's step or stop_expected flags.
677 2010-05-02 Pedro Alves <pedro@codesourcery.com>
679 * README: Use consistent `GDB' and `GDBserver' spellings.
681 2010-05-02 Pedro Alves <pedro@codesourcery.com>
683 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
684 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
685 (linux_detach_one_lwp): Assume the lwp is stopped.
686 (any_thread_of): Delete.
687 (linux_detach): Stop all lwps here. Don't blindly delete all
689 (delete_lwp_callback): New.
690 (linux_mourn): Delete all lwps of the process that is gone.
691 (linux_wait_1): Don't delete the last lwp of the process here.
692 * mem-break.h (mark_breakpoints_out): Declare.
693 * mem-break.c (mark_breakpoints_out): New.
694 (free_all_breakpoints): Use it.
695 * server.c (handle_target_event): If the process is gone, mark
697 * thread-db.c (struct thread_db) <create_bp>: New field.
698 (thread_db_enable_reporting): Fix prototype. Store a thread event
699 breakpoint reference in the thread_db struct.
700 (thread_db_load_search): Clear the thread_db object.
701 (try_thread_db_load_1): Ditto.
702 (switch_to_process): New.
703 (disable_thread_event_reporting): Use it.
704 (remove_thread_event_breakpoints): New.
705 (thread_db_detach, thread_db_mourn): Use it.
707 2010-05-01 Pedro Alves <pedro@codesourcery.com>
709 * linux-low.c (linux_enable_event_reporting): New.
710 (linux_wait_for_event_1, handle_extended_wait): Use it.
712 2010-04-30 Pedro Alves <pedro@codesourcery.com>
714 * linux-low.c (linux_kill_one_lwp, linux_kill)
715 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
716 (send_sigstop): Take an lwp_info as parameter instead. Queue a
717 SIGSTOP even if the LWP is stopped.
718 (send_sigstop_callback): New.
719 (stop_all_lwps): Use send_sigstop_callback instead.
720 (linux_resume_one_thread): Adjust.
721 (proceed_one_lwp): Still proceed an LWP that the client has
722 requested to stop, if we haven't reported it as stopped yet. Make
723 sure that LWPs the client want stopped, have a pending SIGSTOP.
725 2010-04-26 Doug Evans <dje@google.com>
727 * server.c (handle_general_set): Make static.
729 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
730 Print received char after testing for error/eof instead of before.
731 (input_interrupt): Tweak comment.
733 2010-04-23 Doug Evans <dje@google.com>
735 * server.c (start_inferior): Print inferior argv if --debug.
737 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
739 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
740 * nto-x86-low.c: Include server.h
742 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
744 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
745 be consistent with other sources of this directory.
746 (init_registers_amd64): Correct name of source file of this function
749 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
751 * configure.srv (x86_64-*-mingw*): New configuration for Windows
754 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
756 * win32-i386-low.c: Add 64-bit support.
757 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
758 (init_registers_amd64): Declare.
759 (mappings): Add 64-bit version of array.
760 (init_windows_x86): New function.
761 (the_low_target): Change init_arch field to init_windows_x86.
763 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
765 * win32-low.c: Adapt to support also 64-bit architecture.
766 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
767 (get_image_name): Use SIZE_T type for local variable `done'.
768 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
769 (toolhelp_get_dll_name): Idem.
770 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
771 Use uintptr_t typecast to avoid warning.
772 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
773 (handle_exception): Use phex_nz to avoid warning.
774 (win32_wait): Remove unused local variable `process'.
776 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
778 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
781 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
783 * configure.ac: Use `ws2_32' library for srv_mingw.
784 * configure: Regenerate.
785 * gdbreplay.c: Include winsock2.h instead of winsock.h.
786 * remote-utils.c: Likewise.
788 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
790 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
791 if __x86_64__ is defined.
793 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
795 * configure: Regenerate.
797 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
799 * server.c (handle_query): Handle 'qGetTIBAddr' query.
800 * target.h (target_ops): New get_tib_address field.
801 * win32-low.h (win32_thread_info): Add thread_local_base field.
802 * win32-low.c (child_add_thread): Add tlb argument.
803 Set thread_local_base field to TLB.
804 (get_child_debug_event): Adapt to child_add_thread change.
805 (win32_get_tib_address): New function.
806 (win32_target_ops): Set get_tib_address field to
807 win32_get_tib_address.
808 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
810 2010-04-12 Pedro Alves <pedro@codesourcery.com>
812 * linux-low.c (linux_mourn): Also remove the process.
813 * server.c (handle_target_event): Don't remove the process here.
814 * nto-low.c (nto_mourn): New.
815 (nto_target_ops): Install it.
816 * spu-low.c (spu_mourn): New.
817 (spu_target_ops): Install it.
818 * win32-low.c (win32_mourn): New.
819 (win32_target_ops): Install it.
821 2010-04-12 Pedro Alves <pedro@codesourcery.com>
823 * server.h (buffer_xml_printf): Remove redundant `;'.
825 2010-04-12 Pedro Alves <pedro@codesourcery.com>
827 * regcache.c (set_register_cache): Invalidate regcaches before
828 changing the register cache layout.
829 (regcache_invalidate_one): Allow a NULL regcache.
830 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
831 regcaches before changing the register cache layout or the target
834 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
836 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
837 variable warning on Linux/x86-64.
839 2010-04-11 Pedro Alves <pedro@codesourcery.com>
841 GDBserver disconnected tracing support.
843 * linux-low.c (linux_remove_process): Delete.
844 (add_lwp): Don't set last_resume_kind here.
845 (linux_kill): Use `mourn'.
846 (linux_detach): Use `thread_db_detach', and `mourn'.
848 (linux_attach_lwp_1): Adjust comment.
849 (linux_attach): last_resume_kind moved the thread_info; adjust.
850 (status_pending_p_callback): Adjust.
851 (linux_wait_for_event_1): Adjust.
852 (count_events_callback, select_singlestep_lwp_callback)
853 (select_event_lwp_callback, cancel_breakpoints_callback)
854 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
855 (proceed_one_lwp): Adjust.
856 (linux_async): Add debug output.
857 (linux_thread_stopped): New.
858 (linux_pause_all): New.
859 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
861 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
862 (thread_db_free): Delete declaration.
863 (thread_db_detach, thread_db_mourn): Declare.
864 * thread-db.c (thread_db_init): Use thread_db_mourn.
865 (thread_db_free): Delete, split in two.
866 (disable_thread_event_reporting): New.
867 (thread_db_detach): New.
868 (thread_db_mourn): New.
870 * server.h (struct thread_info) <last_resume_kind>: New field.
871 <attached>: Add comment.
872 <gdb_detached>: New field.
873 (handler_func): Change return type to int.
874 (handle_serial_event, handle_target_event): Ditto.
875 (gdb_connected): Declare.
877 (disconnected_tracing): Declare.
878 (stop_tracing): Declare.
880 * server.c (handle_query) <qSupported>: Report support for
881 disconnected tracing.
882 (queue_stop_reply_callback): Account for running threads.
883 (gdb_wants_thread_stopped): New.
884 (gdb_wants_all_threads_stopped): New.
885 (gdb_reattached_process): New.
886 (handle_status): Clear the `gdb_detached' flag of all processes.
887 In all-stop, stop all threads.
888 (main): Be sure to leave tfind mode. Handle disconnected tracing.
889 (process_serial_event): If the remote connection breaks, or if an
890 exit was forced with "monitor exit", force an event loop exit.
891 Handle disconnected tracing on detach.
892 (handle_serial_event): Adjust.
893 (handle_target_event): If GDB isn't connected, forward events back
894 to the inferior, unless the last process exited, in which case,
895 exit gdbserver. Adjust interface.
897 * remote-utils.c (remote_open): Don't block in accept. Instead
898 register an event loop source on the listen socket file
899 descriptor. Refactor bits into ...
900 (listen_desc): ... this new global.
901 (gdb_connected): ... this new function.
902 (enable_async_notification): ... this new function.
903 (handle_accept_event): ... this new function.
904 (remote_close): Clear remote_desc.
906 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
908 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
910 (mourn_inferior): Define.
911 (target_process_qsupported): Avoid the dangling else problem.
912 (thread_stopped): Define.
914 (target_waitstatus_to_string): Declare.
915 * target.c (target_waitstatus_to_string): New.
917 * tracepoint.c (tracing): Make extern.
918 (disconnected_tracing): New.
919 (stop_tracing): Make extern. Handle tracing stops due to GDB
921 (cmd_qtdisconnected): New.
922 (cmd_qtstatus): Report disconnected tracing status in trace reply.
923 (handle_tracepoint_general_set): Handle QTDisconnected.
925 * event-loop.c (event_handler_func): Change return type to int.
926 (process_event): Bail out if the event handler wants the event
928 (handle_file_event): Ditto.
929 (start_event_loop): Bail out if the event handler wants the event
932 * nto-low.c (nto_target_ops): Adjust.
933 * spu-low.c (spu_wait): Don't remove the process here.
934 (spu_target_ops): Adjust.
935 * win32-low.c (win32_wait): Don't remove the process here.
936 (win32_target_ops): Adjust.
938 2010-04-11 Pedro Alves <pedro@codesourcery.com>
940 * regcache.c (realloc_register_cache): Invalidate inferior's
941 regcache before recreating it.
943 2010-04-09 Pedro Alves <pedro@codesourcery.com>
945 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
947 2010-04-09 Stan Shebs <stan@codesourcery.com>
948 Pedro Alves <pedro@codesourcery.com>
950 * server.h (LONGEST): New.
951 (struct thread_info) <while_stepping>: New field.
952 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
954 (initialize_tracepoint, handle_tracepoint_general_set)
955 (handle_tracepoint_query, tracepoint_finished_step)
956 (tracepoint_was_hit, release_while_stepping_state_list):
957 (current_traceframe): Declare.
958 * server.c (handle_general_set): Handle tracepoint packets.
961 (handle_search_memory_1): Use read_memory.
962 (handle_query): Report support for conditional tracepoints, trace
963 state variables, and tracepoint sources. Handle tracepoint
965 (main): Initialize the tracepoints module.
966 (process_serial_event): Handle traceframe reads/writes.
968 * linux-low.c (handle_tracepoints): New.
969 (linux_wait_1): Call it.
970 (linux_resume_one_lwp): Handle while-stepping.
971 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
972 (linux_target_ops): Install them.
973 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
975 * linux-x86-low.c (x86_supports_tracepoints): New.
976 (the_low_target). Install it.
978 * mem-break.h (delete_breakpoint): Declare.
979 * mem-break.c (delete_breakpoint): Make external.
981 * target.h (struct target_ops): Add `supports_tracepoints',
982 `read_pc', and `write_pc' fields.
983 (target_supports_tracepoints): Define.
984 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
987 * regcache.h (struct regcache) <registers_owned>: New field.
988 (init_register_cache, regcache_cpy): Declare.
989 (regcache_read_pc, regcache_write_pc): Declare.
990 (register_cache_size): Declare.
991 (supply_regblock): Declare.
992 * regcache.c (init_register_cache): New.
993 (new_register_cache): Use it.
995 (register_cache_size): New.
996 (supply_regblock): New.
997 (regcache_read_pc, regcache_write_pc): New.
1001 * Makefile.in (OBS): Add tracepoint.o.
1002 (tracepoint.o): New rule.
1004 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1006 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1008 (i386-mmx.c): Likewise.
1009 (i386-mmx-linux.o): Likewise.
1010 (i386-mmx-linux.c): Likewise.
1012 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1013 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1014 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1015 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1017 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1018 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1019 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1021 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1023 * Makefile.in (clean): Updated.
1025 (i386-avx.c): Likewise.
1026 (i386-avx-linux.o): Likewise.
1027 (i386-avx-linux.c): Likewise.
1028 (amd64-avx.o): Likewise.
1029 (amd64-avx.c): Likewise.
1030 (amd64-avx-linux.o): Likewise.
1031 (amd64-avx-linux.c): Likewise.
1033 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1034 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1035 (srv_amd64_regobj): Add amd64-avx.o.
1036 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1037 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1038 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1039 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1040 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1041 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1042 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1044 * i387-fp.c: Include "i386-xstate.h".
1046 (i387_cache_to_xsave): Likewise.
1047 (i387_xsave_to_cache): Likewise.
1048 (x86_xcr0): Likewise.
1050 * i387-fp.h (i387_cache_to_xsave): Likewise.
1051 (i387_xsave_to_cache): Likewise.
1052 (x86_xcr0): Likewise.
1054 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1055 * linux-crisv32-low.c (target_regsets): Likewise.
1056 * linux-m68k-low.c (target_regsets): Likewise.
1057 * linux-mips-low.c (target_regsets): Likewise.
1058 * linux-ppc-low.c (target_regsets): Likewise.
1059 * linux-s390-low.c (target_regsets): Likewise.
1060 * linux-sh-low.c (target_regsets): Likewise.
1061 * linux-sparc-low.c (target_regsets): Likewise.
1062 * linux-xtensa-low.c (target_regsets): Likewise.
1064 * linux-low.c: Include <sys/uio.h>.
1065 (regsets_fetch_inferior_registers): Support nt_type.
1066 (regsets_store_inferior_registers): Likewise.
1067 (linux_process_qsupported): New.
1068 (linux_target_ops): Add linux_process_qsupported.
1070 * linux-low.h (regset_info): Add nt_type.
1071 (linux_target_ops): Add process_qsupported.
1073 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1075 (init_registers_i386_avx_linux): New.
1076 (init_registers_amd64_avx_linux): Likewise.
1077 (xmltarget_i386_linux_no_xml): Likewise.
1078 (xmltarget_amd64_linux_no_xml): Likewise.
1079 (PTRACE_GETREGSET): Likewise.
1080 (PTRACE_SETREGSET): Likewise.
1081 (x86_fill_xstateregset): Likewise.
1082 (x86_store_xstateregset): Likewise.
1083 (use_xml): Likewise.
1084 (x86_linux_update_xmltarget): Likewise.
1085 (x86_linux_process_qsupported): Likewise.
1086 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1087 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1088 init_registers_i386_linux here. Call
1089 x86_linux_update_xmltarget.
1090 (the_low_target): Add x86_linux_process_qsupported.
1092 * server.c (handle_query): Call target_process_qsupported.
1094 * target.h (target_ops): Add process_qsupported.
1095 (target_process_qsupported): New.
1097 2010-04-03 Pedro Alves <pedro@codesourcery.com>
1099 * inferiors.c (add_thread): Set last_status kind to
1100 TARGET_WAITKIND_IGNORE.
1101 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1102 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1103 (linux_wait_1): Move `thread' local definition to block that uses
1104 it. Don't NULL initialize `event_child'.
1105 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1106 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1107 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1109 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1111 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1112 an extended waitstatus, or by a watchpoint.
1113 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1114 thread was stepping or has been stopped by a watchpoint.
1116 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1118 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1119 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1120 of another, then delete the previous, and validate all
1122 (validate_inserted_breakpoint): New.
1123 (delete_disabled_breakpoints): New.
1124 (validate_breakpoints): New.
1125 (check_mem_read): Validate breakpoints before trusting their
1126 shadow. Delete disabled breakpoints.
1127 (check_mem_write): Validate breakpoints before trusting they
1128 should be inserted. Delete disabled breakpoints.
1129 * mem-break.h (validate_breakpoints):
1130 * server.c (handle_query): Validate breakpoints when we see a
1133 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1135 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1136 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1137 if we could tell there's a GDB breakpoint at stop_pc.
1138 (need_step_over_p): Don't do a step over if we find a GDB
1139 breakpoint at the resume PC.
1141 * mem-break.c (struct raw_breakpoint): New.
1142 (enum bkpt_type): New type `gdb_breakpoint'.
1143 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1144 fields. New field `raw'.
1145 (find_raw_breakpoint_at): New.
1146 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1148 (set_breakpoint_at): Adjust.
1149 (delete_raw_breakpoint): New.
1150 (release_breakpoint): New.
1151 (delete_breakpoint): Rename to...
1152 (delete_breakpoint_1): ... this. Add proc parameter. Use
1153 release_breakpoint. Return ENOENT.
1154 (delete_breakpoint): Reimplement.
1155 (find_breakpoint_at): Delete.
1156 (find_gdb_breakpoint_at): New.
1157 (delete_breakpoint_at): Delete.
1158 (set_gdb_breakpoint_at): New.
1159 (delete_gdb_breakpoint_at): New.
1160 (gdb_breakpoint_here): New.
1161 (set_reinsert_breakpoint): Use release_breakpoint.
1162 (uninsert_breakpoint): Rename to ...
1163 (uninsert_raw_breakpoint): ... this.
1164 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1165 (reinsert_raw_breakpoint): Change parameter type to
1167 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1169 (check_breakpoints): Adjust. Use release_breakpoint.
1170 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1171 (breakpoint_inserted_here): Ditto.
1172 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1173 Don't trust the breakpoint's shadow if it is not inserted.
1174 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1175 (delete_all_breakpoints): Adjust.
1176 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1177 use delete_breakpoint_1.
1179 * mem-break.h (breakpoints_supported): Delete declaration.
1180 (set_gdb_breakpoint_at): Declare.
1181 (gdb_breakpoint_here): Declare.
1182 (delete_breakpoint_at): Delete.
1183 (delete_gdb_breakpoint_at): Declare.
1185 * server.h (struct raw_breakpoint): Forward declare.
1186 (struct process_info): New field `raw_breakpoints'.
1188 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1191 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1193 * linux-low.c (status_pending_p_callback): Fix comment.
1194 (linux_wait_for_event_1): Move most of the internal breakpoint
1195 handling from here...
1196 (linux_wait_1): ... to here.
1197 (count_events_callback): New.
1198 (select_singlestep_lwp_callback): New.
1199 (select_event_lwp_callback): New.
1200 (cancel_breakpoints_callback): New.
1201 (select_event_lwp): New.
1202 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1203 priority to all LWPs that have had events that should be reported
1204 to the client. Cancel breakpoints when about to reporting the
1205 event to the client, not while stopping lwps. No longer cancel
1206 finished single-steps here.
1207 (cancel_finished_single_step): Delete.
1208 (cancel_finished_single_steps): Delete.
1210 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1212 * mem-break.c (enum bkpt_type): New.
1213 (struct breakpoint): New field `type'.
1214 (set_breakpoint_at): Change return type to struct breakpoint
1215 pointer. Set type to `other_breakpoint' by default.
1216 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1217 in the breakpoint list.
1218 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1219 (reinsert_breakpoint): Rename to ...
1220 (reinsert_raw_breakpoint): ... this.
1221 (reinsert_breakpoints_at): Adjust.
1222 * mem-break.h (struct breakpoint): Declare.
1223 (set_breakpoint_at): Change return type to struct breakpoint
1226 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1228 * server.c (handle_query): Assign, not compare.
1230 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1232 Teach linux gdbserver to step-over-breakpoints.
1234 * linux-low.c (can_hardware_single_step): New.
1235 (supports_breakpoints): New.
1236 (handle_extended_wait): If stopping threads, read the stop pc of
1239 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1240 low target doesn't support retrieving the PC.
1241 (add_lwp): Set last_resume_kind to resume_continue.
1242 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1243 (linux_attach): Don't clear stop_expected. Set the lwp's
1244 last_resume_kind to resume_stop.
1245 (linux_detach_one_lwp): Don't check for removed breakpoints.
1246 (check_removed_breakpoint): Delete.
1247 (status_pending_p): Rename to ...
1248 (status_pending_p_callback): ... this. Don't check for removed
1249 breakpoints. Don't consider threads that are stopped from GDB's
1251 (linux_wait_for_lwp): Always read the stop_pc here.
1252 (cancel_breakpoint): New.
1253 (step_over_bkpt): New global.
1254 (linux_wait_for_event_1): Implement stepping over breakpoints.
1255 (gdb_wants_lwp_stopped): New.
1256 (gdb_wants_all_stopped): New.
1257 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1258 single-step traps here. Store the thread's last reported target
1260 (send_sigstop): Don't clear stop_expected. Always set it,
1262 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1263 (cancel_finished_single_step): New.
1264 (cancel_finished_single_steps): New.
1265 (wait_for_sigstop): Don't cancel finished single-step traps here.
1266 (linux_resume_one_lwp): Don't check for removed breakpoints.
1267 Don't set `step' on non-hardware step archs.
1268 (linux_set_resume_request): Ignore resume_stop requests if already
1269 stopping or stopped. Set the lwp's last_resume_kind.
1270 (resume_status_pending_p): Don't check for removed breakpoints.
1271 (need_step_over_p): New.
1272 (start_step_over): New.
1273 (finish_step_over): New.
1274 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1275 requests. Clear the thread's last reported target waitstatus.
1276 Don't use the `suspended' flag. Don't consider pending breakpoints.
1277 (linux_resume): Start a step-over if necessary.
1278 (proceed_one_lwp): New.
1279 (proceed_all_lwps): New.
1280 (unstop_all_lwps): New.
1281 * linux-low.h (struct lwp_info): Rewrite comment for the
1282 `suspended' flag. Add the `stop_pc' field. Delete the
1283 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1284 Add `'last_resume_kind' and `need_step_over' fields.
1285 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1286 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1287 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1288 (set_raw_breakpoint_at): New.
1289 (set_breakpoint_at): Rewrite to use it.
1290 (reinsert_breakpoint_handler): Delete.
1291 (set_reinsert_breakpoint): New.
1292 (reinsert_breakpoint_by_bp): Delete.
1293 (delete_reinsert_breakpoints): New.
1294 (uninsert_breakpoint): Rewrite.
1295 (uninsert_breakpoints_at): New.
1296 (reinsert_breakpoint): Rewrite.
1297 (reinsert_breakpoints_at): New.
1298 (check_breakpoints): Rewrite.
1299 (breakpoint_here): New.
1300 (breakpoint_inserted_here): New.
1301 (check_mem_read): Adjust.
1302 * mem-break.h (breakpoints_supported, breakpoint_here)
1303 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1304 (reinsert_breakpoint_by_bp): Delete declaration.
1305 (delete_reinsert_breakpoints): Declare.
1306 (reinsert_breakpoint): Delete declaration.
1307 (reinsert_breakpoints_at): Declare.
1308 (uninsert_breakpoint): Delete declaration.
1309 (uninsert_breakpoints_at): Declare.
1310 (check_breakpoints): Adjust prototype.
1311 * server.h: Adjust include order.
1312 (struct thread_info): Declare here. Add a `last_status' field.
1314 2010-03-23 Michael Snyder <msnyder@vmware.com>
1316 * server.c (crc32): New function.
1317 (handle_query): Add handling for 'qCRC:' request.
1319 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1321 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1322 lwp had been stopped by a watchpoint.
1324 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1326 * server.h (internal_error): Declare.
1327 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1328 * utils.c (internal_error): New function.
1330 2010-03-15 Andreas Schwab <schwab@redhat.com>
1332 * configure.srv: Fix typo setting srv_regobj.
1334 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1336 * linux-low.c (fetch_register): Avoid passing a non string literal
1338 (usr_store_inferior_registers): Ditto.
1340 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1342 * linux-low.c (linux_write_memory): Bail out early if peeking
1345 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1347 * linux-low.h (struct lwp_info): New fields
1348 `stopped_by_watchpoint' and `stopped_data_address'.
1349 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1350 here, and cache them in the lwp object.
1351 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1353 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1355 (linux_stopped_by_watchpoint): Rewrite.
1356 (linux_stopped_data_address): Rewrite.
1358 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1360 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1361 switching the current inferior, not before.
1363 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1365 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1366 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1367 i386-linux.c and amd64-linux.c.
1368 (reg-i386.o): Removed.
1369 (reg-i386.c): Likewise.
1370 (reg-i386-linux.o): Likewise.
1371 (reg-i386-linux.c): Likewise.
1372 (reg-x86-64.o): Likewise.
1373 (reg-x86-64.c): Likewise.
1374 (reg-x86-64-linux.o): Likewise.
1375 (reg-x86-64-linux.c): Likewise.
1378 (i386-linux.o): Likewise.
1379 (i386-linux.c): Likewise.
1380 (amd64.o): Likewise.
1381 (amd64.c): Likewise.
1382 (amd64-linux.o): Likewise.
1383 (amd64-linux.c): Likewise.
1385 * configure.srv (srv_i386_regobj): New.
1386 (srv_i386_linux_regobj): Likewise.
1387 (srv_amd64_regobj): Likewise.
1388 (srv_amd64_linux_regobj): Likewise.
1389 (srv_i386_32bit_xmlfiles): Likewise.
1390 (srv_i386_64bit_xmlfiles): Likewise.
1391 (srv_i386_xmlfiles): Likewise.
1392 (srv_amd64_xmlfiles): Likewise.
1393 (srv_i386_linux_xmlfiles): Likewise.
1394 (srv_amd64_linux_xmlfiles): Likewise.
1395 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1396 srv_xmlfiles to $srv_i386_xmlfiles.
1397 (i[34567]86-*-mingw32ce*): Likewise.
1398 (i[34567]86-*-mingw*): Likewise.
1399 (i[34567]86-*-nto*): Likewise.
1400 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1401 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1402 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1403 (x86_64-*-linux*): Likewise.
1405 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1406 (init_registers_amd64_linux): New.
1407 (x86_arch_setup): Replace init_registers_x86_64_linux with
1408 init_registers_amd64_linux.
1410 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1412 * configure.ac: Check for libdl. If it is not available link against
1413 static libthread_db.
1414 * configure: Regenerate.
1416 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1420 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1421 handing a read watchpoint.
1422 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1424 2010-02-12 Doug Evans <dje@google.com>
1426 * linux-low.c (linux_supports_tracefork_flag): Document.
1427 (linux_look_up_symbols): Add comment.
1429 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1431 * regcache.c (supply_register): Clear regcache if buf is NULL.
1433 2010-02-02 Nicolas Roche <roche@sourceware.org>
1434 Joel Brobecker <brobecker@adacore.com>
1436 * inferiors.c (find_inferior): Add function documentation.
1437 (unloaded_dll): Handle the case where the unloaded dll has not
1438 been previously registered in the dll list.
1440 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1442 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1443 (thumb2_breakpoint): New.
1444 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1446 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1448 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1449 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1452 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1454 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1456 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1458 * linux-s390-low.c (s390_collect_ptrace_register)
1459 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1461 2010-01-21 Doug Evans <dje@google.com>
1463 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1464 (PTRACE_ARG4_TYPE): New macro.
1465 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1466 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1467 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1468 (usr_store_inferior_registers): Ditto.
1469 (linux_read_memory, linux_write_memory): Ditto.
1470 (linux_test_for_tracefork): Ditto.
1472 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1473 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1475 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1477 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1480 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1482 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1483 prototype to take a regcache. Adjust.
1485 2010-01-20 Pedro Alves <pedro@codesourcery.com>
1487 * regcache.h (struct thread_info): Forward declare.
1488 (struct regcache): New.
1489 (new_register_cache): Adjust prototype.
1490 (get_thread_regcache): Declare.
1491 (free_register_cache): Adjust prototype.
1492 (registers_to_string, registers_from_string): Ditto.
1493 (supply_register, supply_register_by_name, collect_register)
1494 (collect_register_as_string, collect_register_by_name): Ditto.
1495 * regcache.c (struct inferior_regcache_data): Delete.
1496 (get_regcache): Rename to ...
1497 (get_thread_regcache): ... this. Adjust. Switch inferior before
1499 (regcache_invalidate_one): Adjust.
1500 (regcache_invalidate): Fix prototype.
1501 (new_register_cache): Return the new register cache.
1502 (free_register_cache): Change prototype.
1503 (realloc_register_cache): Adjust.
1504 (registers_to_string): Change prototype to take a regcache. Adjust.
1505 (registers_from_string): Ditto.
1506 (register_data): Ditto.
1507 (supply_register): Ditto.
1508 (supply_register_by_name): Ditto.
1509 (collect_register): Ditto.
1510 (collect_register_as_string): Ditto.
1511 (collect_register_by_name): Ditto.
1512 * server.c (process_serial_event): Adjust.
1513 * linux-low.h (regset_fill_func, regset_store_func): Change
1515 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1517 * linux-low.c (get_stop_pc): Adjust.
1518 (check_removed_breakpoint): Adjust.
1519 (linux_wait_for_event): Adjust.
1520 (linux_resume_one_lwp): Adjust.
1521 (fetch_register): Add regcache parameter. Adjust.
1522 (usr_store_inferior_registers): Ditto.
1523 (regsets_fetch_inferior_registers): Ditto.
1524 (regsets_store_inferior_registers): Ditto.
1525 (linux_fetch_registers, linux_store_registers): Ditto.
1526 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1528 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1529 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1530 prototype to take a regcache.
1531 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1532 * remote-utils.c (convert_ascii_to_int, outreg)
1533 (prepare_resume_reply): Change prototype to take a regcache.
1535 * target.h (struct target_ops) <fetch_registers, store_registers>:
1536 Change prototype to take a regcache.
1537 (fetch_inferior_registers, store_inferior_registers): Change
1538 prototype to take a regcache. Adjust.
1539 * proc-service.c (ps_lgetregs): Adjust.
1540 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1541 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1542 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1543 take a regcache. Adjust.
1544 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1545 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1546 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1547 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1548 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1549 (cris_cannot_fetch_register):
1550 (cris_breakpoint_at): Change prototype to take a regcache.
1552 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1553 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1554 to take a regcache. Adjust.
1555 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1557 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1558 take a regcache. Adjust.
1559 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1560 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1561 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1562 * linux-mips-low.c (mips_get_pc):
1563 (mips_set_pc): Change prototype to take a regcache. Adjust.
1564 (mips_reinsert_addr): Adjust.
1565 (mips_collect_register): Change prototype to take a regcache.
1567 (mips_supply_register):
1568 (mips_collect_register_32bit, mips_supply_register_32bit)
1569 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1570 (mips_store_fpregset): Ditto.
1571 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1573 (parse_spufs_run): Adjust.
1574 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1575 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1576 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1577 take a regcache. Adjust.
1578 * linux-s390-low.c (s390_collect_ptrace_register)
1579 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1580 (s390_set_pc): Change prototype to take a regcache. Adjust.
1581 (s390_arch_setup): Adjust.
1582 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1583 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1584 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1585 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1586 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1588 (sparc_breakpoint_at): Adjust.
1589 * linux-xtensa-low.c (xtensa_fill_gregset):
1590 (xtensa_store_gregset):
1591 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1592 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1593 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1594 prototype to take a regcache. Adjust.
1595 * win32-arm-low.c (arm_fetch_inferior_register)
1596 (arm_store_inferior_register): Change prototype to take a
1598 * win32-i386-low.c (i386_fetch_inferior_register)
1599 (i386_store_inferior_register): Change prototype to take a
1601 * win32-low.c (child_fetch_inferior_registers)
1602 (child_store_inferior_registers): Change prototype to take a
1604 (win32_wait): Adjust.
1605 (win32_fetch_inferior_registers): Change prototype to take a
1607 (win32_store_inferior_registers): Adjust.
1608 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1609 store_inferior_register>: Change prototype to take a regcache.
1611 2010-01-20 Doug Evans <dje@google.com>
1613 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1615 (linux_wait_for_event1, linux_init_signals): Ditto.
1616 (W_STOPCODE): Provide definition if missing.
1618 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1620 * linux-low.c (linux_core_of_thread): New.
1621 (compare_ints, show_process, list_threads): New.
1622 (linux_qxfer_osdata): Report threads and cores.
1623 (linux_target_op): Register linux_core_of_thread.
1624 * remote-utils.c (prepare_resume_reply): Report the core.
1625 (buffer_xml_printf): Support %d specifier.
1626 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1628 (handle_query): Handle qXfer:threads. Announce availability
1630 * target.h (struct target_ops): New field core_of_thread.
1632 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1634 * Makefile.in (clean): Remove new generated files.
1635 (reg-s390.o, reg-s390.c): Remove rules.
1636 (reg-s390x.o, reg-s390x.c): Likewise.
1637 (s390-linux32.o, s390-linux32.c): Add rules.
1638 (s390-linux64.o, s390-linux64.c): Likewise.
1639 (s390x-linux64.o, s390x-linux64.c): Likewise.
1640 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1641 * linux-s390-low.c: Include <elf.h>.
1642 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1643 (init_registers_s390): Remove prototype.
1644 (init_registers_s390x): Likewise.
1645 (init_registers_s390_linux32): Add prototype.
1646 (init_registers_s390_linux64): Likewise.
1647 (init_registers_s390x_linux64): Likewise.
1648 (s390_num_regs_3264): New define.
1649 (s390_regmap_3264): New global variable.
1650 (s390_cannot_fetch_register): Remove obsolete check.
1651 (s390_cannot_store_register): Likewise.
1652 (s390_collect_ptrace_register): Handle upper/lower register halves.
1653 (s390_supply_ptrace_register): Likewise.
1654 (s390_fill_gregset): Update to register number changes.
1655 (s390_get_hwcap): New routine.
1656 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1657 Install appropriate regmap and register set.
1659 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1661 * server.c (gdbserver_version): Update copyright year to 2010.
1662 * gdbreplay.c (gdbreplay_version): Likewise.
1664 2009-12-28 Doug Evans <dje@google.com>
1666 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1667 elf/external.h. Include <elf.h> instead but only if necessary.
1669 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1671 * linux-low.c (linux_remove_process): Remove `detaching'
1672 parameter. Don't release/detach from thread_db here.
1673 (linux_kill): Release/detach from thread_db here, ...
1674 (linux_detach): ... and here, before actually detaching.
1675 (linux_wait_1): ... and here, when a process exits.
1676 * thread-db.c (any_thread_of): New.
1677 (thread_db_free): Switch the current inferior to a thread of the
1680 2009-12-21 Doug Evans <dje@google.com>
1682 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1684 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1685 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1686 warning ifndef __NR_tkill. Move setting of errno there too.
1687 Delete unnecessary resetting of errno after syscall.
1688 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1690 * configure.ac: Check for dladdr.
1691 * config.in: Regenerate.
1692 * configure: Regenerate.
1693 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1694 (try_thread_db_load): Update.
1696 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1698 2009-12-18 Doug Evans <dje@google.com>
1700 * event-loop.c: Include unistd.h if it exists.
1702 * linux-low.c (my_waitpid): Move definition away from being in
1703 between linux_tracefork_child/linux_test_for_tracefork.
1705 * gdb_proc_service.h (psaddr_t): Fix type.
1706 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1707 signature to match glibc.
1709 2009-12-16 Doug Evans <dje@google.com>
1711 * linux-low.c (linux_read_memory): Fix argument to read.
1713 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1715 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1716 events, don't leave current_inferior pointing at null.
1718 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1720 * win32-low.c (LOG): Delete.
1721 (OUTMSG): Output to stderr.
1722 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1723 on compile time LOG macro.
1724 (win32_wait): Fix debug output.
1726 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1728 * win32-low.c (win32_add_one_solib): If the dll name is
1729 "ntdll.dll", prepend the system directory to the dll path.
1731 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1733 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1735 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1736 Vladimir Prus <vladimir@codesourcery.com>
1738 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1739 * configure.ac: Check for __mcoldfire__ and set
1740 gdb_cv_m68k_is_coldfire.
1741 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1742 reg-cf.o and reg-m68k.o.
1743 * configure: Regenerated.
1745 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1747 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1748 Pass it to thread_db_free.
1749 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1750 proper `detaching' argument to linux_remove_process.
1751 * linux-low.h (thread_db_free): Add `detaching' parameter.
1752 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1754 (thread_db_free): Add `detaching' parameter. Only
1755 call td_ta_clear_event if detaching from process.
1757 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1759 * thread-db.c (thread_db_free): Fix typo.
1761 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1764 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1766 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1768 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1769 with an i686 compiler.
1770 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1772 * configure: Rebuilt.
1774 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1778 * server.c (handle_search_memory_1): Correct read_addr initialization
1779 in loop for searching subsequent chunks.
1781 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1783 * configure.ac: New --with-libthread-db option.
1784 * thread-db.c: Allow direct dependence on libthread_db.
1785 (thread_db_free): Adjust.
1786 * config.in: Regenerate.
1787 * configure: Likewise.
1789 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1792 * thread-db.c (attach_thread): New function.
1793 (maybe_attach_thread): Return success/failure.
1794 (find_new_threads_callback): Adjust.
1795 (thread_db_find_new_threads): Loop until no new threads.
1797 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1799 * proc-service.c (ps_lgetregs): Formatting.
1801 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1803 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1804 * configure.ac: Adjust.
1805 * linux-low.h (struct process_info_private): Move members to struct
1807 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1808 * linux-low.c (linux_remove_process): Adjust.
1809 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1810 * server.c (handle_query): Move code ...
1811 (handle_monitor_command): ... here. New function.
1812 * target.h (struct target_ops): New member.
1813 * thread-db.c (struct thread_db): New.
1814 (libthread_db_search_path): New variable.
1815 (thread_db_create_event, thread_db_enable_reporting)
1816 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1817 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1818 (try_thread_db_load_1, dladdr_to_soname): New functions.
1819 (try_thread_db_load, thread_db_load_search): New functions.
1820 (thread_db_init): Search for libthread_db.
1821 (thread_db_free): New function.
1822 (thread_db_handle_monitor_command): Likewise.
1823 * config.in: Regenerate.
1824 * configure: Regenerate.
1826 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1828 * spu-low.c (spu_kill): Wait for inferior to terminate.
1829 Call clear_inferiors.
1830 (spu_detach): Call clear_inferiors.
1832 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1834 * aclocal.m4: Regenerate.
1835 * config.in: Likewise.
1836 * configure: Likewise.
1838 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1840 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1841 (parse_spufs_run): New function.
1842 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1843 (ppc_breakpoint_at): Handle SPU breakpoints.
1845 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1847 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1848 (SPUFS_MAGIC): Define.
1849 (spu_enumerate_spu_ids): New function.
1850 (linux_qxfer_spu): New function.
1851 (linux_target_ops): Install linux_qxfer_spu.
1853 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1855 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1856 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1857 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1858 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1859 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1860 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1861 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1862 (init_registers_powerpc_cell32l): Add prototype.
1863 (init_registers_powerpc_cell64l): Likewise.
1864 (ppc_arch_setup): Detect Cell/B.E. architecture.
1866 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1868 * Makefile.in (datarootdir): New variable.
1870 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1872 * linux-low.c (linux_write_memory): Update debugging output.
1873 * Makefile.in (clean): Add new descriptions.
1874 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1875 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1876 * configure.srv: Add new files for arm*-*-linux*.
1877 * linux-arm-low.c: Add new declarations.
1878 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1879 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1880 (HWCAP_VFPv3D16): New.
1881 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1882 instead of __IWMMXT__.
1883 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1884 (arm_arch_setup): New.
1885 (target_regsets): Remove #ifdef. Add VFP regset.
1886 (the_low_target): Use arm_arch_setup.
1888 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1890 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1891 the main thread again.
1893 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1895 Adding Neutrino gdbserver.
1896 * configure: Regenerated.
1897 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1898 * configure.srv (i[34567]86-*-nto*): New target.
1899 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1900 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1901 (nto_comctrl) [__QNX__]: New function.
1902 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1904 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1906 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1909 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1910 Pedro Alves <pedro@codesourcery.com>
1912 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1913 don't support CONTEXT_EXTENDED_REGISTERS.
1914 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1915 (the_low_target): Install them.
1916 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1917 failing with ERROR_PIPE_NOT_CONNECTED.
1919 2009-06-30 Doug Evans <dje@google.com>
1920 Pierre Muller <muller@ics.u-strasbg.fr>
1922 Add h/w watchpoint support to x86-linux, win32-i386.
1923 * Makefile.in (SFILES): Add i386-low.c
1924 (i386_low_h): Define.
1925 (i386-low.o): Add dependencies.
1926 (linux-x86-low.o): Add i386-low.h dependency.
1927 (win32-i386-low.o): Ditto.
1928 * i386-low.c: New file.
1929 * i386-low.h: New file.
1930 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1931 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1932 * linux-low.c (linux_add_process): Initialize arch_private.
1933 (linux_remove_process): Free arch_private.
1934 (add_lwp): Initialize arch_private.
1935 (delete_lwp): Free arch_private.
1936 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1938 * linux-low.h (process_info_private): New member arch_private.
1939 (lwp_info): New member arch_private.
1940 (linux_target_ops): New members new_process, new_thread,
1942 (ptid_of): New macro.
1943 * linux-x86-low.c: Include stddef.h, i386-low.h.
1944 (arch_process_info): New struct.
1945 (arch_lwp_info): New struct.
1946 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1947 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1948 (i386_dr_low_get_status): New function.
1949 (x86_insert_point, x86_remove_point): New functions.
1950 (x86_stopped_by_watchpoint): New function.
1951 (x86_stopped_data_address): New function.
1952 (x86_linux_new_process, x86_linux_new_thread): New functions.
1953 (x86_linux_prepare_to_resume): New function.
1954 (the_low_target): Add entries for insert_point, remove_point,
1955 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1957 * server.c (debug_hw_points): New global.
1958 (monitor_show_help): Document set debug-hw-points.
1959 (handle_query): Process "set debug-hw-points".
1960 * server.h (debug_hw_points): Declare.
1961 (paddress): Declare.
1962 * utils.c (NUMCELLS, CELLSIZE): New macros.
1963 (get_sell, xsnprintf, paddress): New functions.
1964 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1965 remove_point, stopped_by_watchpoint, stopped_data_address.
1966 * win32-i386-low.c: Include i386-low.h.
1967 (debug_reg_state): Replaces dr.
1968 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1969 (i386_dr_low_get_status): New function.
1970 (i386_insert_point, i386_remove_point): New functions.
1971 (i386_stopped_by_watchpoint): New function.
1972 (i386_stopped_data_address): New function.
1973 (i386_initial_stuff): Update.
1974 (get_thread_context,set_thread_context,i386_thread_added): Update.
1975 (the_low_target): Add entries for insert_point,
1976 remove_point, stopped_by_watchpoint, stopped_data_address.
1977 * win32-low.c (win32_insert_watchpoint): New function.
1978 (win32_remove_watchpoint): New function.
1979 (win32_stopped_by_watchpoint): New function.
1980 (win32_stopped_data_address): New function.
1981 (win32_target_ops): Add entries for insert_watchpoint,
1982 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1983 * win32-low.h (win32_target_ops): New members insert_point,
1984 remove_point, stopped_by_watchpoint, stopped_data_address.
1986 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1988 * server.c (process_serial_event): Re-return unsupported, not
1989 error, if the type isn't recognized. Re-allow supporting only
1990 insert or remove packets. Also call require_running for
1991 breakpoints. Add missing break statement to default case. Tidy.
1992 * target.h (struct target_ops): Rename insert_watchpoint to
1993 insert_point, and remove_watchpoint to remove_point.
1995 * linux-low.h (struct linux_target_ops): Likewise.
1996 * linux-low.c (linux_insert_watchpoint): Rename to ...
1997 (linux_insert_point): ... this. Adjust.
1998 (linux_remove_watchpoint): Rename to ...
1999 (linux_remove_point): ... this. Adjust.
2000 (linux_target_ops): Adjust.
2001 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2002 (cris_insert_point): ... this.
2003 (cris_remove_watchpoint): Rename to ...
2004 (cris_remove_point): ... this.
2005 (the_low_target): Adjust.
2007 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2009 * server.c (handle_v_kill): Pass signal_pid to
2010 kill_inferior if multi_process is zero.
2012 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2014 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2015 * target.h (target_ops): Comment for *_watchpoint to make it clear
2016 the functions can get types '0' and '1'.
2018 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2020 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2021 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2022 * regcache.c (get_regcache): Likewise.
2023 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2024 * win32-low.c (child_fetch_inferior_registers): Remove check for
2027 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2028 Pedro Alves <pedro@codesourcery.com>
2030 * target.h (struct target_ops) <supports_multi_process>: New
2032 (target_supports_multi_process): New.
2033 * server.c (handle_query): Even if GDB reports support, only
2034 enable multi-process if the target also supports it. Report
2035 multi-process support only if the target backend supports it.
2036 * linux-low.c (linux_supports_multi_process): New function.
2037 (linux_target_ops): Install it as target_supports_multi_process
2040 2009-05-24 Doug Evans <dje@google.com>
2042 Global renaming of find_thread_pid to find_thread_ptid.
2043 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2044 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2045 All callers updated.
2047 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2048 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2051 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2052 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2053 (linux_resume_one_lwp): Ditto.
2055 2009-05-23 Doug Evans <dje@google.com>
2057 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2058 from struct inferior_list_entry * to struct lwp_info *.
2059 All callers updated.
2061 2009-05-13 Doug Evans <dje@google.com>
2063 * linux-x86-low.c: Don't include assert.h.
2064 (x86_siginfo_fixup): Use fatal, not assert.
2065 (x86_arch_setup): Fix comment.
2067 2009-05-12 Doug Evans <dje@google.com>
2069 Biarch support for i386/amd64 gdbserver.
2070 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2071 Add linux-x86-low.c.
2072 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2073 (linux-x86-low.o): Add.
2074 * linux-x86-64-low.c: Delete.
2075 * linux-i386-low.c: Delete.
2076 * linux-x86-low.c: New file.
2077 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2079 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2081 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2082 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2083 (linux_child_pid_to_exec_file): New function.
2084 (elf_64_header_p, elf_64_file_p): New functions.
2085 (siginfo_fixup): New function.
2086 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2087 give target a chance to convert layout.
2088 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2089 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2091 2009-05-07 Doug Evans <dje@google.com>
2093 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2094 (regsets_store_inferior_registers): Ditto.
2096 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2100 * linux-low.c (must_set_ptrace_flags): Delete.
2101 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2103 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2104 `lwp->must_set_ptrace_flags' instead.
2105 (linux_wait_for_event_1): Set ptrace options here.
2106 (linux_wait_1): ... not here.
2108 2009-04-30 Doug Evans <dje@google.com>
2110 * inferiors.c (started_inferior_callback): New function.
2111 (attached_inferior_callback): New function.
2112 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2113 * server.c (print_started_pid, print_attached_pid): New functions.
2114 (detach_or_kill_for_exit): New function.
2115 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2116 * server.h (have_started_inferiors_p): Declare.
2117 (have_attached_inferiors_p): Declare.
2119 * inferiors.c (remove_process): Fix memory leak, free process.
2120 * linux-low.c (linux_remove_process): New function.
2121 (linux_kill): Call it instead of remove_process.
2122 (linux_detach, linux_wait_1): Ditto.
2124 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2126 * configure.srv: Add x86 Windows CE target.
2128 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2130 * inferiors.c (get_thread_process): Make global.
2131 * server.h (get_thread_process): Add prototype.
2132 * thread-db.c (find_one_thread): Use get_thread_process
2133 instead of current_process.
2134 (thread_db_get_tls_address): Do not crash if called when
2135 thread layer is not yet initialized.
2137 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2139 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2140 * spu-low.c (current_tid): Rename to ...
2141 (current_ptid): ... this.
2142 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2143 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2144 ptid_get_lwp (current_ptid) instead of current_tid.
2145 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2146 instead of current_tid. Use find_process_pid to verify pid
2147 argument is valid. Pass proper argument to remove_process.
2148 (spu_thread_alive): Compare current_ptid instead of current_tid.
2149 (spu_resume): Likewise.
2151 2009-04-02 Pedro Alves <pedro@codesourcery.com>
2153 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2156 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2158 Implement the multiprocess extensions, and add linux multiprocess
2161 * server.h (ULONGEST): Declare.
2162 (struct ptid, ptid_t): New.
2163 (minus_one_ptid, null_ptid): Declare.
2164 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2165 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2166 (struct inferior_list_entry): Change `id' type from unsigned from
2168 (struct sym_cache, struct breakpoint, struct
2169 process_info_private): Forward declare.
2170 (struct process_info): Declare.
2171 (current_process): Declare.
2172 (all_processes): Declare.
2173 (initialize_inferiors): Declare.
2174 (add_thread): Adjust to use ptid_t.
2175 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2176 (add_process, remove_process, find_thread_pid): Declare.
2177 (find_inferior_id): Adjust to use ptid_t.
2178 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2179 (multi_process): Declare.
2180 (push_event): Adjust to use ptid_t.
2181 (read_ptid, write_ptid): Declare.
2182 (prepare_resume_reply): Adjust to use ptid_t.
2183 (clear_symbol_cache): Declare.
2184 * inferiors.c (all_processes): New.
2185 (null_ptid, minus_one_ptid): New.
2186 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2187 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2188 (add_thread): Change unsigned long to ptid. Remove gdb_id
2190 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2191 (gdb_id_to_thread): Rename to ...
2192 (find_thread_pid): ... this. Change unsigned long to ptid.
2193 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2194 (loaded_dll, pull_pid_from_list): Adjust.
2195 (add_process, remove_process, find_process_pid)
2196 (get_thread_process, current_process, initialize_inferiors): New.
2197 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2198 (struct target_waitstatus) <related_pid>: Ditto.
2199 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2201 (struct target_ops) <join>: Add `pid' argument.
2202 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2203 (struct target_ops) <wait>: Add `ptid' field. Change return type
2205 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2206 (mywait): Add `ptid' argument. Change return type to ptid_t.
2207 (target_pid_to_str): Declare.
2208 * target.c (set_desired_inferior): Adjust to use ptids.
2209 (mywait): Add new `ptid' argument. Adjust.
2210 (target_pid_to_str): New.
2211 * mem-break.h (free_all_breakpoints): Declare.
2212 * mem-break.c (breakpoints): Delelete.
2213 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2214 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2215 to use per-process breakpoint list.
2216 (free_all_breakpoints): New.
2217 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2218 (symbol_cache, all_symbols_looked_up): Delete.
2220 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2222 (prepare_resume_reply): Change ptid argument's type from unsigned
2223 long to ptid_t. Adjust. Implement W;process and X;process.
2224 (free_sym_cache, clear_symbol_cache): New.
2225 (look_up_one_symbol): Adjust to per-process symbol cache. *
2226 * server.c (cont_thread, general_thread, step_thread): Change type
2229 (multi_process): New.
2230 (last_ptid): Change type to ptid_t.
2231 (struct vstop_notif) <ptid>: Change type to ptid_t.
2232 (queue_stop_reply, push_event): Change `ptid' argument's type to
2234 (discard_queued_stop_replies): Add `pid' argument.
2235 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2236 changes. Don't reference the `attached' global.
2237 (attach_inferior): Adjust to mywait interface changes.
2238 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2239 features. Handle and report "multiprocess+". Handle
2241 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2243 (handle_v_kill): New.
2244 (handle_v_stopped): Adjust to use target_pid_to_str.
2245 (handle_v_requests): Allow multiple attaches and runs when
2246 multiprocess extensions are in effect. Handle "vKill".
2247 (myresume): Adjust to use ptids.
2248 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2249 (handle_status): Adjust to discard_queued_stop_replies interface
2251 (first_thread_of, kill_inferior_callback)
2252 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2253 (main): Call initialize_inferiors. Adjust to use ptids, killing
2254 and detaching from all inferiors. Handle multiprocess packet
2256 * linux-low.h: Include gdb_proc_service.h.
2257 (struct process_info_private): New.
2258 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2259 <lwpid_of>: Use ptid_get_lwp.
2260 (get_lwp_thread): Adjust.
2261 (struct lwp_info): Add `dead' member.
2262 (find_lwp_pid): Declare.
2263 * linux-low.c (thread_db_active): Delete.
2264 (new_inferior): Adjust comment.
2265 (inferior_pid): Delete.
2266 (linux_add_process): New.
2267 (handle_extended_wait): Adjust.
2268 (add_lwp): Change unsigned long to ptid.
2269 (linux_create_inferior): Add process to processes table. Adjust
2270 to use ptids. Don't set new_inferior here.
2271 (linux_attach_lwp): Rename to ...
2272 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2273 it. Adjust to use ptids.
2274 (linux_attach_lwp): New.
2275 (linux_attach): Add process to processes table. Don't set
2277 (struct counter): New.
2278 (second_thread_of_pid_p, last_thread_of_process_p): New.
2279 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2281 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2282 processes. Remove process from process table.
2283 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2284 to multiple processes.
2285 (any_thread_of): New.
2286 (linux_detach): Add `pid' argument, and handle it. Remove process
2287 from processes table.
2288 (linux_join): Add `pid' argument. Handle it.
2289 (linux_thread_alive): Change unsighed long argument to ptid_t.
2290 Consider dead lwps as not being alive.
2291 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2292 threads we're not interested in.
2293 (same_lwp, find_lwp_pid): New.
2294 (linux_wait_for_lwp): Change `pid' argument's type from int to
2296 (linux_wait_for_event): Rename to ...
2297 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2298 from int to ptid_t. Adjust.
2299 (linux_wait_for_event): New.
2300 (linux_wait_1): Add `ptid' argument. Change return type to
2301 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2302 that exit from the process table.
2303 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2305 (mark_lwp_dead): New.
2306 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2307 stopping all threads, mark its main lwp as dead.
2308 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2310 (fetch_register, usr_store_inferior_registers)
2311 (regsets_fetch_inferior_registers)
2312 (regsets_store_inferior_registers, linux_read_memory)
2313 (linux_write_memory): Inline `inferior_pid'.
2314 (linux_look_up_symbols): Adjust to use per-process
2316 (linux_request_interrupt): Adjust to use ptids.
2317 (linux_read_auxv): Inline `inferior_pid'.
2318 (initialize_low): Don't reference thread_db_active.
2319 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2320 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2321 (ps_getpid): Return the pid of the current inferior.
2322 * thread-db.c (proc_handle, thread_agent): Delete.
2323 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2325 (find_one_thread): Change argument type to ptid_t. Adjust to
2327 (maybe_attach_thread): Adjust to per-process data and ptids.
2328 (thread_db_find_new_threads): Ditto.
2329 (thread_db_init): Ditto.
2330 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2331 processes table. Adjust to use ptids.
2332 (spu_kill, spu_detach): Adjust interface. Remove process from
2334 (spu_join, spu_thread_alive): Adjust interface.
2335 (spu_wait): Adjust interface. Remove process from processes
2336 table. Adjust to use ptids.
2337 * win32-low.c (current_inferior_tid): Delete.
2338 (current_inferior_ptid): New.
2339 (debug_event_ptid): New.
2340 (thread_rec): Take a ptid. Adjust.
2341 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2342 (child_delete_thread): Ditto.
2343 (do_initial_child_stuff): Add `attached' argument. Add process to
2345 (child_fetch_inferior_registers, child_store_inferior_registers):
2347 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2348 (win32_attach): Pass 1 to do_initial_child_stuff.
2349 (win32_kill): Adjust interface. Remove process from processes
2351 (win32_detach): Ditto.
2352 (win32_join): Adjust interface.
2353 (win32_thread_alive): Take a ptid.
2354 (win32_resume): Adjust to use ptids.
2355 (get_child_debug_event): Ditto.
2356 (win32_wait): Adjust interface. Remove exiting process from
2359 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2361 Non-stop mode support.
2363 * server.h (non_stop): Declare.
2364 (gdb_client_data, handler_func): Declare.
2365 (delete_file_handler, add_file_handler, start_event_loop):
2367 (handle_serial_event, handle_target_event, push_event)
2368 (putpkt_notif): Declare.
2369 * target.h (enum resume_kind): New.
2370 (struct thread_resume): Replace `step' field by `kind' field.
2371 (TARGET_WNOHANG): Define.
2372 (struct target_ops) <wait>: Add `options' argument.
2373 <supports_non_stop, async, start_non_stop>: New fields.
2374 (target_supports_non_stop, target_async): New.
2375 (start_non_stop): Declare.
2376 (mywait): Add `options' argument.
2377 * target.c (mywait): Add `options' argument. Print child exit
2379 (start_non_stop): New.
2380 * server.c (non_stop, own_buf, mem_buf): New globals.
2381 (struct vstop_notif): New.
2382 (notif_queue): New global.
2383 (queue_stop_reply, push_event, discard_queued_stop_replies)
2384 (send_next_stop_reply): New.
2385 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2387 (attach_inferior): In non-stop mode, don't wait for the target
2389 (handle_general_set): Handle QNonStop.
2390 (handle_query): When handling qC, return the current general
2391 thread, instead of the first thread of the list.
2392 (handle_query): If the backend supports non-stop mode, include
2393 QNonStop+ in the qSupported query response.
2394 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2396 (handle_v_attach, handle_v_run): Handle non-stop mode.
2397 (handle_v_stopped): New.
2398 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2399 (myresume): Adjust to use resume_kind. Handle non-stop.
2400 (queue_stop_reply_callback): New.
2401 (handle_status): Handle non-stop mode.
2402 (main): Clear non_stop flag on reconnection. Use the event-loop.
2403 Refactor serial protocol handling from here ...
2404 (process_serial_event): ... to this new function. When GDB
2405 selects any thread, select one here. In non-stop mode, wait until
2406 GDB acks all pending events before exiting.
2407 (handle_serial_event, handle_target_event): New.
2408 * remote-utils.c (remote_open): Install remote_desc in the event
2410 (remote_close): Remove remote_desc from the event loop.
2411 (putpkt_binary): Rename to...
2412 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2413 (putpkt_binary): New as wrapper around putpkt_binary_1.
2414 (putpkt_notif): New.
2415 (prepare_resume_reply): In non-stop mode, don't change the
2417 * event-loop.c: New.
2418 * Makefile.in (OBJ): Add event-loop.o.
2419 (event-loop.o): New rule.
2421 * linux-low.h (pid_of): Moved here.
2423 (get_lwp_thread): Use lwpid_of.
2424 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2425 * linux-low.c (pid_of): Delete.
2426 (inferior_pid): Use lwpid_of.
2427 (linux_event_pipe): New.
2428 (target_is_async_p): New.
2430 (handle_extended_wait): Use lwpid_of.
2431 (add_lwp): Don't set lwpid field.
2432 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2433 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2434 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2435 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2436 first. Adjust to linux_wait_for_event interface changes. Use
2438 (linux_detach): Don't delete the main lwp here.
2439 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2440 (status_pending_p): Don't consider explicitly suspended lwps.
2441 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2442 pointer. Add OPTIONS argument. Change return type to int. Use
2443 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2444 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2445 pointer. Add status pointer argument. Return a pid instead of a
2446 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2447 changes. In non-stop mode, don't switch to a random thread.
2448 (linux_wait): Rename to...
2449 (linux_wait_1): ... this. Add target_options argument, and handle
2450 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2451 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2452 clean exit and signal exit code. Don't stop all threads in
2453 non-stop mode. In all-stop mode, only stop all threads when
2454 reporting a stop to GDB. Handle explicit thread stop requests.
2455 (async_file_flush, async_file_mark): New.
2457 (send_sigstop): Use lwpid_of.
2458 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2459 interface changes. In non-stop mode, don't switch to a random
2461 (linux_resume_one_lwp): Use lwpid_of.
2462 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2463 (linux_resume_one_thread): ... this. Handle resume_stop. In
2464 non-stop mode, don't look for pending flag in all threads.
2465 (resume_status_pending_p): Don't consider explicitly suspended
2467 (my_waitpid): Reimplement. Emulate __WALL.
2468 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2470 (sigchld_handler, linux_supports_non_stop, linux_async)
2471 (linux_start_non_stop): New.
2472 (linux_target_ops): Register linux_supports_non_stop, linux_async
2473 and linux_start_non_stop.
2474 (initialize_low): Install SIGCHLD handler.
2475 * thread-db.c (thread_db_create_event, find_one_thread)
2476 (thread_db_get_tls_address): Use lwpid_of.
2477 * win32-low.c (win32_detach): Adjust to use resume_kind.
2478 (win32_wait): Add `options' argument.
2479 * spu-low.c (spu_resume): Adjust to use resume_kind.
2480 (spu_wait): Add `options' argument.
2482 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2484 Decouple target code from remote protocol.
2486 * target.h (enum target_waitkind): New.
2487 (struct target_waitstatus): New.
2488 (struct target_ops) <wait>: Return an unsigned long. Take a
2489 target_waitstatus pointer instead of a char pointer.
2491 * target.c (mywait): Change prototype to return an unsigned long.
2492 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2493 * server.h (thread_from_wait, old_thread_from_wait): Delete
2495 (prepare_resume_reply): Change prototype to take a
2497 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2498 (last_status, last_ptid): New.
2499 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2500 pid instead of a signal.
2501 (attach_inferior): Remove "status" and "signal" parameters.
2503 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2505 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2506 (handle_v_requests, myresume): Remove "status" and "signal"
2508 (handle_status): New.
2509 (main): Delete local `status'. Adjust.
2510 * remote-utils.c: Include target.h.
2511 (prepare_resume_reply): Change prototype to take a
2512 target_waitstatus. Adjust.
2514 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2516 * spu-low.c (spu_wait): Adjust.
2517 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2519 (win32_wait): Adjust.
2521 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2523 * target.h (struct thread_resume): Delete leave_stopped member.
2524 (struct target_ops): Add a `n' argument to the `resume' callback.
2525 * server.c (start_inferior): Adjust.
2526 (handle_v_cont, myresume): Adjust.
2527 * linux-low.c (check_removed_breakpoint): Adjust to resume
2528 interface change, and to removed leave_stopped field.
2529 (resume_ptr): Delete.
2530 (struct thread_resume_array): New.
2531 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2532 resume interface change.
2533 (linux_continue_one_thread, linux_queue_one_thread)
2534 (resume_status_pending_p): Check if the resume field is NULL
2535 instead of checking the leave_stopped member.
2536 (linux_resume): Adjust to the target resume interface change.
2537 * spu-low.c (spu_resume): Adjust to the target resume interface
2539 * win32-low.c (win32_detach, win32_resume): Ditto.
2541 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2543 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2545 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2547 (linux_continue_one_thread): Only preserve the stepping flag if
2548 there's a pending breakpoint.
2550 2009-03-31 Pedro Alves <pedro@codesourcery.com>
2552 * server.c (main): After the inferior having exited, call
2553 remote_close before exiting gdbserver.
2555 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2557 Fix size of FPSCR in Power 7 processors.
2558 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2559 (PPC_FEATURE_HAS_DFP): New #define.
2560 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2563 2009-03-23 Pedro Alves <pedro@codesourcery.com>
2565 * server.c (handle_query) Whitespace and formatting.
2567 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2569 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2570 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2571 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2572 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2573 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2574 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2575 Makefile.in, configure.ac: Fix whitespace throughout.
2576 * configure: Regenerate.
2578 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2580 * inferiors.c (find_inferior): Make it safe for the callback
2581 function to delete the currently iterated inferior.
2583 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2585 * Makefile.in (linuw_low_h): Move higher.
2586 (thread-db.o): Depend on $(linux_low_h).
2588 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2590 Rename "process" to "lwp" throughout.
2592 * linux-low.c (all_processes): Rename to...
2593 (all_lwps): ... this.
2594 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2595 (add_process): Rename to ...
2596 (add_lwp): ... this. Adjust.
2597 (linux_create_inferior): Adjust.
2598 (linux_attach_lwp): Adjust.
2599 (linux_attach): Adjust.
2600 (linux_kill_one_process): Rename to ...
2601 (linux_kill_one_lwp): ... this. Adjust.
2602 (linux_kill): Adjust.
2603 (linux_detach_one_process): Rename to ...
2604 (linux_detach_one_lwp): ... this. Adjust.
2605 (linux_detach): Adjust.
2606 (check_removed_breakpoint): Adjust.
2607 (status_pending_p): Adjust.
2608 (linux_wait_for_process): Rename to ...
2609 (linux_wait_for_lwp): ... this. Adjust.
2610 (linux_wait_for_event): Adjust.
2611 (send_sigstop): Adjust.
2612 (wait_for_sigstop): Adjust.
2613 (stop_all_processes): Rename to ...
2614 (stop_all_lwps): ... this.
2615 (linux_resume_one_process): Rename to ...
2616 (linux_resume_one_lwp): ... this. Adjust.
2617 (linux_set_resume_request, linux_continue_one_thread)
2618 (linux_queue_one_thread, resume_status_pending_p)
2619 (usr_store_inferior_registers, regsets_store_inferior_registers)
2620 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2622 * linux-low.h (get_process): Rename to ...
2623 (get_lwp): ... this. Adjust.
2624 (get_thread_process): Rename to ...
2625 (get_thread_lwp): ... this. Adjust.
2626 (get_process_thread): Rename to ...
2627 (get_lwp_thread): ... this. Adjust.
2628 (struct process_info): Rename to ...
2629 (struct lwp_info): ... this.
2630 (all_processes): Rename to ...
2631 (all_lwps): ... this.
2632 * proc-service.c (ps_lgetregs): Adjust.
2633 * thread-db.c (thread_db_create_event, find_one_thread)
2634 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2636 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2638 * server.c (handle_query): Handle "qAttached".
2640 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2642 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2643 GPLv3, update license URL.
2645 2009-03-01 Doug Evans <dje@google.com>
2647 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2648 (server_h): Add gdb_signals.h.
2649 (signals.o): Update.
2650 * server.h (target_signal_from_host,target_signal_to_host_p)
2651 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2653 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2655 * remote-utils.c (getpkt): Also generate remote-debug
2656 information if noack_mode is set.
2658 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2660 * server.c (handle_query): Report qXfer:siginfo:read and
2661 qXfer:siginfo:write as supported and handle them.
2662 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2663 * linux-low.c (linux_xfer_siginfo): New.
2664 (linux_target_ops): Set it.
2666 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2668 * server.c (gdbserver_usage): Mention --remote-debug.
2669 (main): Accept '--remote-debug' switch.
2671 2009-01-18 Doug Evans <dje@google.com>
2673 * regcache.c (new_register_cache): No need to check result of xcalloc.
2674 * server.c (handle_search_memory): Back out calls to xmalloc,
2675 result is checked and error is returned to user upon failure.
2676 (handle_query): Ditto. Add more checks for result of malloc.
2677 (handle_v_cont): Check result of malloc, report error back to
2679 (handle_v_run): Ditto. Call freeargv.
2680 * server.h (freeargv): Declare.
2681 * utils.c (freeargv): New fn.
2683 2009-01-15 Doug Evans <dje@google.com>
2685 * gdbreplay.c (perror_with_name): Make arg const char *.
2686 * server.h (target_signal_to_name): Make return type const char *.
2687 * thread-db.c (thread_db_err_str): Make return type const char *.
2688 * utils.c (perror_with_name): Make arg const char *.
2690 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2692 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2693 when handling a EXIT_PROCESS_DEBUG_EVENT.
2695 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2697 * gdbreplay.c (gdbreplay_version): Update copyright year.
2698 * server.c (gdbserver_version): Likewise.
2700 2009-01-05 Doug Evans <dje@google.com>
2702 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2703 (handle_extended_wait): Improve comment.
2705 2008-12-13 Doug Evans <dje@google.com>
2707 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2708 * server.h (ATTR_MALLOC): New macro.
2709 (xmalloc,xcalloc,xstrdup): Declare.
2710 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2711 * inferiors.c: Ditto.
2712 * linux-low.c: Ditto.
2713 * mem-break.c: Ditto.
2714 * regcache.c: Ditto.
2715 * remote-utils.c: Ditto.
2718 * win32-low.c: Ditto.
2720 2008-12-12 Doug Evans <dje@google.com>
2722 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2723 in debugging printf.
2725 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2727 2008-12-09 Doug Evans <dje@google.com>
2729 * linux-low.h (struct process_info): Delete member tid, unused.
2730 * thread-db.c (find_one_thread): Update.
2731 (maybe_attach_thread): Update.
2733 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2735 * target.h (struct target_ops): Add qxfer_osdata member.
2736 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2738 (linux_qxfer_osdata): New functions.
2739 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2741 * server.c (handle_query): Handle "qXfer:osdata:read:".
2742 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2743 (buffer_xml_printf): New functions.
2744 * server.h (struct buffer): New.
2745 (buffer_grow_str, buffer_grow_str0): New macros.
2746 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2747 (buffer_xml_printf): Declare.
2749 2008-11-24 Doug Evans <dje@google.com>
2751 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2753 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2755 * server.c (handle_v_run): Always use the supplied argument list.
2757 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2759 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2760 (xtensa_regmap_table): Add entry for scompare1.
2762 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2764 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2765 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2766 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2767 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2768 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2769 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2770 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2771 XML target descriptions.
2772 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2773 when inferior is running on an ISA 2.05 or later processor. Add
2774 special case to return offset for full 64-bit slot of FPSCR when
2777 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2779 * Makefile.in (SFILES, clean): Added sparc64 files.
2780 (reg-sparc64.o, reg-sparc64.c): New.
2781 * configure.srv (sparc*-*-linux*): New configuration.
2782 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2783 syscall arguments for SPARC.
2784 (regsets_store_inferior_registers): Likewise.
2785 * linux-sparc-low.c: New file.
2787 2008-10-21 Doug Evans <dje@google.com>
2789 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2790 (READLINE_DIR,READLINE_DEP): Delete.
2791 (INTERNAL_CFLAGS): Update.
2792 (LINTFLAGS): Update.
2794 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2796 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2797 whole argv from the last run, not just argv[0].
2799 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2801 * regcache.c (new_register_cache): Return NULL if the register
2802 cache size isn't known yet.
2803 (free_register_cache): Avoid dereferencing a NULL regcache.
2805 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2807 * configure.srv: Merge MIPS and MIPS64.
2809 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2811 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2813 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2815 * Makefile.in: Add required vsx dependencies.
2817 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2818 Declare init_registers_powerpc_vsx32l.
2819 Declare init_registers_powerpc_vsx64l.
2820 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2821 (ppc_arch_setup): Check for VSX in hwcap.
2822 (ppc_fill_vsxregset): New function.
2823 (ppc_store_vsxregset): New function.
2824 Add new VSX entry in regset_info target_regsets.
2826 * configure.srv: Add new VSX dependencies.
2828 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2830 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2831 (remote_open): Set or clear transport_is_reliable.
2832 (putpkt_binary): Don't expect acks in noack mode.
2833 (getpkt): Don't send ack/nac in noack mode.
2834 * server.c (handle_general_set): Handle QStartNoAckMode.
2835 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2837 (main): Reset noack_mode on every connection.
2838 * server.h (noack_mode): Declare.
2840 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2842 * Makefile.in (GDBREPLAY_OBS): New variable.
2843 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2845 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2846 Daniel Jacobowitz <dan@codesourcery.com>
2848 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2849 (usr_store_inferior_registers): Likewise.
2850 (regsets_store_inferior_registers): Likewise.
2852 2008-07-31 Rolf Jansen <rj@surtec.com>
2853 Pedro Alves <pedro@codesourcery.com>
2855 * configure.ac: Check for memmem declaration.
2856 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2857 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2858 (disable_packet_qfThreadInfo): Unconditionally compile.
2859 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2860 * configure, config.in: Regenerate.
2862 2008-07-28 Doug Kwan <dougkwan@google.com>
2864 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2865 (linux_write_memory): Remove declaration of errno.
2867 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2869 * linux-low.c (handle_extended_wait): Do not use "status"
2870 variable uninitialized.
2872 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2874 * server.c (handle_v_attach): Inhibit reporting dll changes.
2876 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2878 * remote-utils.c (prepare_resume_reply): If requested, don't
2879 output "thread:TID" in the T stop reply.
2881 * server.c (disable_packet_vCont, disable_packet_Tthread)
2882 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2883 (handle_query): If requested, disable support for qC, qfThreadInfo
2885 (handle_v_requests): If requested, disable support for vCont.
2886 (gdbserver_show_disableable): New.
2887 (main): Handle --disable-packet and --disable-packet=LIST.
2889 * server.h (disable_packet_vCont, disable_packet_Tthread)
2890 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2892 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2894 * server.c (gdbserver_usage): Mention --version.
2896 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2898 * Makefile.in (gdbreplay.o): New rule.
2900 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2902 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2903 message, not gdbserver.
2905 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2906 Nathan Sidwell <nathan@codesourcery.com>
2907 Joseph Myers <joseph@codesourcery.com>
2909 * acinclude.m4: Include ../../config/acx.m4.
2910 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2911 * configure, config.in: Regenerate.
2912 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2913 * server.c (gdbserver_version): Print PKGVERSION.
2914 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2915 (main): Adjust gdbserver_usage calls.
2916 * gdbreplay.c (version, host_name): Add declarations.
2917 (gdbreplay_version, gdbreplay_usage): New.
2918 (main): Accept --version and --help options.
2920 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2922 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2923 (arm_breakpoint_at): Handle Thumb.
2924 (the_low_target): Add comment.
2926 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2928 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2930 2008-05-09 Doug Evans <dje@google.com>
2932 * server.h (decode_search_memory_packet): Declare.
2933 * remote-utils.c (decode_search_memory_packet): New fn.
2934 * server.c (handle_search_memory_1): New fn.
2935 (handle_search_memory): New fn.
2936 (handle_query): Process qSearch:memory packets.
2938 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2940 * regcache.c (registers_length): Remove.
2941 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2942 full register packet.
2943 * regcache.h (registers_length): Remove prototype.
2944 * server.h (PBUFSIZ): Define to 16384.
2946 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2948 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2949 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2950 powerpc-64l.o, and powerpc-altivec64l.o.
2951 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2952 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2953 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2954 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2955 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2958 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2959 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2960 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2961 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2962 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2963 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2964 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2965 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2966 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2967 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2970 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2971 (init_registers_powerpc_32l): ... this new prototype.
2972 (init_registers_powerpc_32): Remove, replace by ...
2973 (init_registers_powerpc_altivec32l): ... this new prototype.
2974 (init_registers_powerpc_e500): Remove, replace by ...
2975 (init_registers_powerpc_e500l): ... this new prototype.
2976 (init_registers_ppc64): Remove, replace by ...
2977 (init_registers_powerpc_64l): ... this new prototype.
2978 (init_registers_powerpc_64): Remove, replace by ...
2979 (init_registers_powerpc_altivec64l): ... this new prototype.
2980 (ppc_num_regs): Set to 73.
2981 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2982 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2983 (ppc_cannot_store_register): Handle orig_r3 and trap.
2984 (ppc_arch_setup): Update init_registers_... calls.
2985 (ppc_fill_gregset): Handle orig_r3 and trap.
2987 * inferiors.c (clear_inferiors): Reset current_inferior.
2989 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2991 * acinclude.m4: Add override.m4.
2992 * configure: Regenerate.
2994 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2996 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2997 initial call to init_register_ppc64.
2999 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3001 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3002 powerpc*-*-linux* case.
3003 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3005 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3007 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3008 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3010 * linux-ppc-low.c: Include <elf.h>.
3011 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3012 (ppc_hwcap): New global variable.
3013 (ppc_regmap): Remove __SPE__ #ifdef sections.
3014 (ppc_regmap_e500): New global variable.
3015 (ppc_cannot_store_register): Update __SPE__ special case.
3016 (ppc_get_hwcap): New function.
3017 (ppc_arch_setup): Use it to determine whether inferior supports
3018 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3019 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3020 Do not access registers if target does not support AltiVec.
3021 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3022 Do not access registers if target does not support SPE.
3023 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3025 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3027 * linux-low.c (disabled_regsets, num_regsets): New.
3028 (use_regsets_p): Delete.
3029 (linux_wait_for_process): Clear disabled_regsets.
3030 (regsets_fetch_inferior_registers): Check and set it.
3031 (regsets_store_inferior_registers): Likewise.
3032 (linux_fetch_registers, linux_store_registers): Do not use
3034 (initialize_low): Allocate disabled_regsets.
3036 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3038 * Makefile.in (LIBOBJS): New.
3040 (memmem.o): New rule.
3041 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3042 * configure: Regenerated.
3044 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3046 * server.c (handle_query): Never return "unsupported" for
3047 qXfer:features:read queries.
3049 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3051 * server.c (get_features_xml): Fix inverted condition.
3052 (handle_query): Always support qXfer:feature:read.
3054 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3056 * server.c (wrapper_argv): New.
3057 (start_inferior): Handle wrapper_argv. If set, expect an extra
3059 (gdbserver_usage): Document --wrapper.
3060 (main): Parse --wrapper.
3062 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3064 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3065 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3066 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3067 (ppc_set_pc): Likewise.
3068 (ppc_arch_setup): New function.
3069 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3070 of collect_register.
3071 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3073 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3075 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3076 instead of linux-ppc64-low.o.
3077 * linux-ppc64-low.c: Remove file.
3078 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3079 (linux-ppc64-low.o): Remove rule.
3081 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3082 (init_registers_powerpc_64): Likewise.
3083 (ppc_regmap): Conditionally define depending on __powerpc64__.
3084 (ppc_cannot_store_register): Do not special-case "fpscr" when
3085 compiled on __powerpc64__.
3086 (ppc_collect_ptrace_register): New function.
3087 (ppc_supply_ptrace_register): New function.
3088 (ppc_breakpoint): Change type to "unsigned int".
3089 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3090 (the_low_target): Conditionally provide initializers for the
3091 arch_setup member depending on __powerpc64__. Install
3092 collect_ptrace_register and supply_ptrace_register members.
3094 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3096 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3097 * server.c (gdbserver_xmltarget): Define.
3098 (get_features_xml): Use it to replace "target.xml" and arch_string.
3100 * configure.srv: Remove srv_xmltarget. Add XML files that were
3101 mentioned there to srv_xmlfiles instead. Remove conditional tests
3102 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3103 srv_xmlfiles and srv_regobj to include all possible choices.
3104 * configure.ac (srv_xmltarget): Remove.
3105 (srv_xmlfiles): Do not add "target.xml".
3106 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3107 checks for supplementary target information.
3108 * configure: Regenerate.
3109 * Makefile.in (XML_TARGET): Remove.
3110 (target.xml): Remove rule.
3111 (clean): Do not clean up target.xml.
3112 (.PRECIOUS): Do not mention target.xml.
3114 * target.h (struct target_ops): Remove arch_string member.
3115 * linux-low.c (linux_arch_string): Remove.
3116 (linux_target_ops): Remove arch_string initializer.
3117 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3118 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3119 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3120 * spu-low.c (spu_arch_string): Remove.
3121 (spu_target_ops): Remove arch_string initializer.
3122 * win32-low.c (win32_arch_string): Remove.
3123 (win32_target_ops): Remove arch_string initializer.
3124 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3125 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3126 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3128 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3130 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3131 by collect_ptrace_register and supply_ptrace_register hooks.
3132 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3133 instead of checking for the_low_target.left_pad_xfer.
3134 (usr_store_inferior_registers): Use collect_ptrace_register callback
3135 instead of checking for the_low_target.left_pad_xfer.
3137 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3138 (s390_supply_ptrace_register): Likewise.
3139 (s390_fill_gregset): Call s390_collect_ptrace_register.
3140 (the_low_target): Update.
3142 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3143 (ppc_supply_ptrace_register): Likewise.
3144 (the_low_target): Update.
3146 * linux-i386-low.c (the_low_target): Update.
3147 * linux-x86-64-low.c (the_low_target): Update.
3149 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3151 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3152 reg-s390.o and reg-s390x.o.
3154 * linux-low.c (new_inferior): New global variable.
3155 (linux_create_inferior, linux_attach): Set it.
3156 (linux_wait_for_process): Call the_low_target.arch_setup after the
3157 target has stopped for the first time.
3158 (initialize_low): Do not call the_low_target.arch_setup.
3160 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3161 (s390_set_pc): Likewise.
3162 (s390_arch_setup): New function.
3163 (the_low_target): Use s390_arch_setup as arch_setup routine.
3165 * regcache.c (realloc_register_cache): New function.
3166 (set_register_cache): Call it for each existing regcache.
3168 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3170 * server.h (init_registers): Remove prototype.
3172 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3173 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3174 instead of init_registers ().
3175 * linux-arm-low.c (init_registers_arm): Add prototype.
3176 (init_registers_arm_with_iwmmxt): Likewise.
3177 (the_low_target): Add initializer for arch_setup field.
3178 * linux-cris-low.c (init_registers_cris): Add prototype.
3179 (the_low_target): Add initializer for arch_setup field.
3180 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3181 (the_low_target): Add initializer for arch_setup field.
3182 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3183 (the_low_target): Add initializer for arch_setup field.
3184 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3185 (the_low_target): Add initializer for arch_setup field.
3186 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3187 (the_low_target): Add initializer for arch_setup field.
3188 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3189 (the_low_target): Add initializer for arch_setup field.
3190 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3191 (init_registers_mips64_linux): Likewise.
3192 (the_low_target): Add initializer for arch_setup field.
3193 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3194 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3195 (the_low_target): Add initializer for arch_setup field.
3196 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3197 (init_registers_powerpc_64): Likewise.
3198 (the_low_target): Add initializer for arch_setup field.
3199 * linux-s390-low.c (init_registers_s390): Add prototype.
3200 (init_registers_s390x): Likewise.
3201 (the_low_target): Add initializer for arch_setup field.
3202 * linux-sh-low.c (init_registers_sh): Add prototype.
3203 (the_low_target): Add initializer for arch_setup field.
3204 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3205 (the_low_target): Add initializer for arch_setup field.
3206 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3207 (the_low_target): Add initializer for arch_setup field.
3209 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3210 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3211 instead of init_registers ().
3212 * win32-arm-low.c (init_registers_arm): Add prototype.
3213 (the_low_target): Add initializer for arch_setup field.
3214 * win32-i386-low.c (init_registers_i386): Add prototype.
3215 (the_low_target): Add initializer for arch_setup field.
3217 * spu-low.c (init_registers_spu): Add prototype.
3218 (initialize_low): Call initialie_registers_spu () instead of
3219 initialize_registers ().
3221 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3223 * server.c (handle_v_requests): When handling the vRun and vAttach
3224 packets, if already debugging a process, don't kill it. Return an
3227 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3229 * server.c (handle_query): Correct length check.
3231 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3233 * win32-low.c (do_initial_child_stuff): Add process handle
3234 parameter. Set current_process_handle and current_process_id from the
3235 parameters. Clear globals.
3236 (win32_create_inferior): Don't set current_process_handle and
3237 current_process_id here. Instead pass them on the call to
3238 do_initial_child_stuff.
3239 (win32_attach): Likewise.
3240 (win32_clear_inferiors): New.
3241 (win32_kill): Don't close the current process handle or the
3242 current thread handle here. Instead call win32_clear_inferiors.
3243 (win32_detach): Don't open a new handle to the process. Call
3244 win32_clear_inferiors.
3245 (win32_join): Don't rely on current_process_handle; open a new
3246 handle using the process id.
3247 (win32_wait): Call win32_clear_inferiors when the inferior process
3250 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3252 * server.c (monitor_show_help): Add "exit".
3254 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3256 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3257 (clean): Add reg-xtensa.c.
3258 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3259 * configure.srv (xtensa*-*-linux*) New target.
3260 * linux-xtensa-low.c: New.
3261 * xtensa-xtregs.c: New.
3263 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3265 * hostio.c: Don't include errno.h.
3266 (errno_to_fileio_errno): Move to hostio-errno.
3267 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3268 error number outputting to the target->hostio_last_error callback.
3269 (hostio_packet_error): Use FILEIO_EINVAL directly.
3270 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3271 calls to hostio_error.
3272 * hostio-errno.c: New.
3273 * server.h (hostio_last_error_from_errno): Declare.
3274 * target.h (target_ops): Add hostio_last_error member.
3275 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3276 as hostio_last_error handler.
3277 * spu-low.c (spu_target_ops): Likewise.
3278 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3279 (wince_hostio_last_error): New functions.
3280 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3281 as hostio_last_error handler.
3282 (win32_target_ops) [!_WIN32_WCE]: Register
3283 hostio_last_error_from_errno as hostio_last_error handler.
3284 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3285 (hostio-errno.o): New rule.
3286 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3287 * configure.srv (srv_hostio_err_objs): New variable. Default to
3289 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3290 * configure: Regenerate.
3292 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3294 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3295 (linux_kill, linux_detach): Clean up the process list.
3296 * remote-utils.c (remote_open): Improve port number parsing.
3297 (putpkt_binary, input_interrupt): Only send interrupts if the target
3299 * server.c (extended_protocol): Make static.
3300 (attached): Define earlier.
3301 (exit_requested, response_needed, program_argv): New variables.
3302 (target_running): New.
3303 (start_inferior): Clear attached here.
3304 (attach_inferior): Set attached here.
3305 (require_running): Define.
3306 (handle_query): Use require_running and target_running. Implement
3308 (handle_v_attach, handle_v_run): New.
3309 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3310 (gdbserver_usage): Update.
3311 (main): Redo argument parsing. Handle --debug and --multi. Handle
3312 --attach along with other options or after the port. Save
3313 program_argv. Support no initial program. Resynchronize
3314 communication with GDB after an error. Handle "monitor exit".
3315 Use require_running and target_running. Always allow the extended
3316 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3317 restart in extended mode.
3318 * README: Refer to the GDB manual. Update --attach usage.
3320 2007-12-20 Andreas Schwab <schwab@suse.de>
3322 * linux-low.c (STACK_SIZE): Define.
3323 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3324 (linux_test_for_tracefork): Likewise.
3326 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3328 * linux-low.c (linux_wait_for_event): Update messages. Do not
3329 reinsert auto-delete breakpoints.
3330 * mem-break.c (struct breakpoint): Change return type of handler to
3332 (set_breakpoint_at): Update handler type.
3333 (reinsert_breakpoint_handler): Return 1 instead of calling
3335 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3337 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3338 * mem-break.h (set_breakpoint_at): Update handler type.
3339 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3340 * win32-low.c (auto_delete_breakpoint): New.
3341 (get_child_debug_event): Use it.
3343 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3345 * configure.ac: Check for pread and pwrite.
3346 * hostio.c (handle_pread): Fall back to lseek and read.
3347 (handle_pwrite): Fall back to lseek and write.
3348 * config.in, configure: Regenerated.
3350 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3352 * server.c (myresume): Add own_buf argument.
3353 (main): Update calls.
3355 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3357 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3358 * remote-utils.c (remote_open): Do not call disable_async_io.
3359 (block_async_io): Delete.
3360 (unblock_async_io): Make static.
3361 (initialize_async_io): New.
3362 * server.c (handle_v_cont): Handle async I/O here.
3363 (myresume): Likewise. Move other common resume tasks here...
3364 (main): ... from here. Call initialize_async_io. Disable async
3365 I/O before the main loop.
3366 * server.h (initialize_async_io): Declare.
3367 (block_async_io, unblock_async_io): Delete prototypes.
3368 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3370 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3372 * remote-utils.c (readchar): Allow binary data in received messages.
3374 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3376 * win32-low.c (attaching): New global.
3377 (win32_create_inferior): Clear the `attaching' global.
3378 (win32_attach): Set the `attaching' global.
3379 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3380 attaching. Only set a breakpoint at the entry point if not
3383 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3385 * server.c (main): Don't report dll events on the initial
3386 connection on attaches.
3388 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3390 * server.c (main): Relax numerical bases supported for the pid of
3391 the --attach command line argument.
3393 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3395 * win32-low.c (win32_attach): Call OpenProcess before
3396 DebugActiveProcess, not after. Add last error output to error
3399 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3401 * win32-low.c (win32_get_thread_context)
3402 (win32_set_thread_context): New functions.
3403 (thread_rec): Use win32_get_thread_context.
3404 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3405 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3408 2007-12-03 Leo Zayas
3409 Pedro Alves <pedro_alves@portugalmail.pt>
3411 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3413 (child_add_thread): Minor cleanup.
3414 (child_continue): Resume artificially suspended threads before
3415 calling ContinueDebugEvent.
3416 (suspend_one_thread): New.
3417 (fake_breakpoint_event): New.
3418 (get_child_debug_event): Change return type to int. Check here if
3419 gdb sent an interrupt request. If a soft interrupt was requested,
3420 fake a breakpoint event. Return 0 if there is no event to handle,
3422 (win32_wait): Don't check here if gdb sent an interrupt request.
3423 Ensure there is a valid event to handle.
3424 (win32_request_interrupt): Add soft interruption method as last
3427 2007-12-03 Leo Zayas
3428 Pedro Alves <pedro_alves@portugalmail.pt>
3430 * win32-low.h (win32_thread_info): Add descriptions to the
3431 structure members. Replace `suspend_count' counter by a
3433 * win32-low.c (thread_rec): Update condition of when to get the
3434 context from the inferior. Rely on ContextFlags being set if it
3435 has already been retrieved. Only suspend the inferior thread if
3436 we haven't already. Warn if that fails.
3437 (continue_one_thread): s/suspend_count/suspended/. Only call
3438 ResumeThread once. Warn if that fails.
3440 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3442 * win32-low.c (win32_wait): Don't read from the inferior when it
3445 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3447 * Makefile.in (win32_low_h): New variable.
3448 (win32-low.o): Add dependency on $(win32_low_h).
3449 (win32-arm-low.o, win32-i386-low.o): New rules.
3451 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3453 * hostio.c: Correct copyright year.
3455 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3457 * Makefile.in (OBS): Add hostio.o.
3458 (hostio.o): New rule.
3459 * server.h (handle_vFile): Declare.
3460 * hostio.c: New file.
3461 * server.c (handle_v_requests): Take packet_len and new_packet_len
3462 for binary packets. Call handle_vFile.
3463 (main): Update call to handle_v_requests.
3465 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3467 * linux-low.c: Include <sched.h>.
3469 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3471 * linux-low.c (linux_tracefork_grandchild): New.
3472 (linux_tracefork_child): Use clone.
3473 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3475 2007-10-31 Joel Brobecker <brobecker@adacore.com>
3477 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3479 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3481 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3483 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3485 * inferiors.c (change_inferior_id): Delete.
3486 (add_pid_to_list, pull_pid_from_list): New.
3487 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3488 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3489 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3490 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3491 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3492 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3493 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3494 (using_threads): Always set to 1.
3495 (handle_extended_wait): New.
3496 (add_process): Do not set TID.
3497 (linux_create_inferior): Set must_set_ptrace_flags.
3498 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3499 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3500 (linux_thread_alive): Rename TID argument to LWPID.
3501 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3502 (linux_wait_for_event): Do not use TID or check using_threads. Update
3503 call to dead_thread_notify. Call handle_extended_wait.
3504 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3505 (send_sigstop): Delete sigstop_sent.
3506 (wait_for_sigstop): Avoid TID.
3507 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3508 (linux_test_for_tracefork): New.
3509 (linux_lookup_signals): Use thread_db_active and
3510 linux_supports_tracefork_flag.
3511 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3512 * linux-low.h (get_process_thread): Avoid TID.
3513 (struct process_ifo): Move thread_known and tid to the end. Remove
3515 (linux_attach_lwp, thread_db_init): Update prototypes.
3516 * server.h (change_inferior_id): Delete prototype.
3517 (add_pid_to_list, pull_pid_from_list): New prototypes.
3518 * thread-db.c (thread_db_use_events): New.
3519 (find_first_thread): Rename to...
3520 (find_one_thread): ...this. Update callers and messages. Do not
3521 call fatal. Check thread_db_use_events. Do not call
3522 change_inferior_id or new_thread_notify.
3523 (maybe_attach_thread): Update. Do not call new_thread_notify.
3524 (thread_db_init): Set thread_db_use_events. Check use_events.
3525 * utils.c (fatal, warning): Correct message prefix.
3527 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3529 * Makefile.in (clean): Remove new files.
3530 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3531 (powerpc-64.o, powerpc-64.c): New rules.
3532 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3533 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3535 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3537 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3538 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3539 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3540 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3541 (target_regsets): Add AltiVec and SPE register sets.
3542 * configure.ac: Check for AltiVec and SPE.
3543 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3544 (ppc_fill_vrregset, ppc_store_vrregset): New.
3545 (target_regsets): Add AltiVec register set.
3546 * configure: Regenerated.
3548 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3550 * linux-low.c (O_LARGEFILE): Define.
3551 (linux_read_memory): Use /proc/PID/mem.
3552 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3553 * configure, config.in: Regenerated.
3555 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3557 * linux-low.c (linux_wait_for_event): Do not pass signals while
3560 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3562 * win32-low.c (create_process): New.
3563 (win32_create_inferior): Use create_process instead of
3564 CreateProcess. If create_process failed retry appending an ".exe"
3565 suffix. Store the GetLastError result immediatelly after
3566 create_process calls and use it on the call to error.
3568 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3570 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3572 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3574 * configure.ac: Switch license to GPLv3.
3576 2007-08-01 Michael Snyder <msnyder@access-company.com>
3578 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3580 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3582 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3584 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3585 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3586 CloseToolhelp32Snapshot.
3587 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3588 CloseToolhelp32Snapshot.
3590 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3592 * server.c (main): Check for inferior exit before main loop.
3594 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3596 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3597 instead of on tmp_desc.
3599 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3600 Daniel Jacobowitz <dan@codesourcery.com>
3602 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3603 (add_thread): Minor cleanups.
3604 (clear_inferiors): Move lower in the file. Clear the DLL
3606 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3607 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3608 (xml_escape_text): New.
3609 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3611 (handle_v_cont): Report errors.
3612 (gdbserver_version): Update.
3613 (main): Correct size of own_buf. Do not report initial DLL events.
3614 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3615 (unloaded_dll, xml_escape_text): New.
3616 * win32-low.c (enum target_waitkind): Update comments.
3617 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3618 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3619 (win32_EnumProcessModules, win32_GetModuleInformation)
3620 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3621 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3622 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3623 (win32_Module32First, win32_Module32Next, load_toolhelp)
3624 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3625 (get_child_debug_event): Handle DLL events.
3626 (win32_wait): Likewise.
3628 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3630 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3631 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3633 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3635 * win32-low.c (handle_output_debug_string): Ignore event if not
3638 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3640 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3642 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3644 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3646 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3648 * inferiors.c (change_inferior_id): Add comment.
3649 * linux-low.c (check_removed_breakpoint): Add an early
3650 prototype. Improve debug output.
3651 (linux_attach): Doc update.
3652 (linux_detach_one_process, linux_detach): Clean up before releasing
3654 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3655 * linux-low.h (struct process_info): Doc improvement.
3656 * mem-break.c (delete_all_breakpoints): New.
3657 * mem-break.h (delete_all_breakpoints): New prototype.
3658 * thread-db.c (find_first_thread): New.
3659 (thread_db_create_event): Call it instead of
3660 thread_db_find_new_threads. Clean up unused variables.
3661 (maybe_attach_thread): Remove first thread handling.
3662 (thread_db_find_new_threads): Use find_first_thread.
3663 (thread_db_get_tls_address): Likewise.
3665 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3667 * thread-db.c (thread_db_find_new_threads): Add prototype.
3668 (thread_db_create_event): Check for the main thread before adding
3670 (maybe_attach_thread): Only enable event reporting if TID == 0.
3671 (thread_db_get_tls_address): Check for new threads.
3673 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3675 * linux-low.c (linux_create_inferior): Try execv before execvp.
3676 * spu-low.c (spu_create_inferior): Likewise.
3678 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3680 * linux-low.c (linux_create_inferior): Change execv to execvp.
3681 * spu-low.c (spu_create_inferior): Likewies.
3683 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3685 * Makefile.in (clean): Clean new files instead of deleted ones.
3686 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3687 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3689 * configure.srv: Specify XML files and new regformats for MIPS and
3691 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3692 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3693 an entry for the restart register.
3694 (mips_cannot_fetch_register, mips_cannot_store_register)
3695 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3696 register names to match the XML descriptions.
3697 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3698 restart register instead of $0.
3700 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3701 Markus Deuling <deuling@de.ibm.com>
3703 * remote-utils.c (decode_xfer_write): New function.
3704 * server.h (decode_xfer_write): Add prototype.
3705 * server.c (handle_query): Add PACKET_LEN argument. Support
3706 qXfer:spu:read and qXfer:spu:write packets.
3707 (main): Pass packet_len to handle_query.
3708 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3709 * target.h (target_ops): Add qxfer_spu.
3711 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3713 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3714 accessing non-seekable spufs files.
3716 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3718 * server.c (handle_query): Add reply for qC packet.
3720 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3721 Leo Zayas <lerele@champenstudios@com>
3723 * server.h (check_remote_input_interrupt_request): New function.
3724 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3725 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3726 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3727 (check_remote_input_interrupt_request): New function.
3728 * server.h (check_remote_input_interrupt_request): Declare.
3729 * win32-low.c (winapi_DebugBreakProcess,
3730 winapi_GenerateConsoleCtrlEvent): New typedefs.
3731 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3733 (win32_wait): Check for remote interrupt request
3734 with check_remote_input_interrupt_request.
3735 (win32_request_interrupt): New function.
3736 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3738 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3740 * win32-low.c (debug_registers_changed,
3741 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3742 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3743 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3744 (thread_rec): Get context using the low target.
3745 (child_add_thread): Call thread_added on the low target,
3746 which does the same thing.
3748 (do_initial_child_stuff): Remove debug registers references.
3749 Set context using the low target. Resume threads after
3750 setting the contexts.
3751 (child_continue): Remove dead variable. Remove debug
3752 registers references.
3753 (child_fetch_inferior_registers): Go through the low target.
3754 (do_child_store_inferior_registers): Remove.
3755 (child_store_inferior_registers): Go through the low target.
3756 (win32_resume): Remove debug registers references.
3757 Set context using the low target.
3758 (handle_exception): Change return type to void. Don't record
3759 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3760 first chance exception.
3761 (get_child_debug_event): Change return type to void. Remove
3762 goto loop. Always return after waiting for debug event.
3763 (win32_wait): Convert to switch statement. Handle spurious
3766 * win32-i386-low.c (debug_registers_changed,
3767 debug_registers_used): New.
3768 (initial_stuff): Rename to ...
3769 (i386_initial_stuff): ... this. Clear debug registers
3771 (store_debug_registers): Delete.
3772 (i386_get_thread_context): New.
3773 (load_debug_registers): Delete.
3774 (i386_set_thread_context): New.
3775 (i386_thread_added): New.
3776 (single_step): Rename to ...
3777 (i386_single_step): ... this.
3778 (do_fetch_inferior_registers): Rename to ...
3779 (i386_fetch_inferior_register): ... this.
3780 (i386_store_inferior_register): New.
3781 (the_low_target): Adapt to new interface.
3783 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3784 (arm_get_thread_context): New.
3785 (arm_set_thread_context): New.
3787 (do_fetch_inferior_registers): Rename to ...
3788 (arm_fetch_inferior_register): ... this.
3789 (arm_store_inferior_register): New.
3790 (arm_wince_breakpoint): Reimplement as unsigned long.
3791 (arm_wince_breakpoint_len): Define.
3792 (the_low_target): Adapt to new interface.
3794 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3795 load_debug_registers. Add get_thread_context, set_thread_context,
3796 thread_added and store_inferior_register. Rename
3797 fetch_inferior_registers to fetch_inferior_register.
3798 (regptr): Remove declaration.
3800 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3802 * linux-low.c (linux_detach): Change return type to int. Return 0.
3803 * spu-low.c (spu_detach): Likewise.
3805 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3807 * target.h (target_ops): Change return type of detach to int.
3809 (join_inferior): New.
3810 * server.c (main): Don't skip detach support on mingw32.
3811 If the inferior doesn't support detaching return error.
3812 Call join_inferior instead of using waitpid.
3813 * linux-low.c (linux_join): New.
3814 (linux_target_op): Add linux_join.
3815 * spu-low.c (spu_join): New.
3816 (spu_target_ops): Add spu_join.
3817 * win32-low.c (win32_detach): Adapt to new interface.
3818 Reopen current_process_handle before detaching. Issue a child
3819 resume before detaching.
3821 (win32_target_op): Add win32_join.
3823 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3825 * win32-low.c (win32-attach): Fix return value.
3826 * target.h (target_ops): Describe ATTACH return values.
3828 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3830 * win32-low.c (GETPROCADDRESS): Define.
3831 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3832 (winapi_DebugSetProcessKillOnExit): Likewise.
3833 (win32_create_inferior): Force usage of ansi CreateProcessA.
3834 (win32_attach): Use GETPROCADDRESS.
3835 (win32_detach): Likewise.
3837 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3839 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3841 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3843 * win32-low.c: Commit leftover changes from 2007-03-29.
3845 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3847 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3848 fields short instead of int. Add explicit padding.
3849 (i387_cache_to_fsave): Remove unnecessary casts.
3850 (i387_fsave_to_cache): Doc fix.
3851 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3853 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3855 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3856 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3858 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3860 * configure.srv (arm*-*-mingw32ce*): Move near the other
3863 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3865 * configure.ac: Add errno checking.
3866 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3867 sys/file.h and malloc.h.
3868 (AC_CHECK_DECLS): Add perror.
3869 (srv_mingwce): Handle.
3870 * configure.srv (i[34567]86-*-cygwin*): Add
3871 win32-i386-low.o to srv_tgtobj.
3872 (i[34567]86-*-mingw*): Likewise.
3873 (arm*-*-mingw32ce*): Add case.
3874 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3875 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3876 [__MINGW32CE__] (strerror): New function.
3877 [__MINGW32CE__] (errno): Define to GetLastError.
3878 [__MINGW32CE__] (COUNTOF): New macro.
3879 (remote_open): Remove extra close call.
3880 * mem-break.c (delete_breakpoint_at): New function.
3881 * mem-break.h (delete_breakpoint_at): Declare.
3882 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3883 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3884 [USE_WIN32API] (read, write): Add char* casts.
3885 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3886 * server.h: Include wincecompat.h on Windows CE.
3887 [HAVE_ERRNO_H]: Check.
3888 (perror): Declare if not declared.
3889 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3890 (perror_with_name): Remove errno declaration.
3891 * wincecompat.h: New.
3892 * wincecompat.c: New.
3894 * win32-arm-low.c: New.
3895 * win32-i386-low.c: New.
3896 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3897 (OUTMSG2): Make it safe.
3899 (COUNTOF): New macro.
3900 (NUM_REGS): Get it from the low target.
3901 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3902 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3903 (thread_rec): Let low target handle debug registers.
3904 (child_add_thread): Likewise.
3905 (child_init_thread_list): Likewise.
3906 (continue_one_thread): Likewise.
3908 (do_child_fetch_inferior_registers): Move to ...
3909 * win32-i386-low.c: ... here, and rename to ...
3910 (do_fetch_inferior_registers): ... this.
3911 * win32-low.c (child_fetch_inferior_registers):
3912 Go through the low target.
3913 (do_child_store_inferior_registers): Use regptr.
3914 (strwinerror): New function.
3915 (win32_create_inferior): Handle Windows CE.
3916 Use strwinerror instead of strerror on Windows error
3917 codes. Add program to the error output.
3918 Don't close the main thread handle on Windows CE.
3919 (win32_attach): Use coredll.dll on Windows CE.
3920 (win32_kill): Close current process and current
3922 (win32_detach): Use coredll.dll on Windows CE.
3923 (win32_resume): Let low target handle debug registers, and
3925 (handle_exception): Add/Remove initial breakpoint. Avoid
3926 non-existant WSTOPSIG on Windows CE.
3927 (win32_read_inferior_memory): Cast to remove warning.
3928 (win32_arch_string): Go through the low target.
3929 (initialize_low): Call set_breakpoint_data with the low
3930 target's breakpoint.
3931 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3932 FOP_REGNUM, mappings): Move to ...
3933 * win32-i386-low.c: ... here.
3934 * win32-low.c (win32_thread_info): Move to ...
3935 * win32-low.h: ... here.
3936 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3937 win32-arm-low.c and wincecompat.c.
3938 (all:): Add $EXEEXT.
3939 (install-only:): Likewise.
3940 (gdbserver:): Likewise.
3941 (gdbreplay:): Likewise.
3942 * config.in: Regenerate.
3943 * configure: Regenerate.
3945 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3947 * win32-low.c: Rename typedef thread_info to
3948 win32_thread_info throughout.
3950 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3952 * win32-i386-low.c: Rename to ...
3953 * win32-low.c: ... this.
3954 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3955 * Makefile.in: Likewise.
3957 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3959 * remote-utils.c (monitor_output): Constify msg parameter.
3960 * server.h (monitor_output): Likewise.
3961 * win32-i386-low.c (handle_output_debug_string): New.
3962 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3963 handle_output_debug_string.
3964 (get_child_debug_event): Likewise.
3966 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3968 * server.c (main): Correct strtoul check.
3970 2007-03-27 Jon Ringle <jon@ringle.org>
3972 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3974 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3976 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3978 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3980 * terminal.h: Check HAVE_SGTTY_H.
3982 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3984 * remote-utils.c (remote_open): Print out the assigned port number.
3986 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3988 * remote-utils.c (monitor_output): New function.
3989 * server.c (debug_threads): Define here.
3990 (monitor_show_help): New function.
3991 (handle_query): Handle qRcmd.
3992 (main): Do not handle 'd' packet.
3993 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3994 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3997 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3999 * Makefile.in (EXEEXT): New.
4000 (clean): Use $(EXEEXT).
4002 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4004 * target.h (target_ops): Rename send_signal to request_interrupt,
4005 and remove enum target_signal parameter.
4006 * linux-low.c (linux_request_interrupt): Rename from
4007 linux_send_signal, and always send SIGINT.
4008 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4009 and always send SIGINT.
4010 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4012 (input_interrupt): Likewise.
4014 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4016 * server.c (get_features_xml): Check if target implemented
4018 * win32-i386-low.c (win32_arch_string): New.
4019 (win32_target_ops): Add win32_arch_string as arch_string member.
4021 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4023 * spu-low.c (spu_arch_string): New.
4024 (spu_target_ops): Add spu_arch_string.
4026 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4028 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4029 * configure.ac: Do not check for terminal.h.
4030 * configure, config.in: Regenerated.
4032 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4034 * Makefile.in (OBS): Add $(XML_BUILTIN).
4035 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4037 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4038 (arm-with-iwmmxt.c): New.
4039 * config.in, configure: Regenerate.
4040 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4041 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4042 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4043 (arm*-*-linux*): Add iWMMXt and regset support.
4044 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4045 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4046 (arm_store_wmmxregset, target_regsets): New.
4047 * server.c (get_features_xml): Take annex argument. Check builtin
4049 (handle_query): Handle multiple annexes.
4051 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4053 * remote-utils.c [USE_WIN32API] (read, write): Define.
4054 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4057 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4059 * linux-i386-low.c (the_low_target): Set arch_string.
4060 * linux-x86-64-low.c (the_low_target): Likewise.
4061 * linux-low.c (linux_arch_string): New.
4062 (linux_target_ops): Add it.
4063 * linux-low.h (struct linux_target_ops): Add arch_string.
4064 * server.c (write_qxfer_response): Use const void * for DATA.
4065 (get_features_xml): New.
4066 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4067 * target.h (struct target_ops): Add arch_string method.
4069 2007-01-03 Denis Pilat <denis.pilat@st.com>
4070 Daniel Jacobowitz <dan@codesourcery.com>
4072 * linux-low.c (linux_kill): Handle being called with no threads.
4073 * win32-i386-low.c (win32_kill): Likewise.
4074 (get_child_debug_event): Clear current_process_handle.
4076 2006-12-30 Denis PILAT <denis.pilat@st.com>
4077 Daniel Jacobowitz <dan@codesourcery.com>
4079 * remote-utils.c (remote_open): Check the type of specified
4080 serial port devices before opening them.
4081 * server.c (main): Kill the inferior if an error occurs during
4082 the first remote_open.
4084 2006-12-05 Markus Deuling <deuling@de.ibm.com>
4086 * README: Update supported targets.
4088 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4090 * Makefile.in (clean): Remove reg-mips64.c.
4091 (reg-mips64.c, reg-mips64.o): New rules.
4092 * configure.srv: Handle mips64. Include regset support for mips.
4093 * linux-mips-low.c (union mips_register): New.
4094 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4095 (mips_breakpoint, mips_breakpoint_at): Use int.
4096 (mips_collect_register, mips_supply_register)
4097 (mips_collect_register_32bit, mips_supply_register_32bit)
4098 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4099 (mips_store_fpregset, target_regsets): New.
4100 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4102 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4104 * configure.srv: Add target "spu*-*-*".
4105 * Makefile.in (clean): Remove reg-spu.c.
4106 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4107 * spu-low.c: New file.
4109 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4111 * configure.ac: Correct td_thr_tls_get_addr test.
4112 * configure: Regenerated.
4114 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4116 * linux-low.c (linux_wait_for_event): Reformat. Use the
4118 * remote-utils.c (decode_address_to_semicolon): New.
4119 * server.c (pass_signals, handle_general_set): New.
4120 (handle_query): Mention QPassSignals for qSupported.
4121 (main): Call handle_general_set.
4122 * server.h (pass_signals, decode_address_to_semicolon): New.
4124 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4126 * server.c (handle_query): Correct error handling for read_auxv.
4128 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4130 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4131 and srv_linux_thread_db to yes.
4132 * linux-s390-low.c (s390_fill_gregset): New function.
4133 (target_regsets): Define data structure.
4135 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4137 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4138 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4139 * config.in, configure: Regenerated.
4140 * inferiors.c (gdb_id_to_thread): New function.
4141 (gdb_id_to_thread_id): Use it.
4142 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4143 * linux-low.h (struct process_info): Add th member.
4144 (thread_db_get_tls_address): New prototype.
4145 * remote-utils.c (decode_address): Make non-static.
4146 * server.c (handle_query): Handle qGetTLSAddr.
4147 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4148 * target.h (struct target_ops): Add get_tls_address.
4149 * thread-db.c (maybe_attach_thread): Save the thread handle.
4150 (thread_db_get_tls_address): New.
4152 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4154 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4155 (linux_resume_one_process): Take a siginfo_t *. Update all
4156 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4157 (struct pending_signals): Add a siginfo_t.
4158 (linux_wait_for_process): Always set last_status.
4159 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4160 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4161 * linux-low.h (struct process_info): Add last_status.
4163 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4165 * remote-utils.c (try_rle): New function.
4166 (putpkt_binary): Use it.
4168 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4170 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4171 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4172 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4173 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4174 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4177 2006-08-08 Richard Sandiford <richard@codesourcery.com>
4179 * server.c (terminal_fd): New variable.
4180 (old_foreground_pgrp): Likewise.
4181 (restore_old_foreground_pgrp): New function.
4182 (start_inferior): Record the terminal file descriptor in terminal_fd
4183 and its original foreground group in old_foreground_pgrp. Register
4184 restore_old_foreground_pgrp with atexit().
4186 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4188 * server.c (handle_query): Correct qPart to qXfer.
4190 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4192 * configure.ac: Check for more headers which are missing on
4193 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4194 * configure.srv: Add Cygwin and mingw32.
4195 * remote-utils.c: Don't include headers unconditionally which
4196 are missing on mingw32. Include <winsock.h> for mingw32.
4197 (remote_open): Adjust for mingw32 support. Flush
4198 standard error after writing to it.
4199 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4200 (unblock_async_io, enable_async_io, disable_async_io)
4201 (readchar, getpkt): Update for Winsock support.
4202 (prepare_resume_reply): Expect a protocol signal number.
4203 * server.c: Disable <sys/wait.h> on mingw32.
4204 (start_inferior): Adjust for mingw32 support. Flush
4205 standard error after writing to it.
4206 (attach_inferior): Likewise. Use protocol signal
4208 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4210 * win32-i386-low.c: New file.
4211 * Makefile.in (XM_CLIBS): Set.
4212 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4213 (win32-i386-low.o): New dependency rule.
4214 * linux-low.c (linux_wait): Use target signal numbers.
4215 * target.h (struct target_ops): Doc fix.
4216 * server.h (target_signal_to_name): New prototype.
4217 * gdbreplay.c: Don't include headers unconditionally which
4218 are missing on mingw32. Include <winsock.h> for mingw32.
4219 (remote_close, remote_open): Adjust for Winsock support.
4220 * configure, config.in: Regenerated.
4222 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4224 * server.c (decode_xfer_read, write_qxfer_response): New.
4225 (handle_query): Take a packet length argument. Handle
4226 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4227 the qSupported response.
4228 (main): Update call to handle_query.
4230 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4232 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4233 (putpkt_binary): Renamed from putpkt and adjusted for binary
4235 (putpkt): New wrapper for putpkt_binary.
4236 (readchar): Don't mask off the high bit.
4237 (decode_X_packet): New function.
4238 * server.c (main): Call putpkt_binary if a handler sets the packet
4239 length. Save the length of the incoming packet. Handle 'X'.
4240 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4242 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4244 * server.c (handle_query): Handle qSupported.
4246 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4248 * remote-utils.c (all_symbols_looked_up): New variable.
4249 (look_up_one_symbol): Check it.
4250 * server.h (look_up_one_symbol): New declaration.
4251 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4253 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4255 * Makefile.in (linux-arm-low.o): Update dependencies.
4256 * linux-arm-low.c: Include "gdb_proc_service.h".
4257 (PTRACE_GET_THREAD_AREA): Define.
4258 (ps_get_thread_area): New function.
4260 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4262 * configure.srv (m68k*-*-uclinux*): New target.
4263 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4264 (linux_resume_one_process): Remove extraneous cast.
4265 (linux_read_offsets): New.
4266 (linux_target_op): Add linux_read_offsets on mmuless systems.
4267 * server.c (handle_query): Add qOffsets logic.
4268 * target.h (struct target_ops): Add read_offsets.
4270 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4272 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4273 (PTRACE_GET_THREAD_AREA): Define.
4274 (ps_get_thread_area): New function.
4275 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4276 (linux-x86-64-low.o): Update.
4278 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4280 * configure.ac: Remove checks for prfpregset_t.
4281 * gdb_proc_service.h: New file.
4282 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4283 new "gdb_proc_service.h".
4284 * proc-service.c: Likewise.
4285 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4286 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4287 * Makefile.in (gdb_proc_service_h): Updated.
4288 * configure, config.in: Regenerated.
4290 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4292 * remote-utils.c (prepare_resume_reply): Move declaration
4293 of gdb_id_from_wait to the top of the block.
4295 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4297 * linux-low.c (regsets_store_inferior_registers): Read the regset
4298 from the target before filling it.
4300 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4302 * server.c (attach_inferior): Return SIGTRAP for a successful
4305 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4307 * Makefile.in (OBS): Add version.o.
4308 (STAGESTUFF): Delete.
4309 (version.o): Add dependencies.
4310 (version.c): Replace rule.
4311 (clean): Remove version.c.
4312 * server.c (gdbserver_version): New.
4313 (gdbserver_usage): Use printf.
4314 (main): Handle --version and --help.
4315 * server.h (version, host_name): Add declarations.
4317 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4329 * linux-x86-64-low.c:
4332 * linux-ppc64-low.c:
4341 * linux-crisv32-low.c:
4353 * gdbserver.1: Add (C) after Copyright. Update the FSF
4356 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4358 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4359 (arm_breakpoint_at): Recognize both breakpoints.
4360 (the_low_target): Use the correct breakpoint instruction.
4362 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4364 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4365 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4366 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4367 (the_low_target): Update.
4369 2005-10-25 Andreas Schwab <schwab@suse.de>
4371 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4373 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4374 (ia64_num_regs): Reduce to 462.
4376 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4378 * acinclude.m4: Correct quoting.
4379 * aclocal.m4: Regenerated.
4381 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4382 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4383 (thread_db_init): Call thread_db_err_str.
4384 * configure.ac: Check for TD_VERSION.
4385 * config.in, configure: Regenerated.
4387 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4389 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4391 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4393 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4394 is not available. Define HAVE_PTRACE_GETREGS if it is.
4395 * config.in, configure: Regenerated.
4396 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4397 * linux-i386-low.c, linux-m68k-low.c: Update to use
4398 HAVE_PTRACE_GETREGS.
4399 * linux-low.c (regsets_fetch_inferior_registers)
4400 (regsets_store_inferior_registers): Only return 0 if we processed
4402 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4403 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4405 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4407 * inferiors.c (struct thread_info): Add gdb_id.
4408 (add_thread): Add gdb_id argument.
4409 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4410 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4411 calls to add_thread.
4412 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4413 * server.c (handle_query): Use thread_to_gdb_id.
4414 (handle_v_cont, main): Use gdb_id_to_thread_id.
4415 * server.h (add_thread): Update prototype.
4416 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4419 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4421 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4422 left-padded registers.
4423 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4424 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4426 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4428 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4429 * configure: Regenerate.
4430 * config.in: Regenerate.
4431 * server.h (NEED_DECLARATION_STRERROR):
4432 Replace with !HAVE_DECL_STRERROR.
4434 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4436 * linux-low.c (linux_wait, linux_send_signal): Don't test
4437 an unsigned long variable for > 0 if it could be MAX_ULONG.
4438 * server.c (myresume): Likewise.
4439 * target.c (set_desired_inferior): Likewise.
4441 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4443 * configure.ac: Simplify and improve check for socklen_t.
4444 * configure, config.in: Regenerate.
4446 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4448 * acconfig.h: Remove.
4449 * configure.ac: Add a test for socklen_t. Use three-argument
4450 AC_DEFINE throughout.
4451 * config.in: Regenerated using autoheader 2.59.
4452 * configure: Regenerated.
4454 * gdbreplay.c (socklen_t): Provide a default.
4455 (remote_open): Use socklen_t.
4456 * remote-utils.c (socklen_t): Provide a default.
4457 (remote_open): Use socklen_t.
4458 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4461 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4463 * linux-low.c (linux_read_memory, linux_write_memory)
4464 (linux_read_auxv): Likewise.
4465 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4466 (check_mem_write): Likewise.
4467 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4469 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4470 (registers_from_string, register_data): Likewise.
4471 * server.c (handle_query, main): Likewise.
4472 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4473 (decode_M_packet): Likewise.
4474 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4475 * target.h (struct target_ops): Update read_memory, write_memory,
4477 (read_inferior_memory, write_inferior_memory): Update.
4478 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4480 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4481 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4482 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4483 linux-s390-low.c, linux-sh-low.c: Update for changes in
4484 read_inferior_memory and the_low_target->breakpoint.
4486 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4488 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4489 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4490 * configure.srv: Add powerpc64-*-linux*.
4491 * linux-ppc64-low.c: New file.
4493 2005-05-23 Orjan Friberg <orjanf@axis.com>
4495 * linux-cris-low.c: New file with support for CRIS.
4496 * linux-crisv32-low.c: Ditto for CRISv32.
4497 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4498 (clean): Add reg-cris.c and reg-crisv32.c.
4499 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4500 reg-crisv32.o, and reg-crisv32.c to make rules.
4501 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4504 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4506 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4507 of sizeof (PTRACE_XFER_TYPE).
4508 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4510 2005-05-12 Orjan Friberg <orjanf@axis.com>
4512 * target.h (struct target_ops): Add insert_watchpoint,
4513 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4514 pointers for hardware watchpoint support.
4515 * linux-low.h (struct linux_target_ops): Ditto.
4516 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4517 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4518 to linux_target_ops.
4519 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4521 * server.c (main): Recognize 'Z' and 'z' packets.
4523 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4525 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4526 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4527 (the_low_target): Add new members.
4529 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4531 * proc-service.c (ps_lgetregs): Search all_processes instead of
4534 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4536 * server.c (start_inferior): Change return type to int.
4537 (attach_inferior): Change sigptr to int *.
4538 (handle_v_cont, handle_v_requests): Change signal to int *.
4539 (main): Change signal to int.
4541 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
4543 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4544 * configure.srv: Add m32r*-*-linux*.
4545 * linux-m32r-low.c: New file.
4547 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4549 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4551 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4553 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4554 Take unsigned long arguments for PIDs.
4555 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4556 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4557 (wait_for_sigstop, linux_resume_one_process)
4558 (regsets_fetch_inferior_registers, linux_send_signal)
4559 (linux_read_auxv): Likewise. Update the types of variables holding
4560 PIDs. Update format string specifiers.
4561 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4562 * remote-utils.c (prepare_resume_reply): Likewise.
4563 * server.c (cont_thread, general_thread, step_thread)
4564 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4566 (handle_query): Update format specifiers.
4567 (handle_v_cont, main): Use strtoul for thread IDs.
4568 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4569 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4570 (general_thread, step_thread, thread_from_wait)
4571 (old_thread_from_wait): Update.
4572 * target.h (struct thread_resume): Use unsigned long for THREAD.
4573 (struct target_ops): Use unsigned long for arguments to attach and
4576 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4578 * acinclude.m4: Include bfd/bfd.m4 directly.
4579 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4580 <agriffis@toolchain.org>.
4581 * aclocal.m4, configure: Regenerated.
4583 2005-01-07 Andrew Cagney <cagney@gnu.org>
4585 * configure.ac: Rename configure.in, require autoconf 2.59.
4586 * configure: Re-generate.
4588 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4590 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4592 * aclocal.m4: Regenerated.
4593 * configure: Regenerated.
4595 2004-11-21 Andreas Schwab <schwab@suse.de>
4597 * linux-m68k-low.c (m68k_num_gregs): Define.
4598 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4599 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4600 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4601 (m68k_breakpoint_at): New. Add to the_low_target.
4603 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4604 srv_linux_thread_db to yes.
4606 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4608 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4609 (ARCH_SET_FS): Likewise.
4610 (ARCH_GET_FS): Likewise.
4611 (ARCH_GET_GS): Likewise.
4613 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4615 * linux-i386-low.c (ps_get_thread_area): New.
4616 * linux-x86-64-low.c (ps_get_thread_area): New.
4617 * linux-low.c: Include <sys/syscall.h>.
4618 (linux_kill_one_process): Don't kill the first thread here.
4619 (linux_kill): Kill the first thread here.
4620 (kill_lwp): New function.
4621 (send_sigstop, linux_send_signal): Use it.
4622 * proc-service.c: Clean up #ifdefs.
4623 (fpregset_info): Delete.
4624 (ps_lgetregs): Update and enable implementation.
4625 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4627 * remote-utils.c (struct sym_cache, symbol_cache): New.
4628 (input_interrupt): Print a clearer message.
4629 (async_io_enabled): New variable.
4630 (enable_async_io, disable_async_io): Use it. Update comments.
4631 (look_up_one_symbol): Use the symbol cache.
4632 * thread-db.c (thread_db_look_up_symbols): New function.
4633 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4635 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4637 * configure.in: Test for -rdynamic.
4638 * configure: Regenerated.
4639 * Makefile (INTERNAL_LDFLAGS): New.
4640 (gdbserver, gdbreplay): Use it.
4642 2004-09-02 Andrew Cagney <cagney@gnu.org>
4644 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4646 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4648 * linux-low.c (linux_wait): Clear all_processes list also.
4650 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4652 * linux-low.c: Include <errno.h>. Remove extern declaration of
4655 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4657 * gdbreplay.c, server.h, utils.c: Update copyright years.
4659 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4661 * server.c (main): Print child status or termination signal from
4662 variable 'signal', not 'sig'.
4664 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4666 * linux-low.c (linux_read_memory): Change return type to
4667 int. Check for and return error from ptrace().
4668 * target.c (read_inferior_memory): Change return type to int. Pass
4669 back return status from the_target->read_memory().
4670 * target.h (struct target_ops): Adapt *read_memory() prototype.
4672 (read_inferior_memory): Adapt prototype.
4673 * server.c (main): Return an error packet if
4674 read_inferior_memory() returns an error.
4676 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4678 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4679 Unify with other clean targets.
4681 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4683 * server.c (handle_v_cont): Call set_desired_inferior.
4685 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4687 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4689 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4691 * linux-low.c (linux_wait): Unblock async I/O.
4692 (linux_resume): Block and enable async I/O.
4693 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4694 * server.h (block_async_io, unblock_async_io): Add prototypes.
4696 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4698 * remote-utils.c (remote_open): Print a status notice after
4700 * server.c (attach_inferior): Print a status notice after
4703 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4705 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4707 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4709 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4711 * server.c, target.h: Update copyright years.
4713 2004-02-25 Roland McGrath <roland@redhat.com>
4715 * target.h (struct target_ops): New member `read_auxv'.
4716 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4717 * linux-low.c (linux_read_auxv): New function.
4718 (linux_target_ops): Initialize `read_auxv' member to that.
4720 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4722 Committed by Jim Blandy <jimb@redhat.com>.
4724 * linux-s390-low.c (s390_num_regs): Update.
4725 (s390_regmap): Remove control registers. Use __s390x__ predefine
4726 instead of GPR_SIZE to distiguish s390 and s390x targets.
4728 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4730 * linux-low.c: Update copyright year.
4731 (check_removed_breakpoint): Clear pending_is_breakpoint.
4732 (linux_set_resume_request, linux_queue_one_thread)
4733 (resume_status_pending_p): New functions.
4734 (linux_continue_one_thread): Use process->resume.
4735 (linux_resume): Only resume threads if there are no pending events.
4736 * linux-low.h (struct process_info): Add resume request
4739 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4741 * regcache.c (new_register_cache): Clear the allocated register
4742 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4744 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4746 * linux-low.c (linux_resume): Take a struct thread_resume *
4748 (linux_wait): Update call.
4749 (resume_ptr): New static variable.
4750 (linux_continue_one_thread): Renamed from
4751 linux_continue_one_process. Use resume_ptr.
4752 (linux_resume): Use linux_continue_one_thread.
4753 * server.c (handle_v_cont, handle_v_requests): New functions.
4754 (myresume): New function.
4755 (main): Handle 'v' case.
4756 * target.h (struct thread_resume): New type.
4757 (struct target_ops): Change argument of "resume" to struct
4759 (myresume): Delete macro.
4761 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4763 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4764 (uninstall): Support DESTDIR.
4766 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4768 * configure.srv: Add xscale*linux copy of arm*linux entry.
4770 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4772 * linux-arm-low.c (arm_reinsert_addr): New function.
4773 (the_low_target): Add arm_reinsert_addr.
4775 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4777 * mem-break.c: Remove whitespace at end of file.
4779 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4781 * configure.in: Check whether we need to prototype strerror.
4782 * server.h: Optionally prototype strerror.
4783 * gdbreplay.c (perror_with_name): Use strerror.
4784 * linux-low.c (linux_attach_lwp): Use strerror.
4785 * utils.c (perror_with_name): Use strerror.
4786 * config.in, configure: Regenerated.
4788 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4790 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4791 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4793 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4795 * Makefile.in (SFILES): Update.
4796 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4797 low-sun3.c: Remove files.
4799 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4801 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4802 (linux_detach_one_process, linux_detach): New functions.
4803 (linux_target_ops): Add linux_detach.
4804 * server.c (main): Handle 'D' packet.
4805 * target.h (struct target_ops): Add "detach" member.
4806 (detach_inferior): Define.
4808 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4810 From Kelley Cook <kelleycook@wideopenwest.com>:
4811 * configure.srv: Accept i[34567]86 variants.
4813 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4815 * linux-low.c (linux_wait_for_event): Correct comment typos.
4816 (linux_resume_one_process): Call check_removed_breakpoint.
4817 (linux_send_signal): New function.
4818 (linux_target_ops): Add linux_send_signal.
4819 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4821 * target.h (struct target_ops): Add send_signal.
4823 2003-05-29 Jim Blandy <jimb@redhat.com>
4825 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4826 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4827 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4828 away part of the register's value.
4830 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4832 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4833 (linux_wait_for_event, linux_init_signals): Likewise.
4835 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4837 * configure.in: Check for stdlib.h.
4838 * configure: Regenerated.
4839 * config.in: Regenerated.
4841 2003-01-04 Andreas Schwab <schwab@suse.de>
4843 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4845 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4847 * Makefile.in: Remove obsolete code.
4849 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4851 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4852 defined(PT_FPR0_HI).
4854 2002-11-17 Stuart Hughes <seh@zee2.com>
4856 * linux-arm-low.c (arm_num_regs): Increase.
4857 (arm_regmap): Include status register.
4859 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4861 * linux-low.c (register_addr): Remove incorrect -1 check.
4863 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4865 * linux-low.c (linux_create_inferior): Call setpgid. Return
4867 (unstopped_p, linux_signal_pid): Remove.
4868 (linux_target_ops): Remove linux_signal_pid.
4869 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4870 global instead of target method.
4871 * target.h (struct target_ops): Remove signal_pid. Update comment
4872 for create_inferior.
4873 * server.c (signal_pid): New variable.
4874 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4875 gdbserver. Set the child to be the foreground process group.
4876 (attach_inferior): Set signal_pid.
4878 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4880 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4882 2002-08-20 Jim Blandy <jimb@redhat.com>
4884 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4887 2002-08-01 Andrew Cagney <cagney@redhat.com>
4889 * Makefile.in: Make chill references obsolete.
4891 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4893 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4894 * configure: Regenerate.
4895 * config.in: Regenerate.
4897 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4899 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4900 (perror_with_name, remote_close, remote_open, expect, play): Static.
4902 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4904 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4905 byte offsets instead of an array of indexes.
4906 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4908 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4910 * regcache.c: Add comment.
4912 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4914 * thread-db.c: New file.
4915 * proc-service.c: New file.
4916 * acinclude.m4: New file.
4917 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4918 proc-service.o, and thread-db.o.
4919 (linux-low.o): Add USE_THREAD_DB.
4920 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4921 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4922 * aclocal.m4: Regenerated.
4923 * config.in: Regenerated.
4924 * configure: Regenerated.
4925 * configure.in: Check for proc_service.h, sys/procfs.h,
4926 thread_db.h, and linux/elf.h headrs.
4927 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4928 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4929 Check for -lthread_db and thread support.
4930 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4931 PowerPC, and SuperH.
4932 * i387-fp.c: Constify arguments.
4933 * i387-fp.h: Likewise.
4934 * inferiors.c: (struct thread_info): Renamed from
4935 `struct inferior_info'. Remove PID member. Use generic inferior
4936 list header. All uses updated.
4937 (inferiors, signal_pid): Removed.
4938 (all_threads): New variable.
4939 (get_thread): Define.
4940 (add_inferior_to_list): New function.
4941 (for_each_inferior): New function.
4942 (change_inferior_id): New function.
4943 (add_inferior): Removed.
4944 (remove_inferior): New function.
4945 (add_thread): New function.
4946 (free_one_thread): New function.
4947 (remove_thread): New function.
4948 (clear_inferiors): Use for_each_inferior and free_one_thread.
4949 (find_inferior): New function.
4950 (find_inferior_id): New function.
4951 (inferior_target_data): Update argument type.
4952 (set_inferior_target_data): Likewise.
4953 (inferior_regcache_data): Likewise.
4954 (set_inferior_regcache_data): Likewise.
4955 * linux-low.c (linux_bp_reinsert): Remove.
4956 (all_processes, stopping_threads, using_thrads)
4957 (struct pending_signals, debug_threads, pid_of): New.
4958 (inferior_pid): Replace with macro.
4959 (struct inferior_linux_data): Remove.
4960 (get_stop_pc, add_process): New functions.
4961 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4962 Use add_process and add_thread.
4963 (linux_attach_lwp): New function, based on old linux_attach. Use
4964 add_process and add_thread. Set stop_expected for new threads.
4965 (linux_attach): New function.
4966 (linux_kill_one_process): New function.
4967 (linux_kill): Kill all LWPs.
4968 (linux_thread_alive): Use find_inferior_id.
4969 (check_removed_breakpoints, status_pending_p): New functions.
4970 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4971 Update. Use WNOHANG. Wait for cloned processes also. Update process
4972 struct for the found process.
4973 (linux_wait_for_event): New function.
4974 (linux_wait): Use it. Support LWPs.
4975 (send_sigstop, wait_for_sigstop, stop_all_processes)
4976 (linux_resume_one_process, linux_continue_one_process): New functions.
4977 (linux_resume): Support LWPs.
4978 (REGISTER_RAW_SIZE): Remove.
4979 (fetch_register): Use register_size instead. Call supply_register.
4980 (usr_store_inferior_registers): Likewise. Call collect_register.
4982 (regsets_fetch_inferior_registers): Improve error message.
4983 (regsets_store_inferior_registers): Add debugging.
4984 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4985 (unstopped_p, linux_signal_pid): New functions.
4986 (linux_target_ops): Add linux_signal_pid.
4987 (linux_init_signals): New function.
4988 (initialize_low): Call it. Initialize using_threads.
4989 * regcache.c (inferior_regcache_data): Add valid
4991 (get_regcache): Fetch registers lazily. Add fetch argument
4992 and update all callers.
4993 (regcache_invalidate_one, regcache_invalidate): New
4995 (new_register_cache): Renamed from create_register_cache.
4996 Return the new regcache.
4997 (free_register_cache): Change argument to a void *.
4998 (registers_to_string, registers_from_string): Call get_regcache
4999 with fetch flag set.
5000 (register_data): Make static. Pass fetch flag to get_regcache.
5001 (supply_register): Call get_regcache with fetch flag clear.
5002 (collect_register): Call get_regcache with fetch flag set.
5003 (collect_register_as_string): New function.
5004 * regcache.h: Update.
5005 * remote-utils.c (putpkt): Flush after debug output and use
5007 Handle input interrupts while waiting for an ACK.
5008 (input_interrupt): Use signal_pid method.
5009 (getpkt): Flush after debug output and use stderr.
5010 (outreg): Use collect_register_as_string.
5011 (new_thread_notify, dead_thread_notify): New functions.
5012 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5014 (look_up_one_symbol): Flush after debug output.
5015 * server.c (step_thread, server_waiting): New variables.
5016 (start_inferior): Don't use signal_pid. Update call to mywait.
5017 (attach_inferior): Update call to mywait.
5018 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5019 (main): Don't fetch/store registers explicitly. Use
5020 set_desired_inferior. Support proposed ``Hs'' packet. Update
5023 (struct inferior_list, struct_inferior_list_entry): New.
5024 * target.c (set_desired_inferior): New.
5025 (write_inferior_memory): Constify.
5026 (mywait): New function.
5028 (struct target_ops): New signal_pid method.
5029 (mywait): Removed macro, added prototype.
5031 * linux-low.h (regset_func): Removed.
5032 (regset_fill_func, regset_store_func): New.
5033 (enum regset_type): New.
5034 (struct regset_info): Add type field. Use new operation types.
5035 (struct linux_target_ops): stop_pc renamed to get_pc.
5036 Add decr_pc_after_break and breakpoint_at.
5037 (get_process, get_thread_proess, get_process_thread)
5038 (strut process_info, all_processes, linux_attach_lwp)
5039 (thread_db_init): New.
5041 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5042 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5043 (the_low_target): Add new members.
5044 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5045 (i386_store_fpxregset): Constify.
5046 (target_regsets): Add new kind identifier.
5047 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5048 (i386_set_pc): Add debugging.
5049 (i386_breakpoint_at): New function.
5050 (the_low_target): Add new members.
5051 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5052 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5053 (mips_breakpoint_at): New.
5054 (the_low_target): Add new members.
5055 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5056 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5057 (the_low_target): Add new members.
5058 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5059 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5060 (the_low_target): Add new members.
5061 * linux-x86-64-low.c (target_regsets): Add new kind
5064 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5066 From Martin Pool <mbp@samba.org>:
5067 * server.c (gdbserver_usage): New function.
5070 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
5072 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5075 2002-05-04 Andrew Cagney <ac131313@redhat.com>
5077 * Makefile.in: Remove obsolete code.
5079 2002-04-24 Michal Ludvig <mludvig@suse.cz>
5081 * linux-low.c (regsets_fetch_inferior_registers),
5082 (regsets_store_inferior_registers): Removed cast to int from
5084 * regcache.h: Added declaration of struct inferior_info.
5086 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5088 * inferiors.c (struct inferior_info): Add regcache_data.
5089 (add_inferior): Call create_register_cache.
5090 (clear_inferiors): Call free_register_cache.
5091 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5092 * regcache.c (struct inferior_regcache_data): New.
5093 (registers): Remove.
5094 (get_regcache): New function.
5095 (create_register_cache, free_register_cache): New functions.
5096 (set_register_cache): Don't initialize the register cache here.
5097 (registers_to_string, registers_from_string, register_data): Call
5099 * regcache.h: Add prototypes.
5100 * server.h: Likewise.
5102 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5104 * mem-break.c: New file.
5105 * mem-break.h: New file.
5106 * Makefile.in: Add mem-break.o rule; update server.h
5108 * inferiors.c (struct inferior_info): Add target_data
5110 (clear_inferiors): Free target_data member if set.
5111 (inferior_target_data, set_inferior_target_data): New functions.
5112 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5113 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5114 * linux-low.c (linux_bp_reinsert): New variable.
5115 (struct inferior_linux_data): New.
5116 (linux_create_inferior): Use set_inferior_target_data.
5117 (linux_attach): Likewise. Call add_inferior.
5118 (linux_wait_for_one_inferior): New function.
5119 (linux_wait): Call it.
5120 (linux_write_memory): Add const.
5121 (initialize_low): Call set_breakpoint_data.
5122 * linux-low.h (struct linux_target_ops): Add breakpoint
5124 * server.c (attach_inferior): Remove extra add_inferior
5126 * server.h: Include mem-break.h. Update inferior.c
5128 * target.c (read_inferior_memory)
5129 (write_inferior_memory): New functions.
5130 * target.h (read_inferior_memory)
5131 (write_inferior_memory): Change macros to prototypes.
5132 (struct target_ops): Update comments. Add const to write_memory
5135 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
5137 * linux-low.c (usr_store_inferior_registers): Support
5138 registers which are allowed to fail to store.
5139 * linux-low.h (linux_target_ops): Likewise.
5140 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5141 (ppc_cannot_store_register): FPSCR may not be storable.
5143 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5145 * server.h: Include <string.h> if HAVE_STRING_H.
5146 * ChangeLog: Correct paths in last ChangeLog entry.
5148 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5150 * linux-low.h: Remove obsolete prototypes.
5151 (struct linux_target_ops): New.
5152 (extern the_low_target): New.
5153 * linux-low.c (num_regs, regmap): Remove declarations.
5154 (register_addr): Use the_low_target explicitly.
5155 (fetch_register): Likewise.
5156 (usr_fetch_inferior_registers): Likewise.
5157 (usr_store_inferior_registers): Likewise.
5158 * linux-arm-low.c (num_regs): Remove.
5159 (arm_num_regs): Define.
5160 (arm_regmap): Renamed from regmap, made static.
5161 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5163 (arm_cannot_store_register): Renamed from cannot_store_register,
5165 (the_low_target): New.
5166 * linux-i386-low.c (num_regs): Remove.
5167 (i386_num_regs): Define.
5168 (i386_regmap): Renamed from regmap, made static.
5169 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5171 (i386_cannot_store_register): Renamed from cannot_store_register,
5173 (the_low_target): New.
5174 * linux-ia64-low.c (num_regs): Remove.
5175 (ia64_num_regs): Define.
5176 (ia64_regmap): Renamed from regmap, made static.
5177 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5179 (ia64_cannot_store_register): Renamed from cannot_store_register,
5181 (the_low_target): New.
5182 * linux-m68k-low.c (num_regs): Remove.
5183 (m68k_num_regs): Define.
5184 (m68k_regmap): Renamed from regmap, made static.
5185 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5187 (m68k_cannot_store_register): Renamed from cannot_store_register,
5189 (the_low_target): New.
5190 * linux-mips-low.c (num_regs): Remove.
5191 (mips_num_regs): Define.
5192 (mips_regmap): Renamed from regmap, made static.
5193 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5195 (mips_cannot_store_register): Renamed from cannot_store_register,
5197 (the_low_target): New.
5198 * linux-ppc-low.c (num_regs): Remove.
5199 (ppc_num_regs): Define.
5200 (ppc_regmap): Renamed from regmap, made static.
5201 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5203 (ppc_cannot_store_register): Renamed from cannot_store_register,
5205 (the_low_target): New.
5206 * linux-s390-low.c (num_regs): Remove.
5207 (s390_num_regs): Define.
5208 (s390_regmap): Renamed from regmap, made static.
5209 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5211 (s390_cannot_store_register): Renamed from cannot_store_register,
5213 (the_low_target): New.
5214 * linux-sh-low.c (num_regs): Remove.
5215 (sh_num_regs): Define.
5216 (sh_regmap): Renamed from regmap, made static.
5217 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5219 (sh_cannot_store_register): Renamed from cannot_store_register,
5221 (the_low_target): New.
5222 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5223 (the_low_target): New.
5225 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5227 * Makefile.in: Add stamp-h target.
5228 * configure.in: Create stamp-h.
5229 * configure: Regenerated.
5231 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5233 * inferiors.c: New file.
5234 * target.c: New file.
5235 * target.h: New file.
5236 * Makefile.in: Add target.o and inferiors.o. Update
5238 * linux-low.c (inferior_pid): New static variable,
5239 moved from server.c.
5240 (linux_create_inferior): Renamed from create_inferior.
5241 Call add_inferior. Return 0 on success instead of a PID.
5242 (linux_attach): Renamed from myattach.
5243 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5244 (linux_thread_alive): Renamed from mythread_alive.
5245 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5247 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5248 (regsets_store_inferior_registers): Correct error message.
5249 Add missing ``return 0''.
5250 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5251 (linux_store_registers): Renamed from store_inferior_registers.
5252 (linux_read_memory): Renamed from read_inferior_memory.
5253 (linux_write_memory): Renamed from write_inferior_memory.
5254 (linux_target_ops): New structure.
5255 (initialize_low): Call set_target_ops ().
5256 * remote-utils.c (unhexify): New function.
5257 (hexify): New function.
5258 (input_interrupt): Send signals to ``signal_pid''.
5259 * server.c (inferior_pid): Remove.
5260 (start_inferior): Update create_inferior call.
5261 (attach_inferior): Call add_inferior.
5262 (handle_query): New function.
5263 (main): Call handle_query for `q' packets.
5264 * server.h: Include "target.h". Remove obsolete prototypes.
5265 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5267 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5269 * Makefile.in: Add WARN_CFLAGS. Update configury
5271 * configure.in: Check for <string.h>
5272 * configure: Regenerate.
5273 * config.in: Regenerate.
5274 * gdbreplay.c: Include needed system headers.
5275 (remote_open): Remove strchr prototype.
5276 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5277 * regcache.c (supply_register): Change buf argument to const void *.
5278 (supply_register_by_name): Likewise.
5279 (collect_register): Change buf argument to void *.
5280 (collect_register_by_name): Likewise.
5281 * regcache.h: Add missing prototypes.
5282 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5283 * server.c (handle_query): New function.
5284 (attached): New static variable, moved out of main.
5285 (main): Quiet longjmp clobber warnings.
5286 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5287 * utils.c (error): Remove NORETURN.