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