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