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