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