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