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