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