8b25d430da4430eddc919621f7e17ff7aebc7515
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
2
3         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10         XML target descriptions.
11         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12         when inferior is running on an ISA 2.05 or later processor.  Add
13         special case to return offset for full 64-bit slot of FPSCR when
14         in 32-bits.
15
16 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
17
18         * Makefile.in (SFILES, clean): Added sparc64 files.
19         (reg-sparc64.o, reg-sparc64.c): New.
20         * configure.srv (sparc*-*-linux*): New configuration.
21         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
22         syscall arguments for SPARC.
23         (regsets_store_inferior_registers): Likewise.
24         * linux-sparc-low.c: New file.
25
26 2008-10-21  Doug Evans  <dje@google.com>
27
28         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
29         (READLINE_DIR,READLINE_DEP): Delete.
30         (INTERNAL_CFLAGS): Update.
31         (LINTFLAGS): Update.
32
33 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
34
35         * server.c (handle_v_run): If GDB didn't specify an argv, use the
36         whole argv from the last run, not just argv[0].
37
38 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
39
40         * regcache.c (new_register_cache): Return NULL if the register
41         cache size isn't known yet.
42         (free_register_cache): Avoid dereferencing a NULL regcache.
43
44 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
45
46         * configure.srv: Merge MIPS and MIPS64.
47
48 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
49
50         * Makefile.in (uninstall): Apply $(EXEEXT) too.
51
52 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
53
54         * Makefile.in: Add required vsx dependencies.
55
56         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
57         Declare init_registers_powerpc_vsx32l.
58         Declare init_registers_powerpc_vsx64l.
59         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
60         (ppc_arch_setup): Check for VSX in hwcap.
61         (ppc_fill_vsxregset): New function.
62         (ppc_store_vsxregset): New function.
63         Add new VSX entry in regset_info target_regsets.
64
65         * configure.srv: Add new VSX dependencies.
66
67 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
68
69         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
70         (remote_open): Set or clear transport_is_reliable.
71         (putpkt_binary): Don't expect acks in noack mode.
72         (getpkt): Don't send ack/nac in noack mode.
73         * server.c (handle_general_set): Handle QStartNoAckMode.
74         (handle_query): If connected by tcp pass QStartNoAckMode+ in
75         qSupported.
76         (main): Reset noack_mode on every connection.
77         * server.h (noack_mode): Declare.
78
79 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
80
81         * Makefile.in (GDBREPLAY_OBS): New variable.
82         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
83
84 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
85             Daniel Jacobowitz  <dan@codesourcery.com>
86
87         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
88         (usr_store_inferior_registers): Likewise.
89         (regsets_store_inferior_registers): Likewise.
90
91 2008-07-31  Rolf Jansen  <rj@surtec.com>
92             Pedro Alves  <pedro@codesourcery.com>
93
94         * configure.ac: Check for memmem declaration.
95         * server.c [HAVE_MALLOC_H]: Include malloc.h.
96         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
97         (disable_packet_qfThreadInfo): Unconditionally compile.
98         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
99         * configure, config.in: Regenerate.
100
101 2008-07-28  Doug Kwan  <dougkwan@google.com>
102
103         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
104         (linux_write_memory): Remove declaration of errno.
105
106 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
107
108         * linux-low.c (handle_extended_wait): Do not use "status"
109         variable uninitialized.
110
111 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
112
113         * server.c (handle_v_attach): Inhibit reporting dll changes.
114
115 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
116
117         * remote-utils.c (prepare_resume_reply): If requested, don't
118         output "thread:TID" in the T stop reply.
119
120         * server.c (disable_packet_vCont, disable_packet_Tthread)
121         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
122         (handle_query): If requested, disable support for qC, qfThreadInfo
123         and qsThreadInfo.
124         (handle_v_requests): If requested, disable support for vCont.
125         (gdbserver_show_disableable): New.
126         (main): Handle --disable-packet and --disable-packet=LIST.
127
128         * server.h (disable_packet_vCont, disable_packet_Tthread)
129         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
130
131 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
132
133         * server.c (gdbserver_usage): Mention --version.
134
135 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
136
137         * Makefile.in (gdbreplay.o): New rule.
138
139 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
140
141         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
142         message, not gdbserver.
143
144 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
145             Nathan Sidwell  <nathan@codesourcery.com>
146             Joseph Myers  <joseph@codesourcery.com>
147
148         * acinclude.m4: Include ../../config/acx.m4.
149         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
150         * configure, config.in: Regenerate.
151         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
152         * server.c (gdbserver_version): Print PKGVERSION.
153         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
154         (main): Adjust gdbserver_usage calls.
155         * gdbreplay.c (version, host_name): Add declarations.
156         (gdbreplay_version, gdbreplay_usage): New.
157         (main): Accept --version and --help options.
158
159 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
160
161         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
162         (arm_breakpoint_at): Handle Thumb.
163         (the_low_target): Add comment.
164
165 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
166
167         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
168
169 2008-05-09  Doug Evans  <dje@google.com>
170
171         * server.h (decode_search_memory_packet): Declare.
172         * remote-utils.c (decode_search_memory_packet): New fn.
173         * server.c (handle_search_memory_1): New fn.
174         (handle_search_memory): New fn.
175         (handle_query): Process qSearch:memory packets.
176
177 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
178
179         * regcache.c (registers_length): Remove.
180         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
181         full register packet.
182         * regcache.h (registers_length): Remove prototype.
183         * server.h (PBUFSIZ): Define to 16384.
184
185 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
186
187         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
188         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
189         powerpc-64l.o, and powerpc-altivec64l.o.
190         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
191         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
192         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
193         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
194         rs6000/power-linux.xml, and rs6000/power64-linux.xml
195         to srv_xmlfiles.
196
197         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
198         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
199         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
200         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
201         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
202         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
203         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
204         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
205         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
206         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
207         (clean): Update.
208
209         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
210         (init_registers_powerpc_32l): ... this new prototype.
211         (init_registers_powerpc_32): Remove, replace by ...
212         (init_registers_powerpc_altivec32l): ... this new prototype.
213         (init_registers_powerpc_e500): Remove, replace by ...
214         (init_registers_powerpc_e500l): ... this new prototype.
215         (init_registers_ppc64): Remove, replace by ...
216         (init_registers_powerpc_64l): ... this new prototype.
217         (init_registers_powerpc_64): Remove, replace by ...
218         (init_registers_powerpc_altivec64l): ... this new prototype.
219         (ppc_num_regs): Set to 73.
220         (PT_ORIG_R3, PT_TRAP): Define if necessary.
221         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
222         (ppc_cannot_store_register): Handle orig_r3 and trap.
223         (ppc_arch_setup): Update init_registers_... calls.
224         (ppc_fill_gregset): Handle orig_r3 and trap.
225
226         * inferiors.c (clear_inferiors): Reset current_inferior.
227
228 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
229
230         * acinclude.m4: Add override.m4.
231         * configure: Regenerate.
232
233 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
234
235         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
236         initial call to init_register_ppc64.
237
238 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
239
240         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
241         powerpc*-*-linux* case.
242         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
243
244 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
245
246         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
247         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml    
248         from reg_xmlfiles.
249         * linux-ppc-low.c: Include <elf.h>.
250         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
251         (ppc_hwcap): New global variable.
252         (ppc_regmap): Remove __SPE__ #ifdef sections.
253         (ppc_regmap_e500): New global variable.
254         (ppc_cannot_store_register): Update __SPE__ special case.
255         (ppc_get_hwcap): New function.
256         (ppc_arch_setup): Use it to determine whether inferior supports
257         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
258         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
259         Do not access registers if target does not support AltiVec.
260         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
261         Do not access registers if target does not support SPE.
262         (target_regsets): Unconditionally include AltiVec and SPE regsets.
263
264 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
265
266         * linux-low.c (disabled_regsets, num_regsets): New.
267         (use_regsets_p): Delete.
268         (linux_wait_for_process): Clear disabled_regsets.
269         (regsets_fetch_inferior_registers): Check and set it.
270         (regsets_store_inferior_registers): Likewise.
271         (linux_fetch_registers, linux_store_registers): Do not use
272         use_regsets_p.
273         (initialize_low): Allocate disabled_regsets.
274
275 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
276
277         * Makefile.in (LIBOBJS): New.
278         (OBS): Use LIBOBJS.
279         (memmem.o): New rule.
280         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
281         * configure: Regenerated.
282
283 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
284
285         * server.c (handle_query): Never return "unsupported" for
286         qXfer:features:read queries.
287
288 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
289
290         * server.c (get_features_xml): Fix inverted condition.
291         (handle_query): Always support qXfer:feature:read.
292
293 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
294
295         * server.c (wrapper_argv): New.
296         (start_inferior): Handle wrapper_argv.  If set, expect an extra
297         trap.
298         (gdbserver_usage): Document --wrapper.
299         (main): Parse --wrapper.
300
301 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
302
303         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
304         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
305         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
306         (ppc_set_pc): Likewise.
307         (ppc_arch_setup): New function.
308         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
309         of collect_register.
310         (the_low_target): Use ppc_arch_setup as arch_setup initializer. 
311
312 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
313
314         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
315         instead of linux-ppc64-low.o.
316         * linux-ppc64-low.c: Remove file.
317         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
318         (linux-ppc64-low.o): Remove rule.
319
320         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
321         (init_registers_powerpc_64): Likewise.
322         (ppc_regmap): Conditionally define depending on __powerpc64__.
323         (ppc_cannot_store_register): Do not special-case "fpscr" when
324         compiled on __powerpc64__.
325         (ppc_collect_ptrace_register): New function.
326         (ppc_supply_ptrace_register): New function.
327         (ppc_breakpoint): Change type to "unsigned int".
328         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
329         (the_low_target): Conditionally provide initializers for the
330         arch_setup member depending on __powerpc64__.  Install 
331         collect_ptrace_register and supply_ptrace_register members.
332
333 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
334
335         * regcache.h (gdbserver_xmltarget): Add extern declaration.
336         * server.c (gdbserver_xmltarget): Define.
337         (get_features_xml): Use it to replace "target.xml" and arch_string.
338
339         * configure.srv: Remove srv_xmltarget.  Add XML files that were
340         mentioned there to srv_xmlfiles instead.  Remove conditional tests
341         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
342         srv_xmlfiles and srv_regobj to include all possible choices.
343         * configure.ac (srv_xmltarget): Remove.
344         (srv_xmlfiles): Do not add "target.xml".
345         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
346         checks for supplementary target information.
347         * configure: Regenerate.
348         * Makefile.in (XML_TARGET): Remove.
349         (target.xml): Remove rule.
350         (clean): Do not clean up target.xml.
351         (.PRECIOUS): Do not mention target.xml.
352
353         * target.h (struct target_ops): Remove arch_string member.
354         * linux-low.c (linux_arch_string): Remove.
355         (linux_target_ops): Remove arch_string initializer.
356         * linux-low.h (struct linux_target_ops): Remove arch_string member.
357         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
358         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
359         * spu-low.c (spu_arch_string): Remove.
360         (spu_target_ops): Remove arch_string initializer.
361         * win32-low.c (win32_arch_string): Remove.
362         (win32_target_ops): Remove arch_string initializer.
363         * win32-low.h (struct win32_target_ops): Remove arch_string member.
364         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
365         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
366
367 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
368
369         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
370         by collect_ptrace_register and supply_ptrace_register hooks.
371         * linux-low.c (fetch_register): Use supply_ptrace_register callback
372         instead of checking for the_low_target.left_pad_xfer.
373         (usr_store_inferior_registers): Use collect_ptrace_register callback
374         instead of checking for the_low_target.left_pad_xfer.
375
376         * linux-s390-low.c (s390_collect_ptrace_register): New function.
377         (s390_supply_ptrace_register): Likewise.
378         (s390_fill_gregset): Call s390_collect_ptrace_register.
379         (the_low_target): Update.
380
381         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
382         (ppc_supply_ptrace_register): Likewise.
383         (the_low_target): Update.
384
385         * linux-i386-low.c (the_low_target): Update.
386         * linux-x86-64-low.c (the_low_target): Update.
387
388 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
389
390         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
391         reg-s390.o and reg-s390x.o.
392
393         * linux-low.c (new_inferior): New global variable.
394         (linux_create_inferior, linux_attach): Set it.
395         (linux_wait_for_process): Call the_low_target.arch_setup after the
396         target has stopped for the first time.
397         (initialize_low): Do not call the_low_target.arch_setup.
398
399         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
400         (s390_set_pc): Likewise.
401         (s390_arch_setup): New function.
402         (the_low_target): Use s390_arch_setup as arch_setup routine.
403
404         * regcache.c (realloc_register_cache): New function.
405         (set_register_cache): Call it for each existing regcache.
406
407 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
408
409         * server.h (init_registers): Remove prototype.
410
411         * linux-low.h (struct linux_target_ops): Add arch_setup field.
412         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
413         instead of init_registers ().
414         * linux-arm-low.c (init_registers_arm): Add prototype.
415         (init_registers_arm_with_iwmmxt): Likewise.
416         (the_low_target): Add initializer for arch_setup field.
417         * linux-cris-low.c (init_registers_cris): Add prototype.
418         (the_low_target): Add initializer for arch_setup field.
419         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
420         (the_low_target): Add initializer for arch_setup field.
421         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
422         (the_low_target): Add initializer for arch_setup field.
423         * linux-ia64-low.c (init_registers_ia64): Add prototype.
424         (the_low_target): Add initializer for arch_setup field.
425         * linux-m32r-low.c (init_registers_m32r): Add prototype.
426         (the_low_target): Add initializer for arch_setup field.
427         * linux-m68k-low.c (init_registers_m68k): Add prototype.
428         (the_low_target): Add initializer for arch_setup field.
429         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
430         (init_registers_mips64_linux): Likewise.
431         (the_low_target): Add initializer for arch_setup field.
432         * linux-ppc-low.c (init_registers_ppc): Add prototype.
433         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
434         (the_low_target): Add initializer for arch_setup field.
435         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
436         (init_registers_powerpc_64): Likewise.
437         (the_low_target): Add initializer for arch_setup field.
438         * linux-s390-low.c (init_registers_s390): Add prototype.
439         (init_registers_s390x): Likewise.
440         (the_low_target): Add initializer for arch_setup field.
441         * linux-sh-low.c (init_registers_sh): Add prototype.
442         (the_low_target): Add initializer for arch_setup field.
443         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
444         (the_low_target): Add initializer for arch_setup field.
445         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
446         (the_low_target): Add initializer for arch_setup field.
447
448         * win32-low.h (struct win32_target_ops): Add arch_setup field.
449         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
450         instead of init_registers ().
451         * win32-arm-low.c (init_registers_arm): Add prototype.
452         (the_low_target): Add initializer for arch_setup field.
453         * win32-i386-low.c (init_registers_i386): Add prototype.
454         (the_low_target): Add initializer for arch_setup field.
455
456         * spu-low.c (init_registers_spu): Add prototype.
457         (initialize_low): Call initialie_registers_spu () instead of
458         initialize_registers ().
459
460 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
461
462         * server.c (handle_v_requests): When handling the vRun and vAttach
463         packets, if already debugging a process, don't kill it.  Return an
464         error instead.
465
466 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
467
468         * server.c (handle_query): Correct length check.
469
470 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
471
472         * win32-low.c (do_initial_child_stuff): Add process handle
473         parameter.  Set current_process_handle and current_process_id from the
474         parameters. Clear globals.
475         (win32_create_inferior): Don't set current_process_handle and
476         current_process_id here.  Instead pass them on the call to
477         do_initial_child_stuff.
478         (win32_attach): Likewise.
479         (win32_clear_inferiors): New.
480         (win32_kill): Don't close the current process handle or the
481         current thread handle here.  Instead call win32_clear_inferiors.
482         (win32_detach): Don't open a new handle to the process.  Call
483         win32_clear_inferiors.
484         (win32_join): Don't rely on current_process_handle; open a new
485         handle using the process id.
486         (win32_wait): Call win32_clear_inferiors when the inferior process
487         has exited.
488
489 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
490
491         * server.c (monitor_show_help): Add "exit".
492
493 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
494
495         * Makefile.in (SFILES): Add linux-xtensa-low.c.
496         (clean): Add reg-xtensa.c.
497         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
498         * configure.srv (xtensa*-*-linux*) New target.
499         * linux-xtensa-low.c: New.
500         * xtensa-xtregs.c: New.
501
502 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
503
504         * hostio.c: Don't include errno.h.
505         (errno_to_fileio_errno): Move to hostio-errno.
506         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
507         error number outputting to the target->hostio_last_error callback.
508         (hostio_packet_error): Use FILEIO_EINVAL directly.
509         (handle_open, handle_pread, hostio_error, handle_unlink): Update
510         calls to hostio_error.
511         * hostio-errno.c: New.
512         * server.h (hostio_last_error_from_errno): Declare.
513         * target.h (target_ops): Add hostio_last_error member.
514         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
515         as hostio_last_error handler.
516         * spu-low.c (spu_target_ops): Likewise. 
517         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
518         (wince_hostio_last_error): New functions.
519         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
520         as hostio_last_error handler.
521         (win32_target_ops) [!_WIN32_WCE]: Register
522         hostio_last_error_from_errno as hostio_last_error handler.
523         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
524         (hostio-errno.o): New rule.
525         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
526         * configure.srv (srv_hostio_err_objs): New variable.  Default to
527         hostio-errno.o.
528         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
529         * configure: Regenerate.
530
531 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
532
533         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
534         (linux_kill, linux_detach): Clean up the process list.
535         * remote-utils.c (remote_open): Improve port number parsing.
536         (putpkt_binary, input_interrupt): Only send interrupts if the target
537         is running.
538         * server.c (extended_protocol): Make static.
539         (attached): Define earlier.
540         (exit_requested, response_needed, program_argv): New variables.
541         (target_running): New.
542         (start_inferior): Clear attached here.
543         (attach_inferior): Set attached here.
544         (require_running): Define.
545         (handle_query): Use require_running and target_running.  Implement
546         "monitor exit".
547         (handle_v_attach, handle_v_run): New.
548         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
549         (gdbserver_usage): Update.
550         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
551         --attach along with other options or after the port.  Save
552         program_argv.  Support no initial program.  Resynchronize
553         communication with GDB after an error.  Handle "monitor exit".
554         Use require_running and target_running.  Always allow the extended
555         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
556         restart in extended mode.
557         * README: Refer to the GDB manual.  Update --attach usage.
558
559 2007-12-20  Andreas Schwab  <schwab@suse.de>
560
561         * linux-low.c (STACK_SIZE): Define.
562         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
563         (linux_test_for_tracefork): Likewise.
564
565 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
566
567         * linux-low.c (linux_wait_for_event): Update messages.  Do not
568         reinsert auto-delete breakpoints.
569         * mem-break.c (struct breakpoint): Change return type of handler to
570         int.
571         (set_breakpoint_at): Update handler type.
572         (reinsert_breakpoint_handler): Return 1 instead of calling
573         delete_breakpoint.
574         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
575         setting a new one.
576         (check_breakpoints): Delete auto-delete breakpoints and return 2.
577         * mem-break.h (set_breakpoint_at): Update handler type.
578         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
579         * win32-low.c (auto_delete_breakpoint): New.
580         (get_child_debug_event): Use it.
581
582 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
583
584         * configure.ac: Check for pread and pwrite.
585         * hostio.c (handle_pread): Fall back to lseek and read.
586         (handle_pwrite): Fall back to lseek and write.
587         * config.in, configure: Regenerated.
588
589 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
590
591         * server.c (myresume): Add own_buf argument.
592         (main): Update calls.
593
594 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
595
596         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
597         * remote-utils.c (remote_open): Do not call disable_async_io.
598         (block_async_io): Delete.
599         (unblock_async_io): Make static.
600         (initialize_async_io): New.
601         * server.c (handle_v_cont): Handle async I/O here.
602         (myresume): Likewise.  Move other common resume tasks here...
603         (main): ... from here.  Call initialize_async_io.  Disable async
604         I/O before the main loop.
605         * server.h (initialize_async_io): Declare.
606         (block_async_io, unblock_async_io): Delete prototypes.
607         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
608
609 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
610
611         * remote-utils.c (readchar): Allow binary data in received messages.
612
613 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
614
615         * win32-low.c (attaching): New global.
616         (win32_create_inferior): Clear the `attaching' global.
617         (win32_attach): Set the `attaching' global.
618         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
619         attaching.  Only set a breakpoint at the entry point if not
620         attaching.
621
622 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
623
624         * server.c (main): Don't report dll events on the initial
625         connection on attaches.
626
627 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
628
629         * server.c (main): Relax numerical bases supported for the pid of
630         the --attach command line argument.
631
632 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
633
634         * win32-low.c (win32_attach): Call OpenProcess before
635         DebugActiveProcess, not after.  Add last error output to error
636         call.
637
638 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
639
640         * win32-low.c (win32_get_thread_context)
641         (win32_set_thread_context): New functions.
642         (thread_rec): Use win32_get_thread_context.
643         (continue_one_thread, win32_resume): Use win32_set_thread_context.
644         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
645         field.
646
647 2007-12-03  Leo Zayas
648             Pedro Alves  <pedro_alves@portugalmail.pt>
649
650         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
651         global variables.
652         (child_add_thread): Minor cleanup.
653         (child_continue): Resume artificially suspended threads before
654         calling ContinueDebugEvent.
655         (suspend_one_thread): New.
656         (fake_breakpoint_event): New.
657         (get_child_debug_event): Change return type to int.  Check here if
658         gdb sent an interrupt request.  If a soft interrupt was requested,
659         fake a breakpoint event.  Return 0 if there is no event to handle,
660         and 1 otherwise.
661         (win32_wait): Don't check here if gdb sent an interrupt request.
662         Ensure there is a valid event to handle.
663         (win32_request_interrupt): Add soft interruption method as last
664         resort.
665
666 2007-12-03  Leo Zayas
667             Pedro Alves  <pedro_alves@portugalmail.pt>
668
669         * win32-low.h (win32_thread_info): Add descriptions to the
670         structure members.  Replace `suspend_count' counter by a
671         `suspended' flag.
672         * win32-low.c (thread_rec): Update condition of when to get the
673         context from the inferior.  Rely on ContextFlags being set if it
674         has already been retrieved.  Only suspend the inferior thread if
675         we haven't already.  Warn if that fails.
676         (continue_one_thread): s/suspend_count/suspended/.  Only call
677         ResumeThread once.  Warn if that fails.
678
679 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
680
681         * win32-low.c (win32_wait): Don't read from the inferior when it
682         has already exited.
683
684 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
685
686         * Makefile.in (win32_low_h): New variable.
687         (win32-low.o): Add dependency on $(win32_low_h).
688         (win32-arm-low.o, win32-i386-low.o): New rules.
689
690 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
691
692         * hostio.c: Correct copyright year.
693
694 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
695
696         * Makefile.in (OBS): Add hostio.o.
697         (hostio.o): New rule.
698         * server.h (handle_vFile): Declare.
699         * hostio.c: New file.
700         * server.c (handle_v_requests): Take packet_len and new_packet_len
701         for binary packets.  Call handle_vFile.
702         (main): Update call to handle_v_requests.
703
704 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
705
706         * linux-low.c: Include <sched.h>.
707
708 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
709
710         * linux-low.c (linux_tracefork_grandchild): New.
711         (linux_tracefork_child): Use clone.
712         (linux_test_for_tracefork): Use clone; allocate and free a stack.
713
714 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
715
716         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
717
718 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
719
720         * linux-low.c (handle_extended_wait): Handle unexpected signals.
721
722 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
723
724         * inferiors.c (change_inferior_id): Delete.
725         (add_pid_to_list, pull_pid_from_list): New.
726         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
727         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
728         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
729         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
730         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
731         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
732         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
733         (using_threads): Always set to 1.
734         (handle_extended_wait): New.
735         (add_process): Do not set TID.
736         (linux_create_inferior): Set must_set_ptrace_flags.
737         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
738         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
739         (linux_thread_alive): Rename TID argument to LWPID.
740         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
741         (linux_wait_for_event): Do not use TID or check using_threads.  Update
742         call to dead_thread_notify.  Call handle_extended_wait.
743         (linux_create_inferior): Use PTRACE_SETOPTIONS.
744         (send_sigstop): Delete sigstop_sent.
745         (wait_for_sigstop): Avoid TID.
746         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
747         (linux_test_for_tracefork): New.
748         (linux_lookup_signals): Use thread_db_active and
749         linux_supports_tracefork_flag.
750         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
751         * linux-low.h (get_process_thread): Avoid TID.
752         (struct process_ifo): Move thread_known and tid to the end.  Remove
753         sigstop_sent.
754         (linux_attach_lwp, thread_db_init): Update prototypes.
755         * server.h (change_inferior_id): Delete prototype.
756         (add_pid_to_list, pull_pid_from_list): New prototypes.
757         * thread-db.c (thread_db_use_events): New.
758         (find_first_thread): Rename to...
759         (find_one_thread): ...this.  Update callers and messages.  Do not
760         call fatal.  Check thread_db_use_events.  Do not call
761         change_inferior_id or new_thread_notify.
762         (maybe_attach_thread): Update.  Do not call new_thread_notify.
763         (thread_db_init): Set thread_db_use_events.  Check use_events.
764         * utils.c (fatal, warning): Correct message prefix.
765
766 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
767
768         * Makefile.in (clean): Remove new files.
769         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
770         (powerpc-64.o, powerpc-64.c): New rules.
771         * configure.srv: Use alternate register sets for powerpc64-*-linux*
772         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
773         with SPE.
774         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
775         SPE targets.
776         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
777         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
778         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
779         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
780         (target_regsets): Add AltiVec and SPE register sets.
781         * configure.ac: Check for AltiVec and SPE.
782         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
783         (ppc_fill_vrregset, ppc_store_vrregset): New.
784         (target_regsets): Add AltiVec register set.
785         * configure: Regenerated.
786
787 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
788
789         * linux-low.c (O_LARGEFILE): Define.
790         (linux_read_memory): Use /proc/PID/mem.
791         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
792         * configure, config.in: Regenerated.
793
794 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
795
796         * linux-low.c (linux_wait_for_event): Do not pass signals while
797         single-stepping.
798
799 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
800
801         * win32-low.c (create_process): New.
802         (win32_create_inferior): Use create_process instead of
803         CreateProcess.  If create_process failed retry appending an ".exe"
804         suffix.  Store the GetLastError result immediatelly after
805         create_process calls and use it on the call to error.
806
807 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
808
809         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
810
811 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
812
813         * configure.ac: Switch license to GPLv3.
814
815 2007-08-01  Michael Snyder  <msnyder@access-company.com>
816
817         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
818
819 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
820
821         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
822         typedef.
823         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
824         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
825         CloseToolhelp32Snapshot.
826         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
827         CloseToolhelp32Snapshot.
828
829 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
830
831         * server.c (main): Check for inferior exit before main loop.
832
833 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
834
835         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
836         instead of on tmp_desc.
837
838 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
839             Daniel Jacobowitz  <dan@codesourcery.com>
840
841         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
842         (add_thread): Minor cleanups.
843         (clear_inferiors): Move lower in the file.  Clear the DLL
844         list.
845         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
846         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
847         (xml_escape_text): New.
848         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
849         for qSupported.
850         (handle_v_cont): Report errors.
851         (gdbserver_version): Update.
852         (main): Correct size of own_buf.  Do not report initial DLL events.
853         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
854         (unloaded_dll, xml_escape_text): New.
855         * win32-low.c (enum target_waitkind): Update comments.
856         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
857         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
858         (win32_EnumProcessModules, win32_GetModuleInformation)
859         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
860         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
861         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
862         (win32_Module32First, win32_Module32Next, load_toolhelp)
863         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
864         (get_child_debug_event): Handle DLL events.
865         (win32_wait): Likewise.
866
867 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
868
869         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
870         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
871
872 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
873
874         * win32-low.c (handle_output_debug_string): Ignore event if not
875         waiting.
876
877 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
878
879         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
880
881 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
882
883         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
884
885 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
886
887         * inferiors.c (change_inferior_id): Add comment.
888         * linux-low.c (check_removed_breakpoint): Add an early
889         prototype.  Improve debug output.
890         (linux_attach): Doc update.
891         (linux_detach_one_process, linux_detach): Clean up before releasing
892         each process.
893         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
894         * linux-low.h (struct process_info): Doc improvement.
895         * mem-break.c (delete_all_breakpoints): New.
896         * mem-break.h (delete_all_breakpoints): New prototype.
897         * thread-db.c (find_first_thread): New.
898         (thread_db_create_event): Call it instead of
899         thread_db_find_new_threads.  Clean up unused variables.
900         (maybe_attach_thread): Remove first thread handling.
901         (thread_db_find_new_threads): Use find_first_thread.
902         (thread_db_get_tls_address): Likewise.
903
904 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
905
906         * thread-db.c (thread_db_find_new_threads): Add prototype.
907         (thread_db_create_event): Check for the main thread before adding
908         a new thread.
909         (maybe_attach_thread): Only enable event reporting if TID == 0.
910         (thread_db_get_tls_address): Check for new threads.
911
912 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
913
914         * linux-low.c (linux_create_inferior): Try execv before execvp.
915         * spu-low.c (spu_create_inferior): Likewise.
916
917 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
918
919         * linux-low.c (linux_create_inferior): Change execv to execvp.
920         * spu-low.c (spu_create_inferior): Likewies.
921
922 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
923
924         * Makefile.in (clean): Clean new files instead of deleted ones.
925         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
926         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
927         rules.
928         * configure.srv: Specify XML files and new regformats for MIPS and
929         MIPS64 GNU/Linux.
930         * linux-mips-low.c (mips_num_regs): Set to only used registers.
931         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
932         an entry for the restart register.
933         (mips_cannot_fetch_register, mips_cannot_store_register)
934         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
935         register names to match the XML descriptions.
936         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
937         restart register instead of $0.
938
939 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
940             Markus Deuling  <deuling@de.ibm.com>
941
942         * remote-utils.c (decode_xfer_write): New function.
943         * server.h (decode_xfer_write): Add prototype.
944         * server.c (handle_query): Add PACKET_LEN argument.  Support
945         qXfer:spu:read and qXfer:spu:write packets.
946         (main): Pass packet_len to handle_query.
947         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
948         * target.h (target_ops): Add qxfer_spu.
949
950 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
951
952         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
953         accessing non-seekable spufs files.
954
955 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
956
957         * server.c (handle_query): Add reply for qC packet. 
958
959 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
960             Leo Zayas  <lerele@champenstudios@com>
961
962         * server.h (check_remote_input_interrupt_request): New function.
963         * remote_utils.c (INVALID_DESCRIPTOR): New define.
964         (remote_desc): Initialize with INVALID_DESCRIPTOR.
965         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
966         (check_remote_input_interrupt_request): New function.
967         * server.h (check_remote_input_interrupt_request): Declare.
968         * win32-low.c (winapi_DebugBreakProcess,
969         winapi_GenerateConsoleCtrlEvent): New typedefs.
970         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
971         to 250 ms.
972         (win32_wait): Check for remote interrupt request
973         with check_remote_input_interrupt_request.
974         (win32_request_interrupt): New function.
975         (win32_target_op): Set request_interrupt to win32_request_interrupt.
976
977 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
978
979         * win32-low.c (debug_registers_changed,
980         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
981         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
982         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
983         (thread_rec): Get context using the low target.
984         (child_add_thread): Call thread_added on the low target,
985         which does the same thing.
986         (regptr): Delete.
987         (do_initial_child_stuff): Remove debug registers references.
988         Set context using the low target.  Resume threads after
989         setting the contexts.
990         (child_continue): Remove dead variable.  Remove debug
991         registers references.
992         (child_fetch_inferior_registers): Go through the low target.
993         (do_child_store_inferior_registers): Remove.
994         (child_store_inferior_registers): Go through the low target.
995         (win32_resume): Remove debug registers references.
996         Set context using the low target.
997         (handle_exception): Change return type to void.  Don't record
998         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
999         first chance exception.
1000         (get_child_debug_event): Change return type to void.  Remove 
1001         goto loop.  Always return after waiting for debug event.
1002         (win32_wait): Convert to switch statement.  Handle spurious
1003         events.
1004
1005         * win32-i386-low.c (debug_registers_changed,
1006         debug_registers_used): New.
1007         (initial_stuff): Rename to ...
1008         (i386_initial_stuff): ... this.  Clear debug registers
1009         state variables.
1010         (store_debug_registers): Delete.
1011         (i386_get_thread_context): New.
1012         (load_debug_registers): Delete.
1013         (i386_set_thread_context): New.
1014         (i386_thread_added): New.
1015         (single_step): Rename to ...
1016         (i386_single_step): ... this.
1017         (do_fetch_inferior_registers): Rename to ...
1018         (i386_fetch_inferior_register): ... this.
1019         (i386_store_inferior_register): New.
1020         (the_low_target): Adapt to new interface.
1021
1022         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1023         (arm_get_thread_context): New.
1024         (arm_set_thread_context): New.
1025         (regptr): New.
1026         (do_fetch_inferior_registers): Rename to ...
1027         (arm_fetch_inferior_register): ... this.
1028         (arm_store_inferior_register): New.
1029         (arm_wince_breakpoint): Reimplement as unsigned long.
1030         (arm_wince_breakpoint_len): Define.
1031         (the_low_target): Adapt to new interface.
1032
1033         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1034         load_debug_registers.  Add get_thread_context, set_thread_context,
1035         thread_added and store_inferior_register.  Rename
1036         fetch_inferior_registers to fetch_inferior_register.
1037         (regptr): Remove declaration.
1038
1039 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
1040
1041         * linux-low.c (linux_detach): Change return type to int.  Return 0.
1042         * spu-low.c (spu_detach): Likewise.
1043
1044 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
1045
1046         * target.h (target_ops): Change return type of detach to int.
1047         Add join.
1048         (join_inferior): New.
1049         * server.c (main): Don't skip detach support on mingw32.
1050         If the inferior doesn't support detaching return error.
1051         Call join_inferior instead of using waitpid.
1052         * linux-low.c (linux_join): New.
1053         (linux_target_op): Add linux_join.
1054         * spu-low.c (spu_join): New.
1055         (spu_target_ops): Add spu_join.
1056         * win32-low.c (win32_detach): Adapt to new interface.
1057         Reopen current_process_handle before detaching.  Issue a child
1058         resume before detaching.
1059         (win32_join): New.
1060         (win32_target_op): Add win32_join.
1061
1062 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
1063
1064         * win32-low.c (win32-attach): Fix return value.
1065         * target.h (target_ops): Describe ATTACH return values.
1066
1067 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
1068
1069         * win32-low.c (GETPROCADDRESS): Define.
1070         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
1071         (winapi_DebugSetProcessKillOnExit): Likewise.
1072         (win32_create_inferior): Force usage of ansi CreateProcessA.
1073         (win32_attach): Use GETPROCADDRESS.
1074         (win32_detach): Likewise.
1075
1076 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
1077
1078         * win32-low.c (win32_wait): Don't use WSTOPSIG.
1079
1080 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
1081
1082         * win32-low.c: Commit leftover changes from 2007-03-29.
1083
1084 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
1085
1086         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1087         fields short instead of int.  Add explicit padding.
1088         (i387_cache_to_fsave): Remove unnecessary casts.
1089         (i387_fsave_to_cache): Doc fix.
1090         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1091
1092 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
1093
1094         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1095         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1096
1097 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
1098
1099         * configure.srv (arm*-*-mingw32ce*): Move near the other
1100         arm targets.
1101
1102 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
1103
1104         * configure.ac: Add errno checking.
1105         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1106         sys/file.h and malloc.h.
1107         (AC_CHECK_DECLS): Add perror.
1108         (srv_mingwce): Handle.
1109         * configure.srv (i[34567]86-*-cygwin*): Add
1110         win32-i386-low.o to srv_tgtobj.
1111         (i[34567]86-*-mingw*): Likewise.
1112         (arm*-*-mingw32ce*): Add case.
1113         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1114         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1115         [__MINGW32CE__] (strerror): New function.
1116         [__MINGW32CE__] (errno): Define to GetLastError.
1117         [__MINGW32CE__] (COUNTOF): New macro.
1118         (remote_open): Remove extra close call.
1119         * mem-break.c (delete_breakpoint_at): New function.
1120         * mem-break.h (delete_breakpoint_at): Declare.
1121         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1122         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1123         [USE_WIN32API] (read, write): Add char* casts.
1124         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1125         * server.h: Include wincecompat.h on Windows CE.
1126         [HAVE_ERRNO_H]: Check.
1127         (perror): Declare if not declared.
1128         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1129         (perror_with_name): Remove errno declaration.
1130         * wincecompat.h: New.
1131         * wincecompat.c: New.
1132         * win32-low.h: New.
1133         * win32-arm-low.c: New.
1134         * win32-i386-low.c: New.
1135         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1136         (OUTMSG2): Make it safe.
1137         (_T): New macro.
1138         (COUNTOF): New macro.
1139         (NUM_REGS): Get it from the low target.
1140         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1141         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1142         (thread_rec): Let low target handle debug registers.
1143         (child_add_thread): Likewise.
1144         (child_init_thread_list): Likewise.
1145         (continue_one_thread): Likewise.
1146         (regptr): New.
1147         (do_child_fetch_inferior_registers): Move to ...
1148         * win32-i386-low.c: ... here, and rename to ...
1149         (do_fetch_inferior_registers): ... this.
1150         * win32-low.c (child_fetch_inferior_registers): 
1151         Go through the low target.
1152         (do_child_store_inferior_registers): Use regptr.
1153         (strwinerror): New function.
1154         (win32_create_inferior): Handle Windows CE.
1155         Use strwinerror instead of strerror on Windows error
1156         codes.  Add program to the error output.
1157         Don't close the main thread handle on Windows CE.
1158         (win32_attach): Use coredll.dll on Windows CE.
1159         (win32_kill): Close current process and current
1160         thread handles.
1161         (win32_detach): Use coredll.dll on Windows CE.
1162         (win32_resume): Let low target handle debug registers, and
1163         step request.
1164         (handle_exception): Add/Remove initial breakpoint.  Avoid
1165         non-existant WSTOPSIG on Windows CE.
1166         (win32_read_inferior_memory): Cast to remove warning.
1167         (win32_arch_string): Go through the low target.
1168         (initialize_low): Call set_breakpoint_data with the low
1169         target's breakpoint.
1170         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1171         FOP_REGNUM, mappings): Move to ...
1172         * win32-i386-low.c: ... here.
1173         * win32-low.c (win32_thread_info): Move to ...
1174         * win32-low.h: ... here.
1175         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1176         win32-arm-low.c and wincecompat.c.
1177         (all:): Add $EXEEXT.
1178         (install-only:): Likewise.
1179         (gdbserver:): Likewise.
1180         (gdbreplay:): Likewise.
1181         * config.in: Regenerate.
1182         * configure: Regenerate.
1183
1184 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
1185
1186         * win32-low.c: Rename typedef thread_info to
1187         win32_thread_info throughout.
1188
1189 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
1190
1191         * win32-i386-low.c: Rename to ...
1192         * win32-low.c: ... this.
1193         * configure.srv: Replace win32-i386-low.o with win32-low.o.
1194         * Makefile.in: Likewise.
1195
1196 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
1197
1198         * remote-utils.c (monitor_output): Constify msg parameter.
1199         * server.h (monitor_output): Likewise.
1200         * win32-i386-low.c (handle_output_debug_string): New.
1201         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1202         handle_output_debug_string.
1203         (get_child_debug_event): Likewise.
1204
1205 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
1206
1207         * server.c (main): Correct strtoul check.
1208
1209 2007-03-27  Jon Ringle  <jon@ringle.org>
1210
1211         * linux-low.c: Check __ARCH_HAS_MMU__ also.
1212
1213 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
1214
1215         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1216
1217 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
1218
1219         * terminal.h: Check HAVE_SGTTY_H.
1220
1221 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
1222
1223         * remote-utils.c (remote_open): Print out the assigned port number.
1224
1225 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
1226
1227         * remote-utils.c (monitor_output): New function.
1228         * server.c (debug_threads): Define here.
1229         (monitor_show_help): New function.
1230         (handle_query): Handle qRcmd.
1231         (main): Do not handle 'd' packet.
1232         * server.h (debug_threads, remote_debug, monitor_output): Declare.
1233         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1234         of debug_threads.
1235
1236 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
1237
1238         * Makefile.in (EXEEXT): New.
1239         (clean): Use $(EXEEXT).
1240
1241 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
1242
1243         * target.h (target_ops): Rename send_signal to request_interrupt,
1244         and remove enum target_signal parameter.
1245         * linux-low.c (linux_request_interrupt): Rename from
1246         linux_send_signal, and always send SIGINT.
1247         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1248         and always send SIGINT.
1249         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1250         of send_signal.
1251         (input_interrupt): Likewise.
1252
1253 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
1254
1255         * server.c (get_features_xml): Check if target implemented
1256         arch_string.
1257         * win32-i386-low.c (win32_arch_string): New.
1258         (win32_target_ops): Add win32_arch_string as arch_string member.
1259
1260 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
1261
1262         * spu-low.c (spu_arch_string): New.
1263         (spu_target_ops): Add spu_arch_string.
1264
1265 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
1266
1267         * remote-utils.c: Remove HAVE_TERMINAL_H check.
1268         * configure.ac: Do not check for terminal.h.
1269         * configure, config.in: Regenerated.
1270
1271 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
1272
1273         * Makefile.in (OBS): Add $(XML_BUILTIN).
1274         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1275         (clean): Update.
1276         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1277         (arm-with-iwmmxt.c): New.
1278         * config.in, configure: Regenerate.
1279         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
1280         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
1281         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1282         (arm*-*-linux*): Add iWMMXt and regset support.
1283         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1284         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1285         (arm_store_wmmxregset, target_regsets): New.
1286         * server.c (get_features_xml): Take annex argument.  Check builtin
1287         XML documents.
1288         (handle_query): Handle multiple annexes.
1289
1290 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
1291
1292         * remote-utils.c [USE_WIN32API] (read, write): Define.
1293         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1294         write.
1295
1296 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
1297
1298         * linux-i386-low.c (the_low_target): Set arch_string.
1299         * linux-x86-64-low.c (the_low_target): Likewise.
1300         * linux-low.c (linux_arch_string): New.
1301         (linux_target_ops): Add it.
1302         * linux-low.h (struct linux_target_ops): Add arch_string.
1303         * server.c (write_qxfer_response): Use const void * for DATA.
1304         (get_features_xml): New.
1305         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
1306         * target.h (struct target_ops): Add arch_string method.
1307
1308 2007-01-03  Denis Pilat  <denis.pilat@st.com>
1309             Daniel Jacobowitz  <dan@codesourcery.com>
1310
1311         * linux-low.c (linux_kill): Handle being called with no threads.
1312         * win32-i386-low.c (win32_kill): Likewise.
1313         (get_child_debug_event): Clear current_process_handle.
1314
1315 2006-12-30  Denis PILAT  <denis.pilat@st.com>
1316             Daniel Jacobowitz  <dan@codesourcery.com>
1317
1318         * remote-utils.c (remote_open): Check the type of specified
1319         serial port devices before opening them.
1320         * server.c (main): Kill the inferior if an error occurs during
1321         the first remote_open.
1322
1323 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
1324
1325         * README: Update supported targets.
1326
1327 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
1328
1329         * Makefile.in (clean): Remove reg-mips64.c.
1330         (reg-mips64.c, reg-mips64.o): New rules.
1331         * configure.srv: Handle mips64.  Include regset support for mips.
1332         * linux-mips-low.c (union mips_register): New.
1333         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1334         (mips_breakpoint, mips_breakpoint_at): Use int.
1335         (mips_collect_register, mips_supply_register)
1336         (mips_collect_register_32bit, mips_supply_register_32bit)
1337         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1338         (mips_store_fpregset, target_regsets): New.
1339         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1340
1341 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1342
1343         * configure.srv: Add target "spu*-*-*".
1344         * Makefile.in (clean): Remove reg-spu.c.
1345         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1346         * spu-low.c: New file.
1347
1348 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
1349
1350         * configure.ac: Correct td_thr_tls_get_addr test.
1351         * configure: Regenerated.
1352
1353 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
1354
1355         * linux-low.c (linux_wait_for_event): Reformat.  Use the
1356         pass_signals array.
1357         * remote-utils.c (decode_address_to_semicolon): New.
1358         * server.c (pass_signals, handle_general_set): New.
1359         (handle_query): Mention QPassSignals for qSupported.
1360         (main): Call handle_general_set.
1361         * server.h (pass_signals, decode_address_to_semicolon): New.
1362
1363 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
1364
1365         * server.c (handle_query): Correct error handling for read_auxv.
1366
1367 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
1368
1369         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1370         and srv_linux_thread_db to yes.
1371         * linux-s390-low.c (s390_fill_gregset): New function.
1372         (target_regsets): Define data structure.
1373
1374 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
1375
1376         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1377         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
1378         * config.in, configure: Regenerated.
1379         * inferiors.c (gdb_id_to_thread): New function.
1380         (gdb_id_to_thread_id): Use it.
1381         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1382         * linux-low.h (struct process_info): Add th member.
1383         (thread_db_get_tls_address): New prototype.
1384         * remote-utils.c (decode_address): Make non-static.
1385         * server.c (handle_query): Handle qGetTLSAddr.
1386         * server.h (gdb_id_to_thread, decode_address): New prototypes.
1387         * target.h (struct target_ops): Add get_tls_address.
1388         * thread-db.c (maybe_attach_thread): Save the thread handle.
1389         (thread_db_get_tls_address): New.
1390
1391 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
1392
1393         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1394         (linux_resume_one_process): Take a siginfo_t *.  Update all
1395         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
1396         (struct pending_signals): Add a siginfo_t.
1397         (linux_wait_for_process): Always set last_status.
1398         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1399         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1400         * linux-low.h (struct process_info): Add last_status.
1401
1402 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
1403
1404         * remote-utils.c (try_rle): New function.
1405         (putpkt_binary): Use it.
1406
1407 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
1408
1409         * Makefile.in (clean): Clean reg-x86-64-linux.c.
1410         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1411         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1412         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1413         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1414         point registers.
1415
1416 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
1417
1418         * server.c (terminal_fd): New variable.
1419         (old_foreground_pgrp): Likewise.
1420         (restore_old_foreground_pgrp): New function.
1421         (start_inferior): Record the terminal file descriptor in terminal_fd
1422         and its original foreground group in old_foreground_pgrp.  Register
1423         restore_old_foreground_pgrp with atexit().
1424
1425 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
1426
1427         * server.c (handle_query): Correct qPart to qXfer.
1428
1429 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
1430
1431         * configure.ac: Check for more headers which are missing on
1432         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
1433         * configure.srv: Add Cygwin and mingw32.
1434         * remote-utils.c: Don't include headers unconditionally which
1435         are missing on mingw32.  Include <winsock.h> for mingw32.
1436         (remote_open): Adjust for mingw32 support.  Flush
1437         standard error after writing to it.
1438         (remote_close, putpkt_binary, input_interrupt, block_async_io)
1439         (unblock_async_io, enable_async_io, disable_async_io)
1440         (readchar, getpkt): Update for Winsock support.
1441         (prepare_resume_reply): Expect a protocol signal number.
1442         * server.c: Disable <sys/wait.h> on mingw32.
1443         (start_inferior): Adjust for mingw32 support.  Flush
1444         standard error after writing to it.
1445         (attach_inferior): Likewise.  Use protocol signal
1446         numbers.
1447         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
1448         and names.
1449         * win32-i386-low.c: New file.
1450         * Makefile.in (XM_CLIBS): Set.
1451         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1452         (win32-i386-low.o): New dependency rule.
1453         * linux-low.c (linux_wait): Use target signal numbers.
1454         * target.h (struct target_ops): Doc fix.
1455         * server.h (target_signal_to_name): New prototype.
1456         * gdbreplay.c: Don't include headers unconditionally which
1457         are missing on mingw32.  Include <winsock.h> for mingw32.
1458         (remote_close, remote_open): Adjust for Winsock support.
1459         * configure, config.in: Regenerated.
1460
1461 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
1462
1463         * server.c (decode_xfer_read, write_qxfer_response): New.
1464         (handle_query): Take a packet length argument.  Handle
1465         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
1466         the qSupported response.
1467         (main): Update call to handle_query.
1468
1469 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
1470
1471         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1472         (putpkt_binary): Renamed from putpkt and adjusted for binary
1473         data.
1474         (putpkt): New wrapper for putpkt_binary.
1475         (readchar): Don't mask off the high bit.
1476         (decode_X_packet): New function.
1477         * server.c (main): Call putpkt_binary if a handler sets the packet
1478         length.  Save the length of the incoming packet.  Handle 'X'.
1479         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1480
1481 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
1482
1483         * server.c (handle_query): Handle qSupported.
1484
1485 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
1486
1487         * remote-utils.c (all_symbols_looked_up): New variable.
1488         (look_up_one_symbol): Check it.
1489         * server.h (look_up_one_symbol): New declaration.
1490         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1491
1492 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
1493
1494         * Makefile.in (linux-arm-low.o): Update dependencies.
1495         * linux-arm-low.c: Include "gdb_proc_service.h".
1496         (PTRACE_GET_THREAD_AREA): Define.
1497         (ps_get_thread_area): New function.
1498
1499 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
1500
1501         * configure.srv (m68k*-*-uclinux*): New target.
1502         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1503         (linux_resume_one_process): Remove extraneous cast.
1504         (linux_read_offsets): New.
1505         (linux_target_op): Add linux_read_offsets on mmuless systems.
1506         * server.c (handle_query): Add qOffsets logic.
1507         * target.h (struct target_ops): Add read_offsets.
1508
1509 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
1510
1511         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1512         (PTRACE_GET_THREAD_AREA): Define.
1513         (ps_get_thread_area): New function.
1514         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1515         (linux-x86-64-low.o): Update.
1516
1517 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
1518
1519         * configure.ac: Remove checks for prfpregset_t.
1520         * gdb_proc_service.h: New file.
1521         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1522         new "gdb_proc_service.h".
1523         * proc-service.c: Likewise.
1524         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1525         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1526         * Makefile.in (gdb_proc_service_h): Updated.
1527         * configure, config.in: Regenerated.
1528
1529 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
1530
1531         * remote-utils.c (prepare_resume_reply): Move declaration
1532         of gdb_id_from_wait to the top of the block.
1533
1534 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
1535
1536         * linux-low.c (regsets_store_inferior_registers): Read the regset
1537         from the target before filling it.
1538
1539 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
1540
1541         * server.c (attach_inferior): Return SIGTRAP for a successful
1542         attach.
1543
1544 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
1545
1546         * Makefile.in (OBS): Add version.o.
1547         (STAGESTUFF): Delete.
1548         (version.o): Add dependencies.
1549         (version.c): Replace rule.
1550         (clean): Remove version.c.
1551         * server.c (gdbserver_version): New.
1552         (gdbserver_usage): Use printf.
1553         (main): Handle --version and --help.
1554         * server.h (version, host_name): Add declarations.
1555
1556 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
1557
1558         * linux-arm-low.c: 
1559         * linux-arm-low.c: 
1560         * inferiors.c: 
1561         * i387-fp.h: 
1562         * i387-fp.c: 
1563         * gdbreplay.c: 
1564         * regcache.c: 
1565         * proc-service.c: 
1566         * mem-break.h: 
1567         * mem-break.c: 
1568         * linux-x86-64-low.c: 
1569         * linux-sh-low.c: 
1570         * linux-s390-low.c: 
1571         * linux-ppc64-low.c: 
1572         * linux-ppc-low.c: 
1573         * linux-mips-low.c: 
1574         * linux-m68k-low.c: 
1575         * linux-m32r-low.c: 
1576         * linux-low.h: 
1577         * linux-low.c: 
1578         * linux-ia64-low.c: 
1579         * linux-i386-low.c: 
1580         * linux-crisv32-low.c: 
1581         * thread-db.c: 
1582         * terminal.h: 
1583         * target.h: 
1584         * target.c: 
1585         * server.h: 
1586         * server.c: 
1587         * remote-utils.c: 
1588         * regcache.h: 
1589         * utils.c: 
1590         * Makefile.in: 
1591         * configure.ac: 
1592         * gdbserver.1: Add (C) after Copyright.  Update the FSF
1593         address.
1594
1595 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
1596
1597         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1598         (arm_breakpoint_at): Recognize both breakpoints.
1599         (the_low_target): Use the correct breakpoint instruction.
1600
1601 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
1602
1603         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1604         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1605         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1606         (the_low_target): Update.
1607
1608 2005-10-25  Andreas Schwab  <schwab@suse.de>
1609
1610         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1611
1612         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1613         (ia64_num_regs): Reduce to 462.
1614
1615 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
1616
1617         * acinclude.m4: Correct quoting.
1618         * aclocal.m4: Regenerated.
1619
1620         Suggested by SZOKOVACS Robert <szo@ies.hu>:
1621         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1622         (thread_db_init): Call thread_db_err_str.
1623         * configure.ac: Check for TD_VERSION.
1624         * config.in, configure: Regenerated.
1625
1626 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1627
1628         * server.h (error, fatal, warning): Add ATTR_FORMAT.
1629
1630 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
1631
1632         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1633         is not available.  Define HAVE_PTRACE_GETREGS if it is.
1634         * config.in, configure: Regenerated.
1635         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1636         * linux-i386-low.c, linux-m68k-low.c: Update to use
1637         HAVE_PTRACE_GETREGS.
1638         * linux-low.c (regsets_fetch_inferior_registers)
1639         (regsets_store_inferior_registers): Only return 0 if we processed
1640         GENERAL_REGS.
1641         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1642         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1643
1644 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
1645
1646         * inferiors.c (struct thread_info): Add gdb_id.
1647         (add_thread): Add gdb_id argument.
1648         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1649         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1650         calls to add_thread.
1651         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1652         * server.c (handle_query): Use thread_to_gdb_id.
1653         (handle_v_cont, main): Use gdb_id_to_thread_id.
1654         * server.h (add_thread): Update prototype.
1655         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1656         prototypes.
1657
1658 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
1659
1660         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1661         left-padded registers.
1662         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1663         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1664
1665 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
1666
1667         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1668         * configure: Regenerate.
1669         * config.in: Regenerate.
1670         * server.h (NEED_DECLARATION_STRERROR):
1671         Replace with !HAVE_DECL_STRERROR.
1672
1673 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
1674
1675         * linux-low.c (linux_wait, linux_send_signal): Don't test
1676         an unsigned long variable for > 0 if it could be MAX_ULONG.
1677         * server.c (myresume): Likewise.
1678         * target.c (set_desired_inferior): Likewise.
1679
1680 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
1681
1682         * configure.ac: Simplify and improve check for socklen_t.
1683         * configure, config.in: Regenerate.
1684
1685 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
1686
1687         * acconfig.h: Remove.
1688         * configure.ac: Add a test for socklen_t.  Use three-argument
1689         AC_DEFINE throughout.
1690         * config.in: Regenerated using autoheader 2.59.
1691         * configure: Regenerated.
1692
1693         * gdbreplay.c (socklen_t): Provide a default.
1694         (remote_open): Use socklen_t.
1695         * remote-utils.c (socklen_t): Provide a default.
1696         (remote_open): Use socklen_t.
1697         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1698         unsigned char.
1699
1700         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1701         char for buffers.
1702         * linux-low.c (linux_read_memory, linux_write_memory)
1703         (linux_read_auxv): Likewise.
1704         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1705         (check_mem_write): Likewise.
1706         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1707         Likewise.
1708         * regcache.c (struct inferior_rgcache_data, registers_to_string)
1709         (registers_from_string, register_data): Likewise.
1710         * server.c (handle_query, main): Likewise.
1711         * server.h (convert_ascii_to_int, convert_int_to_ascii)
1712         (decode_M_packet): Likewise.
1713         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1714         * target.h (struct target_ops): Update read_memory, write_memory,
1715         and read_auxv.
1716         (read_inferior_memory, write_inferior_memory): Update.
1717         * linux-low.h (struct linux_target_ops): Change type of breakpoint
1718         to unsigned char *.
1719         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1720         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1721         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1722         linux-s390-low.c, linux-sh-low.c: Update for changes in
1723         read_inferior_memory and the_low_target->breakpoint.
1724
1725 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
1726
1727         * Makefile.in (SFILES): Add linux-ppc64-low.c.
1728         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1729         * configure.srv: Add powerpc64-*-linux*.
1730         * linux-ppc64-low.c: New file.
1731
1732 2005-05-23  Orjan Friberg  <orjanf@axis.com>
1733
1734         * linux-cris-low.c: New file with support for CRIS.
1735         * linux-crisv32-low.c: Ditto for CRISv32.
1736         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1737         (clean): Add reg-cris.c and reg-crisv32.c.
1738         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c, 
1739         reg-crisv32.o, and reg-crisv32.c to make rules.
1740         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1741         recognized targets.
1742
1743 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
1744
1745         * linux-low.c (fetch_register): Ensure buffer size is a multiple
1746         of sizeof (PTRACE_XFER_TYPE).
1747         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
1748
1749 2005-05-12  Orjan Friberg  <orjanf@axis.com>
1750
1751         * target.h (struct target_ops): Add insert_watchpoint, 
1752         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1753         pointers for hardware watchpoint support.
1754         * linux-low.h (struct linux_target_ops): Ditto.
1755         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1756         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
1757         to linux_target_ops.
1758         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1759         reply packet.
1760         * server.c (main): Recognize 'Z' and 'z' packets.
1761
1762 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
1763
1764         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1765         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1766         (the_low_target): Add new members.
1767
1768 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
1769
1770         * proc-service.c (ps_lgetregs): Search all_processes instead of
1771         all_threads.
1772
1773 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
1774
1775         * server.c (start_inferior): Change return type to int.
1776         (attach_inferior): Change sigptr to int *.
1777         (handle_v_cont, handle_v_requests): Change signal to int *.
1778         (main): Change signal to int.
1779
1780 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
1781
1782         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1783         * configure.srv: Add m32r*-*-linux*.
1784         * linux-m32r-low.c: New file.
1785
1786 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
1787
1788         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1789
1790 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
1791
1792         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1793         Take unsigned long arguments for PIDs.
1794         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1795         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1796         (wait_for_sigstop, linux_resume_one_process)
1797         (regsets_fetch_inferior_registers, linux_send_signal)
1798         (linux_read_auxv): Likewise.  Update the types of variables holding
1799         PIDs.  Update format string specifiers.
1800         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1801         * remote-utils.c (prepare_resume_reply): Likewise.
1802         * server.c (cont_thread, general_thread, step_thread)
1803         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1804         unsigned long.
1805         (handle_query): Update format specifiers.
1806         (handle_v_cont, main): Use strtoul for thread IDs.
1807         * server.h (struct inferior_list_entry): Use unsigned long for ID.
1808         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1809         (general_thread, step_thread, thread_from_wait)
1810         (old_thread_from_wait): Update.
1811         * target.h (struct thread_resume): Use unsigned long for THREAD.
1812         (struct target_ops): Use unsigned long for arguments to attach and
1813         thread_alive.
1814
1815 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
1816
1817         * acinclude.m4: Include bfd/bfd.m4 directly.
1818         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
1819         <agriffis@toolchain.org>.
1820         * aclocal.m4, configure: Regenerated.
1821
1822 2005-01-07  Andrew Cagney  <cagney@gnu.org>
1823
1824         * configure.ac: Rename configure.in, require autoconf 2.59.
1825         * configure: Re-generate.
1826
1827 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
1828
1829         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
1830         LIBS when finished.
1831         * aclocal.m4: Regenerated.
1832         * configure: Regenerated.
1833
1834 2004-11-21  Andreas Schwab  <schwab@suse.de>
1835
1836         * linux-m68k-low.c (m68k_num_gregs): Define.
1837         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1838         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1839         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1840         (m68k_breakpoint_at): New.  Add to the_low_target.
1841
1842         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1843         srv_linux_thread_db to yes.
1844
1845 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
1846
1847         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1848         (ARCH_SET_FS): Likewise.
1849         (ARCH_GET_FS): Likewise.
1850         (ARCH_GET_GS): Likewise.
1851
1852 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1853
1854         * linux-i386-low.c (ps_get_thread_area): New.
1855         * linux-x86-64-low.c (ps_get_thread_area): New.
1856         * linux-low.c: Include <sys/syscall.h>.
1857         (linux_kill_one_process): Don't kill the first thread here.
1858         (linux_kill): Kill the first thread here.
1859         (kill_lwp): New function.
1860         (send_sigstop, linux_send_signal): Use it.
1861         * proc-service.c: Clean up #ifdefs.
1862         (fpregset_info): Delete.
1863         (ps_lgetregs): Update and enable implementation.
1864         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1865         implementations.
1866         * remote-utils.c (struct sym_cache, symbol_cache): New.
1867         (input_interrupt): Print a clearer message.
1868         (async_io_enabled): New variable.
1869         (enable_async_io, disable_async_io): Use it.  Update comments.
1870         (look_up_one_symbol): Use the symbol cache.
1871         * thread-db.c (thread_db_look_up_symbols): New function.
1872         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
1873
1874 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1875
1876         * configure.in: Test for -rdynamic.
1877         * configure: Regenerated.
1878         * Makefile (INTERNAL_LDFLAGS): New.
1879         (gdbserver, gdbreplay): Use it.
1880
1881 2004-09-02  Andrew Cagney  <cagney@gnu.org>
1882
1883         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1884
1885 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
1886
1887         * linux-low.c (linux_wait): Clear all_processes list also.
1888
1889 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
1890
1891         * linux-low.c: Include <errno.h>.  Remove extern declaration of
1892         errno.
1893
1894 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
1895
1896         * gdbreplay.c, server.h, utils.c: Update copyright years.
1897
1898 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
1899
1900         * server.c (main): Print child status or termination signal from
1901         variable 'signal', not 'sig'.
1902
1903 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
1904
1905         * linux-low.c (linux_read_memory): Change return type to
1906         int.  Check for and return error from ptrace().
1907         * target.c (read_inferior_memory): Change return type to int.  Pass
1908         back return status from the_target->read_memory().
1909         * target.h (struct target_ops): Adapt *read_memory() prototype.
1910         Update comment.
1911         (read_inferior_memory): Adapt prototype.
1912         * server.c (main): Return an error packet if
1913         read_inferior_memory() returns an error.
1914
1915 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
1916
1917         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1918         Unify with other clean targets.
1919
1920 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1921
1922         * server.c (handle_v_cont): Call set_desired_inferior.
1923
1924 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1925
1926         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1927
1928 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1929
1930         * linux-low.c (linux_wait): Unblock async I/O.
1931         (linux_resume): Block and enable async I/O.
1932         * remote-utils.c (block_async_io, unblock_async_io): New functions.
1933         * server.h (block_async_io, unblock_async_io): Add prototypes.
1934
1935 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1936
1937         * remote-utils.c (remote_open): Print a status notice after
1938         opening a TCP port.
1939         * server.c (attach_inferior): Print a status notice after
1940         attaching.
1941
1942 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1943
1944         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1945
1946 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
1947
1948         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1949         error packet.
1950         * server.c, target.h: Update copyright years.
1951
1952 2004-02-25  Roland McGrath  <roland@redhat.com>
1953
1954         * target.h (struct target_ops): New member `read_auxv'.
1955         * server.c (handle_query): Handle qPart:auxv:read: query using that.
1956         * linux-low.c (linux_read_auxv): New function.
1957         (linux_target_ops): Initialize `read_auxv' member to that.
1958
1959 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1960
1961         Committed by Jim Blandy  <jimb@redhat.com>.
1962
1963         * linux-s390-low.c (s390_num_regs): Update.
1964         (s390_regmap): Remove control registers.  Use __s390x__ predefine
1965         instead of GPR_SIZE to distiguish s390 and s390x targets.
1966
1967 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
1968
1969         * linux-low.c: Update copyright year.
1970         (check_removed_breakpoint): Clear pending_is_breakpoint.
1971         (linux_set_resume_request, linux_queue_one_thread)
1972         (resume_status_pending_p): New functions.
1973         (linux_continue_one_thread): Use process->resume.
1974         (linux_resume): Only resume threads if there are no pending events.
1975         * linux-low.h (struct process_info): Add resume request
1976         pointer.
1977
1978 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
1979
1980         * regcache.c (new_register_cache): Clear the allocated register
1981         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1982
1983 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
1984
1985         * linux-low.c (linux_resume): Take a struct thread_resume *
1986         argument.
1987         (linux_wait): Update call.
1988         (resume_ptr): New static variable.
1989         (linux_continue_one_thread): Renamed from
1990         linux_continue_one_process.  Use resume_ptr.
1991         (linux_resume): Use linux_continue_one_thread.
1992         * server.c (handle_v_cont, handle_v_requests): New functions.
1993         (myresume): New function.
1994         (main): Handle 'v' case.
1995         * target.h (struct thread_resume): New type.
1996         (struct target_ops): Change argument of "resume" to struct
1997         thread_resume *.
1998         (myresume): Delete macro.
1999
2000 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
2001
2002         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2003         (uninstall): Support DESTDIR.
2004
2005 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
2006
2007         * configure.srv: Add xscale*linux copy of arm*linux entry.
2008
2009 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
2010
2011         * linux-arm-low.c (arm_reinsert_addr): New function.
2012         (the_low_target): Add arm_reinsert_addr.
2013
2014 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
2015
2016         * mem-break.c: Remove whitespace at end of file.
2017
2018 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
2019
2020         * configure.in: Check whether we need to prototype strerror.
2021         * server.h: Optionally prototype strerror.
2022         * gdbreplay.c (perror_with_name): Use strerror.
2023         * linux-low.c (linux_attach_lwp): Use strerror.
2024         * utils.c (perror_with_name): Use strerror.
2025         * config.in, configure: Regenerated.
2026
2027 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
2028
2029         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2030         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2031
2032 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
2033
2034         * Makefile.in (SFILES): Update.
2035         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2036         low-sun3.c: Remove files.
2037
2038 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
2039
2040         * linux-low.c: Move comment to linux_thread_alive where it belonged.
2041         (linux_detach_one_process, linux_detach): New functions.
2042         (linux_target_ops): Add linux_detach.
2043         * server.c (main): Handle 'D' packet.
2044         * target.h (struct target_ops): Add "detach" member.
2045         (detach_inferior): Define.
2046
2047 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
2048
2049         From Kelley Cook  <kelleycook@wideopenwest.com>:
2050         * configure.srv: Accept i[34567]86 variants.
2051
2052 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
2053
2054         * linux-low.c (linux_wait_for_event): Correct comment typos.
2055         (linux_resume_one_process): Call check_removed_breakpoint.
2056         (linux_send_signal): New function.
2057         (linux_target_ops): Add linux_send_signal.
2058         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2059         of kill.
2060         * target.h (struct target_ops): Add send_signal.
2061
2062 2003-05-29  Jim Blandy  <jimb@redhat.com>
2063
2064         * linux-low.c (usr_store_inferior_registers): Transfer buf in
2065         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
2066         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2067         away part of the register's value.
2068
2069 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
2070
2071         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2072         (linux_wait_for_event, linux_init_signals): Likewise.
2073
2074 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
2075
2076         * configure.in: Check for stdlib.h.
2077         * configure: Regenerated.
2078         * config.in: Regenerated.
2079
2080 2003-01-04  Andreas Schwab  <schwab@suse.de>
2081
2082         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2083
2084 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
2085
2086         * Makefile.in: Remove obsolete code.
2087
2088 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
2089
2090         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2091         defined(PT_FPR0_HI).
2092
2093 2002-11-17  Stuart Hughes  <seh@zee2.com>
2094
2095         * linux-arm-low.c (arm_num_regs): Increase.
2096         (arm_regmap): Include status register.
2097
2098 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
2099
2100         * linux-low.c (register_addr): Remove incorrect -1 check.
2101
2102 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
2103
2104         * linux-low.c (linux_create_inferior): Call setpgid.  Return
2105         the new PID.
2106         (unstopped_p, linux_signal_pid): Remove.
2107         (linux_target_ops): Remove linux_signal_pid.
2108         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2109         global instead of target method.
2110         * target.h (struct target_ops): Remove signal_pid.  Update comment
2111         for create_inferior.
2112         * server.c (signal_pid): New variable.
2113         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
2114         gdbserver.  Set the child to be the foreground process group.
2115         (attach_inferior): Set signal_pid.
2116
2117 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
2118
2119         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2120
2121 2002-08-20  Jim Blandy  <jimb@redhat.com>
2122
2123         * Makefile.in (LDFLAGS): Allow the configure script to establish a
2124         default for this.
2125
2126 2002-08-01  Andrew Cagney  <cagney@redhat.com>
2127
2128         * Makefile.in: Make chill references obsolete.
2129
2130 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
2131
2132         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2133         * configure: Regenerate.
2134         * config.in: Regenerate.
2135
2136 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
2137
2138         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2139         (perror_with_name, remote_close, remote_open, expect, play): Static.
2140
2141 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
2142
2143         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2144         byte offsets instead of an array of indexes.
2145         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2146
2147 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
2148
2149         * regcache.c: Add comment.
2150
2151 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
2152
2153         * thread-db.c: New file.
2154         * proc-service.c: New file.
2155         * acinclude.m4: New file.
2156         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2157         proc-service.o, and thread-db.o.
2158         (linux-low.o): Add USE_THREAD_DB.
2159         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2160         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2161         * aclocal.m4: Regenerated.
2162         * config.in: Regenerated.
2163         * configure: Regenerated.
2164         * configure.in: Check for proc_service.h, sys/procfs.h,
2165         thread_db.h, and linux/elf.h headrs.
2166         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2167         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
2168         Check for -lthread_db and thread support.
2169         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2170         PowerPC, and SuperH.
2171         * i387-fp.c: Constify arguments.
2172         * i387-fp.h: Likewise.
2173         * inferiors.c: (struct thread_info): Renamed from
2174         `struct inferior_info'.  Remove PID member.  Use generic inferior
2175         list header.  All uses updated.
2176         (inferiors, signal_pid): Removed.
2177         (all_threads): New variable.
2178         (get_thread): Define.
2179         (add_inferior_to_list): New function.
2180         (for_each_inferior): New function.
2181         (change_inferior_id): New function.
2182         (add_inferior): Removed.
2183         (remove_inferior): New function.
2184         (add_thread): New function.
2185         (free_one_thread): New function.
2186         (remove_thread): New function.
2187         (clear_inferiors): Use for_each_inferior and free_one_thread.
2188         (find_inferior): New function.
2189         (find_inferior_id): New function.
2190         (inferior_target_data): Update argument type.
2191         (set_inferior_target_data): Likewise.
2192         (inferior_regcache_data): Likewise.
2193         (set_inferior_regcache_data): Likewise.
2194         * linux-low.c (linux_bp_reinsert): Remove.
2195         (all_processes, stopping_threads, using_thrads)
2196         (struct pending_signals, debug_threads, pid_of): New.
2197         (inferior_pid): Replace with macro.
2198         (struct inferior_linux_data): Remove.
2199         (get_stop_pc, add_process): New functions.
2200         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2201         Use add_process and add_thread.
2202         (linux_attach_lwp): New function, based on old linux_attach.  Use
2203         add_process and add_thread.  Set stop_expected for new threads.
2204         (linux_attach): New function.
2205         (linux_kill_one_process): New function.
2206         (linux_kill): Kill all LWPs.
2207         (linux_thread_alive): Use find_inferior_id.
2208         (check_removed_breakpoints, status_pending_p): New functions.
2209         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2210         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
2211         struct for the found process.
2212         (linux_wait_for_event): New function.
2213         (linux_wait): Use it.  Support LWPs.
2214         (send_sigstop, wait_for_sigstop, stop_all_processes)
2215         (linux_resume_one_process, linux_continue_one_process): New functions.
2216         (linux_resume): Support LWPs.
2217         (REGISTER_RAW_SIZE): Remove.
2218         (fetch_register): Use register_size instead.  Call supply_register.
2219         (usr_store_inferior_registers): Likewise.  Call collect_register.
2220         Fix recursive case.
2221         (regsets_fetch_inferior_registers): Improve error message.
2222         (regsets_store_inferior_registers): Add debugging.
2223         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2224         (unstopped_p, linux_signal_pid): New functions.
2225         (linux_target_ops): Add linux_signal_pid.
2226         (linux_init_signals): New function.
2227         (initialize_low): Call it.  Initialize using_threads.
2228         * regcache.c (inferior_regcache_data): Add valid
2229         flag.
2230         (get_regcache): Fetch registers lazily.  Add fetch argument
2231         and update all callers.
2232         (regcache_invalidate_one, regcache_invalidate): New
2233         functions.
2234         (new_register_cache): Renamed from create_register_cache.
2235         Return the new regcache.
2236         (free_register_cache): Change argument to a void *.
2237         (registers_to_string, registers_from_string): Call get_regcache
2238         with fetch flag set.
2239         (register_data): Make static.  Pass fetch flag to get_regcache.
2240         (supply_register): Call get_regcache with fetch flag clear.
2241         (collect_register): Call get_regcache with fetch flag set.
2242         (collect_register_as_string): New function.
2243         * regcache.h: Update.
2244         * remote-utils.c (putpkt): Flush after debug output and use
2245         stderr.
2246         Handle input interrupts while waiting for an ACK.
2247         (input_interrupt): Use signal_pid method.
2248         (getpkt): Flush after debug output and use stderr.
2249         (outreg): Use collect_register_as_string.
2250         (new_thread_notify, dead_thread_notify): New functions.
2251         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
2252         and general_thread.
2253         (look_up_one_symbol): Flush after debug output.
2254         * server.c (step_thread, server_waiting): New variables.
2255         (start_inferior): Don't use signal_pid.  Update call to mywait.
2256         (attach_inferior): Update call to mywait.
2257         (handle_query): Handle qfThreadInfo and qsThreadInfo.
2258         (main): Don't fetch/store registers explicitly.  Use
2259         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
2260         calls to mywait.
2261         * server.h: Update.
2262         (struct inferior_list, struct_inferior_list_entry): New.
2263         * target.c (set_desired_inferior): New.
2264         (write_inferior_memory): Constify.
2265         (mywait): New function.
2266         * target.h: Update.
2267         (struct target_ops): New signal_pid method.
2268         (mywait): Removed macro, added prototype.
2269
2270         * linux-low.h (regset_func): Removed.
2271         (regset_fill_func, regset_store_func): New.
2272         (enum regset_type): New.
2273         (struct regset_info): Add type field.  Use new operation types.
2274         (struct linux_target_ops): stop_pc renamed to get_pc.
2275         Add decr_pc_after_break and breakpoint_at.
2276         (get_process, get_thread_proess, get_process_thread)
2277         (strut process_info, all_processes, linux_attach_lwp)
2278         (thread_db_init): New.
2279
2280         * linux-arm-low.c (arm_get_pc, arm_set_pc,
2281         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2282         (the_low_target): Add new members.
2283         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2284         (i386_store_fpxregset): Constify.
2285         (target_regsets): Add new kind identifier.
2286         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
2287         (i386_set_pc): Add debugging.
2288         (i386_breakpoint_at): New function.
2289         (the_low_target): Add new members.
2290         * linux-mips-low.c (mips_get_pc, mips_set_pc)
2291         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2292         (mips_breakpoint_at): New.
2293         (the_low_target): Add new members.
2294         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2295         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2296         (the_low_target): Add new members.
2297         * linux-sh-low.c (sh_get_pc, sh_set_pc)
2298         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2299         (the_low_target): Add new members.
2300         * linux-x86-64-low.c (target_regsets): Add new kind
2301         identifier.
2302
2303 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
2304
2305         From Martin Pool <mbp@samba.org>:
2306         * server.c (gdbserver_usage): New function.
2307         (main): Call it.
2308
2309 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
2310
2311         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2312         stop_at -> stop_pc.
2313
2314 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
2315
2316         * Makefile.in: Remove obsolete code.
2317
2318 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
2319
2320         * linux-low.c (regsets_fetch_inferior_registers),
2321         (regsets_store_inferior_registers): Removed cast to int from
2322         ptrace() calls.
2323         * regcache.h: Added declaration of struct inferior_info.
2324
2325 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
2326
2327         * inferiors.c (struct inferior_info): Add regcache_data.
2328         (add_inferior): Call create_register_cache.
2329         (clear_inferiors): Call free_register_cache.
2330         (inferior_regcache_data, set_inferior_regcache_data): New functions.
2331         * regcache.c (struct inferior_regcache_data): New.
2332         (registers): Remove.
2333         (get_regcache): New function.
2334         (create_register_cache, free_register_cache): New functions.
2335         (set_register_cache): Don't initialize the register cache here.
2336         (registers_to_string, registers_from_string, register_data): Call
2337         get_regcache.
2338         * regcache.h: Add prototypes.
2339         * server.h: Likewise.
2340
2341 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
2342
2343         * mem-break.c: New file.
2344         * mem-break.h: New file.
2345         * Makefile.in: Add mem-break.o rule; update server.h
2346         dependencies.
2347         * inferiors.c (struct inferior_info): Add target_data
2348         member.
2349         (clear_inferiors): Free target_data member if set.
2350         (inferior_target_data, set_inferior_target_data): New functions.
2351         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2352         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
2353         * linux-low.c (linux_bp_reinsert): New variable.
2354         (struct inferior_linux_data): New.
2355         (linux_create_inferior): Use set_inferior_target_data.
2356         (linux_attach): Likewise.  Call add_inferior.
2357         (linux_wait_for_one_inferior): New function.
2358         (linux_wait): Call it.
2359         (linux_write_memory): Add const.
2360         (initialize_low): Call set_breakpoint_data.
2361         * linux-low.h (struct linux_target_ops): Add breakpoint
2362         handling members.
2363         * server.c (attach_inferior): Remove extra add_inferior
2364         call.
2365         * server.h: Include mem-break.h.  Update inferior.c
2366         prototypes.
2367         * target.c (read_inferior_memory)
2368         (write_inferior_memory): New functions.
2369         * target.h (read_inferior_memory)
2370         (write_inferior_memory): Change macros to prototypes.
2371         (struct target_ops): Update comments.  Add const to write_memory
2372         definition.
2373
2374 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
2375
2376         * linux-low.c (usr_store_inferior_registers): Support
2377         registers which are allowed to fail to store.
2378         * linux-low.h (linux_target_ops): Likewise.
2379         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2380         (ppc_cannot_store_register): FPSCR may not be storable.
2381
2382 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
2383
2384         * server.h: Include <string.h> if HAVE_STRING_H.
2385         * ChangeLog: Correct paths in last ChangeLog entry.
2386
2387 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
2388
2389         * linux-low.h: Remove obsolete prototypes.
2390         (struct linux_target_ops): New.
2391         (extern the_low_target): New.
2392         * linux-low.c (num_regs, regmap): Remove declarations.
2393         (register_addr): Use the_low_target explicitly.
2394         (fetch_register): Likewise.
2395         (usr_fetch_inferior_registers): Likewise.
2396         (usr_store_inferior_registers): Likewise.
2397         * linux-arm-low.c (num_regs): Remove.
2398         (arm_num_regs): Define.
2399         (arm_regmap): Renamed from regmap, made static.
2400         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2401         made static.
2402         (arm_cannot_store_register): Renamed from cannot_store_register,
2403         made static.
2404         (the_low_target): New.
2405         * linux-i386-low.c (num_regs): Remove.
2406         (i386_num_regs): Define.
2407         (i386_regmap): Renamed from regmap, made static.
2408         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2409         made static.
2410         (i386_cannot_store_register): Renamed from cannot_store_register,
2411         made static.
2412         (the_low_target): New.
2413         * linux-ia64-low.c (num_regs): Remove.
2414         (ia64_num_regs): Define.
2415         (ia64_regmap): Renamed from regmap, made static.
2416         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2417         made static.
2418         (ia64_cannot_store_register): Renamed from cannot_store_register,
2419         made static.
2420         (the_low_target): New.
2421         * linux-m68k-low.c (num_regs): Remove.
2422         (m68k_num_regs): Define.
2423         (m68k_regmap): Renamed from regmap, made static.
2424         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2425         made static.
2426         (m68k_cannot_store_register): Renamed from cannot_store_register,
2427         made static.
2428         (the_low_target): New.
2429         * linux-mips-low.c (num_regs): Remove.
2430         (mips_num_regs): Define.
2431         (mips_regmap): Renamed from regmap, made static.
2432         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2433         made static.
2434         (mips_cannot_store_register): Renamed from cannot_store_register,
2435         made static.
2436         (the_low_target): New.
2437         * linux-ppc-low.c (num_regs): Remove.
2438         (ppc_num_regs): Define.
2439         (ppc_regmap): Renamed from regmap, made static.
2440         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2441         made static.
2442         (ppc_cannot_store_register): Renamed from cannot_store_register,
2443         made static.
2444         (the_low_target): New.
2445         * linux-s390-low.c (num_regs): Remove.
2446         (s390_num_regs): Define.
2447         (s390_regmap): Renamed from regmap, made static.
2448         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2449         made static.
2450         (s390_cannot_store_register): Renamed from cannot_store_register,
2451         made static.
2452         (the_low_target): New.
2453         * linux-sh-low.c (num_regs): Remove.
2454         (sh_num_regs): Define.
2455         (sh_regmap): Renamed from regmap, made static.
2456         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2457         made static.
2458         (sh_cannot_store_register): Renamed from cannot_store_register,
2459         made static.
2460         (the_low_target): New.
2461         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2462         (the_low_target): New.
2463
2464 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
2465
2466         * Makefile.in: Add stamp-h target.
2467         * configure.in: Create stamp-h.
2468         * configure: Regenerated.
2469
2470 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
2471
2472         * inferiors.c: New file.
2473         * target.c: New file.
2474         * target.h: New file.
2475         * Makefile.in:  Add target.o and inferiors.o.  Update
2476         dependencies.
2477         * linux-low.c (inferior_pid): New static variable,
2478         moved from server.c.
2479         (linux_create_inferior): Renamed from create_inferior.
2480         Call add_inferior.  Return 0 on success instead of a PID.
2481         (linux_attach): Renamed from myattach.
2482         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
2483         (linux_thread_alive): Renamed from mythread_alive.
2484         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
2485         child dies.
2486         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
2487         (regsets_store_inferior_registers): Correct error message.
2488         Add missing ``return 0''.
2489         (linux_fetch_registers): Renamed from fetch_inferior_registers.
2490         (linux_store_registers): Renamed from store_inferior_registers.
2491         (linux_read_memory): Renamed from read_inferior_memory.
2492         (linux_write_memory): Renamed from write_inferior_memory.
2493         (linux_target_ops): New structure.
2494         (initialize_low): Call set_target_ops ().
2495         * remote-utils.c (unhexify): New function.
2496         (hexify): New function.
2497         (input_interrupt): Send signals to ``signal_pid''.
2498         * server.c (inferior_pid): Remove.
2499         (start_inferior): Update create_inferior call.
2500         (attach_inferior): Call add_inferior.
2501         (handle_query): New function.
2502         (main): Call handle_query for `q' packets.
2503         * server.h: Include "target.h".  Remove obsolete prototypes.
2504         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2505
2506 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
2507
2508         * Makefile.in: Add WARN_CFLAGS.  Update configury
2509         dependencies.
2510         * configure.in: Check for <string.h>
2511         * configure: Regenerate.
2512         * config.in: Regenerate.
2513         * gdbreplay.c: Include needed system headers.
2514         (remote_open): Remove strchr prototype.
2515         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2516         * regcache.c (supply_register): Change buf argument to const void *.
2517         (supply_register_by_name): Likewise.
2518         (collect_register): Change buf argument to void *.
2519         (collect_register_by_name): Likewise.
2520         * regcache.h: Add missing prototypes.
2521         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2522         * server.c (handle_query): New function.
2523         (attached): New static variable, moved out of main.
2524         (main): Quiet longjmp clobber warnings.
2525         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
2526         * utils.c (error): Remove NORETURN.
2527         (fatal): Likewise.