Fix gdbserver <library-list> and its #FIXED version="1.0"
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * server.c (handle_qxfer_libraries): Set `version' attribute for
4 <library-list>.
5
6 2015-06-10 Gary Benson <gbenson@redhat.com>
7
8 * target.h (struct target_ops) <multifs_open>: New field.
9 <multifs_unlink>: Likewise.
10 <multifs_readlink>: Likewise.
11 * linux-low.c (nat/linux-namespaces.h): New include.
12 (linux_target_ops): Initialize the_target->multifs_open,
13 the_target->multifs_unlink and the_target->multifs_readlink.
14 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
15 * hostio.c (hostio_fs_pid): New static variable.
16 (hostio_handle_new_gdb_connection): New function.
17 (handle_setfs): Likewise.
18 (handle_open): Use the_target->multifs_open as appropriate.
19 (handle_unlink): Use the_target->multifs_unlink as appropriate.
20 (handle_readlink): Use the_target->multifs_readlink as
21 appropriate.
22 (handle_vFile): Handle vFile:setfs packets.
23 * server.c (handle_query): Call hostio_handle_new_gdb_connection
24 after target_handle_new_gdb_connection.
25
26 2015-06-10 Gary Benson <gbenson@redhat.com>
27
28 * configure.ac (AC_CHECK_FUNCS): Add setns.
29 * config.in: Regenerate.
30 * configure: Likewise.
31 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
32 (linux-namespaces.o): New rule.
33 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
34
35 2015-06-09 Gary Benson <gbenson@redhat.com>
36
37 * hostio.c (handle_open): Process mode argument with
38 fileio_to_host_mode.
39
40 2015-06-01 Yao Qi <yao.qi@linaro.org>
41
42 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
43 * linux-x86-low.c: Likewise.
44
45 2015-05-28 Don Breazeal <donb@codesourcery.com>
46
47 * linux-low.c (handle_extended_wait): Initialize
48 thread_info.last_resume_kind for new fork children.
49
50 2015-05-15 Pedro Alves <palves@redhat.com>
51
52 * target.h (target_handle_new_gdb_connection): Rewrite using if
53 wrapped in do/while.
54
55 2015-05-14 Joel Brobecker <brobecker@adacore.com>
56
57 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
58 * configure, config.in: Regenerate.
59 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
60 Declare typedef.
61
62 2015-05-12 Don Breazeal <donb@codesourcery.com>
63
64 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
65 PTRACE_EVENT_VFORK_DONE.
66 (linux_low_ptrace_options, extended_event_reported): Add vfork
67 events.
68 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
69 and "vforkdone" for RSP 'T' Stop Reply Packet.
70 * server.h (report_vfork_events): Declare
71 global variable.
72
73 2015-05-12 Don Breazeal <donb@codesourcery.com>
74
75 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
76 (the_low_target) <new_fork>: Initialize new member.
77 * linux-arm-low.c (arm_new_fork): New function.
78 (the_low_target) <new_fork>: Initialize new member.
79 * linux-low.c (handle_extended_wait): Call new target function
80 new_fork.
81 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
82 * linux-mips-low.c (mips_add_watchpoint): New function
83 extracted from mips_insert_point.
84 (the_low_target) <new_fork>: Initialize new member.
85 (mips_linux_new_fork): New function.
86 (mips_insert_point): Call mips_add_watchpoint.
87 * linux-x86-low.c (x86_linux_new_fork): New function.
88 (the_low_target) <new_fork>: Initialize new member.
89
90 2015-05-12 Don Breazeal <donb@codesourcery.com>
91
92 * linux-low.c (handle_extended_wait): Implement return value,
93 rename argument 'event_child' to 'event_lwp', handle
94 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
95 (linux_low_ptrace_options): New function.
96 (linux_low_filter_event): Call linux_low_ptrace_options,
97 use different argument fo linux_enable_event_reporting,
98 use return value from handle_extended_wait.
99 (extended_event_reported): New function.
100 (linux_wait_1): Call extended_event_reported and set
101 status to report fork events.
102 (linux_write_memory): Add pid to debug message.
103 (reset_lwp_ptrace_options_callback): New function.
104 (linux_handle_new_gdb_connection): New function.
105 (linux_target_ops): Initialize new structure member.
106 * linux-low.h (struct lwp_info) <waitstatus>: New member.
107 * lynx-low.c: Initialize new structure member.
108 * remote-utils.c (prepare_resume_reply): Implement stop reason
109 "fork" for "T" stop message.
110 * server.c (handle_query): Call handle_new_gdb_connection.
111 * server.h (report_fork_events): Declare global flag.
112 * target.h (struct target_ops) <handle_new_gdb_connection>:
113 New member.
114 (target_handle_new_gdb_connection): New macro.
115 * win32-low.c: Initialize new structure member.
116
117 2015-05-12 Don Breazeal <donb@codesourcery.com>
118
119 * mem-break.c (APPEND_TO_LIST): Define macro.
120 (clone_agent_expr): New function.
121 (clone_one_breakpoint): New function.
122 (clone_all_breakpoints): New function.
123 * mem-break.h: Declare new functions.
124
125 2015-05-12 Don Breazeal <donb@codesourcery.com>
126
127 * linux-low.c (linux_supports_fork_events): New function.
128 (linux_supports_vfork_events): New function.
129 (linux_target_ops): Initialize new structure members.
130 (initialize_low): Call linux_check_ptrace_features.
131 * lynx-low.c (lynx_target_ops): Initialize new structure
132 members.
133 * server.c (report_fork_events, report_vfork_events):
134 New global flags.
135 (handle_query): Add new features to qSupported packet and
136 response.
137 (captured_main): Initialize new global variables.
138 * target.h (struct target_ops) <supports_fork_events>:
139 New member.
140 <supports_vfork_events>: New member.
141 (target_supports_fork_events): New macro.
142 (target_supports_vfork_events): New macro.
143 * win32-low.c (win32_target_ops): Initialize new structure
144 members.
145
146 2015-05-12 Gary Benson <gbenson@redhat.com>
147
148 * server.c (handle_qxfer_exec_file): Use current process
149 if annex is empty.
150
151 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
152
153 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
154 Remove HAVE_PTRACE_GETREGS conditionals.
155 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
156 instead of PTRACE_GETREGS and PTRACE_SETREGS.
157
158 2015-05-08 Yao Qi <yao.qi@linaro.org>
159
160 * linux-low.c (linux_supports_conditional_breakpoints): New
161 function.
162 (linux_target_ops): Install new target method.
163 * lynx-low.c (lynx_target_ops): Install NULL hook for
164 supports_conditional_breakpoints.
165 * nto-low.c (nto_target_ops): Likewise.
166 * spu-low.c (spu_target_ops): Likewise.
167 * win32-low.c (win32_target_ops): Likewise.
168 * server.c (handle_query): Check
169 target_supports_conditional_breakpoints.
170 * target.h (struct target_ops) <supports_conditional_breakpoints>:
171 New field.
172 (target_supports_conditional_breakpoints): New macro.
173
174 2015-05-06 Pedro Alves <palves@redhat.com>
175
176 PR server/18081
177 * server.c (start_inferior): If the process exits, mourn it.
178
179 2015-04-21 Gary Benson <gbenson@redhat.com>
180
181 * hostio.c (fileio_open_flags_to_host): Factored out to
182 fileio_to_host_openflags in common/fileio.c. Single use
183 updated.
184
185 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
186
187 * linux-xtensa-low.c (xtensa_fill_gregset)
188 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
189 XCHAL_HAVE_LOOP.
190
191 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
192
193 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
194 (regs_info): Replace usrregs pointer with NULL.
195
196 2015-04-17 Gary Benson <gbenson@redhat.com>
197
198 * target.h (struct target_ops) <pid_to_exec_file>: New field.
199 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
200 * server.c (handle_qxfer_exec_file): New function.
201 (qxfer_packets): Add exec-file entry.
202 (handle_query): Report qXfer:exec-file:read as supported packet.
203
204 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
205
206 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
207
208 2015-04-09 Gary Benson <gbenson@redhat.com>
209
210 * hostio-errno.c (errno_to_fileio_error): Remove function.
211 Update caller to use remote_fileio_to_fio_error.
212
213 2015-04-09 Yao Qi <yao.qi@linaro.org>
214
215 * linux-low.c (linux_insert_point): Call
216 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
217 (linux_remove_point): Call remove_memory_breakpoint if type is
218 raw_bkpt_type_sw.
219 * linux-x86-low.c (x86_insert_point): Don't call
220 insert_memory_breakpoint.
221 (x86_remove_point): Don't call remove_memory_breakpoint.
222
223 2015-04-01 Pedro Alves <palves@redhat.com>
224 Cleber Rosa <crosa@redhat.com>
225
226 * server.c (gdbserver_usage): Reorganize and extend the usage
227 message.
228
229 2015-03-24 Pedro Alves <palves@redhat.com>
230
231 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
232 output. Also dump TRAP_TRACE.
233 (linux_low_filter_event): In debug output, distinguish a
234 resume_stop SIGSTOP from a delayed SIGSTOP.
235
236 2015-03-24 Gary Benson <gbenson@redhat.com>
237
238 * linux-x86-low.c (x86_linux_new_thread): Moved to
239 nat/x86-linux.c.
240 (x86_linux_prepare_to_resume): Likewise.
241
242 2015-03-24 Gary Benson <gbenson@redhat.com>
243
244 * Makefile.in (x86-linux-dregs.o): New rule.
245 * configure.srv: Add x86-linux-dregs.o to relevant targets.
246 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
247 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
248 (x86_linux_dr_get): Likewise.
249 (x86_linux_dr_set): Likewise.
250 (update_debug_registers_callback): Likewise.
251 (x86_linux_dr_set_addr): Likewise.
252 (x86_linux_dr_get_addr): Likewise.
253 (x86_linux_dr_set_control): Likewise.
254 (x86_linux_dr_get_control): Likewise.
255 (x86_linux_dr_get_status): Likewise.
256 (x86_linux_update_debug_registers): Likewise.
257
258 2015-03-24 Gary Benson <gbenson@redhat.com>
259
260 * linux-x86-low.c (x86_linux_update_debug_registers):
261 New function, factored out from...
262 (x86_linux_prepare_to_resume): ...this.
263
264 2015-03-24 Gary Benson <gbenson@redhat.com>
265
266 * linux-x86-low.c (x86_linux_dr_get): Update comments.
267 (x86_linux_dr_set): Likewise.
268 (update_debug_registers_callback): Likewise.
269 (x86_linux_dr_set_addr): Likewise.
270 (x86_linux_dr_get_addr): Likewise.
271 (x86_linux_dr_set_control): Likewise.
272 (x86_linux_dr_get_control): Likewise.
273 (x86_linux_dr_get_status): Likewise.
274 (x86_linux_prepare_to_resume): Likewise.
275
276 2015-03-24 Gary Benson <gbenson@redhat.com>
277
278 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
279 Use perror_with_name. Pass string through gettext.
280 (x86_linux_dr_set): Likewise.
281
282 2015-03-24 Gary Benson <gbenson@redhat.com>
283
284 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
285 (x86_linux_dr_set_addr): ...this.
286 (x86_dr_low_get_addr): Rename to...
287 (x86_linux_dr_get_addr): ...this.
288 (x86_dr_low_set_control): Rename to...
289 (x86_linux_dr_set_control): ...this.
290 (x86_dr_low_get_control): Rename to...
291 (x86_linux_dr_get_control): ...this.
292 (x86_dr_low_get_status): Rename to...
293 (x86_linux_dr_get_status): ...this.
294 (x86_dr_low): Update with new function names.
295
296 2015-03-24 Gary Benson <gbenson@redhat.com>
297
298 * Makefile.in (x86-linux.o): New rule.
299 * configure.srv: Add x86-linux.o to relevant targets.
300 * linux-low.c (lwp_set_arch_private_info): New function.
301 (lwp_arch_private_info): Likewise.
302 * linux-x86-low.c: Include nat/x86-linux.h.
303 (arch_lwp_info): Removed structure.
304 (update_debug_registers_callback):
305 Use lwp_set_debug_registers_changed.
306 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
307 and lwp_set_debug_registers_changed.
308 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
309
310 2015-03-24 Gary Benson <gbenson@redhat.com>
311
312 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
313 * linux-arm-low.c (arm_new_thread): Likewise.
314 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
315 * linux-mips-low.c (mips_linux_new_thread): Likewise.
316 * linux-x86-low.c (x86_linux_new_thread): Likewise.
317 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
318
319 2015-03-24 Gary Benson <gbenson@redhat.com>
320
321 * linux-low.c (ptid_of_lwp): New function.
322 (lwp_is_stopped): Likewise.
323 (lwp_stop_reason): Likewise.
324 * linux-x86-low.c (update_debug_registers_callback):
325 Use lwp_is_stopped.
326 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
327 lwp_stop_reason.
328
329 2015-03-24 Gary Benson <gbenson@redhat.com>
330
331 * linux-low.h (linux_stop_lwp): Remove declaration.
332
333 2015-03-24 Gary Benson <gbenson@redhat.com>
334
335 * linux-low.h: Include nat/linux-nat.h.
336 * linux-low.c (iterate_over_lwps_args): New structure.
337 (iterate_over_lwps_filter): New function.
338 (iterate_over_lwps): Likewise.
339 * linux-x86-low.c (update_debug_registers_callback):
340 Update signature to what iterate_over_lwps expects.
341 Remove PID check that iterate_over_lwps now performs.
342 (x86_dr_low_set_addr): Use iterate_over_lwps.
343 (x86_dr_low_set_control): Likewise.
344
345 2015-03-24 Gary Benson <gbenson@redhat.com>
346
347 * linux-x86-low.c (x86_debug_reg_state): New function.
348 (x86_linux_prepare_to_resume): Use the above.
349
350 2015-03-24 Gary Benson <gbenson@redhat.com>
351
352 * linux-low.c (current_lwp_ptid): New function.
353 * linux-x86-low.c: Include nat/linux-nat.h.
354 (x86_dr_low_get_addr): Use current_lwp_ptid.
355 (x86_dr_low_get_control): Likewise.
356 (x86_dr_low_get_status): Likewise.
357
358 2015-03-20 Pedro Alves <palves@redhat.com>
359
360 * tracepoint.c (cmd_qtstatus): Make "str" const.
361
362 2015-03-20 Pedro Alves <palves@redhat.com>
363
364 * server.c (handle_general_set): Make "req_str" const.
365
366 2015-03-19 Pedro Alves <palves@redhat.com>
367
368 * linux-low.c (linux_resume_one_lwp): Rename to ...
369 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
370 instead call perror_with_name.
371 (check_ptrace_stopped_lwp_gone): New function.
372 (linux_resume_one_lwp): Reimplement as wrapper around
373 linux_resume_one_lwp_throw that swallows errors if the LWP is
374 gone.
375
376 2015-03-19 Pedro Alves <palves@redhat.com>
377
378 * linux-low.c (count_events_callback, select_event_lwp_callback):
379 No longer check whether the thread has resume_stop as last resume
380 kind.
381
382 2015-03-19 Pedro Alves <palves@redhat.com>
383
384 * linux-low.c (count_events_callback, select_event_lwp_callback):
385 Use the lwp's status_pending_p field, not the thread's.
386
387 2015-03-19 Pedro Alves <palves@redhat.com>
388
389 * linux-low.c (select_event_lwp_callback): Update comments to
390 no longer mention SIGTRAP.
391
392 2015-03-18 Gary Benson <gbenson@redhat.com>
393
394 * server.c (handle_query): Do not report vFile:fstat as supported.
395
396 2015-03-11 Gary Benson <gbenson@redhat.com>
397
398 * hostio.c (sys/types.h): New include.
399 (sys/stat.h): Likewise.
400 (common-remote-fileio.h): Likewise.
401 (handle_fstat): New function.
402 (handle_vFile): Handle vFile:fstat packets.
403
404 2015-03-11 Gary Benson <gbenson@redhat.com>
405
406 * configure.ac (AC_CHECK_MEMBERS): Add checks for
407 struct stat.st_blocks and struct stat.st_blksize.
408 * configure: Regenerate.
409 * config.in: Likewise.
410 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
411 (OBS): Add common-remote-fileio.o.
412 (common-remote-fileio.o): New rule.
413
414 2015-03-09 Pedro Alves <palves@redhat.com>
415
416 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
417 'struct sockaddr' pointer in 'accept' call.
418
419 2015-03-09 Pedro Alves <palves@redhat.com>
420
421 Revert:
422 2015-03-07 Pedro Alves <palves@redhat.com>
423 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
424 or <winsock2.h> here. Instead include "gdb_socket.h".
425 (remote_open): Use union gdb_sockaddr_u.
426 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
427 or <winsock2.h> here. Instead include "gdb_socket.h".
428 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
429 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
430 or <sys/un.h>.
431 (init_named_socket, gdb_agent_helper_thread): Use union
432 gdb_sockaddr_u.
433
434 2015-03-07 Pedro Alves <palves@redhat.com>
435
436 * configure.ac (build_warnings): Move
437 -Wdeclaration-after-statement to the C-specific set.
438 * configure: Regenerate.
439
440 2015-03-07 Pedro Alves <palves@redhat.com>
441
442 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
443 or <winsock2.h> here. Instead include "gdb_socket.h".
444 (remote_open): Use union gdb_sockaddr_u.
445 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
446 or <winsock2.h> here. Instead include "gdb_socket.h".
447 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
448 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
449 or <sys/un.h>.
450 (init_named_socket, gdb_agent_helper_thread): Use union
451 gdb_sockaddr_u.
452
453 2015-03-07 Pedro Alves <palves@redhat.com>
454
455 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
456 instead.
457
458 2015-03-06 Yao Qi <yao.qi@linaro.org>
459
460 * linux-aarch64-low.c (aarch64_insert_point): Use
461 show_debug_regs as a boolean.
462 (aarch64_remove_point): Likewise.
463
464 2015-03-05 Pedro Alves <palves@redhat.com>
465
466 * lynx-low.c (lynx_target_ops): Install NULL hooks for
467 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
468 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
469 * nto-low.c (nto_target_ops): Likewise.
470 * spu-low.c (spu_target_ops): Likewise.
471 * win32-low.c (win32_target_ops): Likewise.
472
473 2015-03-04 Pedro Alves <palves@redhat.com>
474
475 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
476 Decide whether a breakpoint triggered based on the SIGTRAP's
477 siginfo.si_code.
478 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
479 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
480 (linux_low_filter_event): Check for breakpoints before checking
481 watchpoints.
482 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
483 siginfo.si_code.
484 (linux_stopped_by_sw_breakpoint)
485 (linux_supports_stopped_by_sw_breakpoint)
486 (linux_stopped_by_hw_breakpoint)
487 (linux_supports_stopped_by_hw_breakpoint): New functions.
488 (linux_target_ops): Install new target methods.
489
490 2015-03-04 Pedro Alves <palves@redhat.com>
491
492 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
493 * server.c (swbreak_feature, hwbreak_feature): New globals.
494 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
495 (captured_main): Clear swbreak_feature and hwbreak_feature.
496 * server.h (swbreak_feature, hwbreak_feature): Declare.
497 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
498 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
499 supports_stopped_by_hw_breakpoint>: New fields.
500 (target_supports_stopped_by_sw_breakpoint)
501 (target_stopped_by_sw_breakpoint)
502 (target_supports_stopped_by_hw_breakpoint)
503 (target_stopped_by_hw_breakpoint): Declare.
504
505 2015-03-04 Pedro Alves <palves@redhat.com>
506
507 enum lwp_stop_reason -> enum target_stop_reason
508 * linux-low.c (check_stopped_by_breakpoint): Adjust.
509 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
510 (linux_wait_1, stuck_in_jump_pad_callback)
511 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
512 (linux_stopped_by_watchpoint):
513 * linux-low.h (enum lwp_stop_reason): Delete.
514 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
515 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
516
517 2015-03-04 Yao Qi <yao.qi@linaro.org>
518
519 * Makefile.in (SFILES): Add linux-aarch64-low.c.
520
521 2015-03-03 Gary Benson <gbenson@redhat.com>
522
523 * hostio.c (handle_vFile): Fix prefix lengths.
524
525 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
526
527 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
528 ptr_bits.
529
530 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
531
532 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
533 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
534 (clean): Add "rm -f" for above C files.
535 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
536 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
537 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
538 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
539 * linux-s390-low.c (HWCAP_S390_VX): New macro.
540 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
541 (init_registers_s390x_vx_linux64)
542 (init_registers_s390x_tevx_linux64)
543 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
544 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
545 declarations.
546 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
547 (s390_store_vxrs_high): New functions.
548 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
549 NT_S390_VXRS_HIGH.
550 (s390_arch_setup): Add logic for selecting one of the new target
551 descriptions. Activate the new vector regsets if applicable.
552 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
553 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
554 and init_registers_s390x_tevx_linux64.
555
556 2015-03-01 Pedro Alves <palves@redhat.com>
557
558 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
559 parameter.
560
561 2015-02-27 Pedro Alves <palves@redhat.com>
562
563 * linux-x86-low.c (u_debugreg_offset): New function.
564 (x86_linux_dr_get, x86_linux_dr_set): Use it.
565
566 2015-02-27 Pedro Alves <palves@redhat.com>
567
568 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
569 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
570 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
571 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
572 (ps_lsetfpregs, ps_getpid)
573 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
574 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
575 (ps_lsetxregs, ps_plog): Declare.
576
577 2015-02-27 Pedro Alves <palves@redhat.com>
578
579 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
580 IP_AGENT_EXPORT_FUNC.
581 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
582 IP_AGENT_EXPORT_FUNC.
583 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
584 (IP_AGENT_EXPORT): Delete.
585 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
586 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
587 (gdb_trampoline_buffer_error, collecting, gdb_collect)
588 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
589 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
590 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
591 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
592 (traceframe_read_count, traceframe_write_count)
593 (traceframes_created, trace_state_variables, get_raw_reg)
594 (get_trace_state_variable_value, set_trace_state_variable_value)
595 (ust_loaded, helper_thread_id, cmd_buf): Use
596 IPA_SYM_EXPORTED_NAME.
597 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
598 (tracepoints) Use IP_AGENT_EXPORT_VAR.
599 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
600 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
601 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
602 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
603 EXTERN_C_PUSH/EXTERN_C_POP.
604 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
605 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
606 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
607 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
608 (traceframe_write_count, traceframe_read_count)
609 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
610 (about_to_request_buffer_space, get_trace_state_variable_value)
611 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
612 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
613 EXTERN_C_PUSH/EXTERN_C_POP.
614 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
615 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
616 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
617 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
618 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
619 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
620 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
621 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
622 Define.
623 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
624 (IP_AGENT_EXPORT_VAR_DECL): Define.
625 (tracing): Declare.
626 (gdb_agent_get_raw_reg): Declare.
627
628 2015-02-27 Tom Tromey <tromey@redhat.com>
629 Pedro Alves <palves@redhat.com>
630
631 Rename symbols whose names are reserved C++ keywords throughout.
632
633 2015-02-27 Pedro Alves <palves@redhat.com>
634
635 * Makefile.in (COMPILER): New, get it from autoconf.
636 (CXX): Get from autoconf instead.
637 (COMPILE.pre): Use COMPILER.
638 (CC-LD): Rename to ...
639 (CC_LD): ... this. Use COMPILER.
640 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
641 (CXX_FOR_TARGET): Default to g++ instead of gcc.
642 * acinclude.m4: Include build-with-cxx.m4.
643 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
644 Disable -Werror by default if building in C++ mode.
645 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
646 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
647 the C++ compiler. Save/restore CXXFLAGS too.
648 * configure: Regenerate.
649
650 2015-02-27 Pedro Alves <palves@redhat.com>
651
652 * acinclude.m4: Include libiberty.m4.
653 * configure.ac: Call libiberty_INIT.
654 * config.in, configure: Regenerate.
655
656 2015-02-26 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (linux_wait_1): When incrementing the PC past a
659 program breakpoint always use the_low_target.breakpoint_len as
660 increment, rather than the maximum between that and
661 the_low_target.decr_pc_after_break.
662
663 2015-02-23 Pedro Alves <palves@redhat.com>
664
665 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
666 thread was doing a step-over; always adjust the PC if
667 we stepped over a permanent breakpoint.
668 (linux_wait_1): If we stepped over breakpoint that was on top of a
669 permanent breakpoint, manually advance the PC past it.
670
671 2015-02-23 Pedro Alves <palves@redhat.com>
672
673 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
674 modes.
675 (x86_fill_gregset, x86_store_gregset): Use it when handling
676 $orig_eax.
677
678 2015-02-20 Pedro Alves <palves@redhat.com>
679
680 * thread-db.c: Include "nat/linux-procfs.h".
681 (thread_db_init): Skip listing new threads if the kernel supports
682 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
683
684 2015-02-20 Pedro Alves <palves@redhat.com>
685
686 * linux-low.c (status_pending_p_callback): Use ptid_match.
687
688 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
689
690 PR breakpoints/16812
691 * linux-low.c (wstatus_maybe_breakpoint): Remove.
692 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
693 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
694
695 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
696
697 PR breakpoints/15956
698 * tracepoint.c (cmd_qtinit): Add check for current_thread.
699
700 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
701
702 * linux-low.c (linux_low_btrace_conf): Print size.
703 * server.c (handle_btrace_conf_general_set): New.
704 (hanle_general_set): Call handle_btrace_conf_general_set.
705 (handle_query): Report Qbtrace-conf:bts:size as supported.
706
707 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
708
709 * linux-low.c (linux_low_enable_btrace): Update parameters.
710 (linux_low_btrace_conf): New.
711 (linux_target_ops)<to_btrace_conf>: Initialize.
712 * server.c (current_btrace_conf): New.
713 (handle_btrace_enable): Rename to ...
714 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
715 to target_enable_btrace. Update comment. Update users.
716 (handle_qxfer_btrace_conf): New.
717 (qxfer_packets): Add btrace-conf entry.
718 (handle_query): Report qXfer:btrace-conf:read as supported packet.
719 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
720 (target_ops)<read_btrace_conf>: New.
721 (target_enable_btrace): Update parameters.
722 (target_read_btrace_conf): New.
723
724 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
725
726 * server.c (handle_btrace_general_set): Remove call to
727 target_supports_btrace.
728 (supported_btrace_packets): New.
729 (handle_query): Call supported_btrace_packets.
730 * target.h: include btrace-common.h.
731 (btrace_target_info): Removed.
732 (supports_btrace, target_supports_btrace): Update parameters.
733
734 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
735
736 * Makefile.in (SFILES): Add common/btrace-common.c.
737 (OBS): Add common/btrace-common.o.
738 (btrace-common.o): Add build rules.
739 * linux-low: Include btrace-common.h.
740 (linux_low_read_btrace): Use struct btrace_data. Call
741 btrace_data_init and btrace_data_fini.
742
743 2015-02-06 Pedro Alves <palves@redhat.com>
744
745 * thread-db.c (find_new_threads_callback): Add debug output.
746
747 2015-02-04 Pedro Alves <palves@redhat.com>
748
749 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
750 (resume_stopped_resumed_lwps): New function.
751 (linux_wait_for_event_filtered): Use it.
752
753 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
754
755 * Makefile.in (SFILES): Add linux-personality.c.
756 (linux-personality.o): New rule.
757 * configure.srv (srv_linux_obj): Add linux-personality.o to the
758 list of objects to be built.
759 * linux-low.c: Include nat/linux-personality.h.
760 (linux_create_inferior): Remove code to disable address space
761 randomization (moved to ../nat/linux-personality.c). Create
762 cleanup to disable address space randomization.
763
764 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
765
766 * Makefile.in (posix-strerror.o): New rule.
767 (mingw-strerror.o): Likewise.
768 * configure: Regenerated.
769 * configure.ac: Source file ../common/common.host. Initialize new
770 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
771
772 2015-01-14 Yao Qi <yao@codesourcery.com>
773
774 * Makefile.in (SFILES): Add nat/ppc-linux.c.
775 (ppc-linux.o): New rule.
776 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
777 * configure.ac: AC_CHECK_FUNCS(getauxval).
778 * config.in: Re-generated.
779 * configure: Re-generated.
780 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
781 ppc64_64bit_inferior_p
782
783 2015-01-14 Yao Qi <yao@codesourcery.com>
784
785 * linux-ppc-low.c: Include "nat/ppc-linux.h".
786 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
787 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
788 (PT_ORIG_R3, PT_TRAP): Likewise.
789 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
790 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
791 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
792
793 2015-01-10 Joel Brobecker <brobecker@adacore.com>
794
795 * i387-fp.c (i387_cache_to_xsave): In look over
796 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
797 zmmh_low_space field by use of zmmh_high_space.
798
799 2015-01-09 Pedro Alves <palves@redhat.com>
800
801 * linux-low.c (step_over_bkpt): Move higher up in the file.
802 (handle_extended_wait): Don't store the stop_pc here.
803 (get_stop_pc): Adjust comments and rename to ...
804 (check_stopped_by_breakpoint): ... this. Record whether the LWP
805 stopped for a software breakpoint or hardware breakpoint.
806 (thread_still_has_status_pending_p): New function.
807 (status_pending_p_callback): Use
808 thread_still_has_status_pending_p. If the event is no longer
809 interesting, resume the LWP.
810 (handle_tracepoints): Add assert.
811 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
812 (wstatus_maybe_breakpoint): New function.
813 (cancel_breakpoint): Delete function.
814 (check_stopped_by_watchpoint): New function, factored out from
815 linux_low_filter_event.
816 (lp_status_maybe_breakpoint): Delete function.
817 (linux_low_filter_event): Remove filter_ptid argument.
818 Leave thread group exits pending here. Store the LWP's stop PC.
819 Always leave events pending.
820 (linux_wait_for_event_filtered): Pull all events out of the
821 kernel, and leave them all pending.
822 (count_events_callback, select_event_lwp_callback): Consider all
823 events.
824 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
825 (select_event_lwp): Only give preference to the stepping LWP in
826 all-stop mode. Adjust comments.
827 (ignore_event): New function.
828 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
829 references to cancel_breakpoints. Adjust to renames. Also give
830 equal priority to all LWPs that have had events in non-stop mode.
831 If reporting a software breakpoint event, unadjust the LWP's PC.
832 (linux_wait): If linux_wait_1 returned an ignored event, retry.
833 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
834 Adjust.
835 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
836 (resume_status_pending_p): Use thread_still_has_status_pending_p.
837 (linux_stopped_by_watchpoint): Adjust.
838 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
839 * linux-low.h (enum lwp_stop_reason): New.
840 (struct lwp_info) <stop_pc>: Adjust comment.
841 <stopped_by_watchpoint>: Delete field.
842 <stop_reason>: New field.
843 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
844 * mem-break.c (software_breakpoint_inserted_here)
845 (hardware_breakpoint_inserted_here): New function.
846 * mem-break.h (software_breakpoint_inserted_here)
847 (hardware_breakpoint_inserted_here): Declare.
848 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
849 (cancel_breakpoints): Delete.
850 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
851 (upload_fast_traceframes): Remove references to
852 cancel_breakpoints.
853
854 2015-01-09 Pedro Alves <palves@redhat.com>
855
856 * thread-db.c (find_new_threads_callback): Ignore thread if the
857 kernel thread ID is -1.
858
859 2015-01-09 Pedro Alves <palves@redhat.com>
860
861 * linux-low.c (linux_attach_fail_reason_string): Move to
862 nat/linux-ptrace.c, and rename.
863 (linux_attach_lwp): Update comment.
864 (attach_proc_task_lwp_callback): New function.
865 (linux_attach): Adjust to rename and use
866 linux_proc_attach_tgid_threads.
867 (linux_attach_fail_reason_string): Delete declaration.
868
869 2015-01-01 Joel Brobecker <brobecker@adacore.com>
870
871 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
872 * server.c (gdbserver_version): Likewise.
873
874 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
875
876 * remote-utils.c: Include ctype.h.
877 (input_interrupt): Explicitly handle the case when the char
878 received is the NUL byte. Improve the printing of non-ASCII
879 characters.
880
881 2014-12-16 Joel Brobecker <brobecker@adacore.com>
882
883 * linux-low.c (linux_low_filter_event): Update call to
884 linux_enable_event_reporting following the addition of
885 a new parameter to that function.
886
887 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
888
889 PR server/17457
890 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
891 (AARCH64_FPCR_REGNO): Likewise.
892 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
893 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
894 (aarch64_store_fpregset): Likewise.
895
896 2014-12-15 Joel Brobecker <brobecker@adacore.com>
897
898 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
899 Remove FIXME comment about assumption about N.
900
901 2014-12-13 Joel Brobecker <brobecker@adacore.com>
902
903 * configure.ac: If large-file support is disabled in GDBserver,
904 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
905 * configure: Regenerate.
906
907 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
908
909 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
910 warning upon ENODATA from ptrace.
911 * linux-s390-low.c (s390_store_tdb): New.
912 (s390_regsets): Add regset for NT_S390_TDB.
913
914 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
915
916 * linux-low.c (regsets_store_inferior_registers): Skip regsets
917 without a fill_function.
918 * linux-s390-low.c (s390_fill_last_break): Remove.
919 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
920 (s390_arch_setup): Use regset's size instead of fill_function for
921 loop end condition.
922
923 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
924
925 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
926 the regset's store function when ptrace returned an error.
927 * regcache.c (get_thread_regcache): Invalidate register cache
928 before fetching inferior's registers.
929
930 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
931
932 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
933 while-loop as for-loop.
934 (regsets_store_inferior_registers): Likewise.
935
936 2014-11-28 Yao Qi <yao@codesourcery.com>
937
938 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
939 * config.in, configure: Re-generate.
940 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
941 is defined.
942
943 2014-11-21 Yao Qi <yao@codesourcery.com>
944
945 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
946 (AC_CHECK_HEADERS): Remove malloc.h.
947 * configure: Re-generated.
948 * config.in: Re-generated.
949 * server.h: Don't include alloca.h and malloc.h.
950 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
951 Don't include malloc.h.
952
953 2014-11-17 Joel Brobecker <brobecker@adacore.com>
954
955 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
956 corresponding ERRNO check in same block.
957
958 2014-11-12 Pedro Alves <palves@redhat.com>
959
960 * server.c (cont_thread): Update comment.
961 (start_inferior, attach_inferior): No longer clear cont_thread.
962 (handle_v_cont): No longer set cont_thread.
963 (captured_main): Clear cont_thread each time a GDB connects.
964
965 2014-11-12 Pedro Alves <palves@redhat.com>
966
967 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
968 thread, and don't resume all threads if the Hc thread has exited.
969
970 2014-11-12 Pedro Alves <palves@redhat.com>
971
972 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
973 the process group instead of to a specific LWP.
974
975 2014-10-15 Pedro Alves <palves@redhat.com>
976
977 PR server/17487
978 * win32-arm-low.c (arm_set_thread_context): Remove current_event
979 parameter.
980 (arm_set_thread_context): Delete.
981 (the_low_target): Adjust.
982 * win32-i386-low.c (debug_registers_changed)
983 (debug_registers_used): Delete.
984 (update_debug_registers_callback): New function.
985 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
986 needing to update their debug registers.
987 (win32_get_current_dr): New function.
988 (x86_dr_low_get_addr, x86_dr_low_get_control)
989 (x86_dr_low_get_status): Fetch the debug register from the thread
990 record's context.
991 (i386_initial_stuff): Adjust.
992 (i386_get_thread_context): Remove current_event parameter. Don't
993 clear debug_registers_changed nor copy DR values to
994 debug_reg_state.
995 (i386_set_thread_context): Delete.
996 (i386_prepare_to_resume): New function.
997 (i386_thread_added): Mark the thread as needing to update irs
998 debug registers.
999 (the_low_target): Remove i386_set_thread_context and install
1000 i386_prepare_to_resume.
1001 * win32-low.c (win32_get_thread_context): Adjust.
1002 (win32_set_thread_context): Use SetThreadContext
1003 directly.
1004 (win32_prepare_to_resume): New function.
1005 (win32_require_context): New function, factored out from ...
1006 (thread_rec): ... this.
1007 (continue_one_thread): Call win32_prepare_to_resume on each thread
1008 we're about to continue.
1009 (win32_resume): Call win32_prepare_to_resume on the event thread.
1010 * win32-low.h (struct win32_thread_info)
1011 <debug_registers_changed>: New field.
1012 (struct win32_target_ops): Change prototype of set_thread_context,
1013 delete set_thread_context and add prepare_to_resume.
1014 (win32_require_context): New declaration.
1015
1016 2014-10-08 Gary Benson <gbenson@redhat.com>
1017
1018 * server.h: Do not include common-exceptions.h.
1019
1020 2014-10-08 Gary Benson <gbenson@redhat.com>
1021
1022 * server.h: Do not include cleanups.h.
1023
1024 2014-09-30 James Hogan <james.hogan@imgtec.com>
1025
1026 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1027 mips64-dsp-linux.c.
1028
1029 2014-09-23 Yao Qi <yao@codesourcery.com>
1030
1031 * linux-low.c (lp_status_maybe_breakpoint): New function.
1032 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1033 (count_events_callback): Likewise.
1034 (select_event_lwp_callback): Likewise.
1035 (cancel_breakpoints_callback): Likewise.
1036
1037 2014-09-19 Don Breazeal <donb@codesourcery.com>
1038
1039 * linux-low.c (handle_extended_wait): Call
1040 linux_ptrace_get_extended_event.
1041 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1042 linux_is_extended_waitstatus.
1043
1044 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1045
1046 * Makefile.in (CPPFLAGS): Define.
1047 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1048 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1049
1050 2014-09-16 Gary Benson <gbenson@redhat.com>
1051
1052 * inferiors.h (current_inferior): Renamed as...
1053 (current_thread): New variable. All uses updated.
1054 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1055 (maybe_move_out_of_jump_pad): Likewise.
1056 (cancel_breakpoint): Likewise.
1057 (linux_low_filter_event): Likewise.
1058 (wait_for_sigstop): Likewise.
1059 (linux_resume_one_lwp): Likewise.
1060 (need_step_over_p): Likewise.
1061 (start_step_over): Likewise.
1062 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1063 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1064 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1065 and save_inferior as saved_thread.
1066 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1067 saved_thread.
1068 (regcache_invalidate_thread): Likewise.
1069 * remote-utils.c (prepare_resume_reply): Likewise.
1070 * thread-db.c (thread_db_get_tls_address): Likewise.
1071 (disable_thread_event_reporting): Likewise.
1072 (remove_thread_event_breakpoints): Likewise.
1073 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1074 as saved_thread.
1075 * target.h (set_desired_inferior): Renamed as...
1076 (set_desired_thread): New declaration. All uses updated.
1077 * server.c (myresume): Updated comment to reference thread instead
1078 of inferior.
1079 (handle_serial_event): Likewise.
1080 (handle_target_event): Likewise.
1081
1082 2014-09-12 Tom Tromey <tromey@redhat.com>
1083 Gary Benson <gbenson@redhat.com>
1084
1085 * regcache.h: Include common-regcache.h.
1086 (regcache_read_pc): Don't declare.
1087 * regcache.c (get_thread_regcache_for_ptid): New function.
1088
1089 2014-09-11 Tom Tromey <tromey@redhat.com>
1090 Gary Benson <gbenson@redhat.com>
1091
1092 * symbol.c: New file.
1093 * Makefile.in (SFILES): Add symbol.c.
1094 (OBS): Add symbol.o.
1095
1096 2014-09-11 Gary Benson <gbenson@redhat.com>
1097
1098 * target.c (target_stop_ptid, target_continue_ptid): New
1099 functions.
1100
1101 2014-09-11 Tom Tromey <tromey@redhat.com>
1102 Gary Benson <gbenson@redhat.com>
1103
1104 * target.h: Include target/target.h.
1105 * target.c (target_read_memory, target_read_uint32)
1106 (target_write_memory): New functions.
1107
1108 2014-09-11 Gary Benson <gbenson@redhat.com>
1109
1110 * server.h (debug_hw_points): Don't declare.
1111 * server.c (debug_hw_points): Don't define. Replace all uses
1112 with show_debug_regs.
1113 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1114 all uses with show_debug_regs.
1115
1116 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1117
1118 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1119 endianness into account.
1120 (ppc_supply_ptrace_register): Likewise.
1121
1122 2014-09-03 James Hogan <james.hogan@imgtec.com>
1123
1124 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1125 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1126
1127 2014-09-03 Gary Benson <gbenson@redhat.com>
1128
1129 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1130 ALL_DEBUG_ADDRESS_REGISTERS.
1131
1132 2014-09-02 Gary Benson <gbenson@redhat.com>
1133
1134 * i386-low.h: Renamed as...
1135 * x86-low.h: New file. All type, function and variable name
1136 prefixes changed from "i386_" to "x86_". All references updated.
1137 * i386-low.c: Renamed as...
1138 * x86-low.c: New file. All type, function and variable name
1139 prefixes changed from "i386_" to "x86_". All references updated.
1140
1141 2014-09-02 Gary Benson <gbenson@redhat.com>
1142
1143 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1144 (x86_linux_new_thread): Likewise.
1145
1146 2014-08-29 Gary Benson <gbenson@redhat.com>
1147
1148 * server.h (setjmp.h): Do not include.
1149 (toplevel): Do not declare.
1150 (common-exceptions.h): Include.
1151 (cleanups.h): Likewise.
1152 * server.c (toplevel): Do not define.
1153 (exit_code): New static global.
1154 (detach_or_kill_for_exit_cleanup): New function.
1155 (main): New function. Original main renamed to...
1156 (captured_main): New function.
1157 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1158
1159 2014-08-29 Gary Benson <gbenson@redhat.com>
1160
1161 * Makefile.in (SFILES): Add common/common-exceptions.c.
1162 (OBS): Add common-exceptions.o.
1163 (common-exceptions.o): New rule.
1164 * utils.c (prepare_to_throw_exception): New function.
1165
1166 2014-08-29 Gary Benson <gbenson@redhat.com>
1167
1168 * config.in: Regenerate.
1169 * configure: Likewise.
1170
1171 2014-08-29 Gary Benson <gbenson@redhat.com>
1172
1173 * Makefile.in (SFILES): Add common/cleanups.c.
1174 (OBS): cleanups.o.
1175 (cleanups.o): New rule.
1176
1177 2014-08-29 Gary Benson <gbenson@redhat.com>
1178
1179 * utils.c (internal_vwarning): New function.
1180
1181 2014-08-28 Gary Benson <gbenson@redhat.com>
1182
1183 * utils.h (fatal): Remove declaration.
1184 * utils.c (fatal): Remove function.
1185
1186 2014-08-28 Gary Benson <gbenson@redhat.com>
1187
1188 * tracepoint.c (gdb_agent_init): Replace fatal with
1189 perror_with_name.
1190 (initialize_tracepoint): Likewise.
1191
1192 2014-08-28 Gary Benson <gbenson@redhat.com>
1193
1194 * remote-utils.c (remote_prepare): Replace fatal with error.
1195
1196 2014-08-28 Gary Benson <gbenson@redhat.com>
1197
1198 * linux-low.c (linux_async): Replace fatal with warning.
1199 Tidy up and return.
1200 (linux_start_non_stop): Return -1 if linux_async failed.
1201
1202 2014-08-28 Gary Benson <gbenson@redhat.com>
1203
1204 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1205 gdb_assert.
1206 (i386_dr_low_get_addr): Remove vague comment.
1207 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1208 gdb_assert.
1209
1210 2014-08-28 Gary Benson <gbenson@redhat.com>
1211
1212 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1213 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1214 internal_error.
1215 (linux_resume_one_lwp): Likewise.
1216 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1217 gdb_assert.
1218 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1219 with internal_error.
1220 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1221 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1222 (find_register_by_name): Replace fatal with internal_error.
1223 (find_regno): Likewise.
1224 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1225 * thread-db.c (thread_db_create_event): Likewise.
1226 (thread_db_load_search): Likewise.
1227 (try_thread_db_load_1): Likewise.
1228 * tracepoint.c (get_jump_space_head): Replace fatal with
1229 internal_error.
1230 (claim_trampoline_space): Likewise.
1231 (have_fast_tracepoint_trampoline_buffer): Likewise.
1232 (cmd_qtstart): Likewise.
1233 (stop_tracing): Likewise.
1234 (fast_tracepoint_collecting): Likewise.
1235 (target_malloc): Likewise.
1236 (download_tracepoint): Likewise.
1237 (download_trace_state_variables): Replace check with gdb_assert.
1238 (upload_fast_traceframes): Replace fatal with internal_error.
1239
1240 2014-08-19 Tom Tromey <tromey@redhat.com>
1241 Gary Benson <gbenson@redhat.com>
1242
1243 * Makefile.in (SFILES): Add common/common-debug.c.
1244 (OBS): Add common-debug.o.
1245 (common-debug.o): New rule.
1246 * debug.h (debug_printf): Don't declare.
1247 * debug.c (debug_printf): Renamed and rewritten as...
1248 (debug_vprintf): New function.
1249
1250 2014-08-19 Gary Benson <gbenson@redhat.com>
1251
1252 * utils.h: Do not include print-utils.h.
1253
1254 2014-08-19 Tom Tromey <tromey@redhat.com>
1255 Gary Benson <gbenson@redhat.com>
1256
1257 * server.h: Add static assertion.
1258 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1259
1260 2014-08-19 Tom Tromey <tromey@redhat.com>
1261 Gary Benson <gbenson@redhat.com>
1262
1263 * Makefile.in (SFILES): Add common/errors.c.
1264 (OBS): Add errors.o.
1265 (IPA_OBS): Add errors-ipa.o.
1266 (errors.o): New rule.
1267 (errors-ipa.o): Likewise.
1268 * utils.h (perror_with_name, error, warning): Don't declare.
1269 * utils.c (warning): Renamed and rewritten as...
1270 (vwarning): New function.
1271 (error): Renamed and rewritten as...
1272 (verror): New function.
1273 (internal_error): Renamed and rewritten as...
1274 (internal_verror): New function.
1275
1276 2014-08-07 Gary Benson <gbenson@redhat.com>
1277
1278 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1279 * configure: Regenerate.
1280 * config.in: Likewise.
1281 * server.h: Do not include errno.h.
1282 * event-loop.c: Likewise.
1283 * hostio-errno.c: Likewise.
1284 * linux-low.c: Likewise.
1285 * remote-utils.c: Likewise.
1286 * spu-low.c: Likewise.
1287 * utils.c: Likewise.
1288 * gdbreplay.c: Unconditionally include errno.h.
1289
1290 2014-08-07 Gary Benson <gbenson@redhat.com>
1291
1292 * server.h: Do not include string.h.
1293 * event-loop.c: Likewise.
1294 * linux-low.c: Likewise.
1295 * regcache.c: Likewise.
1296 * remote-utils.c: Likewise.
1297 * spu-low.c: Likewise.
1298 * utils.c: Likewise.
1299
1300 2014-08-07 Gary Benson <gbenson@redhat.com>
1301
1302 * server.h: Do not include gdb_assert.h.
1303
1304 2014-08-07 Gary Benson <gbenson@redhat.com>
1305
1306 * server.h: Do not include common-utils.h.
1307
1308 2014-08-07 Gary Benson <gbenson@redhat.com>
1309
1310 * server.h: Do not include ptid.h.
1311 * notif.h: Likewise.
1312
1313 2014-08-07 Gary Benson <gbenson@redhat.com>
1314
1315 * server.h: Do not include gdb_locale.h.
1316
1317 2014-08-07 Gary Benson <gbenson@redhat.com>
1318
1319 * server.h: Do not include gdb/signals.h.
1320 * win32-low.c: Likewise.
1321
1322 2014-08-07 Gary Benson <gbenson@redhat.com>
1323
1324 * server.h: Do not include pathmax.h.
1325
1326 2014-08-07 Gary Benson <gbenson@redhat.com>
1327
1328 * server.h: Do not include libiberty.h.
1329 * linux-bfin-low.c: Likewise.
1330
1331 2014-08-07 Gary Benson <gbenson@redhat.com>
1332
1333 * server.h: Do not include ansidecl.h.
1334
1335 2014-08-07 Gary Benson <gbenson@redhat.com>
1336
1337 * linux-x86-low.c: Do not include stddef.h.
1338 * lynx-ppc-low.c: Likewise.
1339 * tracepoint.c: Likewise.
1340
1341 2014-08-07 Gary Benson <gbenson@redhat.com>
1342
1343 * server.h: Do not include stdarg.h.
1344 * nto-low.c: Likewise.
1345
1346 2014-08-07 Gary Benson <gbenson@redhat.com>
1347
1348 * server.h: Do not include stdlib.h.
1349 * inferiors.c: Likewise.
1350 * linux-low.c: Likewise.
1351 * regcache.c: Likewise.
1352 * spu-low.c: Likewise.
1353 * tracepoint.c: Likewise.
1354 * utils.c: Likewise.
1355
1356 2014-08-07 Gary Benson <gbenson@redhat.com>
1357
1358 * server.h: Do not include stdio.h.
1359 * linux-low.c: Likewise.
1360 * remote-utils.c: Likewise.
1361 * spu-low.c: Likewise.
1362 * utils.c: Likewise.
1363 * wincecompat.c: Likewise.
1364
1365 2014-08-06 Gary Benson <gbenson@redhat.com>
1366
1367 * regcache.c (init_register_cache): Move conditionals inside if.
1368
1369 2014-08-06 Gary Benson <gbenson@redhat.com>
1370
1371 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1372
1373 2014-07-31 Gary Benson <gbenson@redhat.com>
1374
1375 * ax.h: Do not include server.h.
1376 * gdbthread.h: Likewise.
1377 * lynx-low.h: Likewise.
1378 * notif.h: Likewise.
1379
1380 2014-07-30 Gary Benson <gbenson@redhat.com>
1381
1382 * server.h: Include common-defs.h.
1383 Do not include config.h or build-gnulib-gdbserver/config.h.
1384
1385 2014-07-30 Gary Benson <gbenson@redhat.com>
1386
1387 * hostio-errno.c: Move server.h to top of includes list.
1388 * inferiors.c: Likewise.
1389 * linux-x86-low.c: Likewise.
1390 * notif.c: Include server.h.
1391
1392 2014-07-24 Tom Tromey <tromey@redhat.com>
1393 Gary Benson <gbenson@redhat.com>
1394
1395 * server.h (CORE_ADDR): Now unsigned.
1396
1397 2014-07-16 Pedro Alves <palves@redhat.com>
1398
1399 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1400
1401 2014-07-15 Pedro Alves <palves@redhat.com>
1402
1403 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1404 copy.
1405
1406 2014-07-11 Pedro Alves <palves@redhat.com>
1407
1408 * linux-low.c (kill_wait_lwp): New function, based on
1409 kill_one_lwp_callback, but use my_waitpid directly.
1410 (kill_one_lwp_callback, linux_kill): Use it.
1411
1412 2014-06-23 Pedro Alves <palves@redhat.com>
1413
1414 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1415 before setting DR0..DR3.
1416
1417 2014-06-20 Gary Benson <gbenson@redhat.com>
1418
1419 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1420 * configure: Regenerated.
1421 * config.in: Likewise.
1422
1423 2014-06-20 Gary Benson <gbenson@redhat.com>
1424
1425 * Makefile.in (SFILES): Update locations for files moved
1426 from common to nat.
1427 (object file files): Reordered.
1428
1429 2014-06-20 Gary Benson <gbenson@redhat.com>
1430
1431 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1432 (i386_dr_low_set_addr): Likewise.
1433 (i386_dr_low_get_addr): Likewise.
1434 (i386_dr_low_can_set_control): Likewise.
1435 (i386_dr_low_set_control): Likewise.
1436 (i386_dr_low_get_control): Likewise.
1437 (i386_dr_low_get_status): Likewise.
1438 (i386_get_debug_register_length): Likewise.
1439 * linux-x86-low.c (i386_dr_low_set_addr):
1440 Changed signature. Made static.
1441 (i386_dr_low_get_addr): Likewise.
1442 (i386_dr_low_set_control): Likewise.
1443 (i386_dr_low_get_control): Likewise.
1444 (i386_dr_low_get_status): Likewise.
1445 (i386_dr_low): New global variable.
1446 * win32-i386-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
1454 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1455
1456 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1457 * Makefile.in (AR, AR_FLAGS): Define.
1458 * configure: Regenerate.
1459
1460 2014-06-19 Gary Benson <gbenson@redhat.com>
1461
1462 * Makefile.in (i386-dregs.o): New rule.
1463 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1464 * i386-low.c (target.h): Remove include.
1465 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1466 (DR_CONTROL_SHIFT): Likewise.
1467 (DR_CONTROL_SIZE): Likewise.
1468 (DR_RW_EXECUTE): Likewise.
1469 (DR_RW_WRITE): Likewise.
1470 (DR_RW_READ): Likewise.
1471 (DR_RW_IORW): Likewise.
1472 (DR_LEN_1): Likewise.
1473 (DR_LEN_2): Likewise.
1474 (DR_LEN_4): Likewise.
1475 (DR_LEN_8): Likewise.
1476 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1477 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1478 (DR_ENABLE_SIZE): Likewise.
1479 (DR_LOCAL_SLOWDOWN): Likewise.
1480 (DR_GLOBAL_SLOWDOWN): Likewise.
1481 (DR_CONTROL_RESERVED): Likewise.
1482 (I386_DR_CONTROL_MASK): Likewise.
1483 (I386_DR_VACANT): Likewise.
1484 (I386_DR_LOCAL_ENABLE): Likewise.
1485 (I386_DR_GLOBAL_ENABLE): Likewise.
1486 (I386_DR_DISABLE): Likewise.
1487 (I386_DR_SET_RW_LEN): Likewise.
1488 (I386_DR_GET_RW_LEN): Likewise.
1489 (I386_DR_WATCH_HIT): Likewise.
1490 (i386_wp_op_t): Likewise.
1491 (i386_show_dr): Likewise.
1492 (i386_length_and_rw_bits): Likewise.
1493 (i386_insert_aligned_watchpoint): Likewise.
1494 (i386_remove_aligned_watchpoint): Likewise.
1495 (i386_handle_nonaligned_watchpoint): Likewise.
1496 i386_update_inferior_debug_regs(): Likewise.
1497 (i386_dr_insert_watchpoint): Likewise.
1498 (i386_dr_remove_watchpoint): Likewise.
1499 (i386_dr_region_ok_for_watchpoint): Likewise.
1500 (i386_dr_stopped_data_address): Likewise.
1501 (i386_dr_stopped_by_watchpoint): Likewise.
1502
1503 2014-06-19 Gary Benson <gbenson@redhat.com>
1504
1505 * i386-low.c (i386_dr_show): Renamed to
1506 i386_show_dr and made static. All uses updated.
1507 (i386_dr_length_and_rw_bits): Renamed to
1508 i386_length_and_rw_bits and made static.
1509 All uses updated.
1510 (i386_dr_insert_aligned_watchpoint): Renamed to
1511 i386_insert_aligned_watchpoint and made static.
1512 All uses updated.
1513 (i386_dr_remove_aligned_watchpoint): Renamed to
1514 i386_remove_aligned_watchpoint and made static.
1515 All uses updated.
1516 (i386_dr_update_inferior_debug_regs): Renamed to
1517 i386_update_inferior_debug_regs and made static.
1518 All uses updated.
1519
1520 2014-06-18 Gary Benson <gbenson@redhat.com>
1521
1522 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1523 (i386_dr_low_can_set_control): Likewise.
1524 (i386_get_debug_register_length): Likewise.
1525 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1526 (i386_dr_low_can_set_control): Likewise.
1527 (i386_get_debug_register_length): Likewise.
1528
1529 2014-06-17 Gary Benson <gbenson@redhat.com>
1530
1531 * i386-low.h (i386-dregs.h): New include.
1532 (DR_FIRSTADDR): Now in i386-dregs.h.
1533 (DR_LASTADDR): Likewise.
1534 (DR_NADDR): Likewise.
1535 (DR_STATUS): Likewise.
1536 (DR_CONTROL): Likewise.
1537 (i386_debug_reg_state): Likewise.
1538 (i386_dr_insert_watchpoint): Likewise.
1539 (i386_dr_remove_watchpoint): Likewise.
1540 (i386_dr_region_ok_for_watchpoint): Likewise.
1541 (i386_dr_stopped_data_address): Likewise.
1542 (i386_dr_stopped_by_watchpoint): Likewise.
1543 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1544
1545 2014-06-18 Gary Benson <gbenson@redhat.com>
1546
1547 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1548 i386_dr_insert_watchpoint.
1549 (i386_low_remove_watchpoint): Renamed to
1550 i386_dr_remove_watchpoint.
1551 (i386_low_region_ok_for_watchpoint): Renamed to
1552 i386_dr_region_ok_for_watchpoint.
1553 (i386_low_stopped_data_address): Renamed to
1554 i386_dr_stopped_data_address.
1555 (i386_low_stopped_by_watchpoint): Renamed to
1556 i386_dr_stopped_by_watchpoint.
1557 * i386-low.c (i386_show_dr): Renamed to
1558 i386_dr_show and made nonstatic. All uses updated.
1559 (i386_length_and_rw_bits): Renamed to
1560 i386_dr_length_and_rw_bits and made nonstatic.
1561 All uses updated.
1562 (i386_insert_aligned_watchpoint): Renamed to
1563 i386_dr_insert_aligned_watchpoint and made nonstatic.
1564 All uses updated.
1565 (i386_remove_aligned_watchpoint): Renamed to
1566 i386_dr_remove_aligned_watchpoint and made nonstatic.
1567 All uses updated.
1568 (i386_update_inferior_debug_regs): Renamed to
1569 i386_dr_update_inferior_debug_regs and made nonstatic.
1570 All uses updated.
1571 (i386_low_insert_watchpoint): Renamed to
1572 i386_dr_insert_watchpoint. All uses updated.
1573 (i386_low_remove_watchpoint): Renamed to
1574 i386_dr_remove_watchpoint. All uses updated.
1575 (i386_low_region_ok_for_watchpoint): Renamed to
1576 i386_dr_region_ok_for_watchpoint. All uses updated.
1577 (i386_low_stopped_data_address): Renamed to
1578 i386_dr_stopped_data_address. All uses updated.
1579 (i386_low_stopped_by_watchpoint): Renamed to
1580 i386_dr_stopped_by_watchpoint. All uses updated.
1581
1582 2014-06-18 Gary Benson <gbenson@redhat.com>
1583
1584 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1585 (i386_dr_low_can_set_control): Likewise.
1586 (i386_insert_aligned_watchpoint): New check.
1587
1588 2014-06-18 Gary Benson <gbenson@redhat.com>
1589
1590 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1591 Renamed to state.
1592
1593 2014-06-18 Gary Benson <gbenson@redhat.com>
1594
1595 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1596 instead of fatal and error.
1597 (i386_handle_nonaligned_watchpoint): Likewise.
1598
1599 2014-06-18 Gary Benson <gbenson@redhat.com>
1600
1601 * i386-low.c (i386_get_debug_register_length): New macro.
1602 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1603 (i386_show_dr): Use debug_printf instead of fprintf. Use
1604 phex to format values.
1605
1606 2014-06-18 Gary Benson <gbenson@redhat.com>
1607
1608 * i386-low.h: Comment changes.
1609 * i386-low.c: Likewise.
1610
1611 2014-06-18 Gary Benson <gbenson@redhat.com>
1612
1613 * i386-low.c: Whitespace changes.
1614
1615 2014-06-12 Tom Tromey <tromey@redhat.com>
1616
1617 * utils.c (freeargv): Remove.
1618
1619 2014-06-12 Tom Tromey <tromey@redhat.com>
1620
1621 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1622 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1623 (parse_debug_format_options): Likewise.
1624 (gdbserver_usage): Likewise.
1625 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1626 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1627 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1628 against libiberty.
1629 ($(LIBGNU)): Depend on libiberty.
1630 (all-lib): Recurse into all subdirs.
1631 (install-only): Invoke "install" target in subdirs.
1632 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1633 targets.
1634 * configure: Rebuild.
1635 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1636 for vasprintf, vsnprintf, or gettimeofday.
1637 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1638 srv_tgtobj.
1639
1640 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1641
1642 * development.sh: Delete.
1643 * Makefile.in (config.status): Adjust dependency on development.sh.
1644 * configure.ac: Adjust development.sh source call.
1645 * configure: Regenerate.
1646
1647 2014-06-02 Pedro Alves <palves@redhat.com>
1648
1649 * ax.c (gdb_free_agent_expr): New function.
1650 * ax.h (gdb_free_agent_expr): New declaration.
1651 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1652 list.
1653 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1654 static.
1655 (clear_breakpoint_conditions_and_commands): New function.
1656 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1657 (clear_breakpoint_conditions_and_commands): New declaration.
1658
1659 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1660
1661 * linux-aarch64-low.c (asm/ptrace.h): Include.
1662
1663 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1664
1665 Fix TLS access for -static -pthread.
1666 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1667 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1668 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1669
1670 2014-05-20 Pedro Alves <palves@redhat.com>
1671
1672 * linux-aarch64-low.c (aarch64_insert_point)
1673 (aarch64_remove_point): No longer check whether the type is
1674 supported here. Adjust to new interface.
1675 (the_low_target): Install aarch64_supports_z_point_type as
1676 supports_z_point_type method.
1677 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1678 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1679 instead of a Z packet char. Adjust.
1680 (arm_supports_z_point_type): New function.
1681 (arm_insert_point, arm_remove_point): Adjust to new interface.
1682 (the_low_target): Install arm_supports_z_point_type.
1683 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1684 (cris_insert_point, cris_remove_point): Adjust to new interface.
1685 Don't check whether the type is supported here.
1686 (the_low_target): Install cris_supports_z_point_type.
1687 * linux-low.c (linux_supports_z_point_type): New function.
1688 (linux_insert_point, linux_remove_point): Adjust to new interface.
1689 * linux-low.h (struct linux_target_ops) <insert_point,
1690 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1691 raw_breakpoint pointer parameter.
1692 <supports_z_point_type>: New method.
1693 * linux-mips-low.c (mips_supports_z_point_type): New function.
1694 (mips_insert_point, mips_remove_point): Adjust to new interface.
1695 Use mips_supports_z_point_type.
1696 (the_low_target): Install mips_supports_z_point_type.
1697 * linux-ppc-low.c (the_low_target): Install NULL as
1698 supports_z_point_type method.
1699 * linux-s390-low.c (the_low_target): Install NULL as
1700 supports_z_point_type method.
1701 * linux-sparc-low.c (the_low_target): Install NULL as
1702 supports_z_point_type method.
1703 * linux-x86-low.c (x86_supports_z_point_type): New function.
1704 (x86_insert_point): Adjust to new insert_point interface. Use
1705 insert_memory_breakpoint. Adjust to new
1706 i386_low_insert_watchpoint interface.
1707 (x86_remove_point): Adjust to remove_point interface. Use
1708 remove_memory_breakpoint. Adjust to new
1709 i386_low_remove_watchpoint interface.
1710 (the_low_target): Install x86_supports_z_point_type.
1711 * lynx-low.c (lynx_target_ops): Install NULL as
1712 supports_z_point_type callback.
1713 * nto-low.c (nto_supports_z_point_type): New.
1714 (nto_insert_point, nto_remove_point): Adjust to new interface.
1715 (nto_target_ops): Install nto_supports_z_point_type.
1716 * mem-break.c: Adjust intro comment.
1717 (struct raw_breakpoint) <raw_type, size>: New fields.
1718 <inserted>: Update comment.
1719 <shlib_disabled>: Delete field.
1720 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1721 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1722 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1723 (raw_bkpt_type_to_target_hw_bp_type): New function.
1724 (find_enabled_raw_code_breakpoint_at): New function.
1725 (find_raw_breakpoint_at): New type and size parameters. Use them.
1726 (insert_memory_breakpoint): New function, based off
1727 set_raw_breakpoint_at.
1728 (remove_memory_breakpoint): New function.
1729 (set_raw_breakpoint_at): Reimplement.
1730 (set_breakpoint): New, based on set_breakpoint_at.
1731 (set_breakpoint_at): Reimplement.
1732 (delete_raw_breakpoint): Go through the_target->remove_point
1733 instead of assuming memory breakpoints.
1734 (find_gdb_breakpoint_at): Delete.
1735 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1736 (find_gdb_breakpoint): New function.
1737 (set_gdb_breakpoint_at): Delete.
1738 (z_type_supported): New function.
1739 (set_gdb_breakpoint_1): New function, loosely based off
1740 set_gdb_breakpoint_at.
1741 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1742 (delete_gdb_breakpoint_at): Delete.
1743 (delete_gdb_breakpoint_1): New function, loosely based off
1744 delete_gdb_breakpoint_at.
1745 (delete_gdb_breakpoint): New function.
1746 (clear_gdb_breakpoint_conditions): Rename to ...
1747 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1748 breakpoint.
1749 (add_condition_to_breakpoint): Make static.
1750 (add_breakpoint_condition): Take a struct breakpoint pointer
1751 instead of an address. Adjust.
1752 (gdb_condition_true_at_breakpoint): Rename to ...
1753 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1754 z_type parameter.
1755 (gdb_condition_true_at_breakpoint): Reimplement.
1756 (add_breakpoint_commands): Take a struct breakpoint pointer
1757 instead of an address. Adjust.
1758 (gdb_no_commands_at_breakpoint): Rename to ...
1759 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1760 parameter. Return true if no breakpoint was found. Change debug
1761 output.
1762 (gdb_no_commands_at_breakpoint): Reimplement.
1763 (run_breakpoint_commands): Rename to ...
1764 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1765 and change return type to boolean.
1766 (run_breakpoint_commands): New function.
1767 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1768 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1769 breakpoint. Go through the_target->remove_point instead of
1770 assuming memory breakpoint.
1771 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1772 software and hardware breakpoints.
1773 (reinsert_raw_breakpoint): Go through the_target->insert_point
1774 instead of assuming memory breakpoint.
1775 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1776 software and hardware breakpoints.
1777 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1778 Check both software and hardware breakpoints.
1779 (validate_inserted_breakpoint): Assert the breakpoint is a
1780 software breakpoint. Set the inserted flag to -1 instead of
1781 setting shlib_disabled.
1782 (delete_disabled_breakpoints): Adjust.
1783 (validate_breakpoints): Only validate software breakpoints.
1784 Adjust to inserted flag change.
1785 (check_mem_read, check_mem_write): Skip breakpoint types other
1786 than software breakpoints. Adjust to inserted flag change.
1787 * mem-break.h (enum raw_bkpt_type): New enum.
1788 (raw_breakpoint, struct process_info): Forward declare.
1789 (Z_packet_to_target_hw_bp_type): Delete declaration.
1790 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1791 (set_gdb_breakpoint, delete_gdb_breakpoint)
1792 (clear_breakpoint_conditions): New declarations.
1793 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1794 (breakpoint_inserted_here): Update comment.
1795 (add_breakpoint_condition, add_breakpoint_commands): Replace
1796 address parameter with a breakpoint pointer parameter.
1797 (gdb_breakpoint_here): Update comment.
1798 (delete_gdb_breakpoint_at): Delete.
1799 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1800 * server.c (process_point_options): Take a struct breakpoint
1801 pointer instead of an address. Adjust.
1802 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1803 delete_gdb_breakpoint.
1804 * spu-low.c (spu_target_ops): Install NULL as
1805 supports_z_point_type method.
1806 * target.h: Include mem-break.h.
1807 (struct target_ops) <prepare_to_access_memory>: Update comment.
1808 <supports_z_point_type>: New field.
1809 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1810 instead of a char. Also take a raw breakpoint pointer.
1811 * win32-arm-low.c (the_low_target): Install NULL as
1812 supports_z_point_type.
1813 * win32-i386-low.c (i386_supports_z_point_type): New function.
1814 (i386_insert_point, i386_remove_point): Adjust to new interface.
1815 (the_low_target): Install i386_supports_z_point_type.
1816 * win32-low.c (win32_supports_z_point_type): New function.
1817 (win32_insert_point, win32_remove_point): Adjust to new interface.
1818 (win32_target_ops): Install win32_supports_z_point_type.
1819 * win32-low.h (struct win32_target_ops):
1820 <supports_z_point_type>: New method.
1821 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1822 instead of a char. Also take a raw breakpoint pointer.
1823
1824 2014-05-20 Pedro Alves <palves@redhat.com>
1825
1826 * mem-break.h: Include break-common.h.
1827 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1828 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1829 (Z_packet_to_target_hw_bp_type): New declaration.
1830 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1831 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1832 (Z_PACKET_ACCESS_WP): Delete macros.
1833 (Z_packet_to_hw_type): Delete function.
1834 * i386-low.h: Don't include break-common.h here.
1835 (Z_packet_to_hw_type): Delete declaration.
1836 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1837 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1838 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1839 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1840 * linux-aarch64-low.c: Don't include break-common.h here.
1841 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1842 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1843 (Z_packet_to_target_hw_bp_type): Delete function.
1844 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1845 function.
1846 (mips_insert_point, mips_remove_point): Use
1847 Z_packet_to_target_hw_bp_type.
1848
1849 2014-05-20 Pedro Alves <palves@redhat.com>
1850
1851 * linux-aarch64-low.c: Include break-common.h.
1852 (enum target_point_type): Delete.
1853 (Z_packet_to_point_type): Rename to ...
1854 (Z_packet_to_target_hw_bp_type): ... this, and return a
1855 target_hw_bp_type instead.
1856 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1857 instead of an enum target_point_type.
1858 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1859 breakpoint type.
1860 (aarch64_dr_state_insert_one_point)
1861 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1862 (aarch64_handle_aligned_watchpoint)
1863 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1864 Take an enum target_hw_bp_type instead of an enum
1865 target_point_type.
1866 (aarch64_supports_z_point_type): New function.
1867 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1868 use Z_packet_to_target_hw_bp_type.
1869
1870 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1871
1872 * configure.ac: Only use -Werror by default when DEVELOPMENT
1873 is true.
1874 * configure: Regenerate.
1875
1876 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1877
1878 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1879 * linux-x86-low.c (X86_64_USER_REGS): New.
1880 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1881
1882 2014-04-28 Yao Qi <yao@codesourcery.com>
1883
1884 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1885 name.
1886
1887 2014-04-25 Pedro Alves <palves@redhat.com>
1888
1889 PR server/16255
1890 * linux-low.c (linux_attach_fail_reason_string): New function.
1891 (linux_attach_lwp): Delete.
1892 (linux_attach_lwp_1): Rename to ...
1893 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1894 argument. Remove "initial" parameter. Return int instead of
1895 void. Don't error or warn here.
1896 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1897 failure to attach to the tgid. Call warning when failing to
1898 attach to an lwp.
1899 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1900 argument. Remove "initial" parameter. Return int instead of
1901 void. Don't error or warn here.
1902 (linux_attach_fail_reason_string): New declaration.
1903 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1904 interface change. Use linux_attach_fail_reason_string.
1905
1906 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1907 Walfred Tedeschi <walfred.tedeschi@intel.com>
1908
1909 * Makefile.in: Added rules to handle new files
1910 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1911 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1912 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1913 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1914 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1915 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1916 x32-avx512-linux.o.
1917 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1918 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1919 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1920 i386/x32-avx512.xml.
1921 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1922 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1923 i386/x32-avx512-linux.xml.
1924 * i387-fp.c (num_avx512_k_registers): New constant for number
1925 of K registers.
1926 (num_avx512_zmmh_low_registers): New constant for number of
1927 lower ZMM registers (0-15).
1928 (num_avx512_zmmh_high_registers): New constant for number of
1929 higher ZMM registers (16-31).
1930 (num_avx512_ymmh_registers): New contant for number of higher
1931 YMM registers (ymm16-31 added by avx521 on x86_64).
1932 (num_avx512_xmm_registers): New constant for number of higher
1933 XMM registers (xmm16-31 added by AVX512 on x86_64).
1934 (struct i387_xsave): Add space for AVX512 registers.
1935 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1936 Add code to handle AVX512 registers.
1937 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1938 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1939 prototypei from generated file.
1940 (tdesc_amd64_avx512_linux): Likewise.
1941 (init_registers_x32_avx512_linux): Likewise.
1942 (tdesc_x32_avx512_linux): Likewise.
1943 (init_registers_i386_avx512_linux): Likewise.
1944 (tdesc_i386_avx512_linux): Likewise.
1945 (x86_64_regmap): Add AVX512 registers.
1946 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1947 mask.
1948 (initialize_low_arch): Add code to initialize AVX512 registers.
1949
1950 2014-04-23 Pedro Alves <palves@redhat.com>
1951
1952 * mem-break.c (find_gdb_breakpoint_at): Make static.
1953 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1954
1955 2014-04-23 Pedro Alves <palves@redhat.com>
1956
1957 * i386-low.c: Don't include break-common.h here.
1958 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1959 prototype to take target_hw_bp_type as argument instead of a Z
1960 packet char.
1961 * i386-low.h: Include break-common.h here.
1962 (Z_packet_to_hw_type): Declare.
1963 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1964 prototypes.
1965 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1966 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1967 (x86_remove_point): Convert the packet number to a
1968 target_hw_bp_type before calling i386_low_remove_watchpoint.
1969 * win32-i386-low.c (i386_insert_point): Convert the packet number
1970 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1971 (i386_remove_point): Convert the packet number to a
1972 target_hw_bp_type before calling i386_low_remove_watchpoint.
1973
1974 2014-04-23 Pedro Alves <palves@redhat.com>
1975
1976 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1977
1978 2014-04-10 Pedro Alves <palves@redhat.com>
1979
1980 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1981 Check if the condition or command is NULL before checking if the
1982 breakpoint is known. On success, return true.
1983 * mem-break.h (add_breakpoint_condition): Document return.
1984 (add_breakpoint_commands): Add describing comment.
1985 * server.c (skip_to_semicolon): New function.
1986 (process_point_options): Use it.
1987
1988 2014-04-09 Pedro Alves <palves@redhat.com>
1989
1990 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1991 to lwpid_of.
1992
1993 2014-02-27 Pedro Alves <palves@redhat.com>
1994
1995 PR 12702
1996 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1997 macros.
1998 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1999 output.
2000 (last_thread_of_process_p): Take a PID argument instead of a
2001 thread pointer.
2002 (linux_wait_for_lwp): Delete.
2003 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2004 functions.
2005 (linux_low_filter_event): New function, party factored out from
2006 linux_wait_for_event.
2007 (linux_wait_for_event): Rename to ...
2008 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2009 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2010 sigsuspend. Check for zombie leaders.
2011 (linux_wait_for_event): Reimplement as wrapper around
2012 linux_wait_for_event_filtered.
2013 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2014 a normal or signal exit is seen, it's the whole process exiting.
2015 (wait_for_sigstop): No longer a for_each_inferior callback.
2016 Rewrite on top of linux_wait_for_event_filtered.
2017 (stop_all_lwps): Call wait_for_sigstop directly.
2018 * server.c (resume, handle_target_event): Handle
2019 TARGET_WAITKIND_NO_RESUMED.
2020
2021 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2022
2023 * win32-low.c (psapi_get_dll_name,
2024 * win32_CreateToolhelp32Snapshot): Delete.
2025 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2026 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2027 Delete.
2028 (handle_load_dll): Add function description.
2029 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2030
2031 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2032
2033 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2034 Add comment.
2035 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2036 base address when calling win32_add_one_solib.
2037 (handle_load_dll): Delete local variable load_addr.
2038 Remove 0x1000 offset applied to DLL base address when calling
2039 win32_add_one_solib.
2040 (handle_unload_dll): Add comment.
2041
2042 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2043
2044 * win32-low.c (win32_add_all_dlls): Renames
2045 win32_ensure_ntdll_loaded. Rewrite function documentation.
2046 Adjust implementation to always load all DLLs.
2047 Add 0x1000 offset to DLL base address when calling
2048 win32_add_one_solib.
2049 (child_initialization_done): New static global.
2050 (do_initial_child_stuff): Set child_initialization_done to
2051 zero during child initialization, and 1 after. Replace call
2052 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2053 Add comment.
2054 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2055 (handle_unload_dll): Add function documentation.
2056 (get_child_debug_event): Ignore load and unload DLL events
2057 during child initialization.
2058
2059 2014-02-20 Doug Evans <dje@google.com>
2060
2061 Remove global all_lwps.
2062 * inferiors.h (ptid_of): Move here from linux-low.h.
2063 (pid_of, lwpid_of): Ditto.
2064 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2065 parameter is a struct thread_info * now.
2066 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2067 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2068 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2069 directly.
2070 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2071 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2072 * linux-arm-low.c (update_registers_callback): Update, "entry"
2073 parameter is a struct thread_info * now.
2074 Fetch lwpid from current_inferior directly.
2075 (arm_insert_point): Pass &all_threads to find_inferior instead of
2076 &all_lwps.
2077 (arm_remove_point): Ditto.
2078 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2079 (arm_prepare_to_resume): Fetch pid from thread.
2080 (arm_read_description): Fetch lwpid from current_inferior directly.
2081 * linux-low.c (all_lwps): Delete.
2082 (delete_lwp): Delete call to remove_inferior.
2083 (handle_extended_wait): Fetch lwpid from thread.
2084 (add_lwp): Don't set lwp->entry.id. Remove call to
2085 add_inferior_to_list.
2086 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2087 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2088 (kill_one_lwp_callback): Ditto.
2089 (linux_kill): Don't dereference NULL pointer.
2090 Fetch ptid,lwpid from thread.
2091 (get_detach_signal): Fetch ptid from thread.
2092 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2093 Simplify call to regcache_invalidate_thread.
2094 (delete_lwp_callback): Update, "entry" parameter is a
2095 struct thread_info * now. Fetch pid from thread.
2096 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2097 (status_pending_p_callback): Update, "entry" parameter is a
2098 struct thread_info * now. Fetch ptid from thread.
2099 (find_lwp_pid): Update, "entry" parameter is a
2100 struct thread_info * now.
2101 (linux_wait_for_lwp): Fetch pid from thread.
2102 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2103 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2104 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2105 (dequeue_one_deferred_signal): Ditto.
2106 (cancel_breakpoint): Fetch ptid from current_inferior.
2107 (linux_wait_for_event): Pass &all_threads to find_inferior,
2108 not &all_lwps. Fetch ptid, lwpid from thread.
2109 (count_events_callback): Update, "entry" parameter is a
2110 struct thread_info * now.
2111 (select_singlestep_lwp_callback): Ditto.
2112 (select_event_lwp_callback): Ditto.
2113 (cancel_breakpoints_callback): Ditto.
2114 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2115 not &all_lwps.
2116 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2117 (unsuspend_one_lwp): Update, "entry" parameter is a
2118 struct thread_info * now.
2119 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2120 not &all_lwps.
2121 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2122 Fetch lwpid from thread, not lwp.
2123 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2124 Pass &all_threads to find_inferior, not &all_lwps.
2125 (send_sigstop): Fetch lwpid from thread, not lwp.
2126 (send_sigstop_callback): Update, "entry" parameter is a
2127 struct thread_info * now.
2128 (suspend_and_send_sigstop_callback): Ditto.
2129 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2130 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2131 struct thread_info * now.
2132 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2133 from thread, lwp.
2134 (lwp_running): Update, "entry" parameter is a
2135 struct thread_info * now.
2136 (stop_all_lwps): Fetch ptid from thread.
2137 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2138 (linux_resume_one_lwp): Fetch lwpid from thread.
2139 (linux_set_resume_request): Update, "entry" parameter is a
2140 struct thread_info * now. Fetch pid, lwpid from thread.
2141 (resume_status_pending_p): Update, "entry" parameter is a
2142 struct thread_info * now.
2143 (need_step_over_p): Ditto. Fetch lwpid from thread.
2144 (start_step_over): Fetch lwpid from thread.
2145 (linux_resume_one_thread): Update, "entry" parameter is a
2146 struct thread_info * now. Fetch lwpid from thread.
2147 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2148 (proceed_one_lwp): Update, "entry" parameter is a
2149 struct thread_info * now. Fetch lwpid from thread.
2150 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2151 struct thread_info * now.
2152 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2153 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2154 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2155 directly.
2156 (regsets_store_inferior_registers): Ditto.
2157 (fetch_register, store_register): Ditto.
2158 (linux_read_memory, linux_write_memory): Ditto.
2159 (linux_request_interrupt): Ditto.
2160 (linux_read_auxv): Ditto.
2161 (linux_xfer_siginfo): Ditto.
2162 (linux_qxfer_spu): Ditto.
2163 (linux_qxfer_libraries_svr4): Ditto.
2164 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2165 moved to inferiors.h.
2166 (get_lwp): Delete.
2167 (get_thread_lwp): Update.
2168 (struct lwp_info): Delete member "entry". Simplify comment for
2169 member "thread".
2170 (all_lwps): Delete.
2171 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2172 current_inferior directly.
2173 (update_watch_registers_callback): Update, "entry" parameter is a
2174 struct thread_info * now. Fetch pid from thread.
2175 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2176 (mips_insert_point): Fetch lwpid from current_inferior.
2177 Pass &all_threads to find_inferior, not &all_lwps.
2178 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2179 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2180 directly.
2181 (mips_stopped_data_address): Ditto.
2182 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2183 directly.
2184 * linux-tile-low.c (tile_arch_setup): Ditto.
2185 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2186 (update_debug_registers_callback): Update, "entry" parameter is a
2187 struct thread_info * now. Fetch pid from thread.
2188 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2189 Pass &all_threads to find_inferior, not &all_lwps.
2190 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2191 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2192 Pass &all_threads to find_inferior, not &all_lwps.
2193 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2194 (i386_dr_low_get_status): Ditto.
2195 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2196 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2197 (x86_linux_read_description): Ditto.
2198 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2199
2200 2014-02-20 Doug Evans <dje@google.com>
2201
2202 * inferiors.c (get_first_inferior): Fix buglet.
2203
2204 2014-02-19 Doug Evans <dje@google.com>
2205
2206 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2207 * inferiors.c (add_thread): Change result type to struct thread_info *.
2208 All callers updated.
2209 (add_lwp): Call add_thread here instead of in callers.
2210 All callers updated.
2211 * linux-low.h (get_lwp_thread): Rewrite.
2212 (struct lwp_info): New member "thread".
2213
2214 2014-02-19 Doug Evans <dje@google.com>
2215
2216 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2217 All callers updated.
2218
2219 2014-02-19 Doug Evans <dje@google.com>
2220
2221 * inferiors.c (add_thread): Fix whitespace.
2222
2223 2014-02-19 Doug Evans <dje@google.com>
2224
2225 * dll.c (clear_dlls): Replace accessing list implemention details
2226 with API function.
2227 * gdbthread.h (get_first_thread): Declare.
2228 * inferiors.c (for_each_inferior_with_data): New function.
2229 (get_first_thread): New function.
2230 (find_thread_ptid): Simplify.
2231 (get_first_inferior): New function.
2232 (clear_list): Delete.
2233 (one_inferior_p): New function.
2234 (clear_inferior_list): New function.
2235 (clear_inferiors): Update.
2236 * inferiors.h (for_each_inferior_with_data): Declare.
2237 (clear_inferior_list): Declare.
2238 (one_inferior_p): Declare.
2239 (get_first_inferior): Declare.
2240 * linux-low.c (linux_wait_for_event): Replace accessing list
2241 implemention details with API function.
2242 * server.c (target_running): Ditto.
2243 (accumulate_file_name_length): New function.
2244 (emit_dll_description): New function.
2245 (handle_qxfer_libraries): Replace accessing list implemention
2246 details with API function.
2247 (handle_qxfer_threads_worker): New function.
2248 (handle_qxfer_threads_proper): Replace accessing list implemention
2249 details with API function.
2250 (handle_query): Ditto.
2251 (visit_actioned_threads_callback_ftype): New typedef.
2252 (visit_actioned_threads_data): New struct.
2253 (visit_actioned_threads): Rewrite to be find_inferior callback.
2254 (resume): Call find_inferior.
2255 (handle_status): Replace accessing list implemention
2256 details with API function.
2257 (process_serial_event): Replace accessing list implemention details
2258 with API function.
2259 * target.c (set_desired_inferior): Replace accessing list implemention
2260 details with API function.
2261 * tracepoint.c (same_process_p): New function.
2262 (gdb_agent_about_to_close): Replace accessing list implemention
2263 details with API function.
2264 * win32-low.c (child_delete_thread): Replace accessing list
2265 implemention details with API function.
2266 (match_dll_by_basename): New function.
2267 (dll_is_loaded_by_basename): New function.
2268 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2269 details call to dll_is_loaded_by_basename.
2270
2271 2014-02-19 Doug Evans <dje@google.com>
2272
2273 * dll.h (struct dll_info): Add comment.
2274 * gdbthread.h (struct thread_info): Add comment.
2275 (current_ptid): Simplify.
2276 * inferiors.c (add_process): Update.
2277 (remove_process): Update.
2278 * inferiors.h (struct process_info): Rename member "head" to "entry".
2279 * linux-low.c (delete_lwp): Update.
2280 (add_lwp): Update.
2281 (last_thread_of_process_p): Update.
2282 (kill_one_lwp_callback, linux_kill): Update.
2283 (status_pending_p_callback): Update.
2284 (wait_for_sigstop): Update. Simplify read of ptid.
2285 (start_step_over): Update.
2286 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2287 (get_lwp_thread): Update.
2288 (struct lwp_info): Rename member "head" to "entry".
2289 * regcache.h (inferior_list_entry): Delete.
2290 * server.c (kill_inferior_callback): Update.
2291 (detach_or_kill_inferior_callback): Update.
2292 (print_started_pid): Update.
2293 (print_attached_pid): Update.
2294 (process_serial_event): Simplify read of ptid.
2295 * thread-db.c (thread_db_create_event): Update.
2296 (thread_db_get_tls_address): Update.
2297 * win32-low.c (current_inferior_ptid): Simplify.
2298
2299 2014-02-19 Tom Tromey <tromey@redhat.com>
2300
2301 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2302 argument.
2303 (target_supports_btrace): Update.
2304
2305 2014-02-14 Yao Qi <yao@codesourcery.com>
2306
2307 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2308 (rsp-low-ipa.o): New target.
2309
2310 2014-02-12 Tom Tromey <tromey@redhat.com>
2311
2312 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2313 convert_ascii_to_int.
2314 * regcache.c (registers_to_string): Likewise.
2315 * remote-utils.c (decode_M_packet): Likewise.
2316 * server.c (process_serial_event): Likewise.
2317
2318 2014-02-12 Tom Tromey <tromey@redhat.com>
2319
2320 * server.c (handle_query, handle_v_run): Use hex2bin, not
2321 unhexify.
2322 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2323
2324 2014-02-12 Tom Tromey <tromey@redhat.com>
2325
2326 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2327 convert_int_to_ascii.
2328 * regcache.c (registers_to_string, collect_register_as_string):
2329 Likewise.
2330 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2331 Likewise.
2332 * server.c (process_serial_event): Likewise.
2333 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2334 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2335
2336 2014-02-12 Tom Tromey <tromey@redhat.com>
2337
2338 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2339 bin2hex, not hexify.
2340 * tracepoint.c (cmd_qtstatus): Likewise.
2341
2342 2014-02-12 Tom Tromey <tromey@redhat.com>
2343
2344 * remote-utils.c (monitor_output): Pass explicit length to
2345 hexify.
2346
2347 2014-02-12 Tom Tromey <tromey@redhat.com>
2348
2349 * tracepoint.c: Include rsp-low.h.
2350 * server.c: Include rsp-low.h.
2351 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2352 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2353 declare.
2354 * remote-utils.c: Include rsp-low.h.
2355 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2356 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2357 (convert_int_to_ascii, convert_ascii_to_int): Move to
2358 common/rsp-low.c.
2359 * regcache.c: Include rsp-low.h.
2360 * ax.c: Include rsp-low.h.
2361 * Makefile.in (SFILES): Add common/rsp-low.c.
2362 (OBS): Add rsp-low.o.
2363 (rsp-low.o): New target.
2364
2365 2014-02-12 Tom Tromey <tromey@redhat.com>
2366
2367 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2368 Include print-utils.h.
2369 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2370 (plongest, thirty_two, phex_nz): Remove.
2371 * Makefile.in (SFILES): Add common/print-utils.c.
2372 (OBS): Add print-utils.o.
2373 (print-utils-ipa.o): New target.
2374 (print-utils.o): New target.
2375 (IPA_OBJS): Add print-utils-ipa.o.
2376
2377 2014-02-06 Tom Tromey <tromey@redhat.com>
2378
2379 * Makefile.in (SFILES): Fix indentation.
2380
2381 2014-02-05 Doug Evans <dje@google.com>
2382
2383 * linux-low.c (linux_wait_for_event): Improve comment.
2384 (linux_wait_1): Keep current_inferior in sync with event_child.
2385
2386 2014-01-22 Doug Evans <dje@google.com>
2387
2388 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2389
2390 2014-01-22 Doug Evans <dje@google.com>
2391
2392 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2393 * configure: Regenerate.
2394 * config.in: Regenerate.
2395 * Makefile.in (SFILES): Add debug.c.
2396 (OBS): Add debug.o.
2397 * debug.c: New file.
2398 * debug.h: New file.
2399 * linux-aarch64-low.c (*): Update all debugging printfs to use
2400 debug_printf instead of fprintf.
2401 * linux-arm-low.c (*): Ditto.
2402 * linux-cris-low.c (*): Ditto.
2403 * linux-crisv32-low.c (*): Ditto.
2404 * linux-m32r-low.c (*): Ditto.
2405 * linux-sparc-low.c (*): Ditto.
2406 * linux-x86.c (*): Ditto.
2407 * linux-low.c (*): Ditto.
2408 (linux_wait_1): Add calls to debug_enter, debug_exit.
2409 (linux_wait): Remove redundant debugging printf.
2410 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2411 (linux_resume, unstop_all_lwps): Ditto.
2412 * mem-break.c (*): Update all debugging printfs to use
2413 debug_printf instead of fprintf.
2414 * remote-utils.c (*): Ditto.
2415 * thread-db.c (*): Ditto.
2416 * server.c #include <ctype.h>, "gdb_vecs.h".
2417 (debug_threads): Moved to debug.c.
2418 (*): Update all debugging printfs to use debug_printf instead of
2419 fprintf.
2420 (start_inferior): Replace call to fflush with call to debug_flush.
2421 (monitor_show_help): Mention set debug-format.
2422 (parse_debug_format_options): New function.
2423 (handle_monitor_command): Handle "monitor set debug-format".
2424 (gdbserver_usage): Mention --debug-format.
2425 (main): Parse --debug-format.
2426 * server.h (debug_threads): Declaration moved to debug.h.
2427 #include "debug.h".
2428 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2429 trace_debug_1 that uses debug_printf.
2430 (tracepoint_look_up_symbols): Update all debugging printfs to use
2431 debug_printf instead of fprintf.
2432
2433 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2434
2435 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2436 sys/ptrace.h.
2437
2438 2014-01-17 Pedro Alves <palves@redhat.com>
2439
2440 PR build/16445
2441 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2442 defined after including gdb_proc_service.h.
2443
2444 2014-01-16 Doug Evans <dje@google.com>
2445
2446 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2447 (match_dll): Use it.
2448
2449 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2450
2451 * target.h (target_ops) <read_btrace>: Change parameters and
2452 return type to allow error reporting.
2453 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2454 trace reading errors on.
2455 * linux-low.c (linux_low_read_btrace): Pass trace reading
2456 errors on.
2457 (linux_low_disable_btrace): New.
2458
2459 2014-01-15 Doug Evans <dje@google.com>
2460
2461 * inferiors.c (thread_id_to_gdb_id): Delete.
2462 * inferiors.h (thread_id_to_gdb_id): Delete.
2463
2464 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2465
2466 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2467 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2468 versions.
2469
2470 2014-01-08 Pedro Alves <palves@redhat.com>
2471
2472 * server.c (handle_status): Don't discard previous queued stop
2473 replies or thread's pending status here.
2474 (main) <disconnection>: Do it here instead.
2475
2476 2014-01-08 Pedro Alves <palves@redhat.com>
2477
2478 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2479 * server.c (visit_actioned_threads, handle_pending_status): New
2480 function.
2481 (handle_v_cont): Factor out parts to ...
2482 (resume): ... this new function. If in all-stop, and a thread
2483 being resumed has a pending status, report it without actually
2484 resuming.
2485 (myresume): Adjust to use the new 'resume' function.
2486 (clear_pending_status_callback, set_pending_status_callback)
2487 (find_status_pending_thread_callback): New functions.
2488 (handle_status): Handle the case of multiple threads having
2489 interesting statuses to report. Report threads' real last signal
2490 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2491 with an interesting thread to report the status for, instead of
2492 always reporting the status of the first thread.
2493
2494 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2495
2496 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2497 * gdbreplay.c (gdbreplay_version): Likewise.
2498
2499 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2500
2501 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2502 iov.iov_len with the real length in use.
2503
2504 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2505
2506 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2507 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2508 for all targets that use win32-low.c.
2509 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2510 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2511
2512 2013-12-13 Pedro Alves <palves@redhat.com>
2513
2514 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2515 if equal to TARGET_WAITKIND_LOADED.
2516 * win32-low.c (cached_status): New static global.
2517 (win32_wait): Add declaration.
2518 (do_initial_child_stuff): Flush all initial pending debug events
2519 up to the initial breakpoint.
2520 (win32_wait): If CACHED_STATUS was set, return that instead
2521 of doing a real wait. Remove the code resuming the execution
2522 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2523 during the initial phase. Also remove the code changing
2524 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2525 TARGET_WAITKIND_STOPPED.
2526
2527 2013-12-11 Yao Qi <yao@codesourcery.com>
2528
2529 * notif.c (handle_notif_ack): Return 0 if no notification
2530 matches.
2531
2532 2013-11-20 Doug Evans <dje@google.com>
2533
2534 * linux-low.c (linux_set_resume_request): Fix comment.
2535
2536 2013-11-20 Doug Evans <dje@google.com>
2537
2538 * linux-low.c (resume_status_pending_p): Tweak comment.
2539
2540 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2541
2542 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2543 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2544 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2545 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2546 (srv_amd64_regobj): Add amd64-mpx.o.
2547 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2548 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2549 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2550 * i387-fp.c (num_pl_bnd_register) Added constant.
2551 (num_pl_bnd_cfg_registers) Added constant.
2552 (struct i387_xsave) Added reserved area and MPX fields.
2553 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2554 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2555 function.
2556 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2557 (init_registers_amd64_mpx_linux): Declare new function.
2558 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2559 (x86_64_regmap): Add MPX registers.
2560 (x86_linux_read_description): Add MPX case.
2561 (initialize_low_arch): Initialize MPX targets.
2562
2563 2013-11-18 Tom Tromey <tromey@redhat.com>
2564
2565 * configure: Rebuild.
2566 * configure.ac: Don't check for stdlib.h.
2567 * gdbreplay.c: Unconditionally include stdlib.h.
2568
2569 2013-11-18 Tom Tromey <tromey@redhat.com>
2570
2571 * config.in: Rebuild.
2572 * configure: Rebuild.
2573 * configure.ac: Don't use AC_HEADER_DIRENT.
2574
2575 2013-11-18 Tom Tromey <tromey@redhat.com>
2576
2577 * server.h: Don't check HAVE_STRING_H.
2578 * gdbreplay.c: Don't check HAVE_STRING_H.
2579 * configure: Rebuild.
2580
2581 2013-11-18 Tom Tromey <tromey@redhat.com>
2582
2583 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2584 LIBGNU.
2585
2586 2013-11-08 Tom Tromey <tromey@redhat.com>
2587
2588 * configure, config.in: Rebuild.
2589 * configure.ac: Remove unused configury.
2590
2591 2013-11-08 Tom Tromey <tromey@redhat.com>
2592
2593 * acinclude.m4: Include common.m4, codeset.m4.
2594 * configure, config.in: Rebuild.
2595 * configure.ac: Use GDB_AC_COMMON.
2596
2597 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2598
2599 * linux-s390-low.c (HWCAP_S390_TE): New define.
2600 (s390_arch_setup): Consider the TE field in the HWCAP for
2601 determining 'have_regset_tdb'.
2602
2603 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2604
2605 PR gdb/16014
2606 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2607 call to sizeof.
2608
2609 2013-10-02 Pedro Alves <palves@redhat.com>
2610
2611 * server.c (process_serial_event): Don't output "GDBserver
2612 exiting" if GDB is connected through stdio.
2613 * target.c (mywait): Likewise, be silent if GDB is connected
2614 through stdio.
2615
2616 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2617
2618 * lynx-low.c (lynx_add_threads_after_attach): New function.
2619 (lynx_attach): Remove call to add_thread. Add call to
2620 lynx_add_threads_after_attach instead.
2621
2622 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2623
2624 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2625 * config.in, configure: Regenerated.
2626
2627 2013-09-18 Yao Qi <yao@codesourcery.com>
2628
2629 PR server/15959
2630 * server.c (start_inferior): Clear 'resume_info'.
2631
2632 2013-09-16 Jiong Wang <jiwang@tilera.com>
2633
2634 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2635 for each register.
2636
2637 2013-09-16 Jiong Wang <jiwang@tilera.com>
2638
2639 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2640 linux-tile-low.o to srv_tgtobj.
2641
2642 2013-09-16 Will Newton <will.newton@linaro.org>
2643
2644 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2645 out regs.
2646
2647 2013-09-06 Pedro Alves <palves@redhat.com>
2648
2649 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2650 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2651 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2652 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2653 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2654 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2655
2656 2013-09-06 Pedro Alves <palves@redhat.com>
2657
2658 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2659 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2660
2661 2013-09-06 Pedro Alves <palves@redhat.com>
2662
2663 * linux-amd64-ipa.c: Include tracepoint.h.
2664 * linux-i386-ipa.c: Include tracepoint.h.
2665
2666 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2667
2668 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2669 (ps_get_thread_area): New function.
2670
2671 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2672
2673 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2674 (initialize_low_arch): Call init_registers_crisv32 rather than
2675 init_register_crisv32.
2676
2677 2013-09-05 Pedro Alves <palves@redhat.com>
2678
2679 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2680 to ...
2681 * hostio.h: ... this new file.
2682 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2683 win32-low.c: Include hostio.h.
2684
2685 2013-09-05 Pedro Alves <palves@redhat.com>
2686
2687 * server.h (gdb_client_data, handler_func, callback_handler_func)
2688 (delete_file_handler, add_file_handler, append_callback_event)
2689 (delete_callback_event, start_event_loop, initialize_event_loop):
2690 Move to event-loop.h and include it.
2691 * event-loop.h: New file.
2692
2693 2013-09-05 Pedro Alves <palves@redhat.com>
2694
2695 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2696 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2697 (loaded_dll, unloaded_dll): Move to ...
2698 * dll.h: ... this new file.
2699 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2700
2701 2013-09-05 Pedro Alves <palves@redhat.com>
2702
2703 * server.h (current_process, get_thread_process, all_processes)
2704 (add_inferior_to_list, for_each_inferior, current_inferior)
2705 (remove_inferior, add_process, remove_process, find_process_pid)
2706 (have_started_inferiors_p, have_attached_inferiors_p)
2707 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2708 (clear_inferiors, find_inferior, find_inferior_id)
2709 (inferior_target_data, set_inferior_target_data)
2710 (inferior_regcache_data, set_inferior_regcache_data): Move to
2711 inferiors.h, and include it.
2712 * inferiors.h: New file.
2713
2714 2013-09-05 Pedro Alves <palves@redhat.com>
2715
2716 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2717 Move ...
2718 * ax.h: ... here.
2719
2720 2013-09-05 Pedro Alves <palves@redhat.com>
2721
2722 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2723 tracepoint.h.
2724 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2725 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2726 (handle_tracepoint_general_set, handle_tracepoint_query)
2727 (tracepoint_finished_step, tracepoint_was_hit)
2728 (release_while_stepping_state_list, current_traceframe)
2729 (in_readonly_region, traceframe_read_mem)
2730 (fetch_traceframe_registers, traceframe_read_sdata)
2731 (traceframe_read_info, struct fast_tpoint_collect_status)
2732 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2733 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2734 (supply_fast_tracepoint_registers)
2735 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2736 (ipa_tdesc, claim_trampoline_space)
2737 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2738 (agent_mem_read, agent_get_trace_state_variable_value)
2739 (agent_set_trace_state_variable_value, agent_tsv_read)
2740 (agent_mem_read_string, get_raw_reg_func_addr)
2741 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2742 * tracepoint.h: ... this new file.
2743
2744 2013-09-05 Pedro Alves <palves@redhat.com>
2745
2746 * server.h (perror_with_name, error, fatal, warning, paddress)
2747 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2748 include it.
2749 * utils.h: New file.
2750
2751 2013-09-05 Pedro Alves <palves@redhat.com>
2752
2753 * server.h (remote_debug, noack_mode, transport_is_reliable)
2754 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2755 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2756 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2757 (write_enn, initialize_async_io, enable_async_io)
2758 (disable_async_io, check_remote_input_interrupt_request)
2759 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2760 (dead_thread_notify, prepare_resume_reply)
2761 (decode_address_to_semicolon, decode_address, decode_m_packet)
2762 (decode_M_packet, decode_X_packet, decode_xfer_write)
2763 (decode_search_memory_packet, unhexify, hexify)
2764 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2765 (look_up_one_symbol, relocate_instruction)
2766 (monitor_output): Move to remote-utils.h, and include it.
2767 * remote-utils.h: New file.
2768
2769 2013-09-05 Pedro Alves <palves@redhat.com>
2770
2771 * server.h (_): Delete.
2772
2773 2013-09-02 Pedro Alves <palves@redhat.com>
2774
2775 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2776 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2777 allocated.
2778 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2779
2780 2013-09-02 Pierre Muller <muller@sourceware.org>
2781
2782 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2783 or WriteProcessMemory complete successfully and handle
2784 ERROR_PARTIAL_COPY error.
2785
2786 2013-09-02 Pedro Alves <palves@redhat.com>
2787
2788 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2789 error instead of EIO.
2790
2791 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2792
2793 PR server/15604
2794 * linux-low.c: Include filestuff.h.
2795 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2796 * lynx-low.c: Include filestuff.h.
2797 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2798 * server.c: Include filestuff.h.
2799 (main): Call notice_open_fds.
2800 * spu-low.c: Include filestuff.h.
2801 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2802
2803 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2804
2805 * Makefile.in: Explain why ../target and ../nat are not
2806 listed as include file search paths.
2807 (linux-waitpid.o): New object file rule.
2808 * configure.srv (srv_native_linux_obj): New variable.
2809 Replace all occurrences of linux native object files with
2810 $srv_native_linux_obj.
2811 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2812 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2813 (linux_enable_event_reporting): Remove declaration.
2814 (my_waitpid): Moved to common/linux-waitpid.c.
2815 (linux_wait_for_event): Pass ptid when calling
2816 linux_enable_event_reporting.
2817 (linux_supports_tracefork_flag): Remove.
2818 (linux_enable_event_reporting): Likewise.
2819 (linux_tracefork_grandchild): Remove.
2820 (STACK_SIZE): Moved to common/linux-ptrace.c.
2821 (linux_tracefork_child): Remove.
2822 (linux_test_for_tracefork): Remove.
2823 (linux_look_up_symbols): Call linux_supports_traceclone.
2824 (initialize_low): Remove call to linux_test_for_tracefork.
2825 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2826 common/linux-ptrace.h.
2827 (PTRACE_TYPE_ARG4): Likewise.
2828 Include linux-ptrace.h.
2829
2830 2013-08-21 Pedro Alves <palves@redhat.com>
2831
2832 * config.in: Renegerate.
2833
2834 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2835
2836 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2837 (SFILES): Remove $(srcdir)/common/target-common.c and
2838 add $(srcdir)/target/waitstatus.c.
2839 (OBS): Remove target-common.o and add waitstatus.o.
2840 (server_h): Remove $(srcdir)/../common/target-common.h and
2841 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2842 and $(srcdir)/../target/waitstatus.h.
2843 (target-common.o): Remove.
2844 (waitstatus.o): New target object file.
2845 * target.h: Do not include target-common.h and
2846 include target/resume.h, target/wait.h and
2847 target/waitstatus.h.
2848
2849 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2850
2851 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2852 to PTRACE_TYPE_ARG3.
2853 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2854 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2855 PTRACE_TYPE_ARG4.
2856 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2857 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2858
2859 2013-07-27 Jie Zhang <jie@codesourcery.com>
2860 Daniel Jacobowitz <dan@codesourcery.com>
2861 Yao Qi <yao@codesourcery.com>
2862
2863 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2864 (mips-linux-watch.o): New rule.
2865 (mips_linux_watch_h): New variable.
2866 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2867 srv_tgtobj.
2868 * linux-mips-low.c: Include mips-linux-watch.h.
2869 (struct arch_process_info, struct arch_lwp_info): New.
2870 (update_watch_registers_callback): New function.
2871 (mips_linux_new_process, mips_linux_new_thread) New functions.
2872 (mips_linux_prepare_to_resume, mips_insert_point): New
2873 functions.
2874 (mips_remove_point, mips_stopped_by_watchpoint): New
2875 functions.
2876 (rsp_bp_type_to_target_hw_bp_type): New function.
2877 (mips_stopped_data_address): New function.
2878 (the_low_target): Add watchpoint support functions.
2879
2880 2013-07-27 Yao Qi <yao@codesourcery.com>
2881
2882 * i386-low.c: Include break-common.h.
2883 (enum target_hw_bp_type): Remove.
2884
2885 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2886
2887 * Makefile.in (SFILES): /common/target-common.c.
2888 (OBS): Add target-common.o.
2889 (server_h): Add $(srcdir)/../common/target-common.h.
2890 (target-common.o): New target.
2891 * server.c (queue_stop_reply_callback): Free
2892 status string after use.
2893 * target.c (target_waitstatus_to_string): Remove.
2894 * target.h: Include target-common.h.
2895 (resume_kind): Likewise.
2896 (target_waitkind): Likewise.
2897 (target_waitstatus): Likewise.
2898 (TARGET_WNOHANG): Likewise.
2899
2900 2013-07-04 Yao Qi <yao@codesourcery.com>
2901
2902 * Makefile.in (host_alias): Use @host_noncanonical@.
2903 (target_alias): Use @target_noncanonical@.
2904 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2905 ACX_NONCANONICAL_HOST.
2906 * configure: Regenerated.
2907
2908 Revert:
2909 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2910
2911 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2912 * configure: Rebuild.
2913 * Makefile.in (version_host, version_target): Get from configure.
2914 (version.c): Use $(version_host) and $(version_target).
2915
2916 2013-07-03 Pedro Alves <palves@redhat.com>
2917
2918 * Makefile.in (config.status): Depend on development.sh.
2919 * acinclude.m4: Include libmcheck.m4.
2920 * configure: Regenerate.
2921
2922 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2923
2924 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2925 attribute inside the parentheses.
2926 (winapi_DebugSetProcessKillOnExit): Ditto.
2927 (winapi_DebugBreakProcess): Ditto.
2928 (winapi_GenerateConsoleCtrlEvent): Ditto.
2929
2930 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2931
2932 * notif.h (notif_event): Add a dummy member to avoid compiler
2933 errors.
2934
2935 2013-07-01 Pedro Alves <palves@redhat.com>
2936
2937 * hostio.c (HOSTIO_PATH_MAX): Define.
2938 (require_filename, handle_open, handle_unlink, handle_readlink):
2939 Use it.
2940
2941 2013-07-01 Pedro Alves <palves@redhat.com>
2942
2943 * server.h: Include "pathmax.h".
2944 * linux-low.c: Don't include sys/param.h.
2945 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2946 MAXPATHLEN.
2947 * win32-low.c: Don't include sys/param.h.
2948 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2949
2950 2013-07-01 Pedro Alves <palves@redhat.com>
2951
2952 * event-loop.c: Don't check HAVE_UNISTD_H before including
2953 <unistd.h>.
2954 * gdbreplay.c: Likewise.
2955 * remote-utils.c: Likewise.
2956 * server.c: Likewise.
2957 * configure.ac: Don't check for unistd.h.
2958 * configure: Regenerate.
2959
2960 2013-06-28 Tom Tromey <tromey@redhat.com>
2961
2962 * Makefile.in (version.c): Use version.in, not
2963 common/version.in.
2964
2965 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2966
2967 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2968 * configure: Rebuild.
2969 * Makefile.in (version_host, version_target): Get from configure.
2970 (version.c): Use $(version_host) and $(version_target).
2971
2972 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2973
2974 Fix trace-status to output user name without trailing colon.
2975 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2976
2977 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2978
2979 Fix trace-status to output proper start-time and stop-time.
2980 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2981 output start time and stop time in hex as gdb expects.
2982
2983 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2984
2985 * tracepoint.c (build_traceframe_info_xml): Output trace state
2986 variables present in the trace buffer.
2987
2988 2013-06-24 Tom Tromey <tromey@redhat.com>
2989
2990 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2991 create-version.sh.
2992 (version.o): Remove.
2993 * gdbreplay.c: Include version.h.
2994 (version, host_name): Don't declare.
2995 * server.h: Include version.h.
2996 (version, host_name): Don't declare.
2997
2998 2013-06-12 Pedro Alves <palves@redhat.com>
2999
3000 * linux-x86-low.c (linux_is_elf64): Delete global.
3001 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3002 with local linux_pid_exe_is_elf_64_file use.
3003
3004 2013-06-11 Pedro Alves <palves@redhat.com>
3005
3006 * linux-low.c (regset_disabled, disable_regset): New functions.
3007 (regsets_fetch_inferior_registers)
3008 (regsets_store_inferior_registers): Use them.
3009 (initialize_regsets_info); Don't allocate the disabled_regsets
3010 array here.
3011 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3012 comment.
3013
3014 2013-06-11 Pedro Alves <palves@redhat.com>
3015
3016 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3017 xmalloc.
3018
3019 2013-06-11 Pedro Alves <palves@redhat.com>
3020
3021 * linux-x86-low.c (initialize_low_arch): Call
3022 init_registers_x32_avx_linux.
3023
3024 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3025
3026 Fix compatibility with Android Bionic.
3027 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3028 it is not empty.
3029
3030 2013-06-07 Pedro Alves <palves@redhat.com>
3031
3032 PR server/14823
3033 * Makefile.in (OBS): Add tdesc.o.
3034 (IPA_OBJS): Add tdesc-ipa.o.
3035 (tdesc-ipa.o): New rule.
3036 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3037 interface.
3038 * linux-low.c (new_inferior): Delete.
3039 (disabled_regsets, num_regsets): Delete.
3040 (linux_add_process): Adjust to set the new per-process
3041 new_inferior flag.
3042 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3043 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3044 was a stop. When calling arch_setup, switch the current inferior
3045 to the thread that got an event.
3046 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3047 (regsets_fetch_inferior_registers)
3048 (regsets_store_inferior_registers): New regsets_info parameter.
3049 Adjust to use it.
3050 (linux_register_in_regsets): New regs_info parameter. Adjust to
3051 use it.
3052 (register_addr, fetch_register, store_register): New usrregs_info
3053 parameter. Adjust to use it.
3054 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3055 parameter regs_info. Adjust to use it.
3056 (linux_fetch_registers): Get the current inferior's regs_info, and
3057 adjust to use it.
3058 (linux_store_registers): Ditto.
3059 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3060 (initialize_low): Don't initialize the target_regsets here. Call
3061 initialize_low_arch.
3062 * linux-low.h (target_regsets): Delete declaration.
3063 (struct regsets_info): New.
3064 (struct usrregs_info): New.
3065 (struct regs_info): New.
3066 (struct process_info_private) <new_inferior>: New field.
3067 (struct linux_target_ops): Delete the num_regs, regmap, and
3068 regset_bitmap fields. New field regs_info.
3069 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3070 * i387-fp.c (num_xmm_registers): Delete.
3071 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3072 calls to new interface.
3073 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3074 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3075 Infer the number of xmm registers from the regcache's target
3076 description.
3077 * i387-fp.h (num_xmm_registers): Delete.
3078 * inferiors.c (add_thread): Don't install the thread's regcache
3079 here.
3080 * proc-service.c (gregset_info): Fetch the current inferior's
3081 regs_info. Adjust to use it.
3082 * regcache.c: Include tdesc.h.
3083 (register_bytes, reg_defs, num_registers)
3084 (gdbserver_expedite_regs): Delete.
3085 (get_thread_regcache): If the thread doesn't have a regcache yet,
3086 create one, instead of aborting gdbserver.
3087 (regcache_invalidate_one): Rename to ...
3088 (regcache_invalidate_thread): ... this.
3089 (regcache_invalidate_one): New.
3090 (regcache_invalidate): Only invalidate registers of the current
3091 process.
3092 (init_register_cache): Add target_desc parameter, and use it.
3093 (new_register_cache): Ditto. Assert the target description has a
3094 non zero registers_size.
3095 (regcache_cpy): Add assertions. Adjust.
3096 (realloc_register_cache, set_register_cache): Delete.
3097 (registers_to_string, registers_from_string): Adjust.
3098 (find_register_by_name, find_regno, find_register_by_number)
3099 (register_cache_size): Add target_desc parameter, and use it.
3100 (free_register_cache_thread, free_register_cache_thread_one)
3101 (regcache_release, register_cache_size): New.
3102 (register_size): Add target_desc parameter, and use it.
3103 (register_data, supply_register, supply_register_zeroed)
3104 (supply_regblock, supply_register_by_name, collect_register)
3105 (collect_register_as_string, collect_register_by_name): Adjust.
3106 * regcache.h (struct target_desc): Forward declare.
3107 (struct regcache) <tdesc>: New field.
3108 (init_register_cache, new_register_cache): Add target_desc
3109 parameter.
3110 (regcache_invalidate_thread): Declare.
3111 (regcache_invalidate_one): Delete declaration.
3112 (regcache_release): Declare.
3113 (find_register_by_number, register_cache_size, register_size)
3114 (find_regno): Add target_desc parameter.
3115 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3116 declarations.
3117 * remote-utils.c: Include tdesc.h.
3118 (outreg, prepare_resume_reply): Adjust.
3119 * server.c: Include tdesc.h.
3120 (gdbserver_xmltarget): Delete declaration.
3121 (get_features_xml, process_serial_event): Adjust.
3122 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3123 declare.
3124 (struct process_info) <tdesc>: New field.
3125 (ipa_tdesc): Declare.
3126 * tdesc.c: New file.
3127 * tdesc.h: New file.
3128 * tracepoint.c: Include tdesc.h.
3129 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3130 (get_context_regcache): Adjust to pass ipa_tdesc down.
3131 (do_action_at_tracepoint): Adjust to get the register cache size
3132 from the context regcache's description.
3133 (traceframe_walk_blocks): Adjust to get the register cache size
3134 from the current trace frame's description.
3135 (traceframe_get_pc): Adjust to get current trace frame's
3136 description and pass it down.
3137 (gdb_collect): Adjust to get the register cache size from the
3138 IPA's description.
3139 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3140 (gdbserver_xmltarget): Delete.
3141 (initialize_low_tracepoint): Set the ipa's target description.
3142 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3143 (initialize_low_tracepoint): Set the ipa's target description.
3144 * linux-x86-low.c: Include tdesc.h.
3145 [__x86_64__] (is_64bit_tdesc): New.
3146 (ps_get_thread_area, x86_get_thread_area): Use it.
3147 (i386_cannot_store_register): Rename to ...
3148 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3149 (i386_cannot_fetch_register): Rename to ...
3150 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3151 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3152 to new interface.
3153 (target_regsets): Rename to ...
3154 (x86_regsets): ... this.
3155 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3156 interface.
3157 (x86_siginfo_fixup): Use is_64bit_tdesc.
3158 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3159 (tdesc_x32_avx_linux, tdesc_x32_linux)
3160 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3161 Declare.
3162 (x86_linux_update_xmltarget): Delete.
3163 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3164 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3165 (AMD64_LINUX_USER64_CS): New.
3166 (x86_linux_read_description): New, based on
3167 x86_linux_update_xmltarget.
3168 (same_process_callback): New.
3169 (x86_arch_setup_process_callback): New.
3170 (x86_linux_update_xmltarget): New.
3171 (x86_regsets_info): New.
3172 (amd64_linux_regs_info): New.
3173 (i386_linux_usrregs_info): New.
3174 (i386_linux_regs_info): New.
3175 (x86_linux_regs_info): New.
3176 (x86_arch_setup): Reimplement.
3177 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3178 (x86_emit_ops): Ditto.
3179 (the_low_target): Adjust. Install x86_linux_regs_info,
3180 x86_cannot_fetch_register, and x86_cannot_store_register.
3181 (initialize_low_arch): New.
3182 * linux-ia64-low.c (tdesc_ia64): Declare.
3183 (ia64_fetch_register): Adjust.
3184 (ia64_usrregs_info, regs_info): New globals.
3185 (ia64_regs_info): New function.
3186 (the_low_target): Adjust.
3187 (initialize_low_arch): New function.
3188 * linux-sparc-low.c (tdesc_sparc64): Declare.
3189 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3190 Adjust.
3191 (sparc_arch_setup): New function.
3192 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3193 (the_low_target): Adjust.
3194 (initialize_low_arch): New function.
3195 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3196 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3197 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3198 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3199 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3200 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3201 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3202 (tdesc_powerpc_isa205_vsx64l): Declare.
3203 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3204 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3205 (ppc_set_pc, ppc_get_hwcap): Adjust.
3206 (ppc_usrregs_info): Forward declare.
3207 (!__powerpc64__) ppc_regmap_adjusted: New global.
3208 (ppc_arch_setup): Adjust to the current process'es target
3209 description.
3210 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3211 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3212 (ppc_store_evrregset): Adjust.
3213 (target_regsets): Rename to ...
3214 (ppc_regsets): ... this, and make static.
3215 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3216 (ppc_regs_info): New function.
3217 (the_low_target): Adjust.
3218 (initialize_low_arch): New function.
3219 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3220 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3221 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3222 (tdesc_s390x_linux64v2): Declare.
3223 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3224 (s390_fill_gregset, s390_store_last_break): Adjust.
3225 (target_regsets): Rename to ...
3226 (s390_regsets): ... this, and make static.
3227 (s390_get_pc, s390_set_pc): Adjust.
3228 (s390_get_hwcap): New target_desc parameter, and use it.
3229 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3230 (s390_arch_setup): Adjust to set the current process'es target
3231 description. Don't adjust the regmap.
3232 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3233 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3234 (regs_info_3264): New globals.
3235 (s390_regs_info): New function.
3236 (the_low_target): Adjust.
3237 (initialize_low_arch): New function.
3238 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3239 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3240 [__mips64] (init_registers_mips_linux)
3241 (init_registers_mips_dsp_linux): Delete defines.
3242 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3243 (have_dsp): New global.
3244 (mips_read_description): New, based on mips_arch_setup.
3245 (mips_arch_setup): Reimplement.
3246 (get_usrregs_info): New function.
3247 (mips_cannot_fetch_register, mips_cannot_store_register)
3248 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3249 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3250 (target_regsets): Rename to ...
3251 (mips_regsets): ... this, and make static.
3252 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3253 (dsp_regs_info, regs_info): New globals.
3254 (mips_regs_info): New function.
3255 (the_low_target): Adjust.
3256 (initialize_low_arch): New function.
3257 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3258 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3259 Declare.
3260 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3261 (arm_read_description): New, with bits factored from
3262 arm_arch_setup.
3263 (arm_arch_setup): Reimplement.
3264 (target_regsets): Rename to ...
3265 (arm_regsets): ... this, and make static.
3266 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3267 (arm_regs_info): New function.
3268 (the_low_target): Adjust.
3269 (initialize_low_arch): New function.
3270 * linux-m68k-low.c (tdesc_m68k): Declare.
3271 (target_regsets): Rename to ...
3272 (m68k_regsets): ... this, and make static.
3273 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3274 (m68k_regs_info): New function.
3275 (m68k_arch_setup): New function.
3276 (the_low_target): Adjust.
3277 (initialize_low_arch): New function.
3278 * linux-sh-low.c (tdesc_sharch): Declare.
3279 (target_regsets): Rename to ...
3280 (sh_regsets): ... this, and make static.
3281 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3282 (sh_regs_info, sh_arch_setup): New functions.
3283 (the_low_target): Adjust.
3284 (initialize_low_arch): New function.
3285 * linux-bfin-low.c (tdesc_bfin): Declare.
3286 (bfin_arch_setup): New function.
3287 (bfin_usrregs_info, regs_info): New globals.
3288 (bfin_regs_info): New function.
3289 (the_low_target): Adjust.
3290 (initialize_low_arch): New function.
3291 * linux-cris-low.c (tdesc_cris): Declare.
3292 (cris_arch_setup): New function.
3293 (cris_usrregs_info, regs_info): New globals.
3294 (cris_regs_info): New function.
3295 (the_low_target): Adjust.
3296 (initialize_low_arch): New function.
3297 * linux-cris-low.c (tdesc_crisv32): Declare.
3298 (cris_arch_setup): New function.
3299 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3300 (cris_regs_info): New function.
3301 (the_low_target): Adjust.
3302 (initialize_low_arch): New function.
3303 * linux-m32r-low.c (tdesc_m32r): Declare.
3304 (m32r_arch_setup): New function.
3305 (m32r_usrregs_info, regs_info): New globals.
3306 (m32r_regs_info): Adjust.
3307 (initialize_low_arch): New function.
3308 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3309 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3310 (tic6x_usrregs_info): Forward declare.
3311 (tic6x_read_description): New function, based on ...
3312 (tic6x_arch_setup): ... this. Reimplement.
3313 (target_regsets): Rename to ...
3314 (tic6x_regsets): ... this, and make static.
3315 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3316 (tic6x_regs_info): New function.
3317 (the_low_target): Adjust.
3318 (initialize_low_arch): New function.
3319 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3320 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3321 (target_regsets): Rename to ...
3322 (xtensa_regsets): ... this, and make static.
3323 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3324 globals.
3325 (xtensa_arch_setup, xtensa_regs_info): New functions.
3326 (the_low_target): Adjust.
3327 (initialize_low_arch): New function.
3328 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3329 (nios2_arch_setup): Set the current process'es tdesc.
3330 (target_regsets): Rename to ...
3331 (nios2_regsets): ... this.
3332 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3333 (nios2_regs_info): New function.
3334 (the_low_target): Adjust.
3335 (initialize_low_arch): New function.
3336 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3337 (aarch64_arch_setup): Set the current process'es tdesc.
3338 (target_regsets): Rename to ...
3339 (aarch64_regsets): ... this.
3340 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3341 (aarch64_regs_info): New function.
3342 (the_low_target): Adjust.
3343 (initialize_low_arch): New function.
3344 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3345 globals.
3346 (target_regsets): Rename to ...
3347 (tile_regsets): ... this.
3348 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3349 (tile_regs_info): New function.
3350 (tile_arch_setup): Set the current process'es tdesc.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * spu-low.c (tdesc_spu): Declare.
3354 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3355 * win32-arm-low.c (tdesc_arm): Declare.
3356 (arm_arch_setup): New function.
3357 (the_low_target): Install arm_arch_setup instead of
3358 init_registers_arm.
3359 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3360 (init_windows_x86): Rename to ...
3361 (i386_arch_setup): ... this. Set `win32_tdesc'.
3362 (the_low_target): Adjust.
3363 * win32-low.c (win32_tdesc): New global.
3364 (child_add_thread): Don't create the thread cache here.
3365 (do_initial_child_stuff): Set the new process'es tdesc.
3366 * win32-low.h (struct target_desc): Forward declare.
3367 (win32_tdesc): Declare.
3368 * lynx-i386-low.c (tdesc_i386): Declare global.
3369 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3370 * lynx-low.c (lynx_tdesc): New global.
3371 (lynx_add_process): Set the new process'es tdesc.
3372 * lynx-low.h (struct target_desc): Forward declare.
3373 (lynx_tdesc): Declare global.
3374 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3375 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3376 * nto-low.c (nto_tdesc): New global.
3377 (do_attach): Set the new process'es tdesc.
3378 * nto-low.h (struct target_desc): Forward declare.
3379 (nto_tdesc): Declare.
3380 * nto-x86-low.c (tdesc_i386): Declare.
3381 (nto_x86_arch_setup): Set `nto_tdesc'.
3382
3383 2013-06-04 Gary Benson <gbenson@redhat.com>
3384
3385 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3386 to qSupported response when appropriate.
3387 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3388 with nonzero-length annex.
3389 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3390 arguments supplied in annex.
3391
3392 2013-05-31 Doug Evans <dje@google.com>
3393
3394 PR server/15594
3395 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3396 64 bits in 64-cross-32 environment.
3397
3398 2013-05-28 Pedro Alves <palves@redhat.com>
3399
3400 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3401 (aarch64-without-fpu.c): Delete rule.
3402 * configure.srv (aarch64*-*-linux*): Remove references to
3403 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3404 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3405 declaration.
3406
3407 2013-05-24 Pedro Alves <palves@redhat.com>
3408
3409 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3410 instead of strchr/decode_address. Error if the range isn't split
3411 with a ','. Don't assume there's be a ':' in the action.
3412
3413 2013-05-23 Yao Qi <yao@codesourcery.com>
3414 Pedro Alves <palves@redhat.com>
3415
3416 * linux-low.c (lwp_in_step_range): New function.
3417 (linux_wait_1): If the thread was range stepping and stopped
3418 outside the stepping range, report the stop to GDB. Otherwise,
3419 continue stepping. Add range stepping debug output.
3420 (linux_set_resume_request): Copy the step range from the resume
3421 request to the lwp.
3422 (linux_supports_range_stepping): New.
3423 (linux_target_ops) <supports_range_stepping>: Set to
3424 linux_supports_range_stepping.
3425 * linux-low.h (struct linux_target_ops)
3426 <supports_range_stepping>: New field.
3427 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3428 * linux-x86-low.c (x86_supports_range_stepping): New.
3429 (the_low_target) <supports_range_stepping>: Set to
3430 x86_supports_range_stepping.
3431 * server.c (handle_v_cont): Handle 'r' action.
3432 (handle_v_requests): Append ";r" if the target supports range
3433 stepping.
3434 * target.h (struct thread_resume) <step_range_start,
3435 step_range_end>: New fields.
3436 (struct target_ops) <supports_range_stepping>:
3437 New field.
3438 (target_supports_range_stepping): New macro.
3439
3440 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3441
3442 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3443 confusion in comment.
3444
3445 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3446
3447 * lynx-low.c (struct process_info_private): New type.
3448 (lynx_add_process): New function.
3449 (lynx_create_inferior, lynx_attach): Replace calls to
3450 add_process by calls to lynx_add_process.
3451 (lynx_resume): If PTID is null, then try using
3452 current_process()->private->last_wait_event_ptid.
3453 Add comments.
3454 (lynx_clear_inferiors): Delete. The contents of that function
3455 has been inlined in lynx_mourn;
3456 (lynx_wait_1): Save the ptid in the process's private data.
3457 (lynx_mourn): Free the process' private data. Replace call
3458 to lynx_clear_inferiors by call to clear_inferiors.
3459
3460 2013-05-17 Yao Qi <yao@codesourcery.com>
3461
3462 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3463 the right place.
3464
3465 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3466
3467 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3468 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3469 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3470 PT_TEXT_END_ADDR guards. Update comments.
3471 (linux_target_op) <read_offsets>: Conditionally define to
3472 linux_read_offsets if the target is UCLIBC and if it defines
3473 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3474
3475 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3476 Andrew Jenner <andrew@codesourcery.com>
3477
3478 * Makefile.in (SFILES): Add linux-nios2-low.c.
3479 (clean): Add action to delete nios2-linux.c.
3480 (nios2-linux.c): New rule.
3481 * configure.srv: Add nios2*-*-linux*.
3482 * linux-nios2-low.c: New.
3483
3484 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3485
3486 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3487
3488 2013-04-25 Hui Zhu <hui@codesourcery.com>
3489
3490 PR gdb/15186
3491 * ax.c (ax_printf): Add fflush.
3492
3493 2013-04-22 Tom Tromey <tromey@redhat.com>
3494
3495 * Makefile.in (SFILES): Add filestuff.c.
3496 (OBS): Add filestuff.o.
3497 (filestuff.o): New target.
3498 * config.in, configure: Rebuild.
3499 * configure.ac: Check for fdwalk, pipe2.
3500
3501 2013-04-17 Pedro Alves <palves@redhat.com>
3502
3503 * configure.ac (USE_THREAD_DB): Delete variable.
3504 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3505 Don't AC_SUBST USE_THREAD_DB.
3506 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3507 * config.in, configure: Regenerate.
3508
3509 2013-04-16 Pedro Alves <palves@redhat.com>
3510
3511 * linux-low.h (struct lwp_info) <thread_known>: Move under
3512 the USE_THREAD_DB #ifdef.
3513
3514 2013-04-16 Pedro Alves <palves@redhat.com>
3515
3516 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3517 (linux-low.o): Delete rule.
3518 * linux-low.h: Always include "gdb_thread_db.h" instead of
3519 conditionally including thread_db.h.
3520 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3521 HAVE_THREAD_DB_H.
3522
3523 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3524
3525 * Makefile.in (install-only): Fix make install regression.
3526
3527 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3528
3529 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3530 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3531 installation.
3532 * gdbserver.1: Remove.
3533
3534 2013-03-22 Pedro Alves <palves@redhat.com>
3535
3536 * linux-low.c (handle_extended_wait): Don't call
3537 linux_enable_event_reporting.
3538
3539 2013-03-15 Tony Theodore <tonyt@logyst.com>
3540
3541 PR build/9098:
3542 * Makefile.in (SHELL): Use @SHELL@.
3543
3544 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3545
3546 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3547 compiler warning.
3548
3549 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3550
3551 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3552 Remove extraneous NULL element.
3553
3554 2013-03-13 Yao Qi <yao@codesourcery.com>
3555
3556 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3557 'V' block in trace frame.
3558
3559 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3560
3561 * target.h (struct target_ops): Add btrace ops.
3562 (target_supports_btrace): New macro.
3563 (target_enable_btrace): New macro.
3564 (target_disable_btrace): New macro.
3565 (target_read_btrace): New macro.
3566 * gdbthread.h (struct thread_info): Add btrace field.
3567 * server.c: Include btrace-common.h.
3568 (handle_btrace_general_set): New function.
3569 (handle_btrace_enable): New function.
3570 (handle_btrace_disable): New function.
3571 (handle_general_set): Call handle_btrace_general_set.
3572 (handle_qxfer_btrace): New function.
3573 (struct qxfer qxfer_packets[]): Add btrace entry.
3574 * inferiors.c (remove_thread): Disable btrace.
3575 * linux-low: Include linux-btrace.h.
3576 (linux_low_enable_btrace): New function.
3577 (linux_low_read_btrace): New function.
3578 (linux_target_ops): Add btrace ops.
3579 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3580 Add srv_linux_btrace=yes.
3581 (x86_64-*-linux*): Add linux-btrace.o.
3582 Add srv_linux_btrace=yes.
3583 * configure.ac: Define HAVE_LINUX_BTRACE.
3584 * config.in: Regenerated.
3585 * configure: Regenerated.
3586
3587 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3588
3589 * server.c (handle_qxfer): Preserve error message if -3 is
3590 returned.
3591 (qxfer): Document the -3 return value.
3592
3593 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3594
3595 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3596 (linux_btrace_h): New variable.
3597 (linux-btrace.o): New rule.
3598
3599 2013-03-08 Stan Shebs <stan@codesourcery.com>
3600 Hafiz Abid Qadeer <abidh@codesourcery.com>
3601
3602 * tracepoint.c (trace_buffer_size): New global.
3603 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3604 (init_trace_buffer): Change to one-argument function. Allocate
3605 trace buffer memory.
3606 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3607 handle QTBuffer:size packet.
3608 (cmd_bigqtbuffer_size): New function.
3609 (initialize_tracepoint): Call init_trace_buffer with
3610 DEFAULT_TRACE_BUFFER_SIZE.
3611 * server.c (handle_query): Add QTBuffer:size in the
3612 supported packets.
3613
3614 2013-03-07 Yao Qi <yao@codesourcery.com>
3615
3616 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3617 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3618 of -1.
3619 (cmd_qtsp): Adjust condition. Do post increment.
3620 Set cur_action and cur_step_action back to 0.
3621
3622 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3623
3624 PR server/15236
3625 * linux-low.c (linux_write_memory): Return early success if LEN is
3626 zero.
3627
3628 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3629
3630 * configure.srv: Add x86_64-*-cygwin* as target.
3631
3632 2013-02-28 Tom Tromey <tromey@redhat.com>
3633
3634 * configure.ac: Invoke AC_SYS_LARGEFILE.
3635 * configure, config.in: Rebuild.
3636
3637 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3638
3639 * win32-low.c: Throughout, fix format strings and casts of
3640 printf-like functions to avoid type related warnings on all
3641 platforms.
3642 (get_child_debug_event): Print dwDebugEventCode as hex since
3643 that's how it's usually documented.
3644
3645 2013-02-28 Yao Qi <yao@codesourcery.com>
3646
3647 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3648 pulongest.
3649
3650 2013-02-27 Jiong Wang <jiwang@tilera.com>
3651
3652 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3653 (reg-tilegx32.c): New rule.
3654 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3655 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3656 different register info initializer according to elf class.
3657 (init_registers_tilgx32): New function. The tilegx32 register info
3658 initializer.
3659 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3660 (tile_store_gregset): Likewise.
3661
3662 2013-02-27 Yao Qi <yao@codesourcery.com>
3663
3664 * server.c (process_point_options): Print debug message when
3665 debug_threads is true.
3666
3667 2013-02-26 Yao Qi <yao@codesourcery.com>
3668
3669 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3670
3671 2013-02-19 Pedro Alves <palves@redhat.com>
3672 Kai Tietz <ktietz@redhat.com>
3673
3674 PR gdb/15161
3675
3676 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3677 instead of strtoul to extract address from packet.
3678 (process_serial_event) <'z'>: Likewise.
3679
3680 2013-02-18 Yao Qi <yao@codesourcery.com>
3681
3682 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3683
3684 2013-02-14 Pedro Alves <palves@redhat.com>
3685
3686 Plug memory leak.
3687
3688 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3689 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3690
3691 2013-02-14 Pedro Alves <palves@redhat.com>
3692
3693 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3694
3695 2013-02-14 Pedro Alves <palves@redhat.com>
3696
3697 * tracepoint.c (save_string): Delete.
3698 (add_tracepoint_action): Use savestring instead of save_string.
3699
3700 2013-02-12 Pedro Alves <palves@redhat.com>
3701
3702 * linux-xtensa-low.c: Ditto.
3703 * xtensa-xtregs.c: Ditto.
3704
3705 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3706
3707 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3708 thread_db.
3709
3710 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3711
3712 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3713 aarch64_num_wp_regs and aarch64_num_bp_regs to
3714 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3715
3716 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3717
3718 * linux-aarch64-low.c (ps_get_thread_area): Replace
3719 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3720
3721 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3722 Marcus Shawcroft <marcus.shawcroft@arm.com>
3723 Nigel Stephens <nigel.stephens@arm.com>
3724 Yufeng Zhang <yufeng.zhang@arm.com>
3725
3726 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3727 (aarch64.c, aarch64-without-fpu.c): New targets.
3728 * configure.srv (aarch64*-*-linux*): New.
3729 * linux-aarch64-low.c: New file.
3730
3731 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3732
3733 * linux-low.c (handle_extended_wait, linux_create_inferior)
3734 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3735 (dequeue_one_deferred_signal, linux_resume_one_thread)
3736 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3737 (linux_tracefork_grandchild, linux_test_for_tracefork)
3738 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3739 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3740 where the argument is 0.
3741
3742 2013-01-25 Yao Qi <yao@codesourcery.com>
3743
3744 * event-loop.c: Include "queue.h".
3745 (gdb_event_p): New typedef.
3746 (struct gdb_event) <next_event>: Remove.
3747 (event_queue): Change to QUEUE(gdb_event_p).
3748 (async_queue_event): Remove.
3749 (gdb_event_xfree): New.
3750 (initialize_event_loop): New.
3751 (process_event): Use API from QUEUE.
3752 (wait_for_event): Likewise.
3753 * server.c (main): Call initialize_event_loop.
3754 * server.h (initialize_event_loop): Declare.
3755
3756 2013-01-18 Yao Qi <yao@codesourcery.com>
3757
3758 * ax.h (struct eval_agent_expr_context): New.
3759 (gdb_eval_agent_expr): Update declaration.
3760 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3761 TFRAME. Add new argument CTX.
3762 * server.h (struct eval_agent_expr_context): Declare.
3763 (agent_mem_read, agent_tsv_read): Update declaration.
3764 (agent_mem_read_string): Likewise.
3765 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3766 (add_traceframe_block): Add new argument TPOINT.
3767 Increase TPOINT->traceframe_usage.
3768 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3769 eval_tracepoint_agent_expr.
3770 (condition_true_at_tracepoint): Likewise.
3771 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3772 (agent_mem_read_string, agent_tsv_read): Likewise.
3773
3774 2013-01-16 Yao Qi <yao@codesourcery.com>
3775
3776 * linux-low.c (linux_resume_one_lwp): Don't check
3777 'lwp->bp_reinsert != 0'.
3778
3779 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3780 Pedro Alves <palves@redhat.com>
3781
3782 * lynx-low.c (ptrace_request_to_str): Define a temporary
3783 macro and use it to simplify this function's implementation.
3784
3785 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3786
3787 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3788 sets errno.
3789
3790 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3791
3792 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3793
3794 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3795
3796 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3797
3798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3799
3800 * lynx-low.c (lynx_resume): Use the resume_info parameter
3801 to determine the ptid for the lynx_ptrace call, unless
3802 it is equal to minus_one_ptid, in which case we use the
3803 ptid of the current_inferior.
3804 (lynx_wait_1): After having received a thread create/exit
3805 event, resume the inferior's execution using the signaling
3806 thread's ptid, rather than the old ptid.
3807
3808 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3809
3810 * lynx-low.c (lynx_resume): Delete variable ret.
3811
3812 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3813
3814 * gdbreplay.c (gdbreplay_version): Update copyright year.
3815 * server.c (gdbserver_version): Likewise.
3816
3817 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3818
3819 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3820 new thread.
3821
3822 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3823
3824 * lynx-low.c (ptrace_request_to_str): Add handling for
3825 PTRACE_GETTRACESIG.
3826
3827 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3828
3829 * lynx-low.c (lynx_attach): Delete variable new_process.
3830
3831 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3832
3833 * lynx-low.c (lynx_create_inferior): Delete variable
3834 new_process.
3835
3836 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3837
3838 * lynx-low.c (ptrace_request_to_str): Do not handle
3839 PTRACE_GETTHREADLIST if this macro does not exist.
3840
3841 2012-12-15 Yao Qi <yao@codesourcery.com>
3842
3843 * Makefile.in (OBS): Add notif.o.
3844 * notif.c, notif.h: New.
3845 * server.c: Include "notif.h".
3846 (struct vstop_notif) <next>: Remove.
3847 <base>: New field.
3848 (queue_stop_reply): Update.
3849 (push_event, send_next_stop_reply): Remove.
3850 (discard_queued_stop_replies): Update.
3851 (notif_stop): New variable.
3852 (handle_v_stopped): Remove.
3853 (handle_v_requests): Don't call handle_v_stopped. Call
3854 handle_ack_notif instead.
3855 (queue_stop_reply_callback): Call notif_event_enque instead
3856 of queue_stop_reply.
3857 (handle_status): Don't call send_next_stop_reply, call
3858 notif_write_event instead.
3859 (kill_inferior_callback): Likewise.
3860 (detach_or_kill_inferior_callback): Likewise.
3861 (main): Call initialize_notif.
3862 (process_serial_event): Call QUEUE_is_empty.
3863 (handle_target_event): Call notif_push instead of push event.
3864 * server.h (push_event): Remove declaration.
3865
3866 2012-12-10 Tom Tromey <tromey@redhat.com>
3867
3868 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3869 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3870 macros.
3871 (.c.o): Rewrite.
3872 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3873 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3874 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3875 (amd64-linux-ipa.o, ax.o): Rewrite.
3876 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3877 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3878 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3879 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3880 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3881 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3882 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3883 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3884 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3885 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3886 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3887 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3888 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3889 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3890 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3891 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3892 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3893 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3894 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3895 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3896 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3897 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3898 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3899 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3900 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3901 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3902 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3903 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3904 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3905 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3906 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3907 (reg-tilegx.o): Remove.
3908 (all_object_files): New macro.
3909 Include .deps files.
3910 * aclocal.m4, configure: Rebuild.
3911 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3912 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3913 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3914
3915 2012-12-05 Tom Tromey <tromey@redhat.com>
3916
3917 PR gdb/14917:
3918 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3919
3920 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3921
3922 * configure.ac: Check for linux/perf_event.h.
3923 * config.in: Regenerated.
3924 * configure: Regenerated.
3925
3926 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3927
3928 * hostio.c (handle_readlink): Decrease buffer size
3929 parameter passed to readlink by one byte.
3930
3931 2012-11-26 Yao Qi <yao@codesourcery.com>
3932
3933 * configure.ac (build_warnings): Append '-Wempty-body'.
3934 * configure: Regenerated.
3935 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3936 body.
3937
3938 2012-11-15 Pierre Muller <muller@sourceware.org>
3939
3940 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3941 * config.in: Regenerate.
3942 * configure: Regenerate.
3943 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3944 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3945 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3946 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3947 header.
3948 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3949 instead of <sys/wait.h> header.
3950 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3951
3952 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3953
3954 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3955 (various make rules): Remove -DGDBSERVER
3956
3957 2012-11-09 Yao Qi <yao@codesourcery.com>
3958
3959 * spu-low.c (current_ptid): Move it to ..
3960 * gdbthread.h: ... here. New.
3961 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3962 * server.c (myresume, process_serial_event): Likewise.
3963 * thread-db.c (thread_db_find_new_threads): Likewise.
3964 * tracepoint.c (run_inferior_command): Likewise.
3965
3966 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3967
3968 * server.c (handle_search_memory_1): Include access length in
3969 warning message.
3970
3971 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3972
3973 * linux-crisv32-low.c: Fix compile errors.
3974
3975 2012-09-04 Yao Qi <yao@codesourcery.com>
3976
3977 * tracepoint.c (cmd_qtsv): Adjust debug message.
3978 Don't check CUR_TPOINT.
3979
3980 2012-08-28 Yao Qi <yao@codesourcery.com>
3981
3982 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3983 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3984 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3985 Remove declarations of xmalloc, xreallloc, xstrdup and
3986 freeargv.
3987 * Makefile.in (libiberty_h): New.
3988 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3989 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3990
3991 2012-08-23 Yao Qi <yao@codesourcery.com>
3992
3993 * server.h: Remove declaration of 'xsnprintf'.
3994
3995 2012-08-22 Keith Seitz <keiths@redhat.com>
3996
3997 * server.h: Include build-gnulib-gbserver/config.h.
3998 * gdbreplay.c: Likewise.
3999
4000 2012-08-08 Doug Evans <dje@google.com>
4001
4002 * Makefile.in (SFILES): Add gdb_vecs.c.
4003 (OBS): Add gdb_vecs.o.
4004 (gdb_vecs_h, host_defs_h): New variables.
4005 (thread-db.o): Add $(gdb_vecs_h) dependency.
4006 (gdb_vecs.o): New rule.
4007 * thread-db.c: #include "gdb_vecs.h".
4008 (thread_db_load_search): Use a vector to iterate over path elements.
4009 Handle text appearing after "$pdir".
4010
4011 * configure.ac: Add check for strstr.
4012 * config.in: Regenerate.
4013 * configure: Regenerate.
4014
4015 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4016
4017 * hostio.c (handle_pread): If pread fails, fall back to attempting
4018 lseek/read.
4019 (handle_pwrite): Likewise for pwrite.
4020
4021 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4022
4023 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4024 between unsupported TYPE and unimplementable ADDR/LEN combination.
4025 (arm_insert_point): Act on new return value.
4026
4027 2012-07-31 Pedro Alves <palves@redhat.com>
4028
4029 * server.c (process_point_options): Only skip tokens if we find
4030 one that is unrecognized. Don't treat 'X' specially while
4031 skipping unrecognized tokens.
4032
4033 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4034
4035 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4036 to 4-byte-align HW breakpoint addresses for Thumb.
4037
4038 2012-07-27 Yao Qi <yao@codesourcery.com>
4039
4040 PR remote/14161.
4041
4042 * server.h: Declare gdb_agent_about_to_close.
4043 * target.c (kill_inferior): Include "agent.h".
4044 New. Send command 'kill'.
4045 * target.h (kill_inferior): Removed macro.
4046 * tracepoint.c (gdb_agent_about_to_close): New.
4047 (gdb_agent_helper_thread): Handle command 'close'.
4048 Wait endlessly until the inferior stops.
4049 Install gdb_agent_remove_socket to atexit hook.
4050 (agent_socket_name): New static variable.
4051 (gdb_agent_socket_init): Replace local variable 'name' with
4052 'agent_socket_name'.
4053 (gdb_agent_remove_socket): New.
4054
4055 2012-07-27 Yao Qi <yao@codesourcery.com>
4056
4057 * server.c (process_point_options): Stop at 'X' when parsing.
4058
4059 2012-07-19 Michael Eager <eager@eagercon.com>
4060
4061 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4062 to hw_execute.
4063 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4064 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4065 hardware breakpoint.
4066
4067 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4068
4069 * gdbserver/linux-low.c (initialize_low): Call
4070 linux_ptrace_init_warnings.
4071
4072 2012-07-02 Doug Evans <dje@google.com>
4073
4074 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4075 pointer to int.
4076
4077 2012-07-02 Stan Shebs <stan@codesourcery.com>
4078
4079 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4080 (ax.o): Add it to build rule.
4081 (ax-ipa.o): Ditto.
4082 (OBS): Add format.o.
4083 (IPA_OBS): Add format.o.
4084 * server.c (handle_query): Claim support for breakpoint commands.
4085 (process_point_options): Add command case.
4086 (process_serial_event): Leave running if there are printfs in
4087 effect.
4088 * mem-break.h (any_persistent_commands): Declare.
4089 (add_breakpoint_commands): Declare.
4090 (gdb_no_commands_at_breakpoint): Declare.
4091 (run_breakpoint_commands): Declare.
4092 * mem-break.c (struct point_command_list): New struct.
4093 (struct breakpoint): New field command_list.
4094 (any_persistent_commands): New function.
4095 (add_commands_to_breakpoint): New function.
4096 (add_breakpoint_commands): New function.
4097 (gdb_no_commands_at_breakpoint): New function.
4098 (run_breakpoint_commands): New function.
4099 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4100 locally.
4101 * ax.c: Include format.h.
4102 (ax_printf): New function.
4103 (gdb_eval_agent_expr): Add printf opcode.
4104
4105 2012-06-13 Yao Qi <yao@codesourcery.com>
4106
4107 * server.c (start_inferior): Remove duplicated writes to fields
4108 'last_resume_kind' and 'last_status' of 'current_inferior'.
4109
4110 2012-06-12 Yao Qi <yao@codesourcery.com>
4111 Pedro Alves <palves@redhat.com>
4112
4113 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4114 comment.
4115 * server.c (handle_v_cont): Extend comment.
4116
4117 2012-06-11 Yao Qi <yao@codesourcery.com>
4118
4119 * linux-low.c (linux_attach): Add 'static'.
4120
4121 2012-06-06 Yao Qi <yao@codesourcery.com>
4122
4123 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4124
4125 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4126
4127 Fix gcc -flto compilation warning.
4128 * server.c (main): Make variable multi_mode and attach volatile.
4129
4130 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4131
4132 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4133 if the platform doesn't know about it.
4134
4135 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4136
4137 * Makefile.in (SFILES): Add linux-tile-low.c.
4138 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4139 * configure.srv: Handle tilegx-*-linux*.
4140 * linux-tile-low.c: New file.
4141
4142 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4143
4144 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4145
4146 2012-05-24 Pedro Alves <palves@redhat.com>
4147
4148 PR gdb/7205
4149
4150 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4151
4152 2012-05-24 Pedro Alves <palves@redhat.com>
4153
4154 PR gdb/7205
4155
4156 Replace target_signal with gdb_signal throughout.
4157
4158 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4159
4160 * linux-low.c (linux_store_registers): Avoid the copying sequence
4161 when no data has been retrieved by ptrace.
4162
4163 2012-05-22 Will Deacon <will.deacon@arm.com>
4164
4165 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4166 Include asm/ptrace.h.
4167 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4168 already defined.
4169
4170 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4171
4172 * linux-low.c (linux_store_registers): Don't re-retrieve data
4173 with ptrace that has already been obtained from /proc. Always
4174 copy any data retrieved with ptrace to the buffer supplied.
4175
4176 2012-05-11 Yao Qi <yao@codesourcery.com>
4177 Pedro Alves <palves@redhat.com>
4178
4179 * linux-low.c (enum stopping_threads_kind): New.
4180 (stopping_threads): Change type to `enum stopping_threads_kind'.
4181 (handle_extended_wait): If stopping and suspending threads, leave
4182 the new_lwp suspended too.
4183 (linux_wait_for_event): Adjust.
4184 (stop_all_lwps): Set `stopping_threads' to
4185 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4186 whether we're suspending threads or just stopping them. Assert no
4187 recursion happens.
4188
4189 2012-04-29 Yao Qi <yao@codesourcery.com>
4190
4191 * server.h: Move some code to ...
4192 * gdbthread.h: ... here. New.
4193 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4194 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4195 (nto-low.o, win32-low.o): Likewise.
4196 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4197 * regcache.c, remote-utils.c, server.c: Likewise.
4198 * target.c, tracepoint.c, win32-low.c: Likewise.
4199
4200 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4201
4202 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4203 (PTRACE_ARG4_TYPE): Likewise.
4204 (PTRACE_XFER_TYPE): Likewise.
4205 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4206 ptrace to PTRACE_ARG3_TYPE.
4207 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4208 (PTRACE_ARG4_TYPE): Likewise.
4209 (PTRACE_XFER_TYPE): Likewise.
4210 (linux_detach_one_lwp): Cast fourth argument of
4211 ptrace to long then PTRACE_ARG4_TYPE.
4212 (regsets_fetch_inferior_registers): Cast third argument of
4213 ptrace to long then PTRACE_ARG3_TYPE.
4214 (regsets_store_inferior_registers): Likewise.
4215
4216 2012-04-20 Pedro Alves <palves@redhat.com>
4217
4218 * configure: Regenerate.
4219
4220 2012-04-19 Pedro Alves <palves@redhat.com>
4221
4222 * Makefile.in (GNULIB_BUILDDIR): New.
4223 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4224 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4225 (all, install-only, uninstall, clean-info, all-lib, clean): No
4226 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4227 (maintainer-clean realclean distclean): Use subdir_do.
4228 (subdir_do): New.
4229 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4230 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4231 * acinclude.m4: Include acx_configure_dir.m4.
4232 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4233 calls. Call AC_PROG_RANLIB. Configure gnulib using
4234 ACX_CONFIGURE_DIR.
4235 (GNULIB): New.
4236 (GNULIB_STDINT_H): Adjust.
4237 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4238 * gdbreplay.c: Include build-gnulib/config.h.
4239 * server.h: Likewise.
4240 * aclocal.m4: Regenerate.
4241 * config.in: Regenerate.
4242 * configure: Regenerate.
4243
4244 2012-04-19 Pedro Alves <palves@redhat.com>
4245
4246 * Makefile.in (LIBGNU, INCGNU): Adjust.
4247 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4248 (all, install-only, uninstall, clean-info, all-lib, clean)
4249 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4250 * configure.ac: Adjust AC_OUTPUT output.
4251 * aclocal.m4: Regenerate.
4252 * configure: Regenerate.
4253
4254 2012-04-19 Pedro Alves <palves@redhat.com>
4255
4256 * Makefile.in (generated_files): New.
4257 (server_h): Remove the explicit dependency on config.h, and depend
4258 on $generated_files.
4259
4260 2012-04-19 Pedro Alves <palves@redhat.com>
4261
4262 * Makefile.in (INCGNU): Add -Ignulib.
4263
4264 2012-04-19 Pedro Alves <palves@redhat.com>
4265
4266 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4267 (INCGNU): ... this, and spell out -I here.
4268 (GNULIB_LIB): Rename to ...
4269 (LIBGNU): ... this.
4270 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4271
4272 2012-04-19 Pedro Alves <palves@redhat.com>
4273
4274 * config.in: Regenerate.
4275
4276 2012-04-19 Pedro Alves <palves@redhat.com>
4277
4278 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4279 * server.h (memmem): Remove declaration.
4280 * config.in: Regenerate.
4281 * configure: Regenerate.
4282
4283 2012-04-19 Yao Qi <yao@codesourcery.com>
4284
4285 * Makefile.in (SFILES): Add common/vec.c.
4286 (OBS): Add vec.o.
4287 (vec.o): New rule.
4288
4289 2012-04-19 Yao Qi <yao@codesourcery.com>
4290
4291 * remote-utils.c (prepare_resume_reply): Replace with macro
4292 target_core_of_thread.
4293 * server.c (handle_qxfer_threads_proper): Likewise.
4294 * target.h (traget_core_of_thread): New macro.
4295
4296 2012-04-18 Pedro Alves <palves@redhat.com>
4297
4298 * aclocal.m4: Regenerate.
4299 * configure: Regenerate.
4300
4301 2012-04-16 Yao Qi <yao@codesourcery.com>
4302
4303 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4304 duplicated on address.
4305
4306 2012-04-16 Yao Qi <yao@codesourcery.com>
4307
4308 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4309 (struct tracepoint_action_ops) <send>: New field.
4310 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4311 (agent_expr_send, x_tracepoint_action_send): New.
4312 (l_tracepoint_action_send): New.
4313 (cmd_qtdp): Download and install tracepoint
4314 according to `use_agent'.
4315 (run_inferior_command): Add one more parameter `len'.
4316 Update callers.
4317 (tracepoint_send_agent): New.
4318 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4319
4320 2012-04-16 Yao Qi <yao@codesourcery.com>
4321
4322 * tracepoint.c (download_tracepoints): Moved to ...
4323 (cmd_qtstart): ... here.
4324
4325 2012-04-14 Yao Qi <yao@codesourcery.com>
4326
4327 * tracepoint.c: Include inttypes.h.
4328 (struct collect_memory_action): Use sized types.
4329 (struct tracepoint): Likewise.
4330 (cmd_qtdp, stop_tracing): Update print specifiers.
4331 (cmd_qtp, response_tracepoint): Likewise.
4332 (collect_data_at_tracepoint): Likewise.
4333 (collect_data_at_step): Likewise.
4334
4335 2012-04-14 Yao Qi <yao@codesourcery.com>
4336
4337 Import gnulib module inttypes.
4338 * aclocal.m4, config.in, configure: Regenerated.
4339
4340 2012-04-14 Yao Qi <yao@codesourcery.com>
4341
4342 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4343 Makefile and config.status at last.
4344
4345 2012-04-13 Yao Qi <yao@codesourcery.com>
4346
4347 * tracepoint.c: Include stdint.h unconditionally.
4348
4349 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4350
4351 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4352 on BFD_HAVE_SYS_PROCFS_TYPE.
4353 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4354 * configure: Regenerate.
4355 * config.in: Likewise.
4356
4357 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4358
4359 * Makefile.in (clean): Also remove x32.c x32-linux.c
4360 x32-avx.c x32-avx-linux.c.
4361 (x32.o): New target.
4362 (x32.c): Likewise.
4363 (x32-linux.o): Likewise.
4364 (x32-linux.c): Likewise.
4365 (x32-avx.o): Likewise.
4366 (x32-avx.c): Likewise.
4367 (x32-avx-linux.o): Likewise.
4368 (x32-avx-linux.c): Likewise.
4369
4370 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4371 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4372 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4373 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4374 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4375 i386/x32-avx-linux.xml.
4376
4377 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4378 (init_registers_x32_avx_linux): Likwise.
4379 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4380 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4381
4382 2012-04-13 Pedro Alves <palves@redhat.com>
4383
4384 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4385 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4386 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4387 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4388 the sub-make.
4389
4390 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4391
4392 * linux-x86-low.c (compat_x32_clock_t): New.
4393 (compat_x32_siginfo_t): Likewise.
4394 (compat_x32_siginfo_from_siginfo): Likewise.
4395 (siginfo_from_compat_x32_siginfo): Likewise.
4396 (linux_is_elf64): Likewise.
4397 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4398 and siginfo_from_compat_x32_siginfo for x32.
4399 (x86_arch_setup): Set linux_is_elf64.
4400
4401 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4402
4403 PR gdb/13969
4404 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4405 e_machine field.
4406 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4407 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4408 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4409 compatible with process.
4410
4411 2012-04-12 Yao Qi <yao@codesourcery.com>
4412
4413 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4414 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4415 (install-only, install-info, clean): Handle sub dir gnulib.
4416 (all-lib, am--refresh): New targets.
4417 (memmem.o): Remove target.
4418 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4419 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4420 (AC_REPLACE_FUNCS): Remove memmem.
4421 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4422 (AC_OUTPUT): Generate Makefile in gnulib/.
4423 * aclocal.m4, config.in, configure: Regenerated.
4424
4425 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4426
4427 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4428
4429 2012-04-05 Pedro Alves <palves@redhat.com>
4430
4431 -Werror=strict-aliasing
4432
4433 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4434 pointer.
4435
4436 2012-04-04 Pedro Alves <palves@redhat.com>
4437
4438 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4439 (sparc_store_gregset_from_stack, sparc_store_gregset)
4440 (sparc_breakpoint_at): Fix formatting.
4441
4442 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4443
4444 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4445 are available.
4446 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4447 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4448 * config.in: Regenerate.
4449 * configure: Likewise.
4450
4451 2012-03-29 Pedro Alves <palves@redhat.com>
4452
4453 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4454 Correct ptrace arguments.
4455
4456 2012-03-28 Pedro Alves <palves@redhat.com>
4457
4458 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4459 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4460 (IA64_FR1_REGNUM): New defines.
4461 (ia64_fetch_register): New.
4462 (the_low_target): Install it.
4463 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4464 field.
4465 * linux-low.c (linux_fetch_registers): Try the
4466 the_low_target.fetch_register hook first.
4467
4468 * linux-arm-low.c (the_low_target): Adjust.
4469 * linux-bfin-low.c (the_low_target): Adjust.
4470 * linux-cris-low.c (the_low_target): Adjust.
4471 * linux-crisv32-low.c (the_low_target): Adjust.
4472 * linux-m32r-low.c (the_low_target): Adjust.
4473 * linux-m68k-low.c (the_low_target): Adjust.
4474 * linux-mips-low.c (the_low_target): Adjust.
4475 * linux-ppc-low.c (the_low_target): Adjust.
4476 * linux-s390-low.c (the_low_target): Adjust.
4477 * linux-sh-low.c (the_low_target): Adjust.
4478 * linux-sparc-low.c (the_low_target): Adjust.
4479 * linux-tic6x-low.c (the_low_target): Adjust.
4480 * linux-x86-low.c (the_low_target): Adjust.
4481 * linux-xtensa-low.c (the_low_target): Adjust.
4482
4483 2012-03-26 Pedro Alves <palves@redhat.com>
4484
4485 * server.c (handle_qxfer_libraries): Don't bail early if
4486 the_target->qxfer_libraries_svr4 is not NULL.
4487
4488 2012-03-26 Pedro Alves <palves@redhat.com>
4489
4490 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4491
4492 2012-03-23 Pedro Alves <palves@redhat.com>
4493
4494 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4495 "library-list-svr4" element's start tag when the the DSO list is
4496 empty.
4497
4498 2012-03-23 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4501 a variable whose type size is the same as the inferior's pointer
4502 size.
4503
4504 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4505
4506 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4507 struct siginfo.
4508 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4509 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4510 * linux-low.h: Include <signal.h>.
4511 (struct siginfo): Remove forward declaration.
4512 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4513 struct siginfo.
4514
4515 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4516
4517 * .gitignore: Ignore more files.
4518
4519 2012-03-19 Pedro Alves <palves@redhat.com>
4520 Jan Kratochvil <jan.kratochvil@redhat.com>
4521
4522 * server.c (cont_thread, general_thread): Add describing comments.
4523 (start_inferior): Clear `cont_thread'.
4524 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4525 of a process.
4526
4527 2012-03-15 Yao Qi <yao@codesourcery.com>
4528
4529 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4530 handling to ...
4531 (cmd_qtdp): ... here.
4532
4533 2012-03-15 Yao Qi <yao@codesourcery.com>
4534
4535 * tracepoint.c (struct tracepoint_action_ops): New.
4536 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4537 (m_tracepoint_action_download): New.
4538 (r_tracepoint_action_download): New.
4539 (x_tracepoint_action_download): New.
4540 (l_tracepoint_action_download): New.
4541 (add_tracepoint_action): Install `action->ops' according type.
4542 (download_tracepoint_1): Move code `download' function pointer
4543 of various tracepoint_action_ops.
4544
4545 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4546
4547 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4548 linux_ptrace_attach_warnings.
4549
4550 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4551
4552 * Makefile.in (linux-ptrace.o): New.
4553 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4554 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4555 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4556 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4557 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4558 of these targets.
4559 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4560
4561 2012-03-08 Yao Qi <yao@codesourcery.com>
4562 Pedro Alves <palves@redhat.com>
4563
4564 Fix PR server/13392.
4565 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4566 offset of JMP insn.
4567 * tracepoint.c (remove_tracepoint): New.
4568 (cmd_qtdp): Call remove_tracepoint when failed to install.
4569
4570 2012-03-07 Pedro Alves <palves@redhat.com>
4571
4572 * linux-low.c (get_detach_signal): New.
4573 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4574 Pass on pending signals to PTRACE_DETACH. Check the result of the
4575 ptrace call.
4576 * server.c (program_signals, program_signals_p): New.
4577 (handle_general_set): Handle QProgramSignals.
4578 * server.h (program_signals, program_signals_p): Declare.
4579
4580 2012-03-05 Pedro Alves <palves@redhat.com>
4581 Jan Kratochvil <jan.kratochvil@redhat.com>
4582
4583 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4584 New comment why.
4585
4586 2012-03-03 Yao Qi <yao@codesourcery.com>
4587
4588 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4589 agent_look_up_symbols.
4590
4591 2012-03-03 Yao Qi <yao@codesourcery.com>
4592
4593 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4594 (linux-x86-low.o): Likewise.
4595 * server.h: Remove in_process_agent_loaded.
4596 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4597 common/agent.c.
4598 Update callers.
4599
4600 2012-03-03 Yao Qi <yao@codesourcery.com>
4601
4602 * tracepoint.c (gdb_agent_capability): New global.
4603 (in_process_agent_loaded_ust): Renamed to
4604 `in_process_agent_supports_ust'.
4605 Update callers.
4606 (in_process_agent_supports_ust): Call agent_capability_check.
4607 (clear_installed_tracepoints): Assert that agent supports
4608 agent.
4609
4610 2012-03-03 Yao Qi <yao@codesourcery.com>
4611
4612 * linux-low.c (linux_supports_agent): New.
4613 (linux_target_ops): Initialize field `supports_agent' with
4614 linux_supports_agent.
4615 * target.h (struct target_ops) <supports_agent>: New.
4616 (target_supports_agent): New macro.
4617 * server.c (handle_general_set): Handle packet 'QAgent'.
4618 (handle_query): Send `QAgent+'.
4619 * Makefile.in (server.o): Depends on agent.h.
4620
4621 2012-03-03 Yao Qi <yao@codesourcery.com>
4622
4623 * Makefile.in (OBS): Add agent.o.
4624 Add new rule for agent.o.
4625 Track dependence of tracepoint.c on agent.h.
4626 * tracepoint.c (run_inferior_command_1):
4627 (run_inferior_command): Call agent_run_command.
4628 (gdb_ust_connect_sync_socket): Deleted. Move it to
4629 common/agent.c.
4630 (resume_thread, stop_thread): Likewise.
4631 (gdb_ust_socket_init): Renamed to ...
4632 (gdb_agent_socket_init): ... New.
4633 (gdb_ust_thread): Renamed to ...
4634 (gdb_agent_helper_thread): ... New.
4635 (gdb_ust_init): Move some code to ...
4636 (gdb_agent_init): ... here. New.
4637 [HAVE_UST]: Call gdb_ust_init.
4638 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4639 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4640 * config.in, configure: Regenerated.
4641
4642 2012-03-02 Pedro Alves <palves@redhat.com>
4643
4644 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4645 * linux-low.c (struct simple_pid_list): New.
4646 (stopped_pids): New a struct simple_pid_list pointer.
4647 (add_to_pid_list, pull_pid_from_list): New.
4648 (handle_extended_wait): Don't assume the first signal new children
4649 report is SIGSTOP. Adjust call to pull_pid_from_list.
4650 (linux_wait_for_lwp): Adjust.
4651
4652 2012-03-02 Yao Qi <yao@codesourcery.com>
4653
4654 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4655 debug log.
4656
4657 2012-03-02 Yao Qi <yao@codesourcery.com>
4658
4659 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4660 `stop_pc' and `tpoint'. Update caller.
4661
4662 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4663
4664 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4665 * linux-low.c (use_linux_regsets): New macro.
4666 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4667 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4668 (linux_register_in_regsets): New function.
4669 (usr_fetch_inferior_registers): Skip registers covered by
4670 regsets.
4671 (usr_store_inferior_registers): Likewise.
4672 (usr_fetch_inferior_registers): New macro.
4673 (usr_store_inferior_registers): Likewise.
4674 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4675 (linux_store_registers): Likewise.
4676 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4677 prototype.
4678 (init_registers_mips64_dsp_linux): Likewise.
4679 (init_registers_mips_linux): New macro.
4680 (init_registers_mips_dsp_linux): Likewise.
4681 (mips_dsp_num_regs): Likewise.
4682 (DSP_BASE, DSP_CONTROL): New fallback macros.
4683 (mips_base_regs): New macro.
4684 (mips_regmap): Use it. Fix the size.
4685 (mips_dsp_regmap): New variable.
4686 (mips_dsp_regset_bitmap): Likewise.
4687 (mips_arch_setup): New function.
4688 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4689 than mips_regmap.
4690 (mips_cannot_store_register): Likewise.
4691 (the_low_target): Update .arch_setup, .num_regs and .regmap
4692 initializers. Add .regset_bitmap initializer.
4693 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4694 initializer.
4695 * linux-bfin-low.c (the_low_target): Likewise.
4696 * linux-cris-low.c (the_low_target): Likewise.
4697 * linux-crisv32-low.c (the_low_target): Likewise.
4698 * linux-ia64-low.c (the_low_target): Likewise.
4699 * linux-m32r-low.c (the_low_target): Likewise.
4700 * linux-m68k-low.c (the_low_target): Likewise.
4701 * linux-ppc-low.c (the_low_target): Likewise.
4702 * linux-s390-low.c (the_low_target): Likewise.
4703 * linux-sh-low.c (the_low_target): Likewise.
4704 * linux-sparc-low.c (the_low_target): Likewise.
4705 * linux-tic6x-low.c (the_low_target): Likewise.
4706 * linux-x86-low.c (the_low_target): Likewise.
4707 * linux-xtensa-low.c (the_low_target): Likewise.
4708 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4709 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4710 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4711 srv_xmlfiles.
4712 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4713 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4714
4715 2012-02-29 Yao Qi <yao@codesourcery.com>
4716 Pedro Alves <palves@redhat.com>
4717
4718 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4719 `step_over_finished' is true.
4720
4721 2012-02-27 Pedro Alves <palves@redhat.com>
4722
4723 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4724 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4725
4726 2012-02-27 Pedro Alves <palves@redhat.com>
4727
4728 PR server/9684
4729 * linux-low.c (pid_is_stopped): New.
4730 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4731
4732 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4733
4734 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4735 of conditions.
4736
4737 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4738
4739 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4740
4741 2012-02-24 Luis Machado <lgustavo@codesourcery>
4742
4743 * server.c (handle_query): Advertise support for target-side
4744 breakpoint condition evaluation.
4745 (process_point_options): New function.
4746 (process_serial_event): When inserting a breakpoint, check for
4747 a target-side condition that should be evaluated.
4748
4749 * mem-break.c: Include regcache.h and ax.h.
4750 (point_cond_list_t): New data structure.
4751 (breakpoint) <cond_list>: New field.
4752 (find_gdb_breakpoint_at): Make non-static.
4753 (delete_gdb_breakpoint_at): Clear any target-side
4754 conditions.
4755 (clear_gdb_breakpoint_conditions): New function.
4756 (add_condition_to_breakpoint): Likewise.
4757 (add_breakpoint_condition): Likewise.
4758 (gdb_condition_true_at_breakpoint): Likewise.
4759 (gdb_breakpoint_here): Return result directly instead
4760 of going through a local variable.
4761
4762 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4763 (clear_gdb_breakpoint_conditions): Likewise.
4764 (add_breakpoint_condition): Likewise.
4765 (gdb_condition_true_at_breakpoint): Likewise.
4766
4767 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4768 (need_step_over_p): Take target-side breakpoint condition into
4769 consideration.
4770
4771 2012-02-24 Luis Machado <lgustavo@codesourcery>
4772
4773 * server.h: Include tracepoint.h.
4774 (agent_mem_read, agent_get_trace_state_variable_value,
4775 agent_set_trace_state_variable_value,
4776 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4777 get_set_tsv_func_addr): New prototypes.
4778
4779 * ax.h: New include file.
4780 * ax.c: New source file.
4781
4782 * tracepoint.c: Include ax.h.
4783 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4784 agent_expr, eval_result_type): Move to ax.h.
4785 (parse_agent_expr): Rename to ...
4786 (gdb_parse_agent_expr): ... this, make it non-static and move
4787 to ax.h.
4788 (unparse_agent_expr) Rename to ...
4789 (gdb_unparse_agent_expr): ... this, make it non-static and move
4790 to ax.h.
4791 (eval_agent_expr): Rename to ...
4792 (eval_tracepoint_agent_expr): ... this.
4793 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4794 forward declarations.
4795 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4796 (agent_get_trace_state_variable_value): New function.
4797 (agent_set_trace_state_variable_value): New function.
4798 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4799 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4800 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4801 (condition_true_at_tracepoint): Likewise.
4802 (parse_agent_expr): Rename to ...
4803 (gdb_parse_agent_expr): ... this and move to ax.c.
4804 (unparse_agent_expr): Rename to ...
4805 (gdb_unparse_agent_expr): ... this and move to ax.c.
4806 (gdb_agent_op_name): Move to ax.c.
4807 (eval_agent_expr): Rename to ...
4808 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4809 and move to ax.c.
4810 (eval_tracepoint_agent_expr): New function.
4811 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4812 non-static.
4813 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4814 ax.c.
4815 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4816 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4817 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4818 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4819 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4820 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4821 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4822 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4823 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4824 (compile_bytecodes): Remove forward declaration.
4825 (is_goto_target): Move to ax.c.
4826 (compile_bytecodes): Move to ax.c and call
4827 agent_get_trace_state_variable_value (...) and
4828 agent_set_trace_state_variable_value (...).
4829
4830 * Makefile.in: Update ax.c and IPA dependencies.
4831
4832 2012-02-24 Pedro Alves <palves@redhat.com>
4833
4834 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4835 (cmd_bigqtbuffer_circular): ... this. Only handle
4836 'QTBuffer:circular:'.
4837 (handle_tracepoint_general_set): Adjust.
4838
4839 2012-02-16 Yao Qi <yao@codesourcery.com>
4840
4841 * inferiors.c: Move code to ...
4842 * dll.c: .... here. New.
4843 * server.h: Declare clear_dlls.
4844 * Makefile.in (SFILES): Add dll.c.
4845 (OBS): Add dll.o
4846 (dll.o): New rule.
4847
4848 2012-02-11 Yao Qi <yao@codesourcery.com>
4849
4850 * server.c: (handle_monitor_command): Add a new parameter
4851 `own_buf'.
4852 (handle_query): Update caller.
4853
4854 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4855
4856 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4857 * configure, config.in: Regenerate.
4858 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4859 is not defined.
4860
4861 2012-02-02 Pedro Alves <palves@redhat.com>
4862
4863 Try SIGKILL first, then PTRACE_KILL.
4864 * linux-low.c (linux_kill_one_lwp): New.
4865 (linux_kill_one_lwp): Rename to ...
4866 (kill_one_lwp_callback): ... this. Use the new
4867 linux_kill_one_lwp.
4868
4869 2012-02-02 Pedro Alves <palves@redhat.com>
4870
4871 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4872 inferior.
4873
4874 2012-01-27 Pedro Alves <palves@redhat.com>
4875
4876 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4877 (elf_64_file_p): Make static.
4878 (linux_pid_exe_is_elf_64_file): New.
4879 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4880 Delete declarations.
4881 (linux_pid_exe_is_elf_64_file): Declare.
4882 * linux-x86-low.c (x86_arch_setup): Use
4883 linux_pid_exe_is_elf_64_file.
4884
4885 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4886
4887 * linux-low.c (linux_wait_for_event_1): Rename to ...
4888 (linux_wait_for_event): ... here and merge it with former
4889 linux_wait_for_event - new variable wait_ptid, use it.
4890 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4891
4892 2012-01-23 Pedro Alves <palves@redhat.com>
4893
4894 * server.c (main): Avoid yet another case of infinite loop while
4895 detaching/killing after a longjmp.
4896
4897 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4898
4899 Code cleanup.
4900 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4901
4902 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4903
4904 * hostio.c (handle_readlink): New function.
4905 (handle_vFile): Call it to handle "vFile:readlink" packets.
4906
4907 2012-01-20 Pedro Alves <palves@redhat.com>
4908 Ulrich Weigand <ulrich.weigand@linaro.org>
4909
4910 * server.c (handle_v_requests): Only support vAttach and vRun to
4911 start multiple processes when in extended protocol mode.
4912
4913 2012-01-17 Pedro Alves <palves@redhat.com>
4914
4915 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4916 memalign plus mprotect to allocate the scratch buffer.
4917
4918 2012-01-13 Pedro Alves <palves@redhat.com>
4919
4920 * server.c (attach_inferior): Clear `cont_thread'.
4921
4922 2012-01-13 Pedro Alves <palves@redhat.com>
4923
4924 * server.c (main): Avoid infinite loop while detaching/killing
4925 after a longjmp.
4926
4927 2012-01-09 Doug Evans <dje@google.com>
4928
4929 * server.c (start_inferior): Set last_ptid in --wrapper case.
4930
4931 2012-01-06 Yao Qi <yao@codesourcery.com>
4932
4933 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4934 defined.
4935 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4936
4937 2012-01-04 Yao Qi <yao@codesourcery.com>
4938
4939 * tracepoint.c (cmd_qtdp): Print debug message
4940 for static tracepoint.
4941
4942 2012-01-04 Yao Qi <yao@codesourcery.com>
4943
4944 * tracepoint.c (trace_vdebug): Differentiate debug message
4945 between gdbserver and IPA.
4946
4947 2012-01-03 Yao Qi <yao@codesourcery.com>
4948
4949 * tracepoint.c (tracepoint_was_hit): Don't collect for
4950 static tracepoint.
4951
4952 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4953
4954 * terminal.h: Reformat copyright header.
4955
4956 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4957
4958 * server.c (gdbserver_version): Update copyright year.
4959 * gdbreplay.c (gdbreplay_version): Likewise.
4960
4961 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4962
4963 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4964
4965 Revert:
4966 2011-12-18 Hui Zhu <teawater@gmail.com>
4967 * linux-low.c (linux_create_inferior): Save return value to ret.
4968
4969 2011-12-18 Hui Zhu <teawater@gmail.com>
4970
4971 * linux-low.c (linux_create_inferior): Save return value to ret.
4972
4973 2011-12-16 Doug Evans <dje@google.com>
4974
4975 * linux-low.c (linux_create_inferior): If stdio connection,
4976 redirect stdin from /dev/null, stdout to stderr.
4977 * remote-utils.c (remote_is_stdio): New static global.
4978 (remote_connection_is_stdio): New function.
4979 (remote_prepare): Handle stdio connection.
4980 (remote_open): Ditto.
4981 (remote_close): Don't close stdin for stdio connections.
4982 (read_prim,write_prim): New functions. Replace all calls to
4983 read/write to these.
4984 * server.c (main): Watch for "-" argument. Move call to
4985 remote_prepare before start_inferior.
4986 * server.h (STDIO_CONNECTION_NAME): New macro.
4987 (remote_connection_is_stdio): Declare.
4988
4989 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4990 in debugging output.
4991
4992 2011-12-15 Yao Qi <yao@codesourcery.com>
4993
4994 * tracepoint.c: Include sys/syscall.h.
4995 (gdb_ust_thread): Remove preprocessor conditional.
4996
4997 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4998
4999 * linux-low.c (linux_detach_one_lwp): Call
5000 the_low_target.prepare_to_resume before detaching.
5001
5002 2011-12-14 Yao Qi <yao@codesourcery.com>
5003
5004 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5005 of write.
5006
5007 2011-12-14 Yao Qi <yao@codesourcery.com>
5008
5009 * i386-low.c (i386_low_stopped_data_address): Initialize local
5010 variable `control'.
5011
5012 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5013
5014 PR remote/13492
5015
5016 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5017 DR_CONTROL unless necessary. Extend comments.
5018 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5019 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5020
5021 2011-12-13 Yao Qi <yao@codesourcery.com>
5022
5023 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5024 macros.
5025 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5026
5027 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5028
5029 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5030 Print new debug message for such case.
5031
5032 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5033
5034 Fix overlapping memcpy.
5035 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5036 the read_inferior_memory transfer.
5037 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5038 write_inferior_memory transfer.
5039 (set_fast_tracepoint_jump): New variable buf. Use it for the
5040 read_inferior_memory and write_inferior_memory transfers.
5041 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5042 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5043 Use it for the write_inferior_memory transfer.
5044 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5045 buffers.
5046
5047 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5048
5049 * linux-low.c (fetch_register, store_register): Make code
5050 consistent, fix formatting.
5051
5052 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5053
5054 * linux-low.c (usr_store_inferior_registers): Factor out code
5055 to handle individual registers into...
5056 (store_register): ... this new function.
5057
5058 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5059
5060 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5061 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5062 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5063 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5064 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5065 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5066 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5067 (srv_xmlfiles): Add new XML files.
5068
5069 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5070 and <sys/uio.h>.
5071 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5072 (init_registers_s390_linux32v1): Add prototype.
5073 (init_registers_s390_linux32v2): Likewise.
5074 (init_registers_s390_linux64v1): Likewise.
5075 (init_registers_s390_linux64v2): Likewise.
5076 (init_registers_s390x_linux64v1): Likewise.
5077 (init_registers_s390x_linux64v2): Likewise.
5078 (s390_num_regs): Increment to 52.
5079 (s390_regmap): Add orig_r2 register.
5080 (s390_num_regs_3264): Increment to 68.
5081 (s390_regmap_3264): Add orig_r2 register.
5082 (s390_collect_ptrace_register): Handle orig_r2 register.
5083 (s390_supply_ptrace_register): Likewise.
5084 (s390_fill_last_break): New function.
5085 (s390_store_last_break): Likewise.
5086 (s390_fill_system_call): New function.
5087 (s390_store_system_call): Likewise.
5088 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5089 register sets.
5090 (s390_check_regset): New function.
5091 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5092 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5093 Update target_regsets for available register sets.
5094
5095 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5096 Jan Kratochvil <jan.kratochvil@redhat.com>
5097
5098 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5099 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5100 New.
5101 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5102 * linux-low.h (struct process_info_private): New member r_debug.
5103 * server.c (handle_qxfer_libraries): Call
5104 the_target->qxfer_libraries_svr4.
5105 (handle_qxfer_libraries_svr4): New function.
5106 (qxfer_packets): New entry "libraries-svr4".
5107 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5108 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5109 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5110 PACKET_qXfer_libraries_svr4.
5111
5112 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5113
5114 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5115 PSW address/mask between 8-byte and 16-byte formats.
5116 (s390_supply_ptrace_register): Likewise.
5117 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5118 basic addressing mode bit.
5119
5120 2011-11-24 Stan Shebs <stan@codesourcery.com>
5121
5122 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5123
5124 2011-11-17 Stan Shebs <stan@codesourcery.com>
5125
5126 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5127 (tracing_start_time): New global.
5128 (tracing_stop_time): New global.
5129 (tracing_user_name): New global.
5130 (tracing_notes): New global.
5131 (tracing_stop_note): New global.
5132 (cmd_qtstart): Set traceframe_usage, start_time.
5133 (stop_tracing): Set stop_time.
5134 (cmd_qtstatus): Report additional status.
5135 (cmd_qtp): New function.
5136 (handle_tracepoint_query): Call it.
5137 (cmd_qtnotes): New function.
5138 (handle_tracepoint_general_set): Call it.
5139 (get_timestamp): Rename from tsv_get_timestamp.
5140
5141 2011-11-14 Stan Shebs <stan@codesourcery.com>
5142 Kwok Cheung Yeung <kcy@codesourcery.com>
5143
5144 * linux-x86-low.c (small_jump_insn): New.
5145 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5146 trampoline and error message, build a trampoline and issue a small
5147 jump instruction to it.
5148 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5149 trampoline and error message.
5150 (x86_get_min_fast_tracepoint_insn_len): New.
5151 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5152 * linux-low.h (struct linux_target_ops): Add arguments to
5153 install_fast_tracepoint_jump_pad operation, add new operation.
5154 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5155 arguments.
5156 (linux_get_min_fast_tracepoint_insn_len): New function.
5157 (linux_target_op): Add new operation.
5158 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5159 (gdb_trampoline_buffer_end): Ditto.
5160 (gdb_trampoline_buffer_error): Ditto.
5161 (struct ipa_sym_addresses): Add fields for new IPA variables.
5162 (symbol_list): Add entries for new IPA variables.
5163 (struct tracepoint): Add fields to hold the address range of the
5164 trampoline used by the tracepoint.
5165 (trampoline_buffer_head): New static variable.
5166 (trampoline_buffer_tail): Ditto.
5167 (claim_trampoline_space): New function.
5168 (have_fast_tracepoint_trampoline_buffer): New function.
5169 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5170 structure.
5171 (install_fast_tracepoint): Ditto, also add error buffer argument.
5172 (cmd_qtminftpilen): New function.
5173 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5174 (fast_tracepoint_from_trampoline_address): New function.
5175 (fast_tracepoint_collecting): Handle trampoline as part of jump
5176 pad space.
5177 (set_trampoline_buffer_space): New function.
5178 (initialize_tracepoint): Initialize new IPA variables.
5179 * target.h (struct target_ops): Add arguments to
5180 install_fast_tracepoint_jump_pad operation, add new
5181 get_min_fast_tracepoint_insn_len operation.
5182 (target_get_min_fast_tracepoint_insn_len): New.
5183 (install_fast_tracepoint_jump_pad): Add arguments.
5184 * server.h (IPA_BUFSIZ): Define.
5185 * linux-i386-ipa.c: Include extra header files.
5186 (initialize_fast_tracepoint_trampoline_buffer): New function.
5187 (initialize_low_tracepoint): Call it.
5188 * server.h (set_trampoline_buffer_space): Declare.
5189 (claim_trampoline_space): Ditto.
5190 (have_fast_tracepoint_trampoline_buffer): Ditto.
5191
5192 2011-11-14 Yao Qi <yao@codesourcery.com>
5193
5194 * server.c (handle_query): Handle InstallInTrace for qSupported.
5195 * tracepoint.c (add_tracepoint): Sort list.
5196 (install_tracepoint, download_tracepoint): New.
5197 (cmd_qtdp): Call them to install and download tracepoints.
5198 (sort_tracepoints): Removed.
5199 (cmd_qtstart): Update.
5200
5201 2011-11-14 Yao Qi <yao@codesourcery.com>
5202
5203 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5204 * mem-break.h: Declare.
5205 * tracepoint.c (cmd_qtstart): Move some code to ...
5206 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5207 New.
5208 (download_tracepoints): Move some code to ...
5209 (download_tracepoint_1): ... here. New.
5210
5211 2011-11-08 Yao Qi <yao@codesourcery.com>
5212
5213 * remote-utils.c (relocate_instruction): A comment fix.
5214
5215 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5216
5217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5218 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5219 dr_status_mirror and dr_control_mirror from debug_reg_state.
5220 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5221 (i386_initial_stuff): Remove use of deleted globals.
5222 (i386_get_thread_context, i386_set_thread_context,
5223 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5224 from debug_reg_state.
5225
5226 2011-11-05 Yao Qi <yao@codesourcery.com>
5227
5228 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5229 address as TPOINT's.
5230
5231 2011-11-02 Stan Shebs <stan@codesourcery.com>
5232
5233 * tracepoint.c (agent_mem_read_string): New function.
5234 (eval_agent_expr): Call it for tracenz.
5235 * server.c (handle_query): Report support for tracenz.
5236
5237 2011-11-02 Yao Qi <yao@codesourcery.com>
5238
5239 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5240
5241 2011-11-02 Yao Qi <yao@codesourcery.com>
5242
5243 * target.h: Fix a typo in comment.
5244
5245 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5246
5247 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5248 clobber the breakpoints' shadows with fast tracepoint jumps.
5249 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5250 * target.c (write_inferior_memory): Also pass MYADDR down to
5251 check_mem_write.
5252
5253 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5254
5255 * configure.ac: Check support for personality routine.
5256 * configure: Regenerate.
5257 * config.in: Likewise.
5258 * linux-low.c: Include <sys/personality.h>.
5259 Define ADDR_NO_RANDOMIZE if necessary.
5260 (linux_create_inferior): Disable address space randomization when
5261 forking inferior, if requested.
5262 (linux_supports_disable_randomization): New function.
5263 (linux_target_ops): Install it.
5264 * server.h (disable_randomization): Declare.
5265 * server.c (disable_randomization): New global variable.
5266 (handle_general_set): Handle QDisableRandomization.
5267 (handle_query): Likewise for qSupported.
5268 (main): Support --disable-randomization and --no-disable-randomization
5269 command line arguments.
5270 * target.h (struct target_ops): Add supports_disable_randomization.
5271 (target_supports_disable_randomization): New macro.
5272
5273 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5274
5275 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5276 ifdef check.
5277 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5278 [!PT_GETDSBT] (target_loadmap): New definition.
5279 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5280 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5281 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5282 and PT_GETDSBT to LINUX_LOADMAP.
5283 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5284 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5285
5286 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5287
5288 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5289 (arm_linux_hwbp_cap): New static variable.
5290 (arm_linux_get_hwbp_cap): Replace by ...
5291 (arm_linux_init_hwbp_cap): ... this new function.
5292 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5293 (arm_linux_get_hw_watchpoint_count): Likewise.
5294 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5295 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5296 (arm_prepare_to_resume): Use perror_with_name instead of error.
5297
5298 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5299
5300 * linux-arm-low.c: Include <signal.h>.
5301 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5302 (struct arm_linux_hwbp_cap): New data type.
5303 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5304 (struct arm_linux_hw_breakpoint): New data type.
5305 (MAX_BPTS, MAX_WPTS): Define.
5306 (struct arch_process_info, struct arch_lwp_info): New data types.
5307 (arm_linux_get_hwbp_cap): New function.
5308 (arm_linux_get_hw_breakpoint_count): Likewise.
5309 (arm_linux_get_hw_watchpoint_count): Likewise.
5310 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5311 (arm_hwbp_control_initialize): Likewise.
5312 (arm_hwbp_control_is_enabled): Likewise.
5313 (arm_hwbp_control_is_initialized): Likewise.
5314 (arm_hwbp_control_disable): Likewise.
5315 (arm_linux_hw_breakpoint_equal): Likewise.
5316 (arm_linux_hw_point_initialize): Likewise.
5317 (struct update_registers_data): New data structure.
5318 (update_registers_callback: New function.
5319 (arm_insert_point): Likewise.
5320 (arm_remove_point): Likewise.
5321 (arm_stopped_by_watchpoint): Likewise.
5322 (arm_stopped_data_address): Likewise.
5323 (arm_new_process): Likewise.
5324 (arm_new_thread): Likewise.
5325 (arm_prepare_to_resume): Likewise.
5326 (the_low_target): Register arm_insert_point, arm_remove_point,
5327 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5328 arm_new_thread, and arm_prepare_to_resume.
5329
5330 2011-09-15 Stan Shebs <stan@codesourcery.com>
5331
5332 * server.h (struct emit_ops): Add compare-goto fields.
5333 * tracepoint.c (gdb_agent_op_sizes): New table.
5334 (emit_eq_goto): New function.
5335 (emit_ne_goto): New function.
5336 (emit_lt_goto): New function.
5337 (emit_le_goto): New function.
5338 (emit_gt_goto): New function.
5339 (emit_ge_goto): New function.
5340 (is_goto_target): New function.
5341 (compile_bytecodes): Recognize special cases of compare-goto
5342 combinations and call specialized emitters for them.
5343 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5344 (amd64_emit_ne_goto): New function.
5345 (amd64_emit_lt_goto): New function.
5346 (amd64_emit_le_goto): New function.
5347 (amd64_emit_gt_goto): New function.
5348 (amd64_emit_ge_goto): New function.
5349 (amd64_emit_ops): Add the new functions.
5350 (i386_emit_eq_goto): New function.
5351 (i386_emit_ne_goto): New function.
5352 (i386_emit_lt_goto): New function.
5353 (i386_emit_le_goto): New function.
5354 (i386_emit_gt_goto): New function.
5355 (i386_emit_ge_goto): New function.
5356 (i386_emit_ops): Add the new functions.
5357
5358 2011-09-08 Stan Shebs <stan@codesourcery.com>
5359
5360 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5361 (i386_emit_epilogue): Restore %ebx.
5362
5363 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5364
5365 * server.c (step_thread): Remove definition.
5366 (process_serial_event): Don't handle Hs.
5367 * server.h (step_thread): Remove declaration.
5368 * target.c (set_desired_inferior): Remove use of step_thread.
5369
5370 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5371
5372 * linux-low.c: Include linux-procfs.h.
5373 (linux_attach_lwp_1): Update comments.
5374 (linux_attach): Scan for existing threads when attaching to a
5375 process that is the tgid.
5376 * Makefile.in: Update dependencies.
5377
5378 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5379
5380 * configure.srv: Add linux-procfs.o dependencies.
5381
5382 2011-08-14 Yao Qi <yao@codesourcery.com>
5383
5384 * target.h (struct target_ops): Fix indent.
5385 * win32-low.c (win32_target_ops): Fix comment.
5386
5387 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5388 Yao Qi <yao@codesourcery.com>
5389
5390 * Makefile.in (clean): Remove tic6x-*.c files.
5391 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5392 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5393 (tic6x-c64xp-linux.c): Likewise.
5394 * configure.srv: Add support for tic6x-*-uclinux.
5395 * linux-tic6x-low.c: New.
5396 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5397
5398 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5399 Yao Qi <yao@codesourcery.com>
5400
5401 * target.h (struct target_ops): Add read_loadmap.
5402 * linux-low.c (struct target_loadseg): New type.
5403 (struct target_loadmap): New type.
5404 (linux_read_loadmap): New function.
5405 (linux_target_ops): Add linux_read_loadmap.
5406 * server.c (handle_query): Support qXfer:fdpic:read packet.
5407 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5408 to NULL.
5409
5410 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5411
5412 * win32-low.c: Include <stdint.h>.
5413
5414 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5415
5416 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5417 to the inferior here.
5418 (i386_remove_aligned_watchpoint): Ditto.
5419 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5420 fit part of the watchpoint in the debug registers.
5421 (i386_update_inferior_debug_regs): New.
5422 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5423 registers, and only update the inferior on success.
5424 (i386_low_remove_watchpoint): Ditto.
5425
5426 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5427
5428 * linux-low.c (compare_ints, unique, list_threads, show_process,
5429 linux_core_of_thread): Delete.
5430 (linux_target_ops): Change linux_core_of_thread to
5431 linux_common_core_of_thread.
5432 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5433 * utils.c (malloc_failure): Change type of argument.
5434 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5435 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5436 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5437 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5438 (IPA_OBJS): Add common-utils-ipa.o.
5439 (ptid_h, linux_osdata_h): New macros.
5440 (server_h): Add common/common-utils.h, common/xml-utils.h,
5441 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5442 common/ptid.h.
5443 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5444 ptid.o, buffer.o): New rules.
5445 (linux-low.o): Add common/linux-osdata.h as a dependency.
5446 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5447 * configure.ac: Add AC_HEADER_DIRENT check.
5448 * config.in: Regenerate.
5449 * configure: Regenerate.
5450 * remote-utils.c (xml_escape_text): Delete.
5451 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5452 buffer_xml_printf): Move to common/buffer.c.
5453 * server.c (main): Remove call to initialize_inferiors.
5454 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5455 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5456 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5457 internal_error, gdb_assert, gdb_assert_fail): Delete.
5458 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5459 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5460 common/buffer.h.
5461 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5462 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5463 initialize_inferiors): Delete.
5464
5465 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5466
5467 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5468 symbol error.
5469
5470 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5471
5472 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5473 assertion.
5474 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5475
5476 2011-05-26 Yao Qi <yao@codesourcery.com>
5477
5478 * Makefile.in (thread-db.o): Track dependence to
5479 common/gdb_thread_db.h.
5480 * thread-db.c: include gdb_thread_db.h from right place.
5481
5482 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5483
5484 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5485 __FILE__ and __LINE__ to internal_error.
5486
5487 2011-05-13 Doug Evans <dje@google.com>
5488
5489 * thread-db.c (try_thread_db_load_from_sdir): New function.
5490 (try_thread_db_load_from_dir): New function.
5491 (thread_db_load_search): Handle $sdir, ignore $pdir.
5492 Remove trying of system directories if search of
5493 libthread-db-search-path fails, that is now done via $sdir.
5494
5495 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5496
5497 * server.c (handle_query): Add EnableDisableTracepoints to the list
5498 of supported features.
5499 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5500 tracepoints.
5501 (cmd_qtenable_disable): New.
5502 (cmd_qtstart): Install tracepoints even if disabled.
5503 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5504 receiving a QTEnable or QTDisable packet.
5505 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5506 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5507 tracepoints.
5508 (gdb_probe): Skip data collection if static tracepoint is disabled.
5509
5510 2011-05-10 Doug Evans <dje@google.com>
5511
5512 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5513
5514 2011-05-04 Doug Evans <dje@google.com>
5515
5516 * linux-low.c (linux_join): Skip process lookup.
5517 * spu-low.c (spu_join): Ditto.
5518 * server.c (join_inferiors_callback): Delete.
5519 (process_serial_event): For 'D' packet (detach) call join_inferior
5520 directly.
5521
5522 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5523
5524 * README: Don't mention xscale*-*-linux*.
5525 * configure.srv (xscale*-*-linux*): Don't handle target.
5526
5527 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5528
5529 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5530 casting pointers.
5531 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5532 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5533 (i386_emit_void_call_2): Likewise.
5534
5535 2011-04-26 Yao Qi <yao@codesourcery.com>
5536
5537 * linux-low.c: Move common macros to linux-ptrace.h.
5538 Include linux-ptrace.h.
5539 * Makefile.in (linux_ptrace_h): New.
5540 (linux-low.o): Depends on linux-ptrace.h.
5541
5542 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5543
5544 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5545 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5546 (remote_prepare): New function with most of the TCP code from ...
5547 (remote_open): ... here. Detect PORT here unconditionally. Move also
5548 setting transport_is_reliable.
5549 * server.c (run_once): New variable.
5550 (gdbserver_usage): Document it.
5551 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5552 the first run if RUN_ONCE.
5553 * server.h (run_once, remote_prepare): New declarations.
5554
5555 2011-04-19 Tom Tromey <tromey@redhat.com>
5556
5557 * win32-low.c (handle_load_dll): Remove duplicate "the".
5558
5559 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5560
5561 Remove support for old Cygwin 1.5 versions.
5562 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5563 function to avoid warning.
5564 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5565 warning.
5566
5567 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5568
5569 * gdbserver/server.h (Macro _): Define it if not available.
5570
5571 2011-03-14 Michael Snyder <msnyder@vmware.com>
5572
5573 * hostio.c (handle_close): Remove unnecessary null test.
5574
5575 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5576
5577 * Makefile.in (maintainer-clean realclean distclean): Remove
5578 "make ... subdir_do" command.
5579
5580 2011-03-10 Michael Snyder <msnyder@vmware.com>
5581
5582 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5583
5584 * server.c (handle_v_run): Free alloced buffer on early return.
5585
5586 2011-03-09 Yao Qi <yao@codesourcery.com>
5587
5588 Revert:
5589 2011-03-04 Yao Qi <yao@codesourcery.com>
5590
5591 * Makefile.in: Remove GNU make feature --directory.
5592
5593 2011-03-05 Yao Qi <yao@codesourcery.com>
5594
5595 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5596 (subdir_do): New make target. Copied from gdb/Makefile.
5597 (maintainer-clean, realclean, distclean, clean): Call corresponding
5598 make targets in common/Makefile.
5599
5600 2011-02-11 Yao Qi <yao@codesourcery.com>
5601
5602 * configure.ac: Call AC_PROG_RANLIB.
5603 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5604 * configure: Regenerate.
5605
5606 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5607
5608 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5609
5610 2011-03-06 Yao Qi <yao@codesourcery.com>
5611
5612 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5613
5614 2011-03-05 Yao Qi <yao@codesourcery.com>
5615
5616 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5617 (subdir_do): New make target. Copied from gdb/Makefile.
5618 (maintainer-clean, realclean, distclean, clean): Call corresponding
5619 make targets in common/Makefile.
5620
5621 2011-03-04 Yao Qi <yao@codesourcery.com>
5622
5623 * Makefile.in: Remove GNU make feature --directory.
5624
5625 2011-03-04 Michael Snyder <msnyder@vmware.com>
5626
5627 * server.c (queue_stop_reply): Call xmalloc not malloc.
5628
5629 2011-03-02 Michael Snyder <msnyder@vmware.com>
5630
5631 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5632
5633 2011-02-28 Michael Snyder <msnyder@vmware.com>
5634
5635 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5636 (cmd_qtframe): Ditto.
5637 (cmd_qtbuffer): Ditto.
5638 (cmd_bigqtbuffer): Ditto.
5639
5640 * utils.c (decimal2str): Initialize 'width' to nine, then
5641 don't mess with it.
5642
5643 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5644
5645 * hostio.c (require_data): Free *data, not data.
5646
5647 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5648
5649 * hostio.c (require_data): Use free, not xfree.
5650
5651 2011-02-27 Michael Snyder <msnyder@vmware.com>
5652
5653 * server.c (handle_query): Discard unused value.
5654
5655 * hostio.c (require_data): Free malloc memory before returning
5656 error.
5657
5658 2011-02-26 Michael Snyder <msnyder@vmware.com>
5659
5660 * linux-low.c (list_threads): Call closedir for dirent.
5661
5662 2011-02-27 Michael Snyder <msnyder@vmware.com>
5663
5664 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5665 a case statement falls through.
5666
5667 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5668
5669 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5670 in comparison.
5671
5672 2011-02-26 Michael Snyder <msnyder@vmware.com>
5673
5674 * utils.c (decimal2str): Eliminate dead code and dead param.
5675 (pulongest): Drop dead param from call to decimal2str.
5676 (plongest): Ditto.
5677
5678 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5679
5680 Revert the following patch (not approved yet):
5681 2011-02-21 Hui Zhu <teawater@gmail.com>
5682 * tracepoint.c (tp_printf): New function.
5683 (eval_agent_expr): Handle gdb_agent_op_printf.
5684
5685 2011-02-21 Hui Zhu <teawater@gmail.com>
5686
5687 * tracepoint.c (tp_printf): New function.
5688 (eval_agent_expr): Handle gdb_agent_op_printf.
5689
5690 2011-02-18 Tom Tromey <tromey@redhat.com>
5691
5692 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5693 (tracepoint.o): Likewise.
5694 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5695 (gdb_agent_op_names): Likewise.
5696
5697 2011-02-18 Tom Tromey <tromey@redhat.com>
5698
5699 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5700 gdb_agent_op_rot>: New constants.
5701 (gdb_agent_op_names): Add pick and roll.
5702 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5703 cases.
5704
5705 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5706
5707 * aclocal.m4: Regenerated with aclocal-1.11.1.
5708
5709 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5710
5711 * server.c (handle_qxfer_traceframe_info): New.
5712 (qxfer_packets): Register "traceframe-info".
5713 (handle_query): Report support for qXfer:traceframe-info:read+.
5714 * tracepoint.c (match_blocktype): New.
5715 (traceframe_find_block_type): Rename to ...
5716 (traceframe_walk_blocks): ... this. Add callback filter argument,
5717 and use it.
5718 (traceframe_find_block_type): New, reimplemented on top of
5719 traceframe_walk_blocks.
5720 (build_traceframe_info_xml): New.
5721 (traceframe_read_info): New.
5722 * server.h (traceframe_read_info): Declare.
5723
5724 2011-02-11 Yao Qi <yao@codesourcery.com>
5725
5726 * configure.ac: Call AC_PROG_RANLIB.
5727 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5728 * configure: Regenerate.
5729
5730 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5731
5732 * server.c (gdb_read_memory): Change return semantics to allow
5733 partial transfers.
5734 (handle_search_memory_1): Adjust.
5735 (process_serial_event) <'m' packet>: Handle partial transfers.
5736 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5737
5738 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5739
5740 * regcache.c (init_register_cache): Initialize
5741 regcache->register_status.
5742 (free_register_cache): Release regcache->register_status.
5743 (regcache_cpy): Copy register_status.
5744 (registers_to_string): Print 'x's for unavailable registers.
5745 (supply_register): Mark the register's status valid or
5746 unavailable, depending on whether a buffer was passed in or not.
5747 (supply_register_zeroed): New.
5748 (supply_regblock): Mark the registers' status valid or
5749 unavailable, depending on whether a buffer was passed in or not.
5750 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5751 (struct regcache): New `register_status' field.
5752 (supply_register_zeroed): Declare.
5753 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5754 supply_register_zeroed, rather than passing a NULL buffer to
5755 supply_register.
5756 * tracepoint.c (fetch_traceframe_registers): Update comment.
5757
5758 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5759
5760 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5761 buffer explicit.
5762
5763 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5764
5765 * server.h (decode_xfer_write): Change prototype.
5766 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5767 and don't extract the annex here.
5768 * server.c (decode_xfer_read): Remove `annex' parameter,
5769 and don't extract the annex here.
5770 (decode_xfer): New.
5771 (struct qxfer): New.
5772 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5773 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5774 (handle_qxfer_statictrace): New functions, abstracted out from
5775 handle_query, and made to use the struct qxfer interface.
5776 (handle_threads_qxfer_proper): Rename to ...
5777 (handle_qxfer_threads_proper): ... this.
5778 (handle_threads_qxfer): Rename to ...
5779 (handle_qxfer_threads): ... this. Adjust.
5780 (qxfer_packets): New array.
5781 (handle_qxfer): New function.
5782 (handle_query): Use handle_qxfer.
5783
5784 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5785
5786 * gdbreplay.c: Shorten lines of >= 80 columns.
5787 * linux-low.c: Ditto.
5788 * linux-ppc-low.c: Ditto.
5789 * linux-s390-low.c: Ditto.
5790 * linux-sparc-low.c: Ditto.
5791 * linux-x86-low.c: Ditto.
5792 * linux-xtensa-low.c: Ditto.
5793 * mem-break.c: Ditto.
5794 * nto-low.c: Ditto.
5795 * regcache.h: Ditto.
5796 * remote-utils.c: Ditto.
5797 * server.c: Ditto.
5798 * server.h: Ditto.
5799 * thread-db.c: Ditto.
5800 * tracepoint.c: Ditto.
5801 * utils.c: Ditto.
5802 * win32-low.h: Ditto.
5803
5804 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5805
5806 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5807 update.
5808
5809 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5810
5811 * server.c (gdbserver_version): Update copyright year in version
5812 output.
5813 * gdbreplay.c (gdbreplay_version): Ditto.
5814
5815 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5816
5817 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5818 * linux-bfin-low.c: New file.
5819 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5820 PT_DATA_ADDR for BFIN targets.
5821 * Makefile.in (SFILES): Add linux-bfin-low.c.
5822 (clean): Remove reg-bfin.c.
5823 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5824 * README: Mention supported Blackfin targets.
5825
5826 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5827
5828 * .gitignore: New file.
5829
5830 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5831
5832 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5833
5834 2010-10-22 Jie Zhang <jie@codesourcery.com>
5835
5836 * Makefile.in: Add FLAGS_TO_PASS variable.
5837 (install): Remove dependency of install-only and recursively
5838 invoke make for install-only.
5839
5840 2010-10-04 Doug Evans <dje@google.com>
5841
5842 * Makefile.in (uninstall): Use $(DESTDIR).
5843
5844 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5845
5846 PR gdb/11842
5847
5848 * linux-x86-low.c (compat_siginfo_from_siginfo)
5849 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5850 si_code is < 0. Check for si_code == SI_TIMER before checking for
5851 si_code < 0.
5852
5853 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5854
5855 * lynx-i386-low.c: New file.
5856 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5857
5858 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5859
5860 * lynx-low.c (ptrace_request_to_str): Remove handling for
5861 request values that have been removed in LynxOS 5.x.
5862
5863 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5864
5865 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5866 <ptrace.h>
5867
5868 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5869
5870 * configure.ac: Add --enable-inprocess-agent option.
5871 * configure: Rebuilt.
5872
5873 2010-09-06 Yao Qi <yao@codesourcery.com>
5874
5875 * linux-low.c (linux_kill): Remove unused variable.
5876 (linux_stabilize_threads): Likewise.
5877 * server.c (start_inferior): Likewise.
5878 (queue_stop_reply_callback): Likewise.
5879 * tracepoint.c (do_action_at_tracepoint): Likewise.
5880
5881 2010-09-06 Yao Qi <yao@codesourcery.com>
5882
5883 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5884 on return.
5885
5886 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5887
5888 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5889
5890 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5891
5892 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5893 "$(IPA_DEPFILES)".
5894
5895 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5896
5897 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5898 gdbserver/lynx-ppc-low.c: New files.
5899 * Makefile.in (lynx_low_h): New variable.
5900 (lynx-low.o, lynx-ppc-low.o): New rules.
5901 * configure.ac: On LynxOS, link with -lnetinet.
5902 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5903 * configure: regenerate.
5904
5905 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5906
5907 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5908 * configure.ac: Add check for vasprintf and vsnprintf.
5909 * configure, config.in: Regenerate.
5910 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5911
5912 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5913
5914 * gdbreplay.c: Move include of alloca.h up, next to include of
5915 malloc.h.
5916 * server.h: Add include of malloc.h.
5917 * mem-break.c: Remove include of malloc.h.
5918 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5919
5920 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5921
5922 * Makefile.in (memmem.o): Build with -Wno-error.
5923
5924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5925
5926 * utils.c (xsnprintf): Make non-static.
5927 * server.h: Add xsnprintf declaration.
5928 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5929 replace calls to snprintf by calls to xsnprintf throughout.
5930
5931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5932
5933 * configure.ac: Add configure check for alloca.
5934 * configure, config.in: Regenerate.
5935 * server.h: Include alloca.h if it exists.
5936 * gdbreplay.c: Include alloca.h if it exists.
5937
5938 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5939
5940 * linux-low.c (__SIGRTMIN): Define if not already defined.
5941 (linux_create_inferior): Check for __ANDROID__ rather than
5942 __SIGRTMIN.
5943 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5944 are already deferred.
5945 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5946 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5947 stopped and already has a pending signal to report.
5948 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5949 a pending signal to report or is moving out of a jump pad.
5950 (linux_init_signals): Check for __ANDROID__ rather than
5951 __SIGRTMIN.
5952
5953 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5954
5955 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5956 debug_threads check. Avoid a linear search when not doing debug
5957 output.
5958
5959 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5960
5961 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5962 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5963 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5964 (process_event): Change local fd's type to gdb_fildes_t.
5965 (create_file_handler): Adjust prototype.
5966 (delete_file_handler): Adjust prototype.
5967 (handle_file_event): Adjust prototype. Use pfildes.
5968 (create_file_event): Adjsut prototype.
5969 * remote-utils.c (remote_desc, listen_desc): Change type to
5970 gdb_fildes_t.
5971 * server.h: New gdb_fildes_t typedef.
5972 [USE_WIN32API]: Include winsock2.h.
5973 (delete_file_handler, add_file_handler): Adjust prototypes.
5974 (pfildes): Declare.
5975 * utils.c (pfildes): New.
5976
5977 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5978
5979 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5980 * configure: Regenerate.
5981
5982 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5983
5984 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5985 (linux_done_accessing_memory): ... this.
5986 (linux_target_ops): Adjust.
5987 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5988 * nto-low.c (nto_target_ops): Adjust comment.
5989 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5990 * spu-low.c (spu_target_ops): Adjust comment.
5991 * target.h (target_ops): Rename unprepare_to_access_memory field
5992 to done_accessing_memory.
5993 (unprepare_to_access_memory): Rename to ...
5994 (done_accessing_memory): ... this.
5995
5996 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5997
5998 * linux-low.c (linux_prepare_to_access_memory): New.
5999 (linux_unprepare_to_access_memory): New.
6000 (linux_target_ops): Install them.
6001 * server.c (read_memory): Rename to ...
6002 (gdb_read_memory): ... this. Use
6003 prepare_to_access_memory/prepare_to_access_memory.
6004 (write_memory): Rename to ...
6005 (gdb_write_memory): ... this. Use
6006 prepare_to_access_memory/prepare_to_access_memory.
6007 (handle_search_memory_1): Adjust.
6008 (process_serial_event): Adjust.
6009 * target.h (struct target_ops): New fields
6010 prepare_to_access_memory and unprepare_to_access_memory.
6011 (prepare_to_access_memory, unprepare_to_access_memory): New.
6012 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6013 prepare_to_access_memory/prepare_to_access_memory.
6014 * nto-low.c (nto_target_ops): Adjust.
6015 * spu-low.c (spu_target_ops): Adjust.
6016 * win32-low.c (win32_target_ops): Adjust.
6017
6018 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6019
6020 * Makefile.in (WARN_CFLAGS): Get it from configure.
6021 (WERROR_CFLAGS): New.
6022 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6023 * configure.ac: Introduce --enable-werror, which adds -Werror to
6024 the compiler command line. Enabled by default. Disable with
6025 --disable-werror. Add -Wdeclaration-after-statement
6026 Wpointer-arith and -Wformat-nonliteral to warning flags.
6027 * configure: Regenerate.
6028
6029 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6030
6031 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6032
6033 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6034
6035 * gdbreplay.c (remote_error): New.
6036 (gdbchar): New.
6037 (expect): Use gdbchar. Check for error reading from GDB.
6038 Clarify sync error output.
6039 (play): Check for errors writing to GDB.
6040 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6041 * remote-utils.c (getpkt): Check for errors writing to the remote
6042 descriptor.
6043
6044 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6045
6046 * linux-low.c (linux_wait_1): Move non-debugging code out of
6047 `debug_threads' control.
6048
6049 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6050
6051 * linux-low.c (linux_wait_1): Don't set last_status here.
6052 * server.c (push_event, queue_stop_reply_callback): Assert we're
6053 not pushing a TARGET_WAITKIND_IGNORE event.
6054 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6055 (myresume, handle_target_event): Set the thread's last_resume_kind
6056 and last_status from the target returned status.
6057
6058 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6059
6060 PR threads/10729
6061
6062 * linux-x86-low.c (update_debug_registers_callback): New.
6063 (i386_dr_low_set_addr): Use it.
6064 (i386_dr_low_get_addr): New.
6065 (i386_dr_low_set_control): Use update_debug_registers_callback.
6066 (i386_dr_low_get_control): New.
6067 (i386_dr_low_get_status): Adjust.
6068 * linux-low.c (linux_stop_lwp): New.
6069 * linux-low.h (linux_stop_lwp): Declare.
6070
6071 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6072 argument instead of a i386_debug_reg_state.
6073 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6074 a i386_debug_reg_state.
6075 (i386_insert_aligned_watchpoint): Adjust.
6076 (i386_remove_aligned_watchpoint): Adjust.
6077 (i386_low_stopped_data_address): Read the debug registers from the
6078 inferior instead of from the mirrors.
6079 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6080 (i386_dr_low_get_addr): Declare.
6081 (i386_dr_low_get_control): Declare.
6082 (i386_dr_low_get_status): Change prototype.
6083
6084 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6085 (i386_dr_low_get_addr): New.
6086 (i386_dr_low_get_control): New.
6087 (i386_dr_low_get_status): Adjust prototype. Return
6088 dr_status_mirror.
6089 (i386_initial_stuff): Clear dr_status_mirror and
6090 dr_control_mirror.
6091 (i386_get_thread_context): Adjust.
6092 (i386_set_thread_context): Adjust.
6093 (i386_thread_added): Adjust.
6094
6095 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6096
6097 * linux-low.h (linux_thread_area): Delete declaration.
6098
6099 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6100
6101 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6102 after its termination.
6103
6104 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6105
6106 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6107 (gdb_wants_all_stopped): Delete.
6108 (linux_wait_1): Don't call them.
6109 * server.c (handle_v_cont): Tag all threads as want-stopped.
6110 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6111 stopped as "client-wants-stopped".
6112
6113 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6114
6115 * Makefile.in (signals_h): New.
6116 (server_h): Depend on it.
6117 (server.o): Don't depend on $(signals_def).
6118 (signals.o): Depend on $(signals_def).
6119
6120 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6121
6122 * Makefile.in (signals_def): New.
6123 (server_h): Append include/gdb/signals.h and signals_def.
6124 (server.o): Append signals_def.
6125
6126 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6127
6128 * server.c (handle_target_event): Use target_signal_to_host for
6129 resume_info.sig initialization.
6130 * target.h (struct thread_resume) <sig>: New comment.
6131
6132 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6133
6134 * server.c (handle_query): strcpy() the returned string from paddress()
6135 instead of sprintf().
6136 * utils.c (paddress): Return phex_nz().
6137
6138 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6139
6140 * server.c (handle_v_cont): Call mourn_inferior if process
6141 just exited.
6142 (myresume): Likewise.
6143
6144 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6145
6146 Static tracepoints, and integration with UST.
6147
6148 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6149 * mem-break.c (uninsert_all_breakpoints)
6150 (reinsert_all_breakpoints): New.
6151 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6152 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6153 (gdb_agent_ust_loaded, helper_thread_id)
6154 (gdb_agent_helper_thread_id): New macros.
6155 (struct ipa_sym_addresses): Add addr_ust_loaded,
6156 addr_helper_thread_id, addr_cmd_buf.
6157 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6158 (in_process_agent_loaded_ust): New.
6159 (write_e_ust_not_loaded): New.
6160 (maybe_write_ipa_ust_not_loaded): New.
6161 (struct collect_static_trace_data_action): New.
6162 (enum tracepoint_type) <static_tracepoint>: New.
6163 (struct tracepoint) <handle>: Mention static tracepoints.
6164 (struct static_tracepoint_ctx): New.
6165 (CMD_BUF_SIZE): New.
6166 (add_tracepoint_action): Handle static tracepoint actions.
6167 (unprobe_marker_at): New.
6168 (clear_installed_tracepoints): Handle static tracepoints.
6169 (cmd_qtdp): Handle static tracepoints.
6170 (probe_marker_at): New.
6171 (cmd_qtstart): Handle static tracepoints.
6172 (response_tracepoint): Handle static tracepoints.
6173 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6174 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6175 (get_context_regcache): Handle static tracepoints.
6176 (do_action_at_tracepoint): Handle static tracepoint actions.
6177 (traceframe_find_block_type): Handle static trace data blocks.
6178 (traceframe_read_sdata): New.
6179 (download_tracepoints): Download static tracepoint actions.
6180 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6181 (GDB_PROBE_NAME): New.
6182 (ust_ops): New.
6183 (GET_UST_SYM): New.
6184 (USTF): New.
6185 (dlsym_ust): New.
6186 (ust_marker_to_static_tracepoint): New.
6187 (gdb_probe): New.
6188 (collect_ust_data_at_tracepoint): New.
6189 (gdb_ust_probe): New.
6190 (UNIX_PATH_MAX, SOCK_DIR): New.
6191 (gdb_ust_connect_sync_socket): New.
6192 (resume_thread, stop_thread): New.
6193 (run_inferior_command): New.
6194 (init_named_socket): New.
6195 (gdb_ust_socket_init): New.
6196 (cstr_to_hexstr): New.
6197 (next_st): New.
6198 (first_marker, next_marker): New.
6199 (response_ust_marker): New.
6200 (cmd_qtfstm, cmd_qtsstm): New.
6201 (unprobe_marker_at, probe_marker_at): New.
6202 (cmd_qtstmat, gdb_ust_thread): New.
6203 (gdb_ust_init): New.
6204 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6205 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6206 (ST_REGENTRY): New.
6207 (x86_64_st_collect_regmap): New.
6208 (X86_64_NUM_ST_COLLECT_GREGS): New.
6209 (AMD64_RIP_REGNUM): New.
6210 (supply_static_tracepoint_registers): New.
6211 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6212 (ST_REGENTRY): New.
6213 (i386_st_collect_regmap): New.
6214 (i386_NUM_ST_COLLECT_GREGS): New.
6215 (supply_static_tracepoint_registers): New.
6216 * server.c (handle_query): Handle qXfer:statictrace:read.
6217 <qSupported>: Report support for StaticTracepoints, and
6218 qXfer:statictrace:read features.
6219 * server.h (traceframe_read_sdata)
6220 (supply_static_tracepoint_registers): Declare.
6221 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6222 (unpack_varlen_hex): Include in IPA build.
6223 * Makefile.in (ustlibs, ustinc): New.
6224 (IPA_OBJS): Add remote-utils-ipa.o.
6225 ($(IPA_LIB)): Link -ldl and -lpthread.
6226 (UST_CFLAGS): New.
6227 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6228 * config.in, configure: Regenerate.
6229
6230 2010-06-20 Ian Lance Taylor <iant@google.com>
6231 Pedro Alves <pedro@codesourcery.com>
6232
6233 * linux-x86-low.c (always_true): Delete.
6234 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6235 trying to fool the compiler with always_true.
6236
6237 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6238
6239 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6240 conditions in gdbserver.
6241
6242 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6243
6244 * spu-low.c (spu_read_memory): Wrap around local store limit.
6245 (spu_write_memory): Likewise.
6246
6247 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6248
6249 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6250 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6251 LONGEST uses.
6252 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6253 uses.
6254 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6255 uses with LONGEST uses.
6256
6257 2010-06-14 Stan Shebs <stan@codesourcery.com>
6258 Pedro Alves <pedro@codesourcery.com>
6259
6260 Bytecode compiler.
6261
6262 * linux-x86-low.c: Include limits.h.
6263 (add_insns): New.
6264 (always_true): New.
6265 (EMIT_ASM): New.
6266 (EMIT_ASM32): New.
6267 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6268 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6269 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6270 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6271 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6272 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6273 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6274 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6275 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6276 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6277 (amd64_emit_void_call_2): New.
6278 (amd64_emit_ops): New.
6279 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6280 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6281 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6282 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6283 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6284 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6285 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6286 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6287 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6288 (i386_emit_stack_adjust, i386_emit_int_call_1)
6289 (i386_emit_void_call_2): New.
6290 (i386_emit_ops): New.
6291 (x86_emit_ops): New.
6292 (the_low_target): Install x86_emit_ops.
6293 * server.h (struct emit_ops): New.
6294 (get_raw_reg_func_addr): Declare.
6295 (current_insn_ptr, emit_error): Declare.
6296 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6297 (set_trace_state_variable_value): New defines.
6298 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6299 addr_get_trace_state_variable_value and
6300 addr_set_trace_state_variable_value.
6301 (symbol_list): New fields for get_raw_reg,
6302 get_trace_state_variable_value and set_trace_state_variable_value.
6303 (condfn): New typedef.
6304 (struct tracepoint): New field `compiled_cond'.
6305 (do_action_at_tracepoint): Clear compiled_cond.
6306 (get_trace_state_variable_value, set_trace_state_variable_value):
6307 Export in the IPA.
6308 (condition_true_at_tracepoint): If there's a compiled condition,
6309 run that.
6310 (current_insn_ptr, emit_error): New globals.
6311 (struct bytecode_address): New.
6312 (get_raw_reg_func_addr): New.
6313 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6314 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6315 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6316 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6317 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6318 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6319 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6320 (compile_tracepoint_condition, compile_bytecodes): New.
6321 * target.h (emit_ops): Forward declare.
6322 (struct target_ops): New field emit_ops.
6323 (target_emit_ops): New.
6324 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6325 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6326 * linux-low.c (linux_emit_ops): New.
6327 (linux_target_ops): Install it.
6328 * linux-low.h (struct linux_target_ops): New field emit_ops.
6329
6330 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6331
6332 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6333 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6334
6335 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6336 Stan Shebs <stan@codesourcery.com>
6337
6338 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6339 (all): Depend on $(extra_libraries).
6340 (install-only): Install the IPA.
6341 (IPA_OBJS, IPA_LIB): New.
6342 (clean): Remove the IPA lib.
6343 (IPAGENT_CFLAGS): New.
6344 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6345 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6346 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6347 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6348 * configure.ac: Check for atomic builtins support in the compiler.
6349 (IPA_DEPFILES, extra_libraries): Define.
6350 * configure.srv (ipa_obj): Add description.
6351 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6352 (i[34567]86-*-linux*): Set ipa_obj.
6353 (x86_64-*-linux*): Set ipa_obj.
6354 * linux-low.c (stabilizing_threads): New.
6355 (supports_fast_tracepoints): New.
6356 (linux_detach): Stabilize threads before detaching.
6357 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6358 the lwp is either not stabilizing, or is moving out of a jump pad.
6359 (linux_fast_tracepoint_collecting): New.
6360 (maybe_move_out_of_jump_pad): New.
6361 (enqueue_one_deferred_signal): New.
6362 (dequeue_one_deferred_signal): New.
6363 (linux_wait_for_event_1): If moving out of a jump pad, defer
6364 pending signals to later.
6365 (linux_stabilize_threads): New.
6366 (linux_wait_1): Check if threads need moving out of jump pads, and
6367 do it if so.
6368 (stuck_in_jump_pad_callback): New.
6369 (move_out_of_jump_pad_callback): New.
6370 (lwp_running): New.
6371 (linux_resume_one_lwp): Handle moving out of jump pads.
6372 (linux_set_resume_request): Dequeue deferred signals.
6373 (need_step_over_p): Also step over fast tracepoint jumps.
6374 (start_step_over): Also uninsert fast tracepoint jumps.
6375 (finish_step_over): Also reinsert fast tracepoint jumps.
6376 (linux_install_fast_tracepoint_jump): New.
6377 (linux_target_ops): Install linux_stabilize_threads and
6378 linux_install_fast_tracepoint_jump_pad.
6379 * linux-low.h (linux_target_ops) <get_thread_area,
6380 install_fast_tracepoint_jump_pad>: New fields.
6381 (struct lwp_info) <collecting_fast_tracepoint,
6382 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6383 (linux_get_thread_area): Declare.
6384 * linux-x86-low.c (jump_insn): New.
6385 (x86_get_thread_area): New.
6386 (append_insns): New.
6387 (push_opcode): New.
6388 (amd64_install_fast_tracepoint_jump_pad): New.
6389 (i386_install_fast_tracepoint_jump_pad): New.
6390 (x86_install_fast_tracepoint_jump_pad): New.
6391 (the_low_target): Install x86_get_thread_area and
6392 x86_install_fast_tracepoint_jump_pad.
6393 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6394 (struct fast_tracepoint_jump): New.
6395 (fast_tracepoint_jump_insn): New.
6396 (fast_tracepoint_jump_shadow): New.
6397 (find_fast_tracepoint_jump_at): New.
6398 (fast_tracepoint_jump_here): New.
6399 (delete_fast_tracepoint_jump): New.
6400 (set_fast_tracepoint_jump): New.
6401 (uninsert_fast_tracepoint_jumps_at): New.
6402 (reinsert_fast_tracepoint_jumps_at): New.
6403 (set_breakpoint_at): Use write_inferior_memory.
6404 (uninsert_raw_breakpoint): Use write_inferior_memory.
6405 (check_mem_read): Mask out fast tracepoint jumps.
6406 (check_mem_write): Mask out fast tracepoint jumps.
6407 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6408 (set_fast_tracepoint_jump): Declare.
6409 (delete_fast_tracepoint_jump)
6410 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6411 (reinsert_fast_tracepoint_jumps_at): Declare.
6412 * regcache.c: Don't compile many functions when building the
6413 in-process agent library.
6414 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6415 the register buffer in the heap.
6416 (free_register_cache): If the register buffer isn't owned by the
6417 regcache, don't free it.
6418 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6419 pre-existing register caches.
6420 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6421 type.
6422 (convert_ascii_to_int): : Constify `from' parameter type.
6423 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6424 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6425 the needed buffer in-place.
6426 (relocate_instruction): New.
6427 * server.c (handle_query) <qSymbols>: If the target supports
6428 tracepoints, give it a chance of looking up symbols. Report
6429 support for fast tracepoints.
6430 (handle_status): Stabilize threads.
6431 (process_serial_event): Adjust.
6432 * server.h (struct fast_tracepoint_jump): Forward declare.
6433 (struct process_info) <fast_tracepoint_jumps>: New field.
6434 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6435 (decode_X_packet, decode_M_packet): Adjust.
6436 (relocate_instruction): Declare.
6437 (in_process_agent_loaded): Declare.
6438 (tracepoint_look_up_symbols): Declare.
6439 (struct fast_tpoint_collect_status): Declare.
6440 (fast_tracepoint_collecting): Declare.
6441 (force_unlock_trace_buffer): Declare.
6442 (handle_tracepoint_bkpts): Declare.
6443 (initialize_low_tracepoint)
6444 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6445 * target.h (struct target_ops) <stabilize_threads,
6446 install_fast_tracepoint_jump_pad>: New fields.
6447 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6448 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6449 [HAVE_STDINT_H]: Include stdint.h.
6450 (trace_debug_1): Rename to ...
6451 (trace_vdebug): ... this.
6452 (trace_debug): Rename to ...
6453 (trace_debug_1): ... this. Add `level' parameter.
6454 (trace_debug): New.
6455 (ATTR_USED, ATTR_NOINLINE): New.
6456 (IP_AGENT_EXPORT): New.
6457 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6458 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6459 (about_to_request_buffer_space, trace_buffer_is_full)
6460 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6461 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6462 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6463 (traceframe_write_count, traceframes_created)
6464 (trace_state_variables)
6465 New renaming defines.
6466 (struct ipa_sym_addresses): New.
6467 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6468 (symbol_list): New.
6469 (ipa_sym_addrs): New.
6470 (all_tracepoint_symbols_looked_up): New.
6471 (in_process_agent_loaded): New.
6472 (write_e_ipa_not_loaded): New.
6473 (maybe_write_ipa_not_loaded): New.
6474 (tracepoint_look_up_symbols): New.
6475 (debug_threads) [IN_PROCESS_AGENT]: New.
6476 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6477 (UNKNOWN_SIDE_EFFECTS): New.
6478 (stop_tracing): New.
6479 (flush_trace_buffer): New.
6480 (stop_tracing_bkpt): New.
6481 (flush_trace_buffer_bkpt): New.
6482 (read_inferior_integer): New.
6483 (read_inferior_uinteger): New.
6484 (read_inferior_data_pointer): New.
6485 (write_inferior_data_pointer): New.
6486 (write_inferior_integer): New.
6487 (write_inferior_uinteger): New.
6488 (struct collect_static_trace_data_action): Delete.
6489 (enum tracepoint_type): New.
6490 (struct tracepoint) <type>: New field `type'.
6491 <actions_str, step_actions, step_actions_str>: Only include in
6492 GDBserver.
6493 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6494 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6495 (tracepoints): Use IP_AGENT_EXPORT.
6496 (last_tracepoint): Don't include in the IPA.
6497 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6498 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6499 (alloced_trace_state_variables): New.
6500 (trace_state_variables): Use IP_AGENT_EXPORT.
6501 (traceframe_t): Delete unused variable.
6502 (circular_trace_buffer): Don't include in the IPA.
6503 (trace_buffer_start): Delete.
6504 (struct trace_buffer_control): New.
6505 (trace_buffer_free): Delete.
6506 (struct ipa_trace_buffer_control): New.
6507 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6508 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6509 New.
6510 (trace_buffer_ctrl): New.
6511 (TRACE_BUFFER_CTRL_CURR): New.
6512 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6513 Reimplement as macros.
6514 (trace_buffer_wrap): Delete.
6515 (traceframe_write_count, traceframe_read_count)
6516 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6517 (struct tracepoint_hit_ctx) <type>: New field.
6518 (struct fast_tracepoint_ctx): New.
6519 (memory_barrier): New.
6520 (cmpxchg): New.
6521 (record_tracepoint_error): Update atomically in the IPA.
6522 (clear_inferior_trace_buffer): New.
6523 (about_to_request_buffer_space): New.
6524 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6525 updating the same buffer.
6526 (add_tracepoint): Default the tracepoint's type to trap
6527 tracepoint, and orig_size to -1.
6528 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6529 internal variables.
6530 (create_trace_state_variable): New parameter `gdb'. Handle it.
6531 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6532 (cmd_qtdp): Handle fast tracepoints.
6533 (cmd_qtdv): Adjust.
6534 (max_jump_pad_size): New.
6535 (gdb_jump_pad_head): New.
6536 (get_jump_space_head): New.
6537 (claim_jump_space): New.
6538 (sort_tracepoints): New.
6539 (MAX_JUMP_SIZE): New.
6540 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6541 IPA.
6542 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6543 support. Upload fast traceframes, and delete internal IPA
6544 breakpoints.
6545 (stop_tracing_handler): New.
6546 (flush_trace_buffer_handler): New.
6547 (cmd_qtstop): Upload fast tracepoints.
6548 (response_tracepoint): Handle fast tracepoints.
6549 (tracepoint_finished_step): Upload fast traceframes. Set the
6550 tracepoint hit context's tracepoint type.
6551 (handle_tracepoint_bkpts): New.
6552 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6553 type. Add comment about fast tracepoints.
6554 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6555 non-existing action_str field.
6556 (get_context_regcache): Handle fast tracepoints.
6557 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6558 to the regcache.
6559 (fast_tracepoint_from_jump_pad_address): New.
6560 (fast_tracepoint_from_ipa_tpoint_address): New.
6561 (collecting_t): New.
6562 (force_unlock_trace_buffer): New.
6563 (fast_tracepoint_collecting): New.
6564 (collecting): New.
6565 (gdb_collect): New.
6566 (write_inferior_data_ptr): New.
6567 (target_tp_heap): New.
6568 (target_malloc): New.
6569 (download_agent_expr): New.
6570 (UALIGN): New.
6571 (download_tracepoints): New.
6572 (download_trace_state_variables): New.
6573 (upload_fast_traceframes): New.
6574 (IPA_FIRST_TRACEFRAME): New.
6575 (IPA_NEXT_TRACEFRAME_1): New.
6576 (IPA_NEXT_TRACEFRAME): New.
6577 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6578 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6579 (gdb_jump_pad_buffer_end): New.
6580 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6581 (initialize_tracepoint): Adjust.
6582 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6583 buffer. Initialize the low module.
6584 * utils.c (PREFIX, TOOLNAME): New.
6585 (malloc_failure): Use PREFIX.
6586 (error): In the IPA, an error causes an exit.
6587 (fatal, warning): Use PREFIX.
6588 (internal_error): Use TOOLNAME.
6589 (NUMCELLS): Increase to 10.
6590 * configure, config.in: Regenerate.
6591
6592 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6593
6594 * server.c (handle_query) <qSupported>: Do two passes over the
6595 qSupported string to avoid nesting strtok.
6596
6597 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6598
6599 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6600 (CDEPS): New.
6601 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6602 -Wl,--dynamic-list.
6603 * configure: Regenerate.
6604 * proc-service.list: New.
6605
6606 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6607
6608 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6609 New comment.
6610
6611 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6612
6613 * gdbreplay.c (remote_open): Check error return from socket() call by
6614 its equality to -1 not by it being negative.
6615 * remote-utils.c (remote_open): Likewise.
6616
6617 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6618
6619 * config.h: Regenerate.
6620
6621 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6622
6623 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6624 doesn't provide PTRACE_GET_THREAD_AREA.
6625
6626 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6627
6628 * linux-m68k-low.c: Include <asm/ptrace.h>
6629 (ps_get_thread_area): Implement.
6630
6631 2010-05-03 Doug Evans <dje@google.com>
6632
6633 * event-loop.c (struct callback_event): New struct.
6634 (callback_list): New global.
6635 (append_callback_event, delete_callback_event): New functions.
6636 (process_callback): New function.
6637 (start_event_loop): Call it.
6638 * remote-utils.c (NOT_SCHEDULED): Define.
6639 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6640 moved out of readchar.
6641 (readchar): Rewrite. Call reschedule before returning.
6642 (reset_readchar): New function.
6643 (remote_close): Call it.
6644 (process_remaining, reschedule): New functions.
6645 * server.h (callback_handler_func): New typedef.
6646 (append_callback_event, delete_callback_event): Declare.
6647
6648 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6649
6650 * proc-service.c (ps_pglobal_lookup): Use
6651 thread_db_look_up_one_symbol.
6652 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6653 parameter. Use it instead of all_symbols_looked_up.
6654 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6655 field.
6656 (all_symbols_looked_up): Don't declare.
6657 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6658 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6659 field.
6660 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6661 Set all_symbols_looked_up here.
6662 (thread_db_look_up_one_symbol): New.
6663 (thread_db_get_tls_address): Adjust.
6664 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6665 thread_db object on the heap, and tentatively set it in the
6666 process structure.
6667 (thread_db_init): Don't set all_symbols_looked_up here.
6668 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6669
6670 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6671
6672 * linux-low.c (linux_kill, linux_detach): Adjust.
6673 (status_pending_p_callback): Remove redundant statement. Check
6674 for !TARGET_WAITIKIND_IGNORE, instead of
6675 TARGET_WAITKIND_STOPPED.
6676 (handle_tracepoints): Make sure LWP is locked. Adjust.
6677 (linux_wait_for_event_1): Adjust.
6678 (linux_cancel_breakpoints): New.
6679 (unsuspend_one_lwp): New.
6680 (unsuspend_all_lwps): New.
6681 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6682 (send_sigstop_callback): Change return type to int, add new
6683 `except' parameter and handle it.
6684 (suspend_and_send_sigstop_callback): New.
6685 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6686 pass them down. If SUSPEND, also increment the lwp's suspend
6687 count.
6688 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6689 (need_step_over_p): Don't consider suspended LWPs.
6690 (start_step_over): Adjust.
6691 (proceed_one_lwp): Change return type to int, add new `except'
6692 parameter and handle it.
6693 (unsuspend_and_proceed_one_lwp): New.
6694 (proceed_all_lwps): Use find_inferior instead of
6695 for_each_inferior.
6696 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6697 also decrement the suspend count of LWPs. Pass `except' down,
6698 instead of hacking its suspend count.
6699 (linux_pause_all): Add `freeze' parameter. Adjust.
6700 (linux_unpause_all): New.
6701 (linux_target_ops): Install linux_unpause_all.
6702 * server.c (handle_status): Adjust.
6703 * target.h (struct target_ops): New fields `unpause_all' and
6704 `cancel_breakpoints'. Add new parameter to `pause_all'.
6705 (pause_all): Add new `freeze' parameter.
6706 (unpause_all): New.
6707 (cancel_breakpoints): New.
6708 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6709 cancel breakpoints.
6710 (cmd_qtstart): Pause threads.
6711 (stop_tracing): Pause threads, and cancel breakpoints.
6712 * win32-low.c (win32_target_ops): Adjust.
6713
6714 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6715
6716 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6717 the inferior right away from here...
6718 (linux_wait_1): ... to here, and adjust to check the thread's
6719 last_resume_kind instead of the lwp's step or stop_expected flags.
6720
6721 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6722
6723 * README: Use consistent `GDB' and `GDBserver' spellings.
6724
6725 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6726
6727 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6728 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6729 (linux_detach_one_lwp): Assume the lwp is stopped.
6730 (any_thread_of): Delete.
6731 (linux_detach): Stop all lwps here. Don't blindly delete all
6732 breakpoints.
6733 (delete_lwp_callback): New.
6734 (linux_mourn): Delete all lwps of the process that is gone.
6735 (linux_wait_1): Don't delete the last lwp of the process here.
6736 * mem-break.h (mark_breakpoints_out): Declare.
6737 * mem-break.c (mark_breakpoints_out): New.
6738 (free_all_breakpoints): Use it.
6739 * server.c (handle_target_event): If the process is gone, mark
6740 breakpoints out.
6741 * thread-db.c (struct thread_db) <create_bp>: New field.
6742 (thread_db_enable_reporting): Fix prototype. Store a thread event
6743 breakpoint reference in the thread_db struct.
6744 (thread_db_load_search): Clear the thread_db object.
6745 (try_thread_db_load_1): Ditto.
6746 (switch_to_process): New.
6747 (disable_thread_event_reporting): Use it.
6748 (remove_thread_event_breakpoints): New.
6749 (thread_db_detach, thread_db_mourn): Use it.
6750
6751 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6752
6753 * linux-low.c (linux_enable_event_reporting): New.
6754 (linux_wait_for_event_1, handle_extended_wait): Use it.
6755
6756 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6757
6758 * linux-low.c (linux_kill_one_lwp, linux_kill)
6759 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6760 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6761 SIGSTOP even if the LWP is stopped.
6762 (send_sigstop_callback): New.
6763 (stop_all_lwps): Use send_sigstop_callback instead.
6764 (linux_resume_one_thread): Adjust.
6765 (proceed_one_lwp): Still proceed an LWP that the client has
6766 requested to stop, if we haven't reported it as stopped yet. Make
6767 sure that LWPs the client want stopped, have a pending SIGSTOP.
6768
6769 2010-04-26 Doug Evans <dje@google.com>
6770
6771 * server.c (handle_general_set): Make static.
6772
6773 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6774 Print received char after testing for error/eof instead of before.
6775 (input_interrupt): Tweak comment.
6776
6777 2010-04-23 Doug Evans <dje@google.com>
6778
6779 * server.c (start_inferior): Print inferior argv if --debug.
6780
6781 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6782
6783 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6784 * nto-x86-low.c: Include server.h
6785
6786 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6787
6788 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6789 be consistent with other sources of this directory.
6790 (init_registers_amd64): Correct name of source file of this function
6791 in the comment.
6792
6793 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6794
6795 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6796 64-bit executables.
6797
6798 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6799
6800 * win32-i386-low.c: Add 64-bit support.
6801 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6802 (init_registers_amd64): Declare.
6803 (mappings): Add 64-bit version of array.
6804 (init_windows_x86): New function.
6805 (the_low_target): Change init_arch field to init_windows_x86.
6806
6807 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6808
6809 * win32-low.c: Adapt to support also 64-bit architecture.
6810 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6811 (get_image_name): Use SIZE_T type for local variable `done'.
6812 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6813 (toolhelp_get_dll_name): Idem.
6814 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6815 Use uintptr_t typecast to avoid warning.
6816 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6817 (handle_exception): Use phex_nz to avoid warning.
6818 (win32_wait): Remove unused local variable `process'.
6819
6820 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6821
6822 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6823 `amd64-avx.o'.
6824
6825 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6826
6827 * configure.ac: Use `ws2_32' library for srv_mingw.
6828 * configure: Regenerate.
6829 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6830 * remote-utils.c: Likewise.
6831
6832 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6833
6834 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6835 if __x86_64__ is defined.
6836
6837 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6838
6839 * configure: Regenerate.
6840
6841 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6842
6843 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6844 * target.h (target_ops): New get_tib_address field.
6845 * win32-low.h (win32_thread_info): Add thread_local_base field.
6846 * win32-low.c (child_add_thread): Add tlb argument.
6847 Set thread_local_base field to TLB.
6848 (get_child_debug_event): Adapt to child_add_thread change.
6849 (win32_get_tib_address): New function.
6850 (win32_target_ops): Set get_tib_address field to
6851 win32_get_tib_address.
6852 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6853
6854 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6855
6856 * linux-low.c (linux_mourn): Also remove the process.
6857 * server.c (handle_target_event): Don't remove the process here.
6858 * nto-low.c (nto_mourn): New.
6859 (nto_target_ops): Install it.
6860 * spu-low.c (spu_mourn): New.
6861 (spu_target_ops): Install it.
6862 * win32-low.c (win32_mourn): New.
6863 (win32_target_ops): Install it.
6864
6865 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6866
6867 * server.h (buffer_xml_printf): Remove redundant `;'.
6868
6869 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6870
6871 * regcache.c (set_register_cache): Invalidate regcaches before
6872 changing the register cache layout.
6873 (regcache_invalidate_one): Allow a NULL regcache.
6874 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6875 regcaches before changing the register cache layout or the target
6876 regsets.
6877
6878 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6879
6880 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6881 variable warning on Linux/x86-64.
6882
6883 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6884
6885 GDBserver disconnected tracing support.
6886
6887 * linux-low.c (linux_remove_process): Delete.
6888 (add_lwp): Don't set last_resume_kind here.
6889 (linux_kill): Use `mourn'.
6890 (linux_detach): Use `thread_db_detach', and `mourn'.
6891 (linux_mourn): New.
6892 (linux_attach_lwp_1): Adjust comment.
6893 (linux_attach): last_resume_kind moved the thread_info; adjust.
6894 (status_pending_p_callback): Adjust.
6895 (linux_wait_for_event_1): Adjust.
6896 (count_events_callback, select_singlestep_lwp_callback)
6897 (select_event_lwp_callback, cancel_breakpoints_callback)
6898 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6899 (proceed_one_lwp): Adjust.
6900 (linux_async): Add debug output.
6901 (linux_thread_stopped): New.
6902 (linux_pause_all): New.
6903 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6904 linux_pause_all.
6905 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6906 (thread_db_free): Delete declaration.
6907 (thread_db_detach, thread_db_mourn): Declare.
6908 * thread-db.c (thread_db_init): Use thread_db_mourn.
6909 (thread_db_free): Delete, split in two.
6910 (disable_thread_event_reporting): New.
6911 (thread_db_detach): New.
6912 (thread_db_mourn): New.
6913
6914 * server.h (struct thread_info) <last_resume_kind>: New field.
6915 <attached>: Add comment.
6916 <gdb_detached>: New field.
6917 (handler_func): Change return type to int.
6918 (handle_serial_event, handle_target_event): Ditto.
6919 (gdb_connected): Declare.
6920 (tracing): Delete.
6921 (disconnected_tracing): Declare.
6922 (stop_tracing): Declare.
6923
6924 * server.c (handle_query) <qSupported>: Report support for
6925 disconnected tracing.
6926 (queue_stop_reply_callback): Account for running threads.
6927 (gdb_wants_thread_stopped): New.
6928 (gdb_wants_all_threads_stopped): New.
6929 (gdb_reattached_process): New.
6930 (handle_status): Clear the `gdb_detached' flag of all processes.
6931 In all-stop, stop all threads.
6932 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6933 (process_serial_event): If the remote connection breaks, or if an
6934 exit was forced with "monitor exit", force an event loop exit.
6935 Handle disconnected tracing on detach.
6936 (handle_serial_event): Adjust.
6937 (handle_target_event): If GDB isn't connected, forward events back
6938 to the inferior, unless the last process exited, in which case,
6939 exit gdbserver. Adjust interface.
6940
6941 * remote-utils.c (remote_open): Don't block in accept. Instead
6942 register an event loop source on the listen socket file
6943 descriptor. Refactor bits into ...
6944 (listen_desc): ... this new global.
6945 (gdb_connected): ... this new function.
6946 (enable_async_notification): ... this new function.
6947 (handle_accept_event): ... this new function.
6948 (remote_close): Clear remote_desc.
6949
6950 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6951
6952 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6953 New fields.
6954 (mourn_inferior): Define.
6955 (target_process_qsupported): Avoid the dangling else problem.
6956 (thread_stopped): Define.
6957 (pause_all): Define.
6958 (target_waitstatus_to_string): Declare.
6959 * target.c (target_waitstatus_to_string): New.
6960
6961 * tracepoint.c (tracing): Make extern.
6962 (disconnected_tracing): New.
6963 (stop_tracing): Make extern. Handle tracing stops due to GDB
6964 disconnecting.
6965 (cmd_qtdisconnected): New.
6966 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6967 (handle_tracepoint_general_set): Handle QTDisconnected.
6968
6969 * event-loop.c (event_handler_func): Change return type to int.
6970 (process_event): Bail out if the event handler wants the event
6971 loop to stop.
6972 (handle_file_event): Ditto.
6973 (start_event_loop): Bail out if the event handler wants the event
6974 loop to stop.
6975
6976 * nto-low.c (nto_target_ops): Adjust.
6977 * spu-low.c (spu_wait): Don't remove the process here.
6978 (spu_target_ops): Adjust.
6979 * win32-low.c (win32_wait): Don't remove the process here.
6980 (win32_target_ops): Adjust.
6981
6982 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6983
6984 * regcache.c (realloc_register_cache): Invalidate inferior's
6985 regcache before recreating it.
6986
6987 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6988
6989 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6990
6991 2010-04-09 Stan Shebs <stan@codesourcery.com>
6992 Pedro Alves <pedro@codesourcery.com>
6993
6994 * server.h (LONGEST): New.
6995 (struct thread_info) <while_stepping>: New field.
6996 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6997 Declare.
6998 (initialize_tracepoint, handle_tracepoint_general_set)
6999 (handle_tracepoint_query, tracepoint_finished_step)
7000 (tracepoint_was_hit, release_while_stepping_state_list):
7001 (current_traceframe): Declare.
7002 * server.c (handle_general_set): Handle tracepoint packets.
7003 (read_memory): New.
7004 (write_memory): New.
7005 (handle_search_memory_1): Use read_memory.
7006 (handle_query): Report support for conditional tracepoints, trace
7007 state variables, and tracepoint sources. Handle tracepoint
7008 queries.
7009 (main): Initialize the tracepoints module.
7010 (process_serial_event): Handle traceframe reads/writes.
7011
7012 * linux-low.c (handle_tracepoints): New.
7013 (linux_wait_1): Call it.
7014 (linux_resume_one_lwp): Handle while-stepping.
7015 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7016 (linux_target_ops): Install them.
7017 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7018 New field.
7019 * linux-x86-low.c (x86_supports_tracepoints): New.
7020 (the_low_target). Install it.
7021
7022 * mem-break.h (delete_breakpoint): Declare.
7023 * mem-break.c (delete_breakpoint): Make external.
7024
7025 * target.h (struct target_ops): Add `supports_tracepoints',
7026 `read_pc', and `write_pc' fields.
7027 (target_supports_tracepoints): Define.
7028 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7029 (phex_nz): New.
7030
7031 * regcache.h (struct regcache) <registers_owned>: New field.
7032 (init_register_cache, regcache_cpy): Declare.
7033 (regcache_read_pc, regcache_write_pc): Declare.
7034 (register_cache_size): Declare.
7035 (supply_regblock): Declare.
7036 * regcache.c (init_register_cache): New.
7037 (new_register_cache): Use it.
7038 (regcache_cpy): New.
7039 (register_cache_size): New.
7040 (supply_regblock): New.
7041 (regcache_read_pc, regcache_write_pc): New.
7042
7043 * tracepoint.c: New.
7044
7045 * Makefile.in (OBS): Add tracepoint.o.
7046 (tracepoint.o): New rule.
7047
7048 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7049
7050 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7051 (i386-mmx.o): New.
7052 (i386-mmx.c): Likewise.
7053 (i386-mmx-linux.o): Likewise.
7054 (i386-mmx-linux.c): Likewise.
7055
7056 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7057 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7058 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7059 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7060
7061 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7062 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7063 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7064
7065 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7066
7067 * Makefile.in (clean): Updated.
7068 (i386-avx.o): New.
7069 (i386-avx.c): Likewise.
7070 (i386-avx-linux.o): Likewise.
7071 (i386-avx-linux.c): Likewise.
7072 (amd64-avx.o): Likewise.
7073 (amd64-avx.c): Likewise.
7074 (amd64-avx-linux.o): Likewise.
7075 (amd64-avx-linux.c): Likewise.
7076
7077 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7078 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7079 (srv_amd64_regobj): Add amd64-avx.o.
7080 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7081 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7082 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7083 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7084 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7085 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7086 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7087
7088 * i387-fp.c: Include "i386-xstate.h".
7089 (i387_xsave): New.
7090 (i387_cache_to_xsave): Likewise.
7091 (i387_xsave_to_cache): Likewise.
7092 (x86_xcr0): Likewise.
7093
7094 * i387-fp.h (i387_cache_to_xsave): Likewise.
7095 (i387_xsave_to_cache): Likewise.
7096 (x86_xcr0): Likewise.
7097
7098 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7099 * linux-crisv32-low.c (target_regsets): Likewise.
7100 * linux-m68k-low.c (target_regsets): Likewise.
7101 * linux-mips-low.c (target_regsets): Likewise.
7102 * linux-ppc-low.c (target_regsets): Likewise.
7103 * linux-s390-low.c (target_regsets): Likewise.
7104 * linux-sh-low.c (target_regsets): Likewise.
7105 * linux-sparc-low.c (target_regsets): Likewise.
7106 * linux-xtensa-low.c (target_regsets): Likewise.
7107
7108 * linux-low.c: Include <sys/uio.h>.
7109 (regsets_fetch_inferior_registers): Support nt_type.
7110 (regsets_store_inferior_registers): Likewise.
7111 (linux_process_qsupported): New.
7112 (linux_target_ops): Add linux_process_qsupported.
7113
7114 * linux-low.h (regset_info): Add nt_type.
7115 (linux_target_ops): Add process_qsupported.
7116
7117 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7118 and <sys/uio.h>.
7119 (init_registers_i386_avx_linux): New.
7120 (init_registers_amd64_avx_linux): Likewise.
7121 (xmltarget_i386_linux_no_xml): Likewise.
7122 (xmltarget_amd64_linux_no_xml): Likewise.
7123 (PTRACE_GETREGSET): Likewise.
7124 (PTRACE_SETREGSET): Likewise.
7125 (x86_fill_xstateregset): Likewise.
7126 (x86_store_xstateregset): Likewise.
7127 (use_xml): Likewise.
7128 (x86_linux_update_xmltarget): Likewise.
7129 (x86_linux_process_qsupported): Likewise.
7130 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7131 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7132 init_registers_i386_linux here. Call
7133 x86_linux_update_xmltarget.
7134 (the_low_target): Add x86_linux_process_qsupported.
7135
7136 * server.c (handle_query): Call target_process_qsupported.
7137
7138 * target.h (target_ops): Add process_qsupported.
7139 (target_process_qsupported): New.
7140
7141 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7142
7143 * inferiors.c (add_thread): Set last_status kind to
7144 TARGET_WAITKIND_IGNORE.
7145 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7146 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7147 (linux_wait_1): Move `thread' local definition to block that uses
7148 it. Don't NULL initialize `event_child'.
7149 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7150 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7151 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7152
7153 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7154
7155 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7156 an extended waitstatus, or by a watchpoint.
7157 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7158 thread was stepping or has been stopped by a watchpoint.
7159
7160 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7161
7162 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7163 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7164 of another, then delete the previous, and validate all
7165 breakpoints.
7166 (validate_inserted_breakpoint): New.
7167 (delete_disabled_breakpoints): New.
7168 (validate_breakpoints): New.
7169 (check_mem_read): Validate breakpoints before trusting their
7170 shadow. Delete disabled breakpoints.
7171 (check_mem_write): Validate breakpoints before trusting they
7172 should be inserted. Delete disabled breakpoints.
7173 * mem-break.h (validate_breakpoints):
7174 * server.c (handle_query): Validate breakpoints when we see a
7175 qSymbol query.
7176
7177 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7178
7179 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7180 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7181 if we could tell there's a GDB breakpoint at stop_pc.
7182 (need_step_over_p): Don't do a step over if we find a GDB
7183 breakpoint at the resume PC.
7184
7185 * mem-break.c (struct raw_breakpoint): New.
7186 (enum bkpt_type): New type `gdb_breakpoint'.
7187 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7188 fields. New field `raw'.
7189 (find_raw_breakpoint_at): New.
7190 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7191 breakpoint instead.
7192 (set_breakpoint_at): Adjust.
7193 (delete_raw_breakpoint): New.
7194 (release_breakpoint): New.
7195 (delete_breakpoint): Rename to...
7196 (delete_breakpoint_1): ... this. Add proc parameter. Use
7197 release_breakpoint. Return ENOENT.
7198 (delete_breakpoint): Reimplement.
7199 (find_breakpoint_at): Delete.
7200 (find_gdb_breakpoint_at): New.
7201 (delete_breakpoint_at): Delete.
7202 (set_gdb_breakpoint_at): New.
7203 (delete_gdb_breakpoint_at): New.
7204 (gdb_breakpoint_here): New.
7205 (set_reinsert_breakpoint): Use release_breakpoint.
7206 (uninsert_breakpoint): Rename to ...
7207 (uninsert_raw_breakpoint): ... this.
7208 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7209 (reinsert_raw_breakpoint): Change parameter type to
7210 raw_breakpoint.
7211 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7212 instead.
7213 (check_breakpoints): Adjust. Use release_breakpoint.
7214 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7215 (breakpoint_inserted_here): Ditto.
7216 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7217 Don't trust the breakpoint's shadow if it is not inserted.
7218 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7219 (delete_all_breakpoints): Adjust.
7220 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7221 use delete_breakpoint_1.
7222
7223 * mem-break.h (breakpoints_supported): Delete declaration.
7224 (set_gdb_breakpoint_at): Declare.
7225 (gdb_breakpoint_here): Declare.
7226 (delete_breakpoint_at): Delete.
7227 (delete_gdb_breakpoint_at): Declare.
7228
7229 * server.h (struct raw_breakpoint): Forward declare.
7230 (struct process_info): New field `raw_breakpoints'.
7231
7232 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7233 breakpoints.
7234
7235 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7236
7237 * linux-low.c (status_pending_p_callback): Fix comment.
7238 (linux_wait_for_event_1): Move most of the internal breakpoint
7239 handling from here...
7240 (linux_wait_1): ... to here.
7241 (count_events_callback): New.
7242 (select_singlestep_lwp_callback): New.
7243 (select_event_lwp_callback): New.
7244 (cancel_breakpoints_callback): New.
7245 (select_event_lwp): New.
7246 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7247 priority to all LWPs that have had events that should be reported
7248 to the client. Cancel breakpoints when about to reporting the
7249 event to the client, not while stopping lwps. No longer cancel
7250 finished single-steps here.
7251 (cancel_finished_single_step): Delete.
7252 (cancel_finished_single_steps): Delete.
7253
7254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7255
7256 * mem-break.c (enum bkpt_type): New.
7257 (struct breakpoint): New field `type'.
7258 (set_breakpoint_at): Change return type to struct breakpoint
7259 pointer. Set type to `other_breakpoint' by default.
7260 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7261 in the breakpoint list.
7262 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7263 (reinsert_breakpoint): Rename to ...
7264 (reinsert_raw_breakpoint): ... this.
7265 (reinsert_breakpoints_at): Adjust.
7266 * mem-break.h (struct breakpoint): Declare.
7267 (set_breakpoint_at): Change return type to struct breakpoint
7268 pointer.
7269
7270 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7271
7272 * server.c (handle_query): Assign, not compare.
7273
7274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7275
7276 Teach linux gdbserver to step-over-breakpoints.
7277
7278 * linux-low.c (can_hardware_single_step): New.
7279 (supports_breakpoints): New.
7280 (handle_extended_wait): If stopping threads, read the stop pc of
7281 the new cloned LWP.
7282 (get_pc): New.
7283 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7284 low target doesn't support retrieving the PC.
7285 (add_lwp): Set last_resume_kind to resume_continue.
7286 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7287 (linux_attach): Don't clear stop_expected. Set the lwp's
7288 last_resume_kind to resume_stop.
7289 (linux_detach_one_lwp): Don't check for removed breakpoints.
7290 (check_removed_breakpoint): Delete.
7291 (status_pending_p): Rename to ...
7292 (status_pending_p_callback): ... this. Don't check for removed
7293 breakpoints. Don't consider threads that are stopped from GDB's
7294 perspective.
7295 (linux_wait_for_lwp): Always read the stop_pc here.
7296 (cancel_breakpoint): New.
7297 (step_over_bkpt): New global.
7298 (linux_wait_for_event_1): Implement stepping over breakpoints.
7299 (gdb_wants_lwp_stopped): New.
7300 (gdb_wants_all_stopped): New.
7301 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7302 single-step traps here. Store the thread's last reported target
7303 wait status.
7304 (send_sigstop): Don't clear stop_expected. Always set it,
7305 instead.
7306 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7307 (cancel_finished_single_step): New.
7308 (cancel_finished_single_steps): New.
7309 (wait_for_sigstop): Don't cancel finished single-step traps here.
7310 (linux_resume_one_lwp): Don't check for removed breakpoints.
7311 Don't set `step' on non-hardware step archs.
7312 (linux_set_resume_request): Ignore resume_stop requests if already
7313 stopping or stopped. Set the lwp's last_resume_kind.
7314 (resume_status_pending_p): Don't check for removed breakpoints.
7315 (need_step_over_p): New.
7316 (start_step_over): New.
7317 (finish_step_over): New.
7318 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7319 requests. Clear the thread's last reported target waitstatus.
7320 Don't use the `suspended' flag. Don't consider pending breakpoints.
7321 (linux_resume): Start a step-over if necessary.
7322 (proceed_one_lwp): New.
7323 (proceed_all_lwps): New.
7324 (unstop_all_lwps): New.
7325 * linux-low.h (struct lwp_info): Rewrite comment for the
7326 `suspended' flag. Add the `stop_pc' field. Delete the
7327 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7328 Add `'last_resume_kind' and `need_step_over' fields.
7329 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7330 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7331 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7332 (set_raw_breakpoint_at): New.
7333 (set_breakpoint_at): Rewrite to use it.
7334 (reinsert_breakpoint_handler): Delete.
7335 (set_reinsert_breakpoint): New.
7336 (reinsert_breakpoint_by_bp): Delete.
7337 (delete_reinsert_breakpoints): New.
7338 (uninsert_breakpoint): Rewrite.
7339 (uninsert_breakpoints_at): New.
7340 (reinsert_breakpoint): Rewrite.
7341 (reinsert_breakpoints_at): New.
7342 (check_breakpoints): Rewrite.
7343 (breakpoint_here): New.
7344 (breakpoint_inserted_here): New.
7345 (check_mem_read): Adjust.
7346 * mem-break.h (breakpoints_supported, breakpoint_here)
7347 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7348 (reinsert_breakpoint_by_bp): Delete declaration.
7349 (delete_reinsert_breakpoints): Declare.
7350 (reinsert_breakpoint): Delete declaration.
7351 (reinsert_breakpoints_at): Declare.
7352 (uninsert_breakpoint): Delete declaration.
7353 (uninsert_breakpoints_at): Declare.
7354 (check_breakpoints): Adjust prototype.
7355 * server.h: Adjust include order.
7356 (struct thread_info): Declare here. Add a `last_status' field.
7357
7358 2010-03-23 Michael Snyder <msnyder@vmware.com>
7359
7360 * server.c (crc32): New function.
7361 (handle_query): Add handling for 'qCRC:' request.
7362
7363 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7364
7365 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7366 lwp had been stopped by a watchpoint.
7367
7368 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7369
7370 * server.h (internal_error): Declare.
7371 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7372 * utils.c (internal_error): New function.
7373
7374 2010-03-15 Andreas Schwab <schwab@redhat.com>
7375
7376 * configure.srv: Fix typo setting srv_regobj.
7377
7378 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7379
7380 * linux-low.c (fetch_register): Avoid passing a non string literal
7381 format to `error'.
7382 (usr_store_inferior_registers): Ditto.
7383
7384 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7385
7386 * linux-low.c (linux_write_memory): Bail out early if peeking
7387 memory failed.
7388
7389 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7390
7391 * linux-low.h (struct lwp_info): New fields
7392 `stopped_by_watchpoint' and `stopped_data_address'.
7393 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7394 here, and cache them in the lwp object.
7395 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7396 directly.
7397 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7398 field.
7399 (linux_stopped_by_watchpoint): Rewrite.
7400 (linux_stopped_data_address): Rewrite.
7401
7402 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7403
7404 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7405 switching the current inferior, not before.
7406
7407 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7408
7409 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7410 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7411 i386-linux.c and amd64-linux.c.
7412 (reg-i386.o): Removed.
7413 (reg-i386.c): Likewise.
7414 (reg-i386-linux.o): Likewise.
7415 (reg-i386-linux.c): Likewise.
7416 (reg-x86-64.o): Likewise.
7417 (reg-x86-64.c): Likewise.
7418 (reg-x86-64-linux.o): Likewise.
7419 (reg-x86-64-linux.c): Likewise.
7420 (i386.o): New.
7421 (i386.c): Likewise.
7422 (i386-linux.o): Likewise.
7423 (i386-linux.c): Likewise.
7424 (amd64.o): Likewise.
7425 (amd64.c): Likewise.
7426 (amd64-linux.o): Likewise.
7427 (amd64-linux.c): Likewise.
7428
7429 * configure.srv (srv_i386_regobj): New.
7430 (srv_i386_linux_regobj): Likewise.
7431 (srv_amd64_regobj): Likewise.
7432 (srv_amd64_linux_regobj): Likewise.
7433 (srv_i386_32bit_xmlfiles): Likewise.
7434 (srv_i386_64bit_xmlfiles): Likewise.
7435 (srv_i386_xmlfiles): Likewise.
7436 (srv_amd64_xmlfiles): Likewise.
7437 (srv_i386_linux_xmlfiles): Likewise.
7438 (srv_amd64_linux_xmlfiles): Likewise.
7439 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7440 srv_xmlfiles to $srv_i386_xmlfiles.
7441 (i[34567]86-*-mingw32ce*): Likewise.
7442 (i[34567]86-*-mingw*): Likewise.
7443 (i[34567]86-*-nto*): Likewise.
7444 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7445 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7446 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7447 (x86_64-*-linux*): Likewise.
7448
7449 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7450 (init_registers_amd64_linux): New.
7451 (x86_arch_setup): Replace init_registers_x86_64_linux with
7452 init_registers_amd64_linux.
7453
7454 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7455
7456 * configure.ac: Check for libdl. If it is not available link against
7457 static libthread_db.
7458 * configure: Regenerate.
7459
7460 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7461
7462 PR9605
7463
7464 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7465 handing a read watchpoint.
7466 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7467
7468 2010-02-12 Doug Evans <dje@google.com>
7469
7470 * linux-low.c (linux_supports_tracefork_flag): Document.
7471 (linux_look_up_symbols): Add comment.
7472
7473 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7474
7475 * regcache.c (supply_register): Clear regcache if buf is NULL.
7476
7477 2010-02-02 Nicolas Roche <roche@sourceware.org>
7478 Joel Brobecker <brobecker@adacore.com>
7479
7480 * inferiors.c (find_inferior): Add function documentation.
7481 (unloaded_dll): Handle the case where the unloaded dll has not
7482 been previously registered in the dll list.
7483
7484 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7485
7486 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7487 (thumb2_breakpoint): New.
7488 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7489
7490 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7491
7492 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7493 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7494 breakpoints.
7495
7496 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7497
7498 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7499
7500 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7501
7502 * linux-s390-low.c (s390_collect_ptrace_register)
7503 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7504
7505 2010-01-21 Doug Evans <dje@google.com>
7506
7507 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7508 (PTRACE_ARG4_TYPE): New macro.
7509 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7510 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7511 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7512 (usr_store_inferior_registers): Ditto.
7513 (linux_read_memory, linux_write_memory): Ditto.
7514 (linux_test_for_tracefork): Ditto.
7515
7516 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7517 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7518
7519 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7520
7521 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7522 target.
7523
7524 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7525
7526 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7527 prototype to take a regcache. Adjust.
7528
7529 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7530
7531 * regcache.h (struct thread_info): Forward declare.
7532 (struct regcache): New.
7533 (new_register_cache): Adjust prototype.
7534 (get_thread_regcache): Declare.
7535 (free_register_cache): Adjust prototype.
7536 (registers_to_string, registers_from_string): Ditto.
7537 (supply_register, supply_register_by_name, collect_register)
7538 (collect_register_as_string, collect_register_by_name): Ditto.
7539 * regcache.c (struct inferior_regcache_data): Delete.
7540 (get_regcache): Rename to ...
7541 (get_thread_regcache): ... this. Adjust. Switch inferior before
7542 fetching registers.
7543 (regcache_invalidate_one): Adjust.
7544 (regcache_invalidate): Fix prototype.
7545 (new_register_cache): Return the new register cache.
7546 (free_register_cache): Change prototype.
7547 (realloc_register_cache): Adjust.
7548 (registers_to_string): Change prototype to take a regcache. Adjust.
7549 (registers_from_string): Ditto.
7550 (register_data): Ditto.
7551 (supply_register): Ditto.
7552 (supply_register_by_name): Ditto.
7553 (collect_register): Ditto.
7554 (collect_register_as_string): Ditto.
7555 (collect_register_by_name): Ditto.
7556 * server.c (process_serial_event): Adjust.
7557 * linux-low.h (regset_fill_func, regset_store_func): Change
7558 prototype.
7559 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7560 Change prototype.
7561 * linux-low.c (get_stop_pc): Adjust.
7562 (check_removed_breakpoint): Adjust.
7563 (linux_wait_for_event): Adjust.
7564 (linux_resume_one_lwp): Adjust.
7565 (fetch_register): Add regcache parameter. Adjust.
7566 (usr_store_inferior_registers): Ditto.
7567 (regsets_fetch_inferior_registers): Ditto.
7568 (regsets_store_inferior_registers): Ditto.
7569 (linux_fetch_registers, linux_store_registers): Ditto.
7570 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7571 regcache. Adjust.
7572 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7573 Ditto.
7574 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7575 prototype to take a regcache.
7576 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7577 * remote-utils.c (convert_ascii_to_int, outreg)
7578 (prepare_resume_reply): Change prototype to take a regcache.
7579 Adjust.
7580 * target.h (struct target_ops) <fetch_registers, store_registers>:
7581 Change prototype to take a regcache.
7582 (fetch_inferior_registers, store_inferior_registers): Change
7583 prototype to take a regcache. Adjust.
7584 * proc-service.c (ps_lgetregs): Adjust.
7585 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7586 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7587 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7588 take a regcache. Adjust.
7589 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7590 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7591 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7592 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7593 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7594 (cris_cannot_fetch_register):
7595 (cris_breakpoint_at): Change prototype to take a regcache.
7596 Adjust.
7597 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7598 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7599 to take a regcache. Adjust.
7600 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7601 Adjust.
7602 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7603 take a regcache. Adjust.
7604 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7605 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7606 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7607 * linux-mips-low.c (mips_get_pc):
7608 (mips_set_pc): Change prototype to take a regcache. Adjust.
7609 (mips_reinsert_addr): Adjust.
7610 (mips_collect_register): Change prototype to take a regcache.
7611 Adjust.
7612 (mips_supply_register):
7613 (mips_collect_register_32bit, mips_supply_register_32bit)
7614 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7615 (mips_store_fpregset): Ditto.
7616 * linux-ppc-low.c (ppc_supply_ptrace_register)
7617 (ppc_supply_ptrace_register): Ditto.
7618 (parse_spufs_run): Adjust.
7619 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7620 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7621 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7622 take a regcache. Adjust.
7623 * linux-s390-low.c (s390_collect_ptrace_register)
7624 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7625 (s390_set_pc): Change prototype to take a regcache. Adjust.
7626 (s390_arch_setup): Adjust.
7627 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7628 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7629 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7630 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7631 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7632 regcache. Adjust.
7633 (sparc_breakpoint_at): Adjust.
7634 * linux-xtensa-low.c (xtensa_fill_gregset):
7635 (xtensa_store_gregset):
7636 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7637 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7638 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7639 prototype to take a regcache. Adjust.
7640 * win32-arm-low.c (arm_fetch_inferior_register)
7641 (arm_store_inferior_register): Change prototype to take a
7642 regcache. Adjust.
7643 * win32-i386-low.c (i386_fetch_inferior_register)
7644 (i386_store_inferior_register): Change prototype to take a
7645 regcache. Adjust.
7646 * win32-low.c (child_fetch_inferior_registers)
7647 (child_store_inferior_registers): Change prototype to take a
7648 regcache. Adjust.
7649 (win32_wait): Adjust.
7650 (win32_fetch_inferior_registers): Change prototype to take a
7651 regcache. Adjust.
7652 (win32_store_inferior_registers): Adjust.
7653 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7654 store_inferior_register>: Change prototype to take a regcache.
7655
7656 2010-01-20 Doug Evans <dje@google.com>
7657
7658 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7659 #ifdef.
7660 (linux_wait_for_event1, linux_init_signals): Ditto.
7661 (W_STOPCODE): Provide definition if missing.
7662
7663 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7664
7665 * linux-low.c (linux_core_of_thread): New.
7666 (compare_ints, show_process, list_threads): New.
7667 (linux_qxfer_osdata): Report threads and cores.
7668 (linux_target_op): Register linux_core_of_thread.
7669 * remote-utils.c (prepare_resume_reply): Report the core.
7670 (buffer_xml_printf): Support %d specifier.
7671 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7672 New.
7673 (handle_query): Handle qXfer:threads. Announce availability
7674 thereof.
7675 * target.h (struct target_ops): New field core_of_thread.
7676
7677 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7678
7679 * Makefile.in (clean): Remove new generated files.
7680 (reg-s390.o, reg-s390.c): Remove rules.
7681 (reg-s390x.o, reg-s390x.c): Likewise.
7682 (s390-linux32.o, s390-linux32.c): Add rules.
7683 (s390-linux64.o, s390-linux64.c): Likewise.
7684 (s390x-linux64.o, s390x-linux64.c): Likewise.
7685 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7686 * linux-s390-low.c: Include <elf.h>.
7687 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7688 (init_registers_s390): Remove prototype.
7689 (init_registers_s390x): Likewise.
7690 (init_registers_s390_linux32): Add prototype.
7691 (init_registers_s390_linux64): Likewise.
7692 (init_registers_s390x_linux64): Likewise.
7693 (s390_num_regs_3264): New define.
7694 (s390_regmap_3264): New global variable.
7695 (s390_cannot_fetch_register): Remove obsolete check.
7696 (s390_cannot_store_register): Likewise.
7697 (s390_collect_ptrace_register): Handle upper/lower register halves.
7698 (s390_supply_ptrace_register): Likewise.
7699 (s390_fill_gregset): Update to register number changes.
7700 (s390_get_hwcap): New routine.
7701 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7702 Install appropriate regmap and register set.
7703
7704 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7705
7706 * server.c (gdbserver_version): Update copyright year to 2010.
7707 * gdbreplay.c (gdbreplay_version): Likewise.
7708
7709 2009-12-28 Doug Evans <dje@google.com>
7710
7711 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7712 elf/external.h. Include <elf.h> instead but only if necessary.
7713
7714 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7715
7716 * linux-low.c (linux_remove_process): Remove `detaching'
7717 parameter. Don't release/detach from thread_db here.
7718 (linux_kill): Release/detach from thread_db here, ...
7719 (linux_detach): ... and here, before actually detaching.
7720 (linux_wait_1): ... and here, when a process exits.
7721 * thread-db.c (any_thread_of): New.
7722 (thread_db_free): Switch the current inferior to a thread of the
7723 passed in process.
7724
7725 2009-12-21 Doug Evans <dje@google.com>
7726
7727 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7728
7729 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7730 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7731 warning ifndef __NR_tkill. Move setting of errno there too.
7732 Delete unnecessary resetting of errno after syscall.
7733 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7734
7735 * configure.ac: Check for dladdr.
7736 * config.in: Regenerate.
7737 * configure: Regenerate.
7738 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7739 (try_thread_db_load): Update.
7740
7741 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7742
7743 2009-12-18 Doug Evans <dje@google.com>
7744
7745 * event-loop.c: Include unistd.h if it exists.
7746
7747 * linux-low.c (my_waitpid): Move definition away from being in
7748 between linux_tracefork_child/linux_test_for_tracefork.
7749
7750 * gdb_proc_service.h (psaddr_t): Fix type.
7751 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7752 signature to match glibc.
7753
7754 2009-12-16 Doug Evans <dje@google.com>
7755
7756 * linux-low.c (linux_read_memory): Fix argument to read.
7757
7758 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7759
7760 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7761 events, don't leave current_inferior pointing at null.
7762
7763 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7764
7765 * win32-low.c (LOG): Delete.
7766 (OUTMSG): Output to stderr.
7767 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7768 on compile time LOG macro.
7769 (win32_wait): Fix debug output.
7770
7771 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7772
7773 * win32-low.c (win32_add_one_solib): If the dll name is
7774 "ntdll.dll", prepend the system directory to the dll path.
7775
7776 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7777
7778 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7779
7780 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7781 Vladimir Prus <vladimir@codesourcery.com>
7782
7783 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7784 * configure.ac: Check for __mcoldfire__ and set
7785 gdb_cv_m68k_is_coldfire.
7786 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7787 reg-cf.o and reg-m68k.o.
7788 * configure: Regenerated.
7789
7790 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7791
7792 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7793 Pass it to thread_db_free.
7794 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7795 proper `detaching' argument to linux_remove_process.
7796 * linux-low.h (thread_db_free): Add `detaching' parameter.
7797 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7798 to thread_db_free.
7799 (thread_db_free): Add `detaching' parameter. Only
7800 call td_ta_clear_event if detaching from process.
7801
7802 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7803
7804 * thread-db.c (thread_db_free): Fix typo.
7805
7806 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7807
7808 PR gdb/10838
7809 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7810
7811 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7812
7813 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7814 with an i686 compiler.
7815 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7816 needed.
7817 * configure: Rebuilt.
7818
7819 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7820
7821 PR gdb/10783
7822
7823 * server.c (handle_search_memory_1): Correct read_addr initialization
7824 in loop for searching subsequent chunks.
7825
7826 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7827
7828 * configure.ac: New --with-libthread-db option.
7829 * thread-db.c: Allow direct dependence on libthread_db.
7830 (thread_db_free): Adjust.
7831 * config.in: Regenerate.
7832 * configure: Likewise.
7833
7834 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7835
7836 PR gdb/10757
7837 * thread-db.c (attach_thread): New function.
7838 (maybe_attach_thread): Return success/failure.
7839 (find_new_threads_callback): Adjust.
7840 (thread_db_find_new_threads): Loop until no new threads.
7841
7842 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7843
7844 * proc-service.c (ps_lgetregs): Formatting.
7845
7846 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7847
7848 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7849 * configure.ac: Adjust.
7850 * linux-low.h (struct process_info_private): Move members to struct
7851 thread_db.
7852 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7853 * linux-low.c (linux_remove_process): Adjust.
7854 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7855 * server.c (handle_query): Move code ...
7856 (handle_monitor_command): ... here. New function.
7857 * target.h (struct target_ops): New member.
7858 * thread-db.c (struct thread_db): New.
7859 (libthread_db_search_path): New variable.
7860 (thread_db_create_event, thread_db_enable_reporting)
7861 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7862 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7863 (try_thread_db_load_1, dladdr_to_soname): New functions.
7864 (try_thread_db_load, thread_db_load_search): New functions.
7865 (thread_db_init): Search for libthread_db.
7866 (thread_db_free): New function.
7867 (thread_db_handle_monitor_command): Likewise.
7868 * config.in: Regenerate.
7869 * configure: Regenerate.
7870
7871 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7872
7873 * spu-low.c (spu_kill): Wait for inferior to terminate.
7874 Call clear_inferiors.
7875 (spu_detach): Call clear_inferiors.
7876
7877 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7878
7879 * aclocal.m4: Regenerate.
7880 * config.in: Likewise.
7881 * configure: Likewise.
7882
7883 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7884
7885 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7886 (parse_spufs_run): New function.
7887 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7888 (ppc_breakpoint_at): Handle SPU breakpoints.
7889
7890 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7891
7892 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7893 (SPUFS_MAGIC): Define.
7894 (spu_enumerate_spu_ids): New function.
7895 (linux_qxfer_spu): New function.
7896 (linux_target_ops): Install linux_qxfer_spu.
7897
7898 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7899
7900 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7901 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7902 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7903 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7904 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7905 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7906 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7907 (init_registers_powerpc_cell32l): Add prototype.
7908 (init_registers_powerpc_cell64l): Likewise.
7909 (ppc_arch_setup): Detect Cell/B.E. architecture.
7910
7911 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7912
7913 * Makefile.in (datarootdir): New variable.
7914
7915 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7916
7917 * linux-low.c (linux_write_memory): Update debugging output.
7918 * Makefile.in (clean): Add new descriptions.
7919 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7920 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7921 * configure.srv: Add new files for arm*-*-linux*.
7922 * linux-arm-low.c: Add new declarations.
7923 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7924 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7925 (HWCAP_VFPv3D16): New.
7926 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7927 instead of __IWMMXT__.
7928 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7929 (arm_arch_setup): New.
7930 (target_regsets): Remove #ifdef. Add VFP regset.
7931 (the_low_target): Use arm_arch_setup.
7932
7933 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7934
7935 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7936 the main thread again.
7937
7938 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7939
7940 Adding Neutrino gdbserver.
7941 * configure: Regenerated.
7942 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7943 * configure.srv (i[34567]86-*-nto*): New target.
7944 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7945 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7946 (nto_comctrl) [__QNX__]: New function.
7947 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7948
7949 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7950
7951 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7952 srv_tgtobj.
7953
7954 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7955 Pedro Alves <pedro@codesourcery.com>
7956
7957 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7958 don't support CONTEXT_EXTENDED_REGISTERS.
7959 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7960 (the_low_target): Install them.
7961 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7962 failing with ERROR_PIPE_NOT_CONNECTED.
7963
7964 2009-06-30 Doug Evans <dje@google.com>
7965 Pierre Muller <muller@ics.u-strasbg.fr>
7966
7967 Add h/w watchpoint support to x86-linux, win32-i386.
7968 * Makefile.in (SFILES): Add i386-low.c
7969 (i386_low_h): Define.
7970 (i386-low.o): Add dependencies.
7971 (linux-x86-low.o): Add i386-low.h dependency.
7972 (win32-i386-low.o): Ditto.
7973 * i386-low.c: New file.
7974 * i386-low.h: New file.
7975 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7976 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7977 * linux-low.c (linux_add_process): Initialize arch_private.
7978 (linux_remove_process): Free arch_private.
7979 (add_lwp): Initialize arch_private.
7980 (delete_lwp): Free arch_private.
7981 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7982 provided.
7983 * linux-low.h (process_info_private): New member arch_private.
7984 (lwp_info): New member arch_private.
7985 (linux_target_ops): New members new_process, new_thread,
7986 prepare_to_resume.
7987 (ptid_of): New macro.
7988 * linux-x86-low.c: Include stddef.h, i386-low.h.
7989 (arch_process_info): New struct.
7990 (arch_lwp_info): New struct.
7991 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7992 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7993 (i386_dr_low_get_status): New function.
7994 (x86_insert_point, x86_remove_point): New functions.
7995 (x86_stopped_by_watchpoint): New function.
7996 (x86_stopped_data_address): New function.
7997 (x86_linux_new_process, x86_linux_new_thread): New functions.
7998 (x86_linux_prepare_to_resume): New function.
7999 (the_low_target): Add entries for insert_point, remove_point,
8000 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8001 prepare_to_resume.
8002 * server.c (debug_hw_points): New global.
8003 (monitor_show_help): Document set debug-hw-points.
8004 (handle_query): Process "set debug-hw-points".
8005 * server.h (debug_hw_points): Declare.
8006 (paddress): Declare.
8007 * utils.c (NUMCELLS, CELLSIZE): New macros.
8008 (get_sell, xsnprintf, paddress): New functions.
8009 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8010 remove_point, stopped_by_watchpoint, stopped_data_address.
8011 * win32-i386-low.c: Include i386-low.h.
8012 (debug_reg_state): Replaces dr.
8013 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8014 (i386_dr_low_get_status): New function.
8015 (i386_insert_point, i386_remove_point): New functions.
8016 (i386_stopped_by_watchpoint): New function.
8017 (i386_stopped_data_address): New function.
8018 (i386_initial_stuff): Update.
8019 (get_thread_context,set_thread_context,i386_thread_added): Update.
8020 (the_low_target): Add entries for insert_point,
8021 remove_point, stopped_by_watchpoint, stopped_data_address.
8022 * win32-low.c (win32_insert_watchpoint): New function.
8023 (win32_remove_watchpoint): New function.
8024 (win32_stopped_by_watchpoint): New function.
8025 (win32_stopped_data_address): New function.
8026 (win32_target_ops): Add entries for insert_watchpoint,
8027 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8028 * win32-low.h (win32_target_ops): New members insert_point,
8029 remove_point, stopped_by_watchpoint, stopped_data_address.
8030
8031 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8032
8033 * server.c (process_serial_event): Re-return unsupported, not
8034 error, if the type isn't recognized. Re-allow supporting only
8035 insert or remove packets. Also call require_running for
8036 breakpoints. Add missing break statement to default case. Tidy.
8037 * target.h (struct target_ops): Rename insert_watchpoint to
8038 insert_point, and remove_watchpoint to remove_point.
8039
8040 * linux-low.h (struct linux_target_ops): Likewise.
8041 * linux-low.c (linux_insert_watchpoint): Rename to ...
8042 (linux_insert_point): ... this. Adjust.
8043 (linux_remove_watchpoint): Rename to ...
8044 (linux_remove_point): ... this. Adjust.
8045 (linux_target_ops): Adjust.
8046 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8047 (cris_insert_point): ... this.
8048 (cris_remove_watchpoint): Rename to ...
8049 (cris_remove_point): ... this.
8050 (the_low_target): Adjust.
8051
8052 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8053
8054 * server.c (handle_v_kill): Pass signal_pid to
8055 kill_inferior if multi_process is zero.
8056
8057 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8058
8059 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8060 * target.h (target_ops): Comment for *_watchpoint to make it clear
8061 the functions can get types '0' and '1'.
8062
8063 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8064
8065 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8066 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8067 * regcache.c (get_regcache): Likewise.
8068 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8069 * win32-low.c (child_fetch_inferior_registers): Remove check for
8070 regno 0.
8071
8072 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8073 Pedro Alves <pedro@codesourcery.com>
8074
8075 * target.h (struct target_ops) <supports_multi_process>: New
8076 callback.
8077 (target_supports_multi_process): New.
8078 * server.c (handle_query): Even if GDB reports support, only
8079 enable multi-process if the target also supports it. Report
8080 multi-process support only if the target backend supports it.
8081 * linux-low.c (linux_supports_multi_process): New function.
8082 (linux_target_ops): Install it as target_supports_multi_process
8083 callback.
8084
8085 2009-05-24 Doug Evans <dje@google.com>
8086
8087 Global renaming of find_thread_pid to find_thread_ptid.
8088 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8089 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8090 All callers updated.
8091
8092 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8093 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8094 directly.
8095
8096 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8097 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8098 (linux_resume_one_lwp): Ditto.
8099
8100 2009-05-23 Doug Evans <dje@google.com>
8101
8102 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8103 from struct inferior_list_entry * to struct lwp_info *.
8104 All callers updated.
8105
8106 2009-05-13 Doug Evans <dje@google.com>
8107
8108 * linux-x86-low.c: Don't include assert.h.
8109 (x86_siginfo_fixup): Use fatal, not assert.
8110 (x86_arch_setup): Fix comment.
8111
8112 2009-05-12 Doug Evans <dje@google.com>
8113
8114 Biarch support for i386/amd64 gdbserver.
8115 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8116 Add linux-x86-low.c.
8117 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8118 (linux-x86-low.o): Add.
8119 * linux-x86-64-low.c: Delete.
8120 * linux-i386-low.c: Delete.
8121 * linux-x86-low.c: New file.
8122 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8123 linux-x86-low.o.
8124 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8125 linux-x86-low.o.
8126 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8127 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8128 (linux_child_pid_to_exec_file): New function.
8129 (elf_64_header_p, elf_64_file_p): New functions.
8130 (siginfo_fixup): New function.
8131 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8132 give target a chance to convert layout.
8133 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8134 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8135
8136 2009-05-07 Doug Evans <dje@google.com>
8137
8138 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8139 (regsets_store_inferior_registers): Ditto.
8140
8141 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8142
8143 PR server/10048
8144
8145 * linux-low.c (must_set_ptrace_flags): Delete.
8146 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8147 of the global.
8148 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8149 `lwp->must_set_ptrace_flags' instead.
8150 (linux_wait_for_event_1): Set ptrace options here.
8151 (linux_wait_1): ... not here.
8152
8153 2009-04-30 Doug Evans <dje@google.com>
8154
8155 * inferiors.c (started_inferior_callback): New function.
8156 (attached_inferior_callback): New function.
8157 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8158 * server.c (print_started_pid, print_attached_pid): New functions.
8159 (detach_or_kill_for_exit): New function.
8160 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8161 * server.h (have_started_inferiors_p): Declare.
8162 (have_attached_inferiors_p): Declare.
8163
8164 * inferiors.c (remove_process): Fix memory leak, free process.
8165 * linux-low.c (linux_remove_process): New function.
8166 (linux_kill): Call it instead of remove_process.
8167 (linux_detach, linux_wait_1): Ditto.
8168
8169 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8170
8171 * configure.srv: Add x86 Windows CE target.
8172
8173 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8174
8175 * inferiors.c (get_thread_process): Make global.
8176 * server.h (get_thread_process): Add prototype.
8177 * thread-db.c (find_one_thread): Use get_thread_process
8178 instead of current_process.
8179 (thread_db_get_tls_address): Do not crash if called when
8180 thread layer is not yet initialized.
8181
8182 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8183
8184 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8185 * spu-low.c (current_tid): Rename to ...
8186 (current_ptid): ... this.
8187 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8188 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8189 ptid_get_lwp (current_ptid) instead of current_tid.
8190 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8191 instead of current_tid. Use find_process_pid to verify pid
8192 argument is valid. Pass proper argument to remove_process.
8193 (spu_thread_alive): Compare current_ptid instead of current_tid.
8194 (spu_resume): Likewise.
8195
8196 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8197
8198 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8199 variable.
8200
8201 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8202
8203 Implement the multiprocess extensions, and add linux multiprocess
8204 support.
8205
8206 * server.h (ULONGEST): Declare.
8207 (struct ptid, ptid_t): New.
8208 (minus_one_ptid, null_ptid): Declare.
8209 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8210 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8211 (struct inferior_list_entry): Change `id' type from unsigned from
8212 to ptid_t.
8213 (struct sym_cache, struct breakpoint, struct
8214 process_info_private): Forward declare.
8215 (struct process_info): Declare.
8216 (current_process): Declare.
8217 (all_processes): Declare.
8218 (initialize_inferiors): Declare.
8219 (add_thread): Adjust to use ptid_t.
8220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8221 (add_process, remove_process, find_thread_pid): Declare.
8222 (find_inferior_id): Adjust to use ptid_t.
8223 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8224 (multi_process): Declare.
8225 (push_event): Adjust to use ptid_t.
8226 (read_ptid, write_ptid): Declare.
8227 (prepare_resume_reply): Adjust to use ptid_t.
8228 (clear_symbol_cache): Declare.
8229 * inferiors.c (all_processes): New.
8230 (null_ptid, minus_one_ptid): New.
8231 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8232 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8233 (add_thread): Change unsigned long to ptid. Remove gdb_id
8234 parameter. Adjust.
8235 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8236 (gdb_id_to_thread): Rename to ...
8237 (find_thread_pid): ... this. Change unsigned long to ptid.
8238 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8239 (loaded_dll, pull_pid_from_list): Adjust.
8240 (add_process, remove_process, find_process_pid)
8241 (get_thread_process, current_process, initialize_inferiors): New.
8242 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8243 (struct target_waitstatus) <related_pid>: Ditto.
8244 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8245 return type to int.
8246 (struct target_ops) <join>: Add `pid' argument.
8247 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8248 (struct target_ops) <wait>: Add `ptid' field. Change return type
8249 to ptid.
8250 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8251 (mywait): Add `ptid' argument. Change return type to ptid_t.
8252 (target_pid_to_str): Declare.
8253 * target.c (set_desired_inferior): Adjust to use ptids.
8254 (mywait): Add new `ptid' argument. Adjust.
8255 (target_pid_to_str): New.
8256 * mem-break.h (free_all_breakpoints): Declare.
8257 * mem-break.c (breakpoints): Delelete.
8258 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8259 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8260 to use per-process breakpoint list.
8261 (free_all_breakpoints): New.
8262 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8263 (symbol_cache, all_symbols_looked_up): Delete.
8264 (hexchars): New.
8265 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8266 read_ptid): New.
8267 (prepare_resume_reply): Change ptid argument's type from unsigned
8268 long to ptid_t. Adjust. Implement W;process and X;process.
8269 (free_sym_cache, clear_symbol_cache): New.
8270 (look_up_one_symbol): Adjust to per-process symbol cache. *
8271 * server.c (cont_thread, general_thread, step_thread): Change type
8272 to ptid_t.
8273 (attached): Delete.
8274 (multi_process): New.
8275 (last_ptid): Change type to ptid_t.
8276 (struct vstop_notif) <ptid>: Change type to ptid_t.
8277 (queue_stop_reply, push_event): Change `ptid' argument's type to
8278 ptid_t.
8279 (discard_queued_stop_replies): Add `pid' argument.
8280 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8281 changes. Don't reference the `attached' global.
8282 (attach_inferior): Adjust to mywait interface changes.
8283 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8284 features. Handle and report "multiprocess+". Handle
8285 "qAttached:PID".
8286 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8287 changes.
8288 (handle_v_kill): New.
8289 (handle_v_stopped): Adjust to use target_pid_to_str.
8290 (handle_v_requests): Allow multiple attaches and runs when
8291 multiprocess extensions are in effect. Handle "vKill".
8292 (myresume): Adjust to use ptids.
8293 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8294 (handle_status): Adjust to discard_queued_stop_replies interface
8295 change.
8296 (first_thread_of, kill_inferior_callback)
8297 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8298 (main): Call initialize_inferiors. Adjust to use ptids, killing
8299 and detaching from all inferiors. Handle multiprocess packet
8300 variants.
8301 * linux-low.h: Include gdb_proc_service.h.
8302 (struct process_info_private): New.
8303 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8304 <lwpid_of>: Use ptid_get_lwp.
8305 (get_lwp_thread): Adjust.
8306 (struct lwp_info): Add `dead' member.
8307 (find_lwp_pid): Declare.
8308 * linux-low.c (thread_db_active): Delete.
8309 (new_inferior): Adjust comment.
8310 (inferior_pid): Delete.
8311 (linux_add_process): New.
8312 (handle_extended_wait): Adjust.
8313 (add_lwp): Change unsigned long to ptid.
8314 (linux_create_inferior): Add process to processes table. Adjust
8315 to use ptids. Don't set new_inferior here.
8316 (linux_attach_lwp): Rename to ...
8317 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8318 it. Adjust to use ptids.
8319 (linux_attach_lwp): New.
8320 (linux_attach): Add process to processes table. Don't set
8321 new_inferior here.
8322 (struct counter): New.
8323 (second_thread_of_pid_p, last_thread_of_process_p): New.
8324 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8325 multiple processes.
8326 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8327 processes. Remove process from process table.
8328 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8329 to multiple processes.
8330 (any_thread_of): New.
8331 (linux_detach): Add `pid' argument, and handle it. Remove process
8332 from processes table.
8333 (linux_join): Add `pid' argument. Handle it.
8334 (linux_thread_alive): Change unsighed long argument to ptid_t.
8335 Consider dead lwps as not being alive.
8336 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8337 threads we're not interested in.
8338 (same_lwp, find_lwp_pid): New.
8339 (linux_wait_for_lwp): Change `pid' argument's type from int to
8340 ptid_t. Adjust.
8341 (linux_wait_for_event): Rename to ...
8342 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8343 from int to ptid_t. Adjust.
8344 (linux_wait_for_event): New.
8345 (linux_wait_1): Add `ptid' argument. Change return type to
8346 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8347 that exit from the process table.
8348 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8349 Adjust.
8350 (mark_lwp_dead): New.
8351 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8352 stopping all threads, mark its main lwp as dead.
8353 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8354 ptids.
8355 (fetch_register, usr_store_inferior_registers)
8356 (regsets_fetch_inferior_registers)
8357 (regsets_store_inferior_registers, linux_read_memory)
8358 (linux_write_memory): Inline `inferior_pid'.
8359 (linux_look_up_symbols): Adjust to use per-process
8360 `thread_db_active'.
8361 (linux_request_interrupt): Adjust to use ptids.
8362 (linux_read_auxv): Inline `inferior_pid'.
8363 (initialize_low): Don't reference thread_db_active.
8364 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8365 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8366 (ps_getpid): Return the pid of the current inferior.
8367 * thread-db.c (proc_handle, thread_agent): Delete.
8368 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8369 per-process data.
8370 (find_one_thread): Change argument type to ptid_t. Adjust to
8371 per-process data.
8372 (maybe_attach_thread): Adjust to per-process data and ptids.
8373 (thread_db_find_new_threads): Ditto.
8374 (thread_db_init): Ditto.
8375 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8376 processes table. Adjust to use ptids.
8377 (spu_kill, spu_detach): Adjust interface. Remove process from
8378 processes table.
8379 (spu_join, spu_thread_alive): Adjust interface.
8380 (spu_wait): Adjust interface. Remove process from processes
8381 table. Adjust to use ptids.
8382 * win32-low.c (current_inferior_tid): Delete.
8383 (current_inferior_ptid): New.
8384 (debug_event_ptid): New.
8385 (thread_rec): Take a ptid. Adjust.
8386 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8387 (child_delete_thread): Ditto.
8388 (do_initial_child_stuff): Add `attached' argument. Add process to
8389 processes table.
8390 (child_fetch_inferior_registers, child_store_inferior_registers):
8391 Adjust.
8392 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8393 (win32_attach): Pass 1 to do_initial_child_stuff.
8394 (win32_kill): Adjust interface. Remove process from processes
8395 table.
8396 (win32_detach): Ditto.
8397 (win32_join): Adjust interface.
8398 (win32_thread_alive): Take a ptid.
8399 (win32_resume): Adjust to use ptids.
8400 (get_child_debug_event): Ditto.
8401 (win32_wait): Adjust interface. Remove exiting process from
8402 processes table.
8403
8404 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8405
8406 Non-stop mode support.
8407
8408 * server.h (non_stop): Declare.
8409 (gdb_client_data, handler_func): Declare.
8410 (delete_file_handler, add_file_handler, start_event_loop):
8411 Declare.
8412 (handle_serial_event, handle_target_event, push_event)
8413 (putpkt_notif): Declare.
8414 * target.h (enum resume_kind): New.
8415 (struct thread_resume): Replace `step' field by `kind' field.
8416 (TARGET_WNOHANG): Define.
8417 (struct target_ops) <wait>: Add `options' argument.
8418 <supports_non_stop, async, start_non_stop>: New fields.
8419 (target_supports_non_stop, target_async): New.
8420 (start_non_stop): Declare.
8421 (mywait): Add `options' argument.
8422 * target.c (mywait): Add `options' argument. Print child exit
8423 notifications here.
8424 (start_non_stop): New.
8425 * server.c (non_stop, own_buf, mem_buf): New globals.
8426 (struct vstop_notif): New.
8427 (notif_queue): New global.
8428 (queue_stop_reply, push_event, discard_queued_stop_replies)
8429 (send_next_stop_reply): New.
8430 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8431 interface changes.
8432 (attach_inferior): In non-stop mode, don't wait for the target
8433 here.
8434 (handle_general_set): Handle QNonStop.
8435 (handle_query): When handling qC, return the current general
8436 thread, instead of the first thread of the list.
8437 (handle_query): If the backend supports non-stop mode, include
8438 QNonStop+ in the qSupported query response.
8439 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8440 and non-stop mode.
8441 (handle_v_attach, handle_v_run): Handle non-stop mode.
8442 (handle_v_stopped): New.
8443 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8444 (myresume): Adjust to use resume_kind. Handle non-stop.
8445 (queue_stop_reply_callback): New.
8446 (handle_status): Handle non-stop mode.
8447 (main): Clear non_stop flag on reconnection. Use the event-loop.
8448 Refactor serial protocol handling from here ...
8449 (process_serial_event): ... to this new function. When GDB
8450 selects any thread, select one here. In non-stop mode, wait until
8451 GDB acks all pending events before exiting.
8452 (handle_serial_event, handle_target_event): New.
8453 * remote-utils.c (remote_open): Install remote_desc in the event
8454 loop.
8455 (remote_close): Remove remote_desc from the event loop.
8456 (putpkt_binary): Rename to...
8457 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8458 (putpkt_binary): New as wrapper around putpkt_binary_1.
8459 (putpkt_notif): New.
8460 (prepare_resume_reply): In non-stop mode, don't change the
8461 general_thread.
8462 * event-loop.c: New.
8463 * Makefile.in (OBJ): Add event-loop.o.
8464 (event-loop.o): New rule.
8465
8466 * linux-low.h (pid_of): Moved here.
8467 (lwpid_of): New.
8468 (get_lwp_thread): Use lwpid_of.
8469 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8470 * linux-low.c (pid_of): Delete.
8471 (inferior_pid): Use lwpid_of.
8472 (linux_event_pipe): New.
8473 (target_is_async_p): New.
8474 (delete_lwp): New.
8475 (handle_extended_wait): Use lwpid_of.
8476 (add_lwp): Don't set lwpid field.
8477 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8478 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8479 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8480 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8481 first. Adjust to linux_wait_for_event interface changes. Use
8482 lwpid_of.
8483 (linux_detach): Don't delete the main lwp here.
8484 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8485 (status_pending_p): Don't consider explicitly suspended lwps.
8486 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8487 pointer. Add OPTIONS argument. Change return type to int. Use
8488 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8489 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8490 pointer. Add status pointer argument. Return a pid instead of a
8491 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8492 changes. In non-stop mode, don't switch to a random thread.
8493 (linux_wait): Rename to...
8494 (linux_wait_1): ... this. Add target_options argument, and handle
8495 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8496 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8497 clean exit and signal exit code. Don't stop all threads in
8498 non-stop mode. In all-stop mode, only stop all threads when
8499 reporting a stop to GDB. Handle explicit thread stop requests.
8500 (async_file_flush, async_file_mark): New.
8501 (linux_wait): New.
8502 (send_sigstop): Use lwpid_of.
8503 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8504 interface changes. In non-stop mode, don't switch to a random
8505 thread.
8506 (linux_resume_one_lwp): Use lwpid_of.
8507 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8508 (linux_resume_one_thread): ... this. Handle resume_stop. In
8509 non-stop mode, don't look for pending flag in all threads.
8510 (resume_status_pending_p): Don't consider explicitly suspended
8511 threads.
8512 (my_waitpid): Reimplement. Emulate __WALL.
8513 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8514 Use lwpid_of.
8515 (sigchld_handler, linux_supports_non_stop, linux_async)
8516 (linux_start_non_stop): New.
8517 (linux_target_ops): Register linux_supports_non_stop, linux_async
8518 and linux_start_non_stop.
8519 (initialize_low): Install SIGCHLD handler.
8520 * thread-db.c (thread_db_create_event, find_one_thread)
8521 (thread_db_get_tls_address): Use lwpid_of.
8522 * win32-low.c (win32_detach): Adjust to use resume_kind.
8523 (win32_wait): Add `options' argument.
8524 * spu-low.c (spu_resume): Adjust to use resume_kind.
8525 (spu_wait): Add `options' argument.
8526
8527 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8528
8529 Decouple target code from remote protocol.
8530
8531 * target.h (enum target_waitkind): New.
8532 (struct target_waitstatus): New.
8533 (struct target_ops) <wait>: Return an unsigned long. Take a
8534 target_waitstatus pointer instead of a char pointer.
8535 (mywait): Likewise.
8536 * target.c (mywait): Change prototype to return an unsigned long.
8537 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8538 * server.h (thread_from_wait, old_thread_from_wait): Delete
8539 declarations.
8540 (prepare_resume_reply): Change prototype to take a
8541 target_waitstatus.
8542 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8543 (last_status, last_ptid): New.
8544 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8545 pid instead of a signal.
8546 (attach_inferior): Remove "status" and "signal" parameters.
8547 Adjust.
8548 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8549 not as an address.
8550 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8551 (handle_v_requests, myresume): Remove "status" and "signal"
8552 parameters. Adjust.
8553 (handle_status): New.
8554 (main): Delete local `status'. Adjust.
8555 * remote-utils.c: Include target.h.
8556 (prepare_resume_reply): Change prototype to take a
8557 target_waitstatus. Adjust.
8558
8559 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8560 interface.
8561 * spu-low.c (spu_wait): Adjust.
8562 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8563 Delete.
8564 (win32_wait): Adjust.
8565
8566 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8567
8568 * target.h (struct thread_resume): Delete leave_stopped member.
8569 (struct target_ops): Add a `n' argument to the `resume' callback.
8570 * server.c (start_inferior): Adjust.
8571 (handle_v_cont, myresume): Adjust.
8572 * linux-low.c (check_removed_breakpoint): Adjust to resume
8573 interface change, and to removed leave_stopped field.
8574 (resume_ptr): Delete.
8575 (struct thread_resume_array): New.
8576 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8577 resume interface change.
8578 (linux_continue_one_thread, linux_queue_one_thread)
8579 (resume_status_pending_p): Check if the resume field is NULL
8580 instead of checking the leave_stopped member.
8581 (linux_resume): Adjust to the target resume interface change.
8582 * spu-low.c (spu_resume): Adjust to the target resume interface
8583 change.
8584 * win32-low.c (win32_detach, win32_resume): Ditto.
8585
8586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8587
8588 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8589 flag.
8590 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8591 pending.
8592 (linux_continue_one_thread): Only preserve the stepping flag if
8593 there's a pending breakpoint.
8594
8595 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8596
8597 * server.c (main): After the inferior having exited, call
8598 remote_close before exiting gdbserver.
8599
8600 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8601
8602 Fix size of FPSCR in Power 7 processors.
8603 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8604 (PPC_FEATURE_HAS_DFP): New #define.
8605 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8606 size of the FPSCR.
8607
8608 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8609
8610 * server.c (handle_query) Whitespace and formatting.
8611
8612 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8613
8614 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8615 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8616 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8617 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8618 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8619 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8620 Makefile.in, configure.ac: Fix whitespace throughout.
8621 * configure: Regenerate.
8622
8623 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8624
8625 * inferiors.c (find_inferior): Make it safe for the callback
8626 function to delete the currently iterated inferior.
8627
8628 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8629
8630 * Makefile.in (linuw_low_h): Move higher.
8631 (thread-db.o): Depend on $(linux_low_h).
8632
8633 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8634
8635 Rename "process" to "lwp" throughout.
8636
8637 * linux-low.c (all_processes): Rename to...
8638 (all_lwps): ... this.
8639 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8640 (add_process): Rename to ...
8641 (add_lwp): ... this. Adjust.
8642 (linux_create_inferior): Adjust.
8643 (linux_attach_lwp): Adjust.
8644 (linux_attach): Adjust.
8645 (linux_kill_one_process): Rename to ...
8646 (linux_kill_one_lwp): ... this. Adjust.
8647 (linux_kill): Adjust.
8648 (linux_detach_one_process): Rename to ...
8649 (linux_detach_one_lwp): ... this. Adjust.
8650 (linux_detach): Adjust.
8651 (check_removed_breakpoint): Adjust.
8652 (status_pending_p): Adjust.
8653 (linux_wait_for_process): Rename to ...
8654 (linux_wait_for_lwp): ... this. Adjust.
8655 (linux_wait_for_event): Adjust.
8656 (send_sigstop): Adjust.
8657 (wait_for_sigstop): Adjust.
8658 (stop_all_processes): Rename to ...
8659 (stop_all_lwps): ... this.
8660 (linux_resume_one_process): Rename to ...
8661 (linux_resume_one_lwp): ... this. Adjust.
8662 (linux_set_resume_request, linux_continue_one_thread)
8663 (linux_queue_one_thread, resume_status_pending_p)
8664 (usr_store_inferior_registers, regsets_store_inferior_registers)
8665 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8666 Adjust.
8667 * linux-low.h (get_process): Rename to ...
8668 (get_lwp): ... this. Adjust.
8669 (get_thread_process): Rename to ...
8670 (get_thread_lwp): ... this. Adjust.
8671 (get_process_thread): Rename to ...
8672 (get_lwp_thread): ... this. Adjust.
8673 (struct process_info): Rename to ...
8674 (struct lwp_info): ... this.
8675 (all_processes): Rename to ...
8676 (all_lwps): ... this.
8677 * proc-service.c (ps_lgetregs): Adjust.
8678 * thread-db.c (thread_db_create_event, find_one_thread)
8679 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8680
8681 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8682
8683 * server.c (handle_query): Handle "qAttached".
8684
8685 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8686
8687 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8688 GPLv3, update license URL.
8689
8690 2009-03-01 Doug Evans <dje@google.com>
8691
8692 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8693 (server_h): Add gdb_signals.h.
8694 (signals.o): Update.
8695 * server.h (target_signal_from_host,target_signal_to_host_p)
8696 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8697
8698 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8699
8700 * remote-utils.c (getpkt): Also generate remote-debug
8701 information if noack_mode is set.
8702
8703 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8704
8705 * server.c (handle_query): Report qXfer:siginfo:read and
8706 qXfer:siginfo:write as supported and handle them.
8707 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8708 * linux-low.c (linux_xfer_siginfo): New.
8709 (linux_target_ops): Set it.
8710
8711 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8712
8713 * server.c (gdbserver_usage): Mention --remote-debug.
8714 (main): Accept '--remote-debug' switch.
8715
8716 2009-01-18 Doug Evans <dje@google.com>
8717
8718 * regcache.c (new_register_cache): No need to check result of xcalloc.
8719 * server.c (handle_search_memory): Back out calls to xmalloc,
8720 result is checked and error is returned to user upon failure.
8721 (handle_query): Ditto. Add more checks for result of malloc.
8722 (handle_v_cont): Check result of malloc, report error back to
8723 user upon failure.
8724 (handle_v_run): Ditto. Call freeargv.
8725 * server.h (freeargv): Declare.
8726 * utils.c (freeargv): New fn.
8727
8728 2009-01-15 Doug Evans <dje@google.com>
8729
8730 * gdbreplay.c (perror_with_name): Make arg const char *.
8731 * server.h (target_signal_to_name): Make return type const char *.
8732 * thread-db.c (thread_db_err_str): Make return type const char *.
8733 * utils.c (perror_with_name): Make arg const char *.
8734
8735 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8736
8737 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8738 when handling a EXIT_PROCESS_DEBUG_EVENT.
8739
8740 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8741
8742 * gdbreplay.c (gdbreplay_version): Update copyright year.
8743 * server.c (gdbserver_version): Likewise.
8744
8745 2009-01-05 Doug Evans <dje@google.com>
8746
8747 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8748 (handle_extended_wait): Improve comment.
8749
8750 2008-12-13 Doug Evans <dje@google.com>
8751
8752 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8753 * server.h (ATTR_MALLOC): New macro.
8754 (xmalloc,xcalloc,xstrdup): Declare.
8755 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8756 * inferiors.c: Ditto.
8757 * linux-low.c: Ditto.
8758 * mem-break.c: Ditto.
8759 * regcache.c: Ditto.
8760 * remote-utils.c: Ditto.
8761 * server.c: Ditto.
8762 * target.c: Ditto.
8763 * win32-low.c: Ditto.
8764
8765 2008-12-12 Doug Evans <dje@google.com>
8766
8767 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8768 in debugging printf.
8769
8770 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8771
8772 2008-12-09 Doug Evans <dje@google.com>
8773
8774 * linux-low.h (struct process_info): Delete member tid, unused.
8775 * thread-db.c (find_one_thread): Update.
8776 (maybe_attach_thread): Update.
8777
8778 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8779
8780 * target.h (struct target_ops): Add qxfer_osdata member.
8781 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8782 and dirent.h.
8783 (linux_qxfer_osdata): New functions.
8784 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8785 callback.
8786 * server.c (handle_query): Handle "qXfer:osdata:read:".
8787 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8788 (buffer_xml_printf): New functions.
8789 * server.h (struct buffer): New.
8790 (buffer_grow_str, buffer_grow_str0): New macros.
8791 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8792 (buffer_xml_printf): Declare.
8793
8794 2008-11-24 Doug Evans <dje@google.com>
8795
8796 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8797
8798 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8799
8800 * server.c (handle_v_run): Always use the supplied argument list.
8801
8802 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8803
8804 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8805 (xtensa_regmap_table): Add entry for scompare1.
8806
8807 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8808
8809 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8810 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8811 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8812 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8813 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8814 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8815 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8816 XML target descriptions.
8817 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8818 when inferior is running on an ISA 2.05 or later processor. Add
8819 special case to return offset for full 64-bit slot of FPSCR when
8820 in 32-bits.
8821
8822 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8823
8824 * Makefile.in (SFILES, clean): Added sparc64 files.
8825 (reg-sparc64.o, reg-sparc64.c): New.
8826 * configure.srv (sparc*-*-linux*): New configuration.
8827 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8828 syscall arguments for SPARC.
8829 (regsets_store_inferior_registers): Likewise.
8830 * linux-sparc-low.c: New file.
8831
8832 2008-10-21 Doug Evans <dje@google.com>
8833
8834 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8835 (READLINE_DIR,READLINE_DEP): Delete.
8836 (INTERNAL_CFLAGS): Update.
8837 (LINTFLAGS): Update.
8838
8839 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8840
8841 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8842 whole argv from the last run, not just argv[0].
8843
8844 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8845
8846 * regcache.c (new_register_cache): Return NULL if the register
8847 cache size isn't known yet.
8848 (free_register_cache): Avoid dereferencing a NULL regcache.
8849
8850 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8851
8852 * configure.srv: Merge MIPS and MIPS64.
8853
8854 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8855
8856 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8857
8858 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8859
8860 * Makefile.in: Add required vsx dependencies.
8861
8862 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8863 Declare init_registers_powerpc_vsx32l.
8864 Declare init_registers_powerpc_vsx64l.
8865 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8866 (ppc_arch_setup): Check for VSX in hwcap.
8867 (ppc_fill_vsxregset): New function.
8868 (ppc_store_vsxregset): New function.
8869 Add new VSX entry in regset_info target_regsets.
8870
8871 * configure.srv: Add new VSX dependencies.
8872
8873 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8874
8875 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8876 (remote_open): Set or clear transport_is_reliable.
8877 (putpkt_binary): Don't expect acks in noack mode.
8878 (getpkt): Don't send ack/nac in noack mode.
8879 * server.c (handle_general_set): Handle QStartNoAckMode.
8880 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8881 qSupported.
8882 (main): Reset noack_mode on every connection.
8883 * server.h (noack_mode): Declare.
8884
8885 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8886
8887 * Makefile.in (GDBREPLAY_OBS): New variable.
8888 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8889
8890 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8891 Daniel Jacobowitz <dan@codesourcery.com>
8892
8893 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8894 (usr_store_inferior_registers): Likewise.
8895 (regsets_store_inferior_registers): Likewise.
8896
8897 2008-07-31 Rolf Jansen <rj@surtec.com>
8898 Pedro Alves <pedro@codesourcery.com>
8899
8900 * configure.ac: Check for memmem declaration.
8901 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8902 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8903 (disable_packet_qfThreadInfo): Unconditionally compile.
8904 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8905 * configure, config.in: Regenerate.
8906
8907 2008-07-28 Doug Kwan <dougkwan@google.com>
8908
8909 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8910 (linux_write_memory): Remove declaration of errno.
8911
8912 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8913
8914 * linux-low.c (handle_extended_wait): Do not use "status"
8915 variable uninitialized.
8916
8917 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8918
8919 * server.c (handle_v_attach): Inhibit reporting dll changes.
8920
8921 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8922
8923 * remote-utils.c (prepare_resume_reply): If requested, don't
8924 output "thread:TID" in the T stop reply.
8925
8926 * server.c (disable_packet_vCont, disable_packet_Tthread)
8927 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8928 (handle_query): If requested, disable support for qC, qfThreadInfo
8929 and qsThreadInfo.
8930 (handle_v_requests): If requested, disable support for vCont.
8931 (gdbserver_show_disableable): New.
8932 (main): Handle --disable-packet and --disable-packet=LIST.
8933
8934 * server.h (disable_packet_vCont, disable_packet_Tthread)
8935 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8936
8937 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8938
8939 * server.c (gdbserver_usage): Mention --version.
8940
8941 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8942
8943 * Makefile.in (gdbreplay.o): New rule.
8944
8945 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8946
8947 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8948 message, not gdbserver.
8949
8950 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8951 Nathan Sidwell <nathan@codesourcery.com>
8952 Joseph Myers <joseph@codesourcery.com>
8953
8954 * acinclude.m4: Include ../../config/acx.m4.
8955 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8956 * configure, config.in: Regenerate.
8957 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8958 * server.c (gdbserver_version): Print PKGVERSION.
8959 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8960 (main): Adjust gdbserver_usage calls.
8961 * gdbreplay.c (version, host_name): Add declarations.
8962 (gdbreplay_version, gdbreplay_usage): New.
8963 (main): Accept --version and --help options.
8964
8965 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8966
8967 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8968 (arm_breakpoint_at): Handle Thumb.
8969 (the_low_target): Add comment.
8970
8971 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8972
8973 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8974
8975 2008-05-09 Doug Evans <dje@google.com>
8976
8977 * server.h (decode_search_memory_packet): Declare.
8978 * remote-utils.c (decode_search_memory_packet): New fn.
8979 * server.c (handle_search_memory_1): New fn.
8980 (handle_search_memory): New fn.
8981 (handle_query): Process qSearch:memory packets.
8982
8983 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8984
8985 * regcache.c (registers_length): Remove.
8986 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8987 full register packet.
8988 * regcache.h (registers_length): Remove prototype.
8989 * server.h (PBUFSIZ): Define to 16384.
8990
8991 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8992
8993 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8994 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8995 powerpc-64l.o, and powerpc-altivec64l.o.
8996 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8997 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8998 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8999 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9000 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9001 to srv_xmlfiles.
9002
9003 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9004 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9005 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9006 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9007 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9008 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9009 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9010 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9011 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9012 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9013 (clean): Update.
9014
9015 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9016 (init_registers_powerpc_32l): ... this new prototype.
9017 (init_registers_powerpc_32): Remove, replace by ...
9018 (init_registers_powerpc_altivec32l): ... this new prototype.
9019 (init_registers_powerpc_e500): Remove, replace by ...
9020 (init_registers_powerpc_e500l): ... this new prototype.
9021 (init_registers_ppc64): Remove, replace by ...
9022 (init_registers_powerpc_64l): ... this new prototype.
9023 (init_registers_powerpc_64): Remove, replace by ...
9024 (init_registers_powerpc_altivec64l): ... this new prototype.
9025 (ppc_num_regs): Set to 73.
9026 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9027 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9028 (ppc_cannot_store_register): Handle orig_r3 and trap.
9029 (ppc_arch_setup): Update init_registers_... calls.
9030 (ppc_fill_gregset): Handle orig_r3 and trap.
9031
9032 * inferiors.c (clear_inferiors): Reset current_inferior.
9033
9034 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9035
9036 * acinclude.m4: Add override.m4.
9037 * configure: Regenerate.
9038
9039 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9040
9041 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9042 initial call to init_register_ppc64.
9043
9044 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9045
9046 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9047 single powerpc*-*-linux* case.
9048 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9049
9050 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9051
9052 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9053 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9054 from reg_xmlfiles.
9055 * linux-ppc-low.c: Include <elf.h>.
9056 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9057 (ppc_hwcap): New global variable.
9058 (ppc_regmap): Remove __SPE__ #ifdef sections.
9059 (ppc_regmap_e500): New global variable.
9060 (ppc_cannot_store_register): Update __SPE__ special case.
9061 (ppc_get_hwcap): New function.
9062 (ppc_arch_setup): Use it to determine whether inferior supports
9063 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9064 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9065 Do not access registers if target does not support AltiVec.
9066 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9067 Do not access registers if target does not support SPE.
9068 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9069
9070 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9071
9072 * linux-low.c (disabled_regsets, num_regsets): New.
9073 (use_regsets_p): Delete.
9074 (linux_wait_for_process): Clear disabled_regsets.
9075 (regsets_fetch_inferior_registers): Check and set it.
9076 (regsets_store_inferior_registers): Likewise.
9077 (linux_fetch_registers, linux_store_registers): Do not use
9078 use_regsets_p.
9079 (initialize_low): Allocate disabled_regsets.
9080
9081 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9082
9083 * Makefile.in (LIBOBJS): New.
9084 (OBS): Use LIBOBJS.
9085 (memmem.o): New rule.
9086 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9087 * configure: Regenerated.
9088
9089 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9090
9091 * server.c (handle_query): Never return "unsupported" for
9092 qXfer:features:read queries.
9093
9094 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9095
9096 * server.c (get_features_xml): Fix inverted condition.
9097 (handle_query): Always support qXfer:feature:read.
9098
9099 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9100
9101 * server.c (wrapper_argv): New.
9102 (start_inferior): Handle wrapper_argv. If set, expect an extra
9103 trap.
9104 (gdbserver_usage): Document --wrapper.
9105 (main): Parse --wrapper.
9106
9107 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9108
9109 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9110 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9111 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9112 (ppc_set_pc): Likewise.
9113 (ppc_arch_setup): New function.
9114 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9115 of collect_register.
9116 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9117
9118 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9119
9120 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9121 instead of linux-ppc64-low.o.
9122 * linux-ppc64-low.c: Remove file.
9123 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9124 (linux-ppc64-low.o): Remove rule.
9125
9126 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9127 (init_registers_powerpc_64): Likewise.
9128 (ppc_regmap): Conditionally define depending on __powerpc64__.
9129 (ppc_cannot_store_register): Do not special-case "fpscr" when
9130 compiled on __powerpc64__.
9131 (ppc_collect_ptrace_register): New function.
9132 (ppc_supply_ptrace_register): New function.
9133 (ppc_breakpoint): Change type to "unsigned int".
9134 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9135 (the_low_target): Conditionally provide initializers for the
9136 arch_setup member depending on __powerpc64__. Install
9137 collect_ptrace_register and supply_ptrace_register members.
9138
9139 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9140
9141 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9142 * server.c (gdbserver_xmltarget): Define.
9143 (get_features_xml): Use it to replace "target.xml" and arch_string.
9144
9145 * configure.srv: Remove srv_xmltarget. Add XML files that were
9146 mentioned there to srv_xmlfiles instead. Remove conditional tests
9147 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9148 srv_xmlfiles and srv_regobj to include all possible choices.
9149 * configure.ac (srv_xmltarget): Remove.
9150 (srv_xmlfiles): Do not add "target.xml".
9151 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9152 checks for supplementary target information.
9153 * configure: Regenerate.
9154 * Makefile.in (XML_TARGET): Remove.
9155 (target.xml): Remove rule.
9156 (clean): Do not clean up target.xml.
9157 (.PRECIOUS): Do not mention target.xml.
9158
9159 * target.h (struct target_ops): Remove arch_string member.
9160 * linux-low.c (linux_arch_string): Remove.
9161 (linux_target_ops): Remove arch_string initializer.
9162 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9163 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9164 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9165 * spu-low.c (spu_arch_string): Remove.
9166 (spu_target_ops): Remove arch_string initializer.
9167 * win32-low.c (win32_arch_string): Remove.
9168 (win32_target_ops): Remove arch_string initializer.
9169 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9170 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9171 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9172
9173 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9174
9175 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9176 by collect_ptrace_register and supply_ptrace_register hooks.
9177 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9178 instead of checking for the_low_target.left_pad_xfer.
9179 (usr_store_inferior_registers): Use collect_ptrace_register callback
9180 instead of checking for the_low_target.left_pad_xfer.
9181
9182 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9183 (s390_supply_ptrace_register): Likewise.
9184 (s390_fill_gregset): Call s390_collect_ptrace_register.
9185 (the_low_target): Update.
9186
9187 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9188 (ppc_supply_ptrace_register): Likewise.
9189 (the_low_target): Update.
9190
9191 * linux-i386-low.c (the_low_target): Update.
9192 * linux-x86-64-low.c (the_low_target): Update.
9193
9194 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9197 reg-s390.o and reg-s390x.o.
9198
9199 * linux-low.c (new_inferior): New global variable.
9200 (linux_create_inferior, linux_attach): Set it.
9201 (linux_wait_for_process): Call the_low_target.arch_setup after the
9202 target has stopped for the first time.
9203 (initialize_low): Do not call the_low_target.arch_setup.
9204
9205 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9206 (s390_set_pc): Likewise.
9207 (s390_arch_setup): New function.
9208 (the_low_target): Use s390_arch_setup as arch_setup routine.
9209
9210 * regcache.c (realloc_register_cache): New function.
9211 (set_register_cache): Call it for each existing regcache.
9212
9213 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9214
9215 * server.h (init_registers): Remove prototype.
9216
9217 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9218 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9219 instead of init_registers ().
9220 * linux-arm-low.c (init_registers_arm): Add prototype.
9221 (init_registers_arm_with_iwmmxt): Likewise.
9222 (the_low_target): Add initializer for arch_setup field.
9223 * linux-cris-low.c (init_registers_cris): Add prototype.
9224 (the_low_target): Add initializer for arch_setup field.
9225 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9226 (the_low_target): Add initializer for arch_setup field.
9227 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9228 (the_low_target): Add initializer for arch_setup field.
9229 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9230 (the_low_target): Add initializer for arch_setup field.
9231 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9232 (the_low_target): Add initializer for arch_setup field.
9233 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9234 (the_low_target): Add initializer for arch_setup field.
9235 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9236 (init_registers_mips64_linux): Likewise.
9237 (the_low_target): Add initializer for arch_setup field.
9238 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9239 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9240 (the_low_target): Add initializer for arch_setup field.
9241 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9242 (init_registers_powerpc_64): Likewise.
9243 (the_low_target): Add initializer for arch_setup field.
9244 * linux-s390-low.c (init_registers_s390): Add prototype.
9245 (init_registers_s390x): Likewise.
9246 (the_low_target): Add initializer for arch_setup field.
9247 * linux-sh-low.c (init_registers_sh): Add prototype.
9248 (the_low_target): Add initializer for arch_setup field.
9249 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9250 (the_low_target): Add initializer for arch_setup field.
9251 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9252 (the_low_target): Add initializer for arch_setup field.
9253
9254 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9255 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9256 instead of init_registers ().
9257 * win32-arm-low.c (init_registers_arm): Add prototype.
9258 (the_low_target): Add initializer for arch_setup field.
9259 * win32-i386-low.c (init_registers_i386): Add prototype.
9260 (the_low_target): Add initializer for arch_setup field.
9261
9262 * spu-low.c (init_registers_spu): Add prototype.
9263 (initialize_low): Call initialie_registers_spu () instead of
9264 initialize_registers ().
9265
9266 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9267
9268 * server.c (handle_v_requests): When handling the vRun and vAttach
9269 packets, if already debugging a process, don't kill it. Return an
9270 error instead.
9271
9272 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9273
9274 * server.c (handle_query): Correct length check.
9275
9276 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9277
9278 * win32-low.c (do_initial_child_stuff): Add process handle
9279 parameter. Set current_process_handle and current_process_id from the
9280 parameters. Clear globals.
9281 (win32_create_inferior): Don't set current_process_handle and
9282 current_process_id here. Instead pass them on the call to
9283 do_initial_child_stuff.
9284 (win32_attach): Likewise.
9285 (win32_clear_inferiors): New.
9286 (win32_kill): Don't close the current process handle or the
9287 current thread handle here. Instead call win32_clear_inferiors.
9288 (win32_detach): Don't open a new handle to the process. Call
9289 win32_clear_inferiors.
9290 (win32_join): Don't rely on current_process_handle; open a new
9291 handle using the process id.
9292 (win32_wait): Call win32_clear_inferiors when the inferior process
9293 has exited.
9294
9295 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9296
9297 * server.c (monitor_show_help): Add "exit".
9298
9299 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9300
9301 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9302 (clean): Add reg-xtensa.c.
9303 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9304 * configure.srv (xtensa*-*-linux*) New target.
9305 * linux-xtensa-low.c: New.
9306 * xtensa-xtregs.c: New.
9307
9308 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9309
9310 * hostio.c: Don't include errno.h.
9311 (errno_to_fileio_errno): Move to hostio-errno.
9312 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9313 error number outputting to the target->hostio_last_error callback.
9314 (hostio_packet_error): Use FILEIO_EINVAL directly.
9315 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9316 calls to hostio_error.
9317 * hostio-errno.c: New.
9318 * server.h (hostio_last_error_from_errno): Declare.
9319 * target.h (target_ops): Add hostio_last_error member.
9320 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9321 as hostio_last_error handler.
9322 * spu-low.c (spu_target_ops): Likewise.
9323 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9324 (wince_hostio_last_error): New functions.
9325 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9326 as hostio_last_error handler.
9327 (win32_target_ops) [!_WIN32_WCE]: Register
9328 hostio_last_error_from_errno as hostio_last_error handler.
9329 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9330 (hostio-errno.o): New rule.
9331 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9332 * configure.srv (srv_hostio_err_objs): New variable. Default to
9333 hostio-errno.o.
9334 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9335 * configure: Regenerate.
9336
9337 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9340 (linux_kill, linux_detach): Clean up the process list.
9341 * remote-utils.c (remote_open): Improve port number parsing.
9342 (putpkt_binary, input_interrupt): Only send interrupts if the target
9343 is running.
9344 * server.c (extended_protocol): Make static.
9345 (attached): Define earlier.
9346 (exit_requested, response_needed, program_argv): New variables.
9347 (target_running): New.
9348 (start_inferior): Clear attached here.
9349 (attach_inferior): Set attached here.
9350 (require_running): Define.
9351 (handle_query): Use require_running and target_running. Implement
9352 "monitor exit".
9353 (handle_v_attach, handle_v_run): New.
9354 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9355 (gdbserver_usage): Update.
9356 (main): Redo argument parsing. Handle --debug and --multi. Handle
9357 --attach along with other options or after the port. Save
9358 program_argv. Support no initial program. Resynchronize
9359 communication with GDB after an error. Handle "monitor exit".
9360 Use require_running and target_running. Always allow the extended
9361 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9362 restart in extended mode.
9363 * README: Refer to the GDB manual. Update --attach usage.
9364
9365 2007-12-20 Andreas Schwab <schwab@suse.de>
9366
9367 * linux-low.c (STACK_SIZE): Define.
9368 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9369 (linux_test_for_tracefork): Likewise.
9370
9371 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9372
9373 * linux-low.c (linux_wait_for_event): Update messages. Do not
9374 reinsert auto-delete breakpoints.
9375 * mem-break.c (struct breakpoint): Change return type of handler to
9376 int.
9377 (set_breakpoint_at): Update handler type.
9378 (reinsert_breakpoint_handler): Return 1 instead of calling
9379 delete_breakpoint.
9380 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9381 setting a new one.
9382 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9383 * mem-break.h (set_breakpoint_at): Update handler type.
9384 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9385 * win32-low.c (auto_delete_breakpoint): New.
9386 (get_child_debug_event): Use it.
9387
9388 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9389
9390 * configure.ac: Check for pread and pwrite.
9391 * hostio.c (handle_pread): Fall back to lseek and read.
9392 (handle_pwrite): Fall back to lseek and write.
9393 * config.in, configure: Regenerated.
9394
9395 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9396
9397 * server.c (myresume): Add own_buf argument.
9398 (main): Update calls.
9399
9400 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9403 * remote-utils.c (remote_open): Do not call disable_async_io.
9404 (block_async_io): Delete.
9405 (unblock_async_io): Make static.
9406 (initialize_async_io): New.
9407 * server.c (handle_v_cont): Handle async I/O here.
9408 (myresume): Likewise. Move other common resume tasks here...
9409 (main): ... from here. Call initialize_async_io. Disable async
9410 I/O before the main loop.
9411 * server.h (initialize_async_io): Declare.
9412 (block_async_io, unblock_async_io): Delete prototypes.
9413 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9414
9415 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9416
9417 * remote-utils.c (readchar): Allow binary data in received messages.
9418
9419 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9420
9421 * win32-low.c (attaching): New global.
9422 (win32_create_inferior): Clear the `attaching' global.
9423 (win32_attach): Set the `attaching' global.
9424 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9425 attaching. Only set a breakpoint at the entry point if not
9426 attaching.
9427
9428 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9429
9430 * server.c (main): Don't report dll events on the initial
9431 connection on attaches.
9432
9433 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9434
9435 * server.c (main): Relax numerical bases supported for the pid of
9436 the --attach command line argument.
9437
9438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9439
9440 * win32-low.c (win32_attach): Call OpenProcess before
9441 DebugActiveProcess, not after. Add last error output to error
9442 call.
9443
9444 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9445
9446 * win32-low.c (win32_get_thread_context)
9447 (win32_set_thread_context): New functions.
9448 (thread_rec): Use win32_get_thread_context.
9449 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9450 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9451 field.
9452
9453 2007-12-03 Leo Zayas
9454 Pedro Alves <pedro_alves@portugalmail.pt>
9455
9456 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9457 global variables.
9458 (child_add_thread): Minor cleanup.
9459 (child_continue): Resume artificially suspended threads before
9460 calling ContinueDebugEvent.
9461 (suspend_one_thread): New.
9462 (fake_breakpoint_event): New.
9463 (get_child_debug_event): Change return type to int. Check here if
9464 gdb sent an interrupt request. If a soft interrupt was requested,
9465 fake a breakpoint event. Return 0 if there is no event to handle,
9466 and 1 otherwise.
9467 (win32_wait): Don't check here if gdb sent an interrupt request.
9468 Ensure there is a valid event to handle.
9469 (win32_request_interrupt): Add soft interruption method as last
9470 resort.
9471
9472 2007-12-03 Leo Zayas
9473 Pedro Alves <pedro_alves@portugalmail.pt>
9474
9475 * win32-low.h (win32_thread_info): Add descriptions to the
9476 structure members. Replace `suspend_count' counter by a
9477 `suspended' flag.
9478 * win32-low.c (thread_rec): Update condition of when to get the
9479 context from the inferior. Rely on ContextFlags being set if it
9480 has already been retrieved. Only suspend the inferior thread if
9481 we haven't already. Warn if that fails.
9482 (continue_one_thread): s/suspend_count/suspended/. Only call
9483 ResumeThread once. Warn if that fails.
9484
9485 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9486
9487 * win32-low.c (win32_wait): Don't read from the inferior when it
9488 has already exited.
9489
9490 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9491
9492 * Makefile.in (win32_low_h): New variable.
9493 (win32-low.o): Add dependency on $(win32_low_h).
9494 (win32-arm-low.o, win32-i386-low.o): New rules.
9495
9496 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9497
9498 * hostio.c: Correct copyright year.
9499
9500 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * Makefile.in (OBS): Add hostio.o.
9503 (hostio.o): New rule.
9504 * server.h (handle_vFile): Declare.
9505 * hostio.c: New file.
9506 * server.c (handle_v_requests): Take packet_len and new_packet_len
9507 for binary packets. Call handle_vFile.
9508 (main): Update call to handle_v_requests.
9509
9510 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c: Include <sched.h>.
9513
9514 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9515
9516 * linux-low.c (linux_tracefork_grandchild): New.
9517 (linux_tracefork_child): Use clone.
9518 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9519
9520 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9521
9522 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9523
9524 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9525
9526 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9527
9528 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9529
9530 * inferiors.c (change_inferior_id): Delete.
9531 (add_pid_to_list, pull_pid_from_list): New.
9532 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9533 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9534 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9535 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9536 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9537 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9538 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9539 (using_threads): Always set to 1.
9540 (handle_extended_wait): New.
9541 (add_process): Do not set TID.
9542 (linux_create_inferior): Set must_set_ptrace_flags.
9543 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9544 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9545 (linux_thread_alive): Rename TID argument to LWPID.
9546 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9547 (linux_wait_for_event): Do not use TID or check using_threads. Update
9548 call to dead_thread_notify. Call handle_extended_wait.
9549 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9550 (send_sigstop): Delete sigstop_sent.
9551 (wait_for_sigstop): Avoid TID.
9552 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9553 (linux_test_for_tracefork): New.
9554 (linux_lookup_signals): Use thread_db_active and
9555 linux_supports_tracefork_flag.
9556 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9557 * linux-low.h (get_process_thread): Avoid TID.
9558 (struct process_ifo): Move thread_known and tid to the end. Remove
9559 sigstop_sent.
9560 (linux_attach_lwp, thread_db_init): Update prototypes.
9561 * server.h (change_inferior_id): Delete prototype.
9562 (add_pid_to_list, pull_pid_from_list): New prototypes.
9563 * thread-db.c (thread_db_use_events): New.
9564 (find_first_thread): Rename to...
9565 (find_one_thread): ...this. Update callers and messages. Do not
9566 call fatal. Check thread_db_use_events. Do not call
9567 change_inferior_id or new_thread_notify.
9568 (maybe_attach_thread): Update. Do not call new_thread_notify.
9569 (thread_db_init): Set thread_db_use_events. Check use_events.
9570 * utils.c (fatal, warning): Correct message prefix.
9571
9572 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9573
9574 * Makefile.in (clean): Remove new files.
9575 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9576 (powerpc-64.o, powerpc-64.c): New rules.
9577 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9578 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9579 with SPE.
9580 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9581 SPE targets.
9582 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9583 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9584 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9585 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9586 (target_regsets): Add AltiVec and SPE register sets.
9587 * configure.ac: Check for AltiVec and SPE.
9588 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9589 (ppc_fill_vrregset, ppc_store_vrregset): New.
9590 (target_regsets): Add AltiVec register set.
9591 * configure: Regenerated.
9592
9593 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9594
9595 * linux-low.c (O_LARGEFILE): Define.
9596 (linux_read_memory): Use /proc/PID/mem.
9597 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9598 * configure, config.in: Regenerated.
9599
9600 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9601
9602 * linux-low.c (linux_wait_for_event): Do not pass signals while
9603 single-stepping.
9604
9605 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9606
9607 * win32-low.c (create_process): New.
9608 (win32_create_inferior): Use create_process instead of
9609 CreateProcess. If create_process failed retry appending an ".exe"
9610 suffix. Store the GetLastError result immediatelly after
9611 create_process calls and use it on the call to error.
9612
9613 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9614
9615 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9616
9617 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9618
9619 * configure.ac: Switch license to GPLv3.
9620
9621 2007-08-01 Michael Snyder <msnyder@access-company.com>
9622
9623 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9624
9625 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9626
9627 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9628 typedef.
9629 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9630 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9631 CloseToolhelp32Snapshot.
9632 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9633 CloseToolhelp32Snapshot.
9634
9635 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9636
9637 * server.c (main): Check for inferior exit before main loop.
9638
9639 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9642 instead of on tmp_desc.
9643
9644 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9645 Daniel Jacobowitz <dan@codesourcery.com>
9646
9647 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9648 (add_thread): Minor cleanups.
9649 (clear_inferiors): Move lower in the file. Clear the DLL
9650 list.
9651 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9652 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9653 (xml_escape_text): New.
9654 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9655 for qSupported.
9656 (handle_v_cont): Report errors.
9657 (gdbserver_version): Update.
9658 (main): Correct size of own_buf. Do not report initial DLL events.
9659 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9660 (unloaded_dll, xml_escape_text): New.
9661 * win32-low.c (enum target_waitkind): Update comments.
9662 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9663 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9664 (win32_EnumProcessModules, win32_GetModuleInformation)
9665 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9666 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9667 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9668 (win32_Module32First, win32_Module32Next, load_toolhelp)
9669 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9670 (get_child_debug_event): Handle DLL events.
9671 (win32_wait): Likewise.
9672
9673 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9674
9675 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9676 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9677
9678 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9679
9680 * win32-low.c (handle_output_debug_string): Ignore event if not
9681 waiting.
9682
9683 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9684
9685 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9686
9687 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9688
9689 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9690
9691 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9692
9693 * inferiors.c (change_inferior_id): Add comment.
9694 * linux-low.c (check_removed_breakpoint): Add an early
9695 prototype. Improve debug output.
9696 (linux_attach): Doc update.
9697 (linux_detach_one_process, linux_detach): Clean up before releasing
9698 each process.
9699 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9700 * linux-low.h (struct process_info): Doc improvement.
9701 * mem-break.c (delete_all_breakpoints): New.
9702 * mem-break.h (delete_all_breakpoints): New prototype.
9703 * thread-db.c (find_first_thread): New.
9704 (thread_db_create_event): Call it instead of
9705 thread_db_find_new_threads. Clean up unused variables.
9706 (maybe_attach_thread): Remove first thread handling.
9707 (thread_db_find_new_threads): Use find_first_thread.
9708 (thread_db_get_tls_address): Likewise.
9709
9710 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9711
9712 * thread-db.c (thread_db_find_new_threads): Add prototype.
9713 (thread_db_create_event): Check for the main thread before adding
9714 a new thread.
9715 (maybe_attach_thread): Only enable event reporting if TID == 0.
9716 (thread_db_get_tls_address): Check for new threads.
9717
9718 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * linux-low.c (linux_create_inferior): Try execv before execvp.
9721 * spu-low.c (spu_create_inferior): Likewise.
9722
9723 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9724
9725 * linux-low.c (linux_create_inferior): Change execv to execvp.
9726 * spu-low.c (spu_create_inferior): Likewies.
9727
9728 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9729
9730 * Makefile.in (clean): Clean new files instead of deleted ones.
9731 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9732 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9733 rules.
9734 * configure.srv: Specify XML files and new regformats for MIPS and
9735 MIPS64 GNU/Linux.
9736 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9737 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9738 an entry for the restart register.
9739 (mips_cannot_fetch_register, mips_cannot_store_register)
9740 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9741 register names to match the XML descriptions.
9742 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9743 restart register instead of $0.
9744
9745 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9746 Markus Deuling <deuling@de.ibm.com>
9747
9748 * remote-utils.c (decode_xfer_write): New function.
9749 * server.h (decode_xfer_write): Add prototype.
9750 * server.c (handle_query): Add PACKET_LEN argument. Support
9751 qXfer:spu:read and qXfer:spu:write packets.
9752 (main): Pass packet_len to handle_query.
9753 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9754 * target.h (target_ops): Add qxfer_spu.
9755
9756 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9757
9758 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9759 accessing non-seekable spufs files.
9760
9761 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9762
9763 * server.c (handle_query): Add reply for qC packet.
9764
9765 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9766 Leo Zayas <lerele@champenstudios@com>
9767
9768 * server.h (check_remote_input_interrupt_request): New function.
9769 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9770 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9771 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9772 (check_remote_input_interrupt_request): New function.
9773 * server.h (check_remote_input_interrupt_request): Declare.
9774 * win32-low.c (winapi_DebugBreakProcess,
9775 winapi_GenerateConsoleCtrlEvent): New typedefs.
9776 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9777 to 250 ms.
9778 (win32_wait): Check for remote interrupt request
9779 with check_remote_input_interrupt_request.
9780 (win32_request_interrupt): New function.
9781 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9782
9783 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9784
9785 * win32-low.c (debug_registers_changed,
9786 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9787 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9788 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9789 (thread_rec): Get context using the low target.
9790 (child_add_thread): Call thread_added on the low target,
9791 which does the same thing.
9792 (regptr): Delete.
9793 (do_initial_child_stuff): Remove debug registers references.
9794 Set context using the low target. Resume threads after
9795 setting the contexts.
9796 (child_continue): Remove dead variable. Remove debug
9797 registers references.
9798 (child_fetch_inferior_registers): Go through the low target.
9799 (do_child_store_inferior_registers): Remove.
9800 (child_store_inferior_registers): Go through the low target.
9801 (win32_resume): Remove debug registers references.
9802 Set context using the low target.
9803 (handle_exception): Change return type to void. Don't record
9804 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9805 first chance exception.
9806 (get_child_debug_event): Change return type to void. Remove
9807 goto loop. Always return after waiting for debug event.
9808 (win32_wait): Convert to switch statement. Handle spurious
9809 events.
9810
9811 * win32-i386-low.c (debug_registers_changed,
9812 debug_registers_used): New.
9813 (initial_stuff): Rename to ...
9814 (i386_initial_stuff): ... this. Clear debug registers
9815 state variables.
9816 (store_debug_registers): Delete.
9817 (i386_get_thread_context): New.
9818 (load_debug_registers): Delete.
9819 (i386_set_thread_context): New.
9820 (i386_thread_added): New.
9821 (single_step): Rename to ...
9822 (i386_single_step): ... this.
9823 (do_fetch_inferior_registers): Rename to ...
9824 (i386_fetch_inferior_register): ... this.
9825 (i386_store_inferior_register): New.
9826 (the_low_target): Adapt to new interface.
9827
9828 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9829 (arm_get_thread_context): New.
9830 (arm_set_thread_context): New.
9831 (regptr): New.
9832 (do_fetch_inferior_registers): Rename to ...
9833 (arm_fetch_inferior_register): ... this.
9834 (arm_store_inferior_register): New.
9835 (arm_wince_breakpoint): Reimplement as unsigned long.
9836 (arm_wince_breakpoint_len): Define.
9837 (the_low_target): Adapt to new interface.
9838
9839 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9840 load_debug_registers. Add get_thread_context, set_thread_context,
9841 thread_added and store_inferior_register. Rename
9842 fetch_inferior_registers to fetch_inferior_register.
9843 (regptr): Remove declaration.
9844
9845 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9846
9847 * linux-low.c (linux_detach): Change return type to int. Return 0.
9848 * spu-low.c (spu_detach): Likewise.
9849
9850 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9851
9852 * target.h (target_ops): Change return type of detach to int.
9853 Add join.
9854 (join_inferior): New.
9855 * server.c (main): Don't skip detach support on mingw32.
9856 If the inferior doesn't support detaching return error.
9857 Call join_inferior instead of using waitpid.
9858 * linux-low.c (linux_join): New.
9859 (linux_target_op): Add linux_join.
9860 * spu-low.c (spu_join): New.
9861 (spu_target_ops): Add spu_join.
9862 * win32-low.c (win32_detach): Adapt to new interface.
9863 Reopen current_process_handle before detaching. Issue a child
9864 resume before detaching.
9865 (win32_join): New.
9866 (win32_target_op): Add win32_join.
9867
9868 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9869
9870 * win32-low.c (win32-attach): Fix return value.
9871 * target.h (target_ops): Describe ATTACH return values.
9872
9873 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9874
9875 * win32-low.c (GETPROCADDRESS): Define.
9876 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9877 (winapi_DebugSetProcessKillOnExit): Likewise.
9878 (win32_create_inferior): Force usage of ansi CreateProcessA.
9879 (win32_attach): Use GETPROCADDRESS.
9880 (win32_detach): Likewise.
9881
9882 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9883
9884 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9885
9886 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9887
9888 * win32-low.c: Commit leftover changes from 2007-03-29.
9889
9890 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9893 fields short instead of int. Add explicit padding.
9894 (i387_cache_to_fsave): Remove unnecessary casts.
9895 (i387_fsave_to_cache): Doc fix.
9896 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9897
9898 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9901 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9902
9903 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9904
9905 * configure.srv (arm*-*-mingw32ce*): Move near the other
9906 arm targets.
9907
9908 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9909
9910 * configure.ac: Add errno checking.
9911 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9912 sys/file.h and malloc.h.
9913 (AC_CHECK_DECLS): Add perror.
9914 (srv_mingwce): Handle.
9915 * configure.srv (i[34567]86-*-cygwin*): Add
9916 win32-i386-low.o to srv_tgtobj.
9917 (i[34567]86-*-mingw*): Likewise.
9918 (arm*-*-mingw32ce*): Add case.
9919 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9920 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9921 [__MINGW32CE__] (strerror): New function.
9922 [__MINGW32CE__] (errno): Define to GetLastError.
9923 [__MINGW32CE__] (COUNTOF): New macro.
9924 (remote_open): Remove extra close call.
9925 * mem-break.c (delete_breakpoint_at): New function.
9926 * mem-break.h (delete_breakpoint_at): Declare.
9927 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9928 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9929 [USE_WIN32API] (read, write): Add char* casts.
9930 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9931 * server.h: Include wincecompat.h on Windows CE.
9932 [HAVE_ERRNO_H]: Check.
9933 (perror): Declare if not declared.
9934 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9935 (perror_with_name): Remove errno declaration.
9936 * wincecompat.h: New.
9937 * wincecompat.c: New.
9938 * win32-low.h: New.
9939 * win32-arm-low.c: New.
9940 * win32-i386-low.c: New.
9941 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9942 (OUTMSG2): Make it safe.
9943 (_T): New macro.
9944 (COUNTOF): New macro.
9945 (NUM_REGS): Get it from the low target.
9946 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9947 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9948 (thread_rec): Let low target handle debug registers.
9949 (child_add_thread): Likewise.
9950 (child_init_thread_list): Likewise.
9951 (continue_one_thread): Likewise.
9952 (regptr): New.
9953 (do_child_fetch_inferior_registers): Move to ...
9954 * win32-i386-low.c: ... here, and rename to ...
9955 (do_fetch_inferior_registers): ... this.
9956 * win32-low.c (child_fetch_inferior_registers):
9957 Go through the low target.
9958 (do_child_store_inferior_registers): Use regptr.
9959 (strwinerror): New function.
9960 (win32_create_inferior): Handle Windows CE.
9961 Use strwinerror instead of strerror on Windows error
9962 codes. Add program to the error output.
9963 Don't close the main thread handle on Windows CE.
9964 (win32_attach): Use coredll.dll on Windows CE.
9965 (win32_kill): Close current process and current
9966 thread handles.
9967 (win32_detach): Use coredll.dll on Windows CE.
9968 (win32_resume): Let low target handle debug registers, and
9969 step request.
9970 (handle_exception): Add/Remove initial breakpoint. Avoid
9971 non-existant WSTOPSIG on Windows CE.
9972 (win32_read_inferior_memory): Cast to remove warning.
9973 (win32_arch_string): Go through the low target.
9974 (initialize_low): Call set_breakpoint_data with the low
9975 target's breakpoint.
9976 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9977 FOP_REGNUM, mappings): Move to ...
9978 * win32-i386-low.c: ... here.
9979 * win32-low.c (win32_thread_info): Move to ...
9980 * win32-low.h: ... here.
9981 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9982 win32-arm-low.c and wincecompat.c.
9983 (all:): Add $EXEEXT.
9984 (install-only:): Likewise.
9985 (gdbserver:): Likewise.
9986 (gdbreplay:): Likewise.
9987 * config.in: Regenerate.
9988 * configure: Regenerate.
9989
9990 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9991
9992 * win32-low.c: Rename typedef thread_info to
9993 win32_thread_info throughout.
9994
9995 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9996
9997 * win32-i386-low.c: Rename to ...
9998 * win32-low.c: ... this.
9999 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10000 * Makefile.in: Likewise.
10001
10002 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10003
10004 * remote-utils.c (monitor_output): Constify msg parameter.
10005 * server.h (monitor_output): Likewise.
10006 * win32-i386-low.c (handle_output_debug_string): New.
10007 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10008 handle_output_debug_string.
10009 (get_child_debug_event): Likewise.
10010
10011 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10012
10013 * server.c (main): Correct strtoul check.
10014
10015 2007-03-27 Jon Ringle <jon@ringle.org>
10016
10017 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10018
10019 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10020
10021 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10022
10023 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10024
10025 * terminal.h: Check HAVE_SGTTY_H.
10026
10027 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10028
10029 * remote-utils.c (remote_open): Print out the assigned port number.
10030
10031 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10032
10033 * remote-utils.c (monitor_output): New function.
10034 * server.c (debug_threads): Define here.
10035 (monitor_show_help): New function.
10036 (handle_query): Handle qRcmd.
10037 (main): Do not handle 'd' packet.
10038 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10039 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10040 of debug_threads.
10041
10042 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10043
10044 * Makefile.in (EXEEXT): New.
10045 (clean): Use $(EXEEXT).
10046
10047 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10048
10049 * target.h (target_ops): Rename send_signal to request_interrupt,
10050 and remove enum target_signal parameter.
10051 * linux-low.c (linux_request_interrupt): Rename from
10052 linux_send_signal, and always send SIGINT.
10053 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10054 and always send SIGINT.
10055 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10056 of send_signal.
10057 (input_interrupt): Likewise.
10058
10059 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10060
10061 * server.c (get_features_xml): Check if target implemented
10062 arch_string.
10063 * win32-i386-low.c (win32_arch_string): New.
10064 (win32_target_ops): Add win32_arch_string as arch_string member.
10065
10066 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10067
10068 * spu-low.c (spu_arch_string): New.
10069 (spu_target_ops): Add spu_arch_string.
10070
10071 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10072
10073 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10074 * configure.ac: Do not check for terminal.h.
10075 * configure, config.in: Regenerated.
10076
10077 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10078
10079 * Makefile.in (OBS): Add $(XML_BUILTIN).
10080 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10081 (clean): Update.
10082 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10083 (arm-with-iwmmxt.c): New.
10084 * config.in, configure: Regenerate.
10085 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10086 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10087 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10088 (arm*-*-linux*): Add iWMMXt and regset support.
10089 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10090 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10091 (arm_store_wmmxregset, target_regsets): New.
10092 * server.c (get_features_xml): Take annex argument. Check builtin
10093 XML documents.
10094 (handle_query): Handle multiple annexes.
10095
10096 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10097
10098 * remote-utils.c [USE_WIN32API] (read, write): Define.
10099 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10100 write.
10101
10102 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10103
10104 * linux-i386-low.c (the_low_target): Set arch_string.
10105 * linux-x86-64-low.c (the_low_target): Likewise.
10106 * linux-low.c (linux_arch_string): New.
10107 (linux_target_ops): Add it.
10108 * linux-low.h (struct linux_target_ops): Add arch_string.
10109 * server.c (write_qxfer_response): Use const void * for DATA.
10110 (get_features_xml): New.
10111 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10112 * target.h (struct target_ops): Add arch_string method.
10113
10114 2007-01-03 Denis Pilat <denis.pilat@st.com>
10115 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * linux-low.c (linux_kill): Handle being called with no threads.
10118 * win32-i386-low.c (win32_kill): Likewise.
10119 (get_child_debug_event): Clear current_process_handle.
10120
10121 2006-12-30 Denis PILAT <denis.pilat@st.com>
10122 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * remote-utils.c (remote_open): Check the type of specified
10125 serial port devices before opening them.
10126 * server.c (main): Kill the inferior if an error occurs during
10127 the first remote_open.
10128
10129 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10130
10131 * README: Update supported targets.
10132
10133 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10134
10135 * Makefile.in (clean): Remove reg-mips64.c.
10136 (reg-mips64.c, reg-mips64.o): New rules.
10137 * configure.srv: Handle mips64. Include regset support for mips.
10138 * linux-mips-low.c (union mips_register): New.
10139 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10140 (mips_breakpoint, mips_breakpoint_at): Use int.
10141 (mips_collect_register, mips_supply_register)
10142 (mips_collect_register_32bit, mips_supply_register_32bit)
10143 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10144 (mips_store_fpregset, target_regsets): New.
10145 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10146
10147 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10148
10149 * configure.srv: Add target "spu*-*-*".
10150 * Makefile.in (clean): Remove reg-spu.c.
10151 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10152 * spu-low.c: New file.
10153
10154 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10155
10156 * configure.ac: Correct td_thr_tls_get_addr test.
10157 * configure: Regenerated.
10158
10159 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * linux-low.c (linux_wait_for_event): Reformat. Use the
10162 pass_signals array.
10163 * remote-utils.c (decode_address_to_semicolon): New.
10164 * server.c (pass_signals, handle_general_set): New.
10165 (handle_query): Mention QPassSignals for qSupported.
10166 (main): Call handle_general_set.
10167 * server.h (pass_signals, decode_address_to_semicolon): New.
10168
10169 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * server.c (handle_query): Correct error handling for read_auxv.
10172
10173 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10174
10175 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10176 and srv_linux_thread_db to yes.
10177 * linux-s390-low.c (s390_fill_gregset): New function.
10178 (target_regsets): Define data structure.
10179
10180 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10181
10182 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10183 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10184 * config.in, configure: Regenerated.
10185 * inferiors.c (gdb_id_to_thread): New function.
10186 (gdb_id_to_thread_id): Use it.
10187 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10188 * linux-low.h (struct process_info): Add th member.
10189 (thread_db_get_tls_address): New prototype.
10190 * remote-utils.c (decode_address): Make non-static.
10191 * server.c (handle_query): Handle qGetTLSAddr.
10192 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10193 * target.h (struct target_ops): Add get_tls_address.
10194 * thread-db.c (maybe_attach_thread): Save the thread handle.
10195 (thread_db_get_tls_address): New.
10196
10197 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10198
10199 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10200 (linux_resume_one_process): Take a siginfo_t *. Update all
10201 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10202 (struct pending_signals): Add a siginfo_t.
10203 (linux_wait_for_process): Always set last_status.
10204 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10205 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10206 * linux-low.h (struct process_info): Add last_status.
10207
10208 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10209
10210 * remote-utils.c (try_rle): New function.
10211 (putpkt_binary): Use it.
10212
10213 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10216 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10217 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10218 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10219 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10220 point registers.
10221
10222 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10223
10224 * server.c (terminal_fd): New variable.
10225 (old_foreground_pgrp): Likewise.
10226 (restore_old_foreground_pgrp): New function.
10227 (start_inferior): Record the terminal file descriptor in terminal_fd
10228 and its original foreground group in old_foreground_pgrp. Register
10229 restore_old_foreground_pgrp with atexit().
10230
10231 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * server.c (handle_query): Correct qPart to qXfer.
10234
10235 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10236
10237 * configure.ac: Check for more headers which are missing on
10238 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10239 * configure.srv: Add Cygwin and mingw32.
10240 * remote-utils.c: Don't include headers unconditionally which
10241 are missing on mingw32. Include <winsock.h> for mingw32.
10242 (remote_open): Adjust for mingw32 support. Flush
10243 standard error after writing to it.
10244 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10245 (unblock_async_io, enable_async_io, disable_async_io)
10246 (readchar, getpkt): Update for Winsock support.
10247 (prepare_resume_reply): Expect a protocol signal number.
10248 * server.c: Disable <sys/wait.h> on mingw32.
10249 (start_inferior): Adjust for mingw32 support. Flush
10250 standard error after writing to it.
10251 (attach_inferior): Likewise. Use protocol signal
10252 numbers.
10253 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10254 and names.
10255 * win32-i386-low.c: New file.
10256 * Makefile.in (XM_CLIBS): Set.
10257 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10258 (win32-i386-low.o): New dependency rule.
10259 * linux-low.c (linux_wait): Use target signal numbers.
10260 * target.h (struct target_ops): Doc fix.
10261 * server.h (target_signal_to_name): New prototype.
10262 * gdbreplay.c: Don't include headers unconditionally which
10263 are missing on mingw32. Include <winsock.h> for mingw32.
10264 (remote_close, remote_open): Adjust for Winsock support.
10265 * configure, config.in: Regenerated.
10266
10267 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10268
10269 * server.c (decode_xfer_read, write_qxfer_response): New.
10270 (handle_query): Take a packet length argument. Handle
10271 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10272 the qSupported response.
10273 (main): Update call to handle_query.
10274
10275 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10276
10277 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10278 (putpkt_binary): Renamed from putpkt and adjusted for binary
10279 data.
10280 (putpkt): New wrapper for putpkt_binary.
10281 (readchar): Don't mask off the high bit.
10282 (decode_X_packet): New function.
10283 * server.c (main): Call putpkt_binary if a handler sets the packet
10284 length. Save the length of the incoming packet. Handle 'X'.
10285 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10286
10287 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * server.c (handle_query): Handle qSupported.
10290
10291 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * remote-utils.c (all_symbols_looked_up): New variable.
10294 (look_up_one_symbol): Check it.
10295 * server.h (look_up_one_symbol): New declaration.
10296 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10297
10298 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * Makefile.in (linux-arm-low.o): Update dependencies.
10301 * linux-arm-low.c: Include "gdb_proc_service.h".
10302 (PTRACE_GET_THREAD_AREA): Define.
10303 (ps_get_thread_area): New function.
10304
10305 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10306
10307 * configure.srv (m68k*-*-uclinux*): New target.
10308 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10309 (linux_resume_one_process): Remove extraneous cast.
10310 (linux_read_offsets): New.
10311 (linux_target_op): Add linux_read_offsets on mmuless systems.
10312 * server.c (handle_query): Add qOffsets logic.
10313 * target.h (struct target_ops): Add read_offsets.
10314
10315 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10316
10317 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10318 (PTRACE_GET_THREAD_AREA): Define.
10319 (ps_get_thread_area): New function.
10320 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10321 (linux-x86-64-low.o): Update.
10322
10323 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10324
10325 * configure.ac: Remove checks for prfpregset_t.
10326 * gdb_proc_service.h: New file.
10327 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10328 new "gdb_proc_service.h".
10329 * proc-service.c: Likewise.
10330 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10331 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10332 * Makefile.in (gdb_proc_service_h): Updated.
10333 * configure, config.in: Regenerated.
10334
10335 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10336
10337 * remote-utils.c (prepare_resume_reply): Move declaration
10338 of gdb_id_from_wait to the top of the block.
10339
10340 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10341
10342 * linux-low.c (regsets_store_inferior_registers): Read the regset
10343 from the target before filling it.
10344
10345 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10346
10347 * server.c (attach_inferior): Return SIGTRAP for a successful
10348 attach.
10349
10350 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10351
10352 * Makefile.in (OBS): Add version.o.
10353 (STAGESTUFF): Delete.
10354 (version.o): Add dependencies.
10355 (version.c): Replace rule.
10356 (clean): Remove version.c.
10357 * server.c (gdbserver_version): New.
10358 (gdbserver_usage): Use printf.
10359 (main): Handle --version and --help.
10360 * server.h (version, host_name): Add declarations.
10361
10362 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10363
10364 * linux-arm-low.c:
10365 * linux-arm-low.c:
10366 * inferiors.c:
10367 * i387-fp.h:
10368 * i387-fp.c:
10369 * gdbreplay.c:
10370 * regcache.c:
10371 * proc-service.c:
10372 * mem-break.h:
10373 * mem-break.c:
10374 * linux-x86-64-low.c:
10375 * linux-sh-low.c:
10376 * linux-s390-low.c:
10377 * linux-ppc64-low.c:
10378 * linux-ppc-low.c:
10379 * linux-mips-low.c:
10380 * linux-m68k-low.c:
10381 * linux-m32r-low.c:
10382 * linux-low.h:
10383 * linux-low.c:
10384 * linux-ia64-low.c:
10385 * linux-i386-low.c:
10386 * linux-crisv32-low.c:
10387 * thread-db.c:
10388 * terminal.h:
10389 * target.h:
10390 * target.c:
10391 * server.h:
10392 * server.c:
10393 * remote-utils.c:
10394 * regcache.h:
10395 * utils.c:
10396 * Makefile.in:
10397 * configure.ac:
10398 * gdbserver.1: Add (C) after Copyright. Update the FSF
10399 address.
10400
10401 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10404 (arm_breakpoint_at): Recognize both breakpoints.
10405 (the_low_target): Use the correct breakpoint instruction.
10406
10407 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10410 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10411 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10412 (the_low_target): Update.
10413
10414 2005-10-25 Andreas Schwab <schwab@suse.de>
10415
10416 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10417
10418 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10419 (ia64_num_regs): Reduce to 462.
10420
10421 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10422
10423 * acinclude.m4: Correct quoting.
10424 * aclocal.m4: Regenerated.
10425
10426 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10427 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10428 (thread_db_init): Call thread_db_err_str.
10429 * configure.ac: Check for TD_VERSION.
10430 * config.in, configure: Regenerated.
10431
10432 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10433
10434 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10435
10436 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10439 is not available. Define HAVE_PTRACE_GETREGS if it is.
10440 * config.in, configure: Regenerated.
10441 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10442 * linux-i386-low.c, linux-m68k-low.c: Update to use
10443 HAVE_PTRACE_GETREGS.
10444 * linux-low.c (regsets_fetch_inferior_registers)
10445 (regsets_store_inferior_registers): Only return 0 if we processed
10446 GENERAL_REGS.
10447 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10448 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10449
10450 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10451
10452 * inferiors.c (struct thread_info): Add gdb_id.
10453 (add_thread): Add gdb_id argument.
10454 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10455 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10456 calls to add_thread.
10457 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10458 * server.c (handle_query): Use thread_to_gdb_id.
10459 (handle_v_cont, main): Use gdb_id_to_thread_id.
10460 * server.h (add_thread): Update prototype.
10461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10462 prototypes.
10463
10464 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10465
10466 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10467 left-padded registers.
10468 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10469 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10470
10471 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10472
10473 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10474 * configure: Regenerate.
10475 * config.in: Regenerate.
10476 * server.h (NEED_DECLARATION_STRERROR):
10477 Replace with !HAVE_DECL_STRERROR.
10478
10479 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * linux-low.c (linux_wait, linux_send_signal): Don't test
10482 an unsigned long variable for > 0 if it could be MAX_ULONG.
10483 * server.c (myresume): Likewise.
10484 * target.c (set_desired_inferior): Likewise.
10485
10486 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10487
10488 * configure.ac: Simplify and improve check for socklen_t.
10489 * configure, config.in: Regenerate.
10490
10491 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10492
10493 * acconfig.h: Remove.
10494 * configure.ac: Add a test for socklen_t. Use three-argument
10495 AC_DEFINE throughout.
10496 * config.in: Regenerated using autoheader 2.59.
10497 * configure: Regenerated.
10498
10499 * gdbreplay.c (socklen_t): Provide a default.
10500 (remote_open): Use socklen_t.
10501 * remote-utils.c (socklen_t): Provide a default.
10502 (remote_open): Use socklen_t.
10503 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10504 unsigned char.
10505
10506 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10507 char for buffers.
10508 * linux-low.c (linux_read_memory, linux_write_memory)
10509 (linux_read_auxv): Likewise.
10510 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10511 (check_mem_write): Likewise.
10512 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10513 Likewise.
10514 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10515 (registers_from_string, register_data): Likewise.
10516 * server.c (handle_query, main): Likewise.
10517 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10518 (decode_M_packet): Likewise.
10519 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10520 * target.h (struct target_ops): Update read_memory, write_memory,
10521 and read_auxv.
10522 (read_inferior_memory, write_inferior_memory): Update.
10523 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10524 to unsigned char *.
10525 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10526 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10527 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10528 linux-s390-low.c, linux-sh-low.c: Update for changes in
10529 read_inferior_memory and the_low_target->breakpoint.
10530
10531 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10534 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10535 * configure.srv: Add powerpc64-*-linux*.
10536 * linux-ppc64-low.c: New file.
10537
10538 2005-05-23 Orjan Friberg <orjanf@axis.com>
10539
10540 * linux-cris-low.c: New file with support for CRIS.
10541 * linux-crisv32-low.c: Ditto for CRISv32.
10542 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10543 (clean): Add reg-cris.c and reg-crisv32.c.
10544 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10545 reg-crisv32.o, and reg-crisv32.c to make rules.
10546 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10547 recognized targets.
10548
10549 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10550
10551 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10552 of sizeof (PTRACE_XFER_TYPE).
10553 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10554
10555 2005-05-12 Orjan Friberg <orjanf@axis.com>
10556
10557 * target.h (struct target_ops): Add insert_watchpoint,
10558 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10559 pointers for hardware watchpoint support.
10560 * linux-low.h (struct linux_target_ops): Ditto.
10561 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10562 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10563 to linux_target_ops.
10564 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10565 reply packet.
10566 * server.c (main): Recognize 'Z' and 'z' packets.
10567
10568 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10569
10570 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10571 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10572 (the_low_target): Add new members.
10573
10574 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10575
10576 * proc-service.c (ps_lgetregs): Search all_processes instead of
10577 all_threads.
10578
10579 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10580
10581 * server.c (start_inferior): Change return type to int.
10582 (attach_inferior): Change sigptr to int *.
10583 (handle_v_cont, handle_v_requests): Change signal to int *.
10584 (main): Change signal to int.
10585
10586 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10587
10588 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10589 * configure.srv: Add m32r*-*-linux*.
10590 * linux-m32r-low.c: New file.
10591
10592 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10593
10594 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10595
10596 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10597
10598 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10599 Take unsigned long arguments for PIDs.
10600 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10601 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10602 (wait_for_sigstop, linux_resume_one_process)
10603 (regsets_fetch_inferior_registers, linux_send_signal)
10604 (linux_read_auxv): Likewise. Update the types of variables holding
10605 PIDs. Update format string specifiers.
10606 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10607 * remote-utils.c (prepare_resume_reply): Likewise.
10608 * server.c (cont_thread, general_thread, step_thread)
10609 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10610 unsigned long.
10611 (handle_query): Update format specifiers.
10612 (handle_v_cont, main): Use strtoul for thread IDs.
10613 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10614 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10615 (general_thread, step_thread, thread_from_wait)
10616 (old_thread_from_wait): Update.
10617 * target.h (struct thread_resume): Use unsigned long for THREAD.
10618 (struct target_ops): Use unsigned long for arguments to attach and
10619 thread_alive.
10620
10621 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10622
10623 * acinclude.m4: Include bfd/bfd.m4 directly.
10624 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10625 <agriffis@toolchain.org>.
10626 * aclocal.m4, configure: Regenerated.
10627
10628 2005-01-07 Andrew Cagney <cagney@gnu.org>
10629
10630 * configure.ac: Rename configure.in, require autoconf 2.59.
10631 * configure: Re-generate.
10632
10633 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10634
10635 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10636 LIBS when finished.
10637 * aclocal.m4: Regenerated.
10638 * configure: Regenerated.
10639
10640 2004-11-21 Andreas Schwab <schwab@suse.de>
10641
10642 * linux-m68k-low.c (m68k_num_gregs): Define.
10643 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10644 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10645 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10646 (m68k_breakpoint_at): New. Add to the_low_target.
10647
10648 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10649 srv_linux_thread_db to yes.
10650
10651 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10652
10653 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10654 (ARCH_SET_FS): Likewise.
10655 (ARCH_GET_FS): Likewise.
10656 (ARCH_GET_GS): Likewise.
10657
10658 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10659
10660 * linux-i386-low.c (ps_get_thread_area): New.
10661 * linux-x86-64-low.c (ps_get_thread_area): New.
10662 * linux-low.c: Include <sys/syscall.h>.
10663 (linux_kill_one_process): Don't kill the first thread here.
10664 (linux_kill): Kill the first thread here.
10665 (kill_lwp): New function.
10666 (send_sigstop, linux_send_signal): Use it.
10667 * proc-service.c: Clean up #ifdefs.
10668 (fpregset_info): Delete.
10669 (ps_lgetregs): Update and enable implementation.
10670 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10671 implementations.
10672 * remote-utils.c (struct sym_cache, symbol_cache): New.
10673 (input_interrupt): Print a clearer message.
10674 (async_io_enabled): New variable.
10675 (enable_async_io, disable_async_io): Use it. Update comments.
10676 (look_up_one_symbol): Use the symbol cache.
10677 * thread-db.c (thread_db_look_up_symbols): New function.
10678 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10679
10680 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10681
10682 * configure.in: Test for -rdynamic.
10683 * configure: Regenerated.
10684 * Makefile (INTERNAL_LDFLAGS): New.
10685 (gdbserver, gdbreplay): Use it.
10686
10687 2004-09-02 Andrew Cagney <cagney@gnu.org>
10688
10689 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10690
10691 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10692
10693 * linux-low.c (linux_wait): Clear all_processes list also.
10694
10695 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10696
10697 * linux-low.c: Include <errno.h>. Remove extern declaration of
10698 errno.
10699
10700 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10701
10702 * gdbreplay.c, server.h, utils.c: Update copyright years.
10703
10704 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10705
10706 * server.c (main): Print child status or termination signal from
10707 variable 'signal', not 'sig'.
10708
10709 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10710
10711 * linux-low.c (linux_read_memory): Change return type to
10712 int. Check for and return error from ptrace().
10713 * target.c (read_inferior_memory): Change return type to int. Pass
10714 back return status from the_target->read_memory().
10715 * target.h (struct target_ops): Adapt *read_memory() prototype.
10716 Update comment.
10717 (read_inferior_memory): Adapt prototype.
10718 * server.c (main): Return an error packet if
10719 read_inferior_memory() returns an error.
10720
10721 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10722
10723 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10724 Unify with other clean targets.
10725
10726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10727
10728 * server.c (handle_v_cont): Call set_desired_inferior.
10729
10730 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10731
10732 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10733
10734 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10735
10736 * linux-low.c (linux_wait): Unblock async I/O.
10737 (linux_resume): Block and enable async I/O.
10738 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10739 * server.h (block_async_io, unblock_async_io): Add prototypes.
10740
10741 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10742
10743 * remote-utils.c (remote_open): Print a status notice after
10744 opening a TCP port.
10745 * server.c (attach_inferior): Print a status notice after
10746 attaching.
10747
10748 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10749
10750 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10751
10752 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10753
10754 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10755 error packet.
10756 * server.c, target.h: Update copyright years.
10757
10758 2004-02-25 Roland McGrath <roland@redhat.com>
10759
10760 * target.h (struct target_ops): New member `read_auxv'.
10761 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10762 * linux-low.c (linux_read_auxv): New function.
10763 (linux_target_ops): Initialize `read_auxv' member to that.
10764
10765 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10766
10767 Committed by Jim Blandy <jimb@redhat.com>.
10768
10769 * linux-s390-low.c (s390_num_regs): Update.
10770 (s390_regmap): Remove control registers. Use __s390x__ predefine
10771 instead of GPR_SIZE to distiguish s390 and s390x targets.
10772
10773 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10774
10775 * linux-low.c: Update copyright year.
10776 (check_removed_breakpoint): Clear pending_is_breakpoint.
10777 (linux_set_resume_request, linux_queue_one_thread)
10778 (resume_status_pending_p): New functions.
10779 (linux_continue_one_thread): Use process->resume.
10780 (linux_resume): Only resume threads if there are no pending events.
10781 * linux-low.h (struct process_info): Add resume request
10782 pointer.
10783
10784 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * regcache.c (new_register_cache): Clear the allocated register
10787 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10788
10789 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10790
10791 * linux-low.c (linux_resume): Take a struct thread_resume *
10792 argument.
10793 (linux_wait): Update call.
10794 (resume_ptr): New static variable.
10795 (linux_continue_one_thread): Renamed from
10796 linux_continue_one_process. Use resume_ptr.
10797 (linux_resume): Use linux_continue_one_thread.
10798 * server.c (handle_v_cont, handle_v_requests): New functions.
10799 (myresume): New function.
10800 (main): Handle 'v' case.
10801 * target.h (struct thread_resume): New type.
10802 (struct target_ops): Change argument of "resume" to struct
10803 thread_resume *.
10804 (myresume): Delete macro.
10805
10806 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10807
10808 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10809 (uninstall): Support DESTDIR.
10810
10811 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10812
10813 * configure.srv: Add xscale*linux copy of arm*linux entry.
10814
10815 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10816
10817 * linux-arm-low.c (arm_reinsert_addr): New function.
10818 (the_low_target): Add arm_reinsert_addr.
10819
10820 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10821
10822 * mem-break.c: Remove whitespace at end of file.
10823
10824 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10825
10826 * configure.in: Check whether we need to prototype strerror.
10827 * server.h: Optionally prototype strerror.
10828 * gdbreplay.c (perror_with_name): Use strerror.
10829 * linux-low.c (linux_attach_lwp): Use strerror.
10830 * utils.c (perror_with_name): Use strerror.
10831 * config.in, configure: Regenerated.
10832
10833 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10834
10835 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10836 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10837
10838 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10839
10840 * Makefile.in (SFILES): Update.
10841 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10842 low-sun3.c: Remove files.
10843
10844 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10845
10846 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10847 (linux_detach_one_process, linux_detach): New functions.
10848 (linux_target_ops): Add linux_detach.
10849 * server.c (main): Handle 'D' packet.
10850 * target.h (struct target_ops): Add "detach" member.
10851 (detach_inferior): Define.
10852
10853 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10854
10855 From Kelley Cook <kelleycook@wideopenwest.com>:
10856 * configure.srv: Accept i[34567]86 variants.
10857
10858 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10859
10860 * linux-low.c (linux_wait_for_event): Correct comment typos.
10861 (linux_resume_one_process): Call check_removed_breakpoint.
10862 (linux_send_signal): New function.
10863 (linux_target_ops): Add linux_send_signal.
10864 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10865 of kill.
10866 * target.h (struct target_ops): Add send_signal.
10867
10868 2003-05-29 Jim Blandy <jimb@redhat.com>
10869
10870 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10871 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10872 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10873 away part of the register's value.
10874
10875 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10876
10877 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10878 (linux_wait_for_event, linux_init_signals): Likewise.
10879
10880 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10881
10882 * configure.in: Check for stdlib.h.
10883 * configure: Regenerated.
10884 * config.in: Regenerated.
10885
10886 2003-01-04 Andreas Schwab <schwab@suse.de>
10887
10888 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10889
10890 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10891
10892 * Makefile.in: Remove obsolete code.
10893
10894 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10895
10896 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10897 defined(PT_FPR0_HI).
10898
10899 2002-11-17 Stuart Hughes <seh@zee2.com>
10900
10901 * linux-arm-low.c (arm_num_regs): Increase.
10902 (arm_regmap): Include status register.
10903
10904 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * linux-low.c (register_addr): Remove incorrect -1 check.
10907
10908 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10909
10910 * linux-low.c (linux_create_inferior): Call setpgid. Return
10911 the new PID.
10912 (unstopped_p, linux_signal_pid): Remove.
10913 (linux_target_ops): Remove linux_signal_pid.
10914 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10915 global instead of target method.
10916 * target.h (struct target_ops): Remove signal_pid. Update comment
10917 for create_inferior.
10918 * server.c (signal_pid): New variable.
10919 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10920 gdbserver. Set the child to be the foreground process group.
10921 (attach_inferior): Set signal_pid.
10922
10923 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10924
10925 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10926
10927 2002-08-20 Jim Blandy <jimb@redhat.com>
10928
10929 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10930 default for this.
10931
10932 2002-08-01 Andrew Cagney <cagney@redhat.com>
10933
10934 * Makefile.in: Make chill references obsolete.
10935
10936 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10937
10938 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10939 * configure: Regenerate.
10940 * config.in: Regenerate.
10941
10942 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10943
10944 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10945 (perror_with_name, remote_close, remote_open, expect, play): Static.
10946
10947 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10948
10949 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10950 byte offsets instead of an array of indexes.
10951 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10952
10953 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10954
10955 * regcache.c: Add comment.
10956
10957 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10958
10959 * thread-db.c: New file.
10960 * proc-service.c: New file.
10961 * acinclude.m4: New file.
10962 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10963 proc-service.o, and thread-db.o.
10964 (linux-low.o): Add USE_THREAD_DB.
10965 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10966 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10967 * aclocal.m4: Regenerated.
10968 * config.in: Regenerated.
10969 * configure: Regenerated.
10970 * configure.in: Check for proc_service.h, sys/procfs.h,
10971 thread_db.h, and linux/elf.h headrs.
10972 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10973 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10974 Check for -lthread_db and thread support.
10975 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10976 PowerPC, and SuperH.
10977 * i387-fp.c: Constify arguments.
10978 * i387-fp.h: Likewise.
10979 * inferiors.c: (struct thread_info): Renamed from
10980 `struct inferior_info'. Remove PID member. Use generic inferior
10981 list header. All uses updated.
10982 (inferiors, signal_pid): Removed.
10983 (all_threads): New variable.
10984 (get_thread): Define.
10985 (add_inferior_to_list): New function.
10986 (for_each_inferior): New function.
10987 (change_inferior_id): New function.
10988 (add_inferior): Removed.
10989 (remove_inferior): New function.
10990 (add_thread): New function.
10991 (free_one_thread): New function.
10992 (remove_thread): New function.
10993 (clear_inferiors): Use for_each_inferior and free_one_thread.
10994 (find_inferior): New function.
10995 (find_inferior_id): New function.
10996 (inferior_target_data): Update argument type.
10997 (set_inferior_target_data): Likewise.
10998 (inferior_regcache_data): Likewise.
10999 (set_inferior_regcache_data): Likewise.
11000 * linux-low.c (linux_bp_reinsert): Remove.
11001 (all_processes, stopping_threads, using_thrads)
11002 (struct pending_signals, debug_threads, pid_of): New.
11003 (inferior_pid): Replace with macro.
11004 (struct inferior_linux_data): Remove.
11005 (get_stop_pc, add_process): New functions.
11006 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11007 Use add_process and add_thread.
11008 (linux_attach_lwp): New function, based on old linux_attach. Use
11009 add_process and add_thread. Set stop_expected for new threads.
11010 (linux_attach): New function.
11011 (linux_kill_one_process): New function.
11012 (linux_kill): Kill all LWPs.
11013 (linux_thread_alive): Use find_inferior_id.
11014 (check_removed_breakpoints, status_pending_p): New functions.
11015 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11016 Update. Use WNOHANG. Wait for cloned processes also. Update process
11017 struct for the found process.
11018 (linux_wait_for_event): New function.
11019 (linux_wait): Use it. Support LWPs.
11020 (send_sigstop, wait_for_sigstop, stop_all_processes)
11021 (linux_resume_one_process, linux_continue_one_process): New functions.
11022 (linux_resume): Support LWPs.
11023 (REGISTER_RAW_SIZE): Remove.
11024 (fetch_register): Use register_size instead. Call supply_register.
11025 (usr_store_inferior_registers): Likewise. Call collect_register.
11026 Fix recursive case.
11027 (regsets_fetch_inferior_registers): Improve error message.
11028 (regsets_store_inferior_registers): Add debugging.
11029 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11030 (unstopped_p, linux_signal_pid): New functions.
11031 (linux_target_ops): Add linux_signal_pid.
11032 (linux_init_signals): New function.
11033 (initialize_low): Call it. Initialize using_threads.
11034 * regcache.c (inferior_regcache_data): Add valid
11035 flag.
11036 (get_regcache): Fetch registers lazily. Add fetch argument
11037 and update all callers.
11038 (regcache_invalidate_one, regcache_invalidate): New
11039 functions.
11040 (new_register_cache): Renamed from create_register_cache.
11041 Return the new regcache.
11042 (free_register_cache): Change argument to a void *.
11043 (registers_to_string, registers_from_string): Call get_regcache
11044 with fetch flag set.
11045 (register_data): Make static. Pass fetch flag to get_regcache.
11046 (supply_register): Call get_regcache with fetch flag clear.
11047 (collect_register): Call get_regcache with fetch flag set.
11048 (collect_register_as_string): New function.
11049 * regcache.h: Update.
11050 * remote-utils.c (putpkt): Flush after debug output and use
11051 stderr.
11052 Handle input interrupts while waiting for an ACK.
11053 (input_interrupt): Use signal_pid method.
11054 (getpkt): Flush after debug output and use stderr.
11055 (outreg): Use collect_register_as_string.
11056 (new_thread_notify, dead_thread_notify): New functions.
11057 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11058 and general_thread.
11059 (look_up_one_symbol): Flush after debug output.
11060 * server.c (step_thread, server_waiting): New variables.
11061 (start_inferior): Don't use signal_pid. Update call to mywait.
11062 (attach_inferior): Update call to mywait.
11063 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11064 (main): Don't fetch/store registers explicitly. Use
11065 set_desired_inferior. Support proposed ``Hs'' packet. Update
11066 calls to mywait.
11067 * server.h: Update.
11068 (struct inferior_list, struct_inferior_list_entry): New.
11069 * target.c (set_desired_inferior): New.
11070 (write_inferior_memory): Constify.
11071 (mywait): New function.
11072 * target.h: Update.
11073 (struct target_ops): New signal_pid method.
11074 (mywait): Removed macro, added prototype.
11075
11076 * linux-low.h (regset_func): Removed.
11077 (regset_fill_func, regset_store_func): New.
11078 (enum regset_type): New.
11079 (struct regset_info): Add type field. Use new operation types.
11080 (struct linux_target_ops): stop_pc renamed to get_pc.
11081 Add decr_pc_after_break and breakpoint_at.
11082 (get_process, get_thread_proess, get_process_thread)
11083 (strut process_info, all_processes, linux_attach_lwp)
11084 (thread_db_init): New.
11085
11086 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11087 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11088 (the_low_target): Add new members.
11089 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11090 (i386_store_fpxregset): Constify.
11091 (target_regsets): Add new kind identifier.
11092 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11093 (i386_set_pc): Add debugging.
11094 (i386_breakpoint_at): New function.
11095 (the_low_target): Add new members.
11096 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11097 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11098 (mips_breakpoint_at): New.
11099 (the_low_target): Add new members.
11100 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11101 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11102 (the_low_target): Add new members.
11103 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11104 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11105 (the_low_target): Add new members.
11106 * linux-x86-64-low.c (target_regsets): Add new kind
11107 identifier.
11108
11109 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11110
11111 From Martin Pool <mbp@samba.org>:
11112 * server.c (gdbserver_usage): New function.
11113 (main): Call it.
11114
11115 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11116
11117 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11118 stop_at -> stop_pc.
11119
11120 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11121
11122 * Makefile.in: Remove obsolete code.
11123
11124 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11125
11126 * linux-low.c (regsets_fetch_inferior_registers),
11127 (regsets_store_inferior_registers): Removed cast to int from
11128 ptrace() calls.
11129 * regcache.h: Added declaration of struct inferior_info.
11130
11131 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * inferiors.c (struct inferior_info): Add regcache_data.
11134 (add_inferior): Call create_register_cache.
11135 (clear_inferiors): Call free_register_cache.
11136 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11137 * regcache.c (struct inferior_regcache_data): New.
11138 (registers): Remove.
11139 (get_regcache): New function.
11140 (create_register_cache, free_register_cache): New functions.
11141 (set_register_cache): Don't initialize the register cache here.
11142 (registers_to_string, registers_from_string, register_data): Call
11143 get_regcache.
11144 * regcache.h: Add prototypes.
11145 * server.h: Likewise.
11146
11147 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11148
11149 * mem-break.c: New file.
11150 * mem-break.h: New file.
11151 * Makefile.in: Add mem-break.o rule; update server.h
11152 dependencies.
11153 * inferiors.c (struct inferior_info): Add target_data
11154 member.
11155 (clear_inferiors): Free target_data member if set.
11156 (inferior_target_data, set_inferior_target_data): New functions.
11157 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11158 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11159 * linux-low.c (linux_bp_reinsert): New variable.
11160 (struct inferior_linux_data): New.
11161 (linux_create_inferior): Use set_inferior_target_data.
11162 (linux_attach): Likewise. Call add_inferior.
11163 (linux_wait_for_one_inferior): New function.
11164 (linux_wait): Call it.
11165 (linux_write_memory): Add const.
11166 (initialize_low): Call set_breakpoint_data.
11167 * linux-low.h (struct linux_target_ops): Add breakpoint
11168 handling members.
11169 * server.c (attach_inferior): Remove extra add_inferior
11170 call.
11171 * server.h: Include mem-break.h. Update inferior.c
11172 prototypes.
11173 * target.c (read_inferior_memory)
11174 (write_inferior_memory): New functions.
11175 * target.h (read_inferior_memory)
11176 (write_inferior_memory): Change macros to prototypes.
11177 (struct target_ops): Update comments. Add const to write_memory
11178 definition.
11179
11180 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11181
11182 * linux-low.c (usr_store_inferior_registers): Support
11183 registers which are allowed to fail to store.
11184 * linux-low.h (linux_target_ops): Likewise.
11185 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11186 (ppc_cannot_store_register): FPSCR may not be storable.
11187
11188 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11189
11190 * server.h: Include <string.h> if HAVE_STRING_H.
11191 * ChangeLog: Correct paths in last ChangeLog entry.
11192
11193 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11194
11195 * linux-low.h: Remove obsolete prototypes.
11196 (struct linux_target_ops): New.
11197 (extern the_low_target): New.
11198 * linux-low.c (num_regs, regmap): Remove declarations.
11199 (register_addr): Use the_low_target explicitly.
11200 (fetch_register): Likewise.
11201 (usr_fetch_inferior_registers): Likewise.
11202 (usr_store_inferior_registers): Likewise.
11203 * linux-arm-low.c (num_regs): Remove.
11204 (arm_num_regs): Define.
11205 (arm_regmap): Renamed from regmap, made static.
11206 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11207 made static.
11208 (arm_cannot_store_register): Renamed from cannot_store_register,
11209 made static.
11210 (the_low_target): New.
11211 * linux-i386-low.c (num_regs): Remove.
11212 (i386_num_regs): Define.
11213 (i386_regmap): Renamed from regmap, made static.
11214 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11215 made static.
11216 (i386_cannot_store_register): Renamed from cannot_store_register,
11217 made static.
11218 (the_low_target): New.
11219 * linux-ia64-low.c (num_regs): Remove.
11220 (ia64_num_regs): Define.
11221 (ia64_regmap): Renamed from regmap, made static.
11222 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11223 made static.
11224 (ia64_cannot_store_register): Renamed from cannot_store_register,
11225 made static.
11226 (the_low_target): New.
11227 * linux-m68k-low.c (num_regs): Remove.
11228 (m68k_num_regs): Define.
11229 (m68k_regmap): Renamed from regmap, made static.
11230 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11231 made static.
11232 (m68k_cannot_store_register): Renamed from cannot_store_register,
11233 made static.
11234 (the_low_target): New.
11235 * linux-mips-low.c (num_regs): Remove.
11236 (mips_num_regs): Define.
11237 (mips_regmap): Renamed from regmap, made static.
11238 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11239 made static.
11240 (mips_cannot_store_register): Renamed from cannot_store_register,
11241 made static.
11242 (the_low_target): New.
11243 * linux-ppc-low.c (num_regs): Remove.
11244 (ppc_num_regs): Define.
11245 (ppc_regmap): Renamed from regmap, made static.
11246 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11247 made static.
11248 (ppc_cannot_store_register): Renamed from cannot_store_register,
11249 made static.
11250 (the_low_target): New.
11251 * linux-s390-low.c (num_regs): Remove.
11252 (s390_num_regs): Define.
11253 (s390_regmap): Renamed from regmap, made static.
11254 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11255 made static.
11256 (s390_cannot_store_register): Renamed from cannot_store_register,
11257 made static.
11258 (the_low_target): New.
11259 * linux-sh-low.c (num_regs): Remove.
11260 (sh_num_regs): Define.
11261 (sh_regmap): Renamed from regmap, made static.
11262 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11263 made static.
11264 (sh_cannot_store_register): Renamed from cannot_store_register,
11265 made static.
11266 (the_low_target): New.
11267 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11268 (the_low_target): New.
11269
11270 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11271
11272 * Makefile.in: Add stamp-h target.
11273 * configure.in: Create stamp-h.
11274 * configure: Regenerated.
11275
11276 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11277
11278 * inferiors.c: New file.
11279 * target.c: New file.
11280 * target.h: New file.
11281 * Makefile.in: Add target.o and inferiors.o. Update
11282 dependencies.
11283 * linux-low.c (inferior_pid): New static variable,
11284 moved from server.c.
11285 (linux_create_inferior): Renamed from create_inferior.
11286 Call add_inferior. Return 0 on success instead of a PID.
11287 (linux_attach): Renamed from myattach.
11288 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11289 (linux_thread_alive): Renamed from mythread_alive.
11290 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11291 child dies.
11292 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11293 (regsets_store_inferior_registers): Correct error message.
11294 Add missing ``return 0''.
11295 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11296 (linux_store_registers): Renamed from store_inferior_registers.
11297 (linux_read_memory): Renamed from read_inferior_memory.
11298 (linux_write_memory): Renamed from write_inferior_memory.
11299 (linux_target_ops): New structure.
11300 (initialize_low): Call set_target_ops ().
11301 * remote-utils.c (unhexify): New function.
11302 (hexify): New function.
11303 (input_interrupt): Send signals to ``signal_pid''.
11304 * server.c (inferior_pid): Remove.
11305 (start_inferior): Update create_inferior call.
11306 (attach_inferior): Call add_inferior.
11307 (handle_query): New function.
11308 (main): Call handle_query for `q' packets.
11309 * server.h: Include "target.h". Remove obsolete prototypes.
11310 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11311
11312 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11313
11314 * Makefile.in: Add WARN_CFLAGS. Update configury
11315 dependencies.
11316 * configure.in: Check for <string.h>
11317 * configure: Regenerate.
11318 * config.in: Regenerate.
11319 * gdbreplay.c: Include needed system headers.
11320 (remote_open): Remove strchr prototype.
11321 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11322 * regcache.c (supply_register): Change buf argument to const void *.
11323 (supply_register_by_name): Likewise.
11324 (collect_register): Change buf argument to void *.
11325 (collect_register_by_name): Likewise.
11326 * regcache.h: Add missing prototypes.
11327 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11328 * server.c (handle_query): New function.
11329 (attached): New static variable, moved out of main.
11330 (main): Quiet longjmp clobber warnings.
11331 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11332 * utils.c (error): Remove NORETURN.
11333 (fatal): Likewise.
This page took 0.281491 seconds and 4 git commands to generate.