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