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