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