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