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