don't keep a gdb-specific date
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2013-06-24  Tom Tromey  <tromey@redhat.com>
2
3         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4         create-version.sh.
5         (version.o): Remove.
6         * gdbreplay.c: Include version.h.
7         (version, host_name): Don't declare.
8         * server.h: Include version.h.
9         (version, host_name): Don't declare.
10
11 2013-06-12  Pedro Alves  <palves@redhat.com>
12
13         * linux-x86-low.c (linux_is_elf64): Delete global.
14         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
15         with local linux_pid_exe_is_elf_64_file use.
16
17 2013-06-11  Pedro Alves  <palves@redhat.com>
18
19         * linux-low.c (regset_disabled, disable_regset): New functions.
20         (regsets_fetch_inferior_registers)
21         (regsets_store_inferior_registers): Use them.
22         (initialize_regsets_info); Don't allocate the disabled_regsets
23         array here.
24         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
25         comment.
26
27 2013-06-11  Pedro Alves  <palves@redhat.com>
28
29         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
30         xmalloc.
31
32 2013-06-11  Pedro Alves  <palves@redhat.com>
33
34         * linux-x86-low.c (initialize_low_arch): Call
35         init_registers_x32_avx_linux.
36
37 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
38
39         Fix compatibility with Android Bionic.
40         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
41         it is not empty.
42
43 2013-06-07  Pedro Alves  <palves@redhat.com>
44
45         PR server/14823
46         * Makefile.in (OBS): Add tdesc.o.
47         (IPA_OBJS): Add tdesc-ipa.o.
48         (tdesc-ipa.o): New rule.
49         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
50         interface.
51         * linux-low.c (new_inferior): Delete.
52         (disabled_regsets, num_regsets): Delete.
53         (linux_add_process): Adjust to set the new per-process
54         new_inferior flag.
55         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
56         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
57         was a stop.  When calling arch_setup, switch the current inferior
58         to the thread that got an event.
59         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
60         (regsets_fetch_inferior_registers)
61         (regsets_store_inferior_registers): New regsets_info parameter.
62         Adjust to use it.
63         (linux_register_in_regsets): New regs_info parameter.  Adjust to
64         use it.
65         (register_addr, fetch_register, store_register): New usrregs_info
66         parameter.  Adjust to use it.
67         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
68         parameter regs_info.  Adjust to use it.
69         (linux_fetch_registers): Get the current inferior's regs_info, and
70         adjust to use it.
71         (linux_store_registers): Ditto.
72         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
73         (initialize_low): Don't initialize the target_regsets here.  Call
74         initialize_low_arch.
75         * linux-low.h (target_regsets): Delete declaration.
76         (struct regsets_info): New.
77         (struct usrregs_info): New.
78         (struct regs_info): New.
79         (struct process_info_private) <new_inferior>: New field.
80         (struct linux_target_ops): Delete the num_regs, regmap, and
81         regset_bitmap fields.  New field regs_info.
82         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
83         * i387-fp.c (num_xmm_registers): Delete.
84         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
85         calls to new interface.
86         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
87         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
88         Infer the number of xmm registers from the regcache's target
89         description.
90         * i387-fp.h (num_xmm_registers): Delete.
91         * inferiors.c (add_thread): Don't install the thread's regcache
92         here.
93         * proc-service.c (gregset_info): Fetch the current inferior's
94         regs_info.  Adjust to use it.
95         * regcache.c: Include tdesc.h.
96         (register_bytes, reg_defs, num_registers)
97         (gdbserver_expedite_regs): Delete.
98         (get_thread_regcache): If the thread doesn't have a regcache yet,
99         create one, instead of aborting gdbserver.
100         (regcache_invalidate_one): Rename to ...
101         (regcache_invalidate_thread): ... this.
102         (regcache_invalidate_one): New.
103         (regcache_invalidate): Only invalidate registers of the current
104         process.
105         (init_register_cache): Add target_desc parameter, and use it.
106         (new_register_cache): Ditto.  Assert the target description has a
107         non zero registers_size.
108         (regcache_cpy): Add assertions.  Adjust.
109         (realloc_register_cache, set_register_cache): Delete.
110         (registers_to_string, registers_from_string): Adjust.
111         (find_register_by_name, find_regno, find_register_by_number)
112         (register_cache_size): Add target_desc parameter, and use it.
113         (free_register_cache_thread, free_register_cache_thread_one)
114         (regcache_release, register_cache_size): New.
115         (register_size): Add target_desc parameter, and use it.
116         (register_data, supply_register, supply_register_zeroed)
117         (supply_regblock, supply_register_by_name, collect_register)
118         (collect_register_as_string, collect_register_by_name): Adjust.
119         * regcache.h (struct target_desc): Forward declare.
120         (struct regcache) <tdesc>: New field.
121         (init_register_cache, new_register_cache): Add target_desc
122         parameter.
123         (regcache_invalidate_thread): Declare.
124         (regcache_invalidate_one): Delete declaration.
125         (regcache_release): Declare.
126         (find_register_by_number, register_cache_size, register_size)
127         (find_regno): Add target_desc parameter.
128         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
129         declarations.
130         * remote-utils.c: Include tdesc.h.
131         (outreg, prepare_resume_reply): Adjust.
132         * server.c: Include tdesc.h.
133         (gdbserver_xmltarget): Delete declaration.
134         (get_features_xml, process_serial_event): Adjust.
135         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
136         declare.
137         (struct process_info) <tdesc>: New field.
138         (ipa_tdesc): Declare.
139         * tdesc.c: New file.
140         * tdesc.h: New file.
141         * tracepoint.c: Include tdesc.h.
142         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
143         (get_context_regcache): Adjust to pass ipa_tdesc down.
144         (do_action_at_tracepoint): Adjust to get the register cache size
145         from the context regcache's description.
146         (traceframe_walk_blocks): Adjust to get the register cache size
147         from the current trace frame's description.
148         (traceframe_get_pc): Adjust to get current trace frame's
149         description and pass it down.
150         (gdb_collect): Adjust to get the register cache size from the
151         IPA's description.
152         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
153         (gdbserver_xmltarget): Delete.
154         (initialize_low_tracepoint): Set the ipa's target description.
155         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
156         (initialize_low_tracepoint): Set the ipa's target description.
157         * linux-x86-low.c: Include tdesc.h.
158         [__x86_64__] (is_64bit_tdesc): New.
159         (ps_get_thread_area, x86_get_thread_area): Use it.
160         (i386_cannot_store_register): Rename to ...
161         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
162         (i386_cannot_fetch_register): Rename to ...
163         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
164         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
165         to new interface.
166         (target_regsets): Rename to ...
167         (x86_regsets): ... this.
168         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
169         interface.
170         (x86_siginfo_fixup): Use is_64bit_tdesc.
171         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
172         (tdesc_x32_avx_linux, tdesc_x32_linux)
173         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
174         Declare.
175         (x86_linux_update_xmltarget): Delete.
176         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
177         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
178         (AMD64_LINUX_USER64_CS): New.
179         (x86_linux_read_description): New, based on
180         x86_linux_update_xmltarget.
181         (same_process_callback): New.
182         (x86_arch_setup_process_callback): New.
183         (x86_linux_update_xmltarget): New.
184         (x86_regsets_info): New.
185         (amd64_linux_regs_info): New.
186         (i386_linux_usrregs_info): New.
187         (i386_linux_regs_info): New.
188         (x86_linux_regs_info): New.
189         (x86_arch_setup): Reimplement.
190         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
191         (x86_emit_ops): Ditto.
192         (the_low_target): Adjust.  Install x86_linux_regs_info,
193         x86_cannot_fetch_register, and x86_cannot_store_register.
194         (initialize_low_arch): New.
195         * linux-ia64-low.c (tdesc_ia64): Declare.
196         (ia64_fetch_register): Adjust.
197         (ia64_usrregs_info, regs_info): New globals.
198         (ia64_regs_info): New function.
199         (the_low_target): Adjust.
200         (initialize_low_arch): New function.
201         * linux-sparc-low.c (tdesc_sparc64): Declare.
202         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
203         Adjust.
204         (sparc_arch_setup): New function.
205         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
206         (the_low_target): Adjust.
207         (initialize_low_arch): New function.
208         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
209         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
210         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
211         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
212         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
213         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
214         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
215         (tdesc_powerpc_isa205_vsx64l): Declare.
216         (ppc_cannot_store_register, ppc_collect_ptrace_register)
217         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
218         (ppc_set_pc, ppc_get_hwcap): Adjust.
219         (ppc_usrregs_info): Forward declare.
220         (!__powerpc64__) ppc_regmap_adjusted: New global.
221         (ppc_arch_setup): Adjust to the current process'es target
222         description.
223         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
224         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
225         (ppc_store_evrregset): Adjust.
226         (target_regsets): Rename to ...
227         (ppc_regsets): ... this, and make static.
228         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
229         (ppc_regs_info): New function.
230         (the_low_target): Adjust.
231         (initialize_low_arch): New function.
232         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
233         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
234         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
235         (tdesc_s390x_linux64v2): Declare.
236         (s390_collect_ptrace_register, s390_supply_ptrace_register)
237         (s390_fill_gregset, s390_store_last_break): Adjust.
238         (target_regsets): Rename to ...
239         (s390_regsets): ... this, and make static.
240         (s390_get_pc, s390_set_pc): Adjust.
241         (s390_get_hwcap): New target_desc parameter, and use it.
242         [__s390x__] (have_hwcap_s390_high_gprs): New global.
243         (s390_arch_setup): Adjust to set the current process'es target
244         description.  Don't adjust the regmap.
245         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
246         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
247         (regs_info_3264): New globals.
248         (s390_regs_info): New function.
249         (the_low_target): Adjust.
250         (initialize_low_arch): New function.
251         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
252         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
253         [__mips64] (init_registers_mips_linux)
254         (init_registers_mips_dsp_linux): Delete defines.
255         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
256         (have_dsp): New global.
257         (mips_read_description): New, based on mips_arch_setup.
258         (mips_arch_setup): Reimplement.
259         (get_usrregs_info): New function.
260         (mips_cannot_fetch_register, mips_cannot_store_register)
261         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
262         (mips_fill_fpregset, mips_store_fpregset): Adjust.
263         (target_regsets): Rename to ...
264         (mips_regsets): ... this, and make static.
265         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
266         (dsp_regs_info, regs_info): New globals.
267         (mips_regs_info): New function.
268         (the_low_target): Adjust.
269         (initialize_low_arch): New function.
270         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
271         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
272         Declare.
273         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
274         (arm_read_description): New, with bits factored from
275         arm_arch_setup.
276         (arm_arch_setup): Reimplement.
277         (target_regsets): Rename to ...
278         (arm_regsets): ... this, and make static.
279         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
280         (arm_regs_info): New function.
281         (the_low_target): Adjust.
282         (initialize_low_arch): New function.
283         * linux-m68k-low.c (tdesc_m68k): Declare.
284         (target_regsets): Rename to ...
285         (m68k_regsets): ... this, and make static.
286         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
287         (m68k_regs_info): New function.
288         (m68k_arch_setup): New function.
289         (the_low_target): Adjust.
290         (initialize_low_arch): New function.
291         * linux-sh-low.c (tdesc_sharch): Declare.
292         (target_regsets): Rename to ...
293         (sh_regsets): ... this, and make static.
294         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
295         (sh_regs_info, sh_arch_setup): New functions.
296         (the_low_target): Adjust.
297         (initialize_low_arch): New function.
298         * linux-bfin-low.c (tdesc_bfin): Declare.
299         (bfin_arch_setup): New function.
300         (bfin_usrregs_info, regs_info): New globals.
301         (bfin_regs_info): New function.
302         (the_low_target): Adjust.
303         (initialize_low_arch): New function.
304         * linux-cris-low.c (tdesc_cris): Declare.
305         (cris_arch_setup): New function.
306         (cris_usrregs_info, regs_info): New globals.
307         (cris_regs_info): New function.
308         (the_low_target): Adjust.
309         (initialize_low_arch): New function.
310         * linux-cris-low.c (tdesc_crisv32): Declare.
311         (cris_arch_setup): New function.
312         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
313         (cris_regs_info): New function.
314         (the_low_target): Adjust.
315         (initialize_low_arch): New function.
316         * linux-m32r-low.c (tdesc_m32r): Declare.
317         (m32r_arch_setup): New function.
318         (m32r_usrregs_info, regs_info): New globals.
319         (m32r_regs_info): Adjust.
320         (initialize_low_arch): New function.
321         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
322         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
323         (tic6x_usrregs_info): Forward declare.
324         (tic6x_read_description): New function, based on ...
325         (tic6x_arch_setup): ... this.  Reimplement.
326         (target_regsets): Rename to ...
327         (tic6x_regsets): ... this, and make static.
328         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
329         (tic6x_regs_info): New function.
330         (the_low_target): Adjust.
331         (initialize_low_arch): New function.
332         * linux-xtensa-low.c (tdesc_xtensa): Declare.
333         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
334         (target_regsets): Rename to ...
335         (xtensa_regsets): ... this, and make static.
336         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
337         globals.
338         (xtensa_arch_setup, xtensa_regs_info): New functions.
339         (the_low_target): Adjust.
340         (initialize_low_arch): New function.
341         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
342         (nios2_arch_setup): Set the current process'es tdesc.
343         (target_regsets): Rename to ...
344         (nios2_regsets): ... this.
345         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
346         (nios2_regs_info): New function.
347         (the_low_target): Adjust.
348         (initialize_low_arch): New function.
349         * linux-aarch64-low.c (tdesc_aarch64): Declare.
350         (aarch64_arch_setup): Set the current process'es tdesc.
351         (target_regsets): Rename to ...
352         (aarch64_regsets): ... this.
353         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
354         (aarch64_regs_info): New function.
355         (the_low_target): Adjust.
356         (initialize_low_arch): New function.
357         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
358         globals.
359         (target_regsets): Rename to ...
360         (tile_regsets): ... this.
361         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
362         (tile_regs_info): New function.
363         (tile_arch_setup): Set the current process'es tdesc.
364         (the_low_target): Adjust.
365         (initialize_low_arch): New function.
366         * spu-low.c (tdesc_spu): Declare.
367         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
368         * win32-arm-low.c (tdesc_arm): Declare.
369         (arm_arch_setup): New function.
370         (the_low_target): Install arm_arch_setup instead of
371         init_registers_arm.
372         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
373         (init_windows_x86): Rename to ...
374         (i386_arch_setup): ... this.  Set `win32_tdesc'.
375         (the_low_target): Adjust.
376         * win32-low.c (win32_tdesc): New global.
377         (child_add_thread): Don't create the thread cache here.
378         (do_initial_child_stuff): Set the new process'es tdesc.
379         * win32-low.h (struct target_desc): Forward declare.
380         (win32_tdesc): Declare.
381         * lynx-i386-low.c (tdesc_i386): Declare global.
382         (lynx_i386_arch_setup): Set `lynx_tdesc'.
383         * lynx-low.c (lynx_tdesc): New global.
384         (lynx_add_process): Set the new process'es tdesc.
385         * lynx-low.h (struct target_desc): Forward declare.
386         (lynx_tdesc): Declare global.
387         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
388         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
389         * nto-low.c (nto_tdesc): New global.
390         (do_attach): Set the new process'es tdesc.
391         * nto-low.h (struct target_desc): Forward declare.
392         (nto_tdesc): Declare.
393         * nto-x86-low.c (tdesc_i386): Declare.
394         (nto_x86_arch_setup): Set `nto_tdesc'.
395
396 2013-06-04  Gary Benson  <gbenson@redhat.com>
397
398         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
399         to qSupported response when appropriate.
400         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
401         with nonzero-length annex.
402         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
403         arguments supplied in annex.
404
405 2013-05-31  Doug Evans  <dje@google.com>
406
407         PR server/15594
408         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
409         64 bits in 64-cross-32 environment.
410
411 2013-05-28  Pedro Alves  <palves@redhat.com>
412
413         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
414         (aarch64-without-fpu.c): Delete rule.
415         * configure.srv (aarch64*-*-linux*): Remove references to
416         aarch64-without-fpu.o and aarch64-without-fpu.xml.
417         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
418         declaration.
419
420 2013-05-24  Pedro Alves  <palves@redhat.com>
421
422         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
423         instead of strchr/decode_address.  Error if the range isn't split
424         with a ','.  Don't assume there's be a ':' in the action.
425
426 2013-05-23  Yao Qi  <yao@codesourcery.com>
427             Pedro Alves  <palves@redhat.com>
428
429         * linux-low.c (lwp_in_step_range): New function.
430         (linux_wait_1): If the thread was range stepping and stopped
431         outside the stepping range, report the stop to GDB.  Otherwise,
432         continue stepping.  Add range stepping debug output.
433         (linux_set_resume_request): Copy the step range from the resume
434         request to the lwp.
435         (linux_supports_range_stepping): New.
436         (linux_target_ops) <supports_range_stepping>: Set to
437         linux_supports_range_stepping.
438         * linux-low.h (struct linux_target_ops)
439         <supports_range_stepping>: New field.
440         (struct lwp_info) <step_range_start, step_range_end>: New fields.
441         * linux-x86-low.c (x86_supports_range_stepping): New.
442         (the_low_target) <supports_range_stepping>: Set to
443         x86_supports_range_stepping.
444         * server.c (handle_v_cont): Handle 'r' action.
445         (handle_v_requests): Append ";r" if the target supports range
446         stepping.
447         * target.h (struct thread_resume) <step_range_start,
448         step_range_end>: New fields.
449         (struct target_ops) <supports_range_stepping>:
450         New field.
451         (target_supports_range_stepping): New macro.
452
453 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
454
455         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
456         confusion in comment.
457
458 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
459
460         * lynx-low.c (struct process_info_private): New type.
461         (lynx_add_process): New function.
462         (lynx_create_inferior, lynx_attach): Replace calls to
463         add_process by calls to lynx_add_process.
464         (lynx_resume): If PTID is null, then try using
465         current_process()->private->last_wait_event_ptid.
466         Add comments.
467         (lynx_clear_inferiors): Delete.  The contents of that function
468         has been inlined in lynx_mourn;
469         (lynx_wait_1): Save the ptid in the process's private data.
470         (lynx_mourn): Free the process' private data.  Replace call
471         to lynx_clear_inferiors by call to clear_inferiors.
472
473 2013-05-17  Yao Qi  <yao@codesourcery.com>
474
475         * i386-low.c (i386_length_and_rw_bits): Move the comment to
476         the right place.
477
478 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
479
480         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
481         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
482         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
483         PT_TEXT_END_ADDR guards.  Update comments.
484         (linux_target_op) <read_offsets>: Conditionally define to
485         linux_read_offsets if the target is UCLIBC and if it defines
486         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
487
488 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
489             Andrew Jenner  <andrew@codesourcery.com>
490
491         * Makefile.in (SFILES): Add linux-nios2-low.c.
492         (clean): Add action to delete nios2-linux.c.
493         (nios2-linux.c): New rule.
494         * configure.srv: Add nios2*-*-linux*.
495         * linux-nios2-low.c: New.
496
497 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
498
499         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
500
501 2013-04-25  Hui Zhu  <hui@codesourcery.com>
502
503         PR gdb/15186
504         * ax.c (ax_printf): Add fflush.
505
506 2013-04-22  Tom Tromey  <tromey@redhat.com>
507
508         * Makefile.in (SFILES): Add filestuff.c.
509         (OBS): Add filestuff.o.
510         (filestuff.o): New target.
511         * config.in, configure: Rebuild.
512         * configure.ac: Check for fdwalk, pipe2.
513
514 2013-04-17  Pedro Alves  <palves@redhat.com>
515
516         * configure.ac (USE_THREAD_DB): Delete variable.
517         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
518         Don't AC_SUBST USE_THREAD_DB.
519         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
520         * config.in, configure: Regenerate.
521
522 2013-04-16  Pedro Alves  <palves@redhat.com>
523
524         * linux-low.h (struct lwp_info) <thread_known>: Move under
525         the USE_THREAD_DB #ifdef.
526
527 2013-04-16  Pedro Alves  <palves@redhat.com>
528
529         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
530         (linux-low.o): Delete rule.
531         * linux-low.h: Always include "gdb_thread_db.h" instead of
532         conditionally including thread_db.h.
533         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
534         HAVE_THREAD_DB_H.
535
536 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
537
538         * Makefile.in (install-only): Fix make install regression.
539
540 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
541
542         Convert man pages to texinfo, new gdbinit.5 texinfo page.
543         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
544         installation.
545         * gdbserver.1: Remove.
546
547 2013-03-22  Pedro Alves  <palves@redhat.com>
548
549         * linux-low.c (handle_extended_wait): Don't call
550         linux_enable_event_reporting.
551
552 2013-03-15  Tony Theodore  <tonyt@logyst.com>
553
554         PR build/9098:
555         * Makefile.in (SHELL): Use @SHELL@.
556
557 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
558
559         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
560         compiler warning.
561
562 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
563
564         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
565         Remove extraneous NULL element.
566
567 2013-03-13  Yao Qi  <yao@codesourcery.com>
568
569         * tracepoint.c (traceframe_read_tsv): Look for the last matched
570         'V' block in trace frame.
571
572 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
573
574         * target.h (struct target_ops): Add btrace ops.
575         (target_supports_btrace): New macro.
576         (target_enable_btrace): New macro.
577         (target_disable_btrace): New macro.
578         (target_read_btrace): New macro.
579         * gdbthread.h (struct thread_info): Add btrace field.
580         * server.c: Include btrace-common.h.
581         (handle_btrace_general_set): New function.
582         (handle_btrace_enable): New function.
583         (handle_btrace_disable): New function.
584         (handle_general_set): Call handle_btrace_general_set.
585         (handle_qxfer_btrace): New function.
586         (struct qxfer qxfer_packets[]): Add btrace entry.
587         * inferiors.c (remove_thread): Disable btrace.
588         * linux-low: Include linux-btrace.h.
589         (linux_low_enable_btrace): New function.
590         (linux_low_read_btrace): New function.
591         (linux_target_ops): Add btrace ops.
592         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
593         Add srv_linux_btrace=yes.
594         (x86_64-*-linux*): Add linux-btrace.o.
595         Add srv_linux_btrace=yes.
596         * configure.ac: Define HAVE_LINUX_BTRACE.
597         * config.in: Regenerated.
598         * configure: Regenerated.
599
600 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
601
602         * server.c (handle_qxfer): Preserve error message if -3 is
603         returned.
604         (qxfer): Document the -3 return value.
605
606 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
607
608         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
609         (linux_btrace_h): New variable.
610         (linux-btrace.o): New rule.
611
612 2013-03-08  Stan Shebs  <stan@codesourcery.com>
613             Hafiz Abid Qadeer  <abidh@codesourcery.com>
614
615         * tracepoint.c (trace_buffer_size): New global.
616         (DEFAULT_TRACE_BUFFER_SIZE): New define.
617         (init_trace_buffer): Change to one-argument function. Allocate
618         trace buffer memory.
619         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
620         handle QTBuffer:size packet.
621         (cmd_bigqtbuffer_size): New function.
622         (initialize_tracepoint): Call init_trace_buffer with
623         DEFAULT_TRACE_BUFFER_SIZE.
624         * server.c (handle_query): Add QTBuffer:size in the
625         supported packets.
626
627 2013-03-07  Yao Qi  <yao@codesourcery.com>
628
629         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
630         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
631         of -1.
632         (cmd_qtsp): Adjust condition.  Do post increment.
633         Set cur_action and cur_step_action back to 0.
634
635 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
636
637         PR server/15236
638         * linux-low.c (linux_write_memory): Return early success if LEN is
639         zero.
640
641 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
642
643         * configure.srv: Add x86_64-*-cygwin* as target.
644
645 2013-02-28  Tom Tromey  <tromey@redhat.com>
646
647         * configure.ac: Invoke AC_SYS_LARGEFILE.
648         * configure, config.in: Rebuild.
649
650 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
651
652         * win32-low.c: Throughout, fix format strings and casts of
653         printf-like functions to avoid type related warnings on all
654         platforms.
655         (get_child_debug_event): Print dwDebugEventCode as hex since
656         that's how it's usually documented.
657
658 2013-02-28  Yao Qi  <yao@codesourcery.com>
659
660         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
661         pulongest.
662
663 2013-02-27  Jiong Wang  <jiwang@tilera.com>
664
665         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
666         (reg-tilegx32.c): New rule.
667         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
668         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
669         different register info initializer according to elf class.
670         (init_registers_tilgx32): New function.  The tilegx32 register info
671         initializer.
672         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
673         (tile_store_gregset): Likewise.
674
675 2013-02-27  Yao Qi  <yao@codesourcery.com>
676
677         * server.c (process_point_options): Print debug message when
678         debug_threads is true.
679
680 2013-02-26  Yao Qi  <yao@codesourcery.com>
681
682         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
683
684 2013-02-19  Pedro Alves  <palves@redhat.com>
685             Kai Tietz <ktietz@redhat.com>
686
687         PR gdb/15161
688
689         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
690         instead of strtoul to extract address from packet.
691         (process_serial_event) <'z'>: Likewise.
692
693 2013-02-18  Yao Qi  <yao@codesourcery.com>
694
695         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
696
697 2013-02-14  Pedro Alves  <palves@redhat.com>
698
699         Plug memory leak.
700
701         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
702         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
703
704 2013-02-14  Pedro Alves  <palves@redhat.com>
705
706         * tracepoint.c (cmd_qtdpsrc): Use savestring.
707
708 2013-02-14  Pedro Alves  <palves@redhat.com>
709
710         * tracepoint.c (save_string): Delete.
711         (add_tracepoint_action): Use savestring instead of save_string.
712
713 2013-02-12  Pedro Alves  <palves@redhat.com>
714
715         * linux-xtensa-low.c: Ditto.
716         * xtensa-xtregs.c: Ditto.
717
718 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
719
720         * thread-db.c (thread_db_get_tls_address): NULL pointer check
721         thread_db.
722
723 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
724
725         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
726         aarch64_num_wp_regs and aarch64_num_bp_regs to
727         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
728
729 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
730
731         * linux-aarch64-low.c (ps_get_thread_area): Replace
732         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
733
734 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
735             Marcus Shawcroft  <marcus.shawcroft@arm.com>
736             Nigel Stephens  <nigel.stephens@arm.com>
737             Yufeng Zhang  <yufeng.zhang@arm.com>
738
739         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
740         (aarch64.c, aarch64-without-fpu.c): New targets.
741         * configure.srv (aarch64*-*-linux*): New.
742         * linux-aarch64-low.c: New file.
743
744 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
745
746         * linux-low.c (handle_extended_wait, linux_create_inferior)
747         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
748         (dequeue_one_deferred_signal, linux_resume_one_thread)
749         (fetch_register, linux_write_memory, linux_enable_event_reporting)
750         (linux_tracefork_grandchild, linux_test_for_tracefork)
751         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
752         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
753         where the argument is 0.
754
755 2013-01-25  Yao Qi  <yao@codesourcery.com>
756
757         * event-loop.c: Include "queue.h".
758         (gdb_event_p): New typedef.
759         (struct gdb_event) <next_event>: Remove.
760         (event_queue): Change to QUEUE(gdb_event_p).
761         (async_queue_event): Remove.
762         (gdb_event_xfree): New.
763         (initialize_event_loop): New.
764         (process_event): Use API from QUEUE.
765         (wait_for_event): Likewise.
766         * server.c (main): Call initialize_event_loop.
767         * server.h (initialize_event_loop): Declare.
768
769 2013-01-18  Yao Qi  <yao@codesourcery.com>
770
771         * ax.h (struct eval_agent_expr_context): New.
772         (gdb_eval_agent_expr): Update declaration.
773         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
774         TFRAME.  Add new argument CTX.
775         * server.h (struct eval_agent_expr_context): Declare.
776         (agent_mem_read, agent_tsv_read): Update declaration.
777         (agent_mem_read_string): Likewise.
778         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
779         (add_traceframe_block): Add new argument TPOINT.
780         Increase TPOINT->traceframe_usage.
781         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
782         eval_tracepoint_agent_expr.
783         (condition_true_at_tracepoint): Likewise.
784         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
785         (agent_mem_read_string, agent_tsv_read): Likewise.
786
787 2013-01-16  Yao Qi  <yao@codesourcery.com>
788
789         * linux-low.c (linux_resume_one_lwp): Don't check
790         'lwp->bp_reinsert != 0'.
791
792 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
793             Pedro Alves  <palves@redhat.com>
794
795         * lynx-low.c (ptrace_request_to_str): Define a temporary
796         macro and use it to simplify this function's implementation.
797
798 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
799
800         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
801         sets errno.
802
803 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
804
805         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
806
807 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
808
809         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
810
811 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
812
813         * lynx-low.c (lynx_resume): Use the resume_info parameter
814         to determine the ptid for the lynx_ptrace call, unless
815         it is equal to minus_one_ptid, in which case we use the
816         ptid of the current_inferior.
817         (lynx_wait_1): After having received a thread create/exit
818         event, resume the inferior's execution using the signaling
819         thread's ptid, rather than the old ptid.
820
821 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
822
823         * lynx-low.c (lynx_resume): Delete variable ret.
824
825 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
826
827         * gdbreplay.c (gdbreplay_version): Update copyright year.
828         * server.c (gdbserver_version): Likewise.
829
830 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
831
832         * lynx-low.c (lynx_wait_1): Add debug trace before adding
833         new thread.
834
835 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
836
837         * lynx-low.c (ptrace_request_to_str): Add handling for
838         PTRACE_GETTRACESIG.
839
840 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
841
842         * lynx-low.c (lynx_attach): Delete variable new_process.
843
844 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
845
846         * lynx-low.c (lynx_create_inferior): Delete variable
847         new_process.
848
849 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
850
851         * lynx-low.c (ptrace_request_to_str): Do not handle
852         PTRACE_GETTHREADLIST if this macro does not exist.
853
854 2012-12-15  Yao Qi  <yao@codesourcery.com>
855
856         * Makefile.in (OBS): Add notif.o.
857         * notif.c, notif.h: New.
858         * server.c: Include "notif.h".
859         (struct vstop_notif) <next>: Remove.
860         <base>: New field.
861         (queue_stop_reply): Update.
862         (push_event, send_next_stop_reply): Remove.
863         (discard_queued_stop_replies): Update.
864         (notif_stop): New variable.
865         (handle_v_stopped): Remove.
866         (handle_v_requests): Don't call handle_v_stopped.  Call
867         handle_ack_notif instead.
868         (queue_stop_reply_callback): Call notif_event_enque instead
869         of queue_stop_reply.
870         (handle_status): Don't call send_next_stop_reply, call
871         notif_write_event instead.
872         (kill_inferior_callback): Likewise.
873         (detach_or_kill_inferior_callback): Likewise.
874         (main): Call initialize_notif.
875         (process_serial_event): Call QUEUE_is_empty.
876         (handle_target_event): Call notif_push instead of push event.
877         * server.h (push_event): Remove declaration.
878
879 2012-12-10  Tom Tromey  <tromey@redhat.com>
880
881         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
882         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
883         macros.
884         (.c.o): Rewrite.
885         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
886         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
887         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
888         (amd64-linux-ipa.o, ax.o): Rewrite.
889         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
890         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
891         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
892         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
893         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
894         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
895         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
896         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
897         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
898         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
899         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
900         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
901         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
902         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
903         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
904         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
905         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
906         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
907         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
908         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
909         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
910         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
911         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
912         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
913         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
914         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
915         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
916         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
917         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
918         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
919         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
920         (reg-tilegx.o): Remove.
921         (all_object_files): New macro.
922         Include .deps files.
923         * aclocal.m4, configure: Rebuild.
924         * acinclude.m4: Include depstand.m4, lead-dot.m4.
925         * configure.ac: Invoke ZW_CREATE_DEPDIR,
926         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
927
928 2012-12-05  Tom Tromey  <tromey@redhat.com>
929
930         PR gdb/14917:
931         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
932
933 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
934
935         * configure.ac: Check for linux/perf_event.h.
936         * config.in: Regenerated.
937         * configure: Regenerated.
938
939 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
940
941         * hostio.c (handle_readlink): Decrease buffer size
942         parameter passed to readlink by one byte.
943
944 2012-11-26  Yao Qi  <yao@codesourcery.com>
945
946         * configure.ac (build_warnings): Append '-Wempty-body'.
947         * configure: Regenerated.
948         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
949         body.
950
951 2012-11-15  Pierre Muller  <muller@sourceware.org>
952
953         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
954         * config.in: Regenerate.
955         * configure: Regenerate.
956         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
957         Use "gdb_wait.h" header instead of <sys/wait.h> header.
958         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
959         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
960         header.
961         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
962         instead of <sys/wait.h> header.
963         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
964
965 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
966
967         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
968         (various make rules): Remove -DGDBSERVER
969
970 2012-11-09  Yao Qi  <yao@codesourcery.com>
971
972         * spu-low.c (current_ptid): Move it to ..
973         * gdbthread.h: ... here.  New.
974         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
975         * server.c (myresume, process_serial_event): Likewise.
976         * thread-db.c (thread_db_find_new_threads): Likewise.
977         * tracepoint.c (run_inferior_command): Likewise.
978
979 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
980
981         * server.c (handle_search_memory_1): Include access length in
982         warning message.
983
984 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
985
986         * linux-crisv32-low.c: Fix compile errors.
987
988 2012-09-04  Yao Qi  <yao@codesourcery.com>
989
990         * tracepoint.c (cmd_qtsv): Adjust debug message.
991         Don't check CUR_TPOINT.
992
993 2012-08-28  Yao Qi  <yao@codesourcery.com>
994
995         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
996         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
997         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
998         Remove declarations of xmalloc, xreallloc, xstrdup and
999         freeargv.
1000         * Makefile.in (libiberty_h): New.
1001         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1002         (linux-bfin-low.o): Append dependency 'libiberty.h'.
1003
1004 2012-08-23  Yao Qi  <yao@codesourcery.com>
1005
1006         * server.h: Remove declaration of 'xsnprintf'.
1007
1008 2012-08-22  Keith Seitz  <keiths@redhat.com>
1009
1010         * server.h: Include build-gnulib-gbserver/config.h.
1011         * gdbreplay.c: Likewise.
1012
1013 2012-08-08  Doug Evans  <dje@google.com>
1014
1015         * Makefile.in (SFILES): Add gdb_vecs.c.
1016         (OBS): Add gdb_vecs.o.
1017         (gdb_vecs_h, host_defs_h): New variables.
1018         (thread-db.o): Add $(gdb_vecs_h) dependency.
1019         (gdb_vecs.o): New rule.
1020         * thread-db.c: #include "gdb_vecs.h".
1021         (thread_db_load_search): Use a vector to iterate over path elements.
1022         Handle text appearing after "$pdir".
1023
1024         * configure.ac: Add check for strstr.
1025         * config.in: Regenerate.
1026         * configure: Regenerate.
1027
1028 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
1029
1030         * hostio.c (handle_pread): If pread fails, fall back to attempting
1031         lseek/read.
1032         (handle_pwrite): Likewise for pwrite.
1033
1034 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
1035
1036         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1037         between unsupported TYPE and unimplementable ADDR/LEN combination.
1038         (arm_insert_point): Act on new return value.
1039
1040 2012-07-31  Pedro Alves  <palves@redhat.com>
1041
1042         * server.c (process_point_options): Only skip tokens if we find
1043         one that is unrecognized.  Don't treat 'X' specially while
1044         skipping unrecognized tokens.
1045
1046 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
1047
1048         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1049         to 4-byte-align HW breakpoint addresses for Thumb.
1050
1051 2012-07-27  Yao Qi  <yao@codesourcery.com>
1052
1053         PR remote/14161.
1054
1055         * server.h: Declare gdb_agent_about_to_close.
1056         * target.c (kill_inferior): Include "agent.h".
1057         New.  Send command 'kill'.
1058         * target.h (kill_inferior): Removed macro.
1059         * tracepoint.c (gdb_agent_about_to_close): New.
1060         (gdb_agent_helper_thread): Handle command 'close'.
1061         Wait endlessly until the inferior stops.
1062         Install gdb_agent_remove_socket to atexit hook.
1063         (agent_socket_name): New static variable.
1064         (gdb_agent_socket_init): Replace local variable 'name' with
1065         'agent_socket_name'.
1066         (gdb_agent_remove_socket): New.
1067
1068 2012-07-27  Yao Qi  <yao@codesourcery.com>
1069
1070         * server.c (process_point_options): Stop at 'X' when parsing.
1071
1072 2012-07-19  Michael Eager  <eager@eagercon.com>
1073
1074         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate 
1075         to hw_execute.
1076         * linux-x86-low.c (x86_insert_point, x86_remove_point):
1077         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1078         hardware breakpoint.
1079
1080 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1081
1082         * gdbserver/linux-low.c (initialize_low): Call
1083         linux_ptrace_init_warnings.
1084
1085 2012-07-02  Doug Evans  <dje@google.com>
1086
1087         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1088         pointer to int.
1089
1090 2012-07-02  Stan Shebs  <stan@codesourcery.com>
1091
1092         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1093         (ax.o): Add it to build rule.
1094         (ax-ipa.o): Ditto.
1095         (OBS): Add format.o.
1096         (IPA_OBS): Add format.o.
1097         * server.c (handle_query): Claim support for breakpoint commands.
1098         (process_point_options): Add command case.
1099         (process_serial_event): Leave running if there are printfs in
1100         effect.
1101         * mem-break.h (any_persistent_commands): Declare.
1102         (add_breakpoint_commands): Declare.
1103         (gdb_no_commands_at_breakpoint): Declare.
1104         (run_breakpoint_commands): Declare.
1105         * mem-break.c (struct point_command_list): New struct.
1106         (struct breakpoint): New field command_list.
1107         (any_persistent_commands): New function.
1108         (add_commands_to_breakpoint): New function.
1109         (add_breakpoint_commands): New function.
1110         (gdb_no_commands_at_breakpoint): New function.
1111         (run_breakpoint_commands): New function.
1112         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1113         locally.
1114         * ax.c: Include format.h.
1115         (ax_printf): New function.
1116         (gdb_eval_agent_expr): Add printf opcode.
1117
1118 2012-06-13  Yao Qi  <yao@codesourcery.com>
1119
1120         * server.c (start_inferior): Remove duplicated writes to fields
1121         'last_resume_kind' and 'last_status' of 'current_inferior'.
1122
1123 2012-06-12  Yao Qi  <yao@codesourcery.com>
1124             Pedro Alves  <palves@redhat.com>
1125
1126         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
1127         comment.
1128         * server.c (handle_v_cont): Extend comment.
1129
1130 2012-06-11  Yao Qi  <yao@codesourcery.com>
1131
1132         * linux-low.c (linux_attach): Add 'static'.
1133
1134 2012-06-06  Yao Qi  <yao@codesourcery.com>
1135
1136         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1137
1138 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1139
1140         Fix gcc -flto compilation warning.
1141         * server.c (main): Make variable multi_mode and attach volatile.
1142
1143 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1144
1145         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1146         if the platform doesn't know about it.
1147
1148 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
1149
1150         * Makefile.in (SFILES): Add linux-tile-low.c.
1151         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1152         * configure.srv: Handle tilegx-*-linux*.
1153         * linux-tile-low.c: New file.
1154
1155 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
1156
1157         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1158
1159 2012-05-24  Pedro Alves  <palves@redhat.com>
1160
1161         PR gdb/7205
1162
1163         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1164
1165 2012-05-24  Pedro Alves  <palves@redhat.com>
1166
1167         PR gdb/7205
1168
1169         Replace target_signal with gdb_signal throughout.
1170
1171 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
1172
1173         * linux-low.c (linux_store_registers): Avoid the copying sequence
1174         when no data has been retrieved by ptrace.
1175
1176 2012-05-22  Will Deacon  <will.deacon@arm.com>
1177
1178         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1179         Include asm/ptrace.h.
1180         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1181         already defined.
1182
1183 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
1184
1185         * linux-low.c (linux_store_registers): Don't re-retrieve data
1186         with ptrace that has already been obtained from /proc.  Always
1187         copy any data retrieved with ptrace to the buffer supplied.
1188
1189 2012-05-11  Yao Qi  <yao@codesourcery.com>
1190             Pedro Alves  <palves@redhat.com>
1191
1192         * linux-low.c (enum stopping_threads_kind): New.
1193         (stopping_threads): Change type to `enum stopping_threads_kind'.
1194         (handle_extended_wait): If stopping and suspending threads, leave
1195         the new_lwp suspended too.
1196         (linux_wait_for_event): Adjust.
1197         (stop_all_lwps): Set `stopping_threads' to
1198         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1199         whether we're suspending threads or just stopping them.  Assert no
1200         recursion happens.
1201
1202 2012-04-29  Yao Qi  <yao@codesourcery.com>
1203
1204         * server.h: Move some code to ...
1205         * gdbthread.h: ... here.  New.
1206         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1207         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1208         (nto-low.o, win32-low.o): Likewise.
1209         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1210         * regcache.c, remote-utils.c, server.c: Likewise.
1211         * target.c, tracepoint.c, win32-low.c: Likewise.
1212
1213 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1214
1215         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1216         (PTRACE_ARG4_TYPE): Likewise.
1217         (PTRACE_XFER_TYPE): Likewise.
1218         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1219         ptrace to PTRACE_ARG3_TYPE.
1220         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1221         (PTRACE_ARG4_TYPE): Likewise.
1222         (PTRACE_XFER_TYPE): Likewise.
1223         (linux_detach_one_lwp): Cast fourth argument of
1224         ptrace to long then PTRACE_ARG4_TYPE.
1225         (regsets_fetch_inferior_registers): Cast third argument of
1226         ptrace to long then PTRACE_ARG3_TYPE.
1227         (regsets_store_inferior_registers): Likewise.
1228
1229 2012-04-20  Pedro Alves  <palves@redhat.com>
1230
1231         * configure: Regenerate.
1232
1233 2012-04-19  Pedro Alves  <palves@redhat.com>
1234
1235         * Makefile.in (GNULIB_BUILDDIR): New.
1236         (LIBGNU, INCGNU, GNULIB_H): Adjust.
1237         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1238         (all, install-only, uninstall, clean-info, all-lib, clean): No
1239         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
1240         (maintainer-clean realclean distclean): Use subdir_do.
1241         (subdir_do): New.
1242         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
1243         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
1244         * acinclude.m4: Include acx_configure_dir.m4.
1245         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1246         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
1247         ACX_CONFIGURE_DIR.
1248         (GNULIB): New.
1249         (GNULIB_STDINT_H): Adjust.
1250         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1251         * gdbreplay.c: Include build-gnulib/config.h.
1252         * server.h: Likewise.
1253         * aclocal.m4: Regenerate.
1254         * config.in: Regenerate.
1255         * configure: Regenerate.
1256
1257 2012-04-19  Pedro Alves  <palves@redhat.com>
1258
1259         * Makefile.in (LIBGNU, INCGNU): Adjust.
1260         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1261         (all, install-only, uninstall, clean-info, all-lib, clean)
1262         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1263         * configure.ac: Adjust AC_OUTPUT output.
1264         * aclocal.m4: Regenerate.
1265         * configure: Regenerate.
1266
1267 2012-04-19  Pedro Alves  <palves@redhat.com>
1268
1269         * Makefile.in (generated_files): New.
1270         (server_h): Remove the explicit dependency on config.h, and depend
1271         on $generated_files.
1272
1273 2012-04-19  Pedro Alves  <palves@redhat.com>
1274
1275         * Makefile.in (INCGNU): Add -Ignulib.
1276
1277 2012-04-19  Pedro Alves  <palves@redhat.com>
1278
1279         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1280         (INCGNU): ... this, and spell out -I here.
1281         (GNULIB_LIB): Rename to ...
1282         (LIBGNU): ... this.
1283         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1284
1285 2012-04-19  Pedro Alves  <palves@redhat.com>
1286
1287         * config.in: Regenerate.
1288
1289 2012-04-19  Pedro Alves  <palves@redhat.com>
1290
1291         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1292         * server.h (memmem): Remove declaration.
1293         * config.in: Regenerate.
1294         * configure: Regenerate.
1295
1296 2012-04-19  Yao Qi  <yao@codesourcery.com>
1297
1298         * Makefile.in (SFILES): Add common/vec.c.
1299         (OBS): Add vec.o.
1300         (vec.o): New rule.
1301
1302 2012-04-19  Yao Qi  <yao@codesourcery.com>
1303
1304         * remote-utils.c (prepare_resume_reply): Replace with macro
1305         target_core_of_thread.
1306         * server.c (handle_qxfer_threads_proper): Likewise.
1307         * target.h (traget_core_of_thread): New macro.
1308
1309 2012-04-18  Pedro Alves  <palves@redhat.com>
1310
1311         * aclocal.m4: Regenerate.
1312         * configure: Regenerate.
1313
1314 2012-04-16  Yao Qi  <yao@codesourcery.com>
1315
1316         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1317         duplicated on address.
1318
1319 2012-04-16  Yao Qi  <yao@codesourcery.com>
1320
1321         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1322         (struct tracepoint_action_ops) <send>: New field.
1323         (m_tracepoint_action_send, r_tracepoint_action_send): New.
1324         (agent_expr_send, x_tracepoint_action_send): New.
1325         (l_tracepoint_action_send): New.
1326         (cmd_qtdp): Download and install tracepoint
1327         according to `use_agent'.
1328         (run_inferior_command): Add one more parameter `len'.
1329         Update callers.
1330         (tracepoint_send_agent): New.
1331         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1332
1333 2012-04-16  Yao Qi  <yao@codesourcery.com>
1334
1335         * tracepoint.c (download_tracepoints): Moved to ...
1336         (cmd_qtstart): ... here.
1337
1338 2012-04-14  Yao Qi  <yao@codesourcery.com>
1339
1340         * tracepoint.c: Include inttypes.h.
1341         (struct collect_memory_action): Use sized types.
1342         (struct tracepoint): Likewise.
1343         (cmd_qtdp, stop_tracing): Update print specifiers.
1344         (cmd_qtp, response_tracepoint): Likewise.
1345         (collect_data_at_tracepoint): Likewise.
1346         (collect_data_at_step): Likewise.
1347
1348 2012-04-14  Yao Qi  <yao@codesourcery.com>
1349
1350         Import gnulib module inttypes.
1351         * aclocal.m4, config.in, configure: Regenerated.
1352
1353 2012-04-14  Yao Qi  <yao@codesourcery.com>
1354
1355         * Makefile.in (maintainer-clean, realclean, distclean): Remove
1356         Makefile and config.status at last.
1357
1358 2012-04-13  Yao Qi  <yao@codesourcery.com>
1359
1360         * tracepoint.c: Include stdint.h unconditionally.
1361
1362 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1363
1364         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1365         on BFD_HAVE_SYS_PROCFS_TYPE.
1366         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1367         * configure: Regenerate.
1368         * config.in: Likewise.
1369
1370 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
1371
1372         * Makefile.in (clean): Also remove x32.c x32-linux.c
1373         x32-avx.c x32-avx-linux.c.
1374         (x32.o): New target.
1375         (x32.c): Likewise.
1376         (x32-linux.o): Likewise.
1377         (x32-linux.c): Likewise.
1378         (x32-avx.o): Likewise.
1379         (x32-avx.c): Likewise.
1380         (x32-avx-linux.o): Likewise.
1381         (x32-avx-linux.c): Likewise.
1382
1383         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1384         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1385         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1386         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1387         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1388         i386/x32-avx-linux.xml.
1389
1390         * linux-x86-low.c (init_registers_x32_linux): New prototype.
1391         (init_registers_x32_avx_linux): Likwise.
1392         (x86_linux_update_xmltarget): Call init_registers_x32_linux
1393         or init_registers_x32_avx_linux if linux_is_elf64 is false.
1394
1395 2012-04-13  Pedro Alves  <palves@redhat.com>
1396
1397         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1398         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1399         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1400         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1401         the sub-make.
1402
1403 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
1404
1405         * linux-x86-low.c (compat_x32_clock_t): New.
1406         (compat_x32_siginfo_t): Likewise.
1407         (compat_x32_siginfo_from_siginfo): Likewise.
1408         (siginfo_from_compat_x32_siginfo): Likewise.
1409         (linux_is_elf64): Likewise.
1410         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1411         and siginfo_from_compat_x32_siginfo for x32.
1412         (x86_arch_setup): Set linux_is_elf64.
1413
1414 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
1415
1416         PR gdb/13969
1417         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1418         e_machine field.
1419         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1420         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1421         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1422         compatible with process.
1423
1424 2012-04-12  Yao Qi  <yao@codesourcery.com>
1425
1426         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1427         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1428         (install-only, install-info, clean): Handle sub dir gnulib.
1429         (all-lib, am--refresh): New targets.
1430         (memmem.o): Remove target.
1431         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1432         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
1433         (AC_REPLACE_FUNCS): Remove memmem.
1434         Invoke gl_INIT and AM_INIT_AUTOMAKE.
1435         (AC_OUTPUT): Generate Makefile in gnulib/.
1436         * aclocal.m4, config.in, configure: Regenerated.
1437
1438 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
1439
1440         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1441
1442 2012-04-05  Pedro Alves  <palves@redhat.com>
1443
1444         -Werror=strict-aliasing
1445
1446         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1447         pointer.
1448
1449 2012-04-04  Pedro Alves  <palves@redhat.com>
1450
1451         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1452         (sparc_store_gregset_from_stack, sparc_store_gregset)
1453         (sparc_breakpoint_at): Fix formatting.
1454
1455 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1456
1457         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1458         are available.
1459         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1460         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1461         * config.in: Regenerate.
1462         * configure: Likewise.
1463
1464 2012-03-29  Pedro Alves  <palves@redhat.com>
1465
1466         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1467         Correct ptrace arguments.
1468
1469 2012-03-28  Pedro Alves  <palves@redhat.com>
1470
1471         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1472         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1473         (IA64_FR1_REGNUM): New defines.
1474         (ia64_fetch_register): New.
1475         (the_low_target): Install it.
1476         * linux-low.h (struct linux_target_ops) <fetch_register>: New
1477         field.
1478         * linux-low.c (linux_fetch_registers): Try the
1479         the_low_target.fetch_register hook first.
1480
1481         * linux-arm-low.c (the_low_target): Adjust.
1482         * linux-bfin-low.c (the_low_target): Adjust.
1483         * linux-cris-low.c (the_low_target): Adjust.
1484         * linux-crisv32-low.c (the_low_target): Adjust.
1485         * linux-m32r-low.c (the_low_target): Adjust.
1486         * linux-m68k-low.c (the_low_target): Adjust.
1487         * linux-mips-low.c (the_low_target): Adjust.
1488         * linux-ppc-low.c (the_low_target): Adjust.
1489         * linux-s390-low.c (the_low_target): Adjust.
1490         * linux-sh-low.c (the_low_target): Adjust.
1491         * linux-sparc-low.c (the_low_target): Adjust.
1492         * linux-tic6x-low.c (the_low_target): Adjust.
1493         * linux-x86-low.c (the_low_target): Adjust.
1494         * linux-xtensa-low.c (the_low_target): Adjust.
1495
1496 2012-03-26  Pedro Alves  <palves@redhat.com>
1497
1498         * server.c (handle_qxfer_libraries): Don't bail early if
1499         the_target->qxfer_libraries_svr4 is not NULL.
1500
1501 2012-03-26  Pedro Alves  <palves@redhat.com>
1502
1503         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1504
1505 2012-03-23  Pedro Alves  <palves@redhat.com>
1506
1507         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1508         "library-list-svr4" element's start tag when the the DSO list is
1509         empty.
1510
1511 2012-03-23  Pedro Alves  <palves@redhat.com>
1512
1513         * linux-low.c (read_one_ptr): Read the inferior's pointer through
1514         a variable whose type size is the same as the inferior's pointer
1515         size.
1516
1517 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
1518
1519         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1520         struct siginfo.
1521         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1522         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1523         * linux-low.h: Include <signal.h>.
1524         (struct siginfo): Remove forward declaration.
1525         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1526         struct siginfo.
1527
1528 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
1529
1530         * .gitignore: Ignore more files.
1531
1532 2012-03-19  Pedro Alves  <palves@redhat.com>
1533             Jan Kratochvil  <jan.kratochvil@redhat.com>
1534
1535         * server.c (cont_thread, general_thread): Add describing comments.
1536         (start_inferior): Clear `cont_thread'.
1537         (handle_v_cont): Don't set `cont_thread' if resuming all threads
1538         of a process.
1539
1540 2012-03-15  Yao Qi  <yao@codesourcery.com>
1541
1542         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1543         handling to ...
1544         (cmd_qtdp): ... here.
1545
1546 2012-03-15  Yao Qi  <yao@codesourcery.com>
1547
1548         * tracepoint.c (struct tracepoint_action_ops): New.
1549         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1550         (m_tracepoint_action_download): New.
1551         (r_tracepoint_action_download): New.
1552         (x_tracepoint_action_download): New.
1553         (l_tracepoint_action_download): New.
1554         (add_tracepoint_action): Install `action->ops' according type.
1555         (download_tracepoint_1): Move code `download' function pointer
1556         of various tracepoint_action_ops.
1557
1558 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1559
1560         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
1561         linux_ptrace_attach_warnings.
1562
1563 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1564
1565         * Makefile.in (linux-ptrace.o): New.
1566         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1567         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1568         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1569         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1570         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1571         of these targets.
1572         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1573
1574 2012-03-08  Yao Qi  <yao@codesourcery.com>
1575             Pedro Alves  <palves@redhat.com>
1576
1577         Fix PR server/13392.
1578         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1579         offset of JMP insn.
1580         * tracepoint.c (remove_tracepoint): New.
1581         (cmd_qtdp): Call remove_tracepoint when failed to install.
1582
1583 2012-03-07  Pedro Alves  <palves@redhat.com>
1584
1585         * linux-low.c (get_detach_signal): New.
1586         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1587         Pass on pending signals to PTRACE_DETACH.  Check the result of the
1588         ptrace call.
1589         * server.c (program_signals, program_signals_p): New.
1590         (handle_general_set): Handle QProgramSignals.
1591         * server.h (program_signals, program_signals_p): Declare.
1592
1593 2012-03-05  Pedro Alves  <palves@redhat.com>
1594             Jan Kratochvil  <jan.kratochvil@redhat.com>
1595
1596         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1597         New comment why.
1598
1599 2012-03-03  Yao Qi  <yao@codesourcery.com>
1600
1601         * tracepoint.c (tracepoint_look_up_symbols): Update call to
1602         agent_look_up_symbols.
1603
1604 2012-03-03  Yao Qi  <yao@codesourcery.com>
1605
1606         * Makefile.in (linux-low.o): Keep dependence on agent.h.
1607         (linux-x86-low.o): Likewise.
1608         * server.h: Remove in_process_agent_loaded.
1609         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
1610         common/agent.c.
1611         Update callers.
1612
1613 2012-03-03  Yao Qi  <yao@codesourcery.com>
1614
1615         * tracepoint.c (gdb_agent_capability): New global.
1616         (in_process_agent_loaded_ust): Renamed to
1617         `in_process_agent_supports_ust'.
1618         Update callers.
1619         (in_process_agent_supports_ust): Call agent_capability_check.
1620         (clear_installed_tracepoints): Assert that agent supports
1621         agent.
1622
1623 2012-03-03  Yao Qi  <yao@codesourcery.com>
1624
1625         * linux-low.c (linux_supports_agent): New.
1626         (linux_target_ops): Initialize field `supports_agent' with
1627         linux_supports_agent.
1628         * target.h (struct target_ops) <supports_agent>: New.
1629         (target_supports_agent): New macro.
1630         * server.c (handle_general_set): Handle packet 'QAgent'.
1631         (handle_query): Send `QAgent+'.
1632         * Makefile.in (server.o): Depends on agent.h.
1633
1634 2012-03-03  Yao Qi  <yao@codesourcery.com>
1635
1636         * Makefile.in (OBS): Add agent.o.
1637         Add new rule for agent.o.
1638         Track dependence of tracepoint.c on agent.h.
1639         * tracepoint.c (run_inferior_command_1):
1640         (run_inferior_command): Call agent_run_command.
1641         (gdb_ust_connect_sync_socket): Deleted.  Move it to
1642         common/agent.c.
1643         (resume_thread, stop_thread): Likewise.
1644         (gdb_ust_socket_init): Renamed to ...
1645         (gdb_agent_socket_init): ... New.
1646         (gdb_ust_thread): Renamed to ...
1647         (gdb_agent_helper_thread): ... New.
1648         (gdb_ust_init): Move some code to ...
1649         (gdb_agent_init): ... here.  New.
1650         [HAVE_UST]: Call gdb_ust_init.
1651         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
1652         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1653         * config.in, configure: Regenerated.
1654
1655 2012-03-02  Pedro Alves  <palves@redhat.com>
1656
1657         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1658         * linux-low.c (struct simple_pid_list): New.
1659         (stopped_pids): New a struct simple_pid_list pointer.
1660         (add_to_pid_list, pull_pid_from_list): New.
1661         (handle_extended_wait): Don't assume the first signal new children
1662         report is SIGSTOP.  Adjust call to pull_pid_from_list.
1663         (linux_wait_for_lwp): Adjust.
1664
1665 2012-03-02  Yao Qi  <yao@codesourcery.com>
1666
1667         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1668         debug log.
1669
1670 2012-03-02  Yao Qi  <yao@codesourcery.com>
1671
1672         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1673         `stop_pc' and `tpoint'.  Update caller.
1674
1675 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
1676
1677         * linux-low.h (linux_target_ops): Add regset_bitmap member.
1678         * linux-low.c (use_linux_regsets): New macro.
1679         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1680         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1681         (linux_register_in_regsets): New function.
1682         (usr_fetch_inferior_registers): Skip registers covered by
1683         regsets.
1684         (usr_store_inferior_registers): Likewise.
1685         (usr_fetch_inferior_registers): New macro.
1686         (usr_store_inferior_registers): Likewise.
1687         (linux_fetch_registers): Handle mixed regset/non-regset targets.
1688         (linux_store_registers): Likewise.
1689         * linux-mips-low.c (init_registers_mips_dsp_linux): New
1690         prototype.
1691         (init_registers_mips64_dsp_linux): Likewise.
1692         (init_registers_mips_linux): New macro.
1693         (init_registers_mips_dsp_linux): Likewise.
1694         (mips_dsp_num_regs): Likewise.
1695         (DSP_BASE, DSP_CONTROL): New fallback macros.
1696         (mips_base_regs): New macro.
1697         (mips_regmap): Use it.  Fix the size.
1698         (mips_dsp_regmap): New variable.
1699         (mips_dsp_regset_bitmap): Likewise.
1700         (mips_arch_setup): New function.
1701         (mips_cannot_fetch_register): Use the_low_target.regmap rather
1702         than mips_regmap.
1703         (mips_cannot_store_register): Likewise.
1704         (the_low_target): Update .arch_setup, .num_regs and .regmap
1705         initializers.  Add .regset_bitmap initializer.
1706         * linux-arm-low.c (the_low_target): Add .regset_bitmap
1707         initializer.
1708         * linux-bfin-low.c (the_low_target): Likewise.
1709         * linux-cris-low.c (the_low_target): Likewise.
1710         * linux-crisv32-low.c (the_low_target): Likewise.
1711         * linux-ia64-low.c (the_low_target): Likewise.
1712         * linux-m32r-low.c (the_low_target): Likewise.
1713         * linux-m68k-low.c (the_low_target): Likewise.
1714         * linux-ppc-low.c (the_low_target): Likewise.
1715         * linux-s390-low.c (the_low_target): Likewise.
1716         * linux-sh-low.c (the_low_target): Likewise.
1717         * linux-sparc-low.c (the_low_target): Likewise.
1718         * linux-tic6x-low.c (the_low_target): Likewise.
1719         * linux-x86-low.c (the_low_target): Likewise.
1720         * linux-xtensa-low.c (the_low_target): Likewise.
1721         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1722         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
1723         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1724         srv_xmlfiles.
1725         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1726         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1727
1728 2012-02-29  Yao Qi  <yao@codesourcery.com>
1729             Pedro Alves  <palves@redhat.com>
1730
1731         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1732         `step_over_finished' is true.
1733
1734 2012-02-27  Pedro Alves  <palves@redhat.com>
1735
1736         * linux-low.c (pid_is_stopped): Delete, moved to common/.
1737         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1738
1739 2012-02-27  Pedro Alves  <palves@redhat.com>
1740
1741         PR server/9684
1742         * linux-low.c (pid_is_stopped): New.
1743         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1744
1745 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
1746
1747         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1748         of conditions.
1749
1750 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
1751
1752         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1753
1754 2012-02-24  Luis Machado  <lgustavo@codesourcery>
1755
1756         * server.c (handle_query): Advertise support for target-side
1757         breakpoint condition evaluation.
1758         (process_point_options): New function.
1759         (process_serial_event): When inserting a breakpoint, check for
1760         a target-side condition that should be evaluated.
1761
1762         * mem-break.c: Include regcache.h and ax.h.
1763         (point_cond_list_t): New data structure.
1764         (breakpoint) <cond_list>: New field.
1765         (find_gdb_breakpoint_at): Make non-static.
1766         (delete_gdb_breakpoint_at): Clear any target-side
1767         conditions.
1768         (clear_gdb_breakpoint_conditions): New function.
1769         (add_condition_to_breakpoint): Likewise.
1770         (add_breakpoint_condition): Likewise.
1771         (gdb_condition_true_at_breakpoint): Likewise.
1772         (gdb_breakpoint_here): Return result directly instead
1773         of going through a local variable.
1774
1775         * mem-break.h (find_gdb_breakpoint_at): New prototype.
1776         (clear_gdb_breakpoint_conditions): Likewise.
1777         (add_breakpoint_condition): Likewise.
1778         (gdb_condition_true_at_breakpoint): Likewise.
1779
1780         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1781         (need_step_over_p): Take target-side breakpoint condition into
1782         consideration.
1783
1784 2012-02-24  Luis Machado  <lgustavo@codesourcery>
1785
1786         * server.h: Include tracepoint.h.
1787         (agent_mem_read, agent_get_trace_state_variable_value,
1788         agent_set_trace_state_variable_value,
1789         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1790         get_set_tsv_func_addr): New prototypes.
1791
1792         * ax.h: New include file.
1793         * ax.c: New source file.
1794
1795         * tracepoint.c: Include ax.h.
1796         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1797         agent_expr, eval_result_type): Move to ax.h.
1798         (parse_agent_expr): Rename to ...
1799         (gdb_parse_agent_expr): ... this, make it non-static and move
1800         to ax.h.
1801         (unparse_agent_expr) Rename to ...
1802         (gdb_unparse_agent_expr): ... this, make it non-static and move
1803         to ax.h.
1804         (eval_agent_expr): Rename to ...
1805         (eval_tracepoint_agent_expr): ... this.
1806         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1807         forward declarations.
1808         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1809         (agent_get_trace_state_variable_value): New function.
1810         (agent_set_trace_state_variable_value): New function.
1811         (cmd_qtdp): Call gdb_parse_agent_expr (...).
1812         (response_tracepoint): Call gdb_unparse_agent_expr (...).
1813         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1814         (condition_true_at_tracepoint): Likewise.
1815         (parse_agent_expr): Rename to ...
1816         (gdb_parse_agent_expr): ... this and move to ax.c.
1817         (unparse_agent_expr): Rename to ...
1818         (gdb_unparse_agent_expr): ... this and move to ax.c.
1819         (gdb_agent_op_name): Move to ax.c.
1820         (eval_agent_expr): Rename to ...
1821         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1822         and move to ax.c.
1823         (eval_tracepoint_agent_expr): New function.
1824         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1825         non-static.
1826         (current_insn_ptr, emit_error, struct bytecode_address): Move to
1827         ax.c.
1828         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1829         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1830         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1831         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1832         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1833         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1834         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1835         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1836         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1837         (compile_bytecodes): Remove forward declaration.
1838         (is_goto_target): Move to ax.c.
1839         (compile_bytecodes): Move to ax.c and call
1840         agent_get_trace_state_variable_value (...) and
1841         agent_set_trace_state_variable_value (...).
1842
1843         * Makefile.in: Update ax.c and IPA dependencies.
1844
1845 2012-02-24  Pedro Alves  <palves@redhat.com>
1846
1847         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1848         (cmd_bigqtbuffer_circular): ... this.  Only handle
1849         'QTBuffer:circular:'.
1850         (handle_tracepoint_general_set): Adjust.
1851
1852 2012-02-16  Yao Qi  <yao@codesourcery.com>
1853
1854         * inferiors.c: Move code to ...
1855         * dll.c: .... here.  New.
1856         * server.h: Declare clear_dlls.
1857         * Makefile.in (SFILES): Add dll.c.
1858         (OBS): Add dll.o
1859         (dll.o): New rule.
1860
1861 2012-02-11  Yao Qi  <yao@codesourcery.com>
1862
1863         * server.c: (handle_monitor_command): Add a new parameter
1864         `own_buf'.
1865         (handle_query): Update caller.
1866
1867 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
1868
1869         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1870         * configure, config.in: Regenerate.
1871         * hostio.c: Provide an alternate implementation if HAVE_READLINK
1872         is not defined.
1873
1874 2012-02-02  Pedro Alves  <palves@redhat.com>
1875
1876         Try SIGKILL first, then PTRACE_KILL.
1877         * linux-low.c (linux_kill_one_lwp): New.
1878         (linux_kill_one_lwp): Rename to ...
1879         (kill_one_lwp_callback): ... this.  Use the new
1880         linux_kill_one_lwp.
1881
1882 2012-02-02  Pedro Alves  <palves@redhat.com>
1883
1884         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1885         inferior.
1886
1887 2012-01-27  Pedro Alves  <palves@redhat.com>
1888
1889         * linux-low.c (linux_child_pid_to_exec_file): Delete.
1890         (elf_64_file_p): Make static.
1891         (linux_pid_exe_is_elf_64_file): New.
1892         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1893         Delete declarations.
1894         (linux_pid_exe_is_elf_64_file): Declare.
1895         * linux-x86-low.c (x86_arch_setup): Use
1896         linux_pid_exe_is_elf_64_file.
1897
1898 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
1899
1900         * linux-low.c (linux_wait_for_event_1): Rename to ...
1901         (linux_wait_for_event): ... here and merge it with former
1902         linux_wait_for_event - new variable wait_ptid, use it.
1903         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1904
1905 2012-01-23  Pedro Alves  <palves@redhat.com>
1906
1907         * server.c (main): Avoid yet another case of infinite loop while
1908         detaching/killing after a longjmp.
1909
1910 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1911
1912         Code cleanup.
1913         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1914
1915 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
1916
1917         * hostio.c (handle_readlink): New function.
1918         (handle_vFile): Call it to handle "vFile:readlink" packets.
1919
1920 2012-01-20  Pedro Alves  <palves@redhat.com>
1921             Ulrich Weigand  <ulrich.weigand@linaro.org>
1922
1923         * server.c (handle_v_requests): Only support vAttach and vRun to
1924         start multiple processes when in extended protocol mode.
1925
1926 2012-01-17  Pedro Alves  <palves@redhat.com>
1927
1928         * tracepoint.c (initialize_tracepoint): Use mmap instead of
1929         memalign plus mprotect to allocate the scratch buffer.
1930
1931 2012-01-13  Pedro Alves  <palves@redhat.com>
1932
1933         * server.c (attach_inferior): Clear `cont_thread'.
1934
1935 2012-01-13  Pedro Alves  <palves@redhat.com>
1936
1937         * server.c (main): Avoid infinite loop while detaching/killing
1938         after a longjmp.
1939
1940 2012-01-09  Doug Evans  <dje@google.com>
1941
1942         * server.c (start_inferior): Set last_ptid in --wrapper case.
1943
1944 2012-01-06  Yao Qi  <yao@codesourcery.com>
1945
1946         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1947         defined.
1948         [IN_PROCESS_AGENT] (debug_agent): New global variable.
1949
1950 2012-01-04  Yao Qi  <yao@codesourcery.com>
1951
1952         * tracepoint.c (cmd_qtdp): Print debug message
1953         for static tracepoint.
1954
1955 2012-01-04  Yao Qi  <yao@codesourcery.com>
1956
1957         * tracepoint.c (trace_vdebug): Differentiate debug message
1958         between gdbserver and IPA.
1959
1960 2012-01-03  Yao Qi  <yao@codesourcery.com>
1961
1962         * tracepoint.c (tracepoint_was_hit): Don't collect for
1963         static tracepoint.
1964
1965 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
1966
1967         * terminal.h: Reformat copyright header.
1968
1969 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
1970
1971         * server.c (gdbserver_version): Update copyright year.
1972         * gdbreplay.c (gdbreplay_version): Likewise.
1973
1974 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
1975
1976         * linux-low.c (linux_create_inferior): Put empty if clause for write.
1977
1978         Revert:
1979         2011-12-18  Hui Zhu  <teawater@gmail.com>
1980         * linux-low.c (linux_create_inferior): Save return value to ret.
1981
1982 2011-12-18  Hui Zhu  <teawater@gmail.com>
1983
1984         * linux-low.c (linux_create_inferior): Save return value to ret.
1985
1986 2011-12-16  Doug Evans  <dje@google.com>
1987
1988         * linux-low.c (linux_create_inferior): If stdio connection,
1989         redirect stdin from /dev/null, stdout to stderr.
1990         * remote-utils.c (remote_is_stdio): New static global.
1991         (remote_connection_is_stdio): New function.
1992         (remote_prepare): Handle stdio connection.
1993         (remote_open): Ditto.
1994         (remote_close): Don't close stdin for stdio connections.
1995         (read_prim,write_prim): New functions.  Replace all calls to
1996         read/write to these.
1997         * server.c (main): Watch for "-" argument.  Move call to
1998         remote_prepare before start_inferior.
1999         * server.h (STDIO_CONNECTION_NAME): New macro.
2000         (remote_connection_is_stdio): Declare.
2001
2002         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2003         in debugging output.
2004
2005 2011-12-15  Yao Qi  <yao@codesourcery.com>
2006
2007         * tracepoint.c: Include sys/syscall.h.
2008         (gdb_ust_thread): Remove preprocessor conditional.
2009
2010 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
2011
2012         * linux-low.c (linux_detach_one_lwp): Call
2013         the_low_target.prepare_to_resume before detaching.
2014
2015 2011-12-14  Yao Qi  <yao@codesourcery.com>
2016
2017         * tracepoint.c (gdb_ust_thread): Don't ignore return value
2018         of write.
2019
2020 2011-12-14  Yao Qi  <yao@codesourcery.com>
2021
2022         * i386-low.c (i386_low_stopped_data_address): Initialize local
2023         variable `control'.
2024
2025 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
2026
2027         PR remote/13492
2028
2029         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2030         DR_CONTROL unless necessary.  Extend comments.
2031         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2032         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
2033
2034 2011-12-13  Yao Qi  <yao@codesourcery.com>
2035
2036         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2037         macros.
2038         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2039
2040 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
2041
2042         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2043         Print new debug message for such case.
2044
2045 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2046
2047         Fix overlapping memcpy.
2048         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
2049         the read_inferior_memory transfer.
2050         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
2051         write_inferior_memory transfer.
2052         (set_fast_tracepoint_jump): New variable buf.  Use it for the
2053         read_inferior_memory and write_inferior_memory transfers.
2054         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2055         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2056         Use it for the write_inferior_memory transfer.
2057         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2058         buffers.
2059
2060 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
2061
2062         * linux-low.c (fetch_register, store_register): Make code
2063         consistent, fix formatting.
2064
2065 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
2066
2067         * linux-low.c (usr_store_inferior_registers): Factor out code
2068         to handle individual registers into...
2069         (store_register): ... this new function.
2070
2071 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
2072
2073         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2074         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2075         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2076         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2077         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2078         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2079         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2080         (srv_xmlfiles): Add new XML files.
2081
2082         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2083         and <sys/uio.h>.
2084         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2085         (init_registers_s390_linux32v1): Add prototype.
2086         (init_registers_s390_linux32v2): Likewise.
2087         (init_registers_s390_linux64v1): Likewise.
2088         (init_registers_s390_linux64v2): Likewise.
2089         (init_registers_s390x_linux64v1): Likewise.
2090         (init_registers_s390x_linux64v2): Likewise.
2091         (s390_num_regs): Increment to 52.
2092         (s390_regmap): Add orig_r2 register.
2093         (s390_num_regs_3264): Increment to 68.
2094         (s390_regmap_3264): Add orig_r2 register.
2095         (s390_collect_ptrace_register): Handle orig_r2 register.
2096         (s390_supply_ptrace_register): Likewise.
2097         (s390_fill_last_break): New function.
2098         (s390_store_last_break): Likewise.
2099         (s390_fill_system_call): New function.
2100         (s390_store_system_call): Likewise.
2101         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2102         register sets.
2103         (s390_check_regset): New function.
2104         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2105         NT_S390_SYSTEM_CALL regsets and use appropriate description.
2106         Update target_regsets for available register sets.
2107
2108 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
2109             Jan Kratochvil  <jan.kratochvil@redhat.com>
2110
2111         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2112         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2113         New.
2114         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2115         * linux-low.h (struct process_info_private): New member r_debug.
2116         * server.c (handle_qxfer_libraries): Call
2117         the_target->qxfer_libraries_svr4.
2118         (handle_qxfer_libraries_svr4): New function.
2119         (qxfer_packets): New entry "libraries-svr4".
2120         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2121         * target.h (struct target_ops): New member qxfer_libraries_svr4.
2122         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2123         PACKET_qXfer_libraries_svr4.
2124
2125 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
2126
2127         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2128         PSW address/mask between 8-byte and 16-byte formats.
2129         (s390_supply_ptrace_register): Likewise.
2130         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2131         basic addressing mode bit.
2132
2133 2011-11-24  Stan Shebs  <stan@codesourcery.com>
2134
2135         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2136
2137 2011-11-17  Stan Shebs  <stan@codesourcery.com>
2138
2139         * tracepoint.c (struct tracepoint): New field traceframe_usage.
2140         (tracing_start_time): New global.
2141         (tracing_stop_time): New global.
2142         (tracing_user_name): New global.
2143         (tracing_notes): New global.
2144         (tracing_stop_note): New global.
2145         (cmd_qtstart): Set traceframe_usage, start_time.
2146         (stop_tracing): Set stop_time.
2147         (cmd_qtstatus): Report additional status.
2148         (cmd_qtp): New function.
2149         (handle_tracepoint_query): Call it.
2150         (cmd_qtnotes): New function.
2151         (handle_tracepoint_general_set): Call it.
2152         (get_timestamp): Rename from tsv_get_timestamp.
2153
2154 2011-11-14  Stan Shebs  <stan@codesourcery.com>
2155             Kwok Cheung Yeung  <kcy@codesourcery.com>
2156
2157         * linux-x86-low.c (small_jump_insn): New.
2158         (i386_install_fast_tracepoint_jump_pad): Add arguments for
2159         trampoline and error message, build a trampoline and issue a small
2160         jump instruction to it.
2161         (x86_install_fast_tracepoint_jump_pad): Add arguments for
2162         trampoline and error message.
2163         (x86_get_min_fast_tracepoint_insn_len): New.
2164         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2165         * linux-low.h (struct linux_target_ops): Add arguments to
2166         install_fast_tracepoint_jump_pad operation, add new operation.
2167         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2168         arguments.
2169         (linux_get_min_fast_tracepoint_insn_len): New function.
2170         (linux_target_op): Add new operation.
2171         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2172         (gdb_trampoline_buffer_end): Ditto.
2173         (gdb_trampoline_buffer_error): Ditto.
2174         (struct ipa_sym_addresses): Add fields for new IPA variables.
2175         (symbol_list): Add entries for new IPA variables.
2176         (struct tracepoint): Add fields to hold the address range of the
2177         trampoline used by the tracepoint.
2178         (trampoline_buffer_head): New static variable.
2179         (trampoline_buffer_tail): Ditto.
2180         (claim_trampoline_space): New function.
2181         (have_fast_tracepoint_trampoline_buffer): New function.
2182         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2183         structure.
2184         (install_fast_tracepoint): Ditto, also add error buffer argument.
2185         (cmd_qtminftpilen): New function.
2186         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2187         (fast_tracepoint_from_trampoline_address): New function.
2188         (fast_tracepoint_collecting): Handle trampoline as part of jump
2189         pad space.
2190         (set_trampoline_buffer_space): New function.
2191         (initialize_tracepoint): Initialize new IPA variables.
2192         * target.h (struct target_ops): Add arguments to
2193         install_fast_tracepoint_jump_pad operation, add new
2194         get_min_fast_tracepoint_insn_len operation.
2195         (target_get_min_fast_tracepoint_insn_len): New.
2196         (install_fast_tracepoint_jump_pad): Add arguments.
2197         * server.h (IPA_BUFSIZ): Define.
2198         * linux-i386-ipa.c: Include extra header files.
2199         (initialize_fast_tracepoint_trampoline_buffer): New function.
2200         (initialize_low_tracepoint): Call it.
2201         * server.h (set_trampoline_buffer_space): Declare.
2202         (claim_trampoline_space): Ditto.
2203         (have_fast_tracepoint_trampoline_buffer): Ditto.
2204
2205 2011-11-14  Yao Qi  <yao@codesourcery.com>
2206
2207         * server.c (handle_query): Handle InstallInTrace for qSupported.
2208         * tracepoint.c (add_tracepoint): Sort list.
2209         (install_tracepoint, download_tracepoint): New.
2210         (cmd_qtdp): Call them to install and download tracepoints.
2211         (sort_tracepoints): Removed.
2212         (cmd_qtstart): Update.
2213
2214 2011-11-14  Yao Qi  <yao@codesourcery.com>
2215
2216         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2217         * mem-break.h: Declare.
2218         * tracepoint.c (cmd_qtstart): Move some code to ...
2219         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2220         New.
2221         (download_tracepoints): Move some code to ...
2222         (download_tracepoint_1): ... here.  New.
2223
2224 2011-11-08  Yao Qi  <yao@codesourcery.com>
2225
2226         * remote-utils.c (relocate_instruction): A comment fix.
2227
2228 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
2229
2230         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2231         (i386_dr_low_get_control, i386_dr_low_get_status): Use
2232         dr_status_mirror and dr_control_mirror from debug_reg_state.
2233         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2234         (i386_initial_stuff): Remove use of deleted globals.
2235         (i386_get_thread_context, i386_set_thread_context,
2236         i386_thread_added): Use dr_status_mirror and dr_control_mirror
2237         from debug_reg_state.
2238
2239 2011-11-05  Yao Qi  <yao@codesourcery.com>
2240
2241         * tracepoint.c (gdb_collect): Loop over tracepoints of same
2242         address as TPOINT's.
2243
2244 2011-11-02  Stan Shebs  <stan@codesourcery.com>
2245
2246         * tracepoint.c (agent_mem_read_string): New function.
2247         (eval_agent_expr): Call it for tracenz.
2248         * server.c (handle_query): Report support for tracenz.
2249
2250 2011-11-02  Yao Qi  <yao@codesourcery.com>
2251
2252         * tracepoint.c (cmd_qtstart): Remove unused local variables.
2253
2254 2011-11-02  Yao Qi  <yao@codesourcery.com>
2255
2256         * target.h: Fix a typo in comment.
2257
2258 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
2259
2260         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
2261         clobber the breakpoints' shadows with fast tracepoint jumps.
2262         * mem-break.h (check_mem_write): Add `myaddr' parameter.
2263         * target.c (write_inferior_memory): Also pass MYADDR down to
2264         check_mem_write.
2265
2266 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
2267
2268         * configure.ac: Check support for personality routine.
2269         * configure: Regenerate.
2270         * config.in: Likewise.
2271         * linux-low.c: Include <sys/personality.h>.
2272         Define ADDR_NO_RANDOMIZE if necessary.
2273         (linux_create_inferior): Disable address space randomization when
2274         forking inferior, if requested.
2275         (linux_supports_disable_randomization): New function.
2276         (linux_target_ops): Install it.
2277         * server.h (disable_randomization): Declare.
2278         * server.c (disable_randomization): New global variable.
2279         (handle_general_set): Handle QDisableRandomization.
2280         (handle_query): Likewise for qSupported.
2281         (main): Support --disable-randomization and --no-disable-randomization
2282         command line arguments.
2283         * target.h (struct target_ops): Add supports_disable_randomization.
2284         (target_supports_disable_randomization): New macro.
2285
2286 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
2287
2288         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2289         ifdef check.
2290         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2291         [!PT_GETDSBT] (target_loadmap): New definition.
2292         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2293         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2294         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2295         and PT_GETDSBT to LINUX_LOADMAP.
2296         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2297         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2298
2299 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
2300
2301         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2302         (arm_linux_hwbp_cap): New static variable.
2303         (arm_linux_get_hwbp_cap): Replace by ...
2304         (arm_linux_init_hwbp_cap): ... this new function.
2305         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2306         (arm_linux_get_hw_watchpoint_count): Likewise.
2307         (arm_linux_get_hw_watchpoint_max_length): Likewise.
2308         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2309         (arm_prepare_to_resume): Use perror_with_name instead of error.
2310
2311 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
2312
2313         * linux-arm-low.c: Include <signal.h>.
2314         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2315         (struct arm_linux_hwbp_cap): New data type.
2316         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2317         (struct arm_linux_hw_breakpoint): New data type.
2318         (MAX_BPTS, MAX_WPTS): Define.
2319         (struct arch_process_info, struct arch_lwp_info): New data types.
2320         (arm_linux_get_hwbp_cap): New function.
2321         (arm_linux_get_hw_breakpoint_count): Likewise.
2322         (arm_linux_get_hw_watchpoint_count): Likewise.
2323         (arm_linux_get_hw_watchpoint_max_length): Likewise.
2324         (arm_hwbp_control_initialize): Likewise.
2325         (arm_hwbp_control_is_enabled): Likewise.
2326         (arm_hwbp_control_is_initialized): Likewise.
2327         (arm_hwbp_control_disable): Likewise.
2328         (arm_linux_hw_breakpoint_equal): Likewise.
2329         (arm_linux_hw_point_initialize): Likewise.
2330         (struct update_registers_data): New data structure.
2331         (update_registers_callback: New function.
2332         (arm_insert_point): Likewise.
2333         (arm_remove_point): Likewise.
2334         (arm_stopped_by_watchpoint): Likewise.
2335         (arm_stopped_data_address): Likewise.
2336         (arm_new_process): Likewise.
2337         (arm_new_thread): Likewise.
2338         (arm_prepare_to_resume): Likewise.
2339         (the_low_target): Register arm_insert_point, arm_remove_point,
2340         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2341         arm_new_thread, and arm_prepare_to_resume.
2342
2343 2011-09-15  Stan Shebs  <stan@codesourcery.com>
2344
2345         * server.h (struct emit_ops): Add compare-goto fields.
2346         * tracepoint.c (gdb_agent_op_sizes): New table.
2347         (emit_eq_goto): New function.
2348         (emit_ne_goto): New function.
2349         (emit_lt_goto): New function.
2350         (emit_le_goto): New function.
2351         (emit_gt_goto): New function.
2352         (emit_ge_goto): New function.
2353         (is_goto_target): New function.
2354         (compile_bytecodes): Recognize special cases of compare-goto
2355         combinations and call specialized emitters for them.
2356         * linux-x86-low.c (amd64_emit_eq_goto): New function.
2357         (amd64_emit_ne_goto): New function.
2358         (amd64_emit_lt_goto): New function.
2359         (amd64_emit_le_goto): New function.
2360         (amd64_emit_gt_goto): New function.
2361         (amd64_emit_ge_goto): New function.
2362         (amd64_emit_ops): Add the new functions.
2363         (i386_emit_eq_goto): New function.
2364         (i386_emit_ne_goto): New function.
2365         (i386_emit_lt_goto): New function.
2366         (i386_emit_le_goto): New function.
2367         (i386_emit_gt_goto): New function.
2368         (i386_emit_ge_goto): New function.
2369         (i386_emit_ops): Add the new functions.
2370
2371 2011-09-08  Stan Shebs  <stan@codesourcery.com>
2372
2373         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2374         (i386_emit_epilogue): Restore %ebx.
2375
2376 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
2377
2378         * server.c (step_thread): Remove definition.
2379         (process_serial_event): Don't handle Hs.
2380         * server.h (step_thread): Remove declaration.
2381         * target.c (set_desired_inferior): Remove use of step_thread.
2382
2383 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
2384
2385         * linux-low.c: Include linux-procfs.h.
2386         (linux_attach_lwp_1): Update comments.
2387         (linux_attach): Scan for existing threads when attaching to a
2388         process that is the tgid.
2389         * Makefile.in: Update dependencies.
2390
2391 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
2392
2393         * configure.srv: Add linux-procfs.o dependencies.
2394
2395 2011-08-14  Yao Qi  <yao@codesourcery.com>
2396
2397         * target.h (struct target_ops): Fix indent.
2398         * win32-low.c (win32_target_ops): Fix comment.
2399
2400 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
2401             Yao Qi  <yao@codesourcery.com>
2402
2403         * Makefile.in (clean): Remove tic6x-*.c files.
2404         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2405         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2406         (tic6x-c64xp-linux.c): Likewise.
2407         * configure.srv: Add support for tic6x-*-uclinux.
2408         * linux-tic6x-low.c: New.
2409         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2410
2411 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
2412             Yao Qi  <yao@codesourcery.com>
2413
2414         * target.h (struct target_ops): Add read_loadmap.
2415         * linux-low.c (struct target_loadseg): New type.
2416         (struct target_loadmap): New type.
2417         (linux_read_loadmap): New function.
2418         (linux_target_ops): Add linux_read_loadmap.
2419         * server.c (handle_query): Support qXfer:fdpic:read packet.
2420         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2421         to NULL.
2422
2423 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
2424
2425         * win32-low.c: Include <stdint.h>.
2426
2427 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
2428
2429         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2430         to the inferior here.
2431         (i386_remove_aligned_watchpoint): Ditto.
2432         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2433         fit part of the watchpoint in the debug registers.
2434         (i386_update_inferior_debug_regs): New.
2435         (i386_low_insert_watchpoint): Work on a local mirror of the debug
2436         registers, and only update the inferior on success.
2437         (i386_low_remove_watchpoint): Ditto.
2438
2439 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
2440
2441         * linux-low.c (compare_ints, unique, list_threads, show_process,
2442         linux_core_of_thread): Delete.
2443         (linux_target_ops): Change linux_core_of_thread to
2444         linux_common_core_of_thread.
2445         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2446         * utils.c (malloc_failure): Change type of argument.
2447         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2448         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2449         common/linux-osdata.c, common/ptid.c and common/buffer.c.
2450         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2451         (IPA_OBJS): Add common-utils-ipa.o.
2452         (ptid_h, linux_osdata_h): New macros.
2453         (server_h): Add common/common-utils.h, common/xml-utils.h,
2454         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2455         common/ptid.h.
2456         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2457         ptid.o, buffer.o): New rules.
2458         (linux-low.o): Add common/linux-osdata.h as a dependency.
2459         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2460         * configure.ac: Add AC_HEADER_DIRENT check.
2461         * config.in: Regenerate.
2462         * configure: Regenerate.
2463         * remote-utils.c (xml_escape_text): Delete.
2464         (buffer_grow, buffer_free, buffer_init, buffer_finish,
2465         buffer_xml_printf): Move to common/buffer.c.
2466         * server.c (main): Remove call to initialize_inferiors.
2467         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2468         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2469         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2470         internal_error, gdb_assert, gdb_assert_fail): Delete.
2471         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2472         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2473         common/buffer.h.
2474         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2475         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2476         initialize_inferiors): Delete.
2477
2478 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
2479
2480         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2481         symbol error.
2482
2483 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
2484
2485         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2486         assertion.
2487         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2488
2489 2011-05-26  Yao Qi  <yao@codesourcery.com>
2490
2491         * Makefile.in (thread-db.o): Track dependence to
2492         common/gdb_thread_db.h.
2493         * thread-db.c: include gdb_thread_db.h from right place.
2494
2495 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
2496
2497         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2498         __FILE__ and __LINE__ to internal_error.
2499
2500 2011-05-13  Doug Evans  <dje@google.com>
2501
2502         * thread-db.c (try_thread_db_load_from_sdir): New function.
2503         (try_thread_db_load_from_dir): New function.
2504         (thread_db_load_search): Handle $sdir, ignore $pdir.
2505         Remove trying of system directories if search of
2506         libthread-db-search-path fails, that is now done via $sdir.
2507
2508 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
2509
2510         * server.c (handle_query): Add EnableDisableTracepoints to the list
2511         of supported features.
2512         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2513         tracepoints.
2514         (cmd_qtenable_disable): New.
2515         (cmd_qtstart): Install tracepoints even if disabled.
2516         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2517         receiving a QTEnable or QTDisable packet.
2518         (gdb_collect): Skip data collection if fast tracepoint is disabled.
2519         (ust_marker_to_static_tracepoint): Do not ignore disabled static
2520         tracepoints.
2521         (gdb_probe): Skip data collection if static tracepoint is disabled.
2522
2523 2011-05-10  Doug Evans  <dje@google.com>
2524
2525         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2526
2527 2011-05-04  Doug Evans  <dje@google.com>
2528
2529         * linux-low.c (linux_join): Skip process lookup.
2530         * spu-low.c (spu_join): Ditto.
2531         * server.c (join_inferiors_callback): Delete.
2532         (process_serial_event): For 'D' packet (detach) call join_inferior
2533         directly.
2534
2535 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
2536
2537         * README: Don't mention xscale*-*-linux*.
2538         * configure.srv (xscale*-*-linux*): Don't handle target.
2539
2540 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
2541
2542         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2543         casting pointers.
2544         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2545         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2546         (i386_emit_void_call_2): Likewise.
2547
2548 2011-04-26  Yao Qi  <yao@codesourcery.com>
2549
2550         * linux-low.c: Move common macros to linux-ptrace.h.
2551         Include linux-ptrace.h.
2552         * Makefile.in (linux_ptrace_h): New.
2553         (linux-low.o): Depends on linux-ptrace.h.
2554
2555 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2556
2557         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2558         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
2559         (remote_prepare): New function with most of the TCP code from ...
2560         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
2561         setting transport_is_reliable.
2562         * server.c (run_once): New variable.
2563         (gdbserver_usage): Document it.
2564         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
2565         the first run if RUN_ONCE.
2566         * server.h (run_once, remote_prepare): New declarations.
2567
2568 2011-04-19  Tom Tromey  <tromey@redhat.com>
2569
2570         * win32-low.c (handle_load_dll): Remove duplicate "the".
2571
2572 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
2573
2574         Remove support for old Cygwin 1.5 versions.
2575         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2576         function to avoid warning.
2577         (win32_add_one_solib): Use cygwin_conv_path function to avoid
2578         warning.
2579
2580 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
2581
2582         * gdbserver/server.h (Macro _): Define it if not available.
2583
2584 2011-03-14  Michael Snyder  <msnyder@vmware.com>
2585
2586         * hostio.c (handle_close): Remove unnecessary null test.
2587
2588 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
2589
2590         * Makefile.in (maintainer-clean realclean distclean): Remove
2591         "make ...  subdir_do" command.
2592
2593 2011-03-10  Michael Snyder  <msnyder@vmware.com>
2594
2595         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2596
2597         * server.c (handle_v_run): Free alloced buffer on early return.
2598
2599 2011-03-09  Yao Qi  <yao@codesourcery.com>
2600
2601         Revert:
2602         2011-03-04  Yao Qi  <yao@codesourcery.com>
2603
2604         * Makefile.in: Remove GNU make feature --directory.
2605
2606         2011-03-05  Yao Qi  <yao@codesourcery.com>
2607
2608         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2609         (subdir_do): New make target.  Copied from gdb/Makefile.
2610         (maintainer-clean, realclean, distclean, clean): Call corresponding
2611         make targets in common/Makefile.
2612
2613         2011-02-11  Yao Qi  <yao@codesourcery.com>
2614
2615         * configure.ac: Call AC_PROG_RANLIB.
2616         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
2617         * configure: Regenerate.
2618
2619 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2620
2621         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2622
2623 2011-03-06  Yao Qi  <yao@codesourcery.com>
2624
2625         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2626
2627 2011-03-05  Yao Qi  <yao@codesourcery.com>
2628
2629         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2630         (subdir_do): New make target.  Copied from gdb/Makefile.
2631         (maintainer-clean, realclean, distclean, clean): Call corresponding
2632         make targets in common/Makefile.
2633
2634 2011-03-04  Yao Qi  <yao@codesourcery.com>
2635
2636         * Makefile.in: Remove GNU make feature --directory.
2637
2638 2011-03-04  Michael Snyder  <msnyder@vmware.com>
2639
2640         * server.c (queue_stop_reply): Call xmalloc not malloc.
2641
2642 2011-03-02  Michael Snyder  <msnyder@vmware.com>
2643
2644         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2645
2646 2011-02-28  Michael Snyder  <msnyder@vmware.com>
2647
2648         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2649         (cmd_qtframe): Ditto.
2650         (cmd_qtbuffer): Ditto.
2651         (cmd_bigqtbuffer): Ditto.
2652
2653         * utils.c (decimal2str): Initialize 'width' to nine, then
2654         don't mess with it.
2655
2656 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
2657
2658         * hostio.c (require_data): Free *data, not data.
2659
2660 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
2661
2662         * hostio.c (require_data): Use free, not xfree.
2663
2664 2011-02-27  Michael Snyder  <msnyder@vmware.com>
2665
2666         * server.c (handle_query): Discard unused value.
2667
2668         * hostio.c (require_data): Free malloc memory before returning
2669         error.
2670
2671 2011-02-26  Michael Snyder  <msnyder@vmware.com>
2672
2673         * linux-low.c (list_threads): Call closedir for dirent.
2674
2675 2011-02-27  Michael Snyder  <msnyder@vmware.com>
2676
2677         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2678         a case statement falls through.
2679
2680         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2681
2682         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2683         in comparison.
2684
2685 2011-02-26  Michael Snyder  <msnyder@vmware.com>
2686
2687         * utils.c (decimal2str): Eliminate dead code and dead param.
2688         (pulongest): Drop dead param from call to decimal2str.
2689         (plongest): Ditto.
2690
2691 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
2692
2693         Revert the following patch (not approved yet):
2694         2011-02-21  Hui Zhu  <teawater@gmail.com>
2695         * tracepoint.c (tp_printf): New function.
2696         (eval_agent_expr): Handle gdb_agent_op_printf.
2697
2698 2011-02-21  Hui Zhu  <teawater@gmail.com>
2699
2700         * tracepoint.c (tp_printf): New function.
2701         (eval_agent_expr): Handle gdb_agent_op_printf.
2702
2703 2011-02-18  Tom Tromey  <tromey@redhat.com>
2704
2705         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2706         (tracepoint.o): Likewise.
2707         * tracepoint.c (enum gdb_agent_op): Use ax.def.
2708         (gdb_agent_op_names): Likewise.
2709
2710 2011-02-18  Tom Tromey  <tromey@redhat.com>
2711
2712         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2713         gdb_agent_op_rot>: New constants.
2714         (gdb_agent_op_names): Add pick and roll.
2715         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2716         cases.
2717
2718 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2719
2720         * aclocal.m4: Regenerated with aclocal-1.11.1.
2721
2722 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
2723
2724         * server.c (handle_qxfer_traceframe_info): New.
2725         (qxfer_packets): Register "traceframe-info".
2726         (handle_query): Report support for qXfer:traceframe-info:read+.
2727         * tracepoint.c (match_blocktype): New.
2728         (traceframe_find_block_type): Rename to ...
2729         (traceframe_walk_blocks): ... this.  Add callback filter argument,
2730         and use it.
2731         (traceframe_find_block_type): New, reimplemented on top of
2732         traceframe_walk_blocks.
2733         (build_traceframe_info_xml): New.
2734         (traceframe_read_info): New.
2735         * server.h (traceframe_read_info): Declare.
2736
2737 2011-02-11  Yao Qi  <yao@codesourcery.com>
2738
2739         * configure.ac: Call AC_PROG_RANLIB.
2740         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
2741         * configure: Regenerate.
2742
2743 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
2744
2745         * server.c (gdb_read_memory): Change return semantics to allow
2746         partial transfers.
2747         (handle_search_memory_1): Adjust.
2748         (process_serial_event) <'m' packet>: Handle partial transfers.
2749         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2750
2751 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
2752
2753         * regcache.c (init_register_cache): Initialize
2754         regcache->register_status.
2755         (free_register_cache): Release regcache->register_status.
2756         (regcache_cpy): Copy register_status.
2757         (registers_to_string): Print 'x's for unavailable registers.
2758         (supply_register): Mark the register's status valid or
2759         unavailable, depending on whether a buffer was passed in or not.
2760         (supply_register_zeroed): New.
2761         (supply_regblock): Mark the registers' status valid or
2762         unavailable, depending on whether a buffer was passed in or not.
2763         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2764         (struct regcache): New `register_status' field.
2765         (supply_register_zeroed): Declare.
2766         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2767         supply_register_zeroed, rather than passing a NULL buffer to
2768         supply_register.
2769         * tracepoint.c (fetch_traceframe_registers): Update comment.
2770
2771 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
2772
2773         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2774         buffer explicit.
2775
2776 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
2777
2778         * server.h (decode_xfer_write): Change prototype.
2779         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2780         and don't extract the annex here.
2781         * server.c (decode_xfer_read): Remove `annex' parameter,
2782         and don't extract the annex here.
2783         (decode_xfer): New.
2784         (struct qxfer): New.
2785         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2786         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2787         (handle_qxfer_statictrace): New functions, abstracted out from
2788         handle_query, and made to use the struct qxfer interface.
2789         (handle_threads_qxfer_proper): Rename to ...
2790         (handle_qxfer_threads_proper): ... this.
2791         (handle_threads_qxfer): Rename to ...
2792         (handle_qxfer_threads): ... this.  Adjust.
2793         (qxfer_packets): New array.
2794         (handle_qxfer): New function.
2795         (handle_query): Use handle_qxfer.
2796
2797 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
2798
2799         * gdbreplay.c: Shorten lines of >= 80 columns.
2800         * linux-low.c: Ditto.
2801         * linux-ppc-low.c: Ditto.
2802         * linux-s390-low.c: Ditto.
2803         * linux-sparc-low.c: Ditto.
2804         * linux-x86-low.c: Ditto.
2805         * linux-xtensa-low.c: Ditto.
2806         * mem-break.c: Ditto.
2807         * nto-low.c: Ditto.
2808         * regcache.h: Ditto.
2809         * remote-utils.c: Ditto.
2810         * server.c: Ditto.
2811         * server.h: Ditto.
2812         * thread-db.c: Ditto.
2813         * tracepoint.c: Ditto.
2814         * utils.c: Ditto.
2815         * win32-low.h: Ditto.
2816
2817 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
2818
2819         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2820         update.
2821
2822 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
2823
2824         * server.c (gdbserver_version): Update copyright year in version
2825         output.
2826         * gdbreplay.c (gdbreplay_version): Ditto.
2827
2828 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
2829
2830         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2831         * linux-bfin-low.c: New file.
2832         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2833         PT_DATA_ADDR for BFIN targets.
2834         * Makefile.in (SFILES): Add linux-bfin-low.c.
2835         (clean): Remove reg-bfin.c.
2836         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2837         * README: Mention supported Blackfin targets.
2838
2839 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
2840
2841         * .gitignore: New file.
2842
2843 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
2844
2845         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2846
2847 2010-10-22  Jie Zhang  <jie@codesourcery.com>
2848
2849         * Makefile.in: Add FLAGS_TO_PASS variable.
2850         (install): Remove dependency of install-only and recursively
2851         invoke make for install-only.
2852
2853 2010-10-04  Doug Evans  <dje@google.com>
2854
2855         * Makefile.in (uninstall): Use $(DESTDIR).
2856
2857 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
2858
2859         PR gdb/11842
2860
2861         * linux-x86-low.c (compat_siginfo_from_siginfo)
2862         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2863         si_code is < 0.  Check for si_code == SI_TIMER before checking for
2864         si_code < 0.
2865
2866 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
2867
2868         * lynx-i386-low.c: New file.
2869         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2870
2871 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
2872
2873         * lynx-low.c (ptrace_request_to_str): Remove handling for
2874         request values that have been removed in LynxOS 5.x.
2875
2876 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
2877
2878         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2879         <ptrace.h>
2880
2881 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
2882
2883         * configure.ac: Add --enable-inprocess-agent option.
2884         * configure: Rebuilt.
2885
2886 2010-09-06  Yao Qi  <yao@codesourcery.com>
2887
2888         * linux-low.c (linux_kill): Remove unused variable.
2889         (linux_stabilize_threads): Likewise.
2890         * server.c (start_inferior): Likewise.
2891         (queue_stop_reply_callback): Likewise.
2892         * tracepoint.c (do_action_at_tracepoint): Likewise.
2893
2894 2010-09-06  Yao Qi  <yao@codesourcery.com>
2895
2896         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2897         on return.
2898
2899 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2900
2901         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2902
2903 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
2904
2905         * Makefile.in (install-only): Replace $IPA_DEPFILES with
2906         "$(IPA_DEPFILES)".
2907
2908 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2909
2910         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2911         gdbserver/lynx-ppc-low.c: New files.
2912         * Makefile.in (lynx_low_h): New variable.
2913         (lynx-low.o, lynx-ppc-low.o): New rules.
2914         * configure.ac: On LynxOS, link with -lnetinet.
2915         * configure.srv: Add handling of powerpc-*-lynxos* targets.
2916         * configure: regenerate.
2917
2918 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2919
2920         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2921         * configure.ac: Add check for vasprintf and vsnprintf.
2922         * configure, config.in: Regenerate.
2923         * server.h (vasprintf, vsnprintf): Add conditional declarations.
2924
2925 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2926
2927         * gdbreplay.c: Move include of alloca.h up, next to include of
2928         malloc.h.
2929         * server.h: Add include of malloc.h.
2930         * mem-break.c: Remove include of malloc.h.
2931         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2932
2933 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2934
2935         * Makefile.in (memmem.o): Build with -Wno-error.
2936
2937 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2938
2939         * utils.c (xsnprintf): Make non-static.
2940         * server.h: Add xsnprintf declaration.
2941         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2942         replace calls to snprintf by calls to xsnprintf throughout.
2943
2944 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
2945
2946         * configure.ac: Add configure check for alloca.
2947         * configure, config.in: Regenerate.
2948         * server.h: Include alloca.h if it exists.
2949         * gdbreplay.c: Include alloca.h if it exists.
2950
2951 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
2952
2953         * linux-low.c (__SIGRTMIN): Define if not already defined.
2954         (linux_create_inferior): Check for __ANDROID__ rather than
2955         __SIGRTMIN.
2956         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2957         are already deferred.
2958         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2959         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2960         stopped and already has a pending signal to report.
2961         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2962         a pending signal to report or is moving out of a jump pad.
2963         (linux_init_signals): Check for __ANDROID__ rather than
2964         __SIGRTMIN.
2965
2966 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
2967
2968         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2969         debug_threads check.  Avoid a linear search when not doing debug
2970         output.
2971
2972 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
2973
2974         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2975         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2976         (struct file_handler) <fd>: Change type to gdb_fildes_t.
2977         (process_event): Change local fd's type to gdb_fildes_t.
2978         (create_file_handler): Adjust prototype.
2979         (delete_file_handler): Adjust prototype.
2980         (handle_file_event): Adjust prototype.  Use pfildes.
2981         (create_file_event): Adjsut prototype.
2982         * remote-utils.c (remote_desc, listen_desc): Change type to
2983         gdb_fildes_t.
2984         * server.h: New gdb_fildes_t typedef.
2985         [USE_WIN32API]: Include winsock2.h.
2986         (delete_file_handler, add_file_handler): Adjust prototypes.
2987         (pfildes): Declare.
2988         * utils.c (pfildes): New.
2989
2990 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
2991
2992         * configure.ac (build_warnings): Add -Wno-char-subscripts.
2993         * configure: Regenerate.
2994
2995 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
2996
2997         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2998         (linux_done_accessing_memory): ... this.
2999         (linux_target_ops): Adjust.
3000         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3001         * nto-low.c (nto_target_ops): Adjust comment.
3002         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3003         * spu-low.c (spu_target_ops): Adjust comment.
3004         * target.h (target_ops): Rename unprepare_to_access_memory field
3005         to done_accessing_memory.
3006         (unprepare_to_access_memory): Rename to ...
3007         (done_accessing_memory): ... this.
3008
3009 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3010
3011         * linux-low.c (linux_prepare_to_access_memory): New.
3012         (linux_unprepare_to_access_memory): New.
3013         (linux_target_ops): Install them.
3014         * server.c (read_memory): Rename to ...
3015         (gdb_read_memory): ... this.  Use
3016         prepare_to_access_memory/prepare_to_access_memory.
3017         (write_memory): Rename to ...
3018         (gdb_write_memory): ... this.  Use
3019         prepare_to_access_memory/prepare_to_access_memory.
3020         (handle_search_memory_1): Adjust.
3021         (process_serial_event): Adjust.
3022         * target.h (struct target_ops): New fields
3023         prepare_to_access_memory and unprepare_to_access_memory.
3024         (prepare_to_access_memory, unprepare_to_access_memory): New.
3025         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3026         prepare_to_access_memory/prepare_to_access_memory.
3027         * nto-low.c (nto_target_ops): Adjust.
3028         * spu-low.c (spu_target_ops): Adjust.
3029         * win32-low.c (win32_target_ops): Adjust.
3030
3031 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3032
3033         * Makefile.in (WARN_CFLAGS): Get it from configure.
3034         (WERROR_CFLAGS): New.
3035         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3036         * configure.ac: Introduce --enable-werror, which adds -Werror to
3037         the compiler command line.  Enabled by default.  Disable with
3038         --disable-werror.  Add -Wdeclaration-after-statement
3039         Wpointer-arith and -Wformat-nonliteral to warning flags.
3040         * configure: Regenerate.
3041
3042 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3043
3044         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3045
3046 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3047
3048         * gdbreplay.c (remote_error): New.
3049         (gdbchar): New.
3050         (expect): Use gdbchar.  Check for error reading from GDB.
3051         Clarify sync error output.
3052         (play): Check for errors writing to GDB.
3053         * linux-low.c (sigchld_handler): Really ignore `write' errors.
3054         * remote-utils.c (getpkt): Check for errors writing to the remote
3055         descriptor.
3056
3057 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3058
3059         * linux-low.c (linux_wait_1): Move non-debugging code out of
3060         `debug_threads' control.
3061
3062 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3063
3064         * linux-low.c (linux_wait_1): Don't set last_status here.
3065         * server.c (push_event, queue_stop_reply_callback): Assert we're
3066         not pushing a TARGET_WAITKIND_IGNORE event.
3067         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3068         (myresume, handle_target_event): Set the thread's last_resume_kind
3069         and last_status from the target returned status.
3070
3071 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3072
3073         PR threads/10729
3074
3075         * linux-x86-low.c (update_debug_registers_callback): New.
3076         (i386_dr_low_set_addr): Use it.
3077         (i386_dr_low_get_addr): New.
3078         (i386_dr_low_set_control): Use update_debug_registers_callback.
3079         (i386_dr_low_get_control): New.
3080         (i386_dr_low_get_status): Adjust.
3081         * linux-low.c (linux_stop_lwp): New.
3082         * linux-low.h (linux_stop_lwp): Declare.
3083
3084         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3085         argument instead of a i386_debug_reg_state.
3086         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3087         a i386_debug_reg_state.
3088         (i386_insert_aligned_watchpoint): Adjust.
3089         (i386_remove_aligned_watchpoint): Adjust.
3090         (i386_low_stopped_data_address): Read the debug registers from the
3091         inferior instead of from the mirrors.
3092         * i386-low.h (struct i386_debug_reg_state): Extend comment.
3093         (i386_dr_low_get_addr): Declare.
3094         (i386_dr_low_get_control): Declare.
3095         (i386_dr_low_get_status): Change prototype.
3096
3097         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3098         (i386_dr_low_get_addr): New.
3099         (i386_dr_low_get_control): New.
3100         (i386_dr_low_get_status): Adjust prototype.  Return
3101         dr_status_mirror.
3102         (i386_initial_stuff): Clear dr_status_mirror and
3103         dr_control_mirror.
3104         (i386_get_thread_context): Adjust.
3105         (i386_set_thread_context): Adjust.
3106         (i386_thread_added): Adjust.
3107
3108 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
3109
3110         * linux-low.h (linux_thread_area): Delete declaration.
3111
3112 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
3113
3114         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3115         after its termination.
3116
3117 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
3118
3119         * linux-low.c (gdb_wants_lwp_stopped): Delete.
3120         (gdb_wants_all_stopped): Delete.
3121         (linux_wait_1): Don't call them.
3122         * server.c (handle_v_cont): Tag all threads as want-stopped.
3123         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
3124         stopped as "client-wants-stopped".
3125
3126 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
3127
3128         * Makefile.in (signals_h): New.
3129         (server_h): Depend on it.
3130         (server.o): Don't depend on $(signals_def).
3131         (signals.o): Depend on $(signals_def).
3132
3133 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
3134
3135         * Makefile.in (signals_def): New.
3136         (server_h): Append include/gdb/signals.h and signals_def.
3137         (server.o): Append signals_def.
3138
3139 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
3140
3141         * server.c (handle_target_event): Use target_signal_to_host for
3142         resume_info.sig initialization.
3143         * target.h (struct thread_resume) <sig>: New comment.
3144
3145 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
3146
3147         * server.c (handle_query): strcpy() the returned string from paddress()
3148         instead of sprintf().
3149         * utils.c (paddress): Return phex_nz().
3150
3151 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
3152
3153         * server.c (handle_v_cont): Call mourn_inferior if process
3154         just exited.
3155         (myresume): Likewise.
3156
3157 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
3158
3159         Static tracepoints, and integration with UST.
3160
3161         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
3162         * mem-break.c (uninsert_all_breakpoints)
3163         (reinsert_all_breakpoints): New.
3164         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3165         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3166         (gdb_agent_ust_loaded, helper_thread_id)
3167         (gdb_agent_helper_thread_id): New macros.
3168         (struct ipa_sym_addresses): Add addr_ust_loaded,
3169         addr_helper_thread_id, addr_cmd_buf.
3170         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3171         (in_process_agent_loaded_ust): New.
3172         (write_e_ust_not_loaded): New.
3173         (maybe_write_ipa_ust_not_loaded): New.
3174         (struct collect_static_trace_data_action): New.
3175         (enum tracepoint_type) <static_tracepoint>: New.
3176         (struct tracepoint) <handle>: Mention static tracepoints.
3177         (struct static_tracepoint_ctx): New.
3178         (CMD_BUF_SIZE): New.
3179         (add_tracepoint_action): Handle static tracepoint actions.
3180         (unprobe_marker_at): New.
3181         (clear_installed_tracepoints): Handle static tracepoints.
3182         (cmd_qtdp): Handle static tracepoints.
3183         (probe_marker_at): New.
3184         (cmd_qtstart): Handle static tracepoints.
3185         (response_tracepoint): Handle static tracepoints.
3186         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3187         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3188         (get_context_regcache): Handle static tracepoints.
3189         (do_action_at_tracepoint): Handle static tracepoint actions.
3190         (traceframe_find_block_type): Handle static trace data blocks.
3191         (traceframe_read_sdata): New.
3192         (download_tracepoints): Download static tracepoint actions.
3193         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3194         (GDB_PROBE_NAME): New.
3195         (ust_ops): New.
3196         (GET_UST_SYM): New.
3197         (USTF): New.
3198         (dlsym_ust): New.
3199         (ust_marker_to_static_tracepoint): New.
3200         (gdb_probe): New.
3201         (collect_ust_data_at_tracepoint): New.
3202         (gdb_ust_probe): New.
3203         (UNIX_PATH_MAX, SOCK_DIR): New.
3204         (gdb_ust_connect_sync_socket): New.
3205         (resume_thread, stop_thread): New.
3206         (run_inferior_command): New.
3207         (init_named_socket): New.
3208         (gdb_ust_socket_init): New.
3209         (cstr_to_hexstr): New.
3210         (next_st): New.
3211         (first_marker, next_marker): New.
3212         (response_ust_marker): New.
3213         (cmd_qtfstm, cmd_qtsstm): New.
3214         (unprobe_marker_at, probe_marker_at): New.
3215         (cmd_qtstmat, gdb_ust_thread): New.
3216         (gdb_ust_init): New.
3217         (initialize_tracepoint_ftlib): Call gdb_ust_init.
3218         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3219         (ST_REGENTRY): New.
3220         (x86_64_st_collect_regmap): New.
3221         (X86_64_NUM_ST_COLLECT_GREGS): New.
3222         (AMD64_RIP_REGNUM): New.
3223         (supply_static_tracepoint_registers): New.
3224         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3225         (ST_REGENTRY): New.
3226         (i386_st_collect_regmap): New.
3227         (i386_NUM_ST_COLLECT_GREGS): New.
3228         (supply_static_tracepoint_registers): New.
3229         * server.c (handle_query): Handle qXfer:statictrace:read.
3230         <qSupported>: Report support for StaticTracepoints, and
3231         qXfer:statictrace:read features.
3232         * server.h (traceframe_read_sdata)
3233         (supply_static_tracepoint_registers): Declare.
3234         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3235         (unpack_varlen_hex): Include in IPA build.
3236         * Makefile.in (ustlibs, ustinc): New.
3237         (IPA_OBJS): Add remote-utils-ipa.o.
3238         ($(IPA_LIB)): Link -ldl and -lpthread.
3239         (UST_CFLAGS): New.
3240         (IPAGENT_CFLAGS): Add UST_CFLAGS.
3241         * config.in, configure: Regenerate.
3242
3243 2010-06-20  Ian Lance Taylor  <iant@google.com>
3244             Pedro Alves  <pedro@codesourcery.com>
3245
3246         * linux-x86-low.c (always_true): Delete.
3247         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3248         trying to fool the compiler with always_true.
3249
3250 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
3251
3252         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3253         conditions in gdbserver.
3254
3255 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
3256
3257         * spu-low.c (spu_read_memory): Wrap around local store limit.
3258         (spu_write_memory): Likewise.
3259
3260 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
3261
3262         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3263         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3264         LONGEST uses.
3265         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3266         uses.
3267         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3268         uses with LONGEST uses.
3269
3270 2010-06-14  Stan Shebs  <stan@codesourcery.com>
3271             Pedro Alves  <pedro@codesourcery.com>
3272
3273         Bytecode compiler.
3274
3275         * linux-x86-low.c: Include limits.h.
3276         (add_insns): New.
3277         (always_true): New.
3278         (EMIT_ASM): New.
3279         (EMIT_ASM32): New.
3280         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3281         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3282         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3283         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3284         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3285         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3286         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3287         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3288         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3289         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3290         (amd64_emit_void_call_2): New.
3291         (amd64_emit_ops): New.
3292         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3293         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3294         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3295         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3296         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3297         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3298         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3299         (i386_emit_call, i386_emit_reg, i386_emit_pop)
3300         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3301         (i386_emit_stack_adjust, i386_emit_int_call_1)
3302         (i386_emit_void_call_2): New.
3303         (i386_emit_ops): New.
3304         (x86_emit_ops): New.
3305         (the_low_target): Install x86_emit_ops.
3306         * server.h (struct emit_ops): New.
3307         (get_raw_reg_func_addr): Declare.
3308         (current_insn_ptr, emit_error): Declare.
3309         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3310         (set_trace_state_variable_value): New defines.
3311         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3312         addr_get_trace_state_variable_value and
3313         addr_set_trace_state_variable_value.
3314         (symbol_list): New fields for get_raw_reg,
3315         get_trace_state_variable_value and set_trace_state_variable_value.
3316         (condfn): New typedef.
3317         (struct tracepoint): New field `compiled_cond'.
3318         (do_action_at_tracepoint): Clear compiled_cond.
3319         (get_trace_state_variable_value, set_trace_state_variable_value):
3320         Export in the IPA.
3321         (condition_true_at_tracepoint): If there's a compiled condition,
3322         run that.
3323         (current_insn_ptr, emit_error): New globals.
3324         (struct bytecode_address): New.
3325         (get_raw_reg_func_addr): New.
3326         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3327         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3328         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3329         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3330         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3331         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3332         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3333         (compile_tracepoint_condition, compile_bytecodes): New.
3334         * target.h (emit_ops): Forward declare.
3335         (struct target_ops): New field emit_ops.
3336         (target_emit_ops): New.
3337         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3338         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3339         * linux-low.c (linux_emit_ops): New.
3340         (linux_target_ops): Install it.
3341         * linux-low.h (struct linux_target_ops): New field emit_ops.
3342
3343 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
3344
3345         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3346         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3347
3348 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
3349             Stan Shebs  <stan@codesourcery.com>
3350
3351         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3352         (all): Depend on $(extra_libraries).
3353         (install-only): Install the IPA.
3354         (IPA_OBJS, IPA_LIB): New.
3355         (clean): Remove the IPA lib.
3356         (IPAGENT_CFLAGS): New.
3357         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3358         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3359         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3360         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3361         * configure.ac: Check for atomic builtins support in the compiler.
3362         (IPA_DEPFILES, extra_libraries): Define.
3363         * configure.srv (ipa_obj): Add description.
3364         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3365         (i[34567]86-*-linux*): Set ipa_obj.
3366         (x86_64-*-linux*): Set ipa_obj.
3367         * linux-low.c (stabilizing_threads): New.
3368         (supports_fast_tracepoints): New.
3369         (linux_detach): Stabilize threads before detaching.
3370         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
3371         the lwp is either not stabilizing, or is moving out of a jump pad.
3372         (linux_fast_tracepoint_collecting): New.
3373         (maybe_move_out_of_jump_pad): New.
3374         (enqueue_one_deferred_signal): New.
3375         (dequeue_one_deferred_signal): New.
3376         (linux_wait_for_event_1): If moving out of a jump pad, defer
3377         pending signals to later.
3378         (linux_stabilize_threads): New.
3379         (linux_wait_1): Check if threads need moving out of jump pads, and
3380         do it if so.
3381         (stuck_in_jump_pad_callback): New.
3382         (move_out_of_jump_pad_callback): New.
3383         (lwp_running): New.
3384         (linux_resume_one_lwp): Handle moving out of jump pads.
3385         (linux_set_resume_request): Dequeue deferred signals.
3386         (need_step_over_p): Also step over fast tracepoint jumps.
3387         (start_step_over): Also uninsert fast tracepoint jumps.
3388         (finish_step_over): Also reinsert fast tracepoint jumps.
3389         (linux_install_fast_tracepoint_jump): New.
3390         (linux_target_ops): Install linux_stabilize_threads and
3391         linux_install_fast_tracepoint_jump_pad.
3392         * linux-low.h (linux_target_ops) <get_thread_area,
3393         install_fast_tracepoint_jump_pad>: New fields.
3394         (struct lwp_info) <collecting_fast_tracepoint,
3395         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3396         (linux_get_thread_area): Declare.
3397         * linux-x86-low.c (jump_insn): New.
3398         (x86_get_thread_area): New.
3399         (append_insns): New.
3400         (push_opcode): New.
3401         (amd64_install_fast_tracepoint_jump_pad): New.
3402         (i386_install_fast_tracepoint_jump_pad): New.
3403         (x86_install_fast_tracepoint_jump_pad): New.
3404         (the_low_target): Install x86_get_thread_area and
3405         x86_install_fast_tracepoint_jump_pad.
3406         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3407         (struct fast_tracepoint_jump): New.
3408         (fast_tracepoint_jump_insn): New.
3409         (fast_tracepoint_jump_shadow): New.
3410         (find_fast_tracepoint_jump_at): New.
3411         (fast_tracepoint_jump_here): New.
3412         (delete_fast_tracepoint_jump): New.
3413         (set_fast_tracepoint_jump): New.
3414         (uninsert_fast_tracepoint_jumps_at): New.
3415         (reinsert_fast_tracepoint_jumps_at): New.
3416         (set_breakpoint_at): Use write_inferior_memory.
3417         (uninsert_raw_breakpoint): Use write_inferior_memory.
3418         (check_mem_read): Mask out fast tracepoint jumps.
3419         (check_mem_write): Mask out fast tracepoint jumps.
3420         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3421         (set_fast_tracepoint_jump): Declare.
3422         (delete_fast_tracepoint_jump)
3423         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3424         (reinsert_fast_tracepoint_jumps_at): Declare.
3425         * regcache.c: Don't compile many functions when building the
3426         in-process agent library.
3427         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3428         the register buffer in the heap.
3429         (free_register_cache): If the register buffer isn't owned by the
3430         regcache, don't free it.
3431         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3432         pre-existing register caches.
3433         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3434         type.
3435         (convert_ascii_to_int): : Constify `from' parameter type.
3436         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3437         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
3438         the needed buffer in-place.
3439         (relocate_instruction): New.
3440         * server.c (handle_query) <qSymbols>: If the target supports
3441         tracepoints, give it a chance of looking up symbols.  Report
3442         support for fast tracepoints.
3443         (handle_status): Stabilize threads.
3444         (process_serial_event): Adjust.
3445         * server.h (struct fast_tracepoint_jump): Forward declare.
3446         (struct process_info) <fast_tracepoint_jumps>: New field.
3447         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3448         (decode_X_packet, decode_M_packet): Adjust.
3449         (relocate_instruction): Declare.
3450         (in_process_agent_loaded): Declare.
3451         (tracepoint_look_up_symbols): Declare.
3452         (struct fast_tpoint_collect_status): Declare.
3453         (fast_tracepoint_collecting): Declare.
3454         (force_unlock_trace_buffer): Declare.
3455         (handle_tracepoint_bkpts): Declare.
3456         (initialize_low_tracepoint)
3457         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3458         * target.h (struct target_ops) <stabilize_threads,
3459         install_fast_tracepoint_jump_pad>: New fields.
3460         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3461         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3462         [HAVE_STDINT_H]: Include stdint.h.
3463         (trace_debug_1): Rename to ...
3464         (trace_vdebug): ... this.
3465         (trace_debug): Rename to ...
3466         (trace_debug_1): ... this.  Add `level' parameter.
3467         (trace_debug): New.
3468         (ATTR_USED, ATTR_NOINLINE): New.
3469         (IP_AGENT_EXPORT): New.
3470         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3471         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3472         (about_to_request_buffer_space, trace_buffer_is_full)
3473         (stopping_tracepoint, expr_eval_result, error_tracepoint)
3474         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3475         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3476         (traceframe_write_count, traceframes_created)
3477         (trace_state_variables)
3478         New renaming defines.
3479         (struct ipa_sym_addresses): New.
3480         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3481         (symbol_list): New.
3482         (ipa_sym_addrs): New.
3483         (all_tracepoint_symbols_looked_up): New.
3484         (in_process_agent_loaded): New.
3485         (write_e_ipa_not_loaded): New.
3486         (maybe_write_ipa_not_loaded): New.
3487         (tracepoint_look_up_symbols): New.
3488         (debug_threads) [IN_PROCESS_AGENT]: New.
3489         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3490         (UNKNOWN_SIDE_EFFECTS): New.
3491         (stop_tracing): New.
3492         (flush_trace_buffer): New.
3493         (stop_tracing_bkpt): New.
3494         (flush_trace_buffer_bkpt): New.
3495         (read_inferior_integer): New.
3496         (read_inferior_uinteger): New.
3497         (read_inferior_data_pointer): New.
3498         (write_inferior_data_pointer): New.
3499         (write_inferior_integer): New.
3500         (write_inferior_uinteger): New.
3501         (struct collect_static_trace_data_action): Delete.
3502         (enum tracepoint_type): New.
3503         (struct tracepoint) <type>: New field `type'.
3504         <actions_str, step_actions, step_actions_str>: Only include in
3505         GDBserver.
3506         <orig_size, obj_addr_on_target, adjusted_insn_addr>
3507         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3508         (tracepoints): Use IP_AGENT_EXPORT.
3509         (last_tracepoint): Don't include in the IPA.
3510         (stopping_tracepoint): Use IP_AGENT_EXPORT.
3511         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3512         (alloced_trace_state_variables): New.
3513         (trace_state_variables): Use IP_AGENT_EXPORT.
3514         (traceframe_t): Delete unused variable.
3515         (circular_trace_buffer): Don't include in the IPA.
3516         (trace_buffer_start): Delete.
3517         (struct trace_buffer_control): New.
3518         (trace_buffer_free): Delete.
3519         (struct ipa_trace_buffer_control): New.
3520         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3521         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3522         New.
3523         (trace_buffer_ctrl): New.
3524         (TRACE_BUFFER_CTRL_CURR): New.
3525         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3526         Reimplement as macros.
3527         (trace_buffer_wrap): Delete.
3528         (traceframe_write_count, traceframe_read_count)
3529         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3530         (struct tracepoint_hit_ctx) <type>: New field.
3531         (struct fast_tracepoint_ctx): New.
3532         (memory_barrier): New.
3533         (cmpxchg): New.
3534         (record_tracepoint_error): Update atomically in the IPA.
3535         (clear_inferior_trace_buffer): New.
3536         (about_to_request_buffer_space): New.
3537         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3538         updating the same buffer.
3539         (add_tracepoint): Default the tracepoint's type to trap
3540         tracepoint, and orig_size to -1.
3541         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3542         internal variables.
3543         (create_trace_state_variable): New parameter `gdb'.  Handle it.
3544         (clear_installed_tracepoints): Clear fast tracepoint jumps.
3545         (cmd_qtdp): Handle fast tracepoints.
3546         (cmd_qtdv): Adjust.
3547         (max_jump_pad_size): New.
3548         (gdb_jump_pad_head): New.
3549         (get_jump_space_head): New.
3550         (claim_jump_space): New.
3551         (sort_tracepoints): New.
3552         (MAX_JUMP_SIZE): New.
3553         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
3554         IPA.
3555         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3556         support.  Upload fast traceframes, and delete internal IPA
3557         breakpoints.
3558         (stop_tracing_handler): New.
3559         (flush_trace_buffer_handler): New.
3560         (cmd_qtstop): Upload fast tracepoints.
3561         (response_tracepoint): Handle fast tracepoints.
3562         (tracepoint_finished_step): Upload fast traceframes.  Set the
3563         tracepoint hit context's tracepoint type.
3564         (handle_tracepoint_bkpts): New.
3565         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3566         type.  Add comment about fast tracepoints.
3567         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3568         non-existing action_str field.
3569         (get_context_regcache): Handle fast tracepoints.
3570         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3571         to the regcache.
3572         (fast_tracepoint_from_jump_pad_address): New.
3573         (fast_tracepoint_from_ipa_tpoint_address): New.
3574         (collecting_t): New.
3575         (force_unlock_trace_buffer): New.
3576         (fast_tracepoint_collecting): New.
3577         (collecting): New.
3578         (gdb_collect): New.
3579         (write_inferior_data_ptr): New.
3580         (target_tp_heap): New.
3581         (target_malloc): New.
3582         (download_agent_expr): New.
3583         (UALIGN): New.
3584         (download_tracepoints): New.
3585         (download_trace_state_variables): New.
3586         (upload_fast_traceframes): New.
3587         (IPA_FIRST_TRACEFRAME): New.
3588         (IPA_NEXT_TRACEFRAME_1): New.
3589         (IPA_NEXT_TRACEFRAME): New.
3590         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3591         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3592         (gdb_jump_pad_buffer_end): New.
3593         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3594         (initialize_tracepoint): Adjust.
3595         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3596         buffer.  Initialize the low module.
3597         * utils.c (PREFIX, TOOLNAME): New.
3598         (malloc_failure): Use PREFIX.
3599         (error): In the IPA, an error causes an exit.
3600         (fatal, warning): Use PREFIX.
3601         (internal_error): Use TOOLNAME.
3602         (NUMCELLS): Increase to 10.
3603         * configure, config.in: Regenerate.
3604
3605 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
3606
3607         * server.c (handle_query) <qSupported>: Do two passes over the
3608         qSupported string to avoid nesting strtok.
3609
3610 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3611
3612         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3613         (CDEPS): New.
3614         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
3615         -Wl,--dynamic-list.
3616         * configure: Regenerate.
3617         * proc-service.list: New.
3618
3619 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3620
3621         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3622         New comment.
3623
3624 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
3625
3626         * gdbreplay.c (remote_open): Check error return from socket() call by
3627         its equality to -1 not by it being negative.
3628         * remote-utils.c (remote_open): Likewise.
3629
3630 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
3631
3632         * config.h: Regenerate.
3633
3634 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
3635
3636         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3637         doesn't provide PTRACE_GET_THREAD_AREA.
3638
3639 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
3640
3641         * linux-m68k-low.c: Include <asm/ptrace.h>
3642         (ps_get_thread_area): Implement.
3643
3644 2010-05-03  Doug Evans  <dje@google.com>
3645
3646         * event-loop.c (struct callback_event): New struct.
3647         (callback_list): New global.
3648         (append_callback_event, delete_callback_event): New functions.
3649         (process_callback): New function.
3650         (start_event_loop): Call it.
3651         * remote-utils.c (NOT_SCHEDULED): Define.
3652         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3653         moved out of readchar.
3654         (readchar): Rewrite.  Call reschedule before returning.
3655         (reset_readchar): New function.
3656         (remote_close): Call it.
3657         (process_remaining, reschedule): New functions.
3658         * server.h (callback_handler_func): New typedef.
3659         (append_callback_event, delete_callback_event): Declare.
3660
3661 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
3662
3663         * proc-service.c (ps_pglobal_lookup): Use
3664         thread_db_look_up_one_symbol.
3665         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3666         parameter.  Use it instead of all_symbols_looked_up.
3667         * server.h (struct process_info) <all_symbols_looked_up>: Delete
3668         field.
3669         (all_symbols_looked_up): Don't declare.
3670         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3671         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3672         field.
3673         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3674         Set all_symbols_looked_up here.
3675         (thread_db_look_up_one_symbol): New.
3676         (thread_db_get_tls_address): Adjust.
3677         (thread_db_load_search, try_thread_db_load_1): Always allocate the
3678         thread_db object on the heap, and tentatively set it in the
3679         process structure.
3680         (thread_db_init): Don't set all_symbols_looked_up here.
3681         * linux-low.h (thread_db_look_up_one_symbol): Declare.
3682
3683 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
3684
3685         * linux-low.c (linux_kill, linux_detach): Adjust.
3686         (status_pending_p_callback): Remove redundant statement.  Check
3687         for !TARGET_WAITIKIND_IGNORE, instead of
3688         TARGET_WAITKIND_STOPPED.
3689         (handle_tracepoints): Make sure LWP is locked.  Adjust.
3690         (linux_wait_for_event_1): Adjust.
3691         (linux_cancel_breakpoints): New.
3692         (unsuspend_one_lwp): New.
3693         (unsuspend_all_lwps): New.
3694         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3695         (send_sigstop_callback): Change return type to int, add new
3696         `except' parameter and handle it.
3697         (suspend_and_send_sigstop_callback): New.
3698         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3699         pass them down.  If SUSPEND, also increment the lwp's suspend
3700         count.
3701         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3702         (need_step_over_p): Don't consider suspended LWPs.
3703         (start_step_over): Adjust.
3704         (proceed_one_lwp): Change return type to int, add new `except'
3705         parameter and handle it.
3706         (unsuspend_and_proceed_one_lwp): New.
3707         (proceed_all_lwps): Use find_inferior instead of
3708         for_each_inferior.
3709         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
3710         also decrement the suspend count of LWPs.  Pass `except' down,
3711         instead of hacking its suspend count.
3712         (linux_pause_all): Add `freeze' parameter.  Adjust.
3713         (linux_unpause_all): New.
3714         (linux_target_ops): Install linux_unpause_all.
3715         * server.c (handle_status): Adjust.
3716         * target.h (struct target_ops): New fields `unpause_all' and
3717         `cancel_breakpoints'.  Add new parameter to `pause_all'.
3718         (pause_all): Add new `freeze' parameter.
3719         (unpause_all): New.
3720         (cancel_breakpoints): New.
3721         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3722         cancel breakpoints.
3723         (cmd_qtstart): Pause threads.
3724         (stop_tracing): Pause threads, and cancel breakpoints.
3725         * win32-low.c (win32_target_ops): Adjust.
3726
3727 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
3728
3729         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3730         the inferior right away from here...
3731         (linux_wait_1): ... to here, and adjust to check the thread's
3732         last_resume_kind instead of the lwp's step or stop_expected flags.
3733
3734 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
3735
3736         * README: Use consistent `GDB' and `GDBserver' spellings.
3737
3738 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
3739
3740         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3741         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
3742         (linux_detach_one_lwp): Assume the lwp is stopped.
3743         (any_thread_of): Delete.
3744         (linux_detach): Stop all lwps here.  Don't blindly delete all
3745         breakpoints.
3746         (delete_lwp_callback): New.
3747         (linux_mourn): Delete all lwps of the process that is gone.
3748         (linux_wait_1): Don't delete the last lwp of the process here.
3749         * mem-break.h (mark_breakpoints_out): Declare.
3750         * mem-break.c (mark_breakpoints_out): New.
3751         (free_all_breakpoints): Use it.
3752         * server.c (handle_target_event): If the process is gone, mark
3753         breakpoints out.
3754         * thread-db.c (struct thread_db) <create_bp>: New field.
3755         (thread_db_enable_reporting): Fix prototype.  Store a thread event
3756         breakpoint reference in the thread_db struct.
3757         (thread_db_load_search): Clear the thread_db object.
3758         (try_thread_db_load_1): Ditto.
3759         (switch_to_process): New.
3760         (disable_thread_event_reporting): Use it.
3761         (remove_thread_event_breakpoints): New.
3762         (thread_db_detach, thread_db_mourn): Use it.
3763
3764 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
3765
3766         * linux-low.c (linux_enable_event_reporting): New.
3767         (linux_wait_for_event_1, handle_extended_wait): Use it.
3768
3769 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
3770
3771         * linux-low.c (linux_kill_one_lwp, linux_kill)
3772         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3773         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
3774         SIGSTOP even if the LWP is stopped.
3775         (send_sigstop_callback): New.
3776         (stop_all_lwps): Use send_sigstop_callback instead.
3777         (linux_resume_one_thread): Adjust.
3778         (proceed_one_lwp): Still proceed an LWP that the client has
3779         requested to stop, if we haven't reported it as stopped yet.  Make
3780         sure that LWPs the client want stopped, have a pending SIGSTOP.
3781
3782 2010-04-26  Doug Evans  <dje@google.com>
3783
3784         * server.c (handle_general_set): Make static.
3785
3786         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3787         Print received char after testing for error/eof instead of before.
3788         (input_interrupt): Tweak comment.
3789
3790 2010-04-23  Doug Evans  <dje@google.com>
3791
3792         * server.c (start_inferior): Print inferior argv if --debug.
3793
3794 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
3795
3796         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3797         * nto-x86-low.c: Include server.h
3798
3799 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
3800
3801         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3802         be consistent with other sources of this directory.
3803         (init_registers_amd64): Correct name of source file of this function
3804         in the comment.
3805
3806 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
3807
3808         * configure.srv (x86_64-*-mingw*): New configuration for Windows
3809         64-bit executables.
3810
3811 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
3812
3813         * win32-i386-low.c: Add 64-bit support.
3814         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3815         (init_registers_amd64): Declare.
3816         (mappings): Add 64-bit version of array.
3817         (init_windows_x86): New function.
3818         (the_low_target): Change init_arch field to init_windows_x86.
3819
3820 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
3821
3822         * win32-low.c: Adapt to support also 64-bit architecture.
3823         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3824         (get_image_name): Use SIZE_T type for local variable `done'.
3825         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3826         (toolhelp_get_dll_name): Idem.
3827         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3828         Use uintptr_t typecast to avoid warning.
3829         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3830         (handle_exception): Use phex_nz to avoid warning.
3831         (win32_wait): Remove unused local variable `process'.
3832
3833 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
3834
3835         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3836         `amd64-avx.o'.
3837
3838 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
3839
3840         * configure.ac: Use `ws2_32' library for srv_mingw.
3841         * configure: Regenerate.
3842         * gdbreplay.c: Include winsock2.h instead of winsock.h.
3843         * remote-utils.c: Likewise.
3844
3845 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3846
3847         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3848         if __x86_64__ is defined.
3849
3850 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
3851
3852         * configure: Regenerate.
3853
3854 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
3855
3856         * server.c (handle_query): Handle 'qGetTIBAddr' query.
3857         * target.h (target_ops): New get_tib_address field.
3858         * win32-low.h (win32_thread_info): Add thread_local_base field.
3859         * win32-low.c (child_add_thread): Add tlb argument.
3860         Set thread_local_base field to TLB.
3861         (get_child_debug_event): Adapt to child_add_thread change.
3862         (win32_get_tib_address): New function.
3863         (win32_target_ops): Set get_tib_address field to
3864         win32_get_tib_address.
3865         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3866
3867 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
3868
3869         * linux-low.c (linux_mourn): Also remove the process.
3870         * server.c (handle_target_event): Don't remove the process here.
3871         * nto-low.c (nto_mourn): New.
3872         (nto_target_ops): Install it.
3873         * spu-low.c (spu_mourn): New.
3874         (spu_target_ops): Install it.
3875         * win32-low.c (win32_mourn): New.
3876         (win32_target_ops): Install it.
3877
3878 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
3879
3880         * server.h (buffer_xml_printf): Remove redundant `;'.
3881
3882 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
3883
3884         * regcache.c (set_register_cache): Invalidate regcaches before
3885         changing the register cache layout.
3886         (regcache_invalidate_one): Allow a NULL regcache.
3887         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3888         regcaches before changing the register cache layout or the target
3889         regsets.
3890
3891 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
3892
3893         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3894         variable warning on Linux/x86-64.
3895
3896 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
3897
3898         GDBserver disconnected tracing support.
3899
3900         * linux-low.c (linux_remove_process): Delete.
3901         (add_lwp): Don't set last_resume_kind here.
3902         (linux_kill): Use `mourn'.
3903         (linux_detach): Use `thread_db_detach', and `mourn'.
3904         (linux_mourn): New.
3905         (linux_attach_lwp_1): Adjust comment.
3906         (linux_attach): last_resume_kind moved the thread_info; adjust.
3907         (status_pending_p_callback): Adjust.
3908         (linux_wait_for_event_1): Adjust.
3909         (count_events_callback, select_singlestep_lwp_callback)
3910         (select_event_lwp_callback, cancel_breakpoints_callback)
3911         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3912         (proceed_one_lwp): Adjust.
3913         (linux_async): Add debug output.
3914         (linux_thread_stopped): New.
3915         (linux_pause_all): New.
3916         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3917         linux_pause_all.
3918         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3919         (thread_db_free): Delete declaration.
3920         (thread_db_detach, thread_db_mourn): Declare.
3921         * thread-db.c (thread_db_init): Use thread_db_mourn.
3922         (thread_db_free): Delete, split in two.
3923         (disable_thread_event_reporting): New.
3924         (thread_db_detach): New.
3925         (thread_db_mourn): New.
3926
3927         * server.h (struct thread_info) <last_resume_kind>: New field.
3928         <attached>: Add comment.
3929         <gdb_detached>: New field.
3930         (handler_func): Change return type to int.
3931         (handle_serial_event, handle_target_event): Ditto.
3932         (gdb_connected): Declare.
3933         (tracing): Delete.
3934         (disconnected_tracing): Declare.
3935         (stop_tracing): Declare.
3936
3937         * server.c (handle_query) <qSupported>: Report support for
3938         disconnected tracing.
3939         (queue_stop_reply_callback): Account for running threads.
3940         (gdb_wants_thread_stopped): New.
3941         (gdb_wants_all_threads_stopped): New.
3942         (gdb_reattached_process): New.
3943         (handle_status): Clear the `gdb_detached' flag of all processes.
3944         In all-stop, stop all threads.
3945         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
3946         (process_serial_event): If the remote connection breaks, or if an
3947         exit was forced with "monitor exit", force an event loop exit.
3948         Handle disconnected tracing on detach.
3949         (handle_serial_event): Adjust.
3950         (handle_target_event): If GDB isn't connected, forward events back
3951         to the inferior, unless the last process exited, in which case,
3952         exit gdbserver.  Adjust interface.
3953
3954         * remote-utils.c (remote_open): Don't block in accept.  Instead
3955         register an event loop source on the listen socket file
3956         descriptor.  Refactor bits into ...
3957         (listen_desc): ... this new global.
3958         (gdb_connected): ... this new function.
3959         (enable_async_notification): ... this new function.
3960         (handle_accept_event): ... this new function.
3961         (remote_close): Clear remote_desc.
3962
3963         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3964
3965         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3966         New fields.
3967         (mourn_inferior): Define.
3968         (target_process_qsupported): Avoid the dangling else problem.
3969         (thread_stopped): Define.
3970         (pause_all): Define.
3971         (target_waitstatus_to_string): Declare.
3972         * target.c (target_waitstatus_to_string): New.
3973
3974         * tracepoint.c (tracing): Make extern.
3975         (disconnected_tracing): New.
3976         (stop_tracing): Make extern.  Handle tracing stops due to GDB
3977         disconnecting.
3978         (cmd_qtdisconnected): New.
3979         (cmd_qtstatus): Report disconnected tracing status in trace reply.
3980         (handle_tracepoint_general_set): Handle QTDisconnected.
3981
3982         * event-loop.c (event_handler_func): Change return type to int.
3983         (process_event): Bail out if the event handler wants the event
3984         loop to stop.
3985         (handle_file_event): Ditto.
3986         (start_event_loop): Bail out if the event handler wants the event
3987         loop to stop.
3988
3989         * nto-low.c (nto_target_ops): Adjust.
3990         * spu-low.c (spu_wait): Don't remove the process here.
3991         (spu_target_ops): Adjust.
3992         * win32-low.c (win32_wait): Don't remove the process here.
3993         (win32_target_ops): Adjust.
3994
3995 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
3996
3997         * regcache.c (realloc_register_cache): Invalidate inferior's
3998         regcache before recreating it.
3999
4000 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
4001
4002         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4003
4004 2010-04-09  Stan Shebs  <stan@codesourcery.com>
4005             Pedro Alves  <pedro@codesourcery.com>
4006
4007         * server.h (LONGEST): New.
4008         (struct thread_info) <while_stepping>: New field.
4009         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4010         Declare.
4011         (initialize_tracepoint, handle_tracepoint_general_set)
4012         (handle_tracepoint_query, tracepoint_finished_step)
4013         (tracepoint_was_hit, release_while_stepping_state_list):
4014         (current_traceframe): Declare.
4015         * server.c (handle_general_set): Handle tracepoint packets.
4016         (read_memory): New.
4017         (write_memory): New.
4018         (handle_search_memory_1): Use read_memory.
4019         (handle_query): Report support for conditional tracepoints, trace
4020         state variables, and tracepoint sources.  Handle tracepoint
4021         queries.
4022         (main): Initialize the tracepoints module.
4023         (process_serial_event): Handle traceframe reads/writes.
4024
4025         * linux-low.c (handle_tracepoints): New.
4026         (linux_wait_1): Call it.
4027         (linux_resume_one_lwp): Handle while-stepping.
4028         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4029         (linux_target_ops): Install them.
4030         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4031         New field.
4032         * linux-x86-low.c (x86_supports_tracepoints): New.
4033         (the_low_target). Install it.
4034
4035         * mem-break.h (delete_breakpoint): Declare.
4036         * mem-break.c (delete_breakpoint): Make external.
4037
4038         * target.h (struct target_ops): Add `supports_tracepoints',
4039         `read_pc', and `write_pc' fields.
4040         (target_supports_tracepoints): Define.
4041         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4042         (phex_nz): New.
4043
4044         * regcache.h (struct regcache) <registers_owned>: New field.
4045         (init_register_cache, regcache_cpy): Declare.
4046         (regcache_read_pc, regcache_write_pc): Declare.
4047         (register_cache_size): Declare.
4048         (supply_regblock): Declare.
4049         * regcache.c (init_register_cache): New.
4050         (new_register_cache): Use it.
4051         (regcache_cpy): New.
4052         (register_cache_size): New.
4053         (supply_regblock): New.
4054         (regcache_read_pc, regcache_write_pc): New.
4055
4056         * tracepoint.c: New.
4057
4058         * Makefile.in (OBS): Add tracepoint.o.
4059         (tracepoint.o): New rule.
4060
4061 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
4062
4063         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4064         (i386-mmx.o): New.
4065         (i386-mmx.c): Likewise.
4066         (i386-mmx-linux.o): Likewise.
4067         (i386-mmx-linux.c): Likewise.
4068
4069         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4070         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4071         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4072         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4073
4074         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4075         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4076         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4077
4078 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
4079
4080         * Makefile.in (clean): Updated.
4081         (i386-avx.o): New.
4082         (i386-avx.c): Likewise.
4083         (i386-avx-linux.o): Likewise.
4084         (i386-avx-linux.c): Likewise.
4085         (amd64-avx.o): Likewise.
4086         (amd64-avx.c): Likewise.
4087         (amd64-avx-linux.o): Likewise.
4088         (amd64-avx-linux.c): Likewise.
4089
4090         * configure.srv (srv_i386_regobj): Add i386-avx.o.
4091         (srv_i386_linux_regobj): Add i386-avx-linux.o.
4092         (srv_amd64_regobj): Add amd64-avx.o.
4093         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4094         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4095         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4096         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4097         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4098         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4099         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4100
4101         * i387-fp.c: Include "i386-xstate.h".
4102         (i387_xsave): New.
4103         (i387_cache_to_xsave): Likewise.
4104         (i387_xsave_to_cache): Likewise.
4105         (x86_xcr0): Likewise.
4106
4107         * i387-fp.h (i387_cache_to_xsave): Likewise.
4108         (i387_xsave_to_cache): Likewise.
4109         (x86_xcr0): Likewise.
4110
4111         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4112         * linux-crisv32-low.c (target_regsets): Likewise.
4113         * linux-m68k-low.c (target_regsets): Likewise.
4114         * linux-mips-low.c (target_regsets): Likewise.
4115         * linux-ppc-low.c (target_regsets): Likewise.
4116         * linux-s390-low.c (target_regsets): Likewise.
4117         * linux-sh-low.c (target_regsets): Likewise.
4118         * linux-sparc-low.c (target_regsets): Likewise.
4119         * linux-xtensa-low.c (target_regsets): Likewise.
4120
4121         * linux-low.c: Include <sys/uio.h>.
4122         (regsets_fetch_inferior_registers): Support nt_type.
4123         (regsets_store_inferior_registers): Likewise.
4124         (linux_process_qsupported): New.
4125         (linux_target_ops): Add linux_process_qsupported.
4126
4127         * linux-low.h (regset_info): Add nt_type.
4128         (linux_target_ops): Add process_qsupported.
4129
4130         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4131         and <sys/uio.h>.
4132         (init_registers_i386_avx_linux): New.
4133         (init_registers_amd64_avx_linux): Likewise.
4134         (xmltarget_i386_linux_no_xml): Likewise.
4135         (xmltarget_amd64_linux_no_xml): Likewise.
4136         (PTRACE_GETREGSET): Likewise.
4137         (PTRACE_SETREGSET): Likewise.
4138         (x86_fill_xstateregset): Likewise.
4139         (x86_store_xstateregset): Likewise.
4140         (use_xml): Likewise.
4141         (x86_linux_update_xmltarget): Likewise.
4142         (x86_linux_process_qsupported): Likewise.
4143         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4144         (x86_arch_setup): Don't call init_registers_amd64_linux nor
4145         init_registers_i386_linux here.  Call
4146         x86_linux_update_xmltarget.
4147         (the_low_target): Add x86_linux_process_qsupported.
4148
4149         * server.c (handle_query): Call target_process_qsupported.
4150
4151         * target.h (target_ops): Add process_qsupported.
4152         (target_process_qsupported): New.
4153
4154 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
4155
4156         * inferiors.c (add_thread): Set last_status kind to
4157         TARGET_WAITKIND_IGNORE.
4158         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4159         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
4160         (linux_wait_1): Move `thread' local definition to block that uses
4161         it.  Don't NULL initialize `event_child'.
4162         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4163         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4164         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4165
4166 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4167
4168         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4169         an extended waitstatus, or by a watchpoint.
4170         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4171         thread was stepping or has been stopped by a watchpoint.
4172
4173 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4174
4175         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4176         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4177         of another, then delete the previous, and validate all
4178         breakpoints.
4179         (validate_inserted_breakpoint): New.
4180         (delete_disabled_breakpoints): New.
4181         (validate_breakpoints): New.
4182         (check_mem_read): Validate breakpoints before trusting their
4183         shadow.  Delete disabled breakpoints.
4184         (check_mem_write): Validate breakpoints before trusting they
4185         should be inserted.  Delete disabled breakpoints.
4186         * mem-break.h (validate_breakpoints):
4187         * server.c (handle_query): Validate breakpoints when we see a
4188         qSymbol query.
4189
4190 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4191
4192         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4193         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
4194         if we could tell there's a GDB breakpoint at stop_pc.
4195         (need_step_over_p): Don't do a step over if we find a GDB
4196         breakpoint at the resume PC.
4197
4198         * mem-break.c (struct raw_breakpoint): New.
4199         (enum bkpt_type): New type `gdb_breakpoint'.
4200         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4201         fields.  New field `raw'.
4202         (find_raw_breakpoint_at): New.
4203         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
4204         breakpoint instead.
4205         (set_breakpoint_at): Adjust.
4206         (delete_raw_breakpoint): New.
4207         (release_breakpoint): New.
4208         (delete_breakpoint): Rename to...
4209         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
4210         release_breakpoint.  Return ENOENT.
4211         (delete_breakpoint): Reimplement.
4212         (find_breakpoint_at): Delete.
4213         (find_gdb_breakpoint_at): New.
4214         (delete_breakpoint_at): Delete.
4215         (set_gdb_breakpoint_at): New.
4216         (delete_gdb_breakpoint_at): New.
4217         (gdb_breakpoint_here): New.
4218         (set_reinsert_breakpoint): Use release_breakpoint.
4219         (uninsert_breakpoint): Rename to ...
4220         (uninsert_raw_breakpoint): ... this.
4221         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4222         (reinsert_raw_breakpoint): Change parameter type to
4223         raw_breakpoint.
4224         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4225         instead.
4226         (check_breakpoints): Adjust.  Use release_breakpoint.
4227         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4228         (breakpoint_inserted_here): Ditto.
4229         (check_mem_read): Adjust to iterate over raw breakpoints instead.
4230         Don't trust the breakpoint's shadow if it is not inserted.
4231         (check_mem_write): Adjust to iterate over raw breakpoints instead.
4232         (delete_all_breakpoints): Adjust.
4233         (free_all_breakpoints): Mark all breakpoints as uninserted, and
4234         use delete_breakpoint_1.
4235
4236         * mem-break.h (breakpoints_supported): Delete declaration.
4237         (set_gdb_breakpoint_at): Declare.
4238         (gdb_breakpoint_here): Declare.
4239         (delete_breakpoint_at): Delete.
4240         (delete_gdb_breakpoint_at): Declare.
4241
4242         * server.h (struct raw_breakpoint): Forward declare.
4243         (struct process_info): New field `raw_breakpoints'.
4244
4245         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4246         breakpoints.
4247
4248 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4249
4250         * linux-low.c (status_pending_p_callback): Fix comment.
4251         (linux_wait_for_event_1): Move most of the internal breakpoint
4252         handling from here...
4253         (linux_wait_1): ... to here.
4254         (count_events_callback): New.
4255         (select_singlestep_lwp_callback): New.
4256         (select_event_lwp_callback): New.
4257         (cancel_breakpoints_callback): New.
4258         (select_event_lwp): New.
4259         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
4260         priority to all LWPs that have had events that should be reported
4261         to the client.  Cancel breakpoints when about to reporting the
4262         event to the client, not while stopping lwps.  No longer cancel
4263         finished single-steps here.
4264         (cancel_finished_single_step): Delete.
4265         (cancel_finished_single_steps): Delete.
4266
4267 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4268
4269         * mem-break.c (enum bkpt_type): New.
4270         (struct breakpoint): New field `type'.
4271         (set_breakpoint_at): Change return type to struct breakpoint
4272         pointer.  Set type to `other_breakpoint' by default.
4273         (delete_breakpoint): Rewrite, supporting more than one breakpoint
4274         in the breakpoint list.
4275         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4276         (reinsert_breakpoint): Rename to ...
4277         (reinsert_raw_breakpoint): ... this.
4278         (reinsert_breakpoints_at): Adjust.
4279         * mem-break.h (struct breakpoint): Declare.
4280         (set_breakpoint_at): Change return type to struct breakpoint
4281         pointer.
4282
4283 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4284
4285         * server.c (handle_query): Assign, not compare.
4286
4287 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4288
4289         Teach linux gdbserver to step-over-breakpoints.
4290
4291         * linux-low.c (can_hardware_single_step): New.
4292         (supports_breakpoints): New.
4293         (handle_extended_wait): If stopping threads, read the stop pc of
4294         the new cloned LWP.
4295         (get_pc): New.
4296         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
4297         low target doesn't support retrieving the PC.
4298         (add_lwp): Set last_resume_kind to resume_continue.
4299         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
4300         (linux_attach): Don't clear stop_expected.  Set the lwp's
4301         last_resume_kind to resume_stop.
4302         (linux_detach_one_lwp): Don't check for removed breakpoints.
4303         (check_removed_breakpoint): Delete.
4304         (status_pending_p): Rename to ...
4305         (status_pending_p_callback): ... this.  Don't check for removed
4306         breakpoints.  Don't consider threads that are stopped from GDB's
4307         perspective.
4308         (linux_wait_for_lwp): Always read the stop_pc here.
4309         (cancel_breakpoint): New.
4310         (step_over_bkpt): New global.
4311         (linux_wait_for_event_1): Implement stepping over breakpoints.
4312         (gdb_wants_lwp_stopped): New.
4313         (gdb_wants_all_stopped): New.
4314         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
4315         single-step traps here.  Store the thread's last reported target
4316         wait status.
4317         (send_sigstop): Don't clear stop_expected.  Always set it,
4318         instead.
4319         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4320         (cancel_finished_single_step): New.
4321         (cancel_finished_single_steps): New.
4322         (wait_for_sigstop): Don't cancel finished single-step traps here.
4323         (linux_resume_one_lwp): Don't check for removed breakpoints.
4324         Don't set `step' on non-hardware step archs.
4325         (linux_set_resume_request): Ignore resume_stop requests if already
4326         stopping or stopped.  Set the lwp's last_resume_kind.
4327         (resume_status_pending_p): Don't check for removed breakpoints.
4328         (need_step_over_p): New.
4329         (start_step_over): New.
4330         (finish_step_over): New.
4331         (linux_resume_one_thread): Always queue a sigstop for resume_stop
4332         requests.  Clear the thread's last reported target waitstatus.
4333         Don't use the `suspended' flag.  Don't consider pending breakpoints.
4334         (linux_resume): Start a step-over if necessary.
4335         (proceed_one_lwp): New.
4336         (proceed_all_lwps): New.
4337         (unstop_all_lwps): New.
4338         * linux-low.h (struct lwp_info): Rewrite comment for the
4339         `suspended' flag.  Add the `stop_pc' field.  Delete the
4340         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
4341         Add `'last_resume_kind' and `need_step_over' fields.
4342         * inferiors.c (struct thread_info): Delete, moved elsewhere.
4343         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4344         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
4345         (set_raw_breakpoint_at): New.
4346         (set_breakpoint_at): Rewrite to use it.
4347         (reinsert_breakpoint_handler): Delete.
4348         (set_reinsert_breakpoint): New.
4349         (reinsert_breakpoint_by_bp): Delete.
4350         (delete_reinsert_breakpoints): New.
4351         (uninsert_breakpoint): Rewrite.
4352         (uninsert_breakpoints_at): New.
4353         (reinsert_breakpoint): Rewrite.
4354         (reinsert_breakpoints_at): New.
4355         (check_breakpoints): Rewrite.
4356         (breakpoint_here): New.
4357         (breakpoint_inserted_here): New.
4358         (check_mem_read): Adjust.
4359         * mem-break.h (breakpoints_supported, breakpoint_here)
4360         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4361         (reinsert_breakpoint_by_bp): Delete declaration.
4362         (delete_reinsert_breakpoints): Declare.
4363         (reinsert_breakpoint): Delete declaration.
4364         (reinsert_breakpoints_at): Declare.
4365         (uninsert_breakpoint): Delete declaration.
4366         (uninsert_breakpoints_at): Declare.
4367         (check_breakpoints): Adjust prototype.
4368         * server.h: Adjust include order.
4369         (struct thread_info): Declare here.  Add a `last_status' field.
4370
4371 2010-03-23  Michael Snyder  <msnyder@vmware.com>
4372
4373         * server.c (crc32): New function.
4374         (handle_query): Add handling for 'qCRC:' request.
4375
4376 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
4377
4378         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4379         lwp had been stopped by a watchpoint.
4380
4381 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
4382
4383         * server.h (internal_error): Declare.
4384         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4385         * utils.c (internal_error): New function.
4386
4387 2010-03-15  Andreas Schwab  <schwab@redhat.com>
4388
4389         * configure.srv: Fix typo setting srv_regobj.
4390
4391 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
4392
4393         * linux-low.c (fetch_register): Avoid passing a non string literal
4394         format to `error'.
4395         (usr_store_inferior_registers): Ditto.
4396
4397 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
4398
4399         * linux-low.c (linux_write_memory): Bail out early if peeking
4400         memory failed.
4401
4402 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
4403
4404         * linux-low.h (struct lwp_info): New fields
4405         `stopped_by_watchpoint' and `stopped_data_address'.
4406         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4407         here, and cache them in the lwp object.
4408         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4409         directly.
4410         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4411         field.
4412         (linux_stopped_by_watchpoint): Rewrite.
4413         (linux_stopped_data_address): Rewrite.
4414
4415 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
4416
4417         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4418         switching the current inferior, not before.
4419
4420 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
4421
4422         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4423         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4424         i386-linux.c and amd64-linux.c.
4425         (reg-i386.o): Removed.
4426         (reg-i386.c): Likewise.
4427         (reg-i386-linux.o): Likewise.
4428         (reg-i386-linux.c): Likewise.
4429         (reg-x86-64.o): Likewise.
4430         (reg-x86-64.c): Likewise.
4431         (reg-x86-64-linux.o): Likewise.
4432         (reg-x86-64-linux.c): Likewise.
4433         (i386.o): New.
4434         (i386.c): Likewise.
4435         (i386-linux.o): Likewise.
4436         (i386-linux.c): Likewise.
4437         (amd64.o): Likewise.
4438         (amd64.c): Likewise.
4439         (amd64-linux.o): Likewise.
4440         (amd64-linux.c): Likewise.
4441
4442         * configure.srv (srv_i386_regobj): New.
4443         (srv_i386_linux_regobj): Likewise.
4444         (srv_amd64_regobj): Likewise.
4445         (srv_amd64_linux_regobj): Likewise.
4446         (srv_i386_32bit_xmlfiles): Likewise.
4447         (srv_i386_64bit_xmlfiles): Likewise.
4448         (srv_i386_xmlfiles): Likewise.
4449         (srv_amd64_xmlfiles): Likewise.
4450         (srv_i386_linux_xmlfiles): Likewise.
4451         (srv_amd64_linux_xmlfiles): Likewise.
4452         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
4453         srv_xmlfiles to $srv_i386_xmlfiles.
4454         (i[34567]86-*-mingw32ce*): Likewise.
4455         (i[34567]86-*-mingw*): Likewise.
4456         (i[34567]86-*-nto*): Likewise.
4457         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4458         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
4459         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4460         (x86_64-*-linux*): Likewise.
4461
4462         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4463         (init_registers_amd64_linux): New.
4464         (x86_arch_setup): Replace init_registers_x86_64_linux with
4465         init_registers_amd64_linux.
4466
4467 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
4468
4469         * configure.ac: Check for libdl.  If it is not available link against
4470         static libthread_db.
4471         * configure: Regenerate.
4472
4473 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
4474
4475         PR9605
4476
4477         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4478         handing a read watchpoint.
4479         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4480
4481 2010-02-12  Doug Evans  <dje@google.com>
4482
4483         * linux-low.c (linux_supports_tracefork_flag): Document.
4484         (linux_look_up_symbols): Add comment.
4485
4486 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
4487
4488         * regcache.c (supply_register): Clear regcache if buf is NULL.
4489
4490 2010-02-02  Nicolas Roche  <roche@sourceware.org>
4491             Joel Brobecker  <brobecker@adacore.com>
4492
4493         * inferiors.c (find_inferior): Add function documentation.
4494         (unloaded_dll): Handle the case where the unloaded dll has not
4495         been previously registered in the dll list.
4496
4497 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
4498
4499         * linux-arm-low.c (thumb_breakpoint_len): Delete.
4500         (thumb2_breakpoint): New.
4501         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4502
4503 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
4504
4505         * linux-low.c (get_stop_pc): Check for SIGTRAP.
4506         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4507         breakpoints.
4508
4509 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4510
4511         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4512
4513 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4514
4515         * linux-s390-low.c (s390_collect_ptrace_register)
4516         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4517
4518 2010-01-21  Doug Evans  <dje@google.com>
4519
4520         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4521         (PTRACE_ARG4_TYPE): New macro.
4522         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4523         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4524         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4525         (usr_store_inferior_registers): Ditto.
4526         (linux_read_memory, linux_write_memory): Ditto.
4527         (linux_test_for_tracefork): Ditto.
4528
4529         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4530         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4531
4532 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4533
4534         * proc-service.c (ps_lgetregs): Don't refetch registers from the
4535         target.
4536
4537 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4538
4539         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4540         prototype to take a regcache.  Adjust.
4541
4542 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
4543
4544         * regcache.h (struct thread_info): Forward declare.
4545         (struct regcache): New.
4546         (new_register_cache): Adjust prototype.
4547         (get_thread_regcache): Declare.
4548         (free_register_cache): Adjust prototype.
4549         (registers_to_string, registers_from_string): Ditto.
4550         (supply_register, supply_register_by_name, collect_register)
4551         (collect_register_as_string, collect_register_by_name): Ditto.
4552         * regcache.c (struct inferior_regcache_data): Delete.
4553         (get_regcache): Rename to ...
4554         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
4555         fetching registers.
4556         (regcache_invalidate_one): Adjust.
4557         (regcache_invalidate): Fix prototype.
4558         (new_register_cache): Return the new register cache.
4559         (free_register_cache): Change prototype.
4560         (realloc_register_cache): Adjust.
4561         (registers_to_string): Change prototype to take a regcache.  Adjust.
4562         (registers_from_string): Ditto.
4563         (register_data): Ditto.
4564         (supply_register): Ditto.
4565         (supply_register_by_name): Ditto.
4566         (collect_register): Ditto.
4567         (collect_register_as_string): Ditto.
4568         (collect_register_by_name): Ditto.
4569         * server.c (process_serial_event): Adjust.
4570         * linux-low.h (regset_fill_func, regset_store_func): Change
4571         prototype.
4572         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4573         Change prototype.
4574         * linux-low.c (get_stop_pc): Adjust.
4575         (check_removed_breakpoint): Adjust.
4576         (linux_wait_for_event): Adjust.
4577         (linux_resume_one_lwp): Adjust.
4578         (fetch_register): Add regcache parameter.  Adjust.
4579         (usr_store_inferior_registers): Ditto.
4580         (regsets_fetch_inferior_registers): Ditto.
4581         (regsets_store_inferior_registers): Ditto.
4582         (linux_fetch_registers, linux_store_registers): Ditto.
4583         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4584         regcache.  Adjust.
4585         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4586         Ditto.
4587         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4588         prototype to take a regcache.
4589         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4590         * remote-utils.c (convert_ascii_to_int, outreg)
4591         (prepare_resume_reply): Change prototype to take a regcache.
4592         Adjust.
4593         * target.h (struct target_ops) <fetch_registers, store_registers>:
4594         Change prototype to take a regcache.
4595         (fetch_inferior_registers, store_inferior_registers): Change
4596         prototype to take a regcache.  Adjust.
4597         * proc-service.c (ps_lgetregs): Adjust.
4598         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4599         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4600         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4601         take a regcache.  Adjust.
4602         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4603         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4604         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4605         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
4606         * linux-cris-low.c (cris_get_pc, cris_set_pc)
4607         (cris_cannot_fetch_register):
4608         (cris_breakpoint_at): Change prototype to take a regcache.
4609         Adjust.
4610         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4611         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4612         to take a regcache.  Adjust.
4613         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4614         Adjust.
4615         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4616         take a regcache.  Adjust.
4617         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4618         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4619         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
4620         * linux-mips-low.c (mips_get_pc):
4621         (mips_set_pc): Change prototype to take a regcache.  Adjust.
4622         (mips_reinsert_addr): Adjust.
4623         (mips_collect_register): Change prototype to take a regcache.
4624         Adjust.
4625         (mips_supply_register):
4626         (mips_collect_register_32bit, mips_supply_register_32bit)
4627         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4628         (mips_store_fpregset): Ditto.
4629         * linux-ppc-low.c (ppc_supply_ptrace_register)
4630         (ppc_supply_ptrace_register): Ditto.
4631         (parse_spufs_run): Adjust.
4632         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4633         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4634         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4635         take a regcache.  Adjust.
4636         * linux-s390-low.c (s390_collect_ptrace_register)
4637         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4638         (s390_set_pc): Change prototype to take a regcache.  Adjust.
4639         (s390_arch_setup): Adjust.
4640         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4641         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
4642         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4643         (sparc_fill_gregset, sparc_store_gregset_from_stack)
4644         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4645         regcache.  Adjust.
4646         (sparc_breakpoint_at): Adjust.
4647         * linux-xtensa-low.c (xtensa_fill_gregset):
4648         (xtensa_store_gregset):
4649         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4650         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
4651         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4652         prototype to take a regcache.  Adjust.
4653         * win32-arm-low.c (arm_fetch_inferior_register)
4654         (arm_store_inferior_register): Change prototype to take a
4655         regcache.  Adjust.
4656         * win32-i386-low.c (i386_fetch_inferior_register)
4657         (i386_store_inferior_register): Change prototype to take a
4658         regcache.  Adjust.
4659         * win32-low.c (child_fetch_inferior_registers)
4660         (child_store_inferior_registers): Change prototype to take a
4661         regcache.  Adjust.
4662         (win32_wait): Adjust.
4663         (win32_fetch_inferior_registers): Change prototype to take a
4664         regcache.  Adjust.
4665         (win32_store_inferior_registers): Adjust.
4666         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4667         store_inferior_register>: Change prototype to take a regcache.
4668
4669 2010-01-20  Doug Evans  <dje@google.com>
4670
4671         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4672         #ifdef.
4673         (linux_wait_for_event1, linux_init_signals): Ditto.
4674         (W_STOPCODE): Provide definition if missing.
4675
4676 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
4677
4678         * linux-low.c (linux_core_of_thread): New.
4679         (compare_ints, show_process, list_threads): New.
4680         (linux_qxfer_osdata): Report threads and cores.
4681         (linux_target_op): Register linux_core_of_thread.
4682         * remote-utils.c (prepare_resume_reply): Report the core.
4683         (buffer_xml_printf): Support %d specifier.
4684         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4685         New.
4686         (handle_query): Handle qXfer:threads.  Announce availability
4687         thereof.
4688         * target.h (struct target_ops): New field core_of_thread.
4689
4690 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
4691
4692         * Makefile.in (clean): Remove new generated files.
4693         (reg-s390.o, reg-s390.c): Remove rules.
4694         (reg-s390x.o, reg-s390x.c): Likewise.
4695         (s390-linux32.o, s390-linux32.c): Add rules.
4696         (s390-linux64.o, s390-linux64.c): Likewise.
4697         (s390x-linux64.o, s390x-linux64.c): Likewise.
4698         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4699         * linux-s390-low.c: Include <elf.h>.
4700         (HWCAP_S390_HIGH_GPRS): Define if undefined.
4701         (init_registers_s390): Remove prototype.
4702         (init_registers_s390x): Likewise.
4703         (init_registers_s390_linux32): Add prototype.
4704         (init_registers_s390_linux64): Likewise.
4705         (init_registers_s390x_linux64): Likewise.
4706         (s390_num_regs_3264): New define.
4707         (s390_regmap_3264): New global variable.
4708         (s390_cannot_fetch_register): Remove obsolete check.
4709         (s390_cannot_store_register): Likewise.
4710         (s390_collect_ptrace_register): Handle upper/lower register halves.
4711         (s390_supply_ptrace_register): Likewise.
4712         (s390_fill_gregset): Update to register number changes.
4713         (s390_get_hwcap): New routine.
4714         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4715         Install appropriate regmap and register set.
4716
4717 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
4718
4719         * server.c (gdbserver_version): Update copyright year to 2010.
4720         * gdbreplay.c (gdbreplay_version): Likewise.
4721
4722 2009-12-28  Doug Evans  <dje@google.com>
4723
4724         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4725         elf/external.h.  Include <elf.h> instead but only if necessary.
4726
4727 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
4728
4729         * linux-low.c (linux_remove_process): Remove `detaching'
4730         parameter.  Don't release/detach from thread_db here.
4731         (linux_kill): Release/detach from thread_db here, ...
4732         (linux_detach): ... and here, before actually detaching.
4733         (linux_wait_1): ... and here, when a process exits.
4734         * thread-db.c (any_thread_of): New.
4735         (thread_db_free): Switch the current inferior to a thread of the
4736         passed in process.
4737
4738 2009-12-21  Doug Evans  <dje@google.com>
4739
4740         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4741
4742         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4743         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4744         warning ifndef __NR_tkill.  Move setting of errno there too.
4745         Delete unnecessary resetting of errno after syscall.
4746         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4747
4748         * configure.ac: Check for dladdr.
4749         * config.in: Regenerate.
4750         * configure: Regenerate.
4751         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4752         (try_thread_db_load): Update.
4753
4754         * linux-low.c (my_waitpid): Delete unnecessary prototype.
4755
4756 2009-12-18  Doug Evans  <dje@google.com>
4757
4758         * event-loop.c: Include unistd.h if it exists.
4759
4760         * linux-low.c (my_waitpid): Move definition away from being in
4761         between linux_tracefork_child/linux_test_for_tracefork.
4762
4763         * gdb_proc_service.h (psaddr_t): Fix type.
4764         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4765         signature to match glibc.
4766
4767 2009-12-16  Doug Evans  <dje@google.com>
4768
4769         * linux-low.c (linux_read_memory): Fix argument to read.
4770
4771 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
4772
4773         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4774         events, don't leave current_inferior pointing at null.
4775
4776 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
4777
4778         * win32-low.c (LOG): Delete.
4779         (OUTMSG): Output to stderr.
4780         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4781         on compile time LOG macro.
4782         (win32_wait): Fix debug output.
4783
4784 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
4785
4786         * win32-low.c (win32_add_one_solib): If the dll name is
4787         "ntdll.dll", prepend the system directory to the dll path.
4788
4789 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
4790
4791         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4792
4793 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
4794             Vladimir Prus  <vladimir@codesourcery.com>
4795
4796         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4797         * configure.ac: Check for __mcoldfire__ and set
4798         gdb_cv_m68k_is_coldfire.
4799         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4800         reg-cf.o and reg-m68k.o.
4801         * configure: Regenerated.
4802
4803 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
4804
4805         * linux-low.c (linux_remove_process): Add `detaching' parameter.
4806         Pass it to thread_db_free.
4807         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4808         proper `detaching' argument to linux_remove_process.
4809         * linux-low.h (thread_db_free): Add `detaching' parameter.
4810         * thread-db.c (thread_db_init): Pass false as `detaching' argument
4811         to thread_db_free.
4812         (thread_db_free): Add `detaching' parameter.  Only
4813         call td_ta_clear_event if detaching from process.
4814
4815 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
4816
4817         * thread-db.c (thread_db_free): Fix typo.
4818
4819 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
4820
4821         PR gdb/10838
4822         * thread-db.c (thread_db_free): Call td_ta_clear_event.
4823
4824 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
4825
4826         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4827         with an i686 compiler.
4828         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4829         needed.
4830         * configure: Rebuilt.
4831
4832 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
4833
4834         PR gdb/10783
4835
4836         * server.c (handle_search_memory_1): Correct read_addr initialization
4837         in loop for searching subsequent chunks.
4838
4839 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
4840
4841         * configure.ac: New --with-libthread-db option.
4842         * thread-db.c: Allow direct dependence on libthread_db.
4843         (thread_db_free): Adjust.
4844         * config.in: Regenerate.
4845         * configure: Likewise.
4846
4847 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
4848
4849         PR gdb/10757
4850         * thread-db.c (attach_thread): New function.
4851         (maybe_attach_thread): Return success/failure.
4852         (find_new_threads_callback): Adjust.
4853         (thread_db_find_new_threads): Loop until no new threads.
4854
4855 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
4856
4857         * proc-service.c (ps_lgetregs): Formatting.
4858
4859 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
4860
4861         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4862         * configure.ac: Adjust.
4863         * linux-low.h (struct process_info_private): Move members to struct
4864         thread_db.
4865         (thread_db_free, thread_db_handle_monitor_command): New prototype.
4866         * linux-low.c (linux_remove_process): Adjust.
4867         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4868         * server.c (handle_query): Move code ...
4869         (handle_monitor_command): ... here. New function.
4870         * target.h (struct target_ops): New member.
4871         * thread-db.c (struct thread_db): New.
4872         (libthread_db_search_path): New variable.
4873         (thread_db_create_event, thread_db_enable_reporting)
4874         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4875         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4876         (try_thread_db_load_1, dladdr_to_soname): New functions.
4877         (try_thread_db_load, thread_db_load_search): New functions.
4878         (thread_db_init): Search for libthread_db.
4879         (thread_db_free): New function.
4880         (thread_db_handle_monitor_command): Likewise.
4881         * config.in: Regenerate.
4882         * configure: Regenerate.
4883
4884 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4885
4886         * spu-low.c (spu_kill): Wait for inferior to terminate.
4887         Call clear_inferiors.
4888         (spu_detach): Call clear_inferiors.
4889
4890 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4891
4892         * aclocal.m4: Regenerate.
4893         * config.in: Likewise.
4894         * configure: Likewise.
4895
4896 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
4897
4898         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4899         (parse_spufs_run): New function.
4900         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4901         (ppc_breakpoint_at): Handle SPU breakpoints.
4902
4903 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
4904
4905         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4906         (SPUFS_MAGIC): Define.
4907         (spu_enumerate_spu_ids): New function.
4908         (linux_qxfer_spu): New function.
4909         (linux_target_ops): Install linux_qxfer_spu.
4910
4911 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
4912
4913         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4914         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
4915         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4916         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4917         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4918         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4919         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4920         (init_registers_powerpc_cell32l): Add prototype.
4921         (init_registers_powerpc_cell64l): Likewise.
4922         (ppc_arch_setup): Detect Cell/B.E. architecture.
4923
4924 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4925
4926         * Makefile.in (datarootdir): New variable.
4927
4928 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
4929
4930         * linux-low.c (linux_write_memory): Update debugging output.
4931         * Makefile.in (clean): Add new descriptions.
4932         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4933         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4934         * configure.srv: Add new files for arm*-*-linux*.
4935         * linux-arm-low.c: Add new declarations.
4936         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4937         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4938         (HWCAP_VFPv3D16): New.
4939         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4940         instead of __IWMMXT__.
4941         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4942         (arm_arch_setup): New.
4943         (target_regsets): Remove #ifdef.  Add VFP regset.
4944         (the_low_target): Use arm_arch_setup.
4945
4946 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
4947
4948         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4949         the main thread again.
4950
4951 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
4952
4953         Adding Neutrino gdbserver.
4954         * configure: Regenerated.
4955         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4956         * configure.srv (i[34567]86-*-nto*): New target.
4957         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4958         * remote-utils.c [__QNX__]: Include sys/iomgr.h
4959         (nto_comctrl) [__QNX__]: New function.
4960         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4961
4962 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
4963
4964         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4965         srv_tgtobj.
4966
4967 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
4968             Pedro Alves  <pedro@codesourcery.com>
4969
4970         * win32-i386-low.c (i386_get_thread_context): Handle systems that
4971         don't support CONTEXT_EXTENDED_REGISTERS.
4972         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4973         (the_low_target): Install them.
4974         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4975         failing with ERROR_PIPE_NOT_CONNECTED.
4976
4977 2009-06-30  Doug Evans  <dje@google.com>
4978             Pierre Muller  <muller@ics.u-strasbg.fr>
4979
4980         Add h/w watchpoint support to x86-linux, win32-i386.
4981         * Makefile.in (SFILES): Add i386-low.c
4982         (i386_low_h): Define.
4983         (i386-low.o): Add dependencies.
4984         (linux-x86-low.o): Add i386-low.h dependency.
4985         (win32-i386-low.o): Ditto.
4986         * i386-low.c: New file.
4987         * i386-low.h: New file.
4988         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4989         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4990         * linux-low.c (linux_add_process): Initialize arch_private.
4991         (linux_remove_process): Free arch_private.
4992         (add_lwp): Initialize arch_private.
4993         (delete_lwp): Free arch_private.
4994         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4995         provided.
4996         * linux-low.h (process_info_private): New member arch_private.
4997         (lwp_info): New member arch_private.
4998         (linux_target_ops): New members new_process, new_thread,
4999         prepare_to_resume.
5000         (ptid_of): New macro.
5001         * linux-x86-low.c: Include stddef.h, i386-low.h.
5002         (arch_process_info): New struct.
5003         (arch_lwp_info): New struct.
5004         (x86_linux_dr_get, x86_linux_dr_set): New functions.
5005         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5006         (i386_dr_low_get_status): New function.
5007         (x86_insert_point, x86_remove_point): New functions.
5008         (x86_stopped_by_watchpoint): New function.
5009         (x86_stopped_data_address): New function.
5010         (x86_linux_new_process, x86_linux_new_thread): New functions.
5011         (x86_linux_prepare_to_resume): New function.
5012         (the_low_target): Add entries for insert_point, remove_point,
5013         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5014         prepare_to_resume.
5015         * server.c (debug_hw_points): New global.
5016         (monitor_show_help): Document set debug-hw-points.
5017         (handle_query): Process "set debug-hw-points".
5018         * server.h (debug_hw_points): Declare.
5019         (paddress): Declare.
5020         * utils.c (NUMCELLS, CELLSIZE): New macros.
5021         (get_sell, xsnprintf, paddress): New functions.
5022         * win32-arm-low.c (the_low_target): Add entries for insert_point,
5023         remove_point, stopped_by_watchpoint, stopped_data_address.
5024         * win32-i386-low.c: Include i386-low.h.
5025         (debug_reg_state): Replaces dr.
5026         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5027         (i386_dr_low_get_status): New function.
5028         (i386_insert_point, i386_remove_point): New functions.
5029         (i386_stopped_by_watchpoint): New function.
5030         (i386_stopped_data_address): New function.
5031         (i386_initial_stuff): Update.
5032         (get_thread_context,set_thread_context,i386_thread_added): Update.
5033         (the_low_target): Add entries for insert_point,
5034         remove_point, stopped_by_watchpoint, stopped_data_address.
5035         * win32-low.c (win32_insert_watchpoint): New function.
5036         (win32_remove_watchpoint): New function.
5037         (win32_stopped_by_watchpoint): New function.
5038         (win32_stopped_data_address): New function.
5039         (win32_target_ops): Add entries for insert_watchpoint,
5040         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5041         * win32-low.h (win32_target_ops): New members insert_point,
5042         remove_point, stopped_by_watchpoint, stopped_data_address.
5043
5044 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
5045
5046         * server.c (process_serial_event): Re-return unsupported, not
5047         error, if the type isn't recognized.  Re-allow supporting only
5048         insert or remove packets.  Also call require_running for
5049         breakpoints.  Add missing break statement to default case.  Tidy.
5050         * target.h (struct target_ops): Rename insert_watchpoint to
5051         insert_point, and remove_watchpoint to remove_point.
5052
5053         * linux-low.h (struct linux_target_ops): Likewise.
5054         * linux-low.c (linux_insert_watchpoint): Rename to ...
5055         (linux_insert_point): ... this.  Adjust.
5056         (linux_remove_watchpoint): Rename to ...
5057         (linux_remove_point): ... this.  Adjust.
5058         (linux_target_ops): Adjust.
5059         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5060         (cris_insert_point): ... this.
5061         (cris_remove_watchpoint): Rename to ...
5062         (cris_remove_point): ... this.
5063         (the_low_target): Adjust.
5064
5065 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
5066
5067         * server.c (handle_v_kill): Pass signal_pid to
5068         kill_inferior if multi_process is zero.
5069
5070 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
5071
5072         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5073         * target.h (target_ops): Comment for *_watchpoint to make it clear
5074         the functions can get types '0' and '1'.
5075
5076 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
5077
5078         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5079         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5080         * regcache.c (get_regcache): Likewise.
5081         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5082         * win32-low.c (child_fetch_inferior_registers): Remove check for
5083         regno 0.
5084
5085 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
5086             Pedro Alves <pedro@codesourcery.com>
5087
5088         * target.h (struct target_ops) <supports_multi_process>: New
5089         callback.
5090         (target_supports_multi_process): New.
5091         * server.c (handle_query): Even if GDB reports support, only
5092         enable multi-process if the target also supports it.  Report
5093         multi-process support only if the target backend supports it.
5094         * linux-low.c (linux_supports_multi_process): New function.
5095         (linux_target_ops): Install it as target_supports_multi_process
5096         callback.
5097
5098 2009-05-24  Doug Evans  <dje@google.com>
5099
5100         Global renaming of find_thread_pid to find_thread_ptid.
5101         * server.h (find_thread_ptid): Renamed from find_thread_pid.
5102         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5103         All callers updated.
5104
5105         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5106         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5107         directly.
5108
5109         * linux-low.c (get_stop_pc): Print pc if debug_threads.
5110         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5111         (linux_resume_one_lwp): Ditto.
5112
5113 2009-05-23  Doug Evans  <dje@google.com>
5114
5115         * linux-low.c (linux_resume_one_lwp): Change type of first arg
5116         from struct inferior_list_entry * to struct lwp_info *.
5117         All callers updated.
5118
5119 2009-05-13  Doug Evans  <dje@google.com>
5120
5121         * linux-x86-low.c: Don't include assert.h.
5122         (x86_siginfo_fixup): Use fatal, not assert.
5123         (x86_arch_setup): Fix comment.
5124
5125 2009-05-12  Doug Evans  <dje@google.com>
5126
5127         Biarch support for i386/amd64 gdbserver.
5128         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5129         Add linux-x86-low.c.
5130         (linux-i386-low.o, linux-x86-64-low.o): Delete.
5131         (linux-x86-low.o): Add.
5132         * linux-x86-64-low.c: Delete.
5133         * linux-i386-low.c: Delete.
5134         * linux-x86-low.c: New file.
5135         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5136         linux-x86-low.o.
5137         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5138         linux-x86-low.o.
5139         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5140         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5141         (linux_child_pid_to_exec_file): New function.
5142         (elf_64_header_p, elf_64_file_p): New functions.
5143         (siginfo_fixup): New function.
5144         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
5145         give target a chance to convert layout.
5146         * linux-low.h (linux_target_ops): New member siginfo_fixup.
5147         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5148
5149 2009-05-07  Doug Evans  <dje@google.com>
5150
5151         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5152         (regsets_store_inferior_registers): Ditto.
5153
5154 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
5155
5156         PR server/10048
5157
5158         * linux-low.c (must_set_ptrace_flags): Delete.
5159         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5160         of the global.
5161         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
5162         `lwp->must_set_ptrace_flags' instead.
5163         (linux_wait_for_event_1): Set ptrace options here.
5164         (linux_wait_1): ... not here.
5165
5166 2009-04-30  Doug Evans  <dje@google.com>
5167
5168         * inferiors.c (started_inferior_callback): New function.
5169         (attached_inferior_callback): New function.
5170         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5171         * server.c (print_started_pid, print_attached_pid): New functions.
5172         (detach_or_kill_for_exit): New function.
5173         (main): Call it instead of for_each_inferior (kill_inferior_callback).
5174         * server.h (have_started_inferiors_p): Declare.
5175         (have_attached_inferiors_p): Declare.
5176
5177         * inferiors.c (remove_process): Fix memory leak, free process.
5178         * linux-low.c (linux_remove_process): New function.
5179         (linux_kill): Call it instead of remove_process.
5180         (linux_detach, linux_wait_1): Ditto.
5181
5182 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
5183
5184         * configure.srv: Add x86 Windows CE target.
5185
5186 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
5187
5188         * inferiors.c (get_thread_process): Make global.
5189         * server.h (get_thread_process): Add prototype.
5190         * thread-db.c (find_one_thread): Use get_thread_process
5191         instead of current_process.
5192         (thread_db_get_tls_address): Do not crash if called when
5193         thread layer is not yet initialized.
5194
5195 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
5196
5197         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5198         * spu-low.c (current_tid): Rename to ...
5199         (current_ptid): ... this.
5200         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5201         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5202         ptid_get_lwp (current_ptid) instead of current_tid.
5203         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5204         instead of current_tid.  Use find_process_pid to verify pid
5205         argument is valid.  Pass proper argument to remove_process.
5206         (spu_thread_alive): Compare current_ptid instead of current_tid.
5207         (spu_resume): Likewise.
5208
5209 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
5210
5211         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5212         variable.
5213
5214 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5215
5216         Implement the multiprocess extensions, and add linux multiprocess
5217         support.
5218
5219         * server.h (ULONGEST): Declare.
5220         (struct ptid, ptid_t): New.
5221         (minus_one_ptid, null_ptid): Declare.
5222         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5223         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5224         (struct inferior_list_entry): Change `id' type from unsigned from
5225         to ptid_t.
5226         (struct sym_cache, struct breakpoint, struct
5227         process_info_private): Forward declare.
5228         (struct process_info): Declare.
5229         (current_process): Declare.
5230         (all_processes): Declare.
5231         (initialize_inferiors): Declare.
5232         (add_thread): Adjust to use ptid_t.
5233         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5234         (add_process, remove_process, find_thread_pid): Declare.
5235         (find_inferior_id): Adjust to use ptid_t.
5236         (cont_thread, general_thread, step_thread): Change type to ptid_t.
5237         (multi_process): Declare.
5238         (push_event): Adjust to use ptid_t.
5239         (read_ptid, write_ptid): Declare.
5240         (prepare_resume_reply): Adjust to use ptid_t.
5241         (clear_symbol_cache): Declare.
5242         * inferiors.c (all_processes): New.
5243         (null_ptid, minus_one_ptid): New.
5244         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5245         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5246         (add_thread): Change unsigned long to ptid.  Remove gdb_id
5247         parameter.  Adjust.
5248         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5249         (gdb_id_to_thread): Rename to ...
5250         (find_thread_pid): ... this.  Change unsigned long to ptid.
5251         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5252         (loaded_dll, pull_pid_from_list): Adjust.
5253         (add_process, remove_process, find_process_pid)
5254         (get_thread_process, current_process, initialize_inferiors): New.
5255         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5256         (struct target_waitstatus) <related_pid>: Ditto.
5257         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
5258         return type to int.
5259         (struct target_ops) <join>: Add `pid' argument.
5260         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5261         (struct target_ops) <wait>: Add `ptid' field.  Change return type
5262         to ptid.
5263         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5264         (mywait): Add `ptid' argument.  Change return type to ptid_t.
5265         (target_pid_to_str): Declare.
5266         * target.c (set_desired_inferior): Adjust to use ptids.
5267         (mywait): Add new `ptid' argument.  Adjust.
5268         (target_pid_to_str): New.
5269         * mem-break.h (free_all_breakpoints): Declare.
5270         * mem-break.c (breakpoints): Delelete.
5271         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5272         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5273         to use per-process breakpoint list.
5274         (free_all_breakpoints): New.
5275         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5276         (symbol_cache, all_symbols_looked_up): Delete.
5277         (hexchars): New.
5278         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5279         read_ptid): New.
5280         (prepare_resume_reply): Change ptid argument's type from unsigned
5281         long to ptid_t.  Adjust.  Implement W;process and X;process.
5282         (free_sym_cache, clear_symbol_cache): New.
5283         (look_up_one_symbol): Adjust to per-process symbol cache.  *
5284         * server.c (cont_thread, general_thread, step_thread): Change type
5285         to ptid_t.
5286         (attached): Delete.
5287         (multi_process): New.
5288         (last_ptid): Change type to ptid_t.
5289         (struct vstop_notif) <ptid>: Change type to ptid_t.
5290         (queue_stop_reply, push_event): Change `ptid' argument's type to
5291         ptid_t.
5292         (discard_queued_stop_replies): Add `pid' argument.
5293         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
5294         changes.  Don't reference the `attached' global.
5295         (attach_inferior): Adjust to mywait interface changes.
5296         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
5297         features.  Handle and report "multiprocess+".  Handle
5298         "qAttached:PID".
5299         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
5300         changes.
5301         (handle_v_kill): New.
5302         (handle_v_stopped): Adjust to use target_pid_to_str.
5303         (handle_v_requests): Allow multiple attaches and runs when
5304         multiprocess extensions are in effect.  Handle "vKill".
5305         (myresume): Adjust to use ptids.
5306         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
5307         (handle_status): Adjust to discard_queued_stop_replies interface
5308         change.
5309         (first_thread_of, kill_inferior_callback)
5310         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5311         (main): Call initialize_inferiors.  Adjust to use ptids, killing
5312         and detaching from all inferiors.  Handle multiprocess packet
5313         variants.
5314         * linux-low.h: Include gdb_proc_service.h.
5315         (struct process_info_private): New.
5316         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5317         <lwpid_of>: Use ptid_get_lwp.
5318         (get_lwp_thread): Adjust.
5319         (struct lwp_info): Add `dead' member.
5320         (find_lwp_pid): Declare.
5321         * linux-low.c (thread_db_active): Delete.
5322         (new_inferior): Adjust comment.
5323         (inferior_pid): Delete.
5324         (linux_add_process): New.
5325         (handle_extended_wait): Adjust.
5326         (add_lwp): Change unsigned long to ptid.
5327         (linux_create_inferior): Add process to processes table.  Adjust
5328         to use ptids.  Don't set new_inferior here.
5329         (linux_attach_lwp): Rename to ...
5330         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
5331         it.  Adjust to use ptids.
5332         (linux_attach_lwp): New.
5333         (linux_attach): Add process to processes table.  Don't set
5334         new_inferior here.
5335         (struct counter): New.
5336         (second_thread_of_pid_p, last_thread_of_process_p): New.
5337         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
5338         multiple processes.
5339         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
5340         processes.  Remove process from process table.
5341         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
5342         to multiple processes.
5343         (any_thread_of): New.
5344         (linux_detach): Add `pid' argument, and handle it.  Remove process
5345         from processes table.
5346         (linux_join): Add `pid' argument.  Handle it.
5347         (linux_thread_alive): Change unsighed long argument to ptid_t.
5348         Consider dead lwps as not being alive.
5349         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
5350         threads we're not interested in.
5351         (same_lwp, find_lwp_pid): New.
5352         (linux_wait_for_lwp): Change `pid' argument's type from int to
5353         ptid_t.  Adjust.
5354         (linux_wait_for_event): Rename to ...
5355         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
5356         from int to ptid_t.  Adjust.
5357         (linux_wait_for_event): New.
5358         (linux_wait_1): Add `ptid' argument.  Change return type to
5359         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
5360         that exit from the process table.
5361         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
5362         Adjust.
5363         (mark_lwp_dead): New.
5364         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
5365         stopping all threads, mark its main lwp as dead.
5366         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5367         ptids.
5368         (fetch_register, usr_store_inferior_registers)
5369         (regsets_fetch_inferior_registers)
5370         (regsets_store_inferior_registers, linux_read_memory)
5371         (linux_write_memory): Inline `inferior_pid'.
5372         (linux_look_up_symbols): Adjust to use per-process
5373         `thread_db_active'.
5374         (linux_request_interrupt): Adjust to use ptids.
5375         (linux_read_auxv): Inline `inferior_pid'.
5376         (initialize_low): Don't reference thread_db_active.
5377         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5378         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5379         (ps_getpid): Return the pid of the current inferior.
5380         * thread-db.c (proc_handle, thread_agent): Delete.
5381         (thread_db_create_event, thread_db_enable_reporting): Adjust to
5382         per-process data.
5383         (find_one_thread): Change argument type to ptid_t.  Adjust to
5384         per-process data.
5385         (maybe_attach_thread): Adjust to per-process data and ptids.
5386         (thread_db_find_new_threads): Ditto.
5387         (thread_db_init): Ditto.
5388         * spu-low.c (spu_create_inferior, spu_attach): Add process to
5389         processes table.  Adjust to use ptids.
5390         (spu_kill, spu_detach): Adjust interface.  Remove process from
5391         processes table.
5392         (spu_join, spu_thread_alive): Adjust interface.
5393         (spu_wait): Adjust interface.  Remove process from processes
5394         table.  Adjust to use ptids.
5395         * win32-low.c (current_inferior_tid): Delete.
5396         (current_inferior_ptid): New.
5397         (debug_event_ptid): New.
5398         (thread_rec): Take a ptid.  Adjust.
5399         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
5400         (child_delete_thread): Ditto.
5401         (do_initial_child_stuff): Add `attached' argument.  Add process to
5402         processes table.
5403         (child_fetch_inferior_registers, child_store_inferior_registers):
5404         Adjust.
5405         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5406         (win32_attach): Pass 1 to do_initial_child_stuff.
5407         (win32_kill): Adjust interface.  Remove process from processes
5408         table.
5409         (win32_detach): Ditto.
5410         (win32_join): Adjust interface.
5411         (win32_thread_alive): Take a ptid.
5412         (win32_resume): Adjust to use ptids.
5413         (get_child_debug_event): Ditto.
5414         (win32_wait): Adjust interface.  Remove exiting process from
5415         processes table.
5416
5417 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5418
5419         Non-stop mode support.
5420
5421         * server.h (non_stop): Declare.
5422         (gdb_client_data, handler_func): Declare.
5423         (delete_file_handler, add_file_handler, start_event_loop):
5424         Declare.
5425         (handle_serial_event, handle_target_event, push_event)
5426         (putpkt_notif): Declare.
5427         * target.h (enum resume_kind): New.
5428         (struct thread_resume): Replace `step' field by `kind' field.
5429         (TARGET_WNOHANG): Define.
5430         (struct target_ops) <wait>: Add `options' argument.
5431         <supports_non_stop, async, start_non_stop>: New fields.
5432         (target_supports_non_stop, target_async): New.
5433         (start_non_stop): Declare.
5434         (mywait): Add `options' argument.
5435         * target.c (mywait): Add `options' argument.  Print child exit
5436         notifications here.
5437         (start_non_stop): New.
5438         * server.c (non_stop, own_buf, mem_buf): New globals.
5439         (struct vstop_notif): New.
5440         (notif_queue): New global.
5441         (queue_stop_reply, push_event, discard_queued_stop_replies)
5442         (send_next_stop_reply): New.
5443         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
5444         interface changes.
5445         (attach_inferior): In non-stop mode, don't wait for the target
5446         here.
5447         (handle_general_set): Handle QNonStop.
5448         (handle_query): When handling qC, return the current general
5449         thread, instead of the first thread of the list.
5450         (handle_query): If the backend supports non-stop mode, include
5451         QNonStop+ in the qSupported query response.
5452         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
5453         and non-stop mode.
5454         (handle_v_attach, handle_v_run): Handle non-stop mode.
5455         (handle_v_stopped): New.
5456         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
5457         (myresume): Adjust to use resume_kind.  Handle non-stop.
5458         (queue_stop_reply_callback): New.
5459         (handle_status): Handle non-stop mode.
5460         (main): Clear non_stop flag on reconnection.  Use the event-loop.
5461         Refactor serial protocol handling from here ...
5462         (process_serial_event): ... to this new function.  When GDB
5463         selects any thread, select one here.  In non-stop mode, wait until
5464         GDB acks all pending events before exiting.
5465         (handle_serial_event, handle_target_event): New.
5466         * remote-utils.c (remote_open): Install remote_desc in the event
5467         loop.
5468         (remote_close): Remove remote_desc from the event loop.
5469         (putpkt_binary): Rename to...
5470         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
5471         (putpkt_binary): New as wrapper around putpkt_binary_1.
5472         (putpkt_notif): New.
5473         (prepare_resume_reply): In non-stop mode, don't change the
5474         general_thread.
5475         * event-loop.c: New.
5476         * Makefile.in (OBJ): Add event-loop.o.
5477         (event-loop.o): New rule.
5478
5479         * linux-low.h (pid_of): Moved here.
5480         (lwpid_of): New.
5481         (get_lwp_thread): Use lwpid_of.
5482         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
5483         * linux-low.c (pid_of): Delete.
5484         (inferior_pid): Use lwpid_of.
5485         (linux_event_pipe): New.
5486         (target_is_async_p): New.
5487         (delete_lwp): New.
5488         (handle_extended_wait): Use lwpid_of.
5489         (add_lwp): Don't set lwpid field.
5490         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
5491         (linux_kill_one_lwp): If killing a running lwp, stop it first.
5492         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
5493         (linux_detach_one_lwp): If detaching from a running lwp, stop it
5494         first.  Adjust to linux_wait_for_event interface changes.  Use
5495         lwpid_of.
5496         (linux_detach): Don't delete the main lwp here.
5497         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
5498         (status_pending_p): Don't consider explicitly suspended lwps.
5499         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5500         pointer.  Add OPTIONS argument.  Change return type to int.  Use
5501         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
5502         (linux_wait_for_event): Take an integer pid instead of a lwp_info
5503         pointer.  Add status pointer argument.  Return a pid instead of a
5504         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
5505         changes.  In non-stop mode, don't switch to a random thread.
5506         (linux_wait): Rename to...
5507         (linux_wait_1): ... this.  Add target_options argument, and handle
5508         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
5509         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
5510         clean exit and signal exit code.  Don't stop all threads in
5511         non-stop mode.  In all-stop mode, only stop all threads when
5512         reporting a stop to GDB.  Handle explicit thread stop requests.
5513         (async_file_flush, async_file_mark): New.
5514         (linux_wait): New.
5515         (send_sigstop): Use lwpid_of.
5516         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
5517         interface changes.  In non-stop mode, don't switch to a random
5518         thread.
5519         (linux_resume_one_lwp): Use lwpid_of.
5520         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5521         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
5522         non-stop mode, don't look for pending flag in all threads.
5523         (resume_status_pending_p): Don't consider explicitly suspended
5524         threads.
5525         (my_waitpid): Reimplement.  Emulate __WALL.
5526         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5527         Use lwpid_of.
5528         (sigchld_handler, linux_supports_non_stop, linux_async)
5529         (linux_start_non_stop): New.
5530         (linux_target_ops): Register linux_supports_non_stop, linux_async
5531         and linux_start_non_stop.
5532         (initialize_low): Install SIGCHLD handler.
5533         * thread-db.c (thread_db_create_event, find_one_thread)
5534         (thread_db_get_tls_address): Use lwpid_of.
5535         * win32-low.c (win32_detach): Adjust to use resume_kind.
5536         (win32_wait): Add `options' argument.
5537         * spu-low.c (spu_resume): Adjust to use resume_kind.
5538         (spu_wait): Add `options' argument.
5539
5540 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5541
5542         Decouple target code from remote protocol.
5543
5544         * target.h (enum target_waitkind): New.
5545         (struct target_waitstatus): New.
5546         (struct target_ops) <wait>: Return an unsigned long.  Take a
5547         target_waitstatus pointer instead of a char pointer.
5548         (mywait): Likewise.
5549         * target.c (mywait): Change prototype to return an unsigned long.
5550         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
5551         * server.h (thread_from_wait, old_thread_from_wait): Delete
5552         declarations.
5553         (prepare_resume_reply): Change prototype to take a
5554         target_waitstatus.
5555         * server.c (thread_from_wait, old_thread_from_wait): Delete.
5556         (last_status, last_ptid): New.
5557         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
5558         pid instead of a signal.
5559         (attach_inferior): Remove "status" and "signal" parameters.
5560         Adjust.
5561         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5562         not as an address.
5563         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5564         (handle_v_requests, myresume): Remove "status" and "signal"
5565         parameters.  Adjust.
5566         (handle_status): New.
5567         (main): Delete local `status'.  Adjust.
5568         * remote-utils.c: Include target.h.
5569         (prepare_resume_reply): Change prototype to take a
5570         target_waitstatus.  Adjust.
5571
5572         * linux-low.c (linux_wait): Adjust to new target_ops->wait
5573         interface.
5574         * spu-low.c (spu_wait): Adjust.
5575         * win32-low.c (enum target_waitkind, struct target_waitstatus):
5576         Delete.
5577         (win32_wait): Adjust.
5578
5579 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5580
5581         * target.h (struct thread_resume): Delete leave_stopped member.
5582         (struct target_ops): Add a `n' argument to the `resume' callback.
5583         * server.c (start_inferior): Adjust.
5584         (handle_v_cont, myresume): Adjust.
5585         * linux-low.c (check_removed_breakpoint): Adjust to resume
5586         interface change, and to removed leave_stopped field.
5587         (resume_ptr): Delete.
5588         (struct thread_resume_array): New.
5589         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
5590         resume interface change.
5591         (linux_continue_one_thread, linux_queue_one_thread)
5592         (resume_status_pending_p): Check if the resume field is NULL
5593         instead of checking the leave_stopped member.
5594         (linux_resume): Adjust to the target resume interface change.
5595         * spu-low.c (spu_resume): Adjust to the target resume interface
5596         change.
5597         * win32-low.c (win32_detach, win32_resume): Ditto.
5598
5599 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5600
5601         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5602         flag.
5603         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5604         pending.
5605         (linux_continue_one_thread): Only preserve the stepping flag if
5606         there's a pending breakpoint.
5607
5608 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
5609
5610         * server.c (main): After the inferior having exited, call
5611         remote_close before exiting gdbserver.
5612
5613 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5614
5615         Fix size of FPSCR in Power 7 processors.
5616         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5617         (PPC_FEATURE_HAS_DFP): New #define.
5618         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5619         size of the FPSCR.
5620
5621 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
5622
5623         * server.c (handle_query) Whitespace and formatting.
5624
5625 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
5626
5627         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5628         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5629         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5630         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5631         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5632         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5633         Makefile.in, configure.ac: Fix whitespace throughout.
5634         * configure: Regenerate.
5635
5636 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
5637
5638         * inferiors.c (find_inferior): Make it safe for the callback
5639         function to delete the currently iterated inferior.
5640
5641 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
5642
5643         * Makefile.in (linuw_low_h): Move higher.
5644         (thread-db.o): Depend on $(linux_low_h).
5645
5646 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
5647
5648         Rename "process" to "lwp" throughout.
5649
5650         * linux-low.c (all_processes): Rename to...
5651         (all_lwps): ... this.
5652         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5653         (add_process): Rename to ...
5654         (add_lwp): ... this.  Adjust.
5655         (linux_create_inferior): Adjust.
5656         (linux_attach_lwp): Adjust.
5657         (linux_attach): Adjust.
5658         (linux_kill_one_process): Rename to ...
5659         (linux_kill_one_lwp): ... this.  Adjust.
5660         (linux_kill): Adjust.
5661         (linux_detach_one_process): Rename to ...
5662         (linux_detach_one_lwp): ... this.  Adjust.
5663         (linux_detach): Adjust.
5664         (check_removed_breakpoint): Adjust.
5665         (status_pending_p): Adjust.
5666         (linux_wait_for_process): Rename to ...
5667         (linux_wait_for_lwp): ... this.  Adjust.
5668         (linux_wait_for_event): Adjust.
5669         (send_sigstop): Adjust.
5670         (wait_for_sigstop): Adjust.
5671         (stop_all_processes): Rename to ...
5672         (stop_all_lwps): ... this.
5673         (linux_resume_one_process): Rename to ...
5674         (linux_resume_one_lwp): ... this.  Adjust.
5675         (linux_set_resume_request, linux_continue_one_thread)
5676         (linux_queue_one_thread, resume_status_pending_p)
5677         (usr_store_inferior_registers, regsets_store_inferior_registers)
5678         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5679         Adjust.
5680         * linux-low.h (get_process): Rename to ...
5681         (get_lwp): ... this.  Adjust.
5682         (get_thread_process): Rename to ...
5683         (get_thread_lwp): ... this.  Adjust.
5684         (get_process_thread): Rename to ...
5685         (get_lwp_thread): ... this.  Adjust.
5686         (struct process_info): Rename to ...
5687         (struct lwp_info): ... this.
5688         (all_processes): Rename to ...
5689         (all_lwps): ... this.
5690         * proc-service.c (ps_lgetregs): Adjust.
5691         * thread-db.c (thread_db_create_event, find_one_thread)
5692         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5693
5694 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
5695
5696         * server.c (handle_query): Handle "qAttached".
5697
5698 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
5699
5700         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5701         GPLv3, update license URL.
5702
5703 2009-03-01  Doug Evans  <dje@google.com>
5704
5705         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5706         (server_h): Add gdb_signals.h.
5707         (signals.o): Update.
5708         * server.h (target_signal_from_host,target_signal_to_host_p)
5709         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5710
5711 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
5712
5713         * remote-utils.c (getpkt): Also generate remote-debug
5714         information if noack_mode is set.
5715
5716 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
5717
5718         * server.c (handle_query): Report qXfer:siginfo:read and
5719         qXfer:siginfo:write as supported and handle them.
5720         * target.h (struct target_ops) <qxfer_siginfo>: New field.
5721         * linux-low.c (linux_xfer_siginfo): New.
5722         (linux_target_ops): Set it.
5723
5724 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
5725
5726         * server.c (gdbserver_usage): Mention --remote-debug.
5727         (main): Accept '--remote-debug' switch.
5728
5729 2009-01-18  Doug Evans  <dje@google.com>
5730
5731         * regcache.c (new_register_cache): No need to check result of xcalloc.
5732         * server.c (handle_search_memory): Back out calls to xmalloc,
5733         result is checked and error is returned to user upon failure.
5734         (handle_query): Ditto.  Add more checks for result of malloc.
5735         (handle_v_cont): Check result of malloc, report error back to
5736         user upon failure.
5737         (handle_v_run): Ditto.  Call freeargv.
5738         * server.h (freeargv): Declare.
5739         * utils.c (freeargv): New fn.
5740
5741 2009-01-15  Doug Evans  <dje@google.com>
5742
5743         * gdbreplay.c (perror_with_name): Make arg const char *.
5744         * server.h (target_signal_to_name): Make return type const char *.
5745         * thread-db.c (thread_db_err_str): Make return type const char *.
5746         * utils.c (perror_with_name): Make arg const char *.
5747
5748 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
5749
5750         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5751         when handling a EXIT_PROCESS_DEBUG_EVENT.
5752
5753 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
5754
5755         * gdbreplay.c (gdbreplay_version): Update copyright year.
5756         * server.c (gdbserver_version): Likewise.
5757
5758 2009-01-05  Doug Evans  <dje@google.com>
5759
5760         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5761         (handle_extended_wait): Improve comment.
5762
5763 2008-12-13  Doug Evans  <dje@google.com>
5764
5765         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5766         * server.h (ATTR_MALLOC): New macro.
5767         (xmalloc,xcalloc,xstrdup): Declare.
5768         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5769         * inferiors.c: Ditto.
5770         * linux-low.c: Ditto.
5771         * mem-break.c: Ditto.
5772         * regcache.c: Ditto.
5773         * remote-utils.c: Ditto.
5774         * server.c: Ditto.
5775         * target.c: Ditto.
5776         * win32-low.c: Ditto.
5777
5778 2008-12-12  Doug Evans  <dje@google.com>
5779
5780         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5781         in debugging printf.
5782
5783         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5784
5785 2008-12-09  Doug Evans  <dje@google.com>
5786
5787         * linux-low.h (struct process_info): Delete member tid, unused.
5788         * thread-db.c (find_one_thread): Update.
5789         (maybe_attach_thread): Update.
5790
5791 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
5792
5793         * target.h (struct target_ops): Add qxfer_osdata member.
5794         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5795         and dirent.h.
5796         (linux_qxfer_osdata): New functions.
5797         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5798         callback.
5799         * server.c (handle_query): Handle "qXfer:osdata:read:".
5800         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5801         (buffer_xml_printf): New functions.
5802         * server.h (struct buffer): New.
5803         (buffer_grow_str, buffer_grow_str0): New macros.
5804         (buffer_grow, buffer_free, buffer_init, buffer_finish)
5805         (buffer_xml_printf): Declare.
5806
5807 2008-11-24  Doug Evans  <dje@google.com>
5808
5809         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5810
5811 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
5812
5813         * server.c (handle_v_run): Always use the supplied argument list.
5814
5815 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
5816
5817         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5818         (xtensa_regmap_table): Add entry for scompare1.
5819
5820 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5821
5822         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5823         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5824         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5825         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5826         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5827         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5828         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5829         XML target descriptions.
5830         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5831         when inferior is running on an ISA 2.05 or later processor.  Add
5832         special case to return offset for full 64-bit slot of FPSCR when
5833         in 32-bits.
5834
5835 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
5836
5837         * Makefile.in (SFILES, clean): Added sparc64 files.
5838         (reg-sparc64.o, reg-sparc64.c): New.
5839         * configure.srv (sparc*-*-linux*): New configuration.
5840         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5841         syscall arguments for SPARC.
5842         (regsets_store_inferior_registers): Likewise.
5843         * linux-sparc-low.c: New file.
5844
5845 2008-10-21  Doug Evans  <dje@google.com>
5846
5847         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5848         (READLINE_DIR,READLINE_DEP): Delete.
5849         (INTERNAL_CFLAGS): Update.
5850         (LINTFLAGS): Update.
5851
5852 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
5853
5854         * server.c (handle_v_run): If GDB didn't specify an argv, use the
5855         whole argv from the last run, not just argv[0].
5856
5857 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
5858
5859         * regcache.c (new_register_cache): Return NULL if the register
5860         cache size isn't known yet.
5861         (free_register_cache): Avoid dereferencing a NULL regcache.
5862
5863 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
5864
5865         * configure.srv: Merge MIPS and MIPS64.
5866
5867 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
5868
5869         * Makefile.in (uninstall): Apply $(EXEEXT) too.
5870
5871 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
5872
5873         * Makefile.in: Add required vsx dependencies.
5874
5875         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5876         Declare init_registers_powerpc_vsx32l.
5877         Declare init_registers_powerpc_vsx64l.
5878         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5879         (ppc_arch_setup): Check for VSX in hwcap.
5880         (ppc_fill_vsxregset): New function.
5881         (ppc_store_vsxregset): New function.
5882         Add new VSX entry in regset_info target_regsets.
5883
5884         * configure.srv: Add new VSX dependencies.
5885
5886 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
5887
5888         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5889         (remote_open): Set or clear transport_is_reliable.
5890         (putpkt_binary): Don't expect acks in noack mode.
5891         (getpkt): Don't send ack/nac in noack mode.
5892         * server.c (handle_general_set): Handle QStartNoAckMode.
5893         (handle_query): If connected by tcp pass QStartNoAckMode+ in
5894         qSupported.
5895         (main): Reset noack_mode on every connection.
5896         * server.h (noack_mode): Declare.
5897
5898 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5899
5900         * Makefile.in (GDBREPLAY_OBS): New variable.
5901         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5902
5903 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
5904             Daniel Jacobowitz  <dan@codesourcery.com>
5905
5906         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5907         (usr_store_inferior_registers): Likewise.
5908         (regsets_store_inferior_registers): Likewise.
5909
5910 2008-07-31  Rolf Jansen  <rj@surtec.com>
5911             Pedro Alves  <pedro@codesourcery.com>
5912
5913         * configure.ac: Check for memmem declaration.
5914         * server.c [HAVE_MALLOC_H]: Include malloc.h.
5915         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5916         (disable_packet_qfThreadInfo): Unconditionally compile.
5917         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5918         * configure, config.in: Regenerate.
5919
5920 2008-07-28  Doug Kwan  <dougkwan@google.com>
5921
5922         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5923         (linux_write_memory): Remove declaration of errno.
5924
5925 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
5926
5927         * linux-low.c (handle_extended_wait): Do not use "status"
5928         variable uninitialized.
5929
5930 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
5931
5932         * server.c (handle_v_attach): Inhibit reporting dll changes.
5933
5934 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
5935
5936         * remote-utils.c (prepare_resume_reply): If requested, don't
5937         output "thread:TID" in the T stop reply.
5938
5939         * server.c (disable_packet_vCont, disable_packet_Tthread)
5940         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5941         (handle_query): If requested, disable support for qC, qfThreadInfo
5942         and qsThreadInfo.
5943         (handle_v_requests): If requested, disable support for vCont.
5944         (gdbserver_show_disableable): New.
5945         (main): Handle --disable-packet and --disable-packet=LIST.
5946
5947         * server.h (disable_packet_vCont, disable_packet_Tthread)
5948         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5949
5950 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
5951
5952         * server.c (gdbserver_usage): Mention --version.
5953
5954 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
5955
5956         * Makefile.in (gdbreplay.o): New rule.
5957
5958 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
5959
5960         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5961         message, not gdbserver.
5962
5963 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
5964             Nathan Sidwell  <nathan@codesourcery.com>
5965             Joseph Myers  <joseph@codesourcery.com>
5966
5967         * acinclude.m4: Include ../../config/acx.m4.
5968         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5969         * configure, config.in: Regenerate.
5970         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5971         * server.c (gdbserver_version): Print PKGVERSION.
5972         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
5973         (main): Adjust gdbserver_usage calls.
5974         * gdbreplay.c (version, host_name): Add declarations.
5975         (gdbreplay_version, gdbreplay_usage): New.
5976         (main): Accept --version and --help options.
5977
5978 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
5979
5980         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5981         (arm_breakpoint_at): Handle Thumb.
5982         (the_low_target): Add comment.
5983
5984 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
5985
5986         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5987
5988 2008-05-09  Doug Evans  <dje@google.com>
5989
5990         * server.h (decode_search_memory_packet): Declare.
5991         * remote-utils.c (decode_search_memory_packet): New fn.
5992         * server.c (handle_search_memory_1): New fn.
5993         (handle_search_memory): New fn.
5994         (handle_query): Process qSearch:memory packets.
5995
5996 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5997
5998         * regcache.c (registers_length): Remove.
5999         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6000         full register packet.
6001         * regcache.h (registers_length): Remove prototype.
6002         * server.h (PBUFSIZ): Define to 16384.
6003
6004 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
6005
6006         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6007         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6008         powerpc-64l.o, and powerpc-altivec64l.o.
6009         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6010         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6011         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6012         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6013         rs6000/power-linux.xml, and rs6000/power64-linux.xml
6014         to srv_xmlfiles.
6015
6016         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6017         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6018         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6019         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6020         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6021         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6022         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6023         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6024         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6025         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6026         (clean): Update.
6027
6028         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6029         (init_registers_powerpc_32l): ... this new prototype.
6030         (init_registers_powerpc_32): Remove, replace by ...
6031         (init_registers_powerpc_altivec32l): ... this new prototype.
6032         (init_registers_powerpc_e500): Remove, replace by ...
6033         (init_registers_powerpc_e500l): ... this new prototype.
6034         (init_registers_ppc64): Remove, replace by ...
6035         (init_registers_powerpc_64l): ... this new prototype.
6036         (init_registers_powerpc_64): Remove, replace by ...
6037         (init_registers_powerpc_altivec64l): ... this new prototype.
6038         (ppc_num_regs): Set to 73.
6039         (PT_ORIG_R3, PT_TRAP): Define if necessary.
6040         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6041         (ppc_cannot_store_register): Handle orig_r3 and trap.
6042         (ppc_arch_setup): Update init_registers_... calls.
6043         (ppc_fill_gregset): Handle orig_r3 and trap.
6044
6045         * inferiors.c (clear_inferiors): Reset current_inferior.
6046
6047 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
6048
6049         * acinclude.m4: Add override.m4.
6050         * configure: Regenerate.
6051
6052 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
6053
6054         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6055         initial call to init_register_ppc64.
6056
6057 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
6058
6059         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6060         single powerpc*-*-linux* case.
6061         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6062
6063 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
6064
6065         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6066         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6067         from reg_xmlfiles.
6068         * linux-ppc-low.c: Include <elf.h>.
6069         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6070         (ppc_hwcap): New global variable.
6071         (ppc_regmap): Remove __SPE__ #ifdef sections.
6072         (ppc_regmap_e500): New global variable.
6073         (ppc_cannot_store_register): Update __SPE__ special case.
6074         (ppc_get_hwcap): New function.
6075         (ppc_arch_setup): Use it to determine whether inferior supports
6076         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
6077         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6078         Do not access registers if target does not support AltiVec.
6079         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6080         Do not access registers if target does not support SPE.
6081         (target_regsets): Unconditionally include AltiVec and SPE regsets.
6082
6083 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
6084
6085         * linux-low.c (disabled_regsets, num_regsets): New.
6086         (use_regsets_p): Delete.
6087         (linux_wait_for_process): Clear disabled_regsets.
6088         (regsets_fetch_inferior_registers): Check and set it.
6089         (regsets_store_inferior_registers): Likewise.
6090         (linux_fetch_registers, linux_store_registers): Do not use
6091         use_regsets_p.
6092         (initialize_low): Allocate disabled_regsets.
6093
6094 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
6095
6096         * Makefile.in (LIBOBJS): New.
6097         (OBS): Use LIBOBJS.
6098         (memmem.o): New rule.
6099         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6100         * configure: Regenerated.
6101
6102 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
6103
6104         * server.c (handle_query): Never return "unsupported" for
6105         qXfer:features:read queries.
6106
6107 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
6108
6109         * server.c (get_features_xml): Fix inverted condition.
6110         (handle_query): Always support qXfer:feature:read.
6111
6112 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
6113
6114         * server.c (wrapper_argv): New.
6115         (start_inferior): Handle wrapper_argv.  If set, expect an extra
6116         trap.
6117         (gdbserver_usage): Document --wrapper.
6118         (main): Parse --wrapper.
6119
6120 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6121
6122         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6123         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6124         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6125         (ppc_set_pc): Likewise.
6126         (ppc_arch_setup): New function.
6127         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6128         of collect_register.
6129         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6130
6131 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6132
6133         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6134         instead of linux-ppc64-low.o.
6135         * linux-ppc64-low.c: Remove file.
6136         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6137         (linux-ppc64-low.o): Remove rule.
6138
6139         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6140         (init_registers_powerpc_64): Likewise.
6141         (ppc_regmap): Conditionally define depending on __powerpc64__.
6142         (ppc_cannot_store_register): Do not special-case "fpscr" when
6143         compiled on __powerpc64__.
6144         (ppc_collect_ptrace_register): New function.
6145         (ppc_supply_ptrace_register): New function.
6146         (ppc_breakpoint): Change type to "unsigned int".
6147         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6148         (the_low_target): Conditionally provide initializers for the
6149         arch_setup member depending on __powerpc64__.  Install
6150         collect_ptrace_register and supply_ptrace_register members.
6151
6152 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6153
6154         * regcache.h (gdbserver_xmltarget): Add extern declaration.
6155         * server.c (gdbserver_xmltarget): Define.
6156         (get_features_xml): Use it to replace "target.xml" and arch_string.
6157
6158         * configure.srv: Remove srv_xmltarget.  Add XML files that were
6159         mentioned there to srv_xmlfiles instead.  Remove conditional tests
6160         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6161         srv_xmlfiles and srv_regobj to include all possible choices.
6162         * configure.ac (srv_xmltarget): Remove.
6163         (srv_xmlfiles): Do not add "target.xml".
6164         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6165         checks for supplementary target information.
6166         * configure: Regenerate.
6167         * Makefile.in (XML_TARGET): Remove.
6168         (target.xml): Remove rule.
6169         (clean): Do not clean up target.xml.
6170         (.PRECIOUS): Do not mention target.xml.
6171
6172         * target.h (struct target_ops): Remove arch_string member.
6173         * linux-low.c (linux_arch_string): Remove.
6174         (linux_target_ops): Remove arch_string initializer.
6175         * linux-low.h (struct linux_target_ops): Remove arch_string member.
6176         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6177         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6178         * spu-low.c (spu_arch_string): Remove.
6179         (spu_target_ops): Remove arch_string initializer.
6180         * win32-low.c (win32_arch_string): Remove.
6181         (win32_target_ops): Remove arch_string initializer.
6182         * win32-low.h (struct win32_target_ops): Remove arch_string member.
6183         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6184         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6185
6186 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6187
6188         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6189         by collect_ptrace_register and supply_ptrace_register hooks.
6190         * linux-low.c (fetch_register): Use supply_ptrace_register callback
6191         instead of checking for the_low_target.left_pad_xfer.
6192         (usr_store_inferior_registers): Use collect_ptrace_register callback
6193         instead of checking for the_low_target.left_pad_xfer.
6194
6195         * linux-s390-low.c (s390_collect_ptrace_register): New function.
6196         (s390_supply_ptrace_register): Likewise.
6197         (s390_fill_gregset): Call s390_collect_ptrace_register.
6198         (the_low_target): Update.
6199
6200         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6201         (ppc_supply_ptrace_register): Likewise.
6202         (the_low_target): Update.
6203
6204         * linux-i386-low.c (the_low_target): Update.
6205         * linux-x86-64-low.c (the_low_target): Update.
6206
6207 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6208
6209         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6210         reg-s390.o and reg-s390x.o.
6211
6212         * linux-low.c (new_inferior): New global variable.
6213         (linux_create_inferior, linux_attach): Set it.
6214         (linux_wait_for_process): Call the_low_target.arch_setup after the
6215         target has stopped for the first time.
6216         (initialize_low): Do not call the_low_target.arch_setup.
6217
6218         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6219         (s390_set_pc): Likewise.
6220         (s390_arch_setup): New function.
6221         (the_low_target): Use s390_arch_setup as arch_setup routine.
6222
6223         * regcache.c (realloc_register_cache): New function.
6224         (set_register_cache): Call it for each existing regcache.
6225
6226 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6227
6228         * server.h (init_registers): Remove prototype.
6229
6230         * linux-low.h (struct linux_target_ops): Add arch_setup field.
6231         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6232         instead of init_registers ().
6233         * linux-arm-low.c (init_registers_arm): Add prototype.
6234         (init_registers_arm_with_iwmmxt): Likewise.
6235         (the_low_target): Add initializer for arch_setup field.
6236         * linux-cris-low.c (init_registers_cris): Add prototype.
6237         (the_low_target): Add initializer for arch_setup field.
6238         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6239         (the_low_target): Add initializer for arch_setup field.
6240         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6241         (the_low_target): Add initializer for arch_setup field.
6242         * linux-ia64-low.c (init_registers_ia64): Add prototype.
6243         (the_low_target): Add initializer for arch_setup field.
6244         * linux-m32r-low.c (init_registers_m32r): Add prototype.
6245         (the_low_target): Add initializer for arch_setup field.
6246         * linux-m68k-low.c (init_registers_m68k): Add prototype.
6247         (the_low_target): Add initializer for arch_setup field.
6248         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6249         (init_registers_mips64_linux): Likewise.
6250         (the_low_target): Add initializer for arch_setup field.
6251         * linux-ppc-low.c (init_registers_ppc): Add prototype.
6252         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6253         (the_low_target): Add initializer for arch_setup field.
6254         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6255         (init_registers_powerpc_64): Likewise.
6256         (the_low_target): Add initializer for arch_setup field.
6257         * linux-s390-low.c (init_registers_s390): Add prototype.
6258         (init_registers_s390x): Likewise.
6259         (the_low_target): Add initializer for arch_setup field.
6260         * linux-sh-low.c (init_registers_sh): Add prototype.
6261         (the_low_target): Add initializer for arch_setup field.
6262         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6263         (the_low_target): Add initializer for arch_setup field.
6264         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6265         (the_low_target): Add initializer for arch_setup field.
6266
6267         * win32-low.h (struct win32_target_ops): Add arch_setup field.
6268         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6269         instead of init_registers ().
6270         * win32-arm-low.c (init_registers_arm): Add prototype.
6271         (the_low_target): Add initializer for arch_setup field.
6272         * win32-i386-low.c (init_registers_i386): Add prototype.
6273         (the_low_target): Add initializer for arch_setup field.
6274
6275         * spu-low.c (init_registers_spu): Add prototype.
6276         (initialize_low): Call initialie_registers_spu () instead of
6277         initialize_registers ().
6278
6279 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
6280
6281         * server.c (handle_v_requests): When handling the vRun and vAttach
6282         packets, if already debugging a process, don't kill it.  Return an
6283         error instead.
6284
6285 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
6286
6287         * server.c (handle_query): Correct length check.
6288
6289 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
6290
6291         * win32-low.c (do_initial_child_stuff): Add process handle
6292         parameter.  Set current_process_handle and current_process_id from the
6293         parameters. Clear globals.
6294         (win32_create_inferior): Don't set current_process_handle and
6295         current_process_id here.  Instead pass them on the call to
6296         do_initial_child_stuff.
6297         (win32_attach): Likewise.
6298         (win32_clear_inferiors): New.
6299         (win32_kill): Don't close the current process handle or the
6300         current thread handle here.  Instead call win32_clear_inferiors.
6301         (win32_detach): Don't open a new handle to the process.  Call
6302         win32_clear_inferiors.
6303         (win32_join): Don't rely on current_process_handle; open a new
6304         handle using the process id.
6305         (win32_wait): Call win32_clear_inferiors when the inferior process
6306         has exited.
6307
6308 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
6309
6310         * server.c (monitor_show_help): Add "exit".
6311
6312 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
6313
6314         * Makefile.in (SFILES): Add linux-xtensa-low.c.
6315         (clean): Add reg-xtensa.c.
6316         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6317         * configure.srv (xtensa*-*-linux*) New target.
6318         * linux-xtensa-low.c: New.
6319         * xtensa-xtregs.c: New.
6320
6321 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
6322
6323         * hostio.c: Don't include errno.h.
6324         (errno_to_fileio_errno): Move to hostio-errno.
6325         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
6326         error number outputting to the target->hostio_last_error callback.
6327         (hostio_packet_error): Use FILEIO_EINVAL directly.
6328         (handle_open, handle_pread, hostio_error, handle_unlink): Update
6329         calls to hostio_error.
6330         * hostio-errno.c: New.
6331         * server.h (hostio_last_error_from_errno): Declare.
6332         * target.h (target_ops): Add hostio_last_error member.
6333         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6334         as hostio_last_error handler.
6335         * spu-low.c (spu_target_ops): Likewise.
6336         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6337         (wince_hostio_last_error): New functions.
6338         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6339         as hostio_last_error handler.
6340         (win32_target_ops) [!_WIN32_WCE]: Register
6341         hostio_last_error_from_errno as hostio_last_error handler.
6342         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6343         (hostio-errno.o): New rule.
6344         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6345         * configure.srv (srv_hostio_err_objs): New variable.  Default to
6346         hostio-errno.o.
6347         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6348         * configure: Regenerate.
6349
6350 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
6351
6352         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6353         (linux_kill, linux_detach): Clean up the process list.
6354         * remote-utils.c (remote_open): Improve port number parsing.
6355         (putpkt_binary, input_interrupt): Only send interrupts if the target
6356         is running.
6357         * server.c (extended_protocol): Make static.
6358         (attached): Define earlier.
6359         (exit_requested, response_needed, program_argv): New variables.
6360         (target_running): New.
6361         (start_inferior): Clear attached here.
6362         (attach_inferior): Set attached here.
6363         (require_running): Define.
6364         (handle_query): Use require_running and target_running.  Implement
6365         "monitor exit".
6366         (handle_v_attach, handle_v_run): New.
6367         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
6368         (gdbserver_usage): Update.
6369         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
6370         --attach along with other options or after the port.  Save
6371         program_argv.  Support no initial program.  Resynchronize
6372         communication with GDB after an error.  Handle "monitor exit".
6373         Use require_running and target_running.  Always allow the extended
6374         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
6375         restart in extended mode.
6376         * README: Refer to the GDB manual.  Update --attach usage.
6377
6378 2007-12-20  Andreas Schwab  <schwab@suse.de>
6379
6380         * linux-low.c (STACK_SIZE): Define.
6381         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
6382         (linux_test_for_tracefork): Likewise.
6383
6384 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
6385
6386         * linux-low.c (linux_wait_for_event): Update messages.  Do not
6387         reinsert auto-delete breakpoints.
6388         * mem-break.c (struct breakpoint): Change return type of handler to
6389         int.
6390         (set_breakpoint_at): Update handler type.
6391         (reinsert_breakpoint_handler): Return 1 instead of calling
6392         delete_breakpoint.
6393         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6394         setting a new one.
6395         (check_breakpoints): Delete auto-delete breakpoints and return 2.
6396         * mem-break.h (set_breakpoint_at): Update handler type.
6397         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6398         * win32-low.c (auto_delete_breakpoint): New.
6399         (get_child_debug_event): Use it.
6400
6401 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
6402
6403         * configure.ac: Check for pread and pwrite.
6404         * hostio.c (handle_pread): Fall back to lseek and read.
6405         (handle_pwrite): Fall back to lseek and write.
6406         * config.in, configure: Regenerated.
6407
6408 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
6409
6410         * server.c (myresume): Add own_buf argument.
6411         (main): Update calls.
6412
6413 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
6414
6415         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6416         * remote-utils.c (remote_open): Do not call disable_async_io.
6417         (block_async_io): Delete.
6418         (unblock_async_io): Make static.
6419         (initialize_async_io): New.
6420         * server.c (handle_v_cont): Handle async I/O here.
6421         (myresume): Likewise.  Move other common resume tasks here...
6422         (main): ... from here.  Call initialize_async_io.  Disable async
6423         I/O before the main loop.
6424         * server.h (initialize_async_io): Declare.
6425         (block_async_io, unblock_async_io): Delete prototypes.
6426         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6427
6428 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
6429
6430         * remote-utils.c (readchar): Allow binary data in received messages.
6431
6432 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6433
6434         * win32-low.c (attaching): New global.
6435         (win32_create_inferior): Clear the `attaching' global.
6436         (win32_attach): Set the `attaching' global.
6437         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6438         attaching.  Only set a breakpoint at the entry point if not
6439         attaching.
6440
6441 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6442
6443         * server.c (main): Don't report dll events on the initial
6444         connection on attaches.
6445
6446 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6447
6448         * server.c (main): Relax numerical bases supported for the pid of
6449         the --attach command line argument.
6450
6451 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6452
6453         * win32-low.c (win32_attach): Call OpenProcess before
6454         DebugActiveProcess, not after.  Add last error output to error
6455         call.
6456
6457 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6458
6459         * win32-low.c (win32_get_thread_context)
6460         (win32_set_thread_context): New functions.
6461         (thread_rec): Use win32_get_thread_context.
6462         (continue_one_thread, win32_resume): Use win32_set_thread_context.
6463         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6464         field.
6465
6466 2007-12-03  Leo Zayas
6467             Pedro Alves  <pedro_alves@portugalmail.pt>
6468
6469         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6470         global variables.
6471         (child_add_thread): Minor cleanup.
6472         (child_continue): Resume artificially suspended threads before
6473         calling ContinueDebugEvent.
6474         (suspend_one_thread): New.
6475         (fake_breakpoint_event): New.
6476         (get_child_debug_event): Change return type to int.  Check here if
6477         gdb sent an interrupt request.  If a soft interrupt was requested,
6478         fake a breakpoint event.  Return 0 if there is no event to handle,
6479         and 1 otherwise.
6480         (win32_wait): Don't check here if gdb sent an interrupt request.
6481         Ensure there is a valid event to handle.
6482         (win32_request_interrupt): Add soft interruption method as last
6483         resort.
6484
6485 2007-12-03  Leo Zayas
6486             Pedro Alves  <pedro_alves@portugalmail.pt>
6487
6488         * win32-low.h (win32_thread_info): Add descriptions to the
6489         structure members.  Replace `suspend_count' counter by a
6490         `suspended' flag.
6491         * win32-low.c (thread_rec): Update condition of when to get the
6492         context from the inferior.  Rely on ContextFlags being set if it
6493         has already been retrieved.  Only suspend the inferior thread if
6494         we haven't already.  Warn if that fails.
6495         (continue_one_thread): s/suspend_count/suspended/.  Only call
6496         ResumeThread once.  Warn if that fails.
6497
6498 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
6499
6500         * win32-low.c (win32_wait): Don't read from the inferior when it
6501         has already exited.
6502
6503 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
6504
6505         * Makefile.in (win32_low_h): New variable.
6506         (win32-low.o): Add dependency on $(win32_low_h).
6507         (win32-arm-low.o, win32-i386-low.o): New rules.
6508
6509 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
6510
6511         * hostio.c: Correct copyright year.
6512
6513 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
6514
6515         * Makefile.in (OBS): Add hostio.o.
6516         (hostio.o): New rule.
6517         * server.h (handle_vFile): Declare.
6518         * hostio.c: New file.
6519         * server.c (handle_v_requests): Take packet_len and new_packet_len
6520         for binary packets.  Call handle_vFile.
6521         (main): Update call to handle_v_requests.
6522
6523 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
6524
6525         * linux-low.c: Include <sched.h>.
6526
6527 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
6528
6529         * linux-low.c (linux_tracefork_grandchild): New.
6530         (linux_tracefork_child): Use clone.
6531         (linux_test_for_tracefork): Use clone; allocate and free a stack.
6532
6533 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
6534
6535         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6536
6537 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
6538
6539         * linux-low.c (handle_extended_wait): Handle unexpected signals.
6540
6541 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
6542
6543         * inferiors.c (change_inferior_id): Delete.
6544         (add_pid_to_list, pull_pid_from_list): New.
6545         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6546         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6547         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6548         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6549         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6550         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6551         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6552         (using_threads): Always set to 1.
6553         (handle_extended_wait): New.
6554         (add_process): Do not set TID.
6555         (linux_create_inferior): Set must_set_ptrace_flags.
6556         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
6557         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
6558         (linux_thread_alive): Rename TID argument to LWPID.
6559         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
6560         (linux_wait_for_event): Do not use TID or check using_threads.  Update
6561         call to dead_thread_notify.  Call handle_extended_wait.
6562         (linux_create_inferior): Use PTRACE_SETOPTIONS.
6563         (send_sigstop): Delete sigstop_sent.
6564         (wait_for_sigstop): Avoid TID.
6565         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6566         (linux_test_for_tracefork): New.
6567         (linux_lookup_signals): Use thread_db_active and
6568         linux_supports_tracefork_flag.
6569         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6570         * linux-low.h (get_process_thread): Avoid TID.
6571         (struct process_ifo): Move thread_known and tid to the end.  Remove
6572         sigstop_sent.
6573         (linux_attach_lwp, thread_db_init): Update prototypes.
6574         * server.h (change_inferior_id): Delete prototype.
6575         (add_pid_to_list, pull_pid_from_list): New prototypes.
6576         * thread-db.c (thread_db_use_events): New.
6577         (find_first_thread): Rename to...
6578         (find_one_thread): ...this.  Update callers and messages.  Do not
6579         call fatal.  Check thread_db_use_events.  Do not call
6580         change_inferior_id or new_thread_notify.
6581         (maybe_attach_thread): Update.  Do not call new_thread_notify.
6582         (thread_db_init): Set thread_db_use_events.  Check use_events.
6583         * utils.c (fatal, warning): Correct message prefix.
6584
6585 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
6586
6587         * Makefile.in (clean): Remove new files.
6588         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6589         (powerpc-64.o, powerpc-64.c): New rules.
6590         * configure.srv: Use alternate register sets for powerpc64-*-linux*
6591         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6592         with SPE.
6593         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6594         SPE targets.
6595         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6596         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6597         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6598         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6599         (target_regsets): Add AltiVec and SPE register sets.
6600         * configure.ac: Check for AltiVec and SPE.
6601         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6602         (ppc_fill_vrregset, ppc_store_vrregset): New.
6603         (target_regsets): Add AltiVec register set.
6604         * configure: Regenerated.
6605
6606 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
6607
6608         * linux-low.c (O_LARGEFILE): Define.
6609         (linux_read_memory): Use /proc/PID/mem.
6610         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
6611         * configure, config.in: Regenerated.
6612
6613 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
6614
6615         * linux-low.c (linux_wait_for_event): Do not pass signals while
6616         single-stepping.
6617
6618 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6619
6620         * win32-low.c (create_process): New.
6621         (win32_create_inferior): Use create_process instead of
6622         CreateProcess.  If create_process failed retry appending an ".exe"
6623         suffix.  Store the GetLastError result immediatelly after
6624         create_process calls and use it on the call to error.
6625
6626 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6627
6628         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6629
6630 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
6631
6632         * configure.ac: Switch license to GPLv3.
6633
6634 2007-08-01  Michael Snyder  <msnyder@access-company.com>
6635
6636         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6637
6638 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
6639
6640         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6641         typedef.
6642         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6643         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
6644         CloseToolhelp32Snapshot.
6645         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6646         CloseToolhelp32Snapshot.
6647
6648 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
6649
6650         * server.c (main): Check for inferior exit before main loop.
6651
6652 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
6653
6654         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6655         instead of on tmp_desc.
6656
6657 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
6658             Daniel Jacobowitz  <dan@codesourcery.com>
6659
6660         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6661         (add_thread): Minor cleanups.
6662         (clear_inferiors): Move lower in the file.  Clear the DLL
6663         list.
6664         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6665         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6666         (xml_escape_text): New.
6667         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
6668         for qSupported.
6669         (handle_v_cont): Report errors.
6670         (gdbserver_version): Update.
6671         (main): Correct size of own_buf.  Do not report initial DLL events.
6672         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6673         (unloaded_dll, xml_escape_text): New.
6674         * win32-low.c (enum target_waitkind): Update comments.
6675         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6676         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6677         (win32_EnumProcessModules, win32_GetModuleInformation)
6678         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6679         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6680         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6681         (win32_Module32First, win32_Module32Next, load_toolhelp)
6682         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6683         (get_child_debug_event): Handle DLL events.
6684         (win32_wait): Likewise.
6685
6686 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
6687
6688         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6689         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6690
6691 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
6692
6693         * win32-low.c (handle_output_debug_string): Ignore event if not
6694         waiting.
6695
6696 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
6697
6698         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6699
6700 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
6701
6702         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6703
6704 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
6705
6706         * inferiors.c (change_inferior_id): Add comment.
6707         * linux-low.c (check_removed_breakpoint): Add an early
6708         prototype.  Improve debug output.
6709         (linux_attach): Doc update.
6710         (linux_detach_one_process, linux_detach): Clean up before releasing
6711         each process.
6712         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6713         * linux-low.h (struct process_info): Doc improvement.
6714         * mem-break.c (delete_all_breakpoints): New.
6715         * mem-break.h (delete_all_breakpoints): New prototype.
6716         * thread-db.c (find_first_thread): New.
6717         (thread_db_create_event): Call it instead of
6718         thread_db_find_new_threads.  Clean up unused variables.
6719         (maybe_attach_thread): Remove first thread handling.
6720         (thread_db_find_new_threads): Use find_first_thread.
6721         (thread_db_get_tls_address): Likewise.
6722
6723 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
6724
6725         * thread-db.c (thread_db_find_new_threads): Add prototype.
6726         (thread_db_create_event): Check for the main thread before adding
6727         a new thread.
6728         (maybe_attach_thread): Only enable event reporting if TID == 0.
6729         (thread_db_get_tls_address): Check for new threads.
6730
6731 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
6732
6733         * linux-low.c (linux_create_inferior): Try execv before execvp.
6734         * spu-low.c (spu_create_inferior): Likewise.
6735
6736 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
6737
6738         * linux-low.c (linux_create_inferior): Change execv to execvp.
6739         * spu-low.c (spu_create_inferior): Likewies.
6740
6741 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
6742
6743         * Makefile.in (clean): Clean new files instead of deleted ones.
6744         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6745         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6746         rules.
6747         * configure.srv: Specify XML files and new regformats for MIPS and
6748         MIPS64 GNU/Linux.
6749         * linux-mips-low.c (mips_num_regs): Set to only used registers.
6750         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
6751         an entry for the restart register.
6752         (mips_cannot_fetch_register, mips_cannot_store_register)
6753         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6754         register names to match the XML descriptions.
6755         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
6756         restart register instead of $0.
6757
6758 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
6759             Markus Deuling  <deuling@de.ibm.com>
6760
6761         * remote-utils.c (decode_xfer_write): New function.
6762         * server.h (decode_xfer_write): Add prototype.
6763         * server.c (handle_query): Add PACKET_LEN argument.  Support
6764         qXfer:spu:read and qXfer:spu:write packets.
6765         (main): Pass packet_len to handle_query.
6766         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6767         * target.h (target_ops): Add qxfer_spu.
6768
6769 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
6770
6771         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6772         accessing non-seekable spufs files.
6773
6774 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
6775
6776         * server.c (handle_query): Add reply for qC packet.
6777
6778 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6779             Leo Zayas  <lerele@champenstudios@com>
6780
6781         * server.h (check_remote_input_interrupt_request): New function.
6782         * remote_utils.c (INVALID_DESCRIPTOR): New define.
6783         (remote_desc): Initialize with INVALID_DESCRIPTOR.
6784         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
6785         (check_remote_input_interrupt_request): New function.
6786         * server.h (check_remote_input_interrupt_request): Declare.
6787         * win32-low.c (winapi_DebugBreakProcess,
6788         winapi_GenerateConsoleCtrlEvent): New typedefs.
6789         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6790         to 250 ms.
6791         (win32_wait): Check for remote interrupt request
6792         with check_remote_input_interrupt_request.
6793         (win32_request_interrupt): New function.
6794         (win32_target_op): Set request_interrupt to win32_request_interrupt.
6795
6796 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6797
6798         * win32-low.c (debug_registers_changed,
6799         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6800         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6801         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6802         (thread_rec): Get context using the low target.
6803         (child_add_thread): Call thread_added on the low target,
6804         which does the same thing.
6805         (regptr): Delete.
6806         (do_initial_child_stuff): Remove debug registers references.
6807         Set context using the low target.  Resume threads after
6808         setting the contexts.
6809         (child_continue): Remove dead variable.  Remove debug
6810         registers references.
6811         (child_fetch_inferior_registers): Go through the low target.
6812         (do_child_store_inferior_registers): Remove.
6813         (child_store_inferior_registers): Go through the low target.
6814         (win32_resume): Remove debug registers references.
6815         Set context using the low target.
6816         (handle_exception): Change return type to void.  Don't record
6817         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
6818         first chance exception.
6819         (get_child_debug_event): Change return type to void.  Remove
6820         goto loop.  Always return after waiting for debug event.
6821         (win32_wait): Convert to switch statement.  Handle spurious
6822         events.
6823
6824         * win32-i386-low.c (debug_registers_changed,
6825         debug_registers_used): New.
6826         (initial_stuff): Rename to ...
6827         (i386_initial_stuff): ... this.  Clear debug registers
6828         state variables.
6829         (store_debug_registers): Delete.
6830         (i386_get_thread_context): New.
6831         (load_debug_registers): Delete.
6832         (i386_set_thread_context): New.
6833         (i386_thread_added): New.
6834         (single_step): Rename to ...
6835         (i386_single_step): ... this.
6836         (do_fetch_inferior_registers): Rename to ...
6837         (i386_fetch_inferior_register): ... this.
6838         (i386_store_inferior_register): New.
6839         (the_low_target): Adapt to new interface.
6840
6841         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6842         (arm_get_thread_context): New.
6843         (arm_set_thread_context): New.
6844         (regptr): New.
6845         (do_fetch_inferior_registers): Rename to ...
6846         (arm_fetch_inferior_register): ... this.
6847         (arm_store_inferior_register): New.
6848         (arm_wince_breakpoint): Reimplement as unsigned long.
6849         (arm_wince_breakpoint_len): Define.
6850         (the_low_target): Adapt to new interface.
6851
6852         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6853         load_debug_registers.  Add get_thread_context, set_thread_context,
6854         thread_added and store_inferior_register.  Rename
6855         fetch_inferior_registers to fetch_inferior_register.
6856         (regptr): Remove declaration.
6857
6858 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6859
6860         * linux-low.c (linux_detach): Change return type to int.  Return 0.
6861         * spu-low.c (spu_detach): Likewise.
6862
6863 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6864
6865         * target.h (target_ops): Change return type of detach to int.
6866         Add join.
6867         (join_inferior): New.
6868         * server.c (main): Don't skip detach support on mingw32.
6869         If the inferior doesn't support detaching return error.
6870         Call join_inferior instead of using waitpid.
6871         * linux-low.c (linux_join): New.
6872         (linux_target_op): Add linux_join.
6873         * spu-low.c (spu_join): New.
6874         (spu_target_ops): Add spu_join.
6875         * win32-low.c (win32_detach): Adapt to new interface.
6876         Reopen current_process_handle before detaching.  Issue a child
6877         resume before detaching.
6878         (win32_join): New.
6879         (win32_target_op): Add win32_join.
6880
6881 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6882
6883         * win32-low.c (win32-attach): Fix return value.
6884         * target.h (target_ops): Describe ATTACH return values.
6885
6886 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6887
6888         * win32-low.c (GETPROCADDRESS): Define.
6889         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
6890         (winapi_DebugSetProcessKillOnExit): Likewise.
6891         (win32_create_inferior): Force usage of ansi CreateProcessA.
6892         (win32_attach): Use GETPROCADDRESS.
6893         (win32_detach): Likewise.
6894
6895 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
6896
6897         * win32-low.c (win32_wait): Don't use WSTOPSIG.
6898
6899 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
6900
6901         * win32-low.c: Commit leftover changes from 2007-03-29.
6902
6903 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
6904
6905         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6906         fields short instead of int.  Add explicit padding.
6907         (i387_cache_to_fsave): Remove unnecessary casts.
6908         (i387_fsave_to_cache): Doc fix.
6909         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6910
6911 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
6912
6913         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6914         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6915
6916 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
6917
6918         * configure.srv (arm*-*-mingw32ce*): Move near the other
6919         arm targets.
6920
6921 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
6922
6923         * configure.ac: Add errno checking.
6924         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6925         sys/file.h and malloc.h.
6926         (AC_CHECK_DECLS): Add perror.
6927         (srv_mingwce): Handle.
6928         * configure.srv (i[34567]86-*-cygwin*): Add
6929         win32-i386-low.o to srv_tgtobj.
6930         (i[34567]86-*-mingw*): Likewise.
6931         (arm*-*-mingw32ce*): Add case.
6932         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6933         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6934         [__MINGW32CE__] (strerror): New function.
6935         [__MINGW32CE__] (errno): Define to GetLastError.
6936         [__MINGW32CE__] (COUNTOF): New macro.
6937         (remote_open): Remove extra close call.
6938         * mem-break.c (delete_breakpoint_at): New function.
6939         * mem-break.h (delete_breakpoint_at): Declare.
6940         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6941         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6942         [USE_WIN32API] (read, write): Add char* casts.
6943         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6944         * server.h: Include wincecompat.h on Windows CE.
6945         [HAVE_ERRNO_H]: Check.
6946         (perror): Declare if not declared.
6947         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6948         (perror_with_name): Remove errno declaration.
6949         * wincecompat.h: New.
6950         * wincecompat.c: New.
6951         * win32-low.h: New.
6952         * win32-arm-low.c: New.
6953         * win32-i386-low.c: New.
6954         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6955         (OUTMSG2): Make it safe.
6956         (_T): New macro.
6957         (COUNTOF): New macro.
6958         (NUM_REGS): Get it from the low target.
6959         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6960         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6961         (thread_rec): Let low target handle debug registers.
6962         (child_add_thread): Likewise.
6963         (child_init_thread_list): Likewise.
6964         (continue_one_thread): Likewise.
6965         (regptr): New.
6966         (do_child_fetch_inferior_registers): Move to ...
6967         * win32-i386-low.c: ... here, and rename to ...
6968         (do_fetch_inferior_registers): ... this.
6969         * win32-low.c (child_fetch_inferior_registers):
6970         Go through the low target.
6971         (do_child_store_inferior_registers): Use regptr.
6972         (strwinerror): New function.
6973         (win32_create_inferior): Handle Windows CE.
6974         Use strwinerror instead of strerror on Windows error
6975         codes.  Add program to the error output.
6976         Don't close the main thread handle on Windows CE.
6977         (win32_attach): Use coredll.dll on Windows CE.
6978         (win32_kill): Close current process and current
6979         thread handles.
6980         (win32_detach): Use coredll.dll on Windows CE.
6981         (win32_resume): Let low target handle debug registers, and
6982         step request.
6983         (handle_exception): Add/Remove initial breakpoint.  Avoid
6984         non-existant WSTOPSIG on Windows CE.
6985         (win32_read_inferior_memory): Cast to remove warning.
6986         (win32_arch_string): Go through the low target.
6987         (initialize_low): Call set_breakpoint_data with the low
6988         target's breakpoint.
6989         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6990         FOP_REGNUM, mappings): Move to ...
6991         * win32-i386-low.c: ... here.
6992         * win32-low.c (win32_thread_info): Move to ...
6993         * win32-low.h: ... here.
6994         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6995         win32-arm-low.c and wincecompat.c.
6996         (all:): Add $EXEEXT.
6997         (install-only:): Likewise.
6998         (gdbserver:): Likewise.
6999         (gdbreplay:): Likewise.
7000         * config.in: Regenerate.
7001         * configure: Regenerate.
7002
7003 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
7004
7005         * win32-low.c: Rename typedef thread_info to
7006         win32_thread_info throughout.
7007
7008 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
7009
7010         * win32-i386-low.c: Rename to ...
7011         * win32-low.c: ... this.
7012         * configure.srv: Replace win32-i386-low.o with win32-low.o.
7013         * Makefile.in: Likewise.
7014
7015 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
7016
7017         * remote-utils.c (monitor_output): Constify msg parameter.
7018         * server.h (monitor_output): Likewise.
7019         * win32-i386-low.c (handle_output_debug_string): New.
7020         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7021         handle_output_debug_string.
7022         (get_child_debug_event): Likewise.
7023
7024 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
7025
7026         * server.c (main): Correct strtoul check.
7027
7028 2007-03-27  Jon Ringle  <jon@ringle.org>
7029
7030         * linux-low.c: Check __ARCH_HAS_MMU__ also.
7031
7032 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
7033
7034         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7035
7036 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
7037
7038         * terminal.h: Check HAVE_SGTTY_H.
7039
7040 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
7041
7042         * remote-utils.c (remote_open): Print out the assigned port number.
7043
7044 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
7045
7046         * remote-utils.c (monitor_output): New function.
7047         * server.c (debug_threads): Define here.
7048         (monitor_show_help): New function.
7049         (handle_query): Handle qRcmd.
7050         (main): Do not handle 'd' packet.
7051         * server.h (debug_threads, remote_debug, monitor_output): Declare.
7052         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7053         of debug_threads.
7054
7055 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7056
7057         * Makefile.in (EXEEXT): New.
7058         (clean): Use $(EXEEXT).
7059
7060 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7061
7062         * target.h (target_ops): Rename send_signal to request_interrupt,
7063         and remove enum target_signal parameter.
7064         * linux-low.c (linux_request_interrupt): Rename from
7065         linux_send_signal, and always send SIGINT.
7066         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7067         and always send SIGINT.
7068         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7069         of send_signal.
7070         (input_interrupt): Likewise.
7071
7072 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7073
7074         * server.c (get_features_xml): Check if target implemented
7075         arch_string.
7076         * win32-i386-low.c (win32_arch_string): New.
7077         (win32_target_ops): Add win32_arch_string as arch_string member.
7078
7079 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
7080
7081         * spu-low.c (spu_arch_string): New.
7082         (spu_target_ops): Add spu_arch_string.
7083
7084 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
7085
7086         * remote-utils.c: Remove HAVE_TERMINAL_H check.
7087         * configure.ac: Do not check for terminal.h.
7088         * configure, config.in: Regenerated.
7089
7090 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
7091
7092         * Makefile.in (OBS): Add $(XML_BUILTIN).
7093         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7094         (clean): Update.
7095         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7096         (arm-with-iwmmxt.c): New.
7097         * config.in, configure: Regenerate.
7098         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
7099         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
7100         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7101         (arm*-*-linux*): Add iWMMXt and regset support.
7102         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7103         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7104         (arm_store_wmmxregset, target_regsets): New.
7105         * server.c (get_features_xml): Take annex argument.  Check builtin
7106         XML documents.
7107         (handle_query): Handle multiple annexes.
7108
7109 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
7110
7111         * remote-utils.c [USE_WIN32API] (read, write): Define.
7112         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7113         write.
7114
7115 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
7116
7117         * linux-i386-low.c (the_low_target): Set arch_string.
7118         * linux-x86-64-low.c (the_low_target): Likewise.
7119         * linux-low.c (linux_arch_string): New.
7120         (linux_target_ops): Add it.
7121         * linux-low.h (struct linux_target_ops): Add arch_string.
7122         * server.c (write_qxfer_response): Use const void * for DATA.
7123         (get_features_xml): New.
7124         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
7125         * target.h (struct target_ops): Add arch_string method.
7126
7127 2007-01-03  Denis Pilat  <denis.pilat@st.com>
7128             Daniel Jacobowitz  <dan@codesourcery.com>
7129
7130         * linux-low.c (linux_kill): Handle being called with no threads.
7131         * win32-i386-low.c (win32_kill): Likewise.
7132         (get_child_debug_event): Clear current_process_handle.
7133
7134 2006-12-30  Denis PILAT  <denis.pilat@st.com>
7135             Daniel Jacobowitz  <dan@codesourcery.com>
7136
7137         * remote-utils.c (remote_open): Check the type of specified
7138         serial port devices before opening them.
7139         * server.c (main): Kill the inferior if an error occurs during
7140         the first remote_open.
7141
7142 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
7143
7144         * README: Update supported targets.
7145
7146 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
7147
7148         * Makefile.in (clean): Remove reg-mips64.c.
7149         (reg-mips64.c, reg-mips64.o): New rules.
7150         * configure.srv: Handle mips64.  Include regset support for mips.
7151         * linux-mips-low.c (union mips_register): New.
7152         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7153         (mips_breakpoint, mips_breakpoint_at): Use int.
7154         (mips_collect_register, mips_supply_register)
7155         (mips_collect_register_32bit, mips_supply_register_32bit)
7156         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7157         (mips_store_fpregset, target_regsets): New.
7158         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7159
7160 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
7161
7162         * configure.srv: Add target "spu*-*-*".
7163         * Makefile.in (clean): Remove reg-spu.c.
7164         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7165         * spu-low.c: New file.
7166
7167 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
7168
7169         * configure.ac: Correct td_thr_tls_get_addr test.
7170         * configure: Regenerated.
7171
7172 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
7173
7174         * linux-low.c (linux_wait_for_event): Reformat.  Use the
7175         pass_signals array.
7176         * remote-utils.c (decode_address_to_semicolon): New.
7177         * server.c (pass_signals, handle_general_set): New.
7178         (handle_query): Mention QPassSignals for qSupported.
7179         (main): Call handle_general_set.
7180         * server.h (pass_signals, decode_address_to_semicolon): New.
7181
7182 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
7183
7184         * server.c (handle_query): Correct error handling for read_auxv.
7185
7186 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
7187
7188         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7189         and srv_linux_thread_db to yes.
7190         * linux-s390-low.c (s390_fill_gregset): New function.
7191         (target_regsets): Define data structure.
7192
7193 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
7194
7195         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7196         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
7197         * config.in, configure: Regenerated.
7198         * inferiors.c (gdb_id_to_thread): New function.
7199         (gdb_id_to_thread_id): Use it.
7200         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7201         * linux-low.h (struct process_info): Add th member.
7202         (thread_db_get_tls_address): New prototype.
7203         * remote-utils.c (decode_address): Make non-static.
7204         * server.c (handle_query): Handle qGetTLSAddr.
7205         * server.h (gdb_id_to_thread, decode_address): New prototypes.
7206         * target.h (struct target_ops): Add get_tls_address.
7207         * thread-db.c (maybe_attach_thread): Save the thread handle.
7208         (thread_db_get_tls_address): New.
7209
7210 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
7211
7212         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7213         (linux_resume_one_process): Take a siginfo_t *.  Update all
7214         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
7215         (struct pending_signals): Add a siginfo_t.
7216         (linux_wait_for_process): Always set last_status.
7217         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7218         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7219         * linux-low.h (struct process_info): Add last_status.
7220
7221 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
7222
7223         * remote-utils.c (try_rle): New function.
7224         (putpkt_binary): Use it.
7225
7226 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
7227
7228         * Makefile.in (clean): Clean reg-x86-64-linux.c.
7229         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7230         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7231         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7232         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7233         point registers.
7234
7235 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
7236
7237         * server.c (terminal_fd): New variable.
7238         (old_foreground_pgrp): Likewise.
7239         (restore_old_foreground_pgrp): New function.
7240         (start_inferior): Record the terminal file descriptor in terminal_fd
7241         and its original foreground group in old_foreground_pgrp.  Register
7242         restore_old_foreground_pgrp with atexit().
7243
7244 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
7245
7246         * server.c (handle_query): Correct qPart to qXfer.
7247
7248 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
7249
7250         * configure.ac: Check for more headers which are missing on
7251         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
7252         * configure.srv: Add Cygwin and mingw32.
7253         * remote-utils.c: Don't include headers unconditionally which
7254         are missing on mingw32.  Include <winsock.h> for mingw32.
7255         (remote_open): Adjust for mingw32 support.  Flush
7256         standard error after writing to it.
7257         (remote_close, putpkt_binary, input_interrupt, block_async_io)
7258         (unblock_async_io, enable_async_io, disable_async_io)
7259         (readchar, getpkt): Update for Winsock support.
7260         (prepare_resume_reply): Expect a protocol signal number.
7261         * server.c: Disable <sys/wait.h> on mingw32.
7262         (start_inferior): Adjust for mingw32 support.  Flush
7263         standard error after writing to it.
7264         (attach_inferior): Likewise.  Use protocol signal
7265         numbers.
7266         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
7267         and names.
7268         * win32-i386-low.c: New file.
7269         * Makefile.in (XM_CLIBS): Set.
7270         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7271         (win32-i386-low.o): New dependency rule.
7272         * linux-low.c (linux_wait): Use target signal numbers.
7273         * target.h (struct target_ops): Doc fix.
7274         * server.h (target_signal_to_name): New prototype.
7275         * gdbreplay.c: Don't include headers unconditionally which
7276         are missing on mingw32.  Include <winsock.h> for mingw32.
7277         (remote_close, remote_open): Adjust for Winsock support.
7278         * configure, config.in: Regenerated.
7279
7280 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
7281
7282         * server.c (decode_xfer_read, write_qxfer_response): New.
7283         (handle_query): Take a packet length argument.  Handle
7284         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
7285         the qSupported response.
7286         (main): Update call to handle_query.
7287
7288 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
7289
7290         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7291         (putpkt_binary): Renamed from putpkt and adjusted for binary
7292         data.
7293         (putpkt): New wrapper for putpkt_binary.
7294         (readchar): Don't mask off the high bit.
7295         (decode_X_packet): New function.
7296         * server.c (main): Call putpkt_binary if a handler sets the packet
7297         length.  Save the length of the incoming packet.  Handle 'X'.
7298         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7299
7300 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
7301
7302         * server.c (handle_query): Handle qSupported.
7303
7304 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
7305
7306         * remote-utils.c (all_symbols_looked_up): New variable.
7307         (look_up_one_symbol): Check it.
7308         * server.h (look_up_one_symbol): New declaration.
7309         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7310
7311 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
7312
7313         * Makefile.in (linux-arm-low.o): Update dependencies.
7314         * linux-arm-low.c: Include "gdb_proc_service.h".
7315         (PTRACE_GET_THREAD_AREA): Define.
7316         (ps_get_thread_area): New function.
7317
7318 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
7319
7320         * configure.srv (m68k*-*-uclinux*): New target.
7321         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7322         (linux_resume_one_process): Remove extraneous cast.
7323         (linux_read_offsets): New.
7324         (linux_target_op): Add linux_read_offsets on mmuless systems.
7325         * server.c (handle_query): Add qOffsets logic.
7326         * target.h (struct target_ops): Add read_offsets.
7327
7328 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
7329
7330         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7331         (PTRACE_GET_THREAD_AREA): Define.
7332         (ps_get_thread_area): New function.
7333         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7334         (linux-x86-64-low.o): Update.
7335
7336 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
7337
7338         * configure.ac: Remove checks for prfpregset_t.
7339         * gdb_proc_service.h: New file.
7340         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7341         new "gdb_proc_service.h".
7342         * proc-service.c: Likewise.
7343         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7344         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7345         * Makefile.in (gdb_proc_service_h): Updated.
7346         * configure, config.in: Regenerated.
7347
7348 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
7349
7350         * remote-utils.c (prepare_resume_reply): Move declaration
7351         of gdb_id_from_wait to the top of the block.
7352
7353 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
7354
7355         * linux-low.c (regsets_store_inferior_registers): Read the regset
7356         from the target before filling it.
7357
7358 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
7359
7360         * server.c (attach_inferior): Return SIGTRAP for a successful
7361         attach.
7362
7363 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
7364
7365         * Makefile.in (OBS): Add version.o.
7366         (STAGESTUFF): Delete.
7367         (version.o): Add dependencies.
7368         (version.c): Replace rule.
7369         (clean): Remove version.c.
7370         * server.c (gdbserver_version): New.
7371         (gdbserver_usage): Use printf.
7372         (main): Handle --version and --help.
7373         * server.h (version, host_name): Add declarations.
7374
7375 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
7376
7377         * linux-arm-low.c:
7378         * linux-arm-low.c:
7379         * inferiors.c:
7380         * i387-fp.h:
7381         * i387-fp.c:
7382         * gdbreplay.c:
7383         * regcache.c:
7384         * proc-service.c:
7385         * mem-break.h:
7386         * mem-break.c:
7387         * linux-x86-64-low.c:
7388         * linux-sh-low.c:
7389         * linux-s390-low.c:
7390         * linux-ppc64-low.c:
7391         * linux-ppc-low.c:
7392         * linux-mips-low.c:
7393         * linux-m68k-low.c:
7394         * linux-m32r-low.c:
7395         * linux-low.h:
7396         * linux-low.c:
7397         * linux-ia64-low.c:
7398         * linux-i386-low.c:
7399         * linux-crisv32-low.c:
7400         * thread-db.c:
7401         * terminal.h:
7402         * target.h:
7403         * target.c:
7404         * server.h:
7405         * server.c:
7406         * remote-utils.c:
7407         * regcache.h:
7408         * utils.c:
7409         * Makefile.in:
7410         * configure.ac:
7411         * gdbserver.1: Add (C) after Copyright.  Update the FSF
7412         address.
7413
7414 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
7415
7416         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7417         (arm_breakpoint_at): Recognize both breakpoints.
7418         (the_low_target): Use the correct breakpoint instruction.
7419
7420 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
7421
7422         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7423         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7424         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7425         (the_low_target): Update.
7426
7427 2005-10-25  Andreas Schwab  <schwab@suse.de>
7428
7429         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7430
7431         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7432         (ia64_num_regs): Reduce to 462.
7433
7434 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
7435
7436         * acinclude.m4: Correct quoting.
7437         * aclocal.m4: Regenerated.
7438
7439         Suggested by SZOKOVACS Robert <szo@ies.hu>:
7440         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7441         (thread_db_init): Call thread_db_err_str.
7442         * configure.ac: Check for TD_VERSION.
7443         * config.in, configure: Regenerated.
7444
7445 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7446
7447         * server.h (error, fatal, warning): Add ATTR_FORMAT.
7448
7449 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7450
7451         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7452         is not available.  Define HAVE_PTRACE_GETREGS if it is.
7453         * config.in, configure: Regenerated.
7454         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7455         * linux-i386-low.c, linux-m68k-low.c: Update to use
7456         HAVE_PTRACE_GETREGS.
7457         * linux-low.c (regsets_fetch_inferior_registers)
7458         (regsets_store_inferior_registers): Only return 0 if we processed
7459         GENERAL_REGS.
7460         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7461         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7462
7463 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7464
7465         * inferiors.c (struct thread_info): Add gdb_id.
7466         (add_thread): Add gdb_id argument.
7467         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7468         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7469         calls to add_thread.
7470         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7471         * server.c (handle_query): Use thread_to_gdb_id.
7472         (handle_v_cont, main): Use gdb_id_to_thread_id.
7473         * server.h (add_thread): Update prototype.
7474         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7475         prototypes.
7476
7477 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7478
7479         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7480         left-padded registers.
7481         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7482         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7483
7484 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
7485
7486         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7487         * configure: Regenerate.
7488         * config.in: Regenerate.
7489         * server.h (NEED_DECLARATION_STRERROR):
7490         Replace with !HAVE_DECL_STRERROR.
7491
7492 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
7493
7494         * linux-low.c (linux_wait, linux_send_signal): Don't test
7495         an unsigned long variable for > 0 if it could be MAX_ULONG.
7496         * server.c (myresume): Likewise.
7497         * target.c (set_desired_inferior): Likewise.
7498
7499 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
7500
7501         * configure.ac: Simplify and improve check for socklen_t.
7502         * configure, config.in: Regenerate.
7503
7504 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
7505
7506         * acconfig.h: Remove.
7507         * configure.ac: Add a test for socklen_t.  Use three-argument
7508         AC_DEFINE throughout.
7509         * config.in: Regenerated using autoheader 2.59.
7510         * configure: Regenerated.
7511
7512         * gdbreplay.c (socklen_t): Provide a default.
7513         (remote_open): Use socklen_t.
7514         * remote-utils.c (socklen_t): Provide a default.
7515         (remote_open): Use socklen_t.
7516         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7517         unsigned char.
7518
7519         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7520         char for buffers.
7521         * linux-low.c (linux_read_memory, linux_write_memory)
7522         (linux_read_auxv): Likewise.
7523         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7524         (check_mem_write): Likewise.
7525         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7526         Likewise.
7527         * regcache.c (struct inferior_rgcache_data, registers_to_string)
7528         (registers_from_string, register_data): Likewise.
7529         * server.c (handle_query, main): Likewise.
7530         * server.h (convert_ascii_to_int, convert_int_to_ascii)
7531         (decode_M_packet): Likewise.
7532         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7533         * target.h (struct target_ops): Update read_memory, write_memory,
7534         and read_auxv.
7535         (read_inferior_memory, write_inferior_memory): Update.
7536         * linux-low.h (struct linux_target_ops): Change type of breakpoint
7537         to unsigned char *.
7538         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7539         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7540         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7541         linux-s390-low.c, linux-sh-low.c: Update for changes in
7542         read_inferior_memory and the_low_target->breakpoint.
7543
7544 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
7545
7546         * Makefile.in (SFILES): Add linux-ppc64-low.c.
7547         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7548         * configure.srv: Add powerpc64-*-linux*.
7549         * linux-ppc64-low.c: New file.
7550
7551 2005-05-23  Orjan Friberg  <orjanf@axis.com>
7552
7553         * linux-cris-low.c: New file with support for CRIS.
7554         * linux-crisv32-low.c: Ditto for CRISv32.
7555         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7556         (clean): Add reg-cris.c and reg-crisv32.c.
7557         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7558         reg-crisv32.o, and reg-crisv32.c to make rules.
7559         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7560         recognized targets.
7561
7562 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
7563
7564         * linux-low.c (fetch_register): Ensure buffer size is a multiple
7565         of sizeof (PTRACE_XFER_TYPE).
7566         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
7567
7568 2005-05-12  Orjan Friberg  <orjanf@axis.com>
7569
7570         * target.h (struct target_ops): Add insert_watchpoint,
7571         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7572         pointers for hardware watchpoint support.
7573         * linux-low.h (struct linux_target_ops): Ditto.
7574         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7575         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
7576         to linux_target_ops.
7577         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7578         reply packet.
7579         * server.c (main): Recognize 'Z' and 'z' packets.
7580
7581 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
7582
7583         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7584         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7585         (the_low_target): Add new members.
7586
7587 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7588
7589         * proc-service.c (ps_lgetregs): Search all_processes instead of
7590         all_threads.
7591
7592 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7593
7594         * server.c (start_inferior): Change return type to int.
7595         (attach_inferior): Change sigptr to int *.
7596         (handle_v_cont, handle_v_requests): Change signal to int *.
7597         (main): Change signal to int.
7598
7599 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
7600
7601         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7602         * configure.srv: Add m32r*-*-linux*.
7603         * linux-m32r-low.c: New file.
7604
7605 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
7606
7607         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7608
7609 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
7610
7611         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7612         Take unsigned long arguments for PIDs.
7613         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7614         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7615         (wait_for_sigstop, linux_resume_one_process)
7616         (regsets_fetch_inferior_registers, linux_send_signal)
7617         (linux_read_auxv): Likewise.  Update the types of variables holding
7618         PIDs.  Update format string specifiers.
7619         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7620         * remote-utils.c (prepare_resume_reply): Likewise.
7621         * server.c (cont_thread, general_thread, step_thread)
7622         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7623         unsigned long.
7624         (handle_query): Update format specifiers.
7625         (handle_v_cont, main): Use strtoul for thread IDs.
7626         * server.h (struct inferior_list_entry): Use unsigned long for ID.
7627         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7628         (general_thread, step_thread, thread_from_wait)
7629         (old_thread_from_wait): Update.
7630         * target.h (struct thread_resume): Use unsigned long for THREAD.
7631         (struct target_ops): Use unsigned long for arguments to attach and
7632         thread_alive.
7633
7634 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
7635
7636         * acinclude.m4: Include bfd/bfd.m4 directly.
7637         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
7638         <agriffis@toolchain.org>.
7639         * aclocal.m4, configure: Regenerated.
7640
7641 2005-01-07  Andrew Cagney  <cagney@gnu.org>
7642
7643         * configure.ac: Rename configure.in, require autoconf 2.59.
7644         * configure: Re-generate.
7645
7646 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
7647
7648         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
7649         LIBS when finished.
7650         * aclocal.m4: Regenerated.
7651         * configure: Regenerated.
7652
7653 2004-11-21  Andreas Schwab  <schwab@suse.de>
7654
7655         * linux-m68k-low.c (m68k_num_gregs): Define.
7656         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7657         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7658         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7659         (m68k_breakpoint_at): New.  Add to the_low_target.
7660
7661         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7662         srv_linux_thread_db to yes.
7663
7664 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
7665
7666         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7667         (ARCH_SET_FS): Likewise.
7668         (ARCH_GET_FS): Likewise.
7669         (ARCH_GET_GS): Likewise.
7670
7671 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
7672
7673         * linux-i386-low.c (ps_get_thread_area): New.
7674         * linux-x86-64-low.c (ps_get_thread_area): New.
7675         * linux-low.c: Include <sys/syscall.h>.
7676         (linux_kill_one_process): Don't kill the first thread here.
7677         (linux_kill): Kill the first thread here.
7678         (kill_lwp): New function.
7679         (send_sigstop, linux_send_signal): Use it.
7680         * proc-service.c: Clean up #ifdefs.
7681         (fpregset_info): Delete.
7682         (ps_lgetregs): Update and enable implementation.
7683         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7684         implementations.
7685         * remote-utils.c (struct sym_cache, symbol_cache): New.
7686         (input_interrupt): Print a clearer message.
7687         (async_io_enabled): New variable.
7688         (enable_async_io, disable_async_io): Use it.  Update comments.
7689         (look_up_one_symbol): Use the symbol cache.
7690         * thread-db.c (thread_db_look_up_symbols): New function.
7691         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
7692
7693 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
7694
7695         * configure.in: Test for -rdynamic.
7696         * configure: Regenerated.
7697         * Makefile (INTERNAL_LDFLAGS): New.
7698         (gdbserver, gdbreplay): Use it.
7699
7700 2004-09-02  Andrew Cagney  <cagney@gnu.org>
7701
7702         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7703
7704 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
7705
7706         * linux-low.c (linux_wait): Clear all_processes list also.
7707
7708 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
7709
7710         * linux-low.c: Include <errno.h>.  Remove extern declaration of
7711         errno.
7712
7713 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
7714
7715         * gdbreplay.c, server.h, utils.c: Update copyright years.
7716
7717 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
7718
7719         * server.c (main): Print child status or termination signal from
7720         variable 'signal', not 'sig'.
7721
7722 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
7723
7724         * linux-low.c (linux_read_memory): Change return type to
7725         int.  Check for and return error from ptrace().
7726         * target.c (read_inferior_memory): Change return type to int.  Pass
7727         back return status from the_target->read_memory().
7728         * target.h (struct target_ops): Adapt *read_memory() prototype.
7729         Update comment.
7730         (read_inferior_memory): Adapt prototype.
7731         * server.c (main): Return an error packet if
7732         read_inferior_memory() returns an error.
7733
7734 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
7735
7736         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7737         Unify with other clean targets.
7738
7739 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
7740
7741         * server.c (handle_v_cont): Call set_desired_inferior.
7742
7743 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
7744
7745         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7746
7747 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
7748
7749         * linux-low.c (linux_wait): Unblock async I/O.
7750         (linux_resume): Block and enable async I/O.
7751         * remote-utils.c (block_async_io, unblock_async_io): New functions.
7752         * server.h (block_async_io, unblock_async_io): Add prototypes.
7753
7754 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
7755
7756         * remote-utils.c (remote_open): Print a status notice after
7757         opening a TCP port.
7758         * server.c (attach_inferior): Print a status notice after
7759         attaching.
7760
7761 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
7762
7763         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7764
7765 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
7766
7767         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7768         error packet.
7769         * server.c, target.h: Update copyright years.
7770
7771 2004-02-25  Roland McGrath  <roland@redhat.com>
7772
7773         * target.h (struct target_ops): New member `read_auxv'.
7774         * server.c (handle_query): Handle qPart:auxv:read: query using that.
7775         * linux-low.c (linux_read_auxv): New function.
7776         (linux_target_ops): Initialize `read_auxv' member to that.
7777
7778 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7779
7780         Committed by Jim Blandy  <jimb@redhat.com>.
7781
7782         * linux-s390-low.c (s390_num_regs): Update.
7783         (s390_regmap): Remove control registers.  Use __s390x__ predefine
7784         instead of GPR_SIZE to distiguish s390 and s390x targets.
7785
7786 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
7787
7788         * linux-low.c: Update copyright year.
7789         (check_removed_breakpoint): Clear pending_is_breakpoint.
7790         (linux_set_resume_request, linux_queue_one_thread)
7791         (resume_status_pending_p): New functions.
7792         (linux_continue_one_thread): Use process->resume.
7793         (linux_resume): Only resume threads if there are no pending events.
7794         * linux-low.h (struct process_info): Add resume request
7795         pointer.
7796
7797 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
7798
7799         * regcache.c (new_register_cache): Clear the allocated register
7800         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7801
7802 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
7803
7804         * linux-low.c (linux_resume): Take a struct thread_resume *
7805         argument.
7806         (linux_wait): Update call.
7807         (resume_ptr): New static variable.
7808         (linux_continue_one_thread): Renamed from
7809         linux_continue_one_process.  Use resume_ptr.
7810         (linux_resume): Use linux_continue_one_thread.
7811         * server.c (handle_v_cont, handle_v_requests): New functions.
7812         (myresume): New function.
7813         (main): Handle 'v' case.
7814         * target.h (struct thread_resume): New type.
7815         (struct target_ops): Change argument of "resume" to struct
7816         thread_resume *.
7817         (myresume): Delete macro.
7818
7819 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
7820
7821         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7822         (uninstall): Support DESTDIR.
7823
7824 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
7825
7826         * configure.srv: Add xscale*linux copy of arm*linux entry.
7827
7828 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
7829
7830         * linux-arm-low.c (arm_reinsert_addr): New function.
7831         (the_low_target): Add arm_reinsert_addr.
7832
7833 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
7834
7835         * mem-break.c: Remove whitespace at end of file.
7836
7837 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
7838
7839         * configure.in: Check whether we need to prototype strerror.
7840         * server.h: Optionally prototype strerror.
7841         * gdbreplay.c (perror_with_name): Use strerror.
7842         * linux-low.c (linux_attach_lwp): Use strerror.
7843         * utils.c (perror_with_name): Use strerror.
7844         * config.in, configure: Regenerated.
7845
7846 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
7847
7848         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7849         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7850
7851 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
7852
7853         * Makefile.in (SFILES): Update.
7854         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7855         low-sun3.c: Remove files.
7856
7857 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
7858
7859         * linux-low.c: Move comment to linux_thread_alive where it belonged.
7860         (linux_detach_one_process, linux_detach): New functions.
7861         (linux_target_ops): Add linux_detach.
7862         * server.c (main): Handle 'D' packet.
7863         * target.h (struct target_ops): Add "detach" member.
7864         (detach_inferior): Define.
7865
7866 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
7867
7868         From Kelley Cook  <kelleycook@wideopenwest.com>:
7869         * configure.srv: Accept i[34567]86 variants.
7870
7871 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
7872
7873         * linux-low.c (linux_wait_for_event): Correct comment typos.
7874         (linux_resume_one_process): Call check_removed_breakpoint.
7875         (linux_send_signal): New function.
7876         (linux_target_ops): Add linux_send_signal.
7877         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7878         of kill.
7879         * target.h (struct target_ops): Add send_signal.
7880
7881 2003-05-29  Jim Blandy  <jimb@redhat.com>
7882
7883         * linux-low.c (usr_store_inferior_registers): Transfer buf in
7884         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
7885         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7886         away part of the register's value.
7887
7888 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
7889
7890         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7891         (linux_wait_for_event, linux_init_signals): Likewise.
7892
7893 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
7894
7895         * configure.in: Check for stdlib.h.
7896         * configure: Regenerated.
7897         * config.in: Regenerated.
7898
7899 2003-01-04  Andreas Schwab  <schwab@suse.de>
7900
7901         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7902
7903 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
7904
7905         * Makefile.in: Remove obsolete code.
7906
7907 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
7908
7909         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7910         defined(PT_FPR0_HI).
7911
7912 2002-11-17  Stuart Hughes  <seh@zee2.com>
7913
7914         * linux-arm-low.c (arm_num_regs): Increase.
7915         (arm_regmap): Include status register.
7916
7917 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
7918
7919         * linux-low.c (register_addr): Remove incorrect -1 check.
7920
7921 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
7922
7923         * linux-low.c (linux_create_inferior): Call setpgid.  Return
7924         the new PID.
7925         (unstopped_p, linux_signal_pid): Remove.
7926         (linux_target_ops): Remove linux_signal_pid.
7927         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7928         global instead of target method.
7929         * target.h (struct target_ops): Remove signal_pid.  Update comment
7930         for create_inferior.
7931         * server.c (signal_pid): New variable.
7932         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
7933         gdbserver.  Set the child to be the foreground process group.
7934         (attach_inferior): Set signal_pid.
7935
7936 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
7937
7938         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7939
7940 2002-08-20  Jim Blandy  <jimb@redhat.com>
7941
7942         * Makefile.in (LDFLAGS): Allow the configure script to establish a
7943         default for this.
7944
7945 2002-08-01  Andrew Cagney  <cagney@redhat.com>
7946
7947         * Makefile.in: Make chill references obsolete.
7948
7949 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
7950
7951         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7952         * configure: Regenerate.
7953         * config.in: Regenerate.
7954
7955 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
7956
7957         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7958         (perror_with_name, remote_close, remote_open, expect, play): Static.
7959
7960 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
7961
7962         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7963         byte offsets instead of an array of indexes.
7964         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7965
7966 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
7967
7968         * regcache.c: Add comment.
7969
7970 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
7971
7972         * thread-db.c: New file.
7973         * proc-service.c: New file.
7974         * acinclude.m4: New file.
7975         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7976         proc-service.o, and thread-db.o.
7977         (linux-low.o): Add USE_THREAD_DB.
7978         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7979         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7980         * aclocal.m4: Regenerated.
7981         * config.in: Regenerated.
7982         * configure: Regenerated.
7983         * configure.in: Check for proc_service.h, sys/procfs.h,
7984         thread_db.h, and linux/elf.h headrs.
7985         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7986         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
7987         Check for -lthread_db and thread support.
7988         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7989         PowerPC, and SuperH.
7990         * i387-fp.c: Constify arguments.
7991         * i387-fp.h: Likewise.
7992         * inferiors.c: (struct thread_info): Renamed from
7993         `struct inferior_info'.  Remove PID member.  Use generic inferior
7994         list header.  All uses updated.
7995         (inferiors, signal_pid): Removed.
7996         (all_threads): New variable.
7997         (get_thread): Define.
7998         (add_inferior_to_list): New function.
7999         (for_each_inferior): New function.
8000         (change_inferior_id): New function.
8001         (add_inferior): Removed.
8002         (remove_inferior): New function.
8003         (add_thread): New function.
8004         (free_one_thread): New function.
8005         (remove_thread): New function.
8006         (clear_inferiors): Use for_each_inferior and free_one_thread.
8007         (find_inferior): New function.
8008         (find_inferior_id): New function.
8009         (inferior_target_data): Update argument type.
8010         (set_inferior_target_data): Likewise.
8011         (inferior_regcache_data): Likewise.
8012         (set_inferior_regcache_data): Likewise.
8013         * linux-low.c (linux_bp_reinsert): Remove.
8014         (all_processes, stopping_threads, using_thrads)
8015         (struct pending_signals, debug_threads, pid_of): New.
8016         (inferior_pid): Replace with macro.
8017         (struct inferior_linux_data): Remove.
8018         (get_stop_pc, add_process): New functions.
8019         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8020         Use add_process and add_thread.
8021         (linux_attach_lwp): New function, based on old linux_attach.  Use
8022         add_process and add_thread.  Set stop_expected for new threads.
8023         (linux_attach): New function.
8024         (linux_kill_one_process): New function.
8025         (linux_kill): Kill all LWPs.
8026         (linux_thread_alive): Use find_inferior_id.
8027         (check_removed_breakpoints, status_pending_p): New functions.
8028         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8029         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
8030         struct for the found process.
8031         (linux_wait_for_event): New function.
8032         (linux_wait): Use it.  Support LWPs.
8033         (send_sigstop, wait_for_sigstop, stop_all_processes)
8034         (linux_resume_one_process, linux_continue_one_process): New functions.
8035         (linux_resume): Support LWPs.
8036         (REGISTER_RAW_SIZE): Remove.
8037         (fetch_register): Use register_size instead.  Call supply_register.
8038         (usr_store_inferior_registers): Likewise.  Call collect_register.
8039         Fix recursive case.
8040         (regsets_fetch_inferior_registers): Improve error message.
8041         (regsets_store_inferior_registers): Add debugging.
8042         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8043         (unstopped_p, linux_signal_pid): New functions.
8044         (linux_target_ops): Add linux_signal_pid.
8045         (linux_init_signals): New function.
8046         (initialize_low): Call it.  Initialize using_threads.
8047         * regcache.c (inferior_regcache_data): Add valid
8048         flag.
8049         (get_regcache): Fetch registers lazily.  Add fetch argument
8050         and update all callers.
8051         (regcache_invalidate_one, regcache_invalidate): New
8052         functions.
8053         (new_register_cache): Renamed from create_register_cache.
8054         Return the new regcache.
8055         (free_register_cache): Change argument to a void *.
8056         (registers_to_string, registers_from_string): Call get_regcache
8057         with fetch flag set.
8058         (register_data): Make static.  Pass fetch flag to get_regcache.
8059         (supply_register): Call get_regcache with fetch flag clear.
8060         (collect_register): Call get_regcache with fetch flag set.
8061         (collect_register_as_string): New function.
8062         * regcache.h: Update.
8063         * remote-utils.c (putpkt): Flush after debug output and use
8064         stderr.
8065         Handle input interrupts while waiting for an ACK.
8066         (input_interrupt): Use signal_pid method.
8067         (getpkt): Flush after debug output and use stderr.
8068         (outreg): Use collect_register_as_string.
8069         (new_thread_notify, dead_thread_notify): New functions.
8070         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
8071         and general_thread.
8072         (look_up_one_symbol): Flush after debug output.
8073         * server.c (step_thread, server_waiting): New variables.
8074         (start_inferior): Don't use signal_pid.  Update call to mywait.
8075         (attach_inferior): Update call to mywait.
8076         (handle_query): Handle qfThreadInfo and qsThreadInfo.
8077         (main): Don't fetch/store registers explicitly.  Use
8078         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
8079         calls to mywait.
8080         * server.h: Update.
8081         (struct inferior_list, struct_inferior_list_entry): New.
8082         * target.c (set_desired_inferior): New.
8083         (write_inferior_memory): Constify.
8084         (mywait): New function.
8085         * target.h: Update.
8086         (struct target_ops): New signal_pid method.
8087         (mywait): Removed macro, added prototype.
8088
8089         * linux-low.h (regset_func): Removed.
8090         (regset_fill_func, regset_store_func): New.
8091         (enum regset_type): New.
8092         (struct regset_info): Add type field.  Use new operation types.
8093         (struct linux_target_ops): stop_pc renamed to get_pc.
8094         Add decr_pc_after_break and breakpoint_at.
8095         (get_process, get_thread_proess, get_process_thread)
8096         (strut process_info, all_processes, linux_attach_lwp)
8097         (thread_db_init): New.
8098
8099         * linux-arm-low.c (arm_get_pc, arm_set_pc,
8100         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8101         (the_low_target): Add new members.
8102         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8103         (i386_store_fpxregset): Constify.
8104         (target_regsets): Add new kind identifier.
8105         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
8106         (i386_set_pc): Add debugging.
8107         (i386_breakpoint_at): New function.
8108         (the_low_target): Add new members.
8109         * linux-mips-low.c (mips_get_pc, mips_set_pc)
8110         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8111         (mips_breakpoint_at): New.
8112         (the_low_target): Add new members.
8113         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8114         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8115         (the_low_target): Add new members.
8116         * linux-sh-low.c (sh_get_pc, sh_set_pc)
8117         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8118         (the_low_target): Add new members.
8119         * linux-x86-64-low.c (target_regsets): Add new kind
8120         identifier.
8121
8122 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
8123
8124         From Martin Pool <mbp@samba.org>:
8125         * server.c (gdbserver_usage): New function.
8126         (main): Call it.
8127
8128 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
8129
8130         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8131         stop_at -> stop_pc.
8132
8133 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
8134
8135         * Makefile.in: Remove obsolete code.
8136
8137 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
8138
8139         * linux-low.c (regsets_fetch_inferior_registers),
8140         (regsets_store_inferior_registers): Removed cast to int from
8141         ptrace() calls.
8142         * regcache.h: Added declaration of struct inferior_info.
8143
8144 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
8145
8146         * inferiors.c (struct inferior_info): Add regcache_data.
8147         (add_inferior): Call create_register_cache.
8148         (clear_inferiors): Call free_register_cache.
8149         (inferior_regcache_data, set_inferior_regcache_data): New functions.
8150         * regcache.c (struct inferior_regcache_data): New.
8151         (registers): Remove.
8152         (get_regcache): New function.
8153         (create_register_cache, free_register_cache): New functions.
8154         (set_register_cache): Don't initialize the register cache here.
8155         (registers_to_string, registers_from_string, register_data): Call
8156         get_regcache.
8157         * regcache.h: Add prototypes.
8158         * server.h: Likewise.
8159
8160 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
8161
8162         * mem-break.c: New file.
8163         * mem-break.h: New file.
8164         * Makefile.in: Add mem-break.o rule; update server.h
8165         dependencies.
8166         * inferiors.c (struct inferior_info): Add target_data
8167         member.
8168         (clear_inferiors): Free target_data member if set.
8169         (inferior_target_data, set_inferior_target_data): New functions.
8170         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8171         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
8172         * linux-low.c (linux_bp_reinsert): New variable.
8173         (struct inferior_linux_data): New.
8174         (linux_create_inferior): Use set_inferior_target_data.
8175         (linux_attach): Likewise.  Call add_inferior.
8176         (linux_wait_for_one_inferior): New function.
8177         (linux_wait): Call it.
8178         (linux_write_memory): Add const.
8179         (initialize_low): Call set_breakpoint_data.
8180         * linux-low.h (struct linux_target_ops): Add breakpoint
8181         handling members.
8182         * server.c (attach_inferior): Remove extra add_inferior
8183         call.
8184         * server.h: Include mem-break.h.  Update inferior.c
8185         prototypes.
8186         * target.c (read_inferior_memory)
8187         (write_inferior_memory): New functions.
8188         * target.h (read_inferior_memory)
8189         (write_inferior_memory): Change macros to prototypes.
8190         (struct target_ops): Update comments.  Add const to write_memory
8191         definition.
8192
8193 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
8194
8195         * linux-low.c (usr_store_inferior_registers): Support
8196         registers which are allowed to fail to store.
8197         * linux-low.h (linux_target_ops): Likewise.
8198         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8199         (ppc_cannot_store_register): FPSCR may not be storable.
8200
8201 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8202
8203         * server.h: Include <string.h> if HAVE_STRING_H.
8204         * ChangeLog: Correct paths in last ChangeLog entry.
8205
8206 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8207
8208         * linux-low.h: Remove obsolete prototypes.
8209         (struct linux_target_ops): New.
8210         (extern the_low_target): New.
8211         * linux-low.c (num_regs, regmap): Remove declarations.
8212         (register_addr): Use the_low_target explicitly.
8213         (fetch_register): Likewise.
8214         (usr_fetch_inferior_registers): Likewise.
8215         (usr_store_inferior_registers): Likewise.
8216         * linux-arm-low.c (num_regs): Remove.
8217         (arm_num_regs): Define.
8218         (arm_regmap): Renamed from regmap, made static.
8219         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8220         made static.
8221         (arm_cannot_store_register): Renamed from cannot_store_register,
8222         made static.
8223         (the_low_target): New.
8224         * linux-i386-low.c (num_regs): Remove.
8225         (i386_num_regs): Define.
8226         (i386_regmap): Renamed from regmap, made static.
8227         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8228         made static.
8229         (i386_cannot_store_register): Renamed from cannot_store_register,
8230         made static.
8231         (the_low_target): New.
8232         * linux-ia64-low.c (num_regs): Remove.
8233         (ia64_num_regs): Define.
8234         (ia64_regmap): Renamed from regmap, made static.
8235         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8236         made static.
8237         (ia64_cannot_store_register): Renamed from cannot_store_register,
8238         made static.
8239         (the_low_target): New.
8240         * linux-m68k-low.c (num_regs): Remove.
8241         (m68k_num_regs): Define.
8242         (m68k_regmap): Renamed from regmap, made static.
8243         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8244         made static.
8245         (m68k_cannot_store_register): Renamed from cannot_store_register,
8246         made static.
8247         (the_low_target): New.
8248         * linux-mips-low.c (num_regs): Remove.
8249         (mips_num_regs): Define.
8250         (mips_regmap): Renamed from regmap, made static.
8251         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8252         made static.
8253         (mips_cannot_store_register): Renamed from cannot_store_register,
8254         made static.
8255         (the_low_target): New.
8256         * linux-ppc-low.c (num_regs): Remove.
8257         (ppc_num_regs): Define.
8258         (ppc_regmap): Renamed from regmap, made static.
8259         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8260         made static.
8261         (ppc_cannot_store_register): Renamed from cannot_store_register,
8262         made static.
8263         (the_low_target): New.
8264         * linux-s390-low.c (num_regs): Remove.
8265         (s390_num_regs): Define.
8266         (s390_regmap): Renamed from regmap, made static.
8267         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8268         made static.
8269         (s390_cannot_store_register): Renamed from cannot_store_register,
8270         made static.
8271         (the_low_target): New.
8272         * linux-sh-low.c (num_regs): Remove.
8273         (sh_num_regs): Define.
8274         (sh_regmap): Renamed from regmap, made static.
8275         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8276         made static.
8277         (sh_cannot_store_register): Renamed from cannot_store_register,
8278         made static.
8279         (the_low_target): New.
8280         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8281         (the_low_target): New.
8282
8283 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8284
8285         * Makefile.in: Add stamp-h target.
8286         * configure.in: Create stamp-h.
8287         * configure: Regenerated.
8288
8289 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8290
8291         * inferiors.c: New file.
8292         * target.c: New file.
8293         * target.h: New file.
8294         * Makefile.in:  Add target.o and inferiors.o.  Update
8295         dependencies.
8296         * linux-low.c (inferior_pid): New static variable,
8297         moved from server.c.
8298         (linux_create_inferior): Renamed from create_inferior.
8299         Call add_inferior.  Return 0 on success instead of a PID.
8300         (linux_attach): Renamed from myattach.
8301         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
8302         (linux_thread_alive): Renamed from mythread_alive.
8303         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
8304         child dies.
8305         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
8306         (regsets_store_inferior_registers): Correct error message.
8307         Add missing ``return 0''.
8308         (linux_fetch_registers): Renamed from fetch_inferior_registers.
8309         (linux_store_registers): Renamed from store_inferior_registers.
8310         (linux_read_memory): Renamed from read_inferior_memory.
8311         (linux_write_memory): Renamed from write_inferior_memory.
8312         (linux_target_ops): New structure.
8313         (initialize_low): Call set_target_ops ().
8314         * remote-utils.c (unhexify): New function.
8315         (hexify): New function.
8316         (input_interrupt): Send signals to ``signal_pid''.
8317         * server.c (inferior_pid): Remove.
8318         (start_inferior): Update create_inferior call.
8319         (attach_inferior): Call add_inferior.
8320         (handle_query): New function.
8321         (main): Call handle_query for `q' packets.
8322         * server.h: Include "target.h".  Remove obsolete prototypes.
8323         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8324
8325 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8326
8327         * Makefile.in: Add WARN_CFLAGS.  Update configury
8328         dependencies.
8329         * configure.in: Check for <string.h>
8330         * configure: Regenerate.
8331         * config.in: Regenerate.
8332         * gdbreplay.c: Include needed system headers.
8333         (remote_open): Remove strchr prototype.
8334         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8335         * regcache.c (supply_register): Change buf argument to const void *.
8336         (supply_register_by_name): Likewise.
8337         (collect_register): Change buf argument to void *.
8338         (collect_register_by_name): Likewise.
8339         * regcache.h: Add missing prototypes.
8340         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8341         * server.c (handle_query): New function.
8342         (attached): New static variable, moved out of main.
8343         (main): Quiet longjmp clobber warnings.
8344         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
8345         * utils.c (error): Remove NORETURN.
8346         (fatal): Likewise.