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