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