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