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