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