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