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