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