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