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