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