Prepare linux_find_memory_regions_full & co. for move
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * Makefile.in (OBS): Add gdb_regex.o.
4 (gdb_regex.o): New.
5 * config.in: Rebuilt.
6 * configure: Rebuilt.
7
8 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9 Jan Kratochvil <jan.kratochvil@redhat.com>
10
11 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
12 * Makefile.in (OBS): Add target-utils.o.
13 (linux-maps.o, target-utils.o): New.
14 * configure.srv (srv_linux_obj): Add linux-maps.o.
15
16 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
17
18 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
19 function, return 1.
20 (the_low_target): Install it.
21
22 2015-07-14 Pedro Alves <palves@redhat.com>
23
24 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
25 Instead, ignore ECHILD, and throw an error for other errnos.
26
27 2015-07-10 Pedro Alves <palves@redhat.com>
28
29 * event-loop.c (struct callback_event) <data>: Change type to
30 gdb_client_data instance instead of gdb_client_data pointer.
31 (append_callback_event): Adjust.
32
33 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
34
35 * linux-aarch64-low.c: Add comments for each linux_target_ops
36 method. Remove comments already covered in target_ops and
37 linux_target_ops definitions.
38 (the_low_target): Add comments for each unimplemented method.
39
40 2015-07-09 Yao Qi <yao.qi@linaro.org>
41
42 * linux-aarch64-low.c (aarch64_regmap): Remove.
43 (aarch64_usrregs_info): Remove.
44 (regs_info): Set field usrregs to NULL.
45
46 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
47
48 * linux-low.c: Include "rsp-low.h"
49 (linux_low_encode_pt_config, linux_low_encode_raw): New.
50 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
51 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
52 (handle_btrace_enable_pt): New.
53 (handle_btrace_general_set): Support "pt".
54 (handle_btrace_conf_general_set): Support "pt:size".
55
56 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
57
58 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
59 Z_PACKET_SW_BP.
60
61 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
62
63 * linux-aarch64-low.c: Remove comment about endianness.
64 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
65 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
66 memcmp.
67
68 2015-06-24 Gary Benson <gbenson@redhat.com>
69
70 * linux-i386-ipa.c (stdint.h): Do not include.
71 * lynx-i386-low.c (stdint.h): Likewise.
72 * lynx-ppc-low.c (stdint.h): Likewise.
73 * mem-break.c (stdint.h): Likewise.
74 * thread-db.c (stdint.h): Likewise.
75 * tracepoint.c (stdint.h): Likewise.
76 * win32-low.c (stdint.h): Likewise.
77
78 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
79
80 * server.c (write_qxfer_response): Update call to
81 remote_escape_output.
82
83 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
84 Jan Kratochvil <jan.kratochvil@redhat.com>
85
86 Merge multiple hex conversions.
87 * gdbreplay.c (tohex): Rename to 'fromhex'.
88 (logchar): Use fromhex.
89
90 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
91
92 * server.c (handle_qxfer_libraries): Set `version' attribute for
93 <library-list>.
94
95 2015-06-10 Gary Benson <gbenson@redhat.com>
96
97 * target.h (struct target_ops) <multifs_open>: New field.
98 <multifs_unlink>: Likewise.
99 <multifs_readlink>: Likewise.
100 * linux-low.c (nat/linux-namespaces.h): New include.
101 (linux_target_ops): Initialize the_target->multifs_open,
102 the_target->multifs_unlink and the_target->multifs_readlink.
103 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
104 * hostio.c (hostio_fs_pid): New static variable.
105 (hostio_handle_new_gdb_connection): New function.
106 (handle_setfs): Likewise.
107 (handle_open): Use the_target->multifs_open as appropriate.
108 (handle_unlink): Use the_target->multifs_unlink as appropriate.
109 (handle_readlink): Use the_target->multifs_readlink as
110 appropriate.
111 (handle_vFile): Handle vFile:setfs packets.
112 * server.c (handle_query): Call hostio_handle_new_gdb_connection
113 after target_handle_new_gdb_connection.
114
115 2015-06-10 Gary Benson <gbenson@redhat.com>
116
117 * configure.ac (AC_CHECK_FUNCS): Add setns.
118 * config.in: Regenerate.
119 * configure: Likewise.
120 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
121 (linux-namespaces.o): New rule.
122 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
123
124 2015-06-09 Gary Benson <gbenson@redhat.com>
125
126 * hostio.c (handle_open): Process mode argument with
127 fileio_to_host_mode.
128
129 2015-06-01 Yao Qi <yao.qi@linaro.org>
130
131 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
132 * linux-x86-low.c: Likewise.
133
134 2015-05-28 Don Breazeal <donb@codesourcery.com>
135
136 * linux-low.c (handle_extended_wait): Initialize
137 thread_info.last_resume_kind for new fork children.
138
139 2015-05-15 Pedro Alves <palves@redhat.com>
140
141 * target.h (target_handle_new_gdb_connection): Rewrite using if
142 wrapped in do/while.
143
144 2015-05-14 Joel Brobecker <brobecker@adacore.com>
145
146 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
147 * configure, config.in: Regenerate.
148 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
149 Declare typedef.
150
151 2015-05-12 Don Breazeal <donb@codesourcery.com>
152
153 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
154 PTRACE_EVENT_VFORK_DONE.
155 (linux_low_ptrace_options, extended_event_reported): Add vfork
156 events.
157 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
158 and "vforkdone" for RSP 'T' Stop Reply Packet.
159 * server.h (report_vfork_events): Declare
160 global variable.
161
162 2015-05-12 Don Breazeal <donb@codesourcery.com>
163
164 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
165 (the_low_target) <new_fork>: Initialize new member.
166 * linux-arm-low.c (arm_new_fork): New function.
167 (the_low_target) <new_fork>: Initialize new member.
168 * linux-low.c (handle_extended_wait): Call new target function
169 new_fork.
170 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
171 * linux-mips-low.c (mips_add_watchpoint): New function
172 extracted from mips_insert_point.
173 (the_low_target) <new_fork>: Initialize new member.
174 (mips_linux_new_fork): New function.
175 (mips_insert_point): Call mips_add_watchpoint.
176 * linux-x86-low.c (x86_linux_new_fork): New function.
177 (the_low_target) <new_fork>: Initialize new member.
178
179 2015-05-12 Don Breazeal <donb@codesourcery.com>
180
181 * linux-low.c (handle_extended_wait): Implement return value,
182 rename argument 'event_child' to 'event_lwp', handle
183 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
184 (linux_low_ptrace_options): New function.
185 (linux_low_filter_event): Call linux_low_ptrace_options,
186 use different argument fo linux_enable_event_reporting,
187 use return value from handle_extended_wait.
188 (extended_event_reported): New function.
189 (linux_wait_1): Call extended_event_reported and set
190 status to report fork events.
191 (linux_write_memory): Add pid to debug message.
192 (reset_lwp_ptrace_options_callback): New function.
193 (linux_handle_new_gdb_connection): New function.
194 (linux_target_ops): Initialize new structure member.
195 * linux-low.h (struct lwp_info) <waitstatus>: New member.
196 * lynx-low.c: Initialize new structure member.
197 * remote-utils.c (prepare_resume_reply): Implement stop reason
198 "fork" for "T" stop message.
199 * server.c (handle_query): Call handle_new_gdb_connection.
200 * server.h (report_fork_events): Declare global flag.
201 * target.h (struct target_ops) <handle_new_gdb_connection>:
202 New member.
203 (target_handle_new_gdb_connection): New macro.
204 * win32-low.c: Initialize new structure member.
205
206 2015-05-12 Don Breazeal <donb@codesourcery.com>
207
208 * mem-break.c (APPEND_TO_LIST): Define macro.
209 (clone_agent_expr): New function.
210 (clone_one_breakpoint): New function.
211 (clone_all_breakpoints): New function.
212 * mem-break.h: Declare new functions.
213
214 2015-05-12 Don Breazeal <donb@codesourcery.com>
215
216 * linux-low.c (linux_supports_fork_events): New function.
217 (linux_supports_vfork_events): New function.
218 (linux_target_ops): Initialize new structure members.
219 (initialize_low): Call linux_check_ptrace_features.
220 * lynx-low.c (lynx_target_ops): Initialize new structure
221 members.
222 * server.c (report_fork_events, report_vfork_events):
223 New global flags.
224 (handle_query): Add new features to qSupported packet and
225 response.
226 (captured_main): Initialize new global variables.
227 * target.h (struct target_ops) <supports_fork_events>:
228 New member.
229 <supports_vfork_events>: New member.
230 (target_supports_fork_events): New macro.
231 (target_supports_vfork_events): New macro.
232 * win32-low.c (win32_target_ops): Initialize new structure
233 members.
234
235 2015-05-12 Gary Benson <gbenson@redhat.com>
236
237 * server.c (handle_qxfer_exec_file): Use current process
238 if annex is empty.
239
240 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
241
242 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
243 Remove HAVE_PTRACE_GETREGS conditionals.
244 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
245 instead of PTRACE_GETREGS and PTRACE_SETREGS.
246
247 2015-05-08 Yao Qi <yao.qi@linaro.org>
248
249 * linux-low.c (linux_supports_conditional_breakpoints): New
250 function.
251 (linux_target_ops): Install new target method.
252 * lynx-low.c (lynx_target_ops): Install NULL hook for
253 supports_conditional_breakpoints.
254 * nto-low.c (nto_target_ops): Likewise.
255 * spu-low.c (spu_target_ops): Likewise.
256 * win32-low.c (win32_target_ops): Likewise.
257 * server.c (handle_query): Check
258 target_supports_conditional_breakpoints.
259 * target.h (struct target_ops) <supports_conditional_breakpoints>:
260 New field.
261 (target_supports_conditional_breakpoints): New macro.
262
263 2015-05-06 Pedro Alves <palves@redhat.com>
264
265 PR server/18081
266 * server.c (start_inferior): If the process exits, mourn it.
267
268 2015-04-21 Gary Benson <gbenson@redhat.com>
269
270 * hostio.c (fileio_open_flags_to_host): Factored out to
271 fileio_to_host_openflags in common/fileio.c. Single use
272 updated.
273
274 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
275
276 * linux-xtensa-low.c (xtensa_fill_gregset)
277 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
278 XCHAL_HAVE_LOOP.
279
280 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
281
282 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
283 (regs_info): Replace usrregs pointer with NULL.
284
285 2015-04-17 Gary Benson <gbenson@redhat.com>
286
287 * target.h (struct target_ops) <pid_to_exec_file>: New field.
288 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
289 * server.c (handle_qxfer_exec_file): New function.
290 (qxfer_packets): Add exec-file entry.
291 (handle_query): Report qXfer:exec-file:read as supported packet.
292
293 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
294
295 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
296
297 2015-04-09 Gary Benson <gbenson@redhat.com>
298
299 * hostio-errno.c (errno_to_fileio_error): Remove function.
300 Update caller to use remote_fileio_to_fio_error.
301
302 2015-04-09 Yao Qi <yao.qi@linaro.org>
303
304 * linux-low.c (linux_insert_point): Call
305 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
306 (linux_remove_point): Call remove_memory_breakpoint if type is
307 raw_bkpt_type_sw.
308 * linux-x86-low.c (x86_insert_point): Don't call
309 insert_memory_breakpoint.
310 (x86_remove_point): Don't call remove_memory_breakpoint.
311
312 2015-04-01 Pedro Alves <palves@redhat.com>
313 Cleber Rosa <crosa@redhat.com>
314
315 * server.c (gdbserver_usage): Reorganize and extend the usage
316 message.
317
318 2015-03-24 Pedro Alves <palves@redhat.com>
319
320 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
321 output. Also dump TRAP_TRACE.
322 (linux_low_filter_event): In debug output, distinguish a
323 resume_stop SIGSTOP from a delayed SIGSTOP.
324
325 2015-03-24 Gary Benson <gbenson@redhat.com>
326
327 * linux-x86-low.c (x86_linux_new_thread): Moved to
328 nat/x86-linux.c.
329 (x86_linux_prepare_to_resume): Likewise.
330
331 2015-03-24 Gary Benson <gbenson@redhat.com>
332
333 * Makefile.in (x86-linux-dregs.o): New rule.
334 * configure.srv: Add x86-linux-dregs.o to relevant targets.
335 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
336 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
337 (x86_linux_dr_get): Likewise.
338 (x86_linux_dr_set): Likewise.
339 (update_debug_registers_callback): Likewise.
340 (x86_linux_dr_set_addr): Likewise.
341 (x86_linux_dr_get_addr): Likewise.
342 (x86_linux_dr_set_control): Likewise.
343 (x86_linux_dr_get_control): Likewise.
344 (x86_linux_dr_get_status): Likewise.
345 (x86_linux_update_debug_registers): Likewise.
346
347 2015-03-24 Gary Benson <gbenson@redhat.com>
348
349 * linux-x86-low.c (x86_linux_update_debug_registers):
350 New function, factored out from...
351 (x86_linux_prepare_to_resume): ...this.
352
353 2015-03-24 Gary Benson <gbenson@redhat.com>
354
355 * linux-x86-low.c (x86_linux_dr_get): Update comments.
356 (x86_linux_dr_set): Likewise.
357 (update_debug_registers_callback): Likewise.
358 (x86_linux_dr_set_addr): Likewise.
359 (x86_linux_dr_get_addr): Likewise.
360 (x86_linux_dr_set_control): Likewise.
361 (x86_linux_dr_get_control): Likewise.
362 (x86_linux_dr_get_status): Likewise.
363 (x86_linux_prepare_to_resume): Likewise.
364
365 2015-03-24 Gary Benson <gbenson@redhat.com>
366
367 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
368 Use perror_with_name. Pass string through gettext.
369 (x86_linux_dr_set): Likewise.
370
371 2015-03-24 Gary Benson <gbenson@redhat.com>
372
373 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
374 (x86_linux_dr_set_addr): ...this.
375 (x86_dr_low_get_addr): Rename to...
376 (x86_linux_dr_get_addr): ...this.
377 (x86_dr_low_set_control): Rename to...
378 (x86_linux_dr_set_control): ...this.
379 (x86_dr_low_get_control): Rename to...
380 (x86_linux_dr_get_control): ...this.
381 (x86_dr_low_get_status): Rename to...
382 (x86_linux_dr_get_status): ...this.
383 (x86_dr_low): Update with new function names.
384
385 2015-03-24 Gary Benson <gbenson@redhat.com>
386
387 * Makefile.in (x86-linux.o): New rule.
388 * configure.srv: Add x86-linux.o to relevant targets.
389 * linux-low.c (lwp_set_arch_private_info): New function.
390 (lwp_arch_private_info): Likewise.
391 * linux-x86-low.c: Include nat/x86-linux.h.
392 (arch_lwp_info): Removed structure.
393 (update_debug_registers_callback):
394 Use lwp_set_debug_registers_changed.
395 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
396 and lwp_set_debug_registers_changed.
397 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
398
399 2015-03-24 Gary Benson <gbenson@redhat.com>
400
401 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
402 * linux-arm-low.c (arm_new_thread): Likewise.
403 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
404 * linux-mips-low.c (mips_linux_new_thread): Likewise.
405 * linux-x86-low.c (x86_linux_new_thread): Likewise.
406 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
407
408 2015-03-24 Gary Benson <gbenson@redhat.com>
409
410 * linux-low.c (ptid_of_lwp): New function.
411 (lwp_is_stopped): Likewise.
412 (lwp_stop_reason): Likewise.
413 * linux-x86-low.c (update_debug_registers_callback):
414 Use lwp_is_stopped.
415 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
416 lwp_stop_reason.
417
418 2015-03-24 Gary Benson <gbenson@redhat.com>
419
420 * linux-low.h (linux_stop_lwp): Remove declaration.
421
422 2015-03-24 Gary Benson <gbenson@redhat.com>
423
424 * linux-low.h: Include nat/linux-nat.h.
425 * linux-low.c (iterate_over_lwps_args): New structure.
426 (iterate_over_lwps_filter): New function.
427 (iterate_over_lwps): Likewise.
428 * linux-x86-low.c (update_debug_registers_callback):
429 Update signature to what iterate_over_lwps expects.
430 Remove PID check that iterate_over_lwps now performs.
431 (x86_dr_low_set_addr): Use iterate_over_lwps.
432 (x86_dr_low_set_control): Likewise.
433
434 2015-03-24 Gary Benson <gbenson@redhat.com>
435
436 * linux-x86-low.c (x86_debug_reg_state): New function.
437 (x86_linux_prepare_to_resume): Use the above.
438
439 2015-03-24 Gary Benson <gbenson@redhat.com>
440
441 * linux-low.c (current_lwp_ptid): New function.
442 * linux-x86-low.c: Include nat/linux-nat.h.
443 (x86_dr_low_get_addr): Use current_lwp_ptid.
444 (x86_dr_low_get_control): Likewise.
445 (x86_dr_low_get_status): Likewise.
446
447 2015-03-20 Pedro Alves <palves@redhat.com>
448
449 * tracepoint.c (cmd_qtstatus): Make "str" const.
450
451 2015-03-20 Pedro Alves <palves@redhat.com>
452
453 * server.c (handle_general_set): Make "req_str" const.
454
455 2015-03-19 Pedro Alves <palves@redhat.com>
456
457 * linux-low.c (linux_resume_one_lwp): Rename to ...
458 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
459 instead call perror_with_name.
460 (check_ptrace_stopped_lwp_gone): New function.
461 (linux_resume_one_lwp): Reimplement as wrapper around
462 linux_resume_one_lwp_throw that swallows errors if the LWP is
463 gone.
464
465 2015-03-19 Pedro Alves <palves@redhat.com>
466
467 * linux-low.c (count_events_callback, select_event_lwp_callback):
468 No longer check whether the thread has resume_stop as last resume
469 kind.
470
471 2015-03-19 Pedro Alves <palves@redhat.com>
472
473 * linux-low.c (count_events_callback, select_event_lwp_callback):
474 Use the lwp's status_pending_p field, not the thread's.
475
476 2015-03-19 Pedro Alves <palves@redhat.com>
477
478 * linux-low.c (select_event_lwp_callback): Update comments to
479 no longer mention SIGTRAP.
480
481 2015-03-18 Gary Benson <gbenson@redhat.com>
482
483 * server.c (handle_query): Do not report vFile:fstat as supported.
484
485 2015-03-11 Gary Benson <gbenson@redhat.com>
486
487 * hostio.c (sys/types.h): New include.
488 (sys/stat.h): Likewise.
489 (common-remote-fileio.h): Likewise.
490 (handle_fstat): New function.
491 (handle_vFile): Handle vFile:fstat packets.
492
493 2015-03-11 Gary Benson <gbenson@redhat.com>
494
495 * configure.ac (AC_CHECK_MEMBERS): Add checks for
496 struct stat.st_blocks and struct stat.st_blksize.
497 * configure: Regenerate.
498 * config.in: Likewise.
499 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
500 (OBS): Add common-remote-fileio.o.
501 (common-remote-fileio.o): New rule.
502
503 2015-03-09 Pedro Alves <palves@redhat.com>
504
505 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
506 'struct sockaddr' pointer in 'accept' call.
507
508 2015-03-09 Pedro Alves <palves@redhat.com>
509
510 Revert:
511 2015-03-07 Pedro Alves <palves@redhat.com>
512 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
513 or <winsock2.h> here. Instead include "gdb_socket.h".
514 (remote_open): Use union gdb_sockaddr_u.
515 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
516 or <winsock2.h> here. Instead include "gdb_socket.h".
517 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
518 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
519 or <sys/un.h>.
520 (init_named_socket, gdb_agent_helper_thread): Use union
521 gdb_sockaddr_u.
522
523 2015-03-07 Pedro Alves <palves@redhat.com>
524
525 * configure.ac (build_warnings): Move
526 -Wdeclaration-after-statement to the C-specific set.
527 * configure: Regenerate.
528
529 2015-03-07 Pedro Alves <palves@redhat.com>
530
531 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
532 or <winsock2.h> here. Instead include "gdb_socket.h".
533 (remote_open): Use union gdb_sockaddr_u.
534 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
535 or <winsock2.h> here. Instead include "gdb_socket.h".
536 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
537 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
538 or <sys/un.h>.
539 (init_named_socket, gdb_agent_helper_thread): Use union
540 gdb_sockaddr_u.
541
542 2015-03-07 Pedro Alves <palves@redhat.com>
543
544 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
545 instead.
546
547 2015-03-06 Yao Qi <yao.qi@linaro.org>
548
549 * linux-aarch64-low.c (aarch64_insert_point): Use
550 show_debug_regs as a boolean.
551 (aarch64_remove_point): Likewise.
552
553 2015-03-05 Pedro Alves <palves@redhat.com>
554
555 * lynx-low.c (lynx_target_ops): Install NULL hooks for
556 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
557 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
558 * nto-low.c (nto_target_ops): Likewise.
559 * spu-low.c (spu_target_ops): Likewise.
560 * win32-low.c (win32_target_ops): Likewise.
561
562 2015-03-04 Pedro Alves <palves@redhat.com>
563
564 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
565 Decide whether a breakpoint triggered based on the SIGTRAP's
566 siginfo.si_code.
567 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
568 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
569 (linux_low_filter_event): Check for breakpoints before checking
570 watchpoints.
571 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
572 siginfo.si_code.
573 (linux_stopped_by_sw_breakpoint)
574 (linux_supports_stopped_by_sw_breakpoint)
575 (linux_stopped_by_hw_breakpoint)
576 (linux_supports_stopped_by_hw_breakpoint): New functions.
577 (linux_target_ops): Install new target methods.
578
579 2015-03-04 Pedro Alves <palves@redhat.com>
580
581 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
582 * server.c (swbreak_feature, hwbreak_feature): New globals.
583 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
584 (captured_main): Clear swbreak_feature and hwbreak_feature.
585 * server.h (swbreak_feature, hwbreak_feature): Declare.
586 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
587 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
588 supports_stopped_by_hw_breakpoint>: New fields.
589 (target_supports_stopped_by_sw_breakpoint)
590 (target_stopped_by_sw_breakpoint)
591 (target_supports_stopped_by_hw_breakpoint)
592 (target_stopped_by_hw_breakpoint): Declare.
593
594 2015-03-04 Pedro Alves <palves@redhat.com>
595
596 enum lwp_stop_reason -> enum target_stop_reason
597 * linux-low.c (check_stopped_by_breakpoint): Adjust.
598 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
599 (linux_wait_1, stuck_in_jump_pad_callback)
600 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
601 (linux_stopped_by_watchpoint):
602 * linux-low.h (enum lwp_stop_reason): Delete.
603 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
604 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
605
606 2015-03-04 Yao Qi <yao.qi@linaro.org>
607
608 * Makefile.in (SFILES): Add linux-aarch64-low.c.
609
610 2015-03-03 Gary Benson <gbenson@redhat.com>
611
612 * hostio.c (handle_vFile): Fix prefix lengths.
613
614 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
615
616 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
617 ptr_bits.
618
619 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
620
621 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
622 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
623 (clean): Add "rm -f" for above C files.
624 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
625 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
626 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
627 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
628 * linux-s390-low.c (HWCAP_S390_VX): New macro.
629 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
630 (init_registers_s390x_vx_linux64)
631 (init_registers_s390x_tevx_linux64)
632 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
633 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
634 declarations.
635 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
636 (s390_store_vxrs_high): New functions.
637 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
638 NT_S390_VXRS_HIGH.
639 (s390_arch_setup): Add logic for selecting one of the new target
640 descriptions. Activate the new vector regsets if applicable.
641 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
642 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
643 and init_registers_s390x_tevx_linux64.
644
645 2015-03-01 Pedro Alves <palves@redhat.com>
646
647 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
648 parameter.
649
650 2015-02-27 Pedro Alves <palves@redhat.com>
651
652 * linux-x86-low.c (u_debugreg_offset): New function.
653 (x86_linux_dr_get, x86_linux_dr_set): Use it.
654
655 2015-02-27 Pedro Alves <palves@redhat.com>
656
657 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
658 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
659 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
660 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
661 (ps_lsetfpregs, ps_getpid)
662 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
663 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
664 (ps_lsetxregs, ps_plog): Declare.
665
666 2015-02-27 Pedro Alves <palves@redhat.com>
667
668 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
669 IP_AGENT_EXPORT_FUNC.
670 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
671 IP_AGENT_EXPORT_FUNC.
672 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
673 (IP_AGENT_EXPORT): Delete.
674 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
675 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
676 (gdb_trampoline_buffer_error, collecting, gdb_collect)
677 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
678 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
679 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
680 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
681 (traceframe_read_count, traceframe_write_count)
682 (traceframes_created, trace_state_variables, get_raw_reg)
683 (get_trace_state_variable_value, set_trace_state_variable_value)
684 (ust_loaded, helper_thread_id, cmd_buf): Use
685 IPA_SYM_EXPORTED_NAME.
686 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
687 (tracepoints) Use IP_AGENT_EXPORT_VAR.
688 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
689 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
690 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
691 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
692 EXTERN_C_PUSH/EXTERN_C_POP.
693 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
694 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
695 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
696 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
697 (traceframe_write_count, traceframe_read_count)
698 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
699 (about_to_request_buffer_space, get_trace_state_variable_value)
700 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
701 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
702 EXTERN_C_PUSH/EXTERN_C_POP.
703 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
704 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
705 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
706 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
707 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
708 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
709 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
710 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
711 Define.
712 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
713 (IP_AGENT_EXPORT_VAR_DECL): Define.
714 (tracing): Declare.
715 (gdb_agent_get_raw_reg): Declare.
716
717 2015-02-27 Tom Tromey <tromey@redhat.com>
718 Pedro Alves <palves@redhat.com>
719
720 Rename symbols whose names are reserved C++ keywords throughout.
721
722 2015-02-27 Pedro Alves <palves@redhat.com>
723
724 * Makefile.in (COMPILER): New, get it from autoconf.
725 (CXX): Get from autoconf instead.
726 (COMPILE.pre): Use COMPILER.
727 (CC-LD): Rename to ...
728 (CC_LD): ... this. Use COMPILER.
729 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
730 (CXX_FOR_TARGET): Default to g++ instead of gcc.
731 * acinclude.m4: Include build-with-cxx.m4.
732 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
733 Disable -Werror by default if building in C++ mode.
734 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
735 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
736 the C++ compiler. Save/restore CXXFLAGS too.
737 * configure: Regenerate.
738
739 2015-02-27 Pedro Alves <palves@redhat.com>
740
741 * acinclude.m4: Include libiberty.m4.
742 * configure.ac: Call libiberty_INIT.
743 * config.in, configure: Regenerate.
744
745 2015-02-26 Pedro Alves <palves@redhat.com>
746
747 * linux-low.c (linux_wait_1): When incrementing the PC past a
748 program breakpoint always use the_low_target.breakpoint_len as
749 increment, rather than the maximum between that and
750 the_low_target.decr_pc_after_break.
751
752 2015-02-23 Pedro Alves <palves@redhat.com>
753
754 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
755 thread was doing a step-over; always adjust the PC if
756 we stepped over a permanent breakpoint.
757 (linux_wait_1): If we stepped over breakpoint that was on top of a
758 permanent breakpoint, manually advance the PC past it.
759
760 2015-02-23 Pedro Alves <palves@redhat.com>
761
762 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
763 modes.
764 (x86_fill_gregset, x86_store_gregset): Use it when handling
765 $orig_eax.
766
767 2015-02-20 Pedro Alves <palves@redhat.com>
768
769 * thread-db.c: Include "nat/linux-procfs.h".
770 (thread_db_init): Skip listing new threads if the kernel supports
771 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
772
773 2015-02-20 Pedro Alves <palves@redhat.com>
774
775 * linux-low.c (status_pending_p_callback): Use ptid_match.
776
777 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
778
779 PR breakpoints/16812
780 * linux-low.c (wstatus_maybe_breakpoint): Remove.
781 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
782 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
783
784 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
785
786 PR breakpoints/15956
787 * tracepoint.c (cmd_qtinit): Add check for current_thread.
788
789 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
790
791 * linux-low.c (linux_low_btrace_conf): Print size.
792 * server.c (handle_btrace_conf_general_set): New.
793 (hanle_general_set): Call handle_btrace_conf_general_set.
794 (handle_query): Report Qbtrace-conf:bts:size as supported.
795
796 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
797
798 * linux-low.c (linux_low_enable_btrace): Update parameters.
799 (linux_low_btrace_conf): New.
800 (linux_target_ops)<to_btrace_conf>: Initialize.
801 * server.c (current_btrace_conf): New.
802 (handle_btrace_enable): Rename to ...
803 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
804 to target_enable_btrace. Update comment. Update users.
805 (handle_qxfer_btrace_conf): New.
806 (qxfer_packets): Add btrace-conf entry.
807 (handle_query): Report qXfer:btrace-conf:read as supported packet.
808 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
809 (target_ops)<read_btrace_conf>: New.
810 (target_enable_btrace): Update parameters.
811 (target_read_btrace_conf): New.
812
813 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
814
815 * server.c (handle_btrace_general_set): Remove call to
816 target_supports_btrace.
817 (supported_btrace_packets): New.
818 (handle_query): Call supported_btrace_packets.
819 * target.h: include btrace-common.h.
820 (btrace_target_info): Removed.
821 (supports_btrace, target_supports_btrace): Update parameters.
822
823 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
824
825 * Makefile.in (SFILES): Add common/btrace-common.c.
826 (OBS): Add common/btrace-common.o.
827 (btrace-common.o): Add build rules.
828 * linux-low: Include btrace-common.h.
829 (linux_low_read_btrace): Use struct btrace_data. Call
830 btrace_data_init and btrace_data_fini.
831
832 2015-02-06 Pedro Alves <palves@redhat.com>
833
834 * thread-db.c (find_new_threads_callback): Add debug output.
835
836 2015-02-04 Pedro Alves <palves@redhat.com>
837
838 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
839 (resume_stopped_resumed_lwps): New function.
840 (linux_wait_for_event_filtered): Use it.
841
842 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
843
844 * Makefile.in (SFILES): Add linux-personality.c.
845 (linux-personality.o): New rule.
846 * configure.srv (srv_linux_obj): Add linux-personality.o to the
847 list of objects to be built.
848 * linux-low.c: Include nat/linux-personality.h.
849 (linux_create_inferior): Remove code to disable address space
850 randomization (moved to ../nat/linux-personality.c). Create
851 cleanup to disable address space randomization.
852
853 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
854
855 * Makefile.in (posix-strerror.o): New rule.
856 (mingw-strerror.o): Likewise.
857 * configure: Regenerated.
858 * configure.ac: Source file ../common/common.host. Initialize new
859 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
860
861 2015-01-14 Yao Qi <yao@codesourcery.com>
862
863 * Makefile.in (SFILES): Add nat/ppc-linux.c.
864 (ppc-linux.o): New rule.
865 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
866 * configure.ac: AC_CHECK_FUNCS(getauxval).
867 * config.in: Re-generated.
868 * configure: Re-generated.
869 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
870 ppc64_64bit_inferior_p
871
872 2015-01-14 Yao Qi <yao@codesourcery.com>
873
874 * linux-ppc-low.c: Include "nat/ppc-linux.h".
875 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
876 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
877 (PT_ORIG_R3, PT_TRAP): Likewise.
878 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
879 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
880 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
881
882 2015-01-10 Joel Brobecker <brobecker@adacore.com>
883
884 * i387-fp.c (i387_cache_to_xsave): In look over
885 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
886 zmmh_low_space field by use of zmmh_high_space.
887
888 2015-01-09 Pedro Alves <palves@redhat.com>
889
890 * linux-low.c (step_over_bkpt): Move higher up in the file.
891 (handle_extended_wait): Don't store the stop_pc here.
892 (get_stop_pc): Adjust comments and rename to ...
893 (check_stopped_by_breakpoint): ... this. Record whether the LWP
894 stopped for a software breakpoint or hardware breakpoint.
895 (thread_still_has_status_pending_p): New function.
896 (status_pending_p_callback): Use
897 thread_still_has_status_pending_p. If the event is no longer
898 interesting, resume the LWP.
899 (handle_tracepoints): Add assert.
900 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
901 (wstatus_maybe_breakpoint): New function.
902 (cancel_breakpoint): Delete function.
903 (check_stopped_by_watchpoint): New function, factored out from
904 linux_low_filter_event.
905 (lp_status_maybe_breakpoint): Delete function.
906 (linux_low_filter_event): Remove filter_ptid argument.
907 Leave thread group exits pending here. Store the LWP's stop PC.
908 Always leave events pending.
909 (linux_wait_for_event_filtered): Pull all events out of the
910 kernel, and leave them all pending.
911 (count_events_callback, select_event_lwp_callback): Consider all
912 events.
913 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
914 (select_event_lwp): Only give preference to the stepping LWP in
915 all-stop mode. Adjust comments.
916 (ignore_event): New function.
917 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
918 references to cancel_breakpoints. Adjust to renames. Also give
919 equal priority to all LWPs that have had events in non-stop mode.
920 If reporting a software breakpoint event, unadjust the LWP's PC.
921 (linux_wait): If linux_wait_1 returned an ignored event, retry.
922 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
923 Adjust.
924 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
925 (resume_status_pending_p): Use thread_still_has_status_pending_p.
926 (linux_stopped_by_watchpoint): Adjust.
927 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
928 * linux-low.h (enum lwp_stop_reason): New.
929 (struct lwp_info) <stop_pc>: Adjust comment.
930 <stopped_by_watchpoint>: Delete field.
931 <stop_reason>: New field.
932 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
933 * mem-break.c (software_breakpoint_inserted_here)
934 (hardware_breakpoint_inserted_here): New function.
935 * mem-break.h (software_breakpoint_inserted_here)
936 (hardware_breakpoint_inserted_here): Declare.
937 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
938 (cancel_breakpoints): Delete.
939 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
940 (upload_fast_traceframes): Remove references to
941 cancel_breakpoints.
942
943 2015-01-09 Pedro Alves <palves@redhat.com>
944
945 * thread-db.c (find_new_threads_callback): Ignore thread if the
946 kernel thread ID is -1.
947
948 2015-01-09 Pedro Alves <palves@redhat.com>
949
950 * linux-low.c (linux_attach_fail_reason_string): Move to
951 nat/linux-ptrace.c, and rename.
952 (linux_attach_lwp): Update comment.
953 (attach_proc_task_lwp_callback): New function.
954 (linux_attach): Adjust to rename and use
955 linux_proc_attach_tgid_threads.
956 (linux_attach_fail_reason_string): Delete declaration.
957
958 2015-01-01 Joel Brobecker <brobecker@adacore.com>
959
960 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
961 * server.c (gdbserver_version): Likewise.
962
963 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
964
965 * remote-utils.c: Include ctype.h.
966 (input_interrupt): Explicitly handle the case when the char
967 received is the NUL byte. Improve the printing of non-ASCII
968 characters.
969
970 2014-12-16 Joel Brobecker <brobecker@adacore.com>
971
972 * linux-low.c (linux_low_filter_event): Update call to
973 linux_enable_event_reporting following the addition of
974 a new parameter to that function.
975
976 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
977
978 PR server/17457
979 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
980 (AARCH64_FPCR_REGNO): Likewise.
981 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
982 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
983 (aarch64_store_fpregset): Likewise.
984
985 2014-12-15 Joel Brobecker <brobecker@adacore.com>
986
987 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
988 Remove FIXME comment about assumption about N.
989
990 2014-12-13 Joel Brobecker <brobecker@adacore.com>
991
992 * configure.ac: If large-file support is disabled in GDBserver,
993 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
994 * configure: Regenerate.
995
996 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
997
998 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
999 warning upon ENODATA from ptrace.
1000 * linux-s390-low.c (s390_store_tdb): New.
1001 (s390_regsets): Add regset for NT_S390_TDB.
1002
1003 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1004
1005 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1006 without a fill_function.
1007 * linux-s390-low.c (s390_fill_last_break): Remove.
1008 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1009 (s390_arch_setup): Use regset's size instead of fill_function for
1010 loop end condition.
1011
1012 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1013
1014 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1015 the regset's store function when ptrace returned an error.
1016 * regcache.c (get_thread_regcache): Invalidate register cache
1017 before fetching inferior's registers.
1018
1019 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1020
1021 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1022 while-loop as for-loop.
1023 (regsets_store_inferior_registers): Likewise.
1024
1025 2014-11-28 Yao Qi <yao@codesourcery.com>
1026
1027 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1028 * config.in, configure: Re-generate.
1029 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1030 is defined.
1031
1032 2014-11-21 Yao Qi <yao@codesourcery.com>
1033
1034 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1035 (AC_CHECK_HEADERS): Remove malloc.h.
1036 * configure: Re-generated.
1037 * config.in: Re-generated.
1038 * server.h: Don't include alloca.h and malloc.h.
1039 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1040 Don't include malloc.h.
1041
1042 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1043
1044 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1045 corresponding ERRNO check in same block.
1046
1047 2014-11-12 Pedro Alves <palves@redhat.com>
1048
1049 * server.c (cont_thread): Update comment.
1050 (start_inferior, attach_inferior): No longer clear cont_thread.
1051 (handle_v_cont): No longer set cont_thread.
1052 (captured_main): Clear cont_thread each time a GDB connects.
1053
1054 2014-11-12 Pedro Alves <palves@redhat.com>
1055
1056 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1057 thread, and don't resume all threads if the Hc thread has exited.
1058
1059 2014-11-12 Pedro Alves <palves@redhat.com>
1060
1061 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1062 the process group instead of to a specific LWP.
1063
1064 2014-10-15 Pedro Alves <palves@redhat.com>
1065
1066 PR server/17487
1067 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1068 parameter.
1069 (arm_set_thread_context): Delete.
1070 (the_low_target): Adjust.
1071 * win32-i386-low.c (debug_registers_changed)
1072 (debug_registers_used): Delete.
1073 (update_debug_registers_callback): New function.
1074 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1075 needing to update their debug registers.
1076 (win32_get_current_dr): New function.
1077 (x86_dr_low_get_addr, x86_dr_low_get_control)
1078 (x86_dr_low_get_status): Fetch the debug register from the thread
1079 record's context.
1080 (i386_initial_stuff): Adjust.
1081 (i386_get_thread_context): Remove current_event parameter. Don't
1082 clear debug_registers_changed nor copy DR values to
1083 debug_reg_state.
1084 (i386_set_thread_context): Delete.
1085 (i386_prepare_to_resume): New function.
1086 (i386_thread_added): Mark the thread as needing to update irs
1087 debug registers.
1088 (the_low_target): Remove i386_set_thread_context and install
1089 i386_prepare_to_resume.
1090 * win32-low.c (win32_get_thread_context): Adjust.
1091 (win32_set_thread_context): Use SetThreadContext
1092 directly.
1093 (win32_prepare_to_resume): New function.
1094 (win32_require_context): New function, factored out from ...
1095 (thread_rec): ... this.
1096 (continue_one_thread): Call win32_prepare_to_resume on each thread
1097 we're about to continue.
1098 (win32_resume): Call win32_prepare_to_resume on the event thread.
1099 * win32-low.h (struct win32_thread_info)
1100 <debug_registers_changed>: New field.
1101 (struct win32_target_ops): Change prototype of set_thread_context,
1102 delete set_thread_context and add prepare_to_resume.
1103 (win32_require_context): New declaration.
1104
1105 2014-10-08 Gary Benson <gbenson@redhat.com>
1106
1107 * server.h: Do not include common-exceptions.h.
1108
1109 2014-10-08 Gary Benson <gbenson@redhat.com>
1110
1111 * server.h: Do not include cleanups.h.
1112
1113 2014-09-30 James Hogan <james.hogan@imgtec.com>
1114
1115 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1116 mips64-dsp-linux.c.
1117
1118 2014-09-23 Yao Qi <yao@codesourcery.com>
1119
1120 * linux-low.c (lp_status_maybe_breakpoint): New function.
1121 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1122 (count_events_callback): Likewise.
1123 (select_event_lwp_callback): Likewise.
1124 (cancel_breakpoints_callback): Likewise.
1125
1126 2014-09-19 Don Breazeal <donb@codesourcery.com>
1127
1128 * linux-low.c (handle_extended_wait): Call
1129 linux_ptrace_get_extended_event.
1130 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1131 linux_is_extended_waitstatus.
1132
1133 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1134
1135 * Makefile.in (CPPFLAGS): Define.
1136 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1137 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1138
1139 2014-09-16 Gary Benson <gbenson@redhat.com>
1140
1141 * inferiors.h (current_inferior): Renamed as...
1142 (current_thread): New variable. All uses updated.
1143 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1144 (maybe_move_out_of_jump_pad): Likewise.
1145 (cancel_breakpoint): Likewise.
1146 (linux_low_filter_event): Likewise.
1147 (wait_for_sigstop): Likewise.
1148 (linux_resume_one_lwp): Likewise.
1149 (need_step_over_p): Likewise.
1150 (start_step_over): Likewise.
1151 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1152 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1153 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1154 and save_inferior as saved_thread.
1155 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1156 saved_thread.
1157 (regcache_invalidate_thread): Likewise.
1158 * remote-utils.c (prepare_resume_reply): Likewise.
1159 * thread-db.c (thread_db_get_tls_address): Likewise.
1160 (disable_thread_event_reporting): Likewise.
1161 (remove_thread_event_breakpoints): Likewise.
1162 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1163 as saved_thread.
1164 * target.h (set_desired_inferior): Renamed as...
1165 (set_desired_thread): New declaration. All uses updated.
1166 * server.c (myresume): Updated comment to reference thread instead
1167 of inferior.
1168 (handle_serial_event): Likewise.
1169 (handle_target_event): Likewise.
1170
1171 2014-09-12 Tom Tromey <tromey@redhat.com>
1172 Gary Benson <gbenson@redhat.com>
1173
1174 * regcache.h: Include common-regcache.h.
1175 (regcache_read_pc): Don't declare.
1176 * regcache.c (get_thread_regcache_for_ptid): New function.
1177
1178 2014-09-11 Tom Tromey <tromey@redhat.com>
1179 Gary Benson <gbenson@redhat.com>
1180
1181 * symbol.c: New file.
1182 * Makefile.in (SFILES): Add symbol.c.
1183 (OBS): Add symbol.o.
1184
1185 2014-09-11 Gary Benson <gbenson@redhat.com>
1186
1187 * target.c (target_stop_ptid, target_continue_ptid): New
1188 functions.
1189
1190 2014-09-11 Tom Tromey <tromey@redhat.com>
1191 Gary Benson <gbenson@redhat.com>
1192
1193 * target.h: Include target/target.h.
1194 * target.c (target_read_memory, target_read_uint32)
1195 (target_write_memory): New functions.
1196
1197 2014-09-11 Gary Benson <gbenson@redhat.com>
1198
1199 * server.h (debug_hw_points): Don't declare.
1200 * server.c (debug_hw_points): Don't define. Replace all uses
1201 with show_debug_regs.
1202 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1203 all uses with show_debug_regs.
1204
1205 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1206
1207 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1208 endianness into account.
1209 (ppc_supply_ptrace_register): Likewise.
1210
1211 2014-09-03 James Hogan <james.hogan@imgtec.com>
1212
1213 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1214 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1215
1216 2014-09-03 Gary Benson <gbenson@redhat.com>
1217
1218 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1219 ALL_DEBUG_ADDRESS_REGISTERS.
1220
1221 2014-09-02 Gary Benson <gbenson@redhat.com>
1222
1223 * i386-low.h: Renamed as...
1224 * x86-low.h: New file. All type, function and variable name
1225 prefixes changed from "i386_" to "x86_". All references updated.
1226 * i386-low.c: Renamed as...
1227 * x86-low.c: New file. All type, function and variable name
1228 prefixes changed from "i386_" to "x86_". All references updated.
1229
1230 2014-09-02 Gary Benson <gbenson@redhat.com>
1231
1232 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1233 (x86_linux_new_thread): Likewise.
1234
1235 2014-08-29 Gary Benson <gbenson@redhat.com>
1236
1237 * server.h (setjmp.h): Do not include.
1238 (toplevel): Do not declare.
1239 (common-exceptions.h): Include.
1240 (cleanups.h): Likewise.
1241 * server.c (toplevel): Do not define.
1242 (exit_code): New static global.
1243 (detach_or_kill_for_exit_cleanup): New function.
1244 (main): New function. Original main renamed to...
1245 (captured_main): New function.
1246 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1247
1248 2014-08-29 Gary Benson <gbenson@redhat.com>
1249
1250 * Makefile.in (SFILES): Add common/common-exceptions.c.
1251 (OBS): Add common-exceptions.o.
1252 (common-exceptions.o): New rule.
1253 * utils.c (prepare_to_throw_exception): New function.
1254
1255 2014-08-29 Gary Benson <gbenson@redhat.com>
1256
1257 * config.in: Regenerate.
1258 * configure: Likewise.
1259
1260 2014-08-29 Gary Benson <gbenson@redhat.com>
1261
1262 * Makefile.in (SFILES): Add common/cleanups.c.
1263 (OBS): cleanups.o.
1264 (cleanups.o): New rule.
1265
1266 2014-08-29 Gary Benson <gbenson@redhat.com>
1267
1268 * utils.c (internal_vwarning): New function.
1269
1270 2014-08-28 Gary Benson <gbenson@redhat.com>
1271
1272 * utils.h (fatal): Remove declaration.
1273 * utils.c (fatal): Remove function.
1274
1275 2014-08-28 Gary Benson <gbenson@redhat.com>
1276
1277 * tracepoint.c (gdb_agent_init): Replace fatal with
1278 perror_with_name.
1279 (initialize_tracepoint): Likewise.
1280
1281 2014-08-28 Gary Benson <gbenson@redhat.com>
1282
1283 * remote-utils.c (remote_prepare): Replace fatal with error.
1284
1285 2014-08-28 Gary Benson <gbenson@redhat.com>
1286
1287 * linux-low.c (linux_async): Replace fatal with warning.
1288 Tidy up and return.
1289 (linux_start_non_stop): Return -1 if linux_async failed.
1290
1291 2014-08-28 Gary Benson <gbenson@redhat.com>
1292
1293 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1294 gdb_assert.
1295 (i386_dr_low_get_addr): Remove vague comment.
1296 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1297 gdb_assert.
1298
1299 2014-08-28 Gary Benson <gbenson@redhat.com>
1300
1301 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1302 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1303 internal_error.
1304 (linux_resume_one_lwp): Likewise.
1305 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1306 gdb_assert.
1307 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1308 with internal_error.
1309 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1310 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1311 (find_register_by_name): Replace fatal with internal_error.
1312 (find_regno): Likewise.
1313 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1314 * thread-db.c (thread_db_create_event): Likewise.
1315 (thread_db_load_search): Likewise.
1316 (try_thread_db_load_1): Likewise.
1317 * tracepoint.c (get_jump_space_head): Replace fatal with
1318 internal_error.
1319 (claim_trampoline_space): Likewise.
1320 (have_fast_tracepoint_trampoline_buffer): Likewise.
1321 (cmd_qtstart): Likewise.
1322 (stop_tracing): Likewise.
1323 (fast_tracepoint_collecting): Likewise.
1324 (target_malloc): Likewise.
1325 (download_tracepoint): Likewise.
1326 (download_trace_state_variables): Replace check with gdb_assert.
1327 (upload_fast_traceframes): Replace fatal with internal_error.
1328
1329 2014-08-19 Tom Tromey <tromey@redhat.com>
1330 Gary Benson <gbenson@redhat.com>
1331
1332 * Makefile.in (SFILES): Add common/common-debug.c.
1333 (OBS): Add common-debug.o.
1334 (common-debug.o): New rule.
1335 * debug.h (debug_printf): Don't declare.
1336 * debug.c (debug_printf): Renamed and rewritten as...
1337 (debug_vprintf): New function.
1338
1339 2014-08-19 Gary Benson <gbenson@redhat.com>
1340
1341 * utils.h: Do not include print-utils.h.
1342
1343 2014-08-19 Tom Tromey <tromey@redhat.com>
1344 Gary Benson <gbenson@redhat.com>
1345
1346 * server.h: Add static assertion.
1347 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1348
1349 2014-08-19 Tom Tromey <tromey@redhat.com>
1350 Gary Benson <gbenson@redhat.com>
1351
1352 * Makefile.in (SFILES): Add common/errors.c.
1353 (OBS): Add errors.o.
1354 (IPA_OBS): Add errors-ipa.o.
1355 (errors.o): New rule.
1356 (errors-ipa.o): Likewise.
1357 * utils.h (perror_with_name, error, warning): Don't declare.
1358 * utils.c (warning): Renamed and rewritten as...
1359 (vwarning): New function.
1360 (error): Renamed and rewritten as...
1361 (verror): New function.
1362 (internal_error): Renamed and rewritten as...
1363 (internal_verror): New function.
1364
1365 2014-08-07 Gary Benson <gbenson@redhat.com>
1366
1367 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1368 * configure: Regenerate.
1369 * config.in: Likewise.
1370 * server.h: Do not include errno.h.
1371 * event-loop.c: Likewise.
1372 * hostio-errno.c: Likewise.
1373 * linux-low.c: Likewise.
1374 * remote-utils.c: Likewise.
1375 * spu-low.c: Likewise.
1376 * utils.c: Likewise.
1377 * gdbreplay.c: Unconditionally include errno.h.
1378
1379 2014-08-07 Gary Benson <gbenson@redhat.com>
1380
1381 * server.h: Do not include string.h.
1382 * event-loop.c: Likewise.
1383 * linux-low.c: Likewise.
1384 * regcache.c: Likewise.
1385 * remote-utils.c: Likewise.
1386 * spu-low.c: Likewise.
1387 * utils.c: Likewise.
1388
1389 2014-08-07 Gary Benson <gbenson@redhat.com>
1390
1391 * server.h: Do not include gdb_assert.h.
1392
1393 2014-08-07 Gary Benson <gbenson@redhat.com>
1394
1395 * server.h: Do not include common-utils.h.
1396
1397 2014-08-07 Gary Benson <gbenson@redhat.com>
1398
1399 * server.h: Do not include ptid.h.
1400 * notif.h: Likewise.
1401
1402 2014-08-07 Gary Benson <gbenson@redhat.com>
1403
1404 * server.h: Do not include gdb_locale.h.
1405
1406 2014-08-07 Gary Benson <gbenson@redhat.com>
1407
1408 * server.h: Do not include gdb/signals.h.
1409 * win32-low.c: Likewise.
1410
1411 2014-08-07 Gary Benson <gbenson@redhat.com>
1412
1413 * server.h: Do not include pathmax.h.
1414
1415 2014-08-07 Gary Benson <gbenson@redhat.com>
1416
1417 * server.h: Do not include libiberty.h.
1418 * linux-bfin-low.c: Likewise.
1419
1420 2014-08-07 Gary Benson <gbenson@redhat.com>
1421
1422 * server.h: Do not include ansidecl.h.
1423
1424 2014-08-07 Gary Benson <gbenson@redhat.com>
1425
1426 * linux-x86-low.c: Do not include stddef.h.
1427 * lynx-ppc-low.c: Likewise.
1428 * tracepoint.c: Likewise.
1429
1430 2014-08-07 Gary Benson <gbenson@redhat.com>
1431
1432 * server.h: Do not include stdarg.h.
1433 * nto-low.c: Likewise.
1434
1435 2014-08-07 Gary Benson <gbenson@redhat.com>
1436
1437 * server.h: Do not include stdlib.h.
1438 * inferiors.c: Likewise.
1439 * linux-low.c: Likewise.
1440 * regcache.c: Likewise.
1441 * spu-low.c: Likewise.
1442 * tracepoint.c: Likewise.
1443 * utils.c: Likewise.
1444
1445 2014-08-07 Gary Benson <gbenson@redhat.com>
1446
1447 * server.h: Do not include stdio.h.
1448 * linux-low.c: Likewise.
1449 * remote-utils.c: Likewise.
1450 * spu-low.c: Likewise.
1451 * utils.c: Likewise.
1452 * wincecompat.c: Likewise.
1453
1454 2014-08-06 Gary Benson <gbenson@redhat.com>
1455
1456 * regcache.c (init_register_cache): Move conditionals inside if.
1457
1458 2014-08-06 Gary Benson <gbenson@redhat.com>
1459
1460 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1461
1462 2014-07-31 Gary Benson <gbenson@redhat.com>
1463
1464 * ax.h: Do not include server.h.
1465 * gdbthread.h: Likewise.
1466 * lynx-low.h: Likewise.
1467 * notif.h: Likewise.
1468
1469 2014-07-30 Gary Benson <gbenson@redhat.com>
1470
1471 * server.h: Include common-defs.h.
1472 Do not include config.h or build-gnulib-gdbserver/config.h.
1473
1474 2014-07-30 Gary Benson <gbenson@redhat.com>
1475
1476 * hostio-errno.c: Move server.h to top of includes list.
1477 * inferiors.c: Likewise.
1478 * linux-x86-low.c: Likewise.
1479 * notif.c: Include server.h.
1480
1481 2014-07-24 Tom Tromey <tromey@redhat.com>
1482 Gary Benson <gbenson@redhat.com>
1483
1484 * server.h (CORE_ADDR): Now unsigned.
1485
1486 2014-07-16 Pedro Alves <palves@redhat.com>
1487
1488 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1489
1490 2014-07-15 Pedro Alves <palves@redhat.com>
1491
1492 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1493 copy.
1494
1495 2014-07-11 Pedro Alves <palves@redhat.com>
1496
1497 * linux-low.c (kill_wait_lwp): New function, based on
1498 kill_one_lwp_callback, but use my_waitpid directly.
1499 (kill_one_lwp_callback, linux_kill): Use it.
1500
1501 2014-06-23 Pedro Alves <palves@redhat.com>
1502
1503 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1504 before setting DR0..DR3.
1505
1506 2014-06-20 Gary Benson <gbenson@redhat.com>
1507
1508 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1509 * configure: Regenerated.
1510 * config.in: Likewise.
1511
1512 2014-06-20 Gary Benson <gbenson@redhat.com>
1513
1514 * Makefile.in (SFILES): Update locations for files moved
1515 from common to nat.
1516 (object file files): Reordered.
1517
1518 2014-06-20 Gary Benson <gbenson@redhat.com>
1519
1520 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1521 (i386_dr_low_set_addr): Likewise.
1522 (i386_dr_low_get_addr): Likewise.
1523 (i386_dr_low_can_set_control): Likewise.
1524 (i386_dr_low_set_control): Likewise.
1525 (i386_dr_low_get_control): Likewise.
1526 (i386_dr_low_get_status): Likewise.
1527 (i386_get_debug_register_length): Likewise.
1528 * linux-x86-low.c (i386_dr_low_set_addr):
1529 Changed signature. Made static.
1530 (i386_dr_low_get_addr): Likewise.
1531 (i386_dr_low_set_control): Likewise.
1532 (i386_dr_low_get_control): Likewise.
1533 (i386_dr_low_get_status): Likewise.
1534 (i386_dr_low): New global variable.
1535 * win32-i386-low.c (i386_dr_low_set_addr):
1536 Changed signature. Made static.
1537 (i386_dr_low_get_addr): Likewise.
1538 (i386_dr_low_set_control): Likewise.
1539 (i386_dr_low_get_control): Likewise.
1540 (i386_dr_low_get_status): Likewise.
1541 (i386_dr_low): New global variable.
1542
1543 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1544
1545 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1546 * Makefile.in (AR, AR_FLAGS): Define.
1547 * configure: Regenerate.
1548
1549 2014-06-19 Gary Benson <gbenson@redhat.com>
1550
1551 * Makefile.in (i386-dregs.o): New rule.
1552 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1553 * i386-low.c (target.h): Remove include.
1554 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1555 (DR_CONTROL_SHIFT): Likewise.
1556 (DR_CONTROL_SIZE): Likewise.
1557 (DR_RW_EXECUTE): Likewise.
1558 (DR_RW_WRITE): Likewise.
1559 (DR_RW_READ): Likewise.
1560 (DR_RW_IORW): Likewise.
1561 (DR_LEN_1): Likewise.
1562 (DR_LEN_2): Likewise.
1563 (DR_LEN_4): Likewise.
1564 (DR_LEN_8): Likewise.
1565 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1566 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1567 (DR_ENABLE_SIZE): Likewise.
1568 (DR_LOCAL_SLOWDOWN): Likewise.
1569 (DR_GLOBAL_SLOWDOWN): Likewise.
1570 (DR_CONTROL_RESERVED): Likewise.
1571 (I386_DR_CONTROL_MASK): Likewise.
1572 (I386_DR_VACANT): Likewise.
1573 (I386_DR_LOCAL_ENABLE): Likewise.
1574 (I386_DR_GLOBAL_ENABLE): Likewise.
1575 (I386_DR_DISABLE): Likewise.
1576 (I386_DR_SET_RW_LEN): Likewise.
1577 (I386_DR_GET_RW_LEN): Likewise.
1578 (I386_DR_WATCH_HIT): Likewise.
1579 (i386_wp_op_t): Likewise.
1580 (i386_show_dr): Likewise.
1581 (i386_length_and_rw_bits): Likewise.
1582 (i386_insert_aligned_watchpoint): Likewise.
1583 (i386_remove_aligned_watchpoint): Likewise.
1584 (i386_handle_nonaligned_watchpoint): Likewise.
1585 i386_update_inferior_debug_regs(): Likewise.
1586 (i386_dr_insert_watchpoint): Likewise.
1587 (i386_dr_remove_watchpoint): Likewise.
1588 (i386_dr_region_ok_for_watchpoint): Likewise.
1589 (i386_dr_stopped_data_address): Likewise.
1590 (i386_dr_stopped_by_watchpoint): Likewise.
1591
1592 2014-06-19 Gary Benson <gbenson@redhat.com>
1593
1594 * i386-low.c (i386_dr_show): Renamed to
1595 i386_show_dr and made static. All uses updated.
1596 (i386_dr_length_and_rw_bits): Renamed to
1597 i386_length_and_rw_bits and made static.
1598 All uses updated.
1599 (i386_dr_insert_aligned_watchpoint): Renamed to
1600 i386_insert_aligned_watchpoint and made static.
1601 All uses updated.
1602 (i386_dr_remove_aligned_watchpoint): Renamed to
1603 i386_remove_aligned_watchpoint and made static.
1604 All uses updated.
1605 (i386_dr_update_inferior_debug_regs): Renamed to
1606 i386_update_inferior_debug_regs and made static.
1607 All uses updated.
1608
1609 2014-06-18 Gary Benson <gbenson@redhat.com>
1610
1611 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1612 (i386_dr_low_can_set_control): Likewise.
1613 (i386_get_debug_register_length): Likewise.
1614 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1615 (i386_dr_low_can_set_control): Likewise.
1616 (i386_get_debug_register_length): Likewise.
1617
1618 2014-06-17 Gary Benson <gbenson@redhat.com>
1619
1620 * i386-low.h (i386-dregs.h): New include.
1621 (DR_FIRSTADDR): Now in i386-dregs.h.
1622 (DR_LASTADDR): Likewise.
1623 (DR_NADDR): Likewise.
1624 (DR_STATUS): Likewise.
1625 (DR_CONTROL): Likewise.
1626 (i386_debug_reg_state): Likewise.
1627 (i386_dr_insert_watchpoint): Likewise.
1628 (i386_dr_remove_watchpoint): Likewise.
1629 (i386_dr_region_ok_for_watchpoint): Likewise.
1630 (i386_dr_stopped_data_address): Likewise.
1631 (i386_dr_stopped_by_watchpoint): Likewise.
1632 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1633
1634 2014-06-18 Gary Benson <gbenson@redhat.com>
1635
1636 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1637 i386_dr_insert_watchpoint.
1638 (i386_low_remove_watchpoint): Renamed to
1639 i386_dr_remove_watchpoint.
1640 (i386_low_region_ok_for_watchpoint): Renamed to
1641 i386_dr_region_ok_for_watchpoint.
1642 (i386_low_stopped_data_address): Renamed to
1643 i386_dr_stopped_data_address.
1644 (i386_low_stopped_by_watchpoint): Renamed to
1645 i386_dr_stopped_by_watchpoint.
1646 * i386-low.c (i386_show_dr): Renamed to
1647 i386_dr_show and made nonstatic. All uses updated.
1648 (i386_length_and_rw_bits): Renamed to
1649 i386_dr_length_and_rw_bits and made nonstatic.
1650 All uses updated.
1651 (i386_insert_aligned_watchpoint): Renamed to
1652 i386_dr_insert_aligned_watchpoint and made nonstatic.
1653 All uses updated.
1654 (i386_remove_aligned_watchpoint): Renamed to
1655 i386_dr_remove_aligned_watchpoint and made nonstatic.
1656 All uses updated.
1657 (i386_update_inferior_debug_regs): Renamed to
1658 i386_dr_update_inferior_debug_regs and made nonstatic.
1659 All uses updated.
1660 (i386_low_insert_watchpoint): Renamed to
1661 i386_dr_insert_watchpoint. All uses updated.
1662 (i386_low_remove_watchpoint): Renamed to
1663 i386_dr_remove_watchpoint. All uses updated.
1664 (i386_low_region_ok_for_watchpoint): Renamed to
1665 i386_dr_region_ok_for_watchpoint. All uses updated.
1666 (i386_low_stopped_data_address): Renamed to
1667 i386_dr_stopped_data_address. All uses updated.
1668 (i386_low_stopped_by_watchpoint): Renamed to
1669 i386_dr_stopped_by_watchpoint. All uses updated.
1670
1671 2014-06-18 Gary Benson <gbenson@redhat.com>
1672
1673 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1674 (i386_dr_low_can_set_control): Likewise.
1675 (i386_insert_aligned_watchpoint): New check.
1676
1677 2014-06-18 Gary Benson <gbenson@redhat.com>
1678
1679 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1680 Renamed to state.
1681
1682 2014-06-18 Gary Benson <gbenson@redhat.com>
1683
1684 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1685 instead of fatal and error.
1686 (i386_handle_nonaligned_watchpoint): Likewise.
1687
1688 2014-06-18 Gary Benson <gbenson@redhat.com>
1689
1690 * i386-low.c (i386_get_debug_register_length): New macro.
1691 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1692 (i386_show_dr): Use debug_printf instead of fprintf. Use
1693 phex to format values.
1694
1695 2014-06-18 Gary Benson <gbenson@redhat.com>
1696
1697 * i386-low.h: Comment changes.
1698 * i386-low.c: Likewise.
1699
1700 2014-06-18 Gary Benson <gbenson@redhat.com>
1701
1702 * i386-low.c: Whitespace changes.
1703
1704 2014-06-12 Tom Tromey <tromey@redhat.com>
1705
1706 * utils.c (freeargv): Remove.
1707
1708 2014-06-12 Tom Tromey <tromey@redhat.com>
1709
1710 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1711 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1712 (parse_debug_format_options): Likewise.
1713 (gdbserver_usage): Likewise.
1714 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1715 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1716 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1717 against libiberty.
1718 ($(LIBGNU)): Depend on libiberty.
1719 (all-lib): Recurse into all subdirs.
1720 (install-only): Invoke "install" target in subdirs.
1721 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1722 targets.
1723 * configure: Rebuild.
1724 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1725 for vasprintf, vsnprintf, or gettimeofday.
1726 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1727 srv_tgtobj.
1728
1729 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1730
1731 * development.sh: Delete.
1732 * Makefile.in (config.status): Adjust dependency on development.sh.
1733 * configure.ac: Adjust development.sh source call.
1734 * configure: Regenerate.
1735
1736 2014-06-02 Pedro Alves <palves@redhat.com>
1737
1738 * ax.c (gdb_free_agent_expr): New function.
1739 * ax.h (gdb_free_agent_expr): New declaration.
1740 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1741 list.
1742 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1743 static.
1744 (clear_breakpoint_conditions_and_commands): New function.
1745 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1746 (clear_breakpoint_conditions_and_commands): New declaration.
1747
1748 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1749
1750 * linux-aarch64-low.c (asm/ptrace.h): Include.
1751
1752 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1753
1754 Fix TLS access for -static -pthread.
1755 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1756 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1757 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1758
1759 2014-05-20 Pedro Alves <palves@redhat.com>
1760
1761 * linux-aarch64-low.c (aarch64_insert_point)
1762 (aarch64_remove_point): No longer check whether the type is
1763 supported here. Adjust to new interface.
1764 (the_low_target): Install aarch64_supports_z_point_type as
1765 supports_z_point_type method.
1766 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1767 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1768 instead of a Z packet char. Adjust.
1769 (arm_supports_z_point_type): New function.
1770 (arm_insert_point, arm_remove_point): Adjust to new interface.
1771 (the_low_target): Install arm_supports_z_point_type.
1772 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1773 (cris_insert_point, cris_remove_point): Adjust to new interface.
1774 Don't check whether the type is supported here.
1775 (the_low_target): Install cris_supports_z_point_type.
1776 * linux-low.c (linux_supports_z_point_type): New function.
1777 (linux_insert_point, linux_remove_point): Adjust to new interface.
1778 * linux-low.h (struct linux_target_ops) <insert_point,
1779 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1780 raw_breakpoint pointer parameter.
1781 <supports_z_point_type>: New method.
1782 * linux-mips-low.c (mips_supports_z_point_type): New function.
1783 (mips_insert_point, mips_remove_point): Adjust to new interface.
1784 Use mips_supports_z_point_type.
1785 (the_low_target): Install mips_supports_z_point_type.
1786 * linux-ppc-low.c (the_low_target): Install NULL as
1787 supports_z_point_type method.
1788 * linux-s390-low.c (the_low_target): Install NULL as
1789 supports_z_point_type method.
1790 * linux-sparc-low.c (the_low_target): Install NULL as
1791 supports_z_point_type method.
1792 * linux-x86-low.c (x86_supports_z_point_type): New function.
1793 (x86_insert_point): Adjust to new insert_point interface. Use
1794 insert_memory_breakpoint. Adjust to new
1795 i386_low_insert_watchpoint interface.
1796 (x86_remove_point): Adjust to remove_point interface. Use
1797 remove_memory_breakpoint. Adjust to new
1798 i386_low_remove_watchpoint interface.
1799 (the_low_target): Install x86_supports_z_point_type.
1800 * lynx-low.c (lynx_target_ops): Install NULL as
1801 supports_z_point_type callback.
1802 * nto-low.c (nto_supports_z_point_type): New.
1803 (nto_insert_point, nto_remove_point): Adjust to new interface.
1804 (nto_target_ops): Install nto_supports_z_point_type.
1805 * mem-break.c: Adjust intro comment.
1806 (struct raw_breakpoint) <raw_type, size>: New fields.
1807 <inserted>: Update comment.
1808 <shlib_disabled>: Delete field.
1809 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1810 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1811 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1812 (raw_bkpt_type_to_target_hw_bp_type): New function.
1813 (find_enabled_raw_code_breakpoint_at): New function.
1814 (find_raw_breakpoint_at): New type and size parameters. Use them.
1815 (insert_memory_breakpoint): New function, based off
1816 set_raw_breakpoint_at.
1817 (remove_memory_breakpoint): New function.
1818 (set_raw_breakpoint_at): Reimplement.
1819 (set_breakpoint): New, based on set_breakpoint_at.
1820 (set_breakpoint_at): Reimplement.
1821 (delete_raw_breakpoint): Go through the_target->remove_point
1822 instead of assuming memory breakpoints.
1823 (find_gdb_breakpoint_at): Delete.
1824 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1825 (find_gdb_breakpoint): New function.
1826 (set_gdb_breakpoint_at): Delete.
1827 (z_type_supported): New function.
1828 (set_gdb_breakpoint_1): New function, loosely based off
1829 set_gdb_breakpoint_at.
1830 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1831 (delete_gdb_breakpoint_at): Delete.
1832 (delete_gdb_breakpoint_1): New function, loosely based off
1833 delete_gdb_breakpoint_at.
1834 (delete_gdb_breakpoint): New function.
1835 (clear_gdb_breakpoint_conditions): Rename to ...
1836 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1837 breakpoint.
1838 (add_condition_to_breakpoint): Make static.
1839 (add_breakpoint_condition): Take a struct breakpoint pointer
1840 instead of an address. Adjust.
1841 (gdb_condition_true_at_breakpoint): Rename to ...
1842 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1843 z_type parameter.
1844 (gdb_condition_true_at_breakpoint): Reimplement.
1845 (add_breakpoint_commands): Take a struct breakpoint pointer
1846 instead of an address. Adjust.
1847 (gdb_no_commands_at_breakpoint): Rename to ...
1848 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1849 parameter. Return true if no breakpoint was found. Change debug
1850 output.
1851 (gdb_no_commands_at_breakpoint): Reimplement.
1852 (run_breakpoint_commands): Rename to ...
1853 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1854 and change return type to boolean.
1855 (run_breakpoint_commands): New function.
1856 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1857 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1858 breakpoint. Go through the_target->remove_point instead of
1859 assuming memory breakpoint.
1860 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1861 software and hardware breakpoints.
1862 (reinsert_raw_breakpoint): Go through the_target->insert_point
1863 instead of assuming memory breakpoint.
1864 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1865 software and hardware breakpoints.
1866 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1867 Check both software and hardware breakpoints.
1868 (validate_inserted_breakpoint): Assert the breakpoint is a
1869 software breakpoint. Set the inserted flag to -1 instead of
1870 setting shlib_disabled.
1871 (delete_disabled_breakpoints): Adjust.
1872 (validate_breakpoints): Only validate software breakpoints.
1873 Adjust to inserted flag change.
1874 (check_mem_read, check_mem_write): Skip breakpoint types other
1875 than software breakpoints. Adjust to inserted flag change.
1876 * mem-break.h (enum raw_bkpt_type): New enum.
1877 (raw_breakpoint, struct process_info): Forward declare.
1878 (Z_packet_to_target_hw_bp_type): Delete declaration.
1879 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1880 (set_gdb_breakpoint, delete_gdb_breakpoint)
1881 (clear_breakpoint_conditions): New declarations.
1882 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1883 (breakpoint_inserted_here): Update comment.
1884 (add_breakpoint_condition, add_breakpoint_commands): Replace
1885 address parameter with a breakpoint pointer parameter.
1886 (gdb_breakpoint_here): Update comment.
1887 (delete_gdb_breakpoint_at): Delete.
1888 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1889 * server.c (process_point_options): Take a struct breakpoint
1890 pointer instead of an address. Adjust.
1891 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1892 delete_gdb_breakpoint.
1893 * spu-low.c (spu_target_ops): Install NULL as
1894 supports_z_point_type method.
1895 * target.h: Include mem-break.h.
1896 (struct target_ops) <prepare_to_access_memory>: Update comment.
1897 <supports_z_point_type>: New field.
1898 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1899 instead of a char. Also take a raw breakpoint pointer.
1900 * win32-arm-low.c (the_low_target): Install NULL as
1901 supports_z_point_type.
1902 * win32-i386-low.c (i386_supports_z_point_type): New function.
1903 (i386_insert_point, i386_remove_point): Adjust to new interface.
1904 (the_low_target): Install i386_supports_z_point_type.
1905 * win32-low.c (win32_supports_z_point_type): New function.
1906 (win32_insert_point, win32_remove_point): Adjust to new interface.
1907 (win32_target_ops): Install win32_supports_z_point_type.
1908 * win32-low.h (struct win32_target_ops):
1909 <supports_z_point_type>: New method.
1910 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1911 instead of a char. Also take a raw breakpoint pointer.
1912
1913 2014-05-20 Pedro Alves <palves@redhat.com>
1914
1915 * mem-break.h: Include break-common.h.
1916 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1917 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1918 (Z_packet_to_target_hw_bp_type): New declaration.
1919 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1920 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1921 (Z_PACKET_ACCESS_WP): Delete macros.
1922 (Z_packet_to_hw_type): Delete function.
1923 * i386-low.h: Don't include break-common.h here.
1924 (Z_packet_to_hw_type): Delete declaration.
1925 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1926 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1927 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1928 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1929 * linux-aarch64-low.c: Don't include break-common.h here.
1930 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1931 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1932 (Z_packet_to_target_hw_bp_type): Delete function.
1933 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1934 function.
1935 (mips_insert_point, mips_remove_point): Use
1936 Z_packet_to_target_hw_bp_type.
1937
1938 2014-05-20 Pedro Alves <palves@redhat.com>
1939
1940 * linux-aarch64-low.c: Include break-common.h.
1941 (enum target_point_type): Delete.
1942 (Z_packet_to_point_type): Rename to ...
1943 (Z_packet_to_target_hw_bp_type): ... this, and return a
1944 target_hw_bp_type instead.
1945 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1946 instead of an enum target_point_type.
1947 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1948 breakpoint type.
1949 (aarch64_dr_state_insert_one_point)
1950 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1951 (aarch64_handle_aligned_watchpoint)
1952 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1953 Take an enum target_hw_bp_type instead of an enum
1954 target_point_type.
1955 (aarch64_supports_z_point_type): New function.
1956 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1957 use Z_packet_to_target_hw_bp_type.
1958
1959 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1960
1961 * configure.ac: Only use -Werror by default when DEVELOPMENT
1962 is true.
1963 * configure: Regenerate.
1964
1965 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1966
1967 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1968 * linux-x86-low.c (X86_64_USER_REGS): New.
1969 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1970
1971 2014-04-28 Yao Qi <yao@codesourcery.com>
1972
1973 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1974 name.
1975
1976 2014-04-25 Pedro Alves <palves@redhat.com>
1977
1978 PR server/16255
1979 * linux-low.c (linux_attach_fail_reason_string): New function.
1980 (linux_attach_lwp): Delete.
1981 (linux_attach_lwp_1): Rename to ...
1982 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1983 argument. Remove "initial" parameter. Return int instead of
1984 void. Don't error or warn here.
1985 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1986 failure to attach to the tgid. Call warning when failing to
1987 attach to an lwp.
1988 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1989 argument. Remove "initial" parameter. Return int instead of
1990 void. Don't error or warn here.
1991 (linux_attach_fail_reason_string): New declaration.
1992 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1993 interface change. Use linux_attach_fail_reason_string.
1994
1995 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1996 Walfred Tedeschi <walfred.tedeschi@intel.com>
1997
1998 * Makefile.in: Added rules to handle new files
1999 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2000 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2001 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2002 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2003 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2004 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2005 x32-avx512-linux.o.
2006 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2007 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2008 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2009 i386/x32-avx512.xml.
2010 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2011 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2012 i386/x32-avx512-linux.xml.
2013 * i387-fp.c (num_avx512_k_registers): New constant for number
2014 of K registers.
2015 (num_avx512_zmmh_low_registers): New constant for number of
2016 lower ZMM registers (0-15).
2017 (num_avx512_zmmh_high_registers): New constant for number of
2018 higher ZMM registers (16-31).
2019 (num_avx512_ymmh_registers): New contant for number of higher
2020 YMM registers (ymm16-31 added by avx521 on x86_64).
2021 (num_avx512_xmm_registers): New constant for number of higher
2022 XMM registers (xmm16-31 added by AVX512 on x86_64).
2023 (struct i387_xsave): Add space for AVX512 registers.
2024 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2025 Add code to handle AVX512 registers.
2026 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2027 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2028 prototypei from generated file.
2029 (tdesc_amd64_avx512_linux): Likewise.
2030 (init_registers_x32_avx512_linux): Likewise.
2031 (tdesc_x32_avx512_linux): Likewise.
2032 (init_registers_i386_avx512_linux): Likewise.
2033 (tdesc_i386_avx512_linux): Likewise.
2034 (x86_64_regmap): Add AVX512 registers.
2035 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2036 mask.
2037 (initialize_low_arch): Add code to initialize AVX512 registers.
2038
2039 2014-04-23 Pedro Alves <palves@redhat.com>
2040
2041 * mem-break.c (find_gdb_breakpoint_at): Make static.
2042 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2043
2044 2014-04-23 Pedro Alves <palves@redhat.com>
2045
2046 * i386-low.c: Don't include break-common.h here.
2047 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2048 prototype to take target_hw_bp_type as argument instead of a Z
2049 packet char.
2050 * i386-low.h: Include break-common.h here.
2051 (Z_packet_to_hw_type): Declare.
2052 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2053 prototypes.
2054 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2055 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2056 (x86_remove_point): Convert the packet number to a
2057 target_hw_bp_type before calling i386_low_remove_watchpoint.
2058 * win32-i386-low.c (i386_insert_point): Convert the packet number
2059 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2060 (i386_remove_point): Convert the packet number to a
2061 target_hw_bp_type before calling i386_low_remove_watchpoint.
2062
2063 2014-04-23 Pedro Alves <palves@redhat.com>
2064
2065 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2066
2067 2014-04-10 Pedro Alves <palves@redhat.com>
2068
2069 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2070 Check if the condition or command is NULL before checking if the
2071 breakpoint is known. On success, return true.
2072 * mem-break.h (add_breakpoint_condition): Document return.
2073 (add_breakpoint_commands): Add describing comment.
2074 * server.c (skip_to_semicolon): New function.
2075 (process_point_options): Use it.
2076
2077 2014-04-09 Pedro Alves <palves@redhat.com>
2078
2079 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2080 to lwpid_of.
2081
2082 2014-02-27 Pedro Alves <palves@redhat.com>
2083
2084 PR 12702
2085 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2086 macros.
2087 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2088 output.
2089 (last_thread_of_process_p): Take a PID argument instead of a
2090 thread pointer.
2091 (linux_wait_for_lwp): Delete.
2092 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2093 functions.
2094 (linux_low_filter_event): New function, party factored out from
2095 linux_wait_for_event.
2096 (linux_wait_for_event): Rename to ...
2097 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2098 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2099 sigsuspend. Check for zombie leaders.
2100 (linux_wait_for_event): Reimplement as wrapper around
2101 linux_wait_for_event_filtered.
2102 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2103 a normal or signal exit is seen, it's the whole process exiting.
2104 (wait_for_sigstop): No longer a for_each_inferior callback.
2105 Rewrite on top of linux_wait_for_event_filtered.
2106 (stop_all_lwps): Call wait_for_sigstop directly.
2107 * server.c (resume, handle_target_event): Handle
2108 TARGET_WAITKIND_NO_RESUMED.
2109
2110 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2111
2112 * win32-low.c (psapi_get_dll_name,
2113 * win32_CreateToolhelp32Snapshot): Delete.
2114 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2115 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2116 Delete.
2117 (handle_load_dll): Add function description.
2118 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2119
2120 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2121
2122 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2123 Add comment.
2124 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2125 base address when calling win32_add_one_solib.
2126 (handle_load_dll): Delete local variable load_addr.
2127 Remove 0x1000 offset applied to DLL base address when calling
2128 win32_add_one_solib.
2129 (handle_unload_dll): Add comment.
2130
2131 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2132
2133 * win32-low.c (win32_add_all_dlls): Renames
2134 win32_ensure_ntdll_loaded. Rewrite function documentation.
2135 Adjust implementation to always load all DLLs.
2136 Add 0x1000 offset to DLL base address when calling
2137 win32_add_one_solib.
2138 (child_initialization_done): New static global.
2139 (do_initial_child_stuff): Set child_initialization_done to
2140 zero during child initialization, and 1 after. Replace call
2141 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2142 Add comment.
2143 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2144 (handle_unload_dll): Add function documentation.
2145 (get_child_debug_event): Ignore load and unload DLL events
2146 during child initialization.
2147
2148 2014-02-20 Doug Evans <dje@google.com>
2149
2150 Remove global all_lwps.
2151 * inferiors.h (ptid_of): Move here from linux-low.h.
2152 (pid_of, lwpid_of): Ditto.
2153 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2154 parameter is a struct thread_info * now.
2155 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2156 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2157 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2158 directly.
2159 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2160 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2161 * linux-arm-low.c (update_registers_callback): Update, "entry"
2162 parameter is a struct thread_info * now.
2163 Fetch lwpid from current_inferior directly.
2164 (arm_insert_point): Pass &all_threads to find_inferior instead of
2165 &all_lwps.
2166 (arm_remove_point): Ditto.
2167 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2168 (arm_prepare_to_resume): Fetch pid from thread.
2169 (arm_read_description): Fetch lwpid from current_inferior directly.
2170 * linux-low.c (all_lwps): Delete.
2171 (delete_lwp): Delete call to remove_inferior.
2172 (handle_extended_wait): Fetch lwpid from thread.
2173 (add_lwp): Don't set lwp->entry.id. Remove call to
2174 add_inferior_to_list.
2175 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2176 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2177 (kill_one_lwp_callback): Ditto.
2178 (linux_kill): Don't dereference NULL pointer.
2179 Fetch ptid,lwpid from thread.
2180 (get_detach_signal): Fetch ptid from thread.
2181 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2182 Simplify call to regcache_invalidate_thread.
2183 (delete_lwp_callback): Update, "entry" parameter is a
2184 struct thread_info * now. Fetch pid from thread.
2185 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2186 (status_pending_p_callback): Update, "entry" parameter is a
2187 struct thread_info * now. Fetch ptid from thread.
2188 (find_lwp_pid): Update, "entry" parameter is a
2189 struct thread_info * now.
2190 (linux_wait_for_lwp): Fetch pid from thread.
2191 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2192 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2193 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2194 (dequeue_one_deferred_signal): Ditto.
2195 (cancel_breakpoint): Fetch ptid from current_inferior.
2196 (linux_wait_for_event): Pass &all_threads to find_inferior,
2197 not &all_lwps. Fetch ptid, lwpid from thread.
2198 (count_events_callback): Update, "entry" parameter is a
2199 struct thread_info * now.
2200 (select_singlestep_lwp_callback): Ditto.
2201 (select_event_lwp_callback): Ditto.
2202 (cancel_breakpoints_callback): Ditto.
2203 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2204 not &all_lwps.
2205 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2206 (unsuspend_one_lwp): Update, "entry" parameter is a
2207 struct thread_info * now.
2208 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2209 not &all_lwps.
2210 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2211 Fetch lwpid from thread, not lwp.
2212 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2213 Pass &all_threads to find_inferior, not &all_lwps.
2214 (send_sigstop): Fetch lwpid from thread, not lwp.
2215 (send_sigstop_callback): Update, "entry" parameter is a
2216 struct thread_info * now.
2217 (suspend_and_send_sigstop_callback): Ditto.
2218 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2219 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2220 struct thread_info * now.
2221 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2222 from thread, lwp.
2223 (lwp_running): Update, "entry" parameter is a
2224 struct thread_info * now.
2225 (stop_all_lwps): Fetch ptid from thread.
2226 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2227 (linux_resume_one_lwp): Fetch lwpid from thread.
2228 (linux_set_resume_request): Update, "entry" parameter is a
2229 struct thread_info * now. Fetch pid, lwpid from thread.
2230 (resume_status_pending_p): Update, "entry" parameter is a
2231 struct thread_info * now.
2232 (need_step_over_p): Ditto. Fetch lwpid from thread.
2233 (start_step_over): Fetch lwpid from thread.
2234 (linux_resume_one_thread): Update, "entry" parameter is a
2235 struct thread_info * now. Fetch lwpid from thread.
2236 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2237 (proceed_one_lwp): Update, "entry" parameter is a
2238 struct thread_info * now. Fetch lwpid from thread.
2239 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2240 struct thread_info * now.
2241 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2242 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2243 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2244 directly.
2245 (regsets_store_inferior_registers): Ditto.
2246 (fetch_register, store_register): Ditto.
2247 (linux_read_memory, linux_write_memory): Ditto.
2248 (linux_request_interrupt): Ditto.
2249 (linux_read_auxv): Ditto.
2250 (linux_xfer_siginfo): Ditto.
2251 (linux_qxfer_spu): Ditto.
2252 (linux_qxfer_libraries_svr4): Ditto.
2253 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2254 moved to inferiors.h.
2255 (get_lwp): Delete.
2256 (get_thread_lwp): Update.
2257 (struct lwp_info): Delete member "entry". Simplify comment for
2258 member "thread".
2259 (all_lwps): Delete.
2260 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2261 current_inferior directly.
2262 (update_watch_registers_callback): Update, "entry" parameter is a
2263 struct thread_info * now. Fetch pid from thread.
2264 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2265 (mips_insert_point): Fetch lwpid from current_inferior.
2266 Pass &all_threads to find_inferior, not &all_lwps.
2267 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2268 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2269 directly.
2270 (mips_stopped_data_address): Ditto.
2271 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2272 directly.
2273 * linux-tile-low.c (tile_arch_setup): Ditto.
2274 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2275 (update_debug_registers_callback): Update, "entry" parameter is a
2276 struct thread_info * now. Fetch pid from thread.
2277 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2278 Pass &all_threads to find_inferior, not &all_lwps.
2279 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2280 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2281 Pass &all_threads to find_inferior, not &all_lwps.
2282 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2283 (i386_dr_low_get_status): Ditto.
2284 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2285 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2286 (x86_linux_read_description): Ditto.
2287 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2288
2289 2014-02-20 Doug Evans <dje@google.com>
2290
2291 * inferiors.c (get_first_inferior): Fix buglet.
2292
2293 2014-02-19 Doug Evans <dje@google.com>
2294
2295 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2296 * inferiors.c (add_thread): Change result type to struct thread_info *.
2297 All callers updated.
2298 (add_lwp): Call add_thread here instead of in callers.
2299 All callers updated.
2300 * linux-low.h (get_lwp_thread): Rewrite.
2301 (struct lwp_info): New member "thread".
2302
2303 2014-02-19 Doug Evans <dje@google.com>
2304
2305 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2306 All callers updated.
2307
2308 2014-02-19 Doug Evans <dje@google.com>
2309
2310 * inferiors.c (add_thread): Fix whitespace.
2311
2312 2014-02-19 Doug Evans <dje@google.com>
2313
2314 * dll.c (clear_dlls): Replace accessing list implemention details
2315 with API function.
2316 * gdbthread.h (get_first_thread): Declare.
2317 * inferiors.c (for_each_inferior_with_data): New function.
2318 (get_first_thread): New function.
2319 (find_thread_ptid): Simplify.
2320 (get_first_inferior): New function.
2321 (clear_list): Delete.
2322 (one_inferior_p): New function.
2323 (clear_inferior_list): New function.
2324 (clear_inferiors): Update.
2325 * inferiors.h (for_each_inferior_with_data): Declare.
2326 (clear_inferior_list): Declare.
2327 (one_inferior_p): Declare.
2328 (get_first_inferior): Declare.
2329 * linux-low.c (linux_wait_for_event): Replace accessing list
2330 implemention details with API function.
2331 * server.c (target_running): Ditto.
2332 (accumulate_file_name_length): New function.
2333 (emit_dll_description): New function.
2334 (handle_qxfer_libraries): Replace accessing list implemention
2335 details with API function.
2336 (handle_qxfer_threads_worker): New function.
2337 (handle_qxfer_threads_proper): Replace accessing list implemention
2338 details with API function.
2339 (handle_query): Ditto.
2340 (visit_actioned_threads_callback_ftype): New typedef.
2341 (visit_actioned_threads_data): New struct.
2342 (visit_actioned_threads): Rewrite to be find_inferior callback.
2343 (resume): Call find_inferior.
2344 (handle_status): Replace accessing list implemention
2345 details with API function.
2346 (process_serial_event): Replace accessing list implemention details
2347 with API function.
2348 * target.c (set_desired_inferior): Replace accessing list implemention
2349 details with API function.
2350 * tracepoint.c (same_process_p): New function.
2351 (gdb_agent_about_to_close): Replace accessing list implemention
2352 details with API function.
2353 * win32-low.c (child_delete_thread): Replace accessing list
2354 implemention details with API function.
2355 (match_dll_by_basename): New function.
2356 (dll_is_loaded_by_basename): New function.
2357 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2358 details call to dll_is_loaded_by_basename.
2359
2360 2014-02-19 Doug Evans <dje@google.com>
2361
2362 * dll.h (struct dll_info): Add comment.
2363 * gdbthread.h (struct thread_info): Add comment.
2364 (current_ptid): Simplify.
2365 * inferiors.c (add_process): Update.
2366 (remove_process): Update.
2367 * inferiors.h (struct process_info): Rename member "head" to "entry".
2368 * linux-low.c (delete_lwp): Update.
2369 (add_lwp): Update.
2370 (last_thread_of_process_p): Update.
2371 (kill_one_lwp_callback, linux_kill): Update.
2372 (status_pending_p_callback): Update.
2373 (wait_for_sigstop): Update. Simplify read of ptid.
2374 (start_step_over): Update.
2375 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2376 (get_lwp_thread): Update.
2377 (struct lwp_info): Rename member "head" to "entry".
2378 * regcache.h (inferior_list_entry): Delete.
2379 * server.c (kill_inferior_callback): Update.
2380 (detach_or_kill_inferior_callback): Update.
2381 (print_started_pid): Update.
2382 (print_attached_pid): Update.
2383 (process_serial_event): Simplify read of ptid.
2384 * thread-db.c (thread_db_create_event): Update.
2385 (thread_db_get_tls_address): Update.
2386 * win32-low.c (current_inferior_ptid): Simplify.
2387
2388 2014-02-19 Tom Tromey <tromey@redhat.com>
2389
2390 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2391 argument.
2392 (target_supports_btrace): Update.
2393
2394 2014-02-14 Yao Qi <yao@codesourcery.com>
2395
2396 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2397 (rsp-low-ipa.o): New target.
2398
2399 2014-02-12 Tom Tromey <tromey@redhat.com>
2400
2401 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2402 convert_ascii_to_int.
2403 * regcache.c (registers_to_string): Likewise.
2404 * remote-utils.c (decode_M_packet): Likewise.
2405 * server.c (process_serial_event): Likewise.
2406
2407 2014-02-12 Tom Tromey <tromey@redhat.com>
2408
2409 * server.c (handle_query, handle_v_run): Use hex2bin, not
2410 unhexify.
2411 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2412
2413 2014-02-12 Tom Tromey <tromey@redhat.com>
2414
2415 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2416 convert_int_to_ascii.
2417 * regcache.c (registers_to_string, collect_register_as_string):
2418 Likewise.
2419 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2420 Likewise.
2421 * server.c (process_serial_event): Likewise.
2422 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2423 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2424
2425 2014-02-12 Tom Tromey <tromey@redhat.com>
2426
2427 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2428 bin2hex, not hexify.
2429 * tracepoint.c (cmd_qtstatus): Likewise.
2430
2431 2014-02-12 Tom Tromey <tromey@redhat.com>
2432
2433 * remote-utils.c (monitor_output): Pass explicit length to
2434 hexify.
2435
2436 2014-02-12 Tom Tromey <tromey@redhat.com>
2437
2438 * tracepoint.c: Include rsp-low.h.
2439 * server.c: Include rsp-low.h.
2440 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2441 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2442 declare.
2443 * remote-utils.c: Include rsp-low.h.
2444 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2445 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2446 (convert_int_to_ascii, convert_ascii_to_int): Move to
2447 common/rsp-low.c.
2448 * regcache.c: Include rsp-low.h.
2449 * ax.c: Include rsp-low.h.
2450 * Makefile.in (SFILES): Add common/rsp-low.c.
2451 (OBS): Add rsp-low.o.
2452 (rsp-low.o): New target.
2453
2454 2014-02-12 Tom Tromey <tromey@redhat.com>
2455
2456 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2457 Include print-utils.h.
2458 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2459 (plongest, thirty_two, phex_nz): Remove.
2460 * Makefile.in (SFILES): Add common/print-utils.c.
2461 (OBS): Add print-utils.o.
2462 (print-utils-ipa.o): New target.
2463 (print-utils.o): New target.
2464 (IPA_OBJS): Add print-utils-ipa.o.
2465
2466 2014-02-06 Tom Tromey <tromey@redhat.com>
2467
2468 * Makefile.in (SFILES): Fix indentation.
2469
2470 2014-02-05 Doug Evans <dje@google.com>
2471
2472 * linux-low.c (linux_wait_for_event): Improve comment.
2473 (linux_wait_1): Keep current_inferior in sync with event_child.
2474
2475 2014-01-22 Doug Evans <dje@google.com>
2476
2477 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2478
2479 2014-01-22 Doug Evans <dje@google.com>
2480
2481 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2482 * configure: Regenerate.
2483 * config.in: Regenerate.
2484 * Makefile.in (SFILES): Add debug.c.
2485 (OBS): Add debug.o.
2486 * debug.c: New file.
2487 * debug.h: New file.
2488 * linux-aarch64-low.c (*): Update all debugging printfs to use
2489 debug_printf instead of fprintf.
2490 * linux-arm-low.c (*): Ditto.
2491 * linux-cris-low.c (*): Ditto.
2492 * linux-crisv32-low.c (*): Ditto.
2493 * linux-m32r-low.c (*): Ditto.
2494 * linux-sparc-low.c (*): Ditto.
2495 * linux-x86.c (*): Ditto.
2496 * linux-low.c (*): Ditto.
2497 (linux_wait_1): Add calls to debug_enter, debug_exit.
2498 (linux_wait): Remove redundant debugging printf.
2499 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2500 (linux_resume, unstop_all_lwps): Ditto.
2501 * mem-break.c (*): Update all debugging printfs to use
2502 debug_printf instead of fprintf.
2503 * remote-utils.c (*): Ditto.
2504 * thread-db.c (*): Ditto.
2505 * server.c #include <ctype.h>, "gdb_vecs.h".
2506 (debug_threads): Moved to debug.c.
2507 (*): Update all debugging printfs to use debug_printf instead of
2508 fprintf.
2509 (start_inferior): Replace call to fflush with call to debug_flush.
2510 (monitor_show_help): Mention set debug-format.
2511 (parse_debug_format_options): New function.
2512 (handle_monitor_command): Handle "monitor set debug-format".
2513 (gdbserver_usage): Mention --debug-format.
2514 (main): Parse --debug-format.
2515 * server.h (debug_threads): Declaration moved to debug.h.
2516 #include "debug.h".
2517 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2518 trace_debug_1 that uses debug_printf.
2519 (tracepoint_look_up_symbols): Update all debugging printfs to use
2520 debug_printf instead of fprintf.
2521
2522 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2523
2524 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2525 sys/ptrace.h.
2526
2527 2014-01-17 Pedro Alves <palves@redhat.com>
2528
2529 PR build/16445
2530 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2531 defined after including gdb_proc_service.h.
2532
2533 2014-01-16 Doug Evans <dje@google.com>
2534
2535 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2536 (match_dll): Use it.
2537
2538 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2539
2540 * target.h (target_ops) <read_btrace>: Change parameters and
2541 return type to allow error reporting.
2542 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2543 trace reading errors on.
2544 * linux-low.c (linux_low_read_btrace): Pass trace reading
2545 errors on.
2546 (linux_low_disable_btrace): New.
2547
2548 2014-01-15 Doug Evans <dje@google.com>
2549
2550 * inferiors.c (thread_id_to_gdb_id): Delete.
2551 * inferiors.h (thread_id_to_gdb_id): Delete.
2552
2553 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2554
2555 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2556 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2557 versions.
2558
2559 2014-01-08 Pedro Alves <palves@redhat.com>
2560
2561 * server.c (handle_status): Don't discard previous queued stop
2562 replies or thread's pending status here.
2563 (main) <disconnection>: Do it here instead.
2564
2565 2014-01-08 Pedro Alves <palves@redhat.com>
2566
2567 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2568 * server.c (visit_actioned_threads, handle_pending_status): New
2569 function.
2570 (handle_v_cont): Factor out parts to ...
2571 (resume): ... this new function. If in all-stop, and a thread
2572 being resumed has a pending status, report it without actually
2573 resuming.
2574 (myresume): Adjust to use the new 'resume' function.
2575 (clear_pending_status_callback, set_pending_status_callback)
2576 (find_status_pending_thread_callback): New functions.
2577 (handle_status): Handle the case of multiple threads having
2578 interesting statuses to report. Report threads' real last signal
2579 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2580 with an interesting thread to report the status for, instead of
2581 always reporting the status of the first thread.
2582
2583 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2584
2585 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2586 * gdbreplay.c (gdbreplay_version): Likewise.
2587
2588 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2589
2590 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2591 iov.iov_len with the real length in use.
2592
2593 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2594
2595 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2596 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2597 for all targets that use win32-low.c.
2598 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2599 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2600
2601 2013-12-13 Pedro Alves <palves@redhat.com>
2602
2603 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2604 if equal to TARGET_WAITKIND_LOADED.
2605 * win32-low.c (cached_status): New static global.
2606 (win32_wait): Add declaration.
2607 (do_initial_child_stuff): Flush all initial pending debug events
2608 up to the initial breakpoint.
2609 (win32_wait): If CACHED_STATUS was set, return that instead
2610 of doing a real wait. Remove the code resuming the execution
2611 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2612 during the initial phase. Also remove the code changing
2613 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2614 TARGET_WAITKIND_STOPPED.
2615
2616 2013-12-11 Yao Qi <yao@codesourcery.com>
2617
2618 * notif.c (handle_notif_ack): Return 0 if no notification
2619 matches.
2620
2621 2013-11-20 Doug Evans <dje@google.com>
2622
2623 * linux-low.c (linux_set_resume_request): Fix comment.
2624
2625 2013-11-20 Doug Evans <dje@google.com>
2626
2627 * linux-low.c (resume_status_pending_p): Tweak comment.
2628
2629 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2630
2631 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2632 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2633 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2634 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2635 (srv_amd64_regobj): Add amd64-mpx.o.
2636 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2637 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2638 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2639 * i387-fp.c (num_pl_bnd_register) Added constant.
2640 (num_pl_bnd_cfg_registers) Added constant.
2641 (struct i387_xsave) Added reserved area and MPX fields.
2642 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2643 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2644 function.
2645 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2646 (init_registers_amd64_mpx_linux): Declare new function.
2647 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2648 (x86_64_regmap): Add MPX registers.
2649 (x86_linux_read_description): Add MPX case.
2650 (initialize_low_arch): Initialize MPX targets.
2651
2652 2013-11-18 Tom Tromey <tromey@redhat.com>
2653
2654 * configure: Rebuild.
2655 * configure.ac: Don't check for stdlib.h.
2656 * gdbreplay.c: Unconditionally include stdlib.h.
2657
2658 2013-11-18 Tom Tromey <tromey@redhat.com>
2659
2660 * config.in: Rebuild.
2661 * configure: Rebuild.
2662 * configure.ac: Don't use AC_HEADER_DIRENT.
2663
2664 2013-11-18 Tom Tromey <tromey@redhat.com>
2665
2666 * server.h: Don't check HAVE_STRING_H.
2667 * gdbreplay.c: Don't check HAVE_STRING_H.
2668 * configure: Rebuild.
2669
2670 2013-11-18 Tom Tromey <tromey@redhat.com>
2671
2672 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2673 LIBGNU.
2674
2675 2013-11-08 Tom Tromey <tromey@redhat.com>
2676
2677 * configure, config.in: Rebuild.
2678 * configure.ac: Remove unused configury.
2679
2680 2013-11-08 Tom Tromey <tromey@redhat.com>
2681
2682 * acinclude.m4: Include common.m4, codeset.m4.
2683 * configure, config.in: Rebuild.
2684 * configure.ac: Use GDB_AC_COMMON.
2685
2686 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2687
2688 * linux-s390-low.c (HWCAP_S390_TE): New define.
2689 (s390_arch_setup): Consider the TE field in the HWCAP for
2690 determining 'have_regset_tdb'.
2691
2692 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2693
2694 PR gdb/16014
2695 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2696 call to sizeof.
2697
2698 2013-10-02 Pedro Alves <palves@redhat.com>
2699
2700 * server.c (process_serial_event): Don't output "GDBserver
2701 exiting" if GDB is connected through stdio.
2702 * target.c (mywait): Likewise, be silent if GDB is connected
2703 through stdio.
2704
2705 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2706
2707 * lynx-low.c (lynx_add_threads_after_attach): New function.
2708 (lynx_attach): Remove call to add_thread. Add call to
2709 lynx_add_threads_after_attach instead.
2710
2711 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2712
2713 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2714 * config.in, configure: Regenerated.
2715
2716 2013-09-18 Yao Qi <yao@codesourcery.com>
2717
2718 PR server/15959
2719 * server.c (start_inferior): Clear 'resume_info'.
2720
2721 2013-09-16 Jiong Wang <jiwang@tilera.com>
2722
2723 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2724 for each register.
2725
2726 2013-09-16 Jiong Wang <jiwang@tilera.com>
2727
2728 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2729 linux-tile-low.o to srv_tgtobj.
2730
2731 2013-09-16 Will Newton <will.newton@linaro.org>
2732
2733 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2734 out regs.
2735
2736 2013-09-06 Pedro Alves <palves@redhat.com>
2737
2738 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2739 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2740 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2741 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2742 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2743 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2744
2745 2013-09-06 Pedro Alves <palves@redhat.com>
2746
2747 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2748 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2749
2750 2013-09-06 Pedro Alves <palves@redhat.com>
2751
2752 * linux-amd64-ipa.c: Include tracepoint.h.
2753 * linux-i386-ipa.c: Include tracepoint.h.
2754
2755 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2756
2757 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2758 (ps_get_thread_area): New function.
2759
2760 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2761
2762 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2763 (initialize_low_arch): Call init_registers_crisv32 rather than
2764 init_register_crisv32.
2765
2766 2013-09-05 Pedro Alves <palves@redhat.com>
2767
2768 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2769 to ...
2770 * hostio.h: ... this new file.
2771 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2772 win32-low.c: Include hostio.h.
2773
2774 2013-09-05 Pedro Alves <palves@redhat.com>
2775
2776 * server.h (gdb_client_data, handler_func, callback_handler_func)
2777 (delete_file_handler, add_file_handler, append_callback_event)
2778 (delete_callback_event, start_event_loop, initialize_event_loop):
2779 Move to event-loop.h and include it.
2780 * event-loop.h: New file.
2781
2782 2013-09-05 Pedro Alves <palves@redhat.com>
2783
2784 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2785 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2786 (loaded_dll, unloaded_dll): Move to ...
2787 * dll.h: ... this new file.
2788 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2789
2790 2013-09-05 Pedro Alves <palves@redhat.com>
2791
2792 * server.h (current_process, get_thread_process, all_processes)
2793 (add_inferior_to_list, for_each_inferior, current_inferior)
2794 (remove_inferior, add_process, remove_process, find_process_pid)
2795 (have_started_inferiors_p, have_attached_inferiors_p)
2796 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2797 (clear_inferiors, find_inferior, find_inferior_id)
2798 (inferior_target_data, set_inferior_target_data)
2799 (inferior_regcache_data, set_inferior_regcache_data): Move to
2800 inferiors.h, and include it.
2801 * inferiors.h: New file.
2802
2803 2013-09-05 Pedro Alves <palves@redhat.com>
2804
2805 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2806 Move ...
2807 * ax.h: ... here.
2808
2809 2013-09-05 Pedro Alves <palves@redhat.com>
2810
2811 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2812 tracepoint.h.
2813 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2814 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2815 (handle_tracepoint_general_set, handle_tracepoint_query)
2816 (tracepoint_finished_step, tracepoint_was_hit)
2817 (release_while_stepping_state_list, current_traceframe)
2818 (in_readonly_region, traceframe_read_mem)
2819 (fetch_traceframe_registers, traceframe_read_sdata)
2820 (traceframe_read_info, struct fast_tpoint_collect_status)
2821 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2822 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2823 (supply_fast_tracepoint_registers)
2824 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2825 (ipa_tdesc, claim_trampoline_space)
2826 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2827 (agent_mem_read, agent_get_trace_state_variable_value)
2828 (agent_set_trace_state_variable_value, agent_tsv_read)
2829 (agent_mem_read_string, get_raw_reg_func_addr)
2830 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2831 * tracepoint.h: ... this new file.
2832
2833 2013-09-05 Pedro Alves <palves@redhat.com>
2834
2835 * server.h (perror_with_name, error, fatal, warning, paddress)
2836 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2837 include it.
2838 * utils.h: New file.
2839
2840 2013-09-05 Pedro Alves <palves@redhat.com>
2841
2842 * server.h (remote_debug, noack_mode, transport_is_reliable)
2843 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2844 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2845 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2846 (write_enn, initialize_async_io, enable_async_io)
2847 (disable_async_io, check_remote_input_interrupt_request)
2848 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2849 (dead_thread_notify, prepare_resume_reply)
2850 (decode_address_to_semicolon, decode_address, decode_m_packet)
2851 (decode_M_packet, decode_X_packet, decode_xfer_write)
2852 (decode_search_memory_packet, unhexify, hexify)
2853 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2854 (look_up_one_symbol, relocate_instruction)
2855 (monitor_output): Move to remote-utils.h, and include it.
2856 * remote-utils.h: New file.
2857
2858 2013-09-05 Pedro Alves <palves@redhat.com>
2859
2860 * server.h (_): Delete.
2861
2862 2013-09-02 Pedro Alves <palves@redhat.com>
2863
2864 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2865 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2866 allocated.
2867 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2868
2869 2013-09-02 Pierre Muller <muller@sourceware.org>
2870
2871 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2872 or WriteProcessMemory complete successfully and handle
2873 ERROR_PARTIAL_COPY error.
2874
2875 2013-09-02 Pedro Alves <palves@redhat.com>
2876
2877 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2878 error instead of EIO.
2879
2880 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2881
2882 PR server/15604
2883 * linux-low.c: Include filestuff.h.
2884 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2885 * lynx-low.c: Include filestuff.h.
2886 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2887 * server.c: Include filestuff.h.
2888 (main): Call notice_open_fds.
2889 * spu-low.c: Include filestuff.h.
2890 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2891
2892 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2893
2894 * Makefile.in: Explain why ../target and ../nat are not
2895 listed as include file search paths.
2896 (linux-waitpid.o): New object file rule.
2897 * configure.srv (srv_native_linux_obj): New variable.
2898 Replace all occurrences of linux native object files with
2899 $srv_native_linux_obj.
2900 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2901 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2902 (linux_enable_event_reporting): Remove declaration.
2903 (my_waitpid): Moved to common/linux-waitpid.c.
2904 (linux_wait_for_event): Pass ptid when calling
2905 linux_enable_event_reporting.
2906 (linux_supports_tracefork_flag): Remove.
2907 (linux_enable_event_reporting): Likewise.
2908 (linux_tracefork_grandchild): Remove.
2909 (STACK_SIZE): Moved to common/linux-ptrace.c.
2910 (linux_tracefork_child): Remove.
2911 (linux_test_for_tracefork): Remove.
2912 (linux_look_up_symbols): Call linux_supports_traceclone.
2913 (initialize_low): Remove call to linux_test_for_tracefork.
2914 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2915 common/linux-ptrace.h.
2916 (PTRACE_TYPE_ARG4): Likewise.
2917 Include linux-ptrace.h.
2918
2919 2013-08-21 Pedro Alves <palves@redhat.com>
2920
2921 * config.in: Renegerate.
2922
2923 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2924
2925 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2926 (SFILES): Remove $(srcdir)/common/target-common.c and
2927 add $(srcdir)/target/waitstatus.c.
2928 (OBS): Remove target-common.o and add waitstatus.o.
2929 (server_h): Remove $(srcdir)/../common/target-common.h and
2930 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2931 and $(srcdir)/../target/waitstatus.h.
2932 (target-common.o): Remove.
2933 (waitstatus.o): New target object file.
2934 * target.h: Do not include target-common.h and
2935 include target/resume.h, target/wait.h and
2936 target/waitstatus.h.
2937
2938 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2939
2940 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2941 to PTRACE_TYPE_ARG3.
2942 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2943 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2944 PTRACE_TYPE_ARG4.
2945 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2946 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2947
2948 2013-07-27 Jie Zhang <jie@codesourcery.com>
2949 Daniel Jacobowitz <dan@codesourcery.com>
2950 Yao Qi <yao@codesourcery.com>
2951
2952 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2953 (mips-linux-watch.o): New rule.
2954 (mips_linux_watch_h): New variable.
2955 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2956 srv_tgtobj.
2957 * linux-mips-low.c: Include mips-linux-watch.h.
2958 (struct arch_process_info, struct arch_lwp_info): New.
2959 (update_watch_registers_callback): New function.
2960 (mips_linux_new_process, mips_linux_new_thread) New functions.
2961 (mips_linux_prepare_to_resume, mips_insert_point): New
2962 functions.
2963 (mips_remove_point, mips_stopped_by_watchpoint): New
2964 functions.
2965 (rsp_bp_type_to_target_hw_bp_type): New function.
2966 (mips_stopped_data_address): New function.
2967 (the_low_target): Add watchpoint support functions.
2968
2969 2013-07-27 Yao Qi <yao@codesourcery.com>
2970
2971 * i386-low.c: Include break-common.h.
2972 (enum target_hw_bp_type): Remove.
2973
2974 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2975
2976 * Makefile.in (SFILES): /common/target-common.c.
2977 (OBS): Add target-common.o.
2978 (server_h): Add $(srcdir)/../common/target-common.h.
2979 (target-common.o): New target.
2980 * server.c (queue_stop_reply_callback): Free
2981 status string after use.
2982 * target.c (target_waitstatus_to_string): Remove.
2983 * target.h: Include target-common.h.
2984 (resume_kind): Likewise.
2985 (target_waitkind): Likewise.
2986 (target_waitstatus): Likewise.
2987 (TARGET_WNOHANG): Likewise.
2988
2989 2013-07-04 Yao Qi <yao@codesourcery.com>
2990
2991 * Makefile.in (host_alias): Use @host_noncanonical@.
2992 (target_alias): Use @target_noncanonical@.
2993 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2994 ACX_NONCANONICAL_HOST.
2995 * configure: Regenerated.
2996
2997 Revert:
2998 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2999
3000 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3001 * configure: Rebuild.
3002 * Makefile.in (version_host, version_target): Get from configure.
3003 (version.c): Use $(version_host) and $(version_target).
3004
3005 2013-07-03 Pedro Alves <palves@redhat.com>
3006
3007 * Makefile.in (config.status): Depend on development.sh.
3008 * acinclude.m4: Include libmcheck.m4.
3009 * configure: Regenerate.
3010
3011 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3012
3013 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3014 attribute inside the parentheses.
3015 (winapi_DebugSetProcessKillOnExit): Ditto.
3016 (winapi_DebugBreakProcess): Ditto.
3017 (winapi_GenerateConsoleCtrlEvent): Ditto.
3018
3019 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3020
3021 * notif.h (notif_event): Add a dummy member to avoid compiler
3022 errors.
3023
3024 2013-07-01 Pedro Alves <palves@redhat.com>
3025
3026 * hostio.c (HOSTIO_PATH_MAX): Define.
3027 (require_filename, handle_open, handle_unlink, handle_readlink):
3028 Use it.
3029
3030 2013-07-01 Pedro Alves <palves@redhat.com>
3031
3032 * server.h: Include "pathmax.h".
3033 * linux-low.c: Don't include sys/param.h.
3034 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3035 MAXPATHLEN.
3036 * win32-low.c: Don't include sys/param.h.
3037 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3038
3039 2013-07-01 Pedro Alves <palves@redhat.com>
3040
3041 * event-loop.c: Don't check HAVE_UNISTD_H before including
3042 <unistd.h>.
3043 * gdbreplay.c: Likewise.
3044 * remote-utils.c: Likewise.
3045 * server.c: Likewise.
3046 * configure.ac: Don't check for unistd.h.
3047 * configure: Regenerate.
3048
3049 2013-06-28 Tom Tromey <tromey@redhat.com>
3050
3051 * Makefile.in (version.c): Use version.in, not
3052 common/version.in.
3053
3054 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3055
3056 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3057 * configure: Rebuild.
3058 * Makefile.in (version_host, version_target): Get from configure.
3059 (version.c): Use $(version_host) and $(version_target).
3060
3061 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3062
3063 Fix trace-status to output user name without trailing colon.
3064 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3065
3066 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3067
3068 Fix trace-status to output proper start-time and stop-time.
3069 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3070 output start time and stop time in hex as gdb expects.
3071
3072 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3073
3074 * tracepoint.c (build_traceframe_info_xml): Output trace state
3075 variables present in the trace buffer.
3076
3077 2013-06-24 Tom Tromey <tromey@redhat.com>
3078
3079 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3080 create-version.sh.
3081 (version.o): Remove.
3082 * gdbreplay.c: Include version.h.
3083 (version, host_name): Don't declare.
3084 * server.h: Include version.h.
3085 (version, host_name): Don't declare.
3086
3087 2013-06-12 Pedro Alves <palves@redhat.com>
3088
3089 * linux-x86-low.c (linux_is_elf64): Delete global.
3090 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3091 with local linux_pid_exe_is_elf_64_file use.
3092
3093 2013-06-11 Pedro Alves <palves@redhat.com>
3094
3095 * linux-low.c (regset_disabled, disable_regset): New functions.
3096 (regsets_fetch_inferior_registers)
3097 (regsets_store_inferior_registers): Use them.
3098 (initialize_regsets_info); Don't allocate the disabled_regsets
3099 array here.
3100 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3101 comment.
3102
3103 2013-06-11 Pedro Alves <palves@redhat.com>
3104
3105 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3106 xmalloc.
3107
3108 2013-06-11 Pedro Alves <palves@redhat.com>
3109
3110 * linux-x86-low.c (initialize_low_arch): Call
3111 init_registers_x32_avx_linux.
3112
3113 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3114
3115 Fix compatibility with Android Bionic.
3116 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3117 it is not empty.
3118
3119 2013-06-07 Pedro Alves <palves@redhat.com>
3120
3121 PR server/14823
3122 * Makefile.in (OBS): Add tdesc.o.
3123 (IPA_OBJS): Add tdesc-ipa.o.
3124 (tdesc-ipa.o): New rule.
3125 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3126 interface.
3127 * linux-low.c (new_inferior): Delete.
3128 (disabled_regsets, num_regsets): Delete.
3129 (linux_add_process): Adjust to set the new per-process
3130 new_inferior flag.
3131 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3132 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3133 was a stop. When calling arch_setup, switch the current inferior
3134 to the thread that got an event.
3135 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3136 (regsets_fetch_inferior_registers)
3137 (regsets_store_inferior_registers): New regsets_info parameter.
3138 Adjust to use it.
3139 (linux_register_in_regsets): New regs_info parameter. Adjust to
3140 use it.
3141 (register_addr, fetch_register, store_register): New usrregs_info
3142 parameter. Adjust to use it.
3143 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3144 parameter regs_info. Adjust to use it.
3145 (linux_fetch_registers): Get the current inferior's regs_info, and
3146 adjust to use it.
3147 (linux_store_registers): Ditto.
3148 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3149 (initialize_low): Don't initialize the target_regsets here. Call
3150 initialize_low_arch.
3151 * linux-low.h (target_regsets): Delete declaration.
3152 (struct regsets_info): New.
3153 (struct usrregs_info): New.
3154 (struct regs_info): New.
3155 (struct process_info_private) <new_inferior>: New field.
3156 (struct linux_target_ops): Delete the num_regs, regmap, and
3157 regset_bitmap fields. New field regs_info.
3158 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3159 * i387-fp.c (num_xmm_registers): Delete.
3160 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3161 calls to new interface.
3162 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3163 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3164 Infer the number of xmm registers from the regcache's target
3165 description.
3166 * i387-fp.h (num_xmm_registers): Delete.
3167 * inferiors.c (add_thread): Don't install the thread's regcache
3168 here.
3169 * proc-service.c (gregset_info): Fetch the current inferior's
3170 regs_info. Adjust to use it.
3171 * regcache.c: Include tdesc.h.
3172 (register_bytes, reg_defs, num_registers)
3173 (gdbserver_expedite_regs): Delete.
3174 (get_thread_regcache): If the thread doesn't have a regcache yet,
3175 create one, instead of aborting gdbserver.
3176 (regcache_invalidate_one): Rename to ...
3177 (regcache_invalidate_thread): ... this.
3178 (regcache_invalidate_one): New.
3179 (regcache_invalidate): Only invalidate registers of the current
3180 process.
3181 (init_register_cache): Add target_desc parameter, and use it.
3182 (new_register_cache): Ditto. Assert the target description has a
3183 non zero registers_size.
3184 (regcache_cpy): Add assertions. Adjust.
3185 (realloc_register_cache, set_register_cache): Delete.
3186 (registers_to_string, registers_from_string): Adjust.
3187 (find_register_by_name, find_regno, find_register_by_number)
3188 (register_cache_size): Add target_desc parameter, and use it.
3189 (free_register_cache_thread, free_register_cache_thread_one)
3190 (regcache_release, register_cache_size): New.
3191 (register_size): Add target_desc parameter, and use it.
3192 (register_data, supply_register, supply_register_zeroed)
3193 (supply_regblock, supply_register_by_name, collect_register)
3194 (collect_register_as_string, collect_register_by_name): Adjust.
3195 * regcache.h (struct target_desc): Forward declare.
3196 (struct regcache) <tdesc>: New field.
3197 (init_register_cache, new_register_cache): Add target_desc
3198 parameter.
3199 (regcache_invalidate_thread): Declare.
3200 (regcache_invalidate_one): Delete declaration.
3201 (regcache_release): Declare.
3202 (find_register_by_number, register_cache_size, register_size)
3203 (find_regno): Add target_desc parameter.
3204 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3205 declarations.
3206 * remote-utils.c: Include tdesc.h.
3207 (outreg, prepare_resume_reply): Adjust.
3208 * server.c: Include tdesc.h.
3209 (gdbserver_xmltarget): Delete declaration.
3210 (get_features_xml, process_serial_event): Adjust.
3211 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3212 declare.
3213 (struct process_info) <tdesc>: New field.
3214 (ipa_tdesc): Declare.
3215 * tdesc.c: New file.
3216 * tdesc.h: New file.
3217 * tracepoint.c: Include tdesc.h.
3218 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3219 (get_context_regcache): Adjust to pass ipa_tdesc down.
3220 (do_action_at_tracepoint): Adjust to get the register cache size
3221 from the context regcache's description.
3222 (traceframe_walk_blocks): Adjust to get the register cache size
3223 from the current trace frame's description.
3224 (traceframe_get_pc): Adjust to get current trace frame's
3225 description and pass it down.
3226 (gdb_collect): Adjust to get the register cache size from the
3227 IPA's description.
3228 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3229 (gdbserver_xmltarget): Delete.
3230 (initialize_low_tracepoint): Set the ipa's target description.
3231 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3232 (initialize_low_tracepoint): Set the ipa's target description.
3233 * linux-x86-low.c: Include tdesc.h.
3234 [__x86_64__] (is_64bit_tdesc): New.
3235 (ps_get_thread_area, x86_get_thread_area): Use it.
3236 (i386_cannot_store_register): Rename to ...
3237 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3238 (i386_cannot_fetch_register): Rename to ...
3239 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3240 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3241 to new interface.
3242 (target_regsets): Rename to ...
3243 (x86_regsets): ... this.
3244 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3245 interface.
3246 (x86_siginfo_fixup): Use is_64bit_tdesc.
3247 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3248 (tdesc_x32_avx_linux, tdesc_x32_linux)
3249 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3250 Declare.
3251 (x86_linux_update_xmltarget): Delete.
3252 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3253 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3254 (AMD64_LINUX_USER64_CS): New.
3255 (x86_linux_read_description): New, based on
3256 x86_linux_update_xmltarget.
3257 (same_process_callback): New.
3258 (x86_arch_setup_process_callback): New.
3259 (x86_linux_update_xmltarget): New.
3260 (x86_regsets_info): New.
3261 (amd64_linux_regs_info): New.
3262 (i386_linux_usrregs_info): New.
3263 (i386_linux_regs_info): New.
3264 (x86_linux_regs_info): New.
3265 (x86_arch_setup): Reimplement.
3266 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3267 (x86_emit_ops): Ditto.
3268 (the_low_target): Adjust. Install x86_linux_regs_info,
3269 x86_cannot_fetch_register, and x86_cannot_store_register.
3270 (initialize_low_arch): New.
3271 * linux-ia64-low.c (tdesc_ia64): Declare.
3272 (ia64_fetch_register): Adjust.
3273 (ia64_usrregs_info, regs_info): New globals.
3274 (ia64_regs_info): New function.
3275 (the_low_target): Adjust.
3276 (initialize_low_arch): New function.
3277 * linux-sparc-low.c (tdesc_sparc64): Declare.
3278 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3279 Adjust.
3280 (sparc_arch_setup): New function.
3281 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3282 (the_low_target): Adjust.
3283 (initialize_low_arch): New function.
3284 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3285 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3286 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3287 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3288 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3289 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3290 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3291 (tdesc_powerpc_isa205_vsx64l): Declare.
3292 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3293 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3294 (ppc_set_pc, ppc_get_hwcap): Adjust.
3295 (ppc_usrregs_info): Forward declare.
3296 (!__powerpc64__) ppc_regmap_adjusted: New global.
3297 (ppc_arch_setup): Adjust to the current process'es target
3298 description.
3299 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3300 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3301 (ppc_store_evrregset): Adjust.
3302 (target_regsets): Rename to ...
3303 (ppc_regsets): ... this, and make static.
3304 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3305 (ppc_regs_info): New function.
3306 (the_low_target): Adjust.
3307 (initialize_low_arch): New function.
3308 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3309 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3310 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3311 (tdesc_s390x_linux64v2): Declare.
3312 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3313 (s390_fill_gregset, s390_store_last_break): Adjust.
3314 (target_regsets): Rename to ...
3315 (s390_regsets): ... this, and make static.
3316 (s390_get_pc, s390_set_pc): Adjust.
3317 (s390_get_hwcap): New target_desc parameter, and use it.
3318 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3319 (s390_arch_setup): Adjust to set the current process'es target
3320 description. Don't adjust the regmap.
3321 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3322 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3323 (regs_info_3264): New globals.
3324 (s390_regs_info): New function.
3325 (the_low_target): Adjust.
3326 (initialize_low_arch): New function.
3327 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3328 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3329 [__mips64] (init_registers_mips_linux)
3330 (init_registers_mips_dsp_linux): Delete defines.
3331 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3332 (have_dsp): New global.
3333 (mips_read_description): New, based on mips_arch_setup.
3334 (mips_arch_setup): Reimplement.
3335 (get_usrregs_info): New function.
3336 (mips_cannot_fetch_register, mips_cannot_store_register)
3337 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3338 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3339 (target_regsets): Rename to ...
3340 (mips_regsets): ... this, and make static.
3341 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3342 (dsp_regs_info, regs_info): New globals.
3343 (mips_regs_info): New function.
3344 (the_low_target): Adjust.
3345 (initialize_low_arch): New function.
3346 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3347 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3348 Declare.
3349 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3350 (arm_read_description): New, with bits factored from
3351 arm_arch_setup.
3352 (arm_arch_setup): Reimplement.
3353 (target_regsets): Rename to ...
3354 (arm_regsets): ... this, and make static.
3355 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3356 (arm_regs_info): New function.
3357 (the_low_target): Adjust.
3358 (initialize_low_arch): New function.
3359 * linux-m68k-low.c (tdesc_m68k): Declare.
3360 (target_regsets): Rename to ...
3361 (m68k_regsets): ... this, and make static.
3362 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3363 (m68k_regs_info): New function.
3364 (m68k_arch_setup): New function.
3365 (the_low_target): Adjust.
3366 (initialize_low_arch): New function.
3367 * linux-sh-low.c (tdesc_sharch): Declare.
3368 (target_regsets): Rename to ...
3369 (sh_regsets): ... this, and make static.
3370 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3371 (sh_regs_info, sh_arch_setup): New functions.
3372 (the_low_target): Adjust.
3373 (initialize_low_arch): New function.
3374 * linux-bfin-low.c (tdesc_bfin): Declare.
3375 (bfin_arch_setup): New function.
3376 (bfin_usrregs_info, regs_info): New globals.
3377 (bfin_regs_info): New function.
3378 (the_low_target): Adjust.
3379 (initialize_low_arch): New function.
3380 * linux-cris-low.c (tdesc_cris): Declare.
3381 (cris_arch_setup): New function.
3382 (cris_usrregs_info, regs_info): New globals.
3383 (cris_regs_info): New function.
3384 (the_low_target): Adjust.
3385 (initialize_low_arch): New function.
3386 * linux-cris-low.c (tdesc_crisv32): Declare.
3387 (cris_arch_setup): New function.
3388 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3389 (cris_regs_info): New function.
3390 (the_low_target): Adjust.
3391 (initialize_low_arch): New function.
3392 * linux-m32r-low.c (tdesc_m32r): Declare.
3393 (m32r_arch_setup): New function.
3394 (m32r_usrregs_info, regs_info): New globals.
3395 (m32r_regs_info): Adjust.
3396 (initialize_low_arch): New function.
3397 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3398 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3399 (tic6x_usrregs_info): Forward declare.
3400 (tic6x_read_description): New function, based on ...
3401 (tic6x_arch_setup): ... this. Reimplement.
3402 (target_regsets): Rename to ...
3403 (tic6x_regsets): ... this, and make static.
3404 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3405 (tic6x_regs_info): New function.
3406 (the_low_target): Adjust.
3407 (initialize_low_arch): New function.
3408 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3409 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3410 (target_regsets): Rename to ...
3411 (xtensa_regsets): ... this, and make static.
3412 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3413 globals.
3414 (xtensa_arch_setup, xtensa_regs_info): New functions.
3415 (the_low_target): Adjust.
3416 (initialize_low_arch): New function.
3417 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3418 (nios2_arch_setup): Set the current process'es tdesc.
3419 (target_regsets): Rename to ...
3420 (nios2_regsets): ... this.
3421 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3422 (nios2_regs_info): New function.
3423 (the_low_target): Adjust.
3424 (initialize_low_arch): New function.
3425 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3426 (aarch64_arch_setup): Set the current process'es tdesc.
3427 (target_regsets): Rename to ...
3428 (aarch64_regsets): ... this.
3429 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3430 (aarch64_regs_info): New function.
3431 (the_low_target): Adjust.
3432 (initialize_low_arch): New function.
3433 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3434 globals.
3435 (target_regsets): Rename to ...
3436 (tile_regsets): ... this.
3437 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3438 (tile_regs_info): New function.
3439 (tile_arch_setup): Set the current process'es tdesc.
3440 (the_low_target): Adjust.
3441 (initialize_low_arch): New function.
3442 * spu-low.c (tdesc_spu): Declare.
3443 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3444 * win32-arm-low.c (tdesc_arm): Declare.
3445 (arm_arch_setup): New function.
3446 (the_low_target): Install arm_arch_setup instead of
3447 init_registers_arm.
3448 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3449 (init_windows_x86): Rename to ...
3450 (i386_arch_setup): ... this. Set `win32_tdesc'.
3451 (the_low_target): Adjust.
3452 * win32-low.c (win32_tdesc): New global.
3453 (child_add_thread): Don't create the thread cache here.
3454 (do_initial_child_stuff): Set the new process'es tdesc.
3455 * win32-low.h (struct target_desc): Forward declare.
3456 (win32_tdesc): Declare.
3457 * lynx-i386-low.c (tdesc_i386): Declare global.
3458 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3459 * lynx-low.c (lynx_tdesc): New global.
3460 (lynx_add_process): Set the new process'es tdesc.
3461 * lynx-low.h (struct target_desc): Forward declare.
3462 (lynx_tdesc): Declare global.
3463 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3464 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3465 * nto-low.c (nto_tdesc): New global.
3466 (do_attach): Set the new process'es tdesc.
3467 * nto-low.h (struct target_desc): Forward declare.
3468 (nto_tdesc): Declare.
3469 * nto-x86-low.c (tdesc_i386): Declare.
3470 (nto_x86_arch_setup): Set `nto_tdesc'.
3471
3472 2013-06-04 Gary Benson <gbenson@redhat.com>
3473
3474 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3475 to qSupported response when appropriate.
3476 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3477 with nonzero-length annex.
3478 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3479 arguments supplied in annex.
3480
3481 2013-05-31 Doug Evans <dje@google.com>
3482
3483 PR server/15594
3484 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3485 64 bits in 64-cross-32 environment.
3486
3487 2013-05-28 Pedro Alves <palves@redhat.com>
3488
3489 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3490 (aarch64-without-fpu.c): Delete rule.
3491 * configure.srv (aarch64*-*-linux*): Remove references to
3492 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3493 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3494 declaration.
3495
3496 2013-05-24 Pedro Alves <palves@redhat.com>
3497
3498 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3499 instead of strchr/decode_address. Error if the range isn't split
3500 with a ','. Don't assume there's be a ':' in the action.
3501
3502 2013-05-23 Yao Qi <yao@codesourcery.com>
3503 Pedro Alves <palves@redhat.com>
3504
3505 * linux-low.c (lwp_in_step_range): New function.
3506 (linux_wait_1): If the thread was range stepping and stopped
3507 outside the stepping range, report the stop to GDB. Otherwise,
3508 continue stepping. Add range stepping debug output.
3509 (linux_set_resume_request): Copy the step range from the resume
3510 request to the lwp.
3511 (linux_supports_range_stepping): New.
3512 (linux_target_ops) <supports_range_stepping>: Set to
3513 linux_supports_range_stepping.
3514 * linux-low.h (struct linux_target_ops)
3515 <supports_range_stepping>: New field.
3516 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3517 * linux-x86-low.c (x86_supports_range_stepping): New.
3518 (the_low_target) <supports_range_stepping>: Set to
3519 x86_supports_range_stepping.
3520 * server.c (handle_v_cont): Handle 'r' action.
3521 (handle_v_requests): Append ";r" if the target supports range
3522 stepping.
3523 * target.h (struct thread_resume) <step_range_start,
3524 step_range_end>: New fields.
3525 (struct target_ops) <supports_range_stepping>:
3526 New field.
3527 (target_supports_range_stepping): New macro.
3528
3529 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3530
3531 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3532 confusion in comment.
3533
3534 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3535
3536 * lynx-low.c (struct process_info_private): New type.
3537 (lynx_add_process): New function.
3538 (lynx_create_inferior, lynx_attach): Replace calls to
3539 add_process by calls to lynx_add_process.
3540 (lynx_resume): If PTID is null, then try using
3541 current_process()->private->last_wait_event_ptid.
3542 Add comments.
3543 (lynx_clear_inferiors): Delete. The contents of that function
3544 has been inlined in lynx_mourn;
3545 (lynx_wait_1): Save the ptid in the process's private data.
3546 (lynx_mourn): Free the process' private data. Replace call
3547 to lynx_clear_inferiors by call to clear_inferiors.
3548
3549 2013-05-17 Yao Qi <yao@codesourcery.com>
3550
3551 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3552 the right place.
3553
3554 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3555
3556 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3557 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3558 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3559 PT_TEXT_END_ADDR guards. Update comments.
3560 (linux_target_op) <read_offsets>: Conditionally define to
3561 linux_read_offsets if the target is UCLIBC and if it defines
3562 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3563
3564 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3565 Andrew Jenner <andrew@codesourcery.com>
3566
3567 * Makefile.in (SFILES): Add linux-nios2-low.c.
3568 (clean): Add action to delete nios2-linux.c.
3569 (nios2-linux.c): New rule.
3570 * configure.srv: Add nios2*-*-linux*.
3571 * linux-nios2-low.c: New.
3572
3573 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3574
3575 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3576
3577 2013-04-25 Hui Zhu <hui@codesourcery.com>
3578
3579 PR gdb/15186
3580 * ax.c (ax_printf): Add fflush.
3581
3582 2013-04-22 Tom Tromey <tromey@redhat.com>
3583
3584 * Makefile.in (SFILES): Add filestuff.c.
3585 (OBS): Add filestuff.o.
3586 (filestuff.o): New target.
3587 * config.in, configure: Rebuild.
3588 * configure.ac: Check for fdwalk, pipe2.
3589
3590 2013-04-17 Pedro Alves <palves@redhat.com>
3591
3592 * configure.ac (USE_THREAD_DB): Delete variable.
3593 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3594 Don't AC_SUBST USE_THREAD_DB.
3595 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3596 * config.in, configure: Regenerate.
3597
3598 2013-04-16 Pedro Alves <palves@redhat.com>
3599
3600 * linux-low.h (struct lwp_info) <thread_known>: Move under
3601 the USE_THREAD_DB #ifdef.
3602
3603 2013-04-16 Pedro Alves <palves@redhat.com>
3604
3605 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3606 (linux-low.o): Delete rule.
3607 * linux-low.h: Always include "gdb_thread_db.h" instead of
3608 conditionally including thread_db.h.
3609 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3610 HAVE_THREAD_DB_H.
3611
3612 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3613
3614 * Makefile.in (install-only): Fix make install regression.
3615
3616 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3617
3618 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3619 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3620 installation.
3621 * gdbserver.1: Remove.
3622
3623 2013-03-22 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (handle_extended_wait): Don't call
3626 linux_enable_event_reporting.
3627
3628 2013-03-15 Tony Theodore <tonyt@logyst.com>
3629
3630 PR build/9098:
3631 * Makefile.in (SHELL): Use @SHELL@.
3632
3633 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3634
3635 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3636 compiler warning.
3637
3638 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3639
3640 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3641 Remove extraneous NULL element.
3642
3643 2013-03-13 Yao Qi <yao@codesourcery.com>
3644
3645 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3646 'V' block in trace frame.
3647
3648 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3649
3650 * target.h (struct target_ops): Add btrace ops.
3651 (target_supports_btrace): New macro.
3652 (target_enable_btrace): New macro.
3653 (target_disable_btrace): New macro.
3654 (target_read_btrace): New macro.
3655 * gdbthread.h (struct thread_info): Add btrace field.
3656 * server.c: Include btrace-common.h.
3657 (handle_btrace_general_set): New function.
3658 (handle_btrace_enable): New function.
3659 (handle_btrace_disable): New function.
3660 (handle_general_set): Call handle_btrace_general_set.
3661 (handle_qxfer_btrace): New function.
3662 (struct qxfer qxfer_packets[]): Add btrace entry.
3663 * inferiors.c (remove_thread): Disable btrace.
3664 * linux-low: Include linux-btrace.h.
3665 (linux_low_enable_btrace): New function.
3666 (linux_low_read_btrace): New function.
3667 (linux_target_ops): Add btrace ops.
3668 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3669 Add srv_linux_btrace=yes.
3670 (x86_64-*-linux*): Add linux-btrace.o.
3671 Add srv_linux_btrace=yes.
3672 * configure.ac: Define HAVE_LINUX_BTRACE.
3673 * config.in: Regenerated.
3674 * configure: Regenerated.
3675
3676 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3677
3678 * server.c (handle_qxfer): Preserve error message if -3 is
3679 returned.
3680 (qxfer): Document the -3 return value.
3681
3682 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3683
3684 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3685 (linux_btrace_h): New variable.
3686 (linux-btrace.o): New rule.
3687
3688 2013-03-08 Stan Shebs <stan@codesourcery.com>
3689 Hafiz Abid Qadeer <abidh@codesourcery.com>
3690
3691 * tracepoint.c (trace_buffer_size): New global.
3692 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3693 (init_trace_buffer): Change to one-argument function. Allocate
3694 trace buffer memory.
3695 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3696 handle QTBuffer:size packet.
3697 (cmd_bigqtbuffer_size): New function.
3698 (initialize_tracepoint): Call init_trace_buffer with
3699 DEFAULT_TRACE_BUFFER_SIZE.
3700 * server.c (handle_query): Add QTBuffer:size in the
3701 supported packets.
3702
3703 2013-03-07 Yao Qi <yao@codesourcery.com>
3704
3705 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3706 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3707 of -1.
3708 (cmd_qtsp): Adjust condition. Do post increment.
3709 Set cur_action and cur_step_action back to 0.
3710
3711 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3712
3713 PR server/15236
3714 * linux-low.c (linux_write_memory): Return early success if LEN is
3715 zero.
3716
3717 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3718
3719 * configure.srv: Add x86_64-*-cygwin* as target.
3720
3721 2013-02-28 Tom Tromey <tromey@redhat.com>
3722
3723 * configure.ac: Invoke AC_SYS_LARGEFILE.
3724 * configure, config.in: Rebuild.
3725
3726 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3727
3728 * win32-low.c: Throughout, fix format strings and casts of
3729 printf-like functions to avoid type related warnings on all
3730 platforms.
3731 (get_child_debug_event): Print dwDebugEventCode as hex since
3732 that's how it's usually documented.
3733
3734 2013-02-28 Yao Qi <yao@codesourcery.com>
3735
3736 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3737 pulongest.
3738
3739 2013-02-27 Jiong Wang <jiwang@tilera.com>
3740
3741 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3742 (reg-tilegx32.c): New rule.
3743 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3744 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3745 different register info initializer according to elf class.
3746 (init_registers_tilgx32): New function. The tilegx32 register info
3747 initializer.
3748 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3749 (tile_store_gregset): Likewise.
3750
3751 2013-02-27 Yao Qi <yao@codesourcery.com>
3752
3753 * server.c (process_point_options): Print debug message when
3754 debug_threads is true.
3755
3756 2013-02-26 Yao Qi <yao@codesourcery.com>
3757
3758 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3759
3760 2013-02-19 Pedro Alves <palves@redhat.com>
3761 Kai Tietz <ktietz@redhat.com>
3762
3763 PR gdb/15161
3764
3765 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3766 instead of strtoul to extract address from packet.
3767 (process_serial_event) <'z'>: Likewise.
3768
3769 2013-02-18 Yao Qi <yao@codesourcery.com>
3770
3771 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3772
3773 2013-02-14 Pedro Alves <palves@redhat.com>
3774
3775 Plug memory leak.
3776
3777 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3778 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3779
3780 2013-02-14 Pedro Alves <palves@redhat.com>
3781
3782 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3783
3784 2013-02-14 Pedro Alves <palves@redhat.com>
3785
3786 * tracepoint.c (save_string): Delete.
3787 (add_tracepoint_action): Use savestring instead of save_string.
3788
3789 2013-02-12 Pedro Alves <palves@redhat.com>
3790
3791 * linux-xtensa-low.c: Ditto.
3792 * xtensa-xtregs.c: Ditto.
3793
3794 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3795
3796 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3797 thread_db.
3798
3799 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3800
3801 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3802 aarch64_num_wp_regs and aarch64_num_bp_regs to
3803 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3804
3805 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3806
3807 * linux-aarch64-low.c (ps_get_thread_area): Replace
3808 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3809
3810 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3811 Marcus Shawcroft <marcus.shawcroft@arm.com>
3812 Nigel Stephens <nigel.stephens@arm.com>
3813 Yufeng Zhang <yufeng.zhang@arm.com>
3814
3815 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3816 (aarch64.c, aarch64-without-fpu.c): New targets.
3817 * configure.srv (aarch64*-*-linux*): New.
3818 * linux-aarch64-low.c: New file.
3819
3820 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3821
3822 * linux-low.c (handle_extended_wait, linux_create_inferior)
3823 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3824 (dequeue_one_deferred_signal, linux_resume_one_thread)
3825 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3826 (linux_tracefork_grandchild, linux_test_for_tracefork)
3827 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3828 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3829 where the argument is 0.
3830
3831 2013-01-25 Yao Qi <yao@codesourcery.com>
3832
3833 * event-loop.c: Include "queue.h".
3834 (gdb_event_p): New typedef.
3835 (struct gdb_event) <next_event>: Remove.
3836 (event_queue): Change to QUEUE(gdb_event_p).
3837 (async_queue_event): Remove.
3838 (gdb_event_xfree): New.
3839 (initialize_event_loop): New.
3840 (process_event): Use API from QUEUE.
3841 (wait_for_event): Likewise.
3842 * server.c (main): Call initialize_event_loop.
3843 * server.h (initialize_event_loop): Declare.
3844
3845 2013-01-18 Yao Qi <yao@codesourcery.com>
3846
3847 * ax.h (struct eval_agent_expr_context): New.
3848 (gdb_eval_agent_expr): Update declaration.
3849 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3850 TFRAME. Add new argument CTX.
3851 * server.h (struct eval_agent_expr_context): Declare.
3852 (agent_mem_read, agent_tsv_read): Update declaration.
3853 (agent_mem_read_string): Likewise.
3854 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3855 (add_traceframe_block): Add new argument TPOINT.
3856 Increase TPOINT->traceframe_usage.
3857 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3858 eval_tracepoint_agent_expr.
3859 (condition_true_at_tracepoint): Likewise.
3860 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3861 (agent_mem_read_string, agent_tsv_read): Likewise.
3862
3863 2013-01-16 Yao Qi <yao@codesourcery.com>
3864
3865 * linux-low.c (linux_resume_one_lwp): Don't check
3866 'lwp->bp_reinsert != 0'.
3867
3868 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3869 Pedro Alves <palves@redhat.com>
3870
3871 * lynx-low.c (ptrace_request_to_str): Define a temporary
3872 macro and use it to simplify this function's implementation.
3873
3874 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3875
3876 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3877 sets errno.
3878
3879 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3880
3881 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3882
3883 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3884
3885 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3886
3887 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3888
3889 * lynx-low.c (lynx_resume): Use the resume_info parameter
3890 to determine the ptid for the lynx_ptrace call, unless
3891 it is equal to minus_one_ptid, in which case we use the
3892 ptid of the current_inferior.
3893 (lynx_wait_1): After having received a thread create/exit
3894 event, resume the inferior's execution using the signaling
3895 thread's ptid, rather than the old ptid.
3896
3897 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3898
3899 * lynx-low.c (lynx_resume): Delete variable ret.
3900
3901 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3902
3903 * gdbreplay.c (gdbreplay_version): Update copyright year.
3904 * server.c (gdbserver_version): Likewise.
3905
3906 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3907
3908 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3909 new thread.
3910
3911 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3912
3913 * lynx-low.c (ptrace_request_to_str): Add handling for
3914 PTRACE_GETTRACESIG.
3915
3916 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3917
3918 * lynx-low.c (lynx_attach): Delete variable new_process.
3919
3920 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3921
3922 * lynx-low.c (lynx_create_inferior): Delete variable
3923 new_process.
3924
3925 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3926
3927 * lynx-low.c (ptrace_request_to_str): Do not handle
3928 PTRACE_GETTHREADLIST if this macro does not exist.
3929
3930 2012-12-15 Yao Qi <yao@codesourcery.com>
3931
3932 * Makefile.in (OBS): Add notif.o.
3933 * notif.c, notif.h: New.
3934 * server.c: Include "notif.h".
3935 (struct vstop_notif) <next>: Remove.
3936 <base>: New field.
3937 (queue_stop_reply): Update.
3938 (push_event, send_next_stop_reply): Remove.
3939 (discard_queued_stop_replies): Update.
3940 (notif_stop): New variable.
3941 (handle_v_stopped): Remove.
3942 (handle_v_requests): Don't call handle_v_stopped. Call
3943 handle_ack_notif instead.
3944 (queue_stop_reply_callback): Call notif_event_enque instead
3945 of queue_stop_reply.
3946 (handle_status): Don't call send_next_stop_reply, call
3947 notif_write_event instead.
3948 (kill_inferior_callback): Likewise.
3949 (detach_or_kill_inferior_callback): Likewise.
3950 (main): Call initialize_notif.
3951 (process_serial_event): Call QUEUE_is_empty.
3952 (handle_target_event): Call notif_push instead of push event.
3953 * server.h (push_event): Remove declaration.
3954
3955 2012-12-10 Tom Tromey <tromey@redhat.com>
3956
3957 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3958 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3959 macros.
3960 (.c.o): Rewrite.
3961 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3962 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3963 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3964 (amd64-linux-ipa.o, ax.o): Rewrite.
3965 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3966 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3967 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3968 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3969 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3970 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3971 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3972 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3973 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3974 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3975 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3976 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3977 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3978 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3979 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3980 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3981 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3982 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3983 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3984 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3985 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3986 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3987 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3988 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3989 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3990 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3991 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3992 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3993 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3994 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3995 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3996 (reg-tilegx.o): Remove.
3997 (all_object_files): New macro.
3998 Include .deps files.
3999 * aclocal.m4, configure: Rebuild.
4000 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4001 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4002 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4003
4004 2012-12-05 Tom Tromey <tromey@redhat.com>
4005
4006 PR gdb/14917:
4007 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4008
4009 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4010
4011 * configure.ac: Check for linux/perf_event.h.
4012 * config.in: Regenerated.
4013 * configure: Regenerated.
4014
4015 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4016
4017 * hostio.c (handle_readlink): Decrease buffer size
4018 parameter passed to readlink by one byte.
4019
4020 2012-11-26 Yao Qi <yao@codesourcery.com>
4021
4022 * configure.ac (build_warnings): Append '-Wempty-body'.
4023 * configure: Regenerated.
4024 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4025 body.
4026
4027 2012-11-15 Pierre Muller <muller@sourceware.org>
4028
4029 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4030 * config.in: Regenerate.
4031 * configure: Regenerate.
4032 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4033 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4034 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4035 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4036 header.
4037 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4038 instead of <sys/wait.h> header.
4039 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4040
4041 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4042
4043 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4044 (various make rules): Remove -DGDBSERVER
4045
4046 2012-11-09 Yao Qi <yao@codesourcery.com>
4047
4048 * spu-low.c (current_ptid): Move it to ..
4049 * gdbthread.h: ... here. New.
4050 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4051 * server.c (myresume, process_serial_event): Likewise.
4052 * thread-db.c (thread_db_find_new_threads): Likewise.
4053 * tracepoint.c (run_inferior_command): Likewise.
4054
4055 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4056
4057 * server.c (handle_search_memory_1): Include access length in
4058 warning message.
4059
4060 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4061
4062 * linux-crisv32-low.c: Fix compile errors.
4063
4064 2012-09-04 Yao Qi <yao@codesourcery.com>
4065
4066 * tracepoint.c (cmd_qtsv): Adjust debug message.
4067 Don't check CUR_TPOINT.
4068
4069 2012-08-28 Yao Qi <yao@codesourcery.com>
4070
4071 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4072 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4073 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4074 Remove declarations of xmalloc, xreallloc, xstrdup and
4075 freeargv.
4076 * Makefile.in (libiberty_h): New.
4077 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4078 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4079
4080 2012-08-23 Yao Qi <yao@codesourcery.com>
4081
4082 * server.h: Remove declaration of 'xsnprintf'.
4083
4084 2012-08-22 Keith Seitz <keiths@redhat.com>
4085
4086 * server.h: Include build-gnulib-gbserver/config.h.
4087 * gdbreplay.c: Likewise.
4088
4089 2012-08-08 Doug Evans <dje@google.com>
4090
4091 * Makefile.in (SFILES): Add gdb_vecs.c.
4092 (OBS): Add gdb_vecs.o.
4093 (gdb_vecs_h, host_defs_h): New variables.
4094 (thread-db.o): Add $(gdb_vecs_h) dependency.
4095 (gdb_vecs.o): New rule.
4096 * thread-db.c: #include "gdb_vecs.h".
4097 (thread_db_load_search): Use a vector to iterate over path elements.
4098 Handle text appearing after "$pdir".
4099
4100 * configure.ac: Add check for strstr.
4101 * config.in: Regenerate.
4102 * configure: Regenerate.
4103
4104 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4105
4106 * hostio.c (handle_pread): If pread fails, fall back to attempting
4107 lseek/read.
4108 (handle_pwrite): Likewise for pwrite.
4109
4110 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4111
4112 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4113 between unsupported TYPE and unimplementable ADDR/LEN combination.
4114 (arm_insert_point): Act on new return value.
4115
4116 2012-07-31 Pedro Alves <palves@redhat.com>
4117
4118 * server.c (process_point_options): Only skip tokens if we find
4119 one that is unrecognized. Don't treat 'X' specially while
4120 skipping unrecognized tokens.
4121
4122 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4123
4124 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4125 to 4-byte-align HW breakpoint addresses for Thumb.
4126
4127 2012-07-27 Yao Qi <yao@codesourcery.com>
4128
4129 PR remote/14161.
4130
4131 * server.h: Declare gdb_agent_about_to_close.
4132 * target.c (kill_inferior): Include "agent.h".
4133 New. Send command 'kill'.
4134 * target.h (kill_inferior): Removed macro.
4135 * tracepoint.c (gdb_agent_about_to_close): New.
4136 (gdb_agent_helper_thread): Handle command 'close'.
4137 Wait endlessly until the inferior stops.
4138 Install gdb_agent_remove_socket to atexit hook.
4139 (agent_socket_name): New static variable.
4140 (gdb_agent_socket_init): Replace local variable 'name' with
4141 'agent_socket_name'.
4142 (gdb_agent_remove_socket): New.
4143
4144 2012-07-27 Yao Qi <yao@codesourcery.com>
4145
4146 * server.c (process_point_options): Stop at 'X' when parsing.
4147
4148 2012-07-19 Michael Eager <eager@eagercon.com>
4149
4150 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4151 to hw_execute.
4152 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4153 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4154 hardware breakpoint.
4155
4156 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4157
4158 * gdbserver/linux-low.c (initialize_low): Call
4159 linux_ptrace_init_warnings.
4160
4161 2012-07-02 Doug Evans <dje@google.com>
4162
4163 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4164 pointer to int.
4165
4166 2012-07-02 Stan Shebs <stan@codesourcery.com>
4167
4168 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4169 (ax.o): Add it to build rule.
4170 (ax-ipa.o): Ditto.
4171 (OBS): Add format.o.
4172 (IPA_OBS): Add format.o.
4173 * server.c (handle_query): Claim support for breakpoint commands.
4174 (process_point_options): Add command case.
4175 (process_serial_event): Leave running if there are printfs in
4176 effect.
4177 * mem-break.h (any_persistent_commands): Declare.
4178 (add_breakpoint_commands): Declare.
4179 (gdb_no_commands_at_breakpoint): Declare.
4180 (run_breakpoint_commands): Declare.
4181 * mem-break.c (struct point_command_list): New struct.
4182 (struct breakpoint): New field command_list.
4183 (any_persistent_commands): New function.
4184 (add_commands_to_breakpoint): New function.
4185 (add_breakpoint_commands): New function.
4186 (gdb_no_commands_at_breakpoint): New function.
4187 (run_breakpoint_commands): New function.
4188 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4189 locally.
4190 * ax.c: Include format.h.
4191 (ax_printf): New function.
4192 (gdb_eval_agent_expr): Add printf opcode.
4193
4194 2012-06-13 Yao Qi <yao@codesourcery.com>
4195
4196 * server.c (start_inferior): Remove duplicated writes to fields
4197 'last_resume_kind' and 'last_status' of 'current_inferior'.
4198
4199 2012-06-12 Yao Qi <yao@codesourcery.com>
4200 Pedro Alves <palves@redhat.com>
4201
4202 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4203 comment.
4204 * server.c (handle_v_cont): Extend comment.
4205
4206 2012-06-11 Yao Qi <yao@codesourcery.com>
4207
4208 * linux-low.c (linux_attach): Add 'static'.
4209
4210 2012-06-06 Yao Qi <yao@codesourcery.com>
4211
4212 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4213
4214 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4215
4216 Fix gcc -flto compilation warning.
4217 * server.c (main): Make variable multi_mode and attach volatile.
4218
4219 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4220
4221 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4222 if the platform doesn't know about it.
4223
4224 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4225
4226 * Makefile.in (SFILES): Add linux-tile-low.c.
4227 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4228 * configure.srv: Handle tilegx-*-linux*.
4229 * linux-tile-low.c: New file.
4230
4231 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4232
4233 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4234
4235 2012-05-24 Pedro Alves <palves@redhat.com>
4236
4237 PR gdb/7205
4238
4239 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4240
4241 2012-05-24 Pedro Alves <palves@redhat.com>
4242
4243 PR gdb/7205
4244
4245 Replace target_signal with gdb_signal throughout.
4246
4247 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4248
4249 * linux-low.c (linux_store_registers): Avoid the copying sequence
4250 when no data has been retrieved by ptrace.
4251
4252 2012-05-22 Will Deacon <will.deacon@arm.com>
4253
4254 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4255 Include asm/ptrace.h.
4256 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4257 already defined.
4258
4259 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4260
4261 * linux-low.c (linux_store_registers): Don't re-retrieve data
4262 with ptrace that has already been obtained from /proc. Always
4263 copy any data retrieved with ptrace to the buffer supplied.
4264
4265 2012-05-11 Yao Qi <yao@codesourcery.com>
4266 Pedro Alves <palves@redhat.com>
4267
4268 * linux-low.c (enum stopping_threads_kind): New.
4269 (stopping_threads): Change type to `enum stopping_threads_kind'.
4270 (handle_extended_wait): If stopping and suspending threads, leave
4271 the new_lwp suspended too.
4272 (linux_wait_for_event): Adjust.
4273 (stop_all_lwps): Set `stopping_threads' to
4274 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4275 whether we're suspending threads or just stopping them. Assert no
4276 recursion happens.
4277
4278 2012-04-29 Yao Qi <yao@codesourcery.com>
4279
4280 * server.h: Move some code to ...
4281 * gdbthread.h: ... here. New.
4282 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4283 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4284 (nto-low.o, win32-low.o): Likewise.
4285 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4286 * regcache.c, remote-utils.c, server.c: Likewise.
4287 * target.c, tracepoint.c, win32-low.c: Likewise.
4288
4289 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4290
4291 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4292 (PTRACE_ARG4_TYPE): Likewise.
4293 (PTRACE_XFER_TYPE): Likewise.
4294 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4295 ptrace to PTRACE_ARG3_TYPE.
4296 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4297 (PTRACE_ARG4_TYPE): Likewise.
4298 (PTRACE_XFER_TYPE): Likewise.
4299 (linux_detach_one_lwp): Cast fourth argument of
4300 ptrace to long then PTRACE_ARG4_TYPE.
4301 (regsets_fetch_inferior_registers): Cast third argument of
4302 ptrace to long then PTRACE_ARG3_TYPE.
4303 (regsets_store_inferior_registers): Likewise.
4304
4305 2012-04-20 Pedro Alves <palves@redhat.com>
4306
4307 * configure: Regenerate.
4308
4309 2012-04-19 Pedro Alves <palves@redhat.com>
4310
4311 * Makefile.in (GNULIB_BUILDDIR): New.
4312 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4313 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4314 (all, install-only, uninstall, clean-info, all-lib, clean): No
4315 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4316 (maintainer-clean realclean distclean): Use subdir_do.
4317 (subdir_do): New.
4318 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4319 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4320 * acinclude.m4: Include acx_configure_dir.m4.
4321 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4322 calls. Call AC_PROG_RANLIB. Configure gnulib using
4323 ACX_CONFIGURE_DIR.
4324 (GNULIB): New.
4325 (GNULIB_STDINT_H): Adjust.
4326 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4327 * gdbreplay.c: Include build-gnulib/config.h.
4328 * server.h: Likewise.
4329 * aclocal.m4: Regenerate.
4330 * config.in: Regenerate.
4331 * configure: Regenerate.
4332
4333 2012-04-19 Pedro Alves <palves@redhat.com>
4334
4335 * Makefile.in (LIBGNU, INCGNU): Adjust.
4336 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4337 (all, install-only, uninstall, clean-info, all-lib, clean)
4338 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4339 * configure.ac: Adjust AC_OUTPUT output.
4340 * aclocal.m4: Regenerate.
4341 * configure: Regenerate.
4342
4343 2012-04-19 Pedro Alves <palves@redhat.com>
4344
4345 * Makefile.in (generated_files): New.
4346 (server_h): Remove the explicit dependency on config.h, and depend
4347 on $generated_files.
4348
4349 2012-04-19 Pedro Alves <palves@redhat.com>
4350
4351 * Makefile.in (INCGNU): Add -Ignulib.
4352
4353 2012-04-19 Pedro Alves <palves@redhat.com>
4354
4355 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4356 (INCGNU): ... this, and spell out -I here.
4357 (GNULIB_LIB): Rename to ...
4358 (LIBGNU): ... this.
4359 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4360
4361 2012-04-19 Pedro Alves <palves@redhat.com>
4362
4363 * config.in: Regenerate.
4364
4365 2012-04-19 Pedro Alves <palves@redhat.com>
4366
4367 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4368 * server.h (memmem): Remove declaration.
4369 * config.in: Regenerate.
4370 * configure: Regenerate.
4371
4372 2012-04-19 Yao Qi <yao@codesourcery.com>
4373
4374 * Makefile.in (SFILES): Add common/vec.c.
4375 (OBS): Add vec.o.
4376 (vec.o): New rule.
4377
4378 2012-04-19 Yao Qi <yao@codesourcery.com>
4379
4380 * remote-utils.c (prepare_resume_reply): Replace with macro
4381 target_core_of_thread.
4382 * server.c (handle_qxfer_threads_proper): Likewise.
4383 * target.h (traget_core_of_thread): New macro.
4384
4385 2012-04-18 Pedro Alves <palves@redhat.com>
4386
4387 * aclocal.m4: Regenerate.
4388 * configure: Regenerate.
4389
4390 2012-04-16 Yao Qi <yao@codesourcery.com>
4391
4392 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4393 duplicated on address.
4394
4395 2012-04-16 Yao Qi <yao@codesourcery.com>
4396
4397 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4398 (struct tracepoint_action_ops) <send>: New field.
4399 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4400 (agent_expr_send, x_tracepoint_action_send): New.
4401 (l_tracepoint_action_send): New.
4402 (cmd_qtdp): Download and install tracepoint
4403 according to `use_agent'.
4404 (run_inferior_command): Add one more parameter `len'.
4405 Update callers.
4406 (tracepoint_send_agent): New.
4407 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4408
4409 2012-04-16 Yao Qi <yao@codesourcery.com>
4410
4411 * tracepoint.c (download_tracepoints): Moved to ...
4412 (cmd_qtstart): ... here.
4413
4414 2012-04-14 Yao Qi <yao@codesourcery.com>
4415
4416 * tracepoint.c: Include inttypes.h.
4417 (struct collect_memory_action): Use sized types.
4418 (struct tracepoint): Likewise.
4419 (cmd_qtdp, stop_tracing): Update print specifiers.
4420 (cmd_qtp, response_tracepoint): Likewise.
4421 (collect_data_at_tracepoint): Likewise.
4422 (collect_data_at_step): Likewise.
4423
4424 2012-04-14 Yao Qi <yao@codesourcery.com>
4425
4426 Import gnulib module inttypes.
4427 * aclocal.m4, config.in, configure: Regenerated.
4428
4429 2012-04-14 Yao Qi <yao@codesourcery.com>
4430
4431 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4432 Makefile and config.status at last.
4433
4434 2012-04-13 Yao Qi <yao@codesourcery.com>
4435
4436 * tracepoint.c: Include stdint.h unconditionally.
4437
4438 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4439
4440 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4441 on BFD_HAVE_SYS_PROCFS_TYPE.
4442 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4443 * configure: Regenerate.
4444 * config.in: Likewise.
4445
4446 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4447
4448 * Makefile.in (clean): Also remove x32.c x32-linux.c
4449 x32-avx.c x32-avx-linux.c.
4450 (x32.o): New target.
4451 (x32.c): Likewise.
4452 (x32-linux.o): Likewise.
4453 (x32-linux.c): Likewise.
4454 (x32-avx.o): Likewise.
4455 (x32-avx.c): Likewise.
4456 (x32-avx-linux.o): Likewise.
4457 (x32-avx-linux.c): Likewise.
4458
4459 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4460 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4461 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4462 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4463 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4464 i386/x32-avx-linux.xml.
4465
4466 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4467 (init_registers_x32_avx_linux): Likwise.
4468 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4469 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4470
4471 2012-04-13 Pedro Alves <palves@redhat.com>
4472
4473 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4474 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4475 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4476 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4477 the sub-make.
4478
4479 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4480
4481 * linux-x86-low.c (compat_x32_clock_t): New.
4482 (compat_x32_siginfo_t): Likewise.
4483 (compat_x32_siginfo_from_siginfo): Likewise.
4484 (siginfo_from_compat_x32_siginfo): Likewise.
4485 (linux_is_elf64): Likewise.
4486 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4487 and siginfo_from_compat_x32_siginfo for x32.
4488 (x86_arch_setup): Set linux_is_elf64.
4489
4490 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4491
4492 PR gdb/13969
4493 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4494 e_machine field.
4495 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4496 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4497 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4498 compatible with process.
4499
4500 2012-04-12 Yao Qi <yao@codesourcery.com>
4501
4502 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4503 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4504 (install-only, install-info, clean): Handle sub dir gnulib.
4505 (all-lib, am--refresh): New targets.
4506 (memmem.o): Remove target.
4507 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4508 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4509 (AC_REPLACE_FUNCS): Remove memmem.
4510 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4511 (AC_OUTPUT): Generate Makefile in gnulib/.
4512 * aclocal.m4, config.in, configure: Regenerated.
4513
4514 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4515
4516 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4517
4518 2012-04-05 Pedro Alves <palves@redhat.com>
4519
4520 -Werror=strict-aliasing
4521
4522 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4523 pointer.
4524
4525 2012-04-04 Pedro Alves <palves@redhat.com>
4526
4527 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4528 (sparc_store_gregset_from_stack, sparc_store_gregset)
4529 (sparc_breakpoint_at): Fix formatting.
4530
4531 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4532
4533 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4534 are available.
4535 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4536 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4537 * config.in: Regenerate.
4538 * configure: Likewise.
4539
4540 2012-03-29 Pedro Alves <palves@redhat.com>
4541
4542 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4543 Correct ptrace arguments.
4544
4545 2012-03-28 Pedro Alves <palves@redhat.com>
4546
4547 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4548 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4549 (IA64_FR1_REGNUM): New defines.
4550 (ia64_fetch_register): New.
4551 (the_low_target): Install it.
4552 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4553 field.
4554 * linux-low.c (linux_fetch_registers): Try the
4555 the_low_target.fetch_register hook first.
4556
4557 * linux-arm-low.c (the_low_target): Adjust.
4558 * linux-bfin-low.c (the_low_target): Adjust.
4559 * linux-cris-low.c (the_low_target): Adjust.
4560 * linux-crisv32-low.c (the_low_target): Adjust.
4561 * linux-m32r-low.c (the_low_target): Adjust.
4562 * linux-m68k-low.c (the_low_target): Adjust.
4563 * linux-mips-low.c (the_low_target): Adjust.
4564 * linux-ppc-low.c (the_low_target): Adjust.
4565 * linux-s390-low.c (the_low_target): Adjust.
4566 * linux-sh-low.c (the_low_target): Adjust.
4567 * linux-sparc-low.c (the_low_target): Adjust.
4568 * linux-tic6x-low.c (the_low_target): Adjust.
4569 * linux-x86-low.c (the_low_target): Adjust.
4570 * linux-xtensa-low.c (the_low_target): Adjust.
4571
4572 2012-03-26 Pedro Alves <palves@redhat.com>
4573
4574 * server.c (handle_qxfer_libraries): Don't bail early if
4575 the_target->qxfer_libraries_svr4 is not NULL.
4576
4577 2012-03-26 Pedro Alves <palves@redhat.com>
4578
4579 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4580
4581 2012-03-23 Pedro Alves <palves@redhat.com>
4582
4583 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4584 "library-list-svr4" element's start tag when the the DSO list is
4585 empty.
4586
4587 2012-03-23 Pedro Alves <palves@redhat.com>
4588
4589 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4590 a variable whose type size is the same as the inferior's pointer
4591 size.
4592
4593 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4594
4595 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4596 struct siginfo.
4597 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4598 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4599 * linux-low.h: Include <signal.h>.
4600 (struct siginfo): Remove forward declaration.
4601 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4602 struct siginfo.
4603
4604 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4605
4606 * .gitignore: Ignore more files.
4607
4608 2012-03-19 Pedro Alves <palves@redhat.com>
4609 Jan Kratochvil <jan.kratochvil@redhat.com>
4610
4611 * server.c (cont_thread, general_thread): Add describing comments.
4612 (start_inferior): Clear `cont_thread'.
4613 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4614 of a process.
4615
4616 2012-03-15 Yao Qi <yao@codesourcery.com>
4617
4618 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4619 handling to ...
4620 (cmd_qtdp): ... here.
4621
4622 2012-03-15 Yao Qi <yao@codesourcery.com>
4623
4624 * tracepoint.c (struct tracepoint_action_ops): New.
4625 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4626 (m_tracepoint_action_download): New.
4627 (r_tracepoint_action_download): New.
4628 (x_tracepoint_action_download): New.
4629 (l_tracepoint_action_download): New.
4630 (add_tracepoint_action): Install `action->ops' according type.
4631 (download_tracepoint_1): Move code `download' function pointer
4632 of various tracepoint_action_ops.
4633
4634 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4635
4636 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4637 linux_ptrace_attach_warnings.
4638
4639 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4640
4641 * Makefile.in (linux-ptrace.o): New.
4642 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4643 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4644 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4645 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4646 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4647 of these targets.
4648 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4649
4650 2012-03-08 Yao Qi <yao@codesourcery.com>
4651 Pedro Alves <palves@redhat.com>
4652
4653 Fix PR server/13392.
4654 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4655 offset of JMP insn.
4656 * tracepoint.c (remove_tracepoint): New.
4657 (cmd_qtdp): Call remove_tracepoint when failed to install.
4658
4659 2012-03-07 Pedro Alves <palves@redhat.com>
4660
4661 * linux-low.c (get_detach_signal): New.
4662 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4663 Pass on pending signals to PTRACE_DETACH. Check the result of the
4664 ptrace call.
4665 * server.c (program_signals, program_signals_p): New.
4666 (handle_general_set): Handle QProgramSignals.
4667 * server.h (program_signals, program_signals_p): Declare.
4668
4669 2012-03-05 Pedro Alves <palves@redhat.com>
4670 Jan Kratochvil <jan.kratochvil@redhat.com>
4671
4672 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4673 New comment why.
4674
4675 2012-03-03 Yao Qi <yao@codesourcery.com>
4676
4677 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4678 agent_look_up_symbols.
4679
4680 2012-03-03 Yao Qi <yao@codesourcery.com>
4681
4682 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4683 (linux-x86-low.o): Likewise.
4684 * server.h: Remove in_process_agent_loaded.
4685 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4686 common/agent.c.
4687 Update callers.
4688
4689 2012-03-03 Yao Qi <yao@codesourcery.com>
4690
4691 * tracepoint.c (gdb_agent_capability): New global.
4692 (in_process_agent_loaded_ust): Renamed to
4693 `in_process_agent_supports_ust'.
4694 Update callers.
4695 (in_process_agent_supports_ust): Call agent_capability_check.
4696 (clear_installed_tracepoints): Assert that agent supports
4697 agent.
4698
4699 2012-03-03 Yao Qi <yao@codesourcery.com>
4700
4701 * linux-low.c (linux_supports_agent): New.
4702 (linux_target_ops): Initialize field `supports_agent' with
4703 linux_supports_agent.
4704 * target.h (struct target_ops) <supports_agent>: New.
4705 (target_supports_agent): New macro.
4706 * server.c (handle_general_set): Handle packet 'QAgent'.
4707 (handle_query): Send `QAgent+'.
4708 * Makefile.in (server.o): Depends on agent.h.
4709
4710 2012-03-03 Yao Qi <yao@codesourcery.com>
4711
4712 * Makefile.in (OBS): Add agent.o.
4713 Add new rule for agent.o.
4714 Track dependence of tracepoint.c on agent.h.
4715 * tracepoint.c (run_inferior_command_1):
4716 (run_inferior_command): Call agent_run_command.
4717 (gdb_ust_connect_sync_socket): Deleted. Move it to
4718 common/agent.c.
4719 (resume_thread, stop_thread): Likewise.
4720 (gdb_ust_socket_init): Renamed to ...
4721 (gdb_agent_socket_init): ... New.
4722 (gdb_ust_thread): Renamed to ...
4723 (gdb_agent_helper_thread): ... New.
4724 (gdb_ust_init): Move some code to ...
4725 (gdb_agent_init): ... here. New.
4726 [HAVE_UST]: Call gdb_ust_init.
4727 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4728 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4729 * config.in, configure: Regenerated.
4730
4731 2012-03-02 Pedro Alves <palves@redhat.com>
4732
4733 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4734 * linux-low.c (struct simple_pid_list): New.
4735 (stopped_pids): New a struct simple_pid_list pointer.
4736 (add_to_pid_list, pull_pid_from_list): New.
4737 (handle_extended_wait): Don't assume the first signal new children
4738 report is SIGSTOP. Adjust call to pull_pid_from_list.
4739 (linux_wait_for_lwp): Adjust.
4740
4741 2012-03-02 Yao Qi <yao@codesourcery.com>
4742
4743 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4744 debug log.
4745
4746 2012-03-02 Yao Qi <yao@codesourcery.com>
4747
4748 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4749 `stop_pc' and `tpoint'. Update caller.
4750
4751 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4752
4753 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4754 * linux-low.c (use_linux_regsets): New macro.
4755 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4756 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4757 (linux_register_in_regsets): New function.
4758 (usr_fetch_inferior_registers): Skip registers covered by
4759 regsets.
4760 (usr_store_inferior_registers): Likewise.
4761 (usr_fetch_inferior_registers): New macro.
4762 (usr_store_inferior_registers): Likewise.
4763 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4764 (linux_store_registers): Likewise.
4765 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4766 prototype.
4767 (init_registers_mips64_dsp_linux): Likewise.
4768 (init_registers_mips_linux): New macro.
4769 (init_registers_mips_dsp_linux): Likewise.
4770 (mips_dsp_num_regs): Likewise.
4771 (DSP_BASE, DSP_CONTROL): New fallback macros.
4772 (mips_base_regs): New macro.
4773 (mips_regmap): Use it. Fix the size.
4774 (mips_dsp_regmap): New variable.
4775 (mips_dsp_regset_bitmap): Likewise.
4776 (mips_arch_setup): New function.
4777 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4778 than mips_regmap.
4779 (mips_cannot_store_register): Likewise.
4780 (the_low_target): Update .arch_setup, .num_regs and .regmap
4781 initializers. Add .regset_bitmap initializer.
4782 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4783 initializer.
4784 * linux-bfin-low.c (the_low_target): Likewise.
4785 * linux-cris-low.c (the_low_target): Likewise.
4786 * linux-crisv32-low.c (the_low_target): Likewise.
4787 * linux-ia64-low.c (the_low_target): Likewise.
4788 * linux-m32r-low.c (the_low_target): Likewise.
4789 * linux-m68k-low.c (the_low_target): Likewise.
4790 * linux-ppc-low.c (the_low_target): Likewise.
4791 * linux-s390-low.c (the_low_target): Likewise.
4792 * linux-sh-low.c (the_low_target): Likewise.
4793 * linux-sparc-low.c (the_low_target): Likewise.
4794 * linux-tic6x-low.c (the_low_target): Likewise.
4795 * linux-x86-low.c (the_low_target): Likewise.
4796 * linux-xtensa-low.c (the_low_target): Likewise.
4797 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4798 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4799 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4800 srv_xmlfiles.
4801 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4802 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4803
4804 2012-02-29 Yao Qi <yao@codesourcery.com>
4805 Pedro Alves <palves@redhat.com>
4806
4807 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4808 `step_over_finished' is true.
4809
4810 2012-02-27 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4813 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4814
4815 2012-02-27 Pedro Alves <palves@redhat.com>
4816
4817 PR server/9684
4818 * linux-low.c (pid_is_stopped): New.
4819 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4820
4821 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4822
4823 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4824 of conditions.
4825
4826 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4827
4828 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4829
4830 2012-02-24 Luis Machado <lgustavo@codesourcery>
4831
4832 * server.c (handle_query): Advertise support for target-side
4833 breakpoint condition evaluation.
4834 (process_point_options): New function.
4835 (process_serial_event): When inserting a breakpoint, check for
4836 a target-side condition that should be evaluated.
4837
4838 * mem-break.c: Include regcache.h and ax.h.
4839 (point_cond_list_t): New data structure.
4840 (breakpoint) <cond_list>: New field.
4841 (find_gdb_breakpoint_at): Make non-static.
4842 (delete_gdb_breakpoint_at): Clear any target-side
4843 conditions.
4844 (clear_gdb_breakpoint_conditions): New function.
4845 (add_condition_to_breakpoint): Likewise.
4846 (add_breakpoint_condition): Likewise.
4847 (gdb_condition_true_at_breakpoint): Likewise.
4848 (gdb_breakpoint_here): Return result directly instead
4849 of going through a local variable.
4850
4851 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4852 (clear_gdb_breakpoint_conditions): Likewise.
4853 (add_breakpoint_condition): Likewise.
4854 (gdb_condition_true_at_breakpoint): Likewise.
4855
4856 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4857 (need_step_over_p): Take target-side breakpoint condition into
4858 consideration.
4859
4860 2012-02-24 Luis Machado <lgustavo@codesourcery>
4861
4862 * server.h: Include tracepoint.h.
4863 (agent_mem_read, agent_get_trace_state_variable_value,
4864 agent_set_trace_state_variable_value,
4865 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4866 get_set_tsv_func_addr): New prototypes.
4867
4868 * ax.h: New include file.
4869 * ax.c: New source file.
4870
4871 * tracepoint.c: Include ax.h.
4872 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4873 agent_expr, eval_result_type): Move to ax.h.
4874 (parse_agent_expr): Rename to ...
4875 (gdb_parse_agent_expr): ... this, make it non-static and move
4876 to ax.h.
4877 (unparse_agent_expr) Rename to ...
4878 (gdb_unparse_agent_expr): ... this, make it non-static and move
4879 to ax.h.
4880 (eval_agent_expr): Rename to ...
4881 (eval_tracepoint_agent_expr): ... this.
4882 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4883 forward declarations.
4884 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4885 (agent_get_trace_state_variable_value): New function.
4886 (agent_set_trace_state_variable_value): New function.
4887 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4888 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4889 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4890 (condition_true_at_tracepoint): Likewise.
4891 (parse_agent_expr): Rename to ...
4892 (gdb_parse_agent_expr): ... this and move to ax.c.
4893 (unparse_agent_expr): Rename to ...
4894 (gdb_unparse_agent_expr): ... this and move to ax.c.
4895 (gdb_agent_op_name): Move to ax.c.
4896 (eval_agent_expr): Rename to ...
4897 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4898 and move to ax.c.
4899 (eval_tracepoint_agent_expr): New function.
4900 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4901 non-static.
4902 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4903 ax.c.
4904 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4905 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4906 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4907 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4908 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4909 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4910 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4911 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4912 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4913 (compile_bytecodes): Remove forward declaration.
4914 (is_goto_target): Move to ax.c.
4915 (compile_bytecodes): Move to ax.c and call
4916 agent_get_trace_state_variable_value (...) and
4917 agent_set_trace_state_variable_value (...).
4918
4919 * Makefile.in: Update ax.c and IPA dependencies.
4920
4921 2012-02-24 Pedro Alves <palves@redhat.com>
4922
4923 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4924 (cmd_bigqtbuffer_circular): ... this. Only handle
4925 'QTBuffer:circular:'.
4926 (handle_tracepoint_general_set): Adjust.
4927
4928 2012-02-16 Yao Qi <yao@codesourcery.com>
4929
4930 * inferiors.c: Move code to ...
4931 * dll.c: .... here. New.
4932 * server.h: Declare clear_dlls.
4933 * Makefile.in (SFILES): Add dll.c.
4934 (OBS): Add dll.o
4935 (dll.o): New rule.
4936
4937 2012-02-11 Yao Qi <yao@codesourcery.com>
4938
4939 * server.c: (handle_monitor_command): Add a new parameter
4940 `own_buf'.
4941 (handle_query): Update caller.
4942
4943 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4944
4945 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4946 * configure, config.in: Regenerate.
4947 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4948 is not defined.
4949
4950 2012-02-02 Pedro Alves <palves@redhat.com>
4951
4952 Try SIGKILL first, then PTRACE_KILL.
4953 * linux-low.c (linux_kill_one_lwp): New.
4954 (linux_kill_one_lwp): Rename to ...
4955 (kill_one_lwp_callback): ... this. Use the new
4956 linux_kill_one_lwp.
4957
4958 2012-02-02 Pedro Alves <palves@redhat.com>
4959
4960 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4961 inferior.
4962
4963 2012-01-27 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4966 (elf_64_file_p): Make static.
4967 (linux_pid_exe_is_elf_64_file): New.
4968 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4969 Delete declarations.
4970 (linux_pid_exe_is_elf_64_file): Declare.
4971 * linux-x86-low.c (x86_arch_setup): Use
4972 linux_pid_exe_is_elf_64_file.
4973
4974 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4975
4976 * linux-low.c (linux_wait_for_event_1): Rename to ...
4977 (linux_wait_for_event): ... here and merge it with former
4978 linux_wait_for_event - new variable wait_ptid, use it.
4979 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4980
4981 2012-01-23 Pedro Alves <palves@redhat.com>
4982
4983 * server.c (main): Avoid yet another case of infinite loop while
4984 detaching/killing after a longjmp.
4985
4986 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4987
4988 Code cleanup.
4989 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4990
4991 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4992
4993 * hostio.c (handle_readlink): New function.
4994 (handle_vFile): Call it to handle "vFile:readlink" packets.
4995
4996 2012-01-20 Pedro Alves <palves@redhat.com>
4997 Ulrich Weigand <ulrich.weigand@linaro.org>
4998
4999 * server.c (handle_v_requests): Only support vAttach and vRun to
5000 start multiple processes when in extended protocol mode.
5001
5002 2012-01-17 Pedro Alves <palves@redhat.com>
5003
5004 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5005 memalign plus mprotect to allocate the scratch buffer.
5006
5007 2012-01-13 Pedro Alves <palves@redhat.com>
5008
5009 * server.c (attach_inferior): Clear `cont_thread'.
5010
5011 2012-01-13 Pedro Alves <palves@redhat.com>
5012
5013 * server.c (main): Avoid infinite loop while detaching/killing
5014 after a longjmp.
5015
5016 2012-01-09 Doug Evans <dje@google.com>
5017
5018 * server.c (start_inferior): Set last_ptid in --wrapper case.
5019
5020 2012-01-06 Yao Qi <yao@codesourcery.com>
5021
5022 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5023 defined.
5024 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5025
5026 2012-01-04 Yao Qi <yao@codesourcery.com>
5027
5028 * tracepoint.c (cmd_qtdp): Print debug message
5029 for static tracepoint.
5030
5031 2012-01-04 Yao Qi <yao@codesourcery.com>
5032
5033 * tracepoint.c (trace_vdebug): Differentiate debug message
5034 between gdbserver and IPA.
5035
5036 2012-01-03 Yao Qi <yao@codesourcery.com>
5037
5038 * tracepoint.c (tracepoint_was_hit): Don't collect for
5039 static tracepoint.
5040
5041 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5042
5043 * terminal.h: Reformat copyright header.
5044
5045 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5046
5047 * server.c (gdbserver_version): Update copyright year.
5048 * gdbreplay.c (gdbreplay_version): Likewise.
5049
5050 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5051
5052 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5053
5054 Revert:
5055 2011-12-18 Hui Zhu <teawater@gmail.com>
5056 * linux-low.c (linux_create_inferior): Save return value to ret.
5057
5058 2011-12-18 Hui Zhu <teawater@gmail.com>
5059
5060 * linux-low.c (linux_create_inferior): Save return value to ret.
5061
5062 2011-12-16 Doug Evans <dje@google.com>
5063
5064 * linux-low.c (linux_create_inferior): If stdio connection,
5065 redirect stdin from /dev/null, stdout to stderr.
5066 * remote-utils.c (remote_is_stdio): New static global.
5067 (remote_connection_is_stdio): New function.
5068 (remote_prepare): Handle stdio connection.
5069 (remote_open): Ditto.
5070 (remote_close): Don't close stdin for stdio connections.
5071 (read_prim,write_prim): New functions. Replace all calls to
5072 read/write to these.
5073 * server.c (main): Watch for "-" argument. Move call to
5074 remote_prepare before start_inferior.
5075 * server.h (STDIO_CONNECTION_NAME): New macro.
5076 (remote_connection_is_stdio): Declare.
5077
5078 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5079 in debugging output.
5080
5081 2011-12-15 Yao Qi <yao@codesourcery.com>
5082
5083 * tracepoint.c: Include sys/syscall.h.
5084 (gdb_ust_thread): Remove preprocessor conditional.
5085
5086 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5087
5088 * linux-low.c (linux_detach_one_lwp): Call
5089 the_low_target.prepare_to_resume before detaching.
5090
5091 2011-12-14 Yao Qi <yao@codesourcery.com>
5092
5093 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5094 of write.
5095
5096 2011-12-14 Yao Qi <yao@codesourcery.com>
5097
5098 * i386-low.c (i386_low_stopped_data_address): Initialize local
5099 variable `control'.
5100
5101 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5102
5103 PR remote/13492
5104
5105 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5106 DR_CONTROL unless necessary. Extend comments.
5107 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5108 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5109
5110 2011-12-13 Yao Qi <yao@codesourcery.com>
5111
5112 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5113 macros.
5114 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5115
5116 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5117
5118 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5119 Print new debug message for such case.
5120
5121 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5122
5123 Fix overlapping memcpy.
5124 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5125 the read_inferior_memory transfer.
5126 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5127 write_inferior_memory transfer.
5128 (set_fast_tracepoint_jump): New variable buf. Use it for the
5129 read_inferior_memory and write_inferior_memory transfers.
5130 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5131 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5132 Use it for the write_inferior_memory transfer.
5133 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5134 buffers.
5135
5136 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5137
5138 * linux-low.c (fetch_register, store_register): Make code
5139 consistent, fix formatting.
5140
5141 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5142
5143 * linux-low.c (usr_store_inferior_registers): Factor out code
5144 to handle individual registers into...
5145 (store_register): ... this new function.
5146
5147 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5148
5149 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5150 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5151 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5152 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5153 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5154 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5155 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5156 (srv_xmlfiles): Add new XML files.
5157
5158 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5159 and <sys/uio.h>.
5160 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5161 (init_registers_s390_linux32v1): Add prototype.
5162 (init_registers_s390_linux32v2): Likewise.
5163 (init_registers_s390_linux64v1): Likewise.
5164 (init_registers_s390_linux64v2): Likewise.
5165 (init_registers_s390x_linux64v1): Likewise.
5166 (init_registers_s390x_linux64v2): Likewise.
5167 (s390_num_regs): Increment to 52.
5168 (s390_regmap): Add orig_r2 register.
5169 (s390_num_regs_3264): Increment to 68.
5170 (s390_regmap_3264): Add orig_r2 register.
5171 (s390_collect_ptrace_register): Handle orig_r2 register.
5172 (s390_supply_ptrace_register): Likewise.
5173 (s390_fill_last_break): New function.
5174 (s390_store_last_break): Likewise.
5175 (s390_fill_system_call): New function.
5176 (s390_store_system_call): Likewise.
5177 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5178 register sets.
5179 (s390_check_regset): New function.
5180 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5181 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5182 Update target_regsets for available register sets.
5183
5184 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5185 Jan Kratochvil <jan.kratochvil@redhat.com>
5186
5187 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5188 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5189 New.
5190 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5191 * linux-low.h (struct process_info_private): New member r_debug.
5192 * server.c (handle_qxfer_libraries): Call
5193 the_target->qxfer_libraries_svr4.
5194 (handle_qxfer_libraries_svr4): New function.
5195 (qxfer_packets): New entry "libraries-svr4".
5196 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5197 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5198 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5199 PACKET_qXfer_libraries_svr4.
5200
5201 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5202
5203 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5204 PSW address/mask between 8-byte and 16-byte formats.
5205 (s390_supply_ptrace_register): Likewise.
5206 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5207 basic addressing mode bit.
5208
5209 2011-11-24 Stan Shebs <stan@codesourcery.com>
5210
5211 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5212
5213 2011-11-17 Stan Shebs <stan@codesourcery.com>
5214
5215 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5216 (tracing_start_time): New global.
5217 (tracing_stop_time): New global.
5218 (tracing_user_name): New global.
5219 (tracing_notes): New global.
5220 (tracing_stop_note): New global.
5221 (cmd_qtstart): Set traceframe_usage, start_time.
5222 (stop_tracing): Set stop_time.
5223 (cmd_qtstatus): Report additional status.
5224 (cmd_qtp): New function.
5225 (handle_tracepoint_query): Call it.
5226 (cmd_qtnotes): New function.
5227 (handle_tracepoint_general_set): Call it.
5228 (get_timestamp): Rename from tsv_get_timestamp.
5229
5230 2011-11-14 Stan Shebs <stan@codesourcery.com>
5231 Kwok Cheung Yeung <kcy@codesourcery.com>
5232
5233 * linux-x86-low.c (small_jump_insn): New.
5234 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5235 trampoline and error message, build a trampoline and issue a small
5236 jump instruction to it.
5237 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5238 trampoline and error message.
5239 (x86_get_min_fast_tracepoint_insn_len): New.
5240 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5241 * linux-low.h (struct linux_target_ops): Add arguments to
5242 install_fast_tracepoint_jump_pad operation, add new operation.
5243 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5244 arguments.
5245 (linux_get_min_fast_tracepoint_insn_len): New function.
5246 (linux_target_op): Add new operation.
5247 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5248 (gdb_trampoline_buffer_end): Ditto.
5249 (gdb_trampoline_buffer_error): Ditto.
5250 (struct ipa_sym_addresses): Add fields for new IPA variables.
5251 (symbol_list): Add entries for new IPA variables.
5252 (struct tracepoint): Add fields to hold the address range of the
5253 trampoline used by the tracepoint.
5254 (trampoline_buffer_head): New static variable.
5255 (trampoline_buffer_tail): Ditto.
5256 (claim_trampoline_space): New function.
5257 (have_fast_tracepoint_trampoline_buffer): New function.
5258 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5259 structure.
5260 (install_fast_tracepoint): Ditto, also add error buffer argument.
5261 (cmd_qtminftpilen): New function.
5262 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5263 (fast_tracepoint_from_trampoline_address): New function.
5264 (fast_tracepoint_collecting): Handle trampoline as part of jump
5265 pad space.
5266 (set_trampoline_buffer_space): New function.
5267 (initialize_tracepoint): Initialize new IPA variables.
5268 * target.h (struct target_ops): Add arguments to
5269 install_fast_tracepoint_jump_pad operation, add new
5270 get_min_fast_tracepoint_insn_len operation.
5271 (target_get_min_fast_tracepoint_insn_len): New.
5272 (install_fast_tracepoint_jump_pad): Add arguments.
5273 * server.h (IPA_BUFSIZ): Define.
5274 * linux-i386-ipa.c: Include extra header files.
5275 (initialize_fast_tracepoint_trampoline_buffer): New function.
5276 (initialize_low_tracepoint): Call it.
5277 * server.h (set_trampoline_buffer_space): Declare.
5278 (claim_trampoline_space): Ditto.
5279 (have_fast_tracepoint_trampoline_buffer): Ditto.
5280
5281 2011-11-14 Yao Qi <yao@codesourcery.com>
5282
5283 * server.c (handle_query): Handle InstallInTrace for qSupported.
5284 * tracepoint.c (add_tracepoint): Sort list.
5285 (install_tracepoint, download_tracepoint): New.
5286 (cmd_qtdp): Call them to install and download tracepoints.
5287 (sort_tracepoints): Removed.
5288 (cmd_qtstart): Update.
5289
5290 2011-11-14 Yao Qi <yao@codesourcery.com>
5291
5292 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5293 * mem-break.h: Declare.
5294 * tracepoint.c (cmd_qtstart): Move some code to ...
5295 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5296 New.
5297 (download_tracepoints): Move some code to ...
5298 (download_tracepoint_1): ... here. New.
5299
5300 2011-11-08 Yao Qi <yao@codesourcery.com>
5301
5302 * remote-utils.c (relocate_instruction): A comment fix.
5303
5304 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5305
5306 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5307 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5308 dr_status_mirror and dr_control_mirror from debug_reg_state.
5309 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5310 (i386_initial_stuff): Remove use of deleted globals.
5311 (i386_get_thread_context, i386_set_thread_context,
5312 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5313 from debug_reg_state.
5314
5315 2011-11-05 Yao Qi <yao@codesourcery.com>
5316
5317 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5318 address as TPOINT's.
5319
5320 2011-11-02 Stan Shebs <stan@codesourcery.com>
5321
5322 * tracepoint.c (agent_mem_read_string): New function.
5323 (eval_agent_expr): Call it for tracenz.
5324 * server.c (handle_query): Report support for tracenz.
5325
5326 2011-11-02 Yao Qi <yao@codesourcery.com>
5327
5328 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5329
5330 2011-11-02 Yao Qi <yao@codesourcery.com>
5331
5332 * target.h: Fix a typo in comment.
5333
5334 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5335
5336 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5337 clobber the breakpoints' shadows with fast tracepoint jumps.
5338 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5339 * target.c (write_inferior_memory): Also pass MYADDR down to
5340 check_mem_write.
5341
5342 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5343
5344 * configure.ac: Check support for personality routine.
5345 * configure: Regenerate.
5346 * config.in: Likewise.
5347 * linux-low.c: Include <sys/personality.h>.
5348 Define ADDR_NO_RANDOMIZE if necessary.
5349 (linux_create_inferior): Disable address space randomization when
5350 forking inferior, if requested.
5351 (linux_supports_disable_randomization): New function.
5352 (linux_target_ops): Install it.
5353 * server.h (disable_randomization): Declare.
5354 * server.c (disable_randomization): New global variable.
5355 (handle_general_set): Handle QDisableRandomization.
5356 (handle_query): Likewise for qSupported.
5357 (main): Support --disable-randomization and --no-disable-randomization
5358 command line arguments.
5359 * target.h (struct target_ops): Add supports_disable_randomization.
5360 (target_supports_disable_randomization): New macro.
5361
5362 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5363
5364 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5365 ifdef check.
5366 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5367 [!PT_GETDSBT] (target_loadmap): New definition.
5368 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5369 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5370 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5371 and PT_GETDSBT to LINUX_LOADMAP.
5372 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5373 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5374
5375 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5376
5377 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5378 (arm_linux_hwbp_cap): New static variable.
5379 (arm_linux_get_hwbp_cap): Replace by ...
5380 (arm_linux_init_hwbp_cap): ... this new function.
5381 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5382 (arm_linux_get_hw_watchpoint_count): Likewise.
5383 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5384 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5385 (arm_prepare_to_resume): Use perror_with_name instead of error.
5386
5387 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5388
5389 * linux-arm-low.c: Include <signal.h>.
5390 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5391 (struct arm_linux_hwbp_cap): New data type.
5392 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5393 (struct arm_linux_hw_breakpoint): New data type.
5394 (MAX_BPTS, MAX_WPTS): Define.
5395 (struct arch_process_info, struct arch_lwp_info): New data types.
5396 (arm_linux_get_hwbp_cap): New function.
5397 (arm_linux_get_hw_breakpoint_count): Likewise.
5398 (arm_linux_get_hw_watchpoint_count): Likewise.
5399 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5400 (arm_hwbp_control_initialize): Likewise.
5401 (arm_hwbp_control_is_enabled): Likewise.
5402 (arm_hwbp_control_is_initialized): Likewise.
5403 (arm_hwbp_control_disable): Likewise.
5404 (arm_linux_hw_breakpoint_equal): Likewise.
5405 (arm_linux_hw_point_initialize): Likewise.
5406 (struct update_registers_data): New data structure.
5407 (update_registers_callback: New function.
5408 (arm_insert_point): Likewise.
5409 (arm_remove_point): Likewise.
5410 (arm_stopped_by_watchpoint): Likewise.
5411 (arm_stopped_data_address): Likewise.
5412 (arm_new_process): Likewise.
5413 (arm_new_thread): Likewise.
5414 (arm_prepare_to_resume): Likewise.
5415 (the_low_target): Register arm_insert_point, arm_remove_point,
5416 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5417 arm_new_thread, and arm_prepare_to_resume.
5418
5419 2011-09-15 Stan Shebs <stan@codesourcery.com>
5420
5421 * server.h (struct emit_ops): Add compare-goto fields.
5422 * tracepoint.c (gdb_agent_op_sizes): New table.
5423 (emit_eq_goto): New function.
5424 (emit_ne_goto): New function.
5425 (emit_lt_goto): New function.
5426 (emit_le_goto): New function.
5427 (emit_gt_goto): New function.
5428 (emit_ge_goto): New function.
5429 (is_goto_target): New function.
5430 (compile_bytecodes): Recognize special cases of compare-goto
5431 combinations and call specialized emitters for them.
5432 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5433 (amd64_emit_ne_goto): New function.
5434 (amd64_emit_lt_goto): New function.
5435 (amd64_emit_le_goto): New function.
5436 (amd64_emit_gt_goto): New function.
5437 (amd64_emit_ge_goto): New function.
5438 (amd64_emit_ops): Add the new functions.
5439 (i386_emit_eq_goto): New function.
5440 (i386_emit_ne_goto): New function.
5441 (i386_emit_lt_goto): New function.
5442 (i386_emit_le_goto): New function.
5443 (i386_emit_gt_goto): New function.
5444 (i386_emit_ge_goto): New function.
5445 (i386_emit_ops): Add the new functions.
5446
5447 2011-09-08 Stan Shebs <stan@codesourcery.com>
5448
5449 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5450 (i386_emit_epilogue): Restore %ebx.
5451
5452 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5453
5454 * server.c (step_thread): Remove definition.
5455 (process_serial_event): Don't handle Hs.
5456 * server.h (step_thread): Remove declaration.
5457 * target.c (set_desired_inferior): Remove use of step_thread.
5458
5459 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5460
5461 * linux-low.c: Include linux-procfs.h.
5462 (linux_attach_lwp_1): Update comments.
5463 (linux_attach): Scan for existing threads when attaching to a
5464 process that is the tgid.
5465 * Makefile.in: Update dependencies.
5466
5467 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5468
5469 * configure.srv: Add linux-procfs.o dependencies.
5470
5471 2011-08-14 Yao Qi <yao@codesourcery.com>
5472
5473 * target.h (struct target_ops): Fix indent.
5474 * win32-low.c (win32_target_ops): Fix comment.
5475
5476 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5477 Yao Qi <yao@codesourcery.com>
5478
5479 * Makefile.in (clean): Remove tic6x-*.c files.
5480 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5481 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5482 (tic6x-c64xp-linux.c): Likewise.
5483 * configure.srv: Add support for tic6x-*-uclinux.
5484 * linux-tic6x-low.c: New.
5485 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5486
5487 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5488 Yao Qi <yao@codesourcery.com>
5489
5490 * target.h (struct target_ops): Add read_loadmap.
5491 * linux-low.c (struct target_loadseg): New type.
5492 (struct target_loadmap): New type.
5493 (linux_read_loadmap): New function.
5494 (linux_target_ops): Add linux_read_loadmap.
5495 * server.c (handle_query): Support qXfer:fdpic:read packet.
5496 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5497 to NULL.
5498
5499 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5500
5501 * win32-low.c: Include <stdint.h>.
5502
5503 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5504
5505 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5506 to the inferior here.
5507 (i386_remove_aligned_watchpoint): Ditto.
5508 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5509 fit part of the watchpoint in the debug registers.
5510 (i386_update_inferior_debug_regs): New.
5511 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5512 registers, and only update the inferior on success.
5513 (i386_low_remove_watchpoint): Ditto.
5514
5515 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5516
5517 * linux-low.c (compare_ints, unique, list_threads, show_process,
5518 linux_core_of_thread): Delete.
5519 (linux_target_ops): Change linux_core_of_thread to
5520 linux_common_core_of_thread.
5521 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5522 * utils.c (malloc_failure): Change type of argument.
5523 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5524 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5525 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5526 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5527 (IPA_OBJS): Add common-utils-ipa.o.
5528 (ptid_h, linux_osdata_h): New macros.
5529 (server_h): Add common/common-utils.h, common/xml-utils.h,
5530 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5531 common/ptid.h.
5532 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5533 ptid.o, buffer.o): New rules.
5534 (linux-low.o): Add common/linux-osdata.h as a dependency.
5535 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5536 * configure.ac: Add AC_HEADER_DIRENT check.
5537 * config.in: Regenerate.
5538 * configure: Regenerate.
5539 * remote-utils.c (xml_escape_text): Delete.
5540 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5541 buffer_xml_printf): Move to common/buffer.c.
5542 * server.c (main): Remove call to initialize_inferiors.
5543 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5544 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5545 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5546 internal_error, gdb_assert, gdb_assert_fail): Delete.
5547 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5548 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5549 common/buffer.h.
5550 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5551 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5552 initialize_inferiors): Delete.
5553
5554 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5555
5556 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5557 symbol error.
5558
5559 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5560
5561 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5562 assertion.
5563 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5564
5565 2011-05-26 Yao Qi <yao@codesourcery.com>
5566
5567 * Makefile.in (thread-db.o): Track dependence to
5568 common/gdb_thread_db.h.
5569 * thread-db.c: include gdb_thread_db.h from right place.
5570
5571 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5572
5573 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5574 __FILE__ and __LINE__ to internal_error.
5575
5576 2011-05-13 Doug Evans <dje@google.com>
5577
5578 * thread-db.c (try_thread_db_load_from_sdir): New function.
5579 (try_thread_db_load_from_dir): New function.
5580 (thread_db_load_search): Handle $sdir, ignore $pdir.
5581 Remove trying of system directories if search of
5582 libthread-db-search-path fails, that is now done via $sdir.
5583
5584 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5585
5586 * server.c (handle_query): Add EnableDisableTracepoints to the list
5587 of supported features.
5588 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5589 tracepoints.
5590 (cmd_qtenable_disable): New.
5591 (cmd_qtstart): Install tracepoints even if disabled.
5592 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5593 receiving a QTEnable or QTDisable packet.
5594 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5595 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5596 tracepoints.
5597 (gdb_probe): Skip data collection if static tracepoint is disabled.
5598
5599 2011-05-10 Doug Evans <dje@google.com>
5600
5601 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5602
5603 2011-05-04 Doug Evans <dje@google.com>
5604
5605 * linux-low.c (linux_join): Skip process lookup.
5606 * spu-low.c (spu_join): Ditto.
5607 * server.c (join_inferiors_callback): Delete.
5608 (process_serial_event): For 'D' packet (detach) call join_inferior
5609 directly.
5610
5611 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5612
5613 * README: Don't mention xscale*-*-linux*.
5614 * configure.srv (xscale*-*-linux*): Don't handle target.
5615
5616 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5617
5618 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5619 casting pointers.
5620 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5621 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5622 (i386_emit_void_call_2): Likewise.
5623
5624 2011-04-26 Yao Qi <yao@codesourcery.com>
5625
5626 * linux-low.c: Move common macros to linux-ptrace.h.
5627 Include linux-ptrace.h.
5628 * Makefile.in (linux_ptrace_h): New.
5629 (linux-low.o): Depends on linux-ptrace.h.
5630
5631 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5632
5633 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5634 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5635 (remote_prepare): New function with most of the TCP code from ...
5636 (remote_open): ... here. Detect PORT here unconditionally. Move also
5637 setting transport_is_reliable.
5638 * server.c (run_once): New variable.
5639 (gdbserver_usage): Document it.
5640 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5641 the first run if RUN_ONCE.
5642 * server.h (run_once, remote_prepare): New declarations.
5643
5644 2011-04-19 Tom Tromey <tromey@redhat.com>
5645
5646 * win32-low.c (handle_load_dll): Remove duplicate "the".
5647
5648 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5649
5650 Remove support for old Cygwin 1.5 versions.
5651 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5652 function to avoid warning.
5653 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5654 warning.
5655
5656 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5657
5658 * gdbserver/server.h (Macro _): Define it if not available.
5659
5660 2011-03-14 Michael Snyder <msnyder@vmware.com>
5661
5662 * hostio.c (handle_close): Remove unnecessary null test.
5663
5664 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5665
5666 * Makefile.in (maintainer-clean realclean distclean): Remove
5667 "make ... subdir_do" command.
5668
5669 2011-03-10 Michael Snyder <msnyder@vmware.com>
5670
5671 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5672
5673 * server.c (handle_v_run): Free alloced buffer on early return.
5674
5675 2011-03-09 Yao Qi <yao@codesourcery.com>
5676
5677 Revert:
5678 2011-03-04 Yao Qi <yao@codesourcery.com>
5679
5680 * Makefile.in: Remove GNU make feature --directory.
5681
5682 2011-03-05 Yao Qi <yao@codesourcery.com>
5683
5684 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5685 (subdir_do): New make target. Copied from gdb/Makefile.
5686 (maintainer-clean, realclean, distclean, clean): Call corresponding
5687 make targets in common/Makefile.
5688
5689 2011-02-11 Yao Qi <yao@codesourcery.com>
5690
5691 * configure.ac: Call AC_PROG_RANLIB.
5692 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5693 * configure: Regenerate.
5694
5695 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5696
5697 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5698
5699 2011-03-06 Yao Qi <yao@codesourcery.com>
5700
5701 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5702
5703 2011-03-05 Yao Qi <yao@codesourcery.com>
5704
5705 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5706 (subdir_do): New make target. Copied from gdb/Makefile.
5707 (maintainer-clean, realclean, distclean, clean): Call corresponding
5708 make targets in common/Makefile.
5709
5710 2011-03-04 Yao Qi <yao@codesourcery.com>
5711
5712 * Makefile.in: Remove GNU make feature --directory.
5713
5714 2011-03-04 Michael Snyder <msnyder@vmware.com>
5715
5716 * server.c (queue_stop_reply): Call xmalloc not malloc.
5717
5718 2011-03-02 Michael Snyder <msnyder@vmware.com>
5719
5720 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5721
5722 2011-02-28 Michael Snyder <msnyder@vmware.com>
5723
5724 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5725 (cmd_qtframe): Ditto.
5726 (cmd_qtbuffer): Ditto.
5727 (cmd_bigqtbuffer): Ditto.
5728
5729 * utils.c (decimal2str): Initialize 'width' to nine, then
5730 don't mess with it.
5731
5732 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5733
5734 * hostio.c (require_data): Free *data, not data.
5735
5736 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5737
5738 * hostio.c (require_data): Use free, not xfree.
5739
5740 2011-02-27 Michael Snyder <msnyder@vmware.com>
5741
5742 * server.c (handle_query): Discard unused value.
5743
5744 * hostio.c (require_data): Free malloc memory before returning
5745 error.
5746
5747 2011-02-26 Michael Snyder <msnyder@vmware.com>
5748
5749 * linux-low.c (list_threads): Call closedir for dirent.
5750
5751 2011-02-27 Michael Snyder <msnyder@vmware.com>
5752
5753 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5754 a case statement falls through.
5755
5756 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5757
5758 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5759 in comparison.
5760
5761 2011-02-26 Michael Snyder <msnyder@vmware.com>
5762
5763 * utils.c (decimal2str): Eliminate dead code and dead param.
5764 (pulongest): Drop dead param from call to decimal2str.
5765 (plongest): Ditto.
5766
5767 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5768
5769 Revert the following patch (not approved yet):
5770 2011-02-21 Hui Zhu <teawater@gmail.com>
5771 * tracepoint.c (tp_printf): New function.
5772 (eval_agent_expr): Handle gdb_agent_op_printf.
5773
5774 2011-02-21 Hui Zhu <teawater@gmail.com>
5775
5776 * tracepoint.c (tp_printf): New function.
5777 (eval_agent_expr): Handle gdb_agent_op_printf.
5778
5779 2011-02-18 Tom Tromey <tromey@redhat.com>
5780
5781 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5782 (tracepoint.o): Likewise.
5783 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5784 (gdb_agent_op_names): Likewise.
5785
5786 2011-02-18 Tom Tromey <tromey@redhat.com>
5787
5788 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5789 gdb_agent_op_rot>: New constants.
5790 (gdb_agent_op_names): Add pick and roll.
5791 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5792 cases.
5793
5794 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5795
5796 * aclocal.m4: Regenerated with aclocal-1.11.1.
5797
5798 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5799
5800 * server.c (handle_qxfer_traceframe_info): New.
5801 (qxfer_packets): Register "traceframe-info".
5802 (handle_query): Report support for qXfer:traceframe-info:read+.
5803 * tracepoint.c (match_blocktype): New.
5804 (traceframe_find_block_type): Rename to ...
5805 (traceframe_walk_blocks): ... this. Add callback filter argument,
5806 and use it.
5807 (traceframe_find_block_type): New, reimplemented on top of
5808 traceframe_walk_blocks.
5809 (build_traceframe_info_xml): New.
5810 (traceframe_read_info): New.
5811 * server.h (traceframe_read_info): Declare.
5812
5813 2011-02-11 Yao Qi <yao@codesourcery.com>
5814
5815 * configure.ac: Call AC_PROG_RANLIB.
5816 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5817 * configure: Regenerate.
5818
5819 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5820
5821 * server.c (gdb_read_memory): Change return semantics to allow
5822 partial transfers.
5823 (handle_search_memory_1): Adjust.
5824 (process_serial_event) <'m' packet>: Handle partial transfers.
5825 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5826
5827 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5828
5829 * regcache.c (init_register_cache): Initialize
5830 regcache->register_status.
5831 (free_register_cache): Release regcache->register_status.
5832 (regcache_cpy): Copy register_status.
5833 (registers_to_string): Print 'x's for unavailable registers.
5834 (supply_register): Mark the register's status valid or
5835 unavailable, depending on whether a buffer was passed in or not.
5836 (supply_register_zeroed): New.
5837 (supply_regblock): Mark the registers' status valid or
5838 unavailable, depending on whether a buffer was passed in or not.
5839 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5840 (struct regcache): New `register_status' field.
5841 (supply_register_zeroed): Declare.
5842 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5843 supply_register_zeroed, rather than passing a NULL buffer to
5844 supply_register.
5845 * tracepoint.c (fetch_traceframe_registers): Update comment.
5846
5847 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5848
5849 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5850 buffer explicit.
5851
5852 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5853
5854 * server.h (decode_xfer_write): Change prototype.
5855 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5856 and don't extract the annex here.
5857 * server.c (decode_xfer_read): Remove `annex' parameter,
5858 and don't extract the annex here.
5859 (decode_xfer): New.
5860 (struct qxfer): New.
5861 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5862 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5863 (handle_qxfer_statictrace): New functions, abstracted out from
5864 handle_query, and made to use the struct qxfer interface.
5865 (handle_threads_qxfer_proper): Rename to ...
5866 (handle_qxfer_threads_proper): ... this.
5867 (handle_threads_qxfer): Rename to ...
5868 (handle_qxfer_threads): ... this. Adjust.
5869 (qxfer_packets): New array.
5870 (handle_qxfer): New function.
5871 (handle_query): Use handle_qxfer.
5872
5873 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5874
5875 * gdbreplay.c: Shorten lines of >= 80 columns.
5876 * linux-low.c: Ditto.
5877 * linux-ppc-low.c: Ditto.
5878 * linux-s390-low.c: Ditto.
5879 * linux-sparc-low.c: Ditto.
5880 * linux-x86-low.c: Ditto.
5881 * linux-xtensa-low.c: Ditto.
5882 * mem-break.c: Ditto.
5883 * nto-low.c: Ditto.
5884 * regcache.h: Ditto.
5885 * remote-utils.c: Ditto.
5886 * server.c: Ditto.
5887 * server.h: Ditto.
5888 * thread-db.c: Ditto.
5889 * tracepoint.c: Ditto.
5890 * utils.c: Ditto.
5891 * win32-low.h: Ditto.
5892
5893 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5894
5895 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5896 update.
5897
5898 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5899
5900 * server.c (gdbserver_version): Update copyright year in version
5901 output.
5902 * gdbreplay.c (gdbreplay_version): Ditto.
5903
5904 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5905
5906 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5907 * linux-bfin-low.c: New file.
5908 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5909 PT_DATA_ADDR for BFIN targets.
5910 * Makefile.in (SFILES): Add linux-bfin-low.c.
5911 (clean): Remove reg-bfin.c.
5912 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5913 * README: Mention supported Blackfin targets.
5914
5915 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5916
5917 * .gitignore: New file.
5918
5919 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5920
5921 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5922
5923 2010-10-22 Jie Zhang <jie@codesourcery.com>
5924
5925 * Makefile.in: Add FLAGS_TO_PASS variable.
5926 (install): Remove dependency of install-only and recursively
5927 invoke make for install-only.
5928
5929 2010-10-04 Doug Evans <dje@google.com>
5930
5931 * Makefile.in (uninstall): Use $(DESTDIR).
5932
5933 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5934
5935 PR gdb/11842
5936
5937 * linux-x86-low.c (compat_siginfo_from_siginfo)
5938 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5939 si_code is < 0. Check for si_code == SI_TIMER before checking for
5940 si_code < 0.
5941
5942 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5943
5944 * lynx-i386-low.c: New file.
5945 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5946
5947 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5948
5949 * lynx-low.c (ptrace_request_to_str): Remove handling for
5950 request values that have been removed in LynxOS 5.x.
5951
5952 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5953
5954 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5955 <ptrace.h>
5956
5957 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5958
5959 * configure.ac: Add --enable-inprocess-agent option.
5960 * configure: Rebuilt.
5961
5962 2010-09-06 Yao Qi <yao@codesourcery.com>
5963
5964 * linux-low.c (linux_kill): Remove unused variable.
5965 (linux_stabilize_threads): Likewise.
5966 * server.c (start_inferior): Likewise.
5967 (queue_stop_reply_callback): Likewise.
5968 * tracepoint.c (do_action_at_tracepoint): Likewise.
5969
5970 2010-09-06 Yao Qi <yao@codesourcery.com>
5971
5972 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5973 on return.
5974
5975 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5976
5977 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5978
5979 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5980
5981 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5982 "$(IPA_DEPFILES)".
5983
5984 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5985
5986 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5987 gdbserver/lynx-ppc-low.c: New files.
5988 * Makefile.in (lynx_low_h): New variable.
5989 (lynx-low.o, lynx-ppc-low.o): New rules.
5990 * configure.ac: On LynxOS, link with -lnetinet.
5991 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5992 * configure: regenerate.
5993
5994 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5995
5996 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5997 * configure.ac: Add check for vasprintf and vsnprintf.
5998 * configure, config.in: Regenerate.
5999 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6000
6001 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6002
6003 * gdbreplay.c: Move include of alloca.h up, next to include of
6004 malloc.h.
6005 * server.h: Add include of malloc.h.
6006 * mem-break.c: Remove include of malloc.h.
6007 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6008
6009 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6010
6011 * Makefile.in (memmem.o): Build with -Wno-error.
6012
6013 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6014
6015 * utils.c (xsnprintf): Make non-static.
6016 * server.h: Add xsnprintf declaration.
6017 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6018 replace calls to snprintf by calls to xsnprintf throughout.
6019
6020 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6021
6022 * configure.ac: Add configure check for alloca.
6023 * configure, config.in: Regenerate.
6024 * server.h: Include alloca.h if it exists.
6025 * gdbreplay.c: Include alloca.h if it exists.
6026
6027 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6028
6029 * linux-low.c (__SIGRTMIN): Define if not already defined.
6030 (linux_create_inferior): Check for __ANDROID__ rather than
6031 __SIGRTMIN.
6032 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6033 are already deferred.
6034 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6035 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6036 stopped and already has a pending signal to report.
6037 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6038 a pending signal to report or is moving out of a jump pad.
6039 (linux_init_signals): Check for __ANDROID__ rather than
6040 __SIGRTMIN.
6041
6042 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6043
6044 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6045 debug_threads check. Avoid a linear search when not doing debug
6046 output.
6047
6048 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6049
6050 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6051 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6052 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6053 (process_event): Change local fd's type to gdb_fildes_t.
6054 (create_file_handler): Adjust prototype.
6055 (delete_file_handler): Adjust prototype.
6056 (handle_file_event): Adjust prototype. Use pfildes.
6057 (create_file_event): Adjsut prototype.
6058 * remote-utils.c (remote_desc, listen_desc): Change type to
6059 gdb_fildes_t.
6060 * server.h: New gdb_fildes_t typedef.
6061 [USE_WIN32API]: Include winsock2.h.
6062 (delete_file_handler, add_file_handler): Adjust prototypes.
6063 (pfildes): Declare.
6064 * utils.c (pfildes): New.
6065
6066 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6067
6068 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6069 * configure: Regenerate.
6070
6071 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6072
6073 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6074 (linux_done_accessing_memory): ... this.
6075 (linux_target_ops): Adjust.
6076 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6077 * nto-low.c (nto_target_ops): Adjust comment.
6078 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6079 * spu-low.c (spu_target_ops): Adjust comment.
6080 * target.h (target_ops): Rename unprepare_to_access_memory field
6081 to done_accessing_memory.
6082 (unprepare_to_access_memory): Rename to ...
6083 (done_accessing_memory): ... this.
6084
6085 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6086
6087 * linux-low.c (linux_prepare_to_access_memory): New.
6088 (linux_unprepare_to_access_memory): New.
6089 (linux_target_ops): Install them.
6090 * server.c (read_memory): Rename to ...
6091 (gdb_read_memory): ... this. Use
6092 prepare_to_access_memory/prepare_to_access_memory.
6093 (write_memory): Rename to ...
6094 (gdb_write_memory): ... this. Use
6095 prepare_to_access_memory/prepare_to_access_memory.
6096 (handle_search_memory_1): Adjust.
6097 (process_serial_event): Adjust.
6098 * target.h (struct target_ops): New fields
6099 prepare_to_access_memory and unprepare_to_access_memory.
6100 (prepare_to_access_memory, unprepare_to_access_memory): New.
6101 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6102 prepare_to_access_memory/prepare_to_access_memory.
6103 * nto-low.c (nto_target_ops): Adjust.
6104 * spu-low.c (spu_target_ops): Adjust.
6105 * win32-low.c (win32_target_ops): Adjust.
6106
6107 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6108
6109 * Makefile.in (WARN_CFLAGS): Get it from configure.
6110 (WERROR_CFLAGS): New.
6111 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6112 * configure.ac: Introduce --enable-werror, which adds -Werror to
6113 the compiler command line. Enabled by default. Disable with
6114 --disable-werror. Add -Wdeclaration-after-statement
6115 Wpointer-arith and -Wformat-nonliteral to warning flags.
6116 * configure: Regenerate.
6117
6118 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6119
6120 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6121
6122 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6123
6124 * gdbreplay.c (remote_error): New.
6125 (gdbchar): New.
6126 (expect): Use gdbchar. Check for error reading from GDB.
6127 Clarify sync error output.
6128 (play): Check for errors writing to GDB.
6129 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6130 * remote-utils.c (getpkt): Check for errors writing to the remote
6131 descriptor.
6132
6133 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6134
6135 * linux-low.c (linux_wait_1): Move non-debugging code out of
6136 `debug_threads' control.
6137
6138 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6139
6140 * linux-low.c (linux_wait_1): Don't set last_status here.
6141 * server.c (push_event, queue_stop_reply_callback): Assert we're
6142 not pushing a TARGET_WAITKIND_IGNORE event.
6143 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6144 (myresume, handle_target_event): Set the thread's last_resume_kind
6145 and last_status from the target returned status.
6146
6147 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6148
6149 PR threads/10729
6150
6151 * linux-x86-low.c (update_debug_registers_callback): New.
6152 (i386_dr_low_set_addr): Use it.
6153 (i386_dr_low_get_addr): New.
6154 (i386_dr_low_set_control): Use update_debug_registers_callback.
6155 (i386_dr_low_get_control): New.
6156 (i386_dr_low_get_status): Adjust.
6157 * linux-low.c (linux_stop_lwp): New.
6158 * linux-low.h (linux_stop_lwp): Declare.
6159
6160 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6161 argument instead of a i386_debug_reg_state.
6162 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6163 a i386_debug_reg_state.
6164 (i386_insert_aligned_watchpoint): Adjust.
6165 (i386_remove_aligned_watchpoint): Adjust.
6166 (i386_low_stopped_data_address): Read the debug registers from the
6167 inferior instead of from the mirrors.
6168 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6169 (i386_dr_low_get_addr): Declare.
6170 (i386_dr_low_get_control): Declare.
6171 (i386_dr_low_get_status): Change prototype.
6172
6173 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6174 (i386_dr_low_get_addr): New.
6175 (i386_dr_low_get_control): New.
6176 (i386_dr_low_get_status): Adjust prototype. Return
6177 dr_status_mirror.
6178 (i386_initial_stuff): Clear dr_status_mirror and
6179 dr_control_mirror.
6180 (i386_get_thread_context): Adjust.
6181 (i386_set_thread_context): Adjust.
6182 (i386_thread_added): Adjust.
6183
6184 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6185
6186 * linux-low.h (linux_thread_area): Delete declaration.
6187
6188 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6189
6190 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6191 after its termination.
6192
6193 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6194
6195 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6196 (gdb_wants_all_stopped): Delete.
6197 (linux_wait_1): Don't call them.
6198 * server.c (handle_v_cont): Tag all threads as want-stopped.
6199 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6200 stopped as "client-wants-stopped".
6201
6202 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6203
6204 * Makefile.in (signals_h): New.
6205 (server_h): Depend on it.
6206 (server.o): Don't depend on $(signals_def).
6207 (signals.o): Depend on $(signals_def).
6208
6209 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6210
6211 * Makefile.in (signals_def): New.
6212 (server_h): Append include/gdb/signals.h and signals_def.
6213 (server.o): Append signals_def.
6214
6215 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6216
6217 * server.c (handle_target_event): Use target_signal_to_host for
6218 resume_info.sig initialization.
6219 * target.h (struct thread_resume) <sig>: New comment.
6220
6221 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6222
6223 * server.c (handle_query): strcpy() the returned string from paddress()
6224 instead of sprintf().
6225 * utils.c (paddress): Return phex_nz().
6226
6227 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6228
6229 * server.c (handle_v_cont): Call mourn_inferior if process
6230 just exited.
6231 (myresume): Likewise.
6232
6233 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6234
6235 Static tracepoints, and integration with UST.
6236
6237 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6238 * mem-break.c (uninsert_all_breakpoints)
6239 (reinsert_all_breakpoints): New.
6240 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6241 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6242 (gdb_agent_ust_loaded, helper_thread_id)
6243 (gdb_agent_helper_thread_id): New macros.
6244 (struct ipa_sym_addresses): Add addr_ust_loaded,
6245 addr_helper_thread_id, addr_cmd_buf.
6246 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6247 (in_process_agent_loaded_ust): New.
6248 (write_e_ust_not_loaded): New.
6249 (maybe_write_ipa_ust_not_loaded): New.
6250 (struct collect_static_trace_data_action): New.
6251 (enum tracepoint_type) <static_tracepoint>: New.
6252 (struct tracepoint) <handle>: Mention static tracepoints.
6253 (struct static_tracepoint_ctx): New.
6254 (CMD_BUF_SIZE): New.
6255 (add_tracepoint_action): Handle static tracepoint actions.
6256 (unprobe_marker_at): New.
6257 (clear_installed_tracepoints): Handle static tracepoints.
6258 (cmd_qtdp): Handle static tracepoints.
6259 (probe_marker_at): New.
6260 (cmd_qtstart): Handle static tracepoints.
6261 (response_tracepoint): Handle static tracepoints.
6262 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6263 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6264 (get_context_regcache): Handle static tracepoints.
6265 (do_action_at_tracepoint): Handle static tracepoint actions.
6266 (traceframe_find_block_type): Handle static trace data blocks.
6267 (traceframe_read_sdata): New.
6268 (download_tracepoints): Download static tracepoint actions.
6269 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6270 (GDB_PROBE_NAME): New.
6271 (ust_ops): New.
6272 (GET_UST_SYM): New.
6273 (USTF): New.
6274 (dlsym_ust): New.
6275 (ust_marker_to_static_tracepoint): New.
6276 (gdb_probe): New.
6277 (collect_ust_data_at_tracepoint): New.
6278 (gdb_ust_probe): New.
6279 (UNIX_PATH_MAX, SOCK_DIR): New.
6280 (gdb_ust_connect_sync_socket): New.
6281 (resume_thread, stop_thread): New.
6282 (run_inferior_command): New.
6283 (init_named_socket): New.
6284 (gdb_ust_socket_init): New.
6285 (cstr_to_hexstr): New.
6286 (next_st): New.
6287 (first_marker, next_marker): New.
6288 (response_ust_marker): New.
6289 (cmd_qtfstm, cmd_qtsstm): New.
6290 (unprobe_marker_at, probe_marker_at): New.
6291 (cmd_qtstmat, gdb_ust_thread): New.
6292 (gdb_ust_init): New.
6293 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6294 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6295 (ST_REGENTRY): New.
6296 (x86_64_st_collect_regmap): New.
6297 (X86_64_NUM_ST_COLLECT_GREGS): New.
6298 (AMD64_RIP_REGNUM): New.
6299 (supply_static_tracepoint_registers): New.
6300 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6301 (ST_REGENTRY): New.
6302 (i386_st_collect_regmap): New.
6303 (i386_NUM_ST_COLLECT_GREGS): New.
6304 (supply_static_tracepoint_registers): New.
6305 * server.c (handle_query): Handle qXfer:statictrace:read.
6306 <qSupported>: Report support for StaticTracepoints, and
6307 qXfer:statictrace:read features.
6308 * server.h (traceframe_read_sdata)
6309 (supply_static_tracepoint_registers): Declare.
6310 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6311 (unpack_varlen_hex): Include in IPA build.
6312 * Makefile.in (ustlibs, ustinc): New.
6313 (IPA_OBJS): Add remote-utils-ipa.o.
6314 ($(IPA_LIB)): Link -ldl and -lpthread.
6315 (UST_CFLAGS): New.
6316 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6317 * config.in, configure: Regenerate.
6318
6319 2010-06-20 Ian Lance Taylor <iant@google.com>
6320 Pedro Alves <pedro@codesourcery.com>
6321
6322 * linux-x86-low.c (always_true): Delete.
6323 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6324 trying to fool the compiler with always_true.
6325
6326 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6327
6328 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6329 conditions in gdbserver.
6330
6331 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6332
6333 * spu-low.c (spu_read_memory): Wrap around local store limit.
6334 (spu_write_memory): Likewise.
6335
6336 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6337
6338 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6339 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6340 LONGEST uses.
6341 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6342 uses.
6343 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6344 uses with LONGEST uses.
6345
6346 2010-06-14 Stan Shebs <stan@codesourcery.com>
6347 Pedro Alves <pedro@codesourcery.com>
6348
6349 Bytecode compiler.
6350
6351 * linux-x86-low.c: Include limits.h.
6352 (add_insns): New.
6353 (always_true): New.
6354 (EMIT_ASM): New.
6355 (EMIT_ASM32): New.
6356 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6357 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6358 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6359 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6360 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6361 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6362 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6363 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6364 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6365 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6366 (amd64_emit_void_call_2): New.
6367 (amd64_emit_ops): New.
6368 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6369 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6370 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6371 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6372 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6373 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6374 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6375 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6376 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6377 (i386_emit_stack_adjust, i386_emit_int_call_1)
6378 (i386_emit_void_call_2): New.
6379 (i386_emit_ops): New.
6380 (x86_emit_ops): New.
6381 (the_low_target): Install x86_emit_ops.
6382 * server.h (struct emit_ops): New.
6383 (get_raw_reg_func_addr): Declare.
6384 (current_insn_ptr, emit_error): Declare.
6385 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6386 (set_trace_state_variable_value): New defines.
6387 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6388 addr_get_trace_state_variable_value and
6389 addr_set_trace_state_variable_value.
6390 (symbol_list): New fields for get_raw_reg,
6391 get_trace_state_variable_value and set_trace_state_variable_value.
6392 (condfn): New typedef.
6393 (struct tracepoint): New field `compiled_cond'.
6394 (do_action_at_tracepoint): Clear compiled_cond.
6395 (get_trace_state_variable_value, set_trace_state_variable_value):
6396 Export in the IPA.
6397 (condition_true_at_tracepoint): If there's a compiled condition,
6398 run that.
6399 (current_insn_ptr, emit_error): New globals.
6400 (struct bytecode_address): New.
6401 (get_raw_reg_func_addr): New.
6402 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6403 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6404 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6405 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6406 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6407 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6408 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6409 (compile_tracepoint_condition, compile_bytecodes): New.
6410 * target.h (emit_ops): Forward declare.
6411 (struct target_ops): New field emit_ops.
6412 (target_emit_ops): New.
6413 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6414 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6415 * linux-low.c (linux_emit_ops): New.
6416 (linux_target_ops): Install it.
6417 * linux-low.h (struct linux_target_ops): New field emit_ops.
6418
6419 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6420
6421 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6422 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6423
6424 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6425 Stan Shebs <stan@codesourcery.com>
6426
6427 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6428 (all): Depend on $(extra_libraries).
6429 (install-only): Install the IPA.
6430 (IPA_OBJS, IPA_LIB): New.
6431 (clean): Remove the IPA lib.
6432 (IPAGENT_CFLAGS): New.
6433 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6434 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6435 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6436 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6437 * configure.ac: Check for atomic builtins support in the compiler.
6438 (IPA_DEPFILES, extra_libraries): Define.
6439 * configure.srv (ipa_obj): Add description.
6440 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6441 (i[34567]86-*-linux*): Set ipa_obj.
6442 (x86_64-*-linux*): Set ipa_obj.
6443 * linux-low.c (stabilizing_threads): New.
6444 (supports_fast_tracepoints): New.
6445 (linux_detach): Stabilize threads before detaching.
6446 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6447 the lwp is either not stabilizing, or is moving out of a jump pad.
6448 (linux_fast_tracepoint_collecting): New.
6449 (maybe_move_out_of_jump_pad): New.
6450 (enqueue_one_deferred_signal): New.
6451 (dequeue_one_deferred_signal): New.
6452 (linux_wait_for_event_1): If moving out of a jump pad, defer
6453 pending signals to later.
6454 (linux_stabilize_threads): New.
6455 (linux_wait_1): Check if threads need moving out of jump pads, and
6456 do it if so.
6457 (stuck_in_jump_pad_callback): New.
6458 (move_out_of_jump_pad_callback): New.
6459 (lwp_running): New.
6460 (linux_resume_one_lwp): Handle moving out of jump pads.
6461 (linux_set_resume_request): Dequeue deferred signals.
6462 (need_step_over_p): Also step over fast tracepoint jumps.
6463 (start_step_over): Also uninsert fast tracepoint jumps.
6464 (finish_step_over): Also reinsert fast tracepoint jumps.
6465 (linux_install_fast_tracepoint_jump): New.
6466 (linux_target_ops): Install linux_stabilize_threads and
6467 linux_install_fast_tracepoint_jump_pad.
6468 * linux-low.h (linux_target_ops) <get_thread_area,
6469 install_fast_tracepoint_jump_pad>: New fields.
6470 (struct lwp_info) <collecting_fast_tracepoint,
6471 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6472 (linux_get_thread_area): Declare.
6473 * linux-x86-low.c (jump_insn): New.
6474 (x86_get_thread_area): New.
6475 (append_insns): New.
6476 (push_opcode): New.
6477 (amd64_install_fast_tracepoint_jump_pad): New.
6478 (i386_install_fast_tracepoint_jump_pad): New.
6479 (x86_install_fast_tracepoint_jump_pad): New.
6480 (the_low_target): Install x86_get_thread_area and
6481 x86_install_fast_tracepoint_jump_pad.
6482 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6483 (struct fast_tracepoint_jump): New.
6484 (fast_tracepoint_jump_insn): New.
6485 (fast_tracepoint_jump_shadow): New.
6486 (find_fast_tracepoint_jump_at): New.
6487 (fast_tracepoint_jump_here): New.
6488 (delete_fast_tracepoint_jump): New.
6489 (set_fast_tracepoint_jump): New.
6490 (uninsert_fast_tracepoint_jumps_at): New.
6491 (reinsert_fast_tracepoint_jumps_at): New.
6492 (set_breakpoint_at): Use write_inferior_memory.
6493 (uninsert_raw_breakpoint): Use write_inferior_memory.
6494 (check_mem_read): Mask out fast tracepoint jumps.
6495 (check_mem_write): Mask out fast tracepoint jumps.
6496 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6497 (set_fast_tracepoint_jump): Declare.
6498 (delete_fast_tracepoint_jump)
6499 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6500 (reinsert_fast_tracepoint_jumps_at): Declare.
6501 * regcache.c: Don't compile many functions when building the
6502 in-process agent library.
6503 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6504 the register buffer in the heap.
6505 (free_register_cache): If the register buffer isn't owned by the
6506 regcache, don't free it.
6507 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6508 pre-existing register caches.
6509 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6510 type.
6511 (convert_ascii_to_int): : Constify `from' parameter type.
6512 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6513 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6514 the needed buffer in-place.
6515 (relocate_instruction): New.
6516 * server.c (handle_query) <qSymbols>: If the target supports
6517 tracepoints, give it a chance of looking up symbols. Report
6518 support for fast tracepoints.
6519 (handle_status): Stabilize threads.
6520 (process_serial_event): Adjust.
6521 * server.h (struct fast_tracepoint_jump): Forward declare.
6522 (struct process_info) <fast_tracepoint_jumps>: New field.
6523 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6524 (decode_X_packet, decode_M_packet): Adjust.
6525 (relocate_instruction): Declare.
6526 (in_process_agent_loaded): Declare.
6527 (tracepoint_look_up_symbols): Declare.
6528 (struct fast_tpoint_collect_status): Declare.
6529 (fast_tracepoint_collecting): Declare.
6530 (force_unlock_trace_buffer): Declare.
6531 (handle_tracepoint_bkpts): Declare.
6532 (initialize_low_tracepoint)
6533 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6534 * target.h (struct target_ops) <stabilize_threads,
6535 install_fast_tracepoint_jump_pad>: New fields.
6536 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6537 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6538 [HAVE_STDINT_H]: Include stdint.h.
6539 (trace_debug_1): Rename to ...
6540 (trace_vdebug): ... this.
6541 (trace_debug): Rename to ...
6542 (trace_debug_1): ... this. Add `level' parameter.
6543 (trace_debug): New.
6544 (ATTR_USED, ATTR_NOINLINE): New.
6545 (IP_AGENT_EXPORT): New.
6546 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6547 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6548 (about_to_request_buffer_space, trace_buffer_is_full)
6549 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6550 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6551 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6552 (traceframe_write_count, traceframes_created)
6553 (trace_state_variables)
6554 New renaming defines.
6555 (struct ipa_sym_addresses): New.
6556 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6557 (symbol_list): New.
6558 (ipa_sym_addrs): New.
6559 (all_tracepoint_symbols_looked_up): New.
6560 (in_process_agent_loaded): New.
6561 (write_e_ipa_not_loaded): New.
6562 (maybe_write_ipa_not_loaded): New.
6563 (tracepoint_look_up_symbols): New.
6564 (debug_threads) [IN_PROCESS_AGENT]: New.
6565 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6566 (UNKNOWN_SIDE_EFFECTS): New.
6567 (stop_tracing): New.
6568 (flush_trace_buffer): New.
6569 (stop_tracing_bkpt): New.
6570 (flush_trace_buffer_bkpt): New.
6571 (read_inferior_integer): New.
6572 (read_inferior_uinteger): New.
6573 (read_inferior_data_pointer): New.
6574 (write_inferior_data_pointer): New.
6575 (write_inferior_integer): New.
6576 (write_inferior_uinteger): New.
6577 (struct collect_static_trace_data_action): Delete.
6578 (enum tracepoint_type): New.
6579 (struct tracepoint) <type>: New field `type'.
6580 <actions_str, step_actions, step_actions_str>: Only include in
6581 GDBserver.
6582 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6583 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6584 (tracepoints): Use IP_AGENT_EXPORT.
6585 (last_tracepoint): Don't include in the IPA.
6586 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6587 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6588 (alloced_trace_state_variables): New.
6589 (trace_state_variables): Use IP_AGENT_EXPORT.
6590 (traceframe_t): Delete unused variable.
6591 (circular_trace_buffer): Don't include in the IPA.
6592 (trace_buffer_start): Delete.
6593 (struct trace_buffer_control): New.
6594 (trace_buffer_free): Delete.
6595 (struct ipa_trace_buffer_control): New.
6596 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6597 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6598 New.
6599 (trace_buffer_ctrl): New.
6600 (TRACE_BUFFER_CTRL_CURR): New.
6601 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6602 Reimplement as macros.
6603 (trace_buffer_wrap): Delete.
6604 (traceframe_write_count, traceframe_read_count)
6605 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6606 (struct tracepoint_hit_ctx) <type>: New field.
6607 (struct fast_tracepoint_ctx): New.
6608 (memory_barrier): New.
6609 (cmpxchg): New.
6610 (record_tracepoint_error): Update atomically in the IPA.
6611 (clear_inferior_trace_buffer): New.
6612 (about_to_request_buffer_space): New.
6613 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6614 updating the same buffer.
6615 (add_tracepoint): Default the tracepoint's type to trap
6616 tracepoint, and orig_size to -1.
6617 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6618 internal variables.
6619 (create_trace_state_variable): New parameter `gdb'. Handle it.
6620 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6621 (cmd_qtdp): Handle fast tracepoints.
6622 (cmd_qtdv): Adjust.
6623 (max_jump_pad_size): New.
6624 (gdb_jump_pad_head): New.
6625 (get_jump_space_head): New.
6626 (claim_jump_space): New.
6627 (sort_tracepoints): New.
6628 (MAX_JUMP_SIZE): New.
6629 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6630 IPA.
6631 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6632 support. Upload fast traceframes, and delete internal IPA
6633 breakpoints.
6634 (stop_tracing_handler): New.
6635 (flush_trace_buffer_handler): New.
6636 (cmd_qtstop): Upload fast tracepoints.
6637 (response_tracepoint): Handle fast tracepoints.
6638 (tracepoint_finished_step): Upload fast traceframes. Set the
6639 tracepoint hit context's tracepoint type.
6640 (handle_tracepoint_bkpts): New.
6641 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6642 type. Add comment about fast tracepoints.
6643 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6644 non-existing action_str field.
6645 (get_context_regcache): Handle fast tracepoints.
6646 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6647 to the regcache.
6648 (fast_tracepoint_from_jump_pad_address): New.
6649 (fast_tracepoint_from_ipa_tpoint_address): New.
6650 (collecting_t): New.
6651 (force_unlock_trace_buffer): New.
6652 (fast_tracepoint_collecting): New.
6653 (collecting): New.
6654 (gdb_collect): New.
6655 (write_inferior_data_ptr): New.
6656 (target_tp_heap): New.
6657 (target_malloc): New.
6658 (download_agent_expr): New.
6659 (UALIGN): New.
6660 (download_tracepoints): New.
6661 (download_trace_state_variables): New.
6662 (upload_fast_traceframes): New.
6663 (IPA_FIRST_TRACEFRAME): New.
6664 (IPA_NEXT_TRACEFRAME_1): New.
6665 (IPA_NEXT_TRACEFRAME): New.
6666 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6667 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6668 (gdb_jump_pad_buffer_end): New.
6669 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6670 (initialize_tracepoint): Adjust.
6671 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6672 buffer. Initialize the low module.
6673 * utils.c (PREFIX, TOOLNAME): New.
6674 (malloc_failure): Use PREFIX.
6675 (error): In the IPA, an error causes an exit.
6676 (fatal, warning): Use PREFIX.
6677 (internal_error): Use TOOLNAME.
6678 (NUMCELLS): Increase to 10.
6679 * configure, config.in: Regenerate.
6680
6681 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6682
6683 * server.c (handle_query) <qSupported>: Do two passes over the
6684 qSupported string to avoid nesting strtok.
6685
6686 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6687
6688 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6689 (CDEPS): New.
6690 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6691 -Wl,--dynamic-list.
6692 * configure: Regenerate.
6693 * proc-service.list: New.
6694
6695 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6696
6697 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6698 New comment.
6699
6700 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6701
6702 * gdbreplay.c (remote_open): Check error return from socket() call by
6703 its equality to -1 not by it being negative.
6704 * remote-utils.c (remote_open): Likewise.
6705
6706 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6707
6708 * config.h: Regenerate.
6709
6710 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6711
6712 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6713 doesn't provide PTRACE_GET_THREAD_AREA.
6714
6715 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6716
6717 * linux-m68k-low.c: Include <asm/ptrace.h>
6718 (ps_get_thread_area): Implement.
6719
6720 2010-05-03 Doug Evans <dje@google.com>
6721
6722 * event-loop.c (struct callback_event): New struct.
6723 (callback_list): New global.
6724 (append_callback_event, delete_callback_event): New functions.
6725 (process_callback): New function.
6726 (start_event_loop): Call it.
6727 * remote-utils.c (NOT_SCHEDULED): Define.
6728 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6729 moved out of readchar.
6730 (readchar): Rewrite. Call reschedule before returning.
6731 (reset_readchar): New function.
6732 (remote_close): Call it.
6733 (process_remaining, reschedule): New functions.
6734 * server.h (callback_handler_func): New typedef.
6735 (append_callback_event, delete_callback_event): Declare.
6736
6737 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6738
6739 * proc-service.c (ps_pglobal_lookup): Use
6740 thread_db_look_up_one_symbol.
6741 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6742 parameter. Use it instead of all_symbols_looked_up.
6743 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6744 field.
6745 (all_symbols_looked_up): Don't declare.
6746 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6747 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6748 field.
6749 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6750 Set all_symbols_looked_up here.
6751 (thread_db_look_up_one_symbol): New.
6752 (thread_db_get_tls_address): Adjust.
6753 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6754 thread_db object on the heap, and tentatively set it in the
6755 process structure.
6756 (thread_db_init): Don't set all_symbols_looked_up here.
6757 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6758
6759 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6760
6761 * linux-low.c (linux_kill, linux_detach): Adjust.
6762 (status_pending_p_callback): Remove redundant statement. Check
6763 for !TARGET_WAITIKIND_IGNORE, instead of
6764 TARGET_WAITKIND_STOPPED.
6765 (handle_tracepoints): Make sure LWP is locked. Adjust.
6766 (linux_wait_for_event_1): Adjust.
6767 (linux_cancel_breakpoints): New.
6768 (unsuspend_one_lwp): New.
6769 (unsuspend_all_lwps): New.
6770 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6771 (send_sigstop_callback): Change return type to int, add new
6772 `except' parameter and handle it.
6773 (suspend_and_send_sigstop_callback): New.
6774 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6775 pass them down. If SUSPEND, also increment the lwp's suspend
6776 count.
6777 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6778 (need_step_over_p): Don't consider suspended LWPs.
6779 (start_step_over): Adjust.
6780 (proceed_one_lwp): Change return type to int, add new `except'
6781 parameter and handle it.
6782 (unsuspend_and_proceed_one_lwp): New.
6783 (proceed_all_lwps): Use find_inferior instead of
6784 for_each_inferior.
6785 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6786 also decrement the suspend count of LWPs. Pass `except' down,
6787 instead of hacking its suspend count.
6788 (linux_pause_all): Add `freeze' parameter. Adjust.
6789 (linux_unpause_all): New.
6790 (linux_target_ops): Install linux_unpause_all.
6791 * server.c (handle_status): Adjust.
6792 * target.h (struct target_ops): New fields `unpause_all' and
6793 `cancel_breakpoints'. Add new parameter to `pause_all'.
6794 (pause_all): Add new `freeze' parameter.
6795 (unpause_all): New.
6796 (cancel_breakpoints): New.
6797 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6798 cancel breakpoints.
6799 (cmd_qtstart): Pause threads.
6800 (stop_tracing): Pause threads, and cancel breakpoints.
6801 * win32-low.c (win32_target_ops): Adjust.
6802
6803 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6804
6805 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6806 the inferior right away from here...
6807 (linux_wait_1): ... to here, and adjust to check the thread's
6808 last_resume_kind instead of the lwp's step or stop_expected flags.
6809
6810 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6811
6812 * README: Use consistent `GDB' and `GDBserver' spellings.
6813
6814 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6815
6816 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6817 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6818 (linux_detach_one_lwp): Assume the lwp is stopped.
6819 (any_thread_of): Delete.
6820 (linux_detach): Stop all lwps here. Don't blindly delete all
6821 breakpoints.
6822 (delete_lwp_callback): New.
6823 (linux_mourn): Delete all lwps of the process that is gone.
6824 (linux_wait_1): Don't delete the last lwp of the process here.
6825 * mem-break.h (mark_breakpoints_out): Declare.
6826 * mem-break.c (mark_breakpoints_out): New.
6827 (free_all_breakpoints): Use it.
6828 * server.c (handle_target_event): If the process is gone, mark
6829 breakpoints out.
6830 * thread-db.c (struct thread_db) <create_bp>: New field.
6831 (thread_db_enable_reporting): Fix prototype. Store a thread event
6832 breakpoint reference in the thread_db struct.
6833 (thread_db_load_search): Clear the thread_db object.
6834 (try_thread_db_load_1): Ditto.
6835 (switch_to_process): New.
6836 (disable_thread_event_reporting): Use it.
6837 (remove_thread_event_breakpoints): New.
6838 (thread_db_detach, thread_db_mourn): Use it.
6839
6840 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6841
6842 * linux-low.c (linux_enable_event_reporting): New.
6843 (linux_wait_for_event_1, handle_extended_wait): Use it.
6844
6845 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6846
6847 * linux-low.c (linux_kill_one_lwp, linux_kill)
6848 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6849 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6850 SIGSTOP even if the LWP is stopped.
6851 (send_sigstop_callback): New.
6852 (stop_all_lwps): Use send_sigstop_callback instead.
6853 (linux_resume_one_thread): Adjust.
6854 (proceed_one_lwp): Still proceed an LWP that the client has
6855 requested to stop, if we haven't reported it as stopped yet. Make
6856 sure that LWPs the client want stopped, have a pending SIGSTOP.
6857
6858 2010-04-26 Doug Evans <dje@google.com>
6859
6860 * server.c (handle_general_set): Make static.
6861
6862 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6863 Print received char after testing for error/eof instead of before.
6864 (input_interrupt): Tweak comment.
6865
6866 2010-04-23 Doug Evans <dje@google.com>
6867
6868 * server.c (start_inferior): Print inferior argv if --debug.
6869
6870 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6871
6872 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6873 * nto-x86-low.c: Include server.h
6874
6875 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6876
6877 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6878 be consistent with other sources of this directory.
6879 (init_registers_amd64): Correct name of source file of this function
6880 in the comment.
6881
6882 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6883
6884 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6885 64-bit executables.
6886
6887 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6888
6889 * win32-i386-low.c: Add 64-bit support.
6890 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6891 (init_registers_amd64): Declare.
6892 (mappings): Add 64-bit version of array.
6893 (init_windows_x86): New function.
6894 (the_low_target): Change init_arch field to init_windows_x86.
6895
6896 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6897
6898 * win32-low.c: Adapt to support also 64-bit architecture.
6899 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6900 (get_image_name): Use SIZE_T type for local variable `done'.
6901 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6902 (toolhelp_get_dll_name): Idem.
6903 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6904 Use uintptr_t typecast to avoid warning.
6905 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6906 (handle_exception): Use phex_nz to avoid warning.
6907 (win32_wait): Remove unused local variable `process'.
6908
6909 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6910
6911 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6912 `amd64-avx.o'.
6913
6914 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6915
6916 * configure.ac: Use `ws2_32' library for srv_mingw.
6917 * configure: Regenerate.
6918 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6919 * remote-utils.c: Likewise.
6920
6921 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6922
6923 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6924 if __x86_64__ is defined.
6925
6926 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6927
6928 * configure: Regenerate.
6929
6930 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6931
6932 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6933 * target.h (target_ops): New get_tib_address field.
6934 * win32-low.h (win32_thread_info): Add thread_local_base field.
6935 * win32-low.c (child_add_thread): Add tlb argument.
6936 Set thread_local_base field to TLB.
6937 (get_child_debug_event): Adapt to child_add_thread change.
6938 (win32_get_tib_address): New function.
6939 (win32_target_ops): Set get_tib_address field to
6940 win32_get_tib_address.
6941 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6942
6943 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6944
6945 * linux-low.c (linux_mourn): Also remove the process.
6946 * server.c (handle_target_event): Don't remove the process here.
6947 * nto-low.c (nto_mourn): New.
6948 (nto_target_ops): Install it.
6949 * spu-low.c (spu_mourn): New.
6950 (spu_target_ops): Install it.
6951 * win32-low.c (win32_mourn): New.
6952 (win32_target_ops): Install it.
6953
6954 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6955
6956 * server.h (buffer_xml_printf): Remove redundant `;'.
6957
6958 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6959
6960 * regcache.c (set_register_cache): Invalidate regcaches before
6961 changing the register cache layout.
6962 (regcache_invalidate_one): Allow a NULL regcache.
6963 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6964 regcaches before changing the register cache layout or the target
6965 regsets.
6966
6967 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6968
6969 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6970 variable warning on Linux/x86-64.
6971
6972 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6973
6974 GDBserver disconnected tracing support.
6975
6976 * linux-low.c (linux_remove_process): Delete.
6977 (add_lwp): Don't set last_resume_kind here.
6978 (linux_kill): Use `mourn'.
6979 (linux_detach): Use `thread_db_detach', and `mourn'.
6980 (linux_mourn): New.
6981 (linux_attach_lwp_1): Adjust comment.
6982 (linux_attach): last_resume_kind moved the thread_info; adjust.
6983 (status_pending_p_callback): Adjust.
6984 (linux_wait_for_event_1): Adjust.
6985 (count_events_callback, select_singlestep_lwp_callback)
6986 (select_event_lwp_callback, cancel_breakpoints_callback)
6987 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6988 (proceed_one_lwp): Adjust.
6989 (linux_async): Add debug output.
6990 (linux_thread_stopped): New.
6991 (linux_pause_all): New.
6992 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6993 linux_pause_all.
6994 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6995 (thread_db_free): Delete declaration.
6996 (thread_db_detach, thread_db_mourn): Declare.
6997 * thread-db.c (thread_db_init): Use thread_db_mourn.
6998 (thread_db_free): Delete, split in two.
6999 (disable_thread_event_reporting): New.
7000 (thread_db_detach): New.
7001 (thread_db_mourn): New.
7002
7003 * server.h (struct thread_info) <last_resume_kind>: New field.
7004 <attached>: Add comment.
7005 <gdb_detached>: New field.
7006 (handler_func): Change return type to int.
7007 (handle_serial_event, handle_target_event): Ditto.
7008 (gdb_connected): Declare.
7009 (tracing): Delete.
7010 (disconnected_tracing): Declare.
7011 (stop_tracing): Declare.
7012
7013 * server.c (handle_query) <qSupported>: Report support for
7014 disconnected tracing.
7015 (queue_stop_reply_callback): Account for running threads.
7016 (gdb_wants_thread_stopped): New.
7017 (gdb_wants_all_threads_stopped): New.
7018 (gdb_reattached_process): New.
7019 (handle_status): Clear the `gdb_detached' flag of all processes.
7020 In all-stop, stop all threads.
7021 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7022 (process_serial_event): If the remote connection breaks, or if an
7023 exit was forced with "monitor exit", force an event loop exit.
7024 Handle disconnected tracing on detach.
7025 (handle_serial_event): Adjust.
7026 (handle_target_event): If GDB isn't connected, forward events back
7027 to the inferior, unless the last process exited, in which case,
7028 exit gdbserver. Adjust interface.
7029
7030 * remote-utils.c (remote_open): Don't block in accept. Instead
7031 register an event loop source on the listen socket file
7032 descriptor. Refactor bits into ...
7033 (listen_desc): ... this new global.
7034 (gdb_connected): ... this new function.
7035 (enable_async_notification): ... this new function.
7036 (handle_accept_event): ... this new function.
7037 (remote_close): Clear remote_desc.
7038
7039 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7040
7041 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7042 New fields.
7043 (mourn_inferior): Define.
7044 (target_process_qsupported): Avoid the dangling else problem.
7045 (thread_stopped): Define.
7046 (pause_all): Define.
7047 (target_waitstatus_to_string): Declare.
7048 * target.c (target_waitstatus_to_string): New.
7049
7050 * tracepoint.c (tracing): Make extern.
7051 (disconnected_tracing): New.
7052 (stop_tracing): Make extern. Handle tracing stops due to GDB
7053 disconnecting.
7054 (cmd_qtdisconnected): New.
7055 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7056 (handle_tracepoint_general_set): Handle QTDisconnected.
7057
7058 * event-loop.c (event_handler_func): Change return type to int.
7059 (process_event): Bail out if the event handler wants the event
7060 loop to stop.
7061 (handle_file_event): Ditto.
7062 (start_event_loop): Bail out if the event handler wants the event
7063 loop to stop.
7064
7065 * nto-low.c (nto_target_ops): Adjust.
7066 * spu-low.c (spu_wait): Don't remove the process here.
7067 (spu_target_ops): Adjust.
7068 * win32-low.c (win32_wait): Don't remove the process here.
7069 (win32_target_ops): Adjust.
7070
7071 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7072
7073 * regcache.c (realloc_register_cache): Invalidate inferior's
7074 regcache before recreating it.
7075
7076 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7077
7078 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7079
7080 2010-04-09 Stan Shebs <stan@codesourcery.com>
7081 Pedro Alves <pedro@codesourcery.com>
7082
7083 * server.h (LONGEST): New.
7084 (struct thread_info) <while_stepping>: New field.
7085 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7086 Declare.
7087 (initialize_tracepoint, handle_tracepoint_general_set)
7088 (handle_tracepoint_query, tracepoint_finished_step)
7089 (tracepoint_was_hit, release_while_stepping_state_list):
7090 (current_traceframe): Declare.
7091 * server.c (handle_general_set): Handle tracepoint packets.
7092 (read_memory): New.
7093 (write_memory): New.
7094 (handle_search_memory_1): Use read_memory.
7095 (handle_query): Report support for conditional tracepoints, trace
7096 state variables, and tracepoint sources. Handle tracepoint
7097 queries.
7098 (main): Initialize the tracepoints module.
7099 (process_serial_event): Handle traceframe reads/writes.
7100
7101 * linux-low.c (handle_tracepoints): New.
7102 (linux_wait_1): Call it.
7103 (linux_resume_one_lwp): Handle while-stepping.
7104 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7105 (linux_target_ops): Install them.
7106 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7107 New field.
7108 * linux-x86-low.c (x86_supports_tracepoints): New.
7109 (the_low_target). Install it.
7110
7111 * mem-break.h (delete_breakpoint): Declare.
7112 * mem-break.c (delete_breakpoint): Make external.
7113
7114 * target.h (struct target_ops): Add `supports_tracepoints',
7115 `read_pc', and `write_pc' fields.
7116 (target_supports_tracepoints): Define.
7117 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7118 (phex_nz): New.
7119
7120 * regcache.h (struct regcache) <registers_owned>: New field.
7121 (init_register_cache, regcache_cpy): Declare.
7122 (regcache_read_pc, regcache_write_pc): Declare.
7123 (register_cache_size): Declare.
7124 (supply_regblock): Declare.
7125 * regcache.c (init_register_cache): New.
7126 (new_register_cache): Use it.
7127 (regcache_cpy): New.
7128 (register_cache_size): New.
7129 (supply_regblock): New.
7130 (regcache_read_pc, regcache_write_pc): New.
7131
7132 * tracepoint.c: New.
7133
7134 * Makefile.in (OBS): Add tracepoint.o.
7135 (tracepoint.o): New rule.
7136
7137 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7138
7139 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7140 (i386-mmx.o): New.
7141 (i386-mmx.c): Likewise.
7142 (i386-mmx-linux.o): Likewise.
7143 (i386-mmx-linux.c): Likewise.
7144
7145 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7146 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7147 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7148 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7149
7150 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7151 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7152 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7153
7154 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7155
7156 * Makefile.in (clean): Updated.
7157 (i386-avx.o): New.
7158 (i386-avx.c): Likewise.
7159 (i386-avx-linux.o): Likewise.
7160 (i386-avx-linux.c): Likewise.
7161 (amd64-avx.o): Likewise.
7162 (amd64-avx.c): Likewise.
7163 (amd64-avx-linux.o): Likewise.
7164 (amd64-avx-linux.c): Likewise.
7165
7166 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7167 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7168 (srv_amd64_regobj): Add amd64-avx.o.
7169 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7170 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7171 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7172 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7173 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7174 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7175 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7176
7177 * i387-fp.c: Include "i386-xstate.h".
7178 (i387_xsave): New.
7179 (i387_cache_to_xsave): Likewise.
7180 (i387_xsave_to_cache): Likewise.
7181 (x86_xcr0): Likewise.
7182
7183 * i387-fp.h (i387_cache_to_xsave): Likewise.
7184 (i387_xsave_to_cache): Likewise.
7185 (x86_xcr0): Likewise.
7186
7187 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7188 * linux-crisv32-low.c (target_regsets): Likewise.
7189 * linux-m68k-low.c (target_regsets): Likewise.
7190 * linux-mips-low.c (target_regsets): Likewise.
7191 * linux-ppc-low.c (target_regsets): Likewise.
7192 * linux-s390-low.c (target_regsets): Likewise.
7193 * linux-sh-low.c (target_regsets): Likewise.
7194 * linux-sparc-low.c (target_regsets): Likewise.
7195 * linux-xtensa-low.c (target_regsets): Likewise.
7196
7197 * linux-low.c: Include <sys/uio.h>.
7198 (regsets_fetch_inferior_registers): Support nt_type.
7199 (regsets_store_inferior_registers): Likewise.
7200 (linux_process_qsupported): New.
7201 (linux_target_ops): Add linux_process_qsupported.
7202
7203 * linux-low.h (regset_info): Add nt_type.
7204 (linux_target_ops): Add process_qsupported.
7205
7206 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7207 and <sys/uio.h>.
7208 (init_registers_i386_avx_linux): New.
7209 (init_registers_amd64_avx_linux): Likewise.
7210 (xmltarget_i386_linux_no_xml): Likewise.
7211 (xmltarget_amd64_linux_no_xml): Likewise.
7212 (PTRACE_GETREGSET): Likewise.
7213 (PTRACE_SETREGSET): Likewise.
7214 (x86_fill_xstateregset): Likewise.
7215 (x86_store_xstateregset): Likewise.
7216 (use_xml): Likewise.
7217 (x86_linux_update_xmltarget): Likewise.
7218 (x86_linux_process_qsupported): Likewise.
7219 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7220 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7221 init_registers_i386_linux here. Call
7222 x86_linux_update_xmltarget.
7223 (the_low_target): Add x86_linux_process_qsupported.
7224
7225 * server.c (handle_query): Call target_process_qsupported.
7226
7227 * target.h (target_ops): Add process_qsupported.
7228 (target_process_qsupported): New.
7229
7230 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7231
7232 * inferiors.c (add_thread): Set last_status kind to
7233 TARGET_WAITKIND_IGNORE.
7234 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7235 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7236 (linux_wait_1): Move `thread' local definition to block that uses
7237 it. Don't NULL initialize `event_child'.
7238 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7239 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7240 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7241
7242 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7243
7244 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7245 an extended waitstatus, or by a watchpoint.
7246 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7247 thread was stepping or has been stopped by a watchpoint.
7248
7249 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7250
7251 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7252 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7253 of another, then delete the previous, and validate all
7254 breakpoints.
7255 (validate_inserted_breakpoint): New.
7256 (delete_disabled_breakpoints): New.
7257 (validate_breakpoints): New.
7258 (check_mem_read): Validate breakpoints before trusting their
7259 shadow. Delete disabled breakpoints.
7260 (check_mem_write): Validate breakpoints before trusting they
7261 should be inserted. Delete disabled breakpoints.
7262 * mem-break.h (validate_breakpoints):
7263 * server.c (handle_query): Validate breakpoints when we see a
7264 qSymbol query.
7265
7266 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7267
7268 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7269 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7270 if we could tell there's a GDB breakpoint at stop_pc.
7271 (need_step_over_p): Don't do a step over if we find a GDB
7272 breakpoint at the resume PC.
7273
7274 * mem-break.c (struct raw_breakpoint): New.
7275 (enum bkpt_type): New type `gdb_breakpoint'.
7276 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7277 fields. New field `raw'.
7278 (find_raw_breakpoint_at): New.
7279 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7280 breakpoint instead.
7281 (set_breakpoint_at): Adjust.
7282 (delete_raw_breakpoint): New.
7283 (release_breakpoint): New.
7284 (delete_breakpoint): Rename to...
7285 (delete_breakpoint_1): ... this. Add proc parameter. Use
7286 release_breakpoint. Return ENOENT.
7287 (delete_breakpoint): Reimplement.
7288 (find_breakpoint_at): Delete.
7289 (find_gdb_breakpoint_at): New.
7290 (delete_breakpoint_at): Delete.
7291 (set_gdb_breakpoint_at): New.
7292 (delete_gdb_breakpoint_at): New.
7293 (gdb_breakpoint_here): New.
7294 (set_reinsert_breakpoint): Use release_breakpoint.
7295 (uninsert_breakpoint): Rename to ...
7296 (uninsert_raw_breakpoint): ... this.
7297 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7298 (reinsert_raw_breakpoint): Change parameter type to
7299 raw_breakpoint.
7300 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7301 instead.
7302 (check_breakpoints): Adjust. Use release_breakpoint.
7303 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7304 (breakpoint_inserted_here): Ditto.
7305 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7306 Don't trust the breakpoint's shadow if it is not inserted.
7307 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7308 (delete_all_breakpoints): Adjust.
7309 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7310 use delete_breakpoint_1.
7311
7312 * mem-break.h (breakpoints_supported): Delete declaration.
7313 (set_gdb_breakpoint_at): Declare.
7314 (gdb_breakpoint_here): Declare.
7315 (delete_breakpoint_at): Delete.
7316 (delete_gdb_breakpoint_at): Declare.
7317
7318 * server.h (struct raw_breakpoint): Forward declare.
7319 (struct process_info): New field `raw_breakpoints'.
7320
7321 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7322 breakpoints.
7323
7324 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7325
7326 * linux-low.c (status_pending_p_callback): Fix comment.
7327 (linux_wait_for_event_1): Move most of the internal breakpoint
7328 handling from here...
7329 (linux_wait_1): ... to here.
7330 (count_events_callback): New.
7331 (select_singlestep_lwp_callback): New.
7332 (select_event_lwp_callback): New.
7333 (cancel_breakpoints_callback): New.
7334 (select_event_lwp): New.
7335 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7336 priority to all LWPs that have had events that should be reported
7337 to the client. Cancel breakpoints when about to reporting the
7338 event to the client, not while stopping lwps. No longer cancel
7339 finished single-steps here.
7340 (cancel_finished_single_step): Delete.
7341 (cancel_finished_single_steps): Delete.
7342
7343 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7344
7345 * mem-break.c (enum bkpt_type): New.
7346 (struct breakpoint): New field `type'.
7347 (set_breakpoint_at): Change return type to struct breakpoint
7348 pointer. Set type to `other_breakpoint' by default.
7349 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7350 in the breakpoint list.
7351 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7352 (reinsert_breakpoint): Rename to ...
7353 (reinsert_raw_breakpoint): ... this.
7354 (reinsert_breakpoints_at): Adjust.
7355 * mem-break.h (struct breakpoint): Declare.
7356 (set_breakpoint_at): Change return type to struct breakpoint
7357 pointer.
7358
7359 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7360
7361 * server.c (handle_query): Assign, not compare.
7362
7363 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7364
7365 Teach linux gdbserver to step-over-breakpoints.
7366
7367 * linux-low.c (can_hardware_single_step): New.
7368 (supports_breakpoints): New.
7369 (handle_extended_wait): If stopping threads, read the stop pc of
7370 the new cloned LWP.
7371 (get_pc): New.
7372 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7373 low target doesn't support retrieving the PC.
7374 (add_lwp): Set last_resume_kind to resume_continue.
7375 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7376 (linux_attach): Don't clear stop_expected. Set the lwp's
7377 last_resume_kind to resume_stop.
7378 (linux_detach_one_lwp): Don't check for removed breakpoints.
7379 (check_removed_breakpoint): Delete.
7380 (status_pending_p): Rename to ...
7381 (status_pending_p_callback): ... this. Don't check for removed
7382 breakpoints. Don't consider threads that are stopped from GDB's
7383 perspective.
7384 (linux_wait_for_lwp): Always read the stop_pc here.
7385 (cancel_breakpoint): New.
7386 (step_over_bkpt): New global.
7387 (linux_wait_for_event_1): Implement stepping over breakpoints.
7388 (gdb_wants_lwp_stopped): New.
7389 (gdb_wants_all_stopped): New.
7390 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7391 single-step traps here. Store the thread's last reported target
7392 wait status.
7393 (send_sigstop): Don't clear stop_expected. Always set it,
7394 instead.
7395 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7396 (cancel_finished_single_step): New.
7397 (cancel_finished_single_steps): New.
7398 (wait_for_sigstop): Don't cancel finished single-step traps here.
7399 (linux_resume_one_lwp): Don't check for removed breakpoints.
7400 Don't set `step' on non-hardware step archs.
7401 (linux_set_resume_request): Ignore resume_stop requests if already
7402 stopping or stopped. Set the lwp's last_resume_kind.
7403 (resume_status_pending_p): Don't check for removed breakpoints.
7404 (need_step_over_p): New.
7405 (start_step_over): New.
7406 (finish_step_over): New.
7407 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7408 requests. Clear the thread's last reported target waitstatus.
7409 Don't use the `suspended' flag. Don't consider pending breakpoints.
7410 (linux_resume): Start a step-over if necessary.
7411 (proceed_one_lwp): New.
7412 (proceed_all_lwps): New.
7413 (unstop_all_lwps): New.
7414 * linux-low.h (struct lwp_info): Rewrite comment for the
7415 `suspended' flag. Add the `stop_pc' field. Delete the
7416 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7417 Add `'last_resume_kind' and `need_step_over' fields.
7418 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7419 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7420 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7421 (set_raw_breakpoint_at): New.
7422 (set_breakpoint_at): Rewrite to use it.
7423 (reinsert_breakpoint_handler): Delete.
7424 (set_reinsert_breakpoint): New.
7425 (reinsert_breakpoint_by_bp): Delete.
7426 (delete_reinsert_breakpoints): New.
7427 (uninsert_breakpoint): Rewrite.
7428 (uninsert_breakpoints_at): New.
7429 (reinsert_breakpoint): Rewrite.
7430 (reinsert_breakpoints_at): New.
7431 (check_breakpoints): Rewrite.
7432 (breakpoint_here): New.
7433 (breakpoint_inserted_here): New.
7434 (check_mem_read): Adjust.
7435 * mem-break.h (breakpoints_supported, breakpoint_here)
7436 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7437 (reinsert_breakpoint_by_bp): Delete declaration.
7438 (delete_reinsert_breakpoints): Declare.
7439 (reinsert_breakpoint): Delete declaration.
7440 (reinsert_breakpoints_at): Declare.
7441 (uninsert_breakpoint): Delete declaration.
7442 (uninsert_breakpoints_at): Declare.
7443 (check_breakpoints): Adjust prototype.
7444 * server.h: Adjust include order.
7445 (struct thread_info): Declare here. Add a `last_status' field.
7446
7447 2010-03-23 Michael Snyder <msnyder@vmware.com>
7448
7449 * server.c (crc32): New function.
7450 (handle_query): Add handling for 'qCRC:' request.
7451
7452 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7453
7454 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7455 lwp had been stopped by a watchpoint.
7456
7457 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7458
7459 * server.h (internal_error): Declare.
7460 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7461 * utils.c (internal_error): New function.
7462
7463 2010-03-15 Andreas Schwab <schwab@redhat.com>
7464
7465 * configure.srv: Fix typo setting srv_regobj.
7466
7467 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7468
7469 * linux-low.c (fetch_register): Avoid passing a non string literal
7470 format to `error'.
7471 (usr_store_inferior_registers): Ditto.
7472
7473 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7474
7475 * linux-low.c (linux_write_memory): Bail out early if peeking
7476 memory failed.
7477
7478 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7479
7480 * linux-low.h (struct lwp_info): New fields
7481 `stopped_by_watchpoint' and `stopped_data_address'.
7482 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7483 here, and cache them in the lwp object.
7484 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7485 directly.
7486 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7487 field.
7488 (linux_stopped_by_watchpoint): Rewrite.
7489 (linux_stopped_data_address): Rewrite.
7490
7491 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7492
7493 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7494 switching the current inferior, not before.
7495
7496 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7497
7498 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7499 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7500 i386-linux.c and amd64-linux.c.
7501 (reg-i386.o): Removed.
7502 (reg-i386.c): Likewise.
7503 (reg-i386-linux.o): Likewise.
7504 (reg-i386-linux.c): Likewise.
7505 (reg-x86-64.o): Likewise.
7506 (reg-x86-64.c): Likewise.
7507 (reg-x86-64-linux.o): Likewise.
7508 (reg-x86-64-linux.c): Likewise.
7509 (i386.o): New.
7510 (i386.c): Likewise.
7511 (i386-linux.o): Likewise.
7512 (i386-linux.c): Likewise.
7513 (amd64.o): Likewise.
7514 (amd64.c): Likewise.
7515 (amd64-linux.o): Likewise.
7516 (amd64-linux.c): Likewise.
7517
7518 * configure.srv (srv_i386_regobj): New.
7519 (srv_i386_linux_regobj): Likewise.
7520 (srv_amd64_regobj): Likewise.
7521 (srv_amd64_linux_regobj): Likewise.
7522 (srv_i386_32bit_xmlfiles): Likewise.
7523 (srv_i386_64bit_xmlfiles): Likewise.
7524 (srv_i386_xmlfiles): Likewise.
7525 (srv_amd64_xmlfiles): Likewise.
7526 (srv_i386_linux_xmlfiles): Likewise.
7527 (srv_amd64_linux_xmlfiles): Likewise.
7528 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7529 srv_xmlfiles to $srv_i386_xmlfiles.
7530 (i[34567]86-*-mingw32ce*): Likewise.
7531 (i[34567]86-*-mingw*): Likewise.
7532 (i[34567]86-*-nto*): Likewise.
7533 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7534 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7535 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7536 (x86_64-*-linux*): Likewise.
7537
7538 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7539 (init_registers_amd64_linux): New.
7540 (x86_arch_setup): Replace init_registers_x86_64_linux with
7541 init_registers_amd64_linux.
7542
7543 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7544
7545 * configure.ac: Check for libdl. If it is not available link against
7546 static libthread_db.
7547 * configure: Regenerate.
7548
7549 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7550
7551 PR9605
7552
7553 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7554 handing a read watchpoint.
7555 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7556
7557 2010-02-12 Doug Evans <dje@google.com>
7558
7559 * linux-low.c (linux_supports_tracefork_flag): Document.
7560 (linux_look_up_symbols): Add comment.
7561
7562 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7563
7564 * regcache.c (supply_register): Clear regcache if buf is NULL.
7565
7566 2010-02-02 Nicolas Roche <roche@sourceware.org>
7567 Joel Brobecker <brobecker@adacore.com>
7568
7569 * inferiors.c (find_inferior): Add function documentation.
7570 (unloaded_dll): Handle the case where the unloaded dll has not
7571 been previously registered in the dll list.
7572
7573 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7574
7575 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7576 (thumb2_breakpoint): New.
7577 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7578
7579 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7580
7581 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7582 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7583 breakpoints.
7584
7585 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7586
7587 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7588
7589 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7590
7591 * linux-s390-low.c (s390_collect_ptrace_register)
7592 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7593
7594 2010-01-21 Doug Evans <dje@google.com>
7595
7596 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7597 (PTRACE_ARG4_TYPE): New macro.
7598 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7599 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7600 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7601 (usr_store_inferior_registers): Ditto.
7602 (linux_read_memory, linux_write_memory): Ditto.
7603 (linux_test_for_tracefork): Ditto.
7604
7605 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7606 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7607
7608 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7609
7610 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7611 target.
7612
7613 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7614
7615 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7616 prototype to take a regcache. Adjust.
7617
7618 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7619
7620 * regcache.h (struct thread_info): Forward declare.
7621 (struct regcache): New.
7622 (new_register_cache): Adjust prototype.
7623 (get_thread_regcache): Declare.
7624 (free_register_cache): Adjust prototype.
7625 (registers_to_string, registers_from_string): Ditto.
7626 (supply_register, supply_register_by_name, collect_register)
7627 (collect_register_as_string, collect_register_by_name): Ditto.
7628 * regcache.c (struct inferior_regcache_data): Delete.
7629 (get_regcache): Rename to ...
7630 (get_thread_regcache): ... this. Adjust. Switch inferior before
7631 fetching registers.
7632 (regcache_invalidate_one): Adjust.
7633 (regcache_invalidate): Fix prototype.
7634 (new_register_cache): Return the new register cache.
7635 (free_register_cache): Change prototype.
7636 (realloc_register_cache): Adjust.
7637 (registers_to_string): Change prototype to take a regcache. Adjust.
7638 (registers_from_string): Ditto.
7639 (register_data): Ditto.
7640 (supply_register): Ditto.
7641 (supply_register_by_name): Ditto.
7642 (collect_register): Ditto.
7643 (collect_register_as_string): Ditto.
7644 (collect_register_by_name): Ditto.
7645 * server.c (process_serial_event): Adjust.
7646 * linux-low.h (regset_fill_func, regset_store_func): Change
7647 prototype.
7648 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7649 Change prototype.
7650 * linux-low.c (get_stop_pc): Adjust.
7651 (check_removed_breakpoint): Adjust.
7652 (linux_wait_for_event): Adjust.
7653 (linux_resume_one_lwp): Adjust.
7654 (fetch_register): Add regcache parameter. Adjust.
7655 (usr_store_inferior_registers): Ditto.
7656 (regsets_fetch_inferior_registers): Ditto.
7657 (regsets_store_inferior_registers): Ditto.
7658 (linux_fetch_registers, linux_store_registers): Ditto.
7659 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7660 regcache. Adjust.
7661 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7662 Ditto.
7663 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7664 prototype to take a regcache.
7665 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7666 * remote-utils.c (convert_ascii_to_int, outreg)
7667 (prepare_resume_reply): Change prototype to take a regcache.
7668 Adjust.
7669 * target.h (struct target_ops) <fetch_registers, store_registers>:
7670 Change prototype to take a regcache.
7671 (fetch_inferior_registers, store_inferior_registers): Change
7672 prototype to take a regcache. Adjust.
7673 * proc-service.c (ps_lgetregs): Adjust.
7674 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7675 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7676 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7677 take a regcache. Adjust.
7678 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7679 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7680 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7681 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7682 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7683 (cris_cannot_fetch_register):
7684 (cris_breakpoint_at): Change prototype to take a regcache.
7685 Adjust.
7686 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7687 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7688 to take a regcache. Adjust.
7689 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7690 Adjust.
7691 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7692 take a regcache. Adjust.
7693 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7694 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7695 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7696 * linux-mips-low.c (mips_get_pc):
7697 (mips_set_pc): Change prototype to take a regcache. Adjust.
7698 (mips_reinsert_addr): Adjust.
7699 (mips_collect_register): Change prototype to take a regcache.
7700 Adjust.
7701 (mips_supply_register):
7702 (mips_collect_register_32bit, mips_supply_register_32bit)
7703 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7704 (mips_store_fpregset): Ditto.
7705 * linux-ppc-low.c (ppc_supply_ptrace_register)
7706 (ppc_supply_ptrace_register): Ditto.
7707 (parse_spufs_run): Adjust.
7708 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7709 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7710 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7711 take a regcache. Adjust.
7712 * linux-s390-low.c (s390_collect_ptrace_register)
7713 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7714 (s390_set_pc): Change prototype to take a regcache. Adjust.
7715 (s390_arch_setup): Adjust.
7716 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7717 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7718 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7719 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7720 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7721 regcache. Adjust.
7722 (sparc_breakpoint_at): Adjust.
7723 * linux-xtensa-low.c (xtensa_fill_gregset):
7724 (xtensa_store_gregset):
7725 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7726 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7727 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7728 prototype to take a regcache. Adjust.
7729 * win32-arm-low.c (arm_fetch_inferior_register)
7730 (arm_store_inferior_register): Change prototype to take a
7731 regcache. Adjust.
7732 * win32-i386-low.c (i386_fetch_inferior_register)
7733 (i386_store_inferior_register): Change prototype to take a
7734 regcache. Adjust.
7735 * win32-low.c (child_fetch_inferior_registers)
7736 (child_store_inferior_registers): Change prototype to take a
7737 regcache. Adjust.
7738 (win32_wait): Adjust.
7739 (win32_fetch_inferior_registers): Change prototype to take a
7740 regcache. Adjust.
7741 (win32_store_inferior_registers): Adjust.
7742 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7743 store_inferior_register>: Change prototype to take a regcache.
7744
7745 2010-01-20 Doug Evans <dje@google.com>
7746
7747 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7748 #ifdef.
7749 (linux_wait_for_event1, linux_init_signals): Ditto.
7750 (W_STOPCODE): Provide definition if missing.
7751
7752 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7753
7754 * linux-low.c (linux_core_of_thread): New.
7755 (compare_ints, show_process, list_threads): New.
7756 (linux_qxfer_osdata): Report threads and cores.
7757 (linux_target_op): Register linux_core_of_thread.
7758 * remote-utils.c (prepare_resume_reply): Report the core.
7759 (buffer_xml_printf): Support %d specifier.
7760 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7761 New.
7762 (handle_query): Handle qXfer:threads. Announce availability
7763 thereof.
7764 * target.h (struct target_ops): New field core_of_thread.
7765
7766 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7767
7768 * Makefile.in (clean): Remove new generated files.
7769 (reg-s390.o, reg-s390.c): Remove rules.
7770 (reg-s390x.o, reg-s390x.c): Likewise.
7771 (s390-linux32.o, s390-linux32.c): Add rules.
7772 (s390-linux64.o, s390-linux64.c): Likewise.
7773 (s390x-linux64.o, s390x-linux64.c): Likewise.
7774 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7775 * linux-s390-low.c: Include <elf.h>.
7776 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7777 (init_registers_s390): Remove prototype.
7778 (init_registers_s390x): Likewise.
7779 (init_registers_s390_linux32): Add prototype.
7780 (init_registers_s390_linux64): Likewise.
7781 (init_registers_s390x_linux64): Likewise.
7782 (s390_num_regs_3264): New define.
7783 (s390_regmap_3264): New global variable.
7784 (s390_cannot_fetch_register): Remove obsolete check.
7785 (s390_cannot_store_register): Likewise.
7786 (s390_collect_ptrace_register): Handle upper/lower register halves.
7787 (s390_supply_ptrace_register): Likewise.
7788 (s390_fill_gregset): Update to register number changes.
7789 (s390_get_hwcap): New routine.
7790 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7791 Install appropriate regmap and register set.
7792
7793 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7794
7795 * server.c (gdbserver_version): Update copyright year to 2010.
7796 * gdbreplay.c (gdbreplay_version): Likewise.
7797
7798 2009-12-28 Doug Evans <dje@google.com>
7799
7800 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7801 elf/external.h. Include <elf.h> instead but only if necessary.
7802
7803 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7804
7805 * linux-low.c (linux_remove_process): Remove `detaching'
7806 parameter. Don't release/detach from thread_db here.
7807 (linux_kill): Release/detach from thread_db here, ...
7808 (linux_detach): ... and here, before actually detaching.
7809 (linux_wait_1): ... and here, when a process exits.
7810 * thread-db.c (any_thread_of): New.
7811 (thread_db_free): Switch the current inferior to a thread of the
7812 passed in process.
7813
7814 2009-12-21 Doug Evans <dje@google.com>
7815
7816 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7817
7818 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7819 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7820 warning ifndef __NR_tkill. Move setting of errno there too.
7821 Delete unnecessary resetting of errno after syscall.
7822 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7823
7824 * configure.ac: Check for dladdr.
7825 * config.in: Regenerate.
7826 * configure: Regenerate.
7827 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7828 (try_thread_db_load): Update.
7829
7830 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7831
7832 2009-12-18 Doug Evans <dje@google.com>
7833
7834 * event-loop.c: Include unistd.h if it exists.
7835
7836 * linux-low.c (my_waitpid): Move definition away from being in
7837 between linux_tracefork_child/linux_test_for_tracefork.
7838
7839 * gdb_proc_service.h (psaddr_t): Fix type.
7840 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7841 signature to match glibc.
7842
7843 2009-12-16 Doug Evans <dje@google.com>
7844
7845 * linux-low.c (linux_read_memory): Fix argument to read.
7846
7847 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7848
7849 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7850 events, don't leave current_inferior pointing at null.
7851
7852 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7853
7854 * win32-low.c (LOG): Delete.
7855 (OUTMSG): Output to stderr.
7856 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7857 on compile time LOG macro.
7858 (win32_wait): Fix debug output.
7859
7860 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7861
7862 * win32-low.c (win32_add_one_solib): If the dll name is
7863 "ntdll.dll", prepend the system directory to the dll path.
7864
7865 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7866
7867 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7868
7869 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7870 Vladimir Prus <vladimir@codesourcery.com>
7871
7872 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7873 * configure.ac: Check for __mcoldfire__ and set
7874 gdb_cv_m68k_is_coldfire.
7875 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7876 reg-cf.o and reg-m68k.o.
7877 * configure: Regenerated.
7878
7879 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7880
7881 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7882 Pass it to thread_db_free.
7883 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7884 proper `detaching' argument to linux_remove_process.
7885 * linux-low.h (thread_db_free): Add `detaching' parameter.
7886 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7887 to thread_db_free.
7888 (thread_db_free): Add `detaching' parameter. Only
7889 call td_ta_clear_event if detaching from process.
7890
7891 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7892
7893 * thread-db.c (thread_db_free): Fix typo.
7894
7895 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7896
7897 PR gdb/10838
7898 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7899
7900 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7901
7902 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7903 with an i686 compiler.
7904 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7905 needed.
7906 * configure: Rebuilt.
7907
7908 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7909
7910 PR gdb/10783
7911
7912 * server.c (handle_search_memory_1): Correct read_addr initialization
7913 in loop for searching subsequent chunks.
7914
7915 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7916
7917 * configure.ac: New --with-libthread-db option.
7918 * thread-db.c: Allow direct dependence on libthread_db.
7919 (thread_db_free): Adjust.
7920 * config.in: Regenerate.
7921 * configure: Likewise.
7922
7923 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7924
7925 PR gdb/10757
7926 * thread-db.c (attach_thread): New function.
7927 (maybe_attach_thread): Return success/failure.
7928 (find_new_threads_callback): Adjust.
7929 (thread_db_find_new_threads): Loop until no new threads.
7930
7931 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7932
7933 * proc-service.c (ps_lgetregs): Formatting.
7934
7935 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7936
7937 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7938 * configure.ac: Adjust.
7939 * linux-low.h (struct process_info_private): Move members to struct
7940 thread_db.
7941 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7942 * linux-low.c (linux_remove_process): Adjust.
7943 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7944 * server.c (handle_query): Move code ...
7945 (handle_monitor_command): ... here. New function.
7946 * target.h (struct target_ops): New member.
7947 * thread-db.c (struct thread_db): New.
7948 (libthread_db_search_path): New variable.
7949 (thread_db_create_event, thread_db_enable_reporting)
7950 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7951 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7952 (try_thread_db_load_1, dladdr_to_soname): New functions.
7953 (try_thread_db_load, thread_db_load_search): New functions.
7954 (thread_db_init): Search for libthread_db.
7955 (thread_db_free): New function.
7956 (thread_db_handle_monitor_command): Likewise.
7957 * config.in: Regenerate.
7958 * configure: Regenerate.
7959
7960 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7961
7962 * spu-low.c (spu_kill): Wait for inferior to terminate.
7963 Call clear_inferiors.
7964 (spu_detach): Call clear_inferiors.
7965
7966 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7967
7968 * aclocal.m4: Regenerate.
7969 * config.in: Likewise.
7970 * configure: Likewise.
7971
7972 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7973
7974 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7975 (parse_spufs_run): New function.
7976 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7977 (ppc_breakpoint_at): Handle SPU breakpoints.
7978
7979 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7980
7981 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7982 (SPUFS_MAGIC): Define.
7983 (spu_enumerate_spu_ids): New function.
7984 (linux_qxfer_spu): New function.
7985 (linux_target_ops): Install linux_qxfer_spu.
7986
7987 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7988
7989 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7990 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7991 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7992 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7993 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7994 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7995 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7996 (init_registers_powerpc_cell32l): Add prototype.
7997 (init_registers_powerpc_cell64l): Likewise.
7998 (ppc_arch_setup): Detect Cell/B.E. architecture.
7999
8000 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8001
8002 * Makefile.in (datarootdir): New variable.
8003
8004 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8005
8006 * linux-low.c (linux_write_memory): Update debugging output.
8007 * Makefile.in (clean): Add new descriptions.
8008 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8009 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8010 * configure.srv: Add new files for arm*-*-linux*.
8011 * linux-arm-low.c: Add new declarations.
8012 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8013 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8014 (HWCAP_VFPv3D16): New.
8015 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8016 instead of __IWMMXT__.
8017 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8018 (arm_arch_setup): New.
8019 (target_regsets): Remove #ifdef. Add VFP regset.
8020 (the_low_target): Use arm_arch_setup.
8021
8022 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8023
8024 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8025 the main thread again.
8026
8027 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8028
8029 Adding Neutrino gdbserver.
8030 * configure: Regenerated.
8031 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8032 * configure.srv (i[34567]86-*-nto*): New target.
8033 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8034 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8035 (nto_comctrl) [__QNX__]: New function.
8036 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8037
8038 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8039
8040 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8041 srv_tgtobj.
8042
8043 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8044 Pedro Alves <pedro@codesourcery.com>
8045
8046 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8047 don't support CONTEXT_EXTENDED_REGISTERS.
8048 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8049 (the_low_target): Install them.
8050 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8051 failing with ERROR_PIPE_NOT_CONNECTED.
8052
8053 2009-06-30 Doug Evans <dje@google.com>
8054 Pierre Muller <muller@ics.u-strasbg.fr>
8055
8056 Add h/w watchpoint support to x86-linux, win32-i386.
8057 * Makefile.in (SFILES): Add i386-low.c
8058 (i386_low_h): Define.
8059 (i386-low.o): Add dependencies.
8060 (linux-x86-low.o): Add i386-low.h dependency.
8061 (win32-i386-low.o): Ditto.
8062 * i386-low.c: New file.
8063 * i386-low.h: New file.
8064 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8065 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8066 * linux-low.c (linux_add_process): Initialize arch_private.
8067 (linux_remove_process): Free arch_private.
8068 (add_lwp): Initialize arch_private.
8069 (delete_lwp): Free arch_private.
8070 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8071 provided.
8072 * linux-low.h (process_info_private): New member arch_private.
8073 (lwp_info): New member arch_private.
8074 (linux_target_ops): New members new_process, new_thread,
8075 prepare_to_resume.
8076 (ptid_of): New macro.
8077 * linux-x86-low.c: Include stddef.h, i386-low.h.
8078 (arch_process_info): New struct.
8079 (arch_lwp_info): New struct.
8080 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8081 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8082 (i386_dr_low_get_status): New function.
8083 (x86_insert_point, x86_remove_point): New functions.
8084 (x86_stopped_by_watchpoint): New function.
8085 (x86_stopped_data_address): New function.
8086 (x86_linux_new_process, x86_linux_new_thread): New functions.
8087 (x86_linux_prepare_to_resume): New function.
8088 (the_low_target): Add entries for insert_point, remove_point,
8089 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8090 prepare_to_resume.
8091 * server.c (debug_hw_points): New global.
8092 (monitor_show_help): Document set debug-hw-points.
8093 (handle_query): Process "set debug-hw-points".
8094 * server.h (debug_hw_points): Declare.
8095 (paddress): Declare.
8096 * utils.c (NUMCELLS, CELLSIZE): New macros.
8097 (get_sell, xsnprintf, paddress): New functions.
8098 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8099 remove_point, stopped_by_watchpoint, stopped_data_address.
8100 * win32-i386-low.c: Include i386-low.h.
8101 (debug_reg_state): Replaces dr.
8102 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8103 (i386_dr_low_get_status): New function.
8104 (i386_insert_point, i386_remove_point): New functions.
8105 (i386_stopped_by_watchpoint): New function.
8106 (i386_stopped_data_address): New function.
8107 (i386_initial_stuff): Update.
8108 (get_thread_context,set_thread_context,i386_thread_added): Update.
8109 (the_low_target): Add entries for insert_point,
8110 remove_point, stopped_by_watchpoint, stopped_data_address.
8111 * win32-low.c (win32_insert_watchpoint): New function.
8112 (win32_remove_watchpoint): New function.
8113 (win32_stopped_by_watchpoint): New function.
8114 (win32_stopped_data_address): New function.
8115 (win32_target_ops): Add entries for insert_watchpoint,
8116 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8117 * win32-low.h (win32_target_ops): New members insert_point,
8118 remove_point, stopped_by_watchpoint, stopped_data_address.
8119
8120 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8121
8122 * server.c (process_serial_event): Re-return unsupported, not
8123 error, if the type isn't recognized. Re-allow supporting only
8124 insert or remove packets. Also call require_running for
8125 breakpoints. Add missing break statement to default case. Tidy.
8126 * target.h (struct target_ops): Rename insert_watchpoint to
8127 insert_point, and remove_watchpoint to remove_point.
8128
8129 * linux-low.h (struct linux_target_ops): Likewise.
8130 * linux-low.c (linux_insert_watchpoint): Rename to ...
8131 (linux_insert_point): ... this. Adjust.
8132 (linux_remove_watchpoint): Rename to ...
8133 (linux_remove_point): ... this. Adjust.
8134 (linux_target_ops): Adjust.
8135 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8136 (cris_insert_point): ... this.
8137 (cris_remove_watchpoint): Rename to ...
8138 (cris_remove_point): ... this.
8139 (the_low_target): Adjust.
8140
8141 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8142
8143 * server.c (handle_v_kill): Pass signal_pid to
8144 kill_inferior if multi_process is zero.
8145
8146 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8147
8148 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8149 * target.h (target_ops): Comment for *_watchpoint to make it clear
8150 the functions can get types '0' and '1'.
8151
8152 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8153
8154 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8155 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8156 * regcache.c (get_regcache): Likewise.
8157 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8158 * win32-low.c (child_fetch_inferior_registers): Remove check for
8159 regno 0.
8160
8161 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8162 Pedro Alves <pedro@codesourcery.com>
8163
8164 * target.h (struct target_ops) <supports_multi_process>: New
8165 callback.
8166 (target_supports_multi_process): New.
8167 * server.c (handle_query): Even if GDB reports support, only
8168 enable multi-process if the target also supports it. Report
8169 multi-process support only if the target backend supports it.
8170 * linux-low.c (linux_supports_multi_process): New function.
8171 (linux_target_ops): Install it as target_supports_multi_process
8172 callback.
8173
8174 2009-05-24 Doug Evans <dje@google.com>
8175
8176 Global renaming of find_thread_pid to find_thread_ptid.
8177 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8178 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8179 All callers updated.
8180
8181 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8182 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8183 directly.
8184
8185 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8186 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8187 (linux_resume_one_lwp): Ditto.
8188
8189 2009-05-23 Doug Evans <dje@google.com>
8190
8191 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8192 from struct inferior_list_entry * to struct lwp_info *.
8193 All callers updated.
8194
8195 2009-05-13 Doug Evans <dje@google.com>
8196
8197 * linux-x86-low.c: Don't include assert.h.
8198 (x86_siginfo_fixup): Use fatal, not assert.
8199 (x86_arch_setup): Fix comment.
8200
8201 2009-05-12 Doug Evans <dje@google.com>
8202
8203 Biarch support for i386/amd64 gdbserver.
8204 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8205 Add linux-x86-low.c.
8206 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8207 (linux-x86-low.o): Add.
8208 * linux-x86-64-low.c: Delete.
8209 * linux-i386-low.c: Delete.
8210 * linux-x86-low.c: New file.
8211 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8212 linux-x86-low.o.
8213 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8214 linux-x86-low.o.
8215 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8216 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8217 (linux_child_pid_to_exec_file): New function.
8218 (elf_64_header_p, elf_64_file_p): New functions.
8219 (siginfo_fixup): New function.
8220 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8221 give target a chance to convert layout.
8222 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8223 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8224
8225 2009-05-07 Doug Evans <dje@google.com>
8226
8227 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8228 (regsets_store_inferior_registers): Ditto.
8229
8230 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8231
8232 PR server/10048
8233
8234 * linux-low.c (must_set_ptrace_flags): Delete.
8235 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8236 of the global.
8237 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8238 `lwp->must_set_ptrace_flags' instead.
8239 (linux_wait_for_event_1): Set ptrace options here.
8240 (linux_wait_1): ... not here.
8241
8242 2009-04-30 Doug Evans <dje@google.com>
8243
8244 * inferiors.c (started_inferior_callback): New function.
8245 (attached_inferior_callback): New function.
8246 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8247 * server.c (print_started_pid, print_attached_pid): New functions.
8248 (detach_or_kill_for_exit): New function.
8249 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8250 * server.h (have_started_inferiors_p): Declare.
8251 (have_attached_inferiors_p): Declare.
8252
8253 * inferiors.c (remove_process): Fix memory leak, free process.
8254 * linux-low.c (linux_remove_process): New function.
8255 (linux_kill): Call it instead of remove_process.
8256 (linux_detach, linux_wait_1): Ditto.
8257
8258 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8259
8260 * configure.srv: Add x86 Windows CE target.
8261
8262 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8263
8264 * inferiors.c (get_thread_process): Make global.
8265 * server.h (get_thread_process): Add prototype.
8266 * thread-db.c (find_one_thread): Use get_thread_process
8267 instead of current_process.
8268 (thread_db_get_tls_address): Do not crash if called when
8269 thread layer is not yet initialized.
8270
8271 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8272
8273 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8274 * spu-low.c (current_tid): Rename to ...
8275 (current_ptid): ... this.
8276 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8277 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8278 ptid_get_lwp (current_ptid) instead of current_tid.
8279 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8280 instead of current_tid. Use find_process_pid to verify pid
8281 argument is valid. Pass proper argument to remove_process.
8282 (spu_thread_alive): Compare current_ptid instead of current_tid.
8283 (spu_resume): Likewise.
8284
8285 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8286
8287 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8288 variable.
8289
8290 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8291
8292 Implement the multiprocess extensions, and add linux multiprocess
8293 support.
8294
8295 * server.h (ULONGEST): Declare.
8296 (struct ptid, ptid_t): New.
8297 (minus_one_ptid, null_ptid): Declare.
8298 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8299 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8300 (struct inferior_list_entry): Change `id' type from unsigned from
8301 to ptid_t.
8302 (struct sym_cache, struct breakpoint, struct
8303 process_info_private): Forward declare.
8304 (struct process_info): Declare.
8305 (current_process): Declare.
8306 (all_processes): Declare.
8307 (initialize_inferiors): Declare.
8308 (add_thread): Adjust to use ptid_t.
8309 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8310 (add_process, remove_process, find_thread_pid): Declare.
8311 (find_inferior_id): Adjust to use ptid_t.
8312 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8313 (multi_process): Declare.
8314 (push_event): Adjust to use ptid_t.
8315 (read_ptid, write_ptid): Declare.
8316 (prepare_resume_reply): Adjust to use ptid_t.
8317 (clear_symbol_cache): Declare.
8318 * inferiors.c (all_processes): New.
8319 (null_ptid, minus_one_ptid): New.
8320 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8321 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8322 (add_thread): Change unsigned long to ptid. Remove gdb_id
8323 parameter. Adjust.
8324 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8325 (gdb_id_to_thread): Rename to ...
8326 (find_thread_pid): ... this. Change unsigned long to ptid.
8327 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8328 (loaded_dll, pull_pid_from_list): Adjust.
8329 (add_process, remove_process, find_process_pid)
8330 (get_thread_process, current_process, initialize_inferiors): New.
8331 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8332 (struct target_waitstatus) <related_pid>: Ditto.
8333 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8334 return type to int.
8335 (struct target_ops) <join>: Add `pid' argument.
8336 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8337 (struct target_ops) <wait>: Add `ptid' field. Change return type
8338 to ptid.
8339 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8340 (mywait): Add `ptid' argument. Change return type to ptid_t.
8341 (target_pid_to_str): Declare.
8342 * target.c (set_desired_inferior): Adjust to use ptids.
8343 (mywait): Add new `ptid' argument. Adjust.
8344 (target_pid_to_str): New.
8345 * mem-break.h (free_all_breakpoints): Declare.
8346 * mem-break.c (breakpoints): Delelete.
8347 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8348 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8349 to use per-process breakpoint list.
8350 (free_all_breakpoints): New.
8351 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8352 (symbol_cache, all_symbols_looked_up): Delete.
8353 (hexchars): New.
8354 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8355 read_ptid): New.
8356 (prepare_resume_reply): Change ptid argument's type from unsigned
8357 long to ptid_t. Adjust. Implement W;process and X;process.
8358 (free_sym_cache, clear_symbol_cache): New.
8359 (look_up_one_symbol): Adjust to per-process symbol cache. *
8360 * server.c (cont_thread, general_thread, step_thread): Change type
8361 to ptid_t.
8362 (attached): Delete.
8363 (multi_process): New.
8364 (last_ptid): Change type to ptid_t.
8365 (struct vstop_notif) <ptid>: Change type to ptid_t.
8366 (queue_stop_reply, push_event): Change `ptid' argument's type to
8367 ptid_t.
8368 (discard_queued_stop_replies): Add `pid' argument.
8369 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8370 changes. Don't reference the `attached' global.
8371 (attach_inferior): Adjust to mywait interface changes.
8372 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8373 features. Handle and report "multiprocess+". Handle
8374 "qAttached:PID".
8375 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8376 changes.
8377 (handle_v_kill): New.
8378 (handle_v_stopped): Adjust to use target_pid_to_str.
8379 (handle_v_requests): Allow multiple attaches and runs when
8380 multiprocess extensions are in effect. Handle "vKill".
8381 (myresume): Adjust to use ptids.
8382 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8383 (handle_status): Adjust to discard_queued_stop_replies interface
8384 change.
8385 (first_thread_of, kill_inferior_callback)
8386 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8387 (main): Call initialize_inferiors. Adjust to use ptids, killing
8388 and detaching from all inferiors. Handle multiprocess packet
8389 variants.
8390 * linux-low.h: Include gdb_proc_service.h.
8391 (struct process_info_private): New.
8392 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8393 <lwpid_of>: Use ptid_get_lwp.
8394 (get_lwp_thread): Adjust.
8395 (struct lwp_info): Add `dead' member.
8396 (find_lwp_pid): Declare.
8397 * linux-low.c (thread_db_active): Delete.
8398 (new_inferior): Adjust comment.
8399 (inferior_pid): Delete.
8400 (linux_add_process): New.
8401 (handle_extended_wait): Adjust.
8402 (add_lwp): Change unsigned long to ptid.
8403 (linux_create_inferior): Add process to processes table. Adjust
8404 to use ptids. Don't set new_inferior here.
8405 (linux_attach_lwp): Rename to ...
8406 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8407 it. Adjust to use ptids.
8408 (linux_attach_lwp): New.
8409 (linux_attach): Add process to processes table. Don't set
8410 new_inferior here.
8411 (struct counter): New.
8412 (second_thread_of_pid_p, last_thread_of_process_p): New.
8413 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8414 multiple processes.
8415 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8416 processes. Remove process from process table.
8417 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8418 to multiple processes.
8419 (any_thread_of): New.
8420 (linux_detach): Add `pid' argument, and handle it. Remove process
8421 from processes table.
8422 (linux_join): Add `pid' argument. Handle it.
8423 (linux_thread_alive): Change unsighed long argument to ptid_t.
8424 Consider dead lwps as not being alive.
8425 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8426 threads we're not interested in.
8427 (same_lwp, find_lwp_pid): New.
8428 (linux_wait_for_lwp): Change `pid' argument's type from int to
8429 ptid_t. Adjust.
8430 (linux_wait_for_event): Rename to ...
8431 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8432 from int to ptid_t. Adjust.
8433 (linux_wait_for_event): New.
8434 (linux_wait_1): Add `ptid' argument. Change return type to
8435 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8436 that exit from the process table.
8437 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8438 Adjust.
8439 (mark_lwp_dead): New.
8440 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8441 stopping all threads, mark its main lwp as dead.
8442 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8443 ptids.
8444 (fetch_register, usr_store_inferior_registers)
8445 (regsets_fetch_inferior_registers)
8446 (regsets_store_inferior_registers, linux_read_memory)
8447 (linux_write_memory): Inline `inferior_pid'.
8448 (linux_look_up_symbols): Adjust to use per-process
8449 `thread_db_active'.
8450 (linux_request_interrupt): Adjust to use ptids.
8451 (linux_read_auxv): Inline `inferior_pid'.
8452 (initialize_low): Don't reference thread_db_active.
8453 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8454 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8455 (ps_getpid): Return the pid of the current inferior.
8456 * thread-db.c (proc_handle, thread_agent): Delete.
8457 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8458 per-process data.
8459 (find_one_thread): Change argument type to ptid_t. Adjust to
8460 per-process data.
8461 (maybe_attach_thread): Adjust to per-process data and ptids.
8462 (thread_db_find_new_threads): Ditto.
8463 (thread_db_init): Ditto.
8464 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8465 processes table. Adjust to use ptids.
8466 (spu_kill, spu_detach): Adjust interface. Remove process from
8467 processes table.
8468 (spu_join, spu_thread_alive): Adjust interface.
8469 (spu_wait): Adjust interface. Remove process from processes
8470 table. Adjust to use ptids.
8471 * win32-low.c (current_inferior_tid): Delete.
8472 (current_inferior_ptid): New.
8473 (debug_event_ptid): New.
8474 (thread_rec): Take a ptid. Adjust.
8475 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8476 (child_delete_thread): Ditto.
8477 (do_initial_child_stuff): Add `attached' argument. Add process to
8478 processes table.
8479 (child_fetch_inferior_registers, child_store_inferior_registers):
8480 Adjust.
8481 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8482 (win32_attach): Pass 1 to do_initial_child_stuff.
8483 (win32_kill): Adjust interface. Remove process from processes
8484 table.
8485 (win32_detach): Ditto.
8486 (win32_join): Adjust interface.
8487 (win32_thread_alive): Take a ptid.
8488 (win32_resume): Adjust to use ptids.
8489 (get_child_debug_event): Ditto.
8490 (win32_wait): Adjust interface. Remove exiting process from
8491 processes table.
8492
8493 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8494
8495 Non-stop mode support.
8496
8497 * server.h (non_stop): Declare.
8498 (gdb_client_data, handler_func): Declare.
8499 (delete_file_handler, add_file_handler, start_event_loop):
8500 Declare.
8501 (handle_serial_event, handle_target_event, push_event)
8502 (putpkt_notif): Declare.
8503 * target.h (enum resume_kind): New.
8504 (struct thread_resume): Replace `step' field by `kind' field.
8505 (TARGET_WNOHANG): Define.
8506 (struct target_ops) <wait>: Add `options' argument.
8507 <supports_non_stop, async, start_non_stop>: New fields.
8508 (target_supports_non_stop, target_async): New.
8509 (start_non_stop): Declare.
8510 (mywait): Add `options' argument.
8511 * target.c (mywait): Add `options' argument. Print child exit
8512 notifications here.
8513 (start_non_stop): New.
8514 * server.c (non_stop, own_buf, mem_buf): New globals.
8515 (struct vstop_notif): New.
8516 (notif_queue): New global.
8517 (queue_stop_reply, push_event, discard_queued_stop_replies)
8518 (send_next_stop_reply): New.
8519 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8520 interface changes.
8521 (attach_inferior): In non-stop mode, don't wait for the target
8522 here.
8523 (handle_general_set): Handle QNonStop.
8524 (handle_query): When handling qC, return the current general
8525 thread, instead of the first thread of the list.
8526 (handle_query): If the backend supports non-stop mode, include
8527 QNonStop+ in the qSupported query response.
8528 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8529 and non-stop mode.
8530 (handle_v_attach, handle_v_run): Handle non-stop mode.
8531 (handle_v_stopped): New.
8532 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8533 (myresume): Adjust to use resume_kind. Handle non-stop.
8534 (queue_stop_reply_callback): New.
8535 (handle_status): Handle non-stop mode.
8536 (main): Clear non_stop flag on reconnection. Use the event-loop.
8537 Refactor serial protocol handling from here ...
8538 (process_serial_event): ... to this new function. When GDB
8539 selects any thread, select one here. In non-stop mode, wait until
8540 GDB acks all pending events before exiting.
8541 (handle_serial_event, handle_target_event): New.
8542 * remote-utils.c (remote_open): Install remote_desc in the event
8543 loop.
8544 (remote_close): Remove remote_desc from the event loop.
8545 (putpkt_binary): Rename to...
8546 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8547 (putpkt_binary): New as wrapper around putpkt_binary_1.
8548 (putpkt_notif): New.
8549 (prepare_resume_reply): In non-stop mode, don't change the
8550 general_thread.
8551 * event-loop.c: New.
8552 * Makefile.in (OBJ): Add event-loop.o.
8553 (event-loop.o): New rule.
8554
8555 * linux-low.h (pid_of): Moved here.
8556 (lwpid_of): New.
8557 (get_lwp_thread): Use lwpid_of.
8558 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8559 * linux-low.c (pid_of): Delete.
8560 (inferior_pid): Use lwpid_of.
8561 (linux_event_pipe): New.
8562 (target_is_async_p): New.
8563 (delete_lwp): New.
8564 (handle_extended_wait): Use lwpid_of.
8565 (add_lwp): Don't set lwpid field.
8566 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8567 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8568 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8569 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8570 first. Adjust to linux_wait_for_event interface changes. Use
8571 lwpid_of.
8572 (linux_detach): Don't delete the main lwp here.
8573 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8574 (status_pending_p): Don't consider explicitly suspended lwps.
8575 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8576 pointer. Add OPTIONS argument. Change return type to int. Use
8577 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8578 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8579 pointer. Add status pointer argument. Return a pid instead of a
8580 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8581 changes. In non-stop mode, don't switch to a random thread.
8582 (linux_wait): Rename to...
8583 (linux_wait_1): ... this. Add target_options argument, and handle
8584 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8585 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8586 clean exit and signal exit code. Don't stop all threads in
8587 non-stop mode. In all-stop mode, only stop all threads when
8588 reporting a stop to GDB. Handle explicit thread stop requests.
8589 (async_file_flush, async_file_mark): New.
8590 (linux_wait): New.
8591 (send_sigstop): Use lwpid_of.
8592 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8593 interface changes. In non-stop mode, don't switch to a random
8594 thread.
8595 (linux_resume_one_lwp): Use lwpid_of.
8596 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8597 (linux_resume_one_thread): ... this. Handle resume_stop. In
8598 non-stop mode, don't look for pending flag in all threads.
8599 (resume_status_pending_p): Don't consider explicitly suspended
8600 threads.
8601 (my_waitpid): Reimplement. Emulate __WALL.
8602 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8603 Use lwpid_of.
8604 (sigchld_handler, linux_supports_non_stop, linux_async)
8605 (linux_start_non_stop): New.
8606 (linux_target_ops): Register linux_supports_non_stop, linux_async
8607 and linux_start_non_stop.
8608 (initialize_low): Install SIGCHLD handler.
8609 * thread-db.c (thread_db_create_event, find_one_thread)
8610 (thread_db_get_tls_address): Use lwpid_of.
8611 * win32-low.c (win32_detach): Adjust to use resume_kind.
8612 (win32_wait): Add `options' argument.
8613 * spu-low.c (spu_resume): Adjust to use resume_kind.
8614 (spu_wait): Add `options' argument.
8615
8616 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8617
8618 Decouple target code from remote protocol.
8619
8620 * target.h (enum target_waitkind): New.
8621 (struct target_waitstatus): New.
8622 (struct target_ops) <wait>: Return an unsigned long. Take a
8623 target_waitstatus pointer instead of a char pointer.
8624 (mywait): Likewise.
8625 * target.c (mywait): Change prototype to return an unsigned long.
8626 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8627 * server.h (thread_from_wait, old_thread_from_wait): Delete
8628 declarations.
8629 (prepare_resume_reply): Change prototype to take a
8630 target_waitstatus.
8631 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8632 (last_status, last_ptid): New.
8633 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8634 pid instead of a signal.
8635 (attach_inferior): Remove "status" and "signal" parameters.
8636 Adjust.
8637 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8638 not as an address.
8639 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8640 (handle_v_requests, myresume): Remove "status" and "signal"
8641 parameters. Adjust.
8642 (handle_status): New.
8643 (main): Delete local `status'. Adjust.
8644 * remote-utils.c: Include target.h.
8645 (prepare_resume_reply): Change prototype to take a
8646 target_waitstatus. Adjust.
8647
8648 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8649 interface.
8650 * spu-low.c (spu_wait): Adjust.
8651 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8652 Delete.
8653 (win32_wait): Adjust.
8654
8655 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8656
8657 * target.h (struct thread_resume): Delete leave_stopped member.
8658 (struct target_ops): Add a `n' argument to the `resume' callback.
8659 * server.c (start_inferior): Adjust.
8660 (handle_v_cont, myresume): Adjust.
8661 * linux-low.c (check_removed_breakpoint): Adjust to resume
8662 interface change, and to removed leave_stopped field.
8663 (resume_ptr): Delete.
8664 (struct thread_resume_array): New.
8665 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8666 resume interface change.
8667 (linux_continue_one_thread, linux_queue_one_thread)
8668 (resume_status_pending_p): Check if the resume field is NULL
8669 instead of checking the leave_stopped member.
8670 (linux_resume): Adjust to the target resume interface change.
8671 * spu-low.c (spu_resume): Adjust to the target resume interface
8672 change.
8673 * win32-low.c (win32_detach, win32_resume): Ditto.
8674
8675 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8676
8677 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8678 flag.
8679 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8680 pending.
8681 (linux_continue_one_thread): Only preserve the stepping flag if
8682 there's a pending breakpoint.
8683
8684 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8685
8686 * server.c (main): After the inferior having exited, call
8687 remote_close before exiting gdbserver.
8688
8689 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8690
8691 Fix size of FPSCR in Power 7 processors.
8692 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8693 (PPC_FEATURE_HAS_DFP): New #define.
8694 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8695 size of the FPSCR.
8696
8697 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8698
8699 * server.c (handle_query) Whitespace and formatting.
8700
8701 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8702
8703 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8704 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8705 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8706 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8707 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8708 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8709 Makefile.in, configure.ac: Fix whitespace throughout.
8710 * configure: Regenerate.
8711
8712 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8713
8714 * inferiors.c (find_inferior): Make it safe for the callback
8715 function to delete the currently iterated inferior.
8716
8717 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8718
8719 * Makefile.in (linuw_low_h): Move higher.
8720 (thread-db.o): Depend on $(linux_low_h).
8721
8722 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8723
8724 Rename "process" to "lwp" throughout.
8725
8726 * linux-low.c (all_processes): Rename to...
8727 (all_lwps): ... this.
8728 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8729 (add_process): Rename to ...
8730 (add_lwp): ... this. Adjust.
8731 (linux_create_inferior): Adjust.
8732 (linux_attach_lwp): Adjust.
8733 (linux_attach): Adjust.
8734 (linux_kill_one_process): Rename to ...
8735 (linux_kill_one_lwp): ... this. Adjust.
8736 (linux_kill): Adjust.
8737 (linux_detach_one_process): Rename to ...
8738 (linux_detach_one_lwp): ... this. Adjust.
8739 (linux_detach): Adjust.
8740 (check_removed_breakpoint): Adjust.
8741 (status_pending_p): Adjust.
8742 (linux_wait_for_process): Rename to ...
8743 (linux_wait_for_lwp): ... this. Adjust.
8744 (linux_wait_for_event): Adjust.
8745 (send_sigstop): Adjust.
8746 (wait_for_sigstop): Adjust.
8747 (stop_all_processes): Rename to ...
8748 (stop_all_lwps): ... this.
8749 (linux_resume_one_process): Rename to ...
8750 (linux_resume_one_lwp): ... this. Adjust.
8751 (linux_set_resume_request, linux_continue_one_thread)
8752 (linux_queue_one_thread, resume_status_pending_p)
8753 (usr_store_inferior_registers, regsets_store_inferior_registers)
8754 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8755 Adjust.
8756 * linux-low.h (get_process): Rename to ...
8757 (get_lwp): ... this. Adjust.
8758 (get_thread_process): Rename to ...
8759 (get_thread_lwp): ... this. Adjust.
8760 (get_process_thread): Rename to ...
8761 (get_lwp_thread): ... this. Adjust.
8762 (struct process_info): Rename to ...
8763 (struct lwp_info): ... this.
8764 (all_processes): Rename to ...
8765 (all_lwps): ... this.
8766 * proc-service.c (ps_lgetregs): Adjust.
8767 * thread-db.c (thread_db_create_event, find_one_thread)
8768 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8769
8770 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8771
8772 * server.c (handle_query): Handle "qAttached".
8773
8774 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8775
8776 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8777 GPLv3, update license URL.
8778
8779 2009-03-01 Doug Evans <dje@google.com>
8780
8781 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8782 (server_h): Add gdb_signals.h.
8783 (signals.o): Update.
8784 * server.h (target_signal_from_host,target_signal_to_host_p)
8785 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8786
8787 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8788
8789 * remote-utils.c (getpkt): Also generate remote-debug
8790 information if noack_mode is set.
8791
8792 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8793
8794 * server.c (handle_query): Report qXfer:siginfo:read and
8795 qXfer:siginfo:write as supported and handle them.
8796 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8797 * linux-low.c (linux_xfer_siginfo): New.
8798 (linux_target_ops): Set it.
8799
8800 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8801
8802 * server.c (gdbserver_usage): Mention --remote-debug.
8803 (main): Accept '--remote-debug' switch.
8804
8805 2009-01-18 Doug Evans <dje@google.com>
8806
8807 * regcache.c (new_register_cache): No need to check result of xcalloc.
8808 * server.c (handle_search_memory): Back out calls to xmalloc,
8809 result is checked and error is returned to user upon failure.
8810 (handle_query): Ditto. Add more checks for result of malloc.
8811 (handle_v_cont): Check result of malloc, report error back to
8812 user upon failure.
8813 (handle_v_run): Ditto. Call freeargv.
8814 * server.h (freeargv): Declare.
8815 * utils.c (freeargv): New fn.
8816
8817 2009-01-15 Doug Evans <dje@google.com>
8818
8819 * gdbreplay.c (perror_with_name): Make arg const char *.
8820 * server.h (target_signal_to_name): Make return type const char *.
8821 * thread-db.c (thread_db_err_str): Make return type const char *.
8822 * utils.c (perror_with_name): Make arg const char *.
8823
8824 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8825
8826 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8827 when handling a EXIT_PROCESS_DEBUG_EVENT.
8828
8829 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8830
8831 * gdbreplay.c (gdbreplay_version): Update copyright year.
8832 * server.c (gdbserver_version): Likewise.
8833
8834 2009-01-05 Doug Evans <dje@google.com>
8835
8836 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8837 (handle_extended_wait): Improve comment.
8838
8839 2008-12-13 Doug Evans <dje@google.com>
8840
8841 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8842 * server.h (ATTR_MALLOC): New macro.
8843 (xmalloc,xcalloc,xstrdup): Declare.
8844 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8845 * inferiors.c: Ditto.
8846 * linux-low.c: Ditto.
8847 * mem-break.c: Ditto.
8848 * regcache.c: Ditto.
8849 * remote-utils.c: Ditto.
8850 * server.c: Ditto.
8851 * target.c: Ditto.
8852 * win32-low.c: Ditto.
8853
8854 2008-12-12 Doug Evans <dje@google.com>
8855
8856 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8857 in debugging printf.
8858
8859 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8860
8861 2008-12-09 Doug Evans <dje@google.com>
8862
8863 * linux-low.h (struct process_info): Delete member tid, unused.
8864 * thread-db.c (find_one_thread): Update.
8865 (maybe_attach_thread): Update.
8866
8867 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8868
8869 * target.h (struct target_ops): Add qxfer_osdata member.
8870 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8871 and dirent.h.
8872 (linux_qxfer_osdata): New functions.
8873 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8874 callback.
8875 * server.c (handle_query): Handle "qXfer:osdata:read:".
8876 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8877 (buffer_xml_printf): New functions.
8878 * server.h (struct buffer): New.
8879 (buffer_grow_str, buffer_grow_str0): New macros.
8880 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8881 (buffer_xml_printf): Declare.
8882
8883 2008-11-24 Doug Evans <dje@google.com>
8884
8885 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8886
8887 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8888
8889 * server.c (handle_v_run): Always use the supplied argument list.
8890
8891 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8892
8893 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8894 (xtensa_regmap_table): Add entry for scompare1.
8895
8896 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8897
8898 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8899 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8900 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8901 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8902 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8903 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8904 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8905 XML target descriptions.
8906 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8907 when inferior is running on an ISA 2.05 or later processor. Add
8908 special case to return offset for full 64-bit slot of FPSCR when
8909 in 32-bits.
8910
8911 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8912
8913 * Makefile.in (SFILES, clean): Added sparc64 files.
8914 (reg-sparc64.o, reg-sparc64.c): New.
8915 * configure.srv (sparc*-*-linux*): New configuration.
8916 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8917 syscall arguments for SPARC.
8918 (regsets_store_inferior_registers): Likewise.
8919 * linux-sparc-low.c: New file.
8920
8921 2008-10-21 Doug Evans <dje@google.com>
8922
8923 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8924 (READLINE_DIR,READLINE_DEP): Delete.
8925 (INTERNAL_CFLAGS): Update.
8926 (LINTFLAGS): Update.
8927
8928 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8929
8930 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8931 whole argv from the last run, not just argv[0].
8932
8933 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8934
8935 * regcache.c (new_register_cache): Return NULL if the register
8936 cache size isn't known yet.
8937 (free_register_cache): Avoid dereferencing a NULL regcache.
8938
8939 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8940
8941 * configure.srv: Merge MIPS and MIPS64.
8942
8943 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8944
8945 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8946
8947 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8948
8949 * Makefile.in: Add required vsx dependencies.
8950
8951 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8952 Declare init_registers_powerpc_vsx32l.
8953 Declare init_registers_powerpc_vsx64l.
8954 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8955 (ppc_arch_setup): Check for VSX in hwcap.
8956 (ppc_fill_vsxregset): New function.
8957 (ppc_store_vsxregset): New function.
8958 Add new VSX entry in regset_info target_regsets.
8959
8960 * configure.srv: Add new VSX dependencies.
8961
8962 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8963
8964 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8965 (remote_open): Set or clear transport_is_reliable.
8966 (putpkt_binary): Don't expect acks in noack mode.
8967 (getpkt): Don't send ack/nac in noack mode.
8968 * server.c (handle_general_set): Handle QStartNoAckMode.
8969 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8970 qSupported.
8971 (main): Reset noack_mode on every connection.
8972 * server.h (noack_mode): Declare.
8973
8974 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8975
8976 * Makefile.in (GDBREPLAY_OBS): New variable.
8977 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8978
8979 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8980 Daniel Jacobowitz <dan@codesourcery.com>
8981
8982 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8983 (usr_store_inferior_registers): Likewise.
8984 (regsets_store_inferior_registers): Likewise.
8985
8986 2008-07-31 Rolf Jansen <rj@surtec.com>
8987 Pedro Alves <pedro@codesourcery.com>
8988
8989 * configure.ac: Check for memmem declaration.
8990 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8991 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8992 (disable_packet_qfThreadInfo): Unconditionally compile.
8993 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8994 * configure, config.in: Regenerate.
8995
8996 2008-07-28 Doug Kwan <dougkwan@google.com>
8997
8998 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8999 (linux_write_memory): Remove declaration of errno.
9000
9001 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9002
9003 * linux-low.c (handle_extended_wait): Do not use "status"
9004 variable uninitialized.
9005
9006 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9007
9008 * server.c (handle_v_attach): Inhibit reporting dll changes.
9009
9010 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9011
9012 * remote-utils.c (prepare_resume_reply): If requested, don't
9013 output "thread:TID" in the T stop reply.
9014
9015 * server.c (disable_packet_vCont, disable_packet_Tthread)
9016 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9017 (handle_query): If requested, disable support for qC, qfThreadInfo
9018 and qsThreadInfo.
9019 (handle_v_requests): If requested, disable support for vCont.
9020 (gdbserver_show_disableable): New.
9021 (main): Handle --disable-packet and --disable-packet=LIST.
9022
9023 * server.h (disable_packet_vCont, disable_packet_Tthread)
9024 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9025
9026 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9027
9028 * server.c (gdbserver_usage): Mention --version.
9029
9030 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9031
9032 * Makefile.in (gdbreplay.o): New rule.
9033
9034 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9035
9036 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9037 message, not gdbserver.
9038
9039 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9040 Nathan Sidwell <nathan@codesourcery.com>
9041 Joseph Myers <joseph@codesourcery.com>
9042
9043 * acinclude.m4: Include ../../config/acx.m4.
9044 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9045 * configure, config.in: Regenerate.
9046 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9047 * server.c (gdbserver_version): Print PKGVERSION.
9048 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9049 (main): Adjust gdbserver_usage calls.
9050 * gdbreplay.c (version, host_name): Add declarations.
9051 (gdbreplay_version, gdbreplay_usage): New.
9052 (main): Accept --version and --help options.
9053
9054 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9055
9056 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9057 (arm_breakpoint_at): Handle Thumb.
9058 (the_low_target): Add comment.
9059
9060 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9061
9062 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9063
9064 2008-05-09 Doug Evans <dje@google.com>
9065
9066 * server.h (decode_search_memory_packet): Declare.
9067 * remote-utils.c (decode_search_memory_packet): New fn.
9068 * server.c (handle_search_memory_1): New fn.
9069 (handle_search_memory): New fn.
9070 (handle_query): Process qSearch:memory packets.
9071
9072 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9073
9074 * regcache.c (registers_length): Remove.
9075 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9076 full register packet.
9077 * regcache.h (registers_length): Remove prototype.
9078 * server.h (PBUFSIZ): Define to 16384.
9079
9080 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9081
9082 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9083 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9084 powerpc-64l.o, and powerpc-altivec64l.o.
9085 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9086 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9087 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9088 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9089 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9090 to srv_xmlfiles.
9091
9092 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9093 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9094 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9095 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9096 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9097 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9098 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9099 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9100 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9101 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9102 (clean): Update.
9103
9104 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9105 (init_registers_powerpc_32l): ... this new prototype.
9106 (init_registers_powerpc_32): Remove, replace by ...
9107 (init_registers_powerpc_altivec32l): ... this new prototype.
9108 (init_registers_powerpc_e500): Remove, replace by ...
9109 (init_registers_powerpc_e500l): ... this new prototype.
9110 (init_registers_ppc64): Remove, replace by ...
9111 (init_registers_powerpc_64l): ... this new prototype.
9112 (init_registers_powerpc_64): Remove, replace by ...
9113 (init_registers_powerpc_altivec64l): ... this new prototype.
9114 (ppc_num_regs): Set to 73.
9115 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9116 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9117 (ppc_cannot_store_register): Handle orig_r3 and trap.
9118 (ppc_arch_setup): Update init_registers_... calls.
9119 (ppc_fill_gregset): Handle orig_r3 and trap.
9120
9121 * inferiors.c (clear_inferiors): Reset current_inferior.
9122
9123 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9124
9125 * acinclude.m4: Add override.m4.
9126 * configure: Regenerate.
9127
9128 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9129
9130 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9131 initial call to init_register_ppc64.
9132
9133 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9134
9135 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9136 single powerpc*-*-linux* case.
9137 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9138
9139 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9140
9141 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9142 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9143 from reg_xmlfiles.
9144 * linux-ppc-low.c: Include <elf.h>.
9145 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9146 (ppc_hwcap): New global variable.
9147 (ppc_regmap): Remove __SPE__ #ifdef sections.
9148 (ppc_regmap_e500): New global variable.
9149 (ppc_cannot_store_register): Update __SPE__ special case.
9150 (ppc_get_hwcap): New function.
9151 (ppc_arch_setup): Use it to determine whether inferior supports
9152 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9153 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9154 Do not access registers if target does not support AltiVec.
9155 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9156 Do not access registers if target does not support SPE.
9157 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9158
9159 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9160
9161 * linux-low.c (disabled_regsets, num_regsets): New.
9162 (use_regsets_p): Delete.
9163 (linux_wait_for_process): Clear disabled_regsets.
9164 (regsets_fetch_inferior_registers): Check and set it.
9165 (regsets_store_inferior_registers): Likewise.
9166 (linux_fetch_registers, linux_store_registers): Do not use
9167 use_regsets_p.
9168 (initialize_low): Allocate disabled_regsets.
9169
9170 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9171
9172 * Makefile.in (LIBOBJS): New.
9173 (OBS): Use LIBOBJS.
9174 (memmem.o): New rule.
9175 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9176 * configure: Regenerated.
9177
9178 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9179
9180 * server.c (handle_query): Never return "unsupported" for
9181 qXfer:features:read queries.
9182
9183 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9184
9185 * server.c (get_features_xml): Fix inverted condition.
9186 (handle_query): Always support qXfer:feature:read.
9187
9188 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9189
9190 * server.c (wrapper_argv): New.
9191 (start_inferior): Handle wrapper_argv. If set, expect an extra
9192 trap.
9193 (gdbserver_usage): Document --wrapper.
9194 (main): Parse --wrapper.
9195
9196 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9197
9198 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9199 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9200 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9201 (ppc_set_pc): Likewise.
9202 (ppc_arch_setup): New function.
9203 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9204 of collect_register.
9205 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9206
9207 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9208
9209 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9210 instead of linux-ppc64-low.o.
9211 * linux-ppc64-low.c: Remove file.
9212 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9213 (linux-ppc64-low.o): Remove rule.
9214
9215 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9216 (init_registers_powerpc_64): Likewise.
9217 (ppc_regmap): Conditionally define depending on __powerpc64__.
9218 (ppc_cannot_store_register): Do not special-case "fpscr" when
9219 compiled on __powerpc64__.
9220 (ppc_collect_ptrace_register): New function.
9221 (ppc_supply_ptrace_register): New function.
9222 (ppc_breakpoint): Change type to "unsigned int".
9223 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9224 (the_low_target): Conditionally provide initializers for the
9225 arch_setup member depending on __powerpc64__. Install
9226 collect_ptrace_register and supply_ptrace_register members.
9227
9228 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9229
9230 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9231 * server.c (gdbserver_xmltarget): Define.
9232 (get_features_xml): Use it to replace "target.xml" and arch_string.
9233
9234 * configure.srv: Remove srv_xmltarget. Add XML files that were
9235 mentioned there to srv_xmlfiles instead. Remove conditional tests
9236 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9237 srv_xmlfiles and srv_regobj to include all possible choices.
9238 * configure.ac (srv_xmltarget): Remove.
9239 (srv_xmlfiles): Do not add "target.xml".
9240 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9241 checks for supplementary target information.
9242 * configure: Regenerate.
9243 * Makefile.in (XML_TARGET): Remove.
9244 (target.xml): Remove rule.
9245 (clean): Do not clean up target.xml.
9246 (.PRECIOUS): Do not mention target.xml.
9247
9248 * target.h (struct target_ops): Remove arch_string member.
9249 * linux-low.c (linux_arch_string): Remove.
9250 (linux_target_ops): Remove arch_string initializer.
9251 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9252 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9253 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9254 * spu-low.c (spu_arch_string): Remove.
9255 (spu_target_ops): Remove arch_string initializer.
9256 * win32-low.c (win32_arch_string): Remove.
9257 (win32_target_ops): Remove arch_string initializer.
9258 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9259 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9260 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9261
9262 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9263
9264 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9265 by collect_ptrace_register and supply_ptrace_register hooks.
9266 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9267 instead of checking for the_low_target.left_pad_xfer.
9268 (usr_store_inferior_registers): Use collect_ptrace_register callback
9269 instead of checking for the_low_target.left_pad_xfer.
9270
9271 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9272 (s390_supply_ptrace_register): Likewise.
9273 (s390_fill_gregset): Call s390_collect_ptrace_register.
9274 (the_low_target): Update.
9275
9276 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9277 (ppc_supply_ptrace_register): Likewise.
9278 (the_low_target): Update.
9279
9280 * linux-i386-low.c (the_low_target): Update.
9281 * linux-x86-64-low.c (the_low_target): Update.
9282
9283 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9284
9285 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9286 reg-s390.o and reg-s390x.o.
9287
9288 * linux-low.c (new_inferior): New global variable.
9289 (linux_create_inferior, linux_attach): Set it.
9290 (linux_wait_for_process): Call the_low_target.arch_setup after the
9291 target has stopped for the first time.
9292 (initialize_low): Do not call the_low_target.arch_setup.
9293
9294 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9295 (s390_set_pc): Likewise.
9296 (s390_arch_setup): New function.
9297 (the_low_target): Use s390_arch_setup as arch_setup routine.
9298
9299 * regcache.c (realloc_register_cache): New function.
9300 (set_register_cache): Call it for each existing regcache.
9301
9302 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9303
9304 * server.h (init_registers): Remove prototype.
9305
9306 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9307 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9308 instead of init_registers ().
9309 * linux-arm-low.c (init_registers_arm): Add prototype.
9310 (init_registers_arm_with_iwmmxt): Likewise.
9311 (the_low_target): Add initializer for arch_setup field.
9312 * linux-cris-low.c (init_registers_cris): Add prototype.
9313 (the_low_target): Add initializer for arch_setup field.
9314 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9315 (the_low_target): Add initializer for arch_setup field.
9316 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9317 (the_low_target): Add initializer for arch_setup field.
9318 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9319 (the_low_target): Add initializer for arch_setup field.
9320 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9321 (the_low_target): Add initializer for arch_setup field.
9322 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9323 (the_low_target): Add initializer for arch_setup field.
9324 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9325 (init_registers_mips64_linux): Likewise.
9326 (the_low_target): Add initializer for arch_setup field.
9327 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9328 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9329 (the_low_target): Add initializer for arch_setup field.
9330 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9331 (init_registers_powerpc_64): Likewise.
9332 (the_low_target): Add initializer for arch_setup field.
9333 * linux-s390-low.c (init_registers_s390): Add prototype.
9334 (init_registers_s390x): Likewise.
9335 (the_low_target): Add initializer for arch_setup field.
9336 * linux-sh-low.c (init_registers_sh): Add prototype.
9337 (the_low_target): Add initializer for arch_setup field.
9338 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9339 (the_low_target): Add initializer for arch_setup field.
9340 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9341 (the_low_target): Add initializer for arch_setup field.
9342
9343 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9344 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9345 instead of init_registers ().
9346 * win32-arm-low.c (init_registers_arm): Add prototype.
9347 (the_low_target): Add initializer for arch_setup field.
9348 * win32-i386-low.c (init_registers_i386): Add prototype.
9349 (the_low_target): Add initializer for arch_setup field.
9350
9351 * spu-low.c (init_registers_spu): Add prototype.
9352 (initialize_low): Call initialie_registers_spu () instead of
9353 initialize_registers ().
9354
9355 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9356
9357 * server.c (handle_v_requests): When handling the vRun and vAttach
9358 packets, if already debugging a process, don't kill it. Return an
9359 error instead.
9360
9361 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9362
9363 * server.c (handle_query): Correct length check.
9364
9365 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9366
9367 * win32-low.c (do_initial_child_stuff): Add process handle
9368 parameter. Set current_process_handle and current_process_id from the
9369 parameters. Clear globals.
9370 (win32_create_inferior): Don't set current_process_handle and
9371 current_process_id here. Instead pass them on the call to
9372 do_initial_child_stuff.
9373 (win32_attach): Likewise.
9374 (win32_clear_inferiors): New.
9375 (win32_kill): Don't close the current process handle or the
9376 current thread handle here. Instead call win32_clear_inferiors.
9377 (win32_detach): Don't open a new handle to the process. Call
9378 win32_clear_inferiors.
9379 (win32_join): Don't rely on current_process_handle; open a new
9380 handle using the process id.
9381 (win32_wait): Call win32_clear_inferiors when the inferior process
9382 has exited.
9383
9384 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9385
9386 * server.c (monitor_show_help): Add "exit".
9387
9388 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9389
9390 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9391 (clean): Add reg-xtensa.c.
9392 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9393 * configure.srv (xtensa*-*-linux*) New target.
9394 * linux-xtensa-low.c: New.
9395 * xtensa-xtregs.c: New.
9396
9397 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9398
9399 * hostio.c: Don't include errno.h.
9400 (errno_to_fileio_errno): Move to hostio-errno.
9401 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9402 error number outputting to the target->hostio_last_error callback.
9403 (hostio_packet_error): Use FILEIO_EINVAL directly.
9404 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9405 calls to hostio_error.
9406 * hostio-errno.c: New.
9407 * server.h (hostio_last_error_from_errno): Declare.
9408 * target.h (target_ops): Add hostio_last_error member.
9409 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9410 as hostio_last_error handler.
9411 * spu-low.c (spu_target_ops): Likewise.
9412 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9413 (wince_hostio_last_error): New functions.
9414 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9415 as hostio_last_error handler.
9416 (win32_target_ops) [!_WIN32_WCE]: Register
9417 hostio_last_error_from_errno as hostio_last_error handler.
9418 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9419 (hostio-errno.o): New rule.
9420 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9421 * configure.srv (srv_hostio_err_objs): New variable. Default to
9422 hostio-errno.o.
9423 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9424 * configure: Regenerate.
9425
9426 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9427
9428 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9429 (linux_kill, linux_detach): Clean up the process list.
9430 * remote-utils.c (remote_open): Improve port number parsing.
9431 (putpkt_binary, input_interrupt): Only send interrupts if the target
9432 is running.
9433 * server.c (extended_protocol): Make static.
9434 (attached): Define earlier.
9435 (exit_requested, response_needed, program_argv): New variables.
9436 (target_running): New.
9437 (start_inferior): Clear attached here.
9438 (attach_inferior): Set attached here.
9439 (require_running): Define.
9440 (handle_query): Use require_running and target_running. Implement
9441 "monitor exit".
9442 (handle_v_attach, handle_v_run): New.
9443 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9444 (gdbserver_usage): Update.
9445 (main): Redo argument parsing. Handle --debug and --multi. Handle
9446 --attach along with other options or after the port. Save
9447 program_argv. Support no initial program. Resynchronize
9448 communication with GDB after an error. Handle "monitor exit".
9449 Use require_running and target_running. Always allow the extended
9450 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9451 restart in extended mode.
9452 * README: Refer to the GDB manual. Update --attach usage.
9453
9454 2007-12-20 Andreas Schwab <schwab@suse.de>
9455
9456 * linux-low.c (STACK_SIZE): Define.
9457 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9458 (linux_test_for_tracefork): Likewise.
9459
9460 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9461
9462 * linux-low.c (linux_wait_for_event): Update messages. Do not
9463 reinsert auto-delete breakpoints.
9464 * mem-break.c (struct breakpoint): Change return type of handler to
9465 int.
9466 (set_breakpoint_at): Update handler type.
9467 (reinsert_breakpoint_handler): Return 1 instead of calling
9468 delete_breakpoint.
9469 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9470 setting a new one.
9471 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9472 * mem-break.h (set_breakpoint_at): Update handler type.
9473 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9474 * win32-low.c (auto_delete_breakpoint): New.
9475 (get_child_debug_event): Use it.
9476
9477 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9478
9479 * configure.ac: Check for pread and pwrite.
9480 * hostio.c (handle_pread): Fall back to lseek and read.
9481 (handle_pwrite): Fall back to lseek and write.
9482 * config.in, configure: Regenerated.
9483
9484 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * server.c (myresume): Add own_buf argument.
9487 (main): Update calls.
9488
9489 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9490
9491 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9492 * remote-utils.c (remote_open): Do not call disable_async_io.
9493 (block_async_io): Delete.
9494 (unblock_async_io): Make static.
9495 (initialize_async_io): New.
9496 * server.c (handle_v_cont): Handle async I/O here.
9497 (myresume): Likewise. Move other common resume tasks here...
9498 (main): ... from here. Call initialize_async_io. Disable async
9499 I/O before the main loop.
9500 * server.h (initialize_async_io): Declare.
9501 (block_async_io, unblock_async_io): Delete prototypes.
9502 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9503
9504 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9505
9506 * remote-utils.c (readchar): Allow binary data in received messages.
9507
9508 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9509
9510 * win32-low.c (attaching): New global.
9511 (win32_create_inferior): Clear the `attaching' global.
9512 (win32_attach): Set the `attaching' global.
9513 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9514 attaching. Only set a breakpoint at the entry point if not
9515 attaching.
9516
9517 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9518
9519 * server.c (main): Don't report dll events on the initial
9520 connection on attaches.
9521
9522 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9523
9524 * server.c (main): Relax numerical bases supported for the pid of
9525 the --attach command line argument.
9526
9527 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9528
9529 * win32-low.c (win32_attach): Call OpenProcess before
9530 DebugActiveProcess, not after. Add last error output to error
9531 call.
9532
9533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9534
9535 * win32-low.c (win32_get_thread_context)
9536 (win32_set_thread_context): New functions.
9537 (thread_rec): Use win32_get_thread_context.
9538 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9539 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9540 field.
9541
9542 2007-12-03 Leo Zayas
9543 Pedro Alves <pedro_alves@portugalmail.pt>
9544
9545 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9546 global variables.
9547 (child_add_thread): Minor cleanup.
9548 (child_continue): Resume artificially suspended threads before
9549 calling ContinueDebugEvent.
9550 (suspend_one_thread): New.
9551 (fake_breakpoint_event): New.
9552 (get_child_debug_event): Change return type to int. Check here if
9553 gdb sent an interrupt request. If a soft interrupt was requested,
9554 fake a breakpoint event. Return 0 if there is no event to handle,
9555 and 1 otherwise.
9556 (win32_wait): Don't check here if gdb sent an interrupt request.
9557 Ensure there is a valid event to handle.
9558 (win32_request_interrupt): Add soft interruption method as last
9559 resort.
9560
9561 2007-12-03 Leo Zayas
9562 Pedro Alves <pedro_alves@portugalmail.pt>
9563
9564 * win32-low.h (win32_thread_info): Add descriptions to the
9565 structure members. Replace `suspend_count' counter by a
9566 `suspended' flag.
9567 * win32-low.c (thread_rec): Update condition of when to get the
9568 context from the inferior. Rely on ContextFlags being set if it
9569 has already been retrieved. Only suspend the inferior thread if
9570 we haven't already. Warn if that fails.
9571 (continue_one_thread): s/suspend_count/suspended/. Only call
9572 ResumeThread once. Warn if that fails.
9573
9574 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9575
9576 * win32-low.c (win32_wait): Don't read from the inferior when it
9577 has already exited.
9578
9579 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9580
9581 * Makefile.in (win32_low_h): New variable.
9582 (win32-low.o): Add dependency on $(win32_low_h).
9583 (win32-arm-low.o, win32-i386-low.o): New rules.
9584
9585 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9586
9587 * hostio.c: Correct copyright year.
9588
9589 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9590
9591 * Makefile.in (OBS): Add hostio.o.
9592 (hostio.o): New rule.
9593 * server.h (handle_vFile): Declare.
9594 * hostio.c: New file.
9595 * server.c (handle_v_requests): Take packet_len and new_packet_len
9596 for binary packets. Call handle_vFile.
9597 (main): Update call to handle_v_requests.
9598
9599 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9600
9601 * linux-low.c: Include <sched.h>.
9602
9603 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9604
9605 * linux-low.c (linux_tracefork_grandchild): New.
9606 (linux_tracefork_child): Use clone.
9607 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9608
9609 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9610
9611 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9612
9613 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9614
9615 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9616
9617 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * inferiors.c (change_inferior_id): Delete.
9620 (add_pid_to_list, pull_pid_from_list): New.
9621 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9622 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9623 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9624 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9625 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9626 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9627 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9628 (using_threads): Always set to 1.
9629 (handle_extended_wait): New.
9630 (add_process): Do not set TID.
9631 (linux_create_inferior): Set must_set_ptrace_flags.
9632 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9633 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9634 (linux_thread_alive): Rename TID argument to LWPID.
9635 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9636 (linux_wait_for_event): Do not use TID or check using_threads. Update
9637 call to dead_thread_notify. Call handle_extended_wait.
9638 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9639 (send_sigstop): Delete sigstop_sent.
9640 (wait_for_sigstop): Avoid TID.
9641 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9642 (linux_test_for_tracefork): New.
9643 (linux_lookup_signals): Use thread_db_active and
9644 linux_supports_tracefork_flag.
9645 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9646 * linux-low.h (get_process_thread): Avoid TID.
9647 (struct process_ifo): Move thread_known and tid to the end. Remove
9648 sigstop_sent.
9649 (linux_attach_lwp, thread_db_init): Update prototypes.
9650 * server.h (change_inferior_id): Delete prototype.
9651 (add_pid_to_list, pull_pid_from_list): New prototypes.
9652 * thread-db.c (thread_db_use_events): New.
9653 (find_first_thread): Rename to...
9654 (find_one_thread): ...this. Update callers and messages. Do not
9655 call fatal. Check thread_db_use_events. Do not call
9656 change_inferior_id or new_thread_notify.
9657 (maybe_attach_thread): Update. Do not call new_thread_notify.
9658 (thread_db_init): Set thread_db_use_events. Check use_events.
9659 * utils.c (fatal, warning): Correct message prefix.
9660
9661 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * Makefile.in (clean): Remove new files.
9664 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9665 (powerpc-64.o, powerpc-64.c): New rules.
9666 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9667 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9668 with SPE.
9669 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9670 SPE targets.
9671 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9672 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9673 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9674 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9675 (target_regsets): Add AltiVec and SPE register sets.
9676 * configure.ac: Check for AltiVec and SPE.
9677 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9678 (ppc_fill_vrregset, ppc_store_vrregset): New.
9679 (target_regsets): Add AltiVec register set.
9680 * configure: Regenerated.
9681
9682 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9683
9684 * linux-low.c (O_LARGEFILE): Define.
9685 (linux_read_memory): Use /proc/PID/mem.
9686 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9687 * configure, config.in: Regenerated.
9688
9689 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9690
9691 * linux-low.c (linux_wait_for_event): Do not pass signals while
9692 single-stepping.
9693
9694 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9695
9696 * win32-low.c (create_process): New.
9697 (win32_create_inferior): Use create_process instead of
9698 CreateProcess. If create_process failed retry appending an ".exe"
9699 suffix. Store the GetLastError result immediatelly after
9700 create_process calls and use it on the call to error.
9701
9702 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9703
9704 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9705
9706 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9707
9708 * configure.ac: Switch license to GPLv3.
9709
9710 2007-08-01 Michael Snyder <msnyder@access-company.com>
9711
9712 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9713
9714 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9715
9716 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9717 typedef.
9718 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9719 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9720 CloseToolhelp32Snapshot.
9721 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9722 CloseToolhelp32Snapshot.
9723
9724 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9725
9726 * server.c (main): Check for inferior exit before main loop.
9727
9728 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9729
9730 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9731 instead of on tmp_desc.
9732
9733 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9734 Daniel Jacobowitz <dan@codesourcery.com>
9735
9736 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9737 (add_thread): Minor cleanups.
9738 (clear_inferiors): Move lower in the file. Clear the DLL
9739 list.
9740 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9741 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9742 (xml_escape_text): New.
9743 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9744 for qSupported.
9745 (handle_v_cont): Report errors.
9746 (gdbserver_version): Update.
9747 (main): Correct size of own_buf. Do not report initial DLL events.
9748 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9749 (unloaded_dll, xml_escape_text): New.
9750 * win32-low.c (enum target_waitkind): Update comments.
9751 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9752 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9753 (win32_EnumProcessModules, win32_GetModuleInformation)
9754 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9755 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9756 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9757 (win32_Module32First, win32_Module32Next, load_toolhelp)
9758 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9759 (get_child_debug_event): Handle DLL events.
9760 (win32_wait): Likewise.
9761
9762 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9763
9764 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9765 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9766
9767 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9768
9769 * win32-low.c (handle_output_debug_string): Ignore event if not
9770 waiting.
9771
9772 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9773
9774 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9775
9776 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9777
9778 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9779
9780 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9781
9782 * inferiors.c (change_inferior_id): Add comment.
9783 * linux-low.c (check_removed_breakpoint): Add an early
9784 prototype. Improve debug output.
9785 (linux_attach): Doc update.
9786 (linux_detach_one_process, linux_detach): Clean up before releasing
9787 each process.
9788 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9789 * linux-low.h (struct process_info): Doc improvement.
9790 * mem-break.c (delete_all_breakpoints): New.
9791 * mem-break.h (delete_all_breakpoints): New prototype.
9792 * thread-db.c (find_first_thread): New.
9793 (thread_db_create_event): Call it instead of
9794 thread_db_find_new_threads. Clean up unused variables.
9795 (maybe_attach_thread): Remove first thread handling.
9796 (thread_db_find_new_threads): Use find_first_thread.
9797 (thread_db_get_tls_address): Likewise.
9798
9799 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9800
9801 * thread-db.c (thread_db_find_new_threads): Add prototype.
9802 (thread_db_create_event): Check for the main thread before adding
9803 a new thread.
9804 (maybe_attach_thread): Only enable event reporting if TID == 0.
9805 (thread_db_get_tls_address): Check for new threads.
9806
9807 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9808
9809 * linux-low.c (linux_create_inferior): Try execv before execvp.
9810 * spu-low.c (spu_create_inferior): Likewise.
9811
9812 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9813
9814 * linux-low.c (linux_create_inferior): Change execv to execvp.
9815 * spu-low.c (spu_create_inferior): Likewies.
9816
9817 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9818
9819 * Makefile.in (clean): Clean new files instead of deleted ones.
9820 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9821 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9822 rules.
9823 * configure.srv: Specify XML files and new regformats for MIPS and
9824 MIPS64 GNU/Linux.
9825 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9826 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9827 an entry for the restart register.
9828 (mips_cannot_fetch_register, mips_cannot_store_register)
9829 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9830 register names to match the XML descriptions.
9831 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9832 restart register instead of $0.
9833
9834 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9835 Markus Deuling <deuling@de.ibm.com>
9836
9837 * remote-utils.c (decode_xfer_write): New function.
9838 * server.h (decode_xfer_write): Add prototype.
9839 * server.c (handle_query): Add PACKET_LEN argument. Support
9840 qXfer:spu:read and qXfer:spu:write packets.
9841 (main): Pass packet_len to handle_query.
9842 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9843 * target.h (target_ops): Add qxfer_spu.
9844
9845 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9846
9847 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9848 accessing non-seekable spufs files.
9849
9850 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9851
9852 * server.c (handle_query): Add reply for qC packet.
9853
9854 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9855 Leo Zayas <lerele@champenstudios@com>
9856
9857 * server.h (check_remote_input_interrupt_request): New function.
9858 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9859 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9860 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9861 (check_remote_input_interrupt_request): New function.
9862 * server.h (check_remote_input_interrupt_request): Declare.
9863 * win32-low.c (winapi_DebugBreakProcess,
9864 winapi_GenerateConsoleCtrlEvent): New typedefs.
9865 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9866 to 250 ms.
9867 (win32_wait): Check for remote interrupt request
9868 with check_remote_input_interrupt_request.
9869 (win32_request_interrupt): New function.
9870 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9871
9872 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9873
9874 * win32-low.c (debug_registers_changed,
9875 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9876 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9877 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9878 (thread_rec): Get context using the low target.
9879 (child_add_thread): Call thread_added on the low target,
9880 which does the same thing.
9881 (regptr): Delete.
9882 (do_initial_child_stuff): Remove debug registers references.
9883 Set context using the low target. Resume threads after
9884 setting the contexts.
9885 (child_continue): Remove dead variable. Remove debug
9886 registers references.
9887 (child_fetch_inferior_registers): Go through the low target.
9888 (do_child_store_inferior_registers): Remove.
9889 (child_store_inferior_registers): Go through the low target.
9890 (win32_resume): Remove debug registers references.
9891 Set context using the low target.
9892 (handle_exception): Change return type to void. Don't record
9893 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9894 first chance exception.
9895 (get_child_debug_event): Change return type to void. Remove
9896 goto loop. Always return after waiting for debug event.
9897 (win32_wait): Convert to switch statement. Handle spurious
9898 events.
9899
9900 * win32-i386-low.c (debug_registers_changed,
9901 debug_registers_used): New.
9902 (initial_stuff): Rename to ...
9903 (i386_initial_stuff): ... this. Clear debug registers
9904 state variables.
9905 (store_debug_registers): Delete.
9906 (i386_get_thread_context): New.
9907 (load_debug_registers): Delete.
9908 (i386_set_thread_context): New.
9909 (i386_thread_added): New.
9910 (single_step): Rename to ...
9911 (i386_single_step): ... this.
9912 (do_fetch_inferior_registers): Rename to ...
9913 (i386_fetch_inferior_register): ... this.
9914 (i386_store_inferior_register): New.
9915 (the_low_target): Adapt to new interface.
9916
9917 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9918 (arm_get_thread_context): New.
9919 (arm_set_thread_context): New.
9920 (regptr): New.
9921 (do_fetch_inferior_registers): Rename to ...
9922 (arm_fetch_inferior_register): ... this.
9923 (arm_store_inferior_register): New.
9924 (arm_wince_breakpoint): Reimplement as unsigned long.
9925 (arm_wince_breakpoint_len): Define.
9926 (the_low_target): Adapt to new interface.
9927
9928 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9929 load_debug_registers. Add get_thread_context, set_thread_context,
9930 thread_added and store_inferior_register. Rename
9931 fetch_inferior_registers to fetch_inferior_register.
9932 (regptr): Remove declaration.
9933
9934 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9935
9936 * linux-low.c (linux_detach): Change return type to int. Return 0.
9937 * spu-low.c (spu_detach): Likewise.
9938
9939 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9940
9941 * target.h (target_ops): Change return type of detach to int.
9942 Add join.
9943 (join_inferior): New.
9944 * server.c (main): Don't skip detach support on mingw32.
9945 If the inferior doesn't support detaching return error.
9946 Call join_inferior instead of using waitpid.
9947 * linux-low.c (linux_join): New.
9948 (linux_target_op): Add linux_join.
9949 * spu-low.c (spu_join): New.
9950 (spu_target_ops): Add spu_join.
9951 * win32-low.c (win32_detach): Adapt to new interface.
9952 Reopen current_process_handle before detaching. Issue a child
9953 resume before detaching.
9954 (win32_join): New.
9955 (win32_target_op): Add win32_join.
9956
9957 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9958
9959 * win32-low.c (win32-attach): Fix return value.
9960 * target.h (target_ops): Describe ATTACH return values.
9961
9962 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9963
9964 * win32-low.c (GETPROCADDRESS): Define.
9965 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9966 (winapi_DebugSetProcessKillOnExit): Likewise.
9967 (win32_create_inferior): Force usage of ansi CreateProcessA.
9968 (win32_attach): Use GETPROCADDRESS.
9969 (win32_detach): Likewise.
9970
9971 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9972
9973 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9974
9975 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9976
9977 * win32-low.c: Commit leftover changes from 2007-03-29.
9978
9979 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9980
9981 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9982 fields short instead of int. Add explicit padding.
9983 (i387_cache_to_fsave): Remove unnecessary casts.
9984 (i387_fsave_to_cache): Doc fix.
9985 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9986
9987 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9988
9989 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9990 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9991
9992 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9993
9994 * configure.srv (arm*-*-mingw32ce*): Move near the other
9995 arm targets.
9996
9997 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9998
9999 * configure.ac: Add errno checking.
10000 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10001 sys/file.h and malloc.h.
10002 (AC_CHECK_DECLS): Add perror.
10003 (srv_mingwce): Handle.
10004 * configure.srv (i[34567]86-*-cygwin*): Add
10005 win32-i386-low.o to srv_tgtobj.
10006 (i[34567]86-*-mingw*): Likewise.
10007 (arm*-*-mingw32ce*): Add case.
10008 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10009 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10010 [__MINGW32CE__] (strerror): New function.
10011 [__MINGW32CE__] (errno): Define to GetLastError.
10012 [__MINGW32CE__] (COUNTOF): New macro.
10013 (remote_open): Remove extra close call.
10014 * mem-break.c (delete_breakpoint_at): New function.
10015 * mem-break.h (delete_breakpoint_at): Declare.
10016 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10017 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10018 [USE_WIN32API] (read, write): Add char* casts.
10019 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10020 * server.h: Include wincecompat.h on Windows CE.
10021 [HAVE_ERRNO_H]: Check.
10022 (perror): Declare if not declared.
10023 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10024 (perror_with_name): Remove errno declaration.
10025 * wincecompat.h: New.
10026 * wincecompat.c: New.
10027 * win32-low.h: New.
10028 * win32-arm-low.c: New.
10029 * win32-i386-low.c: New.
10030 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10031 (OUTMSG2): Make it safe.
10032 (_T): New macro.
10033 (COUNTOF): New macro.
10034 (NUM_REGS): Get it from the low target.
10035 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10036 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10037 (thread_rec): Let low target handle debug registers.
10038 (child_add_thread): Likewise.
10039 (child_init_thread_list): Likewise.
10040 (continue_one_thread): Likewise.
10041 (regptr): New.
10042 (do_child_fetch_inferior_registers): Move to ...
10043 * win32-i386-low.c: ... here, and rename to ...
10044 (do_fetch_inferior_registers): ... this.
10045 * win32-low.c (child_fetch_inferior_registers):
10046 Go through the low target.
10047 (do_child_store_inferior_registers): Use regptr.
10048 (strwinerror): New function.
10049 (win32_create_inferior): Handle Windows CE.
10050 Use strwinerror instead of strerror on Windows error
10051 codes. Add program to the error output.
10052 Don't close the main thread handle on Windows CE.
10053 (win32_attach): Use coredll.dll on Windows CE.
10054 (win32_kill): Close current process and current
10055 thread handles.
10056 (win32_detach): Use coredll.dll on Windows CE.
10057 (win32_resume): Let low target handle debug registers, and
10058 step request.
10059 (handle_exception): Add/Remove initial breakpoint. Avoid
10060 non-existant WSTOPSIG on Windows CE.
10061 (win32_read_inferior_memory): Cast to remove warning.
10062 (win32_arch_string): Go through the low target.
10063 (initialize_low): Call set_breakpoint_data with the low
10064 target's breakpoint.
10065 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10066 FOP_REGNUM, mappings): Move to ...
10067 * win32-i386-low.c: ... here.
10068 * win32-low.c (win32_thread_info): Move to ...
10069 * win32-low.h: ... here.
10070 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10071 win32-arm-low.c and wincecompat.c.
10072 (all:): Add $EXEEXT.
10073 (install-only:): Likewise.
10074 (gdbserver:): Likewise.
10075 (gdbreplay:): Likewise.
10076 * config.in: Regenerate.
10077 * configure: Regenerate.
10078
10079 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10080
10081 * win32-low.c: Rename typedef thread_info to
10082 win32_thread_info throughout.
10083
10084 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10085
10086 * win32-i386-low.c: Rename to ...
10087 * win32-low.c: ... this.
10088 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10089 * Makefile.in: Likewise.
10090
10091 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10092
10093 * remote-utils.c (monitor_output): Constify msg parameter.
10094 * server.h (monitor_output): Likewise.
10095 * win32-i386-low.c (handle_output_debug_string): New.
10096 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10097 handle_output_debug_string.
10098 (get_child_debug_event): Likewise.
10099
10100 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10101
10102 * server.c (main): Correct strtoul check.
10103
10104 2007-03-27 Jon Ringle <jon@ringle.org>
10105
10106 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10107
10108 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10109
10110 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10111
10112 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * terminal.h: Check HAVE_SGTTY_H.
10115
10116 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10117
10118 * remote-utils.c (remote_open): Print out the assigned port number.
10119
10120 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * remote-utils.c (monitor_output): New function.
10123 * server.c (debug_threads): Define here.
10124 (monitor_show_help): New function.
10125 (handle_query): Handle qRcmd.
10126 (main): Do not handle 'd' packet.
10127 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10128 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10129 of debug_threads.
10130
10131 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10132
10133 * Makefile.in (EXEEXT): New.
10134 (clean): Use $(EXEEXT).
10135
10136 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10137
10138 * target.h (target_ops): Rename send_signal to request_interrupt,
10139 and remove enum target_signal parameter.
10140 * linux-low.c (linux_request_interrupt): Rename from
10141 linux_send_signal, and always send SIGINT.
10142 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10143 and always send SIGINT.
10144 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10145 of send_signal.
10146 (input_interrupt): Likewise.
10147
10148 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10149
10150 * server.c (get_features_xml): Check if target implemented
10151 arch_string.
10152 * win32-i386-low.c (win32_arch_string): New.
10153 (win32_target_ops): Add win32_arch_string as arch_string member.
10154
10155 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10156
10157 * spu-low.c (spu_arch_string): New.
10158 (spu_target_ops): Add spu_arch_string.
10159
10160 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10161
10162 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10163 * configure.ac: Do not check for terminal.h.
10164 * configure, config.in: Regenerated.
10165
10166 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * Makefile.in (OBS): Add $(XML_BUILTIN).
10169 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10170 (clean): Update.
10171 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10172 (arm-with-iwmmxt.c): New.
10173 * config.in, configure: Regenerate.
10174 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10175 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10176 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10177 (arm*-*-linux*): Add iWMMXt and regset support.
10178 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10179 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10180 (arm_store_wmmxregset, target_regsets): New.
10181 * server.c (get_features_xml): Take annex argument. Check builtin
10182 XML documents.
10183 (handle_query): Handle multiple annexes.
10184
10185 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * remote-utils.c [USE_WIN32API] (read, write): Define.
10188 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10189 write.
10190
10191 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10192
10193 * linux-i386-low.c (the_low_target): Set arch_string.
10194 * linux-x86-64-low.c (the_low_target): Likewise.
10195 * linux-low.c (linux_arch_string): New.
10196 (linux_target_ops): Add it.
10197 * linux-low.h (struct linux_target_ops): Add arch_string.
10198 * server.c (write_qxfer_response): Use const void * for DATA.
10199 (get_features_xml): New.
10200 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10201 * target.h (struct target_ops): Add arch_string method.
10202
10203 2007-01-03 Denis Pilat <denis.pilat@st.com>
10204 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * linux-low.c (linux_kill): Handle being called with no threads.
10207 * win32-i386-low.c (win32_kill): Likewise.
10208 (get_child_debug_event): Clear current_process_handle.
10209
10210 2006-12-30 Denis PILAT <denis.pilat@st.com>
10211 Daniel Jacobowitz <dan@codesourcery.com>
10212
10213 * remote-utils.c (remote_open): Check the type of specified
10214 serial port devices before opening them.
10215 * server.c (main): Kill the inferior if an error occurs during
10216 the first remote_open.
10217
10218 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10219
10220 * README: Update supported targets.
10221
10222 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * Makefile.in (clean): Remove reg-mips64.c.
10225 (reg-mips64.c, reg-mips64.o): New rules.
10226 * configure.srv: Handle mips64. Include regset support for mips.
10227 * linux-mips-low.c (union mips_register): New.
10228 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10229 (mips_breakpoint, mips_breakpoint_at): Use int.
10230 (mips_collect_register, mips_supply_register)
10231 (mips_collect_register_32bit, mips_supply_register_32bit)
10232 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10233 (mips_store_fpregset, target_regsets): New.
10234 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10235
10236 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10237
10238 * configure.srv: Add target "spu*-*-*".
10239 * Makefile.in (clean): Remove reg-spu.c.
10240 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10241 * spu-low.c: New file.
10242
10243 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * configure.ac: Correct td_thr_tls_get_addr test.
10246 * configure: Regenerated.
10247
10248 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10249
10250 * linux-low.c (linux_wait_for_event): Reformat. Use the
10251 pass_signals array.
10252 * remote-utils.c (decode_address_to_semicolon): New.
10253 * server.c (pass_signals, handle_general_set): New.
10254 (handle_query): Mention QPassSignals for qSupported.
10255 (main): Call handle_general_set.
10256 * server.h (pass_signals, decode_address_to_semicolon): New.
10257
10258 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * server.c (handle_query): Correct error handling for read_auxv.
10261
10262 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10263
10264 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10265 and srv_linux_thread_db to yes.
10266 * linux-s390-low.c (s390_fill_gregset): New function.
10267 (target_regsets): Define data structure.
10268
10269 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10270
10271 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10272 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10273 * config.in, configure: Regenerated.
10274 * inferiors.c (gdb_id_to_thread): New function.
10275 (gdb_id_to_thread_id): Use it.
10276 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10277 * linux-low.h (struct process_info): Add th member.
10278 (thread_db_get_tls_address): New prototype.
10279 * remote-utils.c (decode_address): Make non-static.
10280 * server.c (handle_query): Handle qGetTLSAddr.
10281 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10282 * target.h (struct target_ops): Add get_tls_address.
10283 * thread-db.c (maybe_attach_thread): Save the thread handle.
10284 (thread_db_get_tls_address): New.
10285
10286 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10287
10288 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10289 (linux_resume_one_process): Take a siginfo_t *. Update all
10290 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10291 (struct pending_signals): Add a siginfo_t.
10292 (linux_wait_for_process): Always set last_status.
10293 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10294 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10295 * linux-low.h (struct process_info): Add last_status.
10296
10297 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10298
10299 * remote-utils.c (try_rle): New function.
10300 (putpkt_binary): Use it.
10301
10302 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10303
10304 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10305 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10306 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10307 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10308 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10309 point registers.
10310
10311 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10312
10313 * server.c (terminal_fd): New variable.
10314 (old_foreground_pgrp): Likewise.
10315 (restore_old_foreground_pgrp): New function.
10316 (start_inferior): Record the terminal file descriptor in terminal_fd
10317 and its original foreground group in old_foreground_pgrp. Register
10318 restore_old_foreground_pgrp with atexit().
10319
10320 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * server.c (handle_query): Correct qPart to qXfer.
10323
10324 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10325
10326 * configure.ac: Check for more headers which are missing on
10327 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10328 * configure.srv: Add Cygwin and mingw32.
10329 * remote-utils.c: Don't include headers unconditionally which
10330 are missing on mingw32. Include <winsock.h> for mingw32.
10331 (remote_open): Adjust for mingw32 support. Flush
10332 standard error after writing to it.
10333 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10334 (unblock_async_io, enable_async_io, disable_async_io)
10335 (readchar, getpkt): Update for Winsock support.
10336 (prepare_resume_reply): Expect a protocol signal number.
10337 * server.c: Disable <sys/wait.h> on mingw32.
10338 (start_inferior): Adjust for mingw32 support. Flush
10339 standard error after writing to it.
10340 (attach_inferior): Likewise. Use protocol signal
10341 numbers.
10342 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10343 and names.
10344 * win32-i386-low.c: New file.
10345 * Makefile.in (XM_CLIBS): Set.
10346 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10347 (win32-i386-low.o): New dependency rule.
10348 * linux-low.c (linux_wait): Use target signal numbers.
10349 * target.h (struct target_ops): Doc fix.
10350 * server.h (target_signal_to_name): New prototype.
10351 * gdbreplay.c: Don't include headers unconditionally which
10352 are missing on mingw32. Include <winsock.h> for mingw32.
10353 (remote_close, remote_open): Adjust for Winsock support.
10354 * configure, config.in: Regenerated.
10355
10356 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10357
10358 * server.c (decode_xfer_read, write_qxfer_response): New.
10359 (handle_query): Take a packet length argument. Handle
10360 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10361 the qSupported response.
10362 (main): Update call to handle_query.
10363
10364 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10367 (putpkt_binary): Renamed from putpkt and adjusted for binary
10368 data.
10369 (putpkt): New wrapper for putpkt_binary.
10370 (readchar): Don't mask off the high bit.
10371 (decode_X_packet): New function.
10372 * server.c (main): Call putpkt_binary if a handler sets the packet
10373 length. Save the length of the incoming packet. Handle 'X'.
10374 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10375
10376 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10377
10378 * server.c (handle_query): Handle qSupported.
10379
10380 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10381
10382 * remote-utils.c (all_symbols_looked_up): New variable.
10383 (look_up_one_symbol): Check it.
10384 * server.h (look_up_one_symbol): New declaration.
10385 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10386
10387 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * Makefile.in (linux-arm-low.o): Update dependencies.
10390 * linux-arm-low.c: Include "gdb_proc_service.h".
10391 (PTRACE_GET_THREAD_AREA): Define.
10392 (ps_get_thread_area): New function.
10393
10394 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10395
10396 * configure.srv (m68k*-*-uclinux*): New target.
10397 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10398 (linux_resume_one_process): Remove extraneous cast.
10399 (linux_read_offsets): New.
10400 (linux_target_op): Add linux_read_offsets on mmuless systems.
10401 * server.c (handle_query): Add qOffsets logic.
10402 * target.h (struct target_ops): Add read_offsets.
10403
10404 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10405
10406 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10407 (PTRACE_GET_THREAD_AREA): Define.
10408 (ps_get_thread_area): New function.
10409 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10410 (linux-x86-64-low.o): Update.
10411
10412 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * configure.ac: Remove checks for prfpregset_t.
10415 * gdb_proc_service.h: New file.
10416 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10417 new "gdb_proc_service.h".
10418 * proc-service.c: Likewise.
10419 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10420 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10421 * Makefile.in (gdb_proc_service_h): Updated.
10422 * configure, config.in: Regenerated.
10423
10424 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10425
10426 * remote-utils.c (prepare_resume_reply): Move declaration
10427 of gdb_id_from_wait to the top of the block.
10428
10429 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10430
10431 * linux-low.c (regsets_store_inferior_registers): Read the regset
10432 from the target before filling it.
10433
10434 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10435
10436 * server.c (attach_inferior): Return SIGTRAP for a successful
10437 attach.
10438
10439 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * Makefile.in (OBS): Add version.o.
10442 (STAGESTUFF): Delete.
10443 (version.o): Add dependencies.
10444 (version.c): Replace rule.
10445 (clean): Remove version.c.
10446 * server.c (gdbserver_version): New.
10447 (gdbserver_usage): Use printf.
10448 (main): Handle --version and --help.
10449 * server.h (version, host_name): Add declarations.
10450
10451 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10452
10453 * linux-arm-low.c:
10454 * linux-arm-low.c:
10455 * inferiors.c:
10456 * i387-fp.h:
10457 * i387-fp.c:
10458 * gdbreplay.c:
10459 * regcache.c:
10460 * proc-service.c:
10461 * mem-break.h:
10462 * mem-break.c:
10463 * linux-x86-64-low.c:
10464 * linux-sh-low.c:
10465 * linux-s390-low.c:
10466 * linux-ppc64-low.c:
10467 * linux-ppc-low.c:
10468 * linux-mips-low.c:
10469 * linux-m68k-low.c:
10470 * linux-m32r-low.c:
10471 * linux-low.h:
10472 * linux-low.c:
10473 * linux-ia64-low.c:
10474 * linux-i386-low.c:
10475 * linux-crisv32-low.c:
10476 * thread-db.c:
10477 * terminal.h:
10478 * target.h:
10479 * target.c:
10480 * server.h:
10481 * server.c:
10482 * remote-utils.c:
10483 * regcache.h:
10484 * utils.c:
10485 * Makefile.in:
10486 * configure.ac:
10487 * gdbserver.1: Add (C) after Copyright. Update the FSF
10488 address.
10489
10490 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10491
10492 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10493 (arm_breakpoint_at): Recognize both breakpoints.
10494 (the_low_target): Use the correct breakpoint instruction.
10495
10496 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10497
10498 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10499 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10500 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10501 (the_low_target): Update.
10502
10503 2005-10-25 Andreas Schwab <schwab@suse.de>
10504
10505 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10506
10507 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10508 (ia64_num_regs): Reduce to 462.
10509
10510 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * acinclude.m4: Correct quoting.
10513 * aclocal.m4: Regenerated.
10514
10515 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10516 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10517 (thread_db_init): Call thread_db_err_str.
10518 * configure.ac: Check for TD_VERSION.
10519 * config.in, configure: Regenerated.
10520
10521 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10522
10523 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10524
10525 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10528 is not available. Define HAVE_PTRACE_GETREGS if it is.
10529 * config.in, configure: Regenerated.
10530 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10531 * linux-i386-low.c, linux-m68k-low.c: Update to use
10532 HAVE_PTRACE_GETREGS.
10533 * linux-low.c (regsets_fetch_inferior_registers)
10534 (regsets_store_inferior_registers): Only return 0 if we processed
10535 GENERAL_REGS.
10536 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10537 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10538
10539 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10540
10541 * inferiors.c (struct thread_info): Add gdb_id.
10542 (add_thread): Add gdb_id argument.
10543 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10544 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10545 calls to add_thread.
10546 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10547 * server.c (handle_query): Use thread_to_gdb_id.
10548 (handle_v_cont, main): Use gdb_id_to_thread_id.
10549 * server.h (add_thread): Update prototype.
10550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10551 prototypes.
10552
10553 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10554
10555 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10556 left-padded registers.
10557 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10558 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10559
10560 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10561
10562 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10563 * configure: Regenerate.
10564 * config.in: Regenerate.
10565 * server.h (NEED_DECLARATION_STRERROR):
10566 Replace with !HAVE_DECL_STRERROR.
10567
10568 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * linux-low.c (linux_wait, linux_send_signal): Don't test
10571 an unsigned long variable for > 0 if it could be MAX_ULONG.
10572 * server.c (myresume): Likewise.
10573 * target.c (set_desired_inferior): Likewise.
10574
10575 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10576
10577 * configure.ac: Simplify and improve check for socklen_t.
10578 * configure, config.in: Regenerate.
10579
10580 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10581
10582 * acconfig.h: Remove.
10583 * configure.ac: Add a test for socklen_t. Use three-argument
10584 AC_DEFINE throughout.
10585 * config.in: Regenerated using autoheader 2.59.
10586 * configure: Regenerated.
10587
10588 * gdbreplay.c (socklen_t): Provide a default.
10589 (remote_open): Use socklen_t.
10590 * remote-utils.c (socklen_t): Provide a default.
10591 (remote_open): Use socklen_t.
10592 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10593 unsigned char.
10594
10595 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10596 char for buffers.
10597 * linux-low.c (linux_read_memory, linux_write_memory)
10598 (linux_read_auxv): Likewise.
10599 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10600 (check_mem_write): Likewise.
10601 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10602 Likewise.
10603 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10604 (registers_from_string, register_data): Likewise.
10605 * server.c (handle_query, main): Likewise.
10606 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10607 (decode_M_packet): Likewise.
10608 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10609 * target.h (struct target_ops): Update read_memory, write_memory,
10610 and read_auxv.
10611 (read_inferior_memory, write_inferior_memory): Update.
10612 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10613 to unsigned char *.
10614 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10615 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10616 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10617 linux-s390-low.c, linux-sh-low.c: Update for changes in
10618 read_inferior_memory and the_low_target->breakpoint.
10619
10620 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10621
10622 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10623 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10624 * configure.srv: Add powerpc64-*-linux*.
10625 * linux-ppc64-low.c: New file.
10626
10627 2005-05-23 Orjan Friberg <orjanf@axis.com>
10628
10629 * linux-cris-low.c: New file with support for CRIS.
10630 * linux-crisv32-low.c: Ditto for CRISv32.
10631 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10632 (clean): Add reg-cris.c and reg-crisv32.c.
10633 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10634 reg-crisv32.o, and reg-crisv32.c to make rules.
10635 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10636 recognized targets.
10637
10638 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10639
10640 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10641 of sizeof (PTRACE_XFER_TYPE).
10642 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10643
10644 2005-05-12 Orjan Friberg <orjanf@axis.com>
10645
10646 * target.h (struct target_ops): Add insert_watchpoint,
10647 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10648 pointers for hardware watchpoint support.
10649 * linux-low.h (struct linux_target_ops): Ditto.
10650 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10651 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10652 to linux_target_ops.
10653 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10654 reply packet.
10655 * server.c (main): Recognize 'Z' and 'z' packets.
10656
10657 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10658
10659 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10660 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10661 (the_low_target): Add new members.
10662
10663 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10664
10665 * proc-service.c (ps_lgetregs): Search all_processes instead of
10666 all_threads.
10667
10668 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10669
10670 * server.c (start_inferior): Change return type to int.
10671 (attach_inferior): Change sigptr to int *.
10672 (handle_v_cont, handle_v_requests): Change signal to int *.
10673 (main): Change signal to int.
10674
10675 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10676
10677 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10678 * configure.srv: Add m32r*-*-linux*.
10679 * linux-m32r-low.c: New file.
10680
10681 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10682
10683 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10684
10685 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10686
10687 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10688 Take unsigned long arguments for PIDs.
10689 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10690 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10691 (wait_for_sigstop, linux_resume_one_process)
10692 (regsets_fetch_inferior_registers, linux_send_signal)
10693 (linux_read_auxv): Likewise. Update the types of variables holding
10694 PIDs. Update format string specifiers.
10695 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10696 * remote-utils.c (prepare_resume_reply): Likewise.
10697 * server.c (cont_thread, general_thread, step_thread)
10698 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10699 unsigned long.
10700 (handle_query): Update format specifiers.
10701 (handle_v_cont, main): Use strtoul for thread IDs.
10702 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10703 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10704 (general_thread, step_thread, thread_from_wait)
10705 (old_thread_from_wait): Update.
10706 * target.h (struct thread_resume): Use unsigned long for THREAD.
10707 (struct target_ops): Use unsigned long for arguments to attach and
10708 thread_alive.
10709
10710 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10711
10712 * acinclude.m4: Include bfd/bfd.m4 directly.
10713 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10714 <agriffis@toolchain.org>.
10715 * aclocal.m4, configure: Regenerated.
10716
10717 2005-01-07 Andrew Cagney <cagney@gnu.org>
10718
10719 * configure.ac: Rename configure.in, require autoconf 2.59.
10720 * configure: Re-generate.
10721
10722 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10723
10724 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10725 LIBS when finished.
10726 * aclocal.m4: Regenerated.
10727 * configure: Regenerated.
10728
10729 2004-11-21 Andreas Schwab <schwab@suse.de>
10730
10731 * linux-m68k-low.c (m68k_num_gregs): Define.
10732 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10733 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10734 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10735 (m68k_breakpoint_at): New. Add to the_low_target.
10736
10737 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10738 srv_linux_thread_db to yes.
10739
10740 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10741
10742 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10743 (ARCH_SET_FS): Likewise.
10744 (ARCH_GET_FS): Likewise.
10745 (ARCH_GET_GS): Likewise.
10746
10747 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10748
10749 * linux-i386-low.c (ps_get_thread_area): New.
10750 * linux-x86-64-low.c (ps_get_thread_area): New.
10751 * linux-low.c: Include <sys/syscall.h>.
10752 (linux_kill_one_process): Don't kill the first thread here.
10753 (linux_kill): Kill the first thread here.
10754 (kill_lwp): New function.
10755 (send_sigstop, linux_send_signal): Use it.
10756 * proc-service.c: Clean up #ifdefs.
10757 (fpregset_info): Delete.
10758 (ps_lgetregs): Update and enable implementation.
10759 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10760 implementations.
10761 * remote-utils.c (struct sym_cache, symbol_cache): New.
10762 (input_interrupt): Print a clearer message.
10763 (async_io_enabled): New variable.
10764 (enable_async_io, disable_async_io): Use it. Update comments.
10765 (look_up_one_symbol): Use the symbol cache.
10766 * thread-db.c (thread_db_look_up_symbols): New function.
10767 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10768
10769 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10770
10771 * configure.in: Test for -rdynamic.
10772 * configure: Regenerated.
10773 * Makefile (INTERNAL_LDFLAGS): New.
10774 (gdbserver, gdbreplay): Use it.
10775
10776 2004-09-02 Andrew Cagney <cagney@gnu.org>
10777
10778 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10779
10780 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10781
10782 * linux-low.c (linux_wait): Clear all_processes list also.
10783
10784 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * linux-low.c: Include <errno.h>. Remove extern declaration of
10787 errno.
10788
10789 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10790
10791 * gdbreplay.c, server.h, utils.c: Update copyright years.
10792
10793 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10794
10795 * server.c (main): Print child status or termination signal from
10796 variable 'signal', not 'sig'.
10797
10798 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10799
10800 * linux-low.c (linux_read_memory): Change return type to
10801 int. Check for and return error from ptrace().
10802 * target.c (read_inferior_memory): Change return type to int. Pass
10803 back return status from the_target->read_memory().
10804 * target.h (struct target_ops): Adapt *read_memory() prototype.
10805 Update comment.
10806 (read_inferior_memory): Adapt prototype.
10807 * server.c (main): Return an error packet if
10808 read_inferior_memory() returns an error.
10809
10810 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10811
10812 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10813 Unify with other clean targets.
10814
10815 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10816
10817 * server.c (handle_v_cont): Call set_desired_inferior.
10818
10819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10820
10821 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10822
10823 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10824
10825 * linux-low.c (linux_wait): Unblock async I/O.
10826 (linux_resume): Block and enable async I/O.
10827 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10828 * server.h (block_async_io, unblock_async_io): Add prototypes.
10829
10830 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10831
10832 * remote-utils.c (remote_open): Print a status notice after
10833 opening a TCP port.
10834 * server.c (attach_inferior): Print a status notice after
10835 attaching.
10836
10837 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10838
10839 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10840
10841 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10842
10843 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10844 error packet.
10845 * server.c, target.h: Update copyright years.
10846
10847 2004-02-25 Roland McGrath <roland@redhat.com>
10848
10849 * target.h (struct target_ops): New member `read_auxv'.
10850 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10851 * linux-low.c (linux_read_auxv): New function.
10852 (linux_target_ops): Initialize `read_auxv' member to that.
10853
10854 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10855
10856 Committed by Jim Blandy <jimb@redhat.com>.
10857
10858 * linux-s390-low.c (s390_num_regs): Update.
10859 (s390_regmap): Remove control registers. Use __s390x__ predefine
10860 instead of GPR_SIZE to distiguish s390 and s390x targets.
10861
10862 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10863
10864 * linux-low.c: Update copyright year.
10865 (check_removed_breakpoint): Clear pending_is_breakpoint.
10866 (linux_set_resume_request, linux_queue_one_thread)
10867 (resume_status_pending_p): New functions.
10868 (linux_continue_one_thread): Use process->resume.
10869 (linux_resume): Only resume threads if there are no pending events.
10870 * linux-low.h (struct process_info): Add resume request
10871 pointer.
10872
10873 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10874
10875 * regcache.c (new_register_cache): Clear the allocated register
10876 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10877
10878 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10879
10880 * linux-low.c (linux_resume): Take a struct thread_resume *
10881 argument.
10882 (linux_wait): Update call.
10883 (resume_ptr): New static variable.
10884 (linux_continue_one_thread): Renamed from
10885 linux_continue_one_process. Use resume_ptr.
10886 (linux_resume): Use linux_continue_one_thread.
10887 * server.c (handle_v_cont, handle_v_requests): New functions.
10888 (myresume): New function.
10889 (main): Handle 'v' case.
10890 * target.h (struct thread_resume): New type.
10891 (struct target_ops): Change argument of "resume" to struct
10892 thread_resume *.
10893 (myresume): Delete macro.
10894
10895 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10896
10897 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10898 (uninstall): Support DESTDIR.
10899
10900 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10901
10902 * configure.srv: Add xscale*linux copy of arm*linux entry.
10903
10904 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * linux-arm-low.c (arm_reinsert_addr): New function.
10907 (the_low_target): Add arm_reinsert_addr.
10908
10909 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10910
10911 * mem-break.c: Remove whitespace at end of file.
10912
10913 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10914
10915 * configure.in: Check whether we need to prototype strerror.
10916 * server.h: Optionally prototype strerror.
10917 * gdbreplay.c (perror_with_name): Use strerror.
10918 * linux-low.c (linux_attach_lwp): Use strerror.
10919 * utils.c (perror_with_name): Use strerror.
10920 * config.in, configure: Regenerated.
10921
10922 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10923
10924 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10925 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10926
10927 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10928
10929 * Makefile.in (SFILES): Update.
10930 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10931 low-sun3.c: Remove files.
10932
10933 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10934
10935 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10936 (linux_detach_one_process, linux_detach): New functions.
10937 (linux_target_ops): Add linux_detach.
10938 * server.c (main): Handle 'D' packet.
10939 * target.h (struct target_ops): Add "detach" member.
10940 (detach_inferior): Define.
10941
10942 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10943
10944 From Kelley Cook <kelleycook@wideopenwest.com>:
10945 * configure.srv: Accept i[34567]86 variants.
10946
10947 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10948
10949 * linux-low.c (linux_wait_for_event): Correct comment typos.
10950 (linux_resume_one_process): Call check_removed_breakpoint.
10951 (linux_send_signal): New function.
10952 (linux_target_ops): Add linux_send_signal.
10953 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10954 of kill.
10955 * target.h (struct target_ops): Add send_signal.
10956
10957 2003-05-29 Jim Blandy <jimb@redhat.com>
10958
10959 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10960 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10961 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10962 away part of the register's value.
10963
10964 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10965
10966 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10967 (linux_wait_for_event, linux_init_signals): Likewise.
10968
10969 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10970
10971 * configure.in: Check for stdlib.h.
10972 * configure: Regenerated.
10973 * config.in: Regenerated.
10974
10975 2003-01-04 Andreas Schwab <schwab@suse.de>
10976
10977 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10978
10979 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10980
10981 * Makefile.in: Remove obsolete code.
10982
10983 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10984
10985 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10986 defined(PT_FPR0_HI).
10987
10988 2002-11-17 Stuart Hughes <seh@zee2.com>
10989
10990 * linux-arm-low.c (arm_num_regs): Increase.
10991 (arm_regmap): Include status register.
10992
10993 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10994
10995 * linux-low.c (register_addr): Remove incorrect -1 check.
10996
10997 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10998
10999 * linux-low.c (linux_create_inferior): Call setpgid. Return
11000 the new PID.
11001 (unstopped_p, linux_signal_pid): Remove.
11002 (linux_target_ops): Remove linux_signal_pid.
11003 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11004 global instead of target method.
11005 * target.h (struct target_ops): Remove signal_pid. Update comment
11006 for create_inferior.
11007 * server.c (signal_pid): New variable.
11008 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11009 gdbserver. Set the child to be the foreground process group.
11010 (attach_inferior): Set signal_pid.
11011
11012 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11013
11014 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11015
11016 2002-08-20 Jim Blandy <jimb@redhat.com>
11017
11018 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11019 default for this.
11020
11021 2002-08-01 Andrew Cagney <cagney@redhat.com>
11022
11023 * Makefile.in: Make chill references obsolete.
11024
11025 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11026
11027 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11028 * configure: Regenerate.
11029 * config.in: Regenerate.
11030
11031 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11032
11033 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11034 (perror_with_name, remote_close, remote_open, expect, play): Static.
11035
11036 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11037
11038 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11039 byte offsets instead of an array of indexes.
11040 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11041
11042 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11043
11044 * regcache.c: Add comment.
11045
11046 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11047
11048 * thread-db.c: New file.
11049 * proc-service.c: New file.
11050 * acinclude.m4: New file.
11051 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11052 proc-service.o, and thread-db.o.
11053 (linux-low.o): Add USE_THREAD_DB.
11054 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11055 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11056 * aclocal.m4: Regenerated.
11057 * config.in: Regenerated.
11058 * configure: Regenerated.
11059 * configure.in: Check for proc_service.h, sys/procfs.h,
11060 thread_db.h, and linux/elf.h headrs.
11061 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11062 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11063 Check for -lthread_db and thread support.
11064 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11065 PowerPC, and SuperH.
11066 * i387-fp.c: Constify arguments.
11067 * i387-fp.h: Likewise.
11068 * inferiors.c: (struct thread_info): Renamed from
11069 `struct inferior_info'. Remove PID member. Use generic inferior
11070 list header. All uses updated.
11071 (inferiors, signal_pid): Removed.
11072 (all_threads): New variable.
11073 (get_thread): Define.
11074 (add_inferior_to_list): New function.
11075 (for_each_inferior): New function.
11076 (change_inferior_id): New function.
11077 (add_inferior): Removed.
11078 (remove_inferior): New function.
11079 (add_thread): New function.
11080 (free_one_thread): New function.
11081 (remove_thread): New function.
11082 (clear_inferiors): Use for_each_inferior and free_one_thread.
11083 (find_inferior): New function.
11084 (find_inferior_id): New function.
11085 (inferior_target_data): Update argument type.
11086 (set_inferior_target_data): Likewise.
11087 (inferior_regcache_data): Likewise.
11088 (set_inferior_regcache_data): Likewise.
11089 * linux-low.c (linux_bp_reinsert): Remove.
11090 (all_processes, stopping_threads, using_thrads)
11091 (struct pending_signals, debug_threads, pid_of): New.
11092 (inferior_pid): Replace with macro.
11093 (struct inferior_linux_data): Remove.
11094 (get_stop_pc, add_process): New functions.
11095 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11096 Use add_process and add_thread.
11097 (linux_attach_lwp): New function, based on old linux_attach. Use
11098 add_process and add_thread. Set stop_expected for new threads.
11099 (linux_attach): New function.
11100 (linux_kill_one_process): New function.
11101 (linux_kill): Kill all LWPs.
11102 (linux_thread_alive): Use find_inferior_id.
11103 (check_removed_breakpoints, status_pending_p): New functions.
11104 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11105 Update. Use WNOHANG. Wait for cloned processes also. Update process
11106 struct for the found process.
11107 (linux_wait_for_event): New function.
11108 (linux_wait): Use it. Support LWPs.
11109 (send_sigstop, wait_for_sigstop, stop_all_processes)
11110 (linux_resume_one_process, linux_continue_one_process): New functions.
11111 (linux_resume): Support LWPs.
11112 (REGISTER_RAW_SIZE): Remove.
11113 (fetch_register): Use register_size instead. Call supply_register.
11114 (usr_store_inferior_registers): Likewise. Call collect_register.
11115 Fix recursive case.
11116 (regsets_fetch_inferior_registers): Improve error message.
11117 (regsets_store_inferior_registers): Add debugging.
11118 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11119 (unstopped_p, linux_signal_pid): New functions.
11120 (linux_target_ops): Add linux_signal_pid.
11121 (linux_init_signals): New function.
11122 (initialize_low): Call it. Initialize using_threads.
11123 * regcache.c (inferior_regcache_data): Add valid
11124 flag.
11125 (get_regcache): Fetch registers lazily. Add fetch argument
11126 and update all callers.
11127 (regcache_invalidate_one, regcache_invalidate): New
11128 functions.
11129 (new_register_cache): Renamed from create_register_cache.
11130 Return the new regcache.
11131 (free_register_cache): Change argument to a void *.
11132 (registers_to_string, registers_from_string): Call get_regcache
11133 with fetch flag set.
11134 (register_data): Make static. Pass fetch flag to get_regcache.
11135 (supply_register): Call get_regcache with fetch flag clear.
11136 (collect_register): Call get_regcache with fetch flag set.
11137 (collect_register_as_string): New function.
11138 * regcache.h: Update.
11139 * remote-utils.c (putpkt): Flush after debug output and use
11140 stderr.
11141 Handle input interrupts while waiting for an ACK.
11142 (input_interrupt): Use signal_pid method.
11143 (getpkt): Flush after debug output and use stderr.
11144 (outreg): Use collect_register_as_string.
11145 (new_thread_notify, dead_thread_notify): New functions.
11146 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11147 and general_thread.
11148 (look_up_one_symbol): Flush after debug output.
11149 * server.c (step_thread, server_waiting): New variables.
11150 (start_inferior): Don't use signal_pid. Update call to mywait.
11151 (attach_inferior): Update call to mywait.
11152 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11153 (main): Don't fetch/store registers explicitly. Use
11154 set_desired_inferior. Support proposed ``Hs'' packet. Update
11155 calls to mywait.
11156 * server.h: Update.
11157 (struct inferior_list, struct_inferior_list_entry): New.
11158 * target.c (set_desired_inferior): New.
11159 (write_inferior_memory): Constify.
11160 (mywait): New function.
11161 * target.h: Update.
11162 (struct target_ops): New signal_pid method.
11163 (mywait): Removed macro, added prototype.
11164
11165 * linux-low.h (regset_func): Removed.
11166 (regset_fill_func, regset_store_func): New.
11167 (enum regset_type): New.
11168 (struct regset_info): Add type field. Use new operation types.
11169 (struct linux_target_ops): stop_pc renamed to get_pc.
11170 Add decr_pc_after_break and breakpoint_at.
11171 (get_process, get_thread_proess, get_process_thread)
11172 (strut process_info, all_processes, linux_attach_lwp)
11173 (thread_db_init): New.
11174
11175 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11176 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11177 (the_low_target): Add new members.
11178 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11179 (i386_store_fpxregset): Constify.
11180 (target_regsets): Add new kind identifier.
11181 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11182 (i386_set_pc): Add debugging.
11183 (i386_breakpoint_at): New function.
11184 (the_low_target): Add new members.
11185 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11186 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11187 (mips_breakpoint_at): New.
11188 (the_low_target): Add new members.
11189 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11190 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11191 (the_low_target): Add new members.
11192 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11193 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11194 (the_low_target): Add new members.
11195 * linux-x86-64-low.c (target_regsets): Add new kind
11196 identifier.
11197
11198 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11199
11200 From Martin Pool <mbp@samba.org>:
11201 * server.c (gdbserver_usage): New function.
11202 (main): Call it.
11203
11204 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11205
11206 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11207 stop_at -> stop_pc.
11208
11209 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11210
11211 * Makefile.in: Remove obsolete code.
11212
11213 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11214
11215 * linux-low.c (regsets_fetch_inferior_registers),
11216 (regsets_store_inferior_registers): Removed cast to int from
11217 ptrace() calls.
11218 * regcache.h: Added declaration of struct inferior_info.
11219
11220 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11221
11222 * inferiors.c (struct inferior_info): Add regcache_data.
11223 (add_inferior): Call create_register_cache.
11224 (clear_inferiors): Call free_register_cache.
11225 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11226 * regcache.c (struct inferior_regcache_data): New.
11227 (registers): Remove.
11228 (get_regcache): New function.
11229 (create_register_cache, free_register_cache): New functions.
11230 (set_register_cache): Don't initialize the register cache here.
11231 (registers_to_string, registers_from_string, register_data): Call
11232 get_regcache.
11233 * regcache.h: Add prototypes.
11234 * server.h: Likewise.
11235
11236 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11237
11238 * mem-break.c: New file.
11239 * mem-break.h: New file.
11240 * Makefile.in: Add mem-break.o rule; update server.h
11241 dependencies.
11242 * inferiors.c (struct inferior_info): Add target_data
11243 member.
11244 (clear_inferiors): Free target_data member if set.
11245 (inferior_target_data, set_inferior_target_data): New functions.
11246 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11247 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11248 * linux-low.c (linux_bp_reinsert): New variable.
11249 (struct inferior_linux_data): New.
11250 (linux_create_inferior): Use set_inferior_target_data.
11251 (linux_attach): Likewise. Call add_inferior.
11252 (linux_wait_for_one_inferior): New function.
11253 (linux_wait): Call it.
11254 (linux_write_memory): Add const.
11255 (initialize_low): Call set_breakpoint_data.
11256 * linux-low.h (struct linux_target_ops): Add breakpoint
11257 handling members.
11258 * server.c (attach_inferior): Remove extra add_inferior
11259 call.
11260 * server.h: Include mem-break.h. Update inferior.c
11261 prototypes.
11262 * target.c (read_inferior_memory)
11263 (write_inferior_memory): New functions.
11264 * target.h (read_inferior_memory)
11265 (write_inferior_memory): Change macros to prototypes.
11266 (struct target_ops): Update comments. Add const to write_memory
11267 definition.
11268
11269 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11270
11271 * linux-low.c (usr_store_inferior_registers): Support
11272 registers which are allowed to fail to store.
11273 * linux-low.h (linux_target_ops): Likewise.
11274 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11275 (ppc_cannot_store_register): FPSCR may not be storable.
11276
11277 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11278
11279 * server.h: Include <string.h> if HAVE_STRING_H.
11280 * ChangeLog: Correct paths in last ChangeLog entry.
11281
11282 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11283
11284 * linux-low.h: Remove obsolete prototypes.
11285 (struct linux_target_ops): New.
11286 (extern the_low_target): New.
11287 * linux-low.c (num_regs, regmap): Remove declarations.
11288 (register_addr): Use the_low_target explicitly.
11289 (fetch_register): Likewise.
11290 (usr_fetch_inferior_registers): Likewise.
11291 (usr_store_inferior_registers): Likewise.
11292 * linux-arm-low.c (num_regs): Remove.
11293 (arm_num_regs): Define.
11294 (arm_regmap): Renamed from regmap, made static.
11295 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11296 made static.
11297 (arm_cannot_store_register): Renamed from cannot_store_register,
11298 made static.
11299 (the_low_target): New.
11300 * linux-i386-low.c (num_regs): Remove.
11301 (i386_num_regs): Define.
11302 (i386_regmap): Renamed from regmap, made static.
11303 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11304 made static.
11305 (i386_cannot_store_register): Renamed from cannot_store_register,
11306 made static.
11307 (the_low_target): New.
11308 * linux-ia64-low.c (num_regs): Remove.
11309 (ia64_num_regs): Define.
11310 (ia64_regmap): Renamed from regmap, made static.
11311 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11312 made static.
11313 (ia64_cannot_store_register): Renamed from cannot_store_register,
11314 made static.
11315 (the_low_target): New.
11316 * linux-m68k-low.c (num_regs): Remove.
11317 (m68k_num_regs): Define.
11318 (m68k_regmap): Renamed from regmap, made static.
11319 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11320 made static.
11321 (m68k_cannot_store_register): Renamed from cannot_store_register,
11322 made static.
11323 (the_low_target): New.
11324 * linux-mips-low.c (num_regs): Remove.
11325 (mips_num_regs): Define.
11326 (mips_regmap): Renamed from regmap, made static.
11327 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11328 made static.
11329 (mips_cannot_store_register): Renamed from cannot_store_register,
11330 made static.
11331 (the_low_target): New.
11332 * linux-ppc-low.c (num_regs): Remove.
11333 (ppc_num_regs): Define.
11334 (ppc_regmap): Renamed from regmap, made static.
11335 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11336 made static.
11337 (ppc_cannot_store_register): Renamed from cannot_store_register,
11338 made static.
11339 (the_low_target): New.
11340 * linux-s390-low.c (num_regs): Remove.
11341 (s390_num_regs): Define.
11342 (s390_regmap): Renamed from regmap, made static.
11343 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11344 made static.
11345 (s390_cannot_store_register): Renamed from cannot_store_register,
11346 made static.
11347 (the_low_target): New.
11348 * linux-sh-low.c (num_regs): Remove.
11349 (sh_num_regs): Define.
11350 (sh_regmap): Renamed from regmap, made static.
11351 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11352 made static.
11353 (sh_cannot_store_register): Renamed from cannot_store_register,
11354 made static.
11355 (the_low_target): New.
11356 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11357 (the_low_target): New.
11358
11359 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11360
11361 * Makefile.in: Add stamp-h target.
11362 * configure.in: Create stamp-h.
11363 * configure: Regenerated.
11364
11365 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11366
11367 * inferiors.c: New file.
11368 * target.c: New file.
11369 * target.h: New file.
11370 * Makefile.in: Add target.o and inferiors.o. Update
11371 dependencies.
11372 * linux-low.c (inferior_pid): New static variable,
11373 moved from server.c.
11374 (linux_create_inferior): Renamed from create_inferior.
11375 Call add_inferior. Return 0 on success instead of a PID.
11376 (linux_attach): Renamed from myattach.
11377 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11378 (linux_thread_alive): Renamed from mythread_alive.
11379 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11380 child dies.
11381 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11382 (regsets_store_inferior_registers): Correct error message.
11383 Add missing ``return 0''.
11384 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11385 (linux_store_registers): Renamed from store_inferior_registers.
11386 (linux_read_memory): Renamed from read_inferior_memory.
11387 (linux_write_memory): Renamed from write_inferior_memory.
11388 (linux_target_ops): New structure.
11389 (initialize_low): Call set_target_ops ().
11390 * remote-utils.c (unhexify): New function.
11391 (hexify): New function.
11392 (input_interrupt): Send signals to ``signal_pid''.
11393 * server.c (inferior_pid): Remove.
11394 (start_inferior): Update create_inferior call.
11395 (attach_inferior): Call add_inferior.
11396 (handle_query): New function.
11397 (main): Call handle_query for `q' packets.
11398 * server.h: Include "target.h". Remove obsolete prototypes.
11399 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11400
11401 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11402
11403 * Makefile.in: Add WARN_CFLAGS. Update configury
11404 dependencies.
11405 * configure.in: Check for <string.h>
11406 * configure: Regenerate.
11407 * config.in: Regenerate.
11408 * gdbreplay.c: Include needed system headers.
11409 (remote_open): Remove strchr prototype.
11410 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11411 * regcache.c (supply_register): Change buf argument to const void *.
11412 (supply_register_by_name): Likewise.
11413 (collect_register): Change buf argument to void *.
11414 (collect_register_by_name): Likewise.
11415 * regcache.h: Add missing prototypes.
11416 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11417 * server.c (handle_query): New function.
11418 (attached): New static variable, moved out of main.
11419 (main): Quiet longjmp clobber warnings.
11420 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11421 * utils.c (error): Remove NORETURN.
11422 (fatal): Likewise.
This page took 0.355335 seconds and 4 git commands to generate.