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