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