OSDN Git Service

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