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