[GDBServer][AArch64] Use the same break instruction as GDB
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2
3 * linux-aarch64-low.c: Remove comment about endianness.
4 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6 memcmp.
7
8 2015-06-24 Gary Benson <gbenson@redhat.com>
9
10 * linux-i386-ipa.c (stdint.h): Do not include.
11 * lynx-i386-low.c (stdint.h): Likewise.
12 * lynx-ppc-low.c (stdint.h): Likewise.
13 * mem-break.c (stdint.h): Likewise.
14 * thread-db.c (stdint.h): Likewise.
15 * tracepoint.c (stdint.h): Likewise.
16 * win32-low.c (stdint.h): Likewise.
17
18 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
19
20 * server.c (write_qxfer_response): Update call to
21 remote_escape_output.
22
23 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
24 Jan Kratochvil <jan.kratochvil@redhat.com>
25
26 Merge multiple hex conversions.
27 * gdbreplay.c (tohex): Rename to 'fromhex'.
28 (logchar): Use fromhex.
29
30 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
31
32 * server.c (handle_qxfer_libraries): Set `version' attribute for
33 <library-list>.
34
35 2015-06-10 Gary Benson <gbenson@redhat.com>
36
37 * target.h (struct target_ops) <multifs_open>: New field.
38 <multifs_unlink>: Likewise.
39 <multifs_readlink>: Likewise.
40 * linux-low.c (nat/linux-namespaces.h): New include.
41 (linux_target_ops): Initialize the_target->multifs_open,
42 the_target->multifs_unlink and the_target->multifs_readlink.
43 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
44 * hostio.c (hostio_fs_pid): New static variable.
45 (hostio_handle_new_gdb_connection): New function.
46 (handle_setfs): Likewise.
47 (handle_open): Use the_target->multifs_open as appropriate.
48 (handle_unlink): Use the_target->multifs_unlink as appropriate.
49 (handle_readlink): Use the_target->multifs_readlink as
50 appropriate.
51 (handle_vFile): Handle vFile:setfs packets.
52 * server.c (handle_query): Call hostio_handle_new_gdb_connection
53 after target_handle_new_gdb_connection.
54
55 2015-06-10 Gary Benson <gbenson@redhat.com>
56
57 * configure.ac (AC_CHECK_FUNCS): Add setns.
58 * config.in: Regenerate.
59 * configure: Likewise.
60 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
61 (linux-namespaces.o): New rule.
62 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
63
64 2015-06-09 Gary Benson <gbenson@redhat.com>
65
66 * hostio.c (handle_open): Process mode argument with
67 fileio_to_host_mode.
68
69 2015-06-01 Yao Qi <yao.qi@linaro.org>
70
71 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
72 * linux-x86-low.c: Likewise.
73
74 2015-05-28 Don Breazeal <donb@codesourcery.com>
75
76 * linux-low.c (handle_extended_wait): Initialize
77 thread_info.last_resume_kind for new fork children.
78
79 2015-05-15 Pedro Alves <palves@redhat.com>
80
81 * target.h (target_handle_new_gdb_connection): Rewrite using if
82 wrapped in do/while.
83
84 2015-05-14 Joel Brobecker <brobecker@adacore.com>
85
86 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
87 * configure, config.in: Regenerate.
88 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
89 Declare typedef.
90
91 2015-05-12 Don Breazeal <donb@codesourcery.com>
92
93 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
94 PTRACE_EVENT_VFORK_DONE.
95 (linux_low_ptrace_options, extended_event_reported): Add vfork
96 events.
97 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
98 and "vforkdone" for RSP 'T' Stop Reply Packet.
99 * server.h (report_vfork_events): Declare
100 global variable.
101
102 2015-05-12 Don Breazeal <donb@codesourcery.com>
103
104 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
105 (the_low_target) <new_fork>: Initialize new member.
106 * linux-arm-low.c (arm_new_fork): New function.
107 (the_low_target) <new_fork>: Initialize new member.
108 * linux-low.c (handle_extended_wait): Call new target function
109 new_fork.
110 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
111 * linux-mips-low.c (mips_add_watchpoint): New function
112 extracted from mips_insert_point.
113 (the_low_target) <new_fork>: Initialize new member.
114 (mips_linux_new_fork): New function.
115 (mips_insert_point): Call mips_add_watchpoint.
116 * linux-x86-low.c (x86_linux_new_fork): New function.
117 (the_low_target) <new_fork>: Initialize new member.
118
119 2015-05-12 Don Breazeal <donb@codesourcery.com>
120
121 * linux-low.c (handle_extended_wait): Implement return value,
122 rename argument 'event_child' to 'event_lwp', handle
123 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
124 (linux_low_ptrace_options): New function.
125 (linux_low_filter_event): Call linux_low_ptrace_options,
126 use different argument fo linux_enable_event_reporting,
127 use return value from handle_extended_wait.
128 (extended_event_reported): New function.
129 (linux_wait_1): Call extended_event_reported and set
130 status to report fork events.
131 (linux_write_memory): Add pid to debug message.
132 (reset_lwp_ptrace_options_callback): New function.
133 (linux_handle_new_gdb_connection): New function.
134 (linux_target_ops): Initialize new structure member.
135 * linux-low.h (struct lwp_info) <waitstatus>: New member.
136 * lynx-low.c: Initialize new structure member.
137 * remote-utils.c (prepare_resume_reply): Implement stop reason
138 "fork" for "T" stop message.
139 * server.c (handle_query): Call handle_new_gdb_connection.
140 * server.h (report_fork_events): Declare global flag.
141 * target.h (struct target_ops) <handle_new_gdb_connection>:
142 New member.
143 (target_handle_new_gdb_connection): New macro.
144 * win32-low.c: Initialize new structure member.
145
146 2015-05-12 Don Breazeal <donb@codesourcery.com>
147
148 * mem-break.c (APPEND_TO_LIST): Define macro.
149 (clone_agent_expr): New function.
150 (clone_one_breakpoint): New function.
151 (clone_all_breakpoints): New function.
152 * mem-break.h: Declare new functions.
153
154 2015-05-12 Don Breazeal <donb@codesourcery.com>
155
156 * linux-low.c (linux_supports_fork_events): New function.
157 (linux_supports_vfork_events): New function.
158 (linux_target_ops): Initialize new structure members.
159 (initialize_low): Call linux_check_ptrace_features.
160 * lynx-low.c (lynx_target_ops): Initialize new structure
161 members.
162 * server.c (report_fork_events, report_vfork_events):
163 New global flags.
164 (handle_query): Add new features to qSupported packet and
165 response.
166 (captured_main): Initialize new global variables.
167 * target.h (struct target_ops) <supports_fork_events>:
168 New member.
169 <supports_vfork_events>: New member.
170 (target_supports_fork_events): New macro.
171 (target_supports_vfork_events): New macro.
172 * win32-low.c (win32_target_ops): Initialize new structure
173 members.
174
175 2015-05-12 Gary Benson <gbenson@redhat.com>
176
177 * server.c (handle_qxfer_exec_file): Use current process
178 if annex is empty.
179
180 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
181
182 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
183 Remove HAVE_PTRACE_GETREGS conditionals.
184 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
185 instead of PTRACE_GETREGS and PTRACE_SETREGS.
186
187 2015-05-08 Yao Qi <yao.qi@linaro.org>
188
189 * linux-low.c (linux_supports_conditional_breakpoints): New
190 function.
191 (linux_target_ops): Install new target method.
192 * lynx-low.c (lynx_target_ops): Install NULL hook for
193 supports_conditional_breakpoints.
194 * nto-low.c (nto_target_ops): Likewise.
195 * spu-low.c (spu_target_ops): Likewise.
196 * win32-low.c (win32_target_ops): Likewise.
197 * server.c (handle_query): Check
198 target_supports_conditional_breakpoints.
199 * target.h (struct target_ops) <supports_conditional_breakpoints>:
200 New field.
201 (target_supports_conditional_breakpoints): New macro.
202
203 2015-05-06 Pedro Alves <palves@redhat.com>
204
205 PR server/18081
206 * server.c (start_inferior): If the process exits, mourn it.
207
208 2015-04-21 Gary Benson <gbenson@redhat.com>
209
210 * hostio.c (fileio_open_flags_to_host): Factored out to
211 fileio_to_host_openflags in common/fileio.c. Single use
212 updated.
213
214 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
215
216 * linux-xtensa-low.c (xtensa_fill_gregset)
217 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
218 XCHAL_HAVE_LOOP.
219
220 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
221
222 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
223 (regs_info): Replace usrregs pointer with NULL.
224
225 2015-04-17 Gary Benson <gbenson@redhat.com>
226
227 * target.h (struct target_ops) <pid_to_exec_file>: New field.
228 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
229 * server.c (handle_qxfer_exec_file): New function.
230 (qxfer_packets): Add exec-file entry.
231 (handle_query): Report qXfer:exec-file:read as supported packet.
232
233 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
234
235 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
236
237 2015-04-09 Gary Benson <gbenson@redhat.com>
238
239 * hostio-errno.c (errno_to_fileio_error): Remove function.
240 Update caller to use remote_fileio_to_fio_error.
241
242 2015-04-09 Yao Qi <yao.qi@linaro.org>
243
244 * linux-low.c (linux_insert_point): Call
245 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
246 (linux_remove_point): Call remove_memory_breakpoint if type is
247 raw_bkpt_type_sw.
248 * linux-x86-low.c (x86_insert_point): Don't call
249 insert_memory_breakpoint.
250 (x86_remove_point): Don't call remove_memory_breakpoint.
251
252 2015-04-01 Pedro Alves <palves@redhat.com>
253 Cleber Rosa <crosa@redhat.com>
254
255 * server.c (gdbserver_usage): Reorganize and extend the usage
256 message.
257
258 2015-03-24 Pedro Alves <palves@redhat.com>
259
260 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
261 output. Also dump TRAP_TRACE.
262 (linux_low_filter_event): In debug output, distinguish a
263 resume_stop SIGSTOP from a delayed SIGSTOP.
264
265 2015-03-24 Gary Benson <gbenson@redhat.com>
266
267 * linux-x86-low.c (x86_linux_new_thread): Moved to
268 nat/x86-linux.c.
269 (x86_linux_prepare_to_resume): Likewise.
270
271 2015-03-24 Gary Benson <gbenson@redhat.com>
272
273 * Makefile.in (x86-linux-dregs.o): New rule.
274 * configure.srv: Add x86-linux-dregs.o to relevant targets.
275 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
276 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
277 (x86_linux_dr_get): Likewise.
278 (x86_linux_dr_set): Likewise.
279 (update_debug_registers_callback): Likewise.
280 (x86_linux_dr_set_addr): Likewise.
281 (x86_linux_dr_get_addr): Likewise.
282 (x86_linux_dr_set_control): Likewise.
283 (x86_linux_dr_get_control): Likewise.
284 (x86_linux_dr_get_status): Likewise.
285 (x86_linux_update_debug_registers): Likewise.
286
287 2015-03-24 Gary Benson <gbenson@redhat.com>
288
289 * linux-x86-low.c (x86_linux_update_debug_registers):
290 New function, factored out from...
291 (x86_linux_prepare_to_resume): ...this.
292
293 2015-03-24 Gary Benson <gbenson@redhat.com>
294
295 * linux-x86-low.c (x86_linux_dr_get): Update comments.
296 (x86_linux_dr_set): Likewise.
297 (update_debug_registers_callback): Likewise.
298 (x86_linux_dr_set_addr): Likewise.
299 (x86_linux_dr_get_addr): Likewise.
300 (x86_linux_dr_set_control): Likewise.
301 (x86_linux_dr_get_control): Likewise.
302 (x86_linux_dr_get_status): Likewise.
303 (x86_linux_prepare_to_resume): Likewise.
304
305 2015-03-24 Gary Benson <gbenson@redhat.com>
306
307 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
308 Use perror_with_name. Pass string through gettext.
309 (x86_linux_dr_set): Likewise.
310
311 2015-03-24 Gary Benson <gbenson@redhat.com>
312
313 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
314 (x86_linux_dr_set_addr): ...this.
315 (x86_dr_low_get_addr): Rename to...
316 (x86_linux_dr_get_addr): ...this.
317 (x86_dr_low_set_control): Rename to...
318 (x86_linux_dr_set_control): ...this.
319 (x86_dr_low_get_control): Rename to...
320 (x86_linux_dr_get_control): ...this.
321 (x86_dr_low_get_status): Rename to...
322 (x86_linux_dr_get_status): ...this.
323 (x86_dr_low): Update with new function names.
324
325 2015-03-24 Gary Benson <gbenson@redhat.com>
326
327 * Makefile.in (x86-linux.o): New rule.
328 * configure.srv: Add x86-linux.o to relevant targets.
329 * linux-low.c (lwp_set_arch_private_info): New function.
330 (lwp_arch_private_info): Likewise.
331 * linux-x86-low.c: Include nat/x86-linux.h.
332 (arch_lwp_info): Removed structure.
333 (update_debug_registers_callback):
334 Use lwp_set_debug_registers_changed.
335 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
336 and lwp_set_debug_registers_changed.
337 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
338
339 2015-03-24 Gary Benson <gbenson@redhat.com>
340
341 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
342 * linux-arm-low.c (arm_new_thread): Likewise.
343 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
344 * linux-mips-low.c (mips_linux_new_thread): Likewise.
345 * linux-x86-low.c (x86_linux_new_thread): Likewise.
346 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
347
348 2015-03-24 Gary Benson <gbenson@redhat.com>
349
350 * linux-low.c (ptid_of_lwp): New function.
351 (lwp_is_stopped): Likewise.
352 (lwp_stop_reason): Likewise.
353 * linux-x86-low.c (update_debug_registers_callback):
354 Use lwp_is_stopped.
355 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
356 lwp_stop_reason.
357
358 2015-03-24 Gary Benson <gbenson@redhat.com>
359
360 * linux-low.h (linux_stop_lwp): Remove declaration.
361
362 2015-03-24 Gary Benson <gbenson@redhat.com>
363
364 * linux-low.h: Include nat/linux-nat.h.
365 * linux-low.c (iterate_over_lwps_args): New structure.
366 (iterate_over_lwps_filter): New function.
367 (iterate_over_lwps): Likewise.
368 * linux-x86-low.c (update_debug_registers_callback):
369 Update signature to what iterate_over_lwps expects.
370 Remove PID check that iterate_over_lwps now performs.
371 (x86_dr_low_set_addr): Use iterate_over_lwps.
372 (x86_dr_low_set_control): Likewise.
373
374 2015-03-24 Gary Benson <gbenson@redhat.com>
375
376 * linux-x86-low.c (x86_debug_reg_state): New function.
377 (x86_linux_prepare_to_resume): Use the above.
378
379 2015-03-24 Gary Benson <gbenson@redhat.com>
380
381 * linux-low.c (current_lwp_ptid): New function.
382 * linux-x86-low.c: Include nat/linux-nat.h.
383 (x86_dr_low_get_addr): Use current_lwp_ptid.
384 (x86_dr_low_get_control): Likewise.
385 (x86_dr_low_get_status): Likewise.
386
387 2015-03-20 Pedro Alves <palves@redhat.com>
388
389 * tracepoint.c (cmd_qtstatus): Make "str" const.
390
391 2015-03-20 Pedro Alves <palves@redhat.com>
392
393 * server.c (handle_general_set): Make "req_str" const.
394
395 2015-03-19 Pedro Alves <palves@redhat.com>
396
397 * linux-low.c (linux_resume_one_lwp): Rename to ...
398 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
399 instead call perror_with_name.
400 (check_ptrace_stopped_lwp_gone): New function.
401 (linux_resume_one_lwp): Reimplement as wrapper around
402 linux_resume_one_lwp_throw that swallows errors if the LWP is
403 gone.
404
405 2015-03-19 Pedro Alves <palves@redhat.com>
406
407 * linux-low.c (count_events_callback, select_event_lwp_callback):
408 No longer check whether the thread has resume_stop as last resume
409 kind.
410
411 2015-03-19 Pedro Alves <palves@redhat.com>
412
413 * linux-low.c (count_events_callback, select_event_lwp_callback):
414 Use the lwp's status_pending_p field, not the thread's.
415
416 2015-03-19 Pedro Alves <palves@redhat.com>
417
418 * linux-low.c (select_event_lwp_callback): Update comments to
419 no longer mention SIGTRAP.
420
421 2015-03-18 Gary Benson <gbenson@redhat.com>
422
423 * server.c (handle_query): Do not report vFile:fstat as supported.
424
425 2015-03-11 Gary Benson <gbenson@redhat.com>
426
427 * hostio.c (sys/types.h): New include.
428 (sys/stat.h): Likewise.
429 (common-remote-fileio.h): Likewise.
430 (handle_fstat): New function.
431 (handle_vFile): Handle vFile:fstat packets.
432
433 2015-03-11 Gary Benson <gbenson@redhat.com>
434
435 * configure.ac (AC_CHECK_MEMBERS): Add checks for
436 struct stat.st_blocks and struct stat.st_blksize.
437 * configure: Regenerate.
438 * config.in: Likewise.
439 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
440 (OBS): Add common-remote-fileio.o.
441 (common-remote-fileio.o): New rule.
442
443 2015-03-09 Pedro Alves <palves@redhat.com>
444
445 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
446 'struct sockaddr' pointer in 'accept' call.
447
448 2015-03-09 Pedro Alves <palves@redhat.com>
449
450 Revert:
451 2015-03-07 Pedro Alves <palves@redhat.com>
452 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
453 or <winsock2.h> here. Instead include "gdb_socket.h".
454 (remote_open): Use union gdb_sockaddr_u.
455 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
456 or <winsock2.h> here. Instead include "gdb_socket.h".
457 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
458 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
459 or <sys/un.h>.
460 (init_named_socket, gdb_agent_helper_thread): Use union
461 gdb_sockaddr_u.
462
463 2015-03-07 Pedro Alves <palves@redhat.com>
464
465 * configure.ac (build_warnings): Move
466 -Wdeclaration-after-statement to the C-specific set.
467 * configure: Regenerate.
468
469 2015-03-07 Pedro Alves <palves@redhat.com>
470
471 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
472 or <winsock2.h> here. Instead include "gdb_socket.h".
473 (remote_open): Use union gdb_sockaddr_u.
474 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
475 or <winsock2.h> here. Instead include "gdb_socket.h".
476 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
477 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
478 or <sys/un.h>.
479 (init_named_socket, gdb_agent_helper_thread): Use union
480 gdb_sockaddr_u.
481
482 2015-03-07 Pedro Alves <palves@redhat.com>
483
484 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
485 instead.
486
487 2015-03-06 Yao Qi <yao.qi@linaro.org>
488
489 * linux-aarch64-low.c (aarch64_insert_point): Use
490 show_debug_regs as a boolean.
491 (aarch64_remove_point): Likewise.
492
493 2015-03-05 Pedro Alves <palves@redhat.com>
494
495 * lynx-low.c (lynx_target_ops): Install NULL hooks for
496 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
497 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
498 * nto-low.c (nto_target_ops): Likewise.
499 * spu-low.c (spu_target_ops): Likewise.
500 * win32-low.c (win32_target_ops): Likewise.
501
502 2015-03-04 Pedro Alves <palves@redhat.com>
503
504 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
505 Decide whether a breakpoint triggered based on the SIGTRAP's
506 siginfo.si_code.
507 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
508 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
509 (linux_low_filter_event): Check for breakpoints before checking
510 watchpoints.
511 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
512 siginfo.si_code.
513 (linux_stopped_by_sw_breakpoint)
514 (linux_supports_stopped_by_sw_breakpoint)
515 (linux_stopped_by_hw_breakpoint)
516 (linux_supports_stopped_by_hw_breakpoint): New functions.
517 (linux_target_ops): Install new target methods.
518
519 2015-03-04 Pedro Alves <palves@redhat.com>
520
521 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
522 * server.c (swbreak_feature, hwbreak_feature): New globals.
523 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
524 (captured_main): Clear swbreak_feature and hwbreak_feature.
525 * server.h (swbreak_feature, hwbreak_feature): Declare.
526 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
527 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
528 supports_stopped_by_hw_breakpoint>: New fields.
529 (target_supports_stopped_by_sw_breakpoint)
530 (target_stopped_by_sw_breakpoint)
531 (target_supports_stopped_by_hw_breakpoint)
532 (target_stopped_by_hw_breakpoint): Declare.
533
534 2015-03-04 Pedro Alves <palves@redhat.com>
535
536 enum lwp_stop_reason -> enum target_stop_reason
537 * linux-low.c (check_stopped_by_breakpoint): Adjust.
538 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
539 (linux_wait_1, stuck_in_jump_pad_callback)
540 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
541 (linux_stopped_by_watchpoint):
542 * linux-low.h (enum lwp_stop_reason): Delete.
543 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
544 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
545
546 2015-03-04 Yao Qi <yao.qi@linaro.org>
547
548 * Makefile.in (SFILES): Add linux-aarch64-low.c.
549
550 2015-03-03 Gary Benson <gbenson@redhat.com>
551
552 * hostio.c (handle_vFile): Fix prefix lengths.
553
554 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
555
556 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
557 ptr_bits.
558
559 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
560
561 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
562 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
563 (clean): Add "rm -f" for above C files.
564 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
565 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
566 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
567 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
568 * linux-s390-low.c (HWCAP_S390_VX): New macro.
569 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
570 (init_registers_s390x_vx_linux64)
571 (init_registers_s390x_tevx_linux64)
572 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
573 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
574 declarations.
575 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
576 (s390_store_vxrs_high): New functions.
577 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
578 NT_S390_VXRS_HIGH.
579 (s390_arch_setup): Add logic for selecting one of the new target
580 descriptions. Activate the new vector regsets if applicable.
581 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
582 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
583 and init_registers_s390x_tevx_linux64.
584
585 2015-03-01 Pedro Alves <palves@redhat.com>
586
587 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
588 parameter.
589
590 2015-02-27 Pedro Alves <palves@redhat.com>
591
592 * linux-x86-low.c (u_debugreg_offset): New function.
593 (x86_linux_dr_get, x86_linux_dr_set): Use it.
594
595 2015-02-27 Pedro Alves <palves@redhat.com>
596
597 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
598 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
599 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
600 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
601 (ps_lsetfpregs, ps_getpid)
602 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
603 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
604 (ps_lsetxregs, ps_plog): Declare.
605
606 2015-02-27 Pedro Alves <palves@redhat.com>
607
608 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
609 IP_AGENT_EXPORT_FUNC.
610 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
611 IP_AGENT_EXPORT_FUNC.
612 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
613 (IP_AGENT_EXPORT): Delete.
614 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
615 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
616 (gdb_trampoline_buffer_error, collecting, gdb_collect)
617 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
618 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
619 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
620 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
621 (traceframe_read_count, traceframe_write_count)
622 (traceframes_created, trace_state_variables, get_raw_reg)
623 (get_trace_state_variable_value, set_trace_state_variable_value)
624 (ust_loaded, helper_thread_id, cmd_buf): Use
625 IPA_SYM_EXPORTED_NAME.
626 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
627 (tracepoints) Use IP_AGENT_EXPORT_VAR.
628 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
629 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
630 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
631 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
632 EXTERN_C_PUSH/EXTERN_C_POP.
633 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
634 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
635 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
636 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
637 (traceframe_write_count, traceframe_read_count)
638 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
639 (about_to_request_buffer_space, get_trace_state_variable_value)
640 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
641 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
642 EXTERN_C_PUSH/EXTERN_C_POP.
643 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
644 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
645 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
646 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
648 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
649 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
650 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
651 Define.
652 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
653 (IP_AGENT_EXPORT_VAR_DECL): Define.
654 (tracing): Declare.
655 (gdb_agent_get_raw_reg): Declare.
656
657 2015-02-27 Tom Tromey <tromey@redhat.com>
658 Pedro Alves <palves@redhat.com>
659
660 Rename symbols whose names are reserved C++ keywords throughout.
661
662 2015-02-27 Pedro Alves <palves@redhat.com>
663
664 * Makefile.in (COMPILER): New, get it from autoconf.
665 (CXX): Get from autoconf instead.
666 (COMPILE.pre): Use COMPILER.
667 (CC-LD): Rename to ...
668 (CC_LD): ... this. Use COMPILER.
669 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
670 (CXX_FOR_TARGET): Default to g++ instead of gcc.
671 * acinclude.m4: Include build-with-cxx.m4.
672 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
673 Disable -Werror by default if building in C++ mode.
674 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
675 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
676 the C++ compiler. Save/restore CXXFLAGS too.
677 * configure: Regenerate.
678
679 2015-02-27 Pedro Alves <palves@redhat.com>
680
681 * acinclude.m4: Include libiberty.m4.
682 * configure.ac: Call libiberty_INIT.
683 * config.in, configure: Regenerate.
684
685 2015-02-26 Pedro Alves <palves@redhat.com>
686
687 * linux-low.c (linux_wait_1): When incrementing the PC past a
688 program breakpoint always use the_low_target.breakpoint_len as
689 increment, rather than the maximum between that and
690 the_low_target.decr_pc_after_break.
691
692 2015-02-23 Pedro Alves <palves@redhat.com>
693
694 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
695 thread was doing a step-over; always adjust the PC if
696 we stepped over a permanent breakpoint.
697 (linux_wait_1): If we stepped over breakpoint that was on top of a
698 permanent breakpoint, manually advance the PC past it.
699
700 2015-02-23 Pedro Alves <palves@redhat.com>
701
702 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
703 modes.
704 (x86_fill_gregset, x86_store_gregset): Use it when handling
705 $orig_eax.
706
707 2015-02-20 Pedro Alves <palves@redhat.com>
708
709 * thread-db.c: Include "nat/linux-procfs.h".
710 (thread_db_init): Skip listing new threads if the kernel supports
711 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
712
713 2015-02-20 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (status_pending_p_callback): Use ptid_match.
716
717 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
718
719 PR breakpoints/16812
720 * linux-low.c (wstatus_maybe_breakpoint): Remove.
721 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
722 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
723
724 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
725
726 PR breakpoints/15956
727 * tracepoint.c (cmd_qtinit): Add check for current_thread.
728
729 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
730
731 * linux-low.c (linux_low_btrace_conf): Print size.
732 * server.c (handle_btrace_conf_general_set): New.
733 (hanle_general_set): Call handle_btrace_conf_general_set.
734 (handle_query): Report Qbtrace-conf:bts:size as supported.
735
736 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
737
738 * linux-low.c (linux_low_enable_btrace): Update parameters.
739 (linux_low_btrace_conf): New.
740 (linux_target_ops)<to_btrace_conf>: Initialize.
741 * server.c (current_btrace_conf): New.
742 (handle_btrace_enable): Rename to ...
743 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
744 to target_enable_btrace. Update comment. Update users.
745 (handle_qxfer_btrace_conf): New.
746 (qxfer_packets): Add btrace-conf entry.
747 (handle_query): Report qXfer:btrace-conf:read as supported packet.
748 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
749 (target_ops)<read_btrace_conf>: New.
750 (target_enable_btrace): Update parameters.
751 (target_read_btrace_conf): New.
752
753 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
754
755 * server.c (handle_btrace_general_set): Remove call to
756 target_supports_btrace.
757 (supported_btrace_packets): New.
758 (handle_query): Call supported_btrace_packets.
759 * target.h: include btrace-common.h.
760 (btrace_target_info): Removed.
761 (supports_btrace, target_supports_btrace): Update parameters.
762
763 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
764
765 * Makefile.in (SFILES): Add common/btrace-common.c.
766 (OBS): Add common/btrace-common.o.
767 (btrace-common.o): Add build rules.
768 * linux-low: Include btrace-common.h.
769 (linux_low_read_btrace): Use struct btrace_data. Call
770 btrace_data_init and btrace_data_fini.
771
772 2015-02-06 Pedro Alves <palves@redhat.com>
773
774 * thread-db.c (find_new_threads_callback): Add debug output.
775
776 2015-02-04 Pedro Alves <palves@redhat.com>
777
778 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
779 (resume_stopped_resumed_lwps): New function.
780 (linux_wait_for_event_filtered): Use it.
781
782 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * Makefile.in (SFILES): Add linux-personality.c.
785 (linux-personality.o): New rule.
786 * configure.srv (srv_linux_obj): Add linux-personality.o to the
787 list of objects to be built.
788 * linux-low.c: Include nat/linux-personality.h.
789 (linux_create_inferior): Remove code to disable address space
790 randomization (moved to ../nat/linux-personality.c). Create
791 cleanup to disable address space randomization.
792
793 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
794
795 * Makefile.in (posix-strerror.o): New rule.
796 (mingw-strerror.o): Likewise.
797 * configure: Regenerated.
798 * configure.ac: Source file ../common/common.host. Initialize new
799 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
800
801 2015-01-14 Yao Qi <yao@codesourcery.com>
802
803 * Makefile.in (SFILES): Add nat/ppc-linux.c.
804 (ppc-linux.o): New rule.
805 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
806 * configure.ac: AC_CHECK_FUNCS(getauxval).
807 * config.in: Re-generated.
808 * configure: Re-generated.
809 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
810 ppc64_64bit_inferior_p
811
812 2015-01-14 Yao Qi <yao@codesourcery.com>
813
814 * linux-ppc-low.c: Include "nat/ppc-linux.h".
815 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
816 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
817 (PT_ORIG_R3, PT_TRAP): Likewise.
818 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
819 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
820 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
821
822 2015-01-10 Joel Brobecker <brobecker@adacore.com>
823
824 * i387-fp.c (i387_cache_to_xsave): In look over
825 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
826 zmmh_low_space field by use of zmmh_high_space.
827
828 2015-01-09 Pedro Alves <palves@redhat.com>
829
830 * linux-low.c (step_over_bkpt): Move higher up in the file.
831 (handle_extended_wait): Don't store the stop_pc here.
832 (get_stop_pc): Adjust comments and rename to ...
833 (check_stopped_by_breakpoint): ... this. Record whether the LWP
834 stopped for a software breakpoint or hardware breakpoint.
835 (thread_still_has_status_pending_p): New function.
836 (status_pending_p_callback): Use
837 thread_still_has_status_pending_p. If the event is no longer
838 interesting, resume the LWP.
839 (handle_tracepoints): Add assert.
840 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
841 (wstatus_maybe_breakpoint): New function.
842 (cancel_breakpoint): Delete function.
843 (check_stopped_by_watchpoint): New function, factored out from
844 linux_low_filter_event.
845 (lp_status_maybe_breakpoint): Delete function.
846 (linux_low_filter_event): Remove filter_ptid argument.
847 Leave thread group exits pending here. Store the LWP's stop PC.
848 Always leave events pending.
849 (linux_wait_for_event_filtered): Pull all events out of the
850 kernel, and leave them all pending.
851 (count_events_callback, select_event_lwp_callback): Consider all
852 events.
853 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
854 (select_event_lwp): Only give preference to the stepping LWP in
855 all-stop mode. Adjust comments.
856 (ignore_event): New function.
857 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
858 references to cancel_breakpoints. Adjust to renames. Also give
859 equal priority to all LWPs that have had events in non-stop mode.
860 If reporting a software breakpoint event, unadjust the LWP's PC.
861 (linux_wait): If linux_wait_1 returned an ignored event, retry.
862 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
863 Adjust.
864 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
865 (resume_status_pending_p): Use thread_still_has_status_pending_p.
866 (linux_stopped_by_watchpoint): Adjust.
867 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
868 * linux-low.h (enum lwp_stop_reason): New.
869 (struct lwp_info) <stop_pc>: Adjust comment.
870 <stopped_by_watchpoint>: Delete field.
871 <stop_reason>: New field.
872 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
873 * mem-break.c (software_breakpoint_inserted_here)
874 (hardware_breakpoint_inserted_here): New function.
875 * mem-break.h (software_breakpoint_inserted_here)
876 (hardware_breakpoint_inserted_here): Declare.
877 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
878 (cancel_breakpoints): Delete.
879 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
880 (upload_fast_traceframes): Remove references to
881 cancel_breakpoints.
882
883 2015-01-09 Pedro Alves <palves@redhat.com>
884
885 * thread-db.c (find_new_threads_callback): Ignore thread if the
886 kernel thread ID is -1.
887
888 2015-01-09 Pedro Alves <palves@redhat.com>
889
890 * linux-low.c (linux_attach_fail_reason_string): Move to
891 nat/linux-ptrace.c, and rename.
892 (linux_attach_lwp): Update comment.
893 (attach_proc_task_lwp_callback): New function.
894 (linux_attach): Adjust to rename and use
895 linux_proc_attach_tgid_threads.
896 (linux_attach_fail_reason_string): Delete declaration.
897
898 2015-01-01 Joel Brobecker <brobecker@adacore.com>
899
900 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
901 * server.c (gdbserver_version): Likewise.
902
903 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
904
905 * remote-utils.c: Include ctype.h.
906 (input_interrupt): Explicitly handle the case when the char
907 received is the NUL byte. Improve the printing of non-ASCII
908 characters.
909
910 2014-12-16 Joel Brobecker <brobecker@adacore.com>
911
912 * linux-low.c (linux_low_filter_event): Update call to
913 linux_enable_event_reporting following the addition of
914 a new parameter to that function.
915
916 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
917
918 PR server/17457
919 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
920 (AARCH64_FPCR_REGNO): Likewise.
921 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
922 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
923 (aarch64_store_fpregset): Likewise.
924
925 2014-12-15 Joel Brobecker <brobecker@adacore.com>
926
927 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
928 Remove FIXME comment about assumption about N.
929
930 2014-12-13 Joel Brobecker <brobecker@adacore.com>
931
932 * configure.ac: If large-file support is disabled in GDBserver,
933 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
934 * configure: Regenerate.
935
936 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
937
938 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
939 warning upon ENODATA from ptrace.
940 * linux-s390-low.c (s390_store_tdb): New.
941 (s390_regsets): Add regset for NT_S390_TDB.
942
943 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
944
945 * linux-low.c (regsets_store_inferior_registers): Skip regsets
946 without a fill_function.
947 * linux-s390-low.c (s390_fill_last_break): Remove.
948 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
949 (s390_arch_setup): Use regset's size instead of fill_function for
950 loop end condition.
951
952 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
953
954 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
955 the regset's store function when ptrace returned an error.
956 * regcache.c (get_thread_regcache): Invalidate register cache
957 before fetching inferior's registers.
958
959 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
960
961 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
962 while-loop as for-loop.
963 (regsets_store_inferior_registers): Likewise.
964
965 2014-11-28 Yao Qi <yao@codesourcery.com>
966
967 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
968 * config.in, configure: Re-generate.
969 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
970 is defined.
971
972 2014-11-21 Yao Qi <yao@codesourcery.com>
973
974 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
975 (AC_CHECK_HEADERS): Remove malloc.h.
976 * configure: Re-generated.
977 * config.in: Re-generated.
978 * server.h: Don't include alloca.h and malloc.h.
979 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
980 Don't include malloc.h.
981
982 2014-11-17 Joel Brobecker <brobecker@adacore.com>
983
984 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
985 corresponding ERRNO check in same block.
986
987 2014-11-12 Pedro Alves <palves@redhat.com>
988
989 * server.c (cont_thread): Update comment.
990 (start_inferior, attach_inferior): No longer clear cont_thread.
991 (handle_v_cont): No longer set cont_thread.
992 (captured_main): Clear cont_thread each time a GDB connects.
993
994 2014-11-12 Pedro Alves <palves@redhat.com>
995
996 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
997 thread, and don't resume all threads if the Hc thread has exited.
998
999 2014-11-12 Pedro Alves <palves@redhat.com>
1000
1001 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1002 the process group instead of to a specific LWP.
1003
1004 2014-10-15 Pedro Alves <palves@redhat.com>
1005
1006 PR server/17487
1007 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1008 parameter.
1009 (arm_set_thread_context): Delete.
1010 (the_low_target): Adjust.
1011 * win32-i386-low.c (debug_registers_changed)
1012 (debug_registers_used): Delete.
1013 (update_debug_registers_callback): New function.
1014 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1015 needing to update their debug registers.
1016 (win32_get_current_dr): New function.
1017 (x86_dr_low_get_addr, x86_dr_low_get_control)
1018 (x86_dr_low_get_status): Fetch the debug register from the thread
1019 record's context.
1020 (i386_initial_stuff): Adjust.
1021 (i386_get_thread_context): Remove current_event parameter. Don't
1022 clear debug_registers_changed nor copy DR values to
1023 debug_reg_state.
1024 (i386_set_thread_context): Delete.
1025 (i386_prepare_to_resume): New function.
1026 (i386_thread_added): Mark the thread as needing to update irs
1027 debug registers.
1028 (the_low_target): Remove i386_set_thread_context and install
1029 i386_prepare_to_resume.
1030 * win32-low.c (win32_get_thread_context): Adjust.
1031 (win32_set_thread_context): Use SetThreadContext
1032 directly.
1033 (win32_prepare_to_resume): New function.
1034 (win32_require_context): New function, factored out from ...
1035 (thread_rec): ... this.
1036 (continue_one_thread): Call win32_prepare_to_resume on each thread
1037 we're about to continue.
1038 (win32_resume): Call win32_prepare_to_resume on the event thread.
1039 * win32-low.h (struct win32_thread_info)
1040 <debug_registers_changed>: New field.
1041 (struct win32_target_ops): Change prototype of set_thread_context,
1042 delete set_thread_context and add prepare_to_resume.
1043 (win32_require_context): New declaration.
1044
1045 2014-10-08 Gary Benson <gbenson@redhat.com>
1046
1047 * server.h: Do not include common-exceptions.h.
1048
1049 2014-10-08 Gary Benson <gbenson@redhat.com>
1050
1051 * server.h: Do not include cleanups.h.
1052
1053 2014-09-30 James Hogan <james.hogan@imgtec.com>
1054
1055 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1056 mips64-dsp-linux.c.
1057
1058 2014-09-23 Yao Qi <yao@codesourcery.com>
1059
1060 * linux-low.c (lp_status_maybe_breakpoint): New function.
1061 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1062 (count_events_callback): Likewise.
1063 (select_event_lwp_callback): Likewise.
1064 (cancel_breakpoints_callback): Likewise.
1065
1066 2014-09-19 Don Breazeal <donb@codesourcery.com>
1067
1068 * linux-low.c (handle_extended_wait): Call
1069 linux_ptrace_get_extended_event.
1070 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1071 linux_is_extended_waitstatus.
1072
1073 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1074
1075 * Makefile.in (CPPFLAGS): Define.
1076 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1077 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1078
1079 2014-09-16 Gary Benson <gbenson@redhat.com>
1080
1081 * inferiors.h (current_inferior): Renamed as...
1082 (current_thread): New variable. All uses updated.
1083 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1084 (maybe_move_out_of_jump_pad): Likewise.
1085 (cancel_breakpoint): Likewise.
1086 (linux_low_filter_event): Likewise.
1087 (wait_for_sigstop): Likewise.
1088 (linux_resume_one_lwp): Likewise.
1089 (need_step_over_p): Likewise.
1090 (start_step_over): Likewise.
1091 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1092 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1093 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1094 and save_inferior as saved_thread.
1095 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1096 saved_thread.
1097 (regcache_invalidate_thread): Likewise.
1098 * remote-utils.c (prepare_resume_reply): Likewise.
1099 * thread-db.c (thread_db_get_tls_address): Likewise.
1100 (disable_thread_event_reporting): Likewise.
1101 (remove_thread_event_breakpoints): Likewise.
1102 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1103 as saved_thread.
1104 * target.h (set_desired_inferior): Renamed as...
1105 (set_desired_thread): New declaration. All uses updated.
1106 * server.c (myresume): Updated comment to reference thread instead
1107 of inferior.
1108 (handle_serial_event): Likewise.
1109 (handle_target_event): Likewise.
1110
1111 2014-09-12 Tom Tromey <tromey@redhat.com>
1112 Gary Benson <gbenson@redhat.com>
1113
1114 * regcache.h: Include common-regcache.h.
1115 (regcache_read_pc): Don't declare.
1116 * regcache.c (get_thread_regcache_for_ptid): New function.
1117
1118 2014-09-11 Tom Tromey <tromey@redhat.com>
1119 Gary Benson <gbenson@redhat.com>
1120
1121 * symbol.c: New file.
1122 * Makefile.in (SFILES): Add symbol.c.
1123 (OBS): Add symbol.o.
1124
1125 2014-09-11 Gary Benson <gbenson@redhat.com>
1126
1127 * target.c (target_stop_ptid, target_continue_ptid): New
1128 functions.
1129
1130 2014-09-11 Tom Tromey <tromey@redhat.com>
1131 Gary Benson <gbenson@redhat.com>
1132
1133 * target.h: Include target/target.h.
1134 * target.c (target_read_memory, target_read_uint32)
1135 (target_write_memory): New functions.
1136
1137 2014-09-11 Gary Benson <gbenson@redhat.com>
1138
1139 * server.h (debug_hw_points): Don't declare.
1140 * server.c (debug_hw_points): Don't define. Replace all uses
1141 with show_debug_regs.
1142 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1143 all uses with show_debug_regs.
1144
1145 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1146
1147 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1148 endianness into account.
1149 (ppc_supply_ptrace_register): Likewise.
1150
1151 2014-09-03 James Hogan <james.hogan@imgtec.com>
1152
1153 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1154 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1155
1156 2014-09-03 Gary Benson <gbenson@redhat.com>
1157
1158 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1159 ALL_DEBUG_ADDRESS_REGISTERS.
1160
1161 2014-09-02 Gary Benson <gbenson@redhat.com>
1162
1163 * i386-low.h: Renamed as...
1164 * x86-low.h: New file. All type, function and variable name
1165 prefixes changed from "i386_" to "x86_". All references updated.
1166 * i386-low.c: Renamed as...
1167 * x86-low.c: New file. All type, function and variable name
1168 prefixes changed from "i386_" to "x86_". All references updated.
1169
1170 2014-09-02 Gary Benson <gbenson@redhat.com>
1171
1172 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1173 (x86_linux_new_thread): Likewise.
1174
1175 2014-08-29 Gary Benson <gbenson@redhat.com>
1176
1177 * server.h (setjmp.h): Do not include.
1178 (toplevel): Do not declare.
1179 (common-exceptions.h): Include.
1180 (cleanups.h): Likewise.
1181 * server.c (toplevel): Do not define.
1182 (exit_code): New static global.
1183 (detach_or_kill_for_exit_cleanup): New function.
1184 (main): New function. Original main renamed to...
1185 (captured_main): New function.
1186 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1187
1188 2014-08-29 Gary Benson <gbenson@redhat.com>
1189
1190 * Makefile.in (SFILES): Add common/common-exceptions.c.
1191 (OBS): Add common-exceptions.o.
1192 (common-exceptions.o): New rule.
1193 * utils.c (prepare_to_throw_exception): New function.
1194
1195 2014-08-29 Gary Benson <gbenson@redhat.com>
1196
1197 * config.in: Regenerate.
1198 * configure: Likewise.
1199
1200 2014-08-29 Gary Benson <gbenson@redhat.com>
1201
1202 * Makefile.in (SFILES): Add common/cleanups.c.
1203 (OBS): cleanups.o.
1204 (cleanups.o): New rule.
1205
1206 2014-08-29 Gary Benson <gbenson@redhat.com>
1207
1208 * utils.c (internal_vwarning): New function.
1209
1210 2014-08-28 Gary Benson <gbenson@redhat.com>
1211
1212 * utils.h (fatal): Remove declaration.
1213 * utils.c (fatal): Remove function.
1214
1215 2014-08-28 Gary Benson <gbenson@redhat.com>
1216
1217 * tracepoint.c (gdb_agent_init): Replace fatal with
1218 perror_with_name.
1219 (initialize_tracepoint): Likewise.
1220
1221 2014-08-28 Gary Benson <gbenson@redhat.com>
1222
1223 * remote-utils.c (remote_prepare): Replace fatal with error.
1224
1225 2014-08-28 Gary Benson <gbenson@redhat.com>
1226
1227 * linux-low.c (linux_async): Replace fatal with warning.
1228 Tidy up and return.
1229 (linux_start_non_stop): Return -1 if linux_async failed.
1230
1231 2014-08-28 Gary Benson <gbenson@redhat.com>
1232
1233 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1234 gdb_assert.
1235 (i386_dr_low_get_addr): Remove vague comment.
1236 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1237 gdb_assert.
1238
1239 2014-08-28 Gary Benson <gbenson@redhat.com>
1240
1241 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1242 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1243 internal_error.
1244 (linux_resume_one_lwp): Likewise.
1245 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1246 gdb_assert.
1247 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1248 with internal_error.
1249 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1250 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1251 (find_register_by_name): Replace fatal with internal_error.
1252 (find_regno): Likewise.
1253 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1254 * thread-db.c (thread_db_create_event): Likewise.
1255 (thread_db_load_search): Likewise.
1256 (try_thread_db_load_1): Likewise.
1257 * tracepoint.c (get_jump_space_head): Replace fatal with
1258 internal_error.
1259 (claim_trampoline_space): Likewise.
1260 (have_fast_tracepoint_trampoline_buffer): Likewise.
1261 (cmd_qtstart): Likewise.
1262 (stop_tracing): Likewise.
1263 (fast_tracepoint_collecting): Likewise.
1264 (target_malloc): Likewise.
1265 (download_tracepoint): Likewise.
1266 (download_trace_state_variables): Replace check with gdb_assert.
1267 (upload_fast_traceframes): Replace fatal with internal_error.
1268
1269 2014-08-19 Tom Tromey <tromey@redhat.com>
1270 Gary Benson <gbenson@redhat.com>
1271
1272 * Makefile.in (SFILES): Add common/common-debug.c.
1273 (OBS): Add common-debug.o.
1274 (common-debug.o): New rule.
1275 * debug.h (debug_printf): Don't declare.
1276 * debug.c (debug_printf): Renamed and rewritten as...
1277 (debug_vprintf): New function.
1278
1279 2014-08-19 Gary Benson <gbenson@redhat.com>
1280
1281 * utils.h: Do not include print-utils.h.
1282
1283 2014-08-19 Tom Tromey <tromey@redhat.com>
1284 Gary Benson <gbenson@redhat.com>
1285
1286 * server.h: Add static assertion.
1287 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1288
1289 2014-08-19 Tom Tromey <tromey@redhat.com>
1290 Gary Benson <gbenson@redhat.com>
1291
1292 * Makefile.in (SFILES): Add common/errors.c.
1293 (OBS): Add errors.o.
1294 (IPA_OBS): Add errors-ipa.o.
1295 (errors.o): New rule.
1296 (errors-ipa.o): Likewise.
1297 * utils.h (perror_with_name, error, warning): Don't declare.
1298 * utils.c (warning): Renamed and rewritten as...
1299 (vwarning): New function.
1300 (error): Renamed and rewritten as...
1301 (verror): New function.
1302 (internal_error): Renamed and rewritten as...
1303 (internal_verror): New function.
1304
1305 2014-08-07 Gary Benson <gbenson@redhat.com>
1306
1307 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1308 * configure: Regenerate.
1309 * config.in: Likewise.
1310 * server.h: Do not include errno.h.
1311 * event-loop.c: Likewise.
1312 * hostio-errno.c: Likewise.
1313 * linux-low.c: Likewise.
1314 * remote-utils.c: Likewise.
1315 * spu-low.c: Likewise.
1316 * utils.c: Likewise.
1317 * gdbreplay.c: Unconditionally include errno.h.
1318
1319 2014-08-07 Gary Benson <gbenson@redhat.com>
1320
1321 * server.h: Do not include string.h.
1322 * event-loop.c: Likewise.
1323 * linux-low.c: Likewise.
1324 * regcache.c: Likewise.
1325 * remote-utils.c: Likewise.
1326 * spu-low.c: Likewise.
1327 * utils.c: Likewise.
1328
1329 2014-08-07 Gary Benson <gbenson@redhat.com>
1330
1331 * server.h: Do not include gdb_assert.h.
1332
1333 2014-08-07 Gary Benson <gbenson@redhat.com>
1334
1335 * server.h: Do not include common-utils.h.
1336
1337 2014-08-07 Gary Benson <gbenson@redhat.com>
1338
1339 * server.h: Do not include ptid.h.
1340 * notif.h: Likewise.
1341
1342 2014-08-07 Gary Benson <gbenson@redhat.com>
1343
1344 * server.h: Do not include gdb_locale.h.
1345
1346 2014-08-07 Gary Benson <gbenson@redhat.com>
1347
1348 * server.h: Do not include gdb/signals.h.
1349 * win32-low.c: Likewise.
1350
1351 2014-08-07 Gary Benson <gbenson@redhat.com>
1352
1353 * server.h: Do not include pathmax.h.
1354
1355 2014-08-07 Gary Benson <gbenson@redhat.com>
1356
1357 * server.h: Do not include libiberty.h.
1358 * linux-bfin-low.c: Likewise.
1359
1360 2014-08-07 Gary Benson <gbenson@redhat.com>
1361
1362 * server.h: Do not include ansidecl.h.
1363
1364 2014-08-07 Gary Benson <gbenson@redhat.com>
1365
1366 * linux-x86-low.c: Do not include stddef.h.
1367 * lynx-ppc-low.c: Likewise.
1368 * tracepoint.c: Likewise.
1369
1370 2014-08-07 Gary Benson <gbenson@redhat.com>
1371
1372 * server.h: Do not include stdarg.h.
1373 * nto-low.c: Likewise.
1374
1375 2014-08-07 Gary Benson <gbenson@redhat.com>
1376
1377 * server.h: Do not include stdlib.h.
1378 * inferiors.c: Likewise.
1379 * linux-low.c: Likewise.
1380 * regcache.c: Likewise.
1381 * spu-low.c: Likewise.
1382 * tracepoint.c: Likewise.
1383 * utils.c: Likewise.
1384
1385 2014-08-07 Gary Benson <gbenson@redhat.com>
1386
1387 * server.h: Do not include stdio.h.
1388 * linux-low.c: Likewise.
1389 * remote-utils.c: Likewise.
1390 * spu-low.c: Likewise.
1391 * utils.c: Likewise.
1392 * wincecompat.c: Likewise.
1393
1394 2014-08-06 Gary Benson <gbenson@redhat.com>
1395
1396 * regcache.c (init_register_cache): Move conditionals inside if.
1397
1398 2014-08-06 Gary Benson <gbenson@redhat.com>
1399
1400 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1401
1402 2014-07-31 Gary Benson <gbenson@redhat.com>
1403
1404 * ax.h: Do not include server.h.
1405 * gdbthread.h: Likewise.
1406 * lynx-low.h: Likewise.
1407 * notif.h: Likewise.
1408
1409 2014-07-30 Gary Benson <gbenson@redhat.com>
1410
1411 * server.h: Include common-defs.h.
1412 Do not include config.h or build-gnulib-gdbserver/config.h.
1413
1414 2014-07-30 Gary Benson <gbenson@redhat.com>
1415
1416 * hostio-errno.c: Move server.h to top of includes list.
1417 * inferiors.c: Likewise.
1418 * linux-x86-low.c: Likewise.
1419 * notif.c: Include server.h.
1420
1421 2014-07-24 Tom Tromey <tromey@redhat.com>
1422 Gary Benson <gbenson@redhat.com>
1423
1424 * server.h (CORE_ADDR): Now unsigned.
1425
1426 2014-07-16 Pedro Alves <palves@redhat.com>
1427
1428 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1429
1430 2014-07-15 Pedro Alves <palves@redhat.com>
1431
1432 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1433 copy.
1434
1435 2014-07-11 Pedro Alves <palves@redhat.com>
1436
1437 * linux-low.c (kill_wait_lwp): New function, based on
1438 kill_one_lwp_callback, but use my_waitpid directly.
1439 (kill_one_lwp_callback, linux_kill): Use it.
1440
1441 2014-06-23 Pedro Alves <palves@redhat.com>
1442
1443 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1444 before setting DR0..DR3.
1445
1446 2014-06-20 Gary Benson <gbenson@redhat.com>
1447
1448 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1449 * configure: Regenerated.
1450 * config.in: Likewise.
1451
1452 2014-06-20 Gary Benson <gbenson@redhat.com>
1453
1454 * Makefile.in (SFILES): Update locations for files moved
1455 from common to nat.
1456 (object file files): Reordered.
1457
1458 2014-06-20 Gary Benson <gbenson@redhat.com>
1459
1460 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1461 (i386_dr_low_set_addr): Likewise.
1462 (i386_dr_low_get_addr): Likewise.
1463 (i386_dr_low_can_set_control): Likewise.
1464 (i386_dr_low_set_control): Likewise.
1465 (i386_dr_low_get_control): Likewise.
1466 (i386_dr_low_get_status): Likewise.
1467 (i386_get_debug_register_length): Likewise.
1468 * linux-x86-low.c (i386_dr_low_set_addr):
1469 Changed signature. Made static.
1470 (i386_dr_low_get_addr): Likewise.
1471 (i386_dr_low_set_control): Likewise.
1472 (i386_dr_low_get_control): Likewise.
1473 (i386_dr_low_get_status): Likewise.
1474 (i386_dr_low): New global variable.
1475 * win32-i386-low.c (i386_dr_low_set_addr):
1476 Changed signature. Made static.
1477 (i386_dr_low_get_addr): Likewise.
1478 (i386_dr_low_set_control): Likewise.
1479 (i386_dr_low_get_control): Likewise.
1480 (i386_dr_low_get_status): Likewise.
1481 (i386_dr_low): New global variable.
1482
1483 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1484
1485 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1486 * Makefile.in (AR, AR_FLAGS): Define.
1487 * configure: Regenerate.
1488
1489 2014-06-19 Gary Benson <gbenson@redhat.com>
1490
1491 * Makefile.in (i386-dregs.o): New rule.
1492 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1493 * i386-low.c (target.h): Remove include.
1494 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1495 (DR_CONTROL_SHIFT): Likewise.
1496 (DR_CONTROL_SIZE): Likewise.
1497 (DR_RW_EXECUTE): Likewise.
1498 (DR_RW_WRITE): Likewise.
1499 (DR_RW_READ): Likewise.
1500 (DR_RW_IORW): Likewise.
1501 (DR_LEN_1): Likewise.
1502 (DR_LEN_2): Likewise.
1503 (DR_LEN_4): Likewise.
1504 (DR_LEN_8): Likewise.
1505 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1506 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1507 (DR_ENABLE_SIZE): Likewise.
1508 (DR_LOCAL_SLOWDOWN): Likewise.
1509 (DR_GLOBAL_SLOWDOWN): Likewise.
1510 (DR_CONTROL_RESERVED): Likewise.
1511 (I386_DR_CONTROL_MASK): Likewise.
1512 (I386_DR_VACANT): Likewise.
1513 (I386_DR_LOCAL_ENABLE): Likewise.
1514 (I386_DR_GLOBAL_ENABLE): Likewise.
1515 (I386_DR_DISABLE): Likewise.
1516 (I386_DR_SET_RW_LEN): Likewise.
1517 (I386_DR_GET_RW_LEN): Likewise.
1518 (I386_DR_WATCH_HIT): Likewise.
1519 (i386_wp_op_t): Likewise.
1520 (i386_show_dr): Likewise.
1521 (i386_length_and_rw_bits): Likewise.
1522 (i386_insert_aligned_watchpoint): Likewise.
1523 (i386_remove_aligned_watchpoint): Likewise.
1524 (i386_handle_nonaligned_watchpoint): Likewise.
1525 i386_update_inferior_debug_regs(): Likewise.
1526 (i386_dr_insert_watchpoint): Likewise.
1527 (i386_dr_remove_watchpoint): Likewise.
1528 (i386_dr_region_ok_for_watchpoint): Likewise.
1529 (i386_dr_stopped_data_address): Likewise.
1530 (i386_dr_stopped_by_watchpoint): Likewise.
1531
1532 2014-06-19 Gary Benson <gbenson@redhat.com>
1533
1534 * i386-low.c (i386_dr_show): Renamed to
1535 i386_show_dr and made static. All uses updated.
1536 (i386_dr_length_and_rw_bits): Renamed to
1537 i386_length_and_rw_bits and made static.
1538 All uses updated.
1539 (i386_dr_insert_aligned_watchpoint): Renamed to
1540 i386_insert_aligned_watchpoint and made static.
1541 All uses updated.
1542 (i386_dr_remove_aligned_watchpoint): Renamed to
1543 i386_remove_aligned_watchpoint and made static.
1544 All uses updated.
1545 (i386_dr_update_inferior_debug_regs): Renamed to
1546 i386_update_inferior_debug_regs and made static.
1547 All uses updated.
1548
1549 2014-06-18 Gary Benson <gbenson@redhat.com>
1550
1551 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1552 (i386_dr_low_can_set_control): Likewise.
1553 (i386_get_debug_register_length): Likewise.
1554 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1555 (i386_dr_low_can_set_control): Likewise.
1556 (i386_get_debug_register_length): Likewise.
1557
1558 2014-06-17 Gary Benson <gbenson@redhat.com>
1559
1560 * i386-low.h (i386-dregs.h): New include.
1561 (DR_FIRSTADDR): Now in i386-dregs.h.
1562 (DR_LASTADDR): Likewise.
1563 (DR_NADDR): Likewise.
1564 (DR_STATUS): Likewise.
1565 (DR_CONTROL): Likewise.
1566 (i386_debug_reg_state): Likewise.
1567 (i386_dr_insert_watchpoint): Likewise.
1568 (i386_dr_remove_watchpoint): Likewise.
1569 (i386_dr_region_ok_for_watchpoint): Likewise.
1570 (i386_dr_stopped_data_address): Likewise.
1571 (i386_dr_stopped_by_watchpoint): Likewise.
1572 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1573
1574 2014-06-18 Gary Benson <gbenson@redhat.com>
1575
1576 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1577 i386_dr_insert_watchpoint.
1578 (i386_low_remove_watchpoint): Renamed to
1579 i386_dr_remove_watchpoint.
1580 (i386_low_region_ok_for_watchpoint): Renamed to
1581 i386_dr_region_ok_for_watchpoint.
1582 (i386_low_stopped_data_address): Renamed to
1583 i386_dr_stopped_data_address.
1584 (i386_low_stopped_by_watchpoint): Renamed to
1585 i386_dr_stopped_by_watchpoint.
1586 * i386-low.c (i386_show_dr): Renamed to
1587 i386_dr_show and made nonstatic. All uses updated.
1588 (i386_length_and_rw_bits): Renamed to
1589 i386_dr_length_and_rw_bits and made nonstatic.
1590 All uses updated.
1591 (i386_insert_aligned_watchpoint): Renamed to
1592 i386_dr_insert_aligned_watchpoint and made nonstatic.
1593 All uses updated.
1594 (i386_remove_aligned_watchpoint): Renamed to
1595 i386_dr_remove_aligned_watchpoint and made nonstatic.
1596 All uses updated.
1597 (i386_update_inferior_debug_regs): Renamed to
1598 i386_dr_update_inferior_debug_regs and made nonstatic.
1599 All uses updated.
1600 (i386_low_insert_watchpoint): Renamed to
1601 i386_dr_insert_watchpoint. All uses updated.
1602 (i386_low_remove_watchpoint): Renamed to
1603 i386_dr_remove_watchpoint. All uses updated.
1604 (i386_low_region_ok_for_watchpoint): Renamed to
1605 i386_dr_region_ok_for_watchpoint. All uses updated.
1606 (i386_low_stopped_data_address): Renamed to
1607 i386_dr_stopped_data_address. All uses updated.
1608 (i386_low_stopped_by_watchpoint): Renamed to
1609 i386_dr_stopped_by_watchpoint. All uses updated.
1610
1611 2014-06-18 Gary Benson <gbenson@redhat.com>
1612
1613 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1614 (i386_dr_low_can_set_control): Likewise.
1615 (i386_insert_aligned_watchpoint): New check.
1616
1617 2014-06-18 Gary Benson <gbenson@redhat.com>
1618
1619 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1620 Renamed to state.
1621
1622 2014-06-18 Gary Benson <gbenson@redhat.com>
1623
1624 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1625 instead of fatal and error.
1626 (i386_handle_nonaligned_watchpoint): Likewise.
1627
1628 2014-06-18 Gary Benson <gbenson@redhat.com>
1629
1630 * i386-low.c (i386_get_debug_register_length): New macro.
1631 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1632 (i386_show_dr): Use debug_printf instead of fprintf. Use
1633 phex to format values.
1634
1635 2014-06-18 Gary Benson <gbenson@redhat.com>
1636
1637 * i386-low.h: Comment changes.
1638 * i386-low.c: Likewise.
1639
1640 2014-06-18 Gary Benson <gbenson@redhat.com>
1641
1642 * i386-low.c: Whitespace changes.
1643
1644 2014-06-12 Tom Tromey <tromey@redhat.com>
1645
1646 * utils.c (freeargv): Remove.
1647
1648 2014-06-12 Tom Tromey <tromey@redhat.com>
1649
1650 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1651 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1652 (parse_debug_format_options): Likewise.
1653 (gdbserver_usage): Likewise.
1654 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1655 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1656 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1657 against libiberty.
1658 ($(LIBGNU)): Depend on libiberty.
1659 (all-lib): Recurse into all subdirs.
1660 (install-only): Invoke "install" target in subdirs.
1661 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1662 targets.
1663 * configure: Rebuild.
1664 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1665 for vasprintf, vsnprintf, or gettimeofday.
1666 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1667 srv_tgtobj.
1668
1669 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1670
1671 * development.sh: Delete.
1672 * Makefile.in (config.status): Adjust dependency on development.sh.
1673 * configure.ac: Adjust development.sh source call.
1674 * configure: Regenerate.
1675
1676 2014-06-02 Pedro Alves <palves@redhat.com>
1677
1678 * ax.c (gdb_free_agent_expr): New function.
1679 * ax.h (gdb_free_agent_expr): New declaration.
1680 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1681 list.
1682 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1683 static.
1684 (clear_breakpoint_conditions_and_commands): New function.
1685 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1686 (clear_breakpoint_conditions_and_commands): New declaration.
1687
1688 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1689
1690 * linux-aarch64-low.c (asm/ptrace.h): Include.
1691
1692 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1693
1694 Fix TLS access for -static -pthread.
1695 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1696 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1697 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1698
1699 2014-05-20 Pedro Alves <palves@redhat.com>
1700
1701 * linux-aarch64-low.c (aarch64_insert_point)
1702 (aarch64_remove_point): No longer check whether the type is
1703 supported here. Adjust to new interface.
1704 (the_low_target): Install aarch64_supports_z_point_type as
1705 supports_z_point_type method.
1706 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1707 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1708 instead of a Z packet char. Adjust.
1709 (arm_supports_z_point_type): New function.
1710 (arm_insert_point, arm_remove_point): Adjust to new interface.
1711 (the_low_target): Install arm_supports_z_point_type.
1712 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1713 (cris_insert_point, cris_remove_point): Adjust to new interface.
1714 Don't check whether the type is supported here.
1715 (the_low_target): Install cris_supports_z_point_type.
1716 * linux-low.c (linux_supports_z_point_type): New function.
1717 (linux_insert_point, linux_remove_point): Adjust to new interface.
1718 * linux-low.h (struct linux_target_ops) <insert_point,
1719 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1720 raw_breakpoint pointer parameter.
1721 <supports_z_point_type>: New method.
1722 * linux-mips-low.c (mips_supports_z_point_type): New function.
1723 (mips_insert_point, mips_remove_point): Adjust to new interface.
1724 Use mips_supports_z_point_type.
1725 (the_low_target): Install mips_supports_z_point_type.
1726 * linux-ppc-low.c (the_low_target): Install NULL as
1727 supports_z_point_type method.
1728 * linux-s390-low.c (the_low_target): Install NULL as
1729 supports_z_point_type method.
1730 * linux-sparc-low.c (the_low_target): Install NULL as
1731 supports_z_point_type method.
1732 * linux-x86-low.c (x86_supports_z_point_type): New function.
1733 (x86_insert_point): Adjust to new insert_point interface. Use
1734 insert_memory_breakpoint. Adjust to new
1735 i386_low_insert_watchpoint interface.
1736 (x86_remove_point): Adjust to remove_point interface. Use
1737 remove_memory_breakpoint. Adjust to new
1738 i386_low_remove_watchpoint interface.
1739 (the_low_target): Install x86_supports_z_point_type.
1740 * lynx-low.c (lynx_target_ops): Install NULL as
1741 supports_z_point_type callback.
1742 * nto-low.c (nto_supports_z_point_type): New.
1743 (nto_insert_point, nto_remove_point): Adjust to new interface.
1744 (nto_target_ops): Install nto_supports_z_point_type.
1745 * mem-break.c: Adjust intro comment.
1746 (struct raw_breakpoint) <raw_type, size>: New fields.
1747 <inserted>: Update comment.
1748 <shlib_disabled>: Delete field.
1749 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1750 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1751 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1752 (raw_bkpt_type_to_target_hw_bp_type): New function.
1753 (find_enabled_raw_code_breakpoint_at): New function.
1754 (find_raw_breakpoint_at): New type and size parameters. Use them.
1755 (insert_memory_breakpoint): New function, based off
1756 set_raw_breakpoint_at.
1757 (remove_memory_breakpoint): New function.
1758 (set_raw_breakpoint_at): Reimplement.
1759 (set_breakpoint): New, based on set_breakpoint_at.
1760 (set_breakpoint_at): Reimplement.
1761 (delete_raw_breakpoint): Go through the_target->remove_point
1762 instead of assuming memory breakpoints.
1763 (find_gdb_breakpoint_at): Delete.
1764 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1765 (find_gdb_breakpoint): New function.
1766 (set_gdb_breakpoint_at): Delete.
1767 (z_type_supported): New function.
1768 (set_gdb_breakpoint_1): New function, loosely based off
1769 set_gdb_breakpoint_at.
1770 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1771 (delete_gdb_breakpoint_at): Delete.
1772 (delete_gdb_breakpoint_1): New function, loosely based off
1773 delete_gdb_breakpoint_at.
1774 (delete_gdb_breakpoint): New function.
1775 (clear_gdb_breakpoint_conditions): Rename to ...
1776 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1777 breakpoint.
1778 (add_condition_to_breakpoint): Make static.
1779 (add_breakpoint_condition): Take a struct breakpoint pointer
1780 instead of an address. Adjust.
1781 (gdb_condition_true_at_breakpoint): Rename to ...
1782 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1783 z_type parameter.
1784 (gdb_condition_true_at_breakpoint): Reimplement.
1785 (add_breakpoint_commands): Take a struct breakpoint pointer
1786 instead of an address. Adjust.
1787 (gdb_no_commands_at_breakpoint): Rename to ...
1788 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1789 parameter. Return true if no breakpoint was found. Change debug
1790 output.
1791 (gdb_no_commands_at_breakpoint): Reimplement.
1792 (run_breakpoint_commands): Rename to ...
1793 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1794 and change return type to boolean.
1795 (run_breakpoint_commands): New function.
1796 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1797 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1798 breakpoint. Go through the_target->remove_point instead of
1799 assuming memory breakpoint.
1800 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1801 software and hardware breakpoints.
1802 (reinsert_raw_breakpoint): Go through the_target->insert_point
1803 instead of assuming memory breakpoint.
1804 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1805 software and hardware breakpoints.
1806 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1807 Check both software and hardware breakpoints.
1808 (validate_inserted_breakpoint): Assert the breakpoint is a
1809 software breakpoint. Set the inserted flag to -1 instead of
1810 setting shlib_disabled.
1811 (delete_disabled_breakpoints): Adjust.
1812 (validate_breakpoints): Only validate software breakpoints.
1813 Adjust to inserted flag change.
1814 (check_mem_read, check_mem_write): Skip breakpoint types other
1815 than software breakpoints. Adjust to inserted flag change.
1816 * mem-break.h (enum raw_bkpt_type): New enum.
1817 (raw_breakpoint, struct process_info): Forward declare.
1818 (Z_packet_to_target_hw_bp_type): Delete declaration.
1819 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1820 (set_gdb_breakpoint, delete_gdb_breakpoint)
1821 (clear_breakpoint_conditions): New declarations.
1822 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1823 (breakpoint_inserted_here): Update comment.
1824 (add_breakpoint_condition, add_breakpoint_commands): Replace
1825 address parameter with a breakpoint pointer parameter.
1826 (gdb_breakpoint_here): Update comment.
1827 (delete_gdb_breakpoint_at): Delete.
1828 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1829 * server.c (process_point_options): Take a struct breakpoint
1830 pointer instead of an address. Adjust.
1831 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1832 delete_gdb_breakpoint.
1833 * spu-low.c (spu_target_ops): Install NULL as
1834 supports_z_point_type method.
1835 * target.h: Include mem-break.h.
1836 (struct target_ops) <prepare_to_access_memory>: Update comment.
1837 <supports_z_point_type>: New field.
1838 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1839 instead of a char. Also take a raw breakpoint pointer.
1840 * win32-arm-low.c (the_low_target): Install NULL as
1841 supports_z_point_type.
1842 * win32-i386-low.c (i386_supports_z_point_type): New function.
1843 (i386_insert_point, i386_remove_point): Adjust to new interface.
1844 (the_low_target): Install i386_supports_z_point_type.
1845 * win32-low.c (win32_supports_z_point_type): New function.
1846 (win32_insert_point, win32_remove_point): Adjust to new interface.
1847 (win32_target_ops): Install win32_supports_z_point_type.
1848 * win32-low.h (struct win32_target_ops):
1849 <supports_z_point_type>: New method.
1850 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1851 instead of a char. Also take a raw breakpoint pointer.
1852
1853 2014-05-20 Pedro Alves <palves@redhat.com>
1854
1855 * mem-break.h: Include break-common.h.
1856 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1857 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1858 (Z_packet_to_target_hw_bp_type): New declaration.
1859 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1860 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1861 (Z_PACKET_ACCESS_WP): Delete macros.
1862 (Z_packet_to_hw_type): Delete function.
1863 * i386-low.h: Don't include break-common.h here.
1864 (Z_packet_to_hw_type): Delete declaration.
1865 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1866 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1867 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1868 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1869 * linux-aarch64-low.c: Don't include break-common.h here.
1870 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1871 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1872 (Z_packet_to_target_hw_bp_type): Delete function.
1873 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1874 function.
1875 (mips_insert_point, mips_remove_point): Use
1876 Z_packet_to_target_hw_bp_type.
1877
1878 2014-05-20 Pedro Alves <palves@redhat.com>
1879
1880 * linux-aarch64-low.c: Include break-common.h.
1881 (enum target_point_type): Delete.
1882 (Z_packet_to_point_type): Rename to ...
1883 (Z_packet_to_target_hw_bp_type): ... this, and return a
1884 target_hw_bp_type instead.
1885 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1886 instead of an enum target_point_type.
1887 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1888 breakpoint type.
1889 (aarch64_dr_state_insert_one_point)
1890 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1891 (aarch64_handle_aligned_watchpoint)
1892 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1893 Take an enum target_hw_bp_type instead of an enum
1894 target_point_type.
1895 (aarch64_supports_z_point_type): New function.
1896 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1897 use Z_packet_to_target_hw_bp_type.
1898
1899 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1900
1901 * configure.ac: Only use -Werror by default when DEVELOPMENT
1902 is true.
1903 * configure: Regenerate.
1904
1905 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1906
1907 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1908 * linux-x86-low.c (X86_64_USER_REGS): New.
1909 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1910
1911 2014-04-28 Yao Qi <yao@codesourcery.com>
1912
1913 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1914 name.
1915
1916 2014-04-25 Pedro Alves <palves@redhat.com>
1917
1918 PR server/16255
1919 * linux-low.c (linux_attach_fail_reason_string): New function.
1920 (linux_attach_lwp): Delete.
1921 (linux_attach_lwp_1): Rename to ...
1922 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1923 argument. Remove "initial" parameter. Return int instead of
1924 void. Don't error or warn here.
1925 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1926 failure to attach to the tgid. Call warning when failing to
1927 attach to an lwp.
1928 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1929 argument. Remove "initial" parameter. Return int instead of
1930 void. Don't error or warn here.
1931 (linux_attach_fail_reason_string): New declaration.
1932 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1933 interface change. Use linux_attach_fail_reason_string.
1934
1935 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1936 Walfred Tedeschi <walfred.tedeschi@intel.com>
1937
1938 * Makefile.in: Added rules to handle new files
1939 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1940 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1941 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1942 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1943 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1944 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1945 x32-avx512-linux.o.
1946 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1947 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1948 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1949 i386/x32-avx512.xml.
1950 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1951 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1952 i386/x32-avx512-linux.xml.
1953 * i387-fp.c (num_avx512_k_registers): New constant for number
1954 of K registers.
1955 (num_avx512_zmmh_low_registers): New constant for number of
1956 lower ZMM registers (0-15).
1957 (num_avx512_zmmh_high_registers): New constant for number of
1958 higher ZMM registers (16-31).
1959 (num_avx512_ymmh_registers): New contant for number of higher
1960 YMM registers (ymm16-31 added by avx521 on x86_64).
1961 (num_avx512_xmm_registers): New constant for number of higher
1962 XMM registers (xmm16-31 added by AVX512 on x86_64).
1963 (struct i387_xsave): Add space for AVX512 registers.
1964 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1965 Add code to handle AVX512 registers.
1966 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1967 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1968 prototypei from generated file.
1969 (tdesc_amd64_avx512_linux): Likewise.
1970 (init_registers_x32_avx512_linux): Likewise.
1971 (tdesc_x32_avx512_linux): Likewise.
1972 (init_registers_i386_avx512_linux): Likewise.
1973 (tdesc_i386_avx512_linux): Likewise.
1974 (x86_64_regmap): Add AVX512 registers.
1975 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1976 mask.
1977 (initialize_low_arch): Add code to initialize AVX512 registers.
1978
1979 2014-04-23 Pedro Alves <palves@redhat.com>
1980
1981 * mem-break.c (find_gdb_breakpoint_at): Make static.
1982 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1983
1984 2014-04-23 Pedro Alves <palves@redhat.com>
1985
1986 * i386-low.c: Don't include break-common.h here.
1987 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1988 prototype to take target_hw_bp_type as argument instead of a Z
1989 packet char.
1990 * i386-low.h: Include break-common.h here.
1991 (Z_packet_to_hw_type): Declare.
1992 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1993 prototypes.
1994 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1995 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1996 (x86_remove_point): Convert the packet number to a
1997 target_hw_bp_type before calling i386_low_remove_watchpoint.
1998 * win32-i386-low.c (i386_insert_point): Convert the packet number
1999 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2000 (i386_remove_point): Convert the packet number to a
2001 target_hw_bp_type before calling i386_low_remove_watchpoint.
2002
2003 2014-04-23 Pedro Alves <palves@redhat.com>
2004
2005 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2006
2007 2014-04-10 Pedro Alves <palves@redhat.com>
2008
2009 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2010 Check if the condition or command is NULL before checking if the
2011 breakpoint is known. On success, return true.
2012 * mem-break.h (add_breakpoint_condition): Document return.
2013 (add_breakpoint_commands): Add describing comment.
2014 * server.c (skip_to_semicolon): New function.
2015 (process_point_options): Use it.
2016
2017 2014-04-09 Pedro Alves <palves@redhat.com>
2018
2019 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2020 to lwpid_of.
2021
2022 2014-02-27 Pedro Alves <palves@redhat.com>
2023
2024 PR 12702
2025 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2026 macros.
2027 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2028 output.
2029 (last_thread_of_process_p): Take a PID argument instead of a
2030 thread pointer.
2031 (linux_wait_for_lwp): Delete.
2032 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2033 functions.
2034 (linux_low_filter_event): New function, party factored out from
2035 linux_wait_for_event.
2036 (linux_wait_for_event): Rename to ...
2037 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2038 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2039 sigsuspend. Check for zombie leaders.
2040 (linux_wait_for_event): Reimplement as wrapper around
2041 linux_wait_for_event_filtered.
2042 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2043 a normal or signal exit is seen, it's the whole process exiting.
2044 (wait_for_sigstop): No longer a for_each_inferior callback.
2045 Rewrite on top of linux_wait_for_event_filtered.
2046 (stop_all_lwps): Call wait_for_sigstop directly.
2047 * server.c (resume, handle_target_event): Handle
2048 TARGET_WAITKIND_NO_RESUMED.
2049
2050 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2051
2052 * win32-low.c (psapi_get_dll_name,
2053 * win32_CreateToolhelp32Snapshot): Delete.
2054 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2055 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2056 Delete.
2057 (handle_load_dll): Add function description.
2058 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2059
2060 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2061
2062 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2063 Add comment.
2064 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2065 base address when calling win32_add_one_solib.
2066 (handle_load_dll): Delete local variable load_addr.
2067 Remove 0x1000 offset applied to DLL base address when calling
2068 win32_add_one_solib.
2069 (handle_unload_dll): Add comment.
2070
2071 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2072
2073 * win32-low.c (win32_add_all_dlls): Renames
2074 win32_ensure_ntdll_loaded. Rewrite function documentation.
2075 Adjust implementation to always load all DLLs.
2076 Add 0x1000 offset to DLL base address when calling
2077 win32_add_one_solib.
2078 (child_initialization_done): New static global.
2079 (do_initial_child_stuff): Set child_initialization_done to
2080 zero during child initialization, and 1 after. Replace call
2081 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2082 Add comment.
2083 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2084 (handle_unload_dll): Add function documentation.
2085 (get_child_debug_event): Ignore load and unload DLL events
2086 during child initialization.
2087
2088 2014-02-20 Doug Evans <dje@google.com>
2089
2090 Remove global all_lwps.
2091 * inferiors.h (ptid_of): Move here from linux-low.h.
2092 (pid_of, lwpid_of): Ditto.
2093 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2094 parameter is a struct thread_info * now.
2095 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2096 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2097 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2098 directly.
2099 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2100 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2101 * linux-arm-low.c (update_registers_callback): Update, "entry"
2102 parameter is a struct thread_info * now.
2103 Fetch lwpid from current_inferior directly.
2104 (arm_insert_point): Pass &all_threads to find_inferior instead of
2105 &all_lwps.
2106 (arm_remove_point): Ditto.
2107 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2108 (arm_prepare_to_resume): Fetch pid from thread.
2109 (arm_read_description): Fetch lwpid from current_inferior directly.
2110 * linux-low.c (all_lwps): Delete.
2111 (delete_lwp): Delete call to remove_inferior.
2112 (handle_extended_wait): Fetch lwpid from thread.
2113 (add_lwp): Don't set lwp->entry.id. Remove call to
2114 add_inferior_to_list.
2115 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2116 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2117 (kill_one_lwp_callback): Ditto.
2118 (linux_kill): Don't dereference NULL pointer.
2119 Fetch ptid,lwpid from thread.
2120 (get_detach_signal): Fetch ptid from thread.
2121 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2122 Simplify call to regcache_invalidate_thread.
2123 (delete_lwp_callback): Update, "entry" parameter is a
2124 struct thread_info * now. Fetch pid from thread.
2125 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2126 (status_pending_p_callback): Update, "entry" parameter is a
2127 struct thread_info * now. Fetch ptid from thread.
2128 (find_lwp_pid): Update, "entry" parameter is a
2129 struct thread_info * now.
2130 (linux_wait_for_lwp): Fetch pid from thread.
2131 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2132 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2133 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2134 (dequeue_one_deferred_signal): Ditto.
2135 (cancel_breakpoint): Fetch ptid from current_inferior.
2136 (linux_wait_for_event): Pass &all_threads to find_inferior,
2137 not &all_lwps. Fetch ptid, lwpid from thread.
2138 (count_events_callback): Update, "entry" parameter is a
2139 struct thread_info * now.
2140 (select_singlestep_lwp_callback): Ditto.
2141 (select_event_lwp_callback): Ditto.
2142 (cancel_breakpoints_callback): Ditto.
2143 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2144 not &all_lwps.
2145 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2146 (unsuspend_one_lwp): Update, "entry" parameter is a
2147 struct thread_info * now.
2148 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2149 not &all_lwps.
2150 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2151 Fetch lwpid from thread, not lwp.
2152 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2153 Pass &all_threads to find_inferior, not &all_lwps.
2154 (send_sigstop): Fetch lwpid from thread, not lwp.
2155 (send_sigstop_callback): Update, "entry" parameter is a
2156 struct thread_info * now.
2157 (suspend_and_send_sigstop_callback): Ditto.
2158 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2159 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2160 struct thread_info * now.
2161 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2162 from thread, lwp.
2163 (lwp_running): Update, "entry" parameter is a
2164 struct thread_info * now.
2165 (stop_all_lwps): Fetch ptid from thread.
2166 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2167 (linux_resume_one_lwp): Fetch lwpid from thread.
2168 (linux_set_resume_request): Update, "entry" parameter is a
2169 struct thread_info * now. Fetch pid, lwpid from thread.
2170 (resume_status_pending_p): Update, "entry" parameter is a
2171 struct thread_info * now.
2172 (need_step_over_p): Ditto. Fetch lwpid from thread.
2173 (start_step_over): Fetch lwpid from thread.
2174 (linux_resume_one_thread): Update, "entry" parameter is a
2175 struct thread_info * now. Fetch lwpid from thread.
2176 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2177 (proceed_one_lwp): Update, "entry" parameter is a
2178 struct thread_info * now. Fetch lwpid from thread.
2179 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2180 struct thread_info * now.
2181 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2182 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2183 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2184 directly.
2185 (regsets_store_inferior_registers): Ditto.
2186 (fetch_register, store_register): Ditto.
2187 (linux_read_memory, linux_write_memory): Ditto.
2188 (linux_request_interrupt): Ditto.
2189 (linux_read_auxv): Ditto.
2190 (linux_xfer_siginfo): Ditto.
2191 (linux_qxfer_spu): Ditto.
2192 (linux_qxfer_libraries_svr4): Ditto.
2193 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2194 moved to inferiors.h.
2195 (get_lwp): Delete.
2196 (get_thread_lwp): Update.
2197 (struct lwp_info): Delete member "entry". Simplify comment for
2198 member "thread".
2199 (all_lwps): Delete.
2200 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2201 current_inferior directly.
2202 (update_watch_registers_callback): Update, "entry" parameter is a
2203 struct thread_info * now. Fetch pid from thread.
2204 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2205 (mips_insert_point): Fetch lwpid from current_inferior.
2206 Pass &all_threads to find_inferior, not &all_lwps.
2207 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2208 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2209 directly.
2210 (mips_stopped_data_address): Ditto.
2211 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2212 directly.
2213 * linux-tile-low.c (tile_arch_setup): Ditto.
2214 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2215 (update_debug_registers_callback): Update, "entry" parameter is a
2216 struct thread_info * now. Fetch pid from thread.
2217 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2218 Pass &all_threads to find_inferior, not &all_lwps.
2219 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2220 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2221 Pass &all_threads to find_inferior, not &all_lwps.
2222 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2223 (i386_dr_low_get_status): Ditto.
2224 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2225 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2226 (x86_linux_read_description): Ditto.
2227 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2228
2229 2014-02-20 Doug Evans <dje@google.com>
2230
2231 * inferiors.c (get_first_inferior): Fix buglet.
2232
2233 2014-02-19 Doug Evans <dje@google.com>
2234
2235 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2236 * inferiors.c (add_thread): Change result type to struct thread_info *.
2237 All callers updated.
2238 (add_lwp): Call add_thread here instead of in callers.
2239 All callers updated.
2240 * linux-low.h (get_lwp_thread): Rewrite.
2241 (struct lwp_info): New member "thread".
2242
2243 2014-02-19 Doug Evans <dje@google.com>
2244
2245 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2246 All callers updated.
2247
2248 2014-02-19 Doug Evans <dje@google.com>
2249
2250 * inferiors.c (add_thread): Fix whitespace.
2251
2252 2014-02-19 Doug Evans <dje@google.com>
2253
2254 * dll.c (clear_dlls): Replace accessing list implemention details
2255 with API function.
2256 * gdbthread.h (get_first_thread): Declare.
2257 * inferiors.c (for_each_inferior_with_data): New function.
2258 (get_first_thread): New function.
2259 (find_thread_ptid): Simplify.
2260 (get_first_inferior): New function.
2261 (clear_list): Delete.
2262 (one_inferior_p): New function.
2263 (clear_inferior_list): New function.
2264 (clear_inferiors): Update.
2265 * inferiors.h (for_each_inferior_with_data): Declare.
2266 (clear_inferior_list): Declare.
2267 (one_inferior_p): Declare.
2268 (get_first_inferior): Declare.
2269 * linux-low.c (linux_wait_for_event): Replace accessing list
2270 implemention details with API function.
2271 * server.c (target_running): Ditto.
2272 (accumulate_file_name_length): New function.
2273 (emit_dll_description): New function.
2274 (handle_qxfer_libraries): Replace accessing list implemention
2275 details with API function.
2276 (handle_qxfer_threads_worker): New function.
2277 (handle_qxfer_threads_proper): Replace accessing list implemention
2278 details with API function.
2279 (handle_query): Ditto.
2280 (visit_actioned_threads_callback_ftype): New typedef.
2281 (visit_actioned_threads_data): New struct.
2282 (visit_actioned_threads): Rewrite to be find_inferior callback.
2283 (resume): Call find_inferior.
2284 (handle_status): Replace accessing list implemention
2285 details with API function.
2286 (process_serial_event): Replace accessing list implemention details
2287 with API function.
2288 * target.c (set_desired_inferior): Replace accessing list implemention
2289 details with API function.
2290 * tracepoint.c (same_process_p): New function.
2291 (gdb_agent_about_to_close): Replace accessing list implemention
2292 details with API function.
2293 * win32-low.c (child_delete_thread): Replace accessing list
2294 implemention details with API function.
2295 (match_dll_by_basename): New function.
2296 (dll_is_loaded_by_basename): New function.
2297 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2298 details call to dll_is_loaded_by_basename.
2299
2300 2014-02-19 Doug Evans <dje@google.com>
2301
2302 * dll.h (struct dll_info): Add comment.
2303 * gdbthread.h (struct thread_info): Add comment.
2304 (current_ptid): Simplify.
2305 * inferiors.c (add_process): Update.
2306 (remove_process): Update.
2307 * inferiors.h (struct process_info): Rename member "head" to "entry".
2308 * linux-low.c (delete_lwp): Update.
2309 (add_lwp): Update.
2310 (last_thread_of_process_p): Update.
2311 (kill_one_lwp_callback, linux_kill): Update.
2312 (status_pending_p_callback): Update.
2313 (wait_for_sigstop): Update. Simplify read of ptid.
2314 (start_step_over): Update.
2315 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2316 (get_lwp_thread): Update.
2317 (struct lwp_info): Rename member "head" to "entry".
2318 * regcache.h (inferior_list_entry): Delete.
2319 * server.c (kill_inferior_callback): Update.
2320 (detach_or_kill_inferior_callback): Update.
2321 (print_started_pid): Update.
2322 (print_attached_pid): Update.
2323 (process_serial_event): Simplify read of ptid.
2324 * thread-db.c (thread_db_create_event): Update.
2325 (thread_db_get_tls_address): Update.
2326 * win32-low.c (current_inferior_ptid): Simplify.
2327
2328 2014-02-19 Tom Tromey <tromey@redhat.com>
2329
2330 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2331 argument.
2332 (target_supports_btrace): Update.
2333
2334 2014-02-14 Yao Qi <yao@codesourcery.com>
2335
2336 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2337 (rsp-low-ipa.o): New target.
2338
2339 2014-02-12 Tom Tromey <tromey@redhat.com>
2340
2341 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2342 convert_ascii_to_int.
2343 * regcache.c (registers_to_string): Likewise.
2344 * remote-utils.c (decode_M_packet): Likewise.
2345 * server.c (process_serial_event): Likewise.
2346
2347 2014-02-12 Tom Tromey <tromey@redhat.com>
2348
2349 * server.c (handle_query, handle_v_run): Use hex2bin, not
2350 unhexify.
2351 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2352
2353 2014-02-12 Tom Tromey <tromey@redhat.com>
2354
2355 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2356 convert_int_to_ascii.
2357 * regcache.c (registers_to_string, collect_register_as_string):
2358 Likewise.
2359 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2360 Likewise.
2361 * server.c (process_serial_event): Likewise.
2362 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2363 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2364
2365 2014-02-12 Tom Tromey <tromey@redhat.com>
2366
2367 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2368 bin2hex, not hexify.
2369 * tracepoint.c (cmd_qtstatus): Likewise.
2370
2371 2014-02-12 Tom Tromey <tromey@redhat.com>
2372
2373 * remote-utils.c (monitor_output): Pass explicit length to
2374 hexify.
2375
2376 2014-02-12 Tom Tromey <tromey@redhat.com>
2377
2378 * tracepoint.c: Include rsp-low.h.
2379 * server.c: Include rsp-low.h.
2380 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2381 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2382 declare.
2383 * remote-utils.c: Include rsp-low.h.
2384 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2385 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2386 (convert_int_to_ascii, convert_ascii_to_int): Move to
2387 common/rsp-low.c.
2388 * regcache.c: Include rsp-low.h.
2389 * ax.c: Include rsp-low.h.
2390 * Makefile.in (SFILES): Add common/rsp-low.c.
2391 (OBS): Add rsp-low.o.
2392 (rsp-low.o): New target.
2393
2394 2014-02-12 Tom Tromey <tromey@redhat.com>
2395
2396 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2397 Include print-utils.h.
2398 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2399 (plongest, thirty_two, phex_nz): Remove.
2400 * Makefile.in (SFILES): Add common/print-utils.c.
2401 (OBS): Add print-utils.o.
2402 (print-utils-ipa.o): New target.
2403 (print-utils.o): New target.
2404 (IPA_OBJS): Add print-utils-ipa.o.
2405
2406 2014-02-06 Tom Tromey <tromey@redhat.com>
2407
2408 * Makefile.in (SFILES): Fix indentation.
2409
2410 2014-02-05 Doug Evans <dje@google.com>
2411
2412 * linux-low.c (linux_wait_for_event): Improve comment.
2413 (linux_wait_1): Keep current_inferior in sync with event_child.
2414
2415 2014-01-22 Doug Evans <dje@google.com>
2416
2417 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2418
2419 2014-01-22 Doug Evans <dje@google.com>
2420
2421 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2422 * configure: Regenerate.
2423 * config.in: Regenerate.
2424 * Makefile.in (SFILES): Add debug.c.
2425 (OBS): Add debug.o.
2426 * debug.c: New file.
2427 * debug.h: New file.
2428 * linux-aarch64-low.c (*): Update all debugging printfs to use
2429 debug_printf instead of fprintf.
2430 * linux-arm-low.c (*): Ditto.
2431 * linux-cris-low.c (*): Ditto.
2432 * linux-crisv32-low.c (*): Ditto.
2433 * linux-m32r-low.c (*): Ditto.
2434 * linux-sparc-low.c (*): Ditto.
2435 * linux-x86.c (*): Ditto.
2436 * linux-low.c (*): Ditto.
2437 (linux_wait_1): Add calls to debug_enter, debug_exit.
2438 (linux_wait): Remove redundant debugging printf.
2439 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2440 (linux_resume, unstop_all_lwps): Ditto.
2441 * mem-break.c (*): Update all debugging printfs to use
2442 debug_printf instead of fprintf.
2443 * remote-utils.c (*): Ditto.
2444 * thread-db.c (*): Ditto.
2445 * server.c #include <ctype.h>, "gdb_vecs.h".
2446 (debug_threads): Moved to debug.c.
2447 (*): Update all debugging printfs to use debug_printf instead of
2448 fprintf.
2449 (start_inferior): Replace call to fflush with call to debug_flush.
2450 (monitor_show_help): Mention set debug-format.
2451 (parse_debug_format_options): New function.
2452 (handle_monitor_command): Handle "monitor set debug-format".
2453 (gdbserver_usage): Mention --debug-format.
2454 (main): Parse --debug-format.
2455 * server.h (debug_threads): Declaration moved to debug.h.
2456 #include "debug.h".
2457 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2458 trace_debug_1 that uses debug_printf.
2459 (tracepoint_look_up_symbols): Update all debugging printfs to use
2460 debug_printf instead of fprintf.
2461
2462 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2463
2464 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2465 sys/ptrace.h.
2466
2467 2014-01-17 Pedro Alves <palves@redhat.com>
2468
2469 PR build/16445
2470 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2471 defined after including gdb_proc_service.h.
2472
2473 2014-01-16 Doug Evans <dje@google.com>
2474
2475 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2476 (match_dll): Use it.
2477
2478 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2479
2480 * target.h (target_ops) <read_btrace>: Change parameters and
2481 return type to allow error reporting.
2482 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2483 trace reading errors on.
2484 * linux-low.c (linux_low_read_btrace): Pass trace reading
2485 errors on.
2486 (linux_low_disable_btrace): New.
2487
2488 2014-01-15 Doug Evans <dje@google.com>
2489
2490 * inferiors.c (thread_id_to_gdb_id): Delete.
2491 * inferiors.h (thread_id_to_gdb_id): Delete.
2492
2493 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2494
2495 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2496 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2497 versions.
2498
2499 2014-01-08 Pedro Alves <palves@redhat.com>
2500
2501 * server.c (handle_status): Don't discard previous queued stop
2502 replies or thread's pending status here.
2503 (main) <disconnection>: Do it here instead.
2504
2505 2014-01-08 Pedro Alves <palves@redhat.com>
2506
2507 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2508 * server.c (visit_actioned_threads, handle_pending_status): New
2509 function.
2510 (handle_v_cont): Factor out parts to ...
2511 (resume): ... this new function. If in all-stop, and a thread
2512 being resumed has a pending status, report it without actually
2513 resuming.
2514 (myresume): Adjust to use the new 'resume' function.
2515 (clear_pending_status_callback, set_pending_status_callback)
2516 (find_status_pending_thread_callback): New functions.
2517 (handle_status): Handle the case of multiple threads having
2518 interesting statuses to report. Report threads' real last signal
2519 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2520 with an interesting thread to report the status for, instead of
2521 always reporting the status of the first thread.
2522
2523 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2524
2525 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2526 * gdbreplay.c (gdbreplay_version): Likewise.
2527
2528 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2529
2530 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2531 iov.iov_len with the real length in use.
2532
2533 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2534
2535 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2536 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2537 for all targets that use win32-low.c.
2538 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2539 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2540
2541 2013-12-13 Pedro Alves <palves@redhat.com>
2542
2543 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2544 if equal to TARGET_WAITKIND_LOADED.
2545 * win32-low.c (cached_status): New static global.
2546 (win32_wait): Add declaration.
2547 (do_initial_child_stuff): Flush all initial pending debug events
2548 up to the initial breakpoint.
2549 (win32_wait): If CACHED_STATUS was set, return that instead
2550 of doing a real wait. Remove the code resuming the execution
2551 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2552 during the initial phase. Also remove the code changing
2553 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2554 TARGET_WAITKIND_STOPPED.
2555
2556 2013-12-11 Yao Qi <yao@codesourcery.com>
2557
2558 * notif.c (handle_notif_ack): Return 0 if no notification
2559 matches.
2560
2561 2013-11-20 Doug Evans <dje@google.com>
2562
2563 * linux-low.c (linux_set_resume_request): Fix comment.
2564
2565 2013-11-20 Doug Evans <dje@google.com>
2566
2567 * linux-low.c (resume_status_pending_p): Tweak comment.
2568
2569 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2570
2571 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2572 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2573 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2574 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2575 (srv_amd64_regobj): Add amd64-mpx.o.
2576 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2577 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2578 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2579 * i387-fp.c (num_pl_bnd_register) Added constant.
2580 (num_pl_bnd_cfg_registers) Added constant.
2581 (struct i387_xsave) Added reserved area and MPX fields.
2582 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2583 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2584 function.
2585 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2586 (init_registers_amd64_mpx_linux): Declare new function.
2587 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2588 (x86_64_regmap): Add MPX registers.
2589 (x86_linux_read_description): Add MPX case.
2590 (initialize_low_arch): Initialize MPX targets.
2591
2592 2013-11-18 Tom Tromey <tromey@redhat.com>
2593
2594 * configure: Rebuild.
2595 * configure.ac: Don't check for stdlib.h.
2596 * gdbreplay.c: Unconditionally include stdlib.h.
2597
2598 2013-11-18 Tom Tromey <tromey@redhat.com>
2599
2600 * config.in: Rebuild.
2601 * configure: Rebuild.
2602 * configure.ac: Don't use AC_HEADER_DIRENT.
2603
2604 2013-11-18 Tom Tromey <tromey@redhat.com>
2605
2606 * server.h: Don't check HAVE_STRING_H.
2607 * gdbreplay.c: Don't check HAVE_STRING_H.
2608 * configure: Rebuild.
2609
2610 2013-11-18 Tom Tromey <tromey@redhat.com>
2611
2612 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2613 LIBGNU.
2614
2615 2013-11-08 Tom Tromey <tromey@redhat.com>
2616
2617 * configure, config.in: Rebuild.
2618 * configure.ac: Remove unused configury.
2619
2620 2013-11-08 Tom Tromey <tromey@redhat.com>
2621
2622 * acinclude.m4: Include common.m4, codeset.m4.
2623 * configure, config.in: Rebuild.
2624 * configure.ac: Use GDB_AC_COMMON.
2625
2626 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2627
2628 * linux-s390-low.c (HWCAP_S390_TE): New define.
2629 (s390_arch_setup): Consider the TE field in the HWCAP for
2630 determining 'have_regset_tdb'.
2631
2632 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2633
2634 PR gdb/16014
2635 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2636 call to sizeof.
2637
2638 2013-10-02 Pedro Alves <palves@redhat.com>
2639
2640 * server.c (process_serial_event): Don't output "GDBserver
2641 exiting" if GDB is connected through stdio.
2642 * target.c (mywait): Likewise, be silent if GDB is connected
2643 through stdio.
2644
2645 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2646
2647 * lynx-low.c (lynx_add_threads_after_attach): New function.
2648 (lynx_attach): Remove call to add_thread. Add call to
2649 lynx_add_threads_after_attach instead.
2650
2651 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2652
2653 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2654 * config.in, configure: Regenerated.
2655
2656 2013-09-18 Yao Qi <yao@codesourcery.com>
2657
2658 PR server/15959
2659 * server.c (start_inferior): Clear 'resume_info'.
2660
2661 2013-09-16 Jiong Wang <jiwang@tilera.com>
2662
2663 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2664 for each register.
2665
2666 2013-09-16 Jiong Wang <jiwang@tilera.com>
2667
2668 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2669 linux-tile-low.o to srv_tgtobj.
2670
2671 2013-09-16 Will Newton <will.newton@linaro.org>
2672
2673 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2674 out regs.
2675
2676 2013-09-06 Pedro Alves <palves@redhat.com>
2677
2678 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2679 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2680 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2681 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2682 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2683 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2684
2685 2013-09-06 Pedro Alves <palves@redhat.com>
2686
2687 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2688 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2689
2690 2013-09-06 Pedro Alves <palves@redhat.com>
2691
2692 * linux-amd64-ipa.c: Include tracepoint.h.
2693 * linux-i386-ipa.c: Include tracepoint.h.
2694
2695 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2696
2697 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2698 (ps_get_thread_area): New function.
2699
2700 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2701
2702 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2703 (initialize_low_arch): Call init_registers_crisv32 rather than
2704 init_register_crisv32.
2705
2706 2013-09-05 Pedro Alves <palves@redhat.com>
2707
2708 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2709 to ...
2710 * hostio.h: ... this new file.
2711 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2712 win32-low.c: Include hostio.h.
2713
2714 2013-09-05 Pedro Alves <palves@redhat.com>
2715
2716 * server.h (gdb_client_data, handler_func, callback_handler_func)
2717 (delete_file_handler, add_file_handler, append_callback_event)
2718 (delete_callback_event, start_event_loop, initialize_event_loop):
2719 Move to event-loop.h and include it.
2720 * event-loop.h: New file.
2721
2722 2013-09-05 Pedro Alves <palves@redhat.com>
2723
2724 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2725 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2726 (loaded_dll, unloaded_dll): Move to ...
2727 * dll.h: ... this new file.
2728 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2729
2730 2013-09-05 Pedro Alves <palves@redhat.com>
2731
2732 * server.h (current_process, get_thread_process, all_processes)
2733 (add_inferior_to_list, for_each_inferior, current_inferior)
2734 (remove_inferior, add_process, remove_process, find_process_pid)
2735 (have_started_inferiors_p, have_attached_inferiors_p)
2736 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2737 (clear_inferiors, find_inferior, find_inferior_id)
2738 (inferior_target_data, set_inferior_target_data)
2739 (inferior_regcache_data, set_inferior_regcache_data): Move to
2740 inferiors.h, and include it.
2741 * inferiors.h: New file.
2742
2743 2013-09-05 Pedro Alves <palves@redhat.com>
2744
2745 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2746 Move ...
2747 * ax.h: ... here.
2748
2749 2013-09-05 Pedro Alves <palves@redhat.com>
2750
2751 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2752 tracepoint.h.
2753 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2754 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2755 (handle_tracepoint_general_set, handle_tracepoint_query)
2756 (tracepoint_finished_step, tracepoint_was_hit)
2757 (release_while_stepping_state_list, current_traceframe)
2758 (in_readonly_region, traceframe_read_mem)
2759 (fetch_traceframe_registers, traceframe_read_sdata)
2760 (traceframe_read_info, struct fast_tpoint_collect_status)
2761 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2762 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2763 (supply_fast_tracepoint_registers)
2764 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2765 (ipa_tdesc, claim_trampoline_space)
2766 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2767 (agent_mem_read, agent_get_trace_state_variable_value)
2768 (agent_set_trace_state_variable_value, agent_tsv_read)
2769 (agent_mem_read_string, get_raw_reg_func_addr)
2770 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2771 * tracepoint.h: ... this new file.
2772
2773 2013-09-05 Pedro Alves <palves@redhat.com>
2774
2775 * server.h (perror_with_name, error, fatal, warning, paddress)
2776 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2777 include it.
2778 * utils.h: New file.
2779
2780 2013-09-05 Pedro Alves <palves@redhat.com>
2781
2782 * server.h (remote_debug, noack_mode, transport_is_reliable)
2783 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2784 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2785 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2786 (write_enn, initialize_async_io, enable_async_io)
2787 (disable_async_io, check_remote_input_interrupt_request)
2788 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2789 (dead_thread_notify, prepare_resume_reply)
2790 (decode_address_to_semicolon, decode_address, decode_m_packet)
2791 (decode_M_packet, decode_X_packet, decode_xfer_write)
2792 (decode_search_memory_packet, unhexify, hexify)
2793 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2794 (look_up_one_symbol, relocate_instruction)
2795 (monitor_output): Move to remote-utils.h, and include it.
2796 * remote-utils.h: New file.
2797
2798 2013-09-05 Pedro Alves <palves@redhat.com>
2799
2800 * server.h (_): Delete.
2801
2802 2013-09-02 Pedro Alves <palves@redhat.com>
2803
2804 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2805 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2806 allocated.
2807 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2808
2809 2013-09-02 Pierre Muller <muller@sourceware.org>
2810
2811 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2812 or WriteProcessMemory complete successfully and handle
2813 ERROR_PARTIAL_COPY error.
2814
2815 2013-09-02 Pedro Alves <palves@redhat.com>
2816
2817 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2818 error instead of EIO.
2819
2820 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2821
2822 PR server/15604
2823 * linux-low.c: Include filestuff.h.
2824 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2825 * lynx-low.c: Include filestuff.h.
2826 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2827 * server.c: Include filestuff.h.
2828 (main): Call notice_open_fds.
2829 * spu-low.c: Include filestuff.h.
2830 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2831
2832 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2833
2834 * Makefile.in: Explain why ../target and ../nat are not
2835 listed as include file search paths.
2836 (linux-waitpid.o): New object file rule.
2837 * configure.srv (srv_native_linux_obj): New variable.
2838 Replace all occurrences of linux native object files with
2839 $srv_native_linux_obj.
2840 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2841 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2842 (linux_enable_event_reporting): Remove declaration.
2843 (my_waitpid): Moved to common/linux-waitpid.c.
2844 (linux_wait_for_event): Pass ptid when calling
2845 linux_enable_event_reporting.
2846 (linux_supports_tracefork_flag): Remove.
2847 (linux_enable_event_reporting): Likewise.
2848 (linux_tracefork_grandchild): Remove.
2849 (STACK_SIZE): Moved to common/linux-ptrace.c.
2850 (linux_tracefork_child): Remove.
2851 (linux_test_for_tracefork): Remove.
2852 (linux_look_up_symbols): Call linux_supports_traceclone.
2853 (initialize_low): Remove call to linux_test_for_tracefork.
2854 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2855 common/linux-ptrace.h.
2856 (PTRACE_TYPE_ARG4): Likewise.
2857 Include linux-ptrace.h.
2858
2859 2013-08-21 Pedro Alves <palves@redhat.com>
2860
2861 * config.in: Renegerate.
2862
2863 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2864
2865 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2866 (SFILES): Remove $(srcdir)/common/target-common.c and
2867 add $(srcdir)/target/waitstatus.c.
2868 (OBS): Remove target-common.o and add waitstatus.o.
2869 (server_h): Remove $(srcdir)/../common/target-common.h and
2870 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2871 and $(srcdir)/../target/waitstatus.h.
2872 (target-common.o): Remove.
2873 (waitstatus.o): New target object file.
2874 * target.h: Do not include target-common.h and
2875 include target/resume.h, target/wait.h and
2876 target/waitstatus.h.
2877
2878 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2879
2880 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2881 to PTRACE_TYPE_ARG3.
2882 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2883 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2884 PTRACE_TYPE_ARG4.
2885 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2886 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2887
2888 2013-07-27 Jie Zhang <jie@codesourcery.com>
2889 Daniel Jacobowitz <dan@codesourcery.com>
2890 Yao Qi <yao@codesourcery.com>
2891
2892 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2893 (mips-linux-watch.o): New rule.
2894 (mips_linux_watch_h): New variable.
2895 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2896 srv_tgtobj.
2897 * linux-mips-low.c: Include mips-linux-watch.h.
2898 (struct arch_process_info, struct arch_lwp_info): New.
2899 (update_watch_registers_callback): New function.
2900 (mips_linux_new_process, mips_linux_new_thread) New functions.
2901 (mips_linux_prepare_to_resume, mips_insert_point): New
2902 functions.
2903 (mips_remove_point, mips_stopped_by_watchpoint): New
2904 functions.
2905 (rsp_bp_type_to_target_hw_bp_type): New function.
2906 (mips_stopped_data_address): New function.
2907 (the_low_target): Add watchpoint support functions.
2908
2909 2013-07-27 Yao Qi <yao@codesourcery.com>
2910
2911 * i386-low.c: Include break-common.h.
2912 (enum target_hw_bp_type): Remove.
2913
2914 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2915
2916 * Makefile.in (SFILES): /common/target-common.c.
2917 (OBS): Add target-common.o.
2918 (server_h): Add $(srcdir)/../common/target-common.h.
2919 (target-common.o): New target.
2920 * server.c (queue_stop_reply_callback): Free
2921 status string after use.
2922 * target.c (target_waitstatus_to_string): Remove.
2923 * target.h: Include target-common.h.
2924 (resume_kind): Likewise.
2925 (target_waitkind): Likewise.
2926 (target_waitstatus): Likewise.
2927 (TARGET_WNOHANG): Likewise.
2928
2929 2013-07-04 Yao Qi <yao@codesourcery.com>
2930
2931 * Makefile.in (host_alias): Use @host_noncanonical@.
2932 (target_alias): Use @target_noncanonical@.
2933 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2934 ACX_NONCANONICAL_HOST.
2935 * configure: Regenerated.
2936
2937 Revert:
2938 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2939
2940 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2941 * configure: Rebuild.
2942 * Makefile.in (version_host, version_target): Get from configure.
2943 (version.c): Use $(version_host) and $(version_target).
2944
2945 2013-07-03 Pedro Alves <palves@redhat.com>
2946
2947 * Makefile.in (config.status): Depend on development.sh.
2948 * acinclude.m4: Include libmcheck.m4.
2949 * configure: Regenerate.
2950
2951 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2952
2953 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2954 attribute inside the parentheses.
2955 (winapi_DebugSetProcessKillOnExit): Ditto.
2956 (winapi_DebugBreakProcess): Ditto.
2957 (winapi_GenerateConsoleCtrlEvent): Ditto.
2958
2959 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2960
2961 * notif.h (notif_event): Add a dummy member to avoid compiler
2962 errors.
2963
2964 2013-07-01 Pedro Alves <palves@redhat.com>
2965
2966 * hostio.c (HOSTIO_PATH_MAX): Define.
2967 (require_filename, handle_open, handle_unlink, handle_readlink):
2968 Use it.
2969
2970 2013-07-01 Pedro Alves <palves@redhat.com>
2971
2972 * server.h: Include "pathmax.h".
2973 * linux-low.c: Don't include sys/param.h.
2974 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2975 MAXPATHLEN.
2976 * win32-low.c: Don't include sys/param.h.
2977 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2978
2979 2013-07-01 Pedro Alves <palves@redhat.com>
2980
2981 * event-loop.c: Don't check HAVE_UNISTD_H before including
2982 <unistd.h>.
2983 * gdbreplay.c: Likewise.
2984 * remote-utils.c: Likewise.
2985 * server.c: Likewise.
2986 * configure.ac: Don't check for unistd.h.
2987 * configure: Regenerate.
2988
2989 2013-06-28 Tom Tromey <tromey@redhat.com>
2990
2991 * Makefile.in (version.c): Use version.in, not
2992 common/version.in.
2993
2994 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2995
2996 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2997 * configure: Rebuild.
2998 * Makefile.in (version_host, version_target): Get from configure.
2999 (version.c): Use $(version_host) and $(version_target).
3000
3001 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3002
3003 Fix trace-status to output user name without trailing colon.
3004 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3005
3006 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3007
3008 Fix trace-status to output proper start-time and stop-time.
3009 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3010 output start time and stop time in hex as gdb expects.
3011
3012 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3013
3014 * tracepoint.c (build_traceframe_info_xml): Output trace state
3015 variables present in the trace buffer.
3016
3017 2013-06-24 Tom Tromey <tromey@redhat.com>
3018
3019 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3020 create-version.sh.
3021 (version.o): Remove.
3022 * gdbreplay.c: Include version.h.
3023 (version, host_name): Don't declare.
3024 * server.h: Include version.h.
3025 (version, host_name): Don't declare.
3026
3027 2013-06-12 Pedro Alves <palves@redhat.com>
3028
3029 * linux-x86-low.c (linux_is_elf64): Delete global.
3030 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3031 with local linux_pid_exe_is_elf_64_file use.
3032
3033 2013-06-11 Pedro Alves <palves@redhat.com>
3034
3035 * linux-low.c (regset_disabled, disable_regset): New functions.
3036 (regsets_fetch_inferior_registers)
3037 (regsets_store_inferior_registers): Use them.
3038 (initialize_regsets_info); Don't allocate the disabled_regsets
3039 array here.
3040 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3041 comment.
3042
3043 2013-06-11 Pedro Alves <palves@redhat.com>
3044
3045 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3046 xmalloc.
3047
3048 2013-06-11 Pedro Alves <palves@redhat.com>
3049
3050 * linux-x86-low.c (initialize_low_arch): Call
3051 init_registers_x32_avx_linux.
3052
3053 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3054
3055 Fix compatibility with Android Bionic.
3056 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3057 it is not empty.
3058
3059 2013-06-07 Pedro Alves <palves@redhat.com>
3060
3061 PR server/14823
3062 * Makefile.in (OBS): Add tdesc.o.
3063 (IPA_OBJS): Add tdesc-ipa.o.
3064 (tdesc-ipa.o): New rule.
3065 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3066 interface.
3067 * linux-low.c (new_inferior): Delete.
3068 (disabled_regsets, num_regsets): Delete.
3069 (linux_add_process): Adjust to set the new per-process
3070 new_inferior flag.
3071 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3072 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3073 was a stop. When calling arch_setup, switch the current inferior
3074 to the thread that got an event.
3075 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3076 (regsets_fetch_inferior_registers)
3077 (regsets_store_inferior_registers): New regsets_info parameter.
3078 Adjust to use it.
3079 (linux_register_in_regsets): New regs_info parameter. Adjust to
3080 use it.
3081 (register_addr, fetch_register, store_register): New usrregs_info
3082 parameter. Adjust to use it.
3083 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3084 parameter regs_info. Adjust to use it.
3085 (linux_fetch_registers): Get the current inferior's regs_info, and
3086 adjust to use it.
3087 (linux_store_registers): Ditto.
3088 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3089 (initialize_low): Don't initialize the target_regsets here. Call
3090 initialize_low_arch.
3091 * linux-low.h (target_regsets): Delete declaration.
3092 (struct regsets_info): New.
3093 (struct usrregs_info): New.
3094 (struct regs_info): New.
3095 (struct process_info_private) <new_inferior>: New field.
3096 (struct linux_target_ops): Delete the num_regs, regmap, and
3097 regset_bitmap fields. New field regs_info.
3098 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3099 * i387-fp.c (num_xmm_registers): Delete.
3100 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3101 calls to new interface.
3102 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3103 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3104 Infer the number of xmm registers from the regcache's target
3105 description.
3106 * i387-fp.h (num_xmm_registers): Delete.
3107 * inferiors.c (add_thread): Don't install the thread's regcache
3108 here.
3109 * proc-service.c (gregset_info): Fetch the current inferior's
3110 regs_info. Adjust to use it.
3111 * regcache.c: Include tdesc.h.
3112 (register_bytes, reg_defs, num_registers)
3113 (gdbserver_expedite_regs): Delete.
3114 (get_thread_regcache): If the thread doesn't have a regcache yet,
3115 create one, instead of aborting gdbserver.
3116 (regcache_invalidate_one): Rename to ...
3117 (regcache_invalidate_thread): ... this.
3118 (regcache_invalidate_one): New.
3119 (regcache_invalidate): Only invalidate registers of the current
3120 process.
3121 (init_register_cache): Add target_desc parameter, and use it.
3122 (new_register_cache): Ditto. Assert the target description has a
3123 non zero registers_size.
3124 (regcache_cpy): Add assertions. Adjust.
3125 (realloc_register_cache, set_register_cache): Delete.
3126 (registers_to_string, registers_from_string): Adjust.
3127 (find_register_by_name, find_regno, find_register_by_number)
3128 (register_cache_size): Add target_desc parameter, and use it.
3129 (free_register_cache_thread, free_register_cache_thread_one)
3130 (regcache_release, register_cache_size): New.
3131 (register_size): Add target_desc parameter, and use it.
3132 (register_data, supply_register, supply_register_zeroed)
3133 (supply_regblock, supply_register_by_name, collect_register)
3134 (collect_register_as_string, collect_register_by_name): Adjust.
3135 * regcache.h (struct target_desc): Forward declare.
3136 (struct regcache) <tdesc>: New field.
3137 (init_register_cache, new_register_cache): Add target_desc
3138 parameter.
3139 (regcache_invalidate_thread): Declare.
3140 (regcache_invalidate_one): Delete declaration.
3141 (regcache_release): Declare.
3142 (find_register_by_number, register_cache_size, register_size)
3143 (find_regno): Add target_desc parameter.
3144 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3145 declarations.
3146 * remote-utils.c: Include tdesc.h.
3147 (outreg, prepare_resume_reply): Adjust.
3148 * server.c: Include tdesc.h.
3149 (gdbserver_xmltarget): Delete declaration.
3150 (get_features_xml, process_serial_event): Adjust.
3151 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3152 declare.
3153 (struct process_info) <tdesc>: New field.
3154 (ipa_tdesc): Declare.
3155 * tdesc.c: New file.
3156 * tdesc.h: New file.
3157 * tracepoint.c: Include tdesc.h.
3158 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3159 (get_context_regcache): Adjust to pass ipa_tdesc down.
3160 (do_action_at_tracepoint): Adjust to get the register cache size
3161 from the context regcache's description.
3162 (traceframe_walk_blocks): Adjust to get the register cache size
3163 from the current trace frame's description.
3164 (traceframe_get_pc): Adjust to get current trace frame's
3165 description and pass it down.
3166 (gdb_collect): Adjust to get the register cache size from the
3167 IPA's description.
3168 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3169 (gdbserver_xmltarget): Delete.
3170 (initialize_low_tracepoint): Set the ipa's target description.
3171 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3172 (initialize_low_tracepoint): Set the ipa's target description.
3173 * linux-x86-low.c: Include tdesc.h.
3174 [__x86_64__] (is_64bit_tdesc): New.
3175 (ps_get_thread_area, x86_get_thread_area): Use it.
3176 (i386_cannot_store_register): Rename to ...
3177 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3178 (i386_cannot_fetch_register): Rename to ...
3179 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3180 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3181 to new interface.
3182 (target_regsets): Rename to ...
3183 (x86_regsets): ... this.
3184 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3185 interface.
3186 (x86_siginfo_fixup): Use is_64bit_tdesc.
3187 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3188 (tdesc_x32_avx_linux, tdesc_x32_linux)
3189 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3190 Declare.
3191 (x86_linux_update_xmltarget): Delete.
3192 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3193 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3194 (AMD64_LINUX_USER64_CS): New.
3195 (x86_linux_read_description): New, based on
3196 x86_linux_update_xmltarget.
3197 (same_process_callback): New.
3198 (x86_arch_setup_process_callback): New.
3199 (x86_linux_update_xmltarget): New.
3200 (x86_regsets_info): New.
3201 (amd64_linux_regs_info): New.
3202 (i386_linux_usrregs_info): New.
3203 (i386_linux_regs_info): New.
3204 (x86_linux_regs_info): New.
3205 (x86_arch_setup): Reimplement.
3206 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3207 (x86_emit_ops): Ditto.
3208 (the_low_target): Adjust. Install x86_linux_regs_info,
3209 x86_cannot_fetch_register, and x86_cannot_store_register.
3210 (initialize_low_arch): New.
3211 * linux-ia64-low.c (tdesc_ia64): Declare.
3212 (ia64_fetch_register): Adjust.
3213 (ia64_usrregs_info, regs_info): New globals.
3214 (ia64_regs_info): New function.
3215 (the_low_target): Adjust.
3216 (initialize_low_arch): New function.
3217 * linux-sparc-low.c (tdesc_sparc64): Declare.
3218 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3219 Adjust.
3220 (sparc_arch_setup): New function.
3221 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3222 (the_low_target): Adjust.
3223 (initialize_low_arch): New function.
3224 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3225 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3226 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3227 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3228 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3229 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3230 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3231 (tdesc_powerpc_isa205_vsx64l): Declare.
3232 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3233 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3234 (ppc_set_pc, ppc_get_hwcap): Adjust.
3235 (ppc_usrregs_info): Forward declare.
3236 (!__powerpc64__) ppc_regmap_adjusted: New global.
3237 (ppc_arch_setup): Adjust to the current process'es target
3238 description.
3239 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3240 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3241 (ppc_store_evrregset): Adjust.
3242 (target_regsets): Rename to ...
3243 (ppc_regsets): ... this, and make static.
3244 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3245 (ppc_regs_info): New function.
3246 (the_low_target): Adjust.
3247 (initialize_low_arch): New function.
3248 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3249 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3250 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3251 (tdesc_s390x_linux64v2): Declare.
3252 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3253 (s390_fill_gregset, s390_store_last_break): Adjust.
3254 (target_regsets): Rename to ...
3255 (s390_regsets): ... this, and make static.
3256 (s390_get_pc, s390_set_pc): Adjust.
3257 (s390_get_hwcap): New target_desc parameter, and use it.
3258 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3259 (s390_arch_setup): Adjust to set the current process'es target
3260 description. Don't adjust the regmap.
3261 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3262 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3263 (regs_info_3264): New globals.
3264 (s390_regs_info): New function.
3265 (the_low_target): Adjust.
3266 (initialize_low_arch): New function.
3267 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3268 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3269 [__mips64] (init_registers_mips_linux)
3270 (init_registers_mips_dsp_linux): Delete defines.
3271 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3272 (have_dsp): New global.
3273 (mips_read_description): New, based on mips_arch_setup.
3274 (mips_arch_setup): Reimplement.
3275 (get_usrregs_info): New function.
3276 (mips_cannot_fetch_register, mips_cannot_store_register)
3277 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3278 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3279 (target_regsets): Rename to ...
3280 (mips_regsets): ... this, and make static.
3281 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3282 (dsp_regs_info, regs_info): New globals.
3283 (mips_regs_info): New function.
3284 (the_low_target): Adjust.
3285 (initialize_low_arch): New function.
3286 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3287 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3288 Declare.
3289 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3290 (arm_read_description): New, with bits factored from
3291 arm_arch_setup.
3292 (arm_arch_setup): Reimplement.
3293 (target_regsets): Rename to ...
3294 (arm_regsets): ... this, and make static.
3295 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3296 (arm_regs_info): New function.
3297 (the_low_target): Adjust.
3298 (initialize_low_arch): New function.
3299 * linux-m68k-low.c (tdesc_m68k): Declare.
3300 (target_regsets): Rename to ...
3301 (m68k_regsets): ... this, and make static.
3302 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3303 (m68k_regs_info): New function.
3304 (m68k_arch_setup): New function.
3305 (the_low_target): Adjust.
3306 (initialize_low_arch): New function.
3307 * linux-sh-low.c (tdesc_sharch): Declare.
3308 (target_regsets): Rename to ...
3309 (sh_regsets): ... this, and make static.
3310 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3311 (sh_regs_info, sh_arch_setup): New functions.
3312 (the_low_target): Adjust.
3313 (initialize_low_arch): New function.
3314 * linux-bfin-low.c (tdesc_bfin): Declare.
3315 (bfin_arch_setup): New function.
3316 (bfin_usrregs_info, regs_info): New globals.
3317 (bfin_regs_info): New function.
3318 (the_low_target): Adjust.
3319 (initialize_low_arch): New function.
3320 * linux-cris-low.c (tdesc_cris): Declare.
3321 (cris_arch_setup): New function.
3322 (cris_usrregs_info, regs_info): New globals.
3323 (cris_regs_info): New function.
3324 (the_low_target): Adjust.
3325 (initialize_low_arch): New function.
3326 * linux-cris-low.c (tdesc_crisv32): Declare.
3327 (cris_arch_setup): New function.
3328 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3329 (cris_regs_info): New function.
3330 (the_low_target): Adjust.
3331 (initialize_low_arch): New function.
3332 * linux-m32r-low.c (tdesc_m32r): Declare.
3333 (m32r_arch_setup): New function.
3334 (m32r_usrregs_info, regs_info): New globals.
3335 (m32r_regs_info): Adjust.
3336 (initialize_low_arch): New function.
3337 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3338 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3339 (tic6x_usrregs_info): Forward declare.
3340 (tic6x_read_description): New function, based on ...
3341 (tic6x_arch_setup): ... this. Reimplement.
3342 (target_regsets): Rename to ...
3343 (tic6x_regsets): ... this, and make static.
3344 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3345 (tic6x_regs_info): New function.
3346 (the_low_target): Adjust.
3347 (initialize_low_arch): New function.
3348 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3349 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3350 (target_regsets): Rename to ...
3351 (xtensa_regsets): ... this, and make static.
3352 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3353 globals.
3354 (xtensa_arch_setup, xtensa_regs_info): New functions.
3355 (the_low_target): Adjust.
3356 (initialize_low_arch): New function.
3357 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3358 (nios2_arch_setup): Set the current process'es tdesc.
3359 (target_regsets): Rename to ...
3360 (nios2_regsets): ... this.
3361 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3362 (nios2_regs_info): New function.
3363 (the_low_target): Adjust.
3364 (initialize_low_arch): New function.
3365 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3366 (aarch64_arch_setup): Set the current process'es tdesc.
3367 (target_regsets): Rename to ...
3368 (aarch64_regsets): ... this.
3369 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3370 (aarch64_regs_info): New function.
3371 (the_low_target): Adjust.
3372 (initialize_low_arch): New function.
3373 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3374 globals.
3375 (target_regsets): Rename to ...
3376 (tile_regsets): ... this.
3377 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3378 (tile_regs_info): New function.
3379 (tile_arch_setup): Set the current process'es tdesc.
3380 (the_low_target): Adjust.
3381 (initialize_low_arch): New function.
3382 * spu-low.c (tdesc_spu): Declare.
3383 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3384 * win32-arm-low.c (tdesc_arm): Declare.
3385 (arm_arch_setup): New function.
3386 (the_low_target): Install arm_arch_setup instead of
3387 init_registers_arm.
3388 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3389 (init_windows_x86): Rename to ...
3390 (i386_arch_setup): ... this. Set `win32_tdesc'.
3391 (the_low_target): Adjust.
3392 * win32-low.c (win32_tdesc): New global.
3393 (child_add_thread): Don't create the thread cache here.
3394 (do_initial_child_stuff): Set the new process'es tdesc.
3395 * win32-low.h (struct target_desc): Forward declare.
3396 (win32_tdesc): Declare.
3397 * lynx-i386-low.c (tdesc_i386): Declare global.
3398 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3399 * lynx-low.c (lynx_tdesc): New global.
3400 (lynx_add_process): Set the new process'es tdesc.
3401 * lynx-low.h (struct target_desc): Forward declare.
3402 (lynx_tdesc): Declare global.
3403 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3404 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3405 * nto-low.c (nto_tdesc): New global.
3406 (do_attach): Set the new process'es tdesc.
3407 * nto-low.h (struct target_desc): Forward declare.
3408 (nto_tdesc): Declare.
3409 * nto-x86-low.c (tdesc_i386): Declare.
3410 (nto_x86_arch_setup): Set `nto_tdesc'.
3411
3412 2013-06-04 Gary Benson <gbenson@redhat.com>
3413
3414 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3415 to qSupported response when appropriate.
3416 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3417 with nonzero-length annex.
3418 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3419 arguments supplied in annex.
3420
3421 2013-05-31 Doug Evans <dje@google.com>
3422
3423 PR server/15594
3424 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3425 64 bits in 64-cross-32 environment.
3426
3427 2013-05-28 Pedro Alves <palves@redhat.com>
3428
3429 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3430 (aarch64-without-fpu.c): Delete rule.
3431 * configure.srv (aarch64*-*-linux*): Remove references to
3432 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3433 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3434 declaration.
3435
3436 2013-05-24 Pedro Alves <palves@redhat.com>
3437
3438 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3439 instead of strchr/decode_address. Error if the range isn't split
3440 with a ','. Don't assume there's be a ':' in the action.
3441
3442 2013-05-23 Yao Qi <yao@codesourcery.com>
3443 Pedro Alves <palves@redhat.com>
3444
3445 * linux-low.c (lwp_in_step_range): New function.
3446 (linux_wait_1): If the thread was range stepping and stopped
3447 outside the stepping range, report the stop to GDB. Otherwise,
3448 continue stepping. Add range stepping debug output.
3449 (linux_set_resume_request): Copy the step range from the resume
3450 request to the lwp.
3451 (linux_supports_range_stepping): New.
3452 (linux_target_ops) <supports_range_stepping>: Set to
3453 linux_supports_range_stepping.
3454 * linux-low.h (struct linux_target_ops)
3455 <supports_range_stepping>: New field.
3456 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3457 * linux-x86-low.c (x86_supports_range_stepping): New.
3458 (the_low_target) <supports_range_stepping>: Set to
3459 x86_supports_range_stepping.
3460 * server.c (handle_v_cont): Handle 'r' action.
3461 (handle_v_requests): Append ";r" if the target supports range
3462 stepping.
3463 * target.h (struct thread_resume) <step_range_start,
3464 step_range_end>: New fields.
3465 (struct target_ops) <supports_range_stepping>:
3466 New field.
3467 (target_supports_range_stepping): New macro.
3468
3469 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3470
3471 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3472 confusion in comment.
3473
3474 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3475
3476 * lynx-low.c (struct process_info_private): New type.
3477 (lynx_add_process): New function.
3478 (lynx_create_inferior, lynx_attach): Replace calls to
3479 add_process by calls to lynx_add_process.
3480 (lynx_resume): If PTID is null, then try using
3481 current_process()->private->last_wait_event_ptid.
3482 Add comments.
3483 (lynx_clear_inferiors): Delete. The contents of that function
3484 has been inlined in lynx_mourn;
3485 (lynx_wait_1): Save the ptid in the process's private data.
3486 (lynx_mourn): Free the process' private data. Replace call
3487 to lynx_clear_inferiors by call to clear_inferiors.
3488
3489 2013-05-17 Yao Qi <yao@codesourcery.com>
3490
3491 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3492 the right place.
3493
3494 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3495
3496 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3497 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3498 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3499 PT_TEXT_END_ADDR guards. Update comments.
3500 (linux_target_op) <read_offsets>: Conditionally define to
3501 linux_read_offsets if the target is UCLIBC and if it defines
3502 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3503
3504 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3505 Andrew Jenner <andrew@codesourcery.com>
3506
3507 * Makefile.in (SFILES): Add linux-nios2-low.c.
3508 (clean): Add action to delete nios2-linux.c.
3509 (nios2-linux.c): New rule.
3510 * configure.srv: Add nios2*-*-linux*.
3511 * linux-nios2-low.c: New.
3512
3513 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3514
3515 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3516
3517 2013-04-25 Hui Zhu <hui@codesourcery.com>
3518
3519 PR gdb/15186
3520 * ax.c (ax_printf): Add fflush.
3521
3522 2013-04-22 Tom Tromey <tromey@redhat.com>
3523
3524 * Makefile.in (SFILES): Add filestuff.c.
3525 (OBS): Add filestuff.o.
3526 (filestuff.o): New target.
3527 * config.in, configure: Rebuild.
3528 * configure.ac: Check for fdwalk, pipe2.
3529
3530 2013-04-17 Pedro Alves <palves@redhat.com>
3531
3532 * configure.ac (USE_THREAD_DB): Delete variable.
3533 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3534 Don't AC_SUBST USE_THREAD_DB.
3535 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3536 * config.in, configure: Regenerate.
3537
3538 2013-04-16 Pedro Alves <palves@redhat.com>
3539
3540 * linux-low.h (struct lwp_info) <thread_known>: Move under
3541 the USE_THREAD_DB #ifdef.
3542
3543 2013-04-16 Pedro Alves <palves@redhat.com>
3544
3545 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3546 (linux-low.o): Delete rule.
3547 * linux-low.h: Always include "gdb_thread_db.h" instead of
3548 conditionally including thread_db.h.
3549 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3550 HAVE_THREAD_DB_H.
3551
3552 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3553
3554 * Makefile.in (install-only): Fix make install regression.
3555
3556 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3557
3558 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3559 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3560 installation.
3561 * gdbserver.1: Remove.
3562
3563 2013-03-22 Pedro Alves <palves@redhat.com>
3564
3565 * linux-low.c (handle_extended_wait): Don't call
3566 linux_enable_event_reporting.
3567
3568 2013-03-15 Tony Theodore <tonyt@logyst.com>
3569
3570 PR build/9098:
3571 * Makefile.in (SHELL): Use @SHELL@.
3572
3573 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3574
3575 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3576 compiler warning.
3577
3578 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3579
3580 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3581 Remove extraneous NULL element.
3582
3583 2013-03-13 Yao Qi <yao@codesourcery.com>
3584
3585 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3586 'V' block in trace frame.
3587
3588 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3589
3590 * target.h (struct target_ops): Add btrace ops.
3591 (target_supports_btrace): New macro.
3592 (target_enable_btrace): New macro.
3593 (target_disable_btrace): New macro.
3594 (target_read_btrace): New macro.
3595 * gdbthread.h (struct thread_info): Add btrace field.
3596 * server.c: Include btrace-common.h.
3597 (handle_btrace_general_set): New function.
3598 (handle_btrace_enable): New function.
3599 (handle_btrace_disable): New function.
3600 (handle_general_set): Call handle_btrace_general_set.
3601 (handle_qxfer_btrace): New function.
3602 (struct qxfer qxfer_packets[]): Add btrace entry.
3603 * inferiors.c (remove_thread): Disable btrace.
3604 * linux-low: Include linux-btrace.h.
3605 (linux_low_enable_btrace): New function.
3606 (linux_low_read_btrace): New function.
3607 (linux_target_ops): Add btrace ops.
3608 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3609 Add srv_linux_btrace=yes.
3610 (x86_64-*-linux*): Add linux-btrace.o.
3611 Add srv_linux_btrace=yes.
3612 * configure.ac: Define HAVE_LINUX_BTRACE.
3613 * config.in: Regenerated.
3614 * configure: Regenerated.
3615
3616 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3617
3618 * server.c (handle_qxfer): Preserve error message if -3 is
3619 returned.
3620 (qxfer): Document the -3 return value.
3621
3622 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3623
3624 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3625 (linux_btrace_h): New variable.
3626 (linux-btrace.o): New rule.
3627
3628 2013-03-08 Stan Shebs <stan@codesourcery.com>
3629 Hafiz Abid Qadeer <abidh@codesourcery.com>
3630
3631 * tracepoint.c (trace_buffer_size): New global.
3632 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3633 (init_trace_buffer): Change to one-argument function. Allocate
3634 trace buffer memory.
3635 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3636 handle QTBuffer:size packet.
3637 (cmd_bigqtbuffer_size): New function.
3638 (initialize_tracepoint): Call init_trace_buffer with
3639 DEFAULT_TRACE_BUFFER_SIZE.
3640 * server.c (handle_query): Add QTBuffer:size in the
3641 supported packets.
3642
3643 2013-03-07 Yao Qi <yao@codesourcery.com>
3644
3645 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3646 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3647 of -1.
3648 (cmd_qtsp): Adjust condition. Do post increment.
3649 Set cur_action and cur_step_action back to 0.
3650
3651 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3652
3653 PR server/15236
3654 * linux-low.c (linux_write_memory): Return early success if LEN is
3655 zero.
3656
3657 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3658
3659 * configure.srv: Add x86_64-*-cygwin* as target.
3660
3661 2013-02-28 Tom Tromey <tromey@redhat.com>
3662
3663 * configure.ac: Invoke AC_SYS_LARGEFILE.
3664 * configure, config.in: Rebuild.
3665
3666 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3667
3668 * win32-low.c: Throughout, fix format strings and casts of
3669 printf-like functions to avoid type related warnings on all
3670 platforms.
3671 (get_child_debug_event): Print dwDebugEventCode as hex since
3672 that's how it's usually documented.
3673
3674 2013-02-28 Yao Qi <yao@codesourcery.com>
3675
3676 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3677 pulongest.
3678
3679 2013-02-27 Jiong Wang <jiwang@tilera.com>
3680
3681 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3682 (reg-tilegx32.c): New rule.
3683 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3684 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3685 different register info initializer according to elf class.
3686 (init_registers_tilgx32): New function. The tilegx32 register info
3687 initializer.
3688 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3689 (tile_store_gregset): Likewise.
3690
3691 2013-02-27 Yao Qi <yao@codesourcery.com>
3692
3693 * server.c (process_point_options): Print debug message when
3694 debug_threads is true.
3695
3696 2013-02-26 Yao Qi <yao@codesourcery.com>
3697
3698 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3699
3700 2013-02-19 Pedro Alves <palves@redhat.com>
3701 Kai Tietz <ktietz@redhat.com>
3702
3703 PR gdb/15161
3704
3705 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3706 instead of strtoul to extract address from packet.
3707 (process_serial_event) <'z'>: Likewise.
3708
3709 2013-02-18 Yao Qi <yao@codesourcery.com>
3710
3711 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3712
3713 2013-02-14 Pedro Alves <palves@redhat.com>
3714
3715 Plug memory leak.
3716
3717 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3718 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3719
3720 2013-02-14 Pedro Alves <palves@redhat.com>
3721
3722 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3723
3724 2013-02-14 Pedro Alves <palves@redhat.com>
3725
3726 * tracepoint.c (save_string): Delete.
3727 (add_tracepoint_action): Use savestring instead of save_string.
3728
3729 2013-02-12 Pedro Alves <palves@redhat.com>
3730
3731 * linux-xtensa-low.c: Ditto.
3732 * xtensa-xtregs.c: Ditto.
3733
3734 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3735
3736 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3737 thread_db.
3738
3739 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3740
3741 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3742 aarch64_num_wp_regs and aarch64_num_bp_regs to
3743 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3744
3745 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3746
3747 * linux-aarch64-low.c (ps_get_thread_area): Replace
3748 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3749
3750 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3751 Marcus Shawcroft <marcus.shawcroft@arm.com>
3752 Nigel Stephens <nigel.stephens@arm.com>
3753 Yufeng Zhang <yufeng.zhang@arm.com>
3754
3755 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3756 (aarch64.c, aarch64-without-fpu.c): New targets.
3757 * configure.srv (aarch64*-*-linux*): New.
3758 * linux-aarch64-low.c: New file.
3759
3760 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3761
3762 * linux-low.c (handle_extended_wait, linux_create_inferior)
3763 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3764 (dequeue_one_deferred_signal, linux_resume_one_thread)
3765 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3766 (linux_tracefork_grandchild, linux_test_for_tracefork)
3767 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3768 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3769 where the argument is 0.
3770
3771 2013-01-25 Yao Qi <yao@codesourcery.com>
3772
3773 * event-loop.c: Include "queue.h".
3774 (gdb_event_p): New typedef.
3775 (struct gdb_event) <next_event>: Remove.
3776 (event_queue): Change to QUEUE(gdb_event_p).
3777 (async_queue_event): Remove.
3778 (gdb_event_xfree): New.
3779 (initialize_event_loop): New.
3780 (process_event): Use API from QUEUE.
3781 (wait_for_event): Likewise.
3782 * server.c (main): Call initialize_event_loop.
3783 * server.h (initialize_event_loop): Declare.
3784
3785 2013-01-18 Yao Qi <yao@codesourcery.com>
3786
3787 * ax.h (struct eval_agent_expr_context): New.
3788 (gdb_eval_agent_expr): Update declaration.
3789 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3790 TFRAME. Add new argument CTX.
3791 * server.h (struct eval_agent_expr_context): Declare.
3792 (agent_mem_read, agent_tsv_read): Update declaration.
3793 (agent_mem_read_string): Likewise.
3794 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3795 (add_traceframe_block): Add new argument TPOINT.
3796 Increase TPOINT->traceframe_usage.
3797 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3798 eval_tracepoint_agent_expr.
3799 (condition_true_at_tracepoint): Likewise.
3800 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3801 (agent_mem_read_string, agent_tsv_read): Likewise.
3802
3803 2013-01-16 Yao Qi <yao@codesourcery.com>
3804
3805 * linux-low.c (linux_resume_one_lwp): Don't check
3806 'lwp->bp_reinsert != 0'.
3807
3808 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3809 Pedro Alves <palves@redhat.com>
3810
3811 * lynx-low.c (ptrace_request_to_str): Define a temporary
3812 macro and use it to simplify this function's implementation.
3813
3814 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3815
3816 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3817 sets errno.
3818
3819 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3820
3821 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3822
3823 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3824
3825 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3826
3827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3828
3829 * lynx-low.c (lynx_resume): Use the resume_info parameter
3830 to determine the ptid for the lynx_ptrace call, unless
3831 it is equal to minus_one_ptid, in which case we use the
3832 ptid of the current_inferior.
3833 (lynx_wait_1): After having received a thread create/exit
3834 event, resume the inferior's execution using the signaling
3835 thread's ptid, rather than the old ptid.
3836
3837 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3838
3839 * lynx-low.c (lynx_resume): Delete variable ret.
3840
3841 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3842
3843 * gdbreplay.c (gdbreplay_version): Update copyright year.
3844 * server.c (gdbserver_version): Likewise.
3845
3846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3847
3848 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3849 new thread.
3850
3851 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3852
3853 * lynx-low.c (ptrace_request_to_str): Add handling for
3854 PTRACE_GETTRACESIG.
3855
3856 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3857
3858 * lynx-low.c (lynx_attach): Delete variable new_process.
3859
3860 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3861
3862 * lynx-low.c (lynx_create_inferior): Delete variable
3863 new_process.
3864
3865 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3866
3867 * lynx-low.c (ptrace_request_to_str): Do not handle
3868 PTRACE_GETTHREADLIST if this macro does not exist.
3869
3870 2012-12-15 Yao Qi <yao@codesourcery.com>
3871
3872 * Makefile.in (OBS): Add notif.o.
3873 * notif.c, notif.h: New.
3874 * server.c: Include "notif.h".
3875 (struct vstop_notif) <next>: Remove.
3876 <base>: New field.
3877 (queue_stop_reply): Update.
3878 (push_event, send_next_stop_reply): Remove.
3879 (discard_queued_stop_replies): Update.
3880 (notif_stop): New variable.
3881 (handle_v_stopped): Remove.
3882 (handle_v_requests): Don't call handle_v_stopped. Call
3883 handle_ack_notif instead.
3884 (queue_stop_reply_callback): Call notif_event_enque instead
3885 of queue_stop_reply.
3886 (handle_status): Don't call send_next_stop_reply, call
3887 notif_write_event instead.
3888 (kill_inferior_callback): Likewise.
3889 (detach_or_kill_inferior_callback): Likewise.
3890 (main): Call initialize_notif.
3891 (process_serial_event): Call QUEUE_is_empty.
3892 (handle_target_event): Call notif_push instead of push event.
3893 * server.h (push_event): Remove declaration.
3894
3895 2012-12-10 Tom Tromey <tromey@redhat.com>
3896
3897 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3898 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3899 macros.
3900 (.c.o): Rewrite.
3901 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3902 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3903 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3904 (amd64-linux-ipa.o, ax.o): Rewrite.
3905 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3906 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3907 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3908 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3909 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3910 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3911 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3912 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3913 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3914 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3915 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3916 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3917 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3918 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3919 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3920 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3921 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3922 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3923 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3924 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3925 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3926 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3927 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3928 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3929 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3930 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3931 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3932 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3933 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3934 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3935 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3936 (reg-tilegx.o): Remove.
3937 (all_object_files): New macro.
3938 Include .deps files.
3939 * aclocal.m4, configure: Rebuild.
3940 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3941 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3942 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3943
3944 2012-12-05 Tom Tromey <tromey@redhat.com>
3945
3946 PR gdb/14917:
3947 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3948
3949 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3950
3951 * configure.ac: Check for linux/perf_event.h.
3952 * config.in: Regenerated.
3953 * configure: Regenerated.
3954
3955 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3956
3957 * hostio.c (handle_readlink): Decrease buffer size
3958 parameter passed to readlink by one byte.
3959
3960 2012-11-26 Yao Qi <yao@codesourcery.com>
3961
3962 * configure.ac (build_warnings): Append '-Wempty-body'.
3963 * configure: Regenerated.
3964 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3965 body.
3966
3967 2012-11-15 Pierre Muller <muller@sourceware.org>
3968
3969 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3970 * config.in: Regenerate.
3971 * configure: Regenerate.
3972 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3973 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3974 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3975 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3976 header.
3977 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3978 instead of <sys/wait.h> header.
3979 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3980
3981 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3982
3983 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3984 (various make rules): Remove -DGDBSERVER
3985
3986 2012-11-09 Yao Qi <yao@codesourcery.com>
3987
3988 * spu-low.c (current_ptid): Move it to ..
3989 * gdbthread.h: ... here. New.
3990 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3991 * server.c (myresume, process_serial_event): Likewise.
3992 * thread-db.c (thread_db_find_new_threads): Likewise.
3993 * tracepoint.c (run_inferior_command): Likewise.
3994
3995 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3996
3997 * server.c (handle_search_memory_1): Include access length in
3998 warning message.
3999
4000 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4001
4002 * linux-crisv32-low.c: Fix compile errors.
4003
4004 2012-09-04 Yao Qi <yao@codesourcery.com>
4005
4006 * tracepoint.c (cmd_qtsv): Adjust debug message.
4007 Don't check CUR_TPOINT.
4008
4009 2012-08-28 Yao Qi <yao@codesourcery.com>
4010
4011 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4012 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4013 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4014 Remove declarations of xmalloc, xreallloc, xstrdup and
4015 freeargv.
4016 * Makefile.in (libiberty_h): New.
4017 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4018 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4019
4020 2012-08-23 Yao Qi <yao@codesourcery.com>
4021
4022 * server.h: Remove declaration of 'xsnprintf'.
4023
4024 2012-08-22 Keith Seitz <keiths@redhat.com>
4025
4026 * server.h: Include build-gnulib-gbserver/config.h.
4027 * gdbreplay.c: Likewise.
4028
4029 2012-08-08 Doug Evans <dje@google.com>
4030
4031 * Makefile.in (SFILES): Add gdb_vecs.c.
4032 (OBS): Add gdb_vecs.o.
4033 (gdb_vecs_h, host_defs_h): New variables.
4034 (thread-db.o): Add $(gdb_vecs_h) dependency.
4035 (gdb_vecs.o): New rule.
4036 * thread-db.c: #include "gdb_vecs.h".
4037 (thread_db_load_search): Use a vector to iterate over path elements.
4038 Handle text appearing after "$pdir".
4039
4040 * configure.ac: Add check for strstr.
4041 * config.in: Regenerate.
4042 * configure: Regenerate.
4043
4044 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4045
4046 * hostio.c (handle_pread): If pread fails, fall back to attempting
4047 lseek/read.
4048 (handle_pwrite): Likewise for pwrite.
4049
4050 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4051
4052 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4053 between unsupported TYPE and unimplementable ADDR/LEN combination.
4054 (arm_insert_point): Act on new return value.
4055
4056 2012-07-31 Pedro Alves <palves@redhat.com>
4057
4058 * server.c (process_point_options): Only skip tokens if we find
4059 one that is unrecognized. Don't treat 'X' specially while
4060 skipping unrecognized tokens.
4061
4062 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4063
4064 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4065 to 4-byte-align HW breakpoint addresses for Thumb.
4066
4067 2012-07-27 Yao Qi <yao@codesourcery.com>
4068
4069 PR remote/14161.
4070
4071 * server.h: Declare gdb_agent_about_to_close.
4072 * target.c (kill_inferior): Include "agent.h".
4073 New. Send command 'kill'.
4074 * target.h (kill_inferior): Removed macro.
4075 * tracepoint.c (gdb_agent_about_to_close): New.
4076 (gdb_agent_helper_thread): Handle command 'close'.
4077 Wait endlessly until the inferior stops.
4078 Install gdb_agent_remove_socket to atexit hook.
4079 (agent_socket_name): New static variable.
4080 (gdb_agent_socket_init): Replace local variable 'name' with
4081 'agent_socket_name'.
4082 (gdb_agent_remove_socket): New.
4083
4084 2012-07-27 Yao Qi <yao@codesourcery.com>
4085
4086 * server.c (process_point_options): Stop at 'X' when parsing.
4087
4088 2012-07-19 Michael Eager <eager@eagercon.com>
4089
4090 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4091 to hw_execute.
4092 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4093 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4094 hardware breakpoint.
4095
4096 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4097
4098 * gdbserver/linux-low.c (initialize_low): Call
4099 linux_ptrace_init_warnings.
4100
4101 2012-07-02 Doug Evans <dje@google.com>
4102
4103 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4104 pointer to int.
4105
4106 2012-07-02 Stan Shebs <stan@codesourcery.com>
4107
4108 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4109 (ax.o): Add it to build rule.
4110 (ax-ipa.o): Ditto.
4111 (OBS): Add format.o.
4112 (IPA_OBS): Add format.o.
4113 * server.c (handle_query): Claim support for breakpoint commands.
4114 (process_point_options): Add command case.
4115 (process_serial_event): Leave running if there are printfs in
4116 effect.
4117 * mem-break.h (any_persistent_commands): Declare.
4118 (add_breakpoint_commands): Declare.
4119 (gdb_no_commands_at_breakpoint): Declare.
4120 (run_breakpoint_commands): Declare.
4121 * mem-break.c (struct point_command_list): New struct.
4122 (struct breakpoint): New field command_list.
4123 (any_persistent_commands): New function.
4124 (add_commands_to_breakpoint): New function.
4125 (add_breakpoint_commands): New function.
4126 (gdb_no_commands_at_breakpoint): New function.
4127 (run_breakpoint_commands): New function.
4128 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4129 locally.
4130 * ax.c: Include format.h.
4131 (ax_printf): New function.
4132 (gdb_eval_agent_expr): Add printf opcode.
4133
4134 2012-06-13 Yao Qi <yao@codesourcery.com>
4135
4136 * server.c (start_inferior): Remove duplicated writes to fields
4137 'last_resume_kind' and 'last_status' of 'current_inferior'.
4138
4139 2012-06-12 Yao Qi <yao@codesourcery.com>
4140 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4143 comment.
4144 * server.c (handle_v_cont): Extend comment.
4145
4146 2012-06-11 Yao Qi <yao@codesourcery.com>
4147
4148 * linux-low.c (linux_attach): Add 'static'.
4149
4150 2012-06-06 Yao Qi <yao@codesourcery.com>
4151
4152 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4153
4154 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4155
4156 Fix gcc -flto compilation warning.
4157 * server.c (main): Make variable multi_mode and attach volatile.
4158
4159 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4160
4161 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4162 if the platform doesn't know about it.
4163
4164 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4165
4166 * Makefile.in (SFILES): Add linux-tile-low.c.
4167 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4168 * configure.srv: Handle tilegx-*-linux*.
4169 * linux-tile-low.c: New file.
4170
4171 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4172
4173 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4174
4175 2012-05-24 Pedro Alves <palves@redhat.com>
4176
4177 PR gdb/7205
4178
4179 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4180
4181 2012-05-24 Pedro Alves <palves@redhat.com>
4182
4183 PR gdb/7205
4184
4185 Replace target_signal with gdb_signal throughout.
4186
4187 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4188
4189 * linux-low.c (linux_store_registers): Avoid the copying sequence
4190 when no data has been retrieved by ptrace.
4191
4192 2012-05-22 Will Deacon <will.deacon@arm.com>
4193
4194 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4195 Include asm/ptrace.h.
4196 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4197 already defined.
4198
4199 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4200
4201 * linux-low.c (linux_store_registers): Don't re-retrieve data
4202 with ptrace that has already been obtained from /proc. Always
4203 copy any data retrieved with ptrace to the buffer supplied.
4204
4205 2012-05-11 Yao Qi <yao@codesourcery.com>
4206 Pedro Alves <palves@redhat.com>
4207
4208 * linux-low.c (enum stopping_threads_kind): New.
4209 (stopping_threads): Change type to `enum stopping_threads_kind'.
4210 (handle_extended_wait): If stopping and suspending threads, leave
4211 the new_lwp suspended too.
4212 (linux_wait_for_event): Adjust.
4213 (stop_all_lwps): Set `stopping_threads' to
4214 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4215 whether we're suspending threads or just stopping them. Assert no
4216 recursion happens.
4217
4218 2012-04-29 Yao Qi <yao@codesourcery.com>
4219
4220 * server.h: Move some code to ...
4221 * gdbthread.h: ... here. New.
4222 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4223 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4224 (nto-low.o, win32-low.o): Likewise.
4225 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4226 * regcache.c, remote-utils.c, server.c: Likewise.
4227 * target.c, tracepoint.c, win32-low.c: Likewise.
4228
4229 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4230
4231 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4232 (PTRACE_ARG4_TYPE): Likewise.
4233 (PTRACE_XFER_TYPE): Likewise.
4234 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4235 ptrace to PTRACE_ARG3_TYPE.
4236 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4237 (PTRACE_ARG4_TYPE): Likewise.
4238 (PTRACE_XFER_TYPE): Likewise.
4239 (linux_detach_one_lwp): Cast fourth argument of
4240 ptrace to long then PTRACE_ARG4_TYPE.
4241 (regsets_fetch_inferior_registers): Cast third argument of
4242 ptrace to long then PTRACE_ARG3_TYPE.
4243 (regsets_store_inferior_registers): Likewise.
4244
4245 2012-04-20 Pedro Alves <palves@redhat.com>
4246
4247 * configure: Regenerate.
4248
4249 2012-04-19 Pedro Alves <palves@redhat.com>
4250
4251 * Makefile.in (GNULIB_BUILDDIR): New.
4252 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4253 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4254 (all, install-only, uninstall, clean-info, all-lib, clean): No
4255 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4256 (maintainer-clean realclean distclean): Use subdir_do.
4257 (subdir_do): New.
4258 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4259 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4260 * acinclude.m4: Include acx_configure_dir.m4.
4261 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4262 calls. Call AC_PROG_RANLIB. Configure gnulib using
4263 ACX_CONFIGURE_DIR.
4264 (GNULIB): New.
4265 (GNULIB_STDINT_H): Adjust.
4266 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4267 * gdbreplay.c: Include build-gnulib/config.h.
4268 * server.h: Likewise.
4269 * aclocal.m4: Regenerate.
4270 * config.in: Regenerate.
4271 * configure: Regenerate.
4272
4273 2012-04-19 Pedro Alves <palves@redhat.com>
4274
4275 * Makefile.in (LIBGNU, INCGNU): Adjust.
4276 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4277 (all, install-only, uninstall, clean-info, all-lib, clean)
4278 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4279 * configure.ac: Adjust AC_OUTPUT output.
4280 * aclocal.m4: Regenerate.
4281 * configure: Regenerate.
4282
4283 2012-04-19 Pedro Alves <palves@redhat.com>
4284
4285 * Makefile.in (generated_files): New.
4286 (server_h): Remove the explicit dependency on config.h, and depend
4287 on $generated_files.
4288
4289 2012-04-19 Pedro Alves <palves@redhat.com>
4290
4291 * Makefile.in (INCGNU): Add -Ignulib.
4292
4293 2012-04-19 Pedro Alves <palves@redhat.com>
4294
4295 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4296 (INCGNU): ... this, and spell out -I here.
4297 (GNULIB_LIB): Rename to ...
4298 (LIBGNU): ... this.
4299 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4300
4301 2012-04-19 Pedro Alves <palves@redhat.com>
4302
4303 * config.in: Regenerate.
4304
4305 2012-04-19 Pedro Alves <palves@redhat.com>
4306
4307 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4308 * server.h (memmem): Remove declaration.
4309 * config.in: Regenerate.
4310 * configure: Regenerate.
4311
4312 2012-04-19 Yao Qi <yao@codesourcery.com>
4313
4314 * Makefile.in (SFILES): Add common/vec.c.
4315 (OBS): Add vec.o.
4316 (vec.o): New rule.
4317
4318 2012-04-19 Yao Qi <yao@codesourcery.com>
4319
4320 * remote-utils.c (prepare_resume_reply): Replace with macro
4321 target_core_of_thread.
4322 * server.c (handle_qxfer_threads_proper): Likewise.
4323 * target.h (traget_core_of_thread): New macro.
4324
4325 2012-04-18 Pedro Alves <palves@redhat.com>
4326
4327 * aclocal.m4: Regenerate.
4328 * configure: Regenerate.
4329
4330 2012-04-16 Yao Qi <yao@codesourcery.com>
4331
4332 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4333 duplicated on address.
4334
4335 2012-04-16 Yao Qi <yao@codesourcery.com>
4336
4337 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4338 (struct tracepoint_action_ops) <send>: New field.
4339 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4340 (agent_expr_send, x_tracepoint_action_send): New.
4341 (l_tracepoint_action_send): New.
4342 (cmd_qtdp): Download and install tracepoint
4343 according to `use_agent'.
4344 (run_inferior_command): Add one more parameter `len'.
4345 Update callers.
4346 (tracepoint_send_agent): New.
4347 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4348
4349 2012-04-16 Yao Qi <yao@codesourcery.com>
4350
4351 * tracepoint.c (download_tracepoints): Moved to ...
4352 (cmd_qtstart): ... here.
4353
4354 2012-04-14 Yao Qi <yao@codesourcery.com>
4355
4356 * tracepoint.c: Include inttypes.h.
4357 (struct collect_memory_action): Use sized types.
4358 (struct tracepoint): Likewise.
4359 (cmd_qtdp, stop_tracing): Update print specifiers.
4360 (cmd_qtp, response_tracepoint): Likewise.
4361 (collect_data_at_tracepoint): Likewise.
4362 (collect_data_at_step): Likewise.
4363
4364 2012-04-14 Yao Qi <yao@codesourcery.com>
4365
4366 Import gnulib module inttypes.
4367 * aclocal.m4, config.in, configure: Regenerated.
4368
4369 2012-04-14 Yao Qi <yao@codesourcery.com>
4370
4371 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4372 Makefile and config.status at last.
4373
4374 2012-04-13 Yao Qi <yao@codesourcery.com>
4375
4376 * tracepoint.c: Include stdint.h unconditionally.
4377
4378 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4379
4380 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4381 on BFD_HAVE_SYS_PROCFS_TYPE.
4382 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4383 * configure: Regenerate.
4384 * config.in: Likewise.
4385
4386 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4387
4388 * Makefile.in (clean): Also remove x32.c x32-linux.c
4389 x32-avx.c x32-avx-linux.c.
4390 (x32.o): New target.
4391 (x32.c): Likewise.
4392 (x32-linux.o): Likewise.
4393 (x32-linux.c): Likewise.
4394 (x32-avx.o): Likewise.
4395 (x32-avx.c): Likewise.
4396 (x32-avx-linux.o): Likewise.
4397 (x32-avx-linux.c): Likewise.
4398
4399 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4400 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4401 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4402 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4403 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4404 i386/x32-avx-linux.xml.
4405
4406 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4407 (init_registers_x32_avx_linux): Likwise.
4408 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4409 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4410
4411 2012-04-13 Pedro Alves <palves@redhat.com>
4412
4413 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4414 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4415 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4416 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4417 the sub-make.
4418
4419 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4420
4421 * linux-x86-low.c (compat_x32_clock_t): New.
4422 (compat_x32_siginfo_t): Likewise.
4423 (compat_x32_siginfo_from_siginfo): Likewise.
4424 (siginfo_from_compat_x32_siginfo): Likewise.
4425 (linux_is_elf64): Likewise.
4426 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4427 and siginfo_from_compat_x32_siginfo for x32.
4428 (x86_arch_setup): Set linux_is_elf64.
4429
4430 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4431
4432 PR gdb/13969
4433 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4434 e_machine field.
4435 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4436 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4437 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4438 compatible with process.
4439
4440 2012-04-12 Yao Qi <yao@codesourcery.com>
4441
4442 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4443 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4444 (install-only, install-info, clean): Handle sub dir gnulib.
4445 (all-lib, am--refresh): New targets.
4446 (memmem.o): Remove target.
4447 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4448 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4449 (AC_REPLACE_FUNCS): Remove memmem.
4450 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4451 (AC_OUTPUT): Generate Makefile in gnulib/.
4452 * aclocal.m4, config.in, configure: Regenerated.
4453
4454 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4455
4456 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4457
4458 2012-04-05 Pedro Alves <palves@redhat.com>
4459
4460 -Werror=strict-aliasing
4461
4462 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4463 pointer.
4464
4465 2012-04-04 Pedro Alves <palves@redhat.com>
4466
4467 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4468 (sparc_store_gregset_from_stack, sparc_store_gregset)
4469 (sparc_breakpoint_at): Fix formatting.
4470
4471 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4472
4473 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4474 are available.
4475 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4476 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4477 * config.in: Regenerate.
4478 * configure: Likewise.
4479
4480 2012-03-29 Pedro Alves <palves@redhat.com>
4481
4482 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4483 Correct ptrace arguments.
4484
4485 2012-03-28 Pedro Alves <palves@redhat.com>
4486
4487 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4488 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4489 (IA64_FR1_REGNUM): New defines.
4490 (ia64_fetch_register): New.
4491 (the_low_target): Install it.
4492 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4493 field.
4494 * linux-low.c (linux_fetch_registers): Try the
4495 the_low_target.fetch_register hook first.
4496
4497 * linux-arm-low.c (the_low_target): Adjust.
4498 * linux-bfin-low.c (the_low_target): Adjust.
4499 * linux-cris-low.c (the_low_target): Adjust.
4500 * linux-crisv32-low.c (the_low_target): Adjust.
4501 * linux-m32r-low.c (the_low_target): Adjust.
4502 * linux-m68k-low.c (the_low_target): Adjust.
4503 * linux-mips-low.c (the_low_target): Adjust.
4504 * linux-ppc-low.c (the_low_target): Adjust.
4505 * linux-s390-low.c (the_low_target): Adjust.
4506 * linux-sh-low.c (the_low_target): Adjust.
4507 * linux-sparc-low.c (the_low_target): Adjust.
4508 * linux-tic6x-low.c (the_low_target): Adjust.
4509 * linux-x86-low.c (the_low_target): Adjust.
4510 * linux-xtensa-low.c (the_low_target): Adjust.
4511
4512 2012-03-26 Pedro Alves <palves@redhat.com>
4513
4514 * server.c (handle_qxfer_libraries): Don't bail early if
4515 the_target->qxfer_libraries_svr4 is not NULL.
4516
4517 2012-03-26 Pedro Alves <palves@redhat.com>
4518
4519 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4520
4521 2012-03-23 Pedro Alves <palves@redhat.com>
4522
4523 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4524 "library-list-svr4" element's start tag when the the DSO list is
4525 empty.
4526
4527 2012-03-23 Pedro Alves <palves@redhat.com>
4528
4529 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4530 a variable whose type size is the same as the inferior's pointer
4531 size.
4532
4533 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4534
4535 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4536 struct siginfo.
4537 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4538 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4539 * linux-low.h: Include <signal.h>.
4540 (struct siginfo): Remove forward declaration.
4541 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4542 struct siginfo.
4543
4544 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4545
4546 * .gitignore: Ignore more files.
4547
4548 2012-03-19 Pedro Alves <palves@redhat.com>
4549 Jan Kratochvil <jan.kratochvil@redhat.com>
4550
4551 * server.c (cont_thread, general_thread): Add describing comments.
4552 (start_inferior): Clear `cont_thread'.
4553 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4554 of a process.
4555
4556 2012-03-15 Yao Qi <yao@codesourcery.com>
4557
4558 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4559 handling to ...
4560 (cmd_qtdp): ... here.
4561
4562 2012-03-15 Yao Qi <yao@codesourcery.com>
4563
4564 * tracepoint.c (struct tracepoint_action_ops): New.
4565 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4566 (m_tracepoint_action_download): New.
4567 (r_tracepoint_action_download): New.
4568 (x_tracepoint_action_download): New.
4569 (l_tracepoint_action_download): New.
4570 (add_tracepoint_action): Install `action->ops' according type.
4571 (download_tracepoint_1): Move code `download' function pointer
4572 of various tracepoint_action_ops.
4573
4574 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4575
4576 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4577 linux_ptrace_attach_warnings.
4578
4579 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 * Makefile.in (linux-ptrace.o): New.
4582 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4583 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4584 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4585 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4586 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4587 of these targets.
4588 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4589
4590 2012-03-08 Yao Qi <yao@codesourcery.com>
4591 Pedro Alves <palves@redhat.com>
4592
4593 Fix PR server/13392.
4594 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4595 offset of JMP insn.
4596 * tracepoint.c (remove_tracepoint): New.
4597 (cmd_qtdp): Call remove_tracepoint when failed to install.
4598
4599 2012-03-07 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (get_detach_signal): New.
4602 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4603 Pass on pending signals to PTRACE_DETACH. Check the result of the
4604 ptrace call.
4605 * server.c (program_signals, program_signals_p): New.
4606 (handle_general_set): Handle QProgramSignals.
4607 * server.h (program_signals, program_signals_p): Declare.
4608
4609 2012-03-05 Pedro Alves <palves@redhat.com>
4610 Jan Kratochvil <jan.kratochvil@redhat.com>
4611
4612 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4613 New comment why.
4614
4615 2012-03-03 Yao Qi <yao@codesourcery.com>
4616
4617 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4618 agent_look_up_symbols.
4619
4620 2012-03-03 Yao Qi <yao@codesourcery.com>
4621
4622 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4623 (linux-x86-low.o): Likewise.
4624 * server.h: Remove in_process_agent_loaded.
4625 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4626 common/agent.c.
4627 Update callers.
4628
4629 2012-03-03 Yao Qi <yao@codesourcery.com>
4630
4631 * tracepoint.c (gdb_agent_capability): New global.
4632 (in_process_agent_loaded_ust): Renamed to
4633 `in_process_agent_supports_ust'.
4634 Update callers.
4635 (in_process_agent_supports_ust): Call agent_capability_check.
4636 (clear_installed_tracepoints): Assert that agent supports
4637 agent.
4638
4639 2012-03-03 Yao Qi <yao@codesourcery.com>
4640
4641 * linux-low.c (linux_supports_agent): New.
4642 (linux_target_ops): Initialize field `supports_agent' with
4643 linux_supports_agent.
4644 * target.h (struct target_ops) <supports_agent>: New.
4645 (target_supports_agent): New macro.
4646 * server.c (handle_general_set): Handle packet 'QAgent'.
4647 (handle_query): Send `QAgent+'.
4648 * Makefile.in (server.o): Depends on agent.h.
4649
4650 2012-03-03 Yao Qi <yao@codesourcery.com>
4651
4652 * Makefile.in (OBS): Add agent.o.
4653 Add new rule for agent.o.
4654 Track dependence of tracepoint.c on agent.h.
4655 * tracepoint.c (run_inferior_command_1):
4656 (run_inferior_command): Call agent_run_command.
4657 (gdb_ust_connect_sync_socket): Deleted. Move it to
4658 common/agent.c.
4659 (resume_thread, stop_thread): Likewise.
4660 (gdb_ust_socket_init): Renamed to ...
4661 (gdb_agent_socket_init): ... New.
4662 (gdb_ust_thread): Renamed to ...
4663 (gdb_agent_helper_thread): ... New.
4664 (gdb_ust_init): Move some code to ...
4665 (gdb_agent_init): ... here. New.
4666 [HAVE_UST]: Call gdb_ust_init.
4667 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4668 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4669 * config.in, configure: Regenerated.
4670
4671 2012-03-02 Pedro Alves <palves@redhat.com>
4672
4673 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4674 * linux-low.c (struct simple_pid_list): New.
4675 (stopped_pids): New a struct simple_pid_list pointer.
4676 (add_to_pid_list, pull_pid_from_list): New.
4677 (handle_extended_wait): Don't assume the first signal new children
4678 report is SIGSTOP. Adjust call to pull_pid_from_list.
4679 (linux_wait_for_lwp): Adjust.
4680
4681 2012-03-02 Yao Qi <yao@codesourcery.com>
4682
4683 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4684 debug log.
4685
4686 2012-03-02 Yao Qi <yao@codesourcery.com>
4687
4688 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4689 `stop_pc' and `tpoint'. Update caller.
4690
4691 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4692
4693 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4694 * linux-low.c (use_linux_regsets): New macro.
4695 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4696 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4697 (linux_register_in_regsets): New function.
4698 (usr_fetch_inferior_registers): Skip registers covered by
4699 regsets.
4700 (usr_store_inferior_registers): Likewise.
4701 (usr_fetch_inferior_registers): New macro.
4702 (usr_store_inferior_registers): Likewise.
4703 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4704 (linux_store_registers): Likewise.
4705 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4706 prototype.
4707 (init_registers_mips64_dsp_linux): Likewise.
4708 (init_registers_mips_linux): New macro.
4709 (init_registers_mips_dsp_linux): Likewise.
4710 (mips_dsp_num_regs): Likewise.
4711 (DSP_BASE, DSP_CONTROL): New fallback macros.
4712 (mips_base_regs): New macro.
4713 (mips_regmap): Use it. Fix the size.
4714 (mips_dsp_regmap): New variable.
4715 (mips_dsp_regset_bitmap): Likewise.
4716 (mips_arch_setup): New function.
4717 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4718 than mips_regmap.
4719 (mips_cannot_store_register): Likewise.
4720 (the_low_target): Update .arch_setup, .num_regs and .regmap
4721 initializers. Add .regset_bitmap initializer.
4722 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4723 initializer.
4724 * linux-bfin-low.c (the_low_target): Likewise.
4725 * linux-cris-low.c (the_low_target): Likewise.
4726 * linux-crisv32-low.c (the_low_target): Likewise.
4727 * linux-ia64-low.c (the_low_target): Likewise.
4728 * linux-m32r-low.c (the_low_target): Likewise.
4729 * linux-m68k-low.c (the_low_target): Likewise.
4730 * linux-ppc-low.c (the_low_target): Likewise.
4731 * linux-s390-low.c (the_low_target): Likewise.
4732 * linux-sh-low.c (the_low_target): Likewise.
4733 * linux-sparc-low.c (the_low_target): Likewise.
4734 * linux-tic6x-low.c (the_low_target): Likewise.
4735 * linux-x86-low.c (the_low_target): Likewise.
4736 * linux-xtensa-low.c (the_low_target): Likewise.
4737 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4738 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4739 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4740 srv_xmlfiles.
4741 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4742 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4743
4744 2012-02-29 Yao Qi <yao@codesourcery.com>
4745 Pedro Alves <palves@redhat.com>
4746
4747 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4748 `step_over_finished' is true.
4749
4750 2012-02-27 Pedro Alves <palves@redhat.com>
4751
4752 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4753 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4754
4755 2012-02-27 Pedro Alves <palves@redhat.com>
4756
4757 PR server/9684
4758 * linux-low.c (pid_is_stopped): New.
4759 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4760
4761 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4762
4763 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4764 of conditions.
4765
4766 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4767
4768 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4769
4770 2012-02-24 Luis Machado <lgustavo@codesourcery>
4771
4772 * server.c (handle_query): Advertise support for target-side
4773 breakpoint condition evaluation.
4774 (process_point_options): New function.
4775 (process_serial_event): When inserting a breakpoint, check for
4776 a target-side condition that should be evaluated.
4777
4778 * mem-break.c: Include regcache.h and ax.h.
4779 (point_cond_list_t): New data structure.
4780 (breakpoint) <cond_list>: New field.
4781 (find_gdb_breakpoint_at): Make non-static.
4782 (delete_gdb_breakpoint_at): Clear any target-side
4783 conditions.
4784 (clear_gdb_breakpoint_conditions): New function.
4785 (add_condition_to_breakpoint): Likewise.
4786 (add_breakpoint_condition): Likewise.
4787 (gdb_condition_true_at_breakpoint): Likewise.
4788 (gdb_breakpoint_here): Return result directly instead
4789 of going through a local variable.
4790
4791 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4792 (clear_gdb_breakpoint_conditions): Likewise.
4793 (add_breakpoint_condition): Likewise.
4794 (gdb_condition_true_at_breakpoint): Likewise.
4795
4796 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4797 (need_step_over_p): Take target-side breakpoint condition into
4798 consideration.
4799
4800 2012-02-24 Luis Machado <lgustavo@codesourcery>
4801
4802 * server.h: Include tracepoint.h.
4803 (agent_mem_read, agent_get_trace_state_variable_value,
4804 agent_set_trace_state_variable_value,
4805 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4806 get_set_tsv_func_addr): New prototypes.
4807
4808 * ax.h: New include file.
4809 * ax.c: New source file.
4810
4811 * tracepoint.c: Include ax.h.
4812 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4813 agent_expr, eval_result_type): Move to ax.h.
4814 (parse_agent_expr): Rename to ...
4815 (gdb_parse_agent_expr): ... this, make it non-static and move
4816 to ax.h.
4817 (unparse_agent_expr) Rename to ...
4818 (gdb_unparse_agent_expr): ... this, make it non-static and move
4819 to ax.h.
4820 (eval_agent_expr): Rename to ...
4821 (eval_tracepoint_agent_expr): ... this.
4822 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4823 forward declarations.
4824 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4825 (agent_get_trace_state_variable_value): New function.
4826 (agent_set_trace_state_variable_value): New function.
4827 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4828 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4829 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4830 (condition_true_at_tracepoint): Likewise.
4831 (parse_agent_expr): Rename to ...
4832 (gdb_parse_agent_expr): ... this and move to ax.c.
4833 (unparse_agent_expr): Rename to ...
4834 (gdb_unparse_agent_expr): ... this and move to ax.c.
4835 (gdb_agent_op_name): Move to ax.c.
4836 (eval_agent_expr): Rename to ...
4837 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4838 and move to ax.c.
4839 (eval_tracepoint_agent_expr): New function.
4840 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4841 non-static.
4842 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4843 ax.c.
4844 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4845 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4846 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4847 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4848 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4849 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4850 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4851 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4852 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4853 (compile_bytecodes): Remove forward declaration.
4854 (is_goto_target): Move to ax.c.
4855 (compile_bytecodes): Move to ax.c and call
4856 agent_get_trace_state_variable_value (...) and
4857 agent_set_trace_state_variable_value (...).
4858
4859 * Makefile.in: Update ax.c and IPA dependencies.
4860
4861 2012-02-24 Pedro Alves <palves@redhat.com>
4862
4863 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4864 (cmd_bigqtbuffer_circular): ... this. Only handle
4865 'QTBuffer:circular:'.
4866 (handle_tracepoint_general_set): Adjust.
4867
4868 2012-02-16 Yao Qi <yao@codesourcery.com>
4869
4870 * inferiors.c: Move code to ...
4871 * dll.c: .... here. New.
4872 * server.h: Declare clear_dlls.
4873 * Makefile.in (SFILES): Add dll.c.
4874 (OBS): Add dll.o
4875 (dll.o): New rule.
4876
4877 2012-02-11 Yao Qi <yao@codesourcery.com>
4878
4879 * server.c: (handle_monitor_command): Add a new parameter
4880 `own_buf'.
4881 (handle_query): Update caller.
4882
4883 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4884
4885 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4886 * configure, config.in: Regenerate.
4887 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4888 is not defined.
4889
4890 2012-02-02 Pedro Alves <palves@redhat.com>
4891
4892 Try SIGKILL first, then PTRACE_KILL.
4893 * linux-low.c (linux_kill_one_lwp): New.
4894 (linux_kill_one_lwp): Rename to ...
4895 (kill_one_lwp_callback): ... this. Use the new
4896 linux_kill_one_lwp.
4897
4898 2012-02-02 Pedro Alves <palves@redhat.com>
4899
4900 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4901 inferior.
4902
4903 2012-01-27 Pedro Alves <palves@redhat.com>
4904
4905 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4906 (elf_64_file_p): Make static.
4907 (linux_pid_exe_is_elf_64_file): New.
4908 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4909 Delete declarations.
4910 (linux_pid_exe_is_elf_64_file): Declare.
4911 * linux-x86-low.c (x86_arch_setup): Use
4912 linux_pid_exe_is_elf_64_file.
4913
4914 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4915
4916 * linux-low.c (linux_wait_for_event_1): Rename to ...
4917 (linux_wait_for_event): ... here and merge it with former
4918 linux_wait_for_event - new variable wait_ptid, use it.
4919 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4920
4921 2012-01-23 Pedro Alves <palves@redhat.com>
4922
4923 * server.c (main): Avoid yet another case of infinite loop while
4924 detaching/killing after a longjmp.
4925
4926 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4927
4928 Code cleanup.
4929 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4930
4931 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4932
4933 * hostio.c (handle_readlink): New function.
4934 (handle_vFile): Call it to handle "vFile:readlink" packets.
4935
4936 2012-01-20 Pedro Alves <palves@redhat.com>
4937 Ulrich Weigand <ulrich.weigand@linaro.org>
4938
4939 * server.c (handle_v_requests): Only support vAttach and vRun to
4940 start multiple processes when in extended protocol mode.
4941
4942 2012-01-17 Pedro Alves <palves@redhat.com>
4943
4944 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4945 memalign plus mprotect to allocate the scratch buffer.
4946
4947 2012-01-13 Pedro Alves <palves@redhat.com>
4948
4949 * server.c (attach_inferior): Clear `cont_thread'.
4950
4951 2012-01-13 Pedro Alves <palves@redhat.com>
4952
4953 * server.c (main): Avoid infinite loop while detaching/killing
4954 after a longjmp.
4955
4956 2012-01-09 Doug Evans <dje@google.com>
4957
4958 * server.c (start_inferior): Set last_ptid in --wrapper case.
4959
4960 2012-01-06 Yao Qi <yao@codesourcery.com>
4961
4962 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4963 defined.
4964 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4965
4966 2012-01-04 Yao Qi <yao@codesourcery.com>
4967
4968 * tracepoint.c (cmd_qtdp): Print debug message
4969 for static tracepoint.
4970
4971 2012-01-04 Yao Qi <yao@codesourcery.com>
4972
4973 * tracepoint.c (trace_vdebug): Differentiate debug message
4974 between gdbserver and IPA.
4975
4976 2012-01-03 Yao Qi <yao@codesourcery.com>
4977
4978 * tracepoint.c (tracepoint_was_hit): Don't collect for
4979 static tracepoint.
4980
4981 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4982
4983 * terminal.h: Reformat copyright header.
4984
4985 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4986
4987 * server.c (gdbserver_version): Update copyright year.
4988 * gdbreplay.c (gdbreplay_version): Likewise.
4989
4990 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4991
4992 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4993
4994 Revert:
4995 2011-12-18 Hui Zhu <teawater@gmail.com>
4996 * linux-low.c (linux_create_inferior): Save return value to ret.
4997
4998 2011-12-18 Hui Zhu <teawater@gmail.com>
4999
5000 * linux-low.c (linux_create_inferior): Save return value to ret.
5001
5002 2011-12-16 Doug Evans <dje@google.com>
5003
5004 * linux-low.c (linux_create_inferior): If stdio connection,
5005 redirect stdin from /dev/null, stdout to stderr.
5006 * remote-utils.c (remote_is_stdio): New static global.
5007 (remote_connection_is_stdio): New function.
5008 (remote_prepare): Handle stdio connection.
5009 (remote_open): Ditto.
5010 (remote_close): Don't close stdin for stdio connections.
5011 (read_prim,write_prim): New functions. Replace all calls to
5012 read/write to these.
5013 * server.c (main): Watch for "-" argument. Move call to
5014 remote_prepare before start_inferior.
5015 * server.h (STDIO_CONNECTION_NAME): New macro.
5016 (remote_connection_is_stdio): Declare.
5017
5018 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5019 in debugging output.
5020
5021 2011-12-15 Yao Qi <yao@codesourcery.com>
5022
5023 * tracepoint.c: Include sys/syscall.h.
5024 (gdb_ust_thread): Remove preprocessor conditional.
5025
5026 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5027
5028 * linux-low.c (linux_detach_one_lwp): Call
5029 the_low_target.prepare_to_resume before detaching.
5030
5031 2011-12-14 Yao Qi <yao@codesourcery.com>
5032
5033 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5034 of write.
5035
5036 2011-12-14 Yao Qi <yao@codesourcery.com>
5037
5038 * i386-low.c (i386_low_stopped_data_address): Initialize local
5039 variable `control'.
5040
5041 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5042
5043 PR remote/13492
5044
5045 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5046 DR_CONTROL unless necessary. Extend comments.
5047 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5048 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5049
5050 2011-12-13 Yao Qi <yao@codesourcery.com>
5051
5052 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5053 macros.
5054 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5055
5056 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5057
5058 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5059 Print new debug message for such case.
5060
5061 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5062
5063 Fix overlapping memcpy.
5064 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5065 the read_inferior_memory transfer.
5066 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5067 write_inferior_memory transfer.
5068 (set_fast_tracepoint_jump): New variable buf. Use it for the
5069 read_inferior_memory and write_inferior_memory transfers.
5070 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5071 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5072 Use it for the write_inferior_memory transfer.
5073 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5074 buffers.
5075
5076 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5077
5078 * linux-low.c (fetch_register, store_register): Make code
5079 consistent, fix formatting.
5080
5081 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5082
5083 * linux-low.c (usr_store_inferior_registers): Factor out code
5084 to handle individual registers into...
5085 (store_register): ... this new function.
5086
5087 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5088
5089 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5090 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5091 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5092 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5093 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5094 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5095 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5096 (srv_xmlfiles): Add new XML files.
5097
5098 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5099 and <sys/uio.h>.
5100 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5101 (init_registers_s390_linux32v1): Add prototype.
5102 (init_registers_s390_linux32v2): Likewise.
5103 (init_registers_s390_linux64v1): Likewise.
5104 (init_registers_s390_linux64v2): Likewise.
5105 (init_registers_s390x_linux64v1): Likewise.
5106 (init_registers_s390x_linux64v2): Likewise.
5107 (s390_num_regs): Increment to 52.
5108 (s390_regmap): Add orig_r2 register.
5109 (s390_num_regs_3264): Increment to 68.
5110 (s390_regmap_3264): Add orig_r2 register.
5111 (s390_collect_ptrace_register): Handle orig_r2 register.
5112 (s390_supply_ptrace_register): Likewise.
5113 (s390_fill_last_break): New function.
5114 (s390_store_last_break): Likewise.
5115 (s390_fill_system_call): New function.
5116 (s390_store_system_call): Likewise.
5117 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5118 register sets.
5119 (s390_check_regset): New function.
5120 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5121 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5122 Update target_regsets for available register sets.
5123
5124 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5125 Jan Kratochvil <jan.kratochvil@redhat.com>
5126
5127 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5128 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5129 New.
5130 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5131 * linux-low.h (struct process_info_private): New member r_debug.
5132 * server.c (handle_qxfer_libraries): Call
5133 the_target->qxfer_libraries_svr4.
5134 (handle_qxfer_libraries_svr4): New function.
5135 (qxfer_packets): New entry "libraries-svr4".
5136 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5137 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5138 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5139 PACKET_qXfer_libraries_svr4.
5140
5141 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5142
5143 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5144 PSW address/mask between 8-byte and 16-byte formats.
5145 (s390_supply_ptrace_register): Likewise.
5146 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5147 basic addressing mode bit.
5148
5149 2011-11-24 Stan Shebs <stan@codesourcery.com>
5150
5151 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5152
5153 2011-11-17 Stan Shebs <stan@codesourcery.com>
5154
5155 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5156 (tracing_start_time): New global.
5157 (tracing_stop_time): New global.
5158 (tracing_user_name): New global.
5159 (tracing_notes): New global.
5160 (tracing_stop_note): New global.
5161 (cmd_qtstart): Set traceframe_usage, start_time.
5162 (stop_tracing): Set stop_time.
5163 (cmd_qtstatus): Report additional status.
5164 (cmd_qtp): New function.
5165 (handle_tracepoint_query): Call it.
5166 (cmd_qtnotes): New function.
5167 (handle_tracepoint_general_set): Call it.
5168 (get_timestamp): Rename from tsv_get_timestamp.
5169
5170 2011-11-14 Stan Shebs <stan@codesourcery.com>
5171 Kwok Cheung Yeung <kcy@codesourcery.com>
5172
5173 * linux-x86-low.c (small_jump_insn): New.
5174 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5175 trampoline and error message, build a trampoline and issue a small
5176 jump instruction to it.
5177 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5178 trampoline and error message.
5179 (x86_get_min_fast_tracepoint_insn_len): New.
5180 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5181 * linux-low.h (struct linux_target_ops): Add arguments to
5182 install_fast_tracepoint_jump_pad operation, add new operation.
5183 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5184 arguments.
5185 (linux_get_min_fast_tracepoint_insn_len): New function.
5186 (linux_target_op): Add new operation.
5187 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5188 (gdb_trampoline_buffer_end): Ditto.
5189 (gdb_trampoline_buffer_error): Ditto.
5190 (struct ipa_sym_addresses): Add fields for new IPA variables.
5191 (symbol_list): Add entries for new IPA variables.
5192 (struct tracepoint): Add fields to hold the address range of the
5193 trampoline used by the tracepoint.
5194 (trampoline_buffer_head): New static variable.
5195 (trampoline_buffer_tail): Ditto.
5196 (claim_trampoline_space): New function.
5197 (have_fast_tracepoint_trampoline_buffer): New function.
5198 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5199 structure.
5200 (install_fast_tracepoint): Ditto, also add error buffer argument.
5201 (cmd_qtminftpilen): New function.
5202 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5203 (fast_tracepoint_from_trampoline_address): New function.
5204 (fast_tracepoint_collecting): Handle trampoline as part of jump
5205 pad space.
5206 (set_trampoline_buffer_space): New function.
5207 (initialize_tracepoint): Initialize new IPA variables.
5208 * target.h (struct target_ops): Add arguments to
5209 install_fast_tracepoint_jump_pad operation, add new
5210 get_min_fast_tracepoint_insn_len operation.
5211 (target_get_min_fast_tracepoint_insn_len): New.
5212 (install_fast_tracepoint_jump_pad): Add arguments.
5213 * server.h (IPA_BUFSIZ): Define.
5214 * linux-i386-ipa.c: Include extra header files.
5215 (initialize_fast_tracepoint_trampoline_buffer): New function.
5216 (initialize_low_tracepoint): Call it.
5217 * server.h (set_trampoline_buffer_space): Declare.
5218 (claim_trampoline_space): Ditto.
5219 (have_fast_tracepoint_trampoline_buffer): Ditto.
5220
5221 2011-11-14 Yao Qi <yao@codesourcery.com>
5222
5223 * server.c (handle_query): Handle InstallInTrace for qSupported.
5224 * tracepoint.c (add_tracepoint): Sort list.
5225 (install_tracepoint, download_tracepoint): New.
5226 (cmd_qtdp): Call them to install and download tracepoints.
5227 (sort_tracepoints): Removed.
5228 (cmd_qtstart): Update.
5229
5230 2011-11-14 Yao Qi <yao@codesourcery.com>
5231
5232 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5233 * mem-break.h: Declare.
5234 * tracepoint.c (cmd_qtstart): Move some code to ...
5235 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5236 New.
5237 (download_tracepoints): Move some code to ...
5238 (download_tracepoint_1): ... here. New.
5239
5240 2011-11-08 Yao Qi <yao@codesourcery.com>
5241
5242 * remote-utils.c (relocate_instruction): A comment fix.
5243
5244 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5245
5246 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5247 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5248 dr_status_mirror and dr_control_mirror from debug_reg_state.
5249 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5250 (i386_initial_stuff): Remove use of deleted globals.
5251 (i386_get_thread_context, i386_set_thread_context,
5252 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5253 from debug_reg_state.
5254
5255 2011-11-05 Yao Qi <yao@codesourcery.com>
5256
5257 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5258 address as TPOINT's.
5259
5260 2011-11-02 Stan Shebs <stan@codesourcery.com>
5261
5262 * tracepoint.c (agent_mem_read_string): New function.
5263 (eval_agent_expr): Call it for tracenz.
5264 * server.c (handle_query): Report support for tracenz.
5265
5266 2011-11-02 Yao Qi <yao@codesourcery.com>
5267
5268 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5269
5270 2011-11-02 Yao Qi <yao@codesourcery.com>
5271
5272 * target.h: Fix a typo in comment.
5273
5274 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5275
5276 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5277 clobber the breakpoints' shadows with fast tracepoint jumps.
5278 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5279 * target.c (write_inferior_memory): Also pass MYADDR down to
5280 check_mem_write.
5281
5282 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5283
5284 * configure.ac: Check support for personality routine.
5285 * configure: Regenerate.
5286 * config.in: Likewise.
5287 * linux-low.c: Include <sys/personality.h>.
5288 Define ADDR_NO_RANDOMIZE if necessary.
5289 (linux_create_inferior): Disable address space randomization when
5290 forking inferior, if requested.
5291 (linux_supports_disable_randomization): New function.
5292 (linux_target_ops): Install it.
5293 * server.h (disable_randomization): Declare.
5294 * server.c (disable_randomization): New global variable.
5295 (handle_general_set): Handle QDisableRandomization.
5296 (handle_query): Likewise for qSupported.
5297 (main): Support --disable-randomization and --no-disable-randomization
5298 command line arguments.
5299 * target.h (struct target_ops): Add supports_disable_randomization.
5300 (target_supports_disable_randomization): New macro.
5301
5302 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5303
5304 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5305 ifdef check.
5306 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5307 [!PT_GETDSBT] (target_loadmap): New definition.
5308 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5309 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5310 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5311 and PT_GETDSBT to LINUX_LOADMAP.
5312 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5313 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5314
5315 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5316
5317 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5318 (arm_linux_hwbp_cap): New static variable.
5319 (arm_linux_get_hwbp_cap): Replace by ...
5320 (arm_linux_init_hwbp_cap): ... this new function.
5321 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5322 (arm_linux_get_hw_watchpoint_count): Likewise.
5323 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5324 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5325 (arm_prepare_to_resume): Use perror_with_name instead of error.
5326
5327 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5328
5329 * linux-arm-low.c: Include <signal.h>.
5330 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5331 (struct arm_linux_hwbp_cap): New data type.
5332 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5333 (struct arm_linux_hw_breakpoint): New data type.
5334 (MAX_BPTS, MAX_WPTS): Define.
5335 (struct arch_process_info, struct arch_lwp_info): New data types.
5336 (arm_linux_get_hwbp_cap): New function.
5337 (arm_linux_get_hw_breakpoint_count): Likewise.
5338 (arm_linux_get_hw_watchpoint_count): Likewise.
5339 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5340 (arm_hwbp_control_initialize): Likewise.
5341 (arm_hwbp_control_is_enabled): Likewise.
5342 (arm_hwbp_control_is_initialized): Likewise.
5343 (arm_hwbp_control_disable): Likewise.
5344 (arm_linux_hw_breakpoint_equal): Likewise.
5345 (arm_linux_hw_point_initialize): Likewise.
5346 (struct update_registers_data): New data structure.
5347 (update_registers_callback: New function.
5348 (arm_insert_point): Likewise.
5349 (arm_remove_point): Likewise.
5350 (arm_stopped_by_watchpoint): Likewise.
5351 (arm_stopped_data_address): Likewise.
5352 (arm_new_process): Likewise.
5353 (arm_new_thread): Likewise.
5354 (arm_prepare_to_resume): Likewise.
5355 (the_low_target): Register arm_insert_point, arm_remove_point,
5356 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5357 arm_new_thread, and arm_prepare_to_resume.
5358
5359 2011-09-15 Stan Shebs <stan@codesourcery.com>
5360
5361 * server.h (struct emit_ops): Add compare-goto fields.
5362 * tracepoint.c (gdb_agent_op_sizes): New table.
5363 (emit_eq_goto): New function.
5364 (emit_ne_goto): New function.
5365 (emit_lt_goto): New function.
5366 (emit_le_goto): New function.
5367 (emit_gt_goto): New function.
5368 (emit_ge_goto): New function.
5369 (is_goto_target): New function.
5370 (compile_bytecodes): Recognize special cases of compare-goto
5371 combinations and call specialized emitters for them.
5372 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5373 (amd64_emit_ne_goto): New function.
5374 (amd64_emit_lt_goto): New function.
5375 (amd64_emit_le_goto): New function.
5376 (amd64_emit_gt_goto): New function.
5377 (amd64_emit_ge_goto): New function.
5378 (amd64_emit_ops): Add the new functions.
5379 (i386_emit_eq_goto): New function.
5380 (i386_emit_ne_goto): New function.
5381 (i386_emit_lt_goto): New function.
5382 (i386_emit_le_goto): New function.
5383 (i386_emit_gt_goto): New function.
5384 (i386_emit_ge_goto): New function.
5385 (i386_emit_ops): Add the new functions.
5386
5387 2011-09-08 Stan Shebs <stan@codesourcery.com>
5388
5389 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5390 (i386_emit_epilogue): Restore %ebx.
5391
5392 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5393
5394 * server.c (step_thread): Remove definition.
5395 (process_serial_event): Don't handle Hs.
5396 * server.h (step_thread): Remove declaration.
5397 * target.c (set_desired_inferior): Remove use of step_thread.
5398
5399 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5400
5401 * linux-low.c: Include linux-procfs.h.
5402 (linux_attach_lwp_1): Update comments.
5403 (linux_attach): Scan for existing threads when attaching to a
5404 process that is the tgid.
5405 * Makefile.in: Update dependencies.
5406
5407 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5408
5409 * configure.srv: Add linux-procfs.o dependencies.
5410
5411 2011-08-14 Yao Qi <yao@codesourcery.com>
5412
5413 * target.h (struct target_ops): Fix indent.
5414 * win32-low.c (win32_target_ops): Fix comment.
5415
5416 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5417 Yao Qi <yao@codesourcery.com>
5418
5419 * Makefile.in (clean): Remove tic6x-*.c files.
5420 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5421 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5422 (tic6x-c64xp-linux.c): Likewise.
5423 * configure.srv: Add support for tic6x-*-uclinux.
5424 * linux-tic6x-low.c: New.
5425 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5426
5427 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5428 Yao Qi <yao@codesourcery.com>
5429
5430 * target.h (struct target_ops): Add read_loadmap.
5431 * linux-low.c (struct target_loadseg): New type.
5432 (struct target_loadmap): New type.
5433 (linux_read_loadmap): New function.
5434 (linux_target_ops): Add linux_read_loadmap.
5435 * server.c (handle_query): Support qXfer:fdpic:read packet.
5436 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5437 to NULL.
5438
5439 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5440
5441 * win32-low.c: Include <stdint.h>.
5442
5443 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5444
5445 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5446 to the inferior here.
5447 (i386_remove_aligned_watchpoint): Ditto.
5448 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5449 fit part of the watchpoint in the debug registers.
5450 (i386_update_inferior_debug_regs): New.
5451 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5452 registers, and only update the inferior on success.
5453 (i386_low_remove_watchpoint): Ditto.
5454
5455 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5456
5457 * linux-low.c (compare_ints, unique, list_threads, show_process,
5458 linux_core_of_thread): Delete.
5459 (linux_target_ops): Change linux_core_of_thread to
5460 linux_common_core_of_thread.
5461 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5462 * utils.c (malloc_failure): Change type of argument.
5463 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5464 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5465 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5466 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5467 (IPA_OBJS): Add common-utils-ipa.o.
5468 (ptid_h, linux_osdata_h): New macros.
5469 (server_h): Add common/common-utils.h, common/xml-utils.h,
5470 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5471 common/ptid.h.
5472 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5473 ptid.o, buffer.o): New rules.
5474 (linux-low.o): Add common/linux-osdata.h as a dependency.
5475 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5476 * configure.ac: Add AC_HEADER_DIRENT check.
5477 * config.in: Regenerate.
5478 * configure: Regenerate.
5479 * remote-utils.c (xml_escape_text): Delete.
5480 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5481 buffer_xml_printf): Move to common/buffer.c.
5482 * server.c (main): Remove call to initialize_inferiors.
5483 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5484 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5485 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5486 internal_error, gdb_assert, gdb_assert_fail): Delete.
5487 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5488 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5489 common/buffer.h.
5490 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5491 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5492 initialize_inferiors): Delete.
5493
5494 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5495
5496 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5497 symbol error.
5498
5499 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5500
5501 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5502 assertion.
5503 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5504
5505 2011-05-26 Yao Qi <yao@codesourcery.com>
5506
5507 * Makefile.in (thread-db.o): Track dependence to
5508 common/gdb_thread_db.h.
5509 * thread-db.c: include gdb_thread_db.h from right place.
5510
5511 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5512
5513 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5514 __FILE__ and __LINE__ to internal_error.
5515
5516 2011-05-13 Doug Evans <dje@google.com>
5517
5518 * thread-db.c (try_thread_db_load_from_sdir): New function.
5519 (try_thread_db_load_from_dir): New function.
5520 (thread_db_load_search): Handle $sdir, ignore $pdir.
5521 Remove trying of system directories if search of
5522 libthread-db-search-path fails, that is now done via $sdir.
5523
5524 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5525
5526 * server.c (handle_query): Add EnableDisableTracepoints to the list
5527 of supported features.
5528 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5529 tracepoints.
5530 (cmd_qtenable_disable): New.
5531 (cmd_qtstart): Install tracepoints even if disabled.
5532 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5533 receiving a QTEnable or QTDisable packet.
5534 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5535 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5536 tracepoints.
5537 (gdb_probe): Skip data collection if static tracepoint is disabled.
5538
5539 2011-05-10 Doug Evans <dje@google.com>
5540
5541 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5542
5543 2011-05-04 Doug Evans <dje@google.com>
5544
5545 * linux-low.c (linux_join): Skip process lookup.
5546 * spu-low.c (spu_join): Ditto.
5547 * server.c (join_inferiors_callback): Delete.
5548 (process_serial_event): For 'D' packet (detach) call join_inferior
5549 directly.
5550
5551 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5552
5553 * README: Don't mention xscale*-*-linux*.
5554 * configure.srv (xscale*-*-linux*): Don't handle target.
5555
5556 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5557
5558 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5559 casting pointers.
5560 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5561 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5562 (i386_emit_void_call_2): Likewise.
5563
5564 2011-04-26 Yao Qi <yao@codesourcery.com>
5565
5566 * linux-low.c: Move common macros to linux-ptrace.h.
5567 Include linux-ptrace.h.
5568 * Makefile.in (linux_ptrace_h): New.
5569 (linux-low.o): Depends on linux-ptrace.h.
5570
5571 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5572
5573 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5574 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5575 (remote_prepare): New function with most of the TCP code from ...
5576 (remote_open): ... here. Detect PORT here unconditionally. Move also
5577 setting transport_is_reliable.
5578 * server.c (run_once): New variable.
5579 (gdbserver_usage): Document it.
5580 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5581 the first run if RUN_ONCE.
5582 * server.h (run_once, remote_prepare): New declarations.
5583
5584 2011-04-19 Tom Tromey <tromey@redhat.com>
5585
5586 * win32-low.c (handle_load_dll): Remove duplicate "the".
5587
5588 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5589
5590 Remove support for old Cygwin 1.5 versions.
5591 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5592 function to avoid warning.
5593 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5594 warning.
5595
5596 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5597
5598 * gdbserver/server.h (Macro _): Define it if not available.
5599
5600 2011-03-14 Michael Snyder <msnyder@vmware.com>
5601
5602 * hostio.c (handle_close): Remove unnecessary null test.
5603
5604 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5605
5606 * Makefile.in (maintainer-clean realclean distclean): Remove
5607 "make ... subdir_do" command.
5608
5609 2011-03-10 Michael Snyder <msnyder@vmware.com>
5610
5611 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5612
5613 * server.c (handle_v_run): Free alloced buffer on early return.
5614
5615 2011-03-09 Yao Qi <yao@codesourcery.com>
5616
5617 Revert:
5618 2011-03-04 Yao Qi <yao@codesourcery.com>
5619
5620 * Makefile.in: Remove GNU make feature --directory.
5621
5622 2011-03-05 Yao Qi <yao@codesourcery.com>
5623
5624 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5625 (subdir_do): New make target. Copied from gdb/Makefile.
5626 (maintainer-clean, realclean, distclean, clean): Call corresponding
5627 make targets in common/Makefile.
5628
5629 2011-02-11 Yao Qi <yao@codesourcery.com>
5630
5631 * configure.ac: Call AC_PROG_RANLIB.
5632 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5633 * configure: Regenerate.
5634
5635 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5636
5637 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5638
5639 2011-03-06 Yao Qi <yao@codesourcery.com>
5640
5641 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5642
5643 2011-03-05 Yao Qi <yao@codesourcery.com>
5644
5645 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5646 (subdir_do): New make target. Copied from gdb/Makefile.
5647 (maintainer-clean, realclean, distclean, clean): Call corresponding
5648 make targets in common/Makefile.
5649
5650 2011-03-04 Yao Qi <yao@codesourcery.com>
5651
5652 * Makefile.in: Remove GNU make feature --directory.
5653
5654 2011-03-04 Michael Snyder <msnyder@vmware.com>
5655
5656 * server.c (queue_stop_reply): Call xmalloc not malloc.
5657
5658 2011-03-02 Michael Snyder <msnyder@vmware.com>
5659
5660 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5661
5662 2011-02-28 Michael Snyder <msnyder@vmware.com>
5663
5664 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5665 (cmd_qtframe): Ditto.
5666 (cmd_qtbuffer): Ditto.
5667 (cmd_bigqtbuffer): Ditto.
5668
5669 * utils.c (decimal2str): Initialize 'width' to nine, then
5670 don't mess with it.
5671
5672 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5673
5674 * hostio.c (require_data): Free *data, not data.
5675
5676 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5677
5678 * hostio.c (require_data): Use free, not xfree.
5679
5680 2011-02-27 Michael Snyder <msnyder@vmware.com>
5681
5682 * server.c (handle_query): Discard unused value.
5683
5684 * hostio.c (require_data): Free malloc memory before returning
5685 error.
5686
5687 2011-02-26 Michael Snyder <msnyder@vmware.com>
5688
5689 * linux-low.c (list_threads): Call closedir for dirent.
5690
5691 2011-02-27 Michael Snyder <msnyder@vmware.com>
5692
5693 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5694 a case statement falls through.
5695
5696 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5697
5698 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5699 in comparison.
5700
5701 2011-02-26 Michael Snyder <msnyder@vmware.com>
5702
5703 * utils.c (decimal2str): Eliminate dead code and dead param.
5704 (pulongest): Drop dead param from call to decimal2str.
5705 (plongest): Ditto.
5706
5707 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5708
5709 Revert the following patch (not approved yet):
5710 2011-02-21 Hui Zhu <teawater@gmail.com>
5711 * tracepoint.c (tp_printf): New function.
5712 (eval_agent_expr): Handle gdb_agent_op_printf.
5713
5714 2011-02-21 Hui Zhu <teawater@gmail.com>
5715
5716 * tracepoint.c (tp_printf): New function.
5717 (eval_agent_expr): Handle gdb_agent_op_printf.
5718
5719 2011-02-18 Tom Tromey <tromey@redhat.com>
5720
5721 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5722 (tracepoint.o): Likewise.
5723 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5724 (gdb_agent_op_names): Likewise.
5725
5726 2011-02-18 Tom Tromey <tromey@redhat.com>
5727
5728 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5729 gdb_agent_op_rot>: New constants.
5730 (gdb_agent_op_names): Add pick and roll.
5731 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5732 cases.
5733
5734 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5735
5736 * aclocal.m4: Regenerated with aclocal-1.11.1.
5737
5738 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5739
5740 * server.c (handle_qxfer_traceframe_info): New.
5741 (qxfer_packets): Register "traceframe-info".
5742 (handle_query): Report support for qXfer:traceframe-info:read+.
5743 * tracepoint.c (match_blocktype): New.
5744 (traceframe_find_block_type): Rename to ...
5745 (traceframe_walk_blocks): ... this. Add callback filter argument,
5746 and use it.
5747 (traceframe_find_block_type): New, reimplemented on top of
5748 traceframe_walk_blocks.
5749 (build_traceframe_info_xml): New.
5750 (traceframe_read_info): New.
5751 * server.h (traceframe_read_info): Declare.
5752
5753 2011-02-11 Yao Qi <yao@codesourcery.com>
5754
5755 * configure.ac: Call AC_PROG_RANLIB.
5756 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5757 * configure: Regenerate.
5758
5759 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5760
5761 * server.c (gdb_read_memory): Change return semantics to allow
5762 partial transfers.
5763 (handle_search_memory_1): Adjust.
5764 (process_serial_event) <'m' packet>: Handle partial transfers.
5765 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5766
5767 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5768
5769 * regcache.c (init_register_cache): Initialize
5770 regcache->register_status.
5771 (free_register_cache): Release regcache->register_status.
5772 (regcache_cpy): Copy register_status.
5773 (registers_to_string): Print 'x's for unavailable registers.
5774 (supply_register): Mark the register's status valid or
5775 unavailable, depending on whether a buffer was passed in or not.
5776 (supply_register_zeroed): New.
5777 (supply_regblock): Mark the registers' status valid or
5778 unavailable, depending on whether a buffer was passed in or not.
5779 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5780 (struct regcache): New `register_status' field.
5781 (supply_register_zeroed): Declare.
5782 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5783 supply_register_zeroed, rather than passing a NULL buffer to
5784 supply_register.
5785 * tracepoint.c (fetch_traceframe_registers): Update comment.
5786
5787 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5788
5789 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5790 buffer explicit.
5791
5792 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5793
5794 * server.h (decode_xfer_write): Change prototype.
5795 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5796 and don't extract the annex here.
5797 * server.c (decode_xfer_read): Remove `annex' parameter,
5798 and don't extract the annex here.
5799 (decode_xfer): New.
5800 (struct qxfer): New.
5801 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5802 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5803 (handle_qxfer_statictrace): New functions, abstracted out from
5804 handle_query, and made to use the struct qxfer interface.
5805 (handle_threads_qxfer_proper): Rename to ...
5806 (handle_qxfer_threads_proper): ... this.
5807 (handle_threads_qxfer): Rename to ...
5808 (handle_qxfer_threads): ... this. Adjust.
5809 (qxfer_packets): New array.
5810 (handle_qxfer): New function.
5811 (handle_query): Use handle_qxfer.
5812
5813 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5814
5815 * gdbreplay.c: Shorten lines of >= 80 columns.
5816 * linux-low.c: Ditto.
5817 * linux-ppc-low.c: Ditto.
5818 * linux-s390-low.c: Ditto.
5819 * linux-sparc-low.c: Ditto.
5820 * linux-x86-low.c: Ditto.
5821 * linux-xtensa-low.c: Ditto.
5822 * mem-break.c: Ditto.
5823 * nto-low.c: Ditto.
5824 * regcache.h: Ditto.
5825 * remote-utils.c: Ditto.
5826 * server.c: Ditto.
5827 * server.h: Ditto.
5828 * thread-db.c: Ditto.
5829 * tracepoint.c: Ditto.
5830 * utils.c: Ditto.
5831 * win32-low.h: Ditto.
5832
5833 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5834
5835 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5836 update.
5837
5838 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5839
5840 * server.c (gdbserver_version): Update copyright year in version
5841 output.
5842 * gdbreplay.c (gdbreplay_version): Ditto.
5843
5844 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5845
5846 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5847 * linux-bfin-low.c: New file.
5848 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5849 PT_DATA_ADDR for BFIN targets.
5850 * Makefile.in (SFILES): Add linux-bfin-low.c.
5851 (clean): Remove reg-bfin.c.
5852 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5853 * README: Mention supported Blackfin targets.
5854
5855 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5856
5857 * .gitignore: New file.
5858
5859 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5860
5861 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5862
5863 2010-10-22 Jie Zhang <jie@codesourcery.com>
5864
5865 * Makefile.in: Add FLAGS_TO_PASS variable.
5866 (install): Remove dependency of install-only and recursively
5867 invoke make for install-only.
5868
5869 2010-10-04 Doug Evans <dje@google.com>
5870
5871 * Makefile.in (uninstall): Use $(DESTDIR).
5872
5873 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5874
5875 PR gdb/11842
5876
5877 * linux-x86-low.c (compat_siginfo_from_siginfo)
5878 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5879 si_code is < 0. Check for si_code == SI_TIMER before checking for
5880 si_code < 0.
5881
5882 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5883
5884 * lynx-i386-low.c: New file.
5885 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5886
5887 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5888
5889 * lynx-low.c (ptrace_request_to_str): Remove handling for
5890 request values that have been removed in LynxOS 5.x.
5891
5892 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5893
5894 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5895 <ptrace.h>
5896
5897 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5898
5899 * configure.ac: Add --enable-inprocess-agent option.
5900 * configure: Rebuilt.
5901
5902 2010-09-06 Yao Qi <yao@codesourcery.com>
5903
5904 * linux-low.c (linux_kill): Remove unused variable.
5905 (linux_stabilize_threads): Likewise.
5906 * server.c (start_inferior): Likewise.
5907 (queue_stop_reply_callback): Likewise.
5908 * tracepoint.c (do_action_at_tracepoint): Likewise.
5909
5910 2010-09-06 Yao Qi <yao@codesourcery.com>
5911
5912 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5913 on return.
5914
5915 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5916
5917 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5918
5919 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5920
5921 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5922 "$(IPA_DEPFILES)".
5923
5924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5925
5926 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5927 gdbserver/lynx-ppc-low.c: New files.
5928 * Makefile.in (lynx_low_h): New variable.
5929 (lynx-low.o, lynx-ppc-low.o): New rules.
5930 * configure.ac: On LynxOS, link with -lnetinet.
5931 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5932 * configure: regenerate.
5933
5934 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5935
5936 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5937 * configure.ac: Add check for vasprintf and vsnprintf.
5938 * configure, config.in: Regenerate.
5939 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5940
5941 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5942
5943 * gdbreplay.c: Move include of alloca.h up, next to include of
5944 malloc.h.
5945 * server.h: Add include of malloc.h.
5946 * mem-break.c: Remove include of malloc.h.
5947 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5948
5949 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5950
5951 * Makefile.in (memmem.o): Build with -Wno-error.
5952
5953 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5954
5955 * utils.c (xsnprintf): Make non-static.
5956 * server.h: Add xsnprintf declaration.
5957 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5958 replace calls to snprintf by calls to xsnprintf throughout.
5959
5960 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5961
5962 * configure.ac: Add configure check for alloca.
5963 * configure, config.in: Regenerate.
5964 * server.h: Include alloca.h if it exists.
5965 * gdbreplay.c: Include alloca.h if it exists.
5966
5967 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5968
5969 * linux-low.c (__SIGRTMIN): Define if not already defined.
5970 (linux_create_inferior): Check for __ANDROID__ rather than
5971 __SIGRTMIN.
5972 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5973 are already deferred.
5974 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5975 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5976 stopped and already has a pending signal to report.
5977 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5978 a pending signal to report or is moving out of a jump pad.
5979 (linux_init_signals): Check for __ANDROID__ rather than
5980 __SIGRTMIN.
5981
5982 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5983
5984 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5985 debug_threads check. Avoid a linear search when not doing debug
5986 output.
5987
5988 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5989
5990 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5991 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5992 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5993 (process_event): Change local fd's type to gdb_fildes_t.
5994 (create_file_handler): Adjust prototype.
5995 (delete_file_handler): Adjust prototype.
5996 (handle_file_event): Adjust prototype. Use pfildes.
5997 (create_file_event): Adjsut prototype.
5998 * remote-utils.c (remote_desc, listen_desc): Change type to
5999 gdb_fildes_t.
6000 * server.h: New gdb_fildes_t typedef.
6001 [USE_WIN32API]: Include winsock2.h.
6002 (delete_file_handler, add_file_handler): Adjust prototypes.
6003 (pfildes): Declare.
6004 * utils.c (pfildes): New.
6005
6006 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6007
6008 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6009 * configure: Regenerate.
6010
6011 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6012
6013 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6014 (linux_done_accessing_memory): ... this.
6015 (linux_target_ops): Adjust.
6016 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6017 * nto-low.c (nto_target_ops): Adjust comment.
6018 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6019 * spu-low.c (spu_target_ops): Adjust comment.
6020 * target.h (target_ops): Rename unprepare_to_access_memory field
6021 to done_accessing_memory.
6022 (unprepare_to_access_memory): Rename to ...
6023 (done_accessing_memory): ... this.
6024
6025 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6026
6027 * linux-low.c (linux_prepare_to_access_memory): New.
6028 (linux_unprepare_to_access_memory): New.
6029 (linux_target_ops): Install them.
6030 * server.c (read_memory): Rename to ...
6031 (gdb_read_memory): ... this. Use
6032 prepare_to_access_memory/prepare_to_access_memory.
6033 (write_memory): Rename to ...
6034 (gdb_write_memory): ... this. Use
6035 prepare_to_access_memory/prepare_to_access_memory.
6036 (handle_search_memory_1): Adjust.
6037 (process_serial_event): Adjust.
6038 * target.h (struct target_ops): New fields
6039 prepare_to_access_memory and unprepare_to_access_memory.
6040 (prepare_to_access_memory, unprepare_to_access_memory): New.
6041 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6042 prepare_to_access_memory/prepare_to_access_memory.
6043 * nto-low.c (nto_target_ops): Adjust.
6044 * spu-low.c (spu_target_ops): Adjust.
6045 * win32-low.c (win32_target_ops): Adjust.
6046
6047 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6048
6049 * Makefile.in (WARN_CFLAGS): Get it from configure.
6050 (WERROR_CFLAGS): New.
6051 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6052 * configure.ac: Introduce --enable-werror, which adds -Werror to
6053 the compiler command line. Enabled by default. Disable with
6054 --disable-werror. Add -Wdeclaration-after-statement
6055 Wpointer-arith and -Wformat-nonliteral to warning flags.
6056 * configure: Regenerate.
6057
6058 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6059
6060 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6061
6062 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6063
6064 * gdbreplay.c (remote_error): New.
6065 (gdbchar): New.
6066 (expect): Use gdbchar. Check for error reading from GDB.
6067 Clarify sync error output.
6068 (play): Check for errors writing to GDB.
6069 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6070 * remote-utils.c (getpkt): Check for errors writing to the remote
6071 descriptor.
6072
6073 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6074
6075 * linux-low.c (linux_wait_1): Move non-debugging code out of
6076 `debug_threads' control.
6077
6078 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6079
6080 * linux-low.c (linux_wait_1): Don't set last_status here.
6081 * server.c (push_event, queue_stop_reply_callback): Assert we're
6082 not pushing a TARGET_WAITKIND_IGNORE event.
6083 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6084 (myresume, handle_target_event): Set the thread's last_resume_kind
6085 and last_status from the target returned status.
6086
6087 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6088
6089 PR threads/10729
6090
6091 * linux-x86-low.c (update_debug_registers_callback): New.
6092 (i386_dr_low_set_addr): Use it.
6093 (i386_dr_low_get_addr): New.
6094 (i386_dr_low_set_control): Use update_debug_registers_callback.
6095 (i386_dr_low_get_control): New.
6096 (i386_dr_low_get_status): Adjust.
6097 * linux-low.c (linux_stop_lwp): New.
6098 * linux-low.h (linux_stop_lwp): Declare.
6099
6100 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6101 argument instead of a i386_debug_reg_state.
6102 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6103 a i386_debug_reg_state.
6104 (i386_insert_aligned_watchpoint): Adjust.
6105 (i386_remove_aligned_watchpoint): Adjust.
6106 (i386_low_stopped_data_address): Read the debug registers from the
6107 inferior instead of from the mirrors.
6108 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6109 (i386_dr_low_get_addr): Declare.
6110 (i386_dr_low_get_control): Declare.
6111 (i386_dr_low_get_status): Change prototype.
6112
6113 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6114 (i386_dr_low_get_addr): New.
6115 (i386_dr_low_get_control): New.
6116 (i386_dr_low_get_status): Adjust prototype. Return
6117 dr_status_mirror.
6118 (i386_initial_stuff): Clear dr_status_mirror and
6119 dr_control_mirror.
6120 (i386_get_thread_context): Adjust.
6121 (i386_set_thread_context): Adjust.
6122 (i386_thread_added): Adjust.
6123
6124 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6125
6126 * linux-low.h (linux_thread_area): Delete declaration.
6127
6128 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6129
6130 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6131 after its termination.
6132
6133 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6134
6135 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6136 (gdb_wants_all_stopped): Delete.
6137 (linux_wait_1): Don't call them.
6138 * server.c (handle_v_cont): Tag all threads as want-stopped.
6139 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6140 stopped as "client-wants-stopped".
6141
6142 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6143
6144 * Makefile.in (signals_h): New.
6145 (server_h): Depend on it.
6146 (server.o): Don't depend on $(signals_def).
6147 (signals.o): Depend on $(signals_def).
6148
6149 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6150
6151 * Makefile.in (signals_def): New.
6152 (server_h): Append include/gdb/signals.h and signals_def.
6153 (server.o): Append signals_def.
6154
6155 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6156
6157 * server.c (handle_target_event): Use target_signal_to_host for
6158 resume_info.sig initialization.
6159 * target.h (struct thread_resume) <sig>: New comment.
6160
6161 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6162
6163 * server.c (handle_query): strcpy() the returned string from paddress()
6164 instead of sprintf().
6165 * utils.c (paddress): Return phex_nz().
6166
6167 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6168
6169 * server.c (handle_v_cont): Call mourn_inferior if process
6170 just exited.
6171 (myresume): Likewise.
6172
6173 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6174
6175 Static tracepoints, and integration with UST.
6176
6177 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6178 * mem-break.c (uninsert_all_breakpoints)
6179 (reinsert_all_breakpoints): New.
6180 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6181 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6182 (gdb_agent_ust_loaded, helper_thread_id)
6183 (gdb_agent_helper_thread_id): New macros.
6184 (struct ipa_sym_addresses): Add addr_ust_loaded,
6185 addr_helper_thread_id, addr_cmd_buf.
6186 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6187 (in_process_agent_loaded_ust): New.
6188 (write_e_ust_not_loaded): New.
6189 (maybe_write_ipa_ust_not_loaded): New.
6190 (struct collect_static_trace_data_action): New.
6191 (enum tracepoint_type) <static_tracepoint>: New.
6192 (struct tracepoint) <handle>: Mention static tracepoints.
6193 (struct static_tracepoint_ctx): New.
6194 (CMD_BUF_SIZE): New.
6195 (add_tracepoint_action): Handle static tracepoint actions.
6196 (unprobe_marker_at): New.
6197 (clear_installed_tracepoints): Handle static tracepoints.
6198 (cmd_qtdp): Handle static tracepoints.
6199 (probe_marker_at): New.
6200 (cmd_qtstart): Handle static tracepoints.
6201 (response_tracepoint): Handle static tracepoints.
6202 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6203 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6204 (get_context_regcache): Handle static tracepoints.
6205 (do_action_at_tracepoint): Handle static tracepoint actions.
6206 (traceframe_find_block_type): Handle static trace data blocks.
6207 (traceframe_read_sdata): New.
6208 (download_tracepoints): Download static tracepoint actions.
6209 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6210 (GDB_PROBE_NAME): New.
6211 (ust_ops): New.
6212 (GET_UST_SYM): New.
6213 (USTF): New.
6214 (dlsym_ust): New.
6215 (ust_marker_to_static_tracepoint): New.
6216 (gdb_probe): New.
6217 (collect_ust_data_at_tracepoint): New.
6218 (gdb_ust_probe): New.
6219 (UNIX_PATH_MAX, SOCK_DIR): New.
6220 (gdb_ust_connect_sync_socket): New.
6221 (resume_thread, stop_thread): New.
6222 (run_inferior_command): New.
6223 (init_named_socket): New.
6224 (gdb_ust_socket_init): New.
6225 (cstr_to_hexstr): New.
6226 (next_st): New.
6227 (first_marker, next_marker): New.
6228 (response_ust_marker): New.
6229 (cmd_qtfstm, cmd_qtsstm): New.
6230 (unprobe_marker_at, probe_marker_at): New.
6231 (cmd_qtstmat, gdb_ust_thread): New.
6232 (gdb_ust_init): New.
6233 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6234 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6235 (ST_REGENTRY): New.
6236 (x86_64_st_collect_regmap): New.
6237 (X86_64_NUM_ST_COLLECT_GREGS): New.
6238 (AMD64_RIP_REGNUM): New.
6239 (supply_static_tracepoint_registers): New.
6240 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6241 (ST_REGENTRY): New.
6242 (i386_st_collect_regmap): New.
6243 (i386_NUM_ST_COLLECT_GREGS): New.
6244 (supply_static_tracepoint_registers): New.
6245 * server.c (handle_query): Handle qXfer:statictrace:read.
6246 <qSupported>: Report support for StaticTracepoints, and
6247 qXfer:statictrace:read features.
6248 * server.h (traceframe_read_sdata)
6249 (supply_static_tracepoint_registers): Declare.
6250 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6251 (unpack_varlen_hex): Include in IPA build.
6252 * Makefile.in (ustlibs, ustinc): New.
6253 (IPA_OBJS): Add remote-utils-ipa.o.
6254 ($(IPA_LIB)): Link -ldl and -lpthread.
6255 (UST_CFLAGS): New.
6256 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6257 * config.in, configure: Regenerate.
6258
6259 2010-06-20 Ian Lance Taylor <iant@google.com>
6260 Pedro Alves <pedro@codesourcery.com>
6261
6262 * linux-x86-low.c (always_true): Delete.
6263 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6264 trying to fool the compiler with always_true.
6265
6266 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6267
6268 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6269 conditions in gdbserver.
6270
6271 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6272
6273 * spu-low.c (spu_read_memory): Wrap around local store limit.
6274 (spu_write_memory): Likewise.
6275
6276 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6277
6278 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6279 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6280 LONGEST uses.
6281 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6282 uses.
6283 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6284 uses with LONGEST uses.
6285
6286 2010-06-14 Stan Shebs <stan@codesourcery.com>
6287 Pedro Alves <pedro@codesourcery.com>
6288
6289 Bytecode compiler.
6290
6291 * linux-x86-low.c: Include limits.h.
6292 (add_insns): New.
6293 (always_true): New.
6294 (EMIT_ASM): New.
6295 (EMIT_ASM32): New.
6296 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6297 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6298 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6299 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6300 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6301 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6302 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6303 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6304 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6305 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6306 (amd64_emit_void_call_2): New.
6307 (amd64_emit_ops): New.
6308 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6309 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6310 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6311 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6312 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6313 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6314 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6315 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6316 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6317 (i386_emit_stack_adjust, i386_emit_int_call_1)
6318 (i386_emit_void_call_2): New.
6319 (i386_emit_ops): New.
6320 (x86_emit_ops): New.
6321 (the_low_target): Install x86_emit_ops.
6322 * server.h (struct emit_ops): New.
6323 (get_raw_reg_func_addr): Declare.
6324 (current_insn_ptr, emit_error): Declare.
6325 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6326 (set_trace_state_variable_value): New defines.
6327 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6328 addr_get_trace_state_variable_value and
6329 addr_set_trace_state_variable_value.
6330 (symbol_list): New fields for get_raw_reg,
6331 get_trace_state_variable_value and set_trace_state_variable_value.
6332 (condfn): New typedef.
6333 (struct tracepoint): New field `compiled_cond'.
6334 (do_action_at_tracepoint): Clear compiled_cond.
6335 (get_trace_state_variable_value, set_trace_state_variable_value):
6336 Export in the IPA.
6337 (condition_true_at_tracepoint): If there's a compiled condition,
6338 run that.
6339 (current_insn_ptr, emit_error): New globals.
6340 (struct bytecode_address): New.
6341 (get_raw_reg_func_addr): New.
6342 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6343 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6344 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6345 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6346 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6347 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6348 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6349 (compile_tracepoint_condition, compile_bytecodes): New.
6350 * target.h (emit_ops): Forward declare.
6351 (struct target_ops): New field emit_ops.
6352 (target_emit_ops): New.
6353 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6354 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6355 * linux-low.c (linux_emit_ops): New.
6356 (linux_target_ops): Install it.
6357 * linux-low.h (struct linux_target_ops): New field emit_ops.
6358
6359 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6360
6361 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6362 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6363
6364 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6365 Stan Shebs <stan@codesourcery.com>
6366
6367 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6368 (all): Depend on $(extra_libraries).
6369 (install-only): Install the IPA.
6370 (IPA_OBJS, IPA_LIB): New.
6371 (clean): Remove the IPA lib.
6372 (IPAGENT_CFLAGS): New.
6373 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6374 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6375 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6376 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6377 * configure.ac: Check for atomic builtins support in the compiler.
6378 (IPA_DEPFILES, extra_libraries): Define.
6379 * configure.srv (ipa_obj): Add description.
6380 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6381 (i[34567]86-*-linux*): Set ipa_obj.
6382 (x86_64-*-linux*): Set ipa_obj.
6383 * linux-low.c (stabilizing_threads): New.
6384 (supports_fast_tracepoints): New.
6385 (linux_detach): Stabilize threads before detaching.
6386 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6387 the lwp is either not stabilizing, or is moving out of a jump pad.
6388 (linux_fast_tracepoint_collecting): New.
6389 (maybe_move_out_of_jump_pad): New.
6390 (enqueue_one_deferred_signal): New.
6391 (dequeue_one_deferred_signal): New.
6392 (linux_wait_for_event_1): If moving out of a jump pad, defer
6393 pending signals to later.
6394 (linux_stabilize_threads): New.
6395 (linux_wait_1): Check if threads need moving out of jump pads, and
6396 do it if so.
6397 (stuck_in_jump_pad_callback): New.
6398 (move_out_of_jump_pad_callback): New.
6399 (lwp_running): New.
6400 (linux_resume_one_lwp): Handle moving out of jump pads.
6401 (linux_set_resume_request): Dequeue deferred signals.
6402 (need_step_over_p): Also step over fast tracepoint jumps.
6403 (start_step_over): Also uninsert fast tracepoint jumps.
6404 (finish_step_over): Also reinsert fast tracepoint jumps.
6405 (linux_install_fast_tracepoint_jump): New.
6406 (linux_target_ops): Install linux_stabilize_threads and
6407 linux_install_fast_tracepoint_jump_pad.
6408 * linux-low.h (linux_target_ops) <get_thread_area,
6409 install_fast_tracepoint_jump_pad>: New fields.
6410 (struct lwp_info) <collecting_fast_tracepoint,
6411 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6412 (linux_get_thread_area): Declare.
6413 * linux-x86-low.c (jump_insn): New.
6414 (x86_get_thread_area): New.
6415 (append_insns): New.
6416 (push_opcode): New.
6417 (amd64_install_fast_tracepoint_jump_pad): New.
6418 (i386_install_fast_tracepoint_jump_pad): New.
6419 (x86_install_fast_tracepoint_jump_pad): New.
6420 (the_low_target): Install x86_get_thread_area and
6421 x86_install_fast_tracepoint_jump_pad.
6422 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6423 (struct fast_tracepoint_jump): New.
6424 (fast_tracepoint_jump_insn): New.
6425 (fast_tracepoint_jump_shadow): New.
6426 (find_fast_tracepoint_jump_at): New.
6427 (fast_tracepoint_jump_here): New.
6428 (delete_fast_tracepoint_jump): New.
6429 (set_fast_tracepoint_jump): New.
6430 (uninsert_fast_tracepoint_jumps_at): New.
6431 (reinsert_fast_tracepoint_jumps_at): New.
6432 (set_breakpoint_at): Use write_inferior_memory.
6433 (uninsert_raw_breakpoint): Use write_inferior_memory.
6434 (check_mem_read): Mask out fast tracepoint jumps.
6435 (check_mem_write): Mask out fast tracepoint jumps.
6436 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6437 (set_fast_tracepoint_jump): Declare.
6438 (delete_fast_tracepoint_jump)
6439 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6440 (reinsert_fast_tracepoint_jumps_at): Declare.
6441 * regcache.c: Don't compile many functions when building the
6442 in-process agent library.
6443 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6444 the register buffer in the heap.
6445 (free_register_cache): If the register buffer isn't owned by the
6446 regcache, don't free it.
6447 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6448 pre-existing register caches.
6449 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6450 type.
6451 (convert_ascii_to_int): : Constify `from' parameter type.
6452 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6453 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6454 the needed buffer in-place.
6455 (relocate_instruction): New.
6456 * server.c (handle_query) <qSymbols>: If the target supports
6457 tracepoints, give it a chance of looking up symbols. Report
6458 support for fast tracepoints.
6459 (handle_status): Stabilize threads.
6460 (process_serial_event): Adjust.
6461 * server.h (struct fast_tracepoint_jump): Forward declare.
6462 (struct process_info) <fast_tracepoint_jumps>: New field.
6463 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6464 (decode_X_packet, decode_M_packet): Adjust.
6465 (relocate_instruction): Declare.
6466 (in_process_agent_loaded): Declare.
6467 (tracepoint_look_up_symbols): Declare.
6468 (struct fast_tpoint_collect_status): Declare.
6469 (fast_tracepoint_collecting): Declare.
6470 (force_unlock_trace_buffer): Declare.
6471 (handle_tracepoint_bkpts): Declare.
6472 (initialize_low_tracepoint)
6473 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6474 * target.h (struct target_ops) <stabilize_threads,
6475 install_fast_tracepoint_jump_pad>: New fields.
6476 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6477 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6478 [HAVE_STDINT_H]: Include stdint.h.
6479 (trace_debug_1): Rename to ...
6480 (trace_vdebug): ... this.
6481 (trace_debug): Rename to ...
6482 (trace_debug_1): ... this. Add `level' parameter.
6483 (trace_debug): New.
6484 (ATTR_USED, ATTR_NOINLINE): New.
6485 (IP_AGENT_EXPORT): New.
6486 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6487 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6488 (about_to_request_buffer_space, trace_buffer_is_full)
6489 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6490 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6491 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6492 (traceframe_write_count, traceframes_created)
6493 (trace_state_variables)
6494 New renaming defines.
6495 (struct ipa_sym_addresses): New.
6496 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6497 (symbol_list): New.
6498 (ipa_sym_addrs): New.
6499 (all_tracepoint_symbols_looked_up): New.
6500 (in_process_agent_loaded): New.
6501 (write_e_ipa_not_loaded): New.
6502 (maybe_write_ipa_not_loaded): New.
6503 (tracepoint_look_up_symbols): New.
6504 (debug_threads) [IN_PROCESS_AGENT]: New.
6505 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6506 (UNKNOWN_SIDE_EFFECTS): New.
6507 (stop_tracing): New.
6508 (flush_trace_buffer): New.
6509 (stop_tracing_bkpt): New.
6510 (flush_trace_buffer_bkpt): New.
6511 (read_inferior_integer): New.
6512 (read_inferior_uinteger): New.
6513 (read_inferior_data_pointer): New.
6514 (write_inferior_data_pointer): New.
6515 (write_inferior_integer): New.
6516 (write_inferior_uinteger): New.
6517 (struct collect_static_trace_data_action): Delete.
6518 (enum tracepoint_type): New.
6519 (struct tracepoint) <type>: New field `type'.
6520 <actions_str, step_actions, step_actions_str>: Only include in
6521 GDBserver.
6522 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6523 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6524 (tracepoints): Use IP_AGENT_EXPORT.
6525 (last_tracepoint): Don't include in the IPA.
6526 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6527 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6528 (alloced_trace_state_variables): New.
6529 (trace_state_variables): Use IP_AGENT_EXPORT.
6530 (traceframe_t): Delete unused variable.
6531 (circular_trace_buffer): Don't include in the IPA.
6532 (trace_buffer_start): Delete.
6533 (struct trace_buffer_control): New.
6534 (trace_buffer_free): Delete.
6535 (struct ipa_trace_buffer_control): New.
6536 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6537 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6538 New.
6539 (trace_buffer_ctrl): New.
6540 (TRACE_BUFFER_CTRL_CURR): New.
6541 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6542 Reimplement as macros.
6543 (trace_buffer_wrap): Delete.
6544 (traceframe_write_count, traceframe_read_count)
6545 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6546 (struct tracepoint_hit_ctx) <type>: New field.
6547 (struct fast_tracepoint_ctx): New.
6548 (memory_barrier): New.
6549 (cmpxchg): New.
6550 (record_tracepoint_error): Update atomically in the IPA.
6551 (clear_inferior_trace_buffer): New.
6552 (about_to_request_buffer_space): New.
6553 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6554 updating the same buffer.
6555 (add_tracepoint): Default the tracepoint's type to trap
6556 tracepoint, and orig_size to -1.
6557 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6558 internal variables.
6559 (create_trace_state_variable): New parameter `gdb'. Handle it.
6560 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6561 (cmd_qtdp): Handle fast tracepoints.
6562 (cmd_qtdv): Adjust.
6563 (max_jump_pad_size): New.
6564 (gdb_jump_pad_head): New.
6565 (get_jump_space_head): New.
6566 (claim_jump_space): New.
6567 (sort_tracepoints): New.
6568 (MAX_JUMP_SIZE): New.
6569 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6570 IPA.
6571 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6572 support. Upload fast traceframes, and delete internal IPA
6573 breakpoints.
6574 (stop_tracing_handler): New.
6575 (flush_trace_buffer_handler): New.
6576 (cmd_qtstop): Upload fast tracepoints.
6577 (response_tracepoint): Handle fast tracepoints.
6578 (tracepoint_finished_step): Upload fast traceframes. Set the
6579 tracepoint hit context's tracepoint type.
6580 (handle_tracepoint_bkpts): New.
6581 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6582 type. Add comment about fast tracepoints.
6583 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6584 non-existing action_str field.
6585 (get_context_regcache): Handle fast tracepoints.
6586 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6587 to the regcache.
6588 (fast_tracepoint_from_jump_pad_address): New.
6589 (fast_tracepoint_from_ipa_tpoint_address): New.
6590 (collecting_t): New.
6591 (force_unlock_trace_buffer): New.
6592 (fast_tracepoint_collecting): New.
6593 (collecting): New.
6594 (gdb_collect): New.
6595 (write_inferior_data_ptr): New.
6596 (target_tp_heap): New.
6597 (target_malloc): New.
6598 (download_agent_expr): New.
6599 (UALIGN): New.
6600 (download_tracepoints): New.
6601 (download_trace_state_variables): New.
6602 (upload_fast_traceframes): New.
6603 (IPA_FIRST_TRACEFRAME): New.
6604 (IPA_NEXT_TRACEFRAME_1): New.
6605 (IPA_NEXT_TRACEFRAME): New.
6606 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6607 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6608 (gdb_jump_pad_buffer_end): New.
6609 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6610 (initialize_tracepoint): Adjust.
6611 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6612 buffer. Initialize the low module.
6613 * utils.c (PREFIX, TOOLNAME): New.
6614 (malloc_failure): Use PREFIX.
6615 (error): In the IPA, an error causes an exit.
6616 (fatal, warning): Use PREFIX.
6617 (internal_error): Use TOOLNAME.
6618 (NUMCELLS): Increase to 10.
6619 * configure, config.in: Regenerate.
6620
6621 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6622
6623 * server.c (handle_query) <qSupported>: Do two passes over the
6624 qSupported string to avoid nesting strtok.
6625
6626 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6627
6628 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6629 (CDEPS): New.
6630 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6631 -Wl,--dynamic-list.
6632 * configure: Regenerate.
6633 * proc-service.list: New.
6634
6635 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6636
6637 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6638 New comment.
6639
6640 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6641
6642 * gdbreplay.c (remote_open): Check error return from socket() call by
6643 its equality to -1 not by it being negative.
6644 * remote-utils.c (remote_open): Likewise.
6645
6646 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6647
6648 * config.h: Regenerate.
6649
6650 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6651
6652 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6653 doesn't provide PTRACE_GET_THREAD_AREA.
6654
6655 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6656
6657 * linux-m68k-low.c: Include <asm/ptrace.h>
6658 (ps_get_thread_area): Implement.
6659
6660 2010-05-03 Doug Evans <dje@google.com>
6661
6662 * event-loop.c (struct callback_event): New struct.
6663 (callback_list): New global.
6664 (append_callback_event, delete_callback_event): New functions.
6665 (process_callback): New function.
6666 (start_event_loop): Call it.
6667 * remote-utils.c (NOT_SCHEDULED): Define.
6668 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6669 moved out of readchar.
6670 (readchar): Rewrite. Call reschedule before returning.
6671 (reset_readchar): New function.
6672 (remote_close): Call it.
6673 (process_remaining, reschedule): New functions.
6674 * server.h (callback_handler_func): New typedef.
6675 (append_callback_event, delete_callback_event): Declare.
6676
6677 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6678
6679 * proc-service.c (ps_pglobal_lookup): Use
6680 thread_db_look_up_one_symbol.
6681 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6682 parameter. Use it instead of all_symbols_looked_up.
6683 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6684 field.
6685 (all_symbols_looked_up): Don't declare.
6686 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6687 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6688 field.
6689 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6690 Set all_symbols_looked_up here.
6691 (thread_db_look_up_one_symbol): New.
6692 (thread_db_get_tls_address): Adjust.
6693 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6694 thread_db object on the heap, and tentatively set it in the
6695 process structure.
6696 (thread_db_init): Don't set all_symbols_looked_up here.
6697 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6698
6699 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6700
6701 * linux-low.c (linux_kill, linux_detach): Adjust.
6702 (status_pending_p_callback): Remove redundant statement. Check
6703 for !TARGET_WAITIKIND_IGNORE, instead of
6704 TARGET_WAITKIND_STOPPED.
6705 (handle_tracepoints): Make sure LWP is locked. Adjust.
6706 (linux_wait_for_event_1): Adjust.
6707 (linux_cancel_breakpoints): New.
6708 (unsuspend_one_lwp): New.
6709 (unsuspend_all_lwps): New.
6710 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6711 (send_sigstop_callback): Change return type to int, add new
6712 `except' parameter and handle it.
6713 (suspend_and_send_sigstop_callback): New.
6714 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6715 pass them down. If SUSPEND, also increment the lwp's suspend
6716 count.
6717 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6718 (need_step_over_p): Don't consider suspended LWPs.
6719 (start_step_over): Adjust.
6720 (proceed_one_lwp): Change return type to int, add new `except'
6721 parameter and handle it.
6722 (unsuspend_and_proceed_one_lwp): New.
6723 (proceed_all_lwps): Use find_inferior instead of
6724 for_each_inferior.
6725 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6726 also decrement the suspend count of LWPs. Pass `except' down,
6727 instead of hacking its suspend count.
6728 (linux_pause_all): Add `freeze' parameter. Adjust.
6729 (linux_unpause_all): New.
6730 (linux_target_ops): Install linux_unpause_all.
6731 * server.c (handle_status): Adjust.
6732 * target.h (struct target_ops): New fields `unpause_all' and
6733 `cancel_breakpoints'. Add new parameter to `pause_all'.
6734 (pause_all): Add new `freeze' parameter.
6735 (unpause_all): New.
6736 (cancel_breakpoints): New.
6737 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6738 cancel breakpoints.
6739 (cmd_qtstart): Pause threads.
6740 (stop_tracing): Pause threads, and cancel breakpoints.
6741 * win32-low.c (win32_target_ops): Adjust.
6742
6743 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6744
6745 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6746 the inferior right away from here...
6747 (linux_wait_1): ... to here, and adjust to check the thread's
6748 last_resume_kind instead of the lwp's step or stop_expected flags.
6749
6750 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6751
6752 * README: Use consistent `GDB' and `GDBserver' spellings.
6753
6754 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6755
6756 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6757 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6758 (linux_detach_one_lwp): Assume the lwp is stopped.
6759 (any_thread_of): Delete.
6760 (linux_detach): Stop all lwps here. Don't blindly delete all
6761 breakpoints.
6762 (delete_lwp_callback): New.
6763 (linux_mourn): Delete all lwps of the process that is gone.
6764 (linux_wait_1): Don't delete the last lwp of the process here.
6765 * mem-break.h (mark_breakpoints_out): Declare.
6766 * mem-break.c (mark_breakpoints_out): New.
6767 (free_all_breakpoints): Use it.
6768 * server.c (handle_target_event): If the process is gone, mark
6769 breakpoints out.
6770 * thread-db.c (struct thread_db) <create_bp>: New field.
6771 (thread_db_enable_reporting): Fix prototype. Store a thread event
6772 breakpoint reference in the thread_db struct.
6773 (thread_db_load_search): Clear the thread_db object.
6774 (try_thread_db_load_1): Ditto.
6775 (switch_to_process): New.
6776 (disable_thread_event_reporting): Use it.
6777 (remove_thread_event_breakpoints): New.
6778 (thread_db_detach, thread_db_mourn): Use it.
6779
6780 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6781
6782 * linux-low.c (linux_enable_event_reporting): New.
6783 (linux_wait_for_event_1, handle_extended_wait): Use it.
6784
6785 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6786
6787 * linux-low.c (linux_kill_one_lwp, linux_kill)
6788 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6789 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6790 SIGSTOP even if the LWP is stopped.
6791 (send_sigstop_callback): New.
6792 (stop_all_lwps): Use send_sigstop_callback instead.
6793 (linux_resume_one_thread): Adjust.
6794 (proceed_one_lwp): Still proceed an LWP that the client has
6795 requested to stop, if we haven't reported it as stopped yet. Make
6796 sure that LWPs the client want stopped, have a pending SIGSTOP.
6797
6798 2010-04-26 Doug Evans <dje@google.com>
6799
6800 * server.c (handle_general_set): Make static.
6801
6802 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6803 Print received char after testing for error/eof instead of before.
6804 (input_interrupt): Tweak comment.
6805
6806 2010-04-23 Doug Evans <dje@google.com>
6807
6808 * server.c (start_inferior): Print inferior argv if --debug.
6809
6810 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6811
6812 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6813 * nto-x86-low.c: Include server.h
6814
6815 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6816
6817 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6818 be consistent with other sources of this directory.
6819 (init_registers_amd64): Correct name of source file of this function
6820 in the comment.
6821
6822 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6823
6824 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6825 64-bit executables.
6826
6827 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6828
6829 * win32-i386-low.c: Add 64-bit support.
6830 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6831 (init_registers_amd64): Declare.
6832 (mappings): Add 64-bit version of array.
6833 (init_windows_x86): New function.
6834 (the_low_target): Change init_arch field to init_windows_x86.
6835
6836 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6837
6838 * win32-low.c: Adapt to support also 64-bit architecture.
6839 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6840 (get_image_name): Use SIZE_T type for local variable `done'.
6841 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6842 (toolhelp_get_dll_name): Idem.
6843 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6844 Use uintptr_t typecast to avoid warning.
6845 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6846 (handle_exception): Use phex_nz to avoid warning.
6847 (win32_wait): Remove unused local variable `process'.
6848
6849 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6850
6851 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6852 `amd64-avx.o'.
6853
6854 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6855
6856 * configure.ac: Use `ws2_32' library for srv_mingw.
6857 * configure: Regenerate.
6858 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6859 * remote-utils.c: Likewise.
6860
6861 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6862
6863 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6864 if __x86_64__ is defined.
6865
6866 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6867
6868 * configure: Regenerate.
6869
6870 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6871
6872 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6873 * target.h (target_ops): New get_tib_address field.
6874 * win32-low.h (win32_thread_info): Add thread_local_base field.
6875 * win32-low.c (child_add_thread): Add tlb argument.
6876 Set thread_local_base field to TLB.
6877 (get_child_debug_event): Adapt to child_add_thread change.
6878 (win32_get_tib_address): New function.
6879 (win32_target_ops): Set get_tib_address field to
6880 win32_get_tib_address.
6881 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6882
6883 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6884
6885 * linux-low.c (linux_mourn): Also remove the process.
6886 * server.c (handle_target_event): Don't remove the process here.
6887 * nto-low.c (nto_mourn): New.
6888 (nto_target_ops): Install it.
6889 * spu-low.c (spu_mourn): New.
6890 (spu_target_ops): Install it.
6891 * win32-low.c (win32_mourn): New.
6892 (win32_target_ops): Install it.
6893
6894 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6895
6896 * server.h (buffer_xml_printf): Remove redundant `;'.
6897
6898 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6899
6900 * regcache.c (set_register_cache): Invalidate regcaches before
6901 changing the register cache layout.
6902 (regcache_invalidate_one): Allow a NULL regcache.
6903 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6904 regcaches before changing the register cache layout or the target
6905 regsets.
6906
6907 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6908
6909 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6910 variable warning on Linux/x86-64.
6911
6912 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6913
6914 GDBserver disconnected tracing support.
6915
6916 * linux-low.c (linux_remove_process): Delete.
6917 (add_lwp): Don't set last_resume_kind here.
6918 (linux_kill): Use `mourn'.
6919 (linux_detach): Use `thread_db_detach', and `mourn'.
6920 (linux_mourn): New.
6921 (linux_attach_lwp_1): Adjust comment.
6922 (linux_attach): last_resume_kind moved the thread_info; adjust.
6923 (status_pending_p_callback): Adjust.
6924 (linux_wait_for_event_1): Adjust.
6925 (count_events_callback, select_singlestep_lwp_callback)
6926 (select_event_lwp_callback, cancel_breakpoints_callback)
6927 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6928 (proceed_one_lwp): Adjust.
6929 (linux_async): Add debug output.
6930 (linux_thread_stopped): New.
6931 (linux_pause_all): New.
6932 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6933 linux_pause_all.
6934 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6935 (thread_db_free): Delete declaration.
6936 (thread_db_detach, thread_db_mourn): Declare.
6937 * thread-db.c (thread_db_init): Use thread_db_mourn.
6938 (thread_db_free): Delete, split in two.
6939 (disable_thread_event_reporting): New.
6940 (thread_db_detach): New.
6941 (thread_db_mourn): New.
6942
6943 * server.h (struct thread_info) <last_resume_kind>: New field.
6944 <attached>: Add comment.
6945 <gdb_detached>: New field.
6946 (handler_func): Change return type to int.
6947 (handle_serial_event, handle_target_event): Ditto.
6948 (gdb_connected): Declare.
6949 (tracing): Delete.
6950 (disconnected_tracing): Declare.
6951 (stop_tracing): Declare.
6952
6953 * server.c (handle_query) <qSupported>: Report support for
6954 disconnected tracing.
6955 (queue_stop_reply_callback): Account for running threads.
6956 (gdb_wants_thread_stopped): New.
6957 (gdb_wants_all_threads_stopped): New.
6958 (gdb_reattached_process): New.
6959 (handle_status): Clear the `gdb_detached' flag of all processes.
6960 In all-stop, stop all threads.
6961 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6962 (process_serial_event): If the remote connection breaks, or if an
6963 exit was forced with "monitor exit", force an event loop exit.
6964 Handle disconnected tracing on detach.
6965 (handle_serial_event): Adjust.
6966 (handle_target_event): If GDB isn't connected, forward events back
6967 to the inferior, unless the last process exited, in which case,
6968 exit gdbserver. Adjust interface.
6969
6970 * remote-utils.c (remote_open): Don't block in accept. Instead
6971 register an event loop source on the listen socket file
6972 descriptor. Refactor bits into ...
6973 (listen_desc): ... this new global.
6974 (gdb_connected): ... this new function.
6975 (enable_async_notification): ... this new function.
6976 (handle_accept_event): ... this new function.
6977 (remote_close): Clear remote_desc.
6978
6979 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6980
6981 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6982 New fields.
6983 (mourn_inferior): Define.
6984 (target_process_qsupported): Avoid the dangling else problem.
6985 (thread_stopped): Define.
6986 (pause_all): Define.
6987 (target_waitstatus_to_string): Declare.
6988 * target.c (target_waitstatus_to_string): New.
6989
6990 * tracepoint.c (tracing): Make extern.
6991 (disconnected_tracing): New.
6992 (stop_tracing): Make extern. Handle tracing stops due to GDB
6993 disconnecting.
6994 (cmd_qtdisconnected): New.
6995 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6996 (handle_tracepoint_general_set): Handle QTDisconnected.
6997
6998 * event-loop.c (event_handler_func): Change return type to int.
6999 (process_event): Bail out if the event handler wants the event
7000 loop to stop.
7001 (handle_file_event): Ditto.
7002 (start_event_loop): Bail out if the event handler wants the event
7003 loop to stop.
7004
7005 * nto-low.c (nto_target_ops): Adjust.
7006 * spu-low.c (spu_wait): Don't remove the process here.
7007 (spu_target_ops): Adjust.
7008 * win32-low.c (win32_wait): Don't remove the process here.
7009 (win32_target_ops): Adjust.
7010
7011 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7012
7013 * regcache.c (realloc_register_cache): Invalidate inferior's
7014 regcache before recreating it.
7015
7016 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7017
7018 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7019
7020 2010-04-09 Stan Shebs <stan@codesourcery.com>
7021 Pedro Alves <pedro@codesourcery.com>
7022
7023 * server.h (LONGEST): New.
7024 (struct thread_info) <while_stepping>: New field.
7025 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7026 Declare.
7027 (initialize_tracepoint, handle_tracepoint_general_set)
7028 (handle_tracepoint_query, tracepoint_finished_step)
7029 (tracepoint_was_hit, release_while_stepping_state_list):
7030 (current_traceframe): Declare.
7031 * server.c (handle_general_set): Handle tracepoint packets.
7032 (read_memory): New.
7033 (write_memory): New.
7034 (handle_search_memory_1): Use read_memory.
7035 (handle_query): Report support for conditional tracepoints, trace
7036 state variables, and tracepoint sources. Handle tracepoint
7037 queries.
7038 (main): Initialize the tracepoints module.
7039 (process_serial_event): Handle traceframe reads/writes.
7040
7041 * linux-low.c (handle_tracepoints): New.
7042 (linux_wait_1): Call it.
7043 (linux_resume_one_lwp): Handle while-stepping.
7044 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7045 (linux_target_ops): Install them.
7046 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7047 New field.
7048 * linux-x86-low.c (x86_supports_tracepoints): New.
7049 (the_low_target). Install it.
7050
7051 * mem-break.h (delete_breakpoint): Declare.
7052 * mem-break.c (delete_breakpoint): Make external.
7053
7054 * target.h (struct target_ops): Add `supports_tracepoints',
7055 `read_pc', and `write_pc' fields.
7056 (target_supports_tracepoints): Define.
7057 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7058 (phex_nz): New.
7059
7060 * regcache.h (struct regcache) <registers_owned>: New field.
7061 (init_register_cache, regcache_cpy): Declare.
7062 (regcache_read_pc, regcache_write_pc): Declare.
7063 (register_cache_size): Declare.
7064 (supply_regblock): Declare.
7065 * regcache.c (init_register_cache): New.
7066 (new_register_cache): Use it.
7067 (regcache_cpy): New.
7068 (register_cache_size): New.
7069 (supply_regblock): New.
7070 (regcache_read_pc, regcache_write_pc): New.
7071
7072 * tracepoint.c: New.
7073
7074 * Makefile.in (OBS): Add tracepoint.o.
7075 (tracepoint.o): New rule.
7076
7077 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7078
7079 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7080 (i386-mmx.o): New.
7081 (i386-mmx.c): Likewise.
7082 (i386-mmx-linux.o): Likewise.
7083 (i386-mmx-linux.c): Likewise.
7084
7085 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7086 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7087 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7088 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7089
7090 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7091 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7092 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7093
7094 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7095
7096 * Makefile.in (clean): Updated.
7097 (i386-avx.o): New.
7098 (i386-avx.c): Likewise.
7099 (i386-avx-linux.o): Likewise.
7100 (i386-avx-linux.c): Likewise.
7101 (amd64-avx.o): Likewise.
7102 (amd64-avx.c): Likewise.
7103 (amd64-avx-linux.o): Likewise.
7104 (amd64-avx-linux.c): Likewise.
7105
7106 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7107 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7108 (srv_amd64_regobj): Add amd64-avx.o.
7109 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7110 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7111 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7112 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7113 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7114 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7115 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7116
7117 * i387-fp.c: Include "i386-xstate.h".
7118 (i387_xsave): New.
7119 (i387_cache_to_xsave): Likewise.
7120 (i387_xsave_to_cache): Likewise.
7121 (x86_xcr0): Likewise.
7122
7123 * i387-fp.h (i387_cache_to_xsave): Likewise.
7124 (i387_xsave_to_cache): Likewise.
7125 (x86_xcr0): Likewise.
7126
7127 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7128 * linux-crisv32-low.c (target_regsets): Likewise.
7129 * linux-m68k-low.c (target_regsets): Likewise.
7130 * linux-mips-low.c (target_regsets): Likewise.
7131 * linux-ppc-low.c (target_regsets): Likewise.
7132 * linux-s390-low.c (target_regsets): Likewise.
7133 * linux-sh-low.c (target_regsets): Likewise.
7134 * linux-sparc-low.c (target_regsets): Likewise.
7135 * linux-xtensa-low.c (target_regsets): Likewise.
7136
7137 * linux-low.c: Include <sys/uio.h>.
7138 (regsets_fetch_inferior_registers): Support nt_type.
7139 (regsets_store_inferior_registers): Likewise.
7140 (linux_process_qsupported): New.
7141 (linux_target_ops): Add linux_process_qsupported.
7142
7143 * linux-low.h (regset_info): Add nt_type.
7144 (linux_target_ops): Add process_qsupported.
7145
7146 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7147 and <sys/uio.h>.
7148 (init_registers_i386_avx_linux): New.
7149 (init_registers_amd64_avx_linux): Likewise.
7150 (xmltarget_i386_linux_no_xml): Likewise.
7151 (xmltarget_amd64_linux_no_xml): Likewise.
7152 (PTRACE_GETREGSET): Likewise.
7153 (PTRACE_SETREGSET): Likewise.
7154 (x86_fill_xstateregset): Likewise.
7155 (x86_store_xstateregset): Likewise.
7156 (use_xml): Likewise.
7157 (x86_linux_update_xmltarget): Likewise.
7158 (x86_linux_process_qsupported): Likewise.
7159 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7160 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7161 init_registers_i386_linux here. Call
7162 x86_linux_update_xmltarget.
7163 (the_low_target): Add x86_linux_process_qsupported.
7164
7165 * server.c (handle_query): Call target_process_qsupported.
7166
7167 * target.h (target_ops): Add process_qsupported.
7168 (target_process_qsupported): New.
7169
7170 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7171
7172 * inferiors.c (add_thread): Set last_status kind to
7173 TARGET_WAITKIND_IGNORE.
7174 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7175 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7176 (linux_wait_1): Move `thread' local definition to block that uses
7177 it. Don't NULL initialize `event_child'.
7178 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7179 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7180 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7181
7182 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7183
7184 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7185 an extended waitstatus, or by a watchpoint.
7186 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7187 thread was stepping or has been stopped by a watchpoint.
7188
7189 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7190
7191 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7192 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7193 of another, then delete the previous, and validate all
7194 breakpoints.
7195 (validate_inserted_breakpoint): New.
7196 (delete_disabled_breakpoints): New.
7197 (validate_breakpoints): New.
7198 (check_mem_read): Validate breakpoints before trusting their
7199 shadow. Delete disabled breakpoints.
7200 (check_mem_write): Validate breakpoints before trusting they
7201 should be inserted. Delete disabled breakpoints.
7202 * mem-break.h (validate_breakpoints):
7203 * server.c (handle_query): Validate breakpoints when we see a
7204 qSymbol query.
7205
7206 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7207
7208 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7209 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7210 if we could tell there's a GDB breakpoint at stop_pc.
7211 (need_step_over_p): Don't do a step over if we find a GDB
7212 breakpoint at the resume PC.
7213
7214 * mem-break.c (struct raw_breakpoint): New.
7215 (enum bkpt_type): New type `gdb_breakpoint'.
7216 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7217 fields. New field `raw'.
7218 (find_raw_breakpoint_at): New.
7219 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7220 breakpoint instead.
7221 (set_breakpoint_at): Adjust.
7222 (delete_raw_breakpoint): New.
7223 (release_breakpoint): New.
7224 (delete_breakpoint): Rename to...
7225 (delete_breakpoint_1): ... this. Add proc parameter. Use
7226 release_breakpoint. Return ENOENT.
7227 (delete_breakpoint): Reimplement.
7228 (find_breakpoint_at): Delete.
7229 (find_gdb_breakpoint_at): New.
7230 (delete_breakpoint_at): Delete.
7231 (set_gdb_breakpoint_at): New.
7232 (delete_gdb_breakpoint_at): New.
7233 (gdb_breakpoint_here): New.
7234 (set_reinsert_breakpoint): Use release_breakpoint.
7235 (uninsert_breakpoint): Rename to ...
7236 (uninsert_raw_breakpoint): ... this.
7237 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7238 (reinsert_raw_breakpoint): Change parameter type to
7239 raw_breakpoint.
7240 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7241 instead.
7242 (check_breakpoints): Adjust. Use release_breakpoint.
7243 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7244 (breakpoint_inserted_here): Ditto.
7245 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7246 Don't trust the breakpoint's shadow if it is not inserted.
7247 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7248 (delete_all_breakpoints): Adjust.
7249 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7250 use delete_breakpoint_1.
7251
7252 * mem-break.h (breakpoints_supported): Delete declaration.
7253 (set_gdb_breakpoint_at): Declare.
7254 (gdb_breakpoint_here): Declare.
7255 (delete_breakpoint_at): Delete.
7256 (delete_gdb_breakpoint_at): Declare.
7257
7258 * server.h (struct raw_breakpoint): Forward declare.
7259 (struct process_info): New field `raw_breakpoints'.
7260
7261 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7262 breakpoints.
7263
7264 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7265
7266 * linux-low.c (status_pending_p_callback): Fix comment.
7267 (linux_wait_for_event_1): Move most of the internal breakpoint
7268 handling from here...
7269 (linux_wait_1): ... to here.
7270 (count_events_callback): New.
7271 (select_singlestep_lwp_callback): New.
7272 (select_event_lwp_callback): New.
7273 (cancel_breakpoints_callback): New.
7274 (select_event_lwp): New.
7275 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7276 priority to all LWPs that have had events that should be reported
7277 to the client. Cancel breakpoints when about to reporting the
7278 event to the client, not while stopping lwps. No longer cancel
7279 finished single-steps here.
7280 (cancel_finished_single_step): Delete.
7281 (cancel_finished_single_steps): Delete.
7282
7283 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7284
7285 * mem-break.c (enum bkpt_type): New.
7286 (struct breakpoint): New field `type'.
7287 (set_breakpoint_at): Change return type to struct breakpoint
7288 pointer. Set type to `other_breakpoint' by default.
7289 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7290 in the breakpoint list.
7291 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7292 (reinsert_breakpoint): Rename to ...
7293 (reinsert_raw_breakpoint): ... this.
7294 (reinsert_breakpoints_at): Adjust.
7295 * mem-break.h (struct breakpoint): Declare.
7296 (set_breakpoint_at): Change return type to struct breakpoint
7297 pointer.
7298
7299 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7300
7301 * server.c (handle_query): Assign, not compare.
7302
7303 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7304
7305 Teach linux gdbserver to step-over-breakpoints.
7306
7307 * linux-low.c (can_hardware_single_step): New.
7308 (supports_breakpoints): New.
7309 (handle_extended_wait): If stopping threads, read the stop pc of
7310 the new cloned LWP.
7311 (get_pc): New.
7312 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7313 low target doesn't support retrieving the PC.
7314 (add_lwp): Set last_resume_kind to resume_continue.
7315 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7316 (linux_attach): Don't clear stop_expected. Set the lwp's
7317 last_resume_kind to resume_stop.
7318 (linux_detach_one_lwp): Don't check for removed breakpoints.
7319 (check_removed_breakpoint): Delete.
7320 (status_pending_p): Rename to ...
7321 (status_pending_p_callback): ... this. Don't check for removed
7322 breakpoints. Don't consider threads that are stopped from GDB's
7323 perspective.
7324 (linux_wait_for_lwp): Always read the stop_pc here.
7325 (cancel_breakpoint): New.
7326 (step_over_bkpt): New global.
7327 (linux_wait_for_event_1): Implement stepping over breakpoints.
7328 (gdb_wants_lwp_stopped): New.
7329 (gdb_wants_all_stopped): New.
7330 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7331 single-step traps here. Store the thread's last reported target
7332 wait status.
7333 (send_sigstop): Don't clear stop_expected. Always set it,
7334 instead.
7335 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7336 (cancel_finished_single_step): New.
7337 (cancel_finished_single_steps): New.
7338 (wait_for_sigstop): Don't cancel finished single-step traps here.
7339 (linux_resume_one_lwp): Don't check for removed breakpoints.
7340 Don't set `step' on non-hardware step archs.
7341 (linux_set_resume_request): Ignore resume_stop requests if already
7342 stopping or stopped. Set the lwp's last_resume_kind.
7343 (resume_status_pending_p): Don't check for removed breakpoints.
7344 (need_step_over_p): New.
7345 (start_step_over): New.
7346 (finish_step_over): New.
7347 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7348 requests. Clear the thread's last reported target waitstatus.
7349 Don't use the `suspended' flag. Don't consider pending breakpoints.
7350 (linux_resume): Start a step-over if necessary.
7351 (proceed_one_lwp): New.
7352 (proceed_all_lwps): New.
7353 (unstop_all_lwps): New.
7354 * linux-low.h (struct lwp_info): Rewrite comment for the
7355 `suspended' flag. Add the `stop_pc' field. Delete the
7356 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7357 Add `'last_resume_kind' and `need_step_over' fields.
7358 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7359 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7360 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7361 (set_raw_breakpoint_at): New.
7362 (set_breakpoint_at): Rewrite to use it.
7363 (reinsert_breakpoint_handler): Delete.
7364 (set_reinsert_breakpoint): New.
7365 (reinsert_breakpoint_by_bp): Delete.
7366 (delete_reinsert_breakpoints): New.
7367 (uninsert_breakpoint): Rewrite.
7368 (uninsert_breakpoints_at): New.
7369 (reinsert_breakpoint): Rewrite.
7370 (reinsert_breakpoints_at): New.
7371 (check_breakpoints): Rewrite.
7372 (breakpoint_here): New.
7373 (breakpoint_inserted_here): New.
7374 (check_mem_read): Adjust.
7375 * mem-break.h (breakpoints_supported, breakpoint_here)
7376 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7377 (reinsert_breakpoint_by_bp): Delete declaration.
7378 (delete_reinsert_breakpoints): Declare.
7379 (reinsert_breakpoint): Delete declaration.
7380 (reinsert_breakpoints_at): Declare.
7381 (uninsert_breakpoint): Delete declaration.
7382 (uninsert_breakpoints_at): Declare.
7383 (check_breakpoints): Adjust prototype.
7384 * server.h: Adjust include order.
7385 (struct thread_info): Declare here. Add a `last_status' field.
7386
7387 2010-03-23 Michael Snyder <msnyder@vmware.com>
7388
7389 * server.c (crc32): New function.
7390 (handle_query): Add handling for 'qCRC:' request.
7391
7392 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7393
7394 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7395 lwp had been stopped by a watchpoint.
7396
7397 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7398
7399 * server.h (internal_error): Declare.
7400 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7401 * utils.c (internal_error): New function.
7402
7403 2010-03-15 Andreas Schwab <schwab@redhat.com>
7404
7405 * configure.srv: Fix typo setting srv_regobj.
7406
7407 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7408
7409 * linux-low.c (fetch_register): Avoid passing a non string literal
7410 format to `error'.
7411 (usr_store_inferior_registers): Ditto.
7412
7413 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7414
7415 * linux-low.c (linux_write_memory): Bail out early if peeking
7416 memory failed.
7417
7418 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7419
7420 * linux-low.h (struct lwp_info): New fields
7421 `stopped_by_watchpoint' and `stopped_data_address'.
7422 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7423 here, and cache them in the lwp object.
7424 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7425 directly.
7426 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7427 field.
7428 (linux_stopped_by_watchpoint): Rewrite.
7429 (linux_stopped_data_address): Rewrite.
7430
7431 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7432
7433 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7434 switching the current inferior, not before.
7435
7436 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7437
7438 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7439 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7440 i386-linux.c and amd64-linux.c.
7441 (reg-i386.o): Removed.
7442 (reg-i386.c): Likewise.
7443 (reg-i386-linux.o): Likewise.
7444 (reg-i386-linux.c): Likewise.
7445 (reg-x86-64.o): Likewise.
7446 (reg-x86-64.c): Likewise.
7447 (reg-x86-64-linux.o): Likewise.
7448 (reg-x86-64-linux.c): Likewise.
7449 (i386.o): New.
7450 (i386.c): Likewise.
7451 (i386-linux.o): Likewise.
7452 (i386-linux.c): Likewise.
7453 (amd64.o): Likewise.
7454 (amd64.c): Likewise.
7455 (amd64-linux.o): Likewise.
7456 (amd64-linux.c): Likewise.
7457
7458 * configure.srv (srv_i386_regobj): New.
7459 (srv_i386_linux_regobj): Likewise.
7460 (srv_amd64_regobj): Likewise.
7461 (srv_amd64_linux_regobj): Likewise.
7462 (srv_i386_32bit_xmlfiles): Likewise.
7463 (srv_i386_64bit_xmlfiles): Likewise.
7464 (srv_i386_xmlfiles): Likewise.
7465 (srv_amd64_xmlfiles): Likewise.
7466 (srv_i386_linux_xmlfiles): Likewise.
7467 (srv_amd64_linux_xmlfiles): Likewise.
7468 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7469 srv_xmlfiles to $srv_i386_xmlfiles.
7470 (i[34567]86-*-mingw32ce*): Likewise.
7471 (i[34567]86-*-mingw*): Likewise.
7472 (i[34567]86-*-nto*): Likewise.
7473 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7474 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7475 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7476 (x86_64-*-linux*): Likewise.
7477
7478 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7479 (init_registers_amd64_linux): New.
7480 (x86_arch_setup): Replace init_registers_x86_64_linux with
7481 init_registers_amd64_linux.
7482
7483 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7484
7485 * configure.ac: Check for libdl. If it is not available link against
7486 static libthread_db.
7487 * configure: Regenerate.
7488
7489 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7490
7491 PR9605
7492
7493 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7494 handing a read watchpoint.
7495 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7496
7497 2010-02-12 Doug Evans <dje@google.com>
7498
7499 * linux-low.c (linux_supports_tracefork_flag): Document.
7500 (linux_look_up_symbols): Add comment.
7501
7502 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7503
7504 * regcache.c (supply_register): Clear regcache if buf is NULL.
7505
7506 2010-02-02 Nicolas Roche <roche@sourceware.org>
7507 Joel Brobecker <brobecker@adacore.com>
7508
7509 * inferiors.c (find_inferior): Add function documentation.
7510 (unloaded_dll): Handle the case where the unloaded dll has not
7511 been previously registered in the dll list.
7512
7513 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7514
7515 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7516 (thumb2_breakpoint): New.
7517 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7518
7519 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7520
7521 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7522 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7523 breakpoints.
7524
7525 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7526
7527 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7528
7529 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7530
7531 * linux-s390-low.c (s390_collect_ptrace_register)
7532 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7533
7534 2010-01-21 Doug Evans <dje@google.com>
7535
7536 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7537 (PTRACE_ARG4_TYPE): New macro.
7538 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7539 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7540 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7541 (usr_store_inferior_registers): Ditto.
7542 (linux_read_memory, linux_write_memory): Ditto.
7543 (linux_test_for_tracefork): Ditto.
7544
7545 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7546 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7547
7548 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7549
7550 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7551 target.
7552
7553 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7554
7555 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7556 prototype to take a regcache. Adjust.
7557
7558 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7559
7560 * regcache.h (struct thread_info): Forward declare.
7561 (struct regcache): New.
7562 (new_register_cache): Adjust prototype.
7563 (get_thread_regcache): Declare.
7564 (free_register_cache): Adjust prototype.
7565 (registers_to_string, registers_from_string): Ditto.
7566 (supply_register, supply_register_by_name, collect_register)
7567 (collect_register_as_string, collect_register_by_name): Ditto.
7568 * regcache.c (struct inferior_regcache_data): Delete.
7569 (get_regcache): Rename to ...
7570 (get_thread_regcache): ... this. Adjust. Switch inferior before
7571 fetching registers.
7572 (regcache_invalidate_one): Adjust.
7573 (regcache_invalidate): Fix prototype.
7574 (new_register_cache): Return the new register cache.
7575 (free_register_cache): Change prototype.
7576 (realloc_register_cache): Adjust.
7577 (registers_to_string): Change prototype to take a regcache. Adjust.
7578 (registers_from_string): Ditto.
7579 (register_data): Ditto.
7580 (supply_register): Ditto.
7581 (supply_register_by_name): Ditto.
7582 (collect_register): Ditto.
7583 (collect_register_as_string): Ditto.
7584 (collect_register_by_name): Ditto.
7585 * server.c (process_serial_event): Adjust.
7586 * linux-low.h (regset_fill_func, regset_store_func): Change
7587 prototype.
7588 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7589 Change prototype.
7590 * linux-low.c (get_stop_pc): Adjust.
7591 (check_removed_breakpoint): Adjust.
7592 (linux_wait_for_event): Adjust.
7593 (linux_resume_one_lwp): Adjust.
7594 (fetch_register): Add regcache parameter. Adjust.
7595 (usr_store_inferior_registers): Ditto.
7596 (regsets_fetch_inferior_registers): Ditto.
7597 (regsets_store_inferior_registers): Ditto.
7598 (linux_fetch_registers, linux_store_registers): Ditto.
7599 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7600 regcache. Adjust.
7601 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7602 Ditto.
7603 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7604 prototype to take a regcache.
7605 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7606 * remote-utils.c (convert_ascii_to_int, outreg)
7607 (prepare_resume_reply): Change prototype to take a regcache.
7608 Adjust.
7609 * target.h (struct target_ops) <fetch_registers, store_registers>:
7610 Change prototype to take a regcache.
7611 (fetch_inferior_registers, store_inferior_registers): Change
7612 prototype to take a regcache. Adjust.
7613 * proc-service.c (ps_lgetregs): Adjust.
7614 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7615 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7616 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7617 take a regcache. Adjust.
7618 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7619 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7620 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7621 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7622 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7623 (cris_cannot_fetch_register):
7624 (cris_breakpoint_at): Change prototype to take a regcache.
7625 Adjust.
7626 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7627 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7628 to take a regcache. Adjust.
7629 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7630 Adjust.
7631 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7632 take a regcache. Adjust.
7633 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7634 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7635 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7636 * linux-mips-low.c (mips_get_pc):
7637 (mips_set_pc): Change prototype to take a regcache. Adjust.
7638 (mips_reinsert_addr): Adjust.
7639 (mips_collect_register): Change prototype to take a regcache.
7640 Adjust.
7641 (mips_supply_register):
7642 (mips_collect_register_32bit, mips_supply_register_32bit)
7643 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7644 (mips_store_fpregset): Ditto.
7645 * linux-ppc-low.c (ppc_supply_ptrace_register)
7646 (ppc_supply_ptrace_register): Ditto.
7647 (parse_spufs_run): Adjust.
7648 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7649 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7650 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7651 take a regcache. Adjust.
7652 * linux-s390-low.c (s390_collect_ptrace_register)
7653 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7654 (s390_set_pc): Change prototype to take a regcache. Adjust.
7655 (s390_arch_setup): Adjust.
7656 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7657 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7658 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7659 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7660 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7661 regcache. Adjust.
7662 (sparc_breakpoint_at): Adjust.
7663 * linux-xtensa-low.c (xtensa_fill_gregset):
7664 (xtensa_store_gregset):
7665 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7666 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7667 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7668 prototype to take a regcache. Adjust.
7669 * win32-arm-low.c (arm_fetch_inferior_register)
7670 (arm_store_inferior_register): Change prototype to take a
7671 regcache. Adjust.
7672 * win32-i386-low.c (i386_fetch_inferior_register)
7673 (i386_store_inferior_register): Change prototype to take a
7674 regcache. Adjust.
7675 * win32-low.c (child_fetch_inferior_registers)
7676 (child_store_inferior_registers): Change prototype to take a
7677 regcache. Adjust.
7678 (win32_wait): Adjust.
7679 (win32_fetch_inferior_registers): Change prototype to take a
7680 regcache. Adjust.
7681 (win32_store_inferior_registers): Adjust.
7682 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7683 store_inferior_register>: Change prototype to take a regcache.
7684
7685 2010-01-20 Doug Evans <dje@google.com>
7686
7687 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7688 #ifdef.
7689 (linux_wait_for_event1, linux_init_signals): Ditto.
7690 (W_STOPCODE): Provide definition if missing.
7691
7692 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7693
7694 * linux-low.c (linux_core_of_thread): New.
7695 (compare_ints, show_process, list_threads): New.
7696 (linux_qxfer_osdata): Report threads and cores.
7697 (linux_target_op): Register linux_core_of_thread.
7698 * remote-utils.c (prepare_resume_reply): Report the core.
7699 (buffer_xml_printf): Support %d specifier.
7700 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7701 New.
7702 (handle_query): Handle qXfer:threads. Announce availability
7703 thereof.
7704 * target.h (struct target_ops): New field core_of_thread.
7705
7706 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7707
7708 * Makefile.in (clean): Remove new generated files.
7709 (reg-s390.o, reg-s390.c): Remove rules.
7710 (reg-s390x.o, reg-s390x.c): Likewise.
7711 (s390-linux32.o, s390-linux32.c): Add rules.
7712 (s390-linux64.o, s390-linux64.c): Likewise.
7713 (s390x-linux64.o, s390x-linux64.c): Likewise.
7714 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7715 * linux-s390-low.c: Include <elf.h>.
7716 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7717 (init_registers_s390): Remove prototype.
7718 (init_registers_s390x): Likewise.
7719 (init_registers_s390_linux32): Add prototype.
7720 (init_registers_s390_linux64): Likewise.
7721 (init_registers_s390x_linux64): Likewise.
7722 (s390_num_regs_3264): New define.
7723 (s390_regmap_3264): New global variable.
7724 (s390_cannot_fetch_register): Remove obsolete check.
7725 (s390_cannot_store_register): Likewise.
7726 (s390_collect_ptrace_register): Handle upper/lower register halves.
7727 (s390_supply_ptrace_register): Likewise.
7728 (s390_fill_gregset): Update to register number changes.
7729 (s390_get_hwcap): New routine.
7730 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7731 Install appropriate regmap and register set.
7732
7733 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7734
7735 * server.c (gdbserver_version): Update copyright year to 2010.
7736 * gdbreplay.c (gdbreplay_version): Likewise.
7737
7738 2009-12-28 Doug Evans <dje@google.com>
7739
7740 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7741 elf/external.h. Include <elf.h> instead but only if necessary.
7742
7743 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7744
7745 * linux-low.c (linux_remove_process): Remove `detaching'
7746 parameter. Don't release/detach from thread_db here.
7747 (linux_kill): Release/detach from thread_db here, ...
7748 (linux_detach): ... and here, before actually detaching.
7749 (linux_wait_1): ... and here, when a process exits.
7750 * thread-db.c (any_thread_of): New.
7751 (thread_db_free): Switch the current inferior to a thread of the
7752 passed in process.
7753
7754 2009-12-21 Doug Evans <dje@google.com>
7755
7756 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7757
7758 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7759 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7760 warning ifndef __NR_tkill. Move setting of errno there too.
7761 Delete unnecessary resetting of errno after syscall.
7762 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7763
7764 * configure.ac: Check for dladdr.
7765 * config.in: Regenerate.
7766 * configure: Regenerate.
7767 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7768 (try_thread_db_load): Update.
7769
7770 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7771
7772 2009-12-18 Doug Evans <dje@google.com>
7773
7774 * event-loop.c: Include unistd.h if it exists.
7775
7776 * linux-low.c (my_waitpid): Move definition away from being in
7777 between linux_tracefork_child/linux_test_for_tracefork.
7778
7779 * gdb_proc_service.h (psaddr_t): Fix type.
7780 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7781 signature to match glibc.
7782
7783 2009-12-16 Doug Evans <dje@google.com>
7784
7785 * linux-low.c (linux_read_memory): Fix argument to read.
7786
7787 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7788
7789 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7790 events, don't leave current_inferior pointing at null.
7791
7792 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7793
7794 * win32-low.c (LOG): Delete.
7795 (OUTMSG): Output to stderr.
7796 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7797 on compile time LOG macro.
7798 (win32_wait): Fix debug output.
7799
7800 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7801
7802 * win32-low.c (win32_add_one_solib): If the dll name is
7803 "ntdll.dll", prepend the system directory to the dll path.
7804
7805 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7806
7807 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7808
7809 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7810 Vladimir Prus <vladimir@codesourcery.com>
7811
7812 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7813 * configure.ac: Check for __mcoldfire__ and set
7814 gdb_cv_m68k_is_coldfire.
7815 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7816 reg-cf.o and reg-m68k.o.
7817 * configure: Regenerated.
7818
7819 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7820
7821 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7822 Pass it to thread_db_free.
7823 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7824 proper `detaching' argument to linux_remove_process.
7825 * linux-low.h (thread_db_free): Add `detaching' parameter.
7826 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7827 to thread_db_free.
7828 (thread_db_free): Add `detaching' parameter. Only
7829 call td_ta_clear_event if detaching from process.
7830
7831 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7832
7833 * thread-db.c (thread_db_free): Fix typo.
7834
7835 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7836
7837 PR gdb/10838
7838 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7839
7840 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7841
7842 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7843 with an i686 compiler.
7844 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7845 needed.
7846 * configure: Rebuilt.
7847
7848 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7849
7850 PR gdb/10783
7851
7852 * server.c (handle_search_memory_1): Correct read_addr initialization
7853 in loop for searching subsequent chunks.
7854
7855 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7856
7857 * configure.ac: New --with-libthread-db option.
7858 * thread-db.c: Allow direct dependence on libthread_db.
7859 (thread_db_free): Adjust.
7860 * config.in: Regenerate.
7861 * configure: Likewise.
7862
7863 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7864
7865 PR gdb/10757
7866 * thread-db.c (attach_thread): New function.
7867 (maybe_attach_thread): Return success/failure.
7868 (find_new_threads_callback): Adjust.
7869 (thread_db_find_new_threads): Loop until no new threads.
7870
7871 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7872
7873 * proc-service.c (ps_lgetregs): Formatting.
7874
7875 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7876
7877 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7878 * configure.ac: Adjust.
7879 * linux-low.h (struct process_info_private): Move members to struct
7880 thread_db.
7881 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7882 * linux-low.c (linux_remove_process): Adjust.
7883 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7884 * server.c (handle_query): Move code ...
7885 (handle_monitor_command): ... here. New function.
7886 * target.h (struct target_ops): New member.
7887 * thread-db.c (struct thread_db): New.
7888 (libthread_db_search_path): New variable.
7889 (thread_db_create_event, thread_db_enable_reporting)
7890 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7891 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7892 (try_thread_db_load_1, dladdr_to_soname): New functions.
7893 (try_thread_db_load, thread_db_load_search): New functions.
7894 (thread_db_init): Search for libthread_db.
7895 (thread_db_free): New function.
7896 (thread_db_handle_monitor_command): Likewise.
7897 * config.in: Regenerate.
7898 * configure: Regenerate.
7899
7900 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7901
7902 * spu-low.c (spu_kill): Wait for inferior to terminate.
7903 Call clear_inferiors.
7904 (spu_detach): Call clear_inferiors.
7905
7906 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7907
7908 * aclocal.m4: Regenerate.
7909 * config.in: Likewise.
7910 * configure: Likewise.
7911
7912 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7913
7914 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7915 (parse_spufs_run): New function.
7916 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7917 (ppc_breakpoint_at): Handle SPU breakpoints.
7918
7919 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7920
7921 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7922 (SPUFS_MAGIC): Define.
7923 (spu_enumerate_spu_ids): New function.
7924 (linux_qxfer_spu): New function.
7925 (linux_target_ops): Install linux_qxfer_spu.
7926
7927 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7928
7929 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7930 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7931 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7932 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7933 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7934 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7935 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7936 (init_registers_powerpc_cell32l): Add prototype.
7937 (init_registers_powerpc_cell64l): Likewise.
7938 (ppc_arch_setup): Detect Cell/B.E. architecture.
7939
7940 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7941
7942 * Makefile.in (datarootdir): New variable.
7943
7944 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7945
7946 * linux-low.c (linux_write_memory): Update debugging output.
7947 * Makefile.in (clean): Add new descriptions.
7948 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7949 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7950 * configure.srv: Add new files for arm*-*-linux*.
7951 * linux-arm-low.c: Add new declarations.
7952 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7953 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7954 (HWCAP_VFPv3D16): New.
7955 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7956 instead of __IWMMXT__.
7957 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7958 (arm_arch_setup): New.
7959 (target_regsets): Remove #ifdef. Add VFP regset.
7960 (the_low_target): Use arm_arch_setup.
7961
7962 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7963
7964 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7965 the main thread again.
7966
7967 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7968
7969 Adding Neutrino gdbserver.
7970 * configure: Regenerated.
7971 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7972 * configure.srv (i[34567]86-*-nto*): New target.
7973 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7974 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7975 (nto_comctrl) [__QNX__]: New function.
7976 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7977
7978 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7979
7980 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7981 srv_tgtobj.
7982
7983 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7984 Pedro Alves <pedro@codesourcery.com>
7985
7986 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7987 don't support CONTEXT_EXTENDED_REGISTERS.
7988 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7989 (the_low_target): Install them.
7990 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7991 failing with ERROR_PIPE_NOT_CONNECTED.
7992
7993 2009-06-30 Doug Evans <dje@google.com>
7994 Pierre Muller <muller@ics.u-strasbg.fr>
7995
7996 Add h/w watchpoint support to x86-linux, win32-i386.
7997 * Makefile.in (SFILES): Add i386-low.c
7998 (i386_low_h): Define.
7999 (i386-low.o): Add dependencies.
8000 (linux-x86-low.o): Add i386-low.h dependency.
8001 (win32-i386-low.o): Ditto.
8002 * i386-low.c: New file.
8003 * i386-low.h: New file.
8004 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8005 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8006 * linux-low.c (linux_add_process): Initialize arch_private.
8007 (linux_remove_process): Free arch_private.
8008 (add_lwp): Initialize arch_private.
8009 (delete_lwp): Free arch_private.
8010 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8011 provided.
8012 * linux-low.h (process_info_private): New member arch_private.
8013 (lwp_info): New member arch_private.
8014 (linux_target_ops): New members new_process, new_thread,
8015 prepare_to_resume.
8016 (ptid_of): New macro.
8017 * linux-x86-low.c: Include stddef.h, i386-low.h.
8018 (arch_process_info): New struct.
8019 (arch_lwp_info): New struct.
8020 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8021 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8022 (i386_dr_low_get_status): New function.
8023 (x86_insert_point, x86_remove_point): New functions.
8024 (x86_stopped_by_watchpoint): New function.
8025 (x86_stopped_data_address): New function.
8026 (x86_linux_new_process, x86_linux_new_thread): New functions.
8027 (x86_linux_prepare_to_resume): New function.
8028 (the_low_target): Add entries for insert_point, remove_point,
8029 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8030 prepare_to_resume.
8031 * server.c (debug_hw_points): New global.
8032 (monitor_show_help): Document set debug-hw-points.
8033 (handle_query): Process "set debug-hw-points".
8034 * server.h (debug_hw_points): Declare.
8035 (paddress): Declare.
8036 * utils.c (NUMCELLS, CELLSIZE): New macros.
8037 (get_sell, xsnprintf, paddress): New functions.
8038 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8039 remove_point, stopped_by_watchpoint, stopped_data_address.
8040 * win32-i386-low.c: Include i386-low.h.
8041 (debug_reg_state): Replaces dr.
8042 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8043 (i386_dr_low_get_status): New function.
8044 (i386_insert_point, i386_remove_point): New functions.
8045 (i386_stopped_by_watchpoint): New function.
8046 (i386_stopped_data_address): New function.
8047 (i386_initial_stuff): Update.
8048 (get_thread_context,set_thread_context,i386_thread_added): Update.
8049 (the_low_target): Add entries for insert_point,
8050 remove_point, stopped_by_watchpoint, stopped_data_address.
8051 * win32-low.c (win32_insert_watchpoint): New function.
8052 (win32_remove_watchpoint): New function.
8053 (win32_stopped_by_watchpoint): New function.
8054 (win32_stopped_data_address): New function.
8055 (win32_target_ops): Add entries for insert_watchpoint,
8056 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8057 * win32-low.h (win32_target_ops): New members insert_point,
8058 remove_point, stopped_by_watchpoint, stopped_data_address.
8059
8060 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8061
8062 * server.c (process_serial_event): Re-return unsupported, not
8063 error, if the type isn't recognized. Re-allow supporting only
8064 insert or remove packets. Also call require_running for
8065 breakpoints. Add missing break statement to default case. Tidy.
8066 * target.h (struct target_ops): Rename insert_watchpoint to
8067 insert_point, and remove_watchpoint to remove_point.
8068
8069 * linux-low.h (struct linux_target_ops): Likewise.
8070 * linux-low.c (linux_insert_watchpoint): Rename to ...
8071 (linux_insert_point): ... this. Adjust.
8072 (linux_remove_watchpoint): Rename to ...
8073 (linux_remove_point): ... this. Adjust.
8074 (linux_target_ops): Adjust.
8075 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8076 (cris_insert_point): ... this.
8077 (cris_remove_watchpoint): Rename to ...
8078 (cris_remove_point): ... this.
8079 (the_low_target): Adjust.
8080
8081 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8082
8083 * server.c (handle_v_kill): Pass signal_pid to
8084 kill_inferior if multi_process is zero.
8085
8086 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8087
8088 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8089 * target.h (target_ops): Comment for *_watchpoint to make it clear
8090 the functions can get types '0' and '1'.
8091
8092 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8093
8094 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8095 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8096 * regcache.c (get_regcache): Likewise.
8097 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8098 * win32-low.c (child_fetch_inferior_registers): Remove check for
8099 regno 0.
8100
8101 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8102 Pedro Alves <pedro@codesourcery.com>
8103
8104 * target.h (struct target_ops) <supports_multi_process>: New
8105 callback.
8106 (target_supports_multi_process): New.
8107 * server.c (handle_query): Even if GDB reports support, only
8108 enable multi-process if the target also supports it. Report
8109 multi-process support only if the target backend supports it.
8110 * linux-low.c (linux_supports_multi_process): New function.
8111 (linux_target_ops): Install it as target_supports_multi_process
8112 callback.
8113
8114 2009-05-24 Doug Evans <dje@google.com>
8115
8116 Global renaming of find_thread_pid to find_thread_ptid.
8117 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8118 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8119 All callers updated.
8120
8121 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8122 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8123 directly.
8124
8125 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8126 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8127 (linux_resume_one_lwp): Ditto.
8128
8129 2009-05-23 Doug Evans <dje@google.com>
8130
8131 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8132 from struct inferior_list_entry * to struct lwp_info *.
8133 All callers updated.
8134
8135 2009-05-13 Doug Evans <dje@google.com>
8136
8137 * linux-x86-low.c: Don't include assert.h.
8138 (x86_siginfo_fixup): Use fatal, not assert.
8139 (x86_arch_setup): Fix comment.
8140
8141 2009-05-12 Doug Evans <dje@google.com>
8142
8143 Biarch support for i386/amd64 gdbserver.
8144 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8145 Add linux-x86-low.c.
8146 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8147 (linux-x86-low.o): Add.
8148 * linux-x86-64-low.c: Delete.
8149 * linux-i386-low.c: Delete.
8150 * linux-x86-low.c: New file.
8151 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8152 linux-x86-low.o.
8153 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8154 linux-x86-low.o.
8155 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8156 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8157 (linux_child_pid_to_exec_file): New function.
8158 (elf_64_header_p, elf_64_file_p): New functions.
8159 (siginfo_fixup): New function.
8160 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8161 give target a chance to convert layout.
8162 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8163 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8164
8165 2009-05-07 Doug Evans <dje@google.com>
8166
8167 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8168 (regsets_store_inferior_registers): Ditto.
8169
8170 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8171
8172 PR server/10048
8173
8174 * linux-low.c (must_set_ptrace_flags): Delete.
8175 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8176 of the global.
8177 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8178 `lwp->must_set_ptrace_flags' instead.
8179 (linux_wait_for_event_1): Set ptrace options here.
8180 (linux_wait_1): ... not here.
8181
8182 2009-04-30 Doug Evans <dje@google.com>
8183
8184 * inferiors.c (started_inferior_callback): New function.
8185 (attached_inferior_callback): New function.
8186 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8187 * server.c (print_started_pid, print_attached_pid): New functions.
8188 (detach_or_kill_for_exit): New function.
8189 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8190 * server.h (have_started_inferiors_p): Declare.
8191 (have_attached_inferiors_p): Declare.
8192
8193 * inferiors.c (remove_process): Fix memory leak, free process.
8194 * linux-low.c (linux_remove_process): New function.
8195 (linux_kill): Call it instead of remove_process.
8196 (linux_detach, linux_wait_1): Ditto.
8197
8198 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8199
8200 * configure.srv: Add x86 Windows CE target.
8201
8202 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8203
8204 * inferiors.c (get_thread_process): Make global.
8205 * server.h (get_thread_process): Add prototype.
8206 * thread-db.c (find_one_thread): Use get_thread_process
8207 instead of current_process.
8208 (thread_db_get_tls_address): Do not crash if called when
8209 thread layer is not yet initialized.
8210
8211 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8212
8213 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8214 * spu-low.c (current_tid): Rename to ...
8215 (current_ptid): ... this.
8216 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8217 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8218 ptid_get_lwp (current_ptid) instead of current_tid.
8219 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8220 instead of current_tid. Use find_process_pid to verify pid
8221 argument is valid. Pass proper argument to remove_process.
8222 (spu_thread_alive): Compare current_ptid instead of current_tid.
8223 (spu_resume): Likewise.
8224
8225 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8226
8227 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8228 variable.
8229
8230 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8231
8232 Implement the multiprocess extensions, and add linux multiprocess
8233 support.
8234
8235 * server.h (ULONGEST): Declare.
8236 (struct ptid, ptid_t): New.
8237 (minus_one_ptid, null_ptid): Declare.
8238 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8239 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8240 (struct inferior_list_entry): Change `id' type from unsigned from
8241 to ptid_t.
8242 (struct sym_cache, struct breakpoint, struct
8243 process_info_private): Forward declare.
8244 (struct process_info): Declare.
8245 (current_process): Declare.
8246 (all_processes): Declare.
8247 (initialize_inferiors): Declare.
8248 (add_thread): Adjust to use ptid_t.
8249 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8250 (add_process, remove_process, find_thread_pid): Declare.
8251 (find_inferior_id): Adjust to use ptid_t.
8252 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8253 (multi_process): Declare.
8254 (push_event): Adjust to use ptid_t.
8255 (read_ptid, write_ptid): Declare.
8256 (prepare_resume_reply): Adjust to use ptid_t.
8257 (clear_symbol_cache): Declare.
8258 * inferiors.c (all_processes): New.
8259 (null_ptid, minus_one_ptid): New.
8260 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8261 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8262 (add_thread): Change unsigned long to ptid. Remove gdb_id
8263 parameter. Adjust.
8264 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8265 (gdb_id_to_thread): Rename to ...
8266 (find_thread_pid): ... this. Change unsigned long to ptid.
8267 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8268 (loaded_dll, pull_pid_from_list): Adjust.
8269 (add_process, remove_process, find_process_pid)
8270 (get_thread_process, current_process, initialize_inferiors): New.
8271 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8272 (struct target_waitstatus) <related_pid>: Ditto.
8273 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8274 return type to int.
8275 (struct target_ops) <join>: Add `pid' argument.
8276 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8277 (struct target_ops) <wait>: Add `ptid' field. Change return type
8278 to ptid.
8279 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8280 (mywait): Add `ptid' argument. Change return type to ptid_t.
8281 (target_pid_to_str): Declare.
8282 * target.c (set_desired_inferior): Adjust to use ptids.
8283 (mywait): Add new `ptid' argument. Adjust.
8284 (target_pid_to_str): New.
8285 * mem-break.h (free_all_breakpoints): Declare.
8286 * mem-break.c (breakpoints): Delelete.
8287 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8288 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8289 to use per-process breakpoint list.
8290 (free_all_breakpoints): New.
8291 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8292 (symbol_cache, all_symbols_looked_up): Delete.
8293 (hexchars): New.
8294 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8295 read_ptid): New.
8296 (prepare_resume_reply): Change ptid argument's type from unsigned
8297 long to ptid_t. Adjust. Implement W;process and X;process.
8298 (free_sym_cache, clear_symbol_cache): New.
8299 (look_up_one_symbol): Adjust to per-process symbol cache. *
8300 * server.c (cont_thread, general_thread, step_thread): Change type
8301 to ptid_t.
8302 (attached): Delete.
8303 (multi_process): New.
8304 (last_ptid): Change type to ptid_t.
8305 (struct vstop_notif) <ptid>: Change type to ptid_t.
8306 (queue_stop_reply, push_event): Change `ptid' argument's type to
8307 ptid_t.
8308 (discard_queued_stop_replies): Add `pid' argument.
8309 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8310 changes. Don't reference the `attached' global.
8311 (attach_inferior): Adjust to mywait interface changes.
8312 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8313 features. Handle and report "multiprocess+". Handle
8314 "qAttached:PID".
8315 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8316 changes.
8317 (handle_v_kill): New.
8318 (handle_v_stopped): Adjust to use target_pid_to_str.
8319 (handle_v_requests): Allow multiple attaches and runs when
8320 multiprocess extensions are in effect. Handle "vKill".
8321 (myresume): Adjust to use ptids.
8322 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8323 (handle_status): Adjust to discard_queued_stop_replies interface
8324 change.
8325 (first_thread_of, kill_inferior_callback)
8326 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8327 (main): Call initialize_inferiors. Adjust to use ptids, killing
8328 and detaching from all inferiors. Handle multiprocess packet
8329 variants.
8330 * linux-low.h: Include gdb_proc_service.h.
8331 (struct process_info_private): New.
8332 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8333 <lwpid_of>: Use ptid_get_lwp.
8334 (get_lwp_thread): Adjust.
8335 (struct lwp_info): Add `dead' member.
8336 (find_lwp_pid): Declare.
8337 * linux-low.c (thread_db_active): Delete.
8338 (new_inferior): Adjust comment.
8339 (inferior_pid): Delete.
8340 (linux_add_process): New.
8341 (handle_extended_wait): Adjust.
8342 (add_lwp): Change unsigned long to ptid.
8343 (linux_create_inferior): Add process to processes table. Adjust
8344 to use ptids. Don't set new_inferior here.
8345 (linux_attach_lwp): Rename to ...
8346 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8347 it. Adjust to use ptids.
8348 (linux_attach_lwp): New.
8349 (linux_attach): Add process to processes table. Don't set
8350 new_inferior here.
8351 (struct counter): New.
8352 (second_thread_of_pid_p, last_thread_of_process_p): New.
8353 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8354 multiple processes.
8355 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8356 processes. Remove process from process table.
8357 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8358 to multiple processes.
8359 (any_thread_of): New.
8360 (linux_detach): Add `pid' argument, and handle it. Remove process
8361 from processes table.
8362 (linux_join): Add `pid' argument. Handle it.
8363 (linux_thread_alive): Change unsighed long argument to ptid_t.
8364 Consider dead lwps as not being alive.
8365 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8366 threads we're not interested in.
8367 (same_lwp, find_lwp_pid): New.
8368 (linux_wait_for_lwp): Change `pid' argument's type from int to
8369 ptid_t. Adjust.
8370 (linux_wait_for_event): Rename to ...
8371 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8372 from int to ptid_t. Adjust.
8373 (linux_wait_for_event): New.
8374 (linux_wait_1): Add `ptid' argument. Change return type to
8375 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8376 that exit from the process table.
8377 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8378 Adjust.
8379 (mark_lwp_dead): New.
8380 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8381 stopping all threads, mark its main lwp as dead.
8382 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8383 ptids.
8384 (fetch_register, usr_store_inferior_registers)
8385 (regsets_fetch_inferior_registers)
8386 (regsets_store_inferior_registers, linux_read_memory)
8387 (linux_write_memory): Inline `inferior_pid'.
8388 (linux_look_up_symbols): Adjust to use per-process
8389 `thread_db_active'.
8390 (linux_request_interrupt): Adjust to use ptids.
8391 (linux_read_auxv): Inline `inferior_pid'.
8392 (initialize_low): Don't reference thread_db_active.
8393 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8394 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8395 (ps_getpid): Return the pid of the current inferior.
8396 * thread-db.c (proc_handle, thread_agent): Delete.
8397 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8398 per-process data.
8399 (find_one_thread): Change argument type to ptid_t. Adjust to
8400 per-process data.
8401 (maybe_attach_thread): Adjust to per-process data and ptids.
8402 (thread_db_find_new_threads): Ditto.
8403 (thread_db_init): Ditto.
8404 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8405 processes table. Adjust to use ptids.
8406 (spu_kill, spu_detach): Adjust interface. Remove process from
8407 processes table.
8408 (spu_join, spu_thread_alive): Adjust interface.
8409 (spu_wait): Adjust interface. Remove process from processes
8410 table. Adjust to use ptids.
8411 * win32-low.c (current_inferior_tid): Delete.
8412 (current_inferior_ptid): New.
8413 (debug_event_ptid): New.
8414 (thread_rec): Take a ptid. Adjust.
8415 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8416 (child_delete_thread): Ditto.
8417 (do_initial_child_stuff): Add `attached' argument. Add process to
8418 processes table.
8419 (child_fetch_inferior_registers, child_store_inferior_registers):
8420 Adjust.
8421 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8422 (win32_attach): Pass 1 to do_initial_child_stuff.
8423 (win32_kill): Adjust interface. Remove process from processes
8424 table.
8425 (win32_detach): Ditto.
8426 (win32_join): Adjust interface.
8427 (win32_thread_alive): Take a ptid.
8428 (win32_resume): Adjust to use ptids.
8429 (get_child_debug_event): Ditto.
8430 (win32_wait): Adjust interface. Remove exiting process from
8431 processes table.
8432
8433 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8434
8435 Non-stop mode support.
8436
8437 * server.h (non_stop): Declare.
8438 (gdb_client_data, handler_func): Declare.
8439 (delete_file_handler, add_file_handler, start_event_loop):
8440 Declare.
8441 (handle_serial_event, handle_target_event, push_event)
8442 (putpkt_notif): Declare.
8443 * target.h (enum resume_kind): New.
8444 (struct thread_resume): Replace `step' field by `kind' field.
8445 (TARGET_WNOHANG): Define.
8446 (struct target_ops) <wait>: Add `options' argument.
8447 <supports_non_stop, async, start_non_stop>: New fields.
8448 (target_supports_non_stop, target_async): New.
8449 (start_non_stop): Declare.
8450 (mywait): Add `options' argument.
8451 * target.c (mywait): Add `options' argument. Print child exit
8452 notifications here.
8453 (start_non_stop): New.
8454 * server.c (non_stop, own_buf, mem_buf): New globals.
8455 (struct vstop_notif): New.
8456 (notif_queue): New global.
8457 (queue_stop_reply, push_event, discard_queued_stop_replies)
8458 (send_next_stop_reply): New.
8459 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8460 interface changes.
8461 (attach_inferior): In non-stop mode, don't wait for the target
8462 here.
8463 (handle_general_set): Handle QNonStop.
8464 (handle_query): When handling qC, return the current general
8465 thread, instead of the first thread of the list.
8466 (handle_query): If the backend supports non-stop mode, include
8467 QNonStop+ in the qSupported query response.
8468 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8469 and non-stop mode.
8470 (handle_v_attach, handle_v_run): Handle non-stop mode.
8471 (handle_v_stopped): New.
8472 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8473 (myresume): Adjust to use resume_kind. Handle non-stop.
8474 (queue_stop_reply_callback): New.
8475 (handle_status): Handle non-stop mode.
8476 (main): Clear non_stop flag on reconnection. Use the event-loop.
8477 Refactor serial protocol handling from here ...
8478 (process_serial_event): ... to this new function. When GDB
8479 selects any thread, select one here. In non-stop mode, wait until
8480 GDB acks all pending events before exiting.
8481 (handle_serial_event, handle_target_event): New.
8482 * remote-utils.c (remote_open): Install remote_desc in the event
8483 loop.
8484 (remote_close): Remove remote_desc from the event loop.
8485 (putpkt_binary): Rename to...
8486 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8487 (putpkt_binary): New as wrapper around putpkt_binary_1.
8488 (putpkt_notif): New.
8489 (prepare_resume_reply): In non-stop mode, don't change the
8490 general_thread.
8491 * event-loop.c: New.
8492 * Makefile.in (OBJ): Add event-loop.o.
8493 (event-loop.o): New rule.
8494
8495 * linux-low.h (pid_of): Moved here.
8496 (lwpid_of): New.
8497 (get_lwp_thread): Use lwpid_of.
8498 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8499 * linux-low.c (pid_of): Delete.
8500 (inferior_pid): Use lwpid_of.
8501 (linux_event_pipe): New.
8502 (target_is_async_p): New.
8503 (delete_lwp): New.
8504 (handle_extended_wait): Use lwpid_of.
8505 (add_lwp): Don't set lwpid field.
8506 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8507 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8508 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8509 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8510 first. Adjust to linux_wait_for_event interface changes. Use
8511 lwpid_of.
8512 (linux_detach): Don't delete the main lwp here.
8513 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8514 (status_pending_p): Don't consider explicitly suspended lwps.
8515 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8516 pointer. Add OPTIONS argument. Change return type to int. Use
8517 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8518 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8519 pointer. Add status pointer argument. Return a pid instead of a
8520 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8521 changes. In non-stop mode, don't switch to a random thread.
8522 (linux_wait): Rename to...
8523 (linux_wait_1): ... this. Add target_options argument, and handle
8524 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8525 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8526 clean exit and signal exit code. Don't stop all threads in
8527 non-stop mode. In all-stop mode, only stop all threads when
8528 reporting a stop to GDB. Handle explicit thread stop requests.
8529 (async_file_flush, async_file_mark): New.
8530 (linux_wait): New.
8531 (send_sigstop): Use lwpid_of.
8532 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8533 interface changes. In non-stop mode, don't switch to a random
8534 thread.
8535 (linux_resume_one_lwp): Use lwpid_of.
8536 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8537 (linux_resume_one_thread): ... this. Handle resume_stop. In
8538 non-stop mode, don't look for pending flag in all threads.
8539 (resume_status_pending_p): Don't consider explicitly suspended
8540 threads.
8541 (my_waitpid): Reimplement. Emulate __WALL.
8542 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8543 Use lwpid_of.
8544 (sigchld_handler, linux_supports_non_stop, linux_async)
8545 (linux_start_non_stop): New.
8546 (linux_target_ops): Register linux_supports_non_stop, linux_async
8547 and linux_start_non_stop.
8548 (initialize_low): Install SIGCHLD handler.
8549 * thread-db.c (thread_db_create_event, find_one_thread)
8550 (thread_db_get_tls_address): Use lwpid_of.
8551 * win32-low.c (win32_detach): Adjust to use resume_kind.
8552 (win32_wait): Add `options' argument.
8553 * spu-low.c (spu_resume): Adjust to use resume_kind.
8554 (spu_wait): Add `options' argument.
8555
8556 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8557
8558 Decouple target code from remote protocol.
8559
8560 * target.h (enum target_waitkind): New.
8561 (struct target_waitstatus): New.
8562 (struct target_ops) <wait>: Return an unsigned long. Take a
8563 target_waitstatus pointer instead of a char pointer.
8564 (mywait): Likewise.
8565 * target.c (mywait): Change prototype to return an unsigned long.
8566 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8567 * server.h (thread_from_wait, old_thread_from_wait): Delete
8568 declarations.
8569 (prepare_resume_reply): Change prototype to take a
8570 target_waitstatus.
8571 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8572 (last_status, last_ptid): New.
8573 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8574 pid instead of a signal.
8575 (attach_inferior): Remove "status" and "signal" parameters.
8576 Adjust.
8577 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8578 not as an address.
8579 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8580 (handle_v_requests, myresume): Remove "status" and "signal"
8581 parameters. Adjust.
8582 (handle_status): New.
8583 (main): Delete local `status'. Adjust.
8584 * remote-utils.c: Include target.h.
8585 (prepare_resume_reply): Change prototype to take a
8586 target_waitstatus. Adjust.
8587
8588 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8589 interface.
8590 * spu-low.c (spu_wait): Adjust.
8591 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8592 Delete.
8593 (win32_wait): Adjust.
8594
8595 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8596
8597 * target.h (struct thread_resume): Delete leave_stopped member.
8598 (struct target_ops): Add a `n' argument to the `resume' callback.
8599 * server.c (start_inferior): Adjust.
8600 (handle_v_cont, myresume): Adjust.
8601 * linux-low.c (check_removed_breakpoint): Adjust to resume
8602 interface change, and to removed leave_stopped field.
8603 (resume_ptr): Delete.
8604 (struct thread_resume_array): New.
8605 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8606 resume interface change.
8607 (linux_continue_one_thread, linux_queue_one_thread)
8608 (resume_status_pending_p): Check if the resume field is NULL
8609 instead of checking the leave_stopped member.
8610 (linux_resume): Adjust to the target resume interface change.
8611 * spu-low.c (spu_resume): Adjust to the target resume interface
8612 change.
8613 * win32-low.c (win32_detach, win32_resume): Ditto.
8614
8615 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8616
8617 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8618 flag.
8619 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8620 pending.
8621 (linux_continue_one_thread): Only preserve the stepping flag if
8622 there's a pending breakpoint.
8623
8624 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8625
8626 * server.c (main): After the inferior having exited, call
8627 remote_close before exiting gdbserver.
8628
8629 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8630
8631 Fix size of FPSCR in Power 7 processors.
8632 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8633 (PPC_FEATURE_HAS_DFP): New #define.
8634 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8635 size of the FPSCR.
8636
8637 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8638
8639 * server.c (handle_query) Whitespace and formatting.
8640
8641 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8642
8643 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8644 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8645 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8646 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8647 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8648 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8649 Makefile.in, configure.ac: Fix whitespace throughout.
8650 * configure: Regenerate.
8651
8652 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8653
8654 * inferiors.c (find_inferior): Make it safe for the callback
8655 function to delete the currently iterated inferior.
8656
8657 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8658
8659 * Makefile.in (linuw_low_h): Move higher.
8660 (thread-db.o): Depend on $(linux_low_h).
8661
8662 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8663
8664 Rename "process" to "lwp" throughout.
8665
8666 * linux-low.c (all_processes): Rename to...
8667 (all_lwps): ... this.
8668 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8669 (add_process): Rename to ...
8670 (add_lwp): ... this. Adjust.
8671 (linux_create_inferior): Adjust.
8672 (linux_attach_lwp): Adjust.
8673 (linux_attach): Adjust.
8674 (linux_kill_one_process): Rename to ...
8675 (linux_kill_one_lwp): ... this. Adjust.
8676 (linux_kill): Adjust.
8677 (linux_detach_one_process): Rename to ...
8678 (linux_detach_one_lwp): ... this. Adjust.
8679 (linux_detach): Adjust.
8680 (check_removed_breakpoint): Adjust.
8681 (status_pending_p): Adjust.
8682 (linux_wait_for_process): Rename to ...
8683 (linux_wait_for_lwp): ... this. Adjust.
8684 (linux_wait_for_event): Adjust.
8685 (send_sigstop): Adjust.
8686 (wait_for_sigstop): Adjust.
8687 (stop_all_processes): Rename to ...
8688 (stop_all_lwps): ... this.
8689 (linux_resume_one_process): Rename to ...
8690 (linux_resume_one_lwp): ... this. Adjust.
8691 (linux_set_resume_request, linux_continue_one_thread)
8692 (linux_queue_one_thread, resume_status_pending_p)
8693 (usr_store_inferior_registers, regsets_store_inferior_registers)
8694 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8695 Adjust.
8696 * linux-low.h (get_process): Rename to ...
8697 (get_lwp): ... this. Adjust.
8698 (get_thread_process): Rename to ...
8699 (get_thread_lwp): ... this. Adjust.
8700 (get_process_thread): Rename to ...
8701 (get_lwp_thread): ... this. Adjust.
8702 (struct process_info): Rename to ...
8703 (struct lwp_info): ... this.
8704 (all_processes): Rename to ...
8705 (all_lwps): ... this.
8706 * proc-service.c (ps_lgetregs): Adjust.
8707 * thread-db.c (thread_db_create_event, find_one_thread)
8708 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8709
8710 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8711
8712 * server.c (handle_query): Handle "qAttached".
8713
8714 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8715
8716 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8717 GPLv3, update license URL.
8718
8719 2009-03-01 Doug Evans <dje@google.com>
8720
8721 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8722 (server_h): Add gdb_signals.h.
8723 (signals.o): Update.
8724 * server.h (target_signal_from_host,target_signal_to_host_p)
8725 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8726
8727 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8728
8729 * remote-utils.c (getpkt): Also generate remote-debug
8730 information if noack_mode is set.
8731
8732 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8733
8734 * server.c (handle_query): Report qXfer:siginfo:read and
8735 qXfer:siginfo:write as supported and handle them.
8736 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8737 * linux-low.c (linux_xfer_siginfo): New.
8738 (linux_target_ops): Set it.
8739
8740 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8741
8742 * server.c (gdbserver_usage): Mention --remote-debug.
8743 (main): Accept '--remote-debug' switch.
8744
8745 2009-01-18 Doug Evans <dje@google.com>
8746
8747 * regcache.c (new_register_cache): No need to check result of xcalloc.
8748 * server.c (handle_search_memory): Back out calls to xmalloc,
8749 result is checked and error is returned to user upon failure.
8750 (handle_query): Ditto. Add more checks for result of malloc.
8751 (handle_v_cont): Check result of malloc, report error back to
8752 user upon failure.
8753 (handle_v_run): Ditto. Call freeargv.
8754 * server.h (freeargv): Declare.
8755 * utils.c (freeargv): New fn.
8756
8757 2009-01-15 Doug Evans <dje@google.com>
8758
8759 * gdbreplay.c (perror_with_name): Make arg const char *.
8760 * server.h (target_signal_to_name): Make return type const char *.
8761 * thread-db.c (thread_db_err_str): Make return type const char *.
8762 * utils.c (perror_with_name): Make arg const char *.
8763
8764 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8765
8766 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8767 when handling a EXIT_PROCESS_DEBUG_EVENT.
8768
8769 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8770
8771 * gdbreplay.c (gdbreplay_version): Update copyright year.
8772 * server.c (gdbserver_version): Likewise.
8773
8774 2009-01-05 Doug Evans <dje@google.com>
8775
8776 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8777 (handle_extended_wait): Improve comment.
8778
8779 2008-12-13 Doug Evans <dje@google.com>
8780
8781 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8782 * server.h (ATTR_MALLOC): New macro.
8783 (xmalloc,xcalloc,xstrdup): Declare.
8784 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8785 * inferiors.c: Ditto.
8786 * linux-low.c: Ditto.
8787 * mem-break.c: Ditto.
8788 * regcache.c: Ditto.
8789 * remote-utils.c: Ditto.
8790 * server.c: Ditto.
8791 * target.c: Ditto.
8792 * win32-low.c: Ditto.
8793
8794 2008-12-12 Doug Evans <dje@google.com>
8795
8796 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8797 in debugging printf.
8798
8799 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8800
8801 2008-12-09 Doug Evans <dje@google.com>
8802
8803 * linux-low.h (struct process_info): Delete member tid, unused.
8804 * thread-db.c (find_one_thread): Update.
8805 (maybe_attach_thread): Update.
8806
8807 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8808
8809 * target.h (struct target_ops): Add qxfer_osdata member.
8810 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8811 and dirent.h.
8812 (linux_qxfer_osdata): New functions.
8813 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8814 callback.
8815 * server.c (handle_query): Handle "qXfer:osdata:read:".
8816 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8817 (buffer_xml_printf): New functions.
8818 * server.h (struct buffer): New.
8819 (buffer_grow_str, buffer_grow_str0): New macros.
8820 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8821 (buffer_xml_printf): Declare.
8822
8823 2008-11-24 Doug Evans <dje@google.com>
8824
8825 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8826
8827 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8828
8829 * server.c (handle_v_run): Always use the supplied argument list.
8830
8831 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8832
8833 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8834 (xtensa_regmap_table): Add entry for scompare1.
8835
8836 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8837
8838 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8839 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8840 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8841 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8842 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8843 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8844 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8845 XML target descriptions.
8846 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8847 when inferior is running on an ISA 2.05 or later processor. Add
8848 special case to return offset for full 64-bit slot of FPSCR when
8849 in 32-bits.
8850
8851 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8852
8853 * Makefile.in (SFILES, clean): Added sparc64 files.
8854 (reg-sparc64.o, reg-sparc64.c): New.
8855 * configure.srv (sparc*-*-linux*): New configuration.
8856 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8857 syscall arguments for SPARC.
8858 (regsets_store_inferior_registers): Likewise.
8859 * linux-sparc-low.c: New file.
8860
8861 2008-10-21 Doug Evans <dje@google.com>
8862
8863 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8864 (READLINE_DIR,READLINE_DEP): Delete.
8865 (INTERNAL_CFLAGS): Update.
8866 (LINTFLAGS): Update.
8867
8868 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8869
8870 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8871 whole argv from the last run, not just argv[0].
8872
8873 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8874
8875 * regcache.c (new_register_cache): Return NULL if the register
8876 cache size isn't known yet.
8877 (free_register_cache): Avoid dereferencing a NULL regcache.
8878
8879 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8880
8881 * configure.srv: Merge MIPS and MIPS64.
8882
8883 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8884
8885 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8886
8887 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8888
8889 * Makefile.in: Add required vsx dependencies.
8890
8891 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8892 Declare init_registers_powerpc_vsx32l.
8893 Declare init_registers_powerpc_vsx64l.
8894 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8895 (ppc_arch_setup): Check for VSX in hwcap.
8896 (ppc_fill_vsxregset): New function.
8897 (ppc_store_vsxregset): New function.
8898 Add new VSX entry in regset_info target_regsets.
8899
8900 * configure.srv: Add new VSX dependencies.
8901
8902 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8903
8904 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8905 (remote_open): Set or clear transport_is_reliable.
8906 (putpkt_binary): Don't expect acks in noack mode.
8907 (getpkt): Don't send ack/nac in noack mode.
8908 * server.c (handle_general_set): Handle QStartNoAckMode.
8909 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8910 qSupported.
8911 (main): Reset noack_mode on every connection.
8912 * server.h (noack_mode): Declare.
8913
8914 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8915
8916 * Makefile.in (GDBREPLAY_OBS): New variable.
8917 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8918
8919 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8920 Daniel Jacobowitz <dan@codesourcery.com>
8921
8922 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8923 (usr_store_inferior_registers): Likewise.
8924 (regsets_store_inferior_registers): Likewise.
8925
8926 2008-07-31 Rolf Jansen <rj@surtec.com>
8927 Pedro Alves <pedro@codesourcery.com>
8928
8929 * configure.ac: Check for memmem declaration.
8930 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8931 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8932 (disable_packet_qfThreadInfo): Unconditionally compile.
8933 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8934 * configure, config.in: Regenerate.
8935
8936 2008-07-28 Doug Kwan <dougkwan@google.com>
8937
8938 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8939 (linux_write_memory): Remove declaration of errno.
8940
8941 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8942
8943 * linux-low.c (handle_extended_wait): Do not use "status"
8944 variable uninitialized.
8945
8946 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8947
8948 * server.c (handle_v_attach): Inhibit reporting dll changes.
8949
8950 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8951
8952 * remote-utils.c (prepare_resume_reply): If requested, don't
8953 output "thread:TID" in the T stop reply.
8954
8955 * server.c (disable_packet_vCont, disable_packet_Tthread)
8956 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8957 (handle_query): If requested, disable support for qC, qfThreadInfo
8958 and qsThreadInfo.
8959 (handle_v_requests): If requested, disable support for vCont.
8960 (gdbserver_show_disableable): New.
8961 (main): Handle --disable-packet and --disable-packet=LIST.
8962
8963 * server.h (disable_packet_vCont, disable_packet_Tthread)
8964 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8965
8966 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8967
8968 * server.c (gdbserver_usage): Mention --version.
8969
8970 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8971
8972 * Makefile.in (gdbreplay.o): New rule.
8973
8974 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8975
8976 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8977 message, not gdbserver.
8978
8979 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8980 Nathan Sidwell <nathan@codesourcery.com>
8981 Joseph Myers <joseph@codesourcery.com>
8982
8983 * acinclude.m4: Include ../../config/acx.m4.
8984 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8985 * configure, config.in: Regenerate.
8986 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8987 * server.c (gdbserver_version): Print PKGVERSION.
8988 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8989 (main): Adjust gdbserver_usage calls.
8990 * gdbreplay.c (version, host_name): Add declarations.
8991 (gdbreplay_version, gdbreplay_usage): New.
8992 (main): Accept --version and --help options.
8993
8994 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8995
8996 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8997 (arm_breakpoint_at): Handle Thumb.
8998 (the_low_target): Add comment.
8999
9000 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9001
9002 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9003
9004 2008-05-09 Doug Evans <dje@google.com>
9005
9006 * server.h (decode_search_memory_packet): Declare.
9007 * remote-utils.c (decode_search_memory_packet): New fn.
9008 * server.c (handle_search_memory_1): New fn.
9009 (handle_search_memory): New fn.
9010 (handle_query): Process qSearch:memory packets.
9011
9012 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9013
9014 * regcache.c (registers_length): Remove.
9015 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9016 full register packet.
9017 * regcache.h (registers_length): Remove prototype.
9018 * server.h (PBUFSIZ): Define to 16384.
9019
9020 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9021
9022 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9023 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9024 powerpc-64l.o, and powerpc-altivec64l.o.
9025 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9026 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9027 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9028 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9029 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9030 to srv_xmlfiles.
9031
9032 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9033 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9034 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9035 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9036 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9037 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9038 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9039 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9040 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9041 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9042 (clean): Update.
9043
9044 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9045 (init_registers_powerpc_32l): ... this new prototype.
9046 (init_registers_powerpc_32): Remove, replace by ...
9047 (init_registers_powerpc_altivec32l): ... this new prototype.
9048 (init_registers_powerpc_e500): Remove, replace by ...
9049 (init_registers_powerpc_e500l): ... this new prototype.
9050 (init_registers_ppc64): Remove, replace by ...
9051 (init_registers_powerpc_64l): ... this new prototype.
9052 (init_registers_powerpc_64): Remove, replace by ...
9053 (init_registers_powerpc_altivec64l): ... this new prototype.
9054 (ppc_num_regs): Set to 73.
9055 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9056 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9057 (ppc_cannot_store_register): Handle orig_r3 and trap.
9058 (ppc_arch_setup): Update init_registers_... calls.
9059 (ppc_fill_gregset): Handle orig_r3 and trap.
9060
9061 * inferiors.c (clear_inferiors): Reset current_inferior.
9062
9063 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9064
9065 * acinclude.m4: Add override.m4.
9066 * configure: Regenerate.
9067
9068 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9069
9070 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9071 initial call to init_register_ppc64.
9072
9073 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9074
9075 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9076 single powerpc*-*-linux* case.
9077 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9078
9079 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9080
9081 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9082 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9083 from reg_xmlfiles.
9084 * linux-ppc-low.c: Include <elf.h>.
9085 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9086 (ppc_hwcap): New global variable.
9087 (ppc_regmap): Remove __SPE__ #ifdef sections.
9088 (ppc_regmap_e500): New global variable.
9089 (ppc_cannot_store_register): Update __SPE__ special case.
9090 (ppc_get_hwcap): New function.
9091 (ppc_arch_setup): Use it to determine whether inferior supports
9092 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9093 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9094 Do not access registers if target does not support AltiVec.
9095 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9096 Do not access registers if target does not support SPE.
9097 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9098
9099 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9100
9101 * linux-low.c (disabled_regsets, num_regsets): New.
9102 (use_regsets_p): Delete.
9103 (linux_wait_for_process): Clear disabled_regsets.
9104 (regsets_fetch_inferior_registers): Check and set it.
9105 (regsets_store_inferior_registers): Likewise.
9106 (linux_fetch_registers, linux_store_registers): Do not use
9107 use_regsets_p.
9108 (initialize_low): Allocate disabled_regsets.
9109
9110 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9111
9112 * Makefile.in (LIBOBJS): New.
9113 (OBS): Use LIBOBJS.
9114 (memmem.o): New rule.
9115 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9116 * configure: Regenerated.
9117
9118 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9119
9120 * server.c (handle_query): Never return "unsupported" for
9121 qXfer:features:read queries.
9122
9123 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9124
9125 * server.c (get_features_xml): Fix inverted condition.
9126 (handle_query): Always support qXfer:feature:read.
9127
9128 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9129
9130 * server.c (wrapper_argv): New.
9131 (start_inferior): Handle wrapper_argv. If set, expect an extra
9132 trap.
9133 (gdbserver_usage): Document --wrapper.
9134 (main): Parse --wrapper.
9135
9136 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9137
9138 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9139 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9140 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9141 (ppc_set_pc): Likewise.
9142 (ppc_arch_setup): New function.
9143 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9144 of collect_register.
9145 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9146
9147 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9148
9149 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9150 instead of linux-ppc64-low.o.
9151 * linux-ppc64-low.c: Remove file.
9152 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9153 (linux-ppc64-low.o): Remove rule.
9154
9155 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9156 (init_registers_powerpc_64): Likewise.
9157 (ppc_regmap): Conditionally define depending on __powerpc64__.
9158 (ppc_cannot_store_register): Do not special-case "fpscr" when
9159 compiled on __powerpc64__.
9160 (ppc_collect_ptrace_register): New function.
9161 (ppc_supply_ptrace_register): New function.
9162 (ppc_breakpoint): Change type to "unsigned int".
9163 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9164 (the_low_target): Conditionally provide initializers for the
9165 arch_setup member depending on __powerpc64__. Install
9166 collect_ptrace_register and supply_ptrace_register members.
9167
9168 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9171 * server.c (gdbserver_xmltarget): Define.
9172 (get_features_xml): Use it to replace "target.xml" and arch_string.
9173
9174 * configure.srv: Remove srv_xmltarget. Add XML files that were
9175 mentioned there to srv_xmlfiles instead. Remove conditional tests
9176 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9177 srv_xmlfiles and srv_regobj to include all possible choices.
9178 * configure.ac (srv_xmltarget): Remove.
9179 (srv_xmlfiles): Do not add "target.xml".
9180 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9181 checks for supplementary target information.
9182 * configure: Regenerate.
9183 * Makefile.in (XML_TARGET): Remove.
9184 (target.xml): Remove rule.
9185 (clean): Do not clean up target.xml.
9186 (.PRECIOUS): Do not mention target.xml.
9187
9188 * target.h (struct target_ops): Remove arch_string member.
9189 * linux-low.c (linux_arch_string): Remove.
9190 (linux_target_ops): Remove arch_string initializer.
9191 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9192 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9193 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9194 * spu-low.c (spu_arch_string): Remove.
9195 (spu_target_ops): Remove arch_string initializer.
9196 * win32-low.c (win32_arch_string): Remove.
9197 (win32_target_ops): Remove arch_string initializer.
9198 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9199 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9200 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9201
9202 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9203
9204 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9205 by collect_ptrace_register and supply_ptrace_register hooks.
9206 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9207 instead of checking for the_low_target.left_pad_xfer.
9208 (usr_store_inferior_registers): Use collect_ptrace_register callback
9209 instead of checking for the_low_target.left_pad_xfer.
9210
9211 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9212 (s390_supply_ptrace_register): Likewise.
9213 (s390_fill_gregset): Call s390_collect_ptrace_register.
9214 (the_low_target): Update.
9215
9216 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9217 (ppc_supply_ptrace_register): Likewise.
9218 (the_low_target): Update.
9219
9220 * linux-i386-low.c (the_low_target): Update.
9221 * linux-x86-64-low.c (the_low_target): Update.
9222
9223 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9224
9225 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9226 reg-s390.o and reg-s390x.o.
9227
9228 * linux-low.c (new_inferior): New global variable.
9229 (linux_create_inferior, linux_attach): Set it.
9230 (linux_wait_for_process): Call the_low_target.arch_setup after the
9231 target has stopped for the first time.
9232 (initialize_low): Do not call the_low_target.arch_setup.
9233
9234 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9235 (s390_set_pc): Likewise.
9236 (s390_arch_setup): New function.
9237 (the_low_target): Use s390_arch_setup as arch_setup routine.
9238
9239 * regcache.c (realloc_register_cache): New function.
9240 (set_register_cache): Call it for each existing regcache.
9241
9242 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9243
9244 * server.h (init_registers): Remove prototype.
9245
9246 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9247 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9248 instead of init_registers ().
9249 * linux-arm-low.c (init_registers_arm): Add prototype.
9250 (init_registers_arm_with_iwmmxt): Likewise.
9251 (the_low_target): Add initializer for arch_setup field.
9252 * linux-cris-low.c (init_registers_cris): Add prototype.
9253 (the_low_target): Add initializer for arch_setup field.
9254 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9255 (the_low_target): Add initializer for arch_setup field.
9256 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9257 (the_low_target): Add initializer for arch_setup field.
9258 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9259 (the_low_target): Add initializer for arch_setup field.
9260 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9261 (the_low_target): Add initializer for arch_setup field.
9262 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9263 (the_low_target): Add initializer for arch_setup field.
9264 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9265 (init_registers_mips64_linux): Likewise.
9266 (the_low_target): Add initializer for arch_setup field.
9267 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9268 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9269 (the_low_target): Add initializer for arch_setup field.
9270 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9271 (init_registers_powerpc_64): Likewise.
9272 (the_low_target): Add initializer for arch_setup field.
9273 * linux-s390-low.c (init_registers_s390): Add prototype.
9274 (init_registers_s390x): Likewise.
9275 (the_low_target): Add initializer for arch_setup field.
9276 * linux-sh-low.c (init_registers_sh): Add prototype.
9277 (the_low_target): Add initializer for arch_setup field.
9278 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9279 (the_low_target): Add initializer for arch_setup field.
9280 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9281 (the_low_target): Add initializer for arch_setup field.
9282
9283 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9284 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9285 instead of init_registers ().
9286 * win32-arm-low.c (init_registers_arm): Add prototype.
9287 (the_low_target): Add initializer for arch_setup field.
9288 * win32-i386-low.c (init_registers_i386): Add prototype.
9289 (the_low_target): Add initializer for arch_setup field.
9290
9291 * spu-low.c (init_registers_spu): Add prototype.
9292 (initialize_low): Call initialie_registers_spu () instead of
9293 initialize_registers ().
9294
9295 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9296
9297 * server.c (handle_v_requests): When handling the vRun and vAttach
9298 packets, if already debugging a process, don't kill it. Return an
9299 error instead.
9300
9301 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9302
9303 * server.c (handle_query): Correct length check.
9304
9305 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9306
9307 * win32-low.c (do_initial_child_stuff): Add process handle
9308 parameter. Set current_process_handle and current_process_id from the
9309 parameters. Clear globals.
9310 (win32_create_inferior): Don't set current_process_handle and
9311 current_process_id here. Instead pass them on the call to
9312 do_initial_child_stuff.
9313 (win32_attach): Likewise.
9314 (win32_clear_inferiors): New.
9315 (win32_kill): Don't close the current process handle or the
9316 current thread handle here. Instead call win32_clear_inferiors.
9317 (win32_detach): Don't open a new handle to the process. Call
9318 win32_clear_inferiors.
9319 (win32_join): Don't rely on current_process_handle; open a new
9320 handle using the process id.
9321 (win32_wait): Call win32_clear_inferiors when the inferior process
9322 has exited.
9323
9324 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9325
9326 * server.c (monitor_show_help): Add "exit".
9327
9328 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9329
9330 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9331 (clean): Add reg-xtensa.c.
9332 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9333 * configure.srv (xtensa*-*-linux*) New target.
9334 * linux-xtensa-low.c: New.
9335 * xtensa-xtregs.c: New.
9336
9337 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9338
9339 * hostio.c: Don't include errno.h.
9340 (errno_to_fileio_errno): Move to hostio-errno.
9341 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9342 error number outputting to the target->hostio_last_error callback.
9343 (hostio_packet_error): Use FILEIO_EINVAL directly.
9344 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9345 calls to hostio_error.
9346 * hostio-errno.c: New.
9347 * server.h (hostio_last_error_from_errno): Declare.
9348 * target.h (target_ops): Add hostio_last_error member.
9349 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9350 as hostio_last_error handler.
9351 * spu-low.c (spu_target_ops): Likewise.
9352 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9353 (wince_hostio_last_error): New functions.
9354 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9355 as hostio_last_error handler.
9356 (win32_target_ops) [!_WIN32_WCE]: Register
9357 hostio_last_error_from_errno as hostio_last_error handler.
9358 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9359 (hostio-errno.o): New rule.
9360 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9361 * configure.srv (srv_hostio_err_objs): New variable. Default to
9362 hostio-errno.o.
9363 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9364 * configure: Regenerate.
9365
9366 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9367
9368 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9369 (linux_kill, linux_detach): Clean up the process list.
9370 * remote-utils.c (remote_open): Improve port number parsing.
9371 (putpkt_binary, input_interrupt): Only send interrupts if the target
9372 is running.
9373 * server.c (extended_protocol): Make static.
9374 (attached): Define earlier.
9375 (exit_requested, response_needed, program_argv): New variables.
9376 (target_running): New.
9377 (start_inferior): Clear attached here.
9378 (attach_inferior): Set attached here.
9379 (require_running): Define.
9380 (handle_query): Use require_running and target_running. Implement
9381 "monitor exit".
9382 (handle_v_attach, handle_v_run): New.
9383 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9384 (gdbserver_usage): Update.
9385 (main): Redo argument parsing. Handle --debug and --multi. Handle
9386 --attach along with other options or after the port. Save
9387 program_argv. Support no initial program. Resynchronize
9388 communication with GDB after an error. Handle "monitor exit".
9389 Use require_running and target_running. Always allow the extended
9390 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9391 restart in extended mode.
9392 * README: Refer to the GDB manual. Update --attach usage.
9393
9394 2007-12-20 Andreas Schwab <schwab@suse.de>
9395
9396 * linux-low.c (STACK_SIZE): Define.
9397 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9398 (linux_test_for_tracefork): Likewise.
9399
9400 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * linux-low.c (linux_wait_for_event): Update messages. Do not
9403 reinsert auto-delete breakpoints.
9404 * mem-break.c (struct breakpoint): Change return type of handler to
9405 int.
9406 (set_breakpoint_at): Update handler type.
9407 (reinsert_breakpoint_handler): Return 1 instead of calling
9408 delete_breakpoint.
9409 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9410 setting a new one.
9411 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9412 * mem-break.h (set_breakpoint_at): Update handler type.
9413 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9414 * win32-low.c (auto_delete_breakpoint): New.
9415 (get_child_debug_event): Use it.
9416
9417 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9418
9419 * configure.ac: Check for pread and pwrite.
9420 * hostio.c (handle_pread): Fall back to lseek and read.
9421 (handle_pwrite): Fall back to lseek and write.
9422 * config.in, configure: Regenerated.
9423
9424 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9425
9426 * server.c (myresume): Add own_buf argument.
9427 (main): Update calls.
9428
9429 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9430
9431 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9432 * remote-utils.c (remote_open): Do not call disable_async_io.
9433 (block_async_io): Delete.
9434 (unblock_async_io): Make static.
9435 (initialize_async_io): New.
9436 * server.c (handle_v_cont): Handle async I/O here.
9437 (myresume): Likewise. Move other common resume tasks here...
9438 (main): ... from here. Call initialize_async_io. Disable async
9439 I/O before the main loop.
9440 * server.h (initialize_async_io): Declare.
9441 (block_async_io, unblock_async_io): Delete prototypes.
9442 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9443
9444 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9445
9446 * remote-utils.c (readchar): Allow binary data in received messages.
9447
9448 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9449
9450 * win32-low.c (attaching): New global.
9451 (win32_create_inferior): Clear the `attaching' global.
9452 (win32_attach): Set the `attaching' global.
9453 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9454 attaching. Only set a breakpoint at the entry point if not
9455 attaching.
9456
9457 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9458
9459 * server.c (main): Don't report dll events on the initial
9460 connection on attaches.
9461
9462 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9463
9464 * server.c (main): Relax numerical bases supported for the pid of
9465 the --attach command line argument.
9466
9467 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9468
9469 * win32-low.c (win32_attach): Call OpenProcess before
9470 DebugActiveProcess, not after. Add last error output to error
9471 call.
9472
9473 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9474
9475 * win32-low.c (win32_get_thread_context)
9476 (win32_set_thread_context): New functions.
9477 (thread_rec): Use win32_get_thread_context.
9478 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9479 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9480 field.
9481
9482 2007-12-03 Leo Zayas
9483 Pedro Alves <pedro_alves@portugalmail.pt>
9484
9485 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9486 global variables.
9487 (child_add_thread): Minor cleanup.
9488 (child_continue): Resume artificially suspended threads before
9489 calling ContinueDebugEvent.
9490 (suspend_one_thread): New.
9491 (fake_breakpoint_event): New.
9492 (get_child_debug_event): Change return type to int. Check here if
9493 gdb sent an interrupt request. If a soft interrupt was requested,
9494 fake a breakpoint event. Return 0 if there is no event to handle,
9495 and 1 otherwise.
9496 (win32_wait): Don't check here if gdb sent an interrupt request.
9497 Ensure there is a valid event to handle.
9498 (win32_request_interrupt): Add soft interruption method as last
9499 resort.
9500
9501 2007-12-03 Leo Zayas
9502 Pedro Alves <pedro_alves@portugalmail.pt>
9503
9504 * win32-low.h (win32_thread_info): Add descriptions to the
9505 structure members. Replace `suspend_count' counter by a
9506 `suspended' flag.
9507 * win32-low.c (thread_rec): Update condition of when to get the
9508 context from the inferior. Rely on ContextFlags being set if it
9509 has already been retrieved. Only suspend the inferior thread if
9510 we haven't already. Warn if that fails.
9511 (continue_one_thread): s/suspend_count/suspended/. Only call
9512 ResumeThread once. Warn if that fails.
9513
9514 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9515
9516 * win32-low.c (win32_wait): Don't read from the inferior when it
9517 has already exited.
9518
9519 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9520
9521 * Makefile.in (win32_low_h): New variable.
9522 (win32-low.o): Add dependency on $(win32_low_h).
9523 (win32-arm-low.o, win32-i386-low.o): New rules.
9524
9525 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9526
9527 * hostio.c: Correct copyright year.
9528
9529 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9530
9531 * Makefile.in (OBS): Add hostio.o.
9532 (hostio.o): New rule.
9533 * server.h (handle_vFile): Declare.
9534 * hostio.c: New file.
9535 * server.c (handle_v_requests): Take packet_len and new_packet_len
9536 for binary packets. Call handle_vFile.
9537 (main): Update call to handle_v_requests.
9538
9539 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9540
9541 * linux-low.c: Include <sched.h>.
9542
9543 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9544
9545 * linux-low.c (linux_tracefork_grandchild): New.
9546 (linux_tracefork_child): Use clone.
9547 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9548
9549 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9550
9551 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9552
9553 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9554
9555 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9556
9557 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9558
9559 * inferiors.c (change_inferior_id): Delete.
9560 (add_pid_to_list, pull_pid_from_list): New.
9561 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9562 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9563 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9564 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9565 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9566 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9567 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9568 (using_threads): Always set to 1.
9569 (handle_extended_wait): New.
9570 (add_process): Do not set TID.
9571 (linux_create_inferior): Set must_set_ptrace_flags.
9572 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9573 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9574 (linux_thread_alive): Rename TID argument to LWPID.
9575 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9576 (linux_wait_for_event): Do not use TID or check using_threads. Update
9577 call to dead_thread_notify. Call handle_extended_wait.
9578 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9579 (send_sigstop): Delete sigstop_sent.
9580 (wait_for_sigstop): Avoid TID.
9581 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9582 (linux_test_for_tracefork): New.
9583 (linux_lookup_signals): Use thread_db_active and
9584 linux_supports_tracefork_flag.
9585 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9586 * linux-low.h (get_process_thread): Avoid TID.
9587 (struct process_ifo): Move thread_known and tid to the end. Remove
9588 sigstop_sent.
9589 (linux_attach_lwp, thread_db_init): Update prototypes.
9590 * server.h (change_inferior_id): Delete prototype.
9591 (add_pid_to_list, pull_pid_from_list): New prototypes.
9592 * thread-db.c (thread_db_use_events): New.
9593 (find_first_thread): Rename to...
9594 (find_one_thread): ...this. Update callers and messages. Do not
9595 call fatal. Check thread_db_use_events. Do not call
9596 change_inferior_id or new_thread_notify.
9597 (maybe_attach_thread): Update. Do not call new_thread_notify.
9598 (thread_db_init): Set thread_db_use_events. Check use_events.
9599 * utils.c (fatal, warning): Correct message prefix.
9600
9601 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9602
9603 * Makefile.in (clean): Remove new files.
9604 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9605 (powerpc-64.o, powerpc-64.c): New rules.
9606 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9607 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9608 with SPE.
9609 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9610 SPE targets.
9611 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9612 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9613 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9614 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9615 (target_regsets): Add AltiVec and SPE register sets.
9616 * configure.ac: Check for AltiVec and SPE.
9617 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9618 (ppc_fill_vrregset, ppc_store_vrregset): New.
9619 (target_regsets): Add AltiVec register set.
9620 * configure: Regenerated.
9621
9622 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9623
9624 * linux-low.c (O_LARGEFILE): Define.
9625 (linux_read_memory): Use /proc/PID/mem.
9626 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9627 * configure, config.in: Regenerated.
9628
9629 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9630
9631 * linux-low.c (linux_wait_for_event): Do not pass signals while
9632 single-stepping.
9633
9634 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9635
9636 * win32-low.c (create_process): New.
9637 (win32_create_inferior): Use create_process instead of
9638 CreateProcess. If create_process failed retry appending an ".exe"
9639 suffix. Store the GetLastError result immediatelly after
9640 create_process calls and use it on the call to error.
9641
9642 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9643
9644 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9645
9646 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9647
9648 * configure.ac: Switch license to GPLv3.
9649
9650 2007-08-01 Michael Snyder <msnyder@access-company.com>
9651
9652 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9653
9654 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9655
9656 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9657 typedef.
9658 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9659 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9660 CloseToolhelp32Snapshot.
9661 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9662 CloseToolhelp32Snapshot.
9663
9664 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9665
9666 * server.c (main): Check for inferior exit before main loop.
9667
9668 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9669
9670 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9671 instead of on tmp_desc.
9672
9673 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9674 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9677 (add_thread): Minor cleanups.
9678 (clear_inferiors): Move lower in the file. Clear the DLL
9679 list.
9680 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9681 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9682 (xml_escape_text): New.
9683 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9684 for qSupported.
9685 (handle_v_cont): Report errors.
9686 (gdbserver_version): Update.
9687 (main): Correct size of own_buf. Do not report initial DLL events.
9688 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9689 (unloaded_dll, xml_escape_text): New.
9690 * win32-low.c (enum target_waitkind): Update comments.
9691 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9692 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9693 (win32_EnumProcessModules, win32_GetModuleInformation)
9694 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9695 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9696 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9697 (win32_Module32First, win32_Module32Next, load_toolhelp)
9698 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9699 (get_child_debug_event): Handle DLL events.
9700 (win32_wait): Likewise.
9701
9702 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9703
9704 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9705 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9706
9707 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9708
9709 * win32-low.c (handle_output_debug_string): Ignore event if not
9710 waiting.
9711
9712 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9713
9714 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9715
9716 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9717
9718 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9719
9720 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9721
9722 * inferiors.c (change_inferior_id): Add comment.
9723 * linux-low.c (check_removed_breakpoint): Add an early
9724 prototype. Improve debug output.
9725 (linux_attach): Doc update.
9726 (linux_detach_one_process, linux_detach): Clean up before releasing
9727 each process.
9728 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9729 * linux-low.h (struct process_info): Doc improvement.
9730 * mem-break.c (delete_all_breakpoints): New.
9731 * mem-break.h (delete_all_breakpoints): New prototype.
9732 * thread-db.c (find_first_thread): New.
9733 (thread_db_create_event): Call it instead of
9734 thread_db_find_new_threads. Clean up unused variables.
9735 (maybe_attach_thread): Remove first thread handling.
9736 (thread_db_find_new_threads): Use find_first_thread.
9737 (thread_db_get_tls_address): Likewise.
9738
9739 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9740
9741 * thread-db.c (thread_db_find_new_threads): Add prototype.
9742 (thread_db_create_event): Check for the main thread before adding
9743 a new thread.
9744 (maybe_attach_thread): Only enable event reporting if TID == 0.
9745 (thread_db_get_tls_address): Check for new threads.
9746
9747 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * linux-low.c (linux_create_inferior): Try execv before execvp.
9750 * spu-low.c (spu_create_inferior): Likewise.
9751
9752 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9753
9754 * linux-low.c (linux_create_inferior): Change execv to execvp.
9755 * spu-low.c (spu_create_inferior): Likewies.
9756
9757 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9758
9759 * Makefile.in (clean): Clean new files instead of deleted ones.
9760 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9761 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9762 rules.
9763 * configure.srv: Specify XML files and new regformats for MIPS and
9764 MIPS64 GNU/Linux.
9765 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9766 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9767 an entry for the restart register.
9768 (mips_cannot_fetch_register, mips_cannot_store_register)
9769 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9770 register names to match the XML descriptions.
9771 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9772 restart register instead of $0.
9773
9774 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9775 Markus Deuling <deuling@de.ibm.com>
9776
9777 * remote-utils.c (decode_xfer_write): New function.
9778 * server.h (decode_xfer_write): Add prototype.
9779 * server.c (handle_query): Add PACKET_LEN argument. Support
9780 qXfer:spu:read and qXfer:spu:write packets.
9781 (main): Pass packet_len to handle_query.
9782 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9783 * target.h (target_ops): Add qxfer_spu.
9784
9785 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9786
9787 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9788 accessing non-seekable spufs files.
9789
9790 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9791
9792 * server.c (handle_query): Add reply for qC packet.
9793
9794 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9795 Leo Zayas <lerele@champenstudios@com>
9796
9797 * server.h (check_remote_input_interrupt_request): New function.
9798 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9799 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9800 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9801 (check_remote_input_interrupt_request): New function.
9802 * server.h (check_remote_input_interrupt_request): Declare.
9803 * win32-low.c (winapi_DebugBreakProcess,
9804 winapi_GenerateConsoleCtrlEvent): New typedefs.
9805 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9806 to 250 ms.
9807 (win32_wait): Check for remote interrupt request
9808 with check_remote_input_interrupt_request.
9809 (win32_request_interrupt): New function.
9810 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9811
9812 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9813
9814 * win32-low.c (debug_registers_changed,
9815 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9816 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9817 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9818 (thread_rec): Get context using the low target.
9819 (child_add_thread): Call thread_added on the low target,
9820 which does the same thing.
9821 (regptr): Delete.
9822 (do_initial_child_stuff): Remove debug registers references.
9823 Set context using the low target. Resume threads after
9824 setting the contexts.
9825 (child_continue): Remove dead variable. Remove debug
9826 registers references.
9827 (child_fetch_inferior_registers): Go through the low target.
9828 (do_child_store_inferior_registers): Remove.
9829 (child_store_inferior_registers): Go through the low target.
9830 (win32_resume): Remove debug registers references.
9831 Set context using the low target.
9832 (handle_exception): Change return type to void. Don't record
9833 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9834 first chance exception.
9835 (get_child_debug_event): Change return type to void. Remove
9836 goto loop. Always return after waiting for debug event.
9837 (win32_wait): Convert to switch statement. Handle spurious
9838 events.
9839
9840 * win32-i386-low.c (debug_registers_changed,
9841 debug_registers_used): New.
9842 (initial_stuff): Rename to ...
9843 (i386_initial_stuff): ... this. Clear debug registers
9844 state variables.
9845 (store_debug_registers): Delete.
9846 (i386_get_thread_context): New.
9847 (load_debug_registers): Delete.
9848 (i386_set_thread_context): New.
9849 (i386_thread_added): New.
9850 (single_step): Rename to ...
9851 (i386_single_step): ... this.
9852 (do_fetch_inferior_registers): Rename to ...
9853 (i386_fetch_inferior_register): ... this.
9854 (i386_store_inferior_register): New.
9855 (the_low_target): Adapt to new interface.
9856
9857 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9858 (arm_get_thread_context): New.
9859 (arm_set_thread_context): New.
9860 (regptr): New.
9861 (do_fetch_inferior_registers): Rename to ...
9862 (arm_fetch_inferior_register): ... this.
9863 (arm_store_inferior_register): New.
9864 (arm_wince_breakpoint): Reimplement as unsigned long.
9865 (arm_wince_breakpoint_len): Define.
9866 (the_low_target): Adapt to new interface.
9867
9868 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9869 load_debug_registers. Add get_thread_context, set_thread_context,
9870 thread_added and store_inferior_register. Rename
9871 fetch_inferior_registers to fetch_inferior_register.
9872 (regptr): Remove declaration.
9873
9874 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9875
9876 * linux-low.c (linux_detach): Change return type to int. Return 0.
9877 * spu-low.c (spu_detach): Likewise.
9878
9879 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9880
9881 * target.h (target_ops): Change return type of detach to int.
9882 Add join.
9883 (join_inferior): New.
9884 * server.c (main): Don't skip detach support on mingw32.
9885 If the inferior doesn't support detaching return error.
9886 Call join_inferior instead of using waitpid.
9887 * linux-low.c (linux_join): New.
9888 (linux_target_op): Add linux_join.
9889 * spu-low.c (spu_join): New.
9890 (spu_target_ops): Add spu_join.
9891 * win32-low.c (win32_detach): Adapt to new interface.
9892 Reopen current_process_handle before detaching. Issue a child
9893 resume before detaching.
9894 (win32_join): New.
9895 (win32_target_op): Add win32_join.
9896
9897 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9898
9899 * win32-low.c (win32-attach): Fix return value.
9900 * target.h (target_ops): Describe ATTACH return values.
9901
9902 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9903
9904 * win32-low.c (GETPROCADDRESS): Define.
9905 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9906 (winapi_DebugSetProcessKillOnExit): Likewise.
9907 (win32_create_inferior): Force usage of ansi CreateProcessA.
9908 (win32_attach): Use GETPROCADDRESS.
9909 (win32_detach): Likewise.
9910
9911 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9912
9913 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9914
9915 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9916
9917 * win32-low.c: Commit leftover changes from 2007-03-29.
9918
9919 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9920
9921 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9922 fields short instead of int. Add explicit padding.
9923 (i387_cache_to_fsave): Remove unnecessary casts.
9924 (i387_fsave_to_cache): Doc fix.
9925 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9926
9927 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9928
9929 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9930 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9931
9932 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9933
9934 * configure.srv (arm*-*-mingw32ce*): Move near the other
9935 arm targets.
9936
9937 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9938
9939 * configure.ac: Add errno checking.
9940 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9941 sys/file.h and malloc.h.
9942 (AC_CHECK_DECLS): Add perror.
9943 (srv_mingwce): Handle.
9944 * configure.srv (i[34567]86-*-cygwin*): Add
9945 win32-i386-low.o to srv_tgtobj.
9946 (i[34567]86-*-mingw*): Likewise.
9947 (arm*-*-mingw32ce*): Add case.
9948 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9949 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9950 [__MINGW32CE__] (strerror): New function.
9951 [__MINGW32CE__] (errno): Define to GetLastError.
9952 [__MINGW32CE__] (COUNTOF): New macro.
9953 (remote_open): Remove extra close call.
9954 * mem-break.c (delete_breakpoint_at): New function.
9955 * mem-break.h (delete_breakpoint_at): Declare.
9956 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9957 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9958 [USE_WIN32API] (read, write): Add char* casts.
9959 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9960 * server.h: Include wincecompat.h on Windows CE.
9961 [HAVE_ERRNO_H]: Check.
9962 (perror): Declare if not declared.
9963 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9964 (perror_with_name): Remove errno declaration.
9965 * wincecompat.h: New.
9966 * wincecompat.c: New.
9967 * win32-low.h: New.
9968 * win32-arm-low.c: New.
9969 * win32-i386-low.c: New.
9970 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9971 (OUTMSG2): Make it safe.
9972 (_T): New macro.
9973 (COUNTOF): New macro.
9974 (NUM_REGS): Get it from the low target.
9975 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9976 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9977 (thread_rec): Let low target handle debug registers.
9978 (child_add_thread): Likewise.
9979 (child_init_thread_list): Likewise.
9980 (continue_one_thread): Likewise.
9981 (regptr): New.
9982 (do_child_fetch_inferior_registers): Move to ...
9983 * win32-i386-low.c: ... here, and rename to ...
9984 (do_fetch_inferior_registers): ... this.
9985 * win32-low.c (child_fetch_inferior_registers):
9986 Go through the low target.
9987 (do_child_store_inferior_registers): Use regptr.
9988 (strwinerror): New function.
9989 (win32_create_inferior): Handle Windows CE.
9990 Use strwinerror instead of strerror on Windows error
9991 codes. Add program to the error output.
9992 Don't close the main thread handle on Windows CE.
9993 (win32_attach): Use coredll.dll on Windows CE.
9994 (win32_kill): Close current process and current
9995 thread handles.
9996 (win32_detach): Use coredll.dll on Windows CE.
9997 (win32_resume): Let low target handle debug registers, and
9998 step request.
9999 (handle_exception): Add/Remove initial breakpoint. Avoid
10000 non-existant WSTOPSIG on Windows CE.
10001 (win32_read_inferior_memory): Cast to remove warning.
10002 (win32_arch_string): Go through the low target.
10003 (initialize_low): Call set_breakpoint_data with the low
10004 target's breakpoint.
10005 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10006 FOP_REGNUM, mappings): Move to ...
10007 * win32-i386-low.c: ... here.
10008 * win32-low.c (win32_thread_info): Move to ...
10009 * win32-low.h: ... here.
10010 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10011 win32-arm-low.c and wincecompat.c.
10012 (all:): Add $EXEEXT.
10013 (install-only:): Likewise.
10014 (gdbserver:): Likewise.
10015 (gdbreplay:): Likewise.
10016 * config.in: Regenerate.
10017 * configure: Regenerate.
10018
10019 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10020
10021 * win32-low.c: Rename typedef thread_info to
10022 win32_thread_info throughout.
10023
10024 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10025
10026 * win32-i386-low.c: Rename to ...
10027 * win32-low.c: ... this.
10028 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10029 * Makefile.in: Likewise.
10030
10031 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10032
10033 * remote-utils.c (monitor_output): Constify msg parameter.
10034 * server.h (monitor_output): Likewise.
10035 * win32-i386-low.c (handle_output_debug_string): New.
10036 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10037 handle_output_debug_string.
10038 (get_child_debug_event): Likewise.
10039
10040 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10041
10042 * server.c (main): Correct strtoul check.
10043
10044 2007-03-27 Jon Ringle <jon@ringle.org>
10045
10046 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10047
10048 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10049
10050 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10051
10052 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * terminal.h: Check HAVE_SGTTY_H.
10055
10056 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10057
10058 * remote-utils.c (remote_open): Print out the assigned port number.
10059
10060 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10061
10062 * remote-utils.c (monitor_output): New function.
10063 * server.c (debug_threads): Define here.
10064 (monitor_show_help): New function.
10065 (handle_query): Handle qRcmd.
10066 (main): Do not handle 'd' packet.
10067 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10068 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10069 of debug_threads.
10070
10071 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10072
10073 * Makefile.in (EXEEXT): New.
10074 (clean): Use $(EXEEXT).
10075
10076 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10077
10078 * target.h (target_ops): Rename send_signal to request_interrupt,
10079 and remove enum target_signal parameter.
10080 * linux-low.c (linux_request_interrupt): Rename from
10081 linux_send_signal, and always send SIGINT.
10082 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10083 and always send SIGINT.
10084 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10085 of send_signal.
10086 (input_interrupt): Likewise.
10087
10088 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10089
10090 * server.c (get_features_xml): Check if target implemented
10091 arch_string.
10092 * win32-i386-low.c (win32_arch_string): New.
10093 (win32_target_ops): Add win32_arch_string as arch_string member.
10094
10095 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10096
10097 * spu-low.c (spu_arch_string): New.
10098 (spu_target_ops): Add spu_arch_string.
10099
10100 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10101
10102 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10103 * configure.ac: Do not check for terminal.h.
10104 * configure, config.in: Regenerated.
10105
10106 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10107
10108 * Makefile.in (OBS): Add $(XML_BUILTIN).
10109 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10110 (clean): Update.
10111 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10112 (arm-with-iwmmxt.c): New.
10113 * config.in, configure: Regenerate.
10114 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10115 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10116 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10117 (arm*-*-linux*): Add iWMMXt and regset support.
10118 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10119 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10120 (arm_store_wmmxregset, target_regsets): New.
10121 * server.c (get_features_xml): Take annex argument. Check builtin
10122 XML documents.
10123 (handle_query): Handle multiple annexes.
10124
10125 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10126
10127 * remote-utils.c [USE_WIN32API] (read, write): Define.
10128 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10129 write.
10130
10131 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10132
10133 * linux-i386-low.c (the_low_target): Set arch_string.
10134 * linux-x86-64-low.c (the_low_target): Likewise.
10135 * linux-low.c (linux_arch_string): New.
10136 (linux_target_ops): Add it.
10137 * linux-low.h (struct linux_target_ops): Add arch_string.
10138 * server.c (write_qxfer_response): Use const void * for DATA.
10139 (get_features_xml): New.
10140 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10141 * target.h (struct target_ops): Add arch_string method.
10142
10143 2007-01-03 Denis Pilat <denis.pilat@st.com>
10144 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * linux-low.c (linux_kill): Handle being called with no threads.
10147 * win32-i386-low.c (win32_kill): Likewise.
10148 (get_child_debug_event): Clear current_process_handle.
10149
10150 2006-12-30 Denis PILAT <denis.pilat@st.com>
10151 Daniel Jacobowitz <dan@codesourcery.com>
10152
10153 * remote-utils.c (remote_open): Check the type of specified
10154 serial port devices before opening them.
10155 * server.c (main): Kill the inferior if an error occurs during
10156 the first remote_open.
10157
10158 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10159
10160 * README: Update supported targets.
10161
10162 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * Makefile.in (clean): Remove reg-mips64.c.
10165 (reg-mips64.c, reg-mips64.o): New rules.
10166 * configure.srv: Handle mips64. Include regset support for mips.
10167 * linux-mips-low.c (union mips_register): New.
10168 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10169 (mips_breakpoint, mips_breakpoint_at): Use int.
10170 (mips_collect_register, mips_supply_register)
10171 (mips_collect_register_32bit, mips_supply_register_32bit)
10172 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10173 (mips_store_fpregset, target_regsets): New.
10174 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10175
10176 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10177
10178 * configure.srv: Add target "spu*-*-*".
10179 * Makefile.in (clean): Remove reg-spu.c.
10180 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10181 * spu-low.c: New file.
10182
10183 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * configure.ac: Correct td_thr_tls_get_addr test.
10186 * configure: Regenerated.
10187
10188 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * linux-low.c (linux_wait_for_event): Reformat. Use the
10191 pass_signals array.
10192 * remote-utils.c (decode_address_to_semicolon): New.
10193 * server.c (pass_signals, handle_general_set): New.
10194 (handle_query): Mention QPassSignals for qSupported.
10195 (main): Call handle_general_set.
10196 * server.h (pass_signals, decode_address_to_semicolon): New.
10197
10198 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10199
10200 * server.c (handle_query): Correct error handling for read_auxv.
10201
10202 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10205 and srv_linux_thread_db to yes.
10206 * linux-s390-low.c (s390_fill_gregset): New function.
10207 (target_regsets): Define data structure.
10208
10209 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10210
10211 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10212 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10213 * config.in, configure: Regenerated.
10214 * inferiors.c (gdb_id_to_thread): New function.
10215 (gdb_id_to_thread_id): Use it.
10216 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10217 * linux-low.h (struct process_info): Add th member.
10218 (thread_db_get_tls_address): New prototype.
10219 * remote-utils.c (decode_address): Make non-static.
10220 * server.c (handle_query): Handle qGetTLSAddr.
10221 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10222 * target.h (struct target_ops): Add get_tls_address.
10223 * thread-db.c (maybe_attach_thread): Save the thread handle.
10224 (thread_db_get_tls_address): New.
10225
10226 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10227
10228 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10229 (linux_resume_one_process): Take a siginfo_t *. Update all
10230 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10231 (struct pending_signals): Add a siginfo_t.
10232 (linux_wait_for_process): Always set last_status.
10233 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10234 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10235 * linux-low.h (struct process_info): Add last_status.
10236
10237 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10238
10239 * remote-utils.c (try_rle): New function.
10240 (putpkt_binary): Use it.
10241
10242 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10245 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10246 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10247 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10248 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10249 point registers.
10250
10251 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10252
10253 * server.c (terminal_fd): New variable.
10254 (old_foreground_pgrp): Likewise.
10255 (restore_old_foreground_pgrp): New function.
10256 (start_inferior): Record the terminal file descriptor in terminal_fd
10257 and its original foreground group in old_foreground_pgrp. Register
10258 restore_old_foreground_pgrp with atexit().
10259
10260 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10261
10262 * server.c (handle_query): Correct qPart to qXfer.
10263
10264 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * configure.ac: Check for more headers which are missing on
10267 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10268 * configure.srv: Add Cygwin and mingw32.
10269 * remote-utils.c: Don't include headers unconditionally which
10270 are missing on mingw32. Include <winsock.h> for mingw32.
10271 (remote_open): Adjust for mingw32 support. Flush
10272 standard error after writing to it.
10273 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10274 (unblock_async_io, enable_async_io, disable_async_io)
10275 (readchar, getpkt): Update for Winsock support.
10276 (prepare_resume_reply): Expect a protocol signal number.
10277 * server.c: Disable <sys/wait.h> on mingw32.
10278 (start_inferior): Adjust for mingw32 support. Flush
10279 standard error after writing to it.
10280 (attach_inferior): Likewise. Use protocol signal
10281 numbers.
10282 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10283 and names.
10284 * win32-i386-low.c: New file.
10285 * Makefile.in (XM_CLIBS): Set.
10286 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10287 (win32-i386-low.o): New dependency rule.
10288 * linux-low.c (linux_wait): Use target signal numbers.
10289 * target.h (struct target_ops): Doc fix.
10290 * server.h (target_signal_to_name): New prototype.
10291 * gdbreplay.c: Don't include headers unconditionally which
10292 are missing on mingw32. Include <winsock.h> for mingw32.
10293 (remote_close, remote_open): Adjust for Winsock support.
10294 * configure, config.in: Regenerated.
10295
10296 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * server.c (decode_xfer_read, write_qxfer_response): New.
10299 (handle_query): Take a packet length argument. Handle
10300 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10301 the qSupported response.
10302 (main): Update call to handle_query.
10303
10304 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10305
10306 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10307 (putpkt_binary): Renamed from putpkt and adjusted for binary
10308 data.
10309 (putpkt): New wrapper for putpkt_binary.
10310 (readchar): Don't mask off the high bit.
10311 (decode_X_packet): New function.
10312 * server.c (main): Call putpkt_binary if a handler sets the packet
10313 length. Save the length of the incoming packet. Handle 'X'.
10314 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10315
10316 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * server.c (handle_query): Handle qSupported.
10319
10320 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * remote-utils.c (all_symbols_looked_up): New variable.
10323 (look_up_one_symbol): Check it.
10324 * server.h (look_up_one_symbol): New declaration.
10325 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10326
10327 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * Makefile.in (linux-arm-low.o): Update dependencies.
10330 * linux-arm-low.c: Include "gdb_proc_service.h".
10331 (PTRACE_GET_THREAD_AREA): Define.
10332 (ps_get_thread_area): New function.
10333
10334 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10335
10336 * configure.srv (m68k*-*-uclinux*): New target.
10337 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10338 (linux_resume_one_process): Remove extraneous cast.
10339 (linux_read_offsets): New.
10340 (linux_target_op): Add linux_read_offsets on mmuless systems.
10341 * server.c (handle_query): Add qOffsets logic.
10342 * target.h (struct target_ops): Add read_offsets.
10343
10344 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10347 (PTRACE_GET_THREAD_AREA): Define.
10348 (ps_get_thread_area): New function.
10349 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10350 (linux-x86-64-low.o): Update.
10351
10352 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10353
10354 * configure.ac: Remove checks for prfpregset_t.
10355 * gdb_proc_service.h: New file.
10356 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10357 new "gdb_proc_service.h".
10358 * proc-service.c: Likewise.
10359 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10360 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10361 * Makefile.in (gdb_proc_service_h): Updated.
10362 * configure, config.in: Regenerated.
10363
10364 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * remote-utils.c (prepare_resume_reply): Move declaration
10367 of gdb_id_from_wait to the top of the block.
10368
10369 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10370
10371 * linux-low.c (regsets_store_inferior_registers): Read the regset
10372 from the target before filling it.
10373
10374 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10375
10376 * server.c (attach_inferior): Return SIGTRAP for a successful
10377 attach.
10378
10379 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10380
10381 * Makefile.in (OBS): Add version.o.
10382 (STAGESTUFF): Delete.
10383 (version.o): Add dependencies.
10384 (version.c): Replace rule.
10385 (clean): Remove version.c.
10386 * server.c (gdbserver_version): New.
10387 (gdbserver_usage): Use printf.
10388 (main): Handle --version and --help.
10389 * server.h (version, host_name): Add declarations.
10390
10391 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10392
10393 * linux-arm-low.c:
10394 * linux-arm-low.c:
10395 * inferiors.c:
10396 * i387-fp.h:
10397 * i387-fp.c:
10398 * gdbreplay.c:
10399 * regcache.c:
10400 * proc-service.c:
10401 * mem-break.h:
10402 * mem-break.c:
10403 * linux-x86-64-low.c:
10404 * linux-sh-low.c:
10405 * linux-s390-low.c:
10406 * linux-ppc64-low.c:
10407 * linux-ppc-low.c:
10408 * linux-mips-low.c:
10409 * linux-m68k-low.c:
10410 * linux-m32r-low.c:
10411 * linux-low.h:
10412 * linux-low.c:
10413 * linux-ia64-low.c:
10414 * linux-i386-low.c:
10415 * linux-crisv32-low.c:
10416 * thread-db.c:
10417 * terminal.h:
10418 * target.h:
10419 * target.c:
10420 * server.h:
10421 * server.c:
10422 * remote-utils.c:
10423 * regcache.h:
10424 * utils.c:
10425 * Makefile.in:
10426 * configure.ac:
10427 * gdbserver.1: Add (C) after Copyright. Update the FSF
10428 address.
10429
10430 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10433 (arm_breakpoint_at): Recognize both breakpoints.
10434 (the_low_target): Use the correct breakpoint instruction.
10435
10436 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10439 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10440 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10441 (the_low_target): Update.
10442
10443 2005-10-25 Andreas Schwab <schwab@suse.de>
10444
10445 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10446
10447 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10448 (ia64_num_regs): Reduce to 462.
10449
10450 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10451
10452 * acinclude.m4: Correct quoting.
10453 * aclocal.m4: Regenerated.
10454
10455 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10456 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10457 (thread_db_init): Call thread_db_err_str.
10458 * configure.ac: Check for TD_VERSION.
10459 * config.in, configure: Regenerated.
10460
10461 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10462
10463 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10464
10465 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10466
10467 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10468 is not available. Define HAVE_PTRACE_GETREGS if it is.
10469 * config.in, configure: Regenerated.
10470 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10471 * linux-i386-low.c, linux-m68k-low.c: Update to use
10472 HAVE_PTRACE_GETREGS.
10473 * linux-low.c (regsets_fetch_inferior_registers)
10474 (regsets_store_inferior_registers): Only return 0 if we processed
10475 GENERAL_REGS.
10476 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10477 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10478
10479 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * inferiors.c (struct thread_info): Add gdb_id.
10482 (add_thread): Add gdb_id argument.
10483 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10484 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10485 calls to add_thread.
10486 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10487 * server.c (handle_query): Use thread_to_gdb_id.
10488 (handle_v_cont, main): Use gdb_id_to_thread_id.
10489 * server.h (add_thread): Update prototype.
10490 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10491 prototypes.
10492
10493 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10496 left-padded registers.
10497 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10498 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10499
10500 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10501
10502 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10503 * configure: Regenerate.
10504 * config.in: Regenerate.
10505 * server.h (NEED_DECLARATION_STRERROR):
10506 Replace with !HAVE_DECL_STRERROR.
10507
10508 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10509
10510 * linux-low.c (linux_wait, linux_send_signal): Don't test
10511 an unsigned long variable for > 0 if it could be MAX_ULONG.
10512 * server.c (myresume): Likewise.
10513 * target.c (set_desired_inferior): Likewise.
10514
10515 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10516
10517 * configure.ac: Simplify and improve check for socklen_t.
10518 * configure, config.in: Regenerate.
10519
10520 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * acconfig.h: Remove.
10523 * configure.ac: Add a test for socklen_t. Use three-argument
10524 AC_DEFINE throughout.
10525 * config.in: Regenerated using autoheader 2.59.
10526 * configure: Regenerated.
10527
10528 * gdbreplay.c (socklen_t): Provide a default.
10529 (remote_open): Use socklen_t.
10530 * remote-utils.c (socklen_t): Provide a default.
10531 (remote_open): Use socklen_t.
10532 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10533 unsigned char.
10534
10535 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10536 char for buffers.
10537 * linux-low.c (linux_read_memory, linux_write_memory)
10538 (linux_read_auxv): Likewise.
10539 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10540 (check_mem_write): Likewise.
10541 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10542 Likewise.
10543 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10544 (registers_from_string, register_data): Likewise.
10545 * server.c (handle_query, main): Likewise.
10546 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10547 (decode_M_packet): Likewise.
10548 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10549 * target.h (struct target_ops): Update read_memory, write_memory,
10550 and read_auxv.
10551 (read_inferior_memory, write_inferior_memory): Update.
10552 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10553 to unsigned char *.
10554 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10555 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10556 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10557 linux-s390-low.c, linux-sh-low.c: Update for changes in
10558 read_inferior_memory and the_low_target->breakpoint.
10559
10560 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10561
10562 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10563 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10564 * configure.srv: Add powerpc64-*-linux*.
10565 * linux-ppc64-low.c: New file.
10566
10567 2005-05-23 Orjan Friberg <orjanf@axis.com>
10568
10569 * linux-cris-low.c: New file with support for CRIS.
10570 * linux-crisv32-low.c: Ditto for CRISv32.
10571 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10572 (clean): Add reg-cris.c and reg-crisv32.c.
10573 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10574 reg-crisv32.o, and reg-crisv32.c to make rules.
10575 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10576 recognized targets.
10577
10578 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10579
10580 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10581 of sizeof (PTRACE_XFER_TYPE).
10582 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10583
10584 2005-05-12 Orjan Friberg <orjanf@axis.com>
10585
10586 * target.h (struct target_ops): Add insert_watchpoint,
10587 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10588 pointers for hardware watchpoint support.
10589 * linux-low.h (struct linux_target_ops): Ditto.
10590 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10591 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10592 to linux_target_ops.
10593 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10594 reply packet.
10595 * server.c (main): Recognize 'Z' and 'z' packets.
10596
10597 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10598
10599 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10600 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10601 (the_low_target): Add new members.
10602
10603 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10604
10605 * proc-service.c (ps_lgetregs): Search all_processes instead of
10606 all_threads.
10607
10608 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10609
10610 * server.c (start_inferior): Change return type to int.
10611 (attach_inferior): Change sigptr to int *.
10612 (handle_v_cont, handle_v_requests): Change signal to int *.
10613 (main): Change signal to int.
10614
10615 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10616
10617 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10618 * configure.srv: Add m32r*-*-linux*.
10619 * linux-m32r-low.c: New file.
10620
10621 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10622
10623 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10624
10625 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10626
10627 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10628 Take unsigned long arguments for PIDs.
10629 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10630 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10631 (wait_for_sigstop, linux_resume_one_process)
10632 (regsets_fetch_inferior_registers, linux_send_signal)
10633 (linux_read_auxv): Likewise. Update the types of variables holding
10634 PIDs. Update format string specifiers.
10635 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10636 * remote-utils.c (prepare_resume_reply): Likewise.
10637 * server.c (cont_thread, general_thread, step_thread)
10638 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10639 unsigned long.
10640 (handle_query): Update format specifiers.
10641 (handle_v_cont, main): Use strtoul for thread IDs.
10642 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10643 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10644 (general_thread, step_thread, thread_from_wait)
10645 (old_thread_from_wait): Update.
10646 * target.h (struct thread_resume): Use unsigned long for THREAD.
10647 (struct target_ops): Use unsigned long for arguments to attach and
10648 thread_alive.
10649
10650 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10651
10652 * acinclude.m4: Include bfd/bfd.m4 directly.
10653 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10654 <agriffis@toolchain.org>.
10655 * aclocal.m4, configure: Regenerated.
10656
10657 2005-01-07 Andrew Cagney <cagney@gnu.org>
10658
10659 * configure.ac: Rename configure.in, require autoconf 2.59.
10660 * configure: Re-generate.
10661
10662 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10663
10664 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10665 LIBS when finished.
10666 * aclocal.m4: Regenerated.
10667 * configure: Regenerated.
10668
10669 2004-11-21 Andreas Schwab <schwab@suse.de>
10670
10671 * linux-m68k-low.c (m68k_num_gregs): Define.
10672 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10673 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10674 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10675 (m68k_breakpoint_at): New. Add to the_low_target.
10676
10677 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10678 srv_linux_thread_db to yes.
10679
10680 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10681
10682 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10683 (ARCH_SET_FS): Likewise.
10684 (ARCH_GET_FS): Likewise.
10685 (ARCH_GET_GS): Likewise.
10686
10687 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10688
10689 * linux-i386-low.c (ps_get_thread_area): New.
10690 * linux-x86-64-low.c (ps_get_thread_area): New.
10691 * linux-low.c: Include <sys/syscall.h>.
10692 (linux_kill_one_process): Don't kill the first thread here.
10693 (linux_kill): Kill the first thread here.
10694 (kill_lwp): New function.
10695 (send_sigstop, linux_send_signal): Use it.
10696 * proc-service.c: Clean up #ifdefs.
10697 (fpregset_info): Delete.
10698 (ps_lgetregs): Update and enable implementation.
10699 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10700 implementations.
10701 * remote-utils.c (struct sym_cache, symbol_cache): New.
10702 (input_interrupt): Print a clearer message.
10703 (async_io_enabled): New variable.
10704 (enable_async_io, disable_async_io): Use it. Update comments.
10705 (look_up_one_symbol): Use the symbol cache.
10706 * thread-db.c (thread_db_look_up_symbols): New function.
10707 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10708
10709 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10710
10711 * configure.in: Test for -rdynamic.
10712 * configure: Regenerated.
10713 * Makefile (INTERNAL_LDFLAGS): New.
10714 (gdbserver, gdbreplay): Use it.
10715
10716 2004-09-02 Andrew Cagney <cagney@gnu.org>
10717
10718 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10719
10720 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10721
10722 * linux-low.c (linux_wait): Clear all_processes list also.
10723
10724 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10725
10726 * linux-low.c: Include <errno.h>. Remove extern declaration of
10727 errno.
10728
10729 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10730
10731 * gdbreplay.c, server.h, utils.c: Update copyright years.
10732
10733 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10734
10735 * server.c (main): Print child status or termination signal from
10736 variable 'signal', not 'sig'.
10737
10738 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10739
10740 * linux-low.c (linux_read_memory): Change return type to
10741 int. Check for and return error from ptrace().
10742 * target.c (read_inferior_memory): Change return type to int. Pass
10743 back return status from the_target->read_memory().
10744 * target.h (struct target_ops): Adapt *read_memory() prototype.
10745 Update comment.
10746 (read_inferior_memory): Adapt prototype.
10747 * server.c (main): Return an error packet if
10748 read_inferior_memory() returns an error.
10749
10750 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10753 Unify with other clean targets.
10754
10755 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10756
10757 * server.c (handle_v_cont): Call set_desired_inferior.
10758
10759 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10760
10761 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10762
10763 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10764
10765 * linux-low.c (linux_wait): Unblock async I/O.
10766 (linux_resume): Block and enable async I/O.
10767 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10768 * server.h (block_async_io, unblock_async_io): Add prototypes.
10769
10770 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10771
10772 * remote-utils.c (remote_open): Print a status notice after
10773 opening a TCP port.
10774 * server.c (attach_inferior): Print a status notice after
10775 attaching.
10776
10777 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10778
10779 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10780
10781 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10782
10783 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10784 error packet.
10785 * server.c, target.h: Update copyright years.
10786
10787 2004-02-25 Roland McGrath <roland@redhat.com>
10788
10789 * target.h (struct target_ops): New member `read_auxv'.
10790 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10791 * linux-low.c (linux_read_auxv): New function.
10792 (linux_target_ops): Initialize `read_auxv' member to that.
10793
10794 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10795
10796 Committed by Jim Blandy <jimb@redhat.com>.
10797
10798 * linux-s390-low.c (s390_num_regs): Update.
10799 (s390_regmap): Remove control registers. Use __s390x__ predefine
10800 instead of GPR_SIZE to distiguish s390 and s390x targets.
10801
10802 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10803
10804 * linux-low.c: Update copyright year.
10805 (check_removed_breakpoint): Clear pending_is_breakpoint.
10806 (linux_set_resume_request, linux_queue_one_thread)
10807 (resume_status_pending_p): New functions.
10808 (linux_continue_one_thread): Use process->resume.
10809 (linux_resume): Only resume threads if there are no pending events.
10810 * linux-low.h (struct process_info): Add resume request
10811 pointer.
10812
10813 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10814
10815 * regcache.c (new_register_cache): Clear the allocated register
10816 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10817
10818 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10819
10820 * linux-low.c (linux_resume): Take a struct thread_resume *
10821 argument.
10822 (linux_wait): Update call.
10823 (resume_ptr): New static variable.
10824 (linux_continue_one_thread): Renamed from
10825 linux_continue_one_process. Use resume_ptr.
10826 (linux_resume): Use linux_continue_one_thread.
10827 * server.c (handle_v_cont, handle_v_requests): New functions.
10828 (myresume): New function.
10829 (main): Handle 'v' case.
10830 * target.h (struct thread_resume): New type.
10831 (struct target_ops): Change argument of "resume" to struct
10832 thread_resume *.
10833 (myresume): Delete macro.
10834
10835 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10836
10837 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10838 (uninstall): Support DESTDIR.
10839
10840 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10841
10842 * configure.srv: Add xscale*linux copy of arm*linux entry.
10843
10844 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10845
10846 * linux-arm-low.c (arm_reinsert_addr): New function.
10847 (the_low_target): Add arm_reinsert_addr.
10848
10849 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10850
10851 * mem-break.c: Remove whitespace at end of file.
10852
10853 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10854
10855 * configure.in: Check whether we need to prototype strerror.
10856 * server.h: Optionally prototype strerror.
10857 * gdbreplay.c (perror_with_name): Use strerror.
10858 * linux-low.c (linux_attach_lwp): Use strerror.
10859 * utils.c (perror_with_name): Use strerror.
10860 * config.in, configure: Regenerated.
10861
10862 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10863
10864 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10865 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10866
10867 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10868
10869 * Makefile.in (SFILES): Update.
10870 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10871 low-sun3.c: Remove files.
10872
10873 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10874
10875 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10876 (linux_detach_one_process, linux_detach): New functions.
10877 (linux_target_ops): Add linux_detach.
10878 * server.c (main): Handle 'D' packet.
10879 * target.h (struct target_ops): Add "detach" member.
10880 (detach_inferior): Define.
10881
10882 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10883
10884 From Kelley Cook <kelleycook@wideopenwest.com>:
10885 * configure.srv: Accept i[34567]86 variants.
10886
10887 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10888
10889 * linux-low.c (linux_wait_for_event): Correct comment typos.
10890 (linux_resume_one_process): Call check_removed_breakpoint.
10891 (linux_send_signal): New function.
10892 (linux_target_ops): Add linux_send_signal.
10893 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10894 of kill.
10895 * target.h (struct target_ops): Add send_signal.
10896
10897 2003-05-29 Jim Blandy <jimb@redhat.com>
10898
10899 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10900 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10901 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10902 away part of the register's value.
10903
10904 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10907 (linux_wait_for_event, linux_init_signals): Likewise.
10908
10909 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * configure.in: Check for stdlib.h.
10912 * configure: Regenerated.
10913 * config.in: Regenerated.
10914
10915 2003-01-04 Andreas Schwab <schwab@suse.de>
10916
10917 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10918
10919 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10920
10921 * Makefile.in: Remove obsolete code.
10922
10923 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10924
10925 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10926 defined(PT_FPR0_HI).
10927
10928 2002-11-17 Stuart Hughes <seh@zee2.com>
10929
10930 * linux-arm-low.c (arm_num_regs): Increase.
10931 (arm_regmap): Include status register.
10932
10933 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10934
10935 * linux-low.c (register_addr): Remove incorrect -1 check.
10936
10937 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10938
10939 * linux-low.c (linux_create_inferior): Call setpgid. Return
10940 the new PID.
10941 (unstopped_p, linux_signal_pid): Remove.
10942 (linux_target_ops): Remove linux_signal_pid.
10943 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10944 global instead of target method.
10945 * target.h (struct target_ops): Remove signal_pid. Update comment
10946 for create_inferior.
10947 * server.c (signal_pid): New variable.
10948 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10949 gdbserver. Set the child to be the foreground process group.
10950 (attach_inferior): Set signal_pid.
10951
10952 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10953
10954 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10955
10956 2002-08-20 Jim Blandy <jimb@redhat.com>
10957
10958 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10959 default for this.
10960
10961 2002-08-01 Andrew Cagney <cagney@redhat.com>
10962
10963 * Makefile.in: Make chill references obsolete.
10964
10965 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10966
10967 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10968 * configure: Regenerate.
10969 * config.in: Regenerate.
10970
10971 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10972
10973 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10974 (perror_with_name, remote_close, remote_open, expect, play): Static.
10975
10976 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10977
10978 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10979 byte offsets instead of an array of indexes.
10980 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10981
10982 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10983
10984 * regcache.c: Add comment.
10985
10986 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10987
10988 * thread-db.c: New file.
10989 * proc-service.c: New file.
10990 * acinclude.m4: New file.
10991 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10992 proc-service.o, and thread-db.o.
10993 (linux-low.o): Add USE_THREAD_DB.
10994 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10995 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10996 * aclocal.m4: Regenerated.
10997 * config.in: Regenerated.
10998 * configure: Regenerated.
10999 * configure.in: Check for proc_service.h, sys/procfs.h,
11000 thread_db.h, and linux/elf.h headrs.
11001 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11002 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11003 Check for -lthread_db and thread support.
11004 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11005 PowerPC, and SuperH.
11006 * i387-fp.c: Constify arguments.
11007 * i387-fp.h: Likewise.
11008 * inferiors.c: (struct thread_info): Renamed from
11009 `struct inferior_info'. Remove PID member. Use generic inferior
11010 list header. All uses updated.
11011 (inferiors, signal_pid): Removed.
11012 (all_threads): New variable.
11013 (get_thread): Define.
11014 (add_inferior_to_list): New function.
11015 (for_each_inferior): New function.
11016 (change_inferior_id): New function.
11017 (add_inferior): Removed.
11018 (remove_inferior): New function.
11019 (add_thread): New function.
11020 (free_one_thread): New function.
11021 (remove_thread): New function.
11022 (clear_inferiors): Use for_each_inferior and free_one_thread.
11023 (find_inferior): New function.
11024 (find_inferior_id): New function.
11025 (inferior_target_data): Update argument type.
11026 (set_inferior_target_data): Likewise.
11027 (inferior_regcache_data): Likewise.
11028 (set_inferior_regcache_data): Likewise.
11029 * linux-low.c (linux_bp_reinsert): Remove.
11030 (all_processes, stopping_threads, using_thrads)
11031 (struct pending_signals, debug_threads, pid_of): New.
11032 (inferior_pid): Replace with macro.
11033 (struct inferior_linux_data): Remove.
11034 (get_stop_pc, add_process): New functions.
11035 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11036 Use add_process and add_thread.
11037 (linux_attach_lwp): New function, based on old linux_attach. Use
11038 add_process and add_thread. Set stop_expected for new threads.
11039 (linux_attach): New function.
11040 (linux_kill_one_process): New function.
11041 (linux_kill): Kill all LWPs.
11042 (linux_thread_alive): Use find_inferior_id.
11043 (check_removed_breakpoints, status_pending_p): New functions.
11044 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11045 Update. Use WNOHANG. Wait for cloned processes also. Update process
11046 struct for the found process.
11047 (linux_wait_for_event): New function.
11048 (linux_wait): Use it. Support LWPs.
11049 (send_sigstop, wait_for_sigstop, stop_all_processes)
11050 (linux_resume_one_process, linux_continue_one_process): New functions.
11051 (linux_resume): Support LWPs.
11052 (REGISTER_RAW_SIZE): Remove.
11053 (fetch_register): Use register_size instead. Call supply_register.
11054 (usr_store_inferior_registers): Likewise. Call collect_register.
11055 Fix recursive case.
11056 (regsets_fetch_inferior_registers): Improve error message.
11057 (regsets_store_inferior_registers): Add debugging.
11058 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11059 (unstopped_p, linux_signal_pid): New functions.
11060 (linux_target_ops): Add linux_signal_pid.
11061 (linux_init_signals): New function.
11062 (initialize_low): Call it. Initialize using_threads.
11063 * regcache.c (inferior_regcache_data): Add valid
11064 flag.
11065 (get_regcache): Fetch registers lazily. Add fetch argument
11066 and update all callers.
11067 (regcache_invalidate_one, regcache_invalidate): New
11068 functions.
11069 (new_register_cache): Renamed from create_register_cache.
11070 Return the new regcache.
11071 (free_register_cache): Change argument to a void *.
11072 (registers_to_string, registers_from_string): Call get_regcache
11073 with fetch flag set.
11074 (register_data): Make static. Pass fetch flag to get_regcache.
11075 (supply_register): Call get_regcache with fetch flag clear.
11076 (collect_register): Call get_regcache with fetch flag set.
11077 (collect_register_as_string): New function.
11078 * regcache.h: Update.
11079 * remote-utils.c (putpkt): Flush after debug output and use
11080 stderr.
11081 Handle input interrupts while waiting for an ACK.
11082 (input_interrupt): Use signal_pid method.
11083 (getpkt): Flush after debug output and use stderr.
11084 (outreg): Use collect_register_as_string.
11085 (new_thread_notify, dead_thread_notify): New functions.
11086 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11087 and general_thread.
11088 (look_up_one_symbol): Flush after debug output.
11089 * server.c (step_thread, server_waiting): New variables.
11090 (start_inferior): Don't use signal_pid. Update call to mywait.
11091 (attach_inferior): Update call to mywait.
11092 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11093 (main): Don't fetch/store registers explicitly. Use
11094 set_desired_inferior. Support proposed ``Hs'' packet. Update
11095 calls to mywait.
11096 * server.h: Update.
11097 (struct inferior_list, struct_inferior_list_entry): New.
11098 * target.c (set_desired_inferior): New.
11099 (write_inferior_memory): Constify.
11100 (mywait): New function.
11101 * target.h: Update.
11102 (struct target_ops): New signal_pid method.
11103 (mywait): Removed macro, added prototype.
11104
11105 * linux-low.h (regset_func): Removed.
11106 (regset_fill_func, regset_store_func): New.
11107 (enum regset_type): New.
11108 (struct regset_info): Add type field. Use new operation types.
11109 (struct linux_target_ops): stop_pc renamed to get_pc.
11110 Add decr_pc_after_break and breakpoint_at.
11111 (get_process, get_thread_proess, get_process_thread)
11112 (strut process_info, all_processes, linux_attach_lwp)
11113 (thread_db_init): New.
11114
11115 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11116 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11117 (the_low_target): Add new members.
11118 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11119 (i386_store_fpxregset): Constify.
11120 (target_regsets): Add new kind identifier.
11121 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11122 (i386_set_pc): Add debugging.
11123 (i386_breakpoint_at): New function.
11124 (the_low_target): Add new members.
11125 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11126 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11127 (mips_breakpoint_at): New.
11128 (the_low_target): Add new members.
11129 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11130 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11131 (the_low_target): Add new members.
11132 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11133 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11134 (the_low_target): Add new members.
11135 * linux-x86-64-low.c (target_regsets): Add new kind
11136 identifier.
11137
11138 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11139
11140 From Martin Pool <mbp@samba.org>:
11141 * server.c (gdbserver_usage): New function.
11142 (main): Call it.
11143
11144 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11145
11146 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11147 stop_at -> stop_pc.
11148
11149 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11150
11151 * Makefile.in: Remove obsolete code.
11152
11153 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11154
11155 * linux-low.c (regsets_fetch_inferior_registers),
11156 (regsets_store_inferior_registers): Removed cast to int from
11157 ptrace() calls.
11158 * regcache.h: Added declaration of struct inferior_info.
11159
11160 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11161
11162 * inferiors.c (struct inferior_info): Add regcache_data.
11163 (add_inferior): Call create_register_cache.
11164 (clear_inferiors): Call free_register_cache.
11165 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11166 * regcache.c (struct inferior_regcache_data): New.
11167 (registers): Remove.
11168 (get_regcache): New function.
11169 (create_register_cache, free_register_cache): New functions.
11170 (set_register_cache): Don't initialize the register cache here.
11171 (registers_to_string, registers_from_string, register_data): Call
11172 get_regcache.
11173 * regcache.h: Add prototypes.
11174 * server.h: Likewise.
11175
11176 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11177
11178 * mem-break.c: New file.
11179 * mem-break.h: New file.
11180 * Makefile.in: Add mem-break.o rule; update server.h
11181 dependencies.
11182 * inferiors.c (struct inferior_info): Add target_data
11183 member.
11184 (clear_inferiors): Free target_data member if set.
11185 (inferior_target_data, set_inferior_target_data): New functions.
11186 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11187 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11188 * linux-low.c (linux_bp_reinsert): New variable.
11189 (struct inferior_linux_data): New.
11190 (linux_create_inferior): Use set_inferior_target_data.
11191 (linux_attach): Likewise. Call add_inferior.
11192 (linux_wait_for_one_inferior): New function.
11193 (linux_wait): Call it.
11194 (linux_write_memory): Add const.
11195 (initialize_low): Call set_breakpoint_data.
11196 * linux-low.h (struct linux_target_ops): Add breakpoint
11197 handling members.
11198 * server.c (attach_inferior): Remove extra add_inferior
11199 call.
11200 * server.h: Include mem-break.h. Update inferior.c
11201 prototypes.
11202 * target.c (read_inferior_memory)
11203 (write_inferior_memory): New functions.
11204 * target.h (read_inferior_memory)
11205 (write_inferior_memory): Change macros to prototypes.
11206 (struct target_ops): Update comments. Add const to write_memory
11207 definition.
11208
11209 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11210
11211 * linux-low.c (usr_store_inferior_registers): Support
11212 registers which are allowed to fail to store.
11213 * linux-low.h (linux_target_ops): Likewise.
11214 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11215 (ppc_cannot_store_register): FPSCR may not be storable.
11216
11217 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11218
11219 * server.h: Include <string.h> if HAVE_STRING_H.
11220 * ChangeLog: Correct paths in last ChangeLog entry.
11221
11222 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11223
11224 * linux-low.h: Remove obsolete prototypes.
11225 (struct linux_target_ops): New.
11226 (extern the_low_target): New.
11227 * linux-low.c (num_regs, regmap): Remove declarations.
11228 (register_addr): Use the_low_target explicitly.
11229 (fetch_register): Likewise.
11230 (usr_fetch_inferior_registers): Likewise.
11231 (usr_store_inferior_registers): Likewise.
11232 * linux-arm-low.c (num_regs): Remove.
11233 (arm_num_regs): Define.
11234 (arm_regmap): Renamed from regmap, made static.
11235 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11236 made static.
11237 (arm_cannot_store_register): Renamed from cannot_store_register,
11238 made static.
11239 (the_low_target): New.
11240 * linux-i386-low.c (num_regs): Remove.
11241 (i386_num_regs): Define.
11242 (i386_regmap): Renamed from regmap, made static.
11243 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11244 made static.
11245 (i386_cannot_store_register): Renamed from cannot_store_register,
11246 made static.
11247 (the_low_target): New.
11248 * linux-ia64-low.c (num_regs): Remove.
11249 (ia64_num_regs): Define.
11250 (ia64_regmap): Renamed from regmap, made static.
11251 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11252 made static.
11253 (ia64_cannot_store_register): Renamed from cannot_store_register,
11254 made static.
11255 (the_low_target): New.
11256 * linux-m68k-low.c (num_regs): Remove.
11257 (m68k_num_regs): Define.
11258 (m68k_regmap): Renamed from regmap, made static.
11259 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11260 made static.
11261 (m68k_cannot_store_register): Renamed from cannot_store_register,
11262 made static.
11263 (the_low_target): New.
11264 * linux-mips-low.c (num_regs): Remove.
11265 (mips_num_regs): Define.
11266 (mips_regmap): Renamed from regmap, made static.
11267 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11268 made static.
11269 (mips_cannot_store_register): Renamed from cannot_store_register,
11270 made static.
11271 (the_low_target): New.
11272 * linux-ppc-low.c (num_regs): Remove.
11273 (ppc_num_regs): Define.
11274 (ppc_regmap): Renamed from regmap, made static.
11275 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11276 made static.
11277 (ppc_cannot_store_register): Renamed from cannot_store_register,
11278 made static.
11279 (the_low_target): New.
11280 * linux-s390-low.c (num_regs): Remove.
11281 (s390_num_regs): Define.
11282 (s390_regmap): Renamed from regmap, made static.
11283 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11284 made static.
11285 (s390_cannot_store_register): Renamed from cannot_store_register,
11286 made static.
11287 (the_low_target): New.
11288 * linux-sh-low.c (num_regs): Remove.
11289 (sh_num_regs): Define.
11290 (sh_regmap): Renamed from regmap, made static.
11291 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11292 made static.
11293 (sh_cannot_store_register): Renamed from cannot_store_register,
11294 made static.
11295 (the_low_target): New.
11296 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11297 (the_low_target): New.
11298
11299 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11300
11301 * Makefile.in: Add stamp-h target.
11302 * configure.in: Create stamp-h.
11303 * configure: Regenerated.
11304
11305 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11306
11307 * inferiors.c: New file.
11308 * target.c: New file.
11309 * target.h: New file.
11310 * Makefile.in: Add target.o and inferiors.o. Update
11311 dependencies.
11312 * linux-low.c (inferior_pid): New static variable,
11313 moved from server.c.
11314 (linux_create_inferior): Renamed from create_inferior.
11315 Call add_inferior. Return 0 on success instead of a PID.
11316 (linux_attach): Renamed from myattach.
11317 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11318 (linux_thread_alive): Renamed from mythread_alive.
11319 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11320 child dies.
11321 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11322 (regsets_store_inferior_registers): Correct error message.
11323 Add missing ``return 0''.
11324 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11325 (linux_store_registers): Renamed from store_inferior_registers.
11326 (linux_read_memory): Renamed from read_inferior_memory.
11327 (linux_write_memory): Renamed from write_inferior_memory.
11328 (linux_target_ops): New structure.
11329 (initialize_low): Call set_target_ops ().
11330 * remote-utils.c (unhexify): New function.
11331 (hexify): New function.
11332 (input_interrupt): Send signals to ``signal_pid''.
11333 * server.c (inferior_pid): Remove.
11334 (start_inferior): Update create_inferior call.
11335 (attach_inferior): Call add_inferior.
11336 (handle_query): New function.
11337 (main): Call handle_query for `q' packets.
11338 * server.h: Include "target.h". Remove obsolete prototypes.
11339 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11340
11341 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11342
11343 * Makefile.in: Add WARN_CFLAGS. Update configury
11344 dependencies.
11345 * configure.in: Check for <string.h>
11346 * configure: Regenerate.
11347 * config.in: Regenerate.
11348 * gdbreplay.c: Include needed system headers.
11349 (remote_open): Remove strchr prototype.
11350 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11351 * regcache.c (supply_register): Change buf argument to const void *.
11352 (supply_register_by_name): Likewise.
11353 (collect_register): Change buf argument to void *.
11354 (collect_register_by_name): Likewise.
11355 * regcache.h: Add missing prototypes.
11356 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11357 * server.c (handle_query): New function.
11358 (attached): New static variable, moved out of main.
11359 (main): Quiet longjmp clobber warnings.
11360 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11361 * utils.c (error): Remove NORETURN.
11362 (fatal): Likewise.
This page took 0.321331 seconds and 4 git commands to generate.