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