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