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