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