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