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