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