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