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