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