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