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