Merge multiple hex conversions
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2 Jan Kratochvil <jan.kratochvil@redhat.com>
3
4 Merge multiple hex conversions.
5 * gdbreplay.c (tohex): Rename to 'fromhex'.
6 (logchar): Use fromhex.
7
8 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9
10 * server.c (handle_qxfer_libraries): Set `version' attribute for
11 <library-list>.
12
13 2015-06-10 Gary Benson <gbenson@redhat.com>
14
15 * target.h (struct target_ops) <multifs_open>: New field.
16 <multifs_unlink>: Likewise.
17 <multifs_readlink>: Likewise.
18 * linux-low.c (nat/linux-namespaces.h): New include.
19 (linux_target_ops): Initialize the_target->multifs_open,
20 the_target->multifs_unlink and the_target->multifs_readlink.
21 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
22 * hostio.c (hostio_fs_pid): New static variable.
23 (hostio_handle_new_gdb_connection): New function.
24 (handle_setfs): Likewise.
25 (handle_open): Use the_target->multifs_open as appropriate.
26 (handle_unlink): Use the_target->multifs_unlink as appropriate.
27 (handle_readlink): Use the_target->multifs_readlink as
28 appropriate.
29 (handle_vFile): Handle vFile:setfs packets.
30 * server.c (handle_query): Call hostio_handle_new_gdb_connection
31 after target_handle_new_gdb_connection.
32
33 2015-06-10 Gary Benson <gbenson@redhat.com>
34
35 * configure.ac (AC_CHECK_FUNCS): Add setns.
36 * config.in: Regenerate.
37 * configure: Likewise.
38 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
39 (linux-namespaces.o): New rule.
40 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
41
42 2015-06-09 Gary Benson <gbenson@redhat.com>
43
44 * hostio.c (handle_open): Process mode argument with
45 fileio_to_host_mode.
46
47 2015-06-01 Yao Qi <yao.qi@linaro.org>
48
49 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
50 * linux-x86-low.c: Likewise.
51
52 2015-05-28 Don Breazeal <donb@codesourcery.com>
53
54 * linux-low.c (handle_extended_wait): Initialize
55 thread_info.last_resume_kind for new fork children.
56
57 2015-05-15 Pedro Alves <palves@redhat.com>
58
59 * target.h (target_handle_new_gdb_connection): Rewrite using if
60 wrapped in do/while.
61
62 2015-05-14 Joel Brobecker <brobecker@adacore.com>
63
64 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
65 * configure, config.in: Regenerate.
66 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
67 Declare typedef.
68
69 2015-05-12 Don Breazeal <donb@codesourcery.com>
70
71 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
72 PTRACE_EVENT_VFORK_DONE.
73 (linux_low_ptrace_options, extended_event_reported): Add vfork
74 events.
75 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
76 and "vforkdone" for RSP 'T' Stop Reply Packet.
77 * server.h (report_vfork_events): Declare
78 global variable.
79
80 2015-05-12 Don Breazeal <donb@codesourcery.com>
81
82 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
83 (the_low_target) <new_fork>: Initialize new member.
84 * linux-arm-low.c (arm_new_fork): New function.
85 (the_low_target) <new_fork>: Initialize new member.
86 * linux-low.c (handle_extended_wait): Call new target function
87 new_fork.
88 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
89 * linux-mips-low.c (mips_add_watchpoint): New function
90 extracted from mips_insert_point.
91 (the_low_target) <new_fork>: Initialize new member.
92 (mips_linux_new_fork): New function.
93 (mips_insert_point): Call mips_add_watchpoint.
94 * linux-x86-low.c (x86_linux_new_fork): New function.
95 (the_low_target) <new_fork>: Initialize new member.
96
97 2015-05-12 Don Breazeal <donb@codesourcery.com>
98
99 * linux-low.c (handle_extended_wait): Implement return value,
100 rename argument 'event_child' to 'event_lwp', handle
101 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
102 (linux_low_ptrace_options): New function.
103 (linux_low_filter_event): Call linux_low_ptrace_options,
104 use different argument fo linux_enable_event_reporting,
105 use return value from handle_extended_wait.
106 (extended_event_reported): New function.
107 (linux_wait_1): Call extended_event_reported and set
108 status to report fork events.
109 (linux_write_memory): Add pid to debug message.
110 (reset_lwp_ptrace_options_callback): New function.
111 (linux_handle_new_gdb_connection): New function.
112 (linux_target_ops): Initialize new structure member.
113 * linux-low.h (struct lwp_info) <waitstatus>: New member.
114 * lynx-low.c: Initialize new structure member.
115 * remote-utils.c (prepare_resume_reply): Implement stop reason
116 "fork" for "T" stop message.
117 * server.c (handle_query): Call handle_new_gdb_connection.
118 * server.h (report_fork_events): Declare global flag.
119 * target.h (struct target_ops) <handle_new_gdb_connection>:
120 New member.
121 (target_handle_new_gdb_connection): New macro.
122 * win32-low.c: Initialize new structure member.
123
124 2015-05-12 Don Breazeal <donb@codesourcery.com>
125
126 * mem-break.c (APPEND_TO_LIST): Define macro.
127 (clone_agent_expr): New function.
128 (clone_one_breakpoint): New function.
129 (clone_all_breakpoints): New function.
130 * mem-break.h: Declare new functions.
131
132 2015-05-12 Don Breazeal <donb@codesourcery.com>
133
134 * linux-low.c (linux_supports_fork_events): New function.
135 (linux_supports_vfork_events): New function.
136 (linux_target_ops): Initialize new structure members.
137 (initialize_low): Call linux_check_ptrace_features.
138 * lynx-low.c (lynx_target_ops): Initialize new structure
139 members.
140 * server.c (report_fork_events, report_vfork_events):
141 New global flags.
142 (handle_query): Add new features to qSupported packet and
143 response.
144 (captured_main): Initialize new global variables.
145 * target.h (struct target_ops) <supports_fork_events>:
146 New member.
147 <supports_vfork_events>: New member.
148 (target_supports_fork_events): New macro.
149 (target_supports_vfork_events): New macro.
150 * win32-low.c (win32_target_ops): Initialize new structure
151 members.
152
153 2015-05-12 Gary Benson <gbenson@redhat.com>
154
155 * server.c (handle_qxfer_exec_file): Use current process
156 if annex is empty.
157
158 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
159
160 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
161 Remove HAVE_PTRACE_GETREGS conditionals.
162 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
163 instead of PTRACE_GETREGS and PTRACE_SETREGS.
164
165 2015-05-08 Yao Qi <yao.qi@linaro.org>
166
167 * linux-low.c (linux_supports_conditional_breakpoints): New
168 function.
169 (linux_target_ops): Install new target method.
170 * lynx-low.c (lynx_target_ops): Install NULL hook for
171 supports_conditional_breakpoints.
172 * nto-low.c (nto_target_ops): Likewise.
173 * spu-low.c (spu_target_ops): Likewise.
174 * win32-low.c (win32_target_ops): Likewise.
175 * server.c (handle_query): Check
176 target_supports_conditional_breakpoints.
177 * target.h (struct target_ops) <supports_conditional_breakpoints>:
178 New field.
179 (target_supports_conditional_breakpoints): New macro.
180
181 2015-05-06 Pedro Alves <palves@redhat.com>
182
183 PR server/18081
184 * server.c (start_inferior): If the process exits, mourn it.
185
186 2015-04-21 Gary Benson <gbenson@redhat.com>
187
188 * hostio.c (fileio_open_flags_to_host): Factored out to
189 fileio_to_host_openflags in common/fileio.c. Single use
190 updated.
191
192 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
193
194 * linux-xtensa-low.c (xtensa_fill_gregset)
195 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
196 XCHAL_HAVE_LOOP.
197
198 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
199
200 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
201 (regs_info): Replace usrregs pointer with NULL.
202
203 2015-04-17 Gary Benson <gbenson@redhat.com>
204
205 * target.h (struct target_ops) <pid_to_exec_file>: New field.
206 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
207 * server.c (handle_qxfer_exec_file): New function.
208 (qxfer_packets): Add exec-file entry.
209 (handle_query): Report qXfer:exec-file:read as supported packet.
210
211 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
212
213 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
214
215 2015-04-09 Gary Benson <gbenson@redhat.com>
216
217 * hostio-errno.c (errno_to_fileio_error): Remove function.
218 Update caller to use remote_fileio_to_fio_error.
219
220 2015-04-09 Yao Qi <yao.qi@linaro.org>
221
222 * linux-low.c (linux_insert_point): Call
223 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
224 (linux_remove_point): Call remove_memory_breakpoint if type is
225 raw_bkpt_type_sw.
226 * linux-x86-low.c (x86_insert_point): Don't call
227 insert_memory_breakpoint.
228 (x86_remove_point): Don't call remove_memory_breakpoint.
229
230 2015-04-01 Pedro Alves <palves@redhat.com>
231 Cleber Rosa <crosa@redhat.com>
232
233 * server.c (gdbserver_usage): Reorganize and extend the usage
234 message.
235
236 2015-03-24 Pedro Alves <palves@redhat.com>
237
238 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
239 output. Also dump TRAP_TRACE.
240 (linux_low_filter_event): In debug output, distinguish a
241 resume_stop SIGSTOP from a delayed SIGSTOP.
242
243 2015-03-24 Gary Benson <gbenson@redhat.com>
244
245 * linux-x86-low.c (x86_linux_new_thread): Moved to
246 nat/x86-linux.c.
247 (x86_linux_prepare_to_resume): Likewise.
248
249 2015-03-24 Gary Benson <gbenson@redhat.com>
250
251 * Makefile.in (x86-linux-dregs.o): New rule.
252 * configure.srv: Add x86-linux-dregs.o to relevant targets.
253 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
254 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
255 (x86_linux_dr_get): Likewise.
256 (x86_linux_dr_set): Likewise.
257 (update_debug_registers_callback): Likewise.
258 (x86_linux_dr_set_addr): Likewise.
259 (x86_linux_dr_get_addr): Likewise.
260 (x86_linux_dr_set_control): Likewise.
261 (x86_linux_dr_get_control): Likewise.
262 (x86_linux_dr_get_status): Likewise.
263 (x86_linux_update_debug_registers): Likewise.
264
265 2015-03-24 Gary Benson <gbenson@redhat.com>
266
267 * linux-x86-low.c (x86_linux_update_debug_registers):
268 New function, factored out from...
269 (x86_linux_prepare_to_resume): ...this.
270
271 2015-03-24 Gary Benson <gbenson@redhat.com>
272
273 * linux-x86-low.c (x86_linux_dr_get): Update comments.
274 (x86_linux_dr_set): Likewise.
275 (update_debug_registers_callback): Likewise.
276 (x86_linux_dr_set_addr): Likewise.
277 (x86_linux_dr_get_addr): Likewise.
278 (x86_linux_dr_set_control): Likewise.
279 (x86_linux_dr_get_control): Likewise.
280 (x86_linux_dr_get_status): Likewise.
281 (x86_linux_prepare_to_resume): Likewise.
282
283 2015-03-24 Gary Benson <gbenson@redhat.com>
284
285 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
286 Use perror_with_name. Pass string through gettext.
287 (x86_linux_dr_set): Likewise.
288
289 2015-03-24 Gary Benson <gbenson@redhat.com>
290
291 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
292 (x86_linux_dr_set_addr): ...this.
293 (x86_dr_low_get_addr): Rename to...
294 (x86_linux_dr_get_addr): ...this.
295 (x86_dr_low_set_control): Rename to...
296 (x86_linux_dr_set_control): ...this.
297 (x86_dr_low_get_control): Rename to...
298 (x86_linux_dr_get_control): ...this.
299 (x86_dr_low_get_status): Rename to...
300 (x86_linux_dr_get_status): ...this.
301 (x86_dr_low): Update with new function names.
302
303 2015-03-24 Gary Benson <gbenson@redhat.com>
304
305 * Makefile.in (x86-linux.o): New rule.
306 * configure.srv: Add x86-linux.o to relevant targets.
307 * linux-low.c (lwp_set_arch_private_info): New function.
308 (lwp_arch_private_info): Likewise.
309 * linux-x86-low.c: Include nat/x86-linux.h.
310 (arch_lwp_info): Removed structure.
311 (update_debug_registers_callback):
312 Use lwp_set_debug_registers_changed.
313 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
314 and lwp_set_debug_registers_changed.
315 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
316
317 2015-03-24 Gary Benson <gbenson@redhat.com>
318
319 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
320 * linux-arm-low.c (arm_new_thread): Likewise.
321 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
322 * linux-mips-low.c (mips_linux_new_thread): Likewise.
323 * linux-x86-low.c (x86_linux_new_thread): Likewise.
324 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
325
326 2015-03-24 Gary Benson <gbenson@redhat.com>
327
328 * linux-low.c (ptid_of_lwp): New function.
329 (lwp_is_stopped): Likewise.
330 (lwp_stop_reason): Likewise.
331 * linux-x86-low.c (update_debug_registers_callback):
332 Use lwp_is_stopped.
333 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
334 lwp_stop_reason.
335
336 2015-03-24 Gary Benson <gbenson@redhat.com>
337
338 * linux-low.h (linux_stop_lwp): Remove declaration.
339
340 2015-03-24 Gary Benson <gbenson@redhat.com>
341
342 * linux-low.h: Include nat/linux-nat.h.
343 * linux-low.c (iterate_over_lwps_args): New structure.
344 (iterate_over_lwps_filter): New function.
345 (iterate_over_lwps): Likewise.
346 * linux-x86-low.c (update_debug_registers_callback):
347 Update signature to what iterate_over_lwps expects.
348 Remove PID check that iterate_over_lwps now performs.
349 (x86_dr_low_set_addr): Use iterate_over_lwps.
350 (x86_dr_low_set_control): Likewise.
351
352 2015-03-24 Gary Benson <gbenson@redhat.com>
353
354 * linux-x86-low.c (x86_debug_reg_state): New function.
355 (x86_linux_prepare_to_resume): Use the above.
356
357 2015-03-24 Gary Benson <gbenson@redhat.com>
358
359 * linux-low.c (current_lwp_ptid): New function.
360 * linux-x86-low.c: Include nat/linux-nat.h.
361 (x86_dr_low_get_addr): Use current_lwp_ptid.
362 (x86_dr_low_get_control): Likewise.
363 (x86_dr_low_get_status): Likewise.
364
365 2015-03-20 Pedro Alves <palves@redhat.com>
366
367 * tracepoint.c (cmd_qtstatus): Make "str" const.
368
369 2015-03-20 Pedro Alves <palves@redhat.com>
370
371 * server.c (handle_general_set): Make "req_str" const.
372
373 2015-03-19 Pedro Alves <palves@redhat.com>
374
375 * linux-low.c (linux_resume_one_lwp): Rename to ...
376 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
377 instead call perror_with_name.
378 (check_ptrace_stopped_lwp_gone): New function.
379 (linux_resume_one_lwp): Reimplement as wrapper around
380 linux_resume_one_lwp_throw that swallows errors if the LWP is
381 gone.
382
383 2015-03-19 Pedro Alves <palves@redhat.com>
384
385 * linux-low.c (count_events_callback, select_event_lwp_callback):
386 No longer check whether the thread has resume_stop as last resume
387 kind.
388
389 2015-03-19 Pedro Alves <palves@redhat.com>
390
391 * linux-low.c (count_events_callback, select_event_lwp_callback):
392 Use the lwp's status_pending_p field, not the thread's.
393
394 2015-03-19 Pedro Alves <palves@redhat.com>
395
396 * linux-low.c (select_event_lwp_callback): Update comments to
397 no longer mention SIGTRAP.
398
399 2015-03-18 Gary Benson <gbenson@redhat.com>
400
401 * server.c (handle_query): Do not report vFile:fstat as supported.
402
403 2015-03-11 Gary Benson <gbenson@redhat.com>
404
405 * hostio.c (sys/types.h): New include.
406 (sys/stat.h): Likewise.
407 (common-remote-fileio.h): Likewise.
408 (handle_fstat): New function.
409 (handle_vFile): Handle vFile:fstat packets.
410
411 2015-03-11 Gary Benson <gbenson@redhat.com>
412
413 * configure.ac (AC_CHECK_MEMBERS): Add checks for
414 struct stat.st_blocks and struct stat.st_blksize.
415 * configure: Regenerate.
416 * config.in: Likewise.
417 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
418 (OBS): Add common-remote-fileio.o.
419 (common-remote-fileio.o): New rule.
420
421 2015-03-09 Pedro Alves <palves@redhat.com>
422
423 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
424 'struct sockaddr' pointer in 'accept' call.
425
426 2015-03-09 Pedro Alves <palves@redhat.com>
427
428 Revert:
429 2015-03-07 Pedro Alves <palves@redhat.com>
430 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
431 or <winsock2.h> here. Instead include "gdb_socket.h".
432 (remote_open): Use union gdb_sockaddr_u.
433 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
434 or <winsock2.h> here. Instead include "gdb_socket.h".
435 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
436 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
437 or <sys/un.h>.
438 (init_named_socket, gdb_agent_helper_thread): Use union
439 gdb_sockaddr_u.
440
441 2015-03-07 Pedro Alves <palves@redhat.com>
442
443 * configure.ac (build_warnings): Move
444 -Wdeclaration-after-statement to the C-specific set.
445 * configure: Regenerate.
446
447 2015-03-07 Pedro Alves <palves@redhat.com>
448
449 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
450 or <winsock2.h> here. Instead include "gdb_socket.h".
451 (remote_open): Use union gdb_sockaddr_u.
452 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
453 or <winsock2.h> here. Instead include "gdb_socket.h".
454 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
455 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
456 or <sys/un.h>.
457 (init_named_socket, gdb_agent_helper_thread): Use union
458 gdb_sockaddr_u.
459
460 2015-03-07 Pedro Alves <palves@redhat.com>
461
462 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
463 instead.
464
465 2015-03-06 Yao Qi <yao.qi@linaro.org>
466
467 * linux-aarch64-low.c (aarch64_insert_point): Use
468 show_debug_regs as a boolean.
469 (aarch64_remove_point): Likewise.
470
471 2015-03-05 Pedro Alves <palves@redhat.com>
472
473 * lynx-low.c (lynx_target_ops): Install NULL hooks for
474 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
475 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
476 * nto-low.c (nto_target_ops): Likewise.
477 * spu-low.c (spu_target_ops): Likewise.
478 * win32-low.c (win32_target_ops): Likewise.
479
480 2015-03-04 Pedro Alves <palves@redhat.com>
481
482 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
483 Decide whether a breakpoint triggered based on the SIGTRAP's
484 siginfo.si_code.
485 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
486 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
487 (linux_low_filter_event): Check for breakpoints before checking
488 watchpoints.
489 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
490 siginfo.si_code.
491 (linux_stopped_by_sw_breakpoint)
492 (linux_supports_stopped_by_sw_breakpoint)
493 (linux_stopped_by_hw_breakpoint)
494 (linux_supports_stopped_by_hw_breakpoint): New functions.
495 (linux_target_ops): Install new target methods.
496
497 2015-03-04 Pedro Alves <palves@redhat.com>
498
499 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
500 * server.c (swbreak_feature, hwbreak_feature): New globals.
501 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
502 (captured_main): Clear swbreak_feature and hwbreak_feature.
503 * server.h (swbreak_feature, hwbreak_feature): Declare.
504 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
505 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
506 supports_stopped_by_hw_breakpoint>: New fields.
507 (target_supports_stopped_by_sw_breakpoint)
508 (target_stopped_by_sw_breakpoint)
509 (target_supports_stopped_by_hw_breakpoint)
510 (target_stopped_by_hw_breakpoint): Declare.
511
512 2015-03-04 Pedro Alves <palves@redhat.com>
513
514 enum lwp_stop_reason -> enum target_stop_reason
515 * linux-low.c (check_stopped_by_breakpoint): Adjust.
516 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
517 (linux_wait_1, stuck_in_jump_pad_callback)
518 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
519 (linux_stopped_by_watchpoint):
520 * linux-low.h (enum lwp_stop_reason): Delete.
521 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
522 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
523
524 2015-03-04 Yao Qi <yao.qi@linaro.org>
525
526 * Makefile.in (SFILES): Add linux-aarch64-low.c.
527
528 2015-03-03 Gary Benson <gbenson@redhat.com>
529
530 * hostio.c (handle_vFile): Fix prefix lengths.
531
532 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
533
534 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
535 ptr_bits.
536
537 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
538
539 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
540 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
541 (clean): Add "rm -f" for above C files.
542 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
543 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
544 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
545 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
546 * linux-s390-low.c (HWCAP_S390_VX): New macro.
547 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
548 (init_registers_s390x_vx_linux64)
549 (init_registers_s390x_tevx_linux64)
550 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
551 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
552 declarations.
553 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
554 (s390_store_vxrs_high): New functions.
555 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
556 NT_S390_VXRS_HIGH.
557 (s390_arch_setup): Add logic for selecting one of the new target
558 descriptions. Activate the new vector regsets if applicable.
559 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
560 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
561 and init_registers_s390x_tevx_linux64.
562
563 2015-03-01 Pedro Alves <palves@redhat.com>
564
565 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
566 parameter.
567
568 2015-02-27 Pedro Alves <palves@redhat.com>
569
570 * linux-x86-low.c (u_debugreg_offset): New function.
571 (x86_linux_dr_get, x86_linux_dr_set): Use it.
572
573 2015-02-27 Pedro Alves <palves@redhat.com>
574
575 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
576 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
577 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
578 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
579 (ps_lsetfpregs, ps_getpid)
580 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
581 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
582 (ps_lsetxregs, ps_plog): Declare.
583
584 2015-02-27 Pedro Alves <palves@redhat.com>
585
586 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
587 IP_AGENT_EXPORT_FUNC.
588 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
589 IP_AGENT_EXPORT_FUNC.
590 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
591 (IP_AGENT_EXPORT): Delete.
592 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
593 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
594 (gdb_trampoline_buffer_error, collecting, gdb_collect)
595 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
596 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
597 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
598 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
599 (traceframe_read_count, traceframe_write_count)
600 (traceframes_created, trace_state_variables, get_raw_reg)
601 (get_trace_state_variable_value, set_trace_state_variable_value)
602 (ust_loaded, helper_thread_id, cmd_buf): Use
603 IPA_SYM_EXPORTED_NAME.
604 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
605 (tracepoints) Use IP_AGENT_EXPORT_VAR.
606 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
607 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
608 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
609 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
610 EXTERN_C_PUSH/EXTERN_C_POP.
611 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
612 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
613 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
614 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
615 (traceframe_write_count, traceframe_read_count)
616 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
617 (about_to_request_buffer_space, get_trace_state_variable_value)
618 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
619 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
620 EXTERN_C_PUSH/EXTERN_C_POP.
621 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
622 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
623 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
624 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
625 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
626 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
627 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
628 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
629 Define.
630 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
631 (IP_AGENT_EXPORT_VAR_DECL): Define.
632 (tracing): Declare.
633 (gdb_agent_get_raw_reg): Declare.
634
635 2015-02-27 Tom Tromey <tromey@redhat.com>
636 Pedro Alves <palves@redhat.com>
637
638 Rename symbols whose names are reserved C++ keywords throughout.
639
640 2015-02-27 Pedro Alves <palves@redhat.com>
641
642 * Makefile.in (COMPILER): New, get it from autoconf.
643 (CXX): Get from autoconf instead.
644 (COMPILE.pre): Use COMPILER.
645 (CC-LD): Rename to ...
646 (CC_LD): ... this. Use COMPILER.
647 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
648 (CXX_FOR_TARGET): Default to g++ instead of gcc.
649 * acinclude.m4: Include build-with-cxx.m4.
650 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
651 Disable -Werror by default if building in C++ mode.
652 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
653 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
654 the C++ compiler. Save/restore CXXFLAGS too.
655 * configure: Regenerate.
656
657 2015-02-27 Pedro Alves <palves@redhat.com>
658
659 * acinclude.m4: Include libiberty.m4.
660 * configure.ac: Call libiberty_INIT.
661 * config.in, configure: Regenerate.
662
663 2015-02-26 Pedro Alves <palves@redhat.com>
664
665 * linux-low.c (linux_wait_1): When incrementing the PC past a
666 program breakpoint always use the_low_target.breakpoint_len as
667 increment, rather than the maximum between that and
668 the_low_target.decr_pc_after_break.
669
670 2015-02-23 Pedro Alves <palves@redhat.com>
671
672 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
673 thread was doing a step-over; always adjust the PC if
674 we stepped over a permanent breakpoint.
675 (linux_wait_1): If we stepped over breakpoint that was on top of a
676 permanent breakpoint, manually advance the PC past it.
677
678 2015-02-23 Pedro Alves <palves@redhat.com>
679
680 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
681 modes.
682 (x86_fill_gregset, x86_store_gregset): Use it when handling
683 $orig_eax.
684
685 2015-02-20 Pedro Alves <palves@redhat.com>
686
687 * thread-db.c: Include "nat/linux-procfs.h".
688 (thread_db_init): Skip listing new threads if the kernel supports
689 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
690
691 2015-02-20 Pedro Alves <palves@redhat.com>
692
693 * linux-low.c (status_pending_p_callback): Use ptid_match.
694
695 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
696
697 PR breakpoints/16812
698 * linux-low.c (wstatus_maybe_breakpoint): Remove.
699 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
700 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
701
702 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
703
704 PR breakpoints/15956
705 * tracepoint.c (cmd_qtinit): Add check for current_thread.
706
707 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
708
709 * linux-low.c (linux_low_btrace_conf): Print size.
710 * server.c (handle_btrace_conf_general_set): New.
711 (hanle_general_set): Call handle_btrace_conf_general_set.
712 (handle_query): Report Qbtrace-conf:bts:size as supported.
713
714 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
715
716 * linux-low.c (linux_low_enable_btrace): Update parameters.
717 (linux_low_btrace_conf): New.
718 (linux_target_ops)<to_btrace_conf>: Initialize.
719 * server.c (current_btrace_conf): New.
720 (handle_btrace_enable): Rename to ...
721 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
722 to target_enable_btrace. Update comment. Update users.
723 (handle_qxfer_btrace_conf): New.
724 (qxfer_packets): Add btrace-conf entry.
725 (handle_query): Report qXfer:btrace-conf:read as supported packet.
726 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
727 (target_ops)<read_btrace_conf>: New.
728 (target_enable_btrace): Update parameters.
729 (target_read_btrace_conf): New.
730
731 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
732
733 * server.c (handle_btrace_general_set): Remove call to
734 target_supports_btrace.
735 (supported_btrace_packets): New.
736 (handle_query): Call supported_btrace_packets.
737 * target.h: include btrace-common.h.
738 (btrace_target_info): Removed.
739 (supports_btrace, target_supports_btrace): Update parameters.
740
741 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
742
743 * Makefile.in (SFILES): Add common/btrace-common.c.
744 (OBS): Add common/btrace-common.o.
745 (btrace-common.o): Add build rules.
746 * linux-low: Include btrace-common.h.
747 (linux_low_read_btrace): Use struct btrace_data. Call
748 btrace_data_init and btrace_data_fini.
749
750 2015-02-06 Pedro Alves <palves@redhat.com>
751
752 * thread-db.c (find_new_threads_callback): Add debug output.
753
754 2015-02-04 Pedro Alves <palves@redhat.com>
755
756 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
757 (resume_stopped_resumed_lwps): New function.
758 (linux_wait_for_event_filtered): Use it.
759
760 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
761
762 * Makefile.in (SFILES): Add linux-personality.c.
763 (linux-personality.o): New rule.
764 * configure.srv (srv_linux_obj): Add linux-personality.o to the
765 list of objects to be built.
766 * linux-low.c: Include nat/linux-personality.h.
767 (linux_create_inferior): Remove code to disable address space
768 randomization (moved to ../nat/linux-personality.c). Create
769 cleanup to disable address space randomization.
770
771 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
772
773 * Makefile.in (posix-strerror.o): New rule.
774 (mingw-strerror.o): Likewise.
775 * configure: Regenerated.
776 * configure.ac: Source file ../common/common.host. Initialize new
777 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
778
779 2015-01-14 Yao Qi <yao@codesourcery.com>
780
781 * Makefile.in (SFILES): Add nat/ppc-linux.c.
782 (ppc-linux.o): New rule.
783 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
784 * configure.ac: AC_CHECK_FUNCS(getauxval).
785 * config.in: Re-generated.
786 * configure: Re-generated.
787 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
788 ppc64_64bit_inferior_p
789
790 2015-01-14 Yao Qi <yao@codesourcery.com>
791
792 * linux-ppc-low.c: Include "nat/ppc-linux.h".
793 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
794 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
795 (PT_ORIG_R3, PT_TRAP): Likewise.
796 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
797 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
798 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
799
800 2015-01-10 Joel Brobecker <brobecker@adacore.com>
801
802 * i387-fp.c (i387_cache_to_xsave): In look over
803 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
804 zmmh_low_space field by use of zmmh_high_space.
805
806 2015-01-09 Pedro Alves <palves@redhat.com>
807
808 * linux-low.c (step_over_bkpt): Move higher up in the file.
809 (handle_extended_wait): Don't store the stop_pc here.
810 (get_stop_pc): Adjust comments and rename to ...
811 (check_stopped_by_breakpoint): ... this. Record whether the LWP
812 stopped for a software breakpoint or hardware breakpoint.
813 (thread_still_has_status_pending_p): New function.
814 (status_pending_p_callback): Use
815 thread_still_has_status_pending_p. If the event is no longer
816 interesting, resume the LWP.
817 (handle_tracepoints): Add assert.
818 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
819 (wstatus_maybe_breakpoint): New function.
820 (cancel_breakpoint): Delete function.
821 (check_stopped_by_watchpoint): New function, factored out from
822 linux_low_filter_event.
823 (lp_status_maybe_breakpoint): Delete function.
824 (linux_low_filter_event): Remove filter_ptid argument.
825 Leave thread group exits pending here. Store the LWP's stop PC.
826 Always leave events pending.
827 (linux_wait_for_event_filtered): Pull all events out of the
828 kernel, and leave them all pending.
829 (count_events_callback, select_event_lwp_callback): Consider all
830 events.
831 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
832 (select_event_lwp): Only give preference to the stepping LWP in
833 all-stop mode. Adjust comments.
834 (ignore_event): New function.
835 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
836 references to cancel_breakpoints. Adjust to renames. Also give
837 equal priority to all LWPs that have had events in non-stop mode.
838 If reporting a software breakpoint event, unadjust the LWP's PC.
839 (linux_wait): If linux_wait_1 returned an ignored event, retry.
840 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
841 Adjust.
842 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
843 (resume_status_pending_p): Use thread_still_has_status_pending_p.
844 (linux_stopped_by_watchpoint): Adjust.
845 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
846 * linux-low.h (enum lwp_stop_reason): New.
847 (struct lwp_info) <stop_pc>: Adjust comment.
848 <stopped_by_watchpoint>: Delete field.
849 <stop_reason>: New field.
850 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
851 * mem-break.c (software_breakpoint_inserted_here)
852 (hardware_breakpoint_inserted_here): New function.
853 * mem-break.h (software_breakpoint_inserted_here)
854 (hardware_breakpoint_inserted_here): Declare.
855 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
856 (cancel_breakpoints): Delete.
857 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
858 (upload_fast_traceframes): Remove references to
859 cancel_breakpoints.
860
861 2015-01-09 Pedro Alves <palves@redhat.com>
862
863 * thread-db.c (find_new_threads_callback): Ignore thread if the
864 kernel thread ID is -1.
865
866 2015-01-09 Pedro Alves <palves@redhat.com>
867
868 * linux-low.c (linux_attach_fail_reason_string): Move to
869 nat/linux-ptrace.c, and rename.
870 (linux_attach_lwp): Update comment.
871 (attach_proc_task_lwp_callback): New function.
872 (linux_attach): Adjust to rename and use
873 linux_proc_attach_tgid_threads.
874 (linux_attach_fail_reason_string): Delete declaration.
875
876 2015-01-01 Joel Brobecker <brobecker@adacore.com>
877
878 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
879 * server.c (gdbserver_version): Likewise.
880
881 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
882
883 * remote-utils.c: Include ctype.h.
884 (input_interrupt): Explicitly handle the case when the char
885 received is the NUL byte. Improve the printing of non-ASCII
886 characters.
887
888 2014-12-16 Joel Brobecker <brobecker@adacore.com>
889
890 * linux-low.c (linux_low_filter_event): Update call to
891 linux_enable_event_reporting following the addition of
892 a new parameter to that function.
893
894 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
895
896 PR server/17457
897 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
898 (AARCH64_FPCR_REGNO): Likewise.
899 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
900 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
901 (aarch64_store_fpregset): Likewise.
902
903 2014-12-15 Joel Brobecker <brobecker@adacore.com>
904
905 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
906 Remove FIXME comment about assumption about N.
907
908 2014-12-13 Joel Brobecker <brobecker@adacore.com>
909
910 * configure.ac: If large-file support is disabled in GDBserver,
911 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
912 * configure: Regenerate.
913
914 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
915
916 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
917 warning upon ENODATA from ptrace.
918 * linux-s390-low.c (s390_store_tdb): New.
919 (s390_regsets): Add regset for NT_S390_TDB.
920
921 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
922
923 * linux-low.c (regsets_store_inferior_registers): Skip regsets
924 without a fill_function.
925 * linux-s390-low.c (s390_fill_last_break): Remove.
926 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
927 (s390_arch_setup): Use regset's size instead of fill_function for
928 loop end condition.
929
930 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
931
932 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
933 the regset's store function when ptrace returned an error.
934 * regcache.c (get_thread_regcache): Invalidate register cache
935 before fetching inferior's registers.
936
937 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
938
939 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
940 while-loop as for-loop.
941 (regsets_store_inferior_registers): Likewise.
942
943 2014-11-28 Yao Qi <yao@codesourcery.com>
944
945 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
946 * config.in, configure: Re-generate.
947 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
948 is defined.
949
950 2014-11-21 Yao Qi <yao@codesourcery.com>
951
952 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
953 (AC_CHECK_HEADERS): Remove malloc.h.
954 * configure: Re-generated.
955 * config.in: Re-generated.
956 * server.h: Don't include alloca.h and malloc.h.
957 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
958 Don't include malloc.h.
959
960 2014-11-17 Joel Brobecker <brobecker@adacore.com>
961
962 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
963 corresponding ERRNO check in same block.
964
965 2014-11-12 Pedro Alves <palves@redhat.com>
966
967 * server.c (cont_thread): Update comment.
968 (start_inferior, attach_inferior): No longer clear cont_thread.
969 (handle_v_cont): No longer set cont_thread.
970 (captured_main): Clear cont_thread each time a GDB connects.
971
972 2014-11-12 Pedro Alves <palves@redhat.com>
973
974 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
975 thread, and don't resume all threads if the Hc thread has exited.
976
977 2014-11-12 Pedro Alves <palves@redhat.com>
978
979 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
980 the process group instead of to a specific LWP.
981
982 2014-10-15 Pedro Alves <palves@redhat.com>
983
984 PR server/17487
985 * win32-arm-low.c (arm_set_thread_context): Remove current_event
986 parameter.
987 (arm_set_thread_context): Delete.
988 (the_low_target): Adjust.
989 * win32-i386-low.c (debug_registers_changed)
990 (debug_registers_used): Delete.
991 (update_debug_registers_callback): New function.
992 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
993 needing to update their debug registers.
994 (win32_get_current_dr): New function.
995 (x86_dr_low_get_addr, x86_dr_low_get_control)
996 (x86_dr_low_get_status): Fetch the debug register from the thread
997 record's context.
998 (i386_initial_stuff): Adjust.
999 (i386_get_thread_context): Remove current_event parameter. Don't
1000 clear debug_registers_changed nor copy DR values to
1001 debug_reg_state.
1002 (i386_set_thread_context): Delete.
1003 (i386_prepare_to_resume): New function.
1004 (i386_thread_added): Mark the thread as needing to update irs
1005 debug registers.
1006 (the_low_target): Remove i386_set_thread_context and install
1007 i386_prepare_to_resume.
1008 * win32-low.c (win32_get_thread_context): Adjust.
1009 (win32_set_thread_context): Use SetThreadContext
1010 directly.
1011 (win32_prepare_to_resume): New function.
1012 (win32_require_context): New function, factored out from ...
1013 (thread_rec): ... this.
1014 (continue_one_thread): Call win32_prepare_to_resume on each thread
1015 we're about to continue.
1016 (win32_resume): Call win32_prepare_to_resume on the event thread.
1017 * win32-low.h (struct win32_thread_info)
1018 <debug_registers_changed>: New field.
1019 (struct win32_target_ops): Change prototype of set_thread_context,
1020 delete set_thread_context and add prepare_to_resume.
1021 (win32_require_context): New declaration.
1022
1023 2014-10-08 Gary Benson <gbenson@redhat.com>
1024
1025 * server.h: Do not include common-exceptions.h.
1026
1027 2014-10-08 Gary Benson <gbenson@redhat.com>
1028
1029 * server.h: Do not include cleanups.h.
1030
1031 2014-09-30 James Hogan <james.hogan@imgtec.com>
1032
1033 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1034 mips64-dsp-linux.c.
1035
1036 2014-09-23 Yao Qi <yao@codesourcery.com>
1037
1038 * linux-low.c (lp_status_maybe_breakpoint): New function.
1039 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1040 (count_events_callback): Likewise.
1041 (select_event_lwp_callback): Likewise.
1042 (cancel_breakpoints_callback): Likewise.
1043
1044 2014-09-19 Don Breazeal <donb@codesourcery.com>
1045
1046 * linux-low.c (handle_extended_wait): Call
1047 linux_ptrace_get_extended_event.
1048 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1049 linux_is_extended_waitstatus.
1050
1051 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1052
1053 * Makefile.in (CPPFLAGS): Define.
1054 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1055 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1056
1057 2014-09-16 Gary Benson <gbenson@redhat.com>
1058
1059 * inferiors.h (current_inferior): Renamed as...
1060 (current_thread): New variable. All uses updated.
1061 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1062 (maybe_move_out_of_jump_pad): Likewise.
1063 (cancel_breakpoint): Likewise.
1064 (linux_low_filter_event): Likewise.
1065 (wait_for_sigstop): Likewise.
1066 (linux_resume_one_lwp): Likewise.
1067 (need_step_over_p): Likewise.
1068 (start_step_over): Likewise.
1069 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1070 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1071 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1072 and save_inferior as saved_thread.
1073 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1074 saved_thread.
1075 (regcache_invalidate_thread): Likewise.
1076 * remote-utils.c (prepare_resume_reply): Likewise.
1077 * thread-db.c (thread_db_get_tls_address): Likewise.
1078 (disable_thread_event_reporting): Likewise.
1079 (remove_thread_event_breakpoints): Likewise.
1080 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1081 as saved_thread.
1082 * target.h (set_desired_inferior): Renamed as...
1083 (set_desired_thread): New declaration. All uses updated.
1084 * server.c (myresume): Updated comment to reference thread instead
1085 of inferior.
1086 (handle_serial_event): Likewise.
1087 (handle_target_event): Likewise.
1088
1089 2014-09-12 Tom Tromey <tromey@redhat.com>
1090 Gary Benson <gbenson@redhat.com>
1091
1092 * regcache.h: Include common-regcache.h.
1093 (regcache_read_pc): Don't declare.
1094 * regcache.c (get_thread_regcache_for_ptid): New function.
1095
1096 2014-09-11 Tom Tromey <tromey@redhat.com>
1097 Gary Benson <gbenson@redhat.com>
1098
1099 * symbol.c: New file.
1100 * Makefile.in (SFILES): Add symbol.c.
1101 (OBS): Add symbol.o.
1102
1103 2014-09-11 Gary Benson <gbenson@redhat.com>
1104
1105 * target.c (target_stop_ptid, target_continue_ptid): New
1106 functions.
1107
1108 2014-09-11 Tom Tromey <tromey@redhat.com>
1109 Gary Benson <gbenson@redhat.com>
1110
1111 * target.h: Include target/target.h.
1112 * target.c (target_read_memory, target_read_uint32)
1113 (target_write_memory): New functions.
1114
1115 2014-09-11 Gary Benson <gbenson@redhat.com>
1116
1117 * server.h (debug_hw_points): Don't declare.
1118 * server.c (debug_hw_points): Don't define. Replace all uses
1119 with show_debug_regs.
1120 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1121 all uses with show_debug_regs.
1122
1123 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1124
1125 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1126 endianness into account.
1127 (ppc_supply_ptrace_register): Likewise.
1128
1129 2014-09-03 James Hogan <james.hogan@imgtec.com>
1130
1131 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1132 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1133
1134 2014-09-03 Gary Benson <gbenson@redhat.com>
1135
1136 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1137 ALL_DEBUG_ADDRESS_REGISTERS.
1138
1139 2014-09-02 Gary Benson <gbenson@redhat.com>
1140
1141 * i386-low.h: Renamed as...
1142 * x86-low.h: New file. All type, function and variable name
1143 prefixes changed from "i386_" to "x86_". All references updated.
1144 * i386-low.c: Renamed as...
1145 * x86-low.c: New file. All type, function and variable name
1146 prefixes changed from "i386_" to "x86_". All references updated.
1147
1148 2014-09-02 Gary Benson <gbenson@redhat.com>
1149
1150 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1151 (x86_linux_new_thread): Likewise.
1152
1153 2014-08-29 Gary Benson <gbenson@redhat.com>
1154
1155 * server.h (setjmp.h): Do not include.
1156 (toplevel): Do not declare.
1157 (common-exceptions.h): Include.
1158 (cleanups.h): Likewise.
1159 * server.c (toplevel): Do not define.
1160 (exit_code): New static global.
1161 (detach_or_kill_for_exit_cleanup): New function.
1162 (main): New function. Original main renamed to...
1163 (captured_main): New function.
1164 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1165
1166 2014-08-29 Gary Benson <gbenson@redhat.com>
1167
1168 * Makefile.in (SFILES): Add common/common-exceptions.c.
1169 (OBS): Add common-exceptions.o.
1170 (common-exceptions.o): New rule.
1171 * utils.c (prepare_to_throw_exception): New function.
1172
1173 2014-08-29 Gary Benson <gbenson@redhat.com>
1174
1175 * config.in: Regenerate.
1176 * configure: Likewise.
1177
1178 2014-08-29 Gary Benson <gbenson@redhat.com>
1179
1180 * Makefile.in (SFILES): Add common/cleanups.c.
1181 (OBS): cleanups.o.
1182 (cleanups.o): New rule.
1183
1184 2014-08-29 Gary Benson <gbenson@redhat.com>
1185
1186 * utils.c (internal_vwarning): New function.
1187
1188 2014-08-28 Gary Benson <gbenson@redhat.com>
1189
1190 * utils.h (fatal): Remove declaration.
1191 * utils.c (fatal): Remove function.
1192
1193 2014-08-28 Gary Benson <gbenson@redhat.com>
1194
1195 * tracepoint.c (gdb_agent_init): Replace fatal with
1196 perror_with_name.
1197 (initialize_tracepoint): Likewise.
1198
1199 2014-08-28 Gary Benson <gbenson@redhat.com>
1200
1201 * remote-utils.c (remote_prepare): Replace fatal with error.
1202
1203 2014-08-28 Gary Benson <gbenson@redhat.com>
1204
1205 * linux-low.c (linux_async): Replace fatal with warning.
1206 Tidy up and return.
1207 (linux_start_non_stop): Return -1 if linux_async failed.
1208
1209 2014-08-28 Gary Benson <gbenson@redhat.com>
1210
1211 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1212 gdb_assert.
1213 (i386_dr_low_get_addr): Remove vague comment.
1214 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1215 gdb_assert.
1216
1217 2014-08-28 Gary Benson <gbenson@redhat.com>
1218
1219 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1220 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1221 internal_error.
1222 (linux_resume_one_lwp): Likewise.
1223 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1224 gdb_assert.
1225 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1226 with internal_error.
1227 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1228 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1229 (find_register_by_name): Replace fatal with internal_error.
1230 (find_regno): Likewise.
1231 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1232 * thread-db.c (thread_db_create_event): Likewise.
1233 (thread_db_load_search): Likewise.
1234 (try_thread_db_load_1): Likewise.
1235 * tracepoint.c (get_jump_space_head): Replace fatal with
1236 internal_error.
1237 (claim_trampoline_space): Likewise.
1238 (have_fast_tracepoint_trampoline_buffer): Likewise.
1239 (cmd_qtstart): Likewise.
1240 (stop_tracing): Likewise.
1241 (fast_tracepoint_collecting): Likewise.
1242 (target_malloc): Likewise.
1243 (download_tracepoint): Likewise.
1244 (download_trace_state_variables): Replace check with gdb_assert.
1245 (upload_fast_traceframes): Replace fatal with internal_error.
1246
1247 2014-08-19 Tom Tromey <tromey@redhat.com>
1248 Gary Benson <gbenson@redhat.com>
1249
1250 * Makefile.in (SFILES): Add common/common-debug.c.
1251 (OBS): Add common-debug.o.
1252 (common-debug.o): New rule.
1253 * debug.h (debug_printf): Don't declare.
1254 * debug.c (debug_printf): Renamed and rewritten as...
1255 (debug_vprintf): New function.
1256
1257 2014-08-19 Gary Benson <gbenson@redhat.com>
1258
1259 * utils.h: Do not include print-utils.h.
1260
1261 2014-08-19 Tom Tromey <tromey@redhat.com>
1262 Gary Benson <gbenson@redhat.com>
1263
1264 * server.h: Add static assertion.
1265 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1266
1267 2014-08-19 Tom Tromey <tromey@redhat.com>
1268 Gary Benson <gbenson@redhat.com>
1269
1270 * Makefile.in (SFILES): Add common/errors.c.
1271 (OBS): Add errors.o.
1272 (IPA_OBS): Add errors-ipa.o.
1273 (errors.o): New rule.
1274 (errors-ipa.o): Likewise.
1275 * utils.h (perror_with_name, error, warning): Don't declare.
1276 * utils.c (warning): Renamed and rewritten as...
1277 (vwarning): New function.
1278 (error): Renamed and rewritten as...
1279 (verror): New function.
1280 (internal_error): Renamed and rewritten as...
1281 (internal_verror): New function.
1282
1283 2014-08-07 Gary Benson <gbenson@redhat.com>
1284
1285 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1286 * configure: Regenerate.
1287 * config.in: Likewise.
1288 * server.h: Do not include errno.h.
1289 * event-loop.c: Likewise.
1290 * hostio-errno.c: Likewise.
1291 * linux-low.c: Likewise.
1292 * remote-utils.c: Likewise.
1293 * spu-low.c: Likewise.
1294 * utils.c: Likewise.
1295 * gdbreplay.c: Unconditionally include errno.h.
1296
1297 2014-08-07 Gary Benson <gbenson@redhat.com>
1298
1299 * server.h: Do not include string.h.
1300 * event-loop.c: Likewise.
1301 * linux-low.c: Likewise.
1302 * regcache.c: Likewise.
1303 * remote-utils.c: Likewise.
1304 * spu-low.c: Likewise.
1305 * utils.c: Likewise.
1306
1307 2014-08-07 Gary Benson <gbenson@redhat.com>
1308
1309 * server.h: Do not include gdb_assert.h.
1310
1311 2014-08-07 Gary Benson <gbenson@redhat.com>
1312
1313 * server.h: Do not include common-utils.h.
1314
1315 2014-08-07 Gary Benson <gbenson@redhat.com>
1316
1317 * server.h: Do not include ptid.h.
1318 * notif.h: Likewise.
1319
1320 2014-08-07 Gary Benson <gbenson@redhat.com>
1321
1322 * server.h: Do not include gdb_locale.h.
1323
1324 2014-08-07 Gary Benson <gbenson@redhat.com>
1325
1326 * server.h: Do not include gdb/signals.h.
1327 * win32-low.c: Likewise.
1328
1329 2014-08-07 Gary Benson <gbenson@redhat.com>
1330
1331 * server.h: Do not include pathmax.h.
1332
1333 2014-08-07 Gary Benson <gbenson@redhat.com>
1334
1335 * server.h: Do not include libiberty.h.
1336 * linux-bfin-low.c: Likewise.
1337
1338 2014-08-07 Gary Benson <gbenson@redhat.com>
1339
1340 * server.h: Do not include ansidecl.h.
1341
1342 2014-08-07 Gary Benson <gbenson@redhat.com>
1343
1344 * linux-x86-low.c: Do not include stddef.h.
1345 * lynx-ppc-low.c: Likewise.
1346 * tracepoint.c: Likewise.
1347
1348 2014-08-07 Gary Benson <gbenson@redhat.com>
1349
1350 * server.h: Do not include stdarg.h.
1351 * nto-low.c: Likewise.
1352
1353 2014-08-07 Gary Benson <gbenson@redhat.com>
1354
1355 * server.h: Do not include stdlib.h.
1356 * inferiors.c: Likewise.
1357 * linux-low.c: Likewise.
1358 * regcache.c: Likewise.
1359 * spu-low.c: Likewise.
1360 * tracepoint.c: Likewise.
1361 * utils.c: Likewise.
1362
1363 2014-08-07 Gary Benson <gbenson@redhat.com>
1364
1365 * server.h: Do not include stdio.h.
1366 * linux-low.c: Likewise.
1367 * remote-utils.c: Likewise.
1368 * spu-low.c: Likewise.
1369 * utils.c: Likewise.
1370 * wincecompat.c: Likewise.
1371
1372 2014-08-06 Gary Benson <gbenson@redhat.com>
1373
1374 * regcache.c (init_register_cache): Move conditionals inside if.
1375
1376 2014-08-06 Gary Benson <gbenson@redhat.com>
1377
1378 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1379
1380 2014-07-31 Gary Benson <gbenson@redhat.com>
1381
1382 * ax.h: Do not include server.h.
1383 * gdbthread.h: Likewise.
1384 * lynx-low.h: Likewise.
1385 * notif.h: Likewise.
1386
1387 2014-07-30 Gary Benson <gbenson@redhat.com>
1388
1389 * server.h: Include common-defs.h.
1390 Do not include config.h or build-gnulib-gdbserver/config.h.
1391
1392 2014-07-30 Gary Benson <gbenson@redhat.com>
1393
1394 * hostio-errno.c: Move server.h to top of includes list.
1395 * inferiors.c: Likewise.
1396 * linux-x86-low.c: Likewise.
1397 * notif.c: Include server.h.
1398
1399 2014-07-24 Tom Tromey <tromey@redhat.com>
1400 Gary Benson <gbenson@redhat.com>
1401
1402 * server.h (CORE_ADDR): Now unsigned.
1403
1404 2014-07-16 Pedro Alves <palves@redhat.com>
1405
1406 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1407
1408 2014-07-15 Pedro Alves <palves@redhat.com>
1409
1410 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1411 copy.
1412
1413 2014-07-11 Pedro Alves <palves@redhat.com>
1414
1415 * linux-low.c (kill_wait_lwp): New function, based on
1416 kill_one_lwp_callback, but use my_waitpid directly.
1417 (kill_one_lwp_callback, linux_kill): Use it.
1418
1419 2014-06-23 Pedro Alves <palves@redhat.com>
1420
1421 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1422 before setting DR0..DR3.
1423
1424 2014-06-20 Gary Benson <gbenson@redhat.com>
1425
1426 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1427 * configure: Regenerated.
1428 * config.in: Likewise.
1429
1430 2014-06-20 Gary Benson <gbenson@redhat.com>
1431
1432 * Makefile.in (SFILES): Update locations for files moved
1433 from common to nat.
1434 (object file files): Reordered.
1435
1436 2014-06-20 Gary Benson <gbenson@redhat.com>
1437
1438 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1439 (i386_dr_low_set_addr): Likewise.
1440 (i386_dr_low_get_addr): Likewise.
1441 (i386_dr_low_can_set_control): Likewise.
1442 (i386_dr_low_set_control): Likewise.
1443 (i386_dr_low_get_control): Likewise.
1444 (i386_dr_low_get_status): Likewise.
1445 (i386_get_debug_register_length): Likewise.
1446 * linux-x86-low.c (i386_dr_low_set_addr):
1447 Changed signature. Made static.
1448 (i386_dr_low_get_addr): Likewise.
1449 (i386_dr_low_set_control): Likewise.
1450 (i386_dr_low_get_control): Likewise.
1451 (i386_dr_low_get_status): Likewise.
1452 (i386_dr_low): New global variable.
1453 * win32-i386-low.c (i386_dr_low_set_addr):
1454 Changed signature. Made static.
1455 (i386_dr_low_get_addr): Likewise.
1456 (i386_dr_low_set_control): Likewise.
1457 (i386_dr_low_get_control): Likewise.
1458 (i386_dr_low_get_status): Likewise.
1459 (i386_dr_low): New global variable.
1460
1461 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1462
1463 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1464 * Makefile.in (AR, AR_FLAGS): Define.
1465 * configure: Regenerate.
1466
1467 2014-06-19 Gary Benson <gbenson@redhat.com>
1468
1469 * Makefile.in (i386-dregs.o): New rule.
1470 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1471 * i386-low.c (target.h): Remove include.
1472 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1473 (DR_CONTROL_SHIFT): Likewise.
1474 (DR_CONTROL_SIZE): Likewise.
1475 (DR_RW_EXECUTE): Likewise.
1476 (DR_RW_WRITE): Likewise.
1477 (DR_RW_READ): Likewise.
1478 (DR_RW_IORW): Likewise.
1479 (DR_LEN_1): Likewise.
1480 (DR_LEN_2): Likewise.
1481 (DR_LEN_4): Likewise.
1482 (DR_LEN_8): Likewise.
1483 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1484 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1485 (DR_ENABLE_SIZE): Likewise.
1486 (DR_LOCAL_SLOWDOWN): Likewise.
1487 (DR_GLOBAL_SLOWDOWN): Likewise.
1488 (DR_CONTROL_RESERVED): Likewise.
1489 (I386_DR_CONTROL_MASK): Likewise.
1490 (I386_DR_VACANT): Likewise.
1491 (I386_DR_LOCAL_ENABLE): Likewise.
1492 (I386_DR_GLOBAL_ENABLE): Likewise.
1493 (I386_DR_DISABLE): Likewise.
1494 (I386_DR_SET_RW_LEN): Likewise.
1495 (I386_DR_GET_RW_LEN): Likewise.
1496 (I386_DR_WATCH_HIT): Likewise.
1497 (i386_wp_op_t): Likewise.
1498 (i386_show_dr): Likewise.
1499 (i386_length_and_rw_bits): Likewise.
1500 (i386_insert_aligned_watchpoint): Likewise.
1501 (i386_remove_aligned_watchpoint): Likewise.
1502 (i386_handle_nonaligned_watchpoint): Likewise.
1503 i386_update_inferior_debug_regs(): Likewise.
1504 (i386_dr_insert_watchpoint): Likewise.
1505 (i386_dr_remove_watchpoint): Likewise.
1506 (i386_dr_region_ok_for_watchpoint): Likewise.
1507 (i386_dr_stopped_data_address): Likewise.
1508 (i386_dr_stopped_by_watchpoint): Likewise.
1509
1510 2014-06-19 Gary Benson <gbenson@redhat.com>
1511
1512 * i386-low.c (i386_dr_show): Renamed to
1513 i386_show_dr and made static. All uses updated.
1514 (i386_dr_length_and_rw_bits): Renamed to
1515 i386_length_and_rw_bits and made static.
1516 All uses updated.
1517 (i386_dr_insert_aligned_watchpoint): Renamed to
1518 i386_insert_aligned_watchpoint and made static.
1519 All uses updated.
1520 (i386_dr_remove_aligned_watchpoint): Renamed to
1521 i386_remove_aligned_watchpoint and made static.
1522 All uses updated.
1523 (i386_dr_update_inferior_debug_regs): Renamed to
1524 i386_update_inferior_debug_regs and made static.
1525 All uses updated.
1526
1527 2014-06-18 Gary Benson <gbenson@redhat.com>
1528
1529 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1530 (i386_dr_low_can_set_control): Likewise.
1531 (i386_get_debug_register_length): Likewise.
1532 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1533 (i386_dr_low_can_set_control): Likewise.
1534 (i386_get_debug_register_length): Likewise.
1535
1536 2014-06-17 Gary Benson <gbenson@redhat.com>
1537
1538 * i386-low.h (i386-dregs.h): New include.
1539 (DR_FIRSTADDR): Now in i386-dregs.h.
1540 (DR_LASTADDR): Likewise.
1541 (DR_NADDR): Likewise.
1542 (DR_STATUS): Likewise.
1543 (DR_CONTROL): Likewise.
1544 (i386_debug_reg_state): Likewise.
1545 (i386_dr_insert_watchpoint): Likewise.
1546 (i386_dr_remove_watchpoint): Likewise.
1547 (i386_dr_region_ok_for_watchpoint): Likewise.
1548 (i386_dr_stopped_data_address): Likewise.
1549 (i386_dr_stopped_by_watchpoint): Likewise.
1550 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1551
1552 2014-06-18 Gary Benson <gbenson@redhat.com>
1553
1554 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1555 i386_dr_insert_watchpoint.
1556 (i386_low_remove_watchpoint): Renamed to
1557 i386_dr_remove_watchpoint.
1558 (i386_low_region_ok_for_watchpoint): Renamed to
1559 i386_dr_region_ok_for_watchpoint.
1560 (i386_low_stopped_data_address): Renamed to
1561 i386_dr_stopped_data_address.
1562 (i386_low_stopped_by_watchpoint): Renamed to
1563 i386_dr_stopped_by_watchpoint.
1564 * i386-low.c (i386_show_dr): Renamed to
1565 i386_dr_show and made nonstatic. All uses updated.
1566 (i386_length_and_rw_bits): Renamed to
1567 i386_dr_length_and_rw_bits and made nonstatic.
1568 All uses updated.
1569 (i386_insert_aligned_watchpoint): Renamed to
1570 i386_dr_insert_aligned_watchpoint and made nonstatic.
1571 All uses updated.
1572 (i386_remove_aligned_watchpoint): Renamed to
1573 i386_dr_remove_aligned_watchpoint and made nonstatic.
1574 All uses updated.
1575 (i386_update_inferior_debug_regs): Renamed to
1576 i386_dr_update_inferior_debug_regs and made nonstatic.
1577 All uses updated.
1578 (i386_low_insert_watchpoint): Renamed to
1579 i386_dr_insert_watchpoint. All uses updated.
1580 (i386_low_remove_watchpoint): Renamed to
1581 i386_dr_remove_watchpoint. All uses updated.
1582 (i386_low_region_ok_for_watchpoint): Renamed to
1583 i386_dr_region_ok_for_watchpoint. All uses updated.
1584 (i386_low_stopped_data_address): Renamed to
1585 i386_dr_stopped_data_address. All uses updated.
1586 (i386_low_stopped_by_watchpoint): Renamed to
1587 i386_dr_stopped_by_watchpoint. All uses updated.
1588
1589 2014-06-18 Gary Benson <gbenson@redhat.com>
1590
1591 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1592 (i386_dr_low_can_set_control): Likewise.
1593 (i386_insert_aligned_watchpoint): New check.
1594
1595 2014-06-18 Gary Benson <gbenson@redhat.com>
1596
1597 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1598 Renamed to state.
1599
1600 2014-06-18 Gary Benson <gbenson@redhat.com>
1601
1602 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1603 instead of fatal and error.
1604 (i386_handle_nonaligned_watchpoint): Likewise.
1605
1606 2014-06-18 Gary Benson <gbenson@redhat.com>
1607
1608 * i386-low.c (i386_get_debug_register_length): New macro.
1609 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1610 (i386_show_dr): Use debug_printf instead of fprintf. Use
1611 phex to format values.
1612
1613 2014-06-18 Gary Benson <gbenson@redhat.com>
1614
1615 * i386-low.h: Comment changes.
1616 * i386-low.c: Likewise.
1617
1618 2014-06-18 Gary Benson <gbenson@redhat.com>
1619
1620 * i386-low.c: Whitespace changes.
1621
1622 2014-06-12 Tom Tromey <tromey@redhat.com>
1623
1624 * utils.c (freeargv): Remove.
1625
1626 2014-06-12 Tom Tromey <tromey@redhat.com>
1627
1628 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1629 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1630 (parse_debug_format_options): Likewise.
1631 (gdbserver_usage): Likewise.
1632 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1633 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1634 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1635 against libiberty.
1636 ($(LIBGNU)): Depend on libiberty.
1637 (all-lib): Recurse into all subdirs.
1638 (install-only): Invoke "install" target in subdirs.
1639 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1640 targets.
1641 * configure: Rebuild.
1642 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1643 for vasprintf, vsnprintf, or gettimeofday.
1644 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1645 srv_tgtobj.
1646
1647 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1648
1649 * development.sh: Delete.
1650 * Makefile.in (config.status): Adjust dependency on development.sh.
1651 * configure.ac: Adjust development.sh source call.
1652 * configure: Regenerate.
1653
1654 2014-06-02 Pedro Alves <palves@redhat.com>
1655
1656 * ax.c (gdb_free_agent_expr): New function.
1657 * ax.h (gdb_free_agent_expr): New declaration.
1658 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1659 list.
1660 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1661 static.
1662 (clear_breakpoint_conditions_and_commands): New function.
1663 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1664 (clear_breakpoint_conditions_and_commands): New declaration.
1665
1666 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1667
1668 * linux-aarch64-low.c (asm/ptrace.h): Include.
1669
1670 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1671
1672 Fix TLS access for -static -pthread.
1673 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1674 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1675 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1676
1677 2014-05-20 Pedro Alves <palves@redhat.com>
1678
1679 * linux-aarch64-low.c (aarch64_insert_point)
1680 (aarch64_remove_point): No longer check whether the type is
1681 supported here. Adjust to new interface.
1682 (the_low_target): Install aarch64_supports_z_point_type as
1683 supports_z_point_type method.
1684 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1685 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1686 instead of a Z packet char. Adjust.
1687 (arm_supports_z_point_type): New function.
1688 (arm_insert_point, arm_remove_point): Adjust to new interface.
1689 (the_low_target): Install arm_supports_z_point_type.
1690 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1691 (cris_insert_point, cris_remove_point): Adjust to new interface.
1692 Don't check whether the type is supported here.
1693 (the_low_target): Install cris_supports_z_point_type.
1694 * linux-low.c (linux_supports_z_point_type): New function.
1695 (linux_insert_point, linux_remove_point): Adjust to new interface.
1696 * linux-low.h (struct linux_target_ops) <insert_point,
1697 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1698 raw_breakpoint pointer parameter.
1699 <supports_z_point_type>: New method.
1700 * linux-mips-low.c (mips_supports_z_point_type): New function.
1701 (mips_insert_point, mips_remove_point): Adjust to new interface.
1702 Use mips_supports_z_point_type.
1703 (the_low_target): Install mips_supports_z_point_type.
1704 * linux-ppc-low.c (the_low_target): Install NULL as
1705 supports_z_point_type method.
1706 * linux-s390-low.c (the_low_target): Install NULL as
1707 supports_z_point_type method.
1708 * linux-sparc-low.c (the_low_target): Install NULL as
1709 supports_z_point_type method.
1710 * linux-x86-low.c (x86_supports_z_point_type): New function.
1711 (x86_insert_point): Adjust to new insert_point interface. Use
1712 insert_memory_breakpoint. Adjust to new
1713 i386_low_insert_watchpoint interface.
1714 (x86_remove_point): Adjust to remove_point interface. Use
1715 remove_memory_breakpoint. Adjust to new
1716 i386_low_remove_watchpoint interface.
1717 (the_low_target): Install x86_supports_z_point_type.
1718 * lynx-low.c (lynx_target_ops): Install NULL as
1719 supports_z_point_type callback.
1720 * nto-low.c (nto_supports_z_point_type): New.
1721 (nto_insert_point, nto_remove_point): Adjust to new interface.
1722 (nto_target_ops): Install nto_supports_z_point_type.
1723 * mem-break.c: Adjust intro comment.
1724 (struct raw_breakpoint) <raw_type, size>: New fields.
1725 <inserted>: Update comment.
1726 <shlib_disabled>: Delete field.
1727 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1728 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1729 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1730 (raw_bkpt_type_to_target_hw_bp_type): New function.
1731 (find_enabled_raw_code_breakpoint_at): New function.
1732 (find_raw_breakpoint_at): New type and size parameters. Use them.
1733 (insert_memory_breakpoint): New function, based off
1734 set_raw_breakpoint_at.
1735 (remove_memory_breakpoint): New function.
1736 (set_raw_breakpoint_at): Reimplement.
1737 (set_breakpoint): New, based on set_breakpoint_at.
1738 (set_breakpoint_at): Reimplement.
1739 (delete_raw_breakpoint): Go through the_target->remove_point
1740 instead of assuming memory breakpoints.
1741 (find_gdb_breakpoint_at): Delete.
1742 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1743 (find_gdb_breakpoint): New function.
1744 (set_gdb_breakpoint_at): Delete.
1745 (z_type_supported): New function.
1746 (set_gdb_breakpoint_1): New function, loosely based off
1747 set_gdb_breakpoint_at.
1748 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1749 (delete_gdb_breakpoint_at): Delete.
1750 (delete_gdb_breakpoint_1): New function, loosely based off
1751 delete_gdb_breakpoint_at.
1752 (delete_gdb_breakpoint): New function.
1753 (clear_gdb_breakpoint_conditions): Rename to ...
1754 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1755 breakpoint.
1756 (add_condition_to_breakpoint): Make static.
1757 (add_breakpoint_condition): Take a struct breakpoint pointer
1758 instead of an address. Adjust.
1759 (gdb_condition_true_at_breakpoint): Rename to ...
1760 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1761 z_type parameter.
1762 (gdb_condition_true_at_breakpoint): Reimplement.
1763 (add_breakpoint_commands): Take a struct breakpoint pointer
1764 instead of an address. Adjust.
1765 (gdb_no_commands_at_breakpoint): Rename to ...
1766 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1767 parameter. Return true if no breakpoint was found. Change debug
1768 output.
1769 (gdb_no_commands_at_breakpoint): Reimplement.
1770 (run_breakpoint_commands): Rename to ...
1771 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1772 and change return type to boolean.
1773 (run_breakpoint_commands): New function.
1774 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1775 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1776 breakpoint. Go through the_target->remove_point instead of
1777 assuming memory breakpoint.
1778 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1779 software and hardware breakpoints.
1780 (reinsert_raw_breakpoint): Go through the_target->insert_point
1781 instead of assuming memory breakpoint.
1782 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1783 software and hardware breakpoints.
1784 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1785 Check both software and hardware breakpoints.
1786 (validate_inserted_breakpoint): Assert the breakpoint is a
1787 software breakpoint. Set the inserted flag to -1 instead of
1788 setting shlib_disabled.
1789 (delete_disabled_breakpoints): Adjust.
1790 (validate_breakpoints): Only validate software breakpoints.
1791 Adjust to inserted flag change.
1792 (check_mem_read, check_mem_write): Skip breakpoint types other
1793 than software breakpoints. Adjust to inserted flag change.
1794 * mem-break.h (enum raw_bkpt_type): New enum.
1795 (raw_breakpoint, struct process_info): Forward declare.
1796 (Z_packet_to_target_hw_bp_type): Delete declaration.
1797 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1798 (set_gdb_breakpoint, delete_gdb_breakpoint)
1799 (clear_breakpoint_conditions): New declarations.
1800 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1801 (breakpoint_inserted_here): Update comment.
1802 (add_breakpoint_condition, add_breakpoint_commands): Replace
1803 address parameter with a breakpoint pointer parameter.
1804 (gdb_breakpoint_here): Update comment.
1805 (delete_gdb_breakpoint_at): Delete.
1806 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1807 * server.c (process_point_options): Take a struct breakpoint
1808 pointer instead of an address. Adjust.
1809 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1810 delete_gdb_breakpoint.
1811 * spu-low.c (spu_target_ops): Install NULL as
1812 supports_z_point_type method.
1813 * target.h: Include mem-break.h.
1814 (struct target_ops) <prepare_to_access_memory>: Update comment.
1815 <supports_z_point_type>: New field.
1816 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1817 instead of a char. Also take a raw breakpoint pointer.
1818 * win32-arm-low.c (the_low_target): Install NULL as
1819 supports_z_point_type.
1820 * win32-i386-low.c (i386_supports_z_point_type): New function.
1821 (i386_insert_point, i386_remove_point): Adjust to new interface.
1822 (the_low_target): Install i386_supports_z_point_type.
1823 * win32-low.c (win32_supports_z_point_type): New function.
1824 (win32_insert_point, win32_remove_point): Adjust to new interface.
1825 (win32_target_ops): Install win32_supports_z_point_type.
1826 * win32-low.h (struct win32_target_ops):
1827 <supports_z_point_type>: New method.
1828 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1829 instead of a char. Also take a raw breakpoint pointer.
1830
1831 2014-05-20 Pedro Alves <palves@redhat.com>
1832
1833 * mem-break.h: Include break-common.h.
1834 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1835 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1836 (Z_packet_to_target_hw_bp_type): New declaration.
1837 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1838 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1839 (Z_PACKET_ACCESS_WP): Delete macros.
1840 (Z_packet_to_hw_type): Delete function.
1841 * i386-low.h: Don't include break-common.h here.
1842 (Z_packet_to_hw_type): Delete declaration.
1843 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1844 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1845 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1846 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1847 * linux-aarch64-low.c: Don't include break-common.h here.
1848 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1849 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1850 (Z_packet_to_target_hw_bp_type): Delete function.
1851 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1852 function.
1853 (mips_insert_point, mips_remove_point): Use
1854 Z_packet_to_target_hw_bp_type.
1855
1856 2014-05-20 Pedro Alves <palves@redhat.com>
1857
1858 * linux-aarch64-low.c: Include break-common.h.
1859 (enum target_point_type): Delete.
1860 (Z_packet_to_point_type): Rename to ...
1861 (Z_packet_to_target_hw_bp_type): ... this, and return a
1862 target_hw_bp_type instead.
1863 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1864 instead of an enum target_point_type.
1865 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1866 breakpoint type.
1867 (aarch64_dr_state_insert_one_point)
1868 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1869 (aarch64_handle_aligned_watchpoint)
1870 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1871 Take an enum target_hw_bp_type instead of an enum
1872 target_point_type.
1873 (aarch64_supports_z_point_type): New function.
1874 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1875 use Z_packet_to_target_hw_bp_type.
1876
1877 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1878
1879 * configure.ac: Only use -Werror by default when DEVELOPMENT
1880 is true.
1881 * configure: Regenerate.
1882
1883 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1884
1885 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1886 * linux-x86-low.c (X86_64_USER_REGS): New.
1887 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1888
1889 2014-04-28 Yao Qi <yao@codesourcery.com>
1890
1891 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1892 name.
1893
1894 2014-04-25 Pedro Alves <palves@redhat.com>
1895
1896 PR server/16255
1897 * linux-low.c (linux_attach_fail_reason_string): New function.
1898 (linux_attach_lwp): Delete.
1899 (linux_attach_lwp_1): Rename to ...
1900 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1901 argument. Remove "initial" parameter. Return int instead of
1902 void. Don't error or warn here.
1903 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1904 failure to attach to the tgid. Call warning when failing to
1905 attach to an lwp.
1906 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1907 argument. Remove "initial" parameter. Return int instead of
1908 void. Don't error or warn here.
1909 (linux_attach_fail_reason_string): New declaration.
1910 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1911 interface change. Use linux_attach_fail_reason_string.
1912
1913 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1914 Walfred Tedeschi <walfred.tedeschi@intel.com>
1915
1916 * Makefile.in: Added rules to handle new files
1917 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1918 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1919 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1920 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1921 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1922 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1923 x32-avx512-linux.o.
1924 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1925 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1926 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1927 i386/x32-avx512.xml.
1928 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1929 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1930 i386/x32-avx512-linux.xml.
1931 * i387-fp.c (num_avx512_k_registers): New constant for number
1932 of K registers.
1933 (num_avx512_zmmh_low_registers): New constant for number of
1934 lower ZMM registers (0-15).
1935 (num_avx512_zmmh_high_registers): New constant for number of
1936 higher ZMM registers (16-31).
1937 (num_avx512_ymmh_registers): New contant for number of higher
1938 YMM registers (ymm16-31 added by avx521 on x86_64).
1939 (num_avx512_xmm_registers): New constant for number of higher
1940 XMM registers (xmm16-31 added by AVX512 on x86_64).
1941 (struct i387_xsave): Add space for AVX512 registers.
1942 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1943 Add code to handle AVX512 registers.
1944 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1945 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1946 prototypei from generated file.
1947 (tdesc_amd64_avx512_linux): Likewise.
1948 (init_registers_x32_avx512_linux): Likewise.
1949 (tdesc_x32_avx512_linux): Likewise.
1950 (init_registers_i386_avx512_linux): Likewise.
1951 (tdesc_i386_avx512_linux): Likewise.
1952 (x86_64_regmap): Add AVX512 registers.
1953 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1954 mask.
1955 (initialize_low_arch): Add code to initialize AVX512 registers.
1956
1957 2014-04-23 Pedro Alves <palves@redhat.com>
1958
1959 * mem-break.c (find_gdb_breakpoint_at): Make static.
1960 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1961
1962 2014-04-23 Pedro Alves <palves@redhat.com>
1963
1964 * i386-low.c: Don't include break-common.h here.
1965 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1966 prototype to take target_hw_bp_type as argument instead of a Z
1967 packet char.
1968 * i386-low.h: Include break-common.h here.
1969 (Z_packet_to_hw_type): Declare.
1970 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1971 prototypes.
1972 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1973 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1974 (x86_remove_point): Convert the packet number to a
1975 target_hw_bp_type before calling i386_low_remove_watchpoint.
1976 * win32-i386-low.c (i386_insert_point): Convert the packet number
1977 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1978 (i386_remove_point): Convert the packet number to a
1979 target_hw_bp_type before calling i386_low_remove_watchpoint.
1980
1981 2014-04-23 Pedro Alves <palves@redhat.com>
1982
1983 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1984
1985 2014-04-10 Pedro Alves <palves@redhat.com>
1986
1987 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1988 Check if the condition or command is NULL before checking if the
1989 breakpoint is known. On success, return true.
1990 * mem-break.h (add_breakpoint_condition): Document return.
1991 (add_breakpoint_commands): Add describing comment.
1992 * server.c (skip_to_semicolon): New function.
1993 (process_point_options): Use it.
1994
1995 2014-04-09 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1998 to lwpid_of.
1999
2000 2014-02-27 Pedro Alves <palves@redhat.com>
2001
2002 PR 12702
2003 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2004 macros.
2005 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2006 output.
2007 (last_thread_of_process_p): Take a PID argument instead of a
2008 thread pointer.
2009 (linux_wait_for_lwp): Delete.
2010 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2011 functions.
2012 (linux_low_filter_event): New function, party factored out from
2013 linux_wait_for_event.
2014 (linux_wait_for_event): Rename to ...
2015 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2016 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2017 sigsuspend. Check for zombie leaders.
2018 (linux_wait_for_event): Reimplement as wrapper around
2019 linux_wait_for_event_filtered.
2020 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2021 a normal or signal exit is seen, it's the whole process exiting.
2022 (wait_for_sigstop): No longer a for_each_inferior callback.
2023 Rewrite on top of linux_wait_for_event_filtered.
2024 (stop_all_lwps): Call wait_for_sigstop directly.
2025 * server.c (resume, handle_target_event): Handle
2026 TARGET_WAITKIND_NO_RESUMED.
2027
2028 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2029
2030 * win32-low.c (psapi_get_dll_name,
2031 * win32_CreateToolhelp32Snapshot): Delete.
2032 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2033 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2034 Delete.
2035 (handle_load_dll): Add function description.
2036 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2037
2038 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2039
2040 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2041 Add comment.
2042 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2043 base address when calling win32_add_one_solib.
2044 (handle_load_dll): Delete local variable load_addr.
2045 Remove 0x1000 offset applied to DLL base address when calling
2046 win32_add_one_solib.
2047 (handle_unload_dll): Add comment.
2048
2049 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2050
2051 * win32-low.c (win32_add_all_dlls): Renames
2052 win32_ensure_ntdll_loaded. Rewrite function documentation.
2053 Adjust implementation to always load all DLLs.
2054 Add 0x1000 offset to DLL base address when calling
2055 win32_add_one_solib.
2056 (child_initialization_done): New static global.
2057 (do_initial_child_stuff): Set child_initialization_done to
2058 zero during child initialization, and 1 after. Replace call
2059 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2060 Add comment.
2061 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2062 (handle_unload_dll): Add function documentation.
2063 (get_child_debug_event): Ignore load and unload DLL events
2064 during child initialization.
2065
2066 2014-02-20 Doug Evans <dje@google.com>
2067
2068 Remove global all_lwps.
2069 * inferiors.h (ptid_of): Move here from linux-low.h.
2070 (pid_of, lwpid_of): Ditto.
2071 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2072 parameter is a struct thread_info * now.
2073 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2074 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2075 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2076 directly.
2077 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2078 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2079 * linux-arm-low.c (update_registers_callback): Update, "entry"
2080 parameter is a struct thread_info * now.
2081 Fetch lwpid from current_inferior directly.
2082 (arm_insert_point): Pass &all_threads to find_inferior instead of
2083 &all_lwps.
2084 (arm_remove_point): Ditto.
2085 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2086 (arm_prepare_to_resume): Fetch pid from thread.
2087 (arm_read_description): Fetch lwpid from current_inferior directly.
2088 * linux-low.c (all_lwps): Delete.
2089 (delete_lwp): Delete call to remove_inferior.
2090 (handle_extended_wait): Fetch lwpid from thread.
2091 (add_lwp): Don't set lwp->entry.id. Remove call to
2092 add_inferior_to_list.
2093 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2094 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2095 (kill_one_lwp_callback): Ditto.
2096 (linux_kill): Don't dereference NULL pointer.
2097 Fetch ptid,lwpid from thread.
2098 (get_detach_signal): Fetch ptid from thread.
2099 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2100 Simplify call to regcache_invalidate_thread.
2101 (delete_lwp_callback): Update, "entry" parameter is a
2102 struct thread_info * now. Fetch pid from thread.
2103 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2104 (status_pending_p_callback): Update, "entry" parameter is a
2105 struct thread_info * now. Fetch ptid from thread.
2106 (find_lwp_pid): Update, "entry" parameter is a
2107 struct thread_info * now.
2108 (linux_wait_for_lwp): Fetch pid from thread.
2109 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2110 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2111 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2112 (dequeue_one_deferred_signal): Ditto.
2113 (cancel_breakpoint): Fetch ptid from current_inferior.
2114 (linux_wait_for_event): Pass &all_threads to find_inferior,
2115 not &all_lwps. Fetch ptid, lwpid from thread.
2116 (count_events_callback): Update, "entry" parameter is a
2117 struct thread_info * now.
2118 (select_singlestep_lwp_callback): Ditto.
2119 (select_event_lwp_callback): Ditto.
2120 (cancel_breakpoints_callback): Ditto.
2121 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2122 not &all_lwps.
2123 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2124 (unsuspend_one_lwp): Update, "entry" parameter is a
2125 struct thread_info * now.
2126 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2127 not &all_lwps.
2128 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2129 Fetch lwpid from thread, not lwp.
2130 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2131 Pass &all_threads to find_inferior, not &all_lwps.
2132 (send_sigstop): Fetch lwpid from thread, not lwp.
2133 (send_sigstop_callback): Update, "entry" parameter is a
2134 struct thread_info * now.
2135 (suspend_and_send_sigstop_callback): Ditto.
2136 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2137 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2138 struct thread_info * now.
2139 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2140 from thread, lwp.
2141 (lwp_running): Update, "entry" parameter is a
2142 struct thread_info * now.
2143 (stop_all_lwps): Fetch ptid from thread.
2144 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2145 (linux_resume_one_lwp): Fetch lwpid from thread.
2146 (linux_set_resume_request): Update, "entry" parameter is a
2147 struct thread_info * now. Fetch pid, lwpid from thread.
2148 (resume_status_pending_p): Update, "entry" parameter is a
2149 struct thread_info * now.
2150 (need_step_over_p): Ditto. Fetch lwpid from thread.
2151 (start_step_over): Fetch lwpid from thread.
2152 (linux_resume_one_thread): Update, "entry" parameter is a
2153 struct thread_info * now. Fetch lwpid from thread.
2154 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2155 (proceed_one_lwp): Update, "entry" parameter is a
2156 struct thread_info * now. Fetch lwpid from thread.
2157 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2158 struct thread_info * now.
2159 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2160 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2161 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2162 directly.
2163 (regsets_store_inferior_registers): Ditto.
2164 (fetch_register, store_register): Ditto.
2165 (linux_read_memory, linux_write_memory): Ditto.
2166 (linux_request_interrupt): Ditto.
2167 (linux_read_auxv): Ditto.
2168 (linux_xfer_siginfo): Ditto.
2169 (linux_qxfer_spu): Ditto.
2170 (linux_qxfer_libraries_svr4): Ditto.
2171 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2172 moved to inferiors.h.
2173 (get_lwp): Delete.
2174 (get_thread_lwp): Update.
2175 (struct lwp_info): Delete member "entry". Simplify comment for
2176 member "thread".
2177 (all_lwps): Delete.
2178 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2179 current_inferior directly.
2180 (update_watch_registers_callback): Update, "entry" parameter is a
2181 struct thread_info * now. Fetch pid from thread.
2182 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2183 (mips_insert_point): Fetch lwpid from current_inferior.
2184 Pass &all_threads to find_inferior, not &all_lwps.
2185 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2186 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2187 directly.
2188 (mips_stopped_data_address): Ditto.
2189 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2190 directly.
2191 * linux-tile-low.c (tile_arch_setup): Ditto.
2192 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2193 (update_debug_registers_callback): Update, "entry" parameter is a
2194 struct thread_info * now. Fetch pid from thread.
2195 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2196 Pass &all_threads to find_inferior, not &all_lwps.
2197 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2198 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2199 Pass &all_threads to find_inferior, not &all_lwps.
2200 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2201 (i386_dr_low_get_status): Ditto.
2202 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2203 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2204 (x86_linux_read_description): Ditto.
2205 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2206
2207 2014-02-20 Doug Evans <dje@google.com>
2208
2209 * inferiors.c (get_first_inferior): Fix buglet.
2210
2211 2014-02-19 Doug Evans <dje@google.com>
2212
2213 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2214 * inferiors.c (add_thread): Change result type to struct thread_info *.
2215 All callers updated.
2216 (add_lwp): Call add_thread here instead of in callers.
2217 All callers updated.
2218 * linux-low.h (get_lwp_thread): Rewrite.
2219 (struct lwp_info): New member "thread".
2220
2221 2014-02-19 Doug Evans <dje@google.com>
2222
2223 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2224 All callers updated.
2225
2226 2014-02-19 Doug Evans <dje@google.com>
2227
2228 * inferiors.c (add_thread): Fix whitespace.
2229
2230 2014-02-19 Doug Evans <dje@google.com>
2231
2232 * dll.c (clear_dlls): Replace accessing list implemention details
2233 with API function.
2234 * gdbthread.h (get_first_thread): Declare.
2235 * inferiors.c (for_each_inferior_with_data): New function.
2236 (get_first_thread): New function.
2237 (find_thread_ptid): Simplify.
2238 (get_first_inferior): New function.
2239 (clear_list): Delete.
2240 (one_inferior_p): New function.
2241 (clear_inferior_list): New function.
2242 (clear_inferiors): Update.
2243 * inferiors.h (for_each_inferior_with_data): Declare.
2244 (clear_inferior_list): Declare.
2245 (one_inferior_p): Declare.
2246 (get_first_inferior): Declare.
2247 * linux-low.c (linux_wait_for_event): Replace accessing list
2248 implemention details with API function.
2249 * server.c (target_running): Ditto.
2250 (accumulate_file_name_length): New function.
2251 (emit_dll_description): New function.
2252 (handle_qxfer_libraries): Replace accessing list implemention
2253 details with API function.
2254 (handle_qxfer_threads_worker): New function.
2255 (handle_qxfer_threads_proper): Replace accessing list implemention
2256 details with API function.
2257 (handle_query): Ditto.
2258 (visit_actioned_threads_callback_ftype): New typedef.
2259 (visit_actioned_threads_data): New struct.
2260 (visit_actioned_threads): Rewrite to be find_inferior callback.
2261 (resume): Call find_inferior.
2262 (handle_status): Replace accessing list implemention
2263 details with API function.
2264 (process_serial_event): Replace accessing list implemention details
2265 with API function.
2266 * target.c (set_desired_inferior): Replace accessing list implemention
2267 details with API function.
2268 * tracepoint.c (same_process_p): New function.
2269 (gdb_agent_about_to_close): Replace accessing list implemention
2270 details with API function.
2271 * win32-low.c (child_delete_thread): Replace accessing list
2272 implemention details with API function.
2273 (match_dll_by_basename): New function.
2274 (dll_is_loaded_by_basename): New function.
2275 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2276 details call to dll_is_loaded_by_basename.
2277
2278 2014-02-19 Doug Evans <dje@google.com>
2279
2280 * dll.h (struct dll_info): Add comment.
2281 * gdbthread.h (struct thread_info): Add comment.
2282 (current_ptid): Simplify.
2283 * inferiors.c (add_process): Update.
2284 (remove_process): Update.
2285 * inferiors.h (struct process_info): Rename member "head" to "entry".
2286 * linux-low.c (delete_lwp): Update.
2287 (add_lwp): Update.
2288 (last_thread_of_process_p): Update.
2289 (kill_one_lwp_callback, linux_kill): Update.
2290 (status_pending_p_callback): Update.
2291 (wait_for_sigstop): Update. Simplify read of ptid.
2292 (start_step_over): Update.
2293 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2294 (get_lwp_thread): Update.
2295 (struct lwp_info): Rename member "head" to "entry".
2296 * regcache.h (inferior_list_entry): Delete.
2297 * server.c (kill_inferior_callback): Update.
2298 (detach_or_kill_inferior_callback): Update.
2299 (print_started_pid): Update.
2300 (print_attached_pid): Update.
2301 (process_serial_event): Simplify read of ptid.
2302 * thread-db.c (thread_db_create_event): Update.
2303 (thread_db_get_tls_address): Update.
2304 * win32-low.c (current_inferior_ptid): Simplify.
2305
2306 2014-02-19 Tom Tromey <tromey@redhat.com>
2307
2308 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2309 argument.
2310 (target_supports_btrace): Update.
2311
2312 2014-02-14 Yao Qi <yao@codesourcery.com>
2313
2314 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2315 (rsp-low-ipa.o): New target.
2316
2317 2014-02-12 Tom Tromey <tromey@redhat.com>
2318
2319 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2320 convert_ascii_to_int.
2321 * regcache.c (registers_to_string): Likewise.
2322 * remote-utils.c (decode_M_packet): Likewise.
2323 * server.c (process_serial_event): Likewise.
2324
2325 2014-02-12 Tom Tromey <tromey@redhat.com>
2326
2327 * server.c (handle_query, handle_v_run): Use hex2bin, not
2328 unhexify.
2329 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2330
2331 2014-02-12 Tom Tromey <tromey@redhat.com>
2332
2333 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2334 convert_int_to_ascii.
2335 * regcache.c (registers_to_string, collect_register_as_string):
2336 Likewise.
2337 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2338 Likewise.
2339 * server.c (process_serial_event): Likewise.
2340 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2341 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2342
2343 2014-02-12 Tom Tromey <tromey@redhat.com>
2344
2345 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2346 bin2hex, not hexify.
2347 * tracepoint.c (cmd_qtstatus): Likewise.
2348
2349 2014-02-12 Tom Tromey <tromey@redhat.com>
2350
2351 * remote-utils.c (monitor_output): Pass explicit length to
2352 hexify.
2353
2354 2014-02-12 Tom Tromey <tromey@redhat.com>
2355
2356 * tracepoint.c: Include rsp-low.h.
2357 * server.c: Include rsp-low.h.
2358 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2359 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2360 declare.
2361 * remote-utils.c: Include rsp-low.h.
2362 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2363 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2364 (convert_int_to_ascii, convert_ascii_to_int): Move to
2365 common/rsp-low.c.
2366 * regcache.c: Include rsp-low.h.
2367 * ax.c: Include rsp-low.h.
2368 * Makefile.in (SFILES): Add common/rsp-low.c.
2369 (OBS): Add rsp-low.o.
2370 (rsp-low.o): New target.
2371
2372 2014-02-12 Tom Tromey <tromey@redhat.com>
2373
2374 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2375 Include print-utils.h.
2376 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2377 (plongest, thirty_two, phex_nz): Remove.
2378 * Makefile.in (SFILES): Add common/print-utils.c.
2379 (OBS): Add print-utils.o.
2380 (print-utils-ipa.o): New target.
2381 (print-utils.o): New target.
2382 (IPA_OBJS): Add print-utils-ipa.o.
2383
2384 2014-02-06 Tom Tromey <tromey@redhat.com>
2385
2386 * Makefile.in (SFILES): Fix indentation.
2387
2388 2014-02-05 Doug Evans <dje@google.com>
2389
2390 * linux-low.c (linux_wait_for_event): Improve comment.
2391 (linux_wait_1): Keep current_inferior in sync with event_child.
2392
2393 2014-01-22 Doug Evans <dje@google.com>
2394
2395 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2396
2397 2014-01-22 Doug Evans <dje@google.com>
2398
2399 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2400 * configure: Regenerate.
2401 * config.in: Regenerate.
2402 * Makefile.in (SFILES): Add debug.c.
2403 (OBS): Add debug.o.
2404 * debug.c: New file.
2405 * debug.h: New file.
2406 * linux-aarch64-low.c (*): Update all debugging printfs to use
2407 debug_printf instead of fprintf.
2408 * linux-arm-low.c (*): Ditto.
2409 * linux-cris-low.c (*): Ditto.
2410 * linux-crisv32-low.c (*): Ditto.
2411 * linux-m32r-low.c (*): Ditto.
2412 * linux-sparc-low.c (*): Ditto.
2413 * linux-x86.c (*): Ditto.
2414 * linux-low.c (*): Ditto.
2415 (linux_wait_1): Add calls to debug_enter, debug_exit.
2416 (linux_wait): Remove redundant debugging printf.
2417 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2418 (linux_resume, unstop_all_lwps): Ditto.
2419 * mem-break.c (*): Update all debugging printfs to use
2420 debug_printf instead of fprintf.
2421 * remote-utils.c (*): Ditto.
2422 * thread-db.c (*): Ditto.
2423 * server.c #include <ctype.h>, "gdb_vecs.h".
2424 (debug_threads): Moved to debug.c.
2425 (*): Update all debugging printfs to use debug_printf instead of
2426 fprintf.
2427 (start_inferior): Replace call to fflush with call to debug_flush.
2428 (monitor_show_help): Mention set debug-format.
2429 (parse_debug_format_options): New function.
2430 (handle_monitor_command): Handle "monitor set debug-format".
2431 (gdbserver_usage): Mention --debug-format.
2432 (main): Parse --debug-format.
2433 * server.h (debug_threads): Declaration moved to debug.h.
2434 #include "debug.h".
2435 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2436 trace_debug_1 that uses debug_printf.
2437 (tracepoint_look_up_symbols): Update all debugging printfs to use
2438 debug_printf instead of fprintf.
2439
2440 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2441
2442 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2443 sys/ptrace.h.
2444
2445 2014-01-17 Pedro Alves <palves@redhat.com>
2446
2447 PR build/16445
2448 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2449 defined after including gdb_proc_service.h.
2450
2451 2014-01-16 Doug Evans <dje@google.com>
2452
2453 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2454 (match_dll): Use it.
2455
2456 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2457
2458 * target.h (target_ops) <read_btrace>: Change parameters and
2459 return type to allow error reporting.
2460 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2461 trace reading errors on.
2462 * linux-low.c (linux_low_read_btrace): Pass trace reading
2463 errors on.
2464 (linux_low_disable_btrace): New.
2465
2466 2014-01-15 Doug Evans <dje@google.com>
2467
2468 * inferiors.c (thread_id_to_gdb_id): Delete.
2469 * inferiors.h (thread_id_to_gdb_id): Delete.
2470
2471 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2472
2473 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2474 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2475 versions.
2476
2477 2014-01-08 Pedro Alves <palves@redhat.com>
2478
2479 * server.c (handle_status): Don't discard previous queued stop
2480 replies or thread's pending status here.
2481 (main) <disconnection>: Do it here instead.
2482
2483 2014-01-08 Pedro Alves <palves@redhat.com>
2484
2485 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2486 * server.c (visit_actioned_threads, handle_pending_status): New
2487 function.
2488 (handle_v_cont): Factor out parts to ...
2489 (resume): ... this new function. If in all-stop, and a thread
2490 being resumed has a pending status, report it without actually
2491 resuming.
2492 (myresume): Adjust to use the new 'resume' function.
2493 (clear_pending_status_callback, set_pending_status_callback)
2494 (find_status_pending_thread_callback): New functions.
2495 (handle_status): Handle the case of multiple threads having
2496 interesting statuses to report. Report threads' real last signal
2497 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2498 with an interesting thread to report the status for, instead of
2499 always reporting the status of the first thread.
2500
2501 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2502
2503 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2504 * gdbreplay.c (gdbreplay_version): Likewise.
2505
2506 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2507
2508 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2509 iov.iov_len with the real length in use.
2510
2511 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2512
2513 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2514 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2515 for all targets that use win32-low.c.
2516 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2517 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2518
2519 2013-12-13 Pedro Alves <palves@redhat.com>
2520
2521 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2522 if equal to TARGET_WAITKIND_LOADED.
2523 * win32-low.c (cached_status): New static global.
2524 (win32_wait): Add declaration.
2525 (do_initial_child_stuff): Flush all initial pending debug events
2526 up to the initial breakpoint.
2527 (win32_wait): If CACHED_STATUS was set, return that instead
2528 of doing a real wait. Remove the code resuming the execution
2529 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2530 during the initial phase. Also remove the code changing
2531 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2532 TARGET_WAITKIND_STOPPED.
2533
2534 2013-12-11 Yao Qi <yao@codesourcery.com>
2535
2536 * notif.c (handle_notif_ack): Return 0 if no notification
2537 matches.
2538
2539 2013-11-20 Doug Evans <dje@google.com>
2540
2541 * linux-low.c (linux_set_resume_request): Fix comment.
2542
2543 2013-11-20 Doug Evans <dje@google.com>
2544
2545 * linux-low.c (resume_status_pending_p): Tweak comment.
2546
2547 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2548
2549 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2550 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2551 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2552 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2553 (srv_amd64_regobj): Add amd64-mpx.o.
2554 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2555 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2556 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2557 * i387-fp.c (num_pl_bnd_register) Added constant.
2558 (num_pl_bnd_cfg_registers) Added constant.
2559 (struct i387_xsave) Added reserved area and MPX fields.
2560 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2561 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2562 function.
2563 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2564 (init_registers_amd64_mpx_linux): Declare new function.
2565 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2566 (x86_64_regmap): Add MPX registers.
2567 (x86_linux_read_description): Add MPX case.
2568 (initialize_low_arch): Initialize MPX targets.
2569
2570 2013-11-18 Tom Tromey <tromey@redhat.com>
2571
2572 * configure: Rebuild.
2573 * configure.ac: Don't check for stdlib.h.
2574 * gdbreplay.c: Unconditionally include stdlib.h.
2575
2576 2013-11-18 Tom Tromey <tromey@redhat.com>
2577
2578 * config.in: Rebuild.
2579 * configure: Rebuild.
2580 * configure.ac: Don't use AC_HEADER_DIRENT.
2581
2582 2013-11-18 Tom Tromey <tromey@redhat.com>
2583
2584 * server.h: Don't check HAVE_STRING_H.
2585 * gdbreplay.c: Don't check HAVE_STRING_H.
2586 * configure: Rebuild.
2587
2588 2013-11-18 Tom Tromey <tromey@redhat.com>
2589
2590 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2591 LIBGNU.
2592
2593 2013-11-08 Tom Tromey <tromey@redhat.com>
2594
2595 * configure, config.in: Rebuild.
2596 * configure.ac: Remove unused configury.
2597
2598 2013-11-08 Tom Tromey <tromey@redhat.com>
2599
2600 * acinclude.m4: Include common.m4, codeset.m4.
2601 * configure, config.in: Rebuild.
2602 * configure.ac: Use GDB_AC_COMMON.
2603
2604 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2605
2606 * linux-s390-low.c (HWCAP_S390_TE): New define.
2607 (s390_arch_setup): Consider the TE field in the HWCAP for
2608 determining 'have_regset_tdb'.
2609
2610 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2611
2612 PR gdb/16014
2613 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2614 call to sizeof.
2615
2616 2013-10-02 Pedro Alves <palves@redhat.com>
2617
2618 * server.c (process_serial_event): Don't output "GDBserver
2619 exiting" if GDB is connected through stdio.
2620 * target.c (mywait): Likewise, be silent if GDB is connected
2621 through stdio.
2622
2623 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2624
2625 * lynx-low.c (lynx_add_threads_after_attach): New function.
2626 (lynx_attach): Remove call to add_thread. Add call to
2627 lynx_add_threads_after_attach instead.
2628
2629 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2630
2631 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2632 * config.in, configure: Regenerated.
2633
2634 2013-09-18 Yao Qi <yao@codesourcery.com>
2635
2636 PR server/15959
2637 * server.c (start_inferior): Clear 'resume_info'.
2638
2639 2013-09-16 Jiong Wang <jiwang@tilera.com>
2640
2641 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2642 for each register.
2643
2644 2013-09-16 Jiong Wang <jiwang@tilera.com>
2645
2646 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2647 linux-tile-low.o to srv_tgtobj.
2648
2649 2013-09-16 Will Newton <will.newton@linaro.org>
2650
2651 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2652 out regs.
2653
2654 2013-09-06 Pedro Alves <palves@redhat.com>
2655
2656 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2657 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2658 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2659 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2660 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2661 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2662
2663 2013-09-06 Pedro Alves <palves@redhat.com>
2664
2665 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2666 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2667
2668 2013-09-06 Pedro Alves <palves@redhat.com>
2669
2670 * linux-amd64-ipa.c: Include tracepoint.h.
2671 * linux-i386-ipa.c: Include tracepoint.h.
2672
2673 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2674
2675 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2676 (ps_get_thread_area): New function.
2677
2678 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2679
2680 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2681 (initialize_low_arch): Call init_registers_crisv32 rather than
2682 init_register_crisv32.
2683
2684 2013-09-05 Pedro Alves <palves@redhat.com>
2685
2686 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2687 to ...
2688 * hostio.h: ... this new file.
2689 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2690 win32-low.c: Include hostio.h.
2691
2692 2013-09-05 Pedro Alves <palves@redhat.com>
2693
2694 * server.h (gdb_client_data, handler_func, callback_handler_func)
2695 (delete_file_handler, add_file_handler, append_callback_event)
2696 (delete_callback_event, start_event_loop, initialize_event_loop):
2697 Move to event-loop.h and include it.
2698 * event-loop.h: New file.
2699
2700 2013-09-05 Pedro Alves <palves@redhat.com>
2701
2702 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2703 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2704 (loaded_dll, unloaded_dll): Move to ...
2705 * dll.h: ... this new file.
2706 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2707
2708 2013-09-05 Pedro Alves <palves@redhat.com>
2709
2710 * server.h (current_process, get_thread_process, all_processes)
2711 (add_inferior_to_list, for_each_inferior, current_inferior)
2712 (remove_inferior, add_process, remove_process, find_process_pid)
2713 (have_started_inferiors_p, have_attached_inferiors_p)
2714 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2715 (clear_inferiors, find_inferior, find_inferior_id)
2716 (inferior_target_data, set_inferior_target_data)
2717 (inferior_regcache_data, set_inferior_regcache_data): Move to
2718 inferiors.h, and include it.
2719 * inferiors.h: New file.
2720
2721 2013-09-05 Pedro Alves <palves@redhat.com>
2722
2723 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2724 Move ...
2725 * ax.h: ... here.
2726
2727 2013-09-05 Pedro Alves <palves@redhat.com>
2728
2729 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2730 tracepoint.h.
2731 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2732 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2733 (handle_tracepoint_general_set, handle_tracepoint_query)
2734 (tracepoint_finished_step, tracepoint_was_hit)
2735 (release_while_stepping_state_list, current_traceframe)
2736 (in_readonly_region, traceframe_read_mem)
2737 (fetch_traceframe_registers, traceframe_read_sdata)
2738 (traceframe_read_info, struct fast_tpoint_collect_status)
2739 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2740 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2741 (supply_fast_tracepoint_registers)
2742 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2743 (ipa_tdesc, claim_trampoline_space)
2744 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2745 (agent_mem_read, agent_get_trace_state_variable_value)
2746 (agent_set_trace_state_variable_value, agent_tsv_read)
2747 (agent_mem_read_string, get_raw_reg_func_addr)
2748 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2749 * tracepoint.h: ... this new file.
2750
2751 2013-09-05 Pedro Alves <palves@redhat.com>
2752
2753 * server.h (perror_with_name, error, fatal, warning, paddress)
2754 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2755 include it.
2756 * utils.h: New file.
2757
2758 2013-09-05 Pedro Alves <palves@redhat.com>
2759
2760 * server.h (remote_debug, noack_mode, transport_is_reliable)
2761 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2762 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2763 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2764 (write_enn, initialize_async_io, enable_async_io)
2765 (disable_async_io, check_remote_input_interrupt_request)
2766 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2767 (dead_thread_notify, prepare_resume_reply)
2768 (decode_address_to_semicolon, decode_address, decode_m_packet)
2769 (decode_M_packet, decode_X_packet, decode_xfer_write)
2770 (decode_search_memory_packet, unhexify, hexify)
2771 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2772 (look_up_one_symbol, relocate_instruction)
2773 (monitor_output): Move to remote-utils.h, and include it.
2774 * remote-utils.h: New file.
2775
2776 2013-09-05 Pedro Alves <palves@redhat.com>
2777
2778 * server.h (_): Delete.
2779
2780 2013-09-02 Pedro Alves <palves@redhat.com>
2781
2782 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2783 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2784 allocated.
2785 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2786
2787 2013-09-02 Pierre Muller <muller@sourceware.org>
2788
2789 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2790 or WriteProcessMemory complete successfully and handle
2791 ERROR_PARTIAL_COPY error.
2792
2793 2013-09-02 Pedro Alves <palves@redhat.com>
2794
2795 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2796 error instead of EIO.
2797
2798 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2799
2800 PR server/15604
2801 * linux-low.c: Include filestuff.h.
2802 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2803 * lynx-low.c: Include filestuff.h.
2804 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2805 * server.c: Include filestuff.h.
2806 (main): Call notice_open_fds.
2807 * spu-low.c: Include filestuff.h.
2808 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2809
2810 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2811
2812 * Makefile.in: Explain why ../target and ../nat are not
2813 listed as include file search paths.
2814 (linux-waitpid.o): New object file rule.
2815 * configure.srv (srv_native_linux_obj): New variable.
2816 Replace all occurrences of linux native object files with
2817 $srv_native_linux_obj.
2818 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2819 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2820 (linux_enable_event_reporting): Remove declaration.
2821 (my_waitpid): Moved to common/linux-waitpid.c.
2822 (linux_wait_for_event): Pass ptid when calling
2823 linux_enable_event_reporting.
2824 (linux_supports_tracefork_flag): Remove.
2825 (linux_enable_event_reporting): Likewise.
2826 (linux_tracefork_grandchild): Remove.
2827 (STACK_SIZE): Moved to common/linux-ptrace.c.
2828 (linux_tracefork_child): Remove.
2829 (linux_test_for_tracefork): Remove.
2830 (linux_look_up_symbols): Call linux_supports_traceclone.
2831 (initialize_low): Remove call to linux_test_for_tracefork.
2832 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2833 common/linux-ptrace.h.
2834 (PTRACE_TYPE_ARG4): Likewise.
2835 Include linux-ptrace.h.
2836
2837 2013-08-21 Pedro Alves <palves@redhat.com>
2838
2839 * config.in: Renegerate.
2840
2841 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2842
2843 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2844 (SFILES): Remove $(srcdir)/common/target-common.c and
2845 add $(srcdir)/target/waitstatus.c.
2846 (OBS): Remove target-common.o and add waitstatus.o.
2847 (server_h): Remove $(srcdir)/../common/target-common.h and
2848 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2849 and $(srcdir)/../target/waitstatus.h.
2850 (target-common.o): Remove.
2851 (waitstatus.o): New target object file.
2852 * target.h: Do not include target-common.h and
2853 include target/resume.h, target/wait.h and
2854 target/waitstatus.h.
2855
2856 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2857
2858 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2859 to PTRACE_TYPE_ARG3.
2860 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2861 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2862 PTRACE_TYPE_ARG4.
2863 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2864 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2865
2866 2013-07-27 Jie Zhang <jie@codesourcery.com>
2867 Daniel Jacobowitz <dan@codesourcery.com>
2868 Yao Qi <yao@codesourcery.com>
2869
2870 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2871 (mips-linux-watch.o): New rule.
2872 (mips_linux_watch_h): New variable.
2873 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2874 srv_tgtobj.
2875 * linux-mips-low.c: Include mips-linux-watch.h.
2876 (struct arch_process_info, struct arch_lwp_info): New.
2877 (update_watch_registers_callback): New function.
2878 (mips_linux_new_process, mips_linux_new_thread) New functions.
2879 (mips_linux_prepare_to_resume, mips_insert_point): New
2880 functions.
2881 (mips_remove_point, mips_stopped_by_watchpoint): New
2882 functions.
2883 (rsp_bp_type_to_target_hw_bp_type): New function.
2884 (mips_stopped_data_address): New function.
2885 (the_low_target): Add watchpoint support functions.
2886
2887 2013-07-27 Yao Qi <yao@codesourcery.com>
2888
2889 * i386-low.c: Include break-common.h.
2890 (enum target_hw_bp_type): Remove.
2891
2892 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2893
2894 * Makefile.in (SFILES): /common/target-common.c.
2895 (OBS): Add target-common.o.
2896 (server_h): Add $(srcdir)/../common/target-common.h.
2897 (target-common.o): New target.
2898 * server.c (queue_stop_reply_callback): Free
2899 status string after use.
2900 * target.c (target_waitstatus_to_string): Remove.
2901 * target.h: Include target-common.h.
2902 (resume_kind): Likewise.
2903 (target_waitkind): Likewise.
2904 (target_waitstatus): Likewise.
2905 (TARGET_WNOHANG): Likewise.
2906
2907 2013-07-04 Yao Qi <yao@codesourcery.com>
2908
2909 * Makefile.in (host_alias): Use @host_noncanonical@.
2910 (target_alias): Use @target_noncanonical@.
2911 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2912 ACX_NONCANONICAL_HOST.
2913 * configure: Regenerated.
2914
2915 Revert:
2916 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2917
2918 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2919 * configure: Rebuild.
2920 * Makefile.in (version_host, version_target): Get from configure.
2921 (version.c): Use $(version_host) and $(version_target).
2922
2923 2013-07-03 Pedro Alves <palves@redhat.com>
2924
2925 * Makefile.in (config.status): Depend on development.sh.
2926 * acinclude.m4: Include libmcheck.m4.
2927 * configure: Regenerate.
2928
2929 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2930
2931 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2932 attribute inside the parentheses.
2933 (winapi_DebugSetProcessKillOnExit): Ditto.
2934 (winapi_DebugBreakProcess): Ditto.
2935 (winapi_GenerateConsoleCtrlEvent): Ditto.
2936
2937 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2938
2939 * notif.h (notif_event): Add a dummy member to avoid compiler
2940 errors.
2941
2942 2013-07-01 Pedro Alves <palves@redhat.com>
2943
2944 * hostio.c (HOSTIO_PATH_MAX): Define.
2945 (require_filename, handle_open, handle_unlink, handle_readlink):
2946 Use it.
2947
2948 2013-07-01 Pedro Alves <palves@redhat.com>
2949
2950 * server.h: Include "pathmax.h".
2951 * linux-low.c: Don't include sys/param.h.
2952 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2953 MAXPATHLEN.
2954 * win32-low.c: Don't include sys/param.h.
2955 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2956
2957 2013-07-01 Pedro Alves <palves@redhat.com>
2958
2959 * event-loop.c: Don't check HAVE_UNISTD_H before including
2960 <unistd.h>.
2961 * gdbreplay.c: Likewise.
2962 * remote-utils.c: Likewise.
2963 * server.c: Likewise.
2964 * configure.ac: Don't check for unistd.h.
2965 * configure: Regenerate.
2966
2967 2013-06-28 Tom Tromey <tromey@redhat.com>
2968
2969 * Makefile.in (version.c): Use version.in, not
2970 common/version.in.
2971
2972 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2973
2974 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2975 * configure: Rebuild.
2976 * Makefile.in (version_host, version_target): Get from configure.
2977 (version.c): Use $(version_host) and $(version_target).
2978
2979 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2980
2981 Fix trace-status to output user name without trailing colon.
2982 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2983
2984 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2985
2986 Fix trace-status to output proper start-time and stop-time.
2987 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2988 output start time and stop time in hex as gdb expects.
2989
2990 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2991
2992 * tracepoint.c (build_traceframe_info_xml): Output trace state
2993 variables present in the trace buffer.
2994
2995 2013-06-24 Tom Tromey <tromey@redhat.com>
2996
2997 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2998 create-version.sh.
2999 (version.o): Remove.
3000 * gdbreplay.c: Include version.h.
3001 (version, host_name): Don't declare.
3002 * server.h: Include version.h.
3003 (version, host_name): Don't declare.
3004
3005 2013-06-12 Pedro Alves <palves@redhat.com>
3006
3007 * linux-x86-low.c (linux_is_elf64): Delete global.
3008 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3009 with local linux_pid_exe_is_elf_64_file use.
3010
3011 2013-06-11 Pedro Alves <palves@redhat.com>
3012
3013 * linux-low.c (regset_disabled, disable_regset): New functions.
3014 (regsets_fetch_inferior_registers)
3015 (regsets_store_inferior_registers): Use them.
3016 (initialize_regsets_info); Don't allocate the disabled_regsets
3017 array here.
3018 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3019 comment.
3020
3021 2013-06-11 Pedro Alves <palves@redhat.com>
3022
3023 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3024 xmalloc.
3025
3026 2013-06-11 Pedro Alves <palves@redhat.com>
3027
3028 * linux-x86-low.c (initialize_low_arch): Call
3029 init_registers_x32_avx_linux.
3030
3031 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3032
3033 Fix compatibility with Android Bionic.
3034 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3035 it is not empty.
3036
3037 2013-06-07 Pedro Alves <palves@redhat.com>
3038
3039 PR server/14823
3040 * Makefile.in (OBS): Add tdesc.o.
3041 (IPA_OBJS): Add tdesc-ipa.o.
3042 (tdesc-ipa.o): New rule.
3043 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3044 interface.
3045 * linux-low.c (new_inferior): Delete.
3046 (disabled_regsets, num_regsets): Delete.
3047 (linux_add_process): Adjust to set the new per-process
3048 new_inferior flag.
3049 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3050 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3051 was a stop. When calling arch_setup, switch the current inferior
3052 to the thread that got an event.
3053 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3054 (regsets_fetch_inferior_registers)
3055 (regsets_store_inferior_registers): New regsets_info parameter.
3056 Adjust to use it.
3057 (linux_register_in_regsets): New regs_info parameter. Adjust to
3058 use it.
3059 (register_addr, fetch_register, store_register): New usrregs_info
3060 parameter. Adjust to use it.
3061 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3062 parameter regs_info. Adjust to use it.
3063 (linux_fetch_registers): Get the current inferior's regs_info, and
3064 adjust to use it.
3065 (linux_store_registers): Ditto.
3066 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3067 (initialize_low): Don't initialize the target_regsets here. Call
3068 initialize_low_arch.
3069 * linux-low.h (target_regsets): Delete declaration.
3070 (struct regsets_info): New.
3071 (struct usrregs_info): New.
3072 (struct regs_info): New.
3073 (struct process_info_private) <new_inferior>: New field.
3074 (struct linux_target_ops): Delete the num_regs, regmap, and
3075 regset_bitmap fields. New field regs_info.
3076 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3077 * i387-fp.c (num_xmm_registers): Delete.
3078 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3079 calls to new interface.
3080 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3081 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3082 Infer the number of xmm registers from the regcache's target
3083 description.
3084 * i387-fp.h (num_xmm_registers): Delete.
3085 * inferiors.c (add_thread): Don't install the thread's regcache
3086 here.
3087 * proc-service.c (gregset_info): Fetch the current inferior's
3088 regs_info. Adjust to use it.
3089 * regcache.c: Include tdesc.h.
3090 (register_bytes, reg_defs, num_registers)
3091 (gdbserver_expedite_regs): Delete.
3092 (get_thread_regcache): If the thread doesn't have a regcache yet,
3093 create one, instead of aborting gdbserver.
3094 (regcache_invalidate_one): Rename to ...
3095 (regcache_invalidate_thread): ... this.
3096 (regcache_invalidate_one): New.
3097 (regcache_invalidate): Only invalidate registers of the current
3098 process.
3099 (init_register_cache): Add target_desc parameter, and use it.
3100 (new_register_cache): Ditto. Assert the target description has a
3101 non zero registers_size.
3102 (regcache_cpy): Add assertions. Adjust.
3103 (realloc_register_cache, set_register_cache): Delete.
3104 (registers_to_string, registers_from_string): Adjust.
3105 (find_register_by_name, find_regno, find_register_by_number)
3106 (register_cache_size): Add target_desc parameter, and use it.
3107 (free_register_cache_thread, free_register_cache_thread_one)
3108 (regcache_release, register_cache_size): New.
3109 (register_size): Add target_desc parameter, and use it.
3110 (register_data, supply_register, supply_register_zeroed)
3111 (supply_regblock, supply_register_by_name, collect_register)
3112 (collect_register_as_string, collect_register_by_name): Adjust.
3113 * regcache.h (struct target_desc): Forward declare.
3114 (struct regcache) <tdesc>: New field.
3115 (init_register_cache, new_register_cache): Add target_desc
3116 parameter.
3117 (regcache_invalidate_thread): Declare.
3118 (regcache_invalidate_one): Delete declaration.
3119 (regcache_release): Declare.
3120 (find_register_by_number, register_cache_size, register_size)
3121 (find_regno): Add target_desc parameter.
3122 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3123 declarations.
3124 * remote-utils.c: Include tdesc.h.
3125 (outreg, prepare_resume_reply): Adjust.
3126 * server.c: Include tdesc.h.
3127 (gdbserver_xmltarget): Delete declaration.
3128 (get_features_xml, process_serial_event): Adjust.
3129 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3130 declare.
3131 (struct process_info) <tdesc>: New field.
3132 (ipa_tdesc): Declare.
3133 * tdesc.c: New file.
3134 * tdesc.h: New file.
3135 * tracepoint.c: Include tdesc.h.
3136 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3137 (get_context_regcache): Adjust to pass ipa_tdesc down.
3138 (do_action_at_tracepoint): Adjust to get the register cache size
3139 from the context regcache's description.
3140 (traceframe_walk_blocks): Adjust to get the register cache size
3141 from the current trace frame's description.
3142 (traceframe_get_pc): Adjust to get current trace frame's
3143 description and pass it down.
3144 (gdb_collect): Adjust to get the register cache size from the
3145 IPA's description.
3146 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3147 (gdbserver_xmltarget): Delete.
3148 (initialize_low_tracepoint): Set the ipa's target description.
3149 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3150 (initialize_low_tracepoint): Set the ipa's target description.
3151 * linux-x86-low.c: Include tdesc.h.
3152 [__x86_64__] (is_64bit_tdesc): New.
3153 (ps_get_thread_area, x86_get_thread_area): Use it.
3154 (i386_cannot_store_register): Rename to ...
3155 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3156 (i386_cannot_fetch_register): Rename to ...
3157 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3158 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3159 to new interface.
3160 (target_regsets): Rename to ...
3161 (x86_regsets): ... this.
3162 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3163 interface.
3164 (x86_siginfo_fixup): Use is_64bit_tdesc.
3165 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3166 (tdesc_x32_avx_linux, tdesc_x32_linux)
3167 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3168 Declare.
3169 (x86_linux_update_xmltarget): Delete.
3170 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3171 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3172 (AMD64_LINUX_USER64_CS): New.
3173 (x86_linux_read_description): New, based on
3174 x86_linux_update_xmltarget.
3175 (same_process_callback): New.
3176 (x86_arch_setup_process_callback): New.
3177 (x86_linux_update_xmltarget): New.
3178 (x86_regsets_info): New.
3179 (amd64_linux_regs_info): New.
3180 (i386_linux_usrregs_info): New.
3181 (i386_linux_regs_info): New.
3182 (x86_linux_regs_info): New.
3183 (x86_arch_setup): Reimplement.
3184 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3185 (x86_emit_ops): Ditto.
3186 (the_low_target): Adjust. Install x86_linux_regs_info,
3187 x86_cannot_fetch_register, and x86_cannot_store_register.
3188 (initialize_low_arch): New.
3189 * linux-ia64-low.c (tdesc_ia64): Declare.
3190 (ia64_fetch_register): Adjust.
3191 (ia64_usrregs_info, regs_info): New globals.
3192 (ia64_regs_info): New function.
3193 (the_low_target): Adjust.
3194 (initialize_low_arch): New function.
3195 * linux-sparc-low.c (tdesc_sparc64): Declare.
3196 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3197 Adjust.
3198 (sparc_arch_setup): New function.
3199 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3200 (the_low_target): Adjust.
3201 (initialize_low_arch): New function.
3202 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3203 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3204 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3205 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3206 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3207 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3208 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3209 (tdesc_powerpc_isa205_vsx64l): Declare.
3210 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3211 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3212 (ppc_set_pc, ppc_get_hwcap): Adjust.
3213 (ppc_usrregs_info): Forward declare.
3214 (!__powerpc64__) ppc_regmap_adjusted: New global.
3215 (ppc_arch_setup): Adjust to the current process'es target
3216 description.
3217 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3218 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3219 (ppc_store_evrregset): Adjust.
3220 (target_regsets): Rename to ...
3221 (ppc_regsets): ... this, and make static.
3222 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3223 (ppc_regs_info): New function.
3224 (the_low_target): Adjust.
3225 (initialize_low_arch): New function.
3226 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3227 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3228 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3229 (tdesc_s390x_linux64v2): Declare.
3230 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3231 (s390_fill_gregset, s390_store_last_break): Adjust.
3232 (target_regsets): Rename to ...
3233 (s390_regsets): ... this, and make static.
3234 (s390_get_pc, s390_set_pc): Adjust.
3235 (s390_get_hwcap): New target_desc parameter, and use it.
3236 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3237 (s390_arch_setup): Adjust to set the current process'es target
3238 description. Don't adjust the regmap.
3239 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3240 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3241 (regs_info_3264): New globals.
3242 (s390_regs_info): New function.
3243 (the_low_target): Adjust.
3244 (initialize_low_arch): New function.
3245 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3246 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3247 [__mips64] (init_registers_mips_linux)
3248 (init_registers_mips_dsp_linux): Delete defines.
3249 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3250 (have_dsp): New global.
3251 (mips_read_description): New, based on mips_arch_setup.
3252 (mips_arch_setup): Reimplement.
3253 (get_usrregs_info): New function.
3254 (mips_cannot_fetch_register, mips_cannot_store_register)
3255 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3256 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3257 (target_regsets): Rename to ...
3258 (mips_regsets): ... this, and make static.
3259 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3260 (dsp_regs_info, regs_info): New globals.
3261 (mips_regs_info): New function.
3262 (the_low_target): Adjust.
3263 (initialize_low_arch): New function.
3264 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3265 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3266 Declare.
3267 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3268 (arm_read_description): New, with bits factored from
3269 arm_arch_setup.
3270 (arm_arch_setup): Reimplement.
3271 (target_regsets): Rename to ...
3272 (arm_regsets): ... this, and make static.
3273 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3274 (arm_regs_info): New function.
3275 (the_low_target): Adjust.
3276 (initialize_low_arch): New function.
3277 * linux-m68k-low.c (tdesc_m68k): Declare.
3278 (target_regsets): Rename to ...
3279 (m68k_regsets): ... this, and make static.
3280 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3281 (m68k_regs_info): New function.
3282 (m68k_arch_setup): New function.
3283 (the_low_target): Adjust.
3284 (initialize_low_arch): New function.
3285 * linux-sh-low.c (tdesc_sharch): Declare.
3286 (target_regsets): Rename to ...
3287 (sh_regsets): ... this, and make static.
3288 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3289 (sh_regs_info, sh_arch_setup): New functions.
3290 (the_low_target): Adjust.
3291 (initialize_low_arch): New function.
3292 * linux-bfin-low.c (tdesc_bfin): Declare.
3293 (bfin_arch_setup): New function.
3294 (bfin_usrregs_info, regs_info): New globals.
3295 (bfin_regs_info): New function.
3296 (the_low_target): Adjust.
3297 (initialize_low_arch): New function.
3298 * linux-cris-low.c (tdesc_cris): Declare.
3299 (cris_arch_setup): New function.
3300 (cris_usrregs_info, regs_info): New globals.
3301 (cris_regs_info): New function.
3302 (the_low_target): Adjust.
3303 (initialize_low_arch): New function.
3304 * linux-cris-low.c (tdesc_crisv32): Declare.
3305 (cris_arch_setup): New function.
3306 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3307 (cris_regs_info): New function.
3308 (the_low_target): Adjust.
3309 (initialize_low_arch): New function.
3310 * linux-m32r-low.c (tdesc_m32r): Declare.
3311 (m32r_arch_setup): New function.
3312 (m32r_usrregs_info, regs_info): New globals.
3313 (m32r_regs_info): Adjust.
3314 (initialize_low_arch): New function.
3315 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3316 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3317 (tic6x_usrregs_info): Forward declare.
3318 (tic6x_read_description): New function, based on ...
3319 (tic6x_arch_setup): ... this. Reimplement.
3320 (target_regsets): Rename to ...
3321 (tic6x_regsets): ... this, and make static.
3322 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3323 (tic6x_regs_info): New function.
3324 (the_low_target): Adjust.
3325 (initialize_low_arch): New function.
3326 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3327 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3328 (target_regsets): Rename to ...
3329 (xtensa_regsets): ... this, and make static.
3330 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3331 globals.
3332 (xtensa_arch_setup, xtensa_regs_info): New functions.
3333 (the_low_target): Adjust.
3334 (initialize_low_arch): New function.
3335 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3336 (nios2_arch_setup): Set the current process'es tdesc.
3337 (target_regsets): Rename to ...
3338 (nios2_regsets): ... this.
3339 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3340 (nios2_regs_info): New function.
3341 (the_low_target): Adjust.
3342 (initialize_low_arch): New function.
3343 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3344 (aarch64_arch_setup): Set the current process'es tdesc.
3345 (target_regsets): Rename to ...
3346 (aarch64_regsets): ... this.
3347 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3348 (aarch64_regs_info): New function.
3349 (the_low_target): Adjust.
3350 (initialize_low_arch): New function.
3351 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3352 globals.
3353 (target_regsets): Rename to ...
3354 (tile_regsets): ... this.
3355 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3356 (tile_regs_info): New function.
3357 (tile_arch_setup): Set the current process'es tdesc.
3358 (the_low_target): Adjust.
3359 (initialize_low_arch): New function.
3360 * spu-low.c (tdesc_spu): Declare.
3361 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3362 * win32-arm-low.c (tdesc_arm): Declare.
3363 (arm_arch_setup): New function.
3364 (the_low_target): Install arm_arch_setup instead of
3365 init_registers_arm.
3366 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3367 (init_windows_x86): Rename to ...
3368 (i386_arch_setup): ... this. Set `win32_tdesc'.
3369 (the_low_target): Adjust.
3370 * win32-low.c (win32_tdesc): New global.
3371 (child_add_thread): Don't create the thread cache here.
3372 (do_initial_child_stuff): Set the new process'es tdesc.
3373 * win32-low.h (struct target_desc): Forward declare.
3374 (win32_tdesc): Declare.
3375 * lynx-i386-low.c (tdesc_i386): Declare global.
3376 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3377 * lynx-low.c (lynx_tdesc): New global.
3378 (lynx_add_process): Set the new process'es tdesc.
3379 * lynx-low.h (struct target_desc): Forward declare.
3380 (lynx_tdesc): Declare global.
3381 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3382 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3383 * nto-low.c (nto_tdesc): New global.
3384 (do_attach): Set the new process'es tdesc.
3385 * nto-low.h (struct target_desc): Forward declare.
3386 (nto_tdesc): Declare.
3387 * nto-x86-low.c (tdesc_i386): Declare.
3388 (nto_x86_arch_setup): Set `nto_tdesc'.
3389
3390 2013-06-04 Gary Benson <gbenson@redhat.com>
3391
3392 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3393 to qSupported response when appropriate.
3394 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3395 with nonzero-length annex.
3396 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3397 arguments supplied in annex.
3398
3399 2013-05-31 Doug Evans <dje@google.com>
3400
3401 PR server/15594
3402 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3403 64 bits in 64-cross-32 environment.
3404
3405 2013-05-28 Pedro Alves <palves@redhat.com>
3406
3407 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3408 (aarch64-without-fpu.c): Delete rule.
3409 * configure.srv (aarch64*-*-linux*): Remove references to
3410 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3411 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3412 declaration.
3413
3414 2013-05-24 Pedro Alves <palves@redhat.com>
3415
3416 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3417 instead of strchr/decode_address. Error if the range isn't split
3418 with a ','. Don't assume there's be a ':' in the action.
3419
3420 2013-05-23 Yao Qi <yao@codesourcery.com>
3421 Pedro Alves <palves@redhat.com>
3422
3423 * linux-low.c (lwp_in_step_range): New function.
3424 (linux_wait_1): If the thread was range stepping and stopped
3425 outside the stepping range, report the stop to GDB. Otherwise,
3426 continue stepping. Add range stepping debug output.
3427 (linux_set_resume_request): Copy the step range from the resume
3428 request to the lwp.
3429 (linux_supports_range_stepping): New.
3430 (linux_target_ops) <supports_range_stepping>: Set to
3431 linux_supports_range_stepping.
3432 * linux-low.h (struct linux_target_ops)
3433 <supports_range_stepping>: New field.
3434 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3435 * linux-x86-low.c (x86_supports_range_stepping): New.
3436 (the_low_target) <supports_range_stepping>: Set to
3437 x86_supports_range_stepping.
3438 * server.c (handle_v_cont): Handle 'r' action.
3439 (handle_v_requests): Append ";r" if the target supports range
3440 stepping.
3441 * target.h (struct thread_resume) <step_range_start,
3442 step_range_end>: New fields.
3443 (struct target_ops) <supports_range_stepping>:
3444 New field.
3445 (target_supports_range_stepping): New macro.
3446
3447 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3448
3449 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3450 confusion in comment.
3451
3452 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3453
3454 * lynx-low.c (struct process_info_private): New type.
3455 (lynx_add_process): New function.
3456 (lynx_create_inferior, lynx_attach): Replace calls to
3457 add_process by calls to lynx_add_process.
3458 (lynx_resume): If PTID is null, then try using
3459 current_process()->private->last_wait_event_ptid.
3460 Add comments.
3461 (lynx_clear_inferiors): Delete. The contents of that function
3462 has been inlined in lynx_mourn;
3463 (lynx_wait_1): Save the ptid in the process's private data.
3464 (lynx_mourn): Free the process' private data. Replace call
3465 to lynx_clear_inferiors by call to clear_inferiors.
3466
3467 2013-05-17 Yao Qi <yao@codesourcery.com>
3468
3469 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3470 the right place.
3471
3472 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3473
3474 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3475 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3476 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3477 PT_TEXT_END_ADDR guards. Update comments.
3478 (linux_target_op) <read_offsets>: Conditionally define to
3479 linux_read_offsets if the target is UCLIBC and if it defines
3480 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3481
3482 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3483 Andrew Jenner <andrew@codesourcery.com>
3484
3485 * Makefile.in (SFILES): Add linux-nios2-low.c.
3486 (clean): Add action to delete nios2-linux.c.
3487 (nios2-linux.c): New rule.
3488 * configure.srv: Add nios2*-*-linux*.
3489 * linux-nios2-low.c: New.
3490
3491 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3492
3493 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3494
3495 2013-04-25 Hui Zhu <hui@codesourcery.com>
3496
3497 PR gdb/15186
3498 * ax.c (ax_printf): Add fflush.
3499
3500 2013-04-22 Tom Tromey <tromey@redhat.com>
3501
3502 * Makefile.in (SFILES): Add filestuff.c.
3503 (OBS): Add filestuff.o.
3504 (filestuff.o): New target.
3505 * config.in, configure: Rebuild.
3506 * configure.ac: Check for fdwalk, pipe2.
3507
3508 2013-04-17 Pedro Alves <palves@redhat.com>
3509
3510 * configure.ac (USE_THREAD_DB): Delete variable.
3511 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3512 Don't AC_SUBST USE_THREAD_DB.
3513 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3514 * config.in, configure: Regenerate.
3515
3516 2013-04-16 Pedro Alves <palves@redhat.com>
3517
3518 * linux-low.h (struct lwp_info) <thread_known>: Move under
3519 the USE_THREAD_DB #ifdef.
3520
3521 2013-04-16 Pedro Alves <palves@redhat.com>
3522
3523 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3524 (linux-low.o): Delete rule.
3525 * linux-low.h: Always include "gdb_thread_db.h" instead of
3526 conditionally including thread_db.h.
3527 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3528 HAVE_THREAD_DB_H.
3529
3530 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3531
3532 * Makefile.in (install-only): Fix make install regression.
3533
3534 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3535
3536 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3537 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3538 installation.
3539 * gdbserver.1: Remove.
3540
3541 2013-03-22 Pedro Alves <palves@redhat.com>
3542
3543 * linux-low.c (handle_extended_wait): Don't call
3544 linux_enable_event_reporting.
3545
3546 2013-03-15 Tony Theodore <tonyt@logyst.com>
3547
3548 PR build/9098:
3549 * Makefile.in (SHELL): Use @SHELL@.
3550
3551 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3552
3553 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3554 compiler warning.
3555
3556 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3557
3558 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3559 Remove extraneous NULL element.
3560
3561 2013-03-13 Yao Qi <yao@codesourcery.com>
3562
3563 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3564 'V' block in trace frame.
3565
3566 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3567
3568 * target.h (struct target_ops): Add btrace ops.
3569 (target_supports_btrace): New macro.
3570 (target_enable_btrace): New macro.
3571 (target_disable_btrace): New macro.
3572 (target_read_btrace): New macro.
3573 * gdbthread.h (struct thread_info): Add btrace field.
3574 * server.c: Include btrace-common.h.
3575 (handle_btrace_general_set): New function.
3576 (handle_btrace_enable): New function.
3577 (handle_btrace_disable): New function.
3578 (handle_general_set): Call handle_btrace_general_set.
3579 (handle_qxfer_btrace): New function.
3580 (struct qxfer qxfer_packets[]): Add btrace entry.
3581 * inferiors.c (remove_thread): Disable btrace.
3582 * linux-low: Include linux-btrace.h.
3583 (linux_low_enable_btrace): New function.
3584 (linux_low_read_btrace): New function.
3585 (linux_target_ops): Add btrace ops.
3586 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3587 Add srv_linux_btrace=yes.
3588 (x86_64-*-linux*): Add linux-btrace.o.
3589 Add srv_linux_btrace=yes.
3590 * configure.ac: Define HAVE_LINUX_BTRACE.
3591 * config.in: Regenerated.
3592 * configure: Regenerated.
3593
3594 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3595
3596 * server.c (handle_qxfer): Preserve error message if -3 is
3597 returned.
3598 (qxfer): Document the -3 return value.
3599
3600 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3601
3602 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3603 (linux_btrace_h): New variable.
3604 (linux-btrace.o): New rule.
3605
3606 2013-03-08 Stan Shebs <stan@codesourcery.com>
3607 Hafiz Abid Qadeer <abidh@codesourcery.com>
3608
3609 * tracepoint.c (trace_buffer_size): New global.
3610 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3611 (init_trace_buffer): Change to one-argument function. Allocate
3612 trace buffer memory.
3613 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3614 handle QTBuffer:size packet.
3615 (cmd_bigqtbuffer_size): New function.
3616 (initialize_tracepoint): Call init_trace_buffer with
3617 DEFAULT_TRACE_BUFFER_SIZE.
3618 * server.c (handle_query): Add QTBuffer:size in the
3619 supported packets.
3620
3621 2013-03-07 Yao Qi <yao@codesourcery.com>
3622
3623 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3624 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3625 of -1.
3626 (cmd_qtsp): Adjust condition. Do post increment.
3627 Set cur_action and cur_step_action back to 0.
3628
3629 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3630
3631 PR server/15236
3632 * linux-low.c (linux_write_memory): Return early success if LEN is
3633 zero.
3634
3635 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3636
3637 * configure.srv: Add x86_64-*-cygwin* as target.
3638
3639 2013-02-28 Tom Tromey <tromey@redhat.com>
3640
3641 * configure.ac: Invoke AC_SYS_LARGEFILE.
3642 * configure, config.in: Rebuild.
3643
3644 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3645
3646 * win32-low.c: Throughout, fix format strings and casts of
3647 printf-like functions to avoid type related warnings on all
3648 platforms.
3649 (get_child_debug_event): Print dwDebugEventCode as hex since
3650 that's how it's usually documented.
3651
3652 2013-02-28 Yao Qi <yao@codesourcery.com>
3653
3654 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3655 pulongest.
3656
3657 2013-02-27 Jiong Wang <jiwang@tilera.com>
3658
3659 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3660 (reg-tilegx32.c): New rule.
3661 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3662 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3663 different register info initializer according to elf class.
3664 (init_registers_tilgx32): New function. The tilegx32 register info
3665 initializer.
3666 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3667 (tile_store_gregset): Likewise.
3668
3669 2013-02-27 Yao Qi <yao@codesourcery.com>
3670
3671 * server.c (process_point_options): Print debug message when
3672 debug_threads is true.
3673
3674 2013-02-26 Yao Qi <yao@codesourcery.com>
3675
3676 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3677
3678 2013-02-19 Pedro Alves <palves@redhat.com>
3679 Kai Tietz <ktietz@redhat.com>
3680
3681 PR gdb/15161
3682
3683 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3684 instead of strtoul to extract address from packet.
3685 (process_serial_event) <'z'>: Likewise.
3686
3687 2013-02-18 Yao Qi <yao@codesourcery.com>
3688
3689 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3690
3691 2013-02-14 Pedro Alves <palves@redhat.com>
3692
3693 Plug memory leak.
3694
3695 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3696 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3697
3698 2013-02-14 Pedro Alves <palves@redhat.com>
3699
3700 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3701
3702 2013-02-14 Pedro Alves <palves@redhat.com>
3703
3704 * tracepoint.c (save_string): Delete.
3705 (add_tracepoint_action): Use savestring instead of save_string.
3706
3707 2013-02-12 Pedro Alves <palves@redhat.com>
3708
3709 * linux-xtensa-low.c: Ditto.
3710 * xtensa-xtregs.c: Ditto.
3711
3712 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3713
3714 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3715 thread_db.
3716
3717 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3718
3719 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3720 aarch64_num_wp_regs and aarch64_num_bp_regs to
3721 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3722
3723 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3724
3725 * linux-aarch64-low.c (ps_get_thread_area): Replace
3726 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3727
3728 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3729 Marcus Shawcroft <marcus.shawcroft@arm.com>
3730 Nigel Stephens <nigel.stephens@arm.com>
3731 Yufeng Zhang <yufeng.zhang@arm.com>
3732
3733 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3734 (aarch64.c, aarch64-without-fpu.c): New targets.
3735 * configure.srv (aarch64*-*-linux*): New.
3736 * linux-aarch64-low.c: New file.
3737
3738 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3739
3740 * linux-low.c (handle_extended_wait, linux_create_inferior)
3741 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3742 (dequeue_one_deferred_signal, linux_resume_one_thread)
3743 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3744 (linux_tracefork_grandchild, linux_test_for_tracefork)
3745 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3746 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3747 where the argument is 0.
3748
3749 2013-01-25 Yao Qi <yao@codesourcery.com>
3750
3751 * event-loop.c: Include "queue.h".
3752 (gdb_event_p): New typedef.
3753 (struct gdb_event) <next_event>: Remove.
3754 (event_queue): Change to QUEUE(gdb_event_p).
3755 (async_queue_event): Remove.
3756 (gdb_event_xfree): New.
3757 (initialize_event_loop): New.
3758 (process_event): Use API from QUEUE.
3759 (wait_for_event): Likewise.
3760 * server.c (main): Call initialize_event_loop.
3761 * server.h (initialize_event_loop): Declare.
3762
3763 2013-01-18 Yao Qi <yao@codesourcery.com>
3764
3765 * ax.h (struct eval_agent_expr_context): New.
3766 (gdb_eval_agent_expr): Update declaration.
3767 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3768 TFRAME. Add new argument CTX.
3769 * server.h (struct eval_agent_expr_context): Declare.
3770 (agent_mem_read, agent_tsv_read): Update declaration.
3771 (agent_mem_read_string): Likewise.
3772 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3773 (add_traceframe_block): Add new argument TPOINT.
3774 Increase TPOINT->traceframe_usage.
3775 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3776 eval_tracepoint_agent_expr.
3777 (condition_true_at_tracepoint): Likewise.
3778 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3779 (agent_mem_read_string, agent_tsv_read): Likewise.
3780
3781 2013-01-16 Yao Qi <yao@codesourcery.com>
3782
3783 * linux-low.c (linux_resume_one_lwp): Don't check
3784 'lwp->bp_reinsert != 0'.
3785
3786 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3787 Pedro Alves <palves@redhat.com>
3788
3789 * lynx-low.c (ptrace_request_to_str): Define a temporary
3790 macro and use it to simplify this function's implementation.
3791
3792 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3793
3794 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3795 sets errno.
3796
3797 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3798
3799 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3800
3801 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3802
3803 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3804
3805 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3806
3807 * lynx-low.c (lynx_resume): Use the resume_info parameter
3808 to determine the ptid for the lynx_ptrace call, unless
3809 it is equal to minus_one_ptid, in which case we use the
3810 ptid of the current_inferior.
3811 (lynx_wait_1): After having received a thread create/exit
3812 event, resume the inferior's execution using the signaling
3813 thread's ptid, rather than the old ptid.
3814
3815 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3816
3817 * lynx-low.c (lynx_resume): Delete variable ret.
3818
3819 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3820
3821 * gdbreplay.c (gdbreplay_version): Update copyright year.
3822 * server.c (gdbserver_version): Likewise.
3823
3824 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3825
3826 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3827 new thread.
3828
3829 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3830
3831 * lynx-low.c (ptrace_request_to_str): Add handling for
3832 PTRACE_GETTRACESIG.
3833
3834 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3835
3836 * lynx-low.c (lynx_attach): Delete variable new_process.
3837
3838 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3839
3840 * lynx-low.c (lynx_create_inferior): Delete variable
3841 new_process.
3842
3843 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3844
3845 * lynx-low.c (ptrace_request_to_str): Do not handle
3846 PTRACE_GETTHREADLIST if this macro does not exist.
3847
3848 2012-12-15 Yao Qi <yao@codesourcery.com>
3849
3850 * Makefile.in (OBS): Add notif.o.
3851 * notif.c, notif.h: New.
3852 * server.c: Include "notif.h".
3853 (struct vstop_notif) <next>: Remove.
3854 <base>: New field.
3855 (queue_stop_reply): Update.
3856 (push_event, send_next_stop_reply): Remove.
3857 (discard_queued_stop_replies): Update.
3858 (notif_stop): New variable.
3859 (handle_v_stopped): Remove.
3860 (handle_v_requests): Don't call handle_v_stopped. Call
3861 handle_ack_notif instead.
3862 (queue_stop_reply_callback): Call notif_event_enque instead
3863 of queue_stop_reply.
3864 (handle_status): Don't call send_next_stop_reply, call
3865 notif_write_event instead.
3866 (kill_inferior_callback): Likewise.
3867 (detach_or_kill_inferior_callback): Likewise.
3868 (main): Call initialize_notif.
3869 (process_serial_event): Call QUEUE_is_empty.
3870 (handle_target_event): Call notif_push instead of push event.
3871 * server.h (push_event): Remove declaration.
3872
3873 2012-12-10 Tom Tromey <tromey@redhat.com>
3874
3875 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3876 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3877 macros.
3878 (.c.o): Rewrite.
3879 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3880 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3881 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3882 (amd64-linux-ipa.o, ax.o): Rewrite.
3883 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3884 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3885 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3886 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3887 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3888 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3889 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3890 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3891 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3892 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3893 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3894 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3895 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3896 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3897 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3898 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3899 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3900 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3901 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3902 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3903 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3904 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3905 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3906 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3907 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3908 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3909 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3910 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3911 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3912 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3913 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3914 (reg-tilegx.o): Remove.
3915 (all_object_files): New macro.
3916 Include .deps files.
3917 * aclocal.m4, configure: Rebuild.
3918 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3919 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3920 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3921
3922 2012-12-05 Tom Tromey <tromey@redhat.com>
3923
3924 PR gdb/14917:
3925 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3926
3927 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3928
3929 * configure.ac: Check for linux/perf_event.h.
3930 * config.in: Regenerated.
3931 * configure: Regenerated.
3932
3933 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3934
3935 * hostio.c (handle_readlink): Decrease buffer size
3936 parameter passed to readlink by one byte.
3937
3938 2012-11-26 Yao Qi <yao@codesourcery.com>
3939
3940 * configure.ac (build_warnings): Append '-Wempty-body'.
3941 * configure: Regenerated.
3942 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3943 body.
3944
3945 2012-11-15 Pierre Muller <muller@sourceware.org>
3946
3947 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3948 * config.in: Regenerate.
3949 * configure: Regenerate.
3950 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3951 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3952 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3953 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3954 header.
3955 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3956 instead of <sys/wait.h> header.
3957 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3958
3959 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3960
3961 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3962 (various make rules): Remove -DGDBSERVER
3963
3964 2012-11-09 Yao Qi <yao@codesourcery.com>
3965
3966 * spu-low.c (current_ptid): Move it to ..
3967 * gdbthread.h: ... here. New.
3968 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3969 * server.c (myresume, process_serial_event): Likewise.
3970 * thread-db.c (thread_db_find_new_threads): Likewise.
3971 * tracepoint.c (run_inferior_command): Likewise.
3972
3973 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3974
3975 * server.c (handle_search_memory_1): Include access length in
3976 warning message.
3977
3978 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3979
3980 * linux-crisv32-low.c: Fix compile errors.
3981
3982 2012-09-04 Yao Qi <yao@codesourcery.com>
3983
3984 * tracepoint.c (cmd_qtsv): Adjust debug message.
3985 Don't check CUR_TPOINT.
3986
3987 2012-08-28 Yao Qi <yao@codesourcery.com>
3988
3989 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3990 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3991 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3992 Remove declarations of xmalloc, xreallloc, xstrdup and
3993 freeargv.
3994 * Makefile.in (libiberty_h): New.
3995 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3996 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3997
3998 2012-08-23 Yao Qi <yao@codesourcery.com>
3999
4000 * server.h: Remove declaration of 'xsnprintf'.
4001
4002 2012-08-22 Keith Seitz <keiths@redhat.com>
4003
4004 * server.h: Include build-gnulib-gbserver/config.h.
4005 * gdbreplay.c: Likewise.
4006
4007 2012-08-08 Doug Evans <dje@google.com>
4008
4009 * Makefile.in (SFILES): Add gdb_vecs.c.
4010 (OBS): Add gdb_vecs.o.
4011 (gdb_vecs_h, host_defs_h): New variables.
4012 (thread-db.o): Add $(gdb_vecs_h) dependency.
4013 (gdb_vecs.o): New rule.
4014 * thread-db.c: #include "gdb_vecs.h".
4015 (thread_db_load_search): Use a vector to iterate over path elements.
4016 Handle text appearing after "$pdir".
4017
4018 * configure.ac: Add check for strstr.
4019 * config.in: Regenerate.
4020 * configure: Regenerate.
4021
4022 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4023
4024 * hostio.c (handle_pread): If pread fails, fall back to attempting
4025 lseek/read.
4026 (handle_pwrite): Likewise for pwrite.
4027
4028 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4029
4030 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4031 between unsupported TYPE and unimplementable ADDR/LEN combination.
4032 (arm_insert_point): Act on new return value.
4033
4034 2012-07-31 Pedro Alves <palves@redhat.com>
4035
4036 * server.c (process_point_options): Only skip tokens if we find
4037 one that is unrecognized. Don't treat 'X' specially while
4038 skipping unrecognized tokens.
4039
4040 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4041
4042 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4043 to 4-byte-align HW breakpoint addresses for Thumb.
4044
4045 2012-07-27 Yao Qi <yao@codesourcery.com>
4046
4047 PR remote/14161.
4048
4049 * server.h: Declare gdb_agent_about_to_close.
4050 * target.c (kill_inferior): Include "agent.h".
4051 New. Send command 'kill'.
4052 * target.h (kill_inferior): Removed macro.
4053 * tracepoint.c (gdb_agent_about_to_close): New.
4054 (gdb_agent_helper_thread): Handle command 'close'.
4055 Wait endlessly until the inferior stops.
4056 Install gdb_agent_remove_socket to atexit hook.
4057 (agent_socket_name): New static variable.
4058 (gdb_agent_socket_init): Replace local variable 'name' with
4059 'agent_socket_name'.
4060 (gdb_agent_remove_socket): New.
4061
4062 2012-07-27 Yao Qi <yao@codesourcery.com>
4063
4064 * server.c (process_point_options): Stop at 'X' when parsing.
4065
4066 2012-07-19 Michael Eager <eager@eagercon.com>
4067
4068 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4069 to hw_execute.
4070 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4071 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4072 hardware breakpoint.
4073
4074 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4075
4076 * gdbserver/linux-low.c (initialize_low): Call
4077 linux_ptrace_init_warnings.
4078
4079 2012-07-02 Doug Evans <dje@google.com>
4080
4081 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4082 pointer to int.
4083
4084 2012-07-02 Stan Shebs <stan@codesourcery.com>
4085
4086 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4087 (ax.o): Add it to build rule.
4088 (ax-ipa.o): Ditto.
4089 (OBS): Add format.o.
4090 (IPA_OBS): Add format.o.
4091 * server.c (handle_query): Claim support for breakpoint commands.
4092 (process_point_options): Add command case.
4093 (process_serial_event): Leave running if there are printfs in
4094 effect.
4095 * mem-break.h (any_persistent_commands): Declare.
4096 (add_breakpoint_commands): Declare.
4097 (gdb_no_commands_at_breakpoint): Declare.
4098 (run_breakpoint_commands): Declare.
4099 * mem-break.c (struct point_command_list): New struct.
4100 (struct breakpoint): New field command_list.
4101 (any_persistent_commands): New function.
4102 (add_commands_to_breakpoint): New function.
4103 (add_breakpoint_commands): New function.
4104 (gdb_no_commands_at_breakpoint): New function.
4105 (run_breakpoint_commands): New function.
4106 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4107 locally.
4108 * ax.c: Include format.h.
4109 (ax_printf): New function.
4110 (gdb_eval_agent_expr): Add printf opcode.
4111
4112 2012-06-13 Yao Qi <yao@codesourcery.com>
4113
4114 * server.c (start_inferior): Remove duplicated writes to fields
4115 'last_resume_kind' and 'last_status' of 'current_inferior'.
4116
4117 2012-06-12 Yao Qi <yao@codesourcery.com>
4118 Pedro Alves <palves@redhat.com>
4119
4120 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4121 comment.
4122 * server.c (handle_v_cont): Extend comment.
4123
4124 2012-06-11 Yao Qi <yao@codesourcery.com>
4125
4126 * linux-low.c (linux_attach): Add 'static'.
4127
4128 2012-06-06 Yao Qi <yao@codesourcery.com>
4129
4130 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4131
4132 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4133
4134 Fix gcc -flto compilation warning.
4135 * server.c (main): Make variable multi_mode and attach volatile.
4136
4137 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4138
4139 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4140 if the platform doesn't know about it.
4141
4142 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4143
4144 * Makefile.in (SFILES): Add linux-tile-low.c.
4145 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4146 * configure.srv: Handle tilegx-*-linux*.
4147 * linux-tile-low.c: New file.
4148
4149 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4150
4151 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4152
4153 2012-05-24 Pedro Alves <palves@redhat.com>
4154
4155 PR gdb/7205
4156
4157 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4158
4159 2012-05-24 Pedro Alves <palves@redhat.com>
4160
4161 PR gdb/7205
4162
4163 Replace target_signal with gdb_signal throughout.
4164
4165 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4166
4167 * linux-low.c (linux_store_registers): Avoid the copying sequence
4168 when no data has been retrieved by ptrace.
4169
4170 2012-05-22 Will Deacon <will.deacon@arm.com>
4171
4172 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4173 Include asm/ptrace.h.
4174 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4175 already defined.
4176
4177 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4178
4179 * linux-low.c (linux_store_registers): Don't re-retrieve data
4180 with ptrace that has already been obtained from /proc. Always
4181 copy any data retrieved with ptrace to the buffer supplied.
4182
4183 2012-05-11 Yao Qi <yao@codesourcery.com>
4184 Pedro Alves <palves@redhat.com>
4185
4186 * linux-low.c (enum stopping_threads_kind): New.
4187 (stopping_threads): Change type to `enum stopping_threads_kind'.
4188 (handle_extended_wait): If stopping and suspending threads, leave
4189 the new_lwp suspended too.
4190 (linux_wait_for_event): Adjust.
4191 (stop_all_lwps): Set `stopping_threads' to
4192 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4193 whether we're suspending threads or just stopping them. Assert no
4194 recursion happens.
4195
4196 2012-04-29 Yao Qi <yao@codesourcery.com>
4197
4198 * server.h: Move some code to ...
4199 * gdbthread.h: ... here. New.
4200 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4201 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4202 (nto-low.o, win32-low.o): Likewise.
4203 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4204 * regcache.c, remote-utils.c, server.c: Likewise.
4205 * target.c, tracepoint.c, win32-low.c: Likewise.
4206
4207 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4208
4209 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4210 (PTRACE_ARG4_TYPE): Likewise.
4211 (PTRACE_XFER_TYPE): Likewise.
4212 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4213 ptrace to PTRACE_ARG3_TYPE.
4214 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4215 (PTRACE_ARG4_TYPE): Likewise.
4216 (PTRACE_XFER_TYPE): Likewise.
4217 (linux_detach_one_lwp): Cast fourth argument of
4218 ptrace to long then PTRACE_ARG4_TYPE.
4219 (regsets_fetch_inferior_registers): Cast third argument of
4220 ptrace to long then PTRACE_ARG3_TYPE.
4221 (regsets_store_inferior_registers): Likewise.
4222
4223 2012-04-20 Pedro Alves <palves@redhat.com>
4224
4225 * configure: Regenerate.
4226
4227 2012-04-19 Pedro Alves <palves@redhat.com>
4228
4229 * Makefile.in (GNULIB_BUILDDIR): New.
4230 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4231 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4232 (all, install-only, uninstall, clean-info, all-lib, clean): No
4233 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4234 (maintainer-clean realclean distclean): Use subdir_do.
4235 (subdir_do): New.
4236 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4237 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4238 * acinclude.m4: Include acx_configure_dir.m4.
4239 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4240 calls. Call AC_PROG_RANLIB. Configure gnulib using
4241 ACX_CONFIGURE_DIR.
4242 (GNULIB): New.
4243 (GNULIB_STDINT_H): Adjust.
4244 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4245 * gdbreplay.c: Include build-gnulib/config.h.
4246 * server.h: Likewise.
4247 * aclocal.m4: Regenerate.
4248 * config.in: Regenerate.
4249 * configure: Regenerate.
4250
4251 2012-04-19 Pedro Alves <palves@redhat.com>
4252
4253 * Makefile.in (LIBGNU, INCGNU): Adjust.
4254 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4255 (all, install-only, uninstall, clean-info, all-lib, clean)
4256 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4257 * configure.ac: Adjust AC_OUTPUT output.
4258 * aclocal.m4: Regenerate.
4259 * configure: Regenerate.
4260
4261 2012-04-19 Pedro Alves <palves@redhat.com>
4262
4263 * Makefile.in (generated_files): New.
4264 (server_h): Remove the explicit dependency on config.h, and depend
4265 on $generated_files.
4266
4267 2012-04-19 Pedro Alves <palves@redhat.com>
4268
4269 * Makefile.in (INCGNU): Add -Ignulib.
4270
4271 2012-04-19 Pedro Alves <palves@redhat.com>
4272
4273 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4274 (INCGNU): ... this, and spell out -I here.
4275 (GNULIB_LIB): Rename to ...
4276 (LIBGNU): ... this.
4277 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4278
4279 2012-04-19 Pedro Alves <palves@redhat.com>
4280
4281 * config.in: Regenerate.
4282
4283 2012-04-19 Pedro Alves <palves@redhat.com>
4284
4285 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4286 * server.h (memmem): Remove declaration.
4287 * config.in: Regenerate.
4288 * configure: Regenerate.
4289
4290 2012-04-19 Yao Qi <yao@codesourcery.com>
4291
4292 * Makefile.in (SFILES): Add common/vec.c.
4293 (OBS): Add vec.o.
4294 (vec.o): New rule.
4295
4296 2012-04-19 Yao Qi <yao@codesourcery.com>
4297
4298 * remote-utils.c (prepare_resume_reply): Replace with macro
4299 target_core_of_thread.
4300 * server.c (handle_qxfer_threads_proper): Likewise.
4301 * target.h (traget_core_of_thread): New macro.
4302
4303 2012-04-18 Pedro Alves <palves@redhat.com>
4304
4305 * aclocal.m4: Regenerate.
4306 * configure: Regenerate.
4307
4308 2012-04-16 Yao Qi <yao@codesourcery.com>
4309
4310 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4311 duplicated on address.
4312
4313 2012-04-16 Yao Qi <yao@codesourcery.com>
4314
4315 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4316 (struct tracepoint_action_ops) <send>: New field.
4317 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4318 (agent_expr_send, x_tracepoint_action_send): New.
4319 (l_tracepoint_action_send): New.
4320 (cmd_qtdp): Download and install tracepoint
4321 according to `use_agent'.
4322 (run_inferior_command): Add one more parameter `len'.
4323 Update callers.
4324 (tracepoint_send_agent): New.
4325 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4326
4327 2012-04-16 Yao Qi <yao@codesourcery.com>
4328
4329 * tracepoint.c (download_tracepoints): Moved to ...
4330 (cmd_qtstart): ... here.
4331
4332 2012-04-14 Yao Qi <yao@codesourcery.com>
4333
4334 * tracepoint.c: Include inttypes.h.
4335 (struct collect_memory_action): Use sized types.
4336 (struct tracepoint): Likewise.
4337 (cmd_qtdp, stop_tracing): Update print specifiers.
4338 (cmd_qtp, response_tracepoint): Likewise.
4339 (collect_data_at_tracepoint): Likewise.
4340 (collect_data_at_step): Likewise.
4341
4342 2012-04-14 Yao Qi <yao@codesourcery.com>
4343
4344 Import gnulib module inttypes.
4345 * aclocal.m4, config.in, configure: Regenerated.
4346
4347 2012-04-14 Yao Qi <yao@codesourcery.com>
4348
4349 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4350 Makefile and config.status at last.
4351
4352 2012-04-13 Yao Qi <yao@codesourcery.com>
4353
4354 * tracepoint.c: Include stdint.h unconditionally.
4355
4356 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4357
4358 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4359 on BFD_HAVE_SYS_PROCFS_TYPE.
4360 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4361 * configure: Regenerate.
4362 * config.in: Likewise.
4363
4364 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4365
4366 * Makefile.in (clean): Also remove x32.c x32-linux.c
4367 x32-avx.c x32-avx-linux.c.
4368 (x32.o): New target.
4369 (x32.c): Likewise.
4370 (x32-linux.o): Likewise.
4371 (x32-linux.c): Likewise.
4372 (x32-avx.o): Likewise.
4373 (x32-avx.c): Likewise.
4374 (x32-avx-linux.o): Likewise.
4375 (x32-avx-linux.c): Likewise.
4376
4377 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4378 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4379 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4380 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4381 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4382 i386/x32-avx-linux.xml.
4383
4384 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4385 (init_registers_x32_avx_linux): Likwise.
4386 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4387 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4388
4389 2012-04-13 Pedro Alves <palves@redhat.com>
4390
4391 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4392 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4393 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4394 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4395 the sub-make.
4396
4397 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4398
4399 * linux-x86-low.c (compat_x32_clock_t): New.
4400 (compat_x32_siginfo_t): Likewise.
4401 (compat_x32_siginfo_from_siginfo): Likewise.
4402 (siginfo_from_compat_x32_siginfo): Likewise.
4403 (linux_is_elf64): Likewise.
4404 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4405 and siginfo_from_compat_x32_siginfo for x32.
4406 (x86_arch_setup): Set linux_is_elf64.
4407
4408 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4409
4410 PR gdb/13969
4411 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4412 e_machine field.
4413 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4414 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4415 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4416 compatible with process.
4417
4418 2012-04-12 Yao Qi <yao@codesourcery.com>
4419
4420 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4421 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4422 (install-only, install-info, clean): Handle sub dir gnulib.
4423 (all-lib, am--refresh): New targets.
4424 (memmem.o): Remove target.
4425 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4426 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4427 (AC_REPLACE_FUNCS): Remove memmem.
4428 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4429 (AC_OUTPUT): Generate Makefile in gnulib/.
4430 * aclocal.m4, config.in, configure: Regenerated.
4431
4432 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4433
4434 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4435
4436 2012-04-05 Pedro Alves <palves@redhat.com>
4437
4438 -Werror=strict-aliasing
4439
4440 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4441 pointer.
4442
4443 2012-04-04 Pedro Alves <palves@redhat.com>
4444
4445 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4446 (sparc_store_gregset_from_stack, sparc_store_gregset)
4447 (sparc_breakpoint_at): Fix formatting.
4448
4449 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4450
4451 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4452 are available.
4453 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4454 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4455 * config.in: Regenerate.
4456 * configure: Likewise.
4457
4458 2012-03-29 Pedro Alves <palves@redhat.com>
4459
4460 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4461 Correct ptrace arguments.
4462
4463 2012-03-28 Pedro Alves <palves@redhat.com>
4464
4465 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4466 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4467 (IA64_FR1_REGNUM): New defines.
4468 (ia64_fetch_register): New.
4469 (the_low_target): Install it.
4470 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4471 field.
4472 * linux-low.c (linux_fetch_registers): Try the
4473 the_low_target.fetch_register hook first.
4474
4475 * linux-arm-low.c (the_low_target): Adjust.
4476 * linux-bfin-low.c (the_low_target): Adjust.
4477 * linux-cris-low.c (the_low_target): Adjust.
4478 * linux-crisv32-low.c (the_low_target): Adjust.
4479 * linux-m32r-low.c (the_low_target): Adjust.
4480 * linux-m68k-low.c (the_low_target): Adjust.
4481 * linux-mips-low.c (the_low_target): Adjust.
4482 * linux-ppc-low.c (the_low_target): Adjust.
4483 * linux-s390-low.c (the_low_target): Adjust.
4484 * linux-sh-low.c (the_low_target): Adjust.
4485 * linux-sparc-low.c (the_low_target): Adjust.
4486 * linux-tic6x-low.c (the_low_target): Adjust.
4487 * linux-x86-low.c (the_low_target): Adjust.
4488 * linux-xtensa-low.c (the_low_target): Adjust.
4489
4490 2012-03-26 Pedro Alves <palves@redhat.com>
4491
4492 * server.c (handle_qxfer_libraries): Don't bail early if
4493 the_target->qxfer_libraries_svr4 is not NULL.
4494
4495 2012-03-26 Pedro Alves <palves@redhat.com>
4496
4497 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4498
4499 2012-03-23 Pedro Alves <palves@redhat.com>
4500
4501 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4502 "library-list-svr4" element's start tag when the the DSO list is
4503 empty.
4504
4505 2012-03-23 Pedro Alves <palves@redhat.com>
4506
4507 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4508 a variable whose type size is the same as the inferior's pointer
4509 size.
4510
4511 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4512
4513 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4514 struct siginfo.
4515 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4516 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4517 * linux-low.h: Include <signal.h>.
4518 (struct siginfo): Remove forward declaration.
4519 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4520 struct siginfo.
4521
4522 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4523
4524 * .gitignore: Ignore more files.
4525
4526 2012-03-19 Pedro Alves <palves@redhat.com>
4527 Jan Kratochvil <jan.kratochvil@redhat.com>
4528
4529 * server.c (cont_thread, general_thread): Add describing comments.
4530 (start_inferior): Clear `cont_thread'.
4531 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4532 of a process.
4533
4534 2012-03-15 Yao Qi <yao@codesourcery.com>
4535
4536 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4537 handling to ...
4538 (cmd_qtdp): ... here.
4539
4540 2012-03-15 Yao Qi <yao@codesourcery.com>
4541
4542 * tracepoint.c (struct tracepoint_action_ops): New.
4543 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4544 (m_tracepoint_action_download): New.
4545 (r_tracepoint_action_download): New.
4546 (x_tracepoint_action_download): New.
4547 (l_tracepoint_action_download): New.
4548 (add_tracepoint_action): Install `action->ops' according type.
4549 (download_tracepoint_1): Move code `download' function pointer
4550 of various tracepoint_action_ops.
4551
4552 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4553
4554 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4555 linux_ptrace_attach_warnings.
4556
4557 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4558
4559 * Makefile.in (linux-ptrace.o): New.
4560 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4561 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4562 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4563 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4564 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4565 of these targets.
4566 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4567
4568 2012-03-08 Yao Qi <yao@codesourcery.com>
4569 Pedro Alves <palves@redhat.com>
4570
4571 Fix PR server/13392.
4572 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4573 offset of JMP insn.
4574 * tracepoint.c (remove_tracepoint): New.
4575 (cmd_qtdp): Call remove_tracepoint when failed to install.
4576
4577 2012-03-07 Pedro Alves <palves@redhat.com>
4578
4579 * linux-low.c (get_detach_signal): New.
4580 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4581 Pass on pending signals to PTRACE_DETACH. Check the result of the
4582 ptrace call.
4583 * server.c (program_signals, program_signals_p): New.
4584 (handle_general_set): Handle QProgramSignals.
4585 * server.h (program_signals, program_signals_p): Declare.
4586
4587 2012-03-05 Pedro Alves <palves@redhat.com>
4588 Jan Kratochvil <jan.kratochvil@redhat.com>
4589
4590 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4591 New comment why.
4592
4593 2012-03-03 Yao Qi <yao@codesourcery.com>
4594
4595 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4596 agent_look_up_symbols.
4597
4598 2012-03-03 Yao Qi <yao@codesourcery.com>
4599
4600 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4601 (linux-x86-low.o): Likewise.
4602 * server.h: Remove in_process_agent_loaded.
4603 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4604 common/agent.c.
4605 Update callers.
4606
4607 2012-03-03 Yao Qi <yao@codesourcery.com>
4608
4609 * tracepoint.c (gdb_agent_capability): New global.
4610 (in_process_agent_loaded_ust): Renamed to
4611 `in_process_agent_supports_ust'.
4612 Update callers.
4613 (in_process_agent_supports_ust): Call agent_capability_check.
4614 (clear_installed_tracepoints): Assert that agent supports
4615 agent.
4616
4617 2012-03-03 Yao Qi <yao@codesourcery.com>
4618
4619 * linux-low.c (linux_supports_agent): New.
4620 (linux_target_ops): Initialize field `supports_agent' with
4621 linux_supports_agent.
4622 * target.h (struct target_ops) <supports_agent>: New.
4623 (target_supports_agent): New macro.
4624 * server.c (handle_general_set): Handle packet 'QAgent'.
4625 (handle_query): Send `QAgent+'.
4626 * Makefile.in (server.o): Depends on agent.h.
4627
4628 2012-03-03 Yao Qi <yao@codesourcery.com>
4629
4630 * Makefile.in (OBS): Add agent.o.
4631 Add new rule for agent.o.
4632 Track dependence of tracepoint.c on agent.h.
4633 * tracepoint.c (run_inferior_command_1):
4634 (run_inferior_command): Call agent_run_command.
4635 (gdb_ust_connect_sync_socket): Deleted. Move it to
4636 common/agent.c.
4637 (resume_thread, stop_thread): Likewise.
4638 (gdb_ust_socket_init): Renamed to ...
4639 (gdb_agent_socket_init): ... New.
4640 (gdb_ust_thread): Renamed to ...
4641 (gdb_agent_helper_thread): ... New.
4642 (gdb_ust_init): Move some code to ...
4643 (gdb_agent_init): ... here. New.
4644 [HAVE_UST]: Call gdb_ust_init.
4645 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4646 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4647 * config.in, configure: Regenerated.
4648
4649 2012-03-02 Pedro Alves <palves@redhat.com>
4650
4651 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4652 * linux-low.c (struct simple_pid_list): New.
4653 (stopped_pids): New a struct simple_pid_list pointer.
4654 (add_to_pid_list, pull_pid_from_list): New.
4655 (handle_extended_wait): Don't assume the first signal new children
4656 report is SIGSTOP. Adjust call to pull_pid_from_list.
4657 (linux_wait_for_lwp): Adjust.
4658
4659 2012-03-02 Yao Qi <yao@codesourcery.com>
4660
4661 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4662 debug log.
4663
4664 2012-03-02 Yao Qi <yao@codesourcery.com>
4665
4666 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4667 `stop_pc' and `tpoint'. Update caller.
4668
4669 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4670
4671 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4672 * linux-low.c (use_linux_regsets): New macro.
4673 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4674 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4675 (linux_register_in_regsets): New function.
4676 (usr_fetch_inferior_registers): Skip registers covered by
4677 regsets.
4678 (usr_store_inferior_registers): Likewise.
4679 (usr_fetch_inferior_registers): New macro.
4680 (usr_store_inferior_registers): Likewise.
4681 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4682 (linux_store_registers): Likewise.
4683 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4684 prototype.
4685 (init_registers_mips64_dsp_linux): Likewise.
4686 (init_registers_mips_linux): New macro.
4687 (init_registers_mips_dsp_linux): Likewise.
4688 (mips_dsp_num_regs): Likewise.
4689 (DSP_BASE, DSP_CONTROL): New fallback macros.
4690 (mips_base_regs): New macro.
4691 (mips_regmap): Use it. Fix the size.
4692 (mips_dsp_regmap): New variable.
4693 (mips_dsp_regset_bitmap): Likewise.
4694 (mips_arch_setup): New function.
4695 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4696 than mips_regmap.
4697 (mips_cannot_store_register): Likewise.
4698 (the_low_target): Update .arch_setup, .num_regs and .regmap
4699 initializers. Add .regset_bitmap initializer.
4700 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4701 initializer.
4702 * linux-bfin-low.c (the_low_target): Likewise.
4703 * linux-cris-low.c (the_low_target): Likewise.
4704 * linux-crisv32-low.c (the_low_target): Likewise.
4705 * linux-ia64-low.c (the_low_target): Likewise.
4706 * linux-m32r-low.c (the_low_target): Likewise.
4707 * linux-m68k-low.c (the_low_target): Likewise.
4708 * linux-ppc-low.c (the_low_target): Likewise.
4709 * linux-s390-low.c (the_low_target): Likewise.
4710 * linux-sh-low.c (the_low_target): Likewise.
4711 * linux-sparc-low.c (the_low_target): Likewise.
4712 * linux-tic6x-low.c (the_low_target): Likewise.
4713 * linux-x86-low.c (the_low_target): Likewise.
4714 * linux-xtensa-low.c (the_low_target): Likewise.
4715 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4716 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4717 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4718 srv_xmlfiles.
4719 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4720 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4721
4722 2012-02-29 Yao Qi <yao@codesourcery.com>
4723 Pedro Alves <palves@redhat.com>
4724
4725 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4726 `step_over_finished' is true.
4727
4728 2012-02-27 Pedro Alves <palves@redhat.com>
4729
4730 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4731 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4732
4733 2012-02-27 Pedro Alves <palves@redhat.com>
4734
4735 PR server/9684
4736 * linux-low.c (pid_is_stopped): New.
4737 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4738
4739 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4740
4741 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4742 of conditions.
4743
4744 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4745
4746 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4747
4748 2012-02-24 Luis Machado <lgustavo@codesourcery>
4749
4750 * server.c (handle_query): Advertise support for target-side
4751 breakpoint condition evaluation.
4752 (process_point_options): New function.
4753 (process_serial_event): When inserting a breakpoint, check for
4754 a target-side condition that should be evaluated.
4755
4756 * mem-break.c: Include regcache.h and ax.h.
4757 (point_cond_list_t): New data structure.
4758 (breakpoint) <cond_list>: New field.
4759 (find_gdb_breakpoint_at): Make non-static.
4760 (delete_gdb_breakpoint_at): Clear any target-side
4761 conditions.
4762 (clear_gdb_breakpoint_conditions): New function.
4763 (add_condition_to_breakpoint): Likewise.
4764 (add_breakpoint_condition): Likewise.
4765 (gdb_condition_true_at_breakpoint): Likewise.
4766 (gdb_breakpoint_here): Return result directly instead
4767 of going through a local variable.
4768
4769 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4770 (clear_gdb_breakpoint_conditions): Likewise.
4771 (add_breakpoint_condition): Likewise.
4772 (gdb_condition_true_at_breakpoint): Likewise.
4773
4774 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4775 (need_step_over_p): Take target-side breakpoint condition into
4776 consideration.
4777
4778 2012-02-24 Luis Machado <lgustavo@codesourcery>
4779
4780 * server.h: Include tracepoint.h.
4781 (agent_mem_read, agent_get_trace_state_variable_value,
4782 agent_set_trace_state_variable_value,
4783 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4784 get_set_tsv_func_addr): New prototypes.
4785
4786 * ax.h: New include file.
4787 * ax.c: New source file.
4788
4789 * tracepoint.c: Include ax.h.
4790 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4791 agent_expr, eval_result_type): Move to ax.h.
4792 (parse_agent_expr): Rename to ...
4793 (gdb_parse_agent_expr): ... this, make it non-static and move
4794 to ax.h.
4795 (unparse_agent_expr) Rename to ...
4796 (gdb_unparse_agent_expr): ... this, make it non-static and move
4797 to ax.h.
4798 (eval_agent_expr): Rename to ...
4799 (eval_tracepoint_agent_expr): ... this.
4800 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4801 forward declarations.
4802 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4803 (agent_get_trace_state_variable_value): New function.
4804 (agent_set_trace_state_variable_value): New function.
4805 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4806 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4807 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4808 (condition_true_at_tracepoint): Likewise.
4809 (parse_agent_expr): Rename to ...
4810 (gdb_parse_agent_expr): ... this and move to ax.c.
4811 (unparse_agent_expr): Rename to ...
4812 (gdb_unparse_agent_expr): ... this and move to ax.c.
4813 (gdb_agent_op_name): Move to ax.c.
4814 (eval_agent_expr): Rename to ...
4815 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4816 and move to ax.c.
4817 (eval_tracepoint_agent_expr): New function.
4818 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4819 non-static.
4820 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4821 ax.c.
4822 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4823 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4824 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4825 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4826 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4827 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4828 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4829 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4830 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4831 (compile_bytecodes): Remove forward declaration.
4832 (is_goto_target): Move to ax.c.
4833 (compile_bytecodes): Move to ax.c and call
4834 agent_get_trace_state_variable_value (...) and
4835 agent_set_trace_state_variable_value (...).
4836
4837 * Makefile.in: Update ax.c and IPA dependencies.
4838
4839 2012-02-24 Pedro Alves <palves@redhat.com>
4840
4841 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4842 (cmd_bigqtbuffer_circular): ... this. Only handle
4843 'QTBuffer:circular:'.
4844 (handle_tracepoint_general_set): Adjust.
4845
4846 2012-02-16 Yao Qi <yao@codesourcery.com>
4847
4848 * inferiors.c: Move code to ...
4849 * dll.c: .... here. New.
4850 * server.h: Declare clear_dlls.
4851 * Makefile.in (SFILES): Add dll.c.
4852 (OBS): Add dll.o
4853 (dll.o): New rule.
4854
4855 2012-02-11 Yao Qi <yao@codesourcery.com>
4856
4857 * server.c: (handle_monitor_command): Add a new parameter
4858 `own_buf'.
4859 (handle_query): Update caller.
4860
4861 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4862
4863 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4864 * configure, config.in: Regenerate.
4865 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4866 is not defined.
4867
4868 2012-02-02 Pedro Alves <palves@redhat.com>
4869
4870 Try SIGKILL first, then PTRACE_KILL.
4871 * linux-low.c (linux_kill_one_lwp): New.
4872 (linux_kill_one_lwp): Rename to ...
4873 (kill_one_lwp_callback): ... this. Use the new
4874 linux_kill_one_lwp.
4875
4876 2012-02-02 Pedro Alves <palves@redhat.com>
4877
4878 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4879 inferior.
4880
4881 2012-01-27 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4884 (elf_64_file_p): Make static.
4885 (linux_pid_exe_is_elf_64_file): New.
4886 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4887 Delete declarations.
4888 (linux_pid_exe_is_elf_64_file): Declare.
4889 * linux-x86-low.c (x86_arch_setup): Use
4890 linux_pid_exe_is_elf_64_file.
4891
4892 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4893
4894 * linux-low.c (linux_wait_for_event_1): Rename to ...
4895 (linux_wait_for_event): ... here and merge it with former
4896 linux_wait_for_event - new variable wait_ptid, use it.
4897 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4898
4899 2012-01-23 Pedro Alves <palves@redhat.com>
4900
4901 * server.c (main): Avoid yet another case of infinite loop while
4902 detaching/killing after a longjmp.
4903
4904 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4905
4906 Code cleanup.
4907 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4908
4909 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4910
4911 * hostio.c (handle_readlink): New function.
4912 (handle_vFile): Call it to handle "vFile:readlink" packets.
4913
4914 2012-01-20 Pedro Alves <palves@redhat.com>
4915 Ulrich Weigand <ulrich.weigand@linaro.org>
4916
4917 * server.c (handle_v_requests): Only support vAttach and vRun to
4918 start multiple processes when in extended protocol mode.
4919
4920 2012-01-17 Pedro Alves <palves@redhat.com>
4921
4922 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4923 memalign plus mprotect to allocate the scratch buffer.
4924
4925 2012-01-13 Pedro Alves <palves@redhat.com>
4926
4927 * server.c (attach_inferior): Clear `cont_thread'.
4928
4929 2012-01-13 Pedro Alves <palves@redhat.com>
4930
4931 * server.c (main): Avoid infinite loop while detaching/killing
4932 after a longjmp.
4933
4934 2012-01-09 Doug Evans <dje@google.com>
4935
4936 * server.c (start_inferior): Set last_ptid in --wrapper case.
4937
4938 2012-01-06 Yao Qi <yao@codesourcery.com>
4939
4940 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4941 defined.
4942 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4943
4944 2012-01-04 Yao Qi <yao@codesourcery.com>
4945
4946 * tracepoint.c (cmd_qtdp): Print debug message
4947 for static tracepoint.
4948
4949 2012-01-04 Yao Qi <yao@codesourcery.com>
4950
4951 * tracepoint.c (trace_vdebug): Differentiate debug message
4952 between gdbserver and IPA.
4953
4954 2012-01-03 Yao Qi <yao@codesourcery.com>
4955
4956 * tracepoint.c (tracepoint_was_hit): Don't collect for
4957 static tracepoint.
4958
4959 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4960
4961 * terminal.h: Reformat copyright header.
4962
4963 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4964
4965 * server.c (gdbserver_version): Update copyright year.
4966 * gdbreplay.c (gdbreplay_version): Likewise.
4967
4968 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4969
4970 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4971
4972 Revert:
4973 2011-12-18 Hui Zhu <teawater@gmail.com>
4974 * linux-low.c (linux_create_inferior): Save return value to ret.
4975
4976 2011-12-18 Hui Zhu <teawater@gmail.com>
4977
4978 * linux-low.c (linux_create_inferior): Save return value to ret.
4979
4980 2011-12-16 Doug Evans <dje@google.com>
4981
4982 * linux-low.c (linux_create_inferior): If stdio connection,
4983 redirect stdin from /dev/null, stdout to stderr.
4984 * remote-utils.c (remote_is_stdio): New static global.
4985 (remote_connection_is_stdio): New function.
4986 (remote_prepare): Handle stdio connection.
4987 (remote_open): Ditto.
4988 (remote_close): Don't close stdin for stdio connections.
4989 (read_prim,write_prim): New functions. Replace all calls to
4990 read/write to these.
4991 * server.c (main): Watch for "-" argument. Move call to
4992 remote_prepare before start_inferior.
4993 * server.h (STDIO_CONNECTION_NAME): New macro.
4994 (remote_connection_is_stdio): Declare.
4995
4996 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4997 in debugging output.
4998
4999 2011-12-15 Yao Qi <yao@codesourcery.com>
5000
5001 * tracepoint.c: Include sys/syscall.h.
5002 (gdb_ust_thread): Remove preprocessor conditional.
5003
5004 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5005
5006 * linux-low.c (linux_detach_one_lwp): Call
5007 the_low_target.prepare_to_resume before detaching.
5008
5009 2011-12-14 Yao Qi <yao@codesourcery.com>
5010
5011 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5012 of write.
5013
5014 2011-12-14 Yao Qi <yao@codesourcery.com>
5015
5016 * i386-low.c (i386_low_stopped_data_address): Initialize local
5017 variable `control'.
5018
5019 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5020
5021 PR remote/13492
5022
5023 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5024 DR_CONTROL unless necessary. Extend comments.
5025 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5026 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5027
5028 2011-12-13 Yao Qi <yao@codesourcery.com>
5029
5030 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5031 macros.
5032 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5033
5034 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5035
5036 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5037 Print new debug message for such case.
5038
5039 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5040
5041 Fix overlapping memcpy.
5042 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5043 the read_inferior_memory transfer.
5044 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5045 write_inferior_memory transfer.
5046 (set_fast_tracepoint_jump): New variable buf. Use it for the
5047 read_inferior_memory and write_inferior_memory transfers.
5048 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5049 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5050 Use it for the write_inferior_memory transfer.
5051 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5052 buffers.
5053
5054 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5055
5056 * linux-low.c (fetch_register, store_register): Make code
5057 consistent, fix formatting.
5058
5059 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5060
5061 * linux-low.c (usr_store_inferior_registers): Factor out code
5062 to handle individual registers into...
5063 (store_register): ... this new function.
5064
5065 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5066
5067 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5068 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5069 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5070 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5071 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5072 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5073 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5074 (srv_xmlfiles): Add new XML files.
5075
5076 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5077 and <sys/uio.h>.
5078 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5079 (init_registers_s390_linux32v1): Add prototype.
5080 (init_registers_s390_linux32v2): Likewise.
5081 (init_registers_s390_linux64v1): Likewise.
5082 (init_registers_s390_linux64v2): Likewise.
5083 (init_registers_s390x_linux64v1): Likewise.
5084 (init_registers_s390x_linux64v2): Likewise.
5085 (s390_num_regs): Increment to 52.
5086 (s390_regmap): Add orig_r2 register.
5087 (s390_num_regs_3264): Increment to 68.
5088 (s390_regmap_3264): Add orig_r2 register.
5089 (s390_collect_ptrace_register): Handle orig_r2 register.
5090 (s390_supply_ptrace_register): Likewise.
5091 (s390_fill_last_break): New function.
5092 (s390_store_last_break): Likewise.
5093 (s390_fill_system_call): New function.
5094 (s390_store_system_call): Likewise.
5095 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5096 register sets.
5097 (s390_check_regset): New function.
5098 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5099 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5100 Update target_regsets for available register sets.
5101
5102 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5103 Jan Kratochvil <jan.kratochvil@redhat.com>
5104
5105 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5106 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5107 New.
5108 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5109 * linux-low.h (struct process_info_private): New member r_debug.
5110 * server.c (handle_qxfer_libraries): Call
5111 the_target->qxfer_libraries_svr4.
5112 (handle_qxfer_libraries_svr4): New function.
5113 (qxfer_packets): New entry "libraries-svr4".
5114 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5115 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5116 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5117 PACKET_qXfer_libraries_svr4.
5118
5119 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5120
5121 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5122 PSW address/mask between 8-byte and 16-byte formats.
5123 (s390_supply_ptrace_register): Likewise.
5124 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5125 basic addressing mode bit.
5126
5127 2011-11-24 Stan Shebs <stan@codesourcery.com>
5128
5129 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5130
5131 2011-11-17 Stan Shebs <stan@codesourcery.com>
5132
5133 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5134 (tracing_start_time): New global.
5135 (tracing_stop_time): New global.
5136 (tracing_user_name): New global.
5137 (tracing_notes): New global.
5138 (tracing_stop_note): New global.
5139 (cmd_qtstart): Set traceframe_usage, start_time.
5140 (stop_tracing): Set stop_time.
5141 (cmd_qtstatus): Report additional status.
5142 (cmd_qtp): New function.
5143 (handle_tracepoint_query): Call it.
5144 (cmd_qtnotes): New function.
5145 (handle_tracepoint_general_set): Call it.
5146 (get_timestamp): Rename from tsv_get_timestamp.
5147
5148 2011-11-14 Stan Shebs <stan@codesourcery.com>
5149 Kwok Cheung Yeung <kcy@codesourcery.com>
5150
5151 * linux-x86-low.c (small_jump_insn): New.
5152 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5153 trampoline and error message, build a trampoline and issue a small
5154 jump instruction to it.
5155 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5156 trampoline and error message.
5157 (x86_get_min_fast_tracepoint_insn_len): New.
5158 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5159 * linux-low.h (struct linux_target_ops): Add arguments to
5160 install_fast_tracepoint_jump_pad operation, add new operation.
5161 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5162 arguments.
5163 (linux_get_min_fast_tracepoint_insn_len): New function.
5164 (linux_target_op): Add new operation.
5165 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5166 (gdb_trampoline_buffer_end): Ditto.
5167 (gdb_trampoline_buffer_error): Ditto.
5168 (struct ipa_sym_addresses): Add fields for new IPA variables.
5169 (symbol_list): Add entries for new IPA variables.
5170 (struct tracepoint): Add fields to hold the address range of the
5171 trampoline used by the tracepoint.
5172 (trampoline_buffer_head): New static variable.
5173 (trampoline_buffer_tail): Ditto.
5174 (claim_trampoline_space): New function.
5175 (have_fast_tracepoint_trampoline_buffer): New function.
5176 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5177 structure.
5178 (install_fast_tracepoint): Ditto, also add error buffer argument.
5179 (cmd_qtminftpilen): New function.
5180 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5181 (fast_tracepoint_from_trampoline_address): New function.
5182 (fast_tracepoint_collecting): Handle trampoline as part of jump
5183 pad space.
5184 (set_trampoline_buffer_space): New function.
5185 (initialize_tracepoint): Initialize new IPA variables.
5186 * target.h (struct target_ops): Add arguments to
5187 install_fast_tracepoint_jump_pad operation, add new
5188 get_min_fast_tracepoint_insn_len operation.
5189 (target_get_min_fast_tracepoint_insn_len): New.
5190 (install_fast_tracepoint_jump_pad): Add arguments.
5191 * server.h (IPA_BUFSIZ): Define.
5192 * linux-i386-ipa.c: Include extra header files.
5193 (initialize_fast_tracepoint_trampoline_buffer): New function.
5194 (initialize_low_tracepoint): Call it.
5195 * server.h (set_trampoline_buffer_space): Declare.
5196 (claim_trampoline_space): Ditto.
5197 (have_fast_tracepoint_trampoline_buffer): Ditto.
5198
5199 2011-11-14 Yao Qi <yao@codesourcery.com>
5200
5201 * server.c (handle_query): Handle InstallInTrace for qSupported.
5202 * tracepoint.c (add_tracepoint): Sort list.
5203 (install_tracepoint, download_tracepoint): New.
5204 (cmd_qtdp): Call them to install and download tracepoints.
5205 (sort_tracepoints): Removed.
5206 (cmd_qtstart): Update.
5207
5208 2011-11-14 Yao Qi <yao@codesourcery.com>
5209
5210 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5211 * mem-break.h: Declare.
5212 * tracepoint.c (cmd_qtstart): Move some code to ...
5213 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5214 New.
5215 (download_tracepoints): Move some code to ...
5216 (download_tracepoint_1): ... here. New.
5217
5218 2011-11-08 Yao Qi <yao@codesourcery.com>
5219
5220 * remote-utils.c (relocate_instruction): A comment fix.
5221
5222 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5223
5224 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5225 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5226 dr_status_mirror and dr_control_mirror from debug_reg_state.
5227 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5228 (i386_initial_stuff): Remove use of deleted globals.
5229 (i386_get_thread_context, i386_set_thread_context,
5230 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5231 from debug_reg_state.
5232
5233 2011-11-05 Yao Qi <yao@codesourcery.com>
5234
5235 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5236 address as TPOINT's.
5237
5238 2011-11-02 Stan Shebs <stan@codesourcery.com>
5239
5240 * tracepoint.c (agent_mem_read_string): New function.
5241 (eval_agent_expr): Call it for tracenz.
5242 * server.c (handle_query): Report support for tracenz.
5243
5244 2011-11-02 Yao Qi <yao@codesourcery.com>
5245
5246 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5247
5248 2011-11-02 Yao Qi <yao@codesourcery.com>
5249
5250 * target.h: Fix a typo in comment.
5251
5252 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5253
5254 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5255 clobber the breakpoints' shadows with fast tracepoint jumps.
5256 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5257 * target.c (write_inferior_memory): Also pass MYADDR down to
5258 check_mem_write.
5259
5260 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5261
5262 * configure.ac: Check support for personality routine.
5263 * configure: Regenerate.
5264 * config.in: Likewise.
5265 * linux-low.c: Include <sys/personality.h>.
5266 Define ADDR_NO_RANDOMIZE if necessary.
5267 (linux_create_inferior): Disable address space randomization when
5268 forking inferior, if requested.
5269 (linux_supports_disable_randomization): New function.
5270 (linux_target_ops): Install it.
5271 * server.h (disable_randomization): Declare.
5272 * server.c (disable_randomization): New global variable.
5273 (handle_general_set): Handle QDisableRandomization.
5274 (handle_query): Likewise for qSupported.
5275 (main): Support --disable-randomization and --no-disable-randomization
5276 command line arguments.
5277 * target.h (struct target_ops): Add supports_disable_randomization.
5278 (target_supports_disable_randomization): New macro.
5279
5280 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5281
5282 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5283 ifdef check.
5284 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5285 [!PT_GETDSBT] (target_loadmap): New definition.
5286 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5287 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5288 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5289 and PT_GETDSBT to LINUX_LOADMAP.
5290 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5291 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5292
5293 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5294
5295 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5296 (arm_linux_hwbp_cap): New static variable.
5297 (arm_linux_get_hwbp_cap): Replace by ...
5298 (arm_linux_init_hwbp_cap): ... this new function.
5299 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5300 (arm_linux_get_hw_watchpoint_count): Likewise.
5301 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5302 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5303 (arm_prepare_to_resume): Use perror_with_name instead of error.
5304
5305 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5306
5307 * linux-arm-low.c: Include <signal.h>.
5308 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5309 (struct arm_linux_hwbp_cap): New data type.
5310 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5311 (struct arm_linux_hw_breakpoint): New data type.
5312 (MAX_BPTS, MAX_WPTS): Define.
5313 (struct arch_process_info, struct arch_lwp_info): New data types.
5314 (arm_linux_get_hwbp_cap): New function.
5315 (arm_linux_get_hw_breakpoint_count): Likewise.
5316 (arm_linux_get_hw_watchpoint_count): Likewise.
5317 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5318 (arm_hwbp_control_initialize): Likewise.
5319 (arm_hwbp_control_is_enabled): Likewise.
5320 (arm_hwbp_control_is_initialized): Likewise.
5321 (arm_hwbp_control_disable): Likewise.
5322 (arm_linux_hw_breakpoint_equal): Likewise.
5323 (arm_linux_hw_point_initialize): Likewise.
5324 (struct update_registers_data): New data structure.
5325 (update_registers_callback: New function.
5326 (arm_insert_point): Likewise.
5327 (arm_remove_point): Likewise.
5328 (arm_stopped_by_watchpoint): Likewise.
5329 (arm_stopped_data_address): Likewise.
5330 (arm_new_process): Likewise.
5331 (arm_new_thread): Likewise.
5332 (arm_prepare_to_resume): Likewise.
5333 (the_low_target): Register arm_insert_point, arm_remove_point,
5334 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5335 arm_new_thread, and arm_prepare_to_resume.
5336
5337 2011-09-15 Stan Shebs <stan@codesourcery.com>
5338
5339 * server.h (struct emit_ops): Add compare-goto fields.
5340 * tracepoint.c (gdb_agent_op_sizes): New table.
5341 (emit_eq_goto): New function.
5342 (emit_ne_goto): New function.
5343 (emit_lt_goto): New function.
5344 (emit_le_goto): New function.
5345 (emit_gt_goto): New function.
5346 (emit_ge_goto): New function.
5347 (is_goto_target): New function.
5348 (compile_bytecodes): Recognize special cases of compare-goto
5349 combinations and call specialized emitters for them.
5350 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5351 (amd64_emit_ne_goto): New function.
5352 (amd64_emit_lt_goto): New function.
5353 (amd64_emit_le_goto): New function.
5354 (amd64_emit_gt_goto): New function.
5355 (amd64_emit_ge_goto): New function.
5356 (amd64_emit_ops): Add the new functions.
5357 (i386_emit_eq_goto): New function.
5358 (i386_emit_ne_goto): New function.
5359 (i386_emit_lt_goto): New function.
5360 (i386_emit_le_goto): New function.
5361 (i386_emit_gt_goto): New function.
5362 (i386_emit_ge_goto): New function.
5363 (i386_emit_ops): Add the new functions.
5364
5365 2011-09-08 Stan Shebs <stan@codesourcery.com>
5366
5367 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5368 (i386_emit_epilogue): Restore %ebx.
5369
5370 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5371
5372 * server.c (step_thread): Remove definition.
5373 (process_serial_event): Don't handle Hs.
5374 * server.h (step_thread): Remove declaration.
5375 * target.c (set_desired_inferior): Remove use of step_thread.
5376
5377 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5378
5379 * linux-low.c: Include linux-procfs.h.
5380 (linux_attach_lwp_1): Update comments.
5381 (linux_attach): Scan for existing threads when attaching to a
5382 process that is the tgid.
5383 * Makefile.in: Update dependencies.
5384
5385 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5386
5387 * configure.srv: Add linux-procfs.o dependencies.
5388
5389 2011-08-14 Yao Qi <yao@codesourcery.com>
5390
5391 * target.h (struct target_ops): Fix indent.
5392 * win32-low.c (win32_target_ops): Fix comment.
5393
5394 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5395 Yao Qi <yao@codesourcery.com>
5396
5397 * Makefile.in (clean): Remove tic6x-*.c files.
5398 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5399 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5400 (tic6x-c64xp-linux.c): Likewise.
5401 * configure.srv: Add support for tic6x-*-uclinux.
5402 * linux-tic6x-low.c: New.
5403 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5404
5405 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5406 Yao Qi <yao@codesourcery.com>
5407
5408 * target.h (struct target_ops): Add read_loadmap.
5409 * linux-low.c (struct target_loadseg): New type.
5410 (struct target_loadmap): New type.
5411 (linux_read_loadmap): New function.
5412 (linux_target_ops): Add linux_read_loadmap.
5413 * server.c (handle_query): Support qXfer:fdpic:read packet.
5414 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5415 to NULL.
5416
5417 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5418
5419 * win32-low.c: Include <stdint.h>.
5420
5421 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5422
5423 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5424 to the inferior here.
5425 (i386_remove_aligned_watchpoint): Ditto.
5426 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5427 fit part of the watchpoint in the debug registers.
5428 (i386_update_inferior_debug_regs): New.
5429 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5430 registers, and only update the inferior on success.
5431 (i386_low_remove_watchpoint): Ditto.
5432
5433 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5434
5435 * linux-low.c (compare_ints, unique, list_threads, show_process,
5436 linux_core_of_thread): Delete.
5437 (linux_target_ops): Change linux_core_of_thread to
5438 linux_common_core_of_thread.
5439 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5440 * utils.c (malloc_failure): Change type of argument.
5441 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5442 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5443 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5444 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5445 (IPA_OBJS): Add common-utils-ipa.o.
5446 (ptid_h, linux_osdata_h): New macros.
5447 (server_h): Add common/common-utils.h, common/xml-utils.h,
5448 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5449 common/ptid.h.
5450 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5451 ptid.o, buffer.o): New rules.
5452 (linux-low.o): Add common/linux-osdata.h as a dependency.
5453 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5454 * configure.ac: Add AC_HEADER_DIRENT check.
5455 * config.in: Regenerate.
5456 * configure: Regenerate.
5457 * remote-utils.c (xml_escape_text): Delete.
5458 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5459 buffer_xml_printf): Move to common/buffer.c.
5460 * server.c (main): Remove call to initialize_inferiors.
5461 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5462 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5463 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5464 internal_error, gdb_assert, gdb_assert_fail): Delete.
5465 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5466 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5467 common/buffer.h.
5468 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5469 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5470 initialize_inferiors): Delete.
5471
5472 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5473
5474 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5475 symbol error.
5476
5477 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5478
5479 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5480 assertion.
5481 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5482
5483 2011-05-26 Yao Qi <yao@codesourcery.com>
5484
5485 * Makefile.in (thread-db.o): Track dependence to
5486 common/gdb_thread_db.h.
5487 * thread-db.c: include gdb_thread_db.h from right place.
5488
5489 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5490
5491 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5492 __FILE__ and __LINE__ to internal_error.
5493
5494 2011-05-13 Doug Evans <dje@google.com>
5495
5496 * thread-db.c (try_thread_db_load_from_sdir): New function.
5497 (try_thread_db_load_from_dir): New function.
5498 (thread_db_load_search): Handle $sdir, ignore $pdir.
5499 Remove trying of system directories if search of
5500 libthread-db-search-path fails, that is now done via $sdir.
5501
5502 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5503
5504 * server.c (handle_query): Add EnableDisableTracepoints to the list
5505 of supported features.
5506 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5507 tracepoints.
5508 (cmd_qtenable_disable): New.
5509 (cmd_qtstart): Install tracepoints even if disabled.
5510 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5511 receiving a QTEnable or QTDisable packet.
5512 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5513 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5514 tracepoints.
5515 (gdb_probe): Skip data collection if static tracepoint is disabled.
5516
5517 2011-05-10 Doug Evans <dje@google.com>
5518
5519 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5520
5521 2011-05-04 Doug Evans <dje@google.com>
5522
5523 * linux-low.c (linux_join): Skip process lookup.
5524 * spu-low.c (spu_join): Ditto.
5525 * server.c (join_inferiors_callback): Delete.
5526 (process_serial_event): For 'D' packet (detach) call join_inferior
5527 directly.
5528
5529 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5530
5531 * README: Don't mention xscale*-*-linux*.
5532 * configure.srv (xscale*-*-linux*): Don't handle target.
5533
5534 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5535
5536 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5537 casting pointers.
5538 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5539 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5540 (i386_emit_void_call_2): Likewise.
5541
5542 2011-04-26 Yao Qi <yao@codesourcery.com>
5543
5544 * linux-low.c: Move common macros to linux-ptrace.h.
5545 Include linux-ptrace.h.
5546 * Makefile.in (linux_ptrace_h): New.
5547 (linux-low.o): Depends on linux-ptrace.h.
5548
5549 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5550
5551 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5552 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5553 (remote_prepare): New function with most of the TCP code from ...
5554 (remote_open): ... here. Detect PORT here unconditionally. Move also
5555 setting transport_is_reliable.
5556 * server.c (run_once): New variable.
5557 (gdbserver_usage): Document it.
5558 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5559 the first run if RUN_ONCE.
5560 * server.h (run_once, remote_prepare): New declarations.
5561
5562 2011-04-19 Tom Tromey <tromey@redhat.com>
5563
5564 * win32-low.c (handle_load_dll): Remove duplicate "the".
5565
5566 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5567
5568 Remove support for old Cygwin 1.5 versions.
5569 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5570 function to avoid warning.
5571 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5572 warning.
5573
5574 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5575
5576 * gdbserver/server.h (Macro _): Define it if not available.
5577
5578 2011-03-14 Michael Snyder <msnyder@vmware.com>
5579
5580 * hostio.c (handle_close): Remove unnecessary null test.
5581
5582 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5583
5584 * Makefile.in (maintainer-clean realclean distclean): Remove
5585 "make ... subdir_do" command.
5586
5587 2011-03-10 Michael Snyder <msnyder@vmware.com>
5588
5589 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5590
5591 * server.c (handle_v_run): Free alloced buffer on early return.
5592
5593 2011-03-09 Yao Qi <yao@codesourcery.com>
5594
5595 Revert:
5596 2011-03-04 Yao Qi <yao@codesourcery.com>
5597
5598 * Makefile.in: Remove GNU make feature --directory.
5599
5600 2011-03-05 Yao Qi <yao@codesourcery.com>
5601
5602 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5603 (subdir_do): New make target. Copied from gdb/Makefile.
5604 (maintainer-clean, realclean, distclean, clean): Call corresponding
5605 make targets in common/Makefile.
5606
5607 2011-02-11 Yao Qi <yao@codesourcery.com>
5608
5609 * configure.ac: Call AC_PROG_RANLIB.
5610 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5611 * configure: Regenerate.
5612
5613 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5614
5615 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5616
5617 2011-03-06 Yao Qi <yao@codesourcery.com>
5618
5619 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5620
5621 2011-03-05 Yao Qi <yao@codesourcery.com>
5622
5623 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5624 (subdir_do): New make target. Copied from gdb/Makefile.
5625 (maintainer-clean, realclean, distclean, clean): Call corresponding
5626 make targets in common/Makefile.
5627
5628 2011-03-04 Yao Qi <yao@codesourcery.com>
5629
5630 * Makefile.in: Remove GNU make feature --directory.
5631
5632 2011-03-04 Michael Snyder <msnyder@vmware.com>
5633
5634 * server.c (queue_stop_reply): Call xmalloc not malloc.
5635
5636 2011-03-02 Michael Snyder <msnyder@vmware.com>
5637
5638 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5639
5640 2011-02-28 Michael Snyder <msnyder@vmware.com>
5641
5642 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5643 (cmd_qtframe): Ditto.
5644 (cmd_qtbuffer): Ditto.
5645 (cmd_bigqtbuffer): Ditto.
5646
5647 * utils.c (decimal2str): Initialize 'width' to nine, then
5648 don't mess with it.
5649
5650 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5651
5652 * hostio.c (require_data): Free *data, not data.
5653
5654 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5655
5656 * hostio.c (require_data): Use free, not xfree.
5657
5658 2011-02-27 Michael Snyder <msnyder@vmware.com>
5659
5660 * server.c (handle_query): Discard unused value.
5661
5662 * hostio.c (require_data): Free malloc memory before returning
5663 error.
5664
5665 2011-02-26 Michael Snyder <msnyder@vmware.com>
5666
5667 * linux-low.c (list_threads): Call closedir for dirent.
5668
5669 2011-02-27 Michael Snyder <msnyder@vmware.com>
5670
5671 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5672 a case statement falls through.
5673
5674 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5675
5676 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5677 in comparison.
5678
5679 2011-02-26 Michael Snyder <msnyder@vmware.com>
5680
5681 * utils.c (decimal2str): Eliminate dead code and dead param.
5682 (pulongest): Drop dead param from call to decimal2str.
5683 (plongest): Ditto.
5684
5685 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5686
5687 Revert the following patch (not approved yet):
5688 2011-02-21 Hui Zhu <teawater@gmail.com>
5689 * tracepoint.c (tp_printf): New function.
5690 (eval_agent_expr): Handle gdb_agent_op_printf.
5691
5692 2011-02-21 Hui Zhu <teawater@gmail.com>
5693
5694 * tracepoint.c (tp_printf): New function.
5695 (eval_agent_expr): Handle gdb_agent_op_printf.
5696
5697 2011-02-18 Tom Tromey <tromey@redhat.com>
5698
5699 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5700 (tracepoint.o): Likewise.
5701 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5702 (gdb_agent_op_names): Likewise.
5703
5704 2011-02-18 Tom Tromey <tromey@redhat.com>
5705
5706 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5707 gdb_agent_op_rot>: New constants.
5708 (gdb_agent_op_names): Add pick and roll.
5709 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5710 cases.
5711
5712 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5713
5714 * aclocal.m4: Regenerated with aclocal-1.11.1.
5715
5716 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5717
5718 * server.c (handle_qxfer_traceframe_info): New.
5719 (qxfer_packets): Register "traceframe-info".
5720 (handle_query): Report support for qXfer:traceframe-info:read+.
5721 * tracepoint.c (match_blocktype): New.
5722 (traceframe_find_block_type): Rename to ...
5723 (traceframe_walk_blocks): ... this. Add callback filter argument,
5724 and use it.
5725 (traceframe_find_block_type): New, reimplemented on top of
5726 traceframe_walk_blocks.
5727 (build_traceframe_info_xml): New.
5728 (traceframe_read_info): New.
5729 * server.h (traceframe_read_info): Declare.
5730
5731 2011-02-11 Yao Qi <yao@codesourcery.com>
5732
5733 * configure.ac: Call AC_PROG_RANLIB.
5734 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5735 * configure: Regenerate.
5736
5737 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5738
5739 * server.c (gdb_read_memory): Change return semantics to allow
5740 partial transfers.
5741 (handle_search_memory_1): Adjust.
5742 (process_serial_event) <'m' packet>: Handle partial transfers.
5743 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5744
5745 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5746
5747 * regcache.c (init_register_cache): Initialize
5748 regcache->register_status.
5749 (free_register_cache): Release regcache->register_status.
5750 (regcache_cpy): Copy register_status.
5751 (registers_to_string): Print 'x's for unavailable registers.
5752 (supply_register): Mark the register's status valid or
5753 unavailable, depending on whether a buffer was passed in or not.
5754 (supply_register_zeroed): New.
5755 (supply_regblock): Mark the registers' status valid or
5756 unavailable, depending on whether a buffer was passed in or not.
5757 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5758 (struct regcache): New `register_status' field.
5759 (supply_register_zeroed): Declare.
5760 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5761 supply_register_zeroed, rather than passing a NULL buffer to
5762 supply_register.
5763 * tracepoint.c (fetch_traceframe_registers): Update comment.
5764
5765 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5766
5767 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5768 buffer explicit.
5769
5770 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5771
5772 * server.h (decode_xfer_write): Change prototype.
5773 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5774 and don't extract the annex here.
5775 * server.c (decode_xfer_read): Remove `annex' parameter,
5776 and don't extract the annex here.
5777 (decode_xfer): New.
5778 (struct qxfer): New.
5779 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5780 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5781 (handle_qxfer_statictrace): New functions, abstracted out from
5782 handle_query, and made to use the struct qxfer interface.
5783 (handle_threads_qxfer_proper): Rename to ...
5784 (handle_qxfer_threads_proper): ... this.
5785 (handle_threads_qxfer): Rename to ...
5786 (handle_qxfer_threads): ... this. Adjust.
5787 (qxfer_packets): New array.
5788 (handle_qxfer): New function.
5789 (handle_query): Use handle_qxfer.
5790
5791 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5792
5793 * gdbreplay.c: Shorten lines of >= 80 columns.
5794 * linux-low.c: Ditto.
5795 * linux-ppc-low.c: Ditto.
5796 * linux-s390-low.c: Ditto.
5797 * linux-sparc-low.c: Ditto.
5798 * linux-x86-low.c: Ditto.
5799 * linux-xtensa-low.c: Ditto.
5800 * mem-break.c: Ditto.
5801 * nto-low.c: Ditto.
5802 * regcache.h: Ditto.
5803 * remote-utils.c: Ditto.
5804 * server.c: Ditto.
5805 * server.h: Ditto.
5806 * thread-db.c: Ditto.
5807 * tracepoint.c: Ditto.
5808 * utils.c: Ditto.
5809 * win32-low.h: Ditto.
5810
5811 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5812
5813 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5814 update.
5815
5816 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5817
5818 * server.c (gdbserver_version): Update copyright year in version
5819 output.
5820 * gdbreplay.c (gdbreplay_version): Ditto.
5821
5822 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5823
5824 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5825 * linux-bfin-low.c: New file.
5826 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5827 PT_DATA_ADDR for BFIN targets.
5828 * Makefile.in (SFILES): Add linux-bfin-low.c.
5829 (clean): Remove reg-bfin.c.
5830 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5831 * README: Mention supported Blackfin targets.
5832
5833 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5834
5835 * .gitignore: New file.
5836
5837 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5838
5839 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5840
5841 2010-10-22 Jie Zhang <jie@codesourcery.com>
5842
5843 * Makefile.in: Add FLAGS_TO_PASS variable.
5844 (install): Remove dependency of install-only and recursively
5845 invoke make for install-only.
5846
5847 2010-10-04 Doug Evans <dje@google.com>
5848
5849 * Makefile.in (uninstall): Use $(DESTDIR).
5850
5851 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5852
5853 PR gdb/11842
5854
5855 * linux-x86-low.c (compat_siginfo_from_siginfo)
5856 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5857 si_code is < 0. Check for si_code == SI_TIMER before checking for
5858 si_code < 0.
5859
5860 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5861
5862 * lynx-i386-low.c: New file.
5863 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5864
5865 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5866
5867 * lynx-low.c (ptrace_request_to_str): Remove handling for
5868 request values that have been removed in LynxOS 5.x.
5869
5870 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5871
5872 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5873 <ptrace.h>
5874
5875 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5876
5877 * configure.ac: Add --enable-inprocess-agent option.
5878 * configure: Rebuilt.
5879
5880 2010-09-06 Yao Qi <yao@codesourcery.com>
5881
5882 * linux-low.c (linux_kill): Remove unused variable.
5883 (linux_stabilize_threads): Likewise.
5884 * server.c (start_inferior): Likewise.
5885 (queue_stop_reply_callback): Likewise.
5886 * tracepoint.c (do_action_at_tracepoint): Likewise.
5887
5888 2010-09-06 Yao Qi <yao@codesourcery.com>
5889
5890 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5891 on return.
5892
5893 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5894
5895 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5896
5897 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5898
5899 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5900 "$(IPA_DEPFILES)".
5901
5902 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5903
5904 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5905 gdbserver/lynx-ppc-low.c: New files.
5906 * Makefile.in (lynx_low_h): New variable.
5907 (lynx-low.o, lynx-ppc-low.o): New rules.
5908 * configure.ac: On LynxOS, link with -lnetinet.
5909 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5910 * configure: regenerate.
5911
5912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5913
5914 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5915 * configure.ac: Add check for vasprintf and vsnprintf.
5916 * configure, config.in: Regenerate.
5917 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5918
5919 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5920
5921 * gdbreplay.c: Move include of alloca.h up, next to include of
5922 malloc.h.
5923 * server.h: Add include of malloc.h.
5924 * mem-break.c: Remove include of malloc.h.
5925 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5926
5927 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5928
5929 * Makefile.in (memmem.o): Build with -Wno-error.
5930
5931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5932
5933 * utils.c (xsnprintf): Make non-static.
5934 * server.h: Add xsnprintf declaration.
5935 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5936 replace calls to snprintf by calls to xsnprintf throughout.
5937
5938 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5939
5940 * configure.ac: Add configure check for alloca.
5941 * configure, config.in: Regenerate.
5942 * server.h: Include alloca.h if it exists.
5943 * gdbreplay.c: Include alloca.h if it exists.
5944
5945 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5946
5947 * linux-low.c (__SIGRTMIN): Define if not already defined.
5948 (linux_create_inferior): Check for __ANDROID__ rather than
5949 __SIGRTMIN.
5950 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5951 are already deferred.
5952 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5953 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5954 stopped and already has a pending signal to report.
5955 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5956 a pending signal to report or is moving out of a jump pad.
5957 (linux_init_signals): Check for __ANDROID__ rather than
5958 __SIGRTMIN.
5959
5960 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5961
5962 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5963 debug_threads check. Avoid a linear search when not doing debug
5964 output.
5965
5966 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5967
5968 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5969 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5970 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5971 (process_event): Change local fd's type to gdb_fildes_t.
5972 (create_file_handler): Adjust prototype.
5973 (delete_file_handler): Adjust prototype.
5974 (handle_file_event): Adjust prototype. Use pfildes.
5975 (create_file_event): Adjsut prototype.
5976 * remote-utils.c (remote_desc, listen_desc): Change type to
5977 gdb_fildes_t.
5978 * server.h: New gdb_fildes_t typedef.
5979 [USE_WIN32API]: Include winsock2.h.
5980 (delete_file_handler, add_file_handler): Adjust prototypes.
5981 (pfildes): Declare.
5982 * utils.c (pfildes): New.
5983
5984 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5985
5986 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5987 * configure: Regenerate.
5988
5989 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5990
5991 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5992 (linux_done_accessing_memory): ... this.
5993 (linux_target_ops): Adjust.
5994 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5995 * nto-low.c (nto_target_ops): Adjust comment.
5996 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5997 * spu-low.c (spu_target_ops): Adjust comment.
5998 * target.h (target_ops): Rename unprepare_to_access_memory field
5999 to done_accessing_memory.
6000 (unprepare_to_access_memory): Rename to ...
6001 (done_accessing_memory): ... this.
6002
6003 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6004
6005 * linux-low.c (linux_prepare_to_access_memory): New.
6006 (linux_unprepare_to_access_memory): New.
6007 (linux_target_ops): Install them.
6008 * server.c (read_memory): Rename to ...
6009 (gdb_read_memory): ... this. Use
6010 prepare_to_access_memory/prepare_to_access_memory.
6011 (write_memory): Rename to ...
6012 (gdb_write_memory): ... this. Use
6013 prepare_to_access_memory/prepare_to_access_memory.
6014 (handle_search_memory_1): Adjust.
6015 (process_serial_event): Adjust.
6016 * target.h (struct target_ops): New fields
6017 prepare_to_access_memory and unprepare_to_access_memory.
6018 (prepare_to_access_memory, unprepare_to_access_memory): New.
6019 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6020 prepare_to_access_memory/prepare_to_access_memory.
6021 * nto-low.c (nto_target_ops): Adjust.
6022 * spu-low.c (spu_target_ops): Adjust.
6023 * win32-low.c (win32_target_ops): Adjust.
6024
6025 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6026
6027 * Makefile.in (WARN_CFLAGS): Get it from configure.
6028 (WERROR_CFLAGS): New.
6029 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6030 * configure.ac: Introduce --enable-werror, which adds -Werror to
6031 the compiler command line. Enabled by default. Disable with
6032 --disable-werror. Add -Wdeclaration-after-statement
6033 Wpointer-arith and -Wformat-nonliteral to warning flags.
6034 * configure: Regenerate.
6035
6036 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6037
6038 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6039
6040 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6041
6042 * gdbreplay.c (remote_error): New.
6043 (gdbchar): New.
6044 (expect): Use gdbchar. Check for error reading from GDB.
6045 Clarify sync error output.
6046 (play): Check for errors writing to GDB.
6047 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6048 * remote-utils.c (getpkt): Check for errors writing to the remote
6049 descriptor.
6050
6051 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6052
6053 * linux-low.c (linux_wait_1): Move non-debugging code out of
6054 `debug_threads' control.
6055
6056 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6057
6058 * linux-low.c (linux_wait_1): Don't set last_status here.
6059 * server.c (push_event, queue_stop_reply_callback): Assert we're
6060 not pushing a TARGET_WAITKIND_IGNORE event.
6061 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6062 (myresume, handle_target_event): Set the thread's last_resume_kind
6063 and last_status from the target returned status.
6064
6065 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6066
6067 PR threads/10729
6068
6069 * linux-x86-low.c (update_debug_registers_callback): New.
6070 (i386_dr_low_set_addr): Use it.
6071 (i386_dr_low_get_addr): New.
6072 (i386_dr_low_set_control): Use update_debug_registers_callback.
6073 (i386_dr_low_get_control): New.
6074 (i386_dr_low_get_status): Adjust.
6075 * linux-low.c (linux_stop_lwp): New.
6076 * linux-low.h (linux_stop_lwp): Declare.
6077
6078 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6079 argument instead of a i386_debug_reg_state.
6080 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6081 a i386_debug_reg_state.
6082 (i386_insert_aligned_watchpoint): Adjust.
6083 (i386_remove_aligned_watchpoint): Adjust.
6084 (i386_low_stopped_data_address): Read the debug registers from the
6085 inferior instead of from the mirrors.
6086 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6087 (i386_dr_low_get_addr): Declare.
6088 (i386_dr_low_get_control): Declare.
6089 (i386_dr_low_get_status): Change prototype.
6090
6091 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6092 (i386_dr_low_get_addr): New.
6093 (i386_dr_low_get_control): New.
6094 (i386_dr_low_get_status): Adjust prototype. Return
6095 dr_status_mirror.
6096 (i386_initial_stuff): Clear dr_status_mirror and
6097 dr_control_mirror.
6098 (i386_get_thread_context): Adjust.
6099 (i386_set_thread_context): Adjust.
6100 (i386_thread_added): Adjust.
6101
6102 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6103
6104 * linux-low.h (linux_thread_area): Delete declaration.
6105
6106 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6107
6108 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6109 after its termination.
6110
6111 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6112
6113 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6114 (gdb_wants_all_stopped): Delete.
6115 (linux_wait_1): Don't call them.
6116 * server.c (handle_v_cont): Tag all threads as want-stopped.
6117 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6118 stopped as "client-wants-stopped".
6119
6120 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6121
6122 * Makefile.in (signals_h): New.
6123 (server_h): Depend on it.
6124 (server.o): Don't depend on $(signals_def).
6125 (signals.o): Depend on $(signals_def).
6126
6127 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6128
6129 * Makefile.in (signals_def): New.
6130 (server_h): Append include/gdb/signals.h and signals_def.
6131 (server.o): Append signals_def.
6132
6133 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6134
6135 * server.c (handle_target_event): Use target_signal_to_host for
6136 resume_info.sig initialization.
6137 * target.h (struct thread_resume) <sig>: New comment.
6138
6139 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6140
6141 * server.c (handle_query): strcpy() the returned string from paddress()
6142 instead of sprintf().
6143 * utils.c (paddress): Return phex_nz().
6144
6145 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6146
6147 * server.c (handle_v_cont): Call mourn_inferior if process
6148 just exited.
6149 (myresume): Likewise.
6150
6151 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6152
6153 Static tracepoints, and integration with UST.
6154
6155 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6156 * mem-break.c (uninsert_all_breakpoints)
6157 (reinsert_all_breakpoints): New.
6158 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6159 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6160 (gdb_agent_ust_loaded, helper_thread_id)
6161 (gdb_agent_helper_thread_id): New macros.
6162 (struct ipa_sym_addresses): Add addr_ust_loaded,
6163 addr_helper_thread_id, addr_cmd_buf.
6164 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6165 (in_process_agent_loaded_ust): New.
6166 (write_e_ust_not_loaded): New.
6167 (maybe_write_ipa_ust_not_loaded): New.
6168 (struct collect_static_trace_data_action): New.
6169 (enum tracepoint_type) <static_tracepoint>: New.
6170 (struct tracepoint) <handle>: Mention static tracepoints.
6171 (struct static_tracepoint_ctx): New.
6172 (CMD_BUF_SIZE): New.
6173 (add_tracepoint_action): Handle static tracepoint actions.
6174 (unprobe_marker_at): New.
6175 (clear_installed_tracepoints): Handle static tracepoints.
6176 (cmd_qtdp): Handle static tracepoints.
6177 (probe_marker_at): New.
6178 (cmd_qtstart): Handle static tracepoints.
6179 (response_tracepoint): Handle static tracepoints.
6180 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6181 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6182 (get_context_regcache): Handle static tracepoints.
6183 (do_action_at_tracepoint): Handle static tracepoint actions.
6184 (traceframe_find_block_type): Handle static trace data blocks.
6185 (traceframe_read_sdata): New.
6186 (download_tracepoints): Download static tracepoint actions.
6187 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6188 (GDB_PROBE_NAME): New.
6189 (ust_ops): New.
6190 (GET_UST_SYM): New.
6191 (USTF): New.
6192 (dlsym_ust): New.
6193 (ust_marker_to_static_tracepoint): New.
6194 (gdb_probe): New.
6195 (collect_ust_data_at_tracepoint): New.
6196 (gdb_ust_probe): New.
6197 (UNIX_PATH_MAX, SOCK_DIR): New.
6198 (gdb_ust_connect_sync_socket): New.
6199 (resume_thread, stop_thread): New.
6200 (run_inferior_command): New.
6201 (init_named_socket): New.
6202 (gdb_ust_socket_init): New.
6203 (cstr_to_hexstr): New.
6204 (next_st): New.
6205 (first_marker, next_marker): New.
6206 (response_ust_marker): New.
6207 (cmd_qtfstm, cmd_qtsstm): New.
6208 (unprobe_marker_at, probe_marker_at): New.
6209 (cmd_qtstmat, gdb_ust_thread): New.
6210 (gdb_ust_init): New.
6211 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6212 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6213 (ST_REGENTRY): New.
6214 (x86_64_st_collect_regmap): New.
6215 (X86_64_NUM_ST_COLLECT_GREGS): New.
6216 (AMD64_RIP_REGNUM): New.
6217 (supply_static_tracepoint_registers): New.
6218 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6219 (ST_REGENTRY): New.
6220 (i386_st_collect_regmap): New.
6221 (i386_NUM_ST_COLLECT_GREGS): New.
6222 (supply_static_tracepoint_registers): New.
6223 * server.c (handle_query): Handle qXfer:statictrace:read.
6224 <qSupported>: Report support for StaticTracepoints, and
6225 qXfer:statictrace:read features.
6226 * server.h (traceframe_read_sdata)
6227 (supply_static_tracepoint_registers): Declare.
6228 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6229 (unpack_varlen_hex): Include in IPA build.
6230 * Makefile.in (ustlibs, ustinc): New.
6231 (IPA_OBJS): Add remote-utils-ipa.o.
6232 ($(IPA_LIB)): Link -ldl and -lpthread.
6233 (UST_CFLAGS): New.
6234 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6235 * config.in, configure: Regenerate.
6236
6237 2010-06-20 Ian Lance Taylor <iant@google.com>
6238 Pedro Alves <pedro@codesourcery.com>
6239
6240 * linux-x86-low.c (always_true): Delete.
6241 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6242 trying to fool the compiler with always_true.
6243
6244 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6245
6246 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6247 conditions in gdbserver.
6248
6249 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6250
6251 * spu-low.c (spu_read_memory): Wrap around local store limit.
6252 (spu_write_memory): Likewise.
6253
6254 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6255
6256 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6257 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6258 LONGEST uses.
6259 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6260 uses.
6261 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6262 uses with LONGEST uses.
6263
6264 2010-06-14 Stan Shebs <stan@codesourcery.com>
6265 Pedro Alves <pedro@codesourcery.com>
6266
6267 Bytecode compiler.
6268
6269 * linux-x86-low.c: Include limits.h.
6270 (add_insns): New.
6271 (always_true): New.
6272 (EMIT_ASM): New.
6273 (EMIT_ASM32): New.
6274 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6275 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6276 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6277 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6278 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6279 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6280 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6281 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6282 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6283 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6284 (amd64_emit_void_call_2): New.
6285 (amd64_emit_ops): New.
6286 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6287 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6288 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6289 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6290 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6291 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6292 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6293 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6294 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6295 (i386_emit_stack_adjust, i386_emit_int_call_1)
6296 (i386_emit_void_call_2): New.
6297 (i386_emit_ops): New.
6298 (x86_emit_ops): New.
6299 (the_low_target): Install x86_emit_ops.
6300 * server.h (struct emit_ops): New.
6301 (get_raw_reg_func_addr): Declare.
6302 (current_insn_ptr, emit_error): Declare.
6303 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6304 (set_trace_state_variable_value): New defines.
6305 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6306 addr_get_trace_state_variable_value and
6307 addr_set_trace_state_variable_value.
6308 (symbol_list): New fields for get_raw_reg,
6309 get_trace_state_variable_value and set_trace_state_variable_value.
6310 (condfn): New typedef.
6311 (struct tracepoint): New field `compiled_cond'.
6312 (do_action_at_tracepoint): Clear compiled_cond.
6313 (get_trace_state_variable_value, set_trace_state_variable_value):
6314 Export in the IPA.
6315 (condition_true_at_tracepoint): If there's a compiled condition,
6316 run that.
6317 (current_insn_ptr, emit_error): New globals.
6318 (struct bytecode_address): New.
6319 (get_raw_reg_func_addr): New.
6320 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6321 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6322 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6323 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6324 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6325 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6326 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6327 (compile_tracepoint_condition, compile_bytecodes): New.
6328 * target.h (emit_ops): Forward declare.
6329 (struct target_ops): New field emit_ops.
6330 (target_emit_ops): New.
6331 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6332 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6333 * linux-low.c (linux_emit_ops): New.
6334 (linux_target_ops): Install it.
6335 * linux-low.h (struct linux_target_ops): New field emit_ops.
6336
6337 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6338
6339 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6340 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6341
6342 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6343 Stan Shebs <stan@codesourcery.com>
6344
6345 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6346 (all): Depend on $(extra_libraries).
6347 (install-only): Install the IPA.
6348 (IPA_OBJS, IPA_LIB): New.
6349 (clean): Remove the IPA lib.
6350 (IPAGENT_CFLAGS): New.
6351 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6352 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6353 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6354 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6355 * configure.ac: Check for atomic builtins support in the compiler.
6356 (IPA_DEPFILES, extra_libraries): Define.
6357 * configure.srv (ipa_obj): Add description.
6358 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6359 (i[34567]86-*-linux*): Set ipa_obj.
6360 (x86_64-*-linux*): Set ipa_obj.
6361 * linux-low.c (stabilizing_threads): New.
6362 (supports_fast_tracepoints): New.
6363 (linux_detach): Stabilize threads before detaching.
6364 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6365 the lwp is either not stabilizing, or is moving out of a jump pad.
6366 (linux_fast_tracepoint_collecting): New.
6367 (maybe_move_out_of_jump_pad): New.
6368 (enqueue_one_deferred_signal): New.
6369 (dequeue_one_deferred_signal): New.
6370 (linux_wait_for_event_1): If moving out of a jump pad, defer
6371 pending signals to later.
6372 (linux_stabilize_threads): New.
6373 (linux_wait_1): Check if threads need moving out of jump pads, and
6374 do it if so.
6375 (stuck_in_jump_pad_callback): New.
6376 (move_out_of_jump_pad_callback): New.
6377 (lwp_running): New.
6378 (linux_resume_one_lwp): Handle moving out of jump pads.
6379 (linux_set_resume_request): Dequeue deferred signals.
6380 (need_step_over_p): Also step over fast tracepoint jumps.
6381 (start_step_over): Also uninsert fast tracepoint jumps.
6382 (finish_step_over): Also reinsert fast tracepoint jumps.
6383 (linux_install_fast_tracepoint_jump): New.
6384 (linux_target_ops): Install linux_stabilize_threads and
6385 linux_install_fast_tracepoint_jump_pad.
6386 * linux-low.h (linux_target_ops) <get_thread_area,
6387 install_fast_tracepoint_jump_pad>: New fields.
6388 (struct lwp_info) <collecting_fast_tracepoint,
6389 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6390 (linux_get_thread_area): Declare.
6391 * linux-x86-low.c (jump_insn): New.
6392 (x86_get_thread_area): New.
6393 (append_insns): New.
6394 (push_opcode): New.
6395 (amd64_install_fast_tracepoint_jump_pad): New.
6396 (i386_install_fast_tracepoint_jump_pad): New.
6397 (x86_install_fast_tracepoint_jump_pad): New.
6398 (the_low_target): Install x86_get_thread_area and
6399 x86_install_fast_tracepoint_jump_pad.
6400 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6401 (struct fast_tracepoint_jump): New.
6402 (fast_tracepoint_jump_insn): New.
6403 (fast_tracepoint_jump_shadow): New.
6404 (find_fast_tracepoint_jump_at): New.
6405 (fast_tracepoint_jump_here): New.
6406 (delete_fast_tracepoint_jump): New.
6407 (set_fast_tracepoint_jump): New.
6408 (uninsert_fast_tracepoint_jumps_at): New.
6409 (reinsert_fast_tracepoint_jumps_at): New.
6410 (set_breakpoint_at): Use write_inferior_memory.
6411 (uninsert_raw_breakpoint): Use write_inferior_memory.
6412 (check_mem_read): Mask out fast tracepoint jumps.
6413 (check_mem_write): Mask out fast tracepoint jumps.
6414 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6415 (set_fast_tracepoint_jump): Declare.
6416 (delete_fast_tracepoint_jump)
6417 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6418 (reinsert_fast_tracepoint_jumps_at): Declare.
6419 * regcache.c: Don't compile many functions when building the
6420 in-process agent library.
6421 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6422 the register buffer in the heap.
6423 (free_register_cache): If the register buffer isn't owned by the
6424 regcache, don't free it.
6425 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6426 pre-existing register caches.
6427 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6428 type.
6429 (convert_ascii_to_int): : Constify `from' parameter type.
6430 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6431 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6432 the needed buffer in-place.
6433 (relocate_instruction): New.
6434 * server.c (handle_query) <qSymbols>: If the target supports
6435 tracepoints, give it a chance of looking up symbols. Report
6436 support for fast tracepoints.
6437 (handle_status): Stabilize threads.
6438 (process_serial_event): Adjust.
6439 * server.h (struct fast_tracepoint_jump): Forward declare.
6440 (struct process_info) <fast_tracepoint_jumps>: New field.
6441 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6442 (decode_X_packet, decode_M_packet): Adjust.
6443 (relocate_instruction): Declare.
6444 (in_process_agent_loaded): Declare.
6445 (tracepoint_look_up_symbols): Declare.
6446 (struct fast_tpoint_collect_status): Declare.
6447 (fast_tracepoint_collecting): Declare.
6448 (force_unlock_trace_buffer): Declare.
6449 (handle_tracepoint_bkpts): Declare.
6450 (initialize_low_tracepoint)
6451 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6452 * target.h (struct target_ops) <stabilize_threads,
6453 install_fast_tracepoint_jump_pad>: New fields.
6454 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6455 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6456 [HAVE_STDINT_H]: Include stdint.h.
6457 (trace_debug_1): Rename to ...
6458 (trace_vdebug): ... this.
6459 (trace_debug): Rename to ...
6460 (trace_debug_1): ... this. Add `level' parameter.
6461 (trace_debug): New.
6462 (ATTR_USED, ATTR_NOINLINE): New.
6463 (IP_AGENT_EXPORT): New.
6464 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6465 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6466 (about_to_request_buffer_space, trace_buffer_is_full)
6467 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6468 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6469 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6470 (traceframe_write_count, traceframes_created)
6471 (trace_state_variables)
6472 New renaming defines.
6473 (struct ipa_sym_addresses): New.
6474 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6475 (symbol_list): New.
6476 (ipa_sym_addrs): New.
6477 (all_tracepoint_symbols_looked_up): New.
6478 (in_process_agent_loaded): New.
6479 (write_e_ipa_not_loaded): New.
6480 (maybe_write_ipa_not_loaded): New.
6481 (tracepoint_look_up_symbols): New.
6482 (debug_threads) [IN_PROCESS_AGENT]: New.
6483 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6484 (UNKNOWN_SIDE_EFFECTS): New.
6485 (stop_tracing): New.
6486 (flush_trace_buffer): New.
6487 (stop_tracing_bkpt): New.
6488 (flush_trace_buffer_bkpt): New.
6489 (read_inferior_integer): New.
6490 (read_inferior_uinteger): New.
6491 (read_inferior_data_pointer): New.
6492 (write_inferior_data_pointer): New.
6493 (write_inferior_integer): New.
6494 (write_inferior_uinteger): New.
6495 (struct collect_static_trace_data_action): Delete.
6496 (enum tracepoint_type): New.
6497 (struct tracepoint) <type>: New field `type'.
6498 <actions_str, step_actions, step_actions_str>: Only include in
6499 GDBserver.
6500 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6501 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6502 (tracepoints): Use IP_AGENT_EXPORT.
6503 (last_tracepoint): Don't include in the IPA.
6504 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6505 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6506 (alloced_trace_state_variables): New.
6507 (trace_state_variables): Use IP_AGENT_EXPORT.
6508 (traceframe_t): Delete unused variable.
6509 (circular_trace_buffer): Don't include in the IPA.
6510 (trace_buffer_start): Delete.
6511 (struct trace_buffer_control): New.
6512 (trace_buffer_free): Delete.
6513 (struct ipa_trace_buffer_control): New.
6514 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6515 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6516 New.
6517 (trace_buffer_ctrl): New.
6518 (TRACE_BUFFER_CTRL_CURR): New.
6519 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6520 Reimplement as macros.
6521 (trace_buffer_wrap): Delete.
6522 (traceframe_write_count, traceframe_read_count)
6523 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6524 (struct tracepoint_hit_ctx) <type>: New field.
6525 (struct fast_tracepoint_ctx): New.
6526 (memory_barrier): New.
6527 (cmpxchg): New.
6528 (record_tracepoint_error): Update atomically in the IPA.
6529 (clear_inferior_trace_buffer): New.
6530 (about_to_request_buffer_space): New.
6531 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6532 updating the same buffer.
6533 (add_tracepoint): Default the tracepoint's type to trap
6534 tracepoint, and orig_size to -1.
6535 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6536 internal variables.
6537 (create_trace_state_variable): New parameter `gdb'. Handle it.
6538 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6539 (cmd_qtdp): Handle fast tracepoints.
6540 (cmd_qtdv): Adjust.
6541 (max_jump_pad_size): New.
6542 (gdb_jump_pad_head): New.
6543 (get_jump_space_head): New.
6544 (claim_jump_space): New.
6545 (sort_tracepoints): New.
6546 (MAX_JUMP_SIZE): New.
6547 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6548 IPA.
6549 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6550 support. Upload fast traceframes, and delete internal IPA
6551 breakpoints.
6552 (stop_tracing_handler): New.
6553 (flush_trace_buffer_handler): New.
6554 (cmd_qtstop): Upload fast tracepoints.
6555 (response_tracepoint): Handle fast tracepoints.
6556 (tracepoint_finished_step): Upload fast traceframes. Set the
6557 tracepoint hit context's tracepoint type.
6558 (handle_tracepoint_bkpts): New.
6559 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6560 type. Add comment about fast tracepoints.
6561 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6562 non-existing action_str field.
6563 (get_context_regcache): Handle fast tracepoints.
6564 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6565 to the regcache.
6566 (fast_tracepoint_from_jump_pad_address): New.
6567 (fast_tracepoint_from_ipa_tpoint_address): New.
6568 (collecting_t): New.
6569 (force_unlock_trace_buffer): New.
6570 (fast_tracepoint_collecting): New.
6571 (collecting): New.
6572 (gdb_collect): New.
6573 (write_inferior_data_ptr): New.
6574 (target_tp_heap): New.
6575 (target_malloc): New.
6576 (download_agent_expr): New.
6577 (UALIGN): New.
6578 (download_tracepoints): New.
6579 (download_trace_state_variables): New.
6580 (upload_fast_traceframes): New.
6581 (IPA_FIRST_TRACEFRAME): New.
6582 (IPA_NEXT_TRACEFRAME_1): New.
6583 (IPA_NEXT_TRACEFRAME): New.
6584 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6585 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6586 (gdb_jump_pad_buffer_end): New.
6587 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6588 (initialize_tracepoint): Adjust.
6589 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6590 buffer. Initialize the low module.
6591 * utils.c (PREFIX, TOOLNAME): New.
6592 (malloc_failure): Use PREFIX.
6593 (error): In the IPA, an error causes an exit.
6594 (fatal, warning): Use PREFIX.
6595 (internal_error): Use TOOLNAME.
6596 (NUMCELLS): Increase to 10.
6597 * configure, config.in: Regenerate.
6598
6599 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6600
6601 * server.c (handle_query) <qSupported>: Do two passes over the
6602 qSupported string to avoid nesting strtok.
6603
6604 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6605
6606 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6607 (CDEPS): New.
6608 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6609 -Wl,--dynamic-list.
6610 * configure: Regenerate.
6611 * proc-service.list: New.
6612
6613 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6614
6615 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6616 New comment.
6617
6618 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6619
6620 * gdbreplay.c (remote_open): Check error return from socket() call by
6621 its equality to -1 not by it being negative.
6622 * remote-utils.c (remote_open): Likewise.
6623
6624 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6625
6626 * config.h: Regenerate.
6627
6628 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6629
6630 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6631 doesn't provide PTRACE_GET_THREAD_AREA.
6632
6633 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6634
6635 * linux-m68k-low.c: Include <asm/ptrace.h>
6636 (ps_get_thread_area): Implement.
6637
6638 2010-05-03 Doug Evans <dje@google.com>
6639
6640 * event-loop.c (struct callback_event): New struct.
6641 (callback_list): New global.
6642 (append_callback_event, delete_callback_event): New functions.
6643 (process_callback): New function.
6644 (start_event_loop): Call it.
6645 * remote-utils.c (NOT_SCHEDULED): Define.
6646 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6647 moved out of readchar.
6648 (readchar): Rewrite. Call reschedule before returning.
6649 (reset_readchar): New function.
6650 (remote_close): Call it.
6651 (process_remaining, reschedule): New functions.
6652 * server.h (callback_handler_func): New typedef.
6653 (append_callback_event, delete_callback_event): Declare.
6654
6655 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6656
6657 * proc-service.c (ps_pglobal_lookup): Use
6658 thread_db_look_up_one_symbol.
6659 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6660 parameter. Use it instead of all_symbols_looked_up.
6661 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6662 field.
6663 (all_symbols_looked_up): Don't declare.
6664 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6665 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6666 field.
6667 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6668 Set all_symbols_looked_up here.
6669 (thread_db_look_up_one_symbol): New.
6670 (thread_db_get_tls_address): Adjust.
6671 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6672 thread_db object on the heap, and tentatively set it in the
6673 process structure.
6674 (thread_db_init): Don't set all_symbols_looked_up here.
6675 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6676
6677 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6678
6679 * linux-low.c (linux_kill, linux_detach): Adjust.
6680 (status_pending_p_callback): Remove redundant statement. Check
6681 for !TARGET_WAITIKIND_IGNORE, instead of
6682 TARGET_WAITKIND_STOPPED.
6683 (handle_tracepoints): Make sure LWP is locked. Adjust.
6684 (linux_wait_for_event_1): Adjust.
6685 (linux_cancel_breakpoints): New.
6686 (unsuspend_one_lwp): New.
6687 (unsuspend_all_lwps): New.
6688 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6689 (send_sigstop_callback): Change return type to int, add new
6690 `except' parameter and handle it.
6691 (suspend_and_send_sigstop_callback): New.
6692 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6693 pass them down. If SUSPEND, also increment the lwp's suspend
6694 count.
6695 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6696 (need_step_over_p): Don't consider suspended LWPs.
6697 (start_step_over): Adjust.
6698 (proceed_one_lwp): Change return type to int, add new `except'
6699 parameter and handle it.
6700 (unsuspend_and_proceed_one_lwp): New.
6701 (proceed_all_lwps): Use find_inferior instead of
6702 for_each_inferior.
6703 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6704 also decrement the suspend count of LWPs. Pass `except' down,
6705 instead of hacking its suspend count.
6706 (linux_pause_all): Add `freeze' parameter. Adjust.
6707 (linux_unpause_all): New.
6708 (linux_target_ops): Install linux_unpause_all.
6709 * server.c (handle_status): Adjust.
6710 * target.h (struct target_ops): New fields `unpause_all' and
6711 `cancel_breakpoints'. Add new parameter to `pause_all'.
6712 (pause_all): Add new `freeze' parameter.
6713 (unpause_all): New.
6714 (cancel_breakpoints): New.
6715 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6716 cancel breakpoints.
6717 (cmd_qtstart): Pause threads.
6718 (stop_tracing): Pause threads, and cancel breakpoints.
6719 * win32-low.c (win32_target_ops): Adjust.
6720
6721 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6722
6723 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6724 the inferior right away from here...
6725 (linux_wait_1): ... to here, and adjust to check the thread's
6726 last_resume_kind instead of the lwp's step or stop_expected flags.
6727
6728 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6729
6730 * README: Use consistent `GDB' and `GDBserver' spellings.
6731
6732 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6733
6734 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6735 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6736 (linux_detach_one_lwp): Assume the lwp is stopped.
6737 (any_thread_of): Delete.
6738 (linux_detach): Stop all lwps here. Don't blindly delete all
6739 breakpoints.
6740 (delete_lwp_callback): New.
6741 (linux_mourn): Delete all lwps of the process that is gone.
6742 (linux_wait_1): Don't delete the last lwp of the process here.
6743 * mem-break.h (mark_breakpoints_out): Declare.
6744 * mem-break.c (mark_breakpoints_out): New.
6745 (free_all_breakpoints): Use it.
6746 * server.c (handle_target_event): If the process is gone, mark
6747 breakpoints out.
6748 * thread-db.c (struct thread_db) <create_bp>: New field.
6749 (thread_db_enable_reporting): Fix prototype. Store a thread event
6750 breakpoint reference in the thread_db struct.
6751 (thread_db_load_search): Clear the thread_db object.
6752 (try_thread_db_load_1): Ditto.
6753 (switch_to_process): New.
6754 (disable_thread_event_reporting): Use it.
6755 (remove_thread_event_breakpoints): New.
6756 (thread_db_detach, thread_db_mourn): Use it.
6757
6758 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6759
6760 * linux-low.c (linux_enable_event_reporting): New.
6761 (linux_wait_for_event_1, handle_extended_wait): Use it.
6762
6763 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6764
6765 * linux-low.c (linux_kill_one_lwp, linux_kill)
6766 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6767 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6768 SIGSTOP even if the LWP is stopped.
6769 (send_sigstop_callback): New.
6770 (stop_all_lwps): Use send_sigstop_callback instead.
6771 (linux_resume_one_thread): Adjust.
6772 (proceed_one_lwp): Still proceed an LWP that the client has
6773 requested to stop, if we haven't reported it as stopped yet. Make
6774 sure that LWPs the client want stopped, have a pending SIGSTOP.
6775
6776 2010-04-26 Doug Evans <dje@google.com>
6777
6778 * server.c (handle_general_set): Make static.
6779
6780 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6781 Print received char after testing for error/eof instead of before.
6782 (input_interrupt): Tweak comment.
6783
6784 2010-04-23 Doug Evans <dje@google.com>
6785
6786 * server.c (start_inferior): Print inferior argv if --debug.
6787
6788 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6789
6790 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6791 * nto-x86-low.c: Include server.h
6792
6793 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6794
6795 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6796 be consistent with other sources of this directory.
6797 (init_registers_amd64): Correct name of source file of this function
6798 in the comment.
6799
6800 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6801
6802 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6803 64-bit executables.
6804
6805 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6806
6807 * win32-i386-low.c: Add 64-bit support.
6808 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6809 (init_registers_amd64): Declare.
6810 (mappings): Add 64-bit version of array.
6811 (init_windows_x86): New function.
6812 (the_low_target): Change init_arch field to init_windows_x86.
6813
6814 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6815
6816 * win32-low.c: Adapt to support also 64-bit architecture.
6817 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6818 (get_image_name): Use SIZE_T type for local variable `done'.
6819 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6820 (toolhelp_get_dll_name): Idem.
6821 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6822 Use uintptr_t typecast to avoid warning.
6823 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6824 (handle_exception): Use phex_nz to avoid warning.
6825 (win32_wait): Remove unused local variable `process'.
6826
6827 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6828
6829 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6830 `amd64-avx.o'.
6831
6832 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6833
6834 * configure.ac: Use `ws2_32' library for srv_mingw.
6835 * configure: Regenerate.
6836 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6837 * remote-utils.c: Likewise.
6838
6839 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6840
6841 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6842 if __x86_64__ is defined.
6843
6844 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6845
6846 * configure: Regenerate.
6847
6848 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6849
6850 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6851 * target.h (target_ops): New get_tib_address field.
6852 * win32-low.h (win32_thread_info): Add thread_local_base field.
6853 * win32-low.c (child_add_thread): Add tlb argument.
6854 Set thread_local_base field to TLB.
6855 (get_child_debug_event): Adapt to child_add_thread change.
6856 (win32_get_tib_address): New function.
6857 (win32_target_ops): Set get_tib_address field to
6858 win32_get_tib_address.
6859 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6860
6861 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6862
6863 * linux-low.c (linux_mourn): Also remove the process.
6864 * server.c (handle_target_event): Don't remove the process here.
6865 * nto-low.c (nto_mourn): New.
6866 (nto_target_ops): Install it.
6867 * spu-low.c (spu_mourn): New.
6868 (spu_target_ops): Install it.
6869 * win32-low.c (win32_mourn): New.
6870 (win32_target_ops): Install it.
6871
6872 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6873
6874 * server.h (buffer_xml_printf): Remove redundant `;'.
6875
6876 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6877
6878 * regcache.c (set_register_cache): Invalidate regcaches before
6879 changing the register cache layout.
6880 (regcache_invalidate_one): Allow a NULL regcache.
6881 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6882 regcaches before changing the register cache layout or the target
6883 regsets.
6884
6885 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6886
6887 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6888 variable warning on Linux/x86-64.
6889
6890 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6891
6892 GDBserver disconnected tracing support.
6893
6894 * linux-low.c (linux_remove_process): Delete.
6895 (add_lwp): Don't set last_resume_kind here.
6896 (linux_kill): Use `mourn'.
6897 (linux_detach): Use `thread_db_detach', and `mourn'.
6898 (linux_mourn): New.
6899 (linux_attach_lwp_1): Adjust comment.
6900 (linux_attach): last_resume_kind moved the thread_info; adjust.
6901 (status_pending_p_callback): Adjust.
6902 (linux_wait_for_event_1): Adjust.
6903 (count_events_callback, select_singlestep_lwp_callback)
6904 (select_event_lwp_callback, cancel_breakpoints_callback)
6905 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6906 (proceed_one_lwp): Adjust.
6907 (linux_async): Add debug output.
6908 (linux_thread_stopped): New.
6909 (linux_pause_all): New.
6910 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6911 linux_pause_all.
6912 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6913 (thread_db_free): Delete declaration.
6914 (thread_db_detach, thread_db_mourn): Declare.
6915 * thread-db.c (thread_db_init): Use thread_db_mourn.
6916 (thread_db_free): Delete, split in two.
6917 (disable_thread_event_reporting): New.
6918 (thread_db_detach): New.
6919 (thread_db_mourn): New.
6920
6921 * server.h (struct thread_info) <last_resume_kind>: New field.
6922 <attached>: Add comment.
6923 <gdb_detached>: New field.
6924 (handler_func): Change return type to int.
6925 (handle_serial_event, handle_target_event): Ditto.
6926 (gdb_connected): Declare.
6927 (tracing): Delete.
6928 (disconnected_tracing): Declare.
6929 (stop_tracing): Declare.
6930
6931 * server.c (handle_query) <qSupported>: Report support for
6932 disconnected tracing.
6933 (queue_stop_reply_callback): Account for running threads.
6934 (gdb_wants_thread_stopped): New.
6935 (gdb_wants_all_threads_stopped): New.
6936 (gdb_reattached_process): New.
6937 (handle_status): Clear the `gdb_detached' flag of all processes.
6938 In all-stop, stop all threads.
6939 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6940 (process_serial_event): If the remote connection breaks, or if an
6941 exit was forced with "monitor exit", force an event loop exit.
6942 Handle disconnected tracing on detach.
6943 (handle_serial_event): Adjust.
6944 (handle_target_event): If GDB isn't connected, forward events back
6945 to the inferior, unless the last process exited, in which case,
6946 exit gdbserver. Adjust interface.
6947
6948 * remote-utils.c (remote_open): Don't block in accept. Instead
6949 register an event loop source on the listen socket file
6950 descriptor. Refactor bits into ...
6951 (listen_desc): ... this new global.
6952 (gdb_connected): ... this new function.
6953 (enable_async_notification): ... this new function.
6954 (handle_accept_event): ... this new function.
6955 (remote_close): Clear remote_desc.
6956
6957 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6958
6959 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6960 New fields.
6961 (mourn_inferior): Define.
6962 (target_process_qsupported): Avoid the dangling else problem.
6963 (thread_stopped): Define.
6964 (pause_all): Define.
6965 (target_waitstatus_to_string): Declare.
6966 * target.c (target_waitstatus_to_string): New.
6967
6968 * tracepoint.c (tracing): Make extern.
6969 (disconnected_tracing): New.
6970 (stop_tracing): Make extern. Handle tracing stops due to GDB
6971 disconnecting.
6972 (cmd_qtdisconnected): New.
6973 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6974 (handle_tracepoint_general_set): Handle QTDisconnected.
6975
6976 * event-loop.c (event_handler_func): Change return type to int.
6977 (process_event): Bail out if the event handler wants the event
6978 loop to stop.
6979 (handle_file_event): Ditto.
6980 (start_event_loop): Bail out if the event handler wants the event
6981 loop to stop.
6982
6983 * nto-low.c (nto_target_ops): Adjust.
6984 * spu-low.c (spu_wait): Don't remove the process here.
6985 (spu_target_ops): Adjust.
6986 * win32-low.c (win32_wait): Don't remove the process here.
6987 (win32_target_ops): Adjust.
6988
6989 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6990
6991 * regcache.c (realloc_register_cache): Invalidate inferior's
6992 regcache before recreating it.
6993
6994 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6995
6996 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6997
6998 2010-04-09 Stan Shebs <stan@codesourcery.com>
6999 Pedro Alves <pedro@codesourcery.com>
7000
7001 * server.h (LONGEST): New.
7002 (struct thread_info) <while_stepping>: New field.
7003 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7004 Declare.
7005 (initialize_tracepoint, handle_tracepoint_general_set)
7006 (handle_tracepoint_query, tracepoint_finished_step)
7007 (tracepoint_was_hit, release_while_stepping_state_list):
7008 (current_traceframe): Declare.
7009 * server.c (handle_general_set): Handle tracepoint packets.
7010 (read_memory): New.
7011 (write_memory): New.
7012 (handle_search_memory_1): Use read_memory.
7013 (handle_query): Report support for conditional tracepoints, trace
7014 state variables, and tracepoint sources. Handle tracepoint
7015 queries.
7016 (main): Initialize the tracepoints module.
7017 (process_serial_event): Handle traceframe reads/writes.
7018
7019 * linux-low.c (handle_tracepoints): New.
7020 (linux_wait_1): Call it.
7021 (linux_resume_one_lwp): Handle while-stepping.
7022 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7023 (linux_target_ops): Install them.
7024 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7025 New field.
7026 * linux-x86-low.c (x86_supports_tracepoints): New.
7027 (the_low_target). Install it.
7028
7029 * mem-break.h (delete_breakpoint): Declare.
7030 * mem-break.c (delete_breakpoint): Make external.
7031
7032 * target.h (struct target_ops): Add `supports_tracepoints',
7033 `read_pc', and `write_pc' fields.
7034 (target_supports_tracepoints): Define.
7035 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7036 (phex_nz): New.
7037
7038 * regcache.h (struct regcache) <registers_owned>: New field.
7039 (init_register_cache, regcache_cpy): Declare.
7040 (regcache_read_pc, regcache_write_pc): Declare.
7041 (register_cache_size): Declare.
7042 (supply_regblock): Declare.
7043 * regcache.c (init_register_cache): New.
7044 (new_register_cache): Use it.
7045 (regcache_cpy): New.
7046 (register_cache_size): New.
7047 (supply_regblock): New.
7048 (regcache_read_pc, regcache_write_pc): New.
7049
7050 * tracepoint.c: New.
7051
7052 * Makefile.in (OBS): Add tracepoint.o.
7053 (tracepoint.o): New rule.
7054
7055 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7056
7057 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7058 (i386-mmx.o): New.
7059 (i386-mmx.c): Likewise.
7060 (i386-mmx-linux.o): Likewise.
7061 (i386-mmx-linux.c): Likewise.
7062
7063 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7064 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7065 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7066 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7067
7068 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7069 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7070 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7071
7072 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7073
7074 * Makefile.in (clean): Updated.
7075 (i386-avx.o): New.
7076 (i386-avx.c): Likewise.
7077 (i386-avx-linux.o): Likewise.
7078 (i386-avx-linux.c): Likewise.
7079 (amd64-avx.o): Likewise.
7080 (amd64-avx.c): Likewise.
7081 (amd64-avx-linux.o): Likewise.
7082 (amd64-avx-linux.c): Likewise.
7083
7084 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7085 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7086 (srv_amd64_regobj): Add amd64-avx.o.
7087 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7088 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7089 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7090 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7091 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7092 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7093 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7094
7095 * i387-fp.c: Include "i386-xstate.h".
7096 (i387_xsave): New.
7097 (i387_cache_to_xsave): Likewise.
7098 (i387_xsave_to_cache): Likewise.
7099 (x86_xcr0): Likewise.
7100
7101 * i387-fp.h (i387_cache_to_xsave): Likewise.
7102 (i387_xsave_to_cache): Likewise.
7103 (x86_xcr0): Likewise.
7104
7105 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7106 * linux-crisv32-low.c (target_regsets): Likewise.
7107 * linux-m68k-low.c (target_regsets): Likewise.
7108 * linux-mips-low.c (target_regsets): Likewise.
7109 * linux-ppc-low.c (target_regsets): Likewise.
7110 * linux-s390-low.c (target_regsets): Likewise.
7111 * linux-sh-low.c (target_regsets): Likewise.
7112 * linux-sparc-low.c (target_regsets): Likewise.
7113 * linux-xtensa-low.c (target_regsets): Likewise.
7114
7115 * linux-low.c: Include <sys/uio.h>.
7116 (regsets_fetch_inferior_registers): Support nt_type.
7117 (regsets_store_inferior_registers): Likewise.
7118 (linux_process_qsupported): New.
7119 (linux_target_ops): Add linux_process_qsupported.
7120
7121 * linux-low.h (regset_info): Add nt_type.
7122 (linux_target_ops): Add process_qsupported.
7123
7124 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7125 and <sys/uio.h>.
7126 (init_registers_i386_avx_linux): New.
7127 (init_registers_amd64_avx_linux): Likewise.
7128 (xmltarget_i386_linux_no_xml): Likewise.
7129 (xmltarget_amd64_linux_no_xml): Likewise.
7130 (PTRACE_GETREGSET): Likewise.
7131 (PTRACE_SETREGSET): Likewise.
7132 (x86_fill_xstateregset): Likewise.
7133 (x86_store_xstateregset): Likewise.
7134 (use_xml): Likewise.
7135 (x86_linux_update_xmltarget): Likewise.
7136 (x86_linux_process_qsupported): Likewise.
7137 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7138 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7139 init_registers_i386_linux here. Call
7140 x86_linux_update_xmltarget.
7141 (the_low_target): Add x86_linux_process_qsupported.
7142
7143 * server.c (handle_query): Call target_process_qsupported.
7144
7145 * target.h (target_ops): Add process_qsupported.
7146 (target_process_qsupported): New.
7147
7148 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7149
7150 * inferiors.c (add_thread): Set last_status kind to
7151 TARGET_WAITKIND_IGNORE.
7152 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7153 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7154 (linux_wait_1): Move `thread' local definition to block that uses
7155 it. Don't NULL initialize `event_child'.
7156 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7157 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7158 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7159
7160 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7161
7162 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7163 an extended waitstatus, or by a watchpoint.
7164 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7165 thread was stepping or has been stopped by a watchpoint.
7166
7167 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7168
7169 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7170 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7171 of another, then delete the previous, and validate all
7172 breakpoints.
7173 (validate_inserted_breakpoint): New.
7174 (delete_disabled_breakpoints): New.
7175 (validate_breakpoints): New.
7176 (check_mem_read): Validate breakpoints before trusting their
7177 shadow. Delete disabled breakpoints.
7178 (check_mem_write): Validate breakpoints before trusting they
7179 should be inserted. Delete disabled breakpoints.
7180 * mem-break.h (validate_breakpoints):
7181 * server.c (handle_query): Validate breakpoints when we see a
7182 qSymbol query.
7183
7184 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7185
7186 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7187 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7188 if we could tell there's a GDB breakpoint at stop_pc.
7189 (need_step_over_p): Don't do a step over if we find a GDB
7190 breakpoint at the resume PC.
7191
7192 * mem-break.c (struct raw_breakpoint): New.
7193 (enum bkpt_type): New type `gdb_breakpoint'.
7194 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7195 fields. New field `raw'.
7196 (find_raw_breakpoint_at): New.
7197 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7198 breakpoint instead.
7199 (set_breakpoint_at): Adjust.
7200 (delete_raw_breakpoint): New.
7201 (release_breakpoint): New.
7202 (delete_breakpoint): Rename to...
7203 (delete_breakpoint_1): ... this. Add proc parameter. Use
7204 release_breakpoint. Return ENOENT.
7205 (delete_breakpoint): Reimplement.
7206 (find_breakpoint_at): Delete.
7207 (find_gdb_breakpoint_at): New.
7208 (delete_breakpoint_at): Delete.
7209 (set_gdb_breakpoint_at): New.
7210 (delete_gdb_breakpoint_at): New.
7211 (gdb_breakpoint_here): New.
7212 (set_reinsert_breakpoint): Use release_breakpoint.
7213 (uninsert_breakpoint): Rename to ...
7214 (uninsert_raw_breakpoint): ... this.
7215 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7216 (reinsert_raw_breakpoint): Change parameter type to
7217 raw_breakpoint.
7218 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7219 instead.
7220 (check_breakpoints): Adjust. Use release_breakpoint.
7221 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7222 (breakpoint_inserted_here): Ditto.
7223 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7224 Don't trust the breakpoint's shadow if it is not inserted.
7225 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7226 (delete_all_breakpoints): Adjust.
7227 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7228 use delete_breakpoint_1.
7229
7230 * mem-break.h (breakpoints_supported): Delete declaration.
7231 (set_gdb_breakpoint_at): Declare.
7232 (gdb_breakpoint_here): Declare.
7233 (delete_breakpoint_at): Delete.
7234 (delete_gdb_breakpoint_at): Declare.
7235
7236 * server.h (struct raw_breakpoint): Forward declare.
7237 (struct process_info): New field `raw_breakpoints'.
7238
7239 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7240 breakpoints.
7241
7242 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7243
7244 * linux-low.c (status_pending_p_callback): Fix comment.
7245 (linux_wait_for_event_1): Move most of the internal breakpoint
7246 handling from here...
7247 (linux_wait_1): ... to here.
7248 (count_events_callback): New.
7249 (select_singlestep_lwp_callback): New.
7250 (select_event_lwp_callback): New.
7251 (cancel_breakpoints_callback): New.
7252 (select_event_lwp): New.
7253 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7254 priority to all LWPs that have had events that should be reported
7255 to the client. Cancel breakpoints when about to reporting the
7256 event to the client, not while stopping lwps. No longer cancel
7257 finished single-steps here.
7258 (cancel_finished_single_step): Delete.
7259 (cancel_finished_single_steps): Delete.
7260
7261 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7262
7263 * mem-break.c (enum bkpt_type): New.
7264 (struct breakpoint): New field `type'.
7265 (set_breakpoint_at): Change return type to struct breakpoint
7266 pointer. Set type to `other_breakpoint' by default.
7267 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7268 in the breakpoint list.
7269 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7270 (reinsert_breakpoint): Rename to ...
7271 (reinsert_raw_breakpoint): ... this.
7272 (reinsert_breakpoints_at): Adjust.
7273 * mem-break.h (struct breakpoint): Declare.
7274 (set_breakpoint_at): Change return type to struct breakpoint
7275 pointer.
7276
7277 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7278
7279 * server.c (handle_query): Assign, not compare.
7280
7281 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7282
7283 Teach linux gdbserver to step-over-breakpoints.
7284
7285 * linux-low.c (can_hardware_single_step): New.
7286 (supports_breakpoints): New.
7287 (handle_extended_wait): If stopping threads, read the stop pc of
7288 the new cloned LWP.
7289 (get_pc): New.
7290 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7291 low target doesn't support retrieving the PC.
7292 (add_lwp): Set last_resume_kind to resume_continue.
7293 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7294 (linux_attach): Don't clear stop_expected. Set the lwp's
7295 last_resume_kind to resume_stop.
7296 (linux_detach_one_lwp): Don't check for removed breakpoints.
7297 (check_removed_breakpoint): Delete.
7298 (status_pending_p): Rename to ...
7299 (status_pending_p_callback): ... this. Don't check for removed
7300 breakpoints. Don't consider threads that are stopped from GDB's
7301 perspective.
7302 (linux_wait_for_lwp): Always read the stop_pc here.
7303 (cancel_breakpoint): New.
7304 (step_over_bkpt): New global.
7305 (linux_wait_for_event_1): Implement stepping over breakpoints.
7306 (gdb_wants_lwp_stopped): New.
7307 (gdb_wants_all_stopped): New.
7308 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7309 single-step traps here. Store the thread's last reported target
7310 wait status.
7311 (send_sigstop): Don't clear stop_expected. Always set it,
7312 instead.
7313 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7314 (cancel_finished_single_step): New.
7315 (cancel_finished_single_steps): New.
7316 (wait_for_sigstop): Don't cancel finished single-step traps here.
7317 (linux_resume_one_lwp): Don't check for removed breakpoints.
7318 Don't set `step' on non-hardware step archs.
7319 (linux_set_resume_request): Ignore resume_stop requests if already
7320 stopping or stopped. Set the lwp's last_resume_kind.
7321 (resume_status_pending_p): Don't check for removed breakpoints.
7322 (need_step_over_p): New.
7323 (start_step_over): New.
7324 (finish_step_over): New.
7325 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7326 requests. Clear the thread's last reported target waitstatus.
7327 Don't use the `suspended' flag. Don't consider pending breakpoints.
7328 (linux_resume): Start a step-over if necessary.
7329 (proceed_one_lwp): New.
7330 (proceed_all_lwps): New.
7331 (unstop_all_lwps): New.
7332 * linux-low.h (struct lwp_info): Rewrite comment for the
7333 `suspended' flag. Add the `stop_pc' field. Delete the
7334 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7335 Add `'last_resume_kind' and `need_step_over' fields.
7336 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7337 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7338 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7339 (set_raw_breakpoint_at): New.
7340 (set_breakpoint_at): Rewrite to use it.
7341 (reinsert_breakpoint_handler): Delete.
7342 (set_reinsert_breakpoint): New.
7343 (reinsert_breakpoint_by_bp): Delete.
7344 (delete_reinsert_breakpoints): New.
7345 (uninsert_breakpoint): Rewrite.
7346 (uninsert_breakpoints_at): New.
7347 (reinsert_breakpoint): Rewrite.
7348 (reinsert_breakpoints_at): New.
7349 (check_breakpoints): Rewrite.
7350 (breakpoint_here): New.
7351 (breakpoint_inserted_here): New.
7352 (check_mem_read): Adjust.
7353 * mem-break.h (breakpoints_supported, breakpoint_here)
7354 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7355 (reinsert_breakpoint_by_bp): Delete declaration.
7356 (delete_reinsert_breakpoints): Declare.
7357 (reinsert_breakpoint): Delete declaration.
7358 (reinsert_breakpoints_at): Declare.
7359 (uninsert_breakpoint): Delete declaration.
7360 (uninsert_breakpoints_at): Declare.
7361 (check_breakpoints): Adjust prototype.
7362 * server.h: Adjust include order.
7363 (struct thread_info): Declare here. Add a `last_status' field.
7364
7365 2010-03-23 Michael Snyder <msnyder@vmware.com>
7366
7367 * server.c (crc32): New function.
7368 (handle_query): Add handling for 'qCRC:' request.
7369
7370 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7371
7372 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7373 lwp had been stopped by a watchpoint.
7374
7375 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7376
7377 * server.h (internal_error): Declare.
7378 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7379 * utils.c (internal_error): New function.
7380
7381 2010-03-15 Andreas Schwab <schwab@redhat.com>
7382
7383 * configure.srv: Fix typo setting srv_regobj.
7384
7385 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7386
7387 * linux-low.c (fetch_register): Avoid passing a non string literal
7388 format to `error'.
7389 (usr_store_inferior_registers): Ditto.
7390
7391 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7392
7393 * linux-low.c (linux_write_memory): Bail out early if peeking
7394 memory failed.
7395
7396 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7397
7398 * linux-low.h (struct lwp_info): New fields
7399 `stopped_by_watchpoint' and `stopped_data_address'.
7400 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7401 here, and cache them in the lwp object.
7402 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7403 directly.
7404 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7405 field.
7406 (linux_stopped_by_watchpoint): Rewrite.
7407 (linux_stopped_data_address): Rewrite.
7408
7409 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7410
7411 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7412 switching the current inferior, not before.
7413
7414 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7415
7416 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7417 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7418 i386-linux.c and amd64-linux.c.
7419 (reg-i386.o): Removed.
7420 (reg-i386.c): Likewise.
7421 (reg-i386-linux.o): Likewise.
7422 (reg-i386-linux.c): Likewise.
7423 (reg-x86-64.o): Likewise.
7424 (reg-x86-64.c): Likewise.
7425 (reg-x86-64-linux.o): Likewise.
7426 (reg-x86-64-linux.c): Likewise.
7427 (i386.o): New.
7428 (i386.c): Likewise.
7429 (i386-linux.o): Likewise.
7430 (i386-linux.c): Likewise.
7431 (amd64.o): Likewise.
7432 (amd64.c): Likewise.
7433 (amd64-linux.o): Likewise.
7434 (amd64-linux.c): Likewise.
7435
7436 * configure.srv (srv_i386_regobj): New.
7437 (srv_i386_linux_regobj): Likewise.
7438 (srv_amd64_regobj): Likewise.
7439 (srv_amd64_linux_regobj): Likewise.
7440 (srv_i386_32bit_xmlfiles): Likewise.
7441 (srv_i386_64bit_xmlfiles): Likewise.
7442 (srv_i386_xmlfiles): Likewise.
7443 (srv_amd64_xmlfiles): Likewise.
7444 (srv_i386_linux_xmlfiles): Likewise.
7445 (srv_amd64_linux_xmlfiles): Likewise.
7446 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7447 srv_xmlfiles to $srv_i386_xmlfiles.
7448 (i[34567]86-*-mingw32ce*): Likewise.
7449 (i[34567]86-*-mingw*): Likewise.
7450 (i[34567]86-*-nto*): Likewise.
7451 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7452 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7453 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7454 (x86_64-*-linux*): Likewise.
7455
7456 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7457 (init_registers_amd64_linux): New.
7458 (x86_arch_setup): Replace init_registers_x86_64_linux with
7459 init_registers_amd64_linux.
7460
7461 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7462
7463 * configure.ac: Check for libdl. If it is not available link against
7464 static libthread_db.
7465 * configure: Regenerate.
7466
7467 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7468
7469 PR9605
7470
7471 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7472 handing a read watchpoint.
7473 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7474
7475 2010-02-12 Doug Evans <dje@google.com>
7476
7477 * linux-low.c (linux_supports_tracefork_flag): Document.
7478 (linux_look_up_symbols): Add comment.
7479
7480 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7481
7482 * regcache.c (supply_register): Clear regcache if buf is NULL.
7483
7484 2010-02-02 Nicolas Roche <roche@sourceware.org>
7485 Joel Brobecker <brobecker@adacore.com>
7486
7487 * inferiors.c (find_inferior): Add function documentation.
7488 (unloaded_dll): Handle the case where the unloaded dll has not
7489 been previously registered in the dll list.
7490
7491 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7492
7493 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7494 (thumb2_breakpoint): New.
7495 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7496
7497 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7498
7499 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7500 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7501 breakpoints.
7502
7503 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7504
7505 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7506
7507 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7508
7509 * linux-s390-low.c (s390_collect_ptrace_register)
7510 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7511
7512 2010-01-21 Doug Evans <dje@google.com>
7513
7514 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7515 (PTRACE_ARG4_TYPE): New macro.
7516 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7517 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7518 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7519 (usr_store_inferior_registers): Ditto.
7520 (linux_read_memory, linux_write_memory): Ditto.
7521 (linux_test_for_tracefork): Ditto.
7522
7523 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7524 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7525
7526 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7527
7528 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7529 target.
7530
7531 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7532
7533 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7534 prototype to take a regcache. Adjust.
7535
7536 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7537
7538 * regcache.h (struct thread_info): Forward declare.
7539 (struct regcache): New.
7540 (new_register_cache): Adjust prototype.
7541 (get_thread_regcache): Declare.
7542 (free_register_cache): Adjust prototype.
7543 (registers_to_string, registers_from_string): Ditto.
7544 (supply_register, supply_register_by_name, collect_register)
7545 (collect_register_as_string, collect_register_by_name): Ditto.
7546 * regcache.c (struct inferior_regcache_data): Delete.
7547 (get_regcache): Rename to ...
7548 (get_thread_regcache): ... this. Adjust. Switch inferior before
7549 fetching registers.
7550 (regcache_invalidate_one): Adjust.
7551 (regcache_invalidate): Fix prototype.
7552 (new_register_cache): Return the new register cache.
7553 (free_register_cache): Change prototype.
7554 (realloc_register_cache): Adjust.
7555 (registers_to_string): Change prototype to take a regcache. Adjust.
7556 (registers_from_string): Ditto.
7557 (register_data): Ditto.
7558 (supply_register): Ditto.
7559 (supply_register_by_name): Ditto.
7560 (collect_register): Ditto.
7561 (collect_register_as_string): Ditto.
7562 (collect_register_by_name): Ditto.
7563 * server.c (process_serial_event): Adjust.
7564 * linux-low.h (regset_fill_func, regset_store_func): Change
7565 prototype.
7566 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7567 Change prototype.
7568 * linux-low.c (get_stop_pc): Adjust.
7569 (check_removed_breakpoint): Adjust.
7570 (linux_wait_for_event): Adjust.
7571 (linux_resume_one_lwp): Adjust.
7572 (fetch_register): Add regcache parameter. Adjust.
7573 (usr_store_inferior_registers): Ditto.
7574 (regsets_fetch_inferior_registers): Ditto.
7575 (regsets_store_inferior_registers): Ditto.
7576 (linux_fetch_registers, linux_store_registers): Ditto.
7577 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7578 regcache. Adjust.
7579 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7580 Ditto.
7581 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7582 prototype to take a regcache.
7583 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7584 * remote-utils.c (convert_ascii_to_int, outreg)
7585 (prepare_resume_reply): Change prototype to take a regcache.
7586 Adjust.
7587 * target.h (struct target_ops) <fetch_registers, store_registers>:
7588 Change prototype to take a regcache.
7589 (fetch_inferior_registers, store_inferior_registers): Change
7590 prototype to take a regcache. Adjust.
7591 * proc-service.c (ps_lgetregs): Adjust.
7592 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7593 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7594 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7595 take a regcache. Adjust.
7596 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7597 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7598 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7599 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7600 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7601 (cris_cannot_fetch_register):
7602 (cris_breakpoint_at): Change prototype to take a regcache.
7603 Adjust.
7604 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7605 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7606 to take a regcache. Adjust.
7607 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7608 Adjust.
7609 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7610 take a regcache. Adjust.
7611 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7612 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7613 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7614 * linux-mips-low.c (mips_get_pc):
7615 (mips_set_pc): Change prototype to take a regcache. Adjust.
7616 (mips_reinsert_addr): Adjust.
7617 (mips_collect_register): Change prototype to take a regcache.
7618 Adjust.
7619 (mips_supply_register):
7620 (mips_collect_register_32bit, mips_supply_register_32bit)
7621 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7622 (mips_store_fpregset): Ditto.
7623 * linux-ppc-low.c (ppc_supply_ptrace_register)
7624 (ppc_supply_ptrace_register): Ditto.
7625 (parse_spufs_run): Adjust.
7626 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7627 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7628 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7629 take a regcache. Adjust.
7630 * linux-s390-low.c (s390_collect_ptrace_register)
7631 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7632 (s390_set_pc): Change prototype to take a regcache. Adjust.
7633 (s390_arch_setup): Adjust.
7634 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7635 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7636 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7637 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7638 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7639 regcache. Adjust.
7640 (sparc_breakpoint_at): Adjust.
7641 * linux-xtensa-low.c (xtensa_fill_gregset):
7642 (xtensa_store_gregset):
7643 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7644 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7645 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7646 prototype to take a regcache. Adjust.
7647 * win32-arm-low.c (arm_fetch_inferior_register)
7648 (arm_store_inferior_register): Change prototype to take a
7649 regcache. Adjust.
7650 * win32-i386-low.c (i386_fetch_inferior_register)
7651 (i386_store_inferior_register): Change prototype to take a
7652 regcache. Adjust.
7653 * win32-low.c (child_fetch_inferior_registers)
7654 (child_store_inferior_registers): Change prototype to take a
7655 regcache. Adjust.
7656 (win32_wait): Adjust.
7657 (win32_fetch_inferior_registers): Change prototype to take a
7658 regcache. Adjust.
7659 (win32_store_inferior_registers): Adjust.
7660 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7661 store_inferior_register>: Change prototype to take a regcache.
7662
7663 2010-01-20 Doug Evans <dje@google.com>
7664
7665 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7666 #ifdef.
7667 (linux_wait_for_event1, linux_init_signals): Ditto.
7668 (W_STOPCODE): Provide definition if missing.
7669
7670 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7671
7672 * linux-low.c (linux_core_of_thread): New.
7673 (compare_ints, show_process, list_threads): New.
7674 (linux_qxfer_osdata): Report threads and cores.
7675 (linux_target_op): Register linux_core_of_thread.
7676 * remote-utils.c (prepare_resume_reply): Report the core.
7677 (buffer_xml_printf): Support %d specifier.
7678 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7679 New.
7680 (handle_query): Handle qXfer:threads. Announce availability
7681 thereof.
7682 * target.h (struct target_ops): New field core_of_thread.
7683
7684 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7685
7686 * Makefile.in (clean): Remove new generated files.
7687 (reg-s390.o, reg-s390.c): Remove rules.
7688 (reg-s390x.o, reg-s390x.c): Likewise.
7689 (s390-linux32.o, s390-linux32.c): Add rules.
7690 (s390-linux64.o, s390-linux64.c): Likewise.
7691 (s390x-linux64.o, s390x-linux64.c): Likewise.
7692 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7693 * linux-s390-low.c: Include <elf.h>.
7694 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7695 (init_registers_s390): Remove prototype.
7696 (init_registers_s390x): Likewise.
7697 (init_registers_s390_linux32): Add prototype.
7698 (init_registers_s390_linux64): Likewise.
7699 (init_registers_s390x_linux64): Likewise.
7700 (s390_num_regs_3264): New define.
7701 (s390_regmap_3264): New global variable.
7702 (s390_cannot_fetch_register): Remove obsolete check.
7703 (s390_cannot_store_register): Likewise.
7704 (s390_collect_ptrace_register): Handle upper/lower register halves.
7705 (s390_supply_ptrace_register): Likewise.
7706 (s390_fill_gregset): Update to register number changes.
7707 (s390_get_hwcap): New routine.
7708 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7709 Install appropriate regmap and register set.
7710
7711 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7712
7713 * server.c (gdbserver_version): Update copyright year to 2010.
7714 * gdbreplay.c (gdbreplay_version): Likewise.
7715
7716 2009-12-28 Doug Evans <dje@google.com>
7717
7718 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7719 elf/external.h. Include <elf.h> instead but only if necessary.
7720
7721 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7722
7723 * linux-low.c (linux_remove_process): Remove `detaching'
7724 parameter. Don't release/detach from thread_db here.
7725 (linux_kill): Release/detach from thread_db here, ...
7726 (linux_detach): ... and here, before actually detaching.
7727 (linux_wait_1): ... and here, when a process exits.
7728 * thread-db.c (any_thread_of): New.
7729 (thread_db_free): Switch the current inferior to a thread of the
7730 passed in process.
7731
7732 2009-12-21 Doug Evans <dje@google.com>
7733
7734 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7735
7736 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7737 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7738 warning ifndef __NR_tkill. Move setting of errno there too.
7739 Delete unnecessary resetting of errno after syscall.
7740 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7741
7742 * configure.ac: Check for dladdr.
7743 * config.in: Regenerate.
7744 * configure: Regenerate.
7745 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7746 (try_thread_db_load): Update.
7747
7748 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7749
7750 2009-12-18 Doug Evans <dje@google.com>
7751
7752 * event-loop.c: Include unistd.h if it exists.
7753
7754 * linux-low.c (my_waitpid): Move definition away from being in
7755 between linux_tracefork_child/linux_test_for_tracefork.
7756
7757 * gdb_proc_service.h (psaddr_t): Fix type.
7758 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7759 signature to match glibc.
7760
7761 2009-12-16 Doug Evans <dje@google.com>
7762
7763 * linux-low.c (linux_read_memory): Fix argument to read.
7764
7765 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7766
7767 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7768 events, don't leave current_inferior pointing at null.
7769
7770 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7771
7772 * win32-low.c (LOG): Delete.
7773 (OUTMSG): Output to stderr.
7774 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7775 on compile time LOG macro.
7776 (win32_wait): Fix debug output.
7777
7778 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7779
7780 * win32-low.c (win32_add_one_solib): If the dll name is
7781 "ntdll.dll", prepend the system directory to the dll path.
7782
7783 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7784
7785 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7786
7787 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7788 Vladimir Prus <vladimir@codesourcery.com>
7789
7790 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7791 * configure.ac: Check for __mcoldfire__ and set
7792 gdb_cv_m68k_is_coldfire.
7793 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7794 reg-cf.o and reg-m68k.o.
7795 * configure: Regenerated.
7796
7797 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7798
7799 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7800 Pass it to thread_db_free.
7801 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7802 proper `detaching' argument to linux_remove_process.
7803 * linux-low.h (thread_db_free): Add `detaching' parameter.
7804 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7805 to thread_db_free.
7806 (thread_db_free): Add `detaching' parameter. Only
7807 call td_ta_clear_event if detaching from process.
7808
7809 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7810
7811 * thread-db.c (thread_db_free): Fix typo.
7812
7813 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7814
7815 PR gdb/10838
7816 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7817
7818 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7819
7820 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7821 with an i686 compiler.
7822 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7823 needed.
7824 * configure: Rebuilt.
7825
7826 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7827
7828 PR gdb/10783
7829
7830 * server.c (handle_search_memory_1): Correct read_addr initialization
7831 in loop for searching subsequent chunks.
7832
7833 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7834
7835 * configure.ac: New --with-libthread-db option.
7836 * thread-db.c: Allow direct dependence on libthread_db.
7837 (thread_db_free): Adjust.
7838 * config.in: Regenerate.
7839 * configure: Likewise.
7840
7841 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7842
7843 PR gdb/10757
7844 * thread-db.c (attach_thread): New function.
7845 (maybe_attach_thread): Return success/failure.
7846 (find_new_threads_callback): Adjust.
7847 (thread_db_find_new_threads): Loop until no new threads.
7848
7849 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7850
7851 * proc-service.c (ps_lgetregs): Formatting.
7852
7853 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7854
7855 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7856 * configure.ac: Adjust.
7857 * linux-low.h (struct process_info_private): Move members to struct
7858 thread_db.
7859 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7860 * linux-low.c (linux_remove_process): Adjust.
7861 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7862 * server.c (handle_query): Move code ...
7863 (handle_monitor_command): ... here. New function.
7864 * target.h (struct target_ops): New member.
7865 * thread-db.c (struct thread_db): New.
7866 (libthread_db_search_path): New variable.
7867 (thread_db_create_event, thread_db_enable_reporting)
7868 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7869 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7870 (try_thread_db_load_1, dladdr_to_soname): New functions.
7871 (try_thread_db_load, thread_db_load_search): New functions.
7872 (thread_db_init): Search for libthread_db.
7873 (thread_db_free): New function.
7874 (thread_db_handle_monitor_command): Likewise.
7875 * config.in: Regenerate.
7876 * configure: Regenerate.
7877
7878 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7879
7880 * spu-low.c (spu_kill): Wait for inferior to terminate.
7881 Call clear_inferiors.
7882 (spu_detach): Call clear_inferiors.
7883
7884 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7885
7886 * aclocal.m4: Regenerate.
7887 * config.in: Likewise.
7888 * configure: Likewise.
7889
7890 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7891
7892 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7893 (parse_spufs_run): New function.
7894 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7895 (ppc_breakpoint_at): Handle SPU breakpoints.
7896
7897 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7898
7899 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7900 (SPUFS_MAGIC): Define.
7901 (spu_enumerate_spu_ids): New function.
7902 (linux_qxfer_spu): New function.
7903 (linux_target_ops): Install linux_qxfer_spu.
7904
7905 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7906
7907 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7908 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7909 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7910 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7911 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7912 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7913 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7914 (init_registers_powerpc_cell32l): Add prototype.
7915 (init_registers_powerpc_cell64l): Likewise.
7916 (ppc_arch_setup): Detect Cell/B.E. architecture.
7917
7918 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7919
7920 * Makefile.in (datarootdir): New variable.
7921
7922 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7923
7924 * linux-low.c (linux_write_memory): Update debugging output.
7925 * Makefile.in (clean): Add new descriptions.
7926 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7927 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7928 * configure.srv: Add new files for arm*-*-linux*.
7929 * linux-arm-low.c: Add new declarations.
7930 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7931 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7932 (HWCAP_VFPv3D16): New.
7933 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7934 instead of __IWMMXT__.
7935 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7936 (arm_arch_setup): New.
7937 (target_regsets): Remove #ifdef. Add VFP regset.
7938 (the_low_target): Use arm_arch_setup.
7939
7940 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7941
7942 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7943 the main thread again.
7944
7945 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7946
7947 Adding Neutrino gdbserver.
7948 * configure: Regenerated.
7949 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7950 * configure.srv (i[34567]86-*-nto*): New target.
7951 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7952 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7953 (nto_comctrl) [__QNX__]: New function.
7954 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7955
7956 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7957
7958 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7959 srv_tgtobj.
7960
7961 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7962 Pedro Alves <pedro@codesourcery.com>
7963
7964 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7965 don't support CONTEXT_EXTENDED_REGISTERS.
7966 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7967 (the_low_target): Install them.
7968 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7969 failing with ERROR_PIPE_NOT_CONNECTED.
7970
7971 2009-06-30 Doug Evans <dje@google.com>
7972 Pierre Muller <muller@ics.u-strasbg.fr>
7973
7974 Add h/w watchpoint support to x86-linux, win32-i386.
7975 * Makefile.in (SFILES): Add i386-low.c
7976 (i386_low_h): Define.
7977 (i386-low.o): Add dependencies.
7978 (linux-x86-low.o): Add i386-low.h dependency.
7979 (win32-i386-low.o): Ditto.
7980 * i386-low.c: New file.
7981 * i386-low.h: New file.
7982 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7983 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7984 * linux-low.c (linux_add_process): Initialize arch_private.
7985 (linux_remove_process): Free arch_private.
7986 (add_lwp): Initialize arch_private.
7987 (delete_lwp): Free arch_private.
7988 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7989 provided.
7990 * linux-low.h (process_info_private): New member arch_private.
7991 (lwp_info): New member arch_private.
7992 (linux_target_ops): New members new_process, new_thread,
7993 prepare_to_resume.
7994 (ptid_of): New macro.
7995 * linux-x86-low.c: Include stddef.h, i386-low.h.
7996 (arch_process_info): New struct.
7997 (arch_lwp_info): New struct.
7998 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7999 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8000 (i386_dr_low_get_status): New function.
8001 (x86_insert_point, x86_remove_point): New functions.
8002 (x86_stopped_by_watchpoint): New function.
8003 (x86_stopped_data_address): New function.
8004 (x86_linux_new_process, x86_linux_new_thread): New functions.
8005 (x86_linux_prepare_to_resume): New function.
8006 (the_low_target): Add entries for insert_point, remove_point,
8007 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8008 prepare_to_resume.
8009 * server.c (debug_hw_points): New global.
8010 (monitor_show_help): Document set debug-hw-points.
8011 (handle_query): Process "set debug-hw-points".
8012 * server.h (debug_hw_points): Declare.
8013 (paddress): Declare.
8014 * utils.c (NUMCELLS, CELLSIZE): New macros.
8015 (get_sell, xsnprintf, paddress): New functions.
8016 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8017 remove_point, stopped_by_watchpoint, stopped_data_address.
8018 * win32-i386-low.c: Include i386-low.h.
8019 (debug_reg_state): Replaces dr.
8020 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8021 (i386_dr_low_get_status): New function.
8022 (i386_insert_point, i386_remove_point): New functions.
8023 (i386_stopped_by_watchpoint): New function.
8024 (i386_stopped_data_address): New function.
8025 (i386_initial_stuff): Update.
8026 (get_thread_context,set_thread_context,i386_thread_added): Update.
8027 (the_low_target): Add entries for insert_point,
8028 remove_point, stopped_by_watchpoint, stopped_data_address.
8029 * win32-low.c (win32_insert_watchpoint): New function.
8030 (win32_remove_watchpoint): New function.
8031 (win32_stopped_by_watchpoint): New function.
8032 (win32_stopped_data_address): New function.
8033 (win32_target_ops): Add entries for insert_watchpoint,
8034 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8035 * win32-low.h (win32_target_ops): New members insert_point,
8036 remove_point, stopped_by_watchpoint, stopped_data_address.
8037
8038 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8039
8040 * server.c (process_serial_event): Re-return unsupported, not
8041 error, if the type isn't recognized. Re-allow supporting only
8042 insert or remove packets. Also call require_running for
8043 breakpoints. Add missing break statement to default case. Tidy.
8044 * target.h (struct target_ops): Rename insert_watchpoint to
8045 insert_point, and remove_watchpoint to remove_point.
8046
8047 * linux-low.h (struct linux_target_ops): Likewise.
8048 * linux-low.c (linux_insert_watchpoint): Rename to ...
8049 (linux_insert_point): ... this. Adjust.
8050 (linux_remove_watchpoint): Rename to ...
8051 (linux_remove_point): ... this. Adjust.
8052 (linux_target_ops): Adjust.
8053 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8054 (cris_insert_point): ... this.
8055 (cris_remove_watchpoint): Rename to ...
8056 (cris_remove_point): ... this.
8057 (the_low_target): Adjust.
8058
8059 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8060
8061 * server.c (handle_v_kill): Pass signal_pid to
8062 kill_inferior if multi_process is zero.
8063
8064 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8065
8066 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8067 * target.h (target_ops): Comment for *_watchpoint to make it clear
8068 the functions can get types '0' and '1'.
8069
8070 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8071
8072 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8073 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8074 * regcache.c (get_regcache): Likewise.
8075 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8076 * win32-low.c (child_fetch_inferior_registers): Remove check for
8077 regno 0.
8078
8079 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8080 Pedro Alves <pedro@codesourcery.com>
8081
8082 * target.h (struct target_ops) <supports_multi_process>: New
8083 callback.
8084 (target_supports_multi_process): New.
8085 * server.c (handle_query): Even if GDB reports support, only
8086 enable multi-process if the target also supports it. Report
8087 multi-process support only if the target backend supports it.
8088 * linux-low.c (linux_supports_multi_process): New function.
8089 (linux_target_ops): Install it as target_supports_multi_process
8090 callback.
8091
8092 2009-05-24 Doug Evans <dje@google.com>
8093
8094 Global renaming of find_thread_pid to find_thread_ptid.
8095 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8096 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8097 All callers updated.
8098
8099 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8100 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8101 directly.
8102
8103 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8104 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8105 (linux_resume_one_lwp): Ditto.
8106
8107 2009-05-23 Doug Evans <dje@google.com>
8108
8109 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8110 from struct inferior_list_entry * to struct lwp_info *.
8111 All callers updated.
8112
8113 2009-05-13 Doug Evans <dje@google.com>
8114
8115 * linux-x86-low.c: Don't include assert.h.
8116 (x86_siginfo_fixup): Use fatal, not assert.
8117 (x86_arch_setup): Fix comment.
8118
8119 2009-05-12 Doug Evans <dje@google.com>
8120
8121 Biarch support for i386/amd64 gdbserver.
8122 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8123 Add linux-x86-low.c.
8124 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8125 (linux-x86-low.o): Add.
8126 * linux-x86-64-low.c: Delete.
8127 * linux-i386-low.c: Delete.
8128 * linux-x86-low.c: New file.
8129 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8130 linux-x86-low.o.
8131 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8132 linux-x86-low.o.
8133 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8134 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8135 (linux_child_pid_to_exec_file): New function.
8136 (elf_64_header_p, elf_64_file_p): New functions.
8137 (siginfo_fixup): New function.
8138 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8139 give target a chance to convert layout.
8140 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8141 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8142
8143 2009-05-07 Doug Evans <dje@google.com>
8144
8145 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8146 (regsets_store_inferior_registers): Ditto.
8147
8148 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8149
8150 PR server/10048
8151
8152 * linux-low.c (must_set_ptrace_flags): Delete.
8153 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8154 of the global.
8155 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8156 `lwp->must_set_ptrace_flags' instead.
8157 (linux_wait_for_event_1): Set ptrace options here.
8158 (linux_wait_1): ... not here.
8159
8160 2009-04-30 Doug Evans <dje@google.com>
8161
8162 * inferiors.c (started_inferior_callback): New function.
8163 (attached_inferior_callback): New function.
8164 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8165 * server.c (print_started_pid, print_attached_pid): New functions.
8166 (detach_or_kill_for_exit): New function.
8167 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8168 * server.h (have_started_inferiors_p): Declare.
8169 (have_attached_inferiors_p): Declare.
8170
8171 * inferiors.c (remove_process): Fix memory leak, free process.
8172 * linux-low.c (linux_remove_process): New function.
8173 (linux_kill): Call it instead of remove_process.
8174 (linux_detach, linux_wait_1): Ditto.
8175
8176 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8177
8178 * configure.srv: Add x86 Windows CE target.
8179
8180 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8181
8182 * inferiors.c (get_thread_process): Make global.
8183 * server.h (get_thread_process): Add prototype.
8184 * thread-db.c (find_one_thread): Use get_thread_process
8185 instead of current_process.
8186 (thread_db_get_tls_address): Do not crash if called when
8187 thread layer is not yet initialized.
8188
8189 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8190
8191 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8192 * spu-low.c (current_tid): Rename to ...
8193 (current_ptid): ... this.
8194 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8195 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8196 ptid_get_lwp (current_ptid) instead of current_tid.
8197 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8198 instead of current_tid. Use find_process_pid to verify pid
8199 argument is valid. Pass proper argument to remove_process.
8200 (spu_thread_alive): Compare current_ptid instead of current_tid.
8201 (spu_resume): Likewise.
8202
8203 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8204
8205 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8206 variable.
8207
8208 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8209
8210 Implement the multiprocess extensions, and add linux multiprocess
8211 support.
8212
8213 * server.h (ULONGEST): Declare.
8214 (struct ptid, ptid_t): New.
8215 (minus_one_ptid, null_ptid): Declare.
8216 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8217 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8218 (struct inferior_list_entry): Change `id' type from unsigned from
8219 to ptid_t.
8220 (struct sym_cache, struct breakpoint, struct
8221 process_info_private): Forward declare.
8222 (struct process_info): Declare.
8223 (current_process): Declare.
8224 (all_processes): Declare.
8225 (initialize_inferiors): Declare.
8226 (add_thread): Adjust to use ptid_t.
8227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8228 (add_process, remove_process, find_thread_pid): Declare.
8229 (find_inferior_id): Adjust to use ptid_t.
8230 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8231 (multi_process): Declare.
8232 (push_event): Adjust to use ptid_t.
8233 (read_ptid, write_ptid): Declare.
8234 (prepare_resume_reply): Adjust to use ptid_t.
8235 (clear_symbol_cache): Declare.
8236 * inferiors.c (all_processes): New.
8237 (null_ptid, minus_one_ptid): New.
8238 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8239 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8240 (add_thread): Change unsigned long to ptid. Remove gdb_id
8241 parameter. Adjust.
8242 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8243 (gdb_id_to_thread): Rename to ...
8244 (find_thread_pid): ... this. Change unsigned long to ptid.
8245 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8246 (loaded_dll, pull_pid_from_list): Adjust.
8247 (add_process, remove_process, find_process_pid)
8248 (get_thread_process, current_process, initialize_inferiors): New.
8249 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8250 (struct target_waitstatus) <related_pid>: Ditto.
8251 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8252 return type to int.
8253 (struct target_ops) <join>: Add `pid' argument.
8254 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8255 (struct target_ops) <wait>: Add `ptid' field. Change return type
8256 to ptid.
8257 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8258 (mywait): Add `ptid' argument. Change return type to ptid_t.
8259 (target_pid_to_str): Declare.
8260 * target.c (set_desired_inferior): Adjust to use ptids.
8261 (mywait): Add new `ptid' argument. Adjust.
8262 (target_pid_to_str): New.
8263 * mem-break.h (free_all_breakpoints): Declare.
8264 * mem-break.c (breakpoints): Delelete.
8265 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8266 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8267 to use per-process breakpoint list.
8268 (free_all_breakpoints): New.
8269 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8270 (symbol_cache, all_symbols_looked_up): Delete.
8271 (hexchars): New.
8272 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8273 read_ptid): New.
8274 (prepare_resume_reply): Change ptid argument's type from unsigned
8275 long to ptid_t. Adjust. Implement W;process and X;process.
8276 (free_sym_cache, clear_symbol_cache): New.
8277 (look_up_one_symbol): Adjust to per-process symbol cache. *
8278 * server.c (cont_thread, general_thread, step_thread): Change type
8279 to ptid_t.
8280 (attached): Delete.
8281 (multi_process): New.
8282 (last_ptid): Change type to ptid_t.
8283 (struct vstop_notif) <ptid>: Change type to ptid_t.
8284 (queue_stop_reply, push_event): Change `ptid' argument's type to
8285 ptid_t.
8286 (discard_queued_stop_replies): Add `pid' argument.
8287 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8288 changes. Don't reference the `attached' global.
8289 (attach_inferior): Adjust to mywait interface changes.
8290 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8291 features. Handle and report "multiprocess+". Handle
8292 "qAttached:PID".
8293 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8294 changes.
8295 (handle_v_kill): New.
8296 (handle_v_stopped): Adjust to use target_pid_to_str.
8297 (handle_v_requests): Allow multiple attaches and runs when
8298 multiprocess extensions are in effect. Handle "vKill".
8299 (myresume): Adjust to use ptids.
8300 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8301 (handle_status): Adjust to discard_queued_stop_replies interface
8302 change.
8303 (first_thread_of, kill_inferior_callback)
8304 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8305 (main): Call initialize_inferiors. Adjust to use ptids, killing
8306 and detaching from all inferiors. Handle multiprocess packet
8307 variants.
8308 * linux-low.h: Include gdb_proc_service.h.
8309 (struct process_info_private): New.
8310 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8311 <lwpid_of>: Use ptid_get_lwp.
8312 (get_lwp_thread): Adjust.
8313 (struct lwp_info): Add `dead' member.
8314 (find_lwp_pid): Declare.
8315 * linux-low.c (thread_db_active): Delete.
8316 (new_inferior): Adjust comment.
8317 (inferior_pid): Delete.
8318 (linux_add_process): New.
8319 (handle_extended_wait): Adjust.
8320 (add_lwp): Change unsigned long to ptid.
8321 (linux_create_inferior): Add process to processes table. Adjust
8322 to use ptids. Don't set new_inferior here.
8323 (linux_attach_lwp): Rename to ...
8324 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8325 it. Adjust to use ptids.
8326 (linux_attach_lwp): New.
8327 (linux_attach): Add process to processes table. Don't set
8328 new_inferior here.
8329 (struct counter): New.
8330 (second_thread_of_pid_p, last_thread_of_process_p): New.
8331 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8332 multiple processes.
8333 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8334 processes. Remove process from process table.
8335 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8336 to multiple processes.
8337 (any_thread_of): New.
8338 (linux_detach): Add `pid' argument, and handle it. Remove process
8339 from processes table.
8340 (linux_join): Add `pid' argument. Handle it.
8341 (linux_thread_alive): Change unsighed long argument to ptid_t.
8342 Consider dead lwps as not being alive.
8343 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8344 threads we're not interested in.
8345 (same_lwp, find_lwp_pid): New.
8346 (linux_wait_for_lwp): Change `pid' argument's type from int to
8347 ptid_t. Adjust.
8348 (linux_wait_for_event): Rename to ...
8349 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8350 from int to ptid_t. Adjust.
8351 (linux_wait_for_event): New.
8352 (linux_wait_1): Add `ptid' argument. Change return type to
8353 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8354 that exit from the process table.
8355 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8356 Adjust.
8357 (mark_lwp_dead): New.
8358 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8359 stopping all threads, mark its main lwp as dead.
8360 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8361 ptids.
8362 (fetch_register, usr_store_inferior_registers)
8363 (regsets_fetch_inferior_registers)
8364 (regsets_store_inferior_registers, linux_read_memory)
8365 (linux_write_memory): Inline `inferior_pid'.
8366 (linux_look_up_symbols): Adjust to use per-process
8367 `thread_db_active'.
8368 (linux_request_interrupt): Adjust to use ptids.
8369 (linux_read_auxv): Inline `inferior_pid'.
8370 (initialize_low): Don't reference thread_db_active.
8371 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8372 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8373 (ps_getpid): Return the pid of the current inferior.
8374 * thread-db.c (proc_handle, thread_agent): Delete.
8375 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8376 per-process data.
8377 (find_one_thread): Change argument type to ptid_t. Adjust to
8378 per-process data.
8379 (maybe_attach_thread): Adjust to per-process data and ptids.
8380 (thread_db_find_new_threads): Ditto.
8381 (thread_db_init): Ditto.
8382 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8383 processes table. Adjust to use ptids.
8384 (spu_kill, spu_detach): Adjust interface. Remove process from
8385 processes table.
8386 (spu_join, spu_thread_alive): Adjust interface.
8387 (spu_wait): Adjust interface. Remove process from processes
8388 table. Adjust to use ptids.
8389 * win32-low.c (current_inferior_tid): Delete.
8390 (current_inferior_ptid): New.
8391 (debug_event_ptid): New.
8392 (thread_rec): Take a ptid. Adjust.
8393 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8394 (child_delete_thread): Ditto.
8395 (do_initial_child_stuff): Add `attached' argument. Add process to
8396 processes table.
8397 (child_fetch_inferior_registers, child_store_inferior_registers):
8398 Adjust.
8399 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8400 (win32_attach): Pass 1 to do_initial_child_stuff.
8401 (win32_kill): Adjust interface. Remove process from processes
8402 table.
8403 (win32_detach): Ditto.
8404 (win32_join): Adjust interface.
8405 (win32_thread_alive): Take a ptid.
8406 (win32_resume): Adjust to use ptids.
8407 (get_child_debug_event): Ditto.
8408 (win32_wait): Adjust interface. Remove exiting process from
8409 processes table.
8410
8411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8412
8413 Non-stop mode support.
8414
8415 * server.h (non_stop): Declare.
8416 (gdb_client_data, handler_func): Declare.
8417 (delete_file_handler, add_file_handler, start_event_loop):
8418 Declare.
8419 (handle_serial_event, handle_target_event, push_event)
8420 (putpkt_notif): Declare.
8421 * target.h (enum resume_kind): New.
8422 (struct thread_resume): Replace `step' field by `kind' field.
8423 (TARGET_WNOHANG): Define.
8424 (struct target_ops) <wait>: Add `options' argument.
8425 <supports_non_stop, async, start_non_stop>: New fields.
8426 (target_supports_non_stop, target_async): New.
8427 (start_non_stop): Declare.
8428 (mywait): Add `options' argument.
8429 * target.c (mywait): Add `options' argument. Print child exit
8430 notifications here.
8431 (start_non_stop): New.
8432 * server.c (non_stop, own_buf, mem_buf): New globals.
8433 (struct vstop_notif): New.
8434 (notif_queue): New global.
8435 (queue_stop_reply, push_event, discard_queued_stop_replies)
8436 (send_next_stop_reply): New.
8437 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8438 interface changes.
8439 (attach_inferior): In non-stop mode, don't wait for the target
8440 here.
8441 (handle_general_set): Handle QNonStop.
8442 (handle_query): When handling qC, return the current general
8443 thread, instead of the first thread of the list.
8444 (handle_query): If the backend supports non-stop mode, include
8445 QNonStop+ in the qSupported query response.
8446 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8447 and non-stop mode.
8448 (handle_v_attach, handle_v_run): Handle non-stop mode.
8449 (handle_v_stopped): New.
8450 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8451 (myresume): Adjust to use resume_kind. Handle non-stop.
8452 (queue_stop_reply_callback): New.
8453 (handle_status): Handle non-stop mode.
8454 (main): Clear non_stop flag on reconnection. Use the event-loop.
8455 Refactor serial protocol handling from here ...
8456 (process_serial_event): ... to this new function. When GDB
8457 selects any thread, select one here. In non-stop mode, wait until
8458 GDB acks all pending events before exiting.
8459 (handle_serial_event, handle_target_event): New.
8460 * remote-utils.c (remote_open): Install remote_desc in the event
8461 loop.
8462 (remote_close): Remove remote_desc from the event loop.
8463 (putpkt_binary): Rename to...
8464 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8465 (putpkt_binary): New as wrapper around putpkt_binary_1.
8466 (putpkt_notif): New.
8467 (prepare_resume_reply): In non-stop mode, don't change the
8468 general_thread.
8469 * event-loop.c: New.
8470 * Makefile.in (OBJ): Add event-loop.o.
8471 (event-loop.o): New rule.
8472
8473 * linux-low.h (pid_of): Moved here.
8474 (lwpid_of): New.
8475 (get_lwp_thread): Use lwpid_of.
8476 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8477 * linux-low.c (pid_of): Delete.
8478 (inferior_pid): Use lwpid_of.
8479 (linux_event_pipe): New.
8480 (target_is_async_p): New.
8481 (delete_lwp): New.
8482 (handle_extended_wait): Use lwpid_of.
8483 (add_lwp): Don't set lwpid field.
8484 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8485 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8486 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8487 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8488 first. Adjust to linux_wait_for_event interface changes. Use
8489 lwpid_of.
8490 (linux_detach): Don't delete the main lwp here.
8491 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8492 (status_pending_p): Don't consider explicitly suspended lwps.
8493 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8494 pointer. Add OPTIONS argument. Change return type to int. Use
8495 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8496 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8497 pointer. Add status pointer argument. Return a pid instead of a
8498 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8499 changes. In non-stop mode, don't switch to a random thread.
8500 (linux_wait): Rename to...
8501 (linux_wait_1): ... this. Add target_options argument, and handle
8502 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8503 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8504 clean exit and signal exit code. Don't stop all threads in
8505 non-stop mode. In all-stop mode, only stop all threads when
8506 reporting a stop to GDB. Handle explicit thread stop requests.
8507 (async_file_flush, async_file_mark): New.
8508 (linux_wait): New.
8509 (send_sigstop): Use lwpid_of.
8510 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8511 interface changes. In non-stop mode, don't switch to a random
8512 thread.
8513 (linux_resume_one_lwp): Use lwpid_of.
8514 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8515 (linux_resume_one_thread): ... this. Handle resume_stop. In
8516 non-stop mode, don't look for pending flag in all threads.
8517 (resume_status_pending_p): Don't consider explicitly suspended
8518 threads.
8519 (my_waitpid): Reimplement. Emulate __WALL.
8520 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8521 Use lwpid_of.
8522 (sigchld_handler, linux_supports_non_stop, linux_async)
8523 (linux_start_non_stop): New.
8524 (linux_target_ops): Register linux_supports_non_stop, linux_async
8525 and linux_start_non_stop.
8526 (initialize_low): Install SIGCHLD handler.
8527 * thread-db.c (thread_db_create_event, find_one_thread)
8528 (thread_db_get_tls_address): Use lwpid_of.
8529 * win32-low.c (win32_detach): Adjust to use resume_kind.
8530 (win32_wait): Add `options' argument.
8531 * spu-low.c (spu_resume): Adjust to use resume_kind.
8532 (spu_wait): Add `options' argument.
8533
8534 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8535
8536 Decouple target code from remote protocol.
8537
8538 * target.h (enum target_waitkind): New.
8539 (struct target_waitstatus): New.
8540 (struct target_ops) <wait>: Return an unsigned long. Take a
8541 target_waitstatus pointer instead of a char pointer.
8542 (mywait): Likewise.
8543 * target.c (mywait): Change prototype to return an unsigned long.
8544 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8545 * server.h (thread_from_wait, old_thread_from_wait): Delete
8546 declarations.
8547 (prepare_resume_reply): Change prototype to take a
8548 target_waitstatus.
8549 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8550 (last_status, last_ptid): New.
8551 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8552 pid instead of a signal.
8553 (attach_inferior): Remove "status" and "signal" parameters.
8554 Adjust.
8555 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8556 not as an address.
8557 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8558 (handle_v_requests, myresume): Remove "status" and "signal"
8559 parameters. Adjust.
8560 (handle_status): New.
8561 (main): Delete local `status'. Adjust.
8562 * remote-utils.c: Include target.h.
8563 (prepare_resume_reply): Change prototype to take a
8564 target_waitstatus. Adjust.
8565
8566 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8567 interface.
8568 * spu-low.c (spu_wait): Adjust.
8569 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8570 Delete.
8571 (win32_wait): Adjust.
8572
8573 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8574
8575 * target.h (struct thread_resume): Delete leave_stopped member.
8576 (struct target_ops): Add a `n' argument to the `resume' callback.
8577 * server.c (start_inferior): Adjust.
8578 (handle_v_cont, myresume): Adjust.
8579 * linux-low.c (check_removed_breakpoint): Adjust to resume
8580 interface change, and to removed leave_stopped field.
8581 (resume_ptr): Delete.
8582 (struct thread_resume_array): New.
8583 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8584 resume interface change.
8585 (linux_continue_one_thread, linux_queue_one_thread)
8586 (resume_status_pending_p): Check if the resume field is NULL
8587 instead of checking the leave_stopped member.
8588 (linux_resume): Adjust to the target resume interface change.
8589 * spu-low.c (spu_resume): Adjust to the target resume interface
8590 change.
8591 * win32-low.c (win32_detach, win32_resume): Ditto.
8592
8593 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8594
8595 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8596 flag.
8597 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8598 pending.
8599 (linux_continue_one_thread): Only preserve the stepping flag if
8600 there's a pending breakpoint.
8601
8602 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8603
8604 * server.c (main): After the inferior having exited, call
8605 remote_close before exiting gdbserver.
8606
8607 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8608
8609 Fix size of FPSCR in Power 7 processors.
8610 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8611 (PPC_FEATURE_HAS_DFP): New #define.
8612 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8613 size of the FPSCR.
8614
8615 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8616
8617 * server.c (handle_query) Whitespace and formatting.
8618
8619 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8620
8621 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8622 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8623 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8624 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8625 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8626 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8627 Makefile.in, configure.ac: Fix whitespace throughout.
8628 * configure: Regenerate.
8629
8630 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8631
8632 * inferiors.c (find_inferior): Make it safe for the callback
8633 function to delete the currently iterated inferior.
8634
8635 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8636
8637 * Makefile.in (linuw_low_h): Move higher.
8638 (thread-db.o): Depend on $(linux_low_h).
8639
8640 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8641
8642 Rename "process" to "lwp" throughout.
8643
8644 * linux-low.c (all_processes): Rename to...
8645 (all_lwps): ... this.
8646 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8647 (add_process): Rename to ...
8648 (add_lwp): ... this. Adjust.
8649 (linux_create_inferior): Adjust.
8650 (linux_attach_lwp): Adjust.
8651 (linux_attach): Adjust.
8652 (linux_kill_one_process): Rename to ...
8653 (linux_kill_one_lwp): ... this. Adjust.
8654 (linux_kill): Adjust.
8655 (linux_detach_one_process): Rename to ...
8656 (linux_detach_one_lwp): ... this. Adjust.
8657 (linux_detach): Adjust.
8658 (check_removed_breakpoint): Adjust.
8659 (status_pending_p): Adjust.
8660 (linux_wait_for_process): Rename to ...
8661 (linux_wait_for_lwp): ... this. Adjust.
8662 (linux_wait_for_event): Adjust.
8663 (send_sigstop): Adjust.
8664 (wait_for_sigstop): Adjust.
8665 (stop_all_processes): Rename to ...
8666 (stop_all_lwps): ... this.
8667 (linux_resume_one_process): Rename to ...
8668 (linux_resume_one_lwp): ... this. Adjust.
8669 (linux_set_resume_request, linux_continue_one_thread)
8670 (linux_queue_one_thread, resume_status_pending_p)
8671 (usr_store_inferior_registers, regsets_store_inferior_registers)
8672 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8673 Adjust.
8674 * linux-low.h (get_process): Rename to ...
8675 (get_lwp): ... this. Adjust.
8676 (get_thread_process): Rename to ...
8677 (get_thread_lwp): ... this. Adjust.
8678 (get_process_thread): Rename to ...
8679 (get_lwp_thread): ... this. Adjust.
8680 (struct process_info): Rename to ...
8681 (struct lwp_info): ... this.
8682 (all_processes): Rename to ...
8683 (all_lwps): ... this.
8684 * proc-service.c (ps_lgetregs): Adjust.
8685 * thread-db.c (thread_db_create_event, find_one_thread)
8686 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8687
8688 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8689
8690 * server.c (handle_query): Handle "qAttached".
8691
8692 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8693
8694 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8695 GPLv3, update license URL.
8696
8697 2009-03-01 Doug Evans <dje@google.com>
8698
8699 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8700 (server_h): Add gdb_signals.h.
8701 (signals.o): Update.
8702 * server.h (target_signal_from_host,target_signal_to_host_p)
8703 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8704
8705 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8706
8707 * remote-utils.c (getpkt): Also generate remote-debug
8708 information if noack_mode is set.
8709
8710 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8711
8712 * server.c (handle_query): Report qXfer:siginfo:read and
8713 qXfer:siginfo:write as supported and handle them.
8714 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8715 * linux-low.c (linux_xfer_siginfo): New.
8716 (linux_target_ops): Set it.
8717
8718 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8719
8720 * server.c (gdbserver_usage): Mention --remote-debug.
8721 (main): Accept '--remote-debug' switch.
8722
8723 2009-01-18 Doug Evans <dje@google.com>
8724
8725 * regcache.c (new_register_cache): No need to check result of xcalloc.
8726 * server.c (handle_search_memory): Back out calls to xmalloc,
8727 result is checked and error is returned to user upon failure.
8728 (handle_query): Ditto. Add more checks for result of malloc.
8729 (handle_v_cont): Check result of malloc, report error back to
8730 user upon failure.
8731 (handle_v_run): Ditto. Call freeargv.
8732 * server.h (freeargv): Declare.
8733 * utils.c (freeargv): New fn.
8734
8735 2009-01-15 Doug Evans <dje@google.com>
8736
8737 * gdbreplay.c (perror_with_name): Make arg const char *.
8738 * server.h (target_signal_to_name): Make return type const char *.
8739 * thread-db.c (thread_db_err_str): Make return type const char *.
8740 * utils.c (perror_with_name): Make arg const char *.
8741
8742 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8743
8744 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8745 when handling a EXIT_PROCESS_DEBUG_EVENT.
8746
8747 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8748
8749 * gdbreplay.c (gdbreplay_version): Update copyright year.
8750 * server.c (gdbserver_version): Likewise.
8751
8752 2009-01-05 Doug Evans <dje@google.com>
8753
8754 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8755 (handle_extended_wait): Improve comment.
8756
8757 2008-12-13 Doug Evans <dje@google.com>
8758
8759 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8760 * server.h (ATTR_MALLOC): New macro.
8761 (xmalloc,xcalloc,xstrdup): Declare.
8762 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8763 * inferiors.c: Ditto.
8764 * linux-low.c: Ditto.
8765 * mem-break.c: Ditto.
8766 * regcache.c: Ditto.
8767 * remote-utils.c: Ditto.
8768 * server.c: Ditto.
8769 * target.c: Ditto.
8770 * win32-low.c: Ditto.
8771
8772 2008-12-12 Doug Evans <dje@google.com>
8773
8774 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8775 in debugging printf.
8776
8777 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8778
8779 2008-12-09 Doug Evans <dje@google.com>
8780
8781 * linux-low.h (struct process_info): Delete member tid, unused.
8782 * thread-db.c (find_one_thread): Update.
8783 (maybe_attach_thread): Update.
8784
8785 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8786
8787 * target.h (struct target_ops): Add qxfer_osdata member.
8788 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8789 and dirent.h.
8790 (linux_qxfer_osdata): New functions.
8791 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8792 callback.
8793 * server.c (handle_query): Handle "qXfer:osdata:read:".
8794 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8795 (buffer_xml_printf): New functions.
8796 * server.h (struct buffer): New.
8797 (buffer_grow_str, buffer_grow_str0): New macros.
8798 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8799 (buffer_xml_printf): Declare.
8800
8801 2008-11-24 Doug Evans <dje@google.com>
8802
8803 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8804
8805 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8806
8807 * server.c (handle_v_run): Always use the supplied argument list.
8808
8809 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8810
8811 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8812 (xtensa_regmap_table): Add entry for scompare1.
8813
8814 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8815
8816 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8817 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8818 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8819 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8820 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8821 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8822 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8823 XML target descriptions.
8824 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8825 when inferior is running on an ISA 2.05 or later processor. Add
8826 special case to return offset for full 64-bit slot of FPSCR when
8827 in 32-bits.
8828
8829 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8830
8831 * Makefile.in (SFILES, clean): Added sparc64 files.
8832 (reg-sparc64.o, reg-sparc64.c): New.
8833 * configure.srv (sparc*-*-linux*): New configuration.
8834 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8835 syscall arguments for SPARC.
8836 (regsets_store_inferior_registers): Likewise.
8837 * linux-sparc-low.c: New file.
8838
8839 2008-10-21 Doug Evans <dje@google.com>
8840
8841 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8842 (READLINE_DIR,READLINE_DEP): Delete.
8843 (INTERNAL_CFLAGS): Update.
8844 (LINTFLAGS): Update.
8845
8846 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8847
8848 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8849 whole argv from the last run, not just argv[0].
8850
8851 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8852
8853 * regcache.c (new_register_cache): Return NULL if the register
8854 cache size isn't known yet.
8855 (free_register_cache): Avoid dereferencing a NULL regcache.
8856
8857 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8858
8859 * configure.srv: Merge MIPS and MIPS64.
8860
8861 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8862
8863 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8864
8865 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8866
8867 * Makefile.in: Add required vsx dependencies.
8868
8869 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8870 Declare init_registers_powerpc_vsx32l.
8871 Declare init_registers_powerpc_vsx64l.
8872 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8873 (ppc_arch_setup): Check for VSX in hwcap.
8874 (ppc_fill_vsxregset): New function.
8875 (ppc_store_vsxregset): New function.
8876 Add new VSX entry in regset_info target_regsets.
8877
8878 * configure.srv: Add new VSX dependencies.
8879
8880 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8881
8882 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8883 (remote_open): Set or clear transport_is_reliable.
8884 (putpkt_binary): Don't expect acks in noack mode.
8885 (getpkt): Don't send ack/nac in noack mode.
8886 * server.c (handle_general_set): Handle QStartNoAckMode.
8887 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8888 qSupported.
8889 (main): Reset noack_mode on every connection.
8890 * server.h (noack_mode): Declare.
8891
8892 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8893
8894 * Makefile.in (GDBREPLAY_OBS): New variable.
8895 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8896
8897 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8898 Daniel Jacobowitz <dan@codesourcery.com>
8899
8900 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8901 (usr_store_inferior_registers): Likewise.
8902 (regsets_store_inferior_registers): Likewise.
8903
8904 2008-07-31 Rolf Jansen <rj@surtec.com>
8905 Pedro Alves <pedro@codesourcery.com>
8906
8907 * configure.ac: Check for memmem declaration.
8908 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8909 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8910 (disable_packet_qfThreadInfo): Unconditionally compile.
8911 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8912 * configure, config.in: Regenerate.
8913
8914 2008-07-28 Doug Kwan <dougkwan@google.com>
8915
8916 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8917 (linux_write_memory): Remove declaration of errno.
8918
8919 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8920
8921 * linux-low.c (handle_extended_wait): Do not use "status"
8922 variable uninitialized.
8923
8924 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8925
8926 * server.c (handle_v_attach): Inhibit reporting dll changes.
8927
8928 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8929
8930 * remote-utils.c (prepare_resume_reply): If requested, don't
8931 output "thread:TID" in the T stop reply.
8932
8933 * server.c (disable_packet_vCont, disable_packet_Tthread)
8934 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8935 (handle_query): If requested, disable support for qC, qfThreadInfo
8936 and qsThreadInfo.
8937 (handle_v_requests): If requested, disable support for vCont.
8938 (gdbserver_show_disableable): New.
8939 (main): Handle --disable-packet and --disable-packet=LIST.
8940
8941 * server.h (disable_packet_vCont, disable_packet_Tthread)
8942 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8943
8944 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8945
8946 * server.c (gdbserver_usage): Mention --version.
8947
8948 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8949
8950 * Makefile.in (gdbreplay.o): New rule.
8951
8952 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8953
8954 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8955 message, not gdbserver.
8956
8957 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8958 Nathan Sidwell <nathan@codesourcery.com>
8959 Joseph Myers <joseph@codesourcery.com>
8960
8961 * acinclude.m4: Include ../../config/acx.m4.
8962 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8963 * configure, config.in: Regenerate.
8964 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8965 * server.c (gdbserver_version): Print PKGVERSION.
8966 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8967 (main): Adjust gdbserver_usage calls.
8968 * gdbreplay.c (version, host_name): Add declarations.
8969 (gdbreplay_version, gdbreplay_usage): New.
8970 (main): Accept --version and --help options.
8971
8972 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8973
8974 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8975 (arm_breakpoint_at): Handle Thumb.
8976 (the_low_target): Add comment.
8977
8978 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8979
8980 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8981
8982 2008-05-09 Doug Evans <dje@google.com>
8983
8984 * server.h (decode_search_memory_packet): Declare.
8985 * remote-utils.c (decode_search_memory_packet): New fn.
8986 * server.c (handle_search_memory_1): New fn.
8987 (handle_search_memory): New fn.
8988 (handle_query): Process qSearch:memory packets.
8989
8990 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8991
8992 * regcache.c (registers_length): Remove.
8993 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8994 full register packet.
8995 * regcache.h (registers_length): Remove prototype.
8996 * server.h (PBUFSIZ): Define to 16384.
8997
8998 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8999
9000 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9001 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9002 powerpc-64l.o, and powerpc-altivec64l.o.
9003 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9004 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9005 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9006 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9007 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9008 to srv_xmlfiles.
9009
9010 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9011 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9012 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9013 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9014 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9015 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9016 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9017 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9018 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9019 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9020 (clean): Update.
9021
9022 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9023 (init_registers_powerpc_32l): ... this new prototype.
9024 (init_registers_powerpc_32): Remove, replace by ...
9025 (init_registers_powerpc_altivec32l): ... this new prototype.
9026 (init_registers_powerpc_e500): Remove, replace by ...
9027 (init_registers_powerpc_e500l): ... this new prototype.
9028 (init_registers_ppc64): Remove, replace by ...
9029 (init_registers_powerpc_64l): ... this new prototype.
9030 (init_registers_powerpc_64): Remove, replace by ...
9031 (init_registers_powerpc_altivec64l): ... this new prototype.
9032 (ppc_num_regs): Set to 73.
9033 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9034 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9035 (ppc_cannot_store_register): Handle orig_r3 and trap.
9036 (ppc_arch_setup): Update init_registers_... calls.
9037 (ppc_fill_gregset): Handle orig_r3 and trap.
9038
9039 * inferiors.c (clear_inferiors): Reset current_inferior.
9040
9041 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9042
9043 * acinclude.m4: Add override.m4.
9044 * configure: Regenerate.
9045
9046 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9047
9048 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9049 initial call to init_register_ppc64.
9050
9051 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9052
9053 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9054 single powerpc*-*-linux* case.
9055 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9056
9057 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9058
9059 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9060 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9061 from reg_xmlfiles.
9062 * linux-ppc-low.c: Include <elf.h>.
9063 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9064 (ppc_hwcap): New global variable.
9065 (ppc_regmap): Remove __SPE__ #ifdef sections.
9066 (ppc_regmap_e500): New global variable.
9067 (ppc_cannot_store_register): Update __SPE__ special case.
9068 (ppc_get_hwcap): New function.
9069 (ppc_arch_setup): Use it to determine whether inferior supports
9070 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9071 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9072 Do not access registers if target does not support AltiVec.
9073 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9074 Do not access registers if target does not support SPE.
9075 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9076
9077 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9078
9079 * linux-low.c (disabled_regsets, num_regsets): New.
9080 (use_regsets_p): Delete.
9081 (linux_wait_for_process): Clear disabled_regsets.
9082 (regsets_fetch_inferior_registers): Check and set it.
9083 (regsets_store_inferior_registers): Likewise.
9084 (linux_fetch_registers, linux_store_registers): Do not use
9085 use_regsets_p.
9086 (initialize_low): Allocate disabled_regsets.
9087
9088 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9089
9090 * Makefile.in (LIBOBJS): New.
9091 (OBS): Use LIBOBJS.
9092 (memmem.o): New rule.
9093 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9094 * configure: Regenerated.
9095
9096 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9097
9098 * server.c (handle_query): Never return "unsupported" for
9099 qXfer:features:read queries.
9100
9101 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9102
9103 * server.c (get_features_xml): Fix inverted condition.
9104 (handle_query): Always support qXfer:feature:read.
9105
9106 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9107
9108 * server.c (wrapper_argv): New.
9109 (start_inferior): Handle wrapper_argv. If set, expect an extra
9110 trap.
9111 (gdbserver_usage): Document --wrapper.
9112 (main): Parse --wrapper.
9113
9114 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9115
9116 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9117 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9118 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9119 (ppc_set_pc): Likewise.
9120 (ppc_arch_setup): New function.
9121 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9122 of collect_register.
9123 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9124
9125 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9126
9127 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9128 instead of linux-ppc64-low.o.
9129 * linux-ppc64-low.c: Remove file.
9130 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9131 (linux-ppc64-low.o): Remove rule.
9132
9133 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9134 (init_registers_powerpc_64): Likewise.
9135 (ppc_regmap): Conditionally define depending on __powerpc64__.
9136 (ppc_cannot_store_register): Do not special-case "fpscr" when
9137 compiled on __powerpc64__.
9138 (ppc_collect_ptrace_register): New function.
9139 (ppc_supply_ptrace_register): New function.
9140 (ppc_breakpoint): Change type to "unsigned int".
9141 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9142 (the_low_target): Conditionally provide initializers for the
9143 arch_setup member depending on __powerpc64__. Install
9144 collect_ptrace_register and supply_ptrace_register members.
9145
9146 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9147
9148 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9149 * server.c (gdbserver_xmltarget): Define.
9150 (get_features_xml): Use it to replace "target.xml" and arch_string.
9151
9152 * configure.srv: Remove srv_xmltarget. Add XML files that were
9153 mentioned there to srv_xmlfiles instead. Remove conditional tests
9154 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9155 srv_xmlfiles and srv_regobj to include all possible choices.
9156 * configure.ac (srv_xmltarget): Remove.
9157 (srv_xmlfiles): Do not add "target.xml".
9158 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9159 checks for supplementary target information.
9160 * configure: Regenerate.
9161 * Makefile.in (XML_TARGET): Remove.
9162 (target.xml): Remove rule.
9163 (clean): Do not clean up target.xml.
9164 (.PRECIOUS): Do not mention target.xml.
9165
9166 * target.h (struct target_ops): Remove arch_string member.
9167 * linux-low.c (linux_arch_string): Remove.
9168 (linux_target_ops): Remove arch_string initializer.
9169 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9170 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9171 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9172 * spu-low.c (spu_arch_string): Remove.
9173 (spu_target_ops): Remove arch_string initializer.
9174 * win32-low.c (win32_arch_string): Remove.
9175 (win32_target_ops): Remove arch_string initializer.
9176 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9177 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9178 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9179
9180 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9181
9182 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9183 by collect_ptrace_register and supply_ptrace_register hooks.
9184 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9185 instead of checking for the_low_target.left_pad_xfer.
9186 (usr_store_inferior_registers): Use collect_ptrace_register callback
9187 instead of checking for the_low_target.left_pad_xfer.
9188
9189 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9190 (s390_supply_ptrace_register): Likewise.
9191 (s390_fill_gregset): Call s390_collect_ptrace_register.
9192 (the_low_target): Update.
9193
9194 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9195 (ppc_supply_ptrace_register): Likewise.
9196 (the_low_target): Update.
9197
9198 * linux-i386-low.c (the_low_target): Update.
9199 * linux-x86-64-low.c (the_low_target): Update.
9200
9201 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9204 reg-s390.o and reg-s390x.o.
9205
9206 * linux-low.c (new_inferior): New global variable.
9207 (linux_create_inferior, linux_attach): Set it.
9208 (linux_wait_for_process): Call the_low_target.arch_setup after the
9209 target has stopped for the first time.
9210 (initialize_low): Do not call the_low_target.arch_setup.
9211
9212 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9213 (s390_set_pc): Likewise.
9214 (s390_arch_setup): New function.
9215 (the_low_target): Use s390_arch_setup as arch_setup routine.
9216
9217 * regcache.c (realloc_register_cache): New function.
9218 (set_register_cache): Call it for each existing regcache.
9219
9220 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9221
9222 * server.h (init_registers): Remove prototype.
9223
9224 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9225 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9226 instead of init_registers ().
9227 * linux-arm-low.c (init_registers_arm): Add prototype.
9228 (init_registers_arm_with_iwmmxt): Likewise.
9229 (the_low_target): Add initializer for arch_setup field.
9230 * linux-cris-low.c (init_registers_cris): Add prototype.
9231 (the_low_target): Add initializer for arch_setup field.
9232 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9233 (the_low_target): Add initializer for arch_setup field.
9234 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9235 (the_low_target): Add initializer for arch_setup field.
9236 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9237 (the_low_target): Add initializer for arch_setup field.
9238 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9239 (the_low_target): Add initializer for arch_setup field.
9240 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9241 (the_low_target): Add initializer for arch_setup field.
9242 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9243 (init_registers_mips64_linux): Likewise.
9244 (the_low_target): Add initializer for arch_setup field.
9245 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9246 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9247 (the_low_target): Add initializer for arch_setup field.
9248 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9249 (init_registers_powerpc_64): Likewise.
9250 (the_low_target): Add initializer for arch_setup field.
9251 * linux-s390-low.c (init_registers_s390): Add prototype.
9252 (init_registers_s390x): Likewise.
9253 (the_low_target): Add initializer for arch_setup field.
9254 * linux-sh-low.c (init_registers_sh): Add prototype.
9255 (the_low_target): Add initializer for arch_setup field.
9256 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9257 (the_low_target): Add initializer for arch_setup field.
9258 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9259 (the_low_target): Add initializer for arch_setup field.
9260
9261 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9262 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9263 instead of init_registers ().
9264 * win32-arm-low.c (init_registers_arm): Add prototype.
9265 (the_low_target): Add initializer for arch_setup field.
9266 * win32-i386-low.c (init_registers_i386): Add prototype.
9267 (the_low_target): Add initializer for arch_setup field.
9268
9269 * spu-low.c (init_registers_spu): Add prototype.
9270 (initialize_low): Call initialie_registers_spu () instead of
9271 initialize_registers ().
9272
9273 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9274
9275 * server.c (handle_v_requests): When handling the vRun and vAttach
9276 packets, if already debugging a process, don't kill it. Return an
9277 error instead.
9278
9279 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9280
9281 * server.c (handle_query): Correct length check.
9282
9283 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9284
9285 * win32-low.c (do_initial_child_stuff): Add process handle
9286 parameter. Set current_process_handle and current_process_id from the
9287 parameters. Clear globals.
9288 (win32_create_inferior): Don't set current_process_handle and
9289 current_process_id here. Instead pass them on the call to
9290 do_initial_child_stuff.
9291 (win32_attach): Likewise.
9292 (win32_clear_inferiors): New.
9293 (win32_kill): Don't close the current process handle or the
9294 current thread handle here. Instead call win32_clear_inferiors.
9295 (win32_detach): Don't open a new handle to the process. Call
9296 win32_clear_inferiors.
9297 (win32_join): Don't rely on current_process_handle; open a new
9298 handle using the process id.
9299 (win32_wait): Call win32_clear_inferiors when the inferior process
9300 has exited.
9301
9302 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9303
9304 * server.c (monitor_show_help): Add "exit".
9305
9306 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9307
9308 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9309 (clean): Add reg-xtensa.c.
9310 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9311 * configure.srv (xtensa*-*-linux*) New target.
9312 * linux-xtensa-low.c: New.
9313 * xtensa-xtregs.c: New.
9314
9315 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9316
9317 * hostio.c: Don't include errno.h.
9318 (errno_to_fileio_errno): Move to hostio-errno.
9319 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9320 error number outputting to the target->hostio_last_error callback.
9321 (hostio_packet_error): Use FILEIO_EINVAL directly.
9322 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9323 calls to hostio_error.
9324 * hostio-errno.c: New.
9325 * server.h (hostio_last_error_from_errno): Declare.
9326 * target.h (target_ops): Add hostio_last_error member.
9327 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9328 as hostio_last_error handler.
9329 * spu-low.c (spu_target_ops): Likewise.
9330 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9331 (wince_hostio_last_error): New functions.
9332 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9333 as hostio_last_error handler.
9334 (win32_target_ops) [!_WIN32_WCE]: Register
9335 hostio_last_error_from_errno as hostio_last_error handler.
9336 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9337 (hostio-errno.o): New rule.
9338 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9339 * configure.srv (srv_hostio_err_objs): New variable. Default to
9340 hostio-errno.o.
9341 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9342 * configure: Regenerate.
9343
9344 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9347 (linux_kill, linux_detach): Clean up the process list.
9348 * remote-utils.c (remote_open): Improve port number parsing.
9349 (putpkt_binary, input_interrupt): Only send interrupts if the target
9350 is running.
9351 * server.c (extended_protocol): Make static.
9352 (attached): Define earlier.
9353 (exit_requested, response_needed, program_argv): New variables.
9354 (target_running): New.
9355 (start_inferior): Clear attached here.
9356 (attach_inferior): Set attached here.
9357 (require_running): Define.
9358 (handle_query): Use require_running and target_running. Implement
9359 "monitor exit".
9360 (handle_v_attach, handle_v_run): New.
9361 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9362 (gdbserver_usage): Update.
9363 (main): Redo argument parsing. Handle --debug and --multi. Handle
9364 --attach along with other options or after the port. Save
9365 program_argv. Support no initial program. Resynchronize
9366 communication with GDB after an error. Handle "monitor exit".
9367 Use require_running and target_running. Always allow the extended
9368 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9369 restart in extended mode.
9370 * README: Refer to the GDB manual. Update --attach usage.
9371
9372 2007-12-20 Andreas Schwab <schwab@suse.de>
9373
9374 * linux-low.c (STACK_SIZE): Define.
9375 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9376 (linux_test_for_tracefork): Likewise.
9377
9378 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * linux-low.c (linux_wait_for_event): Update messages. Do not
9381 reinsert auto-delete breakpoints.
9382 * mem-break.c (struct breakpoint): Change return type of handler to
9383 int.
9384 (set_breakpoint_at): Update handler type.
9385 (reinsert_breakpoint_handler): Return 1 instead of calling
9386 delete_breakpoint.
9387 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9388 setting a new one.
9389 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9390 * mem-break.h (set_breakpoint_at): Update handler type.
9391 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9392 * win32-low.c (auto_delete_breakpoint): New.
9393 (get_child_debug_event): Use it.
9394
9395 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9396
9397 * configure.ac: Check for pread and pwrite.
9398 * hostio.c (handle_pread): Fall back to lseek and read.
9399 (handle_pwrite): Fall back to lseek and write.
9400 * config.in, configure: Regenerated.
9401
9402 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9403
9404 * server.c (myresume): Add own_buf argument.
9405 (main): Update calls.
9406
9407 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9408
9409 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9410 * remote-utils.c (remote_open): Do not call disable_async_io.
9411 (block_async_io): Delete.
9412 (unblock_async_io): Make static.
9413 (initialize_async_io): New.
9414 * server.c (handle_v_cont): Handle async I/O here.
9415 (myresume): Likewise. Move other common resume tasks here...
9416 (main): ... from here. Call initialize_async_io. Disable async
9417 I/O before the main loop.
9418 * server.h (initialize_async_io): Declare.
9419 (block_async_io, unblock_async_io): Delete prototypes.
9420 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9421
9422 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9423
9424 * remote-utils.c (readchar): Allow binary data in received messages.
9425
9426 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9427
9428 * win32-low.c (attaching): New global.
9429 (win32_create_inferior): Clear the `attaching' global.
9430 (win32_attach): Set the `attaching' global.
9431 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9432 attaching. Only set a breakpoint at the entry point if not
9433 attaching.
9434
9435 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9436
9437 * server.c (main): Don't report dll events on the initial
9438 connection on attaches.
9439
9440 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9441
9442 * server.c (main): Relax numerical bases supported for the pid of
9443 the --attach command line argument.
9444
9445 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9446
9447 * win32-low.c (win32_attach): Call OpenProcess before
9448 DebugActiveProcess, not after. Add last error output to error
9449 call.
9450
9451 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9452
9453 * win32-low.c (win32_get_thread_context)
9454 (win32_set_thread_context): New functions.
9455 (thread_rec): Use win32_get_thread_context.
9456 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9457 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9458 field.
9459
9460 2007-12-03 Leo Zayas
9461 Pedro Alves <pedro_alves@portugalmail.pt>
9462
9463 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9464 global variables.
9465 (child_add_thread): Minor cleanup.
9466 (child_continue): Resume artificially suspended threads before
9467 calling ContinueDebugEvent.
9468 (suspend_one_thread): New.
9469 (fake_breakpoint_event): New.
9470 (get_child_debug_event): Change return type to int. Check here if
9471 gdb sent an interrupt request. If a soft interrupt was requested,
9472 fake a breakpoint event. Return 0 if there is no event to handle,
9473 and 1 otherwise.
9474 (win32_wait): Don't check here if gdb sent an interrupt request.
9475 Ensure there is a valid event to handle.
9476 (win32_request_interrupt): Add soft interruption method as last
9477 resort.
9478
9479 2007-12-03 Leo Zayas
9480 Pedro Alves <pedro_alves@portugalmail.pt>
9481
9482 * win32-low.h (win32_thread_info): Add descriptions to the
9483 structure members. Replace `suspend_count' counter by a
9484 `suspended' flag.
9485 * win32-low.c (thread_rec): Update condition of when to get the
9486 context from the inferior. Rely on ContextFlags being set if it
9487 has already been retrieved. Only suspend the inferior thread if
9488 we haven't already. Warn if that fails.
9489 (continue_one_thread): s/suspend_count/suspended/. Only call
9490 ResumeThread once. Warn if that fails.
9491
9492 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9493
9494 * win32-low.c (win32_wait): Don't read from the inferior when it
9495 has already exited.
9496
9497 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9498
9499 * Makefile.in (win32_low_h): New variable.
9500 (win32-low.o): Add dependency on $(win32_low_h).
9501 (win32-arm-low.o, win32-i386-low.o): New rules.
9502
9503 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * hostio.c: Correct copyright year.
9506
9507 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * Makefile.in (OBS): Add hostio.o.
9510 (hostio.o): New rule.
9511 * server.h (handle_vFile): Declare.
9512 * hostio.c: New file.
9513 * server.c (handle_v_requests): Take packet_len and new_packet_len
9514 for binary packets. Call handle_vFile.
9515 (main): Update call to handle_v_requests.
9516
9517 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9518
9519 * linux-low.c: Include <sched.h>.
9520
9521 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9522
9523 * linux-low.c (linux_tracefork_grandchild): New.
9524 (linux_tracefork_child): Use clone.
9525 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9526
9527 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9528
9529 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9530
9531 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9532
9533 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9534
9535 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9536
9537 * inferiors.c (change_inferior_id): Delete.
9538 (add_pid_to_list, pull_pid_from_list): New.
9539 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9540 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9541 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9542 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9543 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9544 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9545 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9546 (using_threads): Always set to 1.
9547 (handle_extended_wait): New.
9548 (add_process): Do not set TID.
9549 (linux_create_inferior): Set must_set_ptrace_flags.
9550 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9551 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9552 (linux_thread_alive): Rename TID argument to LWPID.
9553 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9554 (linux_wait_for_event): Do not use TID or check using_threads. Update
9555 call to dead_thread_notify. Call handle_extended_wait.
9556 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9557 (send_sigstop): Delete sigstop_sent.
9558 (wait_for_sigstop): Avoid TID.
9559 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9560 (linux_test_for_tracefork): New.
9561 (linux_lookup_signals): Use thread_db_active and
9562 linux_supports_tracefork_flag.
9563 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9564 * linux-low.h (get_process_thread): Avoid TID.
9565 (struct process_ifo): Move thread_known and tid to the end. Remove
9566 sigstop_sent.
9567 (linux_attach_lwp, thread_db_init): Update prototypes.
9568 * server.h (change_inferior_id): Delete prototype.
9569 (add_pid_to_list, pull_pid_from_list): New prototypes.
9570 * thread-db.c (thread_db_use_events): New.
9571 (find_first_thread): Rename to...
9572 (find_one_thread): ...this. Update callers and messages. Do not
9573 call fatal. Check thread_db_use_events. Do not call
9574 change_inferior_id or new_thread_notify.
9575 (maybe_attach_thread): Update. Do not call new_thread_notify.
9576 (thread_db_init): Set thread_db_use_events. Check use_events.
9577 * utils.c (fatal, warning): Correct message prefix.
9578
9579 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9580
9581 * Makefile.in (clean): Remove new files.
9582 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9583 (powerpc-64.o, powerpc-64.c): New rules.
9584 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9585 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9586 with SPE.
9587 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9588 SPE targets.
9589 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9590 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9591 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9592 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9593 (target_regsets): Add AltiVec and SPE register sets.
9594 * configure.ac: Check for AltiVec and SPE.
9595 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9596 (ppc_fill_vrregset, ppc_store_vrregset): New.
9597 (target_regsets): Add AltiVec register set.
9598 * configure: Regenerated.
9599
9600 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9601
9602 * linux-low.c (O_LARGEFILE): Define.
9603 (linux_read_memory): Use /proc/PID/mem.
9604 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9605 * configure, config.in: Regenerated.
9606
9607 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9608
9609 * linux-low.c (linux_wait_for_event): Do not pass signals while
9610 single-stepping.
9611
9612 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9613
9614 * win32-low.c (create_process): New.
9615 (win32_create_inferior): Use create_process instead of
9616 CreateProcess. If create_process failed retry appending an ".exe"
9617 suffix. Store the GetLastError result immediatelly after
9618 create_process calls and use it on the call to error.
9619
9620 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9621
9622 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9623
9624 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9625
9626 * configure.ac: Switch license to GPLv3.
9627
9628 2007-08-01 Michael Snyder <msnyder@access-company.com>
9629
9630 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9631
9632 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9633
9634 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9635 typedef.
9636 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9637 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9638 CloseToolhelp32Snapshot.
9639 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9640 CloseToolhelp32Snapshot.
9641
9642 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9643
9644 * server.c (main): Check for inferior exit before main loop.
9645
9646 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9647
9648 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9649 instead of on tmp_desc.
9650
9651 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9652 Daniel Jacobowitz <dan@codesourcery.com>
9653
9654 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9655 (add_thread): Minor cleanups.
9656 (clear_inferiors): Move lower in the file. Clear the DLL
9657 list.
9658 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9659 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9660 (xml_escape_text): New.
9661 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9662 for qSupported.
9663 (handle_v_cont): Report errors.
9664 (gdbserver_version): Update.
9665 (main): Correct size of own_buf. Do not report initial DLL events.
9666 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9667 (unloaded_dll, xml_escape_text): New.
9668 * win32-low.c (enum target_waitkind): Update comments.
9669 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9670 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9671 (win32_EnumProcessModules, win32_GetModuleInformation)
9672 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9673 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9674 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9675 (win32_Module32First, win32_Module32Next, load_toolhelp)
9676 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9677 (get_child_debug_event): Handle DLL events.
9678 (win32_wait): Likewise.
9679
9680 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9681
9682 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9683 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9684
9685 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9686
9687 * win32-low.c (handle_output_debug_string): Ignore event if not
9688 waiting.
9689
9690 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9691
9692 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9693
9694 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9695
9696 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9697
9698 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9699
9700 * inferiors.c (change_inferior_id): Add comment.
9701 * linux-low.c (check_removed_breakpoint): Add an early
9702 prototype. Improve debug output.
9703 (linux_attach): Doc update.
9704 (linux_detach_one_process, linux_detach): Clean up before releasing
9705 each process.
9706 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9707 * linux-low.h (struct process_info): Doc improvement.
9708 * mem-break.c (delete_all_breakpoints): New.
9709 * mem-break.h (delete_all_breakpoints): New prototype.
9710 * thread-db.c (find_first_thread): New.
9711 (thread_db_create_event): Call it instead of
9712 thread_db_find_new_threads. Clean up unused variables.
9713 (maybe_attach_thread): Remove first thread handling.
9714 (thread_db_find_new_threads): Use find_first_thread.
9715 (thread_db_get_tls_address): Likewise.
9716
9717 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9718
9719 * thread-db.c (thread_db_find_new_threads): Add prototype.
9720 (thread_db_create_event): Check for the main thread before adding
9721 a new thread.
9722 (maybe_attach_thread): Only enable event reporting if TID == 0.
9723 (thread_db_get_tls_address): Check for new threads.
9724
9725 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * linux-low.c (linux_create_inferior): Try execv before execvp.
9728 * spu-low.c (spu_create_inferior): Likewise.
9729
9730 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9731
9732 * linux-low.c (linux_create_inferior): Change execv to execvp.
9733 * spu-low.c (spu_create_inferior): Likewies.
9734
9735 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9736
9737 * Makefile.in (clean): Clean new files instead of deleted ones.
9738 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9739 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9740 rules.
9741 * configure.srv: Specify XML files and new regformats for MIPS and
9742 MIPS64 GNU/Linux.
9743 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9744 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9745 an entry for the restart register.
9746 (mips_cannot_fetch_register, mips_cannot_store_register)
9747 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9748 register names to match the XML descriptions.
9749 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9750 restart register instead of $0.
9751
9752 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9753 Markus Deuling <deuling@de.ibm.com>
9754
9755 * remote-utils.c (decode_xfer_write): New function.
9756 * server.h (decode_xfer_write): Add prototype.
9757 * server.c (handle_query): Add PACKET_LEN argument. Support
9758 qXfer:spu:read and qXfer:spu:write packets.
9759 (main): Pass packet_len to handle_query.
9760 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9761 * target.h (target_ops): Add qxfer_spu.
9762
9763 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9764
9765 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9766 accessing non-seekable spufs files.
9767
9768 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9769
9770 * server.c (handle_query): Add reply for qC packet.
9771
9772 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9773 Leo Zayas <lerele@champenstudios@com>
9774
9775 * server.h (check_remote_input_interrupt_request): New function.
9776 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9777 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9778 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9779 (check_remote_input_interrupt_request): New function.
9780 * server.h (check_remote_input_interrupt_request): Declare.
9781 * win32-low.c (winapi_DebugBreakProcess,
9782 winapi_GenerateConsoleCtrlEvent): New typedefs.
9783 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9784 to 250 ms.
9785 (win32_wait): Check for remote interrupt request
9786 with check_remote_input_interrupt_request.
9787 (win32_request_interrupt): New function.
9788 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9789
9790 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9791
9792 * win32-low.c (debug_registers_changed,
9793 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9794 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9795 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9796 (thread_rec): Get context using the low target.
9797 (child_add_thread): Call thread_added on the low target,
9798 which does the same thing.
9799 (regptr): Delete.
9800 (do_initial_child_stuff): Remove debug registers references.
9801 Set context using the low target. Resume threads after
9802 setting the contexts.
9803 (child_continue): Remove dead variable. Remove debug
9804 registers references.
9805 (child_fetch_inferior_registers): Go through the low target.
9806 (do_child_store_inferior_registers): Remove.
9807 (child_store_inferior_registers): Go through the low target.
9808 (win32_resume): Remove debug registers references.
9809 Set context using the low target.
9810 (handle_exception): Change return type to void. Don't record
9811 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9812 first chance exception.
9813 (get_child_debug_event): Change return type to void. Remove
9814 goto loop. Always return after waiting for debug event.
9815 (win32_wait): Convert to switch statement. Handle spurious
9816 events.
9817
9818 * win32-i386-low.c (debug_registers_changed,
9819 debug_registers_used): New.
9820 (initial_stuff): Rename to ...
9821 (i386_initial_stuff): ... this. Clear debug registers
9822 state variables.
9823 (store_debug_registers): Delete.
9824 (i386_get_thread_context): New.
9825 (load_debug_registers): Delete.
9826 (i386_set_thread_context): New.
9827 (i386_thread_added): New.
9828 (single_step): Rename to ...
9829 (i386_single_step): ... this.
9830 (do_fetch_inferior_registers): Rename to ...
9831 (i386_fetch_inferior_register): ... this.
9832 (i386_store_inferior_register): New.
9833 (the_low_target): Adapt to new interface.
9834
9835 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9836 (arm_get_thread_context): New.
9837 (arm_set_thread_context): New.
9838 (regptr): New.
9839 (do_fetch_inferior_registers): Rename to ...
9840 (arm_fetch_inferior_register): ... this.
9841 (arm_store_inferior_register): New.
9842 (arm_wince_breakpoint): Reimplement as unsigned long.
9843 (arm_wince_breakpoint_len): Define.
9844 (the_low_target): Adapt to new interface.
9845
9846 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9847 load_debug_registers. Add get_thread_context, set_thread_context,
9848 thread_added and store_inferior_register. Rename
9849 fetch_inferior_registers to fetch_inferior_register.
9850 (regptr): Remove declaration.
9851
9852 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9853
9854 * linux-low.c (linux_detach): Change return type to int. Return 0.
9855 * spu-low.c (spu_detach): Likewise.
9856
9857 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9858
9859 * target.h (target_ops): Change return type of detach to int.
9860 Add join.
9861 (join_inferior): New.
9862 * server.c (main): Don't skip detach support on mingw32.
9863 If the inferior doesn't support detaching return error.
9864 Call join_inferior instead of using waitpid.
9865 * linux-low.c (linux_join): New.
9866 (linux_target_op): Add linux_join.
9867 * spu-low.c (spu_join): New.
9868 (spu_target_ops): Add spu_join.
9869 * win32-low.c (win32_detach): Adapt to new interface.
9870 Reopen current_process_handle before detaching. Issue a child
9871 resume before detaching.
9872 (win32_join): New.
9873 (win32_target_op): Add win32_join.
9874
9875 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * win32-low.c (win32-attach): Fix return value.
9878 * target.h (target_ops): Describe ATTACH return values.
9879
9880 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9881
9882 * win32-low.c (GETPROCADDRESS): Define.
9883 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9884 (winapi_DebugSetProcessKillOnExit): Likewise.
9885 (win32_create_inferior): Force usage of ansi CreateProcessA.
9886 (win32_attach): Use GETPROCADDRESS.
9887 (win32_detach): Likewise.
9888
9889 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9890
9891 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9892
9893 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9894
9895 * win32-low.c: Commit leftover changes from 2007-03-29.
9896
9897 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9898
9899 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9900 fields short instead of int. Add explicit padding.
9901 (i387_cache_to_fsave): Remove unnecessary casts.
9902 (i387_fsave_to_cache): Doc fix.
9903 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9904
9905 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9906
9907 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9908 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9909
9910 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9911
9912 * configure.srv (arm*-*-mingw32ce*): Move near the other
9913 arm targets.
9914
9915 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9916
9917 * configure.ac: Add errno checking.
9918 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9919 sys/file.h and malloc.h.
9920 (AC_CHECK_DECLS): Add perror.
9921 (srv_mingwce): Handle.
9922 * configure.srv (i[34567]86-*-cygwin*): Add
9923 win32-i386-low.o to srv_tgtobj.
9924 (i[34567]86-*-mingw*): Likewise.
9925 (arm*-*-mingw32ce*): Add case.
9926 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9927 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9928 [__MINGW32CE__] (strerror): New function.
9929 [__MINGW32CE__] (errno): Define to GetLastError.
9930 [__MINGW32CE__] (COUNTOF): New macro.
9931 (remote_open): Remove extra close call.
9932 * mem-break.c (delete_breakpoint_at): New function.
9933 * mem-break.h (delete_breakpoint_at): Declare.
9934 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9935 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9936 [USE_WIN32API] (read, write): Add char* casts.
9937 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9938 * server.h: Include wincecompat.h on Windows CE.
9939 [HAVE_ERRNO_H]: Check.
9940 (perror): Declare if not declared.
9941 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9942 (perror_with_name): Remove errno declaration.
9943 * wincecompat.h: New.
9944 * wincecompat.c: New.
9945 * win32-low.h: New.
9946 * win32-arm-low.c: New.
9947 * win32-i386-low.c: New.
9948 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9949 (OUTMSG2): Make it safe.
9950 (_T): New macro.
9951 (COUNTOF): New macro.
9952 (NUM_REGS): Get it from the low target.
9953 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9954 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9955 (thread_rec): Let low target handle debug registers.
9956 (child_add_thread): Likewise.
9957 (child_init_thread_list): Likewise.
9958 (continue_one_thread): Likewise.
9959 (regptr): New.
9960 (do_child_fetch_inferior_registers): Move to ...
9961 * win32-i386-low.c: ... here, and rename to ...
9962 (do_fetch_inferior_registers): ... this.
9963 * win32-low.c (child_fetch_inferior_registers):
9964 Go through the low target.
9965 (do_child_store_inferior_registers): Use regptr.
9966 (strwinerror): New function.
9967 (win32_create_inferior): Handle Windows CE.
9968 Use strwinerror instead of strerror on Windows error
9969 codes. Add program to the error output.
9970 Don't close the main thread handle on Windows CE.
9971 (win32_attach): Use coredll.dll on Windows CE.
9972 (win32_kill): Close current process and current
9973 thread handles.
9974 (win32_detach): Use coredll.dll on Windows CE.
9975 (win32_resume): Let low target handle debug registers, and
9976 step request.
9977 (handle_exception): Add/Remove initial breakpoint. Avoid
9978 non-existant WSTOPSIG on Windows CE.
9979 (win32_read_inferior_memory): Cast to remove warning.
9980 (win32_arch_string): Go through the low target.
9981 (initialize_low): Call set_breakpoint_data with the low
9982 target's breakpoint.
9983 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9984 FOP_REGNUM, mappings): Move to ...
9985 * win32-i386-low.c: ... here.
9986 * win32-low.c (win32_thread_info): Move to ...
9987 * win32-low.h: ... here.
9988 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9989 win32-arm-low.c and wincecompat.c.
9990 (all:): Add $EXEEXT.
9991 (install-only:): Likewise.
9992 (gdbserver:): Likewise.
9993 (gdbreplay:): Likewise.
9994 * config.in: Regenerate.
9995 * configure: Regenerate.
9996
9997 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9998
9999 * win32-low.c: Rename typedef thread_info to
10000 win32_thread_info throughout.
10001
10002 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10003
10004 * win32-i386-low.c: Rename to ...
10005 * win32-low.c: ... this.
10006 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10007 * Makefile.in: Likewise.
10008
10009 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10010
10011 * remote-utils.c (monitor_output): Constify msg parameter.
10012 * server.h (monitor_output): Likewise.
10013 * win32-i386-low.c (handle_output_debug_string): New.
10014 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10015 handle_output_debug_string.
10016 (get_child_debug_event): Likewise.
10017
10018 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10019
10020 * server.c (main): Correct strtoul check.
10021
10022 2007-03-27 Jon Ringle <jon@ringle.org>
10023
10024 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10025
10026 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10027
10028 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10029
10030 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10031
10032 * terminal.h: Check HAVE_SGTTY_H.
10033
10034 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10035
10036 * remote-utils.c (remote_open): Print out the assigned port number.
10037
10038 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10039
10040 * remote-utils.c (monitor_output): New function.
10041 * server.c (debug_threads): Define here.
10042 (monitor_show_help): New function.
10043 (handle_query): Handle qRcmd.
10044 (main): Do not handle 'd' packet.
10045 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10046 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10047 of debug_threads.
10048
10049 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10050
10051 * Makefile.in (EXEEXT): New.
10052 (clean): Use $(EXEEXT).
10053
10054 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10055
10056 * target.h (target_ops): Rename send_signal to request_interrupt,
10057 and remove enum target_signal parameter.
10058 * linux-low.c (linux_request_interrupt): Rename from
10059 linux_send_signal, and always send SIGINT.
10060 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10061 and always send SIGINT.
10062 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10063 of send_signal.
10064 (input_interrupt): Likewise.
10065
10066 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10067
10068 * server.c (get_features_xml): Check if target implemented
10069 arch_string.
10070 * win32-i386-low.c (win32_arch_string): New.
10071 (win32_target_ops): Add win32_arch_string as arch_string member.
10072
10073 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10074
10075 * spu-low.c (spu_arch_string): New.
10076 (spu_target_ops): Add spu_arch_string.
10077
10078 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10079
10080 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10081 * configure.ac: Do not check for terminal.h.
10082 * configure, config.in: Regenerated.
10083
10084 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10085
10086 * Makefile.in (OBS): Add $(XML_BUILTIN).
10087 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10088 (clean): Update.
10089 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10090 (arm-with-iwmmxt.c): New.
10091 * config.in, configure: Regenerate.
10092 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10093 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10094 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10095 (arm*-*-linux*): Add iWMMXt and regset support.
10096 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10097 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10098 (arm_store_wmmxregset, target_regsets): New.
10099 * server.c (get_features_xml): Take annex argument. Check builtin
10100 XML documents.
10101 (handle_query): Handle multiple annexes.
10102
10103 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10104
10105 * remote-utils.c [USE_WIN32API] (read, write): Define.
10106 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10107 write.
10108
10109 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10110
10111 * linux-i386-low.c (the_low_target): Set arch_string.
10112 * linux-x86-64-low.c (the_low_target): Likewise.
10113 * linux-low.c (linux_arch_string): New.
10114 (linux_target_ops): Add it.
10115 * linux-low.h (struct linux_target_ops): Add arch_string.
10116 * server.c (write_qxfer_response): Use const void * for DATA.
10117 (get_features_xml): New.
10118 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10119 * target.h (struct target_ops): Add arch_string method.
10120
10121 2007-01-03 Denis Pilat <denis.pilat@st.com>
10122 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * linux-low.c (linux_kill): Handle being called with no threads.
10125 * win32-i386-low.c (win32_kill): Likewise.
10126 (get_child_debug_event): Clear current_process_handle.
10127
10128 2006-12-30 Denis PILAT <denis.pilat@st.com>
10129 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * remote-utils.c (remote_open): Check the type of specified
10132 serial port devices before opening them.
10133 * server.c (main): Kill the inferior if an error occurs during
10134 the first remote_open.
10135
10136 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10137
10138 * README: Update supported targets.
10139
10140 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * Makefile.in (clean): Remove reg-mips64.c.
10143 (reg-mips64.c, reg-mips64.o): New rules.
10144 * configure.srv: Handle mips64. Include regset support for mips.
10145 * linux-mips-low.c (union mips_register): New.
10146 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10147 (mips_breakpoint, mips_breakpoint_at): Use int.
10148 (mips_collect_register, mips_supply_register)
10149 (mips_collect_register_32bit, mips_supply_register_32bit)
10150 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10151 (mips_store_fpregset, target_regsets): New.
10152 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10153
10154 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10155
10156 * configure.srv: Add target "spu*-*-*".
10157 * Makefile.in (clean): Remove reg-spu.c.
10158 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10159 * spu-low.c: New file.
10160
10161 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10162
10163 * configure.ac: Correct td_thr_tls_get_addr test.
10164 * configure: Regenerated.
10165
10166 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * linux-low.c (linux_wait_for_event): Reformat. Use the
10169 pass_signals array.
10170 * remote-utils.c (decode_address_to_semicolon): New.
10171 * server.c (pass_signals, handle_general_set): New.
10172 (handle_query): Mention QPassSignals for qSupported.
10173 (main): Call handle_general_set.
10174 * server.h (pass_signals, decode_address_to_semicolon): New.
10175
10176 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * server.c (handle_query): Correct error handling for read_auxv.
10179
10180 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10181
10182 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10183 and srv_linux_thread_db to yes.
10184 * linux-s390-low.c (s390_fill_gregset): New function.
10185 (target_regsets): Define data structure.
10186
10187 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10188
10189 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10190 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10191 * config.in, configure: Regenerated.
10192 * inferiors.c (gdb_id_to_thread): New function.
10193 (gdb_id_to_thread_id): Use it.
10194 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10195 * linux-low.h (struct process_info): Add th member.
10196 (thread_db_get_tls_address): New prototype.
10197 * remote-utils.c (decode_address): Make non-static.
10198 * server.c (handle_query): Handle qGetTLSAddr.
10199 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10200 * target.h (struct target_ops): Add get_tls_address.
10201 * thread-db.c (maybe_attach_thread): Save the thread handle.
10202 (thread_db_get_tls_address): New.
10203
10204 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10207 (linux_resume_one_process): Take a siginfo_t *. Update all
10208 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10209 (struct pending_signals): Add a siginfo_t.
10210 (linux_wait_for_process): Always set last_status.
10211 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10212 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10213 * linux-low.h (struct process_info): Add last_status.
10214
10215 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10216
10217 * remote-utils.c (try_rle): New function.
10218 (putpkt_binary): Use it.
10219
10220 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10221
10222 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10223 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10224 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10225 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10226 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10227 point registers.
10228
10229 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10230
10231 * server.c (terminal_fd): New variable.
10232 (old_foreground_pgrp): Likewise.
10233 (restore_old_foreground_pgrp): New function.
10234 (start_inferior): Record the terminal file descriptor in terminal_fd
10235 and its original foreground group in old_foreground_pgrp. Register
10236 restore_old_foreground_pgrp with atexit().
10237
10238 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10239
10240 * server.c (handle_query): Correct qPart to qXfer.
10241
10242 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * configure.ac: Check for more headers which are missing on
10245 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10246 * configure.srv: Add Cygwin and mingw32.
10247 * remote-utils.c: Don't include headers unconditionally which
10248 are missing on mingw32. Include <winsock.h> for mingw32.
10249 (remote_open): Adjust for mingw32 support. Flush
10250 standard error after writing to it.
10251 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10252 (unblock_async_io, enable_async_io, disable_async_io)
10253 (readchar, getpkt): Update for Winsock support.
10254 (prepare_resume_reply): Expect a protocol signal number.
10255 * server.c: Disable <sys/wait.h> on mingw32.
10256 (start_inferior): Adjust for mingw32 support. Flush
10257 standard error after writing to it.
10258 (attach_inferior): Likewise. Use protocol signal
10259 numbers.
10260 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10261 and names.
10262 * win32-i386-low.c: New file.
10263 * Makefile.in (XM_CLIBS): Set.
10264 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10265 (win32-i386-low.o): New dependency rule.
10266 * linux-low.c (linux_wait): Use target signal numbers.
10267 * target.h (struct target_ops): Doc fix.
10268 * server.h (target_signal_to_name): New prototype.
10269 * gdbreplay.c: Don't include headers unconditionally which
10270 are missing on mingw32. Include <winsock.h> for mingw32.
10271 (remote_close, remote_open): Adjust for Winsock support.
10272 * configure, config.in: Regenerated.
10273
10274 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10275
10276 * server.c (decode_xfer_read, write_qxfer_response): New.
10277 (handle_query): Take a packet length argument. Handle
10278 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10279 the qSupported response.
10280 (main): Update call to handle_query.
10281
10282 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10283
10284 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10285 (putpkt_binary): Renamed from putpkt and adjusted for binary
10286 data.
10287 (putpkt): New wrapper for putpkt_binary.
10288 (readchar): Don't mask off the high bit.
10289 (decode_X_packet): New function.
10290 * server.c (main): Call putpkt_binary if a handler sets the packet
10291 length. Save the length of the incoming packet. Handle 'X'.
10292 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10293
10294 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10295
10296 * server.c (handle_query): Handle qSupported.
10297
10298 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * remote-utils.c (all_symbols_looked_up): New variable.
10301 (look_up_one_symbol): Check it.
10302 * server.h (look_up_one_symbol): New declaration.
10303 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10304
10305 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10306
10307 * Makefile.in (linux-arm-low.o): Update dependencies.
10308 * linux-arm-low.c: Include "gdb_proc_service.h".
10309 (PTRACE_GET_THREAD_AREA): Define.
10310 (ps_get_thread_area): New function.
10311
10312 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10313
10314 * configure.srv (m68k*-*-uclinux*): New target.
10315 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10316 (linux_resume_one_process): Remove extraneous cast.
10317 (linux_read_offsets): New.
10318 (linux_target_op): Add linux_read_offsets on mmuless systems.
10319 * server.c (handle_query): Add qOffsets logic.
10320 * target.h (struct target_ops): Add read_offsets.
10321
10322 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10323
10324 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10325 (PTRACE_GET_THREAD_AREA): Define.
10326 (ps_get_thread_area): New function.
10327 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10328 (linux-x86-64-low.o): Update.
10329
10330 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10331
10332 * configure.ac: Remove checks for prfpregset_t.
10333 * gdb_proc_service.h: New file.
10334 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10335 new "gdb_proc_service.h".
10336 * proc-service.c: Likewise.
10337 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10338 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10339 * Makefile.in (gdb_proc_service_h): Updated.
10340 * configure, config.in: Regenerated.
10341
10342 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10343
10344 * remote-utils.c (prepare_resume_reply): Move declaration
10345 of gdb_id_from_wait to the top of the block.
10346
10347 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * linux-low.c (regsets_store_inferior_registers): Read the regset
10350 from the target before filling it.
10351
10352 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10353
10354 * server.c (attach_inferior): Return SIGTRAP for a successful
10355 attach.
10356
10357 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10358
10359 * Makefile.in (OBS): Add version.o.
10360 (STAGESTUFF): Delete.
10361 (version.o): Add dependencies.
10362 (version.c): Replace rule.
10363 (clean): Remove version.c.
10364 * server.c (gdbserver_version): New.
10365 (gdbserver_usage): Use printf.
10366 (main): Handle --version and --help.
10367 * server.h (version, host_name): Add declarations.
10368
10369 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10370
10371 * linux-arm-low.c:
10372 * linux-arm-low.c:
10373 * inferiors.c:
10374 * i387-fp.h:
10375 * i387-fp.c:
10376 * gdbreplay.c:
10377 * regcache.c:
10378 * proc-service.c:
10379 * mem-break.h:
10380 * mem-break.c:
10381 * linux-x86-64-low.c:
10382 * linux-sh-low.c:
10383 * linux-s390-low.c:
10384 * linux-ppc64-low.c:
10385 * linux-ppc-low.c:
10386 * linux-mips-low.c:
10387 * linux-m68k-low.c:
10388 * linux-m32r-low.c:
10389 * linux-low.h:
10390 * linux-low.c:
10391 * linux-ia64-low.c:
10392 * linux-i386-low.c:
10393 * linux-crisv32-low.c:
10394 * thread-db.c:
10395 * terminal.h:
10396 * target.h:
10397 * target.c:
10398 * server.h:
10399 * server.c:
10400 * remote-utils.c:
10401 * regcache.h:
10402 * utils.c:
10403 * Makefile.in:
10404 * configure.ac:
10405 * gdbserver.1: Add (C) after Copyright. Update the FSF
10406 address.
10407
10408 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10409
10410 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10411 (arm_breakpoint_at): Recognize both breakpoints.
10412 (the_low_target): Use the correct breakpoint instruction.
10413
10414 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10415
10416 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10417 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10418 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10419 (the_low_target): Update.
10420
10421 2005-10-25 Andreas Schwab <schwab@suse.de>
10422
10423 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10424
10425 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10426 (ia64_num_regs): Reduce to 462.
10427
10428 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10429
10430 * acinclude.m4: Correct quoting.
10431 * aclocal.m4: Regenerated.
10432
10433 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10434 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10435 (thread_db_init): Call thread_db_err_str.
10436 * configure.ac: Check for TD_VERSION.
10437 * config.in, configure: Regenerated.
10438
10439 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10440
10441 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10442
10443 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10444
10445 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10446 is not available. Define HAVE_PTRACE_GETREGS if it is.
10447 * config.in, configure: Regenerated.
10448 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10449 * linux-i386-low.c, linux-m68k-low.c: Update to use
10450 HAVE_PTRACE_GETREGS.
10451 * linux-low.c (regsets_fetch_inferior_registers)
10452 (regsets_store_inferior_registers): Only return 0 if we processed
10453 GENERAL_REGS.
10454 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10455 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10456
10457 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * inferiors.c (struct thread_info): Add gdb_id.
10460 (add_thread): Add gdb_id argument.
10461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10462 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10463 calls to add_thread.
10464 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10465 * server.c (handle_query): Use thread_to_gdb_id.
10466 (handle_v_cont, main): Use gdb_id_to_thread_id.
10467 * server.h (add_thread): Update prototype.
10468 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10469 prototypes.
10470
10471 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10472
10473 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10474 left-padded registers.
10475 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10476 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10477
10478 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10479
10480 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10481 * configure: Regenerate.
10482 * config.in: Regenerate.
10483 * server.h (NEED_DECLARATION_STRERROR):
10484 Replace with !HAVE_DECL_STRERROR.
10485
10486 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10487
10488 * linux-low.c (linux_wait, linux_send_signal): Don't test
10489 an unsigned long variable for > 0 if it could be MAX_ULONG.
10490 * server.c (myresume): Likewise.
10491 * target.c (set_desired_inferior): Likewise.
10492
10493 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10494
10495 * configure.ac: Simplify and improve check for socklen_t.
10496 * configure, config.in: Regenerate.
10497
10498 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10499
10500 * acconfig.h: Remove.
10501 * configure.ac: Add a test for socklen_t. Use three-argument
10502 AC_DEFINE throughout.
10503 * config.in: Regenerated using autoheader 2.59.
10504 * configure: Regenerated.
10505
10506 * gdbreplay.c (socklen_t): Provide a default.
10507 (remote_open): Use socklen_t.
10508 * remote-utils.c (socklen_t): Provide a default.
10509 (remote_open): Use socklen_t.
10510 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10511 unsigned char.
10512
10513 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10514 char for buffers.
10515 * linux-low.c (linux_read_memory, linux_write_memory)
10516 (linux_read_auxv): Likewise.
10517 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10518 (check_mem_write): Likewise.
10519 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10520 Likewise.
10521 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10522 (registers_from_string, register_data): Likewise.
10523 * server.c (handle_query, main): Likewise.
10524 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10525 (decode_M_packet): Likewise.
10526 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10527 * target.h (struct target_ops): Update read_memory, write_memory,
10528 and read_auxv.
10529 (read_inferior_memory, write_inferior_memory): Update.
10530 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10531 to unsigned char *.
10532 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10533 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10534 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10535 linux-s390-low.c, linux-sh-low.c: Update for changes in
10536 read_inferior_memory and the_low_target->breakpoint.
10537
10538 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10541 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10542 * configure.srv: Add powerpc64-*-linux*.
10543 * linux-ppc64-low.c: New file.
10544
10545 2005-05-23 Orjan Friberg <orjanf@axis.com>
10546
10547 * linux-cris-low.c: New file with support for CRIS.
10548 * linux-crisv32-low.c: Ditto for CRISv32.
10549 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10550 (clean): Add reg-cris.c and reg-crisv32.c.
10551 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10552 reg-crisv32.o, and reg-crisv32.c to make rules.
10553 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10554 recognized targets.
10555
10556 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10557
10558 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10559 of sizeof (PTRACE_XFER_TYPE).
10560 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10561
10562 2005-05-12 Orjan Friberg <orjanf@axis.com>
10563
10564 * target.h (struct target_ops): Add insert_watchpoint,
10565 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10566 pointers for hardware watchpoint support.
10567 * linux-low.h (struct linux_target_ops): Ditto.
10568 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10569 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10570 to linux_target_ops.
10571 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10572 reply packet.
10573 * server.c (main): Recognize 'Z' and 'z' packets.
10574
10575 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10576
10577 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10578 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10579 (the_low_target): Add new members.
10580
10581 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10582
10583 * proc-service.c (ps_lgetregs): Search all_processes instead of
10584 all_threads.
10585
10586 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10587
10588 * server.c (start_inferior): Change return type to int.
10589 (attach_inferior): Change sigptr to int *.
10590 (handle_v_cont, handle_v_requests): Change signal to int *.
10591 (main): Change signal to int.
10592
10593 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10594
10595 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10596 * configure.srv: Add m32r*-*-linux*.
10597 * linux-m32r-low.c: New file.
10598
10599 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10602
10603 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10604
10605 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10606 Take unsigned long arguments for PIDs.
10607 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10608 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10609 (wait_for_sigstop, linux_resume_one_process)
10610 (regsets_fetch_inferior_registers, linux_send_signal)
10611 (linux_read_auxv): Likewise. Update the types of variables holding
10612 PIDs. Update format string specifiers.
10613 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10614 * remote-utils.c (prepare_resume_reply): Likewise.
10615 * server.c (cont_thread, general_thread, step_thread)
10616 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10617 unsigned long.
10618 (handle_query): Update format specifiers.
10619 (handle_v_cont, main): Use strtoul for thread IDs.
10620 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10621 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10622 (general_thread, step_thread, thread_from_wait)
10623 (old_thread_from_wait): Update.
10624 * target.h (struct thread_resume): Use unsigned long for THREAD.
10625 (struct target_ops): Use unsigned long for arguments to attach and
10626 thread_alive.
10627
10628 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * acinclude.m4: Include bfd/bfd.m4 directly.
10631 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10632 <agriffis@toolchain.org>.
10633 * aclocal.m4, configure: Regenerated.
10634
10635 2005-01-07 Andrew Cagney <cagney@gnu.org>
10636
10637 * configure.ac: Rename configure.in, require autoconf 2.59.
10638 * configure: Re-generate.
10639
10640 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10641
10642 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10643 LIBS when finished.
10644 * aclocal.m4: Regenerated.
10645 * configure: Regenerated.
10646
10647 2004-11-21 Andreas Schwab <schwab@suse.de>
10648
10649 * linux-m68k-low.c (m68k_num_gregs): Define.
10650 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10651 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10652 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10653 (m68k_breakpoint_at): New. Add to the_low_target.
10654
10655 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10656 srv_linux_thread_db to yes.
10657
10658 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10659
10660 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10661 (ARCH_SET_FS): Likewise.
10662 (ARCH_GET_FS): Likewise.
10663 (ARCH_GET_GS): Likewise.
10664
10665 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10666
10667 * linux-i386-low.c (ps_get_thread_area): New.
10668 * linux-x86-64-low.c (ps_get_thread_area): New.
10669 * linux-low.c: Include <sys/syscall.h>.
10670 (linux_kill_one_process): Don't kill the first thread here.
10671 (linux_kill): Kill the first thread here.
10672 (kill_lwp): New function.
10673 (send_sigstop, linux_send_signal): Use it.
10674 * proc-service.c: Clean up #ifdefs.
10675 (fpregset_info): Delete.
10676 (ps_lgetregs): Update and enable implementation.
10677 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10678 implementations.
10679 * remote-utils.c (struct sym_cache, symbol_cache): New.
10680 (input_interrupt): Print a clearer message.
10681 (async_io_enabled): New variable.
10682 (enable_async_io, disable_async_io): Use it. Update comments.
10683 (look_up_one_symbol): Use the symbol cache.
10684 * thread-db.c (thread_db_look_up_symbols): New function.
10685 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10686
10687 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10688
10689 * configure.in: Test for -rdynamic.
10690 * configure: Regenerated.
10691 * Makefile (INTERNAL_LDFLAGS): New.
10692 (gdbserver, gdbreplay): Use it.
10693
10694 2004-09-02 Andrew Cagney <cagney@gnu.org>
10695
10696 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10697
10698 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10699
10700 * linux-low.c (linux_wait): Clear all_processes list also.
10701
10702 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10703
10704 * linux-low.c: Include <errno.h>. Remove extern declaration of
10705 errno.
10706
10707 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10708
10709 * gdbreplay.c, server.h, utils.c: Update copyright years.
10710
10711 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10712
10713 * server.c (main): Print child status or termination signal from
10714 variable 'signal', not 'sig'.
10715
10716 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10717
10718 * linux-low.c (linux_read_memory): Change return type to
10719 int. Check for and return error from ptrace().
10720 * target.c (read_inferior_memory): Change return type to int. Pass
10721 back return status from the_target->read_memory().
10722 * target.h (struct target_ops): Adapt *read_memory() prototype.
10723 Update comment.
10724 (read_inferior_memory): Adapt prototype.
10725 * server.c (main): Return an error packet if
10726 read_inferior_memory() returns an error.
10727
10728 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10731 Unify with other clean targets.
10732
10733 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10734
10735 * server.c (handle_v_cont): Call set_desired_inferior.
10736
10737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10738
10739 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10740
10741 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10742
10743 * linux-low.c (linux_wait): Unblock async I/O.
10744 (linux_resume): Block and enable async I/O.
10745 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10746 * server.h (block_async_io, unblock_async_io): Add prototypes.
10747
10748 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10749
10750 * remote-utils.c (remote_open): Print a status notice after
10751 opening a TCP port.
10752 * server.c (attach_inferior): Print a status notice after
10753 attaching.
10754
10755 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10756
10757 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10758
10759 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10760
10761 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10762 error packet.
10763 * server.c, target.h: Update copyright years.
10764
10765 2004-02-25 Roland McGrath <roland@redhat.com>
10766
10767 * target.h (struct target_ops): New member `read_auxv'.
10768 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10769 * linux-low.c (linux_read_auxv): New function.
10770 (linux_target_ops): Initialize `read_auxv' member to that.
10771
10772 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10773
10774 Committed by Jim Blandy <jimb@redhat.com>.
10775
10776 * linux-s390-low.c (s390_num_regs): Update.
10777 (s390_regmap): Remove control registers. Use __s390x__ predefine
10778 instead of GPR_SIZE to distiguish s390 and s390x targets.
10779
10780 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10781
10782 * linux-low.c: Update copyright year.
10783 (check_removed_breakpoint): Clear pending_is_breakpoint.
10784 (linux_set_resume_request, linux_queue_one_thread)
10785 (resume_status_pending_p): New functions.
10786 (linux_continue_one_thread): Use process->resume.
10787 (linux_resume): Only resume threads if there are no pending events.
10788 * linux-low.h (struct process_info): Add resume request
10789 pointer.
10790
10791 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10792
10793 * regcache.c (new_register_cache): Clear the allocated register
10794 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10795
10796 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10797
10798 * linux-low.c (linux_resume): Take a struct thread_resume *
10799 argument.
10800 (linux_wait): Update call.
10801 (resume_ptr): New static variable.
10802 (linux_continue_one_thread): Renamed from
10803 linux_continue_one_process. Use resume_ptr.
10804 (linux_resume): Use linux_continue_one_thread.
10805 * server.c (handle_v_cont, handle_v_requests): New functions.
10806 (myresume): New function.
10807 (main): Handle 'v' case.
10808 * target.h (struct thread_resume): New type.
10809 (struct target_ops): Change argument of "resume" to struct
10810 thread_resume *.
10811 (myresume): Delete macro.
10812
10813 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10814
10815 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10816 (uninstall): Support DESTDIR.
10817
10818 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10819
10820 * configure.srv: Add xscale*linux copy of arm*linux entry.
10821
10822 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10823
10824 * linux-arm-low.c (arm_reinsert_addr): New function.
10825 (the_low_target): Add arm_reinsert_addr.
10826
10827 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10828
10829 * mem-break.c: Remove whitespace at end of file.
10830
10831 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10832
10833 * configure.in: Check whether we need to prototype strerror.
10834 * server.h: Optionally prototype strerror.
10835 * gdbreplay.c (perror_with_name): Use strerror.
10836 * linux-low.c (linux_attach_lwp): Use strerror.
10837 * utils.c (perror_with_name): Use strerror.
10838 * config.in, configure: Regenerated.
10839
10840 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10841
10842 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10843 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10844
10845 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10846
10847 * Makefile.in (SFILES): Update.
10848 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10849 low-sun3.c: Remove files.
10850
10851 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10852
10853 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10854 (linux_detach_one_process, linux_detach): New functions.
10855 (linux_target_ops): Add linux_detach.
10856 * server.c (main): Handle 'D' packet.
10857 * target.h (struct target_ops): Add "detach" member.
10858 (detach_inferior): Define.
10859
10860 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10861
10862 From Kelley Cook <kelleycook@wideopenwest.com>:
10863 * configure.srv: Accept i[34567]86 variants.
10864
10865 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * linux-low.c (linux_wait_for_event): Correct comment typos.
10868 (linux_resume_one_process): Call check_removed_breakpoint.
10869 (linux_send_signal): New function.
10870 (linux_target_ops): Add linux_send_signal.
10871 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10872 of kill.
10873 * target.h (struct target_ops): Add send_signal.
10874
10875 2003-05-29 Jim Blandy <jimb@redhat.com>
10876
10877 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10878 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10879 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10880 away part of the register's value.
10881
10882 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10883
10884 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10885 (linux_wait_for_event, linux_init_signals): Likewise.
10886
10887 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10888
10889 * configure.in: Check for stdlib.h.
10890 * configure: Regenerated.
10891 * config.in: Regenerated.
10892
10893 2003-01-04 Andreas Schwab <schwab@suse.de>
10894
10895 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10896
10897 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10898
10899 * Makefile.in: Remove obsolete code.
10900
10901 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10902
10903 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10904 defined(PT_FPR0_HI).
10905
10906 2002-11-17 Stuart Hughes <seh@zee2.com>
10907
10908 * linux-arm-low.c (arm_num_regs): Increase.
10909 (arm_regmap): Include status register.
10910
10911 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10912
10913 * linux-low.c (register_addr): Remove incorrect -1 check.
10914
10915 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10916
10917 * linux-low.c (linux_create_inferior): Call setpgid. Return
10918 the new PID.
10919 (unstopped_p, linux_signal_pid): Remove.
10920 (linux_target_ops): Remove linux_signal_pid.
10921 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10922 global instead of target method.
10923 * target.h (struct target_ops): Remove signal_pid. Update comment
10924 for create_inferior.
10925 * server.c (signal_pid): New variable.
10926 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10927 gdbserver. Set the child to be the foreground process group.
10928 (attach_inferior): Set signal_pid.
10929
10930 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10931
10932 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10933
10934 2002-08-20 Jim Blandy <jimb@redhat.com>
10935
10936 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10937 default for this.
10938
10939 2002-08-01 Andrew Cagney <cagney@redhat.com>
10940
10941 * Makefile.in: Make chill references obsolete.
10942
10943 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10944
10945 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10946 * configure: Regenerate.
10947 * config.in: Regenerate.
10948
10949 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10950
10951 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10952 (perror_with_name, remote_close, remote_open, expect, play): Static.
10953
10954 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10955
10956 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10957 byte offsets instead of an array of indexes.
10958 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10959
10960 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10961
10962 * regcache.c: Add comment.
10963
10964 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10965
10966 * thread-db.c: New file.
10967 * proc-service.c: New file.
10968 * acinclude.m4: New file.
10969 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10970 proc-service.o, and thread-db.o.
10971 (linux-low.o): Add USE_THREAD_DB.
10972 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10973 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10974 * aclocal.m4: Regenerated.
10975 * config.in: Regenerated.
10976 * configure: Regenerated.
10977 * configure.in: Check for proc_service.h, sys/procfs.h,
10978 thread_db.h, and linux/elf.h headrs.
10979 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10980 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10981 Check for -lthread_db and thread support.
10982 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10983 PowerPC, and SuperH.
10984 * i387-fp.c: Constify arguments.
10985 * i387-fp.h: Likewise.
10986 * inferiors.c: (struct thread_info): Renamed from
10987 `struct inferior_info'. Remove PID member. Use generic inferior
10988 list header. All uses updated.
10989 (inferiors, signal_pid): Removed.
10990 (all_threads): New variable.
10991 (get_thread): Define.
10992 (add_inferior_to_list): New function.
10993 (for_each_inferior): New function.
10994 (change_inferior_id): New function.
10995 (add_inferior): Removed.
10996 (remove_inferior): New function.
10997 (add_thread): New function.
10998 (free_one_thread): New function.
10999 (remove_thread): New function.
11000 (clear_inferiors): Use for_each_inferior and free_one_thread.
11001 (find_inferior): New function.
11002 (find_inferior_id): New function.
11003 (inferior_target_data): Update argument type.
11004 (set_inferior_target_data): Likewise.
11005 (inferior_regcache_data): Likewise.
11006 (set_inferior_regcache_data): Likewise.
11007 * linux-low.c (linux_bp_reinsert): Remove.
11008 (all_processes, stopping_threads, using_thrads)
11009 (struct pending_signals, debug_threads, pid_of): New.
11010 (inferior_pid): Replace with macro.
11011 (struct inferior_linux_data): Remove.
11012 (get_stop_pc, add_process): New functions.
11013 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11014 Use add_process and add_thread.
11015 (linux_attach_lwp): New function, based on old linux_attach. Use
11016 add_process and add_thread. Set stop_expected for new threads.
11017 (linux_attach): New function.
11018 (linux_kill_one_process): New function.
11019 (linux_kill): Kill all LWPs.
11020 (linux_thread_alive): Use find_inferior_id.
11021 (check_removed_breakpoints, status_pending_p): New functions.
11022 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11023 Update. Use WNOHANG. Wait for cloned processes also. Update process
11024 struct for the found process.
11025 (linux_wait_for_event): New function.
11026 (linux_wait): Use it. Support LWPs.
11027 (send_sigstop, wait_for_sigstop, stop_all_processes)
11028 (linux_resume_one_process, linux_continue_one_process): New functions.
11029 (linux_resume): Support LWPs.
11030 (REGISTER_RAW_SIZE): Remove.
11031 (fetch_register): Use register_size instead. Call supply_register.
11032 (usr_store_inferior_registers): Likewise. Call collect_register.
11033 Fix recursive case.
11034 (regsets_fetch_inferior_registers): Improve error message.
11035 (regsets_store_inferior_registers): Add debugging.
11036 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11037 (unstopped_p, linux_signal_pid): New functions.
11038 (linux_target_ops): Add linux_signal_pid.
11039 (linux_init_signals): New function.
11040 (initialize_low): Call it. Initialize using_threads.
11041 * regcache.c (inferior_regcache_data): Add valid
11042 flag.
11043 (get_regcache): Fetch registers lazily. Add fetch argument
11044 and update all callers.
11045 (regcache_invalidate_one, regcache_invalidate): New
11046 functions.
11047 (new_register_cache): Renamed from create_register_cache.
11048 Return the new regcache.
11049 (free_register_cache): Change argument to a void *.
11050 (registers_to_string, registers_from_string): Call get_regcache
11051 with fetch flag set.
11052 (register_data): Make static. Pass fetch flag to get_regcache.
11053 (supply_register): Call get_regcache with fetch flag clear.
11054 (collect_register): Call get_regcache with fetch flag set.
11055 (collect_register_as_string): New function.
11056 * regcache.h: Update.
11057 * remote-utils.c (putpkt): Flush after debug output and use
11058 stderr.
11059 Handle input interrupts while waiting for an ACK.
11060 (input_interrupt): Use signal_pid method.
11061 (getpkt): Flush after debug output and use stderr.
11062 (outreg): Use collect_register_as_string.
11063 (new_thread_notify, dead_thread_notify): New functions.
11064 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11065 and general_thread.
11066 (look_up_one_symbol): Flush after debug output.
11067 * server.c (step_thread, server_waiting): New variables.
11068 (start_inferior): Don't use signal_pid. Update call to mywait.
11069 (attach_inferior): Update call to mywait.
11070 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11071 (main): Don't fetch/store registers explicitly. Use
11072 set_desired_inferior. Support proposed ``Hs'' packet. Update
11073 calls to mywait.
11074 * server.h: Update.
11075 (struct inferior_list, struct_inferior_list_entry): New.
11076 * target.c (set_desired_inferior): New.
11077 (write_inferior_memory): Constify.
11078 (mywait): New function.
11079 * target.h: Update.
11080 (struct target_ops): New signal_pid method.
11081 (mywait): Removed macro, added prototype.
11082
11083 * linux-low.h (regset_func): Removed.
11084 (regset_fill_func, regset_store_func): New.
11085 (enum regset_type): New.
11086 (struct regset_info): Add type field. Use new operation types.
11087 (struct linux_target_ops): stop_pc renamed to get_pc.
11088 Add decr_pc_after_break and breakpoint_at.
11089 (get_process, get_thread_proess, get_process_thread)
11090 (strut process_info, all_processes, linux_attach_lwp)
11091 (thread_db_init): New.
11092
11093 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11094 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11095 (the_low_target): Add new members.
11096 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11097 (i386_store_fpxregset): Constify.
11098 (target_regsets): Add new kind identifier.
11099 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11100 (i386_set_pc): Add debugging.
11101 (i386_breakpoint_at): New function.
11102 (the_low_target): Add new members.
11103 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11104 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11105 (mips_breakpoint_at): New.
11106 (the_low_target): Add new members.
11107 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11108 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11109 (the_low_target): Add new members.
11110 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11111 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11112 (the_low_target): Add new members.
11113 * linux-x86-64-low.c (target_regsets): Add new kind
11114 identifier.
11115
11116 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11117
11118 From Martin Pool <mbp@samba.org>:
11119 * server.c (gdbserver_usage): New function.
11120 (main): Call it.
11121
11122 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11123
11124 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11125 stop_at -> stop_pc.
11126
11127 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11128
11129 * Makefile.in: Remove obsolete code.
11130
11131 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11132
11133 * linux-low.c (regsets_fetch_inferior_registers),
11134 (regsets_store_inferior_registers): Removed cast to int from
11135 ptrace() calls.
11136 * regcache.h: Added declaration of struct inferior_info.
11137
11138 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11139
11140 * inferiors.c (struct inferior_info): Add regcache_data.
11141 (add_inferior): Call create_register_cache.
11142 (clear_inferiors): Call free_register_cache.
11143 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11144 * regcache.c (struct inferior_regcache_data): New.
11145 (registers): Remove.
11146 (get_regcache): New function.
11147 (create_register_cache, free_register_cache): New functions.
11148 (set_register_cache): Don't initialize the register cache here.
11149 (registers_to_string, registers_from_string, register_data): Call
11150 get_regcache.
11151 * regcache.h: Add prototypes.
11152 * server.h: Likewise.
11153
11154 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * mem-break.c: New file.
11157 * mem-break.h: New file.
11158 * Makefile.in: Add mem-break.o rule; update server.h
11159 dependencies.
11160 * inferiors.c (struct inferior_info): Add target_data
11161 member.
11162 (clear_inferiors): Free target_data member if set.
11163 (inferior_target_data, set_inferior_target_data): New functions.
11164 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11165 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11166 * linux-low.c (linux_bp_reinsert): New variable.
11167 (struct inferior_linux_data): New.
11168 (linux_create_inferior): Use set_inferior_target_data.
11169 (linux_attach): Likewise. Call add_inferior.
11170 (linux_wait_for_one_inferior): New function.
11171 (linux_wait): Call it.
11172 (linux_write_memory): Add const.
11173 (initialize_low): Call set_breakpoint_data.
11174 * linux-low.h (struct linux_target_ops): Add breakpoint
11175 handling members.
11176 * server.c (attach_inferior): Remove extra add_inferior
11177 call.
11178 * server.h: Include mem-break.h. Update inferior.c
11179 prototypes.
11180 * target.c (read_inferior_memory)
11181 (write_inferior_memory): New functions.
11182 * target.h (read_inferior_memory)
11183 (write_inferior_memory): Change macros to prototypes.
11184 (struct target_ops): Update comments. Add const to write_memory
11185 definition.
11186
11187 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11188
11189 * linux-low.c (usr_store_inferior_registers): Support
11190 registers which are allowed to fail to store.
11191 * linux-low.h (linux_target_ops): Likewise.
11192 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11193 (ppc_cannot_store_register): FPSCR may not be storable.
11194
11195 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11196
11197 * server.h: Include <string.h> if HAVE_STRING_H.
11198 * ChangeLog: Correct paths in last ChangeLog entry.
11199
11200 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11201
11202 * linux-low.h: Remove obsolete prototypes.
11203 (struct linux_target_ops): New.
11204 (extern the_low_target): New.
11205 * linux-low.c (num_regs, regmap): Remove declarations.
11206 (register_addr): Use the_low_target explicitly.
11207 (fetch_register): Likewise.
11208 (usr_fetch_inferior_registers): Likewise.
11209 (usr_store_inferior_registers): Likewise.
11210 * linux-arm-low.c (num_regs): Remove.
11211 (arm_num_regs): Define.
11212 (arm_regmap): Renamed from regmap, made static.
11213 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11214 made static.
11215 (arm_cannot_store_register): Renamed from cannot_store_register,
11216 made static.
11217 (the_low_target): New.
11218 * linux-i386-low.c (num_regs): Remove.
11219 (i386_num_regs): Define.
11220 (i386_regmap): Renamed from regmap, made static.
11221 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11222 made static.
11223 (i386_cannot_store_register): Renamed from cannot_store_register,
11224 made static.
11225 (the_low_target): New.
11226 * linux-ia64-low.c (num_regs): Remove.
11227 (ia64_num_regs): Define.
11228 (ia64_regmap): Renamed from regmap, made static.
11229 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11230 made static.
11231 (ia64_cannot_store_register): Renamed from cannot_store_register,
11232 made static.
11233 (the_low_target): New.
11234 * linux-m68k-low.c (num_regs): Remove.
11235 (m68k_num_regs): Define.
11236 (m68k_regmap): Renamed from regmap, made static.
11237 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11238 made static.
11239 (m68k_cannot_store_register): Renamed from cannot_store_register,
11240 made static.
11241 (the_low_target): New.
11242 * linux-mips-low.c (num_regs): Remove.
11243 (mips_num_regs): Define.
11244 (mips_regmap): Renamed from regmap, made static.
11245 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11246 made static.
11247 (mips_cannot_store_register): Renamed from cannot_store_register,
11248 made static.
11249 (the_low_target): New.
11250 * linux-ppc-low.c (num_regs): Remove.
11251 (ppc_num_regs): Define.
11252 (ppc_regmap): Renamed from regmap, made static.
11253 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11254 made static.
11255 (ppc_cannot_store_register): Renamed from cannot_store_register,
11256 made static.
11257 (the_low_target): New.
11258 * linux-s390-low.c (num_regs): Remove.
11259 (s390_num_regs): Define.
11260 (s390_regmap): Renamed from regmap, made static.
11261 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11262 made static.
11263 (s390_cannot_store_register): Renamed from cannot_store_register,
11264 made static.
11265 (the_low_target): New.
11266 * linux-sh-low.c (num_regs): Remove.
11267 (sh_num_regs): Define.
11268 (sh_regmap): Renamed from regmap, made static.
11269 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11270 made static.
11271 (sh_cannot_store_register): Renamed from cannot_store_register,
11272 made static.
11273 (the_low_target): New.
11274 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11275 (the_low_target): New.
11276
11277 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11278
11279 * Makefile.in: Add stamp-h target.
11280 * configure.in: Create stamp-h.
11281 * configure: Regenerated.
11282
11283 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11284
11285 * inferiors.c: New file.
11286 * target.c: New file.
11287 * target.h: New file.
11288 * Makefile.in: Add target.o and inferiors.o. Update
11289 dependencies.
11290 * linux-low.c (inferior_pid): New static variable,
11291 moved from server.c.
11292 (linux_create_inferior): Renamed from create_inferior.
11293 Call add_inferior. Return 0 on success instead of a PID.
11294 (linux_attach): Renamed from myattach.
11295 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11296 (linux_thread_alive): Renamed from mythread_alive.
11297 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11298 child dies.
11299 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11300 (regsets_store_inferior_registers): Correct error message.
11301 Add missing ``return 0''.
11302 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11303 (linux_store_registers): Renamed from store_inferior_registers.
11304 (linux_read_memory): Renamed from read_inferior_memory.
11305 (linux_write_memory): Renamed from write_inferior_memory.
11306 (linux_target_ops): New structure.
11307 (initialize_low): Call set_target_ops ().
11308 * remote-utils.c (unhexify): New function.
11309 (hexify): New function.
11310 (input_interrupt): Send signals to ``signal_pid''.
11311 * server.c (inferior_pid): Remove.
11312 (start_inferior): Update create_inferior call.
11313 (attach_inferior): Call add_inferior.
11314 (handle_query): New function.
11315 (main): Call handle_query for `q' packets.
11316 * server.h: Include "target.h". Remove obsolete prototypes.
11317 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11318
11319 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11320
11321 * Makefile.in: Add WARN_CFLAGS. Update configury
11322 dependencies.
11323 * configure.in: Check for <string.h>
11324 * configure: Regenerate.
11325 * config.in: Regenerate.
11326 * gdbreplay.c: Include needed system headers.
11327 (remote_open): Remove strchr prototype.
11328 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11329 * regcache.c (supply_register): Change buf argument to const void *.
11330 (supply_register_by_name): Likewise.
11331 (collect_register): Change buf argument to void *.
11332 (collect_register_by_name): Likewise.
11333 * regcache.h: Add missing prototypes.
11334 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11335 * server.c (handle_query): New function.
11336 (attached): New static variable, moved out of main.
11337 (main): Quiet longjmp clobber warnings.
11338 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11339 * utils.c (error): Remove NORETURN.
11340 (fatal): Likewise.
This page took 0.284277 seconds and 4 git commands to generate.