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