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