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