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