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