ca998dbb93d86b149012b652e81662d7bda1f150
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (resume_status_pending_p): Update comment.
4 (need_step_over_p): Update comment.
5
6 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-low.c (proceed_one_lwp): Return void, change parameter
9 type.
10 (unsuspend_and_proceed_one_lwp): Likewise.
11 (proceed_all_lwps): Use for_each_thread.
12 (unstop_all_lwps): Likewise.
13
14 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * linux-low.c (linux_resume_one_thread): Return void, take
17 parameter directly.
18 (linux_resume): Use for_each_thread.
19
20 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
21
22 * linux-low.c (send_sigstop_callback): Return void, change
23 parameter type. Rename to...
24 (send_sigstop): ... this.
25 (suspend_and_send_sigstop_callback): Return void, change parameter
26 type. Rename to...
27 (suspend_and_send_sigstop): ... this.
28 (stop_all_lwps): Use for_each_thread.
29
30 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * linux-low.c (lwp_running): Return bool, remove unused
33 argument.
34 (linux_stabilize_threads): Use find_thread.
35
36 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * linux-low.c (select_singlestep_lwp_callback): Remove.
39 (count_events_callback): Remove.
40 (select_event_lwp_callback): Remove.
41 (select_event_lwp): Use find_thread/for_each_thread.
42
43 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * linux-low.c (not_stopped_callback): Return bool, take filter
46 argument directly.
47 (linux_wait_for_event_filtered): Use find_thread.
48 (linux_wait_1): Likewise.
49
50 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
51
52 * linux-low.c (same_lwp): Remove.
53 (find_lwp_pid): Use find_thread.
54
55 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * linux-low.c (delete_lwp_callback): Remove.
58 (linux_mourn): Use for_each_thread.
59
60 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * linux-low.c (linux_detach_lwp_callback): Return void, remove
63 args parameter, don't check for pid.
64 (linux_detach): Use for_each_thread.
65
66 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
67
68 * linux-low.c (struct counter): Remove.
69 (second_thread_of_pid_p): Remove.
70 (last_thread_of_process_p): Use find_thread.
71
72 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
73
74 * inferiors.c (find_inferior_in_random): Remove.
75 * inferiors.h (find_inferior_in_random): Remove.
76 * linux-low.c (status_pending_p_callback): Return bool, accept
77 parameter ptid directly.
78 (linux_wait_for_event_filtered): Use find_thread_in_random.
79 (linux_wait_1): Likewise.
80
81 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
82
83 * inferiors.c (find_inferior_id): Remove.
84 (find_thread_ptid): Move implemention from find_inferior_id to
85 here.
86 * inferiors.h (find_inferior_id): Remove.
87 * server.c (handle_status): Use find_thread_ptid.
88 (process_serial_event): Likewise.
89 * thread-db.c (find_one_thread): Likewise.
90 (thread_db_thread_handle): Likewise.
91 * win32-low.c (thread_rec): Likewise.
92 (child_delete_thread): Likewise.
93 (win32_thread_alive): Likewise.
94 (get_child_debug_event): Likewise.
95
96 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
97
98 * linux-mips-low.c (update_watch_registers_callback): Return
99 void, remove pid_p parameter, don't check for pid.
100 (mips_insert_point, mips_remove_point): Use for_each_thread.
101
102 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * lynx.low (lynx_delete_thread_callback): Remove.
105 (lynx_mourn): Use for_each_thread.
106
107 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * regcache.c (regcache_invalidate_one): Remove.
110 (regcache_invalidate_pid): use for_each_thread.
111
112 2017-11-26 Tom Tromey <tom@tromey.com>
113
114 * linux-low.c (linux_create_inferior): Update.
115
116 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
117
118 * spu-low.c (spu_create_inferior): Fix typo in argument name.
119
120 2017-11-24 Alan Hayward <alan.hayward@arm.com>
121
122 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
123 * linux-aarch64-low.c (initialize_low_arch): Call init func.
124 * linux-aarch64-tdesc-selftest.c: New file.
125 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
126
127 2017-11-24 Alan Hayward <alan.hayward@arm.com>
128
129 * configure.srv: Add new file.
130 * linux-aarch64-low.c (initialize_low_arch): Call init func.
131 * linux-aarch64-tdesc-selftest.c: New file.
132 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
133
134 2017-11-24 Alan Hayward <alan.hayward@arm.com>
135
136 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
137 * linux-aarch64-low.c (initialize_low_arch): Remove init.
138 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
139
140 2017-11-24 Alan Hayward <alan.hayward@arm.com>
141
142 * configure.srv: Add new files.
143 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
144 aarch64_linux_read_description.
145 * linux-aarch64-low.c (aarch64_linux_read_description):
146 Merge with aarch64_arch_setup.
147 (aarch64_arch_setup): Call aarch64_linux_read_description.
148 * linux-aarch64-tdesc.c: New file.
149 * linux-aarch64-tdesc.h: New file.
150
151 2017-11-24 Yao Qi <yao.qi@linaro.org>
152
153 * configure.srv: Set $srv_regobj for tic6x-linux.
154 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
155 (tic6x_read_description): Move some code to tic6x_arch_setup.
156 (tic6x_tdesc_test): New function.
157 (initialize_low_arch): Call selftests::register_test.
158
159 2017-11-22 Yao Qi <yao.qi@linaro.org>
160
161 * remote-utils.c (prepare_resume_reply): Use memcpy.
162
163 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
164
165 * linux-low.c (kill_one_lwp_callback): Return void, take
166 argument directly, don't filter on pid.
167 (linux_kill): Use for_each_thread.
168
169 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
170
171 * linux-low.c (need_step_over_p): Return bool, remove dummy
172 argument.
173 (linux_resume, proceed_all_lwps): Use find_thread.
174
175 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
176
177 * linux-low.c (resume_status_pending_p): Return bool, remove
178 flag_p argument.
179 (linux_resume): Use find_thread.
180
181 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
182
183 * linux-low.c (struct thread_resume_array): Remove.
184 (linux_set_resume_request): Return void, take arguments
185 directly.
186 (linux_resume): Use for_each_thread.
187
188 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
189
190 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
191 return bool, remove data argument.
192 (linux_stabilize_threads): Use find_thread.
193
194 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
195
196 * linux-low.c (unsuspend_one_lwp): Remove.
197 (unsuspend_all_lwps): Use for_each_thread, inline code from
198 unsuspend_one_lwp.
199
200 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
201
202 * gdbthread.h (find_thread): Add overload with ptid_t filter.
203 * linux-low.c (struct iterate_over_lwps_args): Remove.
204 (iterate_over_lwps_filter): Remove.
205 (iterate_over_lwps): Use find_thread.
206
207 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
208
209 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
210 (linux_handle_new_gdb_connection): Use for_each_thread, inline
211 code from reset_lwp_ptrace_options_callback.
212
213 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
214
215 * linux-arm-low.c (struct update_registers_data): Remove.
216 (update_registers_callback): Return void, take arguments
217 directly, don't check thread's pid.
218 (arm_insert_point, arm_remove_point): Use for_each_thread.
219
220 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
221
222 * win32-low.c (continue_one_thread): Return void, take argument
223 directly.
224 (child_continue): Use for_each_thread.
225
226 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
227
228 * win32-i386-low.c (update_debug_registers_callback): Rename
229 to ...
230 (update_debug_registers): ... this, return void, remove pid_p arg.
231 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
232
233 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
234
235 * inferiors.h (struct process_info): Add constructor, initialize
236 fields..
237 <syscalls_to_catch>: Change type to std::vector<int>.
238 * inferiors.c (add_process): Allocate process_info with new.
239 (remove_process): Free process_info with delete.
240 * linux-low.c (handle_extended_wait): Adjust.
241 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
242 * server.c (handle_general_set): Adjust.
243
244 2017-11-16 Pedro Alves <palves@redhat.com>
245
246 * remote-utils.c (remote_close): Block SIGIO signals instead of
247 uninstalling the SIGIO handler.
248
249 2017-11-16 Alan Hayward <alan.hayward@arm.com>
250
251 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
252
253 2017-11-16 Yao Qi <yao.qi@linaro.org>
254
255 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
256 (tic6x_store_gregset): Likewise.
257 (tic6x_usrregs_info): Move it up.
258
259 2017-11-15 Alan Hayward <alan.hayward@arm.com>
260
261 * Makefile.in: Update arch rules.
262 * configure.srv: Explicitly mark arch/ files.
263
264 2017-11-13 Andreas Schwab <schwab@suse.de>
265
266 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
267 function.
268 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
269
270 2017-11-06 Pedro Alves <palves@redhat.com>
271
272 * config.in, configure: Regenerate.
273
274 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
275
276 * target.c (struct thread_search): Remove.
277 (thread_search_callback): Remove.
278 (prepare_to_access_memory): Use for_each_thread instead of
279 find_inferior. Inline code from thread_search_callback.
280
281 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
282
283 * server.c (struct visit_actioned_threads_data): Remove.
284 (visit_actioned_threads): Change prototype to take arguments
285 directly.
286 (resume): Use find_thread instead of find_inferior.
287
288 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
289
290 * server.c (queue_stop_reply_callback): Change prototype, return
291 void.
292 (find_status_pending_thread_callback): Remove.
293 (handle_status): Replace find_inferior with find_thread and
294 for_each_thread.
295
296 2017-10-25 Alan Hayward <alan.hayward@arm.com>
297
298 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
299 with REGNO.
300 (aarch64_store_gregset): Likewise.
301 (aarch64_fill_fpregset): Likewise.
302 (aarch64_store_fpregset): Likewise.
303
304 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
305
306 * gdbthread.h (find_thread, for_each_thread): New functions.
307 * inferiors.c (thread_of_pid): Remove.
308 (find_any_thread_of_pid): Use find_thread.
309 * linux-low.c (num_lwps): Use for_each_thread.
310
311 2017-10-17 Yao Qi <yao.qi@linaro.org>
312
313 * Makefile.in: Remove one rule.
314 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
315
316 2017-10-17 Yao Qi <yao.qi@linaro.org>
317
318 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
319 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
320
321 2017-10-17 Yao Qi <yao.qi@linaro.org>
322
323 * configure.srv: Rename arm.o with arch/arm.o.
324
325 2017-10-17 Yao Qi <yao.qi@linaro.org>
326
327 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
328 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
329 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
330 (arch-i386.o, arch-amd64.o): Remove rules.
331 (arch/%.o): New rule.
332 Update POSTCOMPILE and COMPILE.pre.
333 * configure.ac: Invoke AC_CONFIG_COMMANDS.
334 * configure: Re-generated.
335 * configure.srv: Replace arch-i386.o with arch/i386.o.
336 Replace arch-amd64.o with arch/amd64.o.
337
338 2017-10-16 Yao Qi <yao.qi@linaro.org>
339
340 * configure: Regenerated.
341
342 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
343
344 * inferiors.h: (struct inferior_list): Remove.
345 (struct inferior_list_entry); Remove.
346 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
347 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
348 get_first_inferior): Remove.
349 (for_each_inferior, for_each_inferior_with_data, find_inferior,
350 find_inferior_id, find_inferior_in_random): Change signature.
351 * inferiors.c (all_threads): Change type to
352 std::list<thread_info *>.
353 (get_thread): Remove macro.
354 (find_inferior, find_inferior_id): Change signature, implement
355 using find_thread.
356 (find_inferior_in_random): Change signature, implement using
357 find_thread_in_random.
358 (for_each_inferior, for_each_inferior_with_data): Change
359 signature, implement using for_each_thread.
360 (add_inferior_to_list, remove_inferior): Remove.
361 (add_thread, get_first_thread, thread_of_pid,
362 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
363 (get_first_inferior, one_inferior_p, clear_inferior_list):
364 Remove.
365 (clear_inferiors, get_thread_process): Update.
366 * gdbthread.h: Include <list>.
367 (struct thread_info) <entry>: Remove field.
368 <id>: New field.
369 (all_threads): Change type to std::list<thread_info *>.
370 (get_first_inferior): Add doc.
371 (find_thread, for_each_thread, find_thread_in_random): New
372 functions.
373 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
374 * linux-arm-low.c (update_registers_callback): Update.
375 * linux-low.c (second_thread_of_pid_p): Update.
376 (kill_one_lwp_callback, linux_detach_lwp_callback,
377 delete_lwp_callback, status_pending_p_callback, same_lwp,
378 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
379 iterate_over_lwps, not_stopped_callback,
380 resume_stopped_resumed_lwps, count_events_callback,
381 select_singlestep_lwp_callback, select_event_lwp_callback,
382 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
383 suspend_and_send_sigstop_callback, wait_for_sigstop,
384 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
385 lwp_running, linux_set_resume_request, resume_status_pending_p,
386 need_step_over_p, start_step_over, linux_resume_one_thread,
387 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
388 reset_lwp_ptrace_options_callback): Update.
389 * linux-mips-low.c (update_watch_registers_callback): Update.
390 * regcache.c (regcache_invalidate_one, regcache_invalidate):
391 Update.
392 (free_register_cache_thread_one): Remove.
393 (regcache_release): Update.
394 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
395 handle_qxfer_threads_worker): Update.
396 (handle_query): Update, use list iterator.
397 (visit_actioned_threads, handle_pending_status,
398 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
399 clear_pending_status_callback, set_pending_status_callback,
400 find_status_pending_thread_callback, handle_status,
401 process_serial_event): Update.
402 * target.c (thread_search_callback): Update.
403 * thread-db.c (thread_db_get_tls_address): Update.
404 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
405 Update.
406 * win32-i386-low.c (update_debug_registers_callback): Update.
407 * win32-low.c (delete_thread_info, child_delete_thread,
408 continue_one_thread, suspend_one_thread,
409 get_child_debug_event): Adjust.
410
411 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
412
413 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
414 * inferiors.h: Include <list>.
415 (struct process_info) <entry>: Remove field.
416 <pid>: New field.
417 (pid_of): Change macro to function.
418 (ptid_of, lwpid_of): Remove macro.
419 (all_processes): Change type to std::list<process_info *>.
420 (ALL_PROCESSES): Remove macro.
421 (for_each_process, find_process): New function.
422 * inferiors.c (all_processes): Change type to
423 std::list<process_info *>.
424 (find_thread_process): Adjust.
425 (add_process): Likewise.
426 (remove_process): Likewise.
427 (find_process_pid): Likewise.
428 (get_first_process): Likewise.
429 (started_inferior_callback): Remove.
430 (have_started_inferiors_p): Adjust.
431 (attached_inferior_callback): Remove.
432 (have_attached_inferiors_p): Adjust.
433 * linux-low.c (check_zombie_leaders): Likewise.
434 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
435 (x86_linux_update_xmltarget): Adjust.
436 * server.c (handle_query): Likewise.
437 (gdb_reattached_process): Remove.
438 (handle_status): Adjust.
439 (kill_inferior_callback): Likewise.
440 (detach_or_kill_inferior): Remove.
441 (print_started_pid): Likewise.
442 (print_attached_pid): Likewise.
443 (detach_or_kill_for_exit): Update.
444 (process_serial_event): Likewise.
445 * linux-arm-low.c (arm_new_fork): Likewise.
446
447 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
448
449 * dll.h: Include <list>.
450 (struct dll_info): Add constructor.
451 <entry>: Remove field.
452 (all_dlls): Change type to std::list<dll_info>.
453 * dll.c: Include <algorithm>.
454 (get_dll): Remove macro.
455 (all_dlls): Change type to std::list<dll_info *>.
456 (free_one_dll): Remove.
457 (match_dll): Likewise.
458 (loaded_dll): Adjust.
459 (unloaded_dll): Adjust to all_dlls type change, use
460 std::find_if. Inline code from match_dll.
461 (clear_dlls): Adjust to all_dlls type change.
462 * server.c (emit_dll_description): Remove.
463 (handle_qxfer_libraries): Adjust to all_dlls type change,
464 integrate emit_dll_description's functionality.
465
466 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
467
468 * linux-low.h (struct linux_target_ops) <delete_process>: New
469 field.
470 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
471 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
472 (struct linux_target_ops): Add delete_process callback.
473 * linux-arm-low.c (arm_delete_process): New.
474 (struct linux_target_ops): Add delete_process callback.
475 * linux-bfin-low.c (struct linux_target_ops): Likewise.
476 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
477 * linux-m32r-low.c (struct linux_target_ops): Likewise.
478 * linux-mips-low.c (mips_linux_delete_process): New.
479 (struct linux_target_ops): Add delete_process callback.
480 * linux-ppc-low.c (struct linux_target_ops): Likewise.
481 * linux-s390-low.c (struct linux_target_ops): Likewise.
482 * linux-sh-low.c (struct linux_target_ops): Likewise.
483 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
484 * linux-tile-low.c (struct linux_target_ops): Likewise.
485 * linux-x86-low.c (x86_linux_delete_process): New.
486 (struct linux_target_ops): Add delete_process callback.
487 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
488
489 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
490
491 * linux-aarch64-low.c (the_low_target): Add thread delete
492 callback.
493 * linux-arm-low.c (arm_delete_thread): New function.
494 (the_low_target): Add thread delete callback.
495 * linux-bfin-low.c (the_low_target): Likewise.
496 * linux-crisv32-low.c (the_low_target): Likewise.
497 * linux-low.c (delete_lwp): Invoke delete_thread callback if
498 set.
499 * linux-low.h (struct linux_target_ops) <delete_thread>: New
500 field.
501 * linux-m32r-low.c (the_low_target): Add thread delete callback.
502 * linux-mips-low.c (mips_linux_delete_thread): New function.
503 (the_low_target): Add thread delete callback.
504 * linux-ppc-low.c (the_low_target): Likewise.
505 * linux-s390-low.c (the_low_target): Likewise.
506 * linux-sh-low.c (the_low_target): Likewise.
507 * linux-tic6x-low.c (the_low_target): Likewise.
508 * linux-tile-low.c (the_low_target): Likewise.
509 * linux-x86-low.c (the_low_target): Likewise.
510 * linux-xtensa-low.c (the_low_target): Likewise.
511
512 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
513
514 * win32-low.c: Include "common-inferior.h".
515
516 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
517
518 * inferiors.c (set_inferior_cwd): New function.
519 * server.c (handle_general_set): Handle QSetWorkingDir packet.
520 (handle_query): Inform that QSetWorkingDir is supported.
521 * win32-low.c (create_process): Pass the inferior's cwd to
522 CreateProcess.
523
524 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
525
526 * inferiors.c (current_inferior_cwd): New global variable.
527 (get_inferior_cwd): New function.
528 * inferiors.h (struct process_info) <cwd>: New field.
529
530 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
531
532 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
533 (OBS): Add gdb_tilde_expand.o.
534
535 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
536
537 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
538 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
539
540 2017-09-29 Pedro Alves <palves@redhat.com>
541
542 * ax.c (gdb_parse_agent_expr): Constify.
543 * ax.h (gdb_parse_agent_expr): Constify.
544 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
545 Constify.
546 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
547 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
548 * remote-utils.h (read_ptid): Constify.
549 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
550 (process_point_options, process_serial_event): Constify.
551 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
552 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
553 (cmd_qtbuffer): Constify.
554
555 2017-09-29 Pedro Alves <palves@redhat.com>
556
557 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
558 fails.
559
560 2017-09-29 Pedro Alves <palves@redhat.com>
561
562 * linux-low.c (handle_extended_wait): Pass parent thread instead
563 of process to thread_db_notice_clone.
564 * linux-low.h (thread_db_notice_clone): Replace parent process
565 parameter with parent thread parameter.
566 * thread-db.c (find_one_thread): Add comment.
567 (thread_db_notice_clone): Replace parent process parameter with
568 parent thread parameter. Temporarily switch to the parent thread.
569
570 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
571
572 * gdbthread.h: Include "common-gdbthread.h".
573 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
574 "if" when validating the ptid.
575 * remote-utils.c: Include "gdbthread.h".
576 (prepare_resume_reply): Use "switch_to_thread".
577 * target.c (done_accessing_memory): Likewise.
578
579 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
580
581 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
582 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
583 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
584 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
585 s390x-gs-linux64-ipa.o to ipa_obj.
586 * linux-s390-low.c (HWCAP_S390_GS): New define.
587 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
588 New functions.
589 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
590 (s390_arch_setup): Check for guarded-storage support and choose
591 appropriate tdesc.
592 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
593 init_registers_s390x_gs_linux64.
594 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
595 enum value.
596 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
597 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
598
599 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
600
601 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
602
603 2017-09-21 Kevin Buettner <kevinb@redhat.com>
604
605 * linux-low.h (struct lwp_info): Add new field, thread_handle.
606 (thread_db_thread_handle): Declare.
607 * linux-low.c (linux_target_ops): Initialize thread_handle.
608 * server.c (handle_qxfer_threads_worker): Add support for
609 "handle" attribute.
610 * target.h (struct target_ops): Add new function pointer,
611 thread_handle.
612 (target_thread_handle): Define.
613 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
614 field in lwp.
615 (thread_db_thread_handle): New function.
616
617 2017-09-21 Kevin Buettner <kevinb@redhat.com>
618
619 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
620 * linux-low.h (thread_db_notice_clone): Declare.
621 * thread-db.c (thread_db_notice_clone): New function.
622
623 2017-09-21 Pedro Alves <palves@redhat.com>
624
625 * server.c (gdb_read_memory, handle_status, process_serial_event)
626 (handle_serial_event, handle_target_event): Adjust to
627 set_desired_thread prototype change.
628 * target.c (set_desired_thread): Remove 'use_general' parameter
629 and adjust.
630 * target.h (set_desired_thread): Remove 'use_general' parameter.
631
632 2017-09-20 Tom Tromey <tom@tromey.com>
633
634 * target.c (target_terminal::terminal_state): Define.
635 (target_terminal::init): Rename from target_terminal_init.
636 (target_terminal::inferior): Rename from
637 target_terminal_inferior.
638 (target_terminal::ours): Rename from target_terminal_ours.
639 (target_terminal::ours_for_output, target_terminal::info): New.
640
641 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
642
643 * server.c (accumulate_file_name_length): Remove.
644 (emit_dll_description): Adjust to std::string change.
645 (handle_qxfer_libraries): Use std::string to hold document.
646
647 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
648
649 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
650 return type of xml_escape_text.
651 * server.c (emit_dll_description): Likewise.
652
653 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
654
655 * server.c (captured_main): Accept argument for --selftest.
656 Update run_tests call.
657 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
658 when registering selftests.
659
660 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
661
662 * regcache.c (get_thread_regcache): Update code to use "std::vector"
663 instead of "VEC" for "target_desc.reg_defs".
664 (regcache_cpy): Likewise.
665 (registers_to_string): Likewise.
666 (registers_from_string): Likewise.
667 (find_regno): Likewise.
668 (supply_regblock): Likewise.
669 (regcache_raw_read_unsigned): Likewise.
670 * tdesc.c (init_target_desc): Likewise.
671 (tdesc_create_reg): Likewise.
672 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
673 (struct target_desc) <reg_defs>: Convert to "std::vector".
674 (target_desc): Do not initialize "reg_defs".
675 (~target_desc): Update code to use "std::vector" instead of "VEC"
676 for "target_desc.reg_defs".
677 (operator==): Likewise.
678
679 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
680
681 * inferiors.h (thread_to_gdb_id): Remove.
682 * inferiors.c (thread_to_gdb_id): Remove.
683 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
684 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
685 lynx_store_registers, lynx_read_memory, lynx_write_memory):
686 Likewise.
687 * nto-low.c (nto_fetch_registers, nto_store_registers,
688 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
689
690 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
691
692 * inferiors.h (gdb_id_to_thread_id): Remove.
693 * inferiors.c (gdb_id_to_thread_id): Remove.
694 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
695 removal. Move pid declaration closer to where it's used.
696
697 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
698
699 * server.c (handle_detach): New function.
700 (process_serial_event): Move code out, call handle_detach.
701
702 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
703
704 * server.c (require_running): Rename to ...
705 (require_running_or_return): ... this ...
706 (require_running_or_break): ... and this.
707 (handle_query, process_serial_event): Adjust.
708
709 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
710
711 * linux-low.c (linux_set_resume_request): Remove unused
712 variables.
713
714 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
715
716 * server.c (first_thread_of): Remove.
717 (process_serial_event): Replace usage of first_thread_of with
718 find_any_thread_of_pid.
719 * tracepoint.c (same_process_p): Remove.
720 (gdb_agent_about_to_close): Replace usage of same_process_p with
721 find_any_thread_of_pid.
722 * linux-x86-low.c (same_process_callback): Remove.
723 (x86_arch_setup_process_callback): Replace usage of
724 same_process_callback with find_any_thread_of_pid.
725 * thread-db.c (any_thread_of): Remove.
726 (switch_to_process): Replace usage of any_thread_of with
727 find_any_thread_of_pid.
728 * inferiors.c (thread_pid_matches_callback): Remove.
729 (find_thread_process): Adjust to use find_any_thread_of_pid.
730
731 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
732
733 * regcache.c (get_thread_regcache): Guard calls to "memset"
734 with "!VEC_empty".
735
736 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
737
738 * linux-low.c (handle_extended_wait): Use
739 "allocate_target_description" instead of "XNEW".
740 * linux-x86-low.c (initialize_low_arch): Likewise.
741
742 2017-09-05 Yao Qi <yao.qi@linaro.org>
743
744 * configure.srv (srv_i386_regobj): Remove.
745 (srv_amd64_regobj): Remove.
746 (srv_regobj): Set it to "" for x86 non-linux targets.
747 * linux-x86-tdesc.c (i386_linux_read_description):
748 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
749 (init_registers_i386): Remove the declaration.
750 (tdesc_i386): Remove the declaration.
751 (lynx_i386_arch_setup): Call i386_create_target_description.
752 * nto-x86-low.c: Likewise.
753 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
754 [!__x86_64__]: include arch/i386.h.
755 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
756
757 2017-09-05 Yao Qi <yao.qi@linaro.org>
758
759 * configure.srv (srv_amd64_linux_xmlfiles): Remove
760 i386/amd64-XXX-linux from it.
761
762 2017-09-05 Yao Qi <yao.qi@linaro.org>
763
764 * configure.srv: Empty srv_amd64_linux_regobj if $development is
765 false.
766 (ipa_amd64_linux_regobj): Remove.
767 (ipa_x32_linux_regobj): Remove.
768
769 2017-09-05 Yao Qi <yao.qi@linaro.org>
770
771 * Makefile.in (arch-amd64.o): New rule.
772 * configure.srv: Append arch-amd64.o.
773 * linux-amd64-ipa.c: Include common/x86-xstate.h.
774 (get_ipa_tdesc): Call amd64_linux_read_description.
775 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
776 and init_registers_amd64_XXX.
777 * linux-x86-low.c (x86_linux_read_description): Call
778 amd64_linux_read_description.
779 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
780 (initialize_low_arch): Don't call init_registers_x32_XXX and
781 init_registers_amd64_XXX.
782 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
783 and tdesc_amd64_XXX.
784 [__x86_64__] (amd64_tdesc_test): New function.
785 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
786 and init_registers_amd64_XXX.
787 * linux-x86-tdesc.c: Include arch/amd64.h.
788 (xcr0_to_tdesc_idx): New function.
789 (i386_linux_read_description): New function.
790 (amd64_get_ipa_tdesc_idx): New function.
791 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
792 (amd64_get_ipa_tdesc): Declare.
793
794 2017-09-05 Yao Qi <yao.qi@linaro.org>
795
796 * configure.srv (srv_i386_linux_xmlfiles): Remove
797 i386/i386-XXX-linux.xml from it.
798
799 2017-09-05 Yao Qi <yao.qi@linaro.org>
800
801 * configure.srv: Set srv_i386_linux_regobj empty if $development
802 is false.
803 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
804 initialize_low_tdesc.
805 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
806 with #if initialize_low_tdesc.
807 * linux-x86-tdesc-selftest.c: New file.
808 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
809
810 2017-09-05 Yao Qi <yao.qi@linaro.org>
811
812 * Makefile.in (arch-i386.o): New rule.
813 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
814 (x86_64-*-linux*): Likewise.
815 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
816 include arch/i386.h.
817 (i386_linux_read_description): Remove code and call
818 i386_create_target_description.
819 * tdesc.c (allocate_target_description): New function.
820 * tdesc.h (set_tdesc_architecture): Remove declaration.
821 (set_tdesc_osabi): Likewise.
822
823 2017-09-05 Yao Qi <yao.qi@linaro.org>
824
825 * linux-x86-tdesc.c: Don't include <inttypes.h>.
826 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
827 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
828 .xmltarget.
829 * server.c (get_features_xml): Call tdesc_get_features_xml.
830 * tdesc.c (set_tdesc_architecture): New function.
831 (set_tdesc_osabi): New function.
832 (tdesc_get_features_xml): New function.
833 (tdesc_create_feature): Add an argument.
834 * tdesc.h (struct target_desc) <features>: New field.
835 <arch, osabi>: New field.
836 (~target_desc): xfree features, arch, and osabi.
837 (target_desc::oerator==): Don't compare .xmltarget.
838 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
839 (set_tdesc_osabi): Likewise.
840 (tdesc_get_features_xml): Likewise.
841
842 2017-09-05 Yao Qi <yao.qi@linaro.org>
843
844 * linux-x86-tdesc.c: Include selftest.h.
845 (i386_tdesc_test): New function.
846 (initialize_low_tdesc): Call selftests::register_test.
847 * tdesc.h: Include regdef.h.
848 (target_desc): Override operator == and !=.
849
850 2017-09-05 Yao Qi <yao.qi@linaro.org>
851
852 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
853 (ipa_obj): Likewise.
854 * linux-i386-ipa.c: Include common/x86-xstate.h
855 (get_ipa_tdesc): Call i386_linux_read_description.
856 (initialize_low_tracepoint): Don't call init_registers_XXX
857 functions, call initialize_low_tdesc instead.
858 * linux-x86-low.c (x86_linux_read_description): Call
859 i386_linux_read_description.
860 (initialize_low_arch): Don't call init_registers_i386_XXX
861 functions, call initialize_low_tdesc.
862 * linux-x86-tdesc.c: New file.
863 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
864 (i386_get_ipa_tdesc_idx): Declare.
865 (i386_get_ipa_tdesc): Declare.
866 (initialize_low_tdesc): Declare.
867
868 2017-09-05 Yao Qi <yao.qi@linaro.org>
869
870 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
871 instead of 0.
872
873 2017-09-05 Yao Qi <yao.qi@linaro.org>
874
875 * Makefile.in (IPA_OBJS): Add vec-ipa.o
876 * regcache.c (get_thread_regcache): Use VEC_length.
877 (init_register_cache): Likewise.
878 (regcache_cpy): Likewise.
879 (registers_to_string): Iterate reg_defs via VEC_iterate.
880 (find_regno): Likewise.
881 (find_register_by_number): Use VEC_index.
882 (register_size): Call find_register_by_number.
883 (register_data): Call find_register_by_number.
884 (supply_regblock): Use VEC_length.
885 (regcache_raw_read_unsigned): Likewise.
886 * tdesc.c (init_target_desc): Iterate reg_defs via
887 VEC_iterate.
888 (default_description): Update initializer.
889 (copy_target_description): Don't update field num_registers.
890 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
891 <num_registers>: Remove.
892
893 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
894
895 * Makefile.in (.SECONDARY): Define target.
896
897 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
898
899 * linux-low.c (linux_wait_1): Adjust.
900 * server.c (queue_stop_reply_callback): Adjust.
901
902 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
903
904 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
905 QEnvironmentUnset and QEnvironmentReset packets.
906 (handle_query): Inform remote that QEnvironmentHexEncoded,
907 QEnvironmentUnset and QEnvironmentReset are supported.
908
909 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
910
911 * inferiors.h (inferior_target_data): Rename to ...
912 (thread_target_data): ... this.
913 (inferior_regcache_data): Rename to ...
914 (thread_regcache_data): ... this.
915 (set_inferior_regcache_data): Rename to ...
916 (set_thread_regcache_data): ... this.
917 * inferiors.c (inferior_target_data): Rename to ...
918 (thread_target_data): ... this.
919 (inferior_regcache_data): Rename to ...
920 (thread_regcache_data): ... this.
921 (set_inferior_regcache_data): Rename to ...
922 (set_thread_regcache_data): ... this.
923 (free_one_thread): Update.
924 * linux-low.h (get_thread_lwp): Update.
925 * regcache.c (get_thread_regcache): Update.
926 (regcache_invalidate_thread): Update.
927 (free_register_cache_thread): Update.
928 * win32-i386-low.c (update_debug_registers_callback): Update.
929 (win32_get_current_dr): Update.
930 * win32-low.c (thread_rec): Update.
931 (delete_thread_info): Update.
932 (continue_one_thread): Update.
933 (suspend_one_thread): Update.
934
935 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
936
937 * inferiors.c (set_inferior_target_data): Remove.
938 * inferiors.h (set_inferior_target_data): Remove.
939
940 2017-08-18 Yao Qi <yao.qi@linaro.org>
941
942 * Makefile.in (OBS): Add selftest.o.
943 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
944 * configure, config.in: Re-generated.
945 * server.c: Include common/sefltest.h.
946 (captured_main): Handle option --selftest.
947
948 2017-08-09 Yao Qi <yao.qi@linaro.org>
949
950 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
951 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
952 i386-avx-mpx.o and i386-mmx.o.
953 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
954 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
955 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
956 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
957 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
958 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
959 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
960 i386/amd64-avx-mpx.xml.
961
962 2017-08-09 Yao Qi <yao.qi@linaro.org>
963
964 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
965 and x32-avx-avx512.o.
966 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
967 i386/x32-avx-avx512.xml.
968
969 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
970
971 * tracepoint.h (enum class fast_tpoint_collect_result): New
972 enumeration.
973 (fast_tracepoint_collecting): Change return type to
974 fast_tpoint_collect_result.
975 * tracepoint.c (fast_tracepoint_collecting): Likewise.
976 * linux-low.h: Include tracepoint.h.
977 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
978 fast_tpoint_collect_result.
979 * linux-low.c (handle_tracepoints): Adjust.
980 (linux_fast_tracepoint_collecting): Change return type to
981 fast_tpoint_collect_result.
982 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
983 linux_wait_1, stuck_in_jump_pad_callback,
984 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
985 proceed_one_lwp): Adjust to type change.
986
987 2017-07-10 Yao Qi <yao.qi@linaro.org>
988
989 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
990
991 2017-06-29 Yao Qi <yao.qi@linaro.org>
992
993 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
994 Remove.
995 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
996
997 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
998
999 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1000
1001 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1002
1003 * linux-low.c (linux_create_inferior): Adjust code to access the
1004 environment information via 'gdb_environ' class.
1005 * lynx-low.c (lynx_create_inferior): Likewise.
1006 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1007 (get_environ): Return a pointer to 'our_environ'.
1008 (captured_main): Initialize 'our_environ'.
1009 * server.h (get_environ): Adjust prototype.
1010 * spu-low.c (spu_create_inferior): Adjust code to access the
1011 environment information via 'gdb_environ' class.
1012
1013 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1016 usage of "register" keyword.
1017
1018 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * configure: Re-generate.
1021
1022 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * configure: Re-generate.
1025
1026 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * Makefile.in (COMPILE.pre): Add "-x c++".
1029
1030 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1031
1032 * fork-child.c: Conditionally include <signal.h>.
1033
1034 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1035
1036 * server.c (handle_general_set): Handle new packet
1037 "QStartupWithShell".
1038 (handle_query): Add "QStartupWithShell" to the list of supported
1039 packets.
1040 (gdbserver_usage): Add help text explaining the
1041 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1042 options.
1043 (captured_main): Recognize and act upon the presence of the new
1044 CLI options.
1045
1046 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1047 Pedro Alves <palves@redhat.com>
1048
1049 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1050 * configure: Regenerate.
1051 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1052 "fork-inferior.o".
1053 (i[34567]86-*-lynxos*): Likewise.
1054 (spu*-*-*): Likewise.
1055 * fork-child.c: New file.
1056 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1057 and "environ.h".
1058 (linux_ptrace_fun): New function.
1059 (linux_create_inferior): Adjust function prototype to reflect
1060 change on "target.h". Adjust function code to use
1061 "fork_inferior".
1062 (linux_request_interrupt): Delete "signal_pid".
1063 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1064 (lynx_ptrace_fun): New function.
1065 (lynx_create_inferior): Adjust function prototype to reflect
1066 change on "target.h". Adjust function code to use
1067 "fork_inferior".
1068 * nto-low.c (nto_create_inferior): Adjust function prototype and
1069 code to reflect change on "target.h". Update comments.
1070 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1071 "common-terminal.h" and "environ.h".
1072 (terminal_fd): Moved to fork-child.c.
1073 (old_foreground_pgrp): Likewise.
1074 (restore_old_foreground_pgrp): Likewise.
1075 (last_status): Make it global.
1076 (last_ptid): Likewise.
1077 (our_environ): New variable.
1078 (startup_with_shell): Likewise.
1079 (program_name): Likewise.
1080 (program_argv): Rename to...
1081 (program_args): ...this.
1082 (wrapper_argv): New variable.
1083 (start_inferior): Delete function.
1084 (get_exec_wrapper): New function.
1085 (get_exec_file): Likewise.
1086 (get_environ): Likewise.
1087 (prefork_hook): Likewise.
1088 (post_fork_inferior): Likewise.
1089 (postfork_hook): Likewise.
1090 (postfork_child_hook): Likewise.
1091 (handle_v_run): Update code to deal with arguments coming from the
1092 remote host. Update calls from "start_inferior" to
1093 "create_inferior".
1094 (captured_main): Likewise. Initialize environment variable. Call
1095 "have_job_control".
1096 * server.h (post_fork_inferior): New prototype.
1097 (get_environ): Likewise.
1098 (last_status): Declare.
1099 (last_ptid): Likewise.
1100 (signal_pid): Likewise.
1101 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1102 (spu_ptrace_fun): New function.
1103 (spu_create_inferior): Adjust function prototype to reflect change
1104 on "target.h". Adjust function code to use "fork_inferior".
1105 * target.c (target_terminal_init): New function.
1106 (target_terminal_inferior): Likewise.
1107 (target_terminal_ours): Likewise.
1108 * target.h: Include <vector>.
1109 (struct target_ops) <create_inferior>: Update prototype.
1110 (create_inferior): Update macro.
1111 * utils.c (gdb_flush_out_err): New function.
1112 * win32-low.c (win32_create_inferior): Adjust function prototype
1113 and code to reflect change on "target.h".
1114
1115 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1116
1117 * inferiors.c (switch_to_thread): New function.
1118
1119 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1120
1121 * Makefile.in (SFILE): Add "common/job-control.c".
1122 (OBS): Add "job-control.o".
1123
1124 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1125
1126 * Makefile: Remove "@host_makefile_frag@".
1127
1128 2017-05-05 Pedro Alves <palves@redhat.com>
1129
1130 * configure: Regenerate.
1131
1132 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1133
1134 * configure: Regenerate.
1135
1136 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1137
1138 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1139 software_single_step change of return type to
1140 std::vector<CORE_ADDR>.
1141 * linux-low.c (install_software_single_step_breakpoints):
1142 Likewise.
1143 * linux-low.h (install_software_single_step_breakpoints):
1144 Likewise.
1145
1146 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1147
1148 * remote-utils.c: Include "gdb_termios.h" instead of
1149 "terminal.h".
1150 * terminal.h: Delete file.
1151
1152 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1153
1154 * server.c: Include <vector>.
1155 <program_argv, wrapper_argv>: Convert to std::vector.
1156 (start_inferior): Rewrite function to use C++.
1157 (handle_v_run): Likewise. Update code that calculates the argv
1158 based on the vRun packet; use C++.
1159 (captured_main): Likewise.
1160
1161 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * server.c (handle_v_cont): Initialize thread_resume::thread
1164 with null_ptid.
1165
1166 2017-04-05 Pedro Alves <palves@redhat.com>
1167
1168 * configure: Regenerate.
1169
1170 2017-04-05 Pedro Alves <palves@redhat.com>
1171
1172 * gdbreplay.c (sync_error): Constify.
1173 * linux-x86-low.c (push_opcode): Constify.
1174
1175 2017-04-05 Pedro Alves <palves@redhat.com>
1176
1177 * win32-low.c (get_child_debug_event)
1178 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1179 Report TARGET_WAITKIND_SPURIOUS instead.
1180
1181 2017-04-05 Pedro Alves <palves@redhat.com>
1182
1183 * remote-utils.c (remote_prepare, remote_open): Constify.
1184 * remote-utils.h (remote_prepare, remote_open): Constify.
1185 * server.c (captured_main): Constify 'port' handling.
1186
1187 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1188
1189 * Makefile.in (clean): Clear .deps.
1190
1191 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * .gitignore: Remove generated files, replace with wildcard.
1194 * (clean): Replace removal of generated files with wildcard.
1195 (version.c): Replace with...
1196 (version-generated.c): ...this.
1197 (xml-builtin.c): Replace with...
1198 (xml-builtin-generated.c): ...this.
1199 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1200 (%.c: *regformats*): Replace with...
1201 (%-generated.c: *regformats*): ...this.
1202
1203 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1204
1205 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1206 (xtensa_fill_gregset): Call collect_register_by_name for
1207 threadptr register.
1208 (xtensa_store_gregset): Call supply_register_by_name for
1209 threadptr register.
1210
1211 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1212
1213 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1214 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1215 (xtensa_store_gregset): Call supply_register for all registers in
1216 a0_regnum..a0_regnum + C0_NREGS range.
1217
1218 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1219
1220 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1221 (ax-ipa.o: ax.c): Remove.
1222 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1223 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1224 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1225 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1226 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1227
1228 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1231 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1232 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1233 (errors-ipa.o: ../common/errors.c): Remove.
1234 (format-ipa.o: ../common/format.c): Remove.
1235 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1236
1237 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1238
1239 * Makefile.in (%-ipa.o: %.c): New rule.
1240 (tracepoint-ipa.o: tracepoint.c): Remove.
1241 (utils-ipa.o: utils.c): Remove.
1242 (remote-utils-ipa.o: remote-utils.c): Remove.
1243 (regcache-ipa.o: regcache.c): Remove.
1244 (i386-linux-ipa.o: i386-linux.c): Remove.
1245 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1246 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1247 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1248 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1249 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1250 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1251 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1252 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1253 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1254 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1255 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1256 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1257 (aarch64-ipa.o: aarch64.c): Remove.
1258 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1259 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1260 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1261 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1262 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1263 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1264 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1265 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1266 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1267 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1268 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1269 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1270 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1271 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1272 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1273 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1274 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1275 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1276 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1277 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1278 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1279 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1280 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1281 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1282 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1283 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1284 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1285 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1286 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1287 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1288 (tdesc-ipa.o: tdesc.c): Remove.
1289 (x32-linux-ipa.o: x32-linux.c): Remove.
1290 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1291 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1292
1293 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1294
1295 * Makefile.in (%.o: ../arch/%.c): New rule.
1296 (arm.o: ../arch/arm.c): Remove.
1297 (arm-linux.o: ../arch/arm-linux.c): Remove.
1298 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1299 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1300
1301 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * Makefile.in (%.o: ../nat/%.c): New rule.
1304 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1305 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1306 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1307 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1308 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1309 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1310 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1311 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1312 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1313 (linux-personality.o: ../nat/linux-personality.c): Remove.
1314 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1315 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1316 (x86-linux.o: ../nat/x86-linux.c): Remove.
1317 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1318 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1319
1320 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1321
1322 * Makefile.in (%.o: ../common/%.c): New rule.
1323 (signals.o: ../common/signals.c): Remove.
1324 (print-utils.o: ../common/print-utils.c): Remove.
1325 (rsp-low.o: ../common/rsp-low.c): Remove.
1326 (common-utils.o: ../common/common-utils.c): Remove.
1327 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1328 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1329 (vec.o: ../common/vec.c): Remove.
1330 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1331 (xml-utils.o: ../common/xml-utils.c): Remove.
1332 (ptid.o: ../common/ptid.c): Remove.
1333 (buffer.o: ../common/buffer.c): Remove.
1334 (format.o: ../common/format.c): Remove.
1335 (filestuff.o: ../common/filestuff.c): Remove.
1336 (agent.o: ../common/agent.c): Remove.
1337 (errors.o: ../common/errors.c): Remove.
1338 (environ.o: ../common/environ.c): Remove.
1339 (common-debug.o: ../common/common-debug.c): Remove.
1340 (cleanups.o: ../common/cleanups.c): Remove.
1341 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1342 (fileio.o: ../common/fileio.c): Remove.
1343 (common-regcache.o: ../common/common-regcache.c): Remove.
1344 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1345 (new-op.o: ../common/new-op.c): Remove.
1346 (btrace-common.o: ../common/btrace-common.c): Remove.
1347
1348 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * Makefile.in (%.o: ../target/%.c): New rule.
1351 (waitstatus.o: ../target/waitstatus.c): Remove.
1352
1353 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1354
1355 * Makefile.in
1356 (%.c: ../regformats/%.dat,
1357 (%.c: ../regformats/arm/%.dat,
1358 (%.c: ../regformats/i386/%.dat,
1359 (%.c: ../regformats/rs6000/%.dat): New rules.
1360 (aarch64.c): Remove.
1361 (reg-arm.c): Remove.
1362 (arm-with-iwmmxt.c): Remove.
1363 (arm-with-vfpv2.c): Remove.
1364 (arm-with-vfpv3.c): Remove.
1365 (arm-with-neon.c): Remove.
1366 (reg-bfin.c): Remove.
1367 (reg-cris.c): Remove.
1368 (reg-crisv32.c): Remove.
1369 (i386.c): Remove.
1370 (i386-linux.c): Remove.
1371 (i386-avx.c): Remove.
1372 (i386-avx-linux.c): Remove.
1373 (i386-avx-avx512.c): Remove.
1374 (i386-avx-avx512-linux.c): Remove.
1375 (i386-mpx.c): Remove.
1376 (i386-mpx-linux.c): Remove.
1377 (i386-avx-mpx-avx512-pku.c): Remove.
1378 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1379 (i386-avx-mpx.c): Remove.
1380 (i386-avx-mpx-linux.c): Remove.
1381 (i386-mmx.c): Remove.
1382 (i386-mmx-linux.c): Remove.
1383 (reg-ia64.c): Remove.
1384 (reg-m32r.c): Remove.
1385 (reg-m68k.c): Remove.
1386 (reg-cf.c): Remove.
1387 (mips-linux.c): Remove.
1388 (mips-dsp-linux.c): Remove.
1389 (mips64-linux.c): Remove.
1390 (mips64-dsp-linux.c): Remove.
1391 (nios2-linux.c): Remove.
1392 (powerpc-32.c): Remove.
1393 (powerpc-32l.c): Remove.
1394 (powerpc-altivec32l.c): Remove.
1395 (powerpc-cell32l.c): Remove.
1396 (powerpc-vsx32l.c): Remove.
1397 (powerpc-isa205-32l.c): Remove.
1398 (powerpc-isa205-altivec32l.c): Remove.
1399 (powerpc-isa205-vsx32l.c): Remove.
1400 (powerpc-e500l.c): Remove.
1401 (powerpc-64l.c): Remove.
1402 (powerpc-altivec64l.c): Remove.
1403 (powerpc-cell64l.c): Remove.
1404 (powerpc-vsx64l.c): Remove.
1405 (powerpc-isa205-64l.c): Remove.
1406 (powerpc-isa205-altivec64l.c): Remove.
1407 (powerpc-isa205-vsx64l.c): Remove.
1408 (s390-linux32.c): Remove.
1409 (s390-linux32v1.c): Remove.
1410 (s390-linux32v2.c): Remove.
1411 (s390-linux64.c): Remove.
1412 (s390-linux64v1.c): Remove.
1413 (s390-linux64v2.c): Remove.
1414 (s390-te-linux64.c): Remove.
1415 (s390-vx-linux64.c): Remove.
1416 (s390-tevx-linux64.c): Remove.
1417 (s390x-linux64.c): Remove.
1418 (s390x-linux64v1.c): Remove.
1419 (s390x-linux64v2.c): Remove.
1420 (s390x-te-linux64.c): Remove.
1421 (s390x-vx-linux64.c): Remove.
1422 (s390x-tevx-linux64.c): Remove.
1423 (tic6x-c64xp-linux.c): Remove.
1424 (tic6x-c64x-linux.c): Remove.
1425 (tic6x-c62x-linux.c): Remove.
1426 (reg-sh.c): Remove.
1427 (reg-sparc64.c): Remove.
1428 (reg-spu.c): Remove.
1429 (amd64.c): Remove.
1430 (amd64-linux.c): Remove.
1431 (amd64-avx.c): Remove.
1432 (amd64-avx-linux.c): Remove.
1433 (amd64-avx-avx512.c): Remove.
1434 (amd64-avx-avx512-linux.c): Remove.
1435 (amd64-mpx.c): Remove.
1436 (amd64-mpx-linux.c): Remove.
1437 (amd64-avx-mpx-avx512-pku.c): Remove.
1438 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1439 (amd64-avx-mpx.c): Remove.
1440 (amd64-avx-mpx-linux.c): Remove.
1441 (x32.c): Remove.
1442 (x32-linux.c): Remove.
1443 (x32-avx.c): Remove.
1444 (x32-avx-linux.c): Remove.
1445 (x32-avx-avx512.c): Remove.
1446 (x32-avx-avx512-linux.c): Remove.
1447 (reg-xtensa.c): Remove.
1448 (reg-tilegx.c): Remove.
1449 (reg-tilegx32.c): Remove.
1450
1451 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1452
1453 * Makefile.in (SFILES): Add "common/environ.c".
1454 (OBJS): Add "common/environ.h".
1455
1456 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1457
1458 * configure.ac: Check if the fs_base and gs_base members of
1459 `struct user_regs_struct' exist.
1460 * config.in: Regenerated.
1461 * configure: Likewise.
1462
1463 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1464
1465 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1466 target_read_memory.
1467 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1468 (get_next_pcs_syscall_next_pc): Likewise.
1469
1470 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1471
1472 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1473 * nto-x86-low.c: Likewise.
1474
1475 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1476
1477 * Makefile.in: Include disable-implicit-rules.mk.
1478
1479 2016-11-23 Pedro Alves <palves@redhat.com>
1480
1481 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1482 (debug_vprintf): Use std::chrono::steady_clock instead of
1483 gettimeofday. Use '.' instead of ':'.
1484 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1485 (get_timestamp): Use std::chrono::steady_clock instead of
1486 gettimeofday.
1487
1488 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * Makefile.in: Fix whitespace formatting.
1491
1492 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * Makefile.in (SFILES, OBS): Flatten list and order
1495 alphabetically.
1496
1497 2016-11-23 Pedro Alves <palves@redhat.com>
1498
1499 * event-loop.c (handle_file_event): Use warning.
1500 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1501 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1502 Use warning.
1503
1504 2016-11-23 Pedro Alves <palves@redhat.com>
1505
1506 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1507 output.
1508 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1509 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1510 debug_printf and debug_flush for debug output.
1511 * server.c (handle_general_set): Likewise.
1512 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1513 output.
1514
1515 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * Makefile.in (.c.o): Replace rule with ...
1518 (%.o: %.c): ... this one.
1519
1520 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1521
1522 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1523 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1524 make.
1525 * configure.ac: Remove checks for the make program.
1526 * configure: Re-generate.
1527
1528 2016-10-28 Pedro Alves <palves@redhat.com>
1529
1530 * Makefile.in (CXX_DIALECT): Get from configure.
1531 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1532 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1533 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1534 * config.in: Regenerate.
1535 * configure: Regenerate.
1536
1537 2016-10-27 Yao Qi <yao.qi@linaro.org>
1538
1539 * linux-low.c (linux_supports_range_stepping): Return true if
1540 can_software_single_step return true.
1541
1542 2016-10-27 Yao Qi <yao.qi@linaro.org>
1543
1544 * inferiors.c (find_inferior_in_random): New function.
1545 * inferiors.h (find_inferior_in_random): Declare.
1546 * linux-low.c (linux_wait_for_event_filtered): Call
1547 find_inferior_in_random instead of find_inferior.
1548
1549 2016-10-27 Yao Qi <yao.qi@linaro.org>
1550
1551 * linux-low.c (linux_wait_1): If single-step breakpoints are
1552 inserted, remove them.
1553
1554 2016-10-26 Pedro Alves <palves@redhat.com>
1555
1556 * linux-low.c (handle_extended_wait): Link parent/child fork
1557 threads.
1558 (linux_wait_1): Unlink them.
1559 (linux_set_resume_request): Ignore resume requests for
1560 already-resumed and unhandled fork child threads.
1561 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1562 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1563 New functions.
1564 (handle_v_requests) <vCont>: Don't call require_running.
1565 * server.h (in_queued_stop_replies): New declaration.
1566
1567 2016-10-24 Yao Qi <yao.qi@linaro.org>
1568
1569 PR server/20733
1570 * linux-aarch64-low.c (append_insns): Cast the return value to
1571 'uint32_t *'.
1572
1573 2016-10-10 Yao Qi <yao.qi@linaro.org>
1574
1575 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1576
1577 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1578
1579 * target.c (target_supports_multi_process): New function, moved
1580 from...
1581 * target.h (target_supports_multi_process): ... here. Remove
1582 macro.
1583
1584 2016-10-05 Tom Tromey <tom@tromey.com>
1585
1586 PR remote/20655:
1587 * tracepoint.c (handle_tracepoint_bkpts): Check
1588 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1589
1590 2016-10-05 Yao Qi <yao.qi@linaro.org>
1591
1592 * configure.srv: Update the path of arm-*.xml files.
1593
1594 2016-10-05 Terry Guo <terry.guo@arm.com>
1595 Yao Qi <yao.qi@linaro.org>
1596
1597 * Makefile.in: Adjust the path of rules.
1598 * configure.srv: Update the path of xml files.
1599 * regformats/arm-with-iwmmxt.dat: Regenerated.
1600 * regformats/arm-with-neon.dat: Likewise.
1601 * regformats/arm-with-vfpv2.dat: Likewise.
1602 * regformats/arm-with-vfpv3.dat Likewise.
1603
1604 2016-09-30 Yao Qi <yao.qi@linaro.org>
1605
1606 PR gdbserver/20627
1607 * target.c (target_stop_and_wait): Don't call
1608 target_continue_no_signal, use resume_stop instead.
1609
1610 2016-09-26 Yao Qi <yao.qi@linaro.org>
1611
1612 * linux-low.c (linux_wait_1): Call debug_exit.
1613
1614 2016-09-23 Pedro Alves <palves@redhat.com>
1615
1616 * Makefile.in (SFILES): Add common/new-op.c.
1617 (OBS): Add common/new-op.o.
1618 (new-op.o): New rule.
1619
1620 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * .gitinore: Ignore more files.
1623
1624 2016-09-21 Yao Qi <yao.qi@linaro.org>
1625
1626 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1627 23.
1628
1629 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1630
1631 * server.c (start_inferior): Call target_mourn_inferior instead of
1632 mourn_inferior; pass ptid_t argument to it.
1633 (resume): Likewise.
1634 (handle_target_event): Likewise.
1635 * target.c (target_mourn_inferior): New function.
1636 * target.h (mourn_inferior): Delete macro.
1637
1638 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1639
1640 * linux-low.c (lwp_is_stepping): New function.
1641
1642 2016-09-06 Carl Love <cel@us.ibm.com>
1643
1644 * server.c (start_inferior): Fixed comment, requested comment change
1645 didn't get updated correctly. Removed reference to ptrace () call as
1646 it is only true on Linux systems.
1647
1648 2016-09-06 Carl Love <cel@us.ibm.com>
1649
1650 * server.c (start_inferior): Do not call
1651 function target_post_create_inferior () if the
1652 inferior process has already exited.
1653
1654 2016-09-05 Pedro Alves <palves@redhat.com>
1655
1656 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1657 (COMPILE.pre, CC_LD): Use CXX directly.
1658 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1659 * acinclude.m4: Don't include build-with-cxx.m4.
1660 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1661 * configure: Regenerate.
1662
1663 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1664
1665 PR gdb/19495
1666 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1667 call writing data to own_buf.
1668
1669 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1670
1671 * target.c (mywait): Call target_wait instead of
1672 the_target->wait.
1673 (target_wait): New function.
1674
1675 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * server.c (start_inferior): New variable 'ptid'. Replace calls
1678 to the_target->resume by target_continue{,_no_signal}, depending
1679 on the case.
1680 * target.c (target_stop_and_wait): Call target_continue_no_signal
1681 instead of the_target->resume.
1682 (target_continue): New function.
1683
1684 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1685
1686 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1687
1688 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1689
1690 PR server/20491
1691 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1692 ps_prochandle.
1693 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1694 * linux-arm-low.c (ps_get_thread_area): Likewise.
1695 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1696 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1697 * linux-mips-low.c (ps_get_thread_area): Likewise.
1698 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1699 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1700 * linux-x86-low.c (ps_get_thread_area): Likewise.
1701 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1702
1703 2016-08-19 Pedro Alves <palves@redhat.com>
1704
1705 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1706
1707 2016-08-19 Pedro Alves <palves@redhat.com>
1708
1709 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1710 comment. Use memcpy instead of casting through unsigned long.
1711
1712 2016-08-19 Pedro Alves <palves@redhat.com>
1713
1714 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1715 allocating around 0x80000000.
1716
1717 2016-08-19 Pedro Alves <palves@redhat.com>
1718
1719 PR gdb/20415
1720 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1721 (x32-avx512-linux-ipa.o): New rules.
1722 * configure.ac (x86_64-*-linux*): New x32 check.
1723 * configure.srv (ipa_x32_linux_regobj): New.
1724 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1725 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1726 descriptions.
1727 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1728 descriptions.
1729 * configure: Regenerate.
1730
1731 2016-08-09 Pedro Alves <palves@redhat.com>
1732
1733 PR gdb/18653
1734 * Makefile.in (OBS): Add signals-state-save-restore.o.
1735 (signals-state-save-restore.o): New rule.
1736 * config.in: Regenerate.
1737 * configure: Regenerate.
1738 * linux-low.c: Include "signals-state-save-restore.h".
1739 (linux_create_inferior): Call
1740 restore_original_signals_state.
1741 * server.c: Include "dispositions-save-restore.h".
1742 (captured_main): Call save_original_signals_state.
1743
1744 2016-08-05 Pedro Alves <palves@redhat.com>
1745
1746 * configure: Regenerate.
1747
1748 2016-08-04 Yao Qi <yao.qi@linaro.org>
1749
1750 * linux-low.c (regsets_fetch_inferior_registers): Check
1751 errno is ESRCH or not.
1752
1753 2016-08-02 Yao Qi <yao.qi@linaro.org>
1754
1755 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1756 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1757 (thread_db_load_search): Update.
1758 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1759 td_ta_set_event and td_ta_event_getmsg.
1760
1761 2016-07-26 Pedro Alves <palves@redhat.com>
1762
1763 PR server/20414
1764 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1765 of unsigned long for 64-bit registers and use uint32_t instead of
1766 unsigned int for 32-bit registers.
1767
1768 2016-07-26 Pedro Alves <palves@redhat.com>
1769
1770 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1771 to 'ptrace'.
1772
1773 2016-07-21 Tom Tromey <tom@tromey.com>
1774
1775 * configure: Rebuild.
1776
1777 2016-07-21 Yao Qi <yao.qi@linaro.org>
1778
1779 * mem-break.c (find_gdb_breakpoint): Cast bp to
1780 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1781
1782 2016-07-21 Yao Qi <yao.qi@linaro.org>
1783
1784 * server.c (handle_v_requests): Support s and S actions
1785 if target_supports_software_single_step return true.
1786
1787 2016-07-21 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1790 is resume_step, call maybe_hw_step.
1791 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1792 and unstop them.
1793 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1794 breakpoints or not.
1795 (proceed_one_lwp): If resume request is resume_step, install
1796 reinsert breakpoints and call maybe_hw_step.
1797
1798 2016-07-21 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (proceed_one_lwp): Declare.
1801 (linux_resume_one_thread): Remove local variable 'step'.
1802 Lift code enqueue signal. Call proceed_one_lwp instead of
1803 linux_resume_one_lwp.
1804
1805 2016-07-21 Yao Qi <yao.qi@linaro.org>
1806
1807 * linux-low.c (linux_resume_one_thread): Call
1808 enqueue_pending_signal.
1809
1810 2016-07-21 Yao Qi <yao.qi@linaro.org>
1811
1812 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1813 * inferiors.c (do_restore_current_thread_cleanup): New function.
1814 (make_cleanup_restore_current_thread): Likewise.
1815 * linux-low.c (install_software_single_step_breakpoints): Call
1816 make_cleanup_restore_current_thread. Switch current_thread to
1817 thread.
1818
1819 2016-07-21 Yao Qi <yao.qi@linaro.org>
1820
1821 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1822 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1823 (clone_one_breakpoint): Likewise.
1824 (delete_reinsert_breakpoints): Change parameter to thread.
1825 Callers updated.
1826 (has_reinsert_breakpoints): Likewise.
1827 (uninsert_reinsert_breakpoints): Likewise.
1828 (reinsert_reinsert_breakpoints): Likewise.
1829 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1830 (delete_reinsert_breakpoints): Likewise.
1831 (reinsert_reinsert_breakpoints): Likewise.
1832 (uninsert_reinsert_breakpoints): Likewise.
1833 (has_reinsert_breakpoints): Likewise.
1834
1835 2016-07-21 Yao Qi <yao.qi@linaro.org>
1836
1837 * inferiors.c (get_thread_process): Make parameter const.
1838 * inferiors.h (get_thread_process): Update declaration.
1839 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1840 Add new parameters child_thread and parent_thread. Callers
1841 updated.
1842 * mem-break.h (clone_all_breakpoints): Update declaration.
1843
1844 2016-07-21 Yao Qi <yao.qi@linaro.org>
1845
1846 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1847 <command_list, handler>: Remove.
1848 (struct gdb_breakpoint): New.
1849 (struct other_breakpoint): New.
1850 (struct reinsert_breakpoint): New.
1851 (is_gdb_breakpoint): New function.
1852 (any_persistent_commands): Update command_list if
1853 is_gdb_breakpoint returns true.
1854 (set_breakpoint): Create breakpoints according to their types.
1855 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1856 (set_gdb_breakpoint_1): Likewise.
1857 (set_gdb_breakpoint): Likewise.
1858 (clear_breakpoint_conditions): Change parameter type to
1859 'struct gdb_breakpoint *'.
1860 (clear_breakpoint_commands): Likewise.
1861 (clear_breakpoint_conditions_and_commands): Likewise.
1862 (add_condition_to_breakpoint): Likewise.
1863 (add_breakpoint_condition): Likewise.
1864 (add_commands_to_breakpoint): Likewise.
1865 (check_breakpoints): Check other_breakpoint.
1866 (clone_one_breakpoint): Clone breakpopint according to its type.
1867 * mem-break.h (struct gdb_breakpoint): Declare.
1868 (set_gdb_breakpoint): Update declaration.
1869 (clear_breakpoint_conditions_and_commands): Likewise.
1870 (add_breakpoint_condition): Likewise.
1871 (add_breakpoint_commands): Likewise.
1872 * server.c (process_point_options): Change parameter type to
1873 'struct gdb_breakpoint *'.
1874
1875 2016-07-21 Yao Qi <yao.qi@linaro.org>
1876
1877 * mem-break.c (set_breakpoint_at): Rename it to ...
1878 (set_breakpoint_type_at): ... it.
1879 (set_breakpoint_at): Call set_breakpoint_type_at.
1880 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1881 * mem-break.h (set_breakpoint_at): Update comments.
1882
1883 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1884
1885 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1886 to buf parameter.
1887 (nios2_store_gregset): Likewise.
1888
1889 2016-07-01 Pedro Alves <palves@redhat.com>
1890 Antoine Tremblay <antoine.tremblay@ericsson.com>
1891
1892 * linux-low.c: Change interface to take the target lwp_info
1893 pointer directly and return void. Handle detaching from a zombie
1894 thread.
1895 (linux_detach_lwp_callback): New function.
1896 (linux_detach): Detach from the leader thread after detaching from
1897 the clone threads.
1898
1899 2016-06-28 Yao Qi <yao.qi@linaro.org>
1900
1901 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1902 for variable new_offset.
1903 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1904 (aarch64_ftrace_insn_reloc_cb): Likewise.
1905 (aarch64_ftrace_insn_reloc_tb): Likewise.
1906 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1907 PRIx64 instead of PRIx32.
1908
1909 2016-06-28 Yao Qi <yao.qi@linaro.org>
1910
1911 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1912 (the_low_target): Install arm_get_syscall_trapinfo.
1913
1914 2016-06-28 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1917 function.
1918 (the_low_target): Install aarch64_get_syscall_trapinfo.
1919
1920 2016-06-28 Yao Qi <yao.qi@linaro.org>
1921
1922 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1923 Callers updated.
1924 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1925 Remove parameter sysno.
1926 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1927 sysret.
1928
1929 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1930
1931 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1932 (s390_emit_ne_goto): Likewise.
1933 (s390_emit_lt_goto): Likewise.
1934 (s390_emit_le_goto): Likewise.
1935 (s390_emit_gt_goto): Likewise.
1936 (s390_emit_ge_goto): Likewise.
1937 (s390x_emit_eq_goto): Likewise.
1938 (s390x_emit_ne_goto): Likewise.
1939 (s390x_emit_lt_goto): Likewise.
1940 (s390x_emit_le_goto): Likewise.
1941 (s390x_emit_gt_goto): Likewise.
1942 (s390x_emit_ge_goto): Likewise.
1943 (s390_emit_ops_impl): Mark variable static.
1944 (s390x_emit_ops): Likewise.
1945
1946 2016-06-17 Yao Qi <yao.qi@linaro.org>
1947
1948 * linux-low.c (handle_extended_wait): Call
1949 uninsert_reinsert_breakpoints for the parent process. Remove
1950 reinsert breakpoints from the child process. Reinsert them to
1951 the parent process when vfork is done.
1952 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1953 (reinsert_reinsert_breakpoints): New function.
1954 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1955 (reinsert_reinsert_breakpoints): Declare.
1956
1957 2016-06-17 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-low.c (handle_extended_wait): If the parent is doing
1960 step-over, remove the reinsert breakpoints from the forked child.
1961
1962 2016-06-17 Yao Qi <yao.qi@linaro.org>
1963
1964 * linux-low.c (unsuspend_all_lwps): Declare.
1965 (linux_low_filter_event): If thread exited, call finish_step_over.
1966 If step-over is finished, unsuspend other threads.
1967
1968 2016-06-17 Yao Qi <yao.qi@linaro.org>
1969
1970 * linux-low.c (linux_resume_one_lwp_throw): Assert
1971 has_reinsert_breakpoints returns false.
1972 * mem-break.c (delete_disabled_breakpoints): Assert
1973 bp type isn't reinsert_breakpoint.
1974
1975 2016-06-17 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-low.c (maybe_hw_step): New function.
1978 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1979 (finish_step_over): Switch current_thread to lwp temporarily,
1980 and assert has_reinsert_breakpoints returns true.
1981 (proceed_one_lwp): Call maybe_hw_step.
1982 * mem-break.c (has_reinsert_breakpoints): New function.
1983 * mem-break.h (has_reinsert_breakpoints): Declare.
1984
1985 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1986
1987 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1988
1989 2016-05-17 Yao Qi <yao.qi@linaro.org>
1990
1991 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1992 instead of find_inferior.
1993
1994 2016-05-05 Yao Qi <yao.qi@linaro.org>
1995
1996 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1997 Initialize res to zero.
1998
1999 2016-05-05 Yao Qi <yao.qi@linaro.org>
2000
2001 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2002 to uint32_t.
2003
2004 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2005
2006 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2007 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2008 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2009
2010 2016-04-28 Par Olsson <par.olsson@windriver.com>
2011 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * tracepoint.c (write_inferior_int8): New function.
2014 (cmd_qtenable_disable): Write enable flag using
2015 write_inferior_int8.
2016
2017 2016-04-25 Yao Qi <yao.qi@linaro.org>
2018
2019 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2020 (need_step_over_p): Return zero if the LWP has pending signals
2021 can be delivered on software single step target.
2022
2023 2016-04-25 Yao Qi <yao.qi@linaro.org>
2024
2025 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2026 return instead of error.
2027
2028 2016-04-22 Yao Qi <yao.qi@linaro.org>
2029
2030 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2031 to 23.
2032
2033 2016-04-22 Yao Qi <yao.qi@linaro.org>
2034
2035 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2036 signal when stepping over breakpoint with software single
2037 step.
2038
2039 2016-04-21 Pedro Alves <palves@redhat.com>
2040
2041 * linux-s390-low.c (s390_collect_ptrace_register)
2042 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2043 add casts.
2044 (s390_check_regset): Use void * instead of gdb_byte *.
2045
2046 2016-04-20 Pedro Alves <palves@redhat.com>
2047
2048 * configure: Renegerate.
2049
2050 2016-04-20 Yao Qi <yao.qi@linaro.org>
2051
2052 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2053 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2054 number 16.
2055 (arm_store_gregset): Likewise.
2056
2057 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2058
2059 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2060 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2061 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2062 (amd64-avx-mpx-linux.c): New rules.
2063 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2064 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2065 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2066 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2067 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2068 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2069 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2070 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2071 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2072 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2073 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2074 * linux-x86-low.c (x86_linux_read_description): Add case for
2075 X86_XSTATE_AVX_MPX_MASK.
2076 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2077 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2078 init_registers_i386_avx_mpx_linux.
2079 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2080 (initialize_low_tracepoint): Call
2081 init_registers_i386_avx_mpx_linux.
2082 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2083 (initialize_low_tracepoint): Call
2084 init_registers_amd64_avx_mpx_linux.
2085 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2086 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2087 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2088 declarations.
2089
2090 2016-04-18 Pedro Alves <palves@redhat.com>
2091
2092 * configure: Regenerate.
2093
2094 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2095
2096 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2097 (aarch64_emit_sub): Likewise.
2098
2099 2016-04-12 Pedro Alves <palves@redhat.com>
2100
2101 * utils.c (prepare_to_throw_exception): Delete.
2102
2103 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2104
2105 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2106
2107 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2108
2109 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2110
2111 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2112
2113 * linux-aarch64-ipa.c: Add <elf.h> include.
2114 * linux-ppc-ipa.c: Add <elf.h> include.
2115 * linux-s390-ipa.c: Add <elf.h> include.
2116
2117 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2118
2119 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2120 (get_raw_reg_ptr): Likewise.
2121 (get_trace_state_variable_value_ptr): Likewise.
2122 (set_trace_state_variable_value_ptr): Likewise.
2123 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2124 char *.
2125
2126 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2127 Marcin Kościelnicki <koriakin@0x04.net>
2128
2129 PR/17221
2130 * linux-ppc-low.c (emit_insns): New function.
2131 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2132 (ppc_emit_prologue): New function.
2133 (ppc_emit_epilogue): New function.
2134 (ppc_emit_add): New function.
2135 (ppc_emit_sub): New function.
2136 (ppc_emit_mul): New function.
2137 (ppc_emit_lsh): New function.
2138 (ppc_emit_rsh_signed): New function.
2139 (ppc_emit_rsh_unsigned): New function.
2140 (ppc_emit_ext): New function.
2141 (ppc_emit_zero_ext): New function.
2142 (ppc_emit_log_not): New function.
2143 (ppc_emit_bit_and): New function.
2144 (ppc_emit_bit_or): New function.
2145 (ppc_emit_bit_xor): New function.
2146 (ppc_emit_bit_not): New function.
2147 (ppc_emit_equal): New function.
2148 (ppc_emit_less_signed): New function.
2149 (ppc_emit_less_unsigned): New function.
2150 (ppc_emit_ref): New function.
2151 (ppc_emit_const): New function.
2152 (ppc_emit_reg): New function.
2153 (ppc_emit_pop): New function.
2154 (ppc_emit_stack_flush): New function.
2155 (ppc_emit_swap): New function.
2156 (ppc_emit_stack_adjust): New function.
2157 (ppc_emit_call): New function.
2158 (ppc_emit_int_call_1): New function.
2159 (ppc_emit_void_call_2): New function.
2160 (ppc_emit_if_goto): New function.
2161 (ppc_emit_goto): New function.
2162 (ppc_emit_eq_goto): New function.
2163 (ppc_emit_ne_goto): New function.
2164 (ppc_emit_lt_goto): New function.
2165 (ppc_emit_le_goto): New function.
2166 (ppc_emit_gt_goto): New function.
2167 (ppc_emit_ge_goto): New function.
2168 (ppc_write_goto_address): New function.
2169 (ppc_emit_ops_impl): New static variable.
2170 (ppc64v1_emit_prologue): New function.
2171 (ppc64v2_emit_prologue): New function.
2172 (ppc64_emit_epilogue): New function.
2173 (ppc64_emit_add): New function.
2174 (ppc64_emit_sub): New function.
2175 (ppc64_emit_mul): New function.
2176 (ppc64_emit_lsh): New function.
2177 (ppc64_emit_rsh_signed): New function.
2178 (ppc64_emit_rsh_unsigned): New function.
2179 (ppc64_emit_ext): New function.
2180 (ppc64_emit_zero_ext): New function.
2181 (ppc64_emit_log_not): New function.
2182 (ppc64_emit_bit_and): New function.
2183 (ppc64_emit_bit_or): New function.
2184 (ppc64_emit_bit_xor): New function.
2185 (ppc64_emit_bit_not): New function.
2186 (ppc64_emit_equal): New function.
2187 (ppc64_emit_less_signed): New function.
2188 (ppc64_emit_less_unsigned): New function.
2189 (ppc64_emit_ref): New function.
2190 (ppc64_emit_const): New function.
2191 (ppc64v1_emit_reg): New function.
2192 (ppc64v2_emit_reg): New function.
2193 (ppc64_emit_pop): New function.
2194 (ppc64_emit_stack_flush): New function.
2195 (ppc64_emit_swap): New function.
2196 (ppc64v1_emit_call): New function.
2197 (ppc64v2_emit_call): New function.
2198 (ppc64v1_emit_int_call_1): New function.
2199 (ppc64v2_emit_int_call_1): New function.
2200 (ppc64v1_emit_void_call_2): New function.
2201 (ppc64v2_emit_void_call_2): New function.
2202 (ppc64_emit_if_goto): New function.
2203 (ppc64_emit_eq_goto): New function.
2204 (ppc64_emit_ne_goto): New function.
2205 (ppc64_emit_lt_goto): New function.
2206 (ppc64_emit_le_goto): New function.
2207 (ppc64_emit_gt_goto): New function.
2208 (ppc64_emit_ge_goto): New function.
2209 (ppc64v1_emit_ops_impl): New static variable.
2210 (ppc64v2_emit_ops_impl): New static variable.
2211 (ppc_emit_ops): New function.
2212 (linux_low_target): Wire in ppc_emit_ops.
2213
2214 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2215 Marcin Kościelnicki <koriakin@0x04.net>
2216
2217 PR/17221
2218 * Makefile.in: Add powerpc-*-ipa.o
2219 * configure.srv: Add ipa_obj for powerpc*-linux.
2220 * linux-ppc-ipa.c: New file.
2221 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2222 includes.
2223 (PPC_FIELD): New macro.
2224 (PPC_SEXT): New macro.
2225 (PPC_OP6): New macro.
2226 (PPC_BO): New macro.
2227 (PPC_LI): New macro.
2228 (PPC_BD): New macro.
2229 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2230 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2231 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2232 (ppc_get_thread_area): New function.
2233 (is_elfv2_inferior): New function.
2234 (gen_ds_form): New function.
2235 (GEN_STD): New macro.
2236 (GEN_STDU): New macro.
2237 (GEN_LD): New macro.
2238 (GEN_LDU): New macro.
2239 (gen_d_form): New function.
2240 (GEN_ADDI): New macro.
2241 (GEN_ADDIS): New macro.
2242 (GEN_LI): New macro.
2243 (GEN_LIS): New macro.
2244 (GEN_ORI): New macro.
2245 (GEN_ORIS): New macro.
2246 (GEN_LWZ): New macro.
2247 (GEN_STW): New macro.
2248 (GEN_STWU): New macro.
2249 (gen_xfx_form): New function.
2250 (GEN_MFSPR): New macro.
2251 (GEN_MTSPR): New macro.
2252 (GEN_MFCR): New macro.
2253 (GEN_MTCR): New macro.
2254 (GEN_SYNC): New macro.
2255 (GEN_LWSYNC): New macro.
2256 (gen_x_form): New function.
2257 (GEN_OR): New macro.
2258 (GEN_MR): New macro.
2259 (GEN_LWARX): New macro.
2260 (GEN_STWCX): New macro.
2261 (GEN_CMPW): New macro.
2262 (gen_md_form): New function.
2263 (GEN_RLDICL): New macro.
2264 (GEN_RLDICR): New macro.
2265 (gen_i_form): New function.
2266 (GEN_B): New macro.
2267 (GEN_BL): New macro.
2268 (gen_b_form): New function.
2269 (GEN_BNE): New macro.
2270 (GEN_LOAD): New macro.
2271 (GEN_STORE): New macro.
2272 (gen_limm): New function.
2273 (gen_atomic_xchg): New function.
2274 (gen_call): New function.
2275 (ppc_relocate_instruction): New function.
2276 (ppc_install_fast_tracepoint_jump_pad): New function.
2277 (ppc_get_min_fast_tracepoint_insn_len): New function.
2278 (ppc_get_ipa_tdesc_idx): New function.
2279 (the_low_target): Wire in the new functions.
2280 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2281 tdescs.
2282 * linux-ppc-tdesc.h: New file.
2283
2284 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2285
2286 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2287 (alloc_jump_pad_buffer): New function.
2288 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2289 (alloc_jump_pad_buffer): New function.
2290 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2291 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2292 (alloc_jump_pad_buffer): New function.
2293 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2294 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2295 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2296 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2297
2298 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2299
2300 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2301 * linux-amd64-ipa.c: Likewise.
2302 * linux-i386-ipa.c: Likewise.
2303 * linux-s390-ipa.c: Likewise.
2304 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2305 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2306 set_trace_state_variable_value_ptr.
2307 (struct ipa_sym_addresses): Likewise.
2308 (symbol_list): Likewise.
2309 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2310 accessing gdb_collect directly.
2311 (gdb_collect_ptr_type): New typedef.
2312 (get_raw_reg_ptr_type): New typedef.
2313 (get_trace_state_variable_value_ptr_type): New typedef.
2314 (set_trace_state_variable_value_ptr_type): New typedef.
2315 (gdb_collect_ptr): New global.
2316 (get_raw_reg_ptr): New global.
2317 (get_trace_state_variable_value_ptr): New global.
2318 (set_trace_state_variable_value_ptr): New global.
2319 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2320 accessing get_raw_reg directly.
2321 (get_get_tsv_func_addr): Likewise for
2322 get_trace_state_variable_value_ptr.
2323 (get_set_tsv_func_addr): Likewise for
2324 set_trace_state_variable_value_ptr.
2325 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2326
2327 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2328
2329 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2330
2331 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2332
2333 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2334 packets.
2335 (relocate_instruction): Remove own_buf.
2336 * server.c (own_buf): Make global.
2337 (handle_v_requests): Make global.
2338 * server.h (own_buf): New declaration.
2339 (handle_v_requests): New prototype.
2340
2341 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2342
2343 PR 18377
2344 * linux-s390-low.c (add_insns): New function.
2345 (s390_emit_prologue): New function.
2346 (s390_emit_epilogue): New function.
2347 (s390_emit_add): New function.
2348 (s390_emit_sub): New function.
2349 (s390_emit_mul): New function.
2350 (s390_emit_lsh): New function.
2351 (s390_emit_rsh_signed): New function.
2352 (s390_emit_rsh_unsigned): New function.
2353 (s390_emit_ext): New function.
2354 (s390_emit_log_not): New function.
2355 (s390_emit_bit_and): New function.
2356 (s390_emit_bit_or): New function.
2357 (s390_emit_bit_xor): New function.
2358 (s390_emit_bit_not): New function.
2359 (s390_emit_equal): New function.
2360 (s390_emit_less_signed): New function.
2361 (s390_emit_less_unsigned): New function.
2362 (s390_emit_ref): New function.
2363 (s390_emit_if_goto): New function.
2364 (s390_emit_goto): New function.
2365 (s390_write_goto_address): New function.
2366 (s390_emit_litpool): New function.
2367 (s390_emit_const): New function.
2368 (s390_emit_call): New function.
2369 (s390_emit_reg): New function.
2370 (s390_emit_pop): New function.
2371 (s390_emit_stack_flush): New function.
2372 (s390_emit_zero_ext): New function.
2373 (s390_emit_swap): New function.
2374 (s390_emit_stack_adjust): New function.
2375 (s390_emit_set_r2): New function.
2376 (s390_emit_int_call_1): New function.
2377 (s390_emit_void_call_2): New function.
2378 (s390_emit_eq_goto): New function.
2379 (s390_emit_ne_goto): New function.
2380 (s390_emit_lt_goto): New function.
2381 (s390_emit_le_goto): New function.
2382 (s390_emit_gt_goto): New function.
2383 (s390_emit_ge_goto): New function.
2384 (s390x_emit_prologue): New function.
2385 (s390x_emit_epilogue): New function.
2386 (s390x_emit_add): New function.
2387 (s390x_emit_sub): New function.
2388 (s390x_emit_mul): New function.
2389 (s390x_emit_lsh): New function.
2390 (s390x_emit_rsh_signed): New function.
2391 (s390x_emit_rsh_unsigned): New function.
2392 (s390x_emit_ext): New function.
2393 (s390x_emit_log_not): New function.
2394 (s390x_emit_bit_and): New function.
2395 (s390x_emit_bit_or): New function.
2396 (s390x_emit_bit_xor): New function.
2397 (s390x_emit_bit_not): New function.
2398 (s390x_emit_equal): New function.
2399 (s390x_emit_less_signed): New function.
2400 (s390x_emit_less_unsigned): New function.
2401 (s390x_emit_ref): New function.
2402 (s390x_emit_if_goto): New function.
2403 (s390x_emit_const): New function.
2404 (s390x_emit_call): New function.
2405 (s390x_emit_reg): New function.
2406 (s390x_emit_pop): New function.
2407 (s390x_emit_stack_flush): New function.
2408 (s390x_emit_zero_ext): New function.
2409 (s390x_emit_swap): New function.
2410 (s390x_emit_stack_adjust): New function.
2411 (s390x_emit_int_call_1): New function.
2412 (s390x_emit_void_call_2): New function.
2413 (s390x_emit_eq_goto): New function.
2414 (s390x_emit_ne_goto): New function.
2415 (s390x_emit_lt_goto): New function.
2416 (s390x_emit_le_goto): New function.
2417 (s390x_emit_gt_goto): New function.
2418 (s390x_emit_ge_goto): New function.
2419 (s390_emit_ops): New function.
2420 (struct linux_target_ops): Fill in emit_ops hook.
2421
2422 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2423
2424 PR 18377
2425 * Makefile.in: Add s390 IPA files.
2426 * configure.srv: Build IPA for s390.
2427 * linux-s390-ipa.c: New file.
2428 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2429 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2430 (tdesc_s390_linux32): Likewise.
2431 (init_registers_s390_linux32v1): Likewise.
2432 (tdesc_s390_linux32v1): Likewise.
2433 (init_registers_s390_linux32v2): Likewise.
2434 (tdesc_s390_linux32v2): Likewise.
2435 (init_registers_s390_linux64): Likewise.
2436 (tdesc_s390_linux64): Likewise.
2437 (init_registers_s390_linux64v1): Likewise.
2438 (tdesc_s390_linux64v1): Likewise.
2439 (init_registers_s390_linux64v2): Likewise.
2440 (tdesc_s390_linux64v2): Likewise.
2441 (init_registers_s390_te_linux64): Likewise.
2442 (tdesc_s390_te_linux64): Likewise.
2443 (init_registers_s390_vx_linux64): Likewise.
2444 (tdesc_s390_vx_linux64): Likewise.
2445 (init_registers_s390_tevx_linux64): Likewise.
2446 (tdesc_s390_tevx_linux64): Likewise.
2447 (init_registers_s390x_linux64): Likewise.
2448 (tdesc_s390x_linux64): Likewise.
2449 (init_registers_s390x_linux64v1): Likewise.
2450 (tdesc_s390x_linux64v1): Likewise.
2451 (init_registers_s390x_linux64v2): Likewise.
2452 (tdesc_s390x_linux64v2): Likewise.
2453 (init_registers_s390x_te_linux64): Likewise.
2454 (tdesc_s390x_te_linux64): Likewise.
2455 (init_registers_s390x_vx_linux64): Likewise.
2456 (tdesc_s390x_vx_linux64): Likewise.
2457 (init_registers_s390x_tevx_linux64): Likewise.
2458 (tdesc_s390x_tevx_linux64): Likewise.
2459 (have_hwcap_s390_vx): New static variable.
2460 (s390_arch_setup): Fill have_hwcap_s390_vx.
2461 (s390_get_thread_area): New function.
2462 (s390_ft_entry_gpr_esa): New const.
2463 (s390_ft_entry_gpr_zarch): New const.
2464 (s390_ft_entry_misc): New const.
2465 (s390_ft_entry_fr): New const.
2466 (s390_ft_entry_vr): New const.
2467 (s390_ft_main_31): New const.
2468 (s390_ft_main_64): New const.
2469 (s390_ft_exit_fr): New const.
2470 (s390_ft_exit_vr): New const.
2471 (s390_ft_exit_misc): New const.
2472 (s390_ft_exit_gpr_esa): New const.
2473 (s390_ft_exit_gpr_zarch): New const.
2474 (append_insns): New function.
2475 (s390_relocate_instruction): New function.
2476 (s390_install_fast_tracepoint_jump_pad): New function.
2477 (s390_get_min_fast_tracepoint_insn_len): New function.
2478 (s390_get_ipa_tdesc_idx): New function.
2479 (struct linux_target_ops): Wire in the above functions.
2480 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2481 * linux-s390-tdesc.h: New file.
2482
2483 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2484
2485 * linux-s390-low.c (s390_supports_tracepoints): New function.
2486 (struct linux_target_ops): Fill supports_tracepoints hook.
2487
2488 2016-03-18 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-low.c (lwp_signal_can_be_delivered): New function.
2491 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2492
2493 2016-03-18 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2496 0 if signal is enqueued. Remove 'signal' from one debugging
2497 message. Move one debugging message to some lines below.
2498 Remove code setting 'signal' to 0.
2499
2500 2016-03-18 Yao Qi <yao.qi@linaro.org>
2501
2502 * linux-low.c (linux_low_filter_event): Remove redundant
2503 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2504
2505 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2506
2507 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2508 (struct linux_target_ops): Wire in the above.
2509
2510 2016-03-03 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-low.c: Update comments to start_step_over.
2513
2514 2016-03-03 Yao Qi <yao.qi@linaro.org>
2515
2516 PR server/19736
2517 * linux-low.c (handle_extended_wait): Set child suspended
2518 if event_lwp->bp_reinsert isn't zero.
2519
2520 2016-03-02 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2523 enqueue_pending_signal.
2524
2525 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2526
2527 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2528 is actually loaded.
2529
2530 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2531
2532 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2533 (s390_regmap_3264) [!__s390x__]: New global.
2534 (s390_collect_ptrace_register): Skip map entries containing -1.
2535 (s390_supply_ptrace_register): Ditto.
2536 (s390_fill_gprs_high): New function.
2537 (s390_store_gprs_high): New function.
2538 (s390_regsets): Add NT_S390_HIGH_GPRS.
2539 (s390_get_hwcap): Enable on 31-bit.
2540 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2541 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2542 Detect NT_S390_HIGH_GPRS.
2543 (s390_usrregs_info_3264): Enable on 31-bit.
2544 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2545 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2546
2547 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2548
2549 PR gdb/13808
2550 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2551 * configure.srv: Ditto.
2552 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2553 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2554 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2555 (init_registers_amd64_linux): Remove prototype.
2556 (tdesc_amd64_linux): Remove declaration.
2557 (get_ipa_tdesc): New function.
2558 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2559 initialize remaining tdescs.
2560 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2561 (init_registers_i386_linux): Remove prototype.
2562 (tdesc_i386_linux): Remove declaration.
2563 (get_ipa_tdesc): New function.
2564 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2565 initialize remaining tdescs.
2566 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2567 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2568 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2569 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2570 (x86_get_ipa_tdesc_idx): New function.
2571 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2572 * linux-x86-tdesc.h: New file.
2573 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2574 (target_get_ipa_tdesc_idx): New macro.
2575 * tracepoint.c (ipa_tdesc_idx): New macro.
2576 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2577 (symbol_list): Add ipa_tdesc_idx.
2578 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2579 (ipa_tdesc): Remove.
2580 (ipa_tdesc_idx): New variable.
2581 (get_context_regcache): Use get_ipa_tdesc.
2582 (gdb_collect): Ditto.
2583 (gdb_probe): Ditto.
2584 * tracepoint.h (get_ipa_tdesc): New prototype.
2585 (ipa_tdesc): Remove.
2586
2587 2016-02-24 Pedro Alves <palves@redhat.com>
2588
2589 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2590 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2591 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2592 Factor out common code between the USE_SIGTRAP_SIGINFO and
2593 !USE_SIGTRAP_SIGINFO blocks.
2594 (linux_low_filter_event): Call save_stop_reason instead of
2595 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2596 Update comments.
2597 (linux_wait_1): Update comments.
2598
2599 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2600
2601 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2602 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2603 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2604 ppc_insert_point, ppc_remove_point.
2605
2606 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2607
2608 * linux-s390-low.c (s390_supports_z_point_type): New function.
2609 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2610
2611 2016-02-16 Yao Qi <yao.qi@linaro.org>
2612
2613 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2614 PC. Get pc from regcache_read_pc.
2615
2616 2016-02-12 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2619 or linux_get_pc_32bit.
2620 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2621
2622 2016-02-12 Yao Qi <yao.qi@linaro.org>
2623
2624 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2625 arm_linux_get_next_pcs_fixup.
2626
2627 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2628
2629 * tracepoint.c (x_tracepoint_action_download): Change
2630 write_inferior_data_ptr to write_inferior_data_pointer.
2631 (cmd_qtstart): Likewise.
2632 (write_inferior_data_ptr): Remove.
2633 (download_agent_expr): Change write_inferior_data_ptr to
2634 write_inferior_data_pointer.
2635 (download_tracepoint_1): Likewise.
2636 (download_tracepoint): Likewise.
2637 (download_trace_state_variables): Likewise.
2638
2639 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2640 Marcin Kościelnicki <koriakin@0x04.net>
2641
2642 * tracepoint.c (struct tracepoint_action_ops): Remove.
2643 (struct tracepoint_action): Remove ops.
2644 (m_tracepoint_action_download, r_tracepoint_action_download)
2645 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2646 size and offset accordingly.
2647 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2648 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2649 (tracepoint_action_send, tracepoint_action_download): New functions.
2650 Helpers for trace action handlers.
2651 (add_tracepoint_action): Remove setup actions ops.
2652 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2653
2654 2016-02-10 Yao Qi <yao.qi@linaro.org>
2655
2656 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2657
2658 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2661 to AC_OUTPUT.
2662 * configure: Regenerate.
2663
2664 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2665
2666 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2667 void * to gdb_byte *.
2668 * linux-low.c (siginfo_fixup): Likewise.
2669 (linux_xfer_siginfo): Likewise.
2670 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2671 Likewise.
2672 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2673
2674 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2675
2676 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2677 to srv_tgtobj.
2678 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2679 to srv_tgtobj.
2680 * linux-x86-low.c [__x86_64__]: Include
2681 "nat/amd64-linux-siginfo.h".
2682 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2683 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2684 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2685 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2686 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2687 (cpt_si_fd, si_timerid, si_overrun): Move from
2688 nat/amd64-linux-siginfo.c.
2689 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2690
2691 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2692
2693 * server.c (skip_to_semicolon): Remove.
2694 (process_point_options): Use strchrnul instead of
2695 skip_to_semicolon.
2696
2697 2016-01-26 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2700 * linux-low.c (install_software_single_step_breakpoints): Don't
2701 call regcache_read_pc.
2702 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2703 argument pc.
2704
2705 2016-01-26 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-low.c (install_software_single_step_breakpoints): Call
2708 regcache_read_pc instead of get_pc.
2709
2710 2016-01-26 Yao Qi <yao.qi@linaro.org>
2711
2712 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2713 (unblock_async_io): Rename to ...
2714 (block_unblock_async_io): ... it. New function.
2715 (enable_async_io): Don't install SIGIO handler. Unblock it
2716 instead.
2717 (disable_async_io): Don't ignore SIGIO. Block it instead.
2718 (initialize_async_io): Install SIGIO handler. Don't call
2719 unblock_async_io.
2720
2721 2016-01-26 Yao Qi <yao.qi@linaro.org>
2722
2723 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2724 first character is '\003', call *the_target->request_interrupt.
2725
2726 2016-01-25 Yao Qi <yao.qi@linaro.org>
2727
2728 * remote-utils.c (new_thread_notify): Remove.
2729 (dead_thread_notify): Likewise.
2730 * remote-utils.h (new_thread_notify): Remove declaration.
2731 (dead_thread_notify): Likewise.
2732
2733 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2734
2735 * gdb.trace/pending.exp: Fix expected message on continue.
2736
2737 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2738
2739 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2740 it works properly on big-endian machines where sizeof (CORE_ADDR)
2741 != sizeof (void *).
2742
2743 2016-01-21 Pedro Alves <palves@redhat.com>
2744
2745 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2746 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2747 * configure: Regenerate.
2748
2749 2016-01-21 Yao Qi <yao.qi@linaro.org>
2750
2751 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2752 is_thumb and set it according to CPSR saved on the stack.
2753 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2754 arm_sigreturn_next_pc.
2755
2756 2016-01-18 Yao Qi <yao.qi@linaro.org>
2757
2758 * linux-low.c (linux_set_pc_64bit): New function.
2759 (linux_get_pc_64bit): New function.
2760 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2761 Declare.
2762 * linux-sparc-low.c (debug_threads): Remove declaration.
2763 (sparc_get_pc): Remove.
2764 (the_low_target): Use linux_get_pc_64bit instead of
2765 sparc_get_pc.
2766 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2767 (the_low_target): Use linux_get_pc_64bit and
2768 linux_set_pc_64bit.
2769
2770 2016-01-18 Yao Qi <yao.qi@linaro.org>
2771
2772 * linux-arm-low.c (debug_threads): Remove declaration.
2773 (arm_get_pc, arm_set_pc): Remove.
2774 (the_low_target): Use linux_get_pc_32bit and
2775 linux_set_pc_32bit.
2776 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2777 (the_low_target): Use linux_get_pc_32bit and
2778 linux_set_pc_32bit.
2779 * linux-cris-low.c (debug_threads): Remove declaration.
2780 (cris_get_pc, cris_set_pc,): Remove.
2781 (the_low_target): Use linux_get_pc_32bit and
2782 linux_set_pc_32bit.
2783 * linux-crisv32-low.c (debug_threads): Remove declaration.
2784 (cris_get_pc, cris_set_pc): Remove.
2785 (the_low_target): Use linux_get_pc_32bit and
2786 linux_set_pc_32bit.
2787 * linux-low.c: Include inttypes.h.
2788 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2789 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2790 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2791 (the_low_target): Use linux_get_pc_32bit and
2792 linux_set_pc_32bit.
2793 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2794 (the_low_target): Use linux_get_pc_32bit and
2795 linux_set_pc_32bit.
2796 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2797 (the_low_target): Use linux_get_pc_32bit and
2798 linux_set_pc_32bit.
2799 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2800 (the_low_target): Use linux_get_pc_32bit and
2801 linux_set_pc_32bit.
2802 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2803 (the_low_target): Use linux_get_pc_32bit and
2804 linux_set_pc_32bit.
2805
2806 2016-01-18 Gary Benson <gbenson@redhat.com>
2807
2808 * configure.ac (AC_FUNC_FORK): New check.
2809 * config.in: Regenerate.
2810 * configure: Likewise.
2811
2812 2016-01-14 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2815 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2816 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2817 arm_get_next_pcs_ctor.
2818
2819 2016-01-12 Josh Stone <jistone@redhat.com>
2820 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2821
2822 * inferiors.h: Include "gdb_vecs.h".
2823 (struct process_info): Add syscalls_to_catch.
2824 * inferiors.c (remove_process): Free syscalls_to_catch.
2825 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2826 syscall_return stops.
2827 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2828 * server.c (handle_general_set): Handle QCatchSyscalls.
2829 (handle_query): Report support for QCatchSyscalls.
2830 * target.h (struct target_ops): Add supports_catch_syscall.
2831 (target_supports_catch_syscall): New macro.
2832 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2833 (struct lwp_info): Add syscall_state.
2834 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2835 Maintain syscall_state and syscalls_to_catch across exec.
2836 (get_syscall_trapinfo): New function, proxy to the_low_target.
2837 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2838 (linux_low_filter_event): Toggle syscall_state entry/return for
2839 syscall traps, and set it ignored for all others.
2840 (gdb_catching_syscalls_p): New function.
2841 (gdb_catch_this_syscall_p): New function.
2842 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2843 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2844 (linux_supports_catch_syscall): New function.
2845 (linux_target_ops): Install it.
2846 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2847 (the_low_target): Install it.
2848
2849 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2850
2851 * acinclude.m4: Include new ../warning.m4 file.
2852 * configure: Regenerated.
2853 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2854
2855 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2856
2857 * ax.c (is_goto_target): Mark static.
2858 * linux-low.c (register_addr): Likewise.
2859 (linux_fetch_registers, linux_store_registers): Likewise.
2860 * mem-break.c (any_persistent_commands): Fix old prototype.
2861 (add_commands_to_breakpoint): Mark static.
2862 * regcache.c (find_register_by_name): Delete unused func.
2863 * remote-utils.c (hex_or_minus_one): Mark static.
2864 * server.c (monitor_show_help): Mark static.
2865 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2866 handle_v_requests): Likewise.
2867
2868 2016-01-12 Pedro Alves <palves@redhat.com>
2869
2870 Remove use of the registered trademark symbol throughout.
2871
2872 2016-01-08 Yao Qi <yao.qi@linaro.org>
2873
2874 * remote-utils.c (getpkt): If c is '\003', call target hook
2875 request_interrupt.
2876
2877 2016-01-06 Yao Qi <yao.qi@linaro.org>
2878
2879 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2880 linux-aarch32-low.c.
2881 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2882 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2883 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2884 (thumb2_breakpoint): Declare.
2885 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2886 linux-aarch32-low.h.
2887 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2888 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2889 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2890
2891 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2892
2893 * gdbreplay.c (gdbreplay_version): Change copyright year in
2894 version message.
2895 * server.c (gdbserver_version): Likewise.
2896
2897 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2898
2899 * server.c (crc32_table): Delete.
2900 (crc32): Use libiberty's xcrc32 function.
2901
2902 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2903
2904 * lynx-low.c (lynx_delete_thread_callback): New function.
2905 (lynx_mourn): Properly delete our process and all of its
2906 threads. Remove call to clear_inferiors.
2907
2908 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2909
2910 * target.c (thread_search_callback): Add check that
2911 the thread_stopped target callback is not NULL before
2912 calling it.
2913
2914 2015-12-21 Yao Qi <yao.qi@linaro.org>
2915
2916 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2917 arm breakpoint.
2918
2919 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2920
2921 * server.c (handle_query): Call target_supports_software_single_step.
2922
2923 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2924
2925 * linux-low.c (single_step): New function.
2926 (linux_resume_one_lwp_throw): Call single_step.
2927 (start_step_over): Likewise.
2928
2929 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2930
2931 * Makefile.in (SFILES): Append arch/arm-linux.c,
2932 arch/arm-get-next-pcs.c.
2933 (arm-linux.o): New rule.
2934 (arm-get-next-pcs.o): New rule.
2935 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2936 arm-linux.o.
2937 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2938 to linux-aarch32-low.c.
2939 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2940 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2941 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2942 (thumb2_breakpoint_len): Likewise.
2943 (arm_is_thumb_mode): Make non-static.
2944 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2945 from linux-aarch32-low.c.
2946 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2947 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2948 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2949 (thumb2_breakpoint_len): Likewise.
2950 (arm_is_thumb_mode): New declaration.
2951 * linux-arm-low.c: Include arch/arm-linux.h
2952 aarch/arm-get-next-pcs.h, sys/syscall.h.
2953 (get_next_pcs_ops): New struct.
2954 (get_next_pcs_addr_bits_remove): New function.
2955 (get_next_pcs_is_thumb): New function.
2956 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2957 (arm_sigreturn_next_pc): Likewise.
2958 (get_next_pcs_syscall_next_pc): Likewise.
2959 (arm_gdbserver_get_next_pcs): Likewise.
2960 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2961 Initialize.
2962 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2963 * server.h: Include gdb_vecs.h.
2964
2965 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2966
2967 * Makefile.in (SFILES): Append common/common-regcache.c.
2968 (OBS): Append common-regcache.o.
2969 (common-regcache.o): New rule.
2970 * regcache.c (init_register_cache): Initialize cache to
2971 REG_UNAVAILABLE.
2972 (regcache_raw_read_unsigned): New function.
2973 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2974 register_status enum.
2975
2976 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2977
2978 * linux-aarch64-low.c (the_low_targets): Rename
2979 breakpoint_reinsert_addr to get_next_pcs.
2980 * linux-arm-low.c (the_low_targets): Likewise.
2981 * linux-bfin-low.c (the_low_targets): Likewise.
2982 * linux-cris-low.c (the_low_targets): Likewise.
2983 * linux-crisv32-low.c (the_low_targets): Likewise.
2984 * linux-low.c (can_software_single_step): Likewise.
2985 (install_software_single_step_breakpoints): New function.
2986 (start_step_over): Use install_software_single_step_breakpoints.
2987 * linux-low.h: New CORE_ADDR vector.
2988 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2989 get_next_pcs.
2990 * linux-mips-low.c (the_low_targets): Likewise.
2991 * linux-nios2-low.c (the_low_targets): Likewise.
2992 * linux-sparc-low.c (the_low_targets): Likewise.
2993
2994 2015-12-17 Pedro Alves <palves@redhat.com>
2995
2996 * linux-low.c (linux_kill_one_lwp): Remove references to
2997 LinuxThreads.
2998 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2999 to 'kill'.
3000 (linux_init_signals): Delete.
3001 (initialize_low): Adjust.
3002 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3003
3004 2015-12-16 Pedro Alves <palves@redhat.com>
3005
3006 * configure.ac (compiler warning flags): When testing a
3007 -Wno-foo option, check whether -Wfoo works instead.
3008 * configure: Regenerate.
3009
3010 2015-12-11 Don Breazeal <donb@codesourcery.com>
3011
3012 * server.c (process_serial_event): Don't exit from gdbserver
3013 in remote mode if there are still active inferiors.
3014
3015 2015-12-11 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3018 arm_breakpoint_at if the process is 32-bit.
3019
3020 2015-12-11 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3023 arm breakpoint.
3024
3025 2015-12-07 Yao Qi <yao.qi@linaro.org>
3026
3027 * configure.srv: Append arm.o to srv_tgtobj for
3028 aarch64*-*-linux* target.
3029 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3030 from linux-arm-low.c.
3031 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3032 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3033 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3034 (thumb2_breakpoint_len): Likewise.
3035 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3036 (arm_breakpoint_kinds): Likewise.
3037 (arm_breakpoint_kind_from_pc): Likewise.
3038 (arm_sw_breakpoint_from_kind): Likewise.
3039 (arm_breakpoint_kind_from_current_state): Likewise.
3040 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3041 (arm_sw_breakpoint_from_kind): Declare.
3042 (arm_breakpoint_kind_from_current_state): Declare.
3043 (arm_breakpoint_at): Declare.
3044 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3045 arm_sw_breakpoint_from_kind if process is 32-bit.
3046 (aarch64_breakpoint_kind_from_pc): New function.
3047 (aarch64_breakpoint_kind_from_current_state): New function.
3048 (the_low_target): Initialize fields breakpoint_kind_from_pc
3049 and breakpoint_kind_from_current_state.
3050 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3051 linux-aarch32-low.c.
3052 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3053 (arm_breakpoint, arm_breakpoint_len): Likewise.
3054 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3055 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3056 (arm_is_thumb_mode): Likewise.
3057 (arm_breakpoint_at): Likewise.
3058 (arm_breakpoint_kind_from_pc): Likewise.
3059 (arm_sw_breakpoint_from_kind): Likewise.
3060 (arm_breakpoint_kind_from_current_state): Likewise.
3061
3062 Revert:
3063 2015-08-04 Yao Qi <yao.qi@linaro.org>
3064
3065 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3066 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3067 * server.c (extended_protocol): Remove "static".
3068 * server.h (extended_protocol): Declare it.
3069
3070 2015-12-04 Josh Stone <jistone@redhat.com>
3071
3072 * target.h (struct target_ops) <arch_setup>: Rename to ...
3073 (struct target_ops) <post_create_inferior>: ... this.
3074 (target_arch_setup): Rename to ...
3075 (target_post_create_inferior): ... this, calling post_create_inferior.
3076 * server.c (start_inferior): Update target_arch_setup calls to
3077 target_post_create_inferior.
3078 * linux-low.c (linux_low_ptrace_options): Forward declare.
3079 (linux_arch_setup): Update its comment for general use.
3080 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3081 (struct linux_target_ops): Use linux_post_create_inferior.
3082 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3083 to post_create_inferior.
3084 * nto-low.c (struct nto_target_ops): Likewise.
3085 * spu-low.c (struct spu_target_ops): Likewise.
3086 * win32-low.c (struct win32_target_ops): Likewise.
3087
3088 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3089
3090 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3091
3092 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3093
3094 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3095 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3096 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3097 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3098 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3099 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3100 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3101 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3102 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3103 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3104 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3105 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3106
3107 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3108
3109 * linux-low.c (linux_look_up_symbols): Don't call
3110 linux_supports_traceclone.
3111 * linux-low.h (thread_db_init): Remove use_events argument.
3112 * thread-db.c (thread_db_use_event): Remove global variable.
3113 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3114 (struct thread_db) <td_create_bp>: Remove field.
3115 (thread_db_create_event): Remove function.
3116 (thread_db_enable_reporting): Likewise.
3117 (find_one_thread): Don't check for thread_db_use_events.
3118 (attach_thread): Likewise.
3119 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3120 (try_thread_db_load_1): Don't check for thread_db_use_events.
3121 (thread_db_init): Remove use_events argument and thread events
3122 handling.
3123 (remove_thread_event_breakpoints): Remove function.
3124 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3125
3126 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3127
3128 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3129 New function.
3130 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3131 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3132 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3133 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3134 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3135 Initialize.
3136 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3137 New function.
3138 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3139 * linux-low.c (can_hardware_single_step): Use
3140 supports_hardware_single_step.
3141 (can_software_single_step): New function.
3142 (start_step_over): Call can_software_single_step.
3143 (linux_supports_hardware_single_step): New function.
3144 (struct target_ops) <supports_software_single_step>: Initialize.
3145 * linux-low.h (struct linux_target_ops)
3146 <supports_hardware_single_step>: Initialize.
3147 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3148 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3149 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3150 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3151 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3153 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3155 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3156 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3157 Initialize.
3158 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3159 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3160 Initialize.
3161 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3163 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3164 New function.
3165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3166 * target.h (struct target_ops): <supports_software_single_step>:
3167 New field.
3168 (target_supports_software_single_step): New macro.
3169
3170 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3171
3172 * linux-low.c (linux_wait_1): Fix pc advance condition.
3173 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3174 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3175
3176 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3177
3178 * linux-arm-low.c (arm_is_thumb_mode): New function.
3179 (arm_breakpoint_at): Use arm_is_thumb_mode.
3180 (arm_breakpoint_kind_from_current_state): New function.
3181 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3182 Initialize.
3183 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3184 (linux_breakpoint_kind_from_current_state): New function.
3185 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3186 * linux-low.h (struct linux_target_ops)
3187 <breakpoint_kind_from_current_state>: New field.
3188 * target.h (struct target_ops): Likewise.
3189 (target_breakpoint_kind_from_current_state): New macro.
3190
3191 2015-11-30 Pedro Alves <palves@redhat.com>
3192
3193 * linux-low.c (linux_resume): Wake up the event loop before
3194 returning.
3195
3196 2015-11-30 Pedro Alves <palves@redhat.com>
3197
3198 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3199 check.
3200 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3201 to -1.
3202 * target.c (struct thread_search): New structure.
3203 (thread_search_callback): New function.
3204 (prev_general_thread): New global.
3205 (prepare_to_access_memory, done_accessing_memory): New functions.
3206 * target.h (prepare_to_access_memory, done_accessing_memory):
3207 Replace macros with function declarations.
3208
3209 2015-11-30 Pedro Alves <palves@redhat.com>
3210
3211 PR 14618
3212 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3213 report TARGET_WAITKIND_NO_RESUMED.
3214 * remote-utils.c (prepare_resume_reply): Handle
3215 TARGET_WAITKIND_NO_RESUMED.
3216 * server.c (report_no_resumed): New global.
3217 (handle_query) <qSupported>: Handle "no-resumed+". Report
3218 "no-resumed+" support.
3219 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3220 return error if the client doesn't support no-resumed events.
3221 (push_stop_notification): New function.
3222 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3223 events if the client supports them.
3224
3225 2015-11-30 Pedro Alves <palves@redhat.com>
3226
3227 * linux-low.c (thread_still_has_status_pending_p): Don't check
3228 vCont;t here.
3229 (lwp_resumed): New function.
3230 (status_pending_p_callback): Return early if the LWP is not
3231 supposed to be resumed.
3232
3233 2015-11-30 Pedro Alves <palves@redhat.com>
3234
3235 * linux-low.c (handle_extended_wait): Assert that the LWP's
3236 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3237 thread create events, leave the new child's status pending.
3238 (linux_low_filter_event): If GDB wants to hear about thread exit
3239 events, leave the LWP marked dead and don't delete it.
3240 (linux_wait_for_event_filtered): Don't check for thread exit.
3241 (filter_exit_event): New function.
3242 (linux_wait_1): Use it, when returning an exit event.
3243 (linux_resume_one_lwp_throw): Assert that the LWP's
3244 waitstatus is TARGET_WAITKIND_IGNORE.
3245 * remote-utils.c (prepare_resume_reply): Handle
3246 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3247 * server.c (report_thread_events): New global.
3248 (handle_general_set): Handle QThreadEvents.
3249 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3250 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3251 TARGET_WAITKIND_THREAD_EXITED.
3252 * server.h (report_thread_events): Declare.
3253
3254 2015-11-30 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3257 the thread's last_resume_kind was resume_stop.
3258
3259 2015-11-30 Pedro Alves <palves@redhat.com>
3260
3261 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3262 before returning.
3263
3264 2015-11-30 Pedro Alves <palves@redhat.com>
3265
3266 * server.c (handle_v_requests): Handle vCtrlC.
3267
3268 2015-11-30 Pedro Alves <palves@redhat.com>
3269
3270 * gdbthread.h (find_any_thread_of_pid): Declare.
3271 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3272 functions.
3273 * server.c (handle_query): If current_thread is NULL, look for
3274 another thread of the selected process.
3275
3276 2015-11-26 Daniel Colascione <dancol@dancol.org>
3277 Simon Marchi <simon.marchi@ericsson.com>
3278
3279 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3280 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3281 name in reply.
3282 * target.h (struct target_ops) <thread_name>: New field.
3283 (target_thread_name): New macro.
3284
3285 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3286
3287 * regcache.h (regcache_invalidate_pid): Add declaration.
3288 * regcache.c (regcache_invalidate_pid): New function, extracted
3289 from regcache_invalidate.
3290 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3291 Add trivial documentation comment.
3292 * lynx-low.c: Use regcache_invalidate_pid instead of
3293 regcache_invalidate.
3294
3295 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3296
3297 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3298 and Elf64_auxv_t if the target is Android.
3299
3300 2015-11-22 Doug Evans <xdje42@gmail.com>
3301
3302 * target.h: #include <sys/types.h>.
3303
3304 2015-11-19 Pedro Alves <palves@redhat.com>
3305
3306 * linux-low.c (linux_process_qsupported): Change prototype.
3307 Adjust.
3308 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3309 Change prototype.
3310 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3311 and adjust to loop over all features.
3312 * server.c (handle_query) <qSupported>: Adjust to call
3313 target_process_qsupported once, passing it a vector of unprocessed
3314 features.
3315 * target.h (struct target_ops) <process_qsupported>: Change
3316 prototype.
3317 (target_process_qsupported): Adjust.
3318
3319 2015-11-19 Pedro Alves <palves@redhat.com>
3320
3321 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3322 mode.
3323 * configure: Regenerate.
3324
3325 2015-11-19 Pedro Alves <palves@redhat.com>
3326
3327 * configure: Regenerate.
3328
3329 2015-11-19 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3332 type to uint32_t.
3333
3334 2015-11-19 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3337 (struct aarch64_operand): Move enum out.
3338
3339 2015-11-19 Yao Qi <yao.qi@linaro.org>
3340
3341 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3342 struct user_fpsimd_state *.
3343 (aarch64_store_fpregset): Likewise.
3344
3345 2015-11-19 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3348 struct user_pt_regs *.
3349 (aarch64_store_gregset): Likewise.
3350
3351 2015-11-18 Pedro Alves <palves@redhat.com>
3352
3353 * Makefile.in (all_object_files): Add $IPA_OBJS.
3354
3355 2015-11-17 Pedro Alves <palves@redhat.com>
3356
3357 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3358 GDB_SIGNAL_0 and gdb_signal_to_string.
3359
3360 2015-11-17 Pedro Alves <palves@redhat.com>
3361
3362 * win32-low.c (handle_output_debug_string): Remove parameter.
3363 (win32_kill): Remove our_status local and adjust call to
3364 handle_output_debug_string.
3365 (get_child_debug_event): Adjust call to
3366 handle_output_debug_string.
3367
3368 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3369
3370 * linux-mips-low.c (mips_fill_gregset): Add cast.
3371 (mips_store_gregset): Likewise.
3372 (mips_fill_fpregset): Likewise.
3373 (mips_store_fpregset): Likewise.
3374
3375 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3376
3377 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3378 priv.
3379
3380 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3381
3382 * linux-mips-low.c (mips_linux_new_thread): Change type of
3383 watch_type to enum target_hw_bp_type.
3384
3385 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3388 Change return type to arm_hwbp_type.
3389
3390 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3391
3392 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3393 (arm_store_gregset): Likewise.
3394 * linux-arm-low.c (arm_get_hwcap): Likewise.
3395 (arm_read_description): Likewise.
3396
3397 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3398
3399 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3400
3401 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3402
3403 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3404 (ppc_fill_vsxregset): Likewise.
3405 (ppc_store_vsxregset): Likewise.
3406 (ppc_fill_vrregset): Likewise.
3407 (ppc_store_vrregset): Likewise.
3408 (ppc_fill_evrregset): Likewise.
3409 (ppc_store_evrregset): Likewise.
3410
3411 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3412
3413 * linux-ppc-low.c (ppc_usrregs_info): Remove
3414 forward-declaration.
3415 (ppc_arch_setup): Move lower in file.
3416
3417 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3418
3419 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3420 (ps_pdwrite): Likewise.
3421
3422 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3423
3424 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3425 to after assert checks.
3426
3427 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3428
3429 * proc-service.c (ps_pdread): Add/adjust casts.
3430 (ps_pdwrite): Add/adjust casts.
3431
3432 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3433
3434 * server.c (handle_search_memory_1): Cast return value of
3435 memmem.
3436
3437 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3438
3439 * server.c (write_qxfer_response): Change type of data to
3440 gdb_byte *.
3441
3442 2015-10-29 Pedro Alves <palves@redhat.com>
3443
3444 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3445
3446 2015-10-29 Pedro Alves <palves@redhat.com>
3447
3448 * tracepoint.c (clear_installed_tracepoints): Add casts.
3449
3450 2015-10-29 Pedro Alves <palves@redhat.com>
3451
3452 * server.c (handle_v_cont, process_serial_event): Add enum
3453 gdb_signal casts to signal parsing code.
3454
3455 2015-10-29 Pedro Alves <palves@redhat.com>
3456
3457 * linux-low.h (NULL_REGSET): Define.
3458 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3459 * linux-arm-low.c (arm_regsets): Likewise.
3460 * linux-crisv32-low.c (cris_regsets): Likewise.
3461 * linux-m68k-low.c (m68k_regsets): Likewise.
3462 * linux-mips-low.c (mips_regsets): Likewise.
3463 * linux-nios2-low.c (nios2_regsets): Likewise.
3464 * linux-ppc-low.c (ppc_regsets): Likewise.
3465 * linux-s390-low.c (s390_regsets): Likewise.
3466 * linux-sh-low.c (sh_regsets): Likewise.
3467 * linux-sparc-low.c (sparc_regsets): Likewise.
3468 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3469 * linux-tile-low.c (tile_regsets): Likewise.
3470 * linux-x86-low.c (x86_regsets): Likewise.
3471 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3472
3473 2015-10-29 Pedro Alves <palves@redhat.com>
3474
3475 * linux-low.h (NULL_REGSET): Define.
3476 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3477 * linux-arm-low.c (arm_regsets): Likewise.
3478 * linux-crisv32-low.c (cris_regsets): Likewise.
3479 * linux-m68k-low.c (m68k_regsets): Likewise.
3480 * linux-mips-low.c (mips_regsets): Likewise.
3481 * linux-nios2-low.c (nios2_regsets): Likewise.
3482 * linux-ppc-low.c (ppc_regsets): Likewise.
3483 * linux-s390-low.c (s390_regsets): Likewise.
3484 * linux-sh-low.c (sh_regsets): Likewise.
3485 * linux-sparc-low.c (sparc_regsets): Likewise.
3486 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3487 * linux-tile-low.c (tile_regsets): Likewise.
3488 * linux-x86-low.c (x86_regsets): Likewise.
3489 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3490
3491 2015-10-26 Doug Evans <dje@google.com>
3492
3493 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3494
3495 2015-10-26 Doug Evans <dje@google.com>
3496
3497 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3498
3499 2015-10-26 Doug Evans <dje@google.com>
3500
3501 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3502 for debug_printf.
3503 (attach_thread, find_new_threads_callback): Ditto.
3504
3505 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3506
3507 * mem-break.h (set_breakpoint_data): Remove.
3508
3509 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3510
3511 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3512 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3513 (initialize_low): Remove set_breakpoint_data call.
3514 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3515 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3516 (initialize_low): Remove set_breakpoint_data call.
3517 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3518 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3519 (initialize_low): Remove set_breakpoint_data call.
3520
3521 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3522
3523 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3524 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3525 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3526 * target.h (target_breakpoint_kind_from_pc): New macro.
3527
3528 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3529
3530 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3531 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3532 the default breakpoint kind.
3533
3534 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535
3536 * linux-arm-low.c (arm_supports_z_point_type): Add software
3537 breakpoint support.
3538
3539 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3540
3541 * linux-arm-low.c: Refactor breakpoint definitions.
3542 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3543 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3544
3545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3546
3547 * Makefile.in: Add arm.c/o.
3548 * configure.srv: Likewise.
3549 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3550 (arm_breakpoint_kind_from_pc): New function.
3551 (arm_sw_breakpoint_from_kind): Return proper kind.
3552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3553
3554 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3555
3556 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3557 removal.
3558 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3559 (struct raw_breakpoint) <size>: Remove.
3560 (struct raw_breakpoint) <kind>: Add.
3561 (bp_size): New function.
3562 (bp_opcode): Likewise.
3563 (find_raw_breakpoint_at): Adjust for kind.
3564 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3565 (remove_memory_breakpoint): Adjust for kind call bp_size.
3566 (set_raw_breakpoint_at): Adjust for kind.
3567 (set_breakpoint): Likewise.
3568 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3569 (delete_raw_breakpoint): Adjust for kind.
3570 (delete_breakpoint): Likewise.
3571 (find_gdb_breakpoint): Likewise.
3572 (set_gdb_breakpoint_1): Likewise.
3573 (set_gdb_breakpoint): Likewise.
3574 (delete_gdb_breakpoint_1): Likewise.
3575 (delete_gdb_breakpoint): Likewise.
3576 (uninsert_raw_breakpoint): Likewise.
3577 (reinsert_raw_breakpoint): Likewise.
3578 (set_breakpoint_data): Remove.
3579 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3580 (check_mem_read): Adjust for kind call bp_size.
3581 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3582 (clone_one_breakpoint): Adjust for kind.
3583 * mem-break.h (set_gdb_breakpoint): Likewise.
3584 (delete_gdb_breakpoint): Likewise.
3585 * server.c (process_serial_event): Likewise.
3586
3587 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3588
3589 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3590 (struct linux_target_ops) <breakpoint>: Remove.
3591 (struct linux_target_ops) <breakpoint_len>: Remove.
3592 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3593 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3594 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3595 (arm_sw_breakpoint_from_kind): New function.
3596 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3597 (struct linux_target_ops) <breakpoint>: Remove.
3598 (struct linux_target_ops) <breakpoint_len>: Remove.
3599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3601 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3602 (struct linux_target_ops) <breakpoint>: Remove.
3603 (struct linux_target_ops) <breakpoint_len>: Remove.
3604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3606 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3607 (struct linux_target_ops) <breakpoint>: Remove.
3608 (struct linux_target_ops) <breakpoint_len>: Remove.
3609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3611 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3612 and sw_breakpoint_from_kind to increment the pc.
3613 (linux_breakpoint_kind_from_pc): New function.
3614 (linux_sw_breakpoint_from_kind): New function.
3615 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3616 (initialize_low): Call breakpoint_kind_from_pc and
3617 sw_breakpoint_from_kind to replace breakpoint_data/len.
3618 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3619 New field.
3620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3621 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3622 (struct linux_target_ops) <breakpoint>: Remove.
3623 (struct linux_target_ops) <breakpoint_len>: Remove.
3624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3626 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3627 (struct linux_target_ops) <breakpoint>: Remove.
3628 (struct linux_target_ops) <breakpoint_len>: Remove.
3629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3631 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3632 (struct linux_target_ops) <breakpoint>: Remove.
3633 (struct linux_target_ops) <breakpoint_len>: Remove.
3634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3636 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3637 (struct linux_target_ops) <breakpoint>: Remove.
3638 (struct linux_target_ops) <breakpoint_len>: Remove.
3639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3641 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3642 (struct linux_target_ops) <breakpoint>: Remove.
3643 (struct linux_target_ops) <breakpoint_len>: Remove.
3644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3646 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3647 (struct linux_target_ops) <breakpoint>: Remove.
3648 (struct linux_target_ops) <breakpoint_len>: Remove.
3649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3651 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3652 (struct linux_target_ops) <breakpoint>: Remove.
3653 (struct linux_target_ops) <breakpoint_len>: Remove.
3654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3656 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3657 (struct linux_target_ops) <breakpoint>: Remove.
3658 (struct linux_target_ops) <breakpoint_len>: Remove.
3659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3661 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3662 (struct linux_target_ops) <breakpoint>: Remove.
3663 (struct linux_target_ops) <breakpoint_len>: Remove.
3664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3666 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3667 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3668 (struct linux_target_ops) <breakpoint>: Remove.
3669 (struct linux_target_ops) <breakpoint_len>: Remove.
3670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3672 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3673 (struct linux_target_ops) <breakpoint>: Remove.
3674 (struct linux_target_ops) <breakpoint_len>: Remove.
3675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3677
3678 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3679
3680 * linux-cris-low.c (cris_get_pc): Remove void arg.
3681
3682 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3683
3684 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3685 variable name.
3686
3687 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3688
3689 * inferiors.c (thread_pid_matches_callback): New function.
3690 (find_thread_process): New function.
3691 (remove_thread): Reset current_thread.
3692 (remove_process): Assert threads have been removed first.
3693
3694 2015-10-15 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3697 if it is 3.
3698 (aarch64_remove_point): Likewise.
3699 * regcache.c (regcache_register_size): New function.
3700
3701 2015-10-12 Yao Qi <yao.qi@linaro.org>
3702
3703 * linux-aarch64-low.c: Update all callers as emit_load_store
3704 is renamed to aarch64_emit_load_store.
3705
3706 2015-10-12 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-aarch64-low.c: Update all callers of function renaming
3709 from emit_insn to aarch64_emit_insn.
3710
3711 2015-10-12 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3714 arch/aarch64-insn.h.
3715 (struct aarch64_memory_operand): Likewise.
3716 (ENCODE): Likewise.
3717 (emit_insn): Move to arch/aarch64-insn.c.
3718 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3719 (emit_load_store): Move to arch/aarch64-insn.c.
3720 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3721 (can_encode_int32): Remove.
3722
3723 2015-10-12 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3726 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3727 (aarch64_relocate_instruction): Likewise.
3728 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3729 (struct aarch64_insn_visitor): Likewise.
3730
3731 2015-10-12 Yao Qi <yao.qi@linaro.org>
3732
3733 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3734 (struct aarch64_insn_visitor): New.
3735 (struct aarch64_insn_relocation_data): New.
3736 (aarch64_ftrace_insn_reloc_b): New function.
3737 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3738 (aarch64_ftrace_insn_reloc_cb): Likewise.
3739 (aarch64_ftrace_insn_reloc_tb): Likewise.
3740 (aarch64_ftrace_insn_reloc_adr): Likewise.
3741 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3742 (aarch64_ftrace_insn_reloc_others): Likewise.
3743 (visitor): New.
3744 (aarch64_relocate_instruction): Use visitor.
3745
3746 2015-10-12 Yao Qi <yao.qi@linaro.org>
3747
3748 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3749 int. Add argument buf.
3750 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3751 aarch64_relocate_instruction.
3752
3753 2015-10-12 Yao Qi <yao.qi@linaro.org>
3754
3755 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3756 argument insn. Remove local variable insn. Don't call
3757 target_read_uint32.
3758 (aarch64_install_fast_tracepoint_jump_pad): Call
3759 target_read_uint32.
3760
3761 2015-09-30 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3764 (emit_load_store_pair): Likewise.
3765
3766 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3767
3768 * dll.c (match_dll): Add cast(s).
3769 (unloaded_dll): Likewise.
3770 * linux-low.c (second_thread_of_pid_p): Likewise.
3771 (delete_lwp_callback): Likewise.
3772 (count_events_callback): Likewise.
3773 (select_event_lwp_callback): Likewise.
3774 (linux_set_resume_request): Likewise.
3775 * server.c (accumulate_file_name_length): Likewise.
3776 (emit_dll_description): Likewise.
3777 (handle_qxfer_threads_worker): Likewise.
3778 (visit_actioned_threads): Likewise.
3779 * thread-db.c (any_thread_of): Likewise.
3780 * tracepoint.c (same_process_p): Likewise.
3781 (match_blocktype): Likewise.
3782 (build_traceframe_info_xml): Likewise.
3783
3784 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3785
3786 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3787 assignment.
3788 (gdb_unparse_agent_expr): Likewise.
3789 * hostio.c (require_data): Likewise.
3790 (handle_pread): Likewise.
3791 * linux-low.c (disable_regset): Likewise.
3792 (fetch_register): Likewise.
3793 (store_register): Likewise.
3794 (get_dynamic): Likewise.
3795 (linux_qxfer_libraries_svr4): Likewise.
3796 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3797 (set_fast_tracepoint_jump): Likewise.
3798 (uninsert_fast_tracepoint_jumps_at): Likewise.
3799 (reinsert_fast_tracepoint_jumps_at): Likewise.
3800 (validate_inserted_breakpoint): Likewise.
3801 (clone_agent_expr): Likewise.
3802 * regcache.c (init_register_cache): Likewise.
3803 * remote-utils.c (putpkt_binary_1): Likewise.
3804 (decode_M_packet): Likewise.
3805 (decode_X_packet): Likewise.
3806 (look_up_one_symbol): Likewise.
3807 (relocate_instruction): Likewise.
3808 (monitor_output): Likewise.
3809 * server.c (handle_search_memory): Likewise.
3810 (handle_qxfer_exec_file): Likewise.
3811 (handle_qxfer_libraries): Likewise.
3812 (handle_qxfer): Likewise.
3813 (handle_query): Likewise.
3814 (handle_v_cont): Likewise.
3815 (handle_v_run): Likewise.
3816 (captured_main): Likewise.
3817 * target.c (write_inferior_memory): Likewise.
3818 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3819 * tracepoint.c (init_trace_buffer): Likewise.
3820 (add_tracepoint_action): Likewise.
3821 (add_traceframe): Likewise.
3822 (add_traceframe_block): Likewise.
3823 (cmd_qtdpsrc): Likewise.
3824 (cmd_qtdv): Likewise.
3825 (cmd_qtstatus): Likewise.
3826 (response_source): Likewise.
3827 (response_tsv): Likewise.
3828 (cmd_qtnotes): Likewise.
3829 (gdb_collect): Likewise.
3830 (initialize_tracepoint): Likewise.
3831
3832 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3833
3834 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3835 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3836 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3837 <NOP>: New.
3838 (enum aarch64_condition_codes): New enum.
3839 (w0): New static global.
3840 (fp): Likewise.
3841 (lr): Likewise.
3842 (struct aarch64_memory_operand) <type>: New
3843 MEMORY_OPERAND_POSTINDEX type.
3844 (postindex_memory_operand): New helper function.
3845 (emit_ret): New function.
3846 (emit_load_store_pair): New function, factored out of emit_stp
3847 with support for MEMORY_OPERAND_POSTINDEX.
3848 (emit_stp): Rewrite using emit_load_store_pair.
3849 (emit_ldp): New function.
3850 (emit_load_store): Likewise.
3851 (emit_ldr): Mention post-index instruction in comment.
3852 (emit_ldrh): New function.
3853 (emit_ldrb): New function.
3854 (emit_ldrsw): Mention post-index instruction in comment.
3855 (emit_str): Likewise.
3856 (emit_subs): New function.
3857 (emit_cmp): Likewise.
3858 (emit_and): Likewise.
3859 (emit_orr): Likewise.
3860 (emit_orn): Likewise.
3861 (emit_eor): Likewise.
3862 (emit_mvn): Likewise.
3863 (emit_lslv): Likewise.
3864 (emit_lsrv): Likewise.
3865 (emit_asrv): Likewise.
3866 (emit_mul): Likewise.
3867 (emit_sbfm): Likewise.
3868 (emit_sbfx): Likewise.
3869 (emit_ubfm): Likewise.
3870 (emit_ubfx): Likewise.
3871 (emit_csinc): Likewise.
3872 (emit_cset): Likewise.
3873 (emit_nop): Likewise.
3874 (emit_ops_insns): New helper function.
3875 (emit_pop): Likewise.
3876 (emit_push): Likewise.
3877 (aarch64_emit_prologue): New function.
3878 (aarch64_emit_epilogue): Likewise.
3879 (aarch64_emit_add): Likewise.
3880 (aarch64_emit_sub): Likewise.
3881 (aarch64_emit_mul): Likewise.
3882 (aarch64_emit_lsh): Likewise.
3883 (aarch64_emit_rsh_signed): Likewise.
3884 (aarch64_emit_rsh_unsigned): Likewise.
3885 (aarch64_emit_ext): Likewise.
3886 (aarch64_emit_log_not): Likewise.
3887 (aarch64_emit_bit_and): Likewise.
3888 (aarch64_emit_bit_or): Likewise.
3889 (aarch64_emit_bit_xor): Likewise.
3890 (aarch64_emit_bit_not): Likewise.
3891 (aarch64_emit_equal): Likewise.
3892 (aarch64_emit_less_signed): Likewise.
3893 (aarch64_emit_less_unsigned): Likewise.
3894 (aarch64_emit_ref): Likewise.
3895 (aarch64_emit_if_goto): Likewise.
3896 (aarch64_emit_goto): Likewise.
3897 (aarch64_write_goto_address): Likewise.
3898 (aarch64_emit_const): Likewise.
3899 (aarch64_emit_call): Likewise.
3900 (aarch64_emit_reg): Likewise.
3901 (aarch64_emit_pop): Likewise.
3902 (aarch64_emit_stack_flush): Likewise.
3903 (aarch64_emit_zero_ext): Likewise.
3904 (aarch64_emit_swap): Likewise.
3905 (aarch64_emit_stack_adjust): Likewise.
3906 (aarch64_emit_int_call_1): Likewise.
3907 (aarch64_emit_void_call_2): Likewise.
3908 (aarch64_emit_eq_goto): Likewise.
3909 (aarch64_emit_ne_goto): Likewise.
3910 (aarch64_emit_lt_goto): Likewise.
3911 (aarch64_emit_le_goto): Likewise.
3912 (aarch64_emit_gt_goto): Likewise.
3913 (aarch64_emit_ge_got): Likewise.
3914 (aarch64_emit_ops_impl): New static global variable.
3915 (aarch64_emit_ops): New target function, return
3916 &aarch64_emit_ops_impl.
3917 (struct linux_target_ops): Install it.
3918
3919 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3920
3921 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3922 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3923 aarch64-ipa.o.
3924 * linux-aarch64-ipa.c: New file.
3925 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3926 and endian.h.
3927 (aarch64_get_thread_area): New target method.
3928 (extract_signed_bitfield): New helper function.
3929 (aarch64_decode_ldr_literal): New function.
3930 (enum aarch64_opcodes): New enum.
3931 (struct aarch64_register): New struct.
3932 (struct aarch64_operand): New struct.
3933 (x0): New static global.
3934 (x1): Likewise.
3935 (x2): Likewise.
3936 (x3): Likewise.
3937 (x4): Likewise.
3938 (w2): Likewise.
3939 (ip0): Likewise.
3940 (sp): Likewise.
3941 (xzr): Likewise.
3942 (aarch64_register): New helper function.
3943 (register_operand): Likewise.
3944 (immediate_operand): Likewise.
3945 (struct aarch64_memory_operand): New struct.
3946 (offset_memory_operand): New helper function.
3947 (preindex_memory_operand): Likewise.
3948 (enum aarch64_system_control_registers): New enum.
3949 (ENCODE): New macro.
3950 (emit_insn): New helper function.
3951 (emit_b): New function.
3952 (emit_bcond): Likewise.
3953 (emit_cb): Likewise.
3954 (emit_tb): Likewise.
3955 (emit_blr): Likewise.
3956 (emit_stp): Likewise.
3957 (emit_ldp_q_offset): Likewise.
3958 (emit_stp_q_offset): Likewise.
3959 (emit_load_store): Likewise.
3960 (emit_ldr): Likewise.
3961 (emit_ldrsw): Likewise.
3962 (emit_str): Likewise.
3963 (emit_ldaxr): Likewise.
3964 (emit_stxr): Likewise.
3965 (emit_stlr): Likewise.
3966 (emit_data_processing_reg): Likewise.
3967 (emit_data_processing): Likewise.
3968 (emit_add): Likewise.
3969 (emit_sub): Likewise.
3970 (emit_mov): Likewise.
3971 (emit_movk): Likewise.
3972 (emit_mov_addr): Likewise.
3973 (emit_mrs): Likewise.
3974 (emit_msr): Likewise.
3975 (emit_sevl): Likewise.
3976 (emit_wfe): Likewise.
3977 (append_insns): Likewise.
3978 (can_encode_int32_in): New helper function.
3979 (aarch64_relocate_instruction): New function.
3980 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3981 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3982 (struct linux_target_ops): Install aarch64_get_thread_area,
3983 aarch64_install_fast_tracepoint_jump_pad and
3984 aarch64_get_min_fast_tracepoint_insn_len.
3985
3986 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3987
3988 * Makefile.in (aarch64-insn.o): New rule.
3989 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3990
3991 2015-09-21 Yao Qi <yao.qi@linaro.org>
3992
3993 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3994
3995 2015-09-21 Yao Qi <yao.qi@linaro.org>
3996
3997 * tracepoint.c (max_jump_pad_size): Remove.
3998
3999 2015-09-18 Yao Qi <yao.qi@linaro.org>
4000
4001 * linux-aarch64-low.c: Don't include sys/uio.h.
4002 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4003
4004 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4005
4006 * tracepoint.c (eval_result_type): Change prototype.
4007 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4008
4009 2015-09-15 Pedro Alves <palves@redhat.com>
4010
4011 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4012 Check whether to report exec events instead of checking whether
4013 multiprocess is enabled.
4014
4015 2015-09-15 Pedro Alves <palves@redhat.com>
4016
4017 PR remote/18965
4018 * remote-utils.c (prepare_resume_reply): Merge
4019 TARGET_WAITKIND_VFORK_DONE switch case with the
4020 TARGET_WAITKIND_FORKED case.
4021
4022 2015-09-15 Yao Qi <yao.qi@linaro.org>
4023
4024 * server.c (handle_query): Check string comparison using
4025 "else if" instead of "if".
4026
4027 2015-09-15 Yao Qi <yao.qi@linaro.org>
4028
4029 * server.c (vCont_supported): New global variable.
4030 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4031 matches. Append ";vContSupported+" to own_buf.
4032 (handle_v_requests): Append ";s;S" to own_buf if target supports
4033 hardware single step or vCont_supported is false.
4034 (capture_main): Set vCont_supported to zero.
4035
4036 2015-09-15 Yao Qi <yao.qi@linaro.org>
4037
4038 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4039 it to ...
4040 (linux_supports_hardware_single_step): ... New function.
4041 (linux_target_ops): Update.
4042 * lynx-low.c (lynx_target_ops): Set field
4043 supports_hardware_single_step to target_can_do_hardware_single_step.
4044 * nto-low.c (nto_target_ops): Likewise.
4045 * spu-low.c (spu_target_ops): Likewise.
4046 * win32-low.c (win32_target_ops): Likewise.
4047 * target.c (target_can_do_hardware_single_step): New function.
4048 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4049 Remove. <supports_hardware_single_step>: New field.
4050 (target_supports_conditional_breakpoints): Remove.
4051 (target_supports_hardware_single_step): New macro.
4052 (target_can_do_hardware_single_step): Declare.
4053 * server.c (handle_query): Use target_supports_hardware_single_step
4054 instead of target_supports_conditional_breakpoints.
4055
4056 2015-09-15 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4059 function.
4060 (struct linux_target_ops the_low_target): Install
4061 aarch64_linux_siginfo_fixup.
4062
4063 2015-09-11 Don Breazeal <donb@codesourcery.com>
4064 Luis Machado <lgustavo@codesourcery.com>
4065
4066 * linux-low.c (linux_mourn): Static declaration.
4067 (linux_arch_setup): Move in front of
4068 handle_extended_wait.
4069 (linux_arch_setup_thread): New function.
4070 (handle_extended_wait): Handle exec events. Call
4071 linux_arch_setup_thread. Make event_lwp argument a
4072 pointer-to-a-pointer.
4073 (check_zombie_leaders): Do not check stopped threads.
4074 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4075 (linux_low_filter_event): Add lwp and thread for exec'ing
4076 non-leader thread if leader thread has been deleted.
4077 Refactor code into linux_arch_setup_thread and call it.
4078 Pass child lwp pointer by reference to handle_extended_wait.
4079 (linux_wait_for_event_filtered): Update comment.
4080 (linux_wait_1): Prevent clobbering exec event status.
4081 (linux_supports_exec_events): New function.
4082 (linux_target_ops) <supports_exec_events>: Initialize new member.
4083 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4084 new member.
4085 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4086 * server.c (report_exec_events): New global variable.
4087 (handle_query): Handle qSupported query for exec-events feature.
4088 (captured_main): Initialize report_exec_events.
4089 * server.h (report_exec_events): Declare new global variable.
4090 * target.h (struct target_ops) <supports_exec_events>: New
4091 member.
4092 (target_supports_exec_events): New macro.
4093 * win32-low.c (win32_target_ops) <supports_exec_events>:
4094 Initialize new member.
4095
4096 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4097
4098 * linux-low.c (linux_low_enable_btrace): Remove.
4099 (linux_target_ops): Replace linux_low_enable_btrace with
4100 linux_enable_btrace.
4101
4102 2015-09-03 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-aarch64-low.c (aarch64_insert_point): Call
4105 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4106 returns true.
4107
4108 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4109
4110 * linux-low.c (check_stopped_by_breakpoint): Use
4111 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4112
4113 2015-08-27 Pedro Alves <palves@redhat.com>
4114
4115 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4116
4117 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4118
4119 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4120 the XNEW-family equivalent.
4121 (compile_bytecodes): Likewise.
4122 * dll.c (loaded_dll): Likewise.
4123 * event-loop.c (append_callback_event): Likewise.
4124 (create_file_handler): Likewise.
4125 (create_file_event): Likewise.
4126 * hostio.c (handle_open): Likewise.
4127 * inferiors.c (add_thread): Likewise.
4128 (add_process): Likewise.
4129 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4130 * linux-arm-low.c (arm_new_process): Likewise.
4131 (arm_new_thread): Likewise.
4132 * linux-low.c (add_to_pid_list): Likewise.
4133 (linux_add_process): Likewise.
4134 (handle_extended_wait): Likewise.
4135 (add_lwp): Likewise.
4136 (enqueue_one_deferred_signal): Likewise.
4137 (enqueue_pending_signal): Likewise.
4138 (linux_resume_one_lwp_throw): Likewise.
4139 (linux_resume_one_thread): Likewise.
4140 (linux_read_memory): Likewise.
4141 (linux_write_memory): Likewise.
4142 * linux-mips-low.c (mips_linux_new_process): Likewise.
4143 (mips_linux_new_thread): Likewise.
4144 (mips_add_watchpoint): Likewise.
4145 * linux-x86-low.c (initialize_low_arch): Likewise.
4146 * lynx-low.c (lynx_add_process): Likewise.
4147 * mem-break.c (set_raw_breakpoint_at): Likewise.
4148 (set_breakpoint): Likewise.
4149 (add_condition_to_breakpoint): Likewise.
4150 (add_commands_to_breakpoint): Likewise.
4151 (clone_agent_expr): Likewise.
4152 (clone_one_breakpoint): Likewise.
4153 * regcache.c (new_register_cache): Likewise.
4154 * remote-utils.c (look_up_one_symbol): Likewise.
4155 * server.c (queue_stop_reply): Likewise.
4156 (start_inferior): Likewise.
4157 (queue_stop_reply_callback): Likewise.
4158 (handle_target_event): Likewise.
4159 * spu-low.c (fetch_ppc_memory): Likewise.
4160 (store_ppc_memory): Likewise.
4161 * target.c (set_target_ops): Likewise.
4162 * thread-db.c (thread_db_load_search): Likewise.
4163 (try_thread_db_load_1): Likewise.
4164 * tracepoint.c (add_tracepoint): Likewise.
4165 (add_tracepoint_action): Likewise.
4166 (create_trace_state_variable): Likewise.
4167 (cmd_qtdpsrc): Likewise.
4168 (cmd_qtro): Likewise.
4169 (add_while_stepping_state): Likewise.
4170 * win32-low.c (child_add_thread): Likewise.
4171 (get_image_name): Likewise.
4172
4173 2015-08-25 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4176
4177 2015-08-25 Yao Qi <yao.qi@linaro.org>
4178
4179 * Makefile.in (aarch64-linux.o): New rule.
4180 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4181 srv_tgtobj.
4182 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4183 (aarch64_init_debug_reg_state): Make it extern.
4184 (aarch64_linux_prepare_to_resume): Remove.
4185
4186 2015-08-25 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4189 lwp_arch_private_info and ptid_of_lwp.
4190
4191 2015-08-25 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4194 Find proc_info by find_process_pid. All callers updated.
4195
4196 2015-08-25 Yao Qi <yao.qi@linaro.org>
4197
4198 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4199 Remove.
4200 (debug_reg_change_callback): Remove.
4201 (aarch64_notify_debug_reg_change): Remove.
4202
4203 2015-08-25 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4206 Call current_lwp_ptid.
4207
4208 2015-08-25 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (debug_reg_change_callback): Use
4211 debug_printf.
4212
4213 2015-08-25 Yao Qi <yao.qi@linaro.org>
4214
4215 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4216
4217 2015-08-25 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4220
4221 2015-08-25 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4224 the code.
4225
4226 2015-08-25 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4229 Remove.
4230 (debug_reg_change_callback): Remove argument entry and add argument
4231 lwp. Remove local variable thread. Don't print thread id in the
4232 debugging output. Don't check whether pid of thread equals to pid.
4233 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4234 iterate_over_lwps instead find_inferior.
4235
4236 2015-08-24 Pedro Alves <palves@redhat.com>
4237
4238 * inferiors.c (get_first_process): New function.
4239 * inferiors.h (get_first_process): New declaration.
4240 * remote-utils.c (read_ptid): Default to the first process in the
4241 list, instead of to the current thread's process.
4242
4243 2015-08-24 Pedro Alves <palves@redhat.com>
4244
4245 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4246 * event-loop.c: Likewise.
4247 * remote-utils.c: Likewise.
4248 * tracepoint.c: Likewise.
4249
4250 2015-08-24 Pedro Alves <palves@redhat.com>
4251
4252 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4253 ptid_get_lwp.
4254
4255 2015-08-21 Pedro Alves <palves@redhat.com>
4256
4257 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4258 instead of literal 1.
4259
4260 2015-08-21 Pedro Alves <palves@redhat.com>
4261
4262 * tdesc.c (default_description): Explicitly zero-initialize.
4263
4264 2015-08-21 Pedro Alves <palves@redhat.com>
4265
4266 PR gdb/18749
4267 * inferiors.c (remove_thread): Discard any pending stop reply for
4268 this thread.
4269 * server.c (remove_all_on_match_pid): Rename to ...
4270 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4271 instead of a pid.
4272 (discard_queued_stop_replies): Change parameter to a ptid. Now
4273 extern.
4274 (handle_v_kill, kill_inferior_callback, captured_main)
4275 (process_serial_event): Adjust.
4276 * server.h (discard_queued_stop_replies): Declare.
4277
4278 2015-08-21 Pedro Alves <palves@redhat.com>
4279
4280 * linux-low.c (wait_for_sigstop): Always switch to no thread
4281 selected if the previously current thread dies.
4282 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4283 process instead of the current thread's.
4284 * remote-utils.c (input_interrupt): Don't check if there's no
4285 current thread.
4286 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4287 current thread to the general thread fails, error out.
4288 (handle_qxfer_auxv, handle_qxfer_libraries)
4289 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4290 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4291 (handle_query): Check if there's a thread selected instead of
4292 checking whether there's any thread in the thread list.
4293 (handle_qxfer_threads, handle_qxfer_btrace)
4294 (handle_qxfer_btrace_conf): Don't error out early if there's no
4295 thread in the thread list.
4296 (handle_v_cont, myresume): Don't set the current thread to the
4297 continue thread.
4298 (process_serial_event) <Hg handling>: Also set thread_id if the
4299 previous general thread is still alive.
4300 (process_serial_event) <g/G handling>: If setting the current
4301 thread to the general thread fails, error out.
4302 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4303 thread's lwp instead of the current thread's.
4304 * target.c (set_desired_thread): If the desired thread was not
4305 found, leave the current thread pointing to NULL. Return an int
4306 (boolean) indicating success.
4307 * target.h (set_desired_thread): Change return type to int.
4308
4309 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4310
4311 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4312 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4313 #includes.
4314 (ps_get_thread_area): New function.
4315
4316 2015-08-19 Gary Benson <gbenson@redhat.com>
4317
4318 * hostio.c (handle_pread): Do not attempt to read more data
4319 than hostio_reply_with_data can fit in a packet.
4320
4321 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4322
4323 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4324
4325 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4326
4327 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4328
4329 2015-08-06 Pedro Alves <palves@redhat.com>
4330
4331 * tracepoint.c (expr_eval_result): Now an int.
4332
4333 2015-08-06 Pedro Alves <palves@redhat.com>
4334
4335 * gdbthread.h (struct regcache): Forward declare.
4336 (struct thread_info) <regcache_data>: Now a struct regcache
4337 pointer.
4338 * inferiors.c (inferior_regcache_data)
4339 (set_inferior_regcache_data): Now work with struct regcache
4340 pointers.
4341 * inferiors.h (struct regcache): Forward declare.
4342 (inferior_regcache_data, set_inferior_regcache_data): Now work
4343 with struct regcache pointers.
4344 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4345 (free_register_cache_thread): Remove struct regcache pointer
4346 casts.
4347
4348 2015-08-06 Pedro Alves <palves@redhat.com>
4349
4350 * server.c (captured_main): On error, print the exception message
4351 to stderr, and if run_once is set, throw a quit.
4352
4353 2015-08-06 Pedro Alves <palves@redhat.com>
4354
4355 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4356 the current thread.
4357
4358 2015-08-06 Pedro Alves <palves@redhat.com>
4359
4360 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4361 reading beyond the passed in buffer length.
4362
4363 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4364
4365 * tracepoint.c (symbol_list) <required>: Remove.
4366
4367 2015-08-06 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4370 count if stopping and suspending threads.
4371 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4372 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4373 (linux_detach): Complete an ongoing step-over.
4374 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4375 throughout.
4376 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4377 (linux_wait_1): If passing a signal to the inferior after
4378 finishing a step-over, unsuspend and re-resume all lwps. If we
4379 see a single-step event but the thread should be continuing, don't
4380 pass the trap to gdb.
4381 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4382 internal_error instead of gdb_assert.
4383 (enqueue_pending_signal): New function.
4384 (check_ptrace_stopped_lwp_gone): Add debug output.
4385 (start_step_over): Use internal_error instead of gdb_assert.
4386 (complete_ongoing_step_over): New function.
4387 (linux_resume_one_thread): Don't resume a suspended thread.
4388 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4389 it stepping.
4390
4391 2015-08-06 Pedro Alves <palves@redhat.com>
4392
4393 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4394 (linux_thread_alive): Use lwp_is_marked_dead.
4395 (extended_event_reported): Delete.
4396 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4397 instead of extended_event_reported.
4398 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4399 as well.
4400 (lwp_is_marked_dead): New function.
4401 (lwp_running): Use lwp_is_marked_dead.
4402 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4403 comment.
4404
4405 2015-08-06 Pedro Alves <palves@redhat.com>
4406
4407 * linux-low.c (linux_wait_1): Move fork event output out of the
4408 !report_to_gdb check. Pass event_child->waitstatus to
4409 target_waitstatus_to_string instead of ourstatus.
4410
4411 2015-08-04 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4414 if current_thread is 32 bit.
4415
4416 2015-08-04 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4419 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4420 * server.c (extended_protocol): Remove "static".
4421 * server.h (extended_protocol): Declare it.
4422
4423 2015-08-04 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4426 both aarch64 and aarch32.
4427 (aarch64_set_pc): Likewise.
4428
4429 2015-08-04 Yao Qi <yao.qi@linaro.org>
4430
4431 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4432 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4433 arm-with-neon.xml to srv_xmlfiles.
4434 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4435 (is_64bit_tdesc): New function.
4436 (aarch64_linux_read_description): New function.
4437 (aarch64_arch_setup): Call aarch64_linux_read_description.
4438 (regs_info): Rename to regs_info_aarch64.
4439 (aarch64_regs_info): Return right regs_info.
4440 (initialize_low_arch): Call initialize_low_arch_aarch32.
4441
4442 2015-08-04 Yao Qi <yao.qi@linaro.org>
4443
4444 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4445 * linux-aarch32-low.c: New file.
4446 * linux-aarch32-low.h: New file.
4447 * linux-arm-low.c (arm_fill_gregset): Move it to
4448 linux-aarch32-low.c.
4449 (arm_store_gregset): Likewise.
4450 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4451 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4452 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4453 (regs_info): Rename to regs_info_arm.
4454 (arm_regs_info): Return regs_info_aarch32 if
4455 have_ptrace_getregset is 1 and target description is
4456 arm_with_neon or arm_with_vfpv3.
4457 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4458 Call initialize_low_arch_aarch32 instead.
4459
4460 2015-08-04 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4463 * linux-low.c: ... here.
4464 * linux-low.h (have_ptrace_getregset): Declare it.
4465
4466 2015-08-04 Pedro Alves <palves@redhat.com>
4467
4468 * thread-db.c (struct thread_db): Use new typedefs.
4469 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4470 CHK calls.
4471 (disable_thread_event_reporting): Cast result of dlsym to
4472 destination function pointer type.
4473 (thread_db_mourn): Use td_ta_delete_ftype.
4474
4475 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4476
4477 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4478 arch variant.
4479 (CDX_BREAKPOINT): Define for R2.
4480 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4481 (the_low_target): Add comments.
4482
4483 2015-07-30 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-arm-low.c (arm_hwcap): Remove it.
4486 (arm_read_description): New local variable arm_hwcap. Don't
4487 set arm_hwcap to zero.
4488
4489 2015-07-30 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4492 Use regcache->tdesc instead.
4493 (arm_store_wmmxregset): Likewise.
4494 (arm_fill_vfpregset): Likewise.
4495 (arm_store_vfpregset): Likewise.
4496
4497 2015-07-30 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-arm-low.c: Include arch/arm.h.
4500 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4501 (arm_store_gregset): Likewise.
4502
4503 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4504
4505 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4506 ptrace's 4th parameter.
4507
4508 2015-07-27 Yao Qi <yao.qi@linaro.org>
4509
4510 * configure.srv (case aarch64*-*-linux*): Don't set
4511 srv_linux_usrregs.
4512
4513 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4514
4515 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4516 sys/ptrace.h.
4517 * linux-arm-low.c: Likewise.
4518 * linux-cris-low.c: Likewise.
4519 * linux-crisv32-low.c: Likewise.
4520 * linux-low.c: Likewise.
4521 * linux-m68k-low.c: Likewise.
4522 * linux-mips-low.c: Likewise.
4523 * linux-nios2-low.c: Likewise.
4524 * linux-s390-low.c: Likewise.
4525 * linux-sparc-low.c: Likewise.
4526 * linux-tic6x-low.c: Likewise.
4527 * linux-tile-low.c: Likewise.
4528 * linux-x86-low.c: Likewise.
4529
4530 2015-07-24 Pedro Alves <palves@redhat.com>
4531
4532 * config.in: Regenerate.
4533 * configure: Regenerate.
4534
4535 2015-07-24 Pedro Alves <palves@redhat.com>
4536
4537 * acinclude.m4: Include ../ptrace.m4.
4538 * configure.ac: Call GDB_AC_PTRACE.
4539 * config.in, configure: Regenerate.
4540
4541 2015-07-24 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-low.c (linux_create_inferior): Remove setting to
4544 proc->priv->new_inferior.
4545 (linux_attach): Likewise.
4546 (linux_low_filter_event): Likewise.
4547 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4548
4549 2015-07-24 Yao Qi <yao.qi@linaro.org>
4550
4551 * linux-low.c (linux_arch_setup): New function.
4552 (linux_low_filter_event): If proc->tdesc is NULL and
4553 proc->attached is true, call the_low_target.arch_setup.
4554 Otherwise, keep status pending, and return.
4555 (linux_resume_one_lwp_throw): Don't call get_pc if
4556 thread->while_stepping isn't NULL. Don't call
4557 get_thread_regcache if proc->tdesc is NULL.
4558 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4559 (linux_target_ops): Install arch_setup.
4560 * server.c (start_inferior): Call the_target->arch_setup.
4561 * target.h (struct target_ops) <arch_setup>: New field.
4562 (target_arch_setup): New marco.
4563 * lynx-low.c (lynx_target_ops): Update.
4564 * nto-low.c (nto_target_ops): Update.
4565 * spu-low.c (spu_target_ops): Update.
4566 * win32-low.c (win32_target_ops): Update.
4567
4568 2015-07-24 Yao Qi <yao.qi@linaro.org>
4569
4570 * linux-low.c (linux_add_process): Don't set
4571 proc->priv->new_inferior.
4572 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4573 (linux_attach): Likewise.
4574
4575 2015-07-24 Yao Qi <yao.qi@linaro.org>
4576
4577 * server.c (start_inferior): Code refactor.
4578
4579 2015-07-24 Yao Qi <yao.qi@linaro.org>
4580
4581 * server.c (process_serial_event): Set general_thread.
4582
4583 2015-07-21 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4586 aarch64_linux_get_debug_reg_capacity.
4587
4588 2015-07-17 Yao Qi <yao.qi@linaro.org>
4589
4590 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4591 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4592 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4593 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4594 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4595 (AARCH64_HWP_ALIGNMENT): Likewise.
4596 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4597 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4598 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4599 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4600 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4601 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4602 (struct aarch64_debug_reg_state): Likewise.
4603 (struct arch_lwp_info): Likewise.
4604 (aarch64_align_watchpoint): Likewise.
4605 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4606 (aarch64_watchpoint_length): Likewise.
4607 (aarch64_point_encode_ctrl_reg): Likewise
4608 (aarch64_point_is_aligned): Likewise.
4609 (aarch64_align_watchpoint): Likewise.
4610 (aarch64_linux_set_debug_regs):
4611 (aarch64_dr_state_insert_one_point): Likewise.
4612 (aarch64_dr_state_remove_one_point): Likewise.
4613 (aarch64_handle_breakpoint): Likewise.
4614 (aarch64_handle_aligned_watchpoint): Likewise.
4615 (aarch64_handle_unaligned_watchpoint): Likewise.
4616 (aarch64_handle_watchpoint): Likewise.
4617
4618 2015-07-17 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4621 and don't aarch64_get_debug_reg_state. All callers update.
4622 (aarch64_handle_aligned_watchpoint): Likewise.
4623 (aarch64_handle_unaligned_watchpoint): Likewise.
4624 (aarch64_handle_watchpoint): Likewise.
4625 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4626 (aarch64_remove_point): Likewise.
4627
4628 2015-07-17 Yao Qi <yao.qi@linaro.org>
4629
4630 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4631 debug_printf.
4632 (aarch64_handle_unaligned_watchpoint): Likewise.
4633
4634 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4635
4636 Revert the previous 3 commits:
4637 Move gdb_regex* to common/
4638 Move linux_find_memory_regions_full & co.
4639 gdbserver build-id attribute generator
4640
4641 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4642 Jan Kratochvil <jan.kratochvil@redhat.com>
4643
4644 gdbserver build-id attribute generator.
4645 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4646 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4647 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4648 (find_phdr): New.
4649 (get_dynamic): Use find_pdhr to traverse program headers.
4650 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4651 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4652 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4653 (get_hex_build_id): New.
4654 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4655 to reply XML document.
4656
4657 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4658 Jan Kratochvil <jan.kratochvil@redhat.com>
4659
4660 * target.c: Include target/target-utils.h and fcntl.h.
4661 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4662 (target_fileio_read_stralloc): New functions.
4663
4664 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4665
4666 * Makefile.in (OBS): Add gdb_regex.o.
4667 (gdb_regex.o): New.
4668 * config.in: Rebuilt.
4669 * configure: Rebuilt.
4670
4671 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4672 Jan Kratochvil <jan.kratochvil@redhat.com>
4673
4674 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4675 * Makefile.in (OBS): Add target-utils.o.
4676 (linux-maps.o, target-utils.o): New.
4677 * configure.srv (srv_linux_obj): Add linux-maps.o.
4678
4679 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4680
4681 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4682 function, return 1.
4683 (the_low_target): Install it.
4684
4685 2015-07-14 Pedro Alves <palves@redhat.com>
4686
4687 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4688 Instead, ignore ECHILD, and throw an error for other errnos.
4689
4690 2015-07-10 Pedro Alves <palves@redhat.com>
4691
4692 * event-loop.c (struct callback_event) <data>: Change type to
4693 gdb_client_data instance instead of gdb_client_data pointer.
4694 (append_callback_event): Adjust.
4695
4696 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4697
4698 * linux-aarch64-low.c: Add comments for each linux_target_ops
4699 method. Remove comments already covered in target_ops and
4700 linux_target_ops definitions.
4701 (the_low_target): Add comments for each unimplemented method.
4702
4703 2015-07-09 Yao Qi <yao.qi@linaro.org>
4704
4705 * linux-aarch64-low.c (aarch64_regmap): Remove.
4706 (aarch64_usrregs_info): Remove.
4707 (regs_info): Set field usrregs to NULL.
4708
4709 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4710
4711 * linux-low.c: Include "rsp-low.h"
4712 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4713 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4714 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4715 (handle_btrace_enable_pt): New.
4716 (handle_btrace_general_set): Support "pt".
4717 (handle_btrace_conf_general_set): Support "pt:size".
4718
4719 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4720
4721 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4722 Z_PACKET_SW_BP.
4723
4724 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4725
4726 * linux-aarch64-low.c: Remove comment about endianness.
4727 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4728 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4729 memcmp.
4730
4731 2015-06-24 Gary Benson <gbenson@redhat.com>
4732
4733 * linux-i386-ipa.c (stdint.h): Do not include.
4734 * lynx-i386-low.c (stdint.h): Likewise.
4735 * lynx-ppc-low.c (stdint.h): Likewise.
4736 * mem-break.c (stdint.h): Likewise.
4737 * thread-db.c (stdint.h): Likewise.
4738 * tracepoint.c (stdint.h): Likewise.
4739 * win32-low.c (stdint.h): Likewise.
4740
4741 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4742
4743 * server.c (write_qxfer_response): Update call to
4744 remote_escape_output.
4745
4746 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4747 Jan Kratochvil <jan.kratochvil@redhat.com>
4748
4749 Merge multiple hex conversions.
4750 * gdbreplay.c (tohex): Rename to 'fromhex'.
4751 (logchar): Use fromhex.
4752
4753 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4754
4755 * server.c (handle_qxfer_libraries): Set `version' attribute for
4756 <library-list>.
4757
4758 2015-06-10 Gary Benson <gbenson@redhat.com>
4759
4760 * target.h (struct target_ops) <multifs_open>: New field.
4761 <multifs_unlink>: Likewise.
4762 <multifs_readlink>: Likewise.
4763 * linux-low.c (nat/linux-namespaces.h): New include.
4764 (linux_target_ops): Initialize the_target->multifs_open,
4765 the_target->multifs_unlink and the_target->multifs_readlink.
4766 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4767 * hostio.c (hostio_fs_pid): New static variable.
4768 (hostio_handle_new_gdb_connection): New function.
4769 (handle_setfs): Likewise.
4770 (handle_open): Use the_target->multifs_open as appropriate.
4771 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4772 (handle_readlink): Use the_target->multifs_readlink as
4773 appropriate.
4774 (handle_vFile): Handle vFile:setfs packets.
4775 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4776 after target_handle_new_gdb_connection.
4777
4778 2015-06-10 Gary Benson <gbenson@redhat.com>
4779
4780 * configure.ac (AC_CHECK_FUNCS): Add setns.
4781 * config.in: Regenerate.
4782 * configure: Likewise.
4783 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4784 (linux-namespaces.o): New rule.
4785 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4786
4787 2015-06-09 Gary Benson <gbenson@redhat.com>
4788
4789 * hostio.c (handle_open): Process mode argument with
4790 fileio_to_host_mode.
4791
4792 2015-06-01 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4795 * linux-x86-low.c: Likewise.
4796
4797 2015-05-28 Don Breazeal <donb@codesourcery.com>
4798
4799 * linux-low.c (handle_extended_wait): Initialize
4800 thread_info.last_resume_kind for new fork children.
4801
4802 2015-05-15 Pedro Alves <palves@redhat.com>
4803
4804 * target.h (target_handle_new_gdb_connection): Rewrite using if
4805 wrapped in do/while.
4806
4807 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4808
4809 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4810 * configure, config.in: Regenerate.
4811 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4812 Declare typedef.
4813
4814 2015-05-12 Don Breazeal <donb@codesourcery.com>
4815
4816 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4817 PTRACE_EVENT_VFORK_DONE.
4818 (linux_low_ptrace_options, extended_event_reported): Add vfork
4819 events.
4820 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4821 and "vforkdone" for RSP 'T' Stop Reply Packet.
4822 * server.h (report_vfork_events): Declare
4823 global variable.
4824
4825 2015-05-12 Don Breazeal <donb@codesourcery.com>
4826
4827 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4828 (the_low_target) <new_fork>: Initialize new member.
4829 * linux-arm-low.c (arm_new_fork): New function.
4830 (the_low_target) <new_fork>: Initialize new member.
4831 * linux-low.c (handle_extended_wait): Call new target function
4832 new_fork.
4833 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4834 * linux-mips-low.c (mips_add_watchpoint): New function
4835 extracted from mips_insert_point.
4836 (the_low_target) <new_fork>: Initialize new member.
4837 (mips_linux_new_fork): New function.
4838 (mips_insert_point): Call mips_add_watchpoint.
4839 * linux-x86-low.c (x86_linux_new_fork): New function.
4840 (the_low_target) <new_fork>: Initialize new member.
4841
4842 2015-05-12 Don Breazeal <donb@codesourcery.com>
4843
4844 * linux-low.c (handle_extended_wait): Implement return value,
4845 rename argument 'event_child' to 'event_lwp', handle
4846 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4847 (linux_low_ptrace_options): New function.
4848 (linux_low_filter_event): Call linux_low_ptrace_options,
4849 use different argument fo linux_enable_event_reporting,
4850 use return value from handle_extended_wait.
4851 (extended_event_reported): New function.
4852 (linux_wait_1): Call extended_event_reported and set
4853 status to report fork events.
4854 (linux_write_memory): Add pid to debug message.
4855 (reset_lwp_ptrace_options_callback): New function.
4856 (linux_handle_new_gdb_connection): New function.
4857 (linux_target_ops): Initialize new structure member.
4858 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4859 * lynx-low.c: Initialize new structure member.
4860 * remote-utils.c (prepare_resume_reply): Implement stop reason
4861 "fork" for "T" stop message.
4862 * server.c (handle_query): Call handle_new_gdb_connection.
4863 * server.h (report_fork_events): Declare global flag.
4864 * target.h (struct target_ops) <handle_new_gdb_connection>:
4865 New member.
4866 (target_handle_new_gdb_connection): New macro.
4867 * win32-low.c: Initialize new structure member.
4868
4869 2015-05-12 Don Breazeal <donb@codesourcery.com>
4870
4871 * mem-break.c (APPEND_TO_LIST): Define macro.
4872 (clone_agent_expr): New function.
4873 (clone_one_breakpoint): New function.
4874 (clone_all_breakpoints): New function.
4875 * mem-break.h: Declare new functions.
4876
4877 2015-05-12 Don Breazeal <donb@codesourcery.com>
4878
4879 * linux-low.c (linux_supports_fork_events): New function.
4880 (linux_supports_vfork_events): New function.
4881 (linux_target_ops): Initialize new structure members.
4882 (initialize_low): Call linux_check_ptrace_features.
4883 * lynx-low.c (lynx_target_ops): Initialize new structure
4884 members.
4885 * server.c (report_fork_events, report_vfork_events):
4886 New global flags.
4887 (handle_query): Add new features to qSupported packet and
4888 response.
4889 (captured_main): Initialize new global variables.
4890 * target.h (struct target_ops) <supports_fork_events>:
4891 New member.
4892 <supports_vfork_events>: New member.
4893 (target_supports_fork_events): New macro.
4894 (target_supports_vfork_events): New macro.
4895 * win32-low.c (win32_target_ops): Initialize new structure
4896 members.
4897
4898 2015-05-12 Gary Benson <gbenson@redhat.com>
4899
4900 * server.c (handle_qxfer_exec_file): Use current process
4901 if annex is empty.
4902
4903 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4904
4905 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4906 Remove HAVE_PTRACE_GETREGS conditionals.
4907 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4908 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4909
4910 2015-05-08 Yao Qi <yao.qi@linaro.org>
4911
4912 * linux-low.c (linux_supports_conditional_breakpoints): New
4913 function.
4914 (linux_target_ops): Install new target method.
4915 * lynx-low.c (lynx_target_ops): Install NULL hook for
4916 supports_conditional_breakpoints.
4917 * nto-low.c (nto_target_ops): Likewise.
4918 * spu-low.c (spu_target_ops): Likewise.
4919 * win32-low.c (win32_target_ops): Likewise.
4920 * server.c (handle_query): Check
4921 target_supports_conditional_breakpoints.
4922 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4923 New field.
4924 (target_supports_conditional_breakpoints): New macro.
4925
4926 2015-05-06 Pedro Alves <palves@redhat.com>
4927
4928 PR server/18081
4929 * server.c (start_inferior): If the process exits, mourn it.
4930
4931 2015-04-21 Gary Benson <gbenson@redhat.com>
4932
4933 * hostio.c (fileio_open_flags_to_host): Factored out to
4934 fileio_to_host_openflags in common/fileio.c. Single use
4935 updated.
4936
4937 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4938
4939 * linux-xtensa-low.c (xtensa_fill_gregset)
4940 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4941 XCHAL_HAVE_LOOP.
4942
4943 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4944
4945 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4946 (regs_info): Replace usrregs pointer with NULL.
4947
4948 2015-04-17 Gary Benson <gbenson@redhat.com>
4949
4950 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4951 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4952 * server.c (handle_qxfer_exec_file): New function.
4953 (qxfer_packets): Add exec-file entry.
4954 (handle_query): Report qXfer:exec-file:read as supported packet.
4955
4956 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4957
4958 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4959
4960 2015-04-09 Gary Benson <gbenson@redhat.com>
4961
4962 * hostio-errno.c (errno_to_fileio_error): Remove function.
4963 Update caller to use remote_fileio_to_fio_error.
4964
4965 2015-04-09 Yao Qi <yao.qi@linaro.org>
4966
4967 * linux-low.c (linux_insert_point): Call
4968 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4969 (linux_remove_point): Call remove_memory_breakpoint if type is
4970 raw_bkpt_type_sw.
4971 * linux-x86-low.c (x86_insert_point): Don't call
4972 insert_memory_breakpoint.
4973 (x86_remove_point): Don't call remove_memory_breakpoint.
4974
4975 2015-04-01 Pedro Alves <palves@redhat.com>
4976 Cleber Rosa <crosa@redhat.com>
4977
4978 * server.c (gdbserver_usage): Reorganize and extend the usage
4979 message.
4980
4981 2015-03-24 Pedro Alves <palves@redhat.com>
4982
4983 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4984 output. Also dump TRAP_TRACE.
4985 (linux_low_filter_event): In debug output, distinguish a
4986 resume_stop SIGSTOP from a delayed SIGSTOP.
4987
4988 2015-03-24 Gary Benson <gbenson@redhat.com>
4989
4990 * linux-x86-low.c (x86_linux_new_thread): Moved to
4991 nat/x86-linux.c.
4992 (x86_linux_prepare_to_resume): Likewise.
4993
4994 2015-03-24 Gary Benson <gbenson@redhat.com>
4995
4996 * Makefile.in (x86-linux-dregs.o): New rule.
4997 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4998 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4999 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5000 (x86_linux_dr_get): Likewise.
5001 (x86_linux_dr_set): Likewise.
5002 (update_debug_registers_callback): Likewise.
5003 (x86_linux_dr_set_addr): Likewise.
5004 (x86_linux_dr_get_addr): Likewise.
5005 (x86_linux_dr_set_control): Likewise.
5006 (x86_linux_dr_get_control): Likewise.
5007 (x86_linux_dr_get_status): Likewise.
5008 (x86_linux_update_debug_registers): Likewise.
5009
5010 2015-03-24 Gary Benson <gbenson@redhat.com>
5011
5012 * linux-x86-low.c (x86_linux_update_debug_registers):
5013 New function, factored out from...
5014 (x86_linux_prepare_to_resume): ...this.
5015
5016 2015-03-24 Gary Benson <gbenson@redhat.com>
5017
5018 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5019 (x86_linux_dr_set): Likewise.
5020 (update_debug_registers_callback): Likewise.
5021 (x86_linux_dr_set_addr): Likewise.
5022 (x86_linux_dr_get_addr): Likewise.
5023 (x86_linux_dr_set_control): Likewise.
5024 (x86_linux_dr_get_control): Likewise.
5025 (x86_linux_dr_get_status): Likewise.
5026 (x86_linux_prepare_to_resume): Likewise.
5027
5028 2015-03-24 Gary Benson <gbenson@redhat.com>
5029
5030 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5031 Use perror_with_name. Pass string through gettext.
5032 (x86_linux_dr_set): Likewise.
5033
5034 2015-03-24 Gary Benson <gbenson@redhat.com>
5035
5036 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5037 (x86_linux_dr_set_addr): ...this.
5038 (x86_dr_low_get_addr): Rename to...
5039 (x86_linux_dr_get_addr): ...this.
5040 (x86_dr_low_set_control): Rename to...
5041 (x86_linux_dr_set_control): ...this.
5042 (x86_dr_low_get_control): Rename to...
5043 (x86_linux_dr_get_control): ...this.
5044 (x86_dr_low_get_status): Rename to...
5045 (x86_linux_dr_get_status): ...this.
5046 (x86_dr_low): Update with new function names.
5047
5048 2015-03-24 Gary Benson <gbenson@redhat.com>
5049
5050 * Makefile.in (x86-linux.o): New rule.
5051 * configure.srv: Add x86-linux.o to relevant targets.
5052 * linux-low.c (lwp_set_arch_private_info): New function.
5053 (lwp_arch_private_info): Likewise.
5054 * linux-x86-low.c: Include nat/x86-linux.h.
5055 (arch_lwp_info): Removed structure.
5056 (update_debug_registers_callback):
5057 Use lwp_set_debug_registers_changed.
5058 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5059 and lwp_set_debug_registers_changed.
5060 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5061
5062 2015-03-24 Gary Benson <gbenson@redhat.com>
5063
5064 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5065 * linux-arm-low.c (arm_new_thread): Likewise.
5066 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5067 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5068 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5069 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5070
5071 2015-03-24 Gary Benson <gbenson@redhat.com>
5072
5073 * linux-low.c (ptid_of_lwp): New function.
5074 (lwp_is_stopped): Likewise.
5075 (lwp_stop_reason): Likewise.
5076 * linux-x86-low.c (update_debug_registers_callback):
5077 Use lwp_is_stopped.
5078 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5079 lwp_stop_reason.
5080
5081 2015-03-24 Gary Benson <gbenson@redhat.com>
5082
5083 * linux-low.h (linux_stop_lwp): Remove declaration.
5084
5085 2015-03-24 Gary Benson <gbenson@redhat.com>
5086
5087 * linux-low.h: Include nat/linux-nat.h.
5088 * linux-low.c (iterate_over_lwps_args): New structure.
5089 (iterate_over_lwps_filter): New function.
5090 (iterate_over_lwps): Likewise.
5091 * linux-x86-low.c (update_debug_registers_callback):
5092 Update signature to what iterate_over_lwps expects.
5093 Remove PID check that iterate_over_lwps now performs.
5094 (x86_dr_low_set_addr): Use iterate_over_lwps.
5095 (x86_dr_low_set_control): Likewise.
5096
5097 2015-03-24 Gary Benson <gbenson@redhat.com>
5098
5099 * linux-x86-low.c (x86_debug_reg_state): New function.
5100 (x86_linux_prepare_to_resume): Use the above.
5101
5102 2015-03-24 Gary Benson <gbenson@redhat.com>
5103
5104 * linux-low.c (current_lwp_ptid): New function.
5105 * linux-x86-low.c: Include nat/linux-nat.h.
5106 (x86_dr_low_get_addr): Use current_lwp_ptid.
5107 (x86_dr_low_get_control): Likewise.
5108 (x86_dr_low_get_status): Likewise.
5109
5110 2015-03-20 Pedro Alves <palves@redhat.com>
5111
5112 * tracepoint.c (cmd_qtstatus): Make "str" const.
5113
5114 2015-03-20 Pedro Alves <palves@redhat.com>
5115
5116 * server.c (handle_general_set): Make "req_str" const.
5117
5118 2015-03-19 Pedro Alves <palves@redhat.com>
5119
5120 * linux-low.c (linux_resume_one_lwp): Rename to ...
5121 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5122 instead call perror_with_name.
5123 (check_ptrace_stopped_lwp_gone): New function.
5124 (linux_resume_one_lwp): Reimplement as wrapper around
5125 linux_resume_one_lwp_throw that swallows errors if the LWP is
5126 gone.
5127
5128 2015-03-19 Pedro Alves <palves@redhat.com>
5129
5130 * linux-low.c (count_events_callback, select_event_lwp_callback):
5131 No longer check whether the thread has resume_stop as last resume
5132 kind.
5133
5134 2015-03-19 Pedro Alves <palves@redhat.com>
5135
5136 * linux-low.c (count_events_callback, select_event_lwp_callback):
5137 Use the lwp's status_pending_p field, not the thread's.
5138
5139 2015-03-19 Pedro Alves <palves@redhat.com>
5140
5141 * linux-low.c (select_event_lwp_callback): Update comments to
5142 no longer mention SIGTRAP.
5143
5144 2015-03-18 Gary Benson <gbenson@redhat.com>
5145
5146 * server.c (handle_query): Do not report vFile:fstat as supported.
5147
5148 2015-03-11 Gary Benson <gbenson@redhat.com>
5149
5150 * hostio.c (sys/types.h): New include.
5151 (sys/stat.h): Likewise.
5152 (common-remote-fileio.h): Likewise.
5153 (handle_fstat): New function.
5154 (handle_vFile): Handle vFile:fstat packets.
5155
5156 2015-03-11 Gary Benson <gbenson@redhat.com>
5157
5158 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5159 struct stat.st_blocks and struct stat.st_blksize.
5160 * configure: Regenerate.
5161 * config.in: Likewise.
5162 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5163 (OBS): Add common-remote-fileio.o.
5164 (common-remote-fileio.o): New rule.
5165
5166 2015-03-09 Pedro Alves <palves@redhat.com>
5167
5168 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5169 'struct sockaddr' pointer in 'accept' call.
5170
5171 2015-03-09 Pedro Alves <palves@redhat.com>
5172
5173 Revert:
5174 2015-03-07 Pedro Alves <palves@redhat.com>
5175 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5176 or <winsock2.h> here. Instead include "gdb_socket.h".
5177 (remote_open): Use union gdb_sockaddr_u.
5178 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5179 or <winsock2.h> here. Instead include "gdb_socket.h".
5180 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5181 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5182 or <sys/un.h>.
5183 (init_named_socket, gdb_agent_helper_thread): Use union
5184 gdb_sockaddr_u.
5185
5186 2015-03-07 Pedro Alves <palves@redhat.com>
5187
5188 * configure.ac (build_warnings): Move
5189 -Wdeclaration-after-statement to the C-specific set.
5190 * configure: Regenerate.
5191
5192 2015-03-07 Pedro Alves <palves@redhat.com>
5193
5194 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5195 or <winsock2.h> here. Instead include "gdb_socket.h".
5196 (remote_open): Use union gdb_sockaddr_u.
5197 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5198 or <winsock2.h> here. Instead include "gdb_socket.h".
5199 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5200 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5201 or <sys/un.h>.
5202 (init_named_socket, gdb_agent_helper_thread): Use union
5203 gdb_sockaddr_u.
5204
5205 2015-03-07 Pedro Alves <palves@redhat.com>
5206
5207 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5208 instead.
5209
5210 2015-03-06 Yao Qi <yao.qi@linaro.org>
5211
5212 * linux-aarch64-low.c (aarch64_insert_point): Use
5213 show_debug_regs as a boolean.
5214 (aarch64_remove_point): Likewise.
5215
5216 2015-03-05 Pedro Alves <palves@redhat.com>
5217
5218 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5219 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5220 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5221 * nto-low.c (nto_target_ops): Likewise.
5222 * spu-low.c (spu_target_ops): Likewise.
5223 * win32-low.c (win32_target_ops): Likewise.
5224
5225 2015-03-04 Pedro Alves <palves@redhat.com>
5226
5227 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5228 Decide whether a breakpoint triggered based on the SIGTRAP's
5229 siginfo.si_code.
5230 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5231 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5232 (linux_low_filter_event): Check for breakpoints before checking
5233 watchpoints.
5234 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5235 siginfo.si_code.
5236 (linux_stopped_by_sw_breakpoint)
5237 (linux_supports_stopped_by_sw_breakpoint)
5238 (linux_stopped_by_hw_breakpoint)
5239 (linux_supports_stopped_by_hw_breakpoint): New functions.
5240 (linux_target_ops): Install new target methods.
5241
5242 2015-03-04 Pedro Alves <palves@redhat.com>
5243
5244 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5245 * server.c (swbreak_feature, hwbreak_feature): New globals.
5246 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5247 (captured_main): Clear swbreak_feature and hwbreak_feature.
5248 * server.h (swbreak_feature, hwbreak_feature): Declare.
5249 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5250 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5251 supports_stopped_by_hw_breakpoint>: New fields.
5252 (target_supports_stopped_by_sw_breakpoint)
5253 (target_stopped_by_sw_breakpoint)
5254 (target_supports_stopped_by_hw_breakpoint)
5255 (target_stopped_by_hw_breakpoint): Declare.
5256
5257 2015-03-04 Pedro Alves <palves@redhat.com>
5258
5259 enum lwp_stop_reason -> enum target_stop_reason
5260 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5261 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5262 (linux_wait_1, stuck_in_jump_pad_callback)
5263 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5264 (linux_stopped_by_watchpoint):
5265 * linux-low.h (enum lwp_stop_reason): Delete.
5266 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5267 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5268
5269 2015-03-04 Yao Qi <yao.qi@linaro.org>
5270
5271 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5272
5273 2015-03-03 Gary Benson <gbenson@redhat.com>
5274
5275 * hostio.c (handle_vFile): Fix prefix lengths.
5276
5277 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5278
5279 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5280 ptr_bits.
5281
5282 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5283
5284 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5285 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5286 (clean): Add "rm -f" for above C files.
5287 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5288 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5289 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5290 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5291 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5292 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5293 (init_registers_s390x_vx_linux64)
5294 (init_registers_s390x_tevx_linux64)
5295 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5296 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5297 declarations.
5298 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5299 (s390_store_vxrs_high): New functions.
5300 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5301 NT_S390_VXRS_HIGH.
5302 (s390_arch_setup): Add logic for selecting one of the new target
5303 descriptions. Activate the new vector regsets if applicable.
5304 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5305 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5306 and init_registers_s390x_tevx_linux64.
5307
5308 2015-03-01 Pedro Alves <palves@redhat.com>
5309
5310 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5311 parameter.
5312
5313 2015-02-27 Pedro Alves <palves@redhat.com>
5314
5315 * linux-x86-low.c (u_debugreg_offset): New function.
5316 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5317
5318 2015-02-27 Pedro Alves <palves@redhat.com>
5319
5320 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5321 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5322 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5323 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5324 (ps_lsetfpregs, ps_getpid)
5325 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5326 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5327 (ps_lsetxregs, ps_plog): Declare.
5328
5329 2015-02-27 Pedro Alves <palves@redhat.com>
5330
5331 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5332 IP_AGENT_EXPORT_FUNC.
5333 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5334 IP_AGENT_EXPORT_FUNC.
5335 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5336 (IP_AGENT_EXPORT): Delete.
5337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5339 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5340 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5341 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5342 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5343 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5344 (traceframe_read_count, traceframe_write_count)
5345 (traceframes_created, trace_state_variables, get_raw_reg)
5346 (get_trace_state_variable_value, set_trace_state_variable_value)
5347 (ust_loaded, helper_thread_id, cmd_buf): Use
5348 IPA_SYM_EXPORTED_NAME.
5349 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5350 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5351 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5352 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5353 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5354 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5355 EXTERN_C_PUSH/EXTERN_C_POP.
5356 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5357 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5358 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5359 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5360 (traceframe_write_count, traceframe_read_count)
5361 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5362 (about_to_request_buffer_space, get_trace_state_variable_value)
5363 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5364 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5365 EXTERN_C_PUSH/EXTERN_C_POP.
5366 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5367 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5368 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5369 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5370 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5371 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5372 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5373 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5374 Define.
5375 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5376 (IP_AGENT_EXPORT_VAR_DECL): Define.
5377 (tracing): Declare.
5378 (gdb_agent_get_raw_reg): Declare.
5379
5380 2015-02-27 Tom Tromey <tromey@redhat.com>
5381 Pedro Alves <palves@redhat.com>
5382
5383 Rename symbols whose names are reserved C++ keywords throughout.
5384
5385 2015-02-27 Pedro Alves <palves@redhat.com>
5386
5387 * Makefile.in (COMPILER): New, get it from autoconf.
5388 (CXX): Get from autoconf instead.
5389 (COMPILE.pre): Use COMPILER.
5390 (CC-LD): Rename to ...
5391 (CC_LD): ... this. Use COMPILER.
5392 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5393 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5394 * acinclude.m4: Include build-with-cxx.m4.
5395 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5396 Disable -Werror by default if building in C++ mode.
5397 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5398 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5399 the C++ compiler. Save/restore CXXFLAGS too.
5400 * configure: Regenerate.
5401
5402 2015-02-27 Pedro Alves <palves@redhat.com>
5403
5404 * acinclude.m4: Include libiberty.m4.
5405 * configure.ac: Call libiberty_INIT.
5406 * config.in, configure: Regenerate.
5407
5408 2015-02-26 Pedro Alves <palves@redhat.com>
5409
5410 * linux-low.c (linux_wait_1): When incrementing the PC past a
5411 program breakpoint always use the_low_target.breakpoint_len as
5412 increment, rather than the maximum between that and
5413 the_low_target.decr_pc_after_break.
5414
5415 2015-02-23 Pedro Alves <palves@redhat.com>
5416
5417 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5418 thread was doing a step-over; always adjust the PC if
5419 we stepped over a permanent breakpoint.
5420 (linux_wait_1): If we stepped over breakpoint that was on top of a
5421 permanent breakpoint, manually advance the PC past it.
5422
5423 2015-02-23 Pedro Alves <palves@redhat.com>
5424
5425 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5426 modes.
5427 (x86_fill_gregset, x86_store_gregset): Use it when handling
5428 $orig_eax.
5429
5430 2015-02-20 Pedro Alves <palves@redhat.com>
5431
5432 * thread-db.c: Include "nat/linux-procfs.h".
5433 (thread_db_init): Skip listing new threads if the kernel supports
5434 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5435
5436 2015-02-20 Pedro Alves <palves@redhat.com>
5437
5438 * linux-low.c (status_pending_p_callback): Use ptid_match.
5439
5440 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5441
5442 PR breakpoints/16812
5443 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5444 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5445 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5446
5447 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5448
5449 PR breakpoints/15956
5450 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5451
5452 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5453
5454 * linux-low.c (linux_low_btrace_conf): Print size.
5455 * server.c (handle_btrace_conf_general_set): New.
5456 (hanle_general_set): Call handle_btrace_conf_general_set.
5457 (handle_query): Report Qbtrace-conf:bts:size as supported.
5458
5459 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5460
5461 * linux-low.c (linux_low_enable_btrace): Update parameters.
5462 (linux_low_btrace_conf): New.
5463 (linux_target_ops)<to_btrace_conf>: Initialize.
5464 * server.c (current_btrace_conf): New.
5465 (handle_btrace_enable): Rename to ...
5466 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5467 to target_enable_btrace. Update comment. Update users.
5468 (handle_qxfer_btrace_conf): New.
5469 (qxfer_packets): Add btrace-conf entry.
5470 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5471 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5472 (target_ops)<read_btrace_conf>: New.
5473 (target_enable_btrace): Update parameters.
5474 (target_read_btrace_conf): New.
5475
5476 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5477
5478 * server.c (handle_btrace_general_set): Remove call to
5479 target_supports_btrace.
5480 (supported_btrace_packets): New.
5481 (handle_query): Call supported_btrace_packets.
5482 * target.h: include btrace-common.h.
5483 (btrace_target_info): Removed.
5484 (supports_btrace, target_supports_btrace): Update parameters.
5485
5486 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5487
5488 * Makefile.in (SFILES): Add common/btrace-common.c.
5489 (OBS): Add common/btrace-common.o.
5490 (btrace-common.o): Add build rules.
5491 * linux-low: Include btrace-common.h.
5492 (linux_low_read_btrace): Use struct btrace_data. Call
5493 btrace_data_init and btrace_data_fini.
5494
5495 2015-02-06 Pedro Alves <palves@redhat.com>
5496
5497 * thread-db.c (find_new_threads_callback): Add debug output.
5498
5499 2015-02-04 Pedro Alves <palves@redhat.com>
5500
5501 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5502 (resume_stopped_resumed_lwps): New function.
5503 (linux_wait_for_event_filtered): Use it.
5504
5505 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5506
5507 * Makefile.in (SFILES): Add linux-personality.c.
5508 (linux-personality.o): New rule.
5509 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5510 list of objects to be built.
5511 * linux-low.c: Include nat/linux-personality.h.
5512 (linux_create_inferior): Remove code to disable address space
5513 randomization (moved to ../nat/linux-personality.c). Create
5514 cleanup to disable address space randomization.
5515
5516 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5517
5518 * Makefile.in (posix-strerror.o): New rule.
5519 (mingw-strerror.o): Likewise.
5520 * configure: Regenerated.
5521 * configure.ac: Source file ../common/common.host. Initialize new
5522 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5523
5524 2015-01-14 Yao Qi <yao@codesourcery.com>
5525
5526 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5527 (ppc-linux.o): New rule.
5528 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5529 * configure.ac: AC_CHECK_FUNCS(getauxval).
5530 * config.in: Re-generated.
5531 * configure: Re-generated.
5532 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5533 ppc64_64bit_inferior_p
5534
5535 2015-01-14 Yao Qi <yao@codesourcery.com>
5536
5537 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5538 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5539 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5540 (PT_ORIG_R3, PT_TRAP): Likewise.
5541 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5542 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5543 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5544
5545 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5546
5547 * i387-fp.c (i387_cache_to_xsave): In look over
5548 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5549 zmmh_low_space field by use of zmmh_high_space.
5550
5551 2015-01-09 Pedro Alves <palves@redhat.com>
5552
5553 * linux-low.c (step_over_bkpt): Move higher up in the file.
5554 (handle_extended_wait): Don't store the stop_pc here.
5555 (get_stop_pc): Adjust comments and rename to ...
5556 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5557 stopped for a software breakpoint or hardware breakpoint.
5558 (thread_still_has_status_pending_p): New function.
5559 (status_pending_p_callback): Use
5560 thread_still_has_status_pending_p. If the event is no longer
5561 interesting, resume the LWP.
5562 (handle_tracepoints): Add assert.
5563 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5564 (wstatus_maybe_breakpoint): New function.
5565 (cancel_breakpoint): Delete function.
5566 (check_stopped_by_watchpoint): New function, factored out from
5567 linux_low_filter_event.
5568 (lp_status_maybe_breakpoint): Delete function.
5569 (linux_low_filter_event): Remove filter_ptid argument.
5570 Leave thread group exits pending here. Store the LWP's stop PC.
5571 Always leave events pending.
5572 (linux_wait_for_event_filtered): Pull all events out of the
5573 kernel, and leave them all pending.
5574 (count_events_callback, select_event_lwp_callback): Consider all
5575 events.
5576 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5577 (select_event_lwp): Only give preference to the stepping LWP in
5578 all-stop mode. Adjust comments.
5579 (ignore_event): New function.
5580 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5581 references to cancel_breakpoints. Adjust to renames. Also give
5582 equal priority to all LWPs that have had events in non-stop mode.
5583 If reporting a software breakpoint event, unadjust the LWP's PC.
5584 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5585 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5586 Adjust.
5587 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5588 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5589 (linux_stopped_by_watchpoint): Adjust.
5590 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5591 * linux-low.h (enum lwp_stop_reason): New.
5592 (struct lwp_info) <stop_pc>: Adjust comment.
5593 <stopped_by_watchpoint>: Delete field.
5594 <stop_reason>: New field.
5595 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5596 * mem-break.c (software_breakpoint_inserted_here)
5597 (hardware_breakpoint_inserted_here): New function.
5598 * mem-break.h (software_breakpoint_inserted_here)
5599 (hardware_breakpoint_inserted_here): Declare.
5600 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5601 (cancel_breakpoints): Delete.
5602 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5603 (upload_fast_traceframes): Remove references to
5604 cancel_breakpoints.
5605
5606 2015-01-09 Pedro Alves <palves@redhat.com>
5607
5608 * thread-db.c (find_new_threads_callback): Ignore thread if the
5609 kernel thread ID is -1.
5610
5611 2015-01-09 Pedro Alves <palves@redhat.com>
5612
5613 * linux-low.c (linux_attach_fail_reason_string): Move to
5614 nat/linux-ptrace.c, and rename.
5615 (linux_attach_lwp): Update comment.
5616 (attach_proc_task_lwp_callback): New function.
5617 (linux_attach): Adjust to rename and use
5618 linux_proc_attach_tgid_threads.
5619 (linux_attach_fail_reason_string): Delete declaration.
5620
5621 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5622
5623 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5624 * server.c (gdbserver_version): Likewise.
5625
5626 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5627
5628 * remote-utils.c: Include ctype.h.
5629 (input_interrupt): Explicitly handle the case when the char
5630 received is the NUL byte. Improve the printing of non-ASCII
5631 characters.
5632
5633 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5634
5635 * linux-low.c (linux_low_filter_event): Update call to
5636 linux_enable_event_reporting following the addition of
5637 a new parameter to that function.
5638
5639 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5640
5641 PR server/17457
5642 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5643 (AARCH64_FPCR_REGNO): Likewise.
5644 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5645 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5646 (aarch64_store_fpregset): Likewise.
5647
5648 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5649
5650 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5651 Remove FIXME comment about assumption about N.
5652
5653 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5654
5655 * configure.ac: If large-file support is disabled in GDBserver,
5656 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5657 * configure: Regenerate.
5658
5659 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5660
5661 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5662 warning upon ENODATA from ptrace.
5663 * linux-s390-low.c (s390_store_tdb): New.
5664 (s390_regsets): Add regset for NT_S390_TDB.
5665
5666 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5667
5668 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5669 without a fill_function.
5670 * linux-s390-low.c (s390_fill_last_break): Remove.
5671 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5672 (s390_arch_setup): Use regset's size instead of fill_function for
5673 loop end condition.
5674
5675 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5676
5677 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5678 the regset's store function when ptrace returned an error.
5679 * regcache.c (get_thread_regcache): Invalidate register cache
5680 before fetching inferior's registers.
5681
5682 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5683
5684 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5685 while-loop as for-loop.
5686 (regsets_store_inferior_registers): Likewise.
5687
5688 2014-11-28 Yao Qi <yao@codesourcery.com>
5689
5690 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5691 * config.in, configure: Re-generate.
5692 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5693 is defined.
5694
5695 2014-11-21 Yao Qi <yao@codesourcery.com>
5696
5697 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5698 (AC_CHECK_HEADERS): Remove malloc.h.
5699 * configure: Re-generated.
5700 * config.in: Re-generated.
5701 * server.h: Don't include alloca.h and malloc.h.
5702 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5703 Don't include malloc.h.
5704
5705 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5706
5707 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5708 corresponding ERRNO check in same block.
5709
5710 2014-11-12 Pedro Alves <palves@redhat.com>
5711
5712 * server.c (cont_thread): Update comment.
5713 (start_inferior, attach_inferior): No longer clear cont_thread.
5714 (handle_v_cont): No longer set cont_thread.
5715 (captured_main): Clear cont_thread each time a GDB connects.
5716
5717 2014-11-12 Pedro Alves <palves@redhat.com>
5718
5719 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5720 thread, and don't resume all threads if the Hc thread has exited.
5721
5722 2014-11-12 Pedro Alves <palves@redhat.com>
5723
5724 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5725 the process group instead of to a specific LWP.
5726
5727 2014-10-15 Pedro Alves <palves@redhat.com>
5728
5729 PR server/17487
5730 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5731 parameter.
5732 (arm_set_thread_context): Delete.
5733 (the_low_target): Adjust.
5734 * win32-i386-low.c (debug_registers_changed)
5735 (debug_registers_used): Delete.
5736 (update_debug_registers_callback): New function.
5737 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5738 needing to update their debug registers.
5739 (win32_get_current_dr): New function.
5740 (x86_dr_low_get_addr, x86_dr_low_get_control)
5741 (x86_dr_low_get_status): Fetch the debug register from the thread
5742 record's context.
5743 (i386_initial_stuff): Adjust.
5744 (i386_get_thread_context): Remove current_event parameter. Don't
5745 clear debug_registers_changed nor copy DR values to
5746 debug_reg_state.
5747 (i386_set_thread_context): Delete.
5748 (i386_prepare_to_resume): New function.
5749 (i386_thread_added): Mark the thread as needing to update irs
5750 debug registers.
5751 (the_low_target): Remove i386_set_thread_context and install
5752 i386_prepare_to_resume.
5753 * win32-low.c (win32_get_thread_context): Adjust.
5754 (win32_set_thread_context): Use SetThreadContext
5755 directly.
5756 (win32_prepare_to_resume): New function.
5757 (win32_require_context): New function, factored out from ...
5758 (thread_rec): ... this.
5759 (continue_one_thread): Call win32_prepare_to_resume on each thread
5760 we're about to continue.
5761 (win32_resume): Call win32_prepare_to_resume on the event thread.
5762 * win32-low.h (struct win32_thread_info)
5763 <debug_registers_changed>: New field.
5764 (struct win32_target_ops): Change prototype of set_thread_context,
5765 delete set_thread_context and add prepare_to_resume.
5766 (win32_require_context): New declaration.
5767
5768 2014-10-08 Gary Benson <gbenson@redhat.com>
5769
5770 * server.h: Do not include common-exceptions.h.
5771
5772 2014-10-08 Gary Benson <gbenson@redhat.com>
5773
5774 * server.h: Do not include cleanups.h.
5775
5776 2014-09-30 James Hogan <james.hogan@imgtec.com>
5777
5778 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5779 mips64-dsp-linux.c.
5780
5781 2014-09-23 Yao Qi <yao@codesourcery.com>
5782
5783 * linux-low.c (lp_status_maybe_breakpoint): New function.
5784 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5785 (count_events_callback): Likewise.
5786 (select_event_lwp_callback): Likewise.
5787 (cancel_breakpoints_callback): Likewise.
5788
5789 2014-09-19 Don Breazeal <donb@codesourcery.com>
5790
5791 * linux-low.c (handle_extended_wait): Call
5792 linux_ptrace_get_extended_event.
5793 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5794 linux_is_extended_waitstatus.
5795
5796 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5797
5798 * Makefile.in (CPPFLAGS): Define.
5799 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5800 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5801
5802 2014-09-16 Gary Benson <gbenson@redhat.com>
5803
5804 * inferiors.h (current_inferior): Renamed as...
5805 (current_thread): New variable. All uses updated.
5806 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5807 (maybe_move_out_of_jump_pad): Likewise.
5808 (cancel_breakpoint): Likewise.
5809 (linux_low_filter_event): Likewise.
5810 (wait_for_sigstop): Likewise.
5811 (linux_resume_one_lwp): Likewise.
5812 (need_step_over_p): Likewise.
5813 (start_step_over): Likewise.
5814 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5815 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5816 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5817 and save_inferior as saved_thread.
5818 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5819 saved_thread.
5820 (regcache_invalidate_thread): Likewise.
5821 * remote-utils.c (prepare_resume_reply): Likewise.
5822 * thread-db.c (thread_db_get_tls_address): Likewise.
5823 (disable_thread_event_reporting): Likewise.
5824 (remove_thread_event_breakpoints): Likewise.
5825 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5826 as saved_thread.
5827 * target.h (set_desired_inferior): Renamed as...
5828 (set_desired_thread): New declaration. All uses updated.
5829 * server.c (myresume): Updated comment to reference thread instead
5830 of inferior.
5831 (handle_serial_event): Likewise.
5832 (handle_target_event): Likewise.
5833
5834 2014-09-12 Tom Tromey <tromey@redhat.com>
5835 Gary Benson <gbenson@redhat.com>
5836
5837 * regcache.h: Include common-regcache.h.
5838 (regcache_read_pc): Don't declare.
5839 * regcache.c (get_thread_regcache_for_ptid): New function.
5840
5841 2014-09-11 Tom Tromey <tromey@redhat.com>
5842 Gary Benson <gbenson@redhat.com>
5843
5844 * symbol.c: New file.
5845 * Makefile.in (SFILES): Add symbol.c.
5846 (OBS): Add symbol.o.
5847
5848 2014-09-11 Gary Benson <gbenson@redhat.com>
5849
5850 * target.c (target_stop_ptid, target_continue_ptid): New
5851 functions.
5852
5853 2014-09-11 Tom Tromey <tromey@redhat.com>
5854 Gary Benson <gbenson@redhat.com>
5855
5856 * target.h: Include target/target.h.
5857 * target.c (target_read_memory, target_read_uint32)
5858 (target_write_memory): New functions.
5859
5860 2014-09-11 Gary Benson <gbenson@redhat.com>
5861
5862 * server.h (debug_hw_points): Don't declare.
5863 * server.c (debug_hw_points): Don't define. Replace all uses
5864 with show_debug_regs.
5865 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5866 all uses with show_debug_regs.
5867
5868 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5869
5870 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5871 endianness into account.
5872 (ppc_supply_ptrace_register): Likewise.
5873
5874 2014-09-03 James Hogan <james.hogan@imgtec.com>
5875
5876 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5877 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5878
5879 2014-09-03 Gary Benson <gbenson@redhat.com>
5880
5881 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5882 ALL_DEBUG_ADDRESS_REGISTERS.
5883
5884 2014-09-02 Gary Benson <gbenson@redhat.com>
5885
5886 * i386-low.h: Renamed as...
5887 * x86-low.h: New file. All type, function and variable name
5888 prefixes changed from "i386_" to "x86_". All references updated.
5889 * i386-low.c: Renamed as...
5890 * x86-low.c: New file. All type, function and variable name
5891 prefixes changed from "i386_" to "x86_". All references updated.
5892
5893 2014-09-02 Gary Benson <gbenson@redhat.com>
5894
5895 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5896 (x86_linux_new_thread): Likewise.
5897
5898 2014-08-29 Gary Benson <gbenson@redhat.com>
5899
5900 * server.h (setjmp.h): Do not include.
5901 (toplevel): Do not declare.
5902 (common-exceptions.h): Include.
5903 (cleanups.h): Likewise.
5904 * server.c (toplevel): Do not define.
5905 (exit_code): New static global.
5906 (detach_or_kill_for_exit_cleanup): New function.
5907 (main): New function. Original main renamed to...
5908 (captured_main): New function.
5909 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5910
5911 2014-08-29 Gary Benson <gbenson@redhat.com>
5912
5913 * Makefile.in (SFILES): Add common/common-exceptions.c.
5914 (OBS): Add common-exceptions.o.
5915 (common-exceptions.o): New rule.
5916 * utils.c (prepare_to_throw_exception): New function.
5917
5918 2014-08-29 Gary Benson <gbenson@redhat.com>
5919
5920 * config.in: Regenerate.
5921 * configure: Likewise.
5922
5923 2014-08-29 Gary Benson <gbenson@redhat.com>
5924
5925 * Makefile.in (SFILES): Add common/cleanups.c.
5926 (OBS): cleanups.o.
5927 (cleanups.o): New rule.
5928
5929 2014-08-29 Gary Benson <gbenson@redhat.com>
5930
5931 * utils.c (internal_vwarning): New function.
5932
5933 2014-08-28 Gary Benson <gbenson@redhat.com>
5934
5935 * utils.h (fatal): Remove declaration.
5936 * utils.c (fatal): Remove function.
5937
5938 2014-08-28 Gary Benson <gbenson@redhat.com>
5939
5940 * tracepoint.c (gdb_agent_init): Replace fatal with
5941 perror_with_name.
5942 (initialize_tracepoint): Likewise.
5943
5944 2014-08-28 Gary Benson <gbenson@redhat.com>
5945
5946 * remote-utils.c (remote_prepare): Replace fatal with error.
5947
5948 2014-08-28 Gary Benson <gbenson@redhat.com>
5949
5950 * linux-low.c (linux_async): Replace fatal with warning.
5951 Tidy up and return.
5952 (linux_start_non_stop): Return -1 if linux_async failed.
5953
5954 2014-08-28 Gary Benson <gbenson@redhat.com>
5955
5956 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5957 gdb_assert.
5958 (i386_dr_low_get_addr): Remove vague comment.
5959 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5960 gdb_assert.
5961
5962 2014-08-28 Gary Benson <gbenson@redhat.com>
5963
5964 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5965 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5966 internal_error.
5967 (linux_resume_one_lwp): Likewise.
5968 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5969 gdb_assert.
5970 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5971 with internal_error.
5972 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5973 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5974 (find_register_by_name): Replace fatal with internal_error.
5975 (find_regno): Likewise.
5976 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5977 * thread-db.c (thread_db_create_event): Likewise.
5978 (thread_db_load_search): Likewise.
5979 (try_thread_db_load_1): Likewise.
5980 * tracepoint.c (get_jump_space_head): Replace fatal with
5981 internal_error.
5982 (claim_trampoline_space): Likewise.
5983 (have_fast_tracepoint_trampoline_buffer): Likewise.
5984 (cmd_qtstart): Likewise.
5985 (stop_tracing): Likewise.
5986 (fast_tracepoint_collecting): Likewise.
5987 (target_malloc): Likewise.
5988 (download_tracepoint): Likewise.
5989 (download_trace_state_variables): Replace check with gdb_assert.
5990 (upload_fast_traceframes): Replace fatal with internal_error.
5991
5992 2014-08-19 Tom Tromey <tromey@redhat.com>
5993 Gary Benson <gbenson@redhat.com>
5994
5995 * Makefile.in (SFILES): Add common/common-debug.c.
5996 (OBS): Add common-debug.o.
5997 (common-debug.o): New rule.
5998 * debug.h (debug_printf): Don't declare.
5999 * debug.c (debug_printf): Renamed and rewritten as...
6000 (debug_vprintf): New function.
6001
6002 2014-08-19 Gary Benson <gbenson@redhat.com>
6003
6004 * utils.h: Do not include print-utils.h.
6005
6006 2014-08-19 Tom Tromey <tromey@redhat.com>
6007 Gary Benson <gbenson@redhat.com>
6008
6009 * server.h: Add static assertion.
6010 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6011
6012 2014-08-19 Tom Tromey <tromey@redhat.com>
6013 Gary Benson <gbenson@redhat.com>
6014
6015 * Makefile.in (SFILES): Add common/errors.c.
6016 (OBS): Add errors.o.
6017 (IPA_OBS): Add errors-ipa.o.
6018 (errors.o): New rule.
6019 (errors-ipa.o): Likewise.
6020 * utils.h (perror_with_name, error, warning): Don't declare.
6021 * utils.c (warning): Renamed and rewritten as...
6022 (vwarning): New function.
6023 (error): Renamed and rewritten as...
6024 (verror): New function.
6025 (internal_error): Renamed and rewritten as...
6026 (internal_verror): New function.
6027
6028 2014-08-07 Gary Benson <gbenson@redhat.com>
6029
6030 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6031 * configure: Regenerate.
6032 * config.in: Likewise.
6033 * server.h: Do not include errno.h.
6034 * event-loop.c: Likewise.
6035 * hostio-errno.c: Likewise.
6036 * linux-low.c: Likewise.
6037 * remote-utils.c: Likewise.
6038 * spu-low.c: Likewise.
6039 * utils.c: Likewise.
6040 * gdbreplay.c: Unconditionally include errno.h.
6041
6042 2014-08-07 Gary Benson <gbenson@redhat.com>
6043
6044 * server.h: Do not include string.h.
6045 * event-loop.c: Likewise.
6046 * linux-low.c: Likewise.
6047 * regcache.c: Likewise.
6048 * remote-utils.c: Likewise.
6049 * spu-low.c: Likewise.
6050 * utils.c: Likewise.
6051
6052 2014-08-07 Gary Benson <gbenson@redhat.com>
6053
6054 * server.h: Do not include gdb_assert.h.
6055
6056 2014-08-07 Gary Benson <gbenson@redhat.com>
6057
6058 * server.h: Do not include common-utils.h.
6059
6060 2014-08-07 Gary Benson <gbenson@redhat.com>
6061
6062 * server.h: Do not include ptid.h.
6063 * notif.h: Likewise.
6064
6065 2014-08-07 Gary Benson <gbenson@redhat.com>
6066
6067 * server.h: Do not include gdb_locale.h.
6068
6069 2014-08-07 Gary Benson <gbenson@redhat.com>
6070
6071 * server.h: Do not include gdb/signals.h.
6072 * win32-low.c: Likewise.
6073
6074 2014-08-07 Gary Benson <gbenson@redhat.com>
6075
6076 * server.h: Do not include pathmax.h.
6077
6078 2014-08-07 Gary Benson <gbenson@redhat.com>
6079
6080 * server.h: Do not include libiberty.h.
6081 * linux-bfin-low.c: Likewise.
6082
6083 2014-08-07 Gary Benson <gbenson@redhat.com>
6084
6085 * server.h: Do not include ansidecl.h.
6086
6087 2014-08-07 Gary Benson <gbenson@redhat.com>
6088
6089 * linux-x86-low.c: Do not include stddef.h.
6090 * lynx-ppc-low.c: Likewise.
6091 * tracepoint.c: Likewise.
6092
6093 2014-08-07 Gary Benson <gbenson@redhat.com>
6094
6095 * server.h: Do not include stdarg.h.
6096 * nto-low.c: Likewise.
6097
6098 2014-08-07 Gary Benson <gbenson@redhat.com>
6099
6100 * server.h: Do not include stdlib.h.
6101 * inferiors.c: Likewise.
6102 * linux-low.c: Likewise.
6103 * regcache.c: Likewise.
6104 * spu-low.c: Likewise.
6105 * tracepoint.c: Likewise.
6106 * utils.c: Likewise.
6107
6108 2014-08-07 Gary Benson <gbenson@redhat.com>
6109
6110 * server.h: Do not include stdio.h.
6111 * linux-low.c: Likewise.
6112 * remote-utils.c: Likewise.
6113 * spu-low.c: Likewise.
6114 * utils.c: Likewise.
6115 * wincecompat.c: Likewise.
6116
6117 2014-08-06 Gary Benson <gbenson@redhat.com>
6118
6119 * regcache.c (init_register_cache): Move conditionals inside if.
6120
6121 2014-08-06 Gary Benson <gbenson@redhat.com>
6122
6123 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6124
6125 2014-07-31 Gary Benson <gbenson@redhat.com>
6126
6127 * ax.h: Do not include server.h.
6128 * gdbthread.h: Likewise.
6129 * lynx-low.h: Likewise.
6130 * notif.h: Likewise.
6131
6132 2014-07-30 Gary Benson <gbenson@redhat.com>
6133
6134 * server.h: Include common-defs.h.
6135 Do not include config.h or build-gnulib-gdbserver/config.h.
6136
6137 2014-07-30 Gary Benson <gbenson@redhat.com>
6138
6139 * hostio-errno.c: Move server.h to top of includes list.
6140 * inferiors.c: Likewise.
6141 * linux-x86-low.c: Likewise.
6142 * notif.c: Include server.h.
6143
6144 2014-07-24 Tom Tromey <tromey@redhat.com>
6145 Gary Benson <gbenson@redhat.com>
6146
6147 * server.h (CORE_ADDR): Now unsigned.
6148
6149 2014-07-16 Pedro Alves <palves@redhat.com>
6150
6151 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6152
6153 2014-07-15 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6156 copy.
6157
6158 2014-07-11 Pedro Alves <palves@redhat.com>
6159
6160 * linux-low.c (kill_wait_lwp): New function, based on
6161 kill_one_lwp_callback, but use my_waitpid directly.
6162 (kill_one_lwp_callback, linux_kill): Use it.
6163
6164 2014-06-23 Pedro Alves <palves@redhat.com>
6165
6166 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6167 before setting DR0..DR3.
6168
6169 2014-06-20 Gary Benson <gbenson@redhat.com>
6170
6171 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6172 * configure: Regenerated.
6173 * config.in: Likewise.
6174
6175 2014-06-20 Gary Benson <gbenson@redhat.com>
6176
6177 * Makefile.in (SFILES): Update locations for files moved
6178 from common to nat.
6179 (object file files): Reordered.
6180
6181 2014-06-20 Gary Benson <gbenson@redhat.com>
6182
6183 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6184 (i386_dr_low_set_addr): Likewise.
6185 (i386_dr_low_get_addr): Likewise.
6186 (i386_dr_low_can_set_control): Likewise.
6187 (i386_dr_low_set_control): Likewise.
6188 (i386_dr_low_get_control): Likewise.
6189 (i386_dr_low_get_status): Likewise.
6190 (i386_get_debug_register_length): Likewise.
6191 * linux-x86-low.c (i386_dr_low_set_addr):
6192 Changed signature. Made static.
6193 (i386_dr_low_get_addr): Likewise.
6194 (i386_dr_low_set_control): Likewise.
6195 (i386_dr_low_get_control): Likewise.
6196 (i386_dr_low_get_status): Likewise.
6197 (i386_dr_low): New global variable.
6198 * win32-i386-low.c (i386_dr_low_set_addr):
6199 Changed signature. Made static.
6200 (i386_dr_low_get_addr): Likewise.
6201 (i386_dr_low_set_control): Likewise.
6202 (i386_dr_low_get_control): Likewise.
6203 (i386_dr_low_get_status): Likewise.
6204 (i386_dr_low): New global variable.
6205
6206 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6207
6208 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6209 * Makefile.in (AR, AR_FLAGS): Define.
6210 * configure: Regenerate.
6211
6212 2014-06-19 Gary Benson <gbenson@redhat.com>
6213
6214 * Makefile.in (i386-dregs.o): New rule.
6215 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6216 * i386-low.c (target.h): Remove include.
6217 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6218 (DR_CONTROL_SHIFT): Likewise.
6219 (DR_CONTROL_SIZE): Likewise.
6220 (DR_RW_EXECUTE): Likewise.
6221 (DR_RW_WRITE): Likewise.
6222 (DR_RW_READ): Likewise.
6223 (DR_RW_IORW): Likewise.
6224 (DR_LEN_1): Likewise.
6225 (DR_LEN_2): Likewise.
6226 (DR_LEN_4): Likewise.
6227 (DR_LEN_8): Likewise.
6228 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6229 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6230 (DR_ENABLE_SIZE): Likewise.
6231 (DR_LOCAL_SLOWDOWN): Likewise.
6232 (DR_GLOBAL_SLOWDOWN): Likewise.
6233 (DR_CONTROL_RESERVED): Likewise.
6234 (I386_DR_CONTROL_MASK): Likewise.
6235 (I386_DR_VACANT): Likewise.
6236 (I386_DR_LOCAL_ENABLE): Likewise.
6237 (I386_DR_GLOBAL_ENABLE): Likewise.
6238 (I386_DR_DISABLE): Likewise.
6239 (I386_DR_SET_RW_LEN): Likewise.
6240 (I386_DR_GET_RW_LEN): Likewise.
6241 (I386_DR_WATCH_HIT): Likewise.
6242 (i386_wp_op_t): Likewise.
6243 (i386_show_dr): Likewise.
6244 (i386_length_and_rw_bits): Likewise.
6245 (i386_insert_aligned_watchpoint): Likewise.
6246 (i386_remove_aligned_watchpoint): Likewise.
6247 (i386_handle_nonaligned_watchpoint): Likewise.
6248 i386_update_inferior_debug_regs(): Likewise.
6249 (i386_dr_insert_watchpoint): Likewise.
6250 (i386_dr_remove_watchpoint): Likewise.
6251 (i386_dr_region_ok_for_watchpoint): Likewise.
6252 (i386_dr_stopped_data_address): Likewise.
6253 (i386_dr_stopped_by_watchpoint): Likewise.
6254
6255 2014-06-19 Gary Benson <gbenson@redhat.com>
6256
6257 * i386-low.c (i386_dr_show): Renamed to
6258 i386_show_dr and made static. All uses updated.
6259 (i386_dr_length_and_rw_bits): Renamed to
6260 i386_length_and_rw_bits and made static.
6261 All uses updated.
6262 (i386_dr_insert_aligned_watchpoint): Renamed to
6263 i386_insert_aligned_watchpoint and made static.
6264 All uses updated.
6265 (i386_dr_remove_aligned_watchpoint): Renamed to
6266 i386_remove_aligned_watchpoint and made static.
6267 All uses updated.
6268 (i386_dr_update_inferior_debug_regs): Renamed to
6269 i386_update_inferior_debug_regs and made static.
6270 All uses updated.
6271
6272 2014-06-18 Gary Benson <gbenson@redhat.com>
6273
6274 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6275 (i386_dr_low_can_set_control): Likewise.
6276 (i386_get_debug_register_length): Likewise.
6277 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6278 (i386_dr_low_can_set_control): Likewise.
6279 (i386_get_debug_register_length): Likewise.
6280
6281 2014-06-17 Gary Benson <gbenson@redhat.com>
6282
6283 * i386-low.h (i386-dregs.h): New include.
6284 (DR_FIRSTADDR): Now in i386-dregs.h.
6285 (DR_LASTADDR): Likewise.
6286 (DR_NADDR): Likewise.
6287 (DR_STATUS): Likewise.
6288 (DR_CONTROL): Likewise.
6289 (i386_debug_reg_state): Likewise.
6290 (i386_dr_insert_watchpoint): Likewise.
6291 (i386_dr_remove_watchpoint): Likewise.
6292 (i386_dr_region_ok_for_watchpoint): Likewise.
6293 (i386_dr_stopped_data_address): Likewise.
6294 (i386_dr_stopped_by_watchpoint): Likewise.
6295 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6296
6297 2014-06-18 Gary Benson <gbenson@redhat.com>
6298
6299 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6300 i386_dr_insert_watchpoint.
6301 (i386_low_remove_watchpoint): Renamed to
6302 i386_dr_remove_watchpoint.
6303 (i386_low_region_ok_for_watchpoint): Renamed to
6304 i386_dr_region_ok_for_watchpoint.
6305 (i386_low_stopped_data_address): Renamed to
6306 i386_dr_stopped_data_address.
6307 (i386_low_stopped_by_watchpoint): Renamed to
6308 i386_dr_stopped_by_watchpoint.
6309 * i386-low.c (i386_show_dr): Renamed to
6310 i386_dr_show and made nonstatic. All uses updated.
6311 (i386_length_and_rw_bits): Renamed to
6312 i386_dr_length_and_rw_bits and made nonstatic.
6313 All uses updated.
6314 (i386_insert_aligned_watchpoint): Renamed to
6315 i386_dr_insert_aligned_watchpoint and made nonstatic.
6316 All uses updated.
6317 (i386_remove_aligned_watchpoint): Renamed to
6318 i386_dr_remove_aligned_watchpoint and made nonstatic.
6319 All uses updated.
6320 (i386_update_inferior_debug_regs): Renamed to
6321 i386_dr_update_inferior_debug_regs and made nonstatic.
6322 All uses updated.
6323 (i386_low_insert_watchpoint): Renamed to
6324 i386_dr_insert_watchpoint. All uses updated.
6325 (i386_low_remove_watchpoint): Renamed to
6326 i386_dr_remove_watchpoint. All uses updated.
6327 (i386_low_region_ok_for_watchpoint): Renamed to
6328 i386_dr_region_ok_for_watchpoint. All uses updated.
6329 (i386_low_stopped_data_address): Renamed to
6330 i386_dr_stopped_data_address. All uses updated.
6331 (i386_low_stopped_by_watchpoint): Renamed to
6332 i386_dr_stopped_by_watchpoint. All uses updated.
6333
6334 2014-06-18 Gary Benson <gbenson@redhat.com>
6335
6336 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6337 (i386_dr_low_can_set_control): Likewise.
6338 (i386_insert_aligned_watchpoint): New check.
6339
6340 2014-06-18 Gary Benson <gbenson@redhat.com>
6341
6342 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6343 Renamed to state.
6344
6345 2014-06-18 Gary Benson <gbenson@redhat.com>
6346
6347 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6348 instead of fatal and error.
6349 (i386_handle_nonaligned_watchpoint): Likewise.
6350
6351 2014-06-18 Gary Benson <gbenson@redhat.com>
6352
6353 * i386-low.c (i386_get_debug_register_length): New macro.
6354 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6355 (i386_show_dr): Use debug_printf instead of fprintf. Use
6356 phex to format values.
6357
6358 2014-06-18 Gary Benson <gbenson@redhat.com>
6359
6360 * i386-low.h: Comment changes.
6361 * i386-low.c: Likewise.
6362
6363 2014-06-18 Gary Benson <gbenson@redhat.com>
6364
6365 * i386-low.c: Whitespace changes.
6366
6367 2014-06-12 Tom Tromey <tromey@redhat.com>
6368
6369 * utils.c (freeargv): Remove.
6370
6371 2014-06-12 Tom Tromey <tromey@redhat.com>
6372
6373 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6374 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6375 (parse_debug_format_options): Likewise.
6376 (gdbserver_usage): Likewise.
6377 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6378 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6379 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6380 against libiberty.
6381 ($(LIBGNU)): Depend on libiberty.
6382 (all-lib): Recurse into all subdirs.
6383 (install-only): Invoke "install" target in subdirs.
6384 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6385 targets.
6386 * configure: Rebuild.
6387 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6388 for vasprintf, vsnprintf, or gettimeofday.
6389 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6390 srv_tgtobj.
6391
6392 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6393
6394 * development.sh: Delete.
6395 * Makefile.in (config.status): Adjust dependency on development.sh.
6396 * configure.ac: Adjust development.sh source call.
6397 * configure: Regenerate.
6398
6399 2014-06-02 Pedro Alves <palves@redhat.com>
6400
6401 * ax.c (gdb_free_agent_expr): New function.
6402 * ax.h (gdb_free_agent_expr): New declaration.
6403 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6404 list.
6405 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6406 static.
6407 (clear_breakpoint_conditions_and_commands): New function.
6408 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6409 (clear_breakpoint_conditions_and_commands): New declaration.
6410
6411 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6412
6413 * linux-aarch64-low.c (asm/ptrace.h): Include.
6414
6415 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6416
6417 Fix TLS access for -static -pthread.
6418 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6419 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6420 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6421
6422 2014-05-20 Pedro Alves <palves@redhat.com>
6423
6424 * linux-aarch64-low.c (aarch64_insert_point)
6425 (aarch64_remove_point): No longer check whether the type is
6426 supported here. Adjust to new interface.
6427 (the_low_target): Install aarch64_supports_z_point_type as
6428 supports_z_point_type method.
6429 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6430 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6431 instead of a Z packet char. Adjust.
6432 (arm_supports_z_point_type): New function.
6433 (arm_insert_point, arm_remove_point): Adjust to new interface.
6434 (the_low_target): Install arm_supports_z_point_type.
6435 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6436 (cris_insert_point, cris_remove_point): Adjust to new interface.
6437 Don't check whether the type is supported here.
6438 (the_low_target): Install cris_supports_z_point_type.
6439 * linux-low.c (linux_supports_z_point_type): New function.
6440 (linux_insert_point, linux_remove_point): Adjust to new interface.
6441 * linux-low.h (struct linux_target_ops) <insert_point,
6442 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6443 raw_breakpoint pointer parameter.
6444 <supports_z_point_type>: New method.
6445 * linux-mips-low.c (mips_supports_z_point_type): New function.
6446 (mips_insert_point, mips_remove_point): Adjust to new interface.
6447 Use mips_supports_z_point_type.
6448 (the_low_target): Install mips_supports_z_point_type.
6449 * linux-ppc-low.c (the_low_target): Install NULL as
6450 supports_z_point_type method.
6451 * linux-s390-low.c (the_low_target): Install NULL as
6452 supports_z_point_type method.
6453 * linux-sparc-low.c (the_low_target): Install NULL as
6454 supports_z_point_type method.
6455 * linux-x86-low.c (x86_supports_z_point_type): New function.
6456 (x86_insert_point): Adjust to new insert_point interface. Use
6457 insert_memory_breakpoint. Adjust to new
6458 i386_low_insert_watchpoint interface.
6459 (x86_remove_point): Adjust to remove_point interface. Use
6460 remove_memory_breakpoint. Adjust to new
6461 i386_low_remove_watchpoint interface.
6462 (the_low_target): Install x86_supports_z_point_type.
6463 * lynx-low.c (lynx_target_ops): Install NULL as
6464 supports_z_point_type callback.
6465 * nto-low.c (nto_supports_z_point_type): New.
6466 (nto_insert_point, nto_remove_point): Adjust to new interface.
6467 (nto_target_ops): Install nto_supports_z_point_type.
6468 * mem-break.c: Adjust intro comment.
6469 (struct raw_breakpoint) <raw_type, size>: New fields.
6470 <inserted>: Update comment.
6471 <shlib_disabled>: Delete field.
6472 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6473 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6474 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6475 (raw_bkpt_type_to_target_hw_bp_type): New function.
6476 (find_enabled_raw_code_breakpoint_at): New function.
6477 (find_raw_breakpoint_at): New type and size parameters. Use them.
6478 (insert_memory_breakpoint): New function, based off
6479 set_raw_breakpoint_at.
6480 (remove_memory_breakpoint): New function.
6481 (set_raw_breakpoint_at): Reimplement.
6482 (set_breakpoint): New, based on set_breakpoint_at.
6483 (set_breakpoint_at): Reimplement.
6484 (delete_raw_breakpoint): Go through the_target->remove_point
6485 instead of assuming memory breakpoints.
6486 (find_gdb_breakpoint_at): Delete.
6487 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6488 (find_gdb_breakpoint): New function.
6489 (set_gdb_breakpoint_at): Delete.
6490 (z_type_supported): New function.
6491 (set_gdb_breakpoint_1): New function, loosely based off
6492 set_gdb_breakpoint_at.
6493 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6494 (delete_gdb_breakpoint_at): Delete.
6495 (delete_gdb_breakpoint_1): New function, loosely based off
6496 delete_gdb_breakpoint_at.
6497 (delete_gdb_breakpoint): New function.
6498 (clear_gdb_breakpoint_conditions): Rename to ...
6499 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6500 breakpoint.
6501 (add_condition_to_breakpoint): Make static.
6502 (add_breakpoint_condition): Take a struct breakpoint pointer
6503 instead of an address. Adjust.
6504 (gdb_condition_true_at_breakpoint): Rename to ...
6505 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6506 z_type parameter.
6507 (gdb_condition_true_at_breakpoint): Reimplement.
6508 (add_breakpoint_commands): Take a struct breakpoint pointer
6509 instead of an address. Adjust.
6510 (gdb_no_commands_at_breakpoint): Rename to ...
6511 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6512 parameter. Return true if no breakpoint was found. Change debug
6513 output.
6514 (gdb_no_commands_at_breakpoint): Reimplement.
6515 (run_breakpoint_commands): Rename to ...
6516 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6517 and change return type to boolean.
6518 (run_breakpoint_commands): New function.
6519 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6520 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6521 breakpoint. Go through the_target->remove_point instead of
6522 assuming memory breakpoint.
6523 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6524 software and hardware breakpoints.
6525 (reinsert_raw_breakpoint): Go through the_target->insert_point
6526 instead of assuming memory breakpoint.
6527 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6528 software and hardware breakpoints.
6529 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6530 Check both software and hardware breakpoints.
6531 (validate_inserted_breakpoint): Assert the breakpoint is a
6532 software breakpoint. Set the inserted flag to -1 instead of
6533 setting shlib_disabled.
6534 (delete_disabled_breakpoints): Adjust.
6535 (validate_breakpoints): Only validate software breakpoints.
6536 Adjust to inserted flag change.
6537 (check_mem_read, check_mem_write): Skip breakpoint types other
6538 than software breakpoints. Adjust to inserted flag change.
6539 * mem-break.h (enum raw_bkpt_type): New enum.
6540 (raw_breakpoint, struct process_info): Forward declare.
6541 (Z_packet_to_target_hw_bp_type): Delete declaration.
6542 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6543 (set_gdb_breakpoint, delete_gdb_breakpoint)
6544 (clear_breakpoint_conditions): New declarations.
6545 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6546 (breakpoint_inserted_here): Update comment.
6547 (add_breakpoint_condition, add_breakpoint_commands): Replace
6548 address parameter with a breakpoint pointer parameter.
6549 (gdb_breakpoint_here): Update comment.
6550 (delete_gdb_breakpoint_at): Delete.
6551 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6552 * server.c (process_point_options): Take a struct breakpoint
6553 pointer instead of an address. Adjust.
6554 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6555 delete_gdb_breakpoint.
6556 * spu-low.c (spu_target_ops): Install NULL as
6557 supports_z_point_type method.
6558 * target.h: Include mem-break.h.
6559 (struct target_ops) <prepare_to_access_memory>: Update comment.
6560 <supports_z_point_type>: New field.
6561 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6562 instead of a char. Also take a raw breakpoint pointer.
6563 * win32-arm-low.c (the_low_target): Install NULL as
6564 supports_z_point_type.
6565 * win32-i386-low.c (i386_supports_z_point_type): New function.
6566 (i386_insert_point, i386_remove_point): Adjust to new interface.
6567 (the_low_target): Install i386_supports_z_point_type.
6568 * win32-low.c (win32_supports_z_point_type): New function.
6569 (win32_insert_point, win32_remove_point): Adjust to new interface.
6570 (win32_target_ops): Install win32_supports_z_point_type.
6571 * win32-low.h (struct win32_target_ops):
6572 <supports_z_point_type>: New method.
6573 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6574 instead of a char. Also take a raw breakpoint pointer.
6575
6576 2014-05-20 Pedro Alves <palves@redhat.com>
6577
6578 * mem-break.h: Include break-common.h.
6579 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6580 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6581 (Z_packet_to_target_hw_bp_type): New declaration.
6582 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6583 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6584 (Z_PACKET_ACCESS_WP): Delete macros.
6585 (Z_packet_to_hw_type): Delete function.
6586 * i386-low.h: Don't include break-common.h here.
6587 (Z_packet_to_hw_type): Delete declaration.
6588 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6589 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6590 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6591 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6592 * linux-aarch64-low.c: Don't include break-common.h here.
6593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6595 (Z_packet_to_target_hw_bp_type): Delete function.
6596 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6597 function.
6598 (mips_insert_point, mips_remove_point): Use
6599 Z_packet_to_target_hw_bp_type.
6600
6601 2014-05-20 Pedro Alves <palves@redhat.com>
6602
6603 * linux-aarch64-low.c: Include break-common.h.
6604 (enum target_point_type): Delete.
6605 (Z_packet_to_point_type): Rename to ...
6606 (Z_packet_to_target_hw_bp_type): ... this, and return a
6607 target_hw_bp_type instead.
6608 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6609 instead of an enum target_point_type.
6610 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6611 breakpoint type.
6612 (aarch64_dr_state_insert_one_point)
6613 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6614 (aarch64_handle_aligned_watchpoint)
6615 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6616 Take an enum target_hw_bp_type instead of an enum
6617 target_point_type.
6618 (aarch64_supports_z_point_type): New function.
6619 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6620 use Z_packet_to_target_hw_bp_type.
6621
6622 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6623
6624 * configure.ac: Only use -Werror by default when DEVELOPMENT
6625 is true.
6626 * configure: Regenerate.
6627
6628 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6629
6630 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6631 * linux-x86-low.c (X86_64_USER_REGS): New.
6632 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6633
6634 2014-04-28 Yao Qi <yao@codesourcery.com>
6635
6636 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6637 name.
6638
6639 2014-04-25 Pedro Alves <palves@redhat.com>
6640
6641 PR server/16255
6642 * linux-low.c (linux_attach_fail_reason_string): New function.
6643 (linux_attach_lwp): Delete.
6644 (linux_attach_lwp_1): Rename to ...
6645 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6646 argument. Remove "initial" parameter. Return int instead of
6647 void. Don't error or warn here.
6648 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6649 failure to attach to the tgid. Call warning when failing to
6650 attach to an lwp.
6651 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6652 argument. Remove "initial" parameter. Return int instead of
6653 void. Don't error or warn here.
6654 (linux_attach_fail_reason_string): New declaration.
6655 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6656 interface change. Use linux_attach_fail_reason_string.
6657
6658 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6659 Walfred Tedeschi <walfred.tedeschi@intel.com>
6660
6661 * Makefile.in: Added rules to handle new files
6662 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6663 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6664 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6665 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6666 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6667 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6668 x32-avx512-linux.o.
6669 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6670 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6671 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6672 i386/x32-avx512.xml.
6673 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6674 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6675 i386/x32-avx512-linux.xml.
6676 * i387-fp.c (num_avx512_k_registers): New constant for number
6677 of K registers.
6678 (num_avx512_zmmh_low_registers): New constant for number of
6679 lower ZMM registers (0-15).
6680 (num_avx512_zmmh_high_registers): New constant for number of
6681 higher ZMM registers (16-31).
6682 (num_avx512_ymmh_registers): New contant for number of higher
6683 YMM registers (ymm16-31 added by avx521 on x86_64).
6684 (num_avx512_xmm_registers): New constant for number of higher
6685 XMM registers (xmm16-31 added by AVX512 on x86_64).
6686 (struct i387_xsave): Add space for AVX512 registers.
6687 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6688 Add code to handle AVX512 registers.
6689 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6690 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6691 prototypei from generated file.
6692 (tdesc_amd64_avx512_linux): Likewise.
6693 (init_registers_x32_avx512_linux): Likewise.
6694 (tdesc_x32_avx512_linux): Likewise.
6695 (init_registers_i386_avx512_linux): Likewise.
6696 (tdesc_i386_avx512_linux): Likewise.
6697 (x86_64_regmap): Add AVX512 registers.
6698 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6699 mask.
6700 (initialize_low_arch): Add code to initialize AVX512 registers.
6701
6702 2014-04-23 Pedro Alves <palves@redhat.com>
6703
6704 * mem-break.c (find_gdb_breakpoint_at): Make static.
6705 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6706
6707 2014-04-23 Pedro Alves <palves@redhat.com>
6708
6709 * i386-low.c: Don't include break-common.h here.
6710 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6711 prototype to take target_hw_bp_type as argument instead of a Z
6712 packet char.
6713 * i386-low.h: Include break-common.h here.
6714 (Z_packet_to_hw_type): Declare.
6715 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6716 prototypes.
6717 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6718 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6719 (x86_remove_point): Convert the packet number to a
6720 target_hw_bp_type before calling i386_low_remove_watchpoint.
6721 * win32-i386-low.c (i386_insert_point): Convert the packet number
6722 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6723 (i386_remove_point): Convert the packet number to a
6724 target_hw_bp_type before calling i386_low_remove_watchpoint.
6725
6726 2014-04-23 Pedro Alves <palves@redhat.com>
6727
6728 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6729
6730 2014-04-10 Pedro Alves <palves@redhat.com>
6731
6732 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6733 Check if the condition or command is NULL before checking if the
6734 breakpoint is known. On success, return true.
6735 * mem-break.h (add_breakpoint_condition): Document return.
6736 (add_breakpoint_commands): Add describing comment.
6737 * server.c (skip_to_semicolon): New function.
6738 (process_point_options): Use it.
6739
6740 2014-04-09 Pedro Alves <palves@redhat.com>
6741
6742 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6743 to lwpid_of.
6744
6745 2014-02-27 Pedro Alves <palves@redhat.com>
6746
6747 PR 12702
6748 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6749 macros.
6750 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6751 output.
6752 (last_thread_of_process_p): Take a PID argument instead of a
6753 thread pointer.
6754 (linux_wait_for_lwp): Delete.
6755 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6756 functions.
6757 (linux_low_filter_event): New function, party factored out from
6758 linux_wait_for_event.
6759 (linux_wait_for_event): Rename to ...
6760 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6761 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6762 sigsuspend. Check for zombie leaders.
6763 (linux_wait_for_event): Reimplement as wrapper around
6764 linux_wait_for_event_filtered.
6765 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6766 a normal or signal exit is seen, it's the whole process exiting.
6767 (wait_for_sigstop): No longer a for_each_inferior callback.
6768 Rewrite on top of linux_wait_for_event_filtered.
6769 (stop_all_lwps): Call wait_for_sigstop directly.
6770 * server.c (resume, handle_target_event): Handle
6771 TARGET_WAITKIND_NO_RESUMED.
6772
6773 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6774
6775 * win32-low.c (psapi_get_dll_name,
6776 * win32_CreateToolhelp32Snapshot): Delete.
6777 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6778 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6779 Delete.
6780 (handle_load_dll): Add function description.
6781 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6782
6783 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6784
6785 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6786 Add comment.
6787 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6788 base address when calling win32_add_one_solib.
6789 (handle_load_dll): Delete local variable load_addr.
6790 Remove 0x1000 offset applied to DLL base address when calling
6791 win32_add_one_solib.
6792 (handle_unload_dll): Add comment.
6793
6794 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6795
6796 * win32-low.c (win32_add_all_dlls): Renames
6797 win32_ensure_ntdll_loaded. Rewrite function documentation.
6798 Adjust implementation to always load all DLLs.
6799 Add 0x1000 offset to DLL base address when calling
6800 win32_add_one_solib.
6801 (child_initialization_done): New static global.
6802 (do_initial_child_stuff): Set child_initialization_done to
6803 zero during child initialization, and 1 after. Replace call
6804 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6805 Add comment.
6806 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6807 (handle_unload_dll): Add function documentation.
6808 (get_child_debug_event): Ignore load and unload DLL events
6809 during child initialization.
6810
6811 2014-02-20 Doug Evans <dje@google.com>
6812
6813 Remove global all_lwps.
6814 * inferiors.h (ptid_of): Move here from linux-low.h.
6815 (pid_of, lwpid_of): Ditto.
6816 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6817 parameter is a struct thread_info * now.
6818 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6819 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6820 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6821 directly.
6822 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6823 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6824 * linux-arm-low.c (update_registers_callback): Update, "entry"
6825 parameter is a struct thread_info * now.
6826 Fetch lwpid from current_inferior directly.
6827 (arm_insert_point): Pass &all_threads to find_inferior instead of
6828 &all_lwps.
6829 (arm_remove_point): Ditto.
6830 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6831 (arm_prepare_to_resume): Fetch pid from thread.
6832 (arm_read_description): Fetch lwpid from current_inferior directly.
6833 * linux-low.c (all_lwps): Delete.
6834 (delete_lwp): Delete call to remove_inferior.
6835 (handle_extended_wait): Fetch lwpid from thread.
6836 (add_lwp): Don't set lwp->entry.id. Remove call to
6837 add_inferior_to_list.
6838 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6839 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6840 (kill_one_lwp_callback): Ditto.
6841 (linux_kill): Don't dereference NULL pointer.
6842 Fetch ptid,lwpid from thread.
6843 (get_detach_signal): Fetch ptid from thread.
6844 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6845 Simplify call to regcache_invalidate_thread.
6846 (delete_lwp_callback): Update, "entry" parameter is a
6847 struct thread_info * now. Fetch pid from thread.
6848 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6849 (status_pending_p_callback): Update, "entry" parameter is a
6850 struct thread_info * now. Fetch ptid from thread.
6851 (find_lwp_pid): Update, "entry" parameter is a
6852 struct thread_info * now.
6853 (linux_wait_for_lwp): Fetch pid from thread.
6854 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6855 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6856 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6857 (dequeue_one_deferred_signal): Ditto.
6858 (cancel_breakpoint): Fetch ptid from current_inferior.
6859 (linux_wait_for_event): Pass &all_threads to find_inferior,
6860 not &all_lwps. Fetch ptid, lwpid from thread.
6861 (count_events_callback): Update, "entry" parameter is a
6862 struct thread_info * now.
6863 (select_singlestep_lwp_callback): Ditto.
6864 (select_event_lwp_callback): Ditto.
6865 (cancel_breakpoints_callback): Ditto.
6866 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6867 not &all_lwps.
6868 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6869 (unsuspend_one_lwp): Update, "entry" parameter is a
6870 struct thread_info * now.
6871 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6872 not &all_lwps.
6873 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6874 Fetch lwpid from thread, not lwp.
6875 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6876 Pass &all_threads to find_inferior, not &all_lwps.
6877 (send_sigstop): Fetch lwpid from thread, not lwp.
6878 (send_sigstop_callback): Update, "entry" parameter is a
6879 struct thread_info * now.
6880 (suspend_and_send_sigstop_callback): Ditto.
6881 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6882 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6883 struct thread_info * now.
6884 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6885 from thread, lwp.
6886 (lwp_running): Update, "entry" parameter is a
6887 struct thread_info * now.
6888 (stop_all_lwps): Fetch ptid from thread.
6889 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6890 (linux_resume_one_lwp): Fetch lwpid from thread.
6891 (linux_set_resume_request): Update, "entry" parameter is a
6892 struct thread_info * now. Fetch pid, lwpid from thread.
6893 (resume_status_pending_p): Update, "entry" parameter is a
6894 struct thread_info * now.
6895 (need_step_over_p): Ditto. Fetch lwpid from thread.
6896 (start_step_over): Fetch lwpid from thread.
6897 (linux_resume_one_thread): Update, "entry" parameter is a
6898 struct thread_info * now. Fetch lwpid from thread.
6899 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6900 (proceed_one_lwp): Update, "entry" parameter is a
6901 struct thread_info * now. Fetch lwpid from thread.
6902 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6903 struct thread_info * now.
6904 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6905 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6906 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6907 directly.
6908 (regsets_store_inferior_registers): Ditto.
6909 (fetch_register, store_register): Ditto.
6910 (linux_read_memory, linux_write_memory): Ditto.
6911 (linux_request_interrupt): Ditto.
6912 (linux_read_auxv): Ditto.
6913 (linux_xfer_siginfo): Ditto.
6914 (linux_qxfer_spu): Ditto.
6915 (linux_qxfer_libraries_svr4): Ditto.
6916 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6917 moved to inferiors.h.
6918 (get_lwp): Delete.
6919 (get_thread_lwp): Update.
6920 (struct lwp_info): Delete member "entry". Simplify comment for
6921 member "thread".
6922 (all_lwps): Delete.
6923 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6924 current_inferior directly.
6925 (update_watch_registers_callback): Update, "entry" parameter is a
6926 struct thread_info * now. Fetch pid from thread.
6927 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6928 (mips_insert_point): Fetch lwpid from current_inferior.
6929 Pass &all_threads to find_inferior, not &all_lwps.
6930 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6931 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6932 directly.
6933 (mips_stopped_data_address): Ditto.
6934 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6935 directly.
6936 * linux-tile-low.c (tile_arch_setup): Ditto.
6937 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6938 (update_debug_registers_callback): Update, "entry" parameter is a
6939 struct thread_info * now. Fetch pid from thread.
6940 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6941 Pass &all_threads to find_inferior, not &all_lwps.
6942 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6943 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6944 Pass &all_threads to find_inferior, not &all_lwps.
6945 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6946 (i386_dr_low_get_status): Ditto.
6947 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6948 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6949 (x86_linux_read_description): Ditto.
6950 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6951
6952 2014-02-20 Doug Evans <dje@google.com>
6953
6954 * inferiors.c (get_first_inferior): Fix buglet.
6955
6956 2014-02-19 Doug Evans <dje@google.com>
6957
6958 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6959 * inferiors.c (add_thread): Change result type to struct thread_info *.
6960 All callers updated.
6961 (add_lwp): Call add_thread here instead of in callers.
6962 All callers updated.
6963 * linux-low.h (get_lwp_thread): Rewrite.
6964 (struct lwp_info): New member "thread".
6965
6966 2014-02-19 Doug Evans <dje@google.com>
6967
6968 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6969 All callers updated.
6970
6971 2014-02-19 Doug Evans <dje@google.com>
6972
6973 * inferiors.c (add_thread): Fix whitespace.
6974
6975 2014-02-19 Doug Evans <dje@google.com>
6976
6977 * dll.c (clear_dlls): Replace accessing list implemention details
6978 with API function.
6979 * gdbthread.h (get_first_thread): Declare.
6980 * inferiors.c (for_each_inferior_with_data): New function.
6981 (get_first_thread): New function.
6982 (find_thread_ptid): Simplify.
6983 (get_first_inferior): New function.
6984 (clear_list): Delete.
6985 (one_inferior_p): New function.
6986 (clear_inferior_list): New function.
6987 (clear_inferiors): Update.
6988 * inferiors.h (for_each_inferior_with_data): Declare.
6989 (clear_inferior_list): Declare.
6990 (one_inferior_p): Declare.
6991 (get_first_inferior): Declare.
6992 * linux-low.c (linux_wait_for_event): Replace accessing list
6993 implemention details with API function.
6994 * server.c (target_running): Ditto.
6995 (accumulate_file_name_length): New function.
6996 (emit_dll_description): New function.
6997 (handle_qxfer_libraries): Replace accessing list implemention
6998 details with API function.
6999 (handle_qxfer_threads_worker): New function.
7000 (handle_qxfer_threads_proper): Replace accessing list implemention
7001 details with API function.
7002 (handle_query): Ditto.
7003 (visit_actioned_threads_callback_ftype): New typedef.
7004 (visit_actioned_threads_data): New struct.
7005 (visit_actioned_threads): Rewrite to be find_inferior callback.
7006 (resume): Call find_inferior.
7007 (handle_status): Replace accessing list implemention
7008 details with API function.
7009 (process_serial_event): Replace accessing list implemention details
7010 with API function.
7011 * target.c (set_desired_inferior): Replace accessing list implemention
7012 details with API function.
7013 * tracepoint.c (same_process_p): New function.
7014 (gdb_agent_about_to_close): Replace accessing list implemention
7015 details with API function.
7016 * win32-low.c (child_delete_thread): Replace accessing list
7017 implemention details with API function.
7018 (match_dll_by_basename): New function.
7019 (dll_is_loaded_by_basename): New function.
7020 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7021 details call to dll_is_loaded_by_basename.
7022
7023 2014-02-19 Doug Evans <dje@google.com>
7024
7025 * dll.h (struct dll_info): Add comment.
7026 * gdbthread.h (struct thread_info): Add comment.
7027 (current_ptid): Simplify.
7028 * inferiors.c (add_process): Update.
7029 (remove_process): Update.
7030 * inferiors.h (struct process_info): Rename member "head" to "entry".
7031 * linux-low.c (delete_lwp): Update.
7032 (add_lwp): Update.
7033 (last_thread_of_process_p): Update.
7034 (kill_one_lwp_callback, linux_kill): Update.
7035 (status_pending_p_callback): Update.
7036 (wait_for_sigstop): Update. Simplify read of ptid.
7037 (start_step_over): Update.
7038 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7039 (get_lwp_thread): Update.
7040 (struct lwp_info): Rename member "head" to "entry".
7041 * regcache.h (inferior_list_entry): Delete.
7042 * server.c (kill_inferior_callback): Update.
7043 (detach_or_kill_inferior_callback): Update.
7044 (print_started_pid): Update.
7045 (print_attached_pid): Update.
7046 (process_serial_event): Simplify read of ptid.
7047 * thread-db.c (thread_db_create_event): Update.
7048 (thread_db_get_tls_address): Update.
7049 * win32-low.c (current_inferior_ptid): Simplify.
7050
7051 2014-02-19 Tom Tromey <tromey@redhat.com>
7052
7053 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7054 argument.
7055 (target_supports_btrace): Update.
7056
7057 2014-02-14 Yao Qi <yao@codesourcery.com>
7058
7059 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7060 (rsp-low-ipa.o): New target.
7061
7062 2014-02-12 Tom Tromey <tromey@redhat.com>
7063
7064 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7065 convert_ascii_to_int.
7066 * regcache.c (registers_to_string): Likewise.
7067 * remote-utils.c (decode_M_packet): Likewise.
7068 * server.c (process_serial_event): Likewise.
7069
7070 2014-02-12 Tom Tromey <tromey@redhat.com>
7071
7072 * server.c (handle_query, handle_v_run): Use hex2bin, not
7073 unhexify.
7074 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7075
7076 2014-02-12 Tom Tromey <tromey@redhat.com>
7077
7078 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7079 convert_int_to_ascii.
7080 * regcache.c (registers_to_string, collect_register_as_string):
7081 Likewise.
7082 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7083 Likewise.
7084 * server.c (process_serial_event): Likewise.
7085 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7086 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7087
7088 2014-02-12 Tom Tromey <tromey@redhat.com>
7089
7090 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7091 bin2hex, not hexify.
7092 * tracepoint.c (cmd_qtstatus): Likewise.
7093
7094 2014-02-12 Tom Tromey <tromey@redhat.com>
7095
7096 * remote-utils.c (monitor_output): Pass explicit length to
7097 hexify.
7098
7099 2014-02-12 Tom Tromey <tromey@redhat.com>
7100
7101 * tracepoint.c: Include rsp-low.h.
7102 * server.c: Include rsp-low.h.
7103 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7104 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7105 declare.
7106 * remote-utils.c: Include rsp-low.h.
7107 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7108 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7109 (convert_int_to_ascii, convert_ascii_to_int): Move to
7110 common/rsp-low.c.
7111 * regcache.c: Include rsp-low.h.
7112 * ax.c: Include rsp-low.h.
7113 * Makefile.in (SFILES): Add common/rsp-low.c.
7114 (OBS): Add rsp-low.o.
7115 (rsp-low.o): New target.
7116
7117 2014-02-12 Tom Tromey <tromey@redhat.com>
7118
7119 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7120 Include print-utils.h.
7121 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7122 (plongest, thirty_two, phex_nz): Remove.
7123 * Makefile.in (SFILES): Add common/print-utils.c.
7124 (OBS): Add print-utils.o.
7125 (print-utils-ipa.o): New target.
7126 (print-utils.o): New target.
7127 (IPA_OBJS): Add print-utils-ipa.o.
7128
7129 2014-02-06 Tom Tromey <tromey@redhat.com>
7130
7131 * Makefile.in (SFILES): Fix indentation.
7132
7133 2014-02-05 Doug Evans <dje@google.com>
7134
7135 * linux-low.c (linux_wait_for_event): Improve comment.
7136 (linux_wait_1): Keep current_inferior in sync with event_child.
7137
7138 2014-01-22 Doug Evans <dje@google.com>
7139
7140 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7141
7142 2014-01-22 Doug Evans <dje@google.com>
7143
7144 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7145 * configure: Regenerate.
7146 * config.in: Regenerate.
7147 * Makefile.in (SFILES): Add debug.c.
7148 (OBS): Add debug.o.
7149 * debug.c: New file.
7150 * debug.h: New file.
7151 * linux-aarch64-low.c (*): Update all debugging printfs to use
7152 debug_printf instead of fprintf.
7153 * linux-arm-low.c (*): Ditto.
7154 * linux-cris-low.c (*): Ditto.
7155 * linux-crisv32-low.c (*): Ditto.
7156 * linux-m32r-low.c (*): Ditto.
7157 * linux-sparc-low.c (*): Ditto.
7158 * linux-x86.c (*): Ditto.
7159 * linux-low.c (*): Ditto.
7160 (linux_wait_1): Add calls to debug_enter, debug_exit.
7161 (linux_wait): Remove redundant debugging printf.
7162 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7163 (linux_resume, unstop_all_lwps): Ditto.
7164 * mem-break.c (*): Update all debugging printfs to use
7165 debug_printf instead of fprintf.
7166 * remote-utils.c (*): Ditto.
7167 * thread-db.c (*): Ditto.
7168 * server.c #include <ctype.h>, "gdb_vecs.h".
7169 (debug_threads): Moved to debug.c.
7170 (*): Update all debugging printfs to use debug_printf instead of
7171 fprintf.
7172 (start_inferior): Replace call to fflush with call to debug_flush.
7173 (monitor_show_help): Mention set debug-format.
7174 (parse_debug_format_options): New function.
7175 (handle_monitor_command): Handle "monitor set debug-format".
7176 (gdbserver_usage): Mention --debug-format.
7177 (main): Parse --debug-format.
7178 * server.h (debug_threads): Declaration moved to debug.h.
7179 #include "debug.h".
7180 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7181 trace_debug_1 that uses debug_printf.
7182 (tracepoint_look_up_symbols): Update all debugging printfs to use
7183 debug_printf instead of fprintf.
7184
7185 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7186
7187 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7188 sys/ptrace.h.
7189
7190 2014-01-17 Pedro Alves <palves@redhat.com>
7191
7192 PR build/16445
7193 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7194 defined after including gdb_proc_service.h.
7195
7196 2014-01-16 Doug Evans <dje@google.com>
7197
7198 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7199 (match_dll): Use it.
7200
7201 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7202
7203 * target.h (target_ops) <read_btrace>: Change parameters and
7204 return type to allow error reporting.
7205 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7206 trace reading errors on.
7207 * linux-low.c (linux_low_read_btrace): Pass trace reading
7208 errors on.
7209 (linux_low_disable_btrace): New.
7210
7211 2014-01-15 Doug Evans <dje@google.com>
7212
7213 * inferiors.c (thread_id_to_gdb_id): Delete.
7214 * inferiors.h (thread_id_to_gdb_id): Delete.
7215
7216 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7217
7218 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7219 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7220 versions.
7221
7222 2014-01-08 Pedro Alves <palves@redhat.com>
7223
7224 * server.c (handle_status): Don't discard previous queued stop
7225 replies or thread's pending status here.
7226 (main) <disconnection>: Do it here instead.
7227
7228 2014-01-08 Pedro Alves <palves@redhat.com>
7229
7230 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7231 * server.c (visit_actioned_threads, handle_pending_status): New
7232 function.
7233 (handle_v_cont): Factor out parts to ...
7234 (resume): ... this new function. If in all-stop, and a thread
7235 being resumed has a pending status, report it without actually
7236 resuming.
7237 (myresume): Adjust to use the new 'resume' function.
7238 (clear_pending_status_callback, set_pending_status_callback)
7239 (find_status_pending_thread_callback): New functions.
7240 (handle_status): Handle the case of multiple threads having
7241 interesting statuses to report. Report threads' real last signal
7242 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7243 with an interesting thread to report the status for, instead of
7244 always reporting the status of the first thread.
7245
7246 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7247
7248 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7249 * gdbreplay.c (gdbreplay_version): Likewise.
7250
7251 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7252
7253 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7254 iov.iov_len with the real length in use.
7255
7256 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7257
7258 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7259 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7260 for all targets that use win32-low.c.
7261 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7262 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7263
7264 2013-12-13 Pedro Alves <palves@redhat.com>
7265
7266 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7267 if equal to TARGET_WAITKIND_LOADED.
7268 * win32-low.c (cached_status): New static global.
7269 (win32_wait): Add declaration.
7270 (do_initial_child_stuff): Flush all initial pending debug events
7271 up to the initial breakpoint.
7272 (win32_wait): If CACHED_STATUS was set, return that instead
7273 of doing a real wait. Remove the code resuming the execution
7274 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7275 during the initial phase. Also remove the code changing
7276 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7277 TARGET_WAITKIND_STOPPED.
7278
7279 2013-12-11 Yao Qi <yao@codesourcery.com>
7280
7281 * notif.c (handle_notif_ack): Return 0 if no notification
7282 matches.
7283
7284 2013-11-20 Doug Evans <dje@google.com>
7285
7286 * linux-low.c (linux_set_resume_request): Fix comment.
7287
7288 2013-11-20 Doug Evans <dje@google.com>
7289
7290 * linux-low.c (resume_status_pending_p): Tweak comment.
7291
7292 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7293
7294 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7295 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7296 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7297 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7298 (srv_amd64_regobj): Add amd64-mpx.o.
7299 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7300 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7301 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7302 * i387-fp.c (num_pl_bnd_register) Added constant.
7303 (num_pl_bnd_cfg_registers) Added constant.
7304 (struct i387_xsave) Added reserved area and MPX fields.
7305 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7306 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7307 function.
7308 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7309 (init_registers_amd64_mpx_linux): Declare new function.
7310 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7311 (x86_64_regmap): Add MPX registers.
7312 (x86_linux_read_description): Add MPX case.
7313 (initialize_low_arch): Initialize MPX targets.
7314
7315 2013-11-18 Tom Tromey <tromey@redhat.com>
7316
7317 * configure: Rebuild.
7318 * configure.ac: Don't check for stdlib.h.
7319 * gdbreplay.c: Unconditionally include stdlib.h.
7320
7321 2013-11-18 Tom Tromey <tromey@redhat.com>
7322
7323 * config.in: Rebuild.
7324 * configure: Rebuild.
7325 * configure.ac: Don't use AC_HEADER_DIRENT.
7326
7327 2013-11-18 Tom Tromey <tromey@redhat.com>
7328
7329 * server.h: Don't check HAVE_STRING_H.
7330 * gdbreplay.c: Don't check HAVE_STRING_H.
7331 * configure: Rebuild.
7332
7333 2013-11-18 Tom Tromey <tromey@redhat.com>
7334
7335 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7336 LIBGNU.
7337
7338 2013-11-08 Tom Tromey <tromey@redhat.com>
7339
7340 * configure, config.in: Rebuild.
7341 * configure.ac: Remove unused configury.
7342
7343 2013-11-08 Tom Tromey <tromey@redhat.com>
7344
7345 * acinclude.m4: Include common.m4, codeset.m4.
7346 * configure, config.in: Rebuild.
7347 * configure.ac: Use GDB_AC_COMMON.
7348
7349 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7350
7351 * linux-s390-low.c (HWCAP_S390_TE): New define.
7352 (s390_arch_setup): Consider the TE field in the HWCAP for
7353 determining 'have_regset_tdb'.
7354
7355 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7356
7357 PR gdb/16014
7358 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7359 call to sizeof.
7360
7361 2013-10-02 Pedro Alves <palves@redhat.com>
7362
7363 * server.c (process_serial_event): Don't output "GDBserver
7364 exiting" if GDB is connected through stdio.
7365 * target.c (mywait): Likewise, be silent if GDB is connected
7366 through stdio.
7367
7368 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7369
7370 * lynx-low.c (lynx_add_threads_after_attach): New function.
7371 (lynx_attach): Remove call to add_thread. Add call to
7372 lynx_add_threads_after_attach instead.
7373
7374 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7375
7376 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7377 * config.in, configure: Regenerated.
7378
7379 2013-09-18 Yao Qi <yao@codesourcery.com>
7380
7381 PR server/15959
7382 * server.c (start_inferior): Clear 'resume_info'.
7383
7384 2013-09-16 Jiong Wang <jiwang@tilera.com>
7385
7386 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7387 for each register.
7388
7389 2013-09-16 Jiong Wang <jiwang@tilera.com>
7390
7391 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7392 linux-tile-low.o to srv_tgtobj.
7393
7394 2013-09-16 Will Newton <will.newton@linaro.org>
7395
7396 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7397 out regs.
7398
7399 2013-09-06 Pedro Alves <palves@redhat.com>
7400
7401 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7402 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7403 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7404 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7405 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7406 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7407
7408 2013-09-06 Pedro Alves <palves@redhat.com>
7409
7410 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7411 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7412
7413 2013-09-06 Pedro Alves <palves@redhat.com>
7414
7415 * linux-amd64-ipa.c: Include tracepoint.h.
7416 * linux-i386-ipa.c: Include tracepoint.h.
7417
7418 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7419
7420 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7421 (ps_get_thread_area): New function.
7422
7423 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7424
7425 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7426 (initialize_low_arch): Call init_registers_crisv32 rather than
7427 init_register_crisv32.
7428
7429 2013-09-05 Pedro Alves <palves@redhat.com>
7430
7431 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7432 to ...
7433 * hostio.h: ... this new file.
7434 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7435 win32-low.c: Include hostio.h.
7436
7437 2013-09-05 Pedro Alves <palves@redhat.com>
7438
7439 * server.h (gdb_client_data, handler_func, callback_handler_func)
7440 (delete_file_handler, add_file_handler, append_callback_event)
7441 (delete_callback_event, start_event_loop, initialize_event_loop):
7442 Move to event-loop.h and include it.
7443 * event-loop.h: New file.
7444
7445 2013-09-05 Pedro Alves <palves@redhat.com>
7446
7447 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7448 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7449 (loaded_dll, unloaded_dll): Move to ...
7450 * dll.h: ... this new file.
7451 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7452
7453 2013-09-05 Pedro Alves <palves@redhat.com>
7454
7455 * server.h (current_process, get_thread_process, all_processes)
7456 (add_inferior_to_list, for_each_inferior, current_inferior)
7457 (remove_inferior, add_process, remove_process, find_process_pid)
7458 (have_started_inferiors_p, have_attached_inferiors_p)
7459 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7460 (clear_inferiors, find_inferior, find_inferior_id)
7461 (inferior_target_data, set_inferior_target_data)
7462 (inferior_regcache_data, set_inferior_regcache_data): Move to
7463 inferiors.h, and include it.
7464 * inferiors.h: New file.
7465
7466 2013-09-05 Pedro Alves <palves@redhat.com>
7467
7468 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7469 Move ...
7470 * ax.h: ... here.
7471
7472 2013-09-05 Pedro Alves <palves@redhat.com>
7473
7474 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7475 tracepoint.h.
7476 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7477 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7478 (handle_tracepoint_general_set, handle_tracepoint_query)
7479 (tracepoint_finished_step, tracepoint_was_hit)
7480 (release_while_stepping_state_list, current_traceframe)
7481 (in_readonly_region, traceframe_read_mem)
7482 (fetch_traceframe_registers, traceframe_read_sdata)
7483 (traceframe_read_info, struct fast_tpoint_collect_status)
7484 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7485 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7486 (supply_fast_tracepoint_registers)
7487 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7488 (ipa_tdesc, claim_trampoline_space)
7489 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7490 (agent_mem_read, agent_get_trace_state_variable_value)
7491 (agent_set_trace_state_variable_value, agent_tsv_read)
7492 (agent_mem_read_string, get_raw_reg_func_addr)
7493 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7494 * tracepoint.h: ... this new file.
7495
7496 2013-09-05 Pedro Alves <palves@redhat.com>
7497
7498 * server.h (perror_with_name, error, fatal, warning, paddress)
7499 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7500 include it.
7501 * utils.h: New file.
7502
7503 2013-09-05 Pedro Alves <palves@redhat.com>
7504
7505 * server.h (remote_debug, noack_mode, transport_is_reliable)
7506 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7507 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7508 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7509 (write_enn, initialize_async_io, enable_async_io)
7510 (disable_async_io, check_remote_input_interrupt_request)
7511 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7512 (dead_thread_notify, prepare_resume_reply)
7513 (decode_address_to_semicolon, decode_address, decode_m_packet)
7514 (decode_M_packet, decode_X_packet, decode_xfer_write)
7515 (decode_search_memory_packet, unhexify, hexify)
7516 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7517 (look_up_one_symbol, relocate_instruction)
7518 (monitor_output): Move to remote-utils.h, and include it.
7519 * remote-utils.h: New file.
7520
7521 2013-09-05 Pedro Alves <palves@redhat.com>
7522
7523 * server.h (_): Delete.
7524
7525 2013-09-02 Pedro Alves <palves@redhat.com>
7526
7527 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7528 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7529 allocated.
7530 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7531
7532 2013-09-02 Pierre Muller <muller@sourceware.org>
7533
7534 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7535 or WriteProcessMemory complete successfully and handle
7536 ERROR_PARTIAL_COPY error.
7537
7538 2013-09-02 Pedro Alves <palves@redhat.com>
7539
7540 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7541 error instead of EIO.
7542
7543 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7544
7545 PR server/15604
7546 * linux-low.c: Include filestuff.h.
7547 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7548 * lynx-low.c: Include filestuff.h.
7549 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7550 * server.c: Include filestuff.h.
7551 (main): Call notice_open_fds.
7552 * spu-low.c: Include filestuff.h.
7553 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7554
7555 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7556
7557 * Makefile.in: Explain why ../target and ../nat are not
7558 listed as include file search paths.
7559 (linux-waitpid.o): New object file rule.
7560 * configure.srv (srv_native_linux_obj): New variable.
7561 Replace all occurrences of linux native object files with
7562 $srv_native_linux_obj.
7563 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7564 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7565 (linux_enable_event_reporting): Remove declaration.
7566 (my_waitpid): Moved to common/linux-waitpid.c.
7567 (linux_wait_for_event): Pass ptid when calling
7568 linux_enable_event_reporting.
7569 (linux_supports_tracefork_flag): Remove.
7570 (linux_enable_event_reporting): Likewise.
7571 (linux_tracefork_grandchild): Remove.
7572 (STACK_SIZE): Moved to common/linux-ptrace.c.
7573 (linux_tracefork_child): Remove.
7574 (linux_test_for_tracefork): Remove.
7575 (linux_look_up_symbols): Call linux_supports_traceclone.
7576 (initialize_low): Remove call to linux_test_for_tracefork.
7577 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7578 common/linux-ptrace.h.
7579 (PTRACE_TYPE_ARG4): Likewise.
7580 Include linux-ptrace.h.
7581
7582 2013-08-21 Pedro Alves <palves@redhat.com>
7583
7584 * config.in: Renegerate.
7585
7586 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7587
7588 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7589 (SFILES): Remove $(srcdir)/common/target-common.c and
7590 add $(srcdir)/target/waitstatus.c.
7591 (OBS): Remove target-common.o and add waitstatus.o.
7592 (server_h): Remove $(srcdir)/../common/target-common.h and
7593 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7594 and $(srcdir)/../target/waitstatus.h.
7595 (target-common.o): Remove.
7596 (waitstatus.o): New target object file.
7597 * target.h: Do not include target-common.h and
7598 include target/resume.h, target/wait.h and
7599 target/waitstatus.h.
7600
7601 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7602
7603 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7604 to PTRACE_TYPE_ARG3.
7605 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7606 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7607 PTRACE_TYPE_ARG4.
7608 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7609 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7610
7611 2013-07-27 Jie Zhang <jie@codesourcery.com>
7612 Daniel Jacobowitz <dan@codesourcery.com>
7613 Yao Qi <yao@codesourcery.com>
7614
7615 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7616 (mips-linux-watch.o): New rule.
7617 (mips_linux_watch_h): New variable.
7618 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7619 srv_tgtobj.
7620 * linux-mips-low.c: Include mips-linux-watch.h.
7621 (struct arch_process_info, struct arch_lwp_info): New.
7622 (update_watch_registers_callback): New function.
7623 (mips_linux_new_process, mips_linux_new_thread) New functions.
7624 (mips_linux_prepare_to_resume, mips_insert_point): New
7625 functions.
7626 (mips_remove_point, mips_stopped_by_watchpoint): New
7627 functions.
7628 (rsp_bp_type_to_target_hw_bp_type): New function.
7629 (mips_stopped_data_address): New function.
7630 (the_low_target): Add watchpoint support functions.
7631
7632 2013-07-27 Yao Qi <yao@codesourcery.com>
7633
7634 * i386-low.c: Include break-common.h.
7635 (enum target_hw_bp_type): Remove.
7636
7637 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7638
7639 * Makefile.in (SFILES): /common/target-common.c.
7640 (OBS): Add target-common.o.
7641 (server_h): Add $(srcdir)/../common/target-common.h.
7642 (target-common.o): New target.
7643 * server.c (queue_stop_reply_callback): Free
7644 status string after use.
7645 * target.c (target_waitstatus_to_string): Remove.
7646 * target.h: Include target-common.h.
7647 (resume_kind): Likewise.
7648 (target_waitkind): Likewise.
7649 (target_waitstatus): Likewise.
7650 (TARGET_WNOHANG): Likewise.
7651
7652 2013-07-04 Yao Qi <yao@codesourcery.com>
7653
7654 * Makefile.in (host_alias): Use @host_noncanonical@.
7655 (target_alias): Use @target_noncanonical@.
7656 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7657 ACX_NONCANONICAL_HOST.
7658 * configure: Regenerated.
7659
7660 Revert:
7661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7662
7663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7664 * configure: Rebuild.
7665 * Makefile.in (version_host, version_target): Get from configure.
7666 (version.c): Use $(version_host) and $(version_target).
7667
7668 2013-07-03 Pedro Alves <palves@redhat.com>
7669
7670 * Makefile.in (config.status): Depend on development.sh.
7671 * acinclude.m4: Include libmcheck.m4.
7672 * configure: Regenerate.
7673
7674 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7675
7676 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7677 attribute inside the parentheses.
7678 (winapi_DebugSetProcessKillOnExit): Ditto.
7679 (winapi_DebugBreakProcess): Ditto.
7680 (winapi_GenerateConsoleCtrlEvent): Ditto.
7681
7682 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7683
7684 * notif.h (notif_event): Add a dummy member to avoid compiler
7685 errors.
7686
7687 2013-07-01 Pedro Alves <palves@redhat.com>
7688
7689 * hostio.c (HOSTIO_PATH_MAX): Define.
7690 (require_filename, handle_open, handle_unlink, handle_readlink):
7691 Use it.
7692
7693 2013-07-01 Pedro Alves <palves@redhat.com>
7694
7695 * server.h: Include "pathmax.h".
7696 * linux-low.c: Don't include sys/param.h.
7697 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7698 MAXPATHLEN.
7699 * win32-low.c: Don't include sys/param.h.
7700 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7701
7702 2013-07-01 Pedro Alves <palves@redhat.com>
7703
7704 * event-loop.c: Don't check HAVE_UNISTD_H before including
7705 <unistd.h>.
7706 * gdbreplay.c: Likewise.
7707 * remote-utils.c: Likewise.
7708 * server.c: Likewise.
7709 * configure.ac: Don't check for unistd.h.
7710 * configure: Regenerate.
7711
7712 2013-06-28 Tom Tromey <tromey@redhat.com>
7713
7714 * Makefile.in (version.c): Use version.in, not
7715 common/version.in.
7716
7717 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7718
7719 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7720 * configure: Rebuild.
7721 * Makefile.in (version_host, version_target): Get from configure.
7722 (version.c): Use $(version_host) and $(version_target).
7723
7724 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7725
7726 Fix trace-status to output user name without trailing colon.
7727 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7728
7729 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7730
7731 Fix trace-status to output proper start-time and stop-time.
7732 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7733 output start time and stop time in hex as gdb expects.
7734
7735 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7736
7737 * tracepoint.c (build_traceframe_info_xml): Output trace state
7738 variables present in the trace buffer.
7739
7740 2013-06-24 Tom Tromey <tromey@redhat.com>
7741
7742 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7743 create-version.sh.
7744 (version.o): Remove.
7745 * gdbreplay.c: Include version.h.
7746 (version, host_name): Don't declare.
7747 * server.h: Include version.h.
7748 (version, host_name): Don't declare.
7749
7750 2013-06-12 Pedro Alves <palves@redhat.com>
7751
7752 * linux-x86-low.c (linux_is_elf64): Delete global.
7753 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7754 with local linux_pid_exe_is_elf_64_file use.
7755
7756 2013-06-11 Pedro Alves <palves@redhat.com>
7757
7758 * linux-low.c (regset_disabled, disable_regset): New functions.
7759 (regsets_fetch_inferior_registers)
7760 (regsets_store_inferior_registers): Use them.
7761 (initialize_regsets_info); Don't allocate the disabled_regsets
7762 array here.
7763 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7764 comment.
7765
7766 2013-06-11 Pedro Alves <palves@redhat.com>
7767
7768 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7769 xmalloc.
7770
7771 2013-06-11 Pedro Alves <palves@redhat.com>
7772
7773 * linux-x86-low.c (initialize_low_arch): Call
7774 init_registers_x32_avx_linux.
7775
7776 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7777
7778 Fix compatibility with Android Bionic.
7779 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7780 it is not empty.
7781
7782 2013-06-07 Pedro Alves <palves@redhat.com>
7783
7784 PR server/14823
7785 * Makefile.in (OBS): Add tdesc.o.
7786 (IPA_OBJS): Add tdesc-ipa.o.
7787 (tdesc-ipa.o): New rule.
7788 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7789 interface.
7790 * linux-low.c (new_inferior): Delete.
7791 (disabled_regsets, num_regsets): Delete.
7792 (linux_add_process): Adjust to set the new per-process
7793 new_inferior flag.
7794 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7795 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7796 was a stop. When calling arch_setup, switch the current inferior
7797 to the thread that got an event.
7798 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7799 (regsets_fetch_inferior_registers)
7800 (regsets_store_inferior_registers): New regsets_info parameter.
7801 Adjust to use it.
7802 (linux_register_in_regsets): New regs_info parameter. Adjust to
7803 use it.
7804 (register_addr, fetch_register, store_register): New usrregs_info
7805 parameter. Adjust to use it.
7806 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7807 parameter regs_info. Adjust to use it.
7808 (linux_fetch_registers): Get the current inferior's regs_info, and
7809 adjust to use it.
7810 (linux_store_registers): Ditto.
7811 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7812 (initialize_low): Don't initialize the target_regsets here. Call
7813 initialize_low_arch.
7814 * linux-low.h (target_regsets): Delete declaration.
7815 (struct regsets_info): New.
7816 (struct usrregs_info): New.
7817 (struct regs_info): New.
7818 (struct process_info_private) <new_inferior>: New field.
7819 (struct linux_target_ops): Delete the num_regs, regmap, and
7820 regset_bitmap fields. New field regs_info.
7821 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7822 * i387-fp.c (num_xmm_registers): Delete.
7823 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7824 calls to new interface.
7825 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7826 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7827 Infer the number of xmm registers from the regcache's target
7828 description.
7829 * i387-fp.h (num_xmm_registers): Delete.
7830 * inferiors.c (add_thread): Don't install the thread's regcache
7831 here.
7832 * proc-service.c (gregset_info): Fetch the current inferior's
7833 regs_info. Adjust to use it.
7834 * regcache.c: Include tdesc.h.
7835 (register_bytes, reg_defs, num_registers)
7836 (gdbserver_expedite_regs): Delete.
7837 (get_thread_regcache): If the thread doesn't have a regcache yet,
7838 create one, instead of aborting gdbserver.
7839 (regcache_invalidate_one): Rename to ...
7840 (regcache_invalidate_thread): ... this.
7841 (regcache_invalidate_one): New.
7842 (regcache_invalidate): Only invalidate registers of the current
7843 process.
7844 (init_register_cache): Add target_desc parameter, and use it.
7845 (new_register_cache): Ditto. Assert the target description has a
7846 non zero registers_size.
7847 (regcache_cpy): Add assertions. Adjust.
7848 (realloc_register_cache, set_register_cache): Delete.
7849 (registers_to_string, registers_from_string): Adjust.
7850 (find_register_by_name, find_regno, find_register_by_number)
7851 (register_cache_size): Add target_desc parameter, and use it.
7852 (free_register_cache_thread, free_register_cache_thread_one)
7853 (regcache_release, register_cache_size): New.
7854 (register_size): Add target_desc parameter, and use it.
7855 (register_data, supply_register, supply_register_zeroed)
7856 (supply_regblock, supply_register_by_name, collect_register)
7857 (collect_register_as_string, collect_register_by_name): Adjust.
7858 * regcache.h (struct target_desc): Forward declare.
7859 (struct regcache) <tdesc>: New field.
7860 (init_register_cache, new_register_cache): Add target_desc
7861 parameter.
7862 (regcache_invalidate_thread): Declare.
7863 (regcache_invalidate_one): Delete declaration.
7864 (regcache_release): Declare.
7865 (find_register_by_number, register_cache_size, register_size)
7866 (find_regno): Add target_desc parameter.
7867 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7868 declarations.
7869 * remote-utils.c: Include tdesc.h.
7870 (outreg, prepare_resume_reply): Adjust.
7871 * server.c: Include tdesc.h.
7872 (gdbserver_xmltarget): Delete declaration.
7873 (get_features_xml, process_serial_event): Adjust.
7874 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7875 declare.
7876 (struct process_info) <tdesc>: New field.
7877 (ipa_tdesc): Declare.
7878 * tdesc.c: New file.
7879 * tdesc.h: New file.
7880 * tracepoint.c: Include tdesc.h.
7881 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7882 (get_context_regcache): Adjust to pass ipa_tdesc down.
7883 (do_action_at_tracepoint): Adjust to get the register cache size
7884 from the context regcache's description.
7885 (traceframe_walk_blocks): Adjust to get the register cache size
7886 from the current trace frame's description.
7887 (traceframe_get_pc): Adjust to get current trace frame's
7888 description and pass it down.
7889 (gdb_collect): Adjust to get the register cache size from the
7890 IPA's description.
7891 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7892 (gdbserver_xmltarget): Delete.
7893 (initialize_low_tracepoint): Set the ipa's target description.
7894 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7895 (initialize_low_tracepoint): Set the ipa's target description.
7896 * linux-x86-low.c: Include tdesc.h.
7897 [__x86_64__] (is_64bit_tdesc): New.
7898 (ps_get_thread_area, x86_get_thread_area): Use it.
7899 (i386_cannot_store_register): Rename to ...
7900 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7901 (i386_cannot_fetch_register): Rename to ...
7902 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7903 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7904 to new interface.
7905 (target_regsets): Rename to ...
7906 (x86_regsets): ... this.
7907 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7908 interface.
7909 (x86_siginfo_fixup): Use is_64bit_tdesc.
7910 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7911 (tdesc_x32_avx_linux, tdesc_x32_linux)
7912 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7913 Declare.
7914 (x86_linux_update_xmltarget): Delete.
7915 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7916 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7917 (AMD64_LINUX_USER64_CS): New.
7918 (x86_linux_read_description): New, based on
7919 x86_linux_update_xmltarget.
7920 (same_process_callback): New.
7921 (x86_arch_setup_process_callback): New.
7922 (x86_linux_update_xmltarget): New.
7923 (x86_regsets_info): New.
7924 (amd64_linux_regs_info): New.
7925 (i386_linux_usrregs_info): New.
7926 (i386_linux_regs_info): New.
7927 (x86_linux_regs_info): New.
7928 (x86_arch_setup): Reimplement.
7929 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7930 (x86_emit_ops): Ditto.
7931 (the_low_target): Adjust. Install x86_linux_regs_info,
7932 x86_cannot_fetch_register, and x86_cannot_store_register.
7933 (initialize_low_arch): New.
7934 * linux-ia64-low.c (tdesc_ia64): Declare.
7935 (ia64_fetch_register): Adjust.
7936 (ia64_usrregs_info, regs_info): New globals.
7937 (ia64_regs_info): New function.
7938 (the_low_target): Adjust.
7939 (initialize_low_arch): New function.
7940 * linux-sparc-low.c (tdesc_sparc64): Declare.
7941 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7942 Adjust.
7943 (sparc_arch_setup): New function.
7944 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7945 (the_low_target): Adjust.
7946 (initialize_low_arch): New function.
7947 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7948 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7949 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7950 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7951 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7952 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7953 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7954 (tdesc_powerpc_isa205_vsx64l): Declare.
7955 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7956 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7957 (ppc_set_pc, ppc_get_hwcap): Adjust.
7958 (ppc_usrregs_info): Forward declare.
7959 (!__powerpc64__) ppc_regmap_adjusted: New global.
7960 (ppc_arch_setup): Adjust to the current process'es target
7961 description.
7962 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7963 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7964 (ppc_store_evrregset): Adjust.
7965 (target_regsets): Rename to ...
7966 (ppc_regsets): ... this, and make static.
7967 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7968 (ppc_regs_info): New function.
7969 (the_low_target): Adjust.
7970 (initialize_low_arch): New function.
7971 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7972 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7973 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7974 (tdesc_s390x_linux64v2): Declare.
7975 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7976 (s390_fill_gregset, s390_store_last_break): Adjust.
7977 (target_regsets): Rename to ...
7978 (s390_regsets): ... this, and make static.
7979 (s390_get_pc, s390_set_pc): Adjust.
7980 (s390_get_hwcap): New target_desc parameter, and use it.
7981 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7982 (s390_arch_setup): Adjust to set the current process'es target
7983 description. Don't adjust the regmap.
7984 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7985 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7986 (regs_info_3264): New globals.
7987 (s390_regs_info): New function.
7988 (the_low_target): Adjust.
7989 (initialize_low_arch): New function.
7990 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7991 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7992 [__mips64] (init_registers_mips_linux)
7993 (init_registers_mips_dsp_linux): Delete defines.
7994 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7995 (have_dsp): New global.
7996 (mips_read_description): New, based on mips_arch_setup.
7997 (mips_arch_setup): Reimplement.
7998 (get_usrregs_info): New function.
7999 (mips_cannot_fetch_register, mips_cannot_store_register)
8000 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8001 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8002 (target_regsets): Rename to ...
8003 (mips_regsets): ... this, and make static.
8004 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8005 (dsp_regs_info, regs_info): New globals.
8006 (mips_regs_info): New function.
8007 (the_low_target): Adjust.
8008 (initialize_low_arch): New function.
8009 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8010 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8011 Declare.
8012 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8013 (arm_read_description): New, with bits factored from
8014 arm_arch_setup.
8015 (arm_arch_setup): Reimplement.
8016 (target_regsets): Rename to ...
8017 (arm_regsets): ... this, and make static.
8018 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8019 (arm_regs_info): New function.
8020 (the_low_target): Adjust.
8021 (initialize_low_arch): New function.
8022 * linux-m68k-low.c (tdesc_m68k): Declare.
8023 (target_regsets): Rename to ...
8024 (m68k_regsets): ... this, and make static.
8025 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8026 (m68k_regs_info): New function.
8027 (m68k_arch_setup): New function.
8028 (the_low_target): Adjust.
8029 (initialize_low_arch): New function.
8030 * linux-sh-low.c (tdesc_sharch): Declare.
8031 (target_regsets): Rename to ...
8032 (sh_regsets): ... this, and make static.
8033 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8034 (sh_regs_info, sh_arch_setup): New functions.
8035 (the_low_target): Adjust.
8036 (initialize_low_arch): New function.
8037 * linux-bfin-low.c (tdesc_bfin): Declare.
8038 (bfin_arch_setup): New function.
8039 (bfin_usrregs_info, regs_info): New globals.
8040 (bfin_regs_info): New function.
8041 (the_low_target): Adjust.
8042 (initialize_low_arch): New function.
8043 * linux-cris-low.c (tdesc_cris): Declare.
8044 (cris_arch_setup): New function.
8045 (cris_usrregs_info, regs_info): New globals.
8046 (cris_regs_info): New function.
8047 (the_low_target): Adjust.
8048 (initialize_low_arch): New function.
8049 * linux-cris-low.c (tdesc_crisv32): Declare.
8050 (cris_arch_setup): New function.
8051 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8052 (cris_regs_info): New function.
8053 (the_low_target): Adjust.
8054 (initialize_low_arch): New function.
8055 * linux-m32r-low.c (tdesc_m32r): Declare.
8056 (m32r_arch_setup): New function.
8057 (m32r_usrregs_info, regs_info): New globals.
8058 (m32r_regs_info): Adjust.
8059 (initialize_low_arch): New function.
8060 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8061 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8062 (tic6x_usrregs_info): Forward declare.
8063 (tic6x_read_description): New function, based on ...
8064 (tic6x_arch_setup): ... this. Reimplement.
8065 (target_regsets): Rename to ...
8066 (tic6x_regsets): ... this, and make static.
8067 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8068 (tic6x_regs_info): New function.
8069 (the_low_target): Adjust.
8070 (initialize_low_arch): New function.
8071 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8072 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8073 (target_regsets): Rename to ...
8074 (xtensa_regsets): ... this, and make static.
8075 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8076 globals.
8077 (xtensa_arch_setup, xtensa_regs_info): New functions.
8078 (the_low_target): Adjust.
8079 (initialize_low_arch): New function.
8080 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8081 (nios2_arch_setup): Set the current process'es tdesc.
8082 (target_regsets): Rename to ...
8083 (nios2_regsets): ... this.
8084 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8085 (nios2_regs_info): New function.
8086 (the_low_target): Adjust.
8087 (initialize_low_arch): New function.
8088 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8089 (aarch64_arch_setup): Set the current process'es tdesc.
8090 (target_regsets): Rename to ...
8091 (aarch64_regsets): ... this.
8092 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8093 (aarch64_regs_info): New function.
8094 (the_low_target): Adjust.
8095 (initialize_low_arch): New function.
8096 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8097 globals.
8098 (target_regsets): Rename to ...
8099 (tile_regsets): ... this.
8100 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8101 (tile_regs_info): New function.
8102 (tile_arch_setup): Set the current process'es tdesc.
8103 (the_low_target): Adjust.
8104 (initialize_low_arch): New function.
8105 * spu-low.c (tdesc_spu): Declare.
8106 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8107 * win32-arm-low.c (tdesc_arm): Declare.
8108 (arm_arch_setup): New function.
8109 (the_low_target): Install arm_arch_setup instead of
8110 init_registers_arm.
8111 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8112 (init_windows_x86): Rename to ...
8113 (i386_arch_setup): ... this. Set `win32_tdesc'.
8114 (the_low_target): Adjust.
8115 * win32-low.c (win32_tdesc): New global.
8116 (child_add_thread): Don't create the thread cache here.
8117 (do_initial_child_stuff): Set the new process'es tdesc.
8118 * win32-low.h (struct target_desc): Forward declare.
8119 (win32_tdesc): Declare.
8120 * lynx-i386-low.c (tdesc_i386): Declare global.
8121 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8122 * lynx-low.c (lynx_tdesc): New global.
8123 (lynx_add_process): Set the new process'es tdesc.
8124 * lynx-low.h (struct target_desc): Forward declare.
8125 (lynx_tdesc): Declare global.
8126 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8127 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8128 * nto-low.c (nto_tdesc): New global.
8129 (do_attach): Set the new process'es tdesc.
8130 * nto-low.h (struct target_desc): Forward declare.
8131 (nto_tdesc): Declare.
8132 * nto-x86-low.c (tdesc_i386): Declare.
8133 (nto_x86_arch_setup): Set `nto_tdesc'.
8134
8135 2013-06-04 Gary Benson <gbenson@redhat.com>
8136
8137 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8138 to qSupported response when appropriate.
8139 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8140 with nonzero-length annex.
8141 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8142 arguments supplied in annex.
8143
8144 2013-05-31 Doug Evans <dje@google.com>
8145
8146 PR server/15594
8147 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8148 64 bits in 64-cross-32 environment.
8149
8150 2013-05-28 Pedro Alves <palves@redhat.com>
8151
8152 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8153 (aarch64-without-fpu.c): Delete rule.
8154 * configure.srv (aarch64*-*-linux*): Remove references to
8155 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8156 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8157 declaration.
8158
8159 2013-05-24 Pedro Alves <palves@redhat.com>
8160
8161 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8162 instead of strchr/decode_address. Error if the range isn't split
8163 with a ','. Don't assume there's be a ':' in the action.
8164
8165 2013-05-23 Yao Qi <yao@codesourcery.com>
8166 Pedro Alves <palves@redhat.com>
8167
8168 * linux-low.c (lwp_in_step_range): New function.
8169 (linux_wait_1): If the thread was range stepping and stopped
8170 outside the stepping range, report the stop to GDB. Otherwise,
8171 continue stepping. Add range stepping debug output.
8172 (linux_set_resume_request): Copy the step range from the resume
8173 request to the lwp.
8174 (linux_supports_range_stepping): New.
8175 (linux_target_ops) <supports_range_stepping>: Set to
8176 linux_supports_range_stepping.
8177 * linux-low.h (struct linux_target_ops)
8178 <supports_range_stepping>: New field.
8179 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8180 * linux-x86-low.c (x86_supports_range_stepping): New.
8181 (the_low_target) <supports_range_stepping>: Set to
8182 x86_supports_range_stepping.
8183 * server.c (handle_v_cont): Handle 'r' action.
8184 (handle_v_requests): Append ";r" if the target supports range
8185 stepping.
8186 * target.h (struct thread_resume) <step_range_start,
8187 step_range_end>: New fields.
8188 (struct target_ops) <supports_range_stepping>:
8189 New field.
8190 (target_supports_range_stepping): New macro.
8191
8192 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8193
8194 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8195 confusion in comment.
8196
8197 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8198
8199 * lynx-low.c (struct process_info_private): New type.
8200 (lynx_add_process): New function.
8201 (lynx_create_inferior, lynx_attach): Replace calls to
8202 add_process by calls to lynx_add_process.
8203 (lynx_resume): If PTID is null, then try using
8204 current_process()->private->last_wait_event_ptid.
8205 Add comments.
8206 (lynx_clear_inferiors): Delete. The contents of that function
8207 has been inlined in lynx_mourn;
8208 (lynx_wait_1): Save the ptid in the process's private data.
8209 (lynx_mourn): Free the process' private data. Replace call
8210 to lynx_clear_inferiors by call to clear_inferiors.
8211
8212 2013-05-17 Yao Qi <yao@codesourcery.com>
8213
8214 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8215 the right place.
8216
8217 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8218
8219 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8220 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8221 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8222 PT_TEXT_END_ADDR guards. Update comments.
8223 (linux_target_op) <read_offsets>: Conditionally define to
8224 linux_read_offsets if the target is UCLIBC and if it defines
8225 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8226
8227 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8228 Andrew Jenner <andrew@codesourcery.com>
8229
8230 * Makefile.in (SFILES): Add linux-nios2-low.c.
8231 (clean): Add action to delete nios2-linux.c.
8232 (nios2-linux.c): New rule.
8233 * configure.srv: Add nios2*-*-linux*.
8234 * linux-nios2-low.c: New.
8235
8236 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8237
8238 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8239
8240 2013-04-25 Hui Zhu <hui@codesourcery.com>
8241
8242 PR gdb/15186
8243 * ax.c (ax_printf): Add fflush.
8244
8245 2013-04-22 Tom Tromey <tromey@redhat.com>
8246
8247 * Makefile.in (SFILES): Add filestuff.c.
8248 (OBS): Add filestuff.o.
8249 (filestuff.o): New target.
8250 * config.in, configure: Rebuild.
8251 * configure.ac: Check for fdwalk, pipe2.
8252
8253 2013-04-17 Pedro Alves <palves@redhat.com>
8254
8255 * configure.ac (USE_THREAD_DB): Delete variable.
8256 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8257 Don't AC_SUBST USE_THREAD_DB.
8258 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8259 * config.in, configure: Regenerate.
8260
8261 2013-04-16 Pedro Alves <palves@redhat.com>
8262
8263 * linux-low.h (struct lwp_info) <thread_known>: Move under
8264 the USE_THREAD_DB #ifdef.
8265
8266 2013-04-16 Pedro Alves <palves@redhat.com>
8267
8268 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8269 (linux-low.o): Delete rule.
8270 * linux-low.h: Always include "gdb_thread_db.h" instead of
8271 conditionally including thread_db.h.
8272 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8273 HAVE_THREAD_DB_H.
8274
8275 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8276
8277 * Makefile.in (install-only): Fix make install regression.
8278
8279 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8280
8281 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8282 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8283 installation.
8284 * gdbserver.1: Remove.
8285
8286 2013-03-22 Pedro Alves <palves@redhat.com>
8287
8288 * linux-low.c (handle_extended_wait): Don't call
8289 linux_enable_event_reporting.
8290
8291 2013-03-15 Tony Theodore <tonyt@logyst.com>
8292
8293 PR build/9098:
8294 * Makefile.in (SHELL): Use @SHELL@.
8295
8296 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8297
8298 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8299 compiler warning.
8300
8301 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8302
8303 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8304 Remove extraneous NULL element.
8305
8306 2013-03-13 Yao Qi <yao@codesourcery.com>
8307
8308 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8309 'V' block in trace frame.
8310
8311 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8312
8313 * target.h (struct target_ops): Add btrace ops.
8314 (target_supports_btrace): New macro.
8315 (target_enable_btrace): New macro.
8316 (target_disable_btrace): New macro.
8317 (target_read_btrace): New macro.
8318 * gdbthread.h (struct thread_info): Add btrace field.
8319 * server.c: Include btrace-common.h.
8320 (handle_btrace_general_set): New function.
8321 (handle_btrace_enable): New function.
8322 (handle_btrace_disable): New function.
8323 (handle_general_set): Call handle_btrace_general_set.
8324 (handle_qxfer_btrace): New function.
8325 (struct qxfer qxfer_packets[]): Add btrace entry.
8326 * inferiors.c (remove_thread): Disable btrace.
8327 * linux-low: Include linux-btrace.h.
8328 (linux_low_enable_btrace): New function.
8329 (linux_low_read_btrace): New function.
8330 (linux_target_ops): Add btrace ops.
8331 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8332 Add srv_linux_btrace=yes.
8333 (x86_64-*-linux*): Add linux-btrace.o.
8334 Add srv_linux_btrace=yes.
8335 * configure.ac: Define HAVE_LINUX_BTRACE.
8336 * config.in: Regenerated.
8337 * configure: Regenerated.
8338
8339 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8340
8341 * server.c (handle_qxfer): Preserve error message if -3 is
8342 returned.
8343 (qxfer): Document the -3 return value.
8344
8345 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8346
8347 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8348 (linux_btrace_h): New variable.
8349 (linux-btrace.o): New rule.
8350
8351 2013-03-08 Stan Shebs <stan@codesourcery.com>
8352 Hafiz Abid Qadeer <abidh@codesourcery.com>
8353
8354 * tracepoint.c (trace_buffer_size): New global.
8355 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8356 (init_trace_buffer): Change to one-argument function. Allocate
8357 trace buffer memory.
8358 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8359 handle QTBuffer:size packet.
8360 (cmd_bigqtbuffer_size): New function.
8361 (initialize_tracepoint): Call init_trace_buffer with
8362 DEFAULT_TRACE_BUFFER_SIZE.
8363 * server.c (handle_query): Add QTBuffer:size in the
8364 supported packets.
8365
8366 2013-03-07 Yao Qi <yao@codesourcery.com>
8367
8368 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8369 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8370 of -1.
8371 (cmd_qtsp): Adjust condition. Do post increment.
8372 Set cur_action and cur_step_action back to 0.
8373
8374 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8375
8376 PR server/15236
8377 * linux-low.c (linux_write_memory): Return early success if LEN is
8378 zero.
8379
8380 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8381
8382 * configure.srv: Add x86_64-*-cygwin* as target.
8383
8384 2013-02-28 Tom Tromey <tromey@redhat.com>
8385
8386 * configure.ac: Invoke AC_SYS_LARGEFILE.
8387 * configure, config.in: Rebuild.
8388
8389 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8390
8391 * win32-low.c: Throughout, fix format strings and casts of
8392 printf-like functions to avoid type related warnings on all
8393 platforms.
8394 (get_child_debug_event): Print dwDebugEventCode as hex since
8395 that's how it's usually documented.
8396
8397 2013-02-28 Yao Qi <yao@codesourcery.com>
8398
8399 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8400 pulongest.
8401
8402 2013-02-27 Jiong Wang <jiwang@tilera.com>
8403
8404 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8405 (reg-tilegx32.c): New rule.
8406 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8407 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8408 different register info initializer according to elf class.
8409 (init_registers_tilgx32): New function. The tilegx32 register info
8410 initializer.
8411 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8412 (tile_store_gregset): Likewise.
8413
8414 2013-02-27 Yao Qi <yao@codesourcery.com>
8415
8416 * server.c (process_point_options): Print debug message when
8417 debug_threads is true.
8418
8419 2013-02-26 Yao Qi <yao@codesourcery.com>
8420
8421 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8422
8423 2013-02-19 Pedro Alves <palves@redhat.com>
8424 Kai Tietz <ktietz@redhat.com>
8425
8426 PR gdb/15161
8427
8428 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8429 instead of strtoul to extract address from packet.
8430 (process_serial_event) <'z'>: Likewise.
8431
8432 2013-02-18 Yao Qi <yao@codesourcery.com>
8433
8434 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8435
8436 2013-02-14 Pedro Alves <palves@redhat.com>
8437
8438 Plug memory leak.
8439
8440 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8441 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8442
8443 2013-02-14 Pedro Alves <palves@redhat.com>
8444
8445 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8446
8447 2013-02-14 Pedro Alves <palves@redhat.com>
8448
8449 * tracepoint.c (save_string): Delete.
8450 (add_tracepoint_action): Use savestring instead of save_string.
8451
8452 2013-02-12 Pedro Alves <palves@redhat.com>
8453
8454 * linux-xtensa-low.c: Ditto.
8455 * xtensa-xtregs.c: Ditto.
8456
8457 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8458
8459 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8460 thread_db.
8461
8462 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8463
8464 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8465 aarch64_num_wp_regs and aarch64_num_bp_regs to
8466 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8467
8468 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8469
8470 * linux-aarch64-low.c (ps_get_thread_area): Replace
8471 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8472
8473 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8474 Marcus Shawcroft <marcus.shawcroft@arm.com>
8475 Nigel Stephens <nigel.stephens@arm.com>
8476 Yufeng Zhang <yufeng.zhang@arm.com>
8477
8478 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8479 (aarch64.c, aarch64-without-fpu.c): New targets.
8480 * configure.srv (aarch64*-*-linux*): New.
8481 * linux-aarch64-low.c: New file.
8482
8483 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8484
8485 * linux-low.c (handle_extended_wait, linux_create_inferior)
8486 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8487 (dequeue_one_deferred_signal, linux_resume_one_thread)
8488 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8489 (linux_tracefork_grandchild, linux_test_for_tracefork)
8490 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8491 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8492 where the argument is 0.
8493
8494 2013-01-25 Yao Qi <yao@codesourcery.com>
8495
8496 * event-loop.c: Include "queue.h".
8497 (gdb_event_p): New typedef.
8498 (struct gdb_event) <next_event>: Remove.
8499 (event_queue): Change to QUEUE(gdb_event_p).
8500 (async_queue_event): Remove.
8501 (gdb_event_xfree): New.
8502 (initialize_event_loop): New.
8503 (process_event): Use API from QUEUE.
8504 (wait_for_event): Likewise.
8505 * server.c (main): Call initialize_event_loop.
8506 * server.h (initialize_event_loop): Declare.
8507
8508 2013-01-18 Yao Qi <yao@codesourcery.com>
8509
8510 * ax.h (struct eval_agent_expr_context): New.
8511 (gdb_eval_agent_expr): Update declaration.
8512 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8513 TFRAME. Add new argument CTX.
8514 * server.h (struct eval_agent_expr_context): Declare.
8515 (agent_mem_read, agent_tsv_read): Update declaration.
8516 (agent_mem_read_string): Likewise.
8517 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8518 (add_traceframe_block): Add new argument TPOINT.
8519 Increase TPOINT->traceframe_usage.
8520 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8521 eval_tracepoint_agent_expr.
8522 (condition_true_at_tracepoint): Likewise.
8523 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8524 (agent_mem_read_string, agent_tsv_read): Likewise.
8525
8526 2013-01-16 Yao Qi <yao@codesourcery.com>
8527
8528 * linux-low.c (linux_resume_one_lwp): Don't check
8529 'lwp->bp_reinsert != 0'.
8530
8531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8532 Pedro Alves <palves@redhat.com>
8533
8534 * lynx-low.c (ptrace_request_to_str): Define a temporary
8535 macro and use it to simplify this function's implementation.
8536
8537 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8538
8539 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8540 sets errno.
8541
8542 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8543
8544 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8545
8546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8547
8548 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8549
8550 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8551
8552 * lynx-low.c (lynx_resume): Use the resume_info parameter
8553 to determine the ptid for the lynx_ptrace call, unless
8554 it is equal to minus_one_ptid, in which case we use the
8555 ptid of the current_inferior.
8556 (lynx_wait_1): After having received a thread create/exit
8557 event, resume the inferior's execution using the signaling
8558 thread's ptid, rather than the old ptid.
8559
8560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8561
8562 * lynx-low.c (lynx_resume): Delete variable ret.
8563
8564 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8565
8566 * gdbreplay.c (gdbreplay_version): Update copyright year.
8567 * server.c (gdbserver_version): Likewise.
8568
8569 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8570
8571 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8572 new thread.
8573
8574 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8575
8576 * lynx-low.c (ptrace_request_to_str): Add handling for
8577 PTRACE_GETTRACESIG.
8578
8579 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8580
8581 * lynx-low.c (lynx_attach): Delete variable new_process.
8582
8583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8584
8585 * lynx-low.c (lynx_create_inferior): Delete variable
8586 new_process.
8587
8588 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8589
8590 * lynx-low.c (ptrace_request_to_str): Do not handle
8591 PTRACE_GETTHREADLIST if this macro does not exist.
8592
8593 2012-12-15 Yao Qi <yao@codesourcery.com>
8594
8595 * Makefile.in (OBS): Add notif.o.
8596 * notif.c, notif.h: New.
8597 * server.c: Include "notif.h".
8598 (struct vstop_notif) <next>: Remove.
8599 <base>: New field.
8600 (queue_stop_reply): Update.
8601 (push_event, send_next_stop_reply): Remove.
8602 (discard_queued_stop_replies): Update.
8603 (notif_stop): New variable.
8604 (handle_v_stopped): Remove.
8605 (handle_v_requests): Don't call handle_v_stopped. Call
8606 handle_ack_notif instead.
8607 (queue_stop_reply_callback): Call notif_event_enque instead
8608 of queue_stop_reply.
8609 (handle_status): Don't call send_next_stop_reply, call
8610 notif_write_event instead.
8611 (kill_inferior_callback): Likewise.
8612 (detach_or_kill_inferior_callback): Likewise.
8613 (main): Call initialize_notif.
8614 (process_serial_event): Call QUEUE_is_empty.
8615 (handle_target_event): Call notif_push instead of push event.
8616 * server.h (push_event): Remove declaration.
8617
8618 2012-12-10 Tom Tromey <tromey@redhat.com>
8619
8620 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8621 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8622 macros.
8623 (.c.o): Rewrite.
8624 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8625 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8626 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8627 (amd64-linux-ipa.o, ax.o): Rewrite.
8628 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8629 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8630 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8631 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8632 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8633 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8634 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8635 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8636 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8637 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8638 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8639 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8640 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8641 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8642 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8643 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8644 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8645 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8646 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8647 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8648 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8649 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8650 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8651 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8652 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8653 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8654 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8655 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8656 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8657 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8658 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8659 (reg-tilegx.o): Remove.
8660 (all_object_files): New macro.
8661 Include .deps files.
8662 * aclocal.m4, configure: Rebuild.
8663 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8664 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8665 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8666
8667 2012-12-05 Tom Tromey <tromey@redhat.com>
8668
8669 PR gdb/14917:
8670 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8671
8672 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8673
8674 * configure.ac: Check for linux/perf_event.h.
8675 * config.in: Regenerated.
8676 * configure: Regenerated.
8677
8678 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8679
8680 * hostio.c (handle_readlink): Decrease buffer size
8681 parameter passed to readlink by one byte.
8682
8683 2012-11-26 Yao Qi <yao@codesourcery.com>
8684
8685 * configure.ac (build_warnings): Append '-Wempty-body'.
8686 * configure: Regenerated.
8687 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8688 body.
8689
8690 2012-11-15 Pierre Muller <muller@sourceware.org>
8691
8692 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8693 * config.in: Regenerate.
8694 * configure: Regenerate.
8695 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8696 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8697 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8698 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8699 header.
8700 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8701 instead of <sys/wait.h> header.
8702 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8703
8704 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8705
8706 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8707 (various make rules): Remove -DGDBSERVER
8708
8709 2012-11-09 Yao Qi <yao@codesourcery.com>
8710
8711 * spu-low.c (current_ptid): Move it to ..
8712 * gdbthread.h: ... here. New.
8713 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8714 * server.c (myresume, process_serial_event): Likewise.
8715 * thread-db.c (thread_db_find_new_threads): Likewise.
8716 * tracepoint.c (run_inferior_command): Likewise.
8717
8718 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8719
8720 * server.c (handle_search_memory_1): Include access length in
8721 warning message.
8722
8723 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8724
8725 * linux-crisv32-low.c: Fix compile errors.
8726
8727 2012-09-04 Yao Qi <yao@codesourcery.com>
8728
8729 * tracepoint.c (cmd_qtsv): Adjust debug message.
8730 Don't check CUR_TPOINT.
8731
8732 2012-08-28 Yao Qi <yao@codesourcery.com>
8733
8734 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8735 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8736 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8737 Remove declarations of xmalloc, xreallloc, xstrdup and
8738 freeargv.
8739 * Makefile.in (libiberty_h): New.
8740 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8741 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8742
8743 2012-08-23 Yao Qi <yao@codesourcery.com>
8744
8745 * server.h: Remove declaration of 'xsnprintf'.
8746
8747 2012-08-22 Keith Seitz <keiths@redhat.com>
8748
8749 * server.h: Include build-gnulib-gbserver/config.h.
8750 * gdbreplay.c: Likewise.
8751
8752 2012-08-08 Doug Evans <dje@google.com>
8753
8754 * Makefile.in (SFILES): Add gdb_vecs.c.
8755 (OBS): Add gdb_vecs.o.
8756 (gdb_vecs_h, host_defs_h): New variables.
8757 (thread-db.o): Add $(gdb_vecs_h) dependency.
8758 (gdb_vecs.o): New rule.
8759 * thread-db.c: #include "gdb_vecs.h".
8760 (thread_db_load_search): Use a vector to iterate over path elements.
8761 Handle text appearing after "$pdir".
8762
8763 * configure.ac: Add check for strstr.
8764 * config.in: Regenerate.
8765 * configure: Regenerate.
8766
8767 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8768
8769 * hostio.c (handle_pread): If pread fails, fall back to attempting
8770 lseek/read.
8771 (handle_pwrite): Likewise for pwrite.
8772
8773 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8774
8775 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8776 between unsupported TYPE and unimplementable ADDR/LEN combination.
8777 (arm_insert_point): Act on new return value.
8778
8779 2012-07-31 Pedro Alves <palves@redhat.com>
8780
8781 * server.c (process_point_options): Only skip tokens if we find
8782 one that is unrecognized. Don't treat 'X' specially while
8783 skipping unrecognized tokens.
8784
8785 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8786
8787 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8788 to 4-byte-align HW breakpoint addresses for Thumb.
8789
8790 2012-07-27 Yao Qi <yao@codesourcery.com>
8791
8792 PR remote/14161.
8793
8794 * server.h: Declare gdb_agent_about_to_close.
8795 * target.c (kill_inferior): Include "agent.h".
8796 New. Send command 'kill'.
8797 * target.h (kill_inferior): Removed macro.
8798 * tracepoint.c (gdb_agent_about_to_close): New.
8799 (gdb_agent_helper_thread): Handle command 'close'.
8800 Wait endlessly until the inferior stops.
8801 Install gdb_agent_remove_socket to atexit hook.
8802 (agent_socket_name): New static variable.
8803 (gdb_agent_socket_init): Replace local variable 'name' with
8804 'agent_socket_name'.
8805 (gdb_agent_remove_socket): New.
8806
8807 2012-07-27 Yao Qi <yao@codesourcery.com>
8808
8809 * server.c (process_point_options): Stop at 'X' when parsing.
8810
8811 2012-07-19 Michael Eager <eager@eagercon.com>
8812
8813 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8814 to hw_execute.
8815 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8816 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8817 hardware breakpoint.
8818
8819 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8820
8821 * gdbserver/linux-low.c (initialize_low): Call
8822 linux_ptrace_init_warnings.
8823
8824 2012-07-02 Doug Evans <dje@google.com>
8825
8826 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8827 pointer to int.
8828
8829 2012-07-02 Stan Shebs <stan@codesourcery.com>
8830
8831 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8832 (ax.o): Add it to build rule.
8833 (ax-ipa.o): Ditto.
8834 (OBS): Add format.o.
8835 (IPA_OBS): Add format.o.
8836 * server.c (handle_query): Claim support for breakpoint commands.
8837 (process_point_options): Add command case.
8838 (process_serial_event): Leave running if there are printfs in
8839 effect.
8840 * mem-break.h (any_persistent_commands): Declare.
8841 (add_breakpoint_commands): Declare.
8842 (gdb_no_commands_at_breakpoint): Declare.
8843 (run_breakpoint_commands): Declare.
8844 * mem-break.c (struct point_command_list): New struct.
8845 (struct breakpoint): New field command_list.
8846 (any_persistent_commands): New function.
8847 (add_commands_to_breakpoint): New function.
8848 (add_breakpoint_commands): New function.
8849 (gdb_no_commands_at_breakpoint): New function.
8850 (run_breakpoint_commands): New function.
8851 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8852 locally.
8853 * ax.c: Include format.h.
8854 (ax_printf): New function.
8855 (gdb_eval_agent_expr): Add printf opcode.
8856
8857 2012-06-13 Yao Qi <yao@codesourcery.com>
8858
8859 * server.c (start_inferior): Remove duplicated writes to fields
8860 'last_resume_kind' and 'last_status' of 'current_inferior'.
8861
8862 2012-06-12 Yao Qi <yao@codesourcery.com>
8863 Pedro Alves <palves@redhat.com>
8864
8865 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8866 comment.
8867 * server.c (handle_v_cont): Extend comment.
8868
8869 2012-06-11 Yao Qi <yao@codesourcery.com>
8870
8871 * linux-low.c (linux_attach): Add 'static'.
8872
8873 2012-06-06 Yao Qi <yao@codesourcery.com>
8874
8875 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8876
8877 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8878
8879 Fix gcc -flto compilation warning.
8880 * server.c (main): Make variable multi_mode and attach volatile.
8881
8882 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8883
8884 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8885 if the platform doesn't know about it.
8886
8887 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8888
8889 * Makefile.in (SFILES): Add linux-tile-low.c.
8890 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8891 * configure.srv: Handle tilegx-*-linux*.
8892 * linux-tile-low.c: New file.
8893
8894 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8895
8896 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8897
8898 2012-05-24 Pedro Alves <palves@redhat.com>
8899
8900 PR gdb/7205
8901
8902 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8903
8904 2012-05-24 Pedro Alves <palves@redhat.com>
8905
8906 PR gdb/7205
8907
8908 Replace target_signal with gdb_signal throughout.
8909
8910 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8911
8912 * linux-low.c (linux_store_registers): Avoid the copying sequence
8913 when no data has been retrieved by ptrace.
8914
8915 2012-05-22 Will Deacon <will.deacon@arm.com>
8916
8917 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8918 Include asm/ptrace.h.
8919 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8920 already defined.
8921
8922 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8923
8924 * linux-low.c (linux_store_registers): Don't re-retrieve data
8925 with ptrace that has already been obtained from /proc. Always
8926 copy any data retrieved with ptrace to the buffer supplied.
8927
8928 2012-05-11 Yao Qi <yao@codesourcery.com>
8929 Pedro Alves <palves@redhat.com>
8930
8931 * linux-low.c (enum stopping_threads_kind): New.
8932 (stopping_threads): Change type to `enum stopping_threads_kind'.
8933 (handle_extended_wait): If stopping and suspending threads, leave
8934 the new_lwp suspended too.
8935 (linux_wait_for_event): Adjust.
8936 (stop_all_lwps): Set `stopping_threads' to
8937 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8938 whether we're suspending threads or just stopping them. Assert no
8939 recursion happens.
8940
8941 2012-04-29 Yao Qi <yao@codesourcery.com>
8942
8943 * server.h: Move some code to ...
8944 * gdbthread.h: ... here. New.
8945 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8946 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8947 (nto-low.o, win32-low.o): Likewise.
8948 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8949 * regcache.c, remote-utils.c, server.c: Likewise.
8950 * target.c, tracepoint.c, win32-low.c: Likewise.
8951
8952 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8953
8954 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8955 (PTRACE_ARG4_TYPE): Likewise.
8956 (PTRACE_XFER_TYPE): Likewise.
8957 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8958 ptrace to PTRACE_ARG3_TYPE.
8959 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8960 (PTRACE_ARG4_TYPE): Likewise.
8961 (PTRACE_XFER_TYPE): Likewise.
8962 (linux_detach_one_lwp): Cast fourth argument of
8963 ptrace to long then PTRACE_ARG4_TYPE.
8964 (regsets_fetch_inferior_registers): Cast third argument of
8965 ptrace to long then PTRACE_ARG3_TYPE.
8966 (regsets_store_inferior_registers): Likewise.
8967
8968 2012-04-20 Pedro Alves <palves@redhat.com>
8969
8970 * configure: Regenerate.
8971
8972 2012-04-19 Pedro Alves <palves@redhat.com>
8973
8974 * Makefile.in (GNULIB_BUILDDIR): New.
8975 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8976 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8977 (all, install-only, uninstall, clean-info, all-lib, clean): No
8978 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8979 (maintainer-clean realclean distclean): Use subdir_do.
8980 (subdir_do): New.
8981 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8982 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8983 * acinclude.m4: Include acx_configure_dir.m4.
8984 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8985 calls. Call AC_PROG_RANLIB. Configure gnulib using
8986 ACX_CONFIGURE_DIR.
8987 (GNULIB): New.
8988 (GNULIB_STDINT_H): Adjust.
8989 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8990 * gdbreplay.c: Include build-gnulib/config.h.
8991 * server.h: Likewise.
8992 * aclocal.m4: Regenerate.
8993 * config.in: Regenerate.
8994 * configure: Regenerate.
8995
8996 2012-04-19 Pedro Alves <palves@redhat.com>
8997
8998 * Makefile.in (LIBGNU, INCGNU): Adjust.
8999 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9000 (all, install-only, uninstall, clean-info, all-lib, clean)
9001 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9002 * configure.ac: Adjust AC_OUTPUT output.
9003 * aclocal.m4: Regenerate.
9004 * configure: Regenerate.
9005
9006 2012-04-19 Pedro Alves <palves@redhat.com>
9007
9008 * Makefile.in (generated_files): New.
9009 (server_h): Remove the explicit dependency on config.h, and depend
9010 on $generated_files.
9011
9012 2012-04-19 Pedro Alves <palves@redhat.com>
9013
9014 * Makefile.in (INCGNU): Add -Ignulib.
9015
9016 2012-04-19 Pedro Alves <palves@redhat.com>
9017
9018 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9019 (INCGNU): ... this, and spell out -I here.
9020 (GNULIB_LIB): Rename to ...
9021 (LIBGNU): ... this.
9022 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9023
9024 2012-04-19 Pedro Alves <palves@redhat.com>
9025
9026 * config.in: Regenerate.
9027
9028 2012-04-19 Pedro Alves <palves@redhat.com>
9029
9030 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9031 * server.h (memmem): Remove declaration.
9032 * config.in: Regenerate.
9033 * configure: Regenerate.
9034
9035 2012-04-19 Yao Qi <yao@codesourcery.com>
9036
9037 * Makefile.in (SFILES): Add common/vec.c.
9038 (OBS): Add vec.o.
9039 (vec.o): New rule.
9040
9041 2012-04-19 Yao Qi <yao@codesourcery.com>
9042
9043 * remote-utils.c (prepare_resume_reply): Replace with macro
9044 target_core_of_thread.
9045 * server.c (handle_qxfer_threads_proper): Likewise.
9046 * target.h (traget_core_of_thread): New macro.
9047
9048 2012-04-18 Pedro Alves <palves@redhat.com>
9049
9050 * aclocal.m4: Regenerate.
9051 * configure: Regenerate.
9052
9053 2012-04-16 Yao Qi <yao@codesourcery.com>
9054
9055 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9056 duplicated on address.
9057
9058 2012-04-16 Yao Qi <yao@codesourcery.com>
9059
9060 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9061 (struct tracepoint_action_ops) <send>: New field.
9062 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9063 (agent_expr_send, x_tracepoint_action_send): New.
9064 (l_tracepoint_action_send): New.
9065 (cmd_qtdp): Download and install tracepoint
9066 according to `use_agent'.
9067 (run_inferior_command): Add one more parameter `len'.
9068 Update callers.
9069 (tracepoint_send_agent): New.
9070 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9071
9072 2012-04-16 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (download_tracepoints): Moved to ...
9075 (cmd_qtstart): ... here.
9076
9077 2012-04-14 Yao Qi <yao@codesourcery.com>
9078
9079 * tracepoint.c: Include inttypes.h.
9080 (struct collect_memory_action): Use sized types.
9081 (struct tracepoint): Likewise.
9082 (cmd_qtdp, stop_tracing): Update print specifiers.
9083 (cmd_qtp, response_tracepoint): Likewise.
9084 (collect_data_at_tracepoint): Likewise.
9085 (collect_data_at_step): Likewise.
9086
9087 2012-04-14 Yao Qi <yao@codesourcery.com>
9088
9089 Import gnulib module inttypes.
9090 * aclocal.m4, config.in, configure: Regenerated.
9091
9092 2012-04-14 Yao Qi <yao@codesourcery.com>
9093
9094 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9095 Makefile and config.status at last.
9096
9097 2012-04-13 Yao Qi <yao@codesourcery.com>
9098
9099 * tracepoint.c: Include stdint.h unconditionally.
9100
9101 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9102
9103 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9104 on BFD_HAVE_SYS_PROCFS_TYPE.
9105 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9106 * configure: Regenerate.
9107 * config.in: Likewise.
9108
9109 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9110
9111 * Makefile.in (clean): Also remove x32.c x32-linux.c
9112 x32-avx.c x32-avx-linux.c.
9113 (x32.o): New target.
9114 (x32.c): Likewise.
9115 (x32-linux.o): Likewise.
9116 (x32-linux.c): Likewise.
9117 (x32-avx.o): Likewise.
9118 (x32-avx.c): Likewise.
9119 (x32-avx-linux.o): Likewise.
9120 (x32-avx-linux.c): Likewise.
9121
9122 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9123 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9124 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9125 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9126 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9127 i386/x32-avx-linux.xml.
9128
9129 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9130 (init_registers_x32_avx_linux): Likwise.
9131 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9132 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9133
9134 2012-04-13 Pedro Alves <palves@redhat.com>
9135
9136 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9137 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9138 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9139 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9140 the sub-make.
9141
9142 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9143
9144 * linux-x86-low.c (compat_x32_clock_t): New.
9145 (compat_x32_siginfo_t): Likewise.
9146 (compat_x32_siginfo_from_siginfo): Likewise.
9147 (siginfo_from_compat_x32_siginfo): Likewise.
9148 (linux_is_elf64): Likewise.
9149 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9150 and siginfo_from_compat_x32_siginfo for x32.
9151 (x86_arch_setup): Set linux_is_elf64.
9152
9153 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9154
9155 PR gdb/13969
9156 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9157 e_machine field.
9158 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9159 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9160 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9161 compatible with process.
9162
9163 2012-04-12 Yao Qi <yao@codesourcery.com>
9164
9165 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9166 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9167 (install-only, install-info, clean): Handle sub dir gnulib.
9168 (all-lib, am--refresh): New targets.
9169 (memmem.o): Remove target.
9170 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9171 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9172 (AC_REPLACE_FUNCS): Remove memmem.
9173 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9174 (AC_OUTPUT): Generate Makefile in gnulib/.
9175 * aclocal.m4, config.in, configure: Regenerated.
9176
9177 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9178
9179 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9180
9181 2012-04-05 Pedro Alves <palves@redhat.com>
9182
9183 -Werror=strict-aliasing
9184
9185 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9186 pointer.
9187
9188 2012-04-04 Pedro Alves <palves@redhat.com>
9189
9190 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9191 (sparc_store_gregset_from_stack, sparc_store_gregset)
9192 (sparc_breakpoint_at): Fix formatting.
9193
9194 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9195
9196 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9197 are available.
9198 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9199 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9200 * config.in: Regenerate.
9201 * configure: Likewise.
9202
9203 2012-03-29 Pedro Alves <palves@redhat.com>
9204
9205 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9206 Correct ptrace arguments.
9207
9208 2012-03-28 Pedro Alves <palves@redhat.com>
9209
9210 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9211 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9212 (IA64_FR1_REGNUM): New defines.
9213 (ia64_fetch_register): New.
9214 (the_low_target): Install it.
9215 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9216 field.
9217 * linux-low.c (linux_fetch_registers): Try the
9218 the_low_target.fetch_register hook first.
9219
9220 * linux-arm-low.c (the_low_target): Adjust.
9221 * linux-bfin-low.c (the_low_target): Adjust.
9222 * linux-cris-low.c (the_low_target): Adjust.
9223 * linux-crisv32-low.c (the_low_target): Adjust.
9224 * linux-m32r-low.c (the_low_target): Adjust.
9225 * linux-m68k-low.c (the_low_target): Adjust.
9226 * linux-mips-low.c (the_low_target): Adjust.
9227 * linux-ppc-low.c (the_low_target): Adjust.
9228 * linux-s390-low.c (the_low_target): Adjust.
9229 * linux-sh-low.c (the_low_target): Adjust.
9230 * linux-sparc-low.c (the_low_target): Adjust.
9231 * linux-tic6x-low.c (the_low_target): Adjust.
9232 * linux-x86-low.c (the_low_target): Adjust.
9233 * linux-xtensa-low.c (the_low_target): Adjust.
9234
9235 2012-03-26 Pedro Alves <palves@redhat.com>
9236
9237 * server.c (handle_qxfer_libraries): Don't bail early if
9238 the_target->qxfer_libraries_svr4 is not NULL.
9239
9240 2012-03-26 Pedro Alves <palves@redhat.com>
9241
9242 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9243
9244 2012-03-23 Pedro Alves <palves@redhat.com>
9245
9246 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9247 "library-list-svr4" element's start tag when the the DSO list is
9248 empty.
9249
9250 2012-03-23 Pedro Alves <palves@redhat.com>
9251
9252 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9253 a variable whose type size is the same as the inferior's pointer
9254 size.
9255
9256 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9257
9258 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9259 struct siginfo.
9260 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9261 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9262 * linux-low.h: Include <signal.h>.
9263 (struct siginfo): Remove forward declaration.
9264 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9265 struct siginfo.
9266
9267 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9268
9269 * .gitignore: Ignore more files.
9270
9271 2012-03-19 Pedro Alves <palves@redhat.com>
9272 Jan Kratochvil <jan.kratochvil@redhat.com>
9273
9274 * server.c (cont_thread, general_thread): Add describing comments.
9275 (start_inferior): Clear `cont_thread'.
9276 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9277 of a process.
9278
9279 2012-03-15 Yao Qi <yao@codesourcery.com>
9280
9281 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9282 handling to ...
9283 (cmd_qtdp): ... here.
9284
9285 2012-03-15 Yao Qi <yao@codesourcery.com>
9286
9287 * tracepoint.c (struct tracepoint_action_ops): New.
9288 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9289 (m_tracepoint_action_download): New.
9290 (r_tracepoint_action_download): New.
9291 (x_tracepoint_action_download): New.
9292 (l_tracepoint_action_download): New.
9293 (add_tracepoint_action): Install `action->ops' according type.
9294 (download_tracepoint_1): Move code `download' function pointer
9295 of various tracepoint_action_ops.
9296
9297 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9298
9299 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9300 linux_ptrace_attach_warnings.
9301
9302 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9303
9304 * Makefile.in (linux-ptrace.o): New.
9305 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9306 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9307 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9308 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9309 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9310 of these targets.
9311 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9312
9313 2012-03-08 Yao Qi <yao@codesourcery.com>
9314 Pedro Alves <palves@redhat.com>
9315
9316 Fix PR server/13392.
9317 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9318 offset of JMP insn.
9319 * tracepoint.c (remove_tracepoint): New.
9320 (cmd_qtdp): Call remove_tracepoint when failed to install.
9321
9322 2012-03-07 Pedro Alves <palves@redhat.com>
9323
9324 * linux-low.c (get_detach_signal): New.
9325 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9326 Pass on pending signals to PTRACE_DETACH. Check the result of the
9327 ptrace call.
9328 * server.c (program_signals, program_signals_p): New.
9329 (handle_general_set): Handle QProgramSignals.
9330 * server.h (program_signals, program_signals_p): Declare.
9331
9332 2012-03-05 Pedro Alves <palves@redhat.com>
9333 Jan Kratochvil <jan.kratochvil@redhat.com>
9334
9335 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9336 New comment why.
9337
9338 2012-03-03 Yao Qi <yao@codesourcery.com>
9339
9340 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9341 agent_look_up_symbols.
9342
9343 2012-03-03 Yao Qi <yao@codesourcery.com>
9344
9345 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9346 (linux-x86-low.o): Likewise.
9347 * server.h: Remove in_process_agent_loaded.
9348 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9349 common/agent.c.
9350 Update callers.
9351
9352 2012-03-03 Yao Qi <yao@codesourcery.com>
9353
9354 * tracepoint.c (gdb_agent_capability): New global.
9355 (in_process_agent_loaded_ust): Renamed to
9356 `in_process_agent_supports_ust'.
9357 Update callers.
9358 (in_process_agent_supports_ust): Call agent_capability_check.
9359 (clear_installed_tracepoints): Assert that agent supports
9360 agent.
9361
9362 2012-03-03 Yao Qi <yao@codesourcery.com>
9363
9364 * linux-low.c (linux_supports_agent): New.
9365 (linux_target_ops): Initialize field `supports_agent' with
9366 linux_supports_agent.
9367 * target.h (struct target_ops) <supports_agent>: New.
9368 (target_supports_agent): New macro.
9369 * server.c (handle_general_set): Handle packet 'QAgent'.
9370 (handle_query): Send `QAgent+'.
9371 * Makefile.in (server.o): Depends on agent.h.
9372
9373 2012-03-03 Yao Qi <yao@codesourcery.com>
9374
9375 * Makefile.in (OBS): Add agent.o.
9376 Add new rule for agent.o.
9377 Track dependence of tracepoint.c on agent.h.
9378 * tracepoint.c (run_inferior_command_1):
9379 (run_inferior_command): Call agent_run_command.
9380 (gdb_ust_connect_sync_socket): Deleted. Move it to
9381 common/agent.c.
9382 (resume_thread, stop_thread): Likewise.
9383 (gdb_ust_socket_init): Renamed to ...
9384 (gdb_agent_socket_init): ... New.
9385 (gdb_ust_thread): Renamed to ...
9386 (gdb_agent_helper_thread): ... New.
9387 (gdb_ust_init): Move some code to ...
9388 (gdb_agent_init): ... here. New.
9389 [HAVE_UST]: Call gdb_ust_init.
9390 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9391 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9392 * config.in, configure: Regenerated.
9393
9394 2012-03-02 Pedro Alves <palves@redhat.com>
9395
9396 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9397 * linux-low.c (struct simple_pid_list): New.
9398 (stopped_pids): New a struct simple_pid_list pointer.
9399 (add_to_pid_list, pull_pid_from_list): New.
9400 (handle_extended_wait): Don't assume the first signal new children
9401 report is SIGSTOP. Adjust call to pull_pid_from_list.
9402 (linux_wait_for_lwp): Adjust.
9403
9404 2012-03-02 Yao Qi <yao@codesourcery.com>
9405
9406 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9407 debug log.
9408
9409 2012-03-02 Yao Qi <yao@codesourcery.com>
9410
9411 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9412 `stop_pc' and `tpoint'. Update caller.
9413
9414 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9415
9416 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9417 * linux-low.c (use_linux_regsets): New macro.
9418 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9419 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9420 (linux_register_in_regsets): New function.
9421 (usr_fetch_inferior_registers): Skip registers covered by
9422 regsets.
9423 (usr_store_inferior_registers): Likewise.
9424 (usr_fetch_inferior_registers): New macro.
9425 (usr_store_inferior_registers): Likewise.
9426 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9427 (linux_store_registers): Likewise.
9428 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9429 prototype.
9430 (init_registers_mips64_dsp_linux): Likewise.
9431 (init_registers_mips_linux): New macro.
9432 (init_registers_mips_dsp_linux): Likewise.
9433 (mips_dsp_num_regs): Likewise.
9434 (DSP_BASE, DSP_CONTROL): New fallback macros.
9435 (mips_base_regs): New macro.
9436 (mips_regmap): Use it. Fix the size.
9437 (mips_dsp_regmap): New variable.
9438 (mips_dsp_regset_bitmap): Likewise.
9439 (mips_arch_setup): New function.
9440 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9441 than mips_regmap.
9442 (mips_cannot_store_register): Likewise.
9443 (the_low_target): Update .arch_setup, .num_regs and .regmap
9444 initializers. Add .regset_bitmap initializer.
9445 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9446 initializer.
9447 * linux-bfin-low.c (the_low_target): Likewise.
9448 * linux-cris-low.c (the_low_target): Likewise.
9449 * linux-crisv32-low.c (the_low_target): Likewise.
9450 * linux-ia64-low.c (the_low_target): Likewise.
9451 * linux-m32r-low.c (the_low_target): Likewise.
9452 * linux-m68k-low.c (the_low_target): Likewise.
9453 * linux-ppc-low.c (the_low_target): Likewise.
9454 * linux-s390-low.c (the_low_target): Likewise.
9455 * linux-sh-low.c (the_low_target): Likewise.
9456 * linux-sparc-low.c (the_low_target): Likewise.
9457 * linux-tic6x-low.c (the_low_target): Likewise.
9458 * linux-x86-low.c (the_low_target): Likewise.
9459 * linux-xtensa-low.c (the_low_target): Likewise.
9460 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9461 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9462 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9463 srv_xmlfiles.
9464 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9465 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9466
9467 2012-02-29 Yao Qi <yao@codesourcery.com>
9468 Pedro Alves <palves@redhat.com>
9469
9470 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9471 `step_over_finished' is true.
9472
9473 2012-02-27 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9476 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9477
9478 2012-02-27 Pedro Alves <palves@redhat.com>
9479
9480 PR server/9684
9481 * linux-low.c (pid_is_stopped): New.
9482 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9483
9484 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9485
9486 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9487 of conditions.
9488
9489 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9490
9491 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9492
9493 2012-02-24 Luis Machado <lgustavo@codesourcery>
9494
9495 * server.c (handle_query): Advertise support for target-side
9496 breakpoint condition evaluation.
9497 (process_point_options): New function.
9498 (process_serial_event): When inserting a breakpoint, check for
9499 a target-side condition that should be evaluated.
9500
9501 * mem-break.c: Include regcache.h and ax.h.
9502 (point_cond_list_t): New data structure.
9503 (breakpoint) <cond_list>: New field.
9504 (find_gdb_breakpoint_at): Make non-static.
9505 (delete_gdb_breakpoint_at): Clear any target-side
9506 conditions.
9507 (clear_gdb_breakpoint_conditions): New function.
9508 (add_condition_to_breakpoint): Likewise.
9509 (add_breakpoint_condition): Likewise.
9510 (gdb_condition_true_at_breakpoint): Likewise.
9511 (gdb_breakpoint_here): Return result directly instead
9512 of going through a local variable.
9513
9514 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9515 (clear_gdb_breakpoint_conditions): Likewise.
9516 (add_breakpoint_condition): Likewise.
9517 (gdb_condition_true_at_breakpoint): Likewise.
9518
9519 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9520 (need_step_over_p): Take target-side breakpoint condition into
9521 consideration.
9522
9523 2012-02-24 Luis Machado <lgustavo@codesourcery>
9524
9525 * server.h: Include tracepoint.h.
9526 (agent_mem_read, agent_get_trace_state_variable_value,
9527 agent_set_trace_state_variable_value,
9528 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9529 get_set_tsv_func_addr): New prototypes.
9530
9531 * ax.h: New include file.
9532 * ax.c: New source file.
9533
9534 * tracepoint.c: Include ax.h.
9535 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9536 agent_expr, eval_result_type): Move to ax.h.
9537 (parse_agent_expr): Rename to ...
9538 (gdb_parse_agent_expr): ... this, make it non-static and move
9539 to ax.h.
9540 (unparse_agent_expr) Rename to ...
9541 (gdb_unparse_agent_expr): ... this, make it non-static and move
9542 to ax.h.
9543 (eval_agent_expr): Rename to ...
9544 (eval_tracepoint_agent_expr): ... this.
9545 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9546 forward declarations.
9547 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9548 (agent_get_trace_state_variable_value): New function.
9549 (agent_set_trace_state_variable_value): New function.
9550 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9551 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9552 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9553 (condition_true_at_tracepoint): Likewise.
9554 (parse_agent_expr): Rename to ...
9555 (gdb_parse_agent_expr): ... this and move to ax.c.
9556 (unparse_agent_expr): Rename to ...
9557 (gdb_unparse_agent_expr): ... this and move to ax.c.
9558 (gdb_agent_op_name): Move to ax.c.
9559 (eval_agent_expr): Rename to ...
9560 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9561 and move to ax.c.
9562 (eval_tracepoint_agent_expr): New function.
9563 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9564 non-static.
9565 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9566 ax.c.
9567 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9568 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9569 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9570 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9571 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9572 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9573 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9574 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9575 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9576 (compile_bytecodes): Remove forward declaration.
9577 (is_goto_target): Move to ax.c.
9578 (compile_bytecodes): Move to ax.c and call
9579 agent_get_trace_state_variable_value (...) and
9580 agent_set_trace_state_variable_value (...).
9581
9582 * Makefile.in: Update ax.c and IPA dependencies.
9583
9584 2012-02-24 Pedro Alves <palves@redhat.com>
9585
9586 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9587 (cmd_bigqtbuffer_circular): ... this. Only handle
9588 'QTBuffer:circular:'.
9589 (handle_tracepoint_general_set): Adjust.
9590
9591 2012-02-16 Yao Qi <yao@codesourcery.com>
9592
9593 * inferiors.c: Move code to ...
9594 * dll.c: .... here. New.
9595 * server.h: Declare clear_dlls.
9596 * Makefile.in (SFILES): Add dll.c.
9597 (OBS): Add dll.o
9598 (dll.o): New rule.
9599
9600 2012-02-11 Yao Qi <yao@codesourcery.com>
9601
9602 * server.c: (handle_monitor_command): Add a new parameter
9603 `own_buf'.
9604 (handle_query): Update caller.
9605
9606 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9607
9608 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9609 * configure, config.in: Regenerate.
9610 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9611 is not defined.
9612
9613 2012-02-02 Pedro Alves <palves@redhat.com>
9614
9615 Try SIGKILL first, then PTRACE_KILL.
9616 * linux-low.c (linux_kill_one_lwp): New.
9617 (linux_kill_one_lwp): Rename to ...
9618 (kill_one_lwp_callback): ... this. Use the new
9619 linux_kill_one_lwp.
9620
9621 2012-02-02 Pedro Alves <palves@redhat.com>
9622
9623 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9624 inferior.
9625
9626 2012-01-27 Pedro Alves <palves@redhat.com>
9627
9628 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9629 (elf_64_file_p): Make static.
9630 (linux_pid_exe_is_elf_64_file): New.
9631 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9632 Delete declarations.
9633 (linux_pid_exe_is_elf_64_file): Declare.
9634 * linux-x86-low.c (x86_arch_setup): Use
9635 linux_pid_exe_is_elf_64_file.
9636
9637 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9638
9639 * linux-low.c (linux_wait_for_event_1): Rename to ...
9640 (linux_wait_for_event): ... here and merge it with former
9641 linux_wait_for_event - new variable wait_ptid, use it.
9642 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9643
9644 2012-01-23 Pedro Alves <palves@redhat.com>
9645
9646 * server.c (main): Avoid yet another case of infinite loop while
9647 detaching/killing after a longjmp.
9648
9649 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9650
9651 Code cleanup.
9652 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9653
9654 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9655
9656 * hostio.c (handle_readlink): New function.
9657 (handle_vFile): Call it to handle "vFile:readlink" packets.
9658
9659 2012-01-20 Pedro Alves <palves@redhat.com>
9660 Ulrich Weigand <ulrich.weigand@linaro.org>
9661
9662 * server.c (handle_v_requests): Only support vAttach and vRun to
9663 start multiple processes when in extended protocol mode.
9664
9665 2012-01-17 Pedro Alves <palves@redhat.com>
9666
9667 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9668 memalign plus mprotect to allocate the scratch buffer.
9669
9670 2012-01-13 Pedro Alves <palves@redhat.com>
9671
9672 * server.c (attach_inferior): Clear `cont_thread'.
9673
9674 2012-01-13 Pedro Alves <palves@redhat.com>
9675
9676 * server.c (main): Avoid infinite loop while detaching/killing
9677 after a longjmp.
9678
9679 2012-01-09 Doug Evans <dje@google.com>
9680
9681 * server.c (start_inferior): Set last_ptid in --wrapper case.
9682
9683 2012-01-06 Yao Qi <yao@codesourcery.com>
9684
9685 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9686 defined.
9687 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9688
9689 2012-01-04 Yao Qi <yao@codesourcery.com>
9690
9691 * tracepoint.c (cmd_qtdp): Print debug message
9692 for static tracepoint.
9693
9694 2012-01-04 Yao Qi <yao@codesourcery.com>
9695
9696 * tracepoint.c (trace_vdebug): Differentiate debug message
9697 between gdbserver and IPA.
9698
9699 2012-01-03 Yao Qi <yao@codesourcery.com>
9700
9701 * tracepoint.c (tracepoint_was_hit): Don't collect for
9702 static tracepoint.
9703
9704 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9705
9706 * terminal.h: Reformat copyright header.
9707
9708 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9709
9710 * server.c (gdbserver_version): Update copyright year.
9711 * gdbreplay.c (gdbreplay_version): Likewise.
9712
9713 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9714
9715 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9716
9717 Revert:
9718 2011-12-18 Hui Zhu <teawater@gmail.com>
9719 * linux-low.c (linux_create_inferior): Save return value to ret.
9720
9721 2011-12-18 Hui Zhu <teawater@gmail.com>
9722
9723 * linux-low.c (linux_create_inferior): Save return value to ret.
9724
9725 2011-12-16 Doug Evans <dje@google.com>
9726
9727 * linux-low.c (linux_create_inferior): If stdio connection,
9728 redirect stdin from /dev/null, stdout to stderr.
9729 * remote-utils.c (remote_is_stdio): New static global.
9730 (remote_connection_is_stdio): New function.
9731 (remote_prepare): Handle stdio connection.
9732 (remote_open): Ditto.
9733 (remote_close): Don't close stdin for stdio connections.
9734 (read_prim,write_prim): New functions. Replace all calls to
9735 read/write to these.
9736 * server.c (main): Watch for "-" argument. Move call to
9737 remote_prepare before start_inferior.
9738 * server.h (STDIO_CONNECTION_NAME): New macro.
9739 (remote_connection_is_stdio): Declare.
9740
9741 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9742 in debugging output.
9743
9744 2011-12-15 Yao Qi <yao@codesourcery.com>
9745
9746 * tracepoint.c: Include sys/syscall.h.
9747 (gdb_ust_thread): Remove preprocessor conditional.
9748
9749 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9750
9751 * linux-low.c (linux_detach_one_lwp): Call
9752 the_low_target.prepare_to_resume before detaching.
9753
9754 2011-12-14 Yao Qi <yao@codesourcery.com>
9755
9756 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9757 of write.
9758
9759 2011-12-14 Yao Qi <yao@codesourcery.com>
9760
9761 * i386-low.c (i386_low_stopped_data_address): Initialize local
9762 variable `control'.
9763
9764 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9765
9766 PR remote/13492
9767
9768 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9769 DR_CONTROL unless necessary. Extend comments.
9770 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9771 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9772
9773 2011-12-13 Yao Qi <yao@codesourcery.com>
9774
9775 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9776 macros.
9777 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9778
9779 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9780
9781 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9782 Print new debug message for such case.
9783
9784 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9785
9786 Fix overlapping memcpy.
9787 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9788 the read_inferior_memory transfer.
9789 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9790 write_inferior_memory transfer.
9791 (set_fast_tracepoint_jump): New variable buf. Use it for the
9792 read_inferior_memory and write_inferior_memory transfers.
9793 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9794 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9795 Use it for the write_inferior_memory transfer.
9796 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9797 buffers.
9798
9799 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9800
9801 * linux-low.c (fetch_register, store_register): Make code
9802 consistent, fix formatting.
9803
9804 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9805
9806 * linux-low.c (usr_store_inferior_registers): Factor out code
9807 to handle individual registers into...
9808 (store_register): ... this new function.
9809
9810 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9811
9812 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9813 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9814 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9815 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9816 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9817 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9818 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9819 (srv_xmlfiles): Add new XML files.
9820
9821 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9822 and <sys/uio.h>.
9823 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9824 (init_registers_s390_linux32v1): Add prototype.
9825 (init_registers_s390_linux32v2): Likewise.
9826 (init_registers_s390_linux64v1): Likewise.
9827 (init_registers_s390_linux64v2): Likewise.
9828 (init_registers_s390x_linux64v1): Likewise.
9829 (init_registers_s390x_linux64v2): Likewise.
9830 (s390_num_regs): Increment to 52.
9831 (s390_regmap): Add orig_r2 register.
9832 (s390_num_regs_3264): Increment to 68.
9833 (s390_regmap_3264): Add orig_r2 register.
9834 (s390_collect_ptrace_register): Handle orig_r2 register.
9835 (s390_supply_ptrace_register): Likewise.
9836 (s390_fill_last_break): New function.
9837 (s390_store_last_break): Likewise.
9838 (s390_fill_system_call): New function.
9839 (s390_store_system_call): Likewise.
9840 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9841 register sets.
9842 (s390_check_regset): New function.
9843 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9844 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9845 Update target_regsets for available register sets.
9846
9847 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9848 Jan Kratochvil <jan.kratochvil@redhat.com>
9849
9850 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9851 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9852 New.
9853 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9854 * linux-low.h (struct process_info_private): New member r_debug.
9855 * server.c (handle_qxfer_libraries): Call
9856 the_target->qxfer_libraries_svr4.
9857 (handle_qxfer_libraries_svr4): New function.
9858 (qxfer_packets): New entry "libraries-svr4".
9859 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9860 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9861 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9862 PACKET_qXfer_libraries_svr4.
9863
9864 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9865
9866 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9867 PSW address/mask between 8-byte and 16-byte formats.
9868 (s390_supply_ptrace_register): Likewise.
9869 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9870 basic addressing mode bit.
9871
9872 2011-11-24 Stan Shebs <stan@codesourcery.com>
9873
9874 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9875
9876 2011-11-17 Stan Shebs <stan@codesourcery.com>
9877
9878 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9879 (tracing_start_time): New global.
9880 (tracing_stop_time): New global.
9881 (tracing_user_name): New global.
9882 (tracing_notes): New global.
9883 (tracing_stop_note): New global.
9884 (cmd_qtstart): Set traceframe_usage, start_time.
9885 (stop_tracing): Set stop_time.
9886 (cmd_qtstatus): Report additional status.
9887 (cmd_qtp): New function.
9888 (handle_tracepoint_query): Call it.
9889 (cmd_qtnotes): New function.
9890 (handle_tracepoint_general_set): Call it.
9891 (get_timestamp): Rename from tsv_get_timestamp.
9892
9893 2011-11-14 Stan Shebs <stan@codesourcery.com>
9894 Kwok Cheung Yeung <kcy@codesourcery.com>
9895
9896 * linux-x86-low.c (small_jump_insn): New.
9897 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9898 trampoline and error message, build a trampoline and issue a small
9899 jump instruction to it.
9900 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9901 trampoline and error message.
9902 (x86_get_min_fast_tracepoint_insn_len): New.
9903 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9904 * linux-low.h (struct linux_target_ops): Add arguments to
9905 install_fast_tracepoint_jump_pad operation, add new operation.
9906 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9907 arguments.
9908 (linux_get_min_fast_tracepoint_insn_len): New function.
9909 (linux_target_op): Add new operation.
9910 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9911 (gdb_trampoline_buffer_end): Ditto.
9912 (gdb_trampoline_buffer_error): Ditto.
9913 (struct ipa_sym_addresses): Add fields for new IPA variables.
9914 (symbol_list): Add entries for new IPA variables.
9915 (struct tracepoint): Add fields to hold the address range of the
9916 trampoline used by the tracepoint.
9917 (trampoline_buffer_head): New static variable.
9918 (trampoline_buffer_tail): Ditto.
9919 (claim_trampoline_space): New function.
9920 (have_fast_tracepoint_trampoline_buffer): New function.
9921 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9922 structure.
9923 (install_fast_tracepoint): Ditto, also add error buffer argument.
9924 (cmd_qtminftpilen): New function.
9925 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9926 (fast_tracepoint_from_trampoline_address): New function.
9927 (fast_tracepoint_collecting): Handle trampoline as part of jump
9928 pad space.
9929 (set_trampoline_buffer_space): New function.
9930 (initialize_tracepoint): Initialize new IPA variables.
9931 * target.h (struct target_ops): Add arguments to
9932 install_fast_tracepoint_jump_pad operation, add new
9933 get_min_fast_tracepoint_insn_len operation.
9934 (target_get_min_fast_tracepoint_insn_len): New.
9935 (install_fast_tracepoint_jump_pad): Add arguments.
9936 * server.h (IPA_BUFSIZ): Define.
9937 * linux-i386-ipa.c: Include extra header files.
9938 (initialize_fast_tracepoint_trampoline_buffer): New function.
9939 (initialize_low_tracepoint): Call it.
9940 * server.h (set_trampoline_buffer_space): Declare.
9941 (claim_trampoline_space): Ditto.
9942 (have_fast_tracepoint_trampoline_buffer): Ditto.
9943
9944 2011-11-14 Yao Qi <yao@codesourcery.com>
9945
9946 * server.c (handle_query): Handle InstallInTrace for qSupported.
9947 * tracepoint.c (add_tracepoint): Sort list.
9948 (install_tracepoint, download_tracepoint): New.
9949 (cmd_qtdp): Call them to install and download tracepoints.
9950 (sort_tracepoints): Removed.
9951 (cmd_qtstart): Update.
9952
9953 2011-11-14 Yao Qi <yao@codesourcery.com>
9954
9955 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9956 * mem-break.h: Declare.
9957 * tracepoint.c (cmd_qtstart): Move some code to ...
9958 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9959 New.
9960 (download_tracepoints): Move some code to ...
9961 (download_tracepoint_1): ... here. New.
9962
9963 2011-11-08 Yao Qi <yao@codesourcery.com>
9964
9965 * remote-utils.c (relocate_instruction): A comment fix.
9966
9967 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9968
9969 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9970 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9971 dr_status_mirror and dr_control_mirror from debug_reg_state.
9972 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9973 (i386_initial_stuff): Remove use of deleted globals.
9974 (i386_get_thread_context, i386_set_thread_context,
9975 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9976 from debug_reg_state.
9977
9978 2011-11-05 Yao Qi <yao@codesourcery.com>
9979
9980 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9981 address as TPOINT's.
9982
9983 2011-11-02 Stan Shebs <stan@codesourcery.com>
9984
9985 * tracepoint.c (agent_mem_read_string): New function.
9986 (eval_agent_expr): Call it for tracenz.
9987 * server.c (handle_query): Report support for tracenz.
9988
9989 2011-11-02 Yao Qi <yao@codesourcery.com>
9990
9991 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9992
9993 2011-11-02 Yao Qi <yao@codesourcery.com>
9994
9995 * target.h: Fix a typo in comment.
9996
9997 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9998
9999 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10000 clobber the breakpoints' shadows with fast tracepoint jumps.
10001 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10002 * target.c (write_inferior_memory): Also pass MYADDR down to
10003 check_mem_write.
10004
10005 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10006
10007 * configure.ac: Check support for personality routine.
10008 * configure: Regenerate.
10009 * config.in: Likewise.
10010 * linux-low.c: Include <sys/personality.h>.
10011 Define ADDR_NO_RANDOMIZE if necessary.
10012 (linux_create_inferior): Disable address space randomization when
10013 forking inferior, if requested.
10014 (linux_supports_disable_randomization): New function.
10015 (linux_target_ops): Install it.
10016 * server.h (disable_randomization): Declare.
10017 * server.c (disable_randomization): New global variable.
10018 (handle_general_set): Handle QDisableRandomization.
10019 (handle_query): Likewise for qSupported.
10020 (main): Support --disable-randomization and --no-disable-randomization
10021 command line arguments.
10022 * target.h (struct target_ops): Add supports_disable_randomization.
10023 (target_supports_disable_randomization): New macro.
10024
10025 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10026
10027 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10028 ifdef check.
10029 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10030 [!PT_GETDSBT] (target_loadmap): New definition.
10031 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10032 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10033 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10034 and PT_GETDSBT to LINUX_LOADMAP.
10035 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10036 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10037
10038 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10039
10040 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10041 (arm_linux_hwbp_cap): New static variable.
10042 (arm_linux_get_hwbp_cap): Replace by ...
10043 (arm_linux_init_hwbp_cap): ... this new function.
10044 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10045 (arm_linux_get_hw_watchpoint_count): Likewise.
10046 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10047 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10048 (arm_prepare_to_resume): Use perror_with_name instead of error.
10049
10050 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10051
10052 * linux-arm-low.c: Include <signal.h>.
10053 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10054 (struct arm_linux_hwbp_cap): New data type.
10055 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10056 (struct arm_linux_hw_breakpoint): New data type.
10057 (MAX_BPTS, MAX_WPTS): Define.
10058 (struct arch_process_info, struct arch_lwp_info): New data types.
10059 (arm_linux_get_hwbp_cap): New function.
10060 (arm_linux_get_hw_breakpoint_count): Likewise.
10061 (arm_linux_get_hw_watchpoint_count): Likewise.
10062 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10063 (arm_hwbp_control_initialize): Likewise.
10064 (arm_hwbp_control_is_enabled): Likewise.
10065 (arm_hwbp_control_is_initialized): Likewise.
10066 (arm_hwbp_control_disable): Likewise.
10067 (arm_linux_hw_breakpoint_equal): Likewise.
10068 (arm_linux_hw_point_initialize): Likewise.
10069 (struct update_registers_data): New data structure.
10070 (update_registers_callback: New function.
10071 (arm_insert_point): Likewise.
10072 (arm_remove_point): Likewise.
10073 (arm_stopped_by_watchpoint): Likewise.
10074 (arm_stopped_data_address): Likewise.
10075 (arm_new_process): Likewise.
10076 (arm_new_thread): Likewise.
10077 (arm_prepare_to_resume): Likewise.
10078 (the_low_target): Register arm_insert_point, arm_remove_point,
10079 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10080 arm_new_thread, and arm_prepare_to_resume.
10081
10082 2011-09-15 Stan Shebs <stan@codesourcery.com>
10083
10084 * server.h (struct emit_ops): Add compare-goto fields.
10085 * tracepoint.c (gdb_agent_op_sizes): New table.
10086 (emit_eq_goto): New function.
10087 (emit_ne_goto): New function.
10088 (emit_lt_goto): New function.
10089 (emit_le_goto): New function.
10090 (emit_gt_goto): New function.
10091 (emit_ge_goto): New function.
10092 (is_goto_target): New function.
10093 (compile_bytecodes): Recognize special cases of compare-goto
10094 combinations and call specialized emitters for them.
10095 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10096 (amd64_emit_ne_goto): New function.
10097 (amd64_emit_lt_goto): New function.
10098 (amd64_emit_le_goto): New function.
10099 (amd64_emit_gt_goto): New function.
10100 (amd64_emit_ge_goto): New function.
10101 (amd64_emit_ops): Add the new functions.
10102 (i386_emit_eq_goto): New function.
10103 (i386_emit_ne_goto): New function.
10104 (i386_emit_lt_goto): New function.
10105 (i386_emit_le_goto): New function.
10106 (i386_emit_gt_goto): New function.
10107 (i386_emit_ge_goto): New function.
10108 (i386_emit_ops): Add the new functions.
10109
10110 2011-09-08 Stan Shebs <stan@codesourcery.com>
10111
10112 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10113 (i386_emit_epilogue): Restore %ebx.
10114
10115 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10116
10117 * server.c (step_thread): Remove definition.
10118 (process_serial_event): Don't handle Hs.
10119 * server.h (step_thread): Remove declaration.
10120 * target.c (set_desired_inferior): Remove use of step_thread.
10121
10122 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10123
10124 * linux-low.c: Include linux-procfs.h.
10125 (linux_attach_lwp_1): Update comments.
10126 (linux_attach): Scan for existing threads when attaching to a
10127 process that is the tgid.
10128 * Makefile.in: Update dependencies.
10129
10130 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10131
10132 * configure.srv: Add linux-procfs.o dependencies.
10133
10134 2011-08-14 Yao Qi <yao@codesourcery.com>
10135
10136 * target.h (struct target_ops): Fix indent.
10137 * win32-low.c (win32_target_ops): Fix comment.
10138
10139 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10140 Yao Qi <yao@codesourcery.com>
10141
10142 * Makefile.in (clean): Remove tic6x-*.c files.
10143 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10144 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10145 (tic6x-c64xp-linux.c): Likewise.
10146 * configure.srv: Add support for tic6x-*-uclinux.
10147 * linux-tic6x-low.c: New.
10148 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10149
10150 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10151 Yao Qi <yao@codesourcery.com>
10152
10153 * target.h (struct target_ops): Add read_loadmap.
10154 * linux-low.c (struct target_loadseg): New type.
10155 (struct target_loadmap): New type.
10156 (linux_read_loadmap): New function.
10157 (linux_target_ops): Add linux_read_loadmap.
10158 * server.c (handle_query): Support qXfer:fdpic:read packet.
10159 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10160 to NULL.
10161
10162 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10163
10164 * win32-low.c: Include <stdint.h>.
10165
10166 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10167
10168 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10169 to the inferior here.
10170 (i386_remove_aligned_watchpoint): Ditto.
10171 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10172 fit part of the watchpoint in the debug registers.
10173 (i386_update_inferior_debug_regs): New.
10174 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10175 registers, and only update the inferior on success.
10176 (i386_low_remove_watchpoint): Ditto.
10177
10178 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10179
10180 * linux-low.c (compare_ints, unique, list_threads, show_process,
10181 linux_core_of_thread): Delete.
10182 (linux_target_ops): Change linux_core_of_thread to
10183 linux_common_core_of_thread.
10184 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10185 * utils.c (malloc_failure): Change type of argument.
10186 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10187 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10188 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10189 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10190 (IPA_OBJS): Add common-utils-ipa.o.
10191 (ptid_h, linux_osdata_h): New macros.
10192 (server_h): Add common/common-utils.h, common/xml-utils.h,
10193 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10194 common/ptid.h.
10195 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10196 ptid.o, buffer.o): New rules.
10197 (linux-low.o): Add common/linux-osdata.h as a dependency.
10198 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10199 * configure.ac: Add AC_HEADER_DIRENT check.
10200 * config.in: Regenerate.
10201 * configure: Regenerate.
10202 * remote-utils.c (xml_escape_text): Delete.
10203 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10204 buffer_xml_printf): Move to common/buffer.c.
10205 * server.c (main): Remove call to initialize_inferiors.
10206 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10207 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10208 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10209 internal_error, gdb_assert, gdb_assert_fail): Delete.
10210 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10211 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10212 common/buffer.h.
10213 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10214 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10215 initialize_inferiors): Delete.
10216
10217 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10218
10219 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10220 symbol error.
10221
10222 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10223
10224 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10225 assertion.
10226 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10227
10228 2011-05-26 Yao Qi <yao@codesourcery.com>
10229
10230 * Makefile.in (thread-db.o): Track dependence to
10231 common/gdb_thread_db.h.
10232 * thread-db.c: include gdb_thread_db.h from right place.
10233
10234 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10235
10236 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10237 __FILE__ and __LINE__ to internal_error.
10238
10239 2011-05-13 Doug Evans <dje@google.com>
10240
10241 * thread-db.c (try_thread_db_load_from_sdir): New function.
10242 (try_thread_db_load_from_dir): New function.
10243 (thread_db_load_search): Handle $sdir, ignore $pdir.
10244 Remove trying of system directories if search of
10245 libthread-db-search-path fails, that is now done via $sdir.
10246
10247 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10248
10249 * server.c (handle_query): Add EnableDisableTracepoints to the list
10250 of supported features.
10251 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10252 tracepoints.
10253 (cmd_qtenable_disable): New.
10254 (cmd_qtstart): Install tracepoints even if disabled.
10255 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10256 receiving a QTEnable or QTDisable packet.
10257 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10258 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10259 tracepoints.
10260 (gdb_probe): Skip data collection if static tracepoint is disabled.
10261
10262 2011-05-10 Doug Evans <dje@google.com>
10263
10264 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10265
10266 2011-05-04 Doug Evans <dje@google.com>
10267
10268 * linux-low.c (linux_join): Skip process lookup.
10269 * spu-low.c (spu_join): Ditto.
10270 * server.c (join_inferiors_callback): Delete.
10271 (process_serial_event): For 'D' packet (detach) call join_inferior
10272 directly.
10273
10274 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10275
10276 * README: Don't mention xscale*-*-linux*.
10277 * configure.srv (xscale*-*-linux*): Don't handle target.
10278
10279 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10280
10281 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10282 casting pointers.
10283 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10284 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10285 (i386_emit_void_call_2): Likewise.
10286
10287 2011-04-26 Yao Qi <yao@codesourcery.com>
10288
10289 * linux-low.c: Move common macros to linux-ptrace.h.
10290 Include linux-ptrace.h.
10291 * Makefile.in (linux_ptrace_h): New.
10292 (linux-low.o): Depends on linux-ptrace.h.
10293
10294 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10295
10296 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10297 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10298 (remote_prepare): New function with most of the TCP code from ...
10299 (remote_open): ... here. Detect PORT here unconditionally. Move also
10300 setting transport_is_reliable.
10301 * server.c (run_once): New variable.
10302 (gdbserver_usage): Document it.
10303 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10304 the first run if RUN_ONCE.
10305 * server.h (run_once, remote_prepare): New declarations.
10306
10307 2011-04-19 Tom Tromey <tromey@redhat.com>
10308
10309 * win32-low.c (handle_load_dll): Remove duplicate "the".
10310
10311 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10312
10313 Remove support for old Cygwin 1.5 versions.
10314 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10315 function to avoid warning.
10316 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10317 warning.
10318
10319 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10320
10321 * gdbserver/server.h (Macro _): Define it if not available.
10322
10323 2011-03-14 Michael Snyder <msnyder@vmware.com>
10324
10325 * hostio.c (handle_close): Remove unnecessary null test.
10326
10327 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10328
10329 * Makefile.in (maintainer-clean realclean distclean): Remove
10330 "make ... subdir_do" command.
10331
10332 2011-03-10 Michael Snyder <msnyder@vmware.com>
10333
10334 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10335
10336 * server.c (handle_v_run): Free alloced buffer on early return.
10337
10338 2011-03-09 Yao Qi <yao@codesourcery.com>
10339
10340 Revert:
10341 2011-03-04 Yao Qi <yao@codesourcery.com>
10342
10343 * Makefile.in: Remove GNU make feature --directory.
10344
10345 2011-03-05 Yao Qi <yao@codesourcery.com>
10346
10347 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10348 (subdir_do): New make target. Copied from gdb/Makefile.
10349 (maintainer-clean, realclean, distclean, clean): Call corresponding
10350 make targets in common/Makefile.
10351
10352 2011-02-11 Yao Qi <yao@codesourcery.com>
10353
10354 * configure.ac: Call AC_PROG_RANLIB.
10355 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10356 * configure: Regenerate.
10357
10358 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10359
10360 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10361
10362 2011-03-06 Yao Qi <yao@codesourcery.com>
10363
10364 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10365
10366 2011-03-05 Yao Qi <yao@codesourcery.com>
10367
10368 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10369 (subdir_do): New make target. Copied from gdb/Makefile.
10370 (maintainer-clean, realclean, distclean, clean): Call corresponding
10371 make targets in common/Makefile.
10372
10373 2011-03-04 Yao Qi <yao@codesourcery.com>
10374
10375 * Makefile.in: Remove GNU make feature --directory.
10376
10377 2011-03-04 Michael Snyder <msnyder@vmware.com>
10378
10379 * server.c (queue_stop_reply): Call xmalloc not malloc.
10380
10381 2011-03-02 Michael Snyder <msnyder@vmware.com>
10382
10383 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10384
10385 2011-02-28 Michael Snyder <msnyder@vmware.com>
10386
10387 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10388 (cmd_qtframe): Ditto.
10389 (cmd_qtbuffer): Ditto.
10390 (cmd_bigqtbuffer): Ditto.
10391
10392 * utils.c (decimal2str): Initialize 'width' to nine, then
10393 don't mess with it.
10394
10395 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10396
10397 * hostio.c (require_data): Free *data, not data.
10398
10399 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10400
10401 * hostio.c (require_data): Use free, not xfree.
10402
10403 2011-02-27 Michael Snyder <msnyder@vmware.com>
10404
10405 * server.c (handle_query): Discard unused value.
10406
10407 * hostio.c (require_data): Free malloc memory before returning
10408 error.
10409
10410 2011-02-26 Michael Snyder <msnyder@vmware.com>
10411
10412 * linux-low.c (list_threads): Call closedir for dirent.
10413
10414 2011-02-27 Michael Snyder <msnyder@vmware.com>
10415
10416 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10417 a case statement falls through.
10418
10419 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10420
10421 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10422 in comparison.
10423
10424 2011-02-26 Michael Snyder <msnyder@vmware.com>
10425
10426 * utils.c (decimal2str): Eliminate dead code and dead param.
10427 (pulongest): Drop dead param from call to decimal2str.
10428 (plongest): Ditto.
10429
10430 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10431
10432 Revert the following patch (not approved yet):
10433 2011-02-21 Hui Zhu <teawater@gmail.com>
10434 * tracepoint.c (tp_printf): New function.
10435 (eval_agent_expr): Handle gdb_agent_op_printf.
10436
10437 2011-02-21 Hui Zhu <teawater@gmail.com>
10438
10439 * tracepoint.c (tp_printf): New function.
10440 (eval_agent_expr): Handle gdb_agent_op_printf.
10441
10442 2011-02-18 Tom Tromey <tromey@redhat.com>
10443
10444 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10445 (tracepoint.o): Likewise.
10446 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10447 (gdb_agent_op_names): Likewise.
10448
10449 2011-02-18 Tom Tromey <tromey@redhat.com>
10450
10451 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10452 gdb_agent_op_rot>: New constants.
10453 (gdb_agent_op_names): Add pick and roll.
10454 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10455 cases.
10456
10457 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10458
10459 * aclocal.m4: Regenerated with aclocal-1.11.1.
10460
10461 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10462
10463 * server.c (handle_qxfer_traceframe_info): New.
10464 (qxfer_packets): Register "traceframe-info".
10465 (handle_query): Report support for qXfer:traceframe-info:read+.
10466 * tracepoint.c (match_blocktype): New.
10467 (traceframe_find_block_type): Rename to ...
10468 (traceframe_walk_blocks): ... this. Add callback filter argument,
10469 and use it.
10470 (traceframe_find_block_type): New, reimplemented on top of
10471 traceframe_walk_blocks.
10472 (build_traceframe_info_xml): New.
10473 (traceframe_read_info): New.
10474 * server.h (traceframe_read_info): Declare.
10475
10476 2011-02-11 Yao Qi <yao@codesourcery.com>
10477
10478 * configure.ac: Call AC_PROG_RANLIB.
10479 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10480 * configure: Regenerate.
10481
10482 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10483
10484 * server.c (gdb_read_memory): Change return semantics to allow
10485 partial transfers.
10486 (handle_search_memory_1): Adjust.
10487 (process_serial_event) <'m' packet>: Handle partial transfers.
10488 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10489
10490 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10491
10492 * regcache.c (init_register_cache): Initialize
10493 regcache->register_status.
10494 (free_register_cache): Release regcache->register_status.
10495 (regcache_cpy): Copy register_status.
10496 (registers_to_string): Print 'x's for unavailable registers.
10497 (supply_register): Mark the register's status valid or
10498 unavailable, depending on whether a buffer was passed in or not.
10499 (supply_register_zeroed): New.
10500 (supply_regblock): Mark the registers' status valid or
10501 unavailable, depending on whether a buffer was passed in or not.
10502 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10503 (struct regcache): New `register_status' field.
10504 (supply_register_zeroed): Declare.
10505 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10506 supply_register_zeroed, rather than passing a NULL buffer to
10507 supply_register.
10508 * tracepoint.c (fetch_traceframe_registers): Update comment.
10509
10510 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10511
10512 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10513 buffer explicit.
10514
10515 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10516
10517 * server.h (decode_xfer_write): Change prototype.
10518 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10519 and don't extract the annex here.
10520 * server.c (decode_xfer_read): Remove `annex' parameter,
10521 and don't extract the annex here.
10522 (decode_xfer): New.
10523 (struct qxfer): New.
10524 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10525 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10526 (handle_qxfer_statictrace): New functions, abstracted out from
10527 handle_query, and made to use the struct qxfer interface.
10528 (handle_threads_qxfer_proper): Rename to ...
10529 (handle_qxfer_threads_proper): ... this.
10530 (handle_threads_qxfer): Rename to ...
10531 (handle_qxfer_threads): ... this. Adjust.
10532 (qxfer_packets): New array.
10533 (handle_qxfer): New function.
10534 (handle_query): Use handle_qxfer.
10535
10536 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10537
10538 * gdbreplay.c: Shorten lines of >= 80 columns.
10539 * linux-low.c: Ditto.
10540 * linux-ppc-low.c: Ditto.
10541 * linux-s390-low.c: Ditto.
10542 * linux-sparc-low.c: Ditto.
10543 * linux-x86-low.c: Ditto.
10544 * linux-xtensa-low.c: Ditto.
10545 * mem-break.c: Ditto.
10546 * nto-low.c: Ditto.
10547 * regcache.h: Ditto.
10548 * remote-utils.c: Ditto.
10549 * server.c: Ditto.
10550 * server.h: Ditto.
10551 * thread-db.c: Ditto.
10552 * tracepoint.c: Ditto.
10553 * utils.c: Ditto.
10554 * win32-low.h: Ditto.
10555
10556 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10557
10558 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10559 update.
10560
10561 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10562
10563 * server.c (gdbserver_version): Update copyright year in version
10564 output.
10565 * gdbreplay.c (gdbreplay_version): Ditto.
10566
10567 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10568
10569 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10570 * linux-bfin-low.c: New file.
10571 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10572 PT_DATA_ADDR for BFIN targets.
10573 * Makefile.in (SFILES): Add linux-bfin-low.c.
10574 (clean): Remove reg-bfin.c.
10575 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10576 * README: Mention supported Blackfin targets.
10577
10578 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10579
10580 * .gitignore: New file.
10581
10582 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10583
10584 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10585
10586 2010-10-22 Jie Zhang <jie@codesourcery.com>
10587
10588 * Makefile.in: Add FLAGS_TO_PASS variable.
10589 (install): Remove dependency of install-only and recursively
10590 invoke make for install-only.
10591
10592 2010-10-04 Doug Evans <dje@google.com>
10593
10594 * Makefile.in (uninstall): Use $(DESTDIR).
10595
10596 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10597
10598 PR gdb/11842
10599
10600 * linux-x86-low.c (compat_siginfo_from_siginfo)
10601 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10602 si_code is < 0. Check for si_code == SI_TIMER before checking for
10603 si_code < 0.
10604
10605 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10606
10607 * lynx-i386-low.c: New file.
10608 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10609
10610 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10611
10612 * lynx-low.c (ptrace_request_to_str): Remove handling for
10613 request values that have been removed in LynxOS 5.x.
10614
10615 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10616
10617 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10618 <ptrace.h>
10619
10620 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10621
10622 * configure.ac: Add --enable-inprocess-agent option.
10623 * configure: Rebuilt.
10624
10625 2010-09-06 Yao Qi <yao@codesourcery.com>
10626
10627 * linux-low.c (linux_kill): Remove unused variable.
10628 (linux_stabilize_threads): Likewise.
10629 * server.c (start_inferior): Likewise.
10630 (queue_stop_reply_callback): Likewise.
10631 * tracepoint.c (do_action_at_tracepoint): Likewise.
10632
10633 2010-09-06 Yao Qi <yao@codesourcery.com>
10634
10635 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10636 on return.
10637
10638 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10639
10640 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10641
10642 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10643
10644 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10645 "$(IPA_DEPFILES)".
10646
10647 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10648
10649 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10650 gdbserver/lynx-ppc-low.c: New files.
10651 * Makefile.in (lynx_low_h): New variable.
10652 (lynx-low.o, lynx-ppc-low.o): New rules.
10653 * configure.ac: On LynxOS, link with -lnetinet.
10654 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10655 * configure: regenerate.
10656
10657 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10658
10659 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10660 * configure.ac: Add check for vasprintf and vsnprintf.
10661 * configure, config.in: Regenerate.
10662 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10663
10664 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10665
10666 * gdbreplay.c: Move include of alloca.h up, next to include of
10667 malloc.h.
10668 * server.h: Add include of malloc.h.
10669 * mem-break.c: Remove include of malloc.h.
10670 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10671
10672 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10673
10674 * Makefile.in (memmem.o): Build with -Wno-error.
10675
10676 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10677
10678 * utils.c (xsnprintf): Make non-static.
10679 * server.h: Add xsnprintf declaration.
10680 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10681 replace calls to snprintf by calls to xsnprintf throughout.
10682
10683 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10684
10685 * configure.ac: Add configure check for alloca.
10686 * configure, config.in: Regenerate.
10687 * server.h: Include alloca.h if it exists.
10688 * gdbreplay.c: Include alloca.h if it exists.
10689
10690 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10691
10692 * linux-low.c (__SIGRTMIN): Define if not already defined.
10693 (linux_create_inferior): Check for __ANDROID__ rather than
10694 __SIGRTMIN.
10695 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10696 are already deferred.
10697 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10698 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10699 stopped and already has a pending signal to report.
10700 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10701 a pending signal to report or is moving out of a jump pad.
10702 (linux_init_signals): Check for __ANDROID__ rather than
10703 __SIGRTMIN.
10704
10705 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10706
10707 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10708 debug_threads check. Avoid a linear search when not doing debug
10709 output.
10710
10711 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10712
10713 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10714 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10715 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10716 (process_event): Change local fd's type to gdb_fildes_t.
10717 (create_file_handler): Adjust prototype.
10718 (delete_file_handler): Adjust prototype.
10719 (handle_file_event): Adjust prototype. Use pfildes.
10720 (create_file_event): Adjsut prototype.
10721 * remote-utils.c (remote_desc, listen_desc): Change type to
10722 gdb_fildes_t.
10723 * server.h: New gdb_fildes_t typedef.
10724 [USE_WIN32API]: Include winsock2.h.
10725 (delete_file_handler, add_file_handler): Adjust prototypes.
10726 (pfildes): Declare.
10727 * utils.c (pfildes): New.
10728
10729 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10730
10731 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10732 * configure: Regenerate.
10733
10734 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10735
10736 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10737 (linux_done_accessing_memory): ... this.
10738 (linux_target_ops): Adjust.
10739 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10740 * nto-low.c (nto_target_ops): Adjust comment.
10741 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10742 * spu-low.c (spu_target_ops): Adjust comment.
10743 * target.h (target_ops): Rename unprepare_to_access_memory field
10744 to done_accessing_memory.
10745 (unprepare_to_access_memory): Rename to ...
10746 (done_accessing_memory): ... this.
10747
10748 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10749
10750 * linux-low.c (linux_prepare_to_access_memory): New.
10751 (linux_unprepare_to_access_memory): New.
10752 (linux_target_ops): Install them.
10753 * server.c (read_memory): Rename to ...
10754 (gdb_read_memory): ... this. Use
10755 prepare_to_access_memory/prepare_to_access_memory.
10756 (write_memory): Rename to ...
10757 (gdb_write_memory): ... this. Use
10758 prepare_to_access_memory/prepare_to_access_memory.
10759 (handle_search_memory_1): Adjust.
10760 (process_serial_event): Adjust.
10761 * target.h (struct target_ops): New fields
10762 prepare_to_access_memory and unprepare_to_access_memory.
10763 (prepare_to_access_memory, unprepare_to_access_memory): New.
10764 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10765 prepare_to_access_memory/prepare_to_access_memory.
10766 * nto-low.c (nto_target_ops): Adjust.
10767 * spu-low.c (spu_target_ops): Adjust.
10768 * win32-low.c (win32_target_ops): Adjust.
10769
10770 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10771
10772 * Makefile.in (WARN_CFLAGS): Get it from configure.
10773 (WERROR_CFLAGS): New.
10774 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10775 * configure.ac: Introduce --enable-werror, which adds -Werror to
10776 the compiler command line. Enabled by default. Disable with
10777 --disable-werror. Add -Wdeclaration-after-statement
10778 Wpointer-arith and -Wformat-nonliteral to warning flags.
10779 * configure: Regenerate.
10780
10781 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10782
10783 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10784
10785 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10786
10787 * gdbreplay.c (remote_error): New.
10788 (gdbchar): New.
10789 (expect): Use gdbchar. Check for error reading from GDB.
10790 Clarify sync error output.
10791 (play): Check for errors writing to GDB.
10792 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10793 * remote-utils.c (getpkt): Check for errors writing to the remote
10794 descriptor.
10795
10796 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10797
10798 * linux-low.c (linux_wait_1): Move non-debugging code out of
10799 `debug_threads' control.
10800
10801 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10802
10803 * linux-low.c (linux_wait_1): Don't set last_status here.
10804 * server.c (push_event, queue_stop_reply_callback): Assert we're
10805 not pushing a TARGET_WAITKIND_IGNORE event.
10806 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10807 (myresume, handle_target_event): Set the thread's last_resume_kind
10808 and last_status from the target returned status.
10809
10810 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10811
10812 PR threads/10729
10813
10814 * linux-x86-low.c (update_debug_registers_callback): New.
10815 (i386_dr_low_set_addr): Use it.
10816 (i386_dr_low_get_addr): New.
10817 (i386_dr_low_set_control): Use update_debug_registers_callback.
10818 (i386_dr_low_get_control): New.
10819 (i386_dr_low_get_status): Adjust.
10820 * linux-low.c (linux_stop_lwp): New.
10821 * linux-low.h (linux_stop_lwp): Declare.
10822
10823 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10824 argument instead of a i386_debug_reg_state.
10825 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10826 a i386_debug_reg_state.
10827 (i386_insert_aligned_watchpoint): Adjust.
10828 (i386_remove_aligned_watchpoint): Adjust.
10829 (i386_low_stopped_data_address): Read the debug registers from the
10830 inferior instead of from the mirrors.
10831 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10832 (i386_dr_low_get_addr): Declare.
10833 (i386_dr_low_get_control): Declare.
10834 (i386_dr_low_get_status): Change prototype.
10835
10836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10837 (i386_dr_low_get_addr): New.
10838 (i386_dr_low_get_control): New.
10839 (i386_dr_low_get_status): Adjust prototype. Return
10840 dr_status_mirror.
10841 (i386_initial_stuff): Clear dr_status_mirror and
10842 dr_control_mirror.
10843 (i386_get_thread_context): Adjust.
10844 (i386_set_thread_context): Adjust.
10845 (i386_thread_added): Adjust.
10846
10847 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10848
10849 * linux-low.h (linux_thread_area): Delete declaration.
10850
10851 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10852
10853 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10854 after its termination.
10855
10856 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10857
10858 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10859 (gdb_wants_all_stopped): Delete.
10860 (linux_wait_1): Don't call them.
10861 * server.c (handle_v_cont): Tag all threads as want-stopped.
10862 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10863 stopped as "client-wants-stopped".
10864
10865 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10866
10867 * Makefile.in (signals_h): New.
10868 (server_h): Depend on it.
10869 (server.o): Don't depend on $(signals_def).
10870 (signals.o): Depend on $(signals_def).
10871
10872 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10873
10874 * Makefile.in (signals_def): New.
10875 (server_h): Append include/gdb/signals.h and signals_def.
10876 (server.o): Append signals_def.
10877
10878 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10879
10880 * server.c (handle_target_event): Use target_signal_to_host for
10881 resume_info.sig initialization.
10882 * target.h (struct thread_resume) <sig>: New comment.
10883
10884 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10885
10886 * server.c (handle_query): strcpy() the returned string from paddress()
10887 instead of sprintf().
10888 * utils.c (paddress): Return phex_nz().
10889
10890 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10891
10892 * server.c (handle_v_cont): Call mourn_inferior if process
10893 just exited.
10894 (myresume): Likewise.
10895
10896 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10897
10898 Static tracepoints, and integration with UST.
10899
10900 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10901 * mem-break.c (uninsert_all_breakpoints)
10902 (reinsert_all_breakpoints): New.
10903 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10904 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10905 (gdb_agent_ust_loaded, helper_thread_id)
10906 (gdb_agent_helper_thread_id): New macros.
10907 (struct ipa_sym_addresses): Add addr_ust_loaded,
10908 addr_helper_thread_id, addr_cmd_buf.
10909 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10910 (in_process_agent_loaded_ust): New.
10911 (write_e_ust_not_loaded): New.
10912 (maybe_write_ipa_ust_not_loaded): New.
10913 (struct collect_static_trace_data_action): New.
10914 (enum tracepoint_type) <static_tracepoint>: New.
10915 (struct tracepoint) <handle>: Mention static tracepoints.
10916 (struct static_tracepoint_ctx): New.
10917 (CMD_BUF_SIZE): New.
10918 (add_tracepoint_action): Handle static tracepoint actions.
10919 (unprobe_marker_at): New.
10920 (clear_installed_tracepoints): Handle static tracepoints.
10921 (cmd_qtdp): Handle static tracepoints.
10922 (probe_marker_at): New.
10923 (cmd_qtstart): Handle static tracepoints.
10924 (response_tracepoint): Handle static tracepoints.
10925 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10926 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10927 (get_context_regcache): Handle static tracepoints.
10928 (do_action_at_tracepoint): Handle static tracepoint actions.
10929 (traceframe_find_block_type): Handle static trace data blocks.
10930 (traceframe_read_sdata): New.
10931 (download_tracepoints): Download static tracepoint actions.
10932 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10933 (GDB_PROBE_NAME): New.
10934 (ust_ops): New.
10935 (GET_UST_SYM): New.
10936 (USTF): New.
10937 (dlsym_ust): New.
10938 (ust_marker_to_static_tracepoint): New.
10939 (gdb_probe): New.
10940 (collect_ust_data_at_tracepoint): New.
10941 (gdb_ust_probe): New.
10942 (UNIX_PATH_MAX, SOCK_DIR): New.
10943 (gdb_ust_connect_sync_socket): New.
10944 (resume_thread, stop_thread): New.
10945 (run_inferior_command): New.
10946 (init_named_socket): New.
10947 (gdb_ust_socket_init): New.
10948 (cstr_to_hexstr): New.
10949 (next_st): New.
10950 (first_marker, next_marker): New.
10951 (response_ust_marker): New.
10952 (cmd_qtfstm, cmd_qtsstm): New.
10953 (unprobe_marker_at, probe_marker_at): New.
10954 (cmd_qtstmat, gdb_ust_thread): New.
10955 (gdb_ust_init): New.
10956 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10957 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10958 (ST_REGENTRY): New.
10959 (x86_64_st_collect_regmap): New.
10960 (X86_64_NUM_ST_COLLECT_GREGS): New.
10961 (AMD64_RIP_REGNUM): New.
10962 (supply_static_tracepoint_registers): New.
10963 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10964 (ST_REGENTRY): New.
10965 (i386_st_collect_regmap): New.
10966 (i386_NUM_ST_COLLECT_GREGS): New.
10967 (supply_static_tracepoint_registers): New.
10968 * server.c (handle_query): Handle qXfer:statictrace:read.
10969 <qSupported>: Report support for StaticTracepoints, and
10970 qXfer:statictrace:read features.
10971 * server.h (traceframe_read_sdata)
10972 (supply_static_tracepoint_registers): Declare.
10973 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10974 (unpack_varlen_hex): Include in IPA build.
10975 * Makefile.in (ustlibs, ustinc): New.
10976 (IPA_OBJS): Add remote-utils-ipa.o.
10977 ($(IPA_LIB)): Link -ldl and -lpthread.
10978 (UST_CFLAGS): New.
10979 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10980 * config.in, configure: Regenerate.
10981
10982 2010-06-20 Ian Lance Taylor <iant@google.com>
10983 Pedro Alves <pedro@codesourcery.com>
10984
10985 * linux-x86-low.c (always_true): Delete.
10986 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10987 trying to fool the compiler with always_true.
10988
10989 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10990
10991 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10992 conditions in gdbserver.
10993
10994 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10995
10996 * spu-low.c (spu_read_memory): Wrap around local store limit.
10997 (spu_write_memory): Likewise.
10998
10999 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11000
11001 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11002 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11003 LONGEST uses.
11004 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11005 uses.
11006 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11007 uses with LONGEST uses.
11008
11009 2010-06-14 Stan Shebs <stan@codesourcery.com>
11010 Pedro Alves <pedro@codesourcery.com>
11011
11012 Bytecode compiler.
11013
11014 * linux-x86-low.c: Include limits.h.
11015 (add_insns): New.
11016 (always_true): New.
11017 (EMIT_ASM): New.
11018 (EMIT_ASM32): New.
11019 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11020 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11021 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11022 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11023 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11024 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11025 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11026 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11027 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11028 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11029 (amd64_emit_void_call_2): New.
11030 (amd64_emit_ops): New.
11031 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11032 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11033 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11034 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11035 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11036 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11037 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11038 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11039 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11040 (i386_emit_stack_adjust, i386_emit_int_call_1)
11041 (i386_emit_void_call_2): New.
11042 (i386_emit_ops): New.
11043 (x86_emit_ops): New.
11044 (the_low_target): Install x86_emit_ops.
11045 * server.h (struct emit_ops): New.
11046 (get_raw_reg_func_addr): Declare.
11047 (current_insn_ptr, emit_error): Declare.
11048 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11049 (set_trace_state_variable_value): New defines.
11050 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11051 addr_get_trace_state_variable_value and
11052 addr_set_trace_state_variable_value.
11053 (symbol_list): New fields for get_raw_reg,
11054 get_trace_state_variable_value and set_trace_state_variable_value.
11055 (condfn): New typedef.
11056 (struct tracepoint): New field `compiled_cond'.
11057 (do_action_at_tracepoint): Clear compiled_cond.
11058 (get_trace_state_variable_value, set_trace_state_variable_value):
11059 Export in the IPA.
11060 (condition_true_at_tracepoint): If there's a compiled condition,
11061 run that.
11062 (current_insn_ptr, emit_error): New globals.
11063 (struct bytecode_address): New.
11064 (get_raw_reg_func_addr): New.
11065 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11066 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11067 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11068 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11069 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11070 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11071 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11072 (compile_tracepoint_condition, compile_bytecodes): New.
11073 * target.h (emit_ops): Forward declare.
11074 (struct target_ops): New field emit_ops.
11075 (target_emit_ops): New.
11076 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11077 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11078 * linux-low.c (linux_emit_ops): New.
11079 (linux_target_ops): Install it.
11080 * linux-low.h (struct linux_target_ops): New field emit_ops.
11081
11082 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11083
11084 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11085 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11086
11087 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11088 Stan Shebs <stan@codesourcery.com>
11089
11090 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11091 (all): Depend on $(extra_libraries).
11092 (install-only): Install the IPA.
11093 (IPA_OBJS, IPA_LIB): New.
11094 (clean): Remove the IPA lib.
11095 (IPAGENT_CFLAGS): New.
11096 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11097 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11098 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11099 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11100 * configure.ac: Check for atomic builtins support in the compiler.
11101 (IPA_DEPFILES, extra_libraries): Define.
11102 * configure.srv (ipa_obj): Add description.
11103 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11104 (i[34567]86-*-linux*): Set ipa_obj.
11105 (x86_64-*-linux*): Set ipa_obj.
11106 * linux-low.c (stabilizing_threads): New.
11107 (supports_fast_tracepoints): New.
11108 (linux_detach): Stabilize threads before detaching.
11109 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11110 the lwp is either not stabilizing, or is moving out of a jump pad.
11111 (linux_fast_tracepoint_collecting): New.
11112 (maybe_move_out_of_jump_pad): New.
11113 (enqueue_one_deferred_signal): New.
11114 (dequeue_one_deferred_signal): New.
11115 (linux_wait_for_event_1): If moving out of a jump pad, defer
11116 pending signals to later.
11117 (linux_stabilize_threads): New.
11118 (linux_wait_1): Check if threads need moving out of jump pads, and
11119 do it if so.
11120 (stuck_in_jump_pad_callback): New.
11121 (move_out_of_jump_pad_callback): New.
11122 (lwp_running): New.
11123 (linux_resume_one_lwp): Handle moving out of jump pads.
11124 (linux_set_resume_request): Dequeue deferred signals.
11125 (need_step_over_p): Also step over fast tracepoint jumps.
11126 (start_step_over): Also uninsert fast tracepoint jumps.
11127 (finish_step_over): Also reinsert fast tracepoint jumps.
11128 (linux_install_fast_tracepoint_jump): New.
11129 (linux_target_ops): Install linux_stabilize_threads and
11130 linux_install_fast_tracepoint_jump_pad.
11131 * linux-low.h (linux_target_ops) <get_thread_area,
11132 install_fast_tracepoint_jump_pad>: New fields.
11133 (struct lwp_info) <collecting_fast_tracepoint,
11134 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11135 (linux_get_thread_area): Declare.
11136 * linux-x86-low.c (jump_insn): New.
11137 (x86_get_thread_area): New.
11138 (append_insns): New.
11139 (push_opcode): New.
11140 (amd64_install_fast_tracepoint_jump_pad): New.
11141 (i386_install_fast_tracepoint_jump_pad): New.
11142 (x86_install_fast_tracepoint_jump_pad): New.
11143 (the_low_target): Install x86_get_thread_area and
11144 x86_install_fast_tracepoint_jump_pad.
11145 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11146 (struct fast_tracepoint_jump): New.
11147 (fast_tracepoint_jump_insn): New.
11148 (fast_tracepoint_jump_shadow): New.
11149 (find_fast_tracepoint_jump_at): New.
11150 (fast_tracepoint_jump_here): New.
11151 (delete_fast_tracepoint_jump): New.
11152 (set_fast_tracepoint_jump): New.
11153 (uninsert_fast_tracepoint_jumps_at): New.
11154 (reinsert_fast_tracepoint_jumps_at): New.
11155 (set_breakpoint_at): Use write_inferior_memory.
11156 (uninsert_raw_breakpoint): Use write_inferior_memory.
11157 (check_mem_read): Mask out fast tracepoint jumps.
11158 (check_mem_write): Mask out fast tracepoint jumps.
11159 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11160 (set_fast_tracepoint_jump): Declare.
11161 (delete_fast_tracepoint_jump)
11162 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11163 (reinsert_fast_tracepoint_jumps_at): Declare.
11164 * regcache.c: Don't compile many functions when building the
11165 in-process agent library.
11166 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11167 the register buffer in the heap.
11168 (free_register_cache): If the register buffer isn't owned by the
11169 regcache, don't free it.
11170 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11171 pre-existing register caches.
11172 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11173 type.
11174 (convert_ascii_to_int): : Constify `from' parameter type.
11175 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11176 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11177 the needed buffer in-place.
11178 (relocate_instruction): New.
11179 * server.c (handle_query) <qSymbols>: If the target supports
11180 tracepoints, give it a chance of looking up symbols. Report
11181 support for fast tracepoints.
11182 (handle_status): Stabilize threads.
11183 (process_serial_event): Adjust.
11184 * server.h (struct fast_tracepoint_jump): Forward declare.
11185 (struct process_info) <fast_tracepoint_jumps>: New field.
11186 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11187 (decode_X_packet, decode_M_packet): Adjust.
11188 (relocate_instruction): Declare.
11189 (in_process_agent_loaded): Declare.
11190 (tracepoint_look_up_symbols): Declare.
11191 (struct fast_tpoint_collect_status): Declare.
11192 (fast_tracepoint_collecting): Declare.
11193 (force_unlock_trace_buffer): Declare.
11194 (handle_tracepoint_bkpts): Declare.
11195 (initialize_low_tracepoint)
11196 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11197 * target.h (struct target_ops) <stabilize_threads,
11198 install_fast_tracepoint_jump_pad>: New fields.
11199 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11200 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11201 [HAVE_STDINT_H]: Include stdint.h.
11202 (trace_debug_1): Rename to ...
11203 (trace_vdebug): ... this.
11204 (trace_debug): Rename to ...
11205 (trace_debug_1): ... this. Add `level' parameter.
11206 (trace_debug): New.
11207 (ATTR_USED, ATTR_NOINLINE): New.
11208 (IP_AGENT_EXPORT): New.
11209 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11210 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11211 (about_to_request_buffer_space, trace_buffer_is_full)
11212 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11213 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11214 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11215 (traceframe_write_count, traceframes_created)
11216 (trace_state_variables)
11217 New renaming defines.
11218 (struct ipa_sym_addresses): New.
11219 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11220 (symbol_list): New.
11221 (ipa_sym_addrs): New.
11222 (all_tracepoint_symbols_looked_up): New.
11223 (in_process_agent_loaded): New.
11224 (write_e_ipa_not_loaded): New.
11225 (maybe_write_ipa_not_loaded): New.
11226 (tracepoint_look_up_symbols): New.
11227 (debug_threads) [IN_PROCESS_AGENT]: New.
11228 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11229 (UNKNOWN_SIDE_EFFECTS): New.
11230 (stop_tracing): New.
11231 (flush_trace_buffer): New.
11232 (stop_tracing_bkpt): New.
11233 (flush_trace_buffer_bkpt): New.
11234 (read_inferior_integer): New.
11235 (read_inferior_uinteger): New.
11236 (read_inferior_data_pointer): New.
11237 (write_inferior_data_pointer): New.
11238 (write_inferior_integer): New.
11239 (write_inferior_uinteger): New.
11240 (struct collect_static_trace_data_action): Delete.
11241 (enum tracepoint_type): New.
11242 (struct tracepoint) <type>: New field `type'.
11243 <actions_str, step_actions, step_actions_str>: Only include in
11244 GDBserver.
11245 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11246 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11247 (tracepoints): Use IP_AGENT_EXPORT.
11248 (last_tracepoint): Don't include in the IPA.
11249 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11250 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11251 (alloced_trace_state_variables): New.
11252 (trace_state_variables): Use IP_AGENT_EXPORT.
11253 (traceframe_t): Delete unused variable.
11254 (circular_trace_buffer): Don't include in the IPA.
11255 (trace_buffer_start): Delete.
11256 (struct trace_buffer_control): New.
11257 (trace_buffer_free): Delete.
11258 (struct ipa_trace_buffer_control): New.
11259 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11260 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11261 New.
11262 (trace_buffer_ctrl): New.
11263 (TRACE_BUFFER_CTRL_CURR): New.
11264 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11265 Reimplement as macros.
11266 (trace_buffer_wrap): Delete.
11267 (traceframe_write_count, traceframe_read_count)
11268 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11269 (struct tracepoint_hit_ctx) <type>: New field.
11270 (struct fast_tracepoint_ctx): New.
11271 (memory_barrier): New.
11272 (cmpxchg): New.
11273 (record_tracepoint_error): Update atomically in the IPA.
11274 (clear_inferior_trace_buffer): New.
11275 (about_to_request_buffer_space): New.
11276 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11277 updating the same buffer.
11278 (add_tracepoint): Default the tracepoint's type to trap
11279 tracepoint, and orig_size to -1.
11280 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11281 internal variables.
11282 (create_trace_state_variable): New parameter `gdb'. Handle it.
11283 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11284 (cmd_qtdp): Handle fast tracepoints.
11285 (cmd_qtdv): Adjust.
11286 (max_jump_pad_size): New.
11287 (gdb_jump_pad_head): New.
11288 (get_jump_space_head): New.
11289 (claim_jump_space): New.
11290 (sort_tracepoints): New.
11291 (MAX_JUMP_SIZE): New.
11292 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11293 IPA.
11294 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11295 support. Upload fast traceframes, and delete internal IPA
11296 breakpoints.
11297 (stop_tracing_handler): New.
11298 (flush_trace_buffer_handler): New.
11299 (cmd_qtstop): Upload fast tracepoints.
11300 (response_tracepoint): Handle fast tracepoints.
11301 (tracepoint_finished_step): Upload fast traceframes. Set the
11302 tracepoint hit context's tracepoint type.
11303 (handle_tracepoint_bkpts): New.
11304 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11305 type. Add comment about fast tracepoints.
11306 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11307 non-existing action_str field.
11308 (get_context_regcache): Handle fast tracepoints.
11309 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11310 to the regcache.
11311 (fast_tracepoint_from_jump_pad_address): New.
11312 (fast_tracepoint_from_ipa_tpoint_address): New.
11313 (collecting_t): New.
11314 (force_unlock_trace_buffer): New.
11315 (fast_tracepoint_collecting): New.
11316 (collecting): New.
11317 (gdb_collect): New.
11318 (write_inferior_data_ptr): New.
11319 (target_tp_heap): New.
11320 (target_malloc): New.
11321 (download_agent_expr): New.
11322 (UALIGN): New.
11323 (download_tracepoints): New.
11324 (download_trace_state_variables): New.
11325 (upload_fast_traceframes): New.
11326 (IPA_FIRST_TRACEFRAME): New.
11327 (IPA_NEXT_TRACEFRAME_1): New.
11328 (IPA_NEXT_TRACEFRAME): New.
11329 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11330 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11331 (gdb_jump_pad_buffer_end): New.
11332 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11333 (initialize_tracepoint): Adjust.
11334 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11335 buffer. Initialize the low module.
11336 * utils.c (PREFIX, TOOLNAME): New.
11337 (malloc_failure): Use PREFIX.
11338 (error): In the IPA, an error causes an exit.
11339 (fatal, warning): Use PREFIX.
11340 (internal_error): Use TOOLNAME.
11341 (NUMCELLS): Increase to 10.
11342 * configure, config.in: Regenerate.
11343
11344 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11345
11346 * server.c (handle_query) <qSupported>: Do two passes over the
11347 qSupported string to avoid nesting strtok.
11348
11349 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11350
11351 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11352 (CDEPS): New.
11353 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11354 -Wl,--dynamic-list.
11355 * configure: Regenerate.
11356 * proc-service.list: New.
11357
11358 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11359
11360 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11361 New comment.
11362
11363 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11364
11365 * gdbreplay.c (remote_open): Check error return from socket() call by
11366 its equality to -1 not by it being negative.
11367 * remote-utils.c (remote_open): Likewise.
11368
11369 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11370
11371 * config.h: Regenerate.
11372
11373 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11374
11375 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11376 doesn't provide PTRACE_GET_THREAD_AREA.
11377
11378 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11379
11380 * linux-m68k-low.c: Include <asm/ptrace.h>
11381 (ps_get_thread_area): Implement.
11382
11383 2010-05-03 Doug Evans <dje@google.com>
11384
11385 * event-loop.c (struct callback_event): New struct.
11386 (callback_list): New global.
11387 (append_callback_event, delete_callback_event): New functions.
11388 (process_callback): New function.
11389 (start_event_loop): Call it.
11390 * remote-utils.c (NOT_SCHEDULED): Define.
11391 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11392 moved out of readchar.
11393 (readchar): Rewrite. Call reschedule before returning.
11394 (reset_readchar): New function.
11395 (remote_close): Call it.
11396 (process_remaining, reschedule): New functions.
11397 * server.h (callback_handler_func): New typedef.
11398 (append_callback_event, delete_callback_event): Declare.
11399
11400 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11401
11402 * proc-service.c (ps_pglobal_lookup): Use
11403 thread_db_look_up_one_symbol.
11404 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11405 parameter. Use it instead of all_symbols_looked_up.
11406 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11407 field.
11408 (all_symbols_looked_up): Don't declare.
11409 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11410 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11411 field.
11412 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11413 Set all_symbols_looked_up here.
11414 (thread_db_look_up_one_symbol): New.
11415 (thread_db_get_tls_address): Adjust.
11416 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11417 thread_db object on the heap, and tentatively set it in the
11418 process structure.
11419 (thread_db_init): Don't set all_symbols_looked_up here.
11420 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11421
11422 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11423
11424 * linux-low.c (linux_kill, linux_detach): Adjust.
11425 (status_pending_p_callback): Remove redundant statement. Check
11426 for !TARGET_WAITIKIND_IGNORE, instead of
11427 TARGET_WAITKIND_STOPPED.
11428 (handle_tracepoints): Make sure LWP is locked. Adjust.
11429 (linux_wait_for_event_1): Adjust.
11430 (linux_cancel_breakpoints): New.
11431 (unsuspend_one_lwp): New.
11432 (unsuspend_all_lwps): New.
11433 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11434 (send_sigstop_callback): Change return type to int, add new
11435 `except' parameter and handle it.
11436 (suspend_and_send_sigstop_callback): New.
11437 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11438 pass them down. If SUSPEND, also increment the lwp's suspend
11439 count.
11440 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11441 (need_step_over_p): Don't consider suspended LWPs.
11442 (start_step_over): Adjust.
11443 (proceed_one_lwp): Change return type to int, add new `except'
11444 parameter and handle it.
11445 (unsuspend_and_proceed_one_lwp): New.
11446 (proceed_all_lwps): Use find_inferior instead of
11447 for_each_inferior.
11448 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11449 also decrement the suspend count of LWPs. Pass `except' down,
11450 instead of hacking its suspend count.
11451 (linux_pause_all): Add `freeze' parameter. Adjust.
11452 (linux_unpause_all): New.
11453 (linux_target_ops): Install linux_unpause_all.
11454 * server.c (handle_status): Adjust.
11455 * target.h (struct target_ops): New fields `unpause_all' and
11456 `cancel_breakpoints'. Add new parameter to `pause_all'.
11457 (pause_all): Add new `freeze' parameter.
11458 (unpause_all): New.
11459 (cancel_breakpoints): New.
11460 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11461 cancel breakpoints.
11462 (cmd_qtstart): Pause threads.
11463 (stop_tracing): Pause threads, and cancel breakpoints.
11464 * win32-low.c (win32_target_ops): Adjust.
11465
11466 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11467
11468 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11469 the inferior right away from here...
11470 (linux_wait_1): ... to here, and adjust to check the thread's
11471 last_resume_kind instead of the lwp's step or stop_expected flags.
11472
11473 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11474
11475 * README: Use consistent `GDB' and `GDBserver' spellings.
11476
11477 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11478
11479 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11480 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11481 (linux_detach_one_lwp): Assume the lwp is stopped.
11482 (any_thread_of): Delete.
11483 (linux_detach): Stop all lwps here. Don't blindly delete all
11484 breakpoints.
11485 (delete_lwp_callback): New.
11486 (linux_mourn): Delete all lwps of the process that is gone.
11487 (linux_wait_1): Don't delete the last lwp of the process here.
11488 * mem-break.h (mark_breakpoints_out): Declare.
11489 * mem-break.c (mark_breakpoints_out): New.
11490 (free_all_breakpoints): Use it.
11491 * server.c (handle_target_event): If the process is gone, mark
11492 breakpoints out.
11493 * thread-db.c (struct thread_db) <create_bp>: New field.
11494 (thread_db_enable_reporting): Fix prototype. Store a thread event
11495 breakpoint reference in the thread_db struct.
11496 (thread_db_load_search): Clear the thread_db object.
11497 (try_thread_db_load_1): Ditto.
11498 (switch_to_process): New.
11499 (disable_thread_event_reporting): Use it.
11500 (remove_thread_event_breakpoints): New.
11501 (thread_db_detach, thread_db_mourn): Use it.
11502
11503 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11504
11505 * linux-low.c (linux_enable_event_reporting): New.
11506 (linux_wait_for_event_1, handle_extended_wait): Use it.
11507
11508 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11509
11510 * linux-low.c (linux_kill_one_lwp, linux_kill)
11511 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11512 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11513 SIGSTOP even if the LWP is stopped.
11514 (send_sigstop_callback): New.
11515 (stop_all_lwps): Use send_sigstop_callback instead.
11516 (linux_resume_one_thread): Adjust.
11517 (proceed_one_lwp): Still proceed an LWP that the client has
11518 requested to stop, if we haven't reported it as stopped yet. Make
11519 sure that LWPs the client want stopped, have a pending SIGSTOP.
11520
11521 2010-04-26 Doug Evans <dje@google.com>
11522
11523 * server.c (handle_general_set): Make static.
11524
11525 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11526 Print received char after testing for error/eof instead of before.
11527 (input_interrupt): Tweak comment.
11528
11529 2010-04-23 Doug Evans <dje@google.com>
11530
11531 * server.c (start_inferior): Print inferior argv if --debug.
11532
11533 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11534
11535 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11536 * nto-x86-low.c: Include server.h
11537
11538 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11539
11540 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11541 be consistent with other sources of this directory.
11542 (init_registers_amd64): Correct name of source file of this function
11543 in the comment.
11544
11545 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11546
11547 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11548 64-bit executables.
11549
11550 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11551
11552 * win32-i386-low.c: Add 64-bit support.
11553 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11554 (init_registers_amd64): Declare.
11555 (mappings): Add 64-bit version of array.
11556 (init_windows_x86): New function.
11557 (the_low_target): Change init_arch field to init_windows_x86.
11558
11559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11560
11561 * win32-low.c: Adapt to support also 64-bit architecture.
11562 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11563 (get_image_name): Use SIZE_T type for local variable `done'.
11564 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11565 (toolhelp_get_dll_name): Idem.
11566 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11567 Use uintptr_t typecast to avoid warning.
11568 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11569 (handle_exception): Use phex_nz to avoid warning.
11570 (win32_wait): Remove unused local variable `process'.
11571
11572 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11573
11574 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11575 `amd64-avx.o'.
11576
11577 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11578
11579 * configure.ac: Use `ws2_32' library for srv_mingw.
11580 * configure: Regenerate.
11581 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11582 * remote-utils.c: Likewise.
11583
11584 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11585
11586 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11587 if __x86_64__ is defined.
11588
11589 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11590
11591 * configure: Regenerate.
11592
11593 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11594
11595 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11596 * target.h (target_ops): New get_tib_address field.
11597 * win32-low.h (win32_thread_info): Add thread_local_base field.
11598 * win32-low.c (child_add_thread): Add tlb argument.
11599 Set thread_local_base field to TLB.
11600 (get_child_debug_event): Adapt to child_add_thread change.
11601 (win32_get_tib_address): New function.
11602 (win32_target_ops): Set get_tib_address field to
11603 win32_get_tib_address.
11604 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11605
11606 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11607
11608 * linux-low.c (linux_mourn): Also remove the process.
11609 * server.c (handle_target_event): Don't remove the process here.
11610 * nto-low.c (nto_mourn): New.
11611 (nto_target_ops): Install it.
11612 * spu-low.c (spu_mourn): New.
11613 (spu_target_ops): Install it.
11614 * win32-low.c (win32_mourn): New.
11615 (win32_target_ops): Install it.
11616
11617 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11618
11619 * server.h (buffer_xml_printf): Remove redundant `;'.
11620
11621 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11622
11623 * regcache.c (set_register_cache): Invalidate regcaches before
11624 changing the register cache layout.
11625 (regcache_invalidate_one): Allow a NULL regcache.
11626 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11627 regcaches before changing the register cache layout or the target
11628 regsets.
11629
11630 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11631
11632 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11633 variable warning on Linux/x86-64.
11634
11635 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11636
11637 GDBserver disconnected tracing support.
11638
11639 * linux-low.c (linux_remove_process): Delete.
11640 (add_lwp): Don't set last_resume_kind here.
11641 (linux_kill): Use `mourn'.
11642 (linux_detach): Use `thread_db_detach', and `mourn'.
11643 (linux_mourn): New.
11644 (linux_attach_lwp_1): Adjust comment.
11645 (linux_attach): last_resume_kind moved the thread_info; adjust.
11646 (status_pending_p_callback): Adjust.
11647 (linux_wait_for_event_1): Adjust.
11648 (count_events_callback, select_singlestep_lwp_callback)
11649 (select_event_lwp_callback, cancel_breakpoints_callback)
11650 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11651 (proceed_one_lwp): Adjust.
11652 (linux_async): Add debug output.
11653 (linux_thread_stopped): New.
11654 (linux_pause_all): New.
11655 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11656 linux_pause_all.
11657 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11658 (thread_db_free): Delete declaration.
11659 (thread_db_detach, thread_db_mourn): Declare.
11660 * thread-db.c (thread_db_init): Use thread_db_mourn.
11661 (thread_db_free): Delete, split in two.
11662 (disable_thread_event_reporting): New.
11663 (thread_db_detach): New.
11664 (thread_db_mourn): New.
11665
11666 * server.h (struct thread_info) <last_resume_kind>: New field.
11667 <attached>: Add comment.
11668 <gdb_detached>: New field.
11669 (handler_func): Change return type to int.
11670 (handle_serial_event, handle_target_event): Ditto.
11671 (gdb_connected): Declare.
11672 (tracing): Delete.
11673 (disconnected_tracing): Declare.
11674 (stop_tracing): Declare.
11675
11676 * server.c (handle_query) <qSupported>: Report support for
11677 disconnected tracing.
11678 (queue_stop_reply_callback): Account for running threads.
11679 (gdb_wants_thread_stopped): New.
11680 (gdb_wants_all_threads_stopped): New.
11681 (gdb_reattached_process): New.
11682 (handle_status): Clear the `gdb_detached' flag of all processes.
11683 In all-stop, stop all threads.
11684 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11685 (process_serial_event): If the remote connection breaks, or if an
11686 exit was forced with "monitor exit", force an event loop exit.
11687 Handle disconnected tracing on detach.
11688 (handle_serial_event): Adjust.
11689 (handle_target_event): If GDB isn't connected, forward events back
11690 to the inferior, unless the last process exited, in which case,
11691 exit gdbserver. Adjust interface.
11692
11693 * remote-utils.c (remote_open): Don't block in accept. Instead
11694 register an event loop source on the listen socket file
11695 descriptor. Refactor bits into ...
11696 (listen_desc): ... this new global.
11697 (gdb_connected): ... this new function.
11698 (enable_async_notification): ... this new function.
11699 (handle_accept_event): ... this new function.
11700 (remote_close): Clear remote_desc.
11701
11702 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11703
11704 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11705 New fields.
11706 (mourn_inferior): Define.
11707 (target_process_qsupported): Avoid the dangling else problem.
11708 (thread_stopped): Define.
11709 (pause_all): Define.
11710 (target_waitstatus_to_string): Declare.
11711 * target.c (target_waitstatus_to_string): New.
11712
11713 * tracepoint.c (tracing): Make extern.
11714 (disconnected_tracing): New.
11715 (stop_tracing): Make extern. Handle tracing stops due to GDB
11716 disconnecting.
11717 (cmd_qtdisconnected): New.
11718 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11719 (handle_tracepoint_general_set): Handle QTDisconnected.
11720
11721 * event-loop.c (event_handler_func): Change return type to int.
11722 (process_event): Bail out if the event handler wants the event
11723 loop to stop.
11724 (handle_file_event): Ditto.
11725 (start_event_loop): Bail out if the event handler wants the event
11726 loop to stop.
11727
11728 * nto-low.c (nto_target_ops): Adjust.
11729 * spu-low.c (spu_wait): Don't remove the process here.
11730 (spu_target_ops): Adjust.
11731 * win32-low.c (win32_wait): Don't remove the process here.
11732 (win32_target_ops): Adjust.
11733
11734 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11735
11736 * regcache.c (realloc_register_cache): Invalidate inferior's
11737 regcache before recreating it.
11738
11739 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11740
11741 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11742
11743 2010-04-09 Stan Shebs <stan@codesourcery.com>
11744 Pedro Alves <pedro@codesourcery.com>
11745
11746 * server.h (LONGEST): New.
11747 (struct thread_info) <while_stepping>: New field.
11748 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11749 Declare.
11750 (initialize_tracepoint, handle_tracepoint_general_set)
11751 (handle_tracepoint_query, tracepoint_finished_step)
11752 (tracepoint_was_hit, release_while_stepping_state_list):
11753 (current_traceframe): Declare.
11754 * server.c (handle_general_set): Handle tracepoint packets.
11755 (read_memory): New.
11756 (write_memory): New.
11757 (handle_search_memory_1): Use read_memory.
11758 (handle_query): Report support for conditional tracepoints, trace
11759 state variables, and tracepoint sources. Handle tracepoint
11760 queries.
11761 (main): Initialize the tracepoints module.
11762 (process_serial_event): Handle traceframe reads/writes.
11763
11764 * linux-low.c (handle_tracepoints): New.
11765 (linux_wait_1): Call it.
11766 (linux_resume_one_lwp): Handle while-stepping.
11767 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11768 (linux_target_ops): Install them.
11769 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11770 New field.
11771 * linux-x86-low.c (x86_supports_tracepoints): New.
11772 (the_low_target). Install it.
11773
11774 * mem-break.h (delete_breakpoint): Declare.
11775 * mem-break.c (delete_breakpoint): Make external.
11776
11777 * target.h (struct target_ops): Add `supports_tracepoints',
11778 `read_pc', and `write_pc' fields.
11779 (target_supports_tracepoints): Define.
11780 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11781 (phex_nz): New.
11782
11783 * regcache.h (struct regcache) <registers_owned>: New field.
11784 (init_register_cache, regcache_cpy): Declare.
11785 (regcache_read_pc, regcache_write_pc): Declare.
11786 (register_cache_size): Declare.
11787 (supply_regblock): Declare.
11788 * regcache.c (init_register_cache): New.
11789 (new_register_cache): Use it.
11790 (regcache_cpy): New.
11791 (register_cache_size): New.
11792 (supply_regblock): New.
11793 (regcache_read_pc, regcache_write_pc): New.
11794
11795 * tracepoint.c: New.
11796
11797 * Makefile.in (OBS): Add tracepoint.o.
11798 (tracepoint.o): New rule.
11799
11800 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11801
11802 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11803 (i386-mmx.o): New.
11804 (i386-mmx.c): Likewise.
11805 (i386-mmx-linux.o): Likewise.
11806 (i386-mmx-linux.c): Likewise.
11807
11808 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11809 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11810 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11811 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11812
11813 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11814 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11815 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11816
11817 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11818
11819 * Makefile.in (clean): Updated.
11820 (i386-avx.o): New.
11821 (i386-avx.c): Likewise.
11822 (i386-avx-linux.o): Likewise.
11823 (i386-avx-linux.c): Likewise.
11824 (amd64-avx.o): Likewise.
11825 (amd64-avx.c): Likewise.
11826 (amd64-avx-linux.o): Likewise.
11827 (amd64-avx-linux.c): Likewise.
11828
11829 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11830 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11831 (srv_amd64_regobj): Add amd64-avx.o.
11832 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11833 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11834 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11835 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11836 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11837 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11838 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11839
11840 * i387-fp.c: Include "i386-xstate.h".
11841 (i387_xsave): New.
11842 (i387_cache_to_xsave): Likewise.
11843 (i387_xsave_to_cache): Likewise.
11844 (x86_xcr0): Likewise.
11845
11846 * i387-fp.h (i387_cache_to_xsave): Likewise.
11847 (i387_xsave_to_cache): Likewise.
11848 (x86_xcr0): Likewise.
11849
11850 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11851 * linux-crisv32-low.c (target_regsets): Likewise.
11852 * linux-m68k-low.c (target_regsets): Likewise.
11853 * linux-mips-low.c (target_regsets): Likewise.
11854 * linux-ppc-low.c (target_regsets): Likewise.
11855 * linux-s390-low.c (target_regsets): Likewise.
11856 * linux-sh-low.c (target_regsets): Likewise.
11857 * linux-sparc-low.c (target_regsets): Likewise.
11858 * linux-xtensa-low.c (target_regsets): Likewise.
11859
11860 * linux-low.c: Include <sys/uio.h>.
11861 (regsets_fetch_inferior_registers): Support nt_type.
11862 (regsets_store_inferior_registers): Likewise.
11863 (linux_process_qsupported): New.
11864 (linux_target_ops): Add linux_process_qsupported.
11865
11866 * linux-low.h (regset_info): Add nt_type.
11867 (linux_target_ops): Add process_qsupported.
11868
11869 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11870 and <sys/uio.h>.
11871 (init_registers_i386_avx_linux): New.
11872 (init_registers_amd64_avx_linux): Likewise.
11873 (xmltarget_i386_linux_no_xml): Likewise.
11874 (xmltarget_amd64_linux_no_xml): Likewise.
11875 (PTRACE_GETREGSET): Likewise.
11876 (PTRACE_SETREGSET): Likewise.
11877 (x86_fill_xstateregset): Likewise.
11878 (x86_store_xstateregset): Likewise.
11879 (use_xml): Likewise.
11880 (x86_linux_update_xmltarget): Likewise.
11881 (x86_linux_process_qsupported): Likewise.
11882 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11883 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11884 init_registers_i386_linux here. Call
11885 x86_linux_update_xmltarget.
11886 (the_low_target): Add x86_linux_process_qsupported.
11887
11888 * server.c (handle_query): Call target_process_qsupported.
11889
11890 * target.h (target_ops): Add process_qsupported.
11891 (target_process_qsupported): New.
11892
11893 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11894
11895 * inferiors.c (add_thread): Set last_status kind to
11896 TARGET_WAITKIND_IGNORE.
11897 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11898 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11899 (linux_wait_1): Move `thread' local definition to block that uses
11900 it. Don't NULL initialize `event_child'.
11901 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11902 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11903 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11904
11905 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11906
11907 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11908 an extended waitstatus, or by a watchpoint.
11909 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11910 thread was stepping or has been stopped by a watchpoint.
11911
11912 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11913
11914 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11915 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11916 of another, then delete the previous, and validate all
11917 breakpoints.
11918 (validate_inserted_breakpoint): New.
11919 (delete_disabled_breakpoints): New.
11920 (validate_breakpoints): New.
11921 (check_mem_read): Validate breakpoints before trusting their
11922 shadow. Delete disabled breakpoints.
11923 (check_mem_write): Validate breakpoints before trusting they
11924 should be inserted. Delete disabled breakpoints.
11925 * mem-break.h (validate_breakpoints):
11926 * server.c (handle_query): Validate breakpoints when we see a
11927 qSymbol query.
11928
11929 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11930
11931 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11932 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11933 if we could tell there's a GDB breakpoint at stop_pc.
11934 (need_step_over_p): Don't do a step over if we find a GDB
11935 breakpoint at the resume PC.
11936
11937 * mem-break.c (struct raw_breakpoint): New.
11938 (enum bkpt_type): New type `gdb_breakpoint'.
11939 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11940 fields. New field `raw'.
11941 (find_raw_breakpoint_at): New.
11942 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11943 breakpoint instead.
11944 (set_breakpoint_at): Adjust.
11945 (delete_raw_breakpoint): New.
11946 (release_breakpoint): New.
11947 (delete_breakpoint): Rename to...
11948 (delete_breakpoint_1): ... this. Add proc parameter. Use
11949 release_breakpoint. Return ENOENT.
11950 (delete_breakpoint): Reimplement.
11951 (find_breakpoint_at): Delete.
11952 (find_gdb_breakpoint_at): New.
11953 (delete_breakpoint_at): Delete.
11954 (set_gdb_breakpoint_at): New.
11955 (delete_gdb_breakpoint_at): New.
11956 (gdb_breakpoint_here): New.
11957 (set_reinsert_breakpoint): Use release_breakpoint.
11958 (uninsert_breakpoint): Rename to ...
11959 (uninsert_raw_breakpoint): ... this.
11960 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11961 (reinsert_raw_breakpoint): Change parameter type to
11962 raw_breakpoint.
11963 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11964 instead.
11965 (check_breakpoints): Adjust. Use release_breakpoint.
11966 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11967 (breakpoint_inserted_here): Ditto.
11968 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11969 Don't trust the breakpoint's shadow if it is not inserted.
11970 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11971 (delete_all_breakpoints): Adjust.
11972 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11973 use delete_breakpoint_1.
11974
11975 * mem-break.h (breakpoints_supported): Delete declaration.
11976 (set_gdb_breakpoint_at): Declare.
11977 (gdb_breakpoint_here): Declare.
11978 (delete_breakpoint_at): Delete.
11979 (delete_gdb_breakpoint_at): Declare.
11980
11981 * server.h (struct raw_breakpoint): Forward declare.
11982 (struct process_info): New field `raw_breakpoints'.
11983
11984 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11985 breakpoints.
11986
11987 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11988
11989 * linux-low.c (status_pending_p_callback): Fix comment.
11990 (linux_wait_for_event_1): Move most of the internal breakpoint
11991 handling from here...
11992 (linux_wait_1): ... to here.
11993 (count_events_callback): New.
11994 (select_singlestep_lwp_callback): New.
11995 (select_event_lwp_callback): New.
11996 (cancel_breakpoints_callback): New.
11997 (select_event_lwp): New.
11998 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11999 priority to all LWPs that have had events that should be reported
12000 to the client. Cancel breakpoints when about to reporting the
12001 event to the client, not while stopping lwps. No longer cancel
12002 finished single-steps here.
12003 (cancel_finished_single_step): Delete.
12004 (cancel_finished_single_steps): Delete.
12005
12006 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12007
12008 * mem-break.c (enum bkpt_type): New.
12009 (struct breakpoint): New field `type'.
12010 (set_breakpoint_at): Change return type to struct breakpoint
12011 pointer. Set type to `other_breakpoint' by default.
12012 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12013 in the breakpoint list.
12014 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12015 (reinsert_breakpoint): Rename to ...
12016 (reinsert_raw_breakpoint): ... this.
12017 (reinsert_breakpoints_at): Adjust.
12018 * mem-break.h (struct breakpoint): Declare.
12019 (set_breakpoint_at): Change return type to struct breakpoint
12020 pointer.
12021
12022 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12023
12024 * server.c (handle_query): Assign, not compare.
12025
12026 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12027
12028 Teach linux gdbserver to step-over-breakpoints.
12029
12030 * linux-low.c (can_hardware_single_step): New.
12031 (supports_breakpoints): New.
12032 (handle_extended_wait): If stopping threads, read the stop pc of
12033 the new cloned LWP.
12034 (get_pc): New.
12035 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12036 low target doesn't support retrieving the PC.
12037 (add_lwp): Set last_resume_kind to resume_continue.
12038 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12039 (linux_attach): Don't clear stop_expected. Set the lwp's
12040 last_resume_kind to resume_stop.
12041 (linux_detach_one_lwp): Don't check for removed breakpoints.
12042 (check_removed_breakpoint): Delete.
12043 (status_pending_p): Rename to ...
12044 (status_pending_p_callback): ... this. Don't check for removed
12045 breakpoints. Don't consider threads that are stopped from GDB's
12046 perspective.
12047 (linux_wait_for_lwp): Always read the stop_pc here.
12048 (cancel_breakpoint): New.
12049 (step_over_bkpt): New global.
12050 (linux_wait_for_event_1): Implement stepping over breakpoints.
12051 (gdb_wants_lwp_stopped): New.
12052 (gdb_wants_all_stopped): New.
12053 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12054 single-step traps here. Store the thread's last reported target
12055 wait status.
12056 (send_sigstop): Don't clear stop_expected. Always set it,
12057 instead.
12058 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12059 (cancel_finished_single_step): New.
12060 (cancel_finished_single_steps): New.
12061 (wait_for_sigstop): Don't cancel finished single-step traps here.
12062 (linux_resume_one_lwp): Don't check for removed breakpoints.
12063 Don't set `step' on non-hardware step archs.
12064 (linux_set_resume_request): Ignore resume_stop requests if already
12065 stopping or stopped. Set the lwp's last_resume_kind.
12066 (resume_status_pending_p): Don't check for removed breakpoints.
12067 (need_step_over_p): New.
12068 (start_step_over): New.
12069 (finish_step_over): New.
12070 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12071 requests. Clear the thread's last reported target waitstatus.
12072 Don't use the `suspended' flag. Don't consider pending breakpoints.
12073 (linux_resume): Start a step-over if necessary.
12074 (proceed_one_lwp): New.
12075 (proceed_all_lwps): New.
12076 (unstop_all_lwps): New.
12077 * linux-low.h (struct lwp_info): Rewrite comment for the
12078 `suspended' flag. Add the `stop_pc' field. Delete the
12079 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12080 Add `'last_resume_kind' and `need_step_over' fields.
12081 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12082 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12083 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12084 (set_raw_breakpoint_at): New.
12085 (set_breakpoint_at): Rewrite to use it.
12086 (reinsert_breakpoint_handler): Delete.
12087 (set_reinsert_breakpoint): New.
12088 (reinsert_breakpoint_by_bp): Delete.
12089 (delete_reinsert_breakpoints): New.
12090 (uninsert_breakpoint): Rewrite.
12091 (uninsert_breakpoints_at): New.
12092 (reinsert_breakpoint): Rewrite.
12093 (reinsert_breakpoints_at): New.
12094 (check_breakpoints): Rewrite.
12095 (breakpoint_here): New.
12096 (breakpoint_inserted_here): New.
12097 (check_mem_read): Adjust.
12098 * mem-break.h (breakpoints_supported, breakpoint_here)
12099 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12100 (reinsert_breakpoint_by_bp): Delete declaration.
12101 (delete_reinsert_breakpoints): Declare.
12102 (reinsert_breakpoint): Delete declaration.
12103 (reinsert_breakpoints_at): Declare.
12104 (uninsert_breakpoint): Delete declaration.
12105 (uninsert_breakpoints_at): Declare.
12106 (check_breakpoints): Adjust prototype.
12107 * server.h: Adjust include order.
12108 (struct thread_info): Declare here. Add a `last_status' field.
12109
12110 2010-03-23 Michael Snyder <msnyder@vmware.com>
12111
12112 * server.c (crc32): New function.
12113 (handle_query): Add handling for 'qCRC:' request.
12114
12115 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12116
12117 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12118 lwp had been stopped by a watchpoint.
12119
12120 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12121
12122 * server.h (internal_error): Declare.
12123 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12124 * utils.c (internal_error): New function.
12125
12126 2010-03-15 Andreas Schwab <schwab@redhat.com>
12127
12128 * configure.srv: Fix typo setting srv_regobj.
12129
12130 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12131
12132 * linux-low.c (fetch_register): Avoid passing a non string literal
12133 format to `error'.
12134 (usr_store_inferior_registers): Ditto.
12135
12136 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12137
12138 * linux-low.c (linux_write_memory): Bail out early if peeking
12139 memory failed.
12140
12141 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12142
12143 * linux-low.h (struct lwp_info): New fields
12144 `stopped_by_watchpoint' and `stopped_data_address'.
12145 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12146 here, and cache them in the lwp object.
12147 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12148 directly.
12149 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12150 field.
12151 (linux_stopped_by_watchpoint): Rewrite.
12152 (linux_stopped_data_address): Rewrite.
12153
12154 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12155
12156 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12157 switching the current inferior, not before.
12158
12159 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12160
12161 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12162 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12163 i386-linux.c and amd64-linux.c.
12164 (reg-i386.o): Removed.
12165 (reg-i386.c): Likewise.
12166 (reg-i386-linux.o): Likewise.
12167 (reg-i386-linux.c): Likewise.
12168 (reg-x86-64.o): Likewise.
12169 (reg-x86-64.c): Likewise.
12170 (reg-x86-64-linux.o): Likewise.
12171 (reg-x86-64-linux.c): Likewise.
12172 (i386.o): New.
12173 (i386.c): Likewise.
12174 (i386-linux.o): Likewise.
12175 (i386-linux.c): Likewise.
12176 (amd64.o): Likewise.
12177 (amd64.c): Likewise.
12178 (amd64-linux.o): Likewise.
12179 (amd64-linux.c): Likewise.
12180
12181 * configure.srv (srv_i386_regobj): New.
12182 (srv_i386_linux_regobj): Likewise.
12183 (srv_amd64_regobj): Likewise.
12184 (srv_amd64_linux_regobj): Likewise.
12185 (srv_i386_32bit_xmlfiles): Likewise.
12186 (srv_i386_64bit_xmlfiles): Likewise.
12187 (srv_i386_xmlfiles): Likewise.
12188 (srv_amd64_xmlfiles): Likewise.
12189 (srv_i386_linux_xmlfiles): Likewise.
12190 (srv_amd64_linux_xmlfiles): Likewise.
12191 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12192 srv_xmlfiles to $srv_i386_xmlfiles.
12193 (i[34567]86-*-mingw32ce*): Likewise.
12194 (i[34567]86-*-mingw*): Likewise.
12195 (i[34567]86-*-nto*): Likewise.
12196 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12197 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12198 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12199 (x86_64-*-linux*): Likewise.
12200
12201 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12202 (init_registers_amd64_linux): New.
12203 (x86_arch_setup): Replace init_registers_x86_64_linux with
12204 init_registers_amd64_linux.
12205
12206 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12207
12208 * configure.ac: Check for libdl. If it is not available link against
12209 static libthread_db.
12210 * configure: Regenerate.
12211
12212 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12213
12214 PR9605
12215
12216 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12217 handing a read watchpoint.
12218 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12219
12220 2010-02-12 Doug Evans <dje@google.com>
12221
12222 * linux-low.c (linux_supports_tracefork_flag): Document.
12223 (linux_look_up_symbols): Add comment.
12224
12225 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12226
12227 * regcache.c (supply_register): Clear regcache if buf is NULL.
12228
12229 2010-02-02 Nicolas Roche <roche@sourceware.org>
12230 Joel Brobecker <brobecker@adacore.com>
12231
12232 * inferiors.c (find_inferior): Add function documentation.
12233 (unloaded_dll): Handle the case where the unloaded dll has not
12234 been previously registered in the dll list.
12235
12236 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12237
12238 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12239 (thumb2_breakpoint): New.
12240 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12241
12242 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12243
12244 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12245 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12246 breakpoints.
12247
12248 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12249
12250 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12251
12252 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12253
12254 * linux-s390-low.c (s390_collect_ptrace_register)
12255 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12256
12257 2010-01-21 Doug Evans <dje@google.com>
12258
12259 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12260 (PTRACE_ARG4_TYPE): New macro.
12261 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12262 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12263 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12264 (usr_store_inferior_registers): Ditto.
12265 (linux_read_memory, linux_write_memory): Ditto.
12266 (linux_test_for_tracefork): Ditto.
12267
12268 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12269 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12270
12271 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12272
12273 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12274 target.
12275
12276 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12277
12278 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12279 prototype to take a regcache. Adjust.
12280
12281 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12282
12283 * regcache.h (struct thread_info): Forward declare.
12284 (struct regcache): New.
12285 (new_register_cache): Adjust prototype.
12286 (get_thread_regcache): Declare.
12287 (free_register_cache): Adjust prototype.
12288 (registers_to_string, registers_from_string): Ditto.
12289 (supply_register, supply_register_by_name, collect_register)
12290 (collect_register_as_string, collect_register_by_name): Ditto.
12291 * regcache.c (struct inferior_regcache_data): Delete.
12292 (get_regcache): Rename to ...
12293 (get_thread_regcache): ... this. Adjust. Switch inferior before
12294 fetching registers.
12295 (regcache_invalidate_one): Adjust.
12296 (regcache_invalidate): Fix prototype.
12297 (new_register_cache): Return the new register cache.
12298 (free_register_cache): Change prototype.
12299 (realloc_register_cache): Adjust.
12300 (registers_to_string): Change prototype to take a regcache. Adjust.
12301 (registers_from_string): Ditto.
12302 (register_data): Ditto.
12303 (supply_register): Ditto.
12304 (supply_register_by_name): Ditto.
12305 (collect_register): Ditto.
12306 (collect_register_as_string): Ditto.
12307 (collect_register_by_name): Ditto.
12308 * server.c (process_serial_event): Adjust.
12309 * linux-low.h (regset_fill_func, regset_store_func): Change
12310 prototype.
12311 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12312 Change prototype.
12313 * linux-low.c (get_stop_pc): Adjust.
12314 (check_removed_breakpoint): Adjust.
12315 (linux_wait_for_event): Adjust.
12316 (linux_resume_one_lwp): Adjust.
12317 (fetch_register): Add regcache parameter. Adjust.
12318 (usr_store_inferior_registers): Ditto.
12319 (regsets_fetch_inferior_registers): Ditto.
12320 (regsets_store_inferior_registers): Ditto.
12321 (linux_fetch_registers, linux_store_registers): Ditto.
12322 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12323 regcache. Adjust.
12324 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12325 Ditto.
12326 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12327 prototype to take a regcache.
12328 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12329 * remote-utils.c (convert_ascii_to_int, outreg)
12330 (prepare_resume_reply): Change prototype to take a regcache.
12331 Adjust.
12332 * target.h (struct target_ops) <fetch_registers, store_registers>:
12333 Change prototype to take a regcache.
12334 (fetch_inferior_registers, store_inferior_registers): Change
12335 prototype to take a regcache. Adjust.
12336 * proc-service.c (ps_lgetregs): Adjust.
12337 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12338 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12339 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12340 take a regcache. Adjust.
12341 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12342 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12343 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12344 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12345 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12346 (cris_cannot_fetch_register):
12347 (cris_breakpoint_at): Change prototype to take a regcache.
12348 Adjust.
12349 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12350 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12351 to take a regcache. Adjust.
12352 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12353 Adjust.
12354 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12355 take a regcache. Adjust.
12356 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12357 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12358 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12359 * linux-mips-low.c (mips_get_pc):
12360 (mips_set_pc): Change prototype to take a regcache. Adjust.
12361 (mips_reinsert_addr): Adjust.
12362 (mips_collect_register): Change prototype to take a regcache.
12363 Adjust.
12364 (mips_supply_register):
12365 (mips_collect_register_32bit, mips_supply_register_32bit)
12366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12367 (mips_store_fpregset): Ditto.
12368 * linux-ppc-low.c (ppc_supply_ptrace_register)
12369 (ppc_supply_ptrace_register): Ditto.
12370 (parse_spufs_run): Adjust.
12371 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12372 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12373 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12374 take a regcache. Adjust.
12375 * linux-s390-low.c (s390_collect_ptrace_register)
12376 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12377 (s390_set_pc): Change prototype to take a regcache. Adjust.
12378 (s390_arch_setup): Adjust.
12379 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12380 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12381 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12382 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12383 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12384 regcache. Adjust.
12385 (sparc_breakpoint_at): Adjust.
12386 * linux-xtensa-low.c (xtensa_fill_gregset):
12387 (xtensa_store_gregset):
12388 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12389 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12390 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12391 prototype to take a regcache. Adjust.
12392 * win32-arm-low.c (arm_fetch_inferior_register)
12393 (arm_store_inferior_register): Change prototype to take a
12394 regcache. Adjust.
12395 * win32-i386-low.c (i386_fetch_inferior_register)
12396 (i386_store_inferior_register): Change prototype to take a
12397 regcache. Adjust.
12398 * win32-low.c (child_fetch_inferior_registers)
12399 (child_store_inferior_registers): Change prototype to take a
12400 regcache. Adjust.
12401 (win32_wait): Adjust.
12402 (win32_fetch_inferior_registers): Change prototype to take a
12403 regcache. Adjust.
12404 (win32_store_inferior_registers): Adjust.
12405 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12406 store_inferior_register>: Change prototype to take a regcache.
12407
12408 2010-01-20 Doug Evans <dje@google.com>
12409
12410 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12411 #ifdef.
12412 (linux_wait_for_event1, linux_init_signals): Ditto.
12413 (W_STOPCODE): Provide definition if missing.
12414
12415 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12416
12417 * linux-low.c (linux_core_of_thread): New.
12418 (compare_ints, show_process, list_threads): New.
12419 (linux_qxfer_osdata): Report threads and cores.
12420 (linux_target_op): Register linux_core_of_thread.
12421 * remote-utils.c (prepare_resume_reply): Report the core.
12422 (buffer_xml_printf): Support %d specifier.
12423 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12424 New.
12425 (handle_query): Handle qXfer:threads. Announce availability
12426 thereof.
12427 * target.h (struct target_ops): New field core_of_thread.
12428
12429 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12430
12431 * Makefile.in (clean): Remove new generated files.
12432 (reg-s390.o, reg-s390.c): Remove rules.
12433 (reg-s390x.o, reg-s390x.c): Likewise.
12434 (s390-linux32.o, s390-linux32.c): Add rules.
12435 (s390-linux64.o, s390-linux64.c): Likewise.
12436 (s390x-linux64.o, s390x-linux64.c): Likewise.
12437 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12438 * linux-s390-low.c: Include <elf.h>.
12439 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12440 (init_registers_s390): Remove prototype.
12441 (init_registers_s390x): Likewise.
12442 (init_registers_s390_linux32): Add prototype.
12443 (init_registers_s390_linux64): Likewise.
12444 (init_registers_s390x_linux64): Likewise.
12445 (s390_num_regs_3264): New define.
12446 (s390_regmap_3264): New global variable.
12447 (s390_cannot_fetch_register): Remove obsolete check.
12448 (s390_cannot_store_register): Likewise.
12449 (s390_collect_ptrace_register): Handle upper/lower register halves.
12450 (s390_supply_ptrace_register): Likewise.
12451 (s390_fill_gregset): Update to register number changes.
12452 (s390_get_hwcap): New routine.
12453 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12454 Install appropriate regmap and register set.
12455
12456 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12457
12458 * server.c (gdbserver_version): Update copyright year to 2010.
12459 * gdbreplay.c (gdbreplay_version): Likewise.
12460
12461 2009-12-28 Doug Evans <dje@google.com>
12462
12463 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12464 elf/external.h. Include <elf.h> instead but only if necessary.
12465
12466 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12467
12468 * linux-low.c (linux_remove_process): Remove `detaching'
12469 parameter. Don't release/detach from thread_db here.
12470 (linux_kill): Release/detach from thread_db here, ...
12471 (linux_detach): ... and here, before actually detaching.
12472 (linux_wait_1): ... and here, when a process exits.
12473 * thread-db.c (any_thread_of): New.
12474 (thread_db_free): Switch the current inferior to a thread of the
12475 passed in process.
12476
12477 2009-12-21 Doug Evans <dje@google.com>
12478
12479 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12480
12481 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12482 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12483 warning ifndef __NR_tkill. Move setting of errno there too.
12484 Delete unnecessary resetting of errno after syscall.
12485 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12486
12487 * configure.ac: Check for dladdr.
12488 * config.in: Regenerate.
12489 * configure: Regenerate.
12490 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12491 (try_thread_db_load): Update.
12492
12493 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12494
12495 2009-12-18 Doug Evans <dje@google.com>
12496
12497 * event-loop.c: Include unistd.h if it exists.
12498
12499 * linux-low.c (my_waitpid): Move definition away from being in
12500 between linux_tracefork_child/linux_test_for_tracefork.
12501
12502 * gdb_proc_service.h (psaddr_t): Fix type.
12503 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12504 signature to match glibc.
12505
12506 2009-12-16 Doug Evans <dje@google.com>
12507
12508 * linux-low.c (linux_read_memory): Fix argument to read.
12509
12510 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12511
12512 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12513 events, don't leave current_inferior pointing at null.
12514
12515 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12516
12517 * win32-low.c (LOG): Delete.
12518 (OUTMSG): Output to stderr.
12519 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12520 on compile time LOG macro.
12521 (win32_wait): Fix debug output.
12522
12523 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12524
12525 * win32-low.c (win32_add_one_solib): If the dll name is
12526 "ntdll.dll", prepend the system directory to the dll path.
12527
12528 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12529
12530 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12531
12532 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12533 Vladimir Prus <vladimir@codesourcery.com>
12534
12535 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12536 * configure.ac: Check for __mcoldfire__ and set
12537 gdb_cv_m68k_is_coldfire.
12538 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12539 reg-cf.o and reg-m68k.o.
12540 * configure: Regenerated.
12541
12542 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12543
12544 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12545 Pass it to thread_db_free.
12546 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12547 proper `detaching' argument to linux_remove_process.
12548 * linux-low.h (thread_db_free): Add `detaching' parameter.
12549 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12550 to thread_db_free.
12551 (thread_db_free): Add `detaching' parameter. Only
12552 call td_ta_clear_event if detaching from process.
12553
12554 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12555
12556 * thread-db.c (thread_db_free): Fix typo.
12557
12558 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12559
12560 PR gdb/10838
12561 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12562
12563 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12564
12565 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12566 with an i686 compiler.
12567 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12568 needed.
12569 * configure: Rebuilt.
12570
12571 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12572
12573 PR gdb/10783
12574
12575 * server.c (handle_search_memory_1): Correct read_addr initialization
12576 in loop for searching subsequent chunks.
12577
12578 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12579
12580 * configure.ac: New --with-libthread-db option.
12581 * thread-db.c: Allow direct dependence on libthread_db.
12582 (thread_db_free): Adjust.
12583 * config.in: Regenerate.
12584 * configure: Likewise.
12585
12586 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12587
12588 PR gdb/10757
12589 * thread-db.c (attach_thread): New function.
12590 (maybe_attach_thread): Return success/failure.
12591 (find_new_threads_callback): Adjust.
12592 (thread_db_find_new_threads): Loop until no new threads.
12593
12594 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12595
12596 * proc-service.c (ps_lgetregs): Formatting.
12597
12598 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12599
12600 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12601 * configure.ac: Adjust.
12602 * linux-low.h (struct process_info_private): Move members to struct
12603 thread_db.
12604 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12605 * linux-low.c (linux_remove_process): Adjust.
12606 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12607 * server.c (handle_query): Move code ...
12608 (handle_monitor_command): ... here. New function.
12609 * target.h (struct target_ops): New member.
12610 * thread-db.c (struct thread_db): New.
12611 (libthread_db_search_path): New variable.
12612 (thread_db_create_event, thread_db_enable_reporting)
12613 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12614 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12615 (try_thread_db_load_1, dladdr_to_soname): New functions.
12616 (try_thread_db_load, thread_db_load_search): New functions.
12617 (thread_db_init): Search for libthread_db.
12618 (thread_db_free): New function.
12619 (thread_db_handle_monitor_command): Likewise.
12620 * config.in: Regenerate.
12621 * configure: Regenerate.
12622
12623 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12624
12625 * spu-low.c (spu_kill): Wait for inferior to terminate.
12626 Call clear_inferiors.
12627 (spu_detach): Call clear_inferiors.
12628
12629 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12630
12631 * aclocal.m4: Regenerate.
12632 * config.in: Likewise.
12633 * configure: Likewise.
12634
12635 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12636
12637 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12638 (parse_spufs_run): New function.
12639 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12640 (ppc_breakpoint_at): Handle SPU breakpoints.
12641
12642 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12643
12644 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12645 (SPUFS_MAGIC): Define.
12646 (spu_enumerate_spu_ids): New function.
12647 (linux_qxfer_spu): New function.
12648 (linux_target_ops): Install linux_qxfer_spu.
12649
12650 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12651
12652 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12653 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12654 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12655 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12656 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12657 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12658 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12659 (init_registers_powerpc_cell32l): Add prototype.
12660 (init_registers_powerpc_cell64l): Likewise.
12661 (ppc_arch_setup): Detect Cell/B.E. architecture.
12662
12663 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12664
12665 * Makefile.in (datarootdir): New variable.
12666
12667 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12668
12669 * linux-low.c (linux_write_memory): Update debugging output.
12670 * Makefile.in (clean): Add new descriptions.
12671 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12672 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12673 * configure.srv: Add new files for arm*-*-linux*.
12674 * linux-arm-low.c: Add new declarations.
12675 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12676 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12677 (HWCAP_VFPv3D16): New.
12678 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12679 instead of __IWMMXT__.
12680 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12681 (arm_arch_setup): New.
12682 (target_regsets): Remove #ifdef. Add VFP regset.
12683 (the_low_target): Use arm_arch_setup.
12684
12685 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12686
12687 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12688 the main thread again.
12689
12690 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12691
12692 Adding Neutrino gdbserver.
12693 * configure: Regenerated.
12694 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12695 * configure.srv (i[34567]86-*-nto*): New target.
12696 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12697 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12698 (nto_comctrl) [__QNX__]: New function.
12699 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12700
12701 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12702
12703 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12704 srv_tgtobj.
12705
12706 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12707 Pedro Alves <pedro@codesourcery.com>
12708
12709 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12710 don't support CONTEXT_EXTENDED_REGISTERS.
12711 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12712 (the_low_target): Install them.
12713 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12714 failing with ERROR_PIPE_NOT_CONNECTED.
12715
12716 2009-06-30 Doug Evans <dje@google.com>
12717 Pierre Muller <muller@ics.u-strasbg.fr>
12718
12719 Add h/w watchpoint support to x86-linux, win32-i386.
12720 * Makefile.in (SFILES): Add i386-low.c
12721 (i386_low_h): Define.
12722 (i386-low.o): Add dependencies.
12723 (linux-x86-low.o): Add i386-low.h dependency.
12724 (win32-i386-low.o): Ditto.
12725 * i386-low.c: New file.
12726 * i386-low.h: New file.
12727 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12728 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12729 * linux-low.c (linux_add_process): Initialize arch_private.
12730 (linux_remove_process): Free arch_private.
12731 (add_lwp): Initialize arch_private.
12732 (delete_lwp): Free arch_private.
12733 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12734 provided.
12735 * linux-low.h (process_info_private): New member arch_private.
12736 (lwp_info): New member arch_private.
12737 (linux_target_ops): New members new_process, new_thread,
12738 prepare_to_resume.
12739 (ptid_of): New macro.
12740 * linux-x86-low.c: Include stddef.h, i386-low.h.
12741 (arch_process_info): New struct.
12742 (arch_lwp_info): New struct.
12743 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12744 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12745 (i386_dr_low_get_status): New function.
12746 (x86_insert_point, x86_remove_point): New functions.
12747 (x86_stopped_by_watchpoint): New function.
12748 (x86_stopped_data_address): New function.
12749 (x86_linux_new_process, x86_linux_new_thread): New functions.
12750 (x86_linux_prepare_to_resume): New function.
12751 (the_low_target): Add entries for insert_point, remove_point,
12752 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12753 prepare_to_resume.
12754 * server.c (debug_hw_points): New global.
12755 (monitor_show_help): Document set debug-hw-points.
12756 (handle_query): Process "set debug-hw-points".
12757 * server.h (debug_hw_points): Declare.
12758 (paddress): Declare.
12759 * utils.c (NUMCELLS, CELLSIZE): New macros.
12760 (get_sell, xsnprintf, paddress): New functions.
12761 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12762 remove_point, stopped_by_watchpoint, stopped_data_address.
12763 * win32-i386-low.c: Include i386-low.h.
12764 (debug_reg_state): Replaces dr.
12765 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12766 (i386_dr_low_get_status): New function.
12767 (i386_insert_point, i386_remove_point): New functions.
12768 (i386_stopped_by_watchpoint): New function.
12769 (i386_stopped_data_address): New function.
12770 (i386_initial_stuff): Update.
12771 (get_thread_context,set_thread_context,i386_thread_added): Update.
12772 (the_low_target): Add entries for insert_point,
12773 remove_point, stopped_by_watchpoint, stopped_data_address.
12774 * win32-low.c (win32_insert_watchpoint): New function.
12775 (win32_remove_watchpoint): New function.
12776 (win32_stopped_by_watchpoint): New function.
12777 (win32_stopped_data_address): New function.
12778 (win32_target_ops): Add entries for insert_watchpoint,
12779 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12780 * win32-low.h (win32_target_ops): New members insert_point,
12781 remove_point, stopped_by_watchpoint, stopped_data_address.
12782
12783 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12784
12785 * server.c (process_serial_event): Re-return unsupported, not
12786 error, if the type isn't recognized. Re-allow supporting only
12787 insert or remove packets. Also call require_running for
12788 breakpoints. Add missing break statement to default case. Tidy.
12789 * target.h (struct target_ops): Rename insert_watchpoint to
12790 insert_point, and remove_watchpoint to remove_point.
12791
12792 * linux-low.h (struct linux_target_ops): Likewise.
12793 * linux-low.c (linux_insert_watchpoint): Rename to ...
12794 (linux_insert_point): ... this. Adjust.
12795 (linux_remove_watchpoint): Rename to ...
12796 (linux_remove_point): ... this. Adjust.
12797 (linux_target_ops): Adjust.
12798 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12799 (cris_insert_point): ... this.
12800 (cris_remove_watchpoint): Rename to ...
12801 (cris_remove_point): ... this.
12802 (the_low_target): Adjust.
12803
12804 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12805
12806 * server.c (handle_v_kill): Pass signal_pid to
12807 kill_inferior if multi_process is zero.
12808
12809 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12810
12811 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12812 * target.h (target_ops): Comment for *_watchpoint to make it clear
12813 the functions can get types '0' and '1'.
12814
12815 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12816
12817 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12818 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12819 * regcache.c (get_regcache): Likewise.
12820 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12821 * win32-low.c (child_fetch_inferior_registers): Remove check for
12822 regno 0.
12823
12824 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12825 Pedro Alves <pedro@codesourcery.com>
12826
12827 * target.h (struct target_ops) <supports_multi_process>: New
12828 callback.
12829 (target_supports_multi_process): New.
12830 * server.c (handle_query): Even if GDB reports support, only
12831 enable multi-process if the target also supports it. Report
12832 multi-process support only if the target backend supports it.
12833 * linux-low.c (linux_supports_multi_process): New function.
12834 (linux_target_ops): Install it as target_supports_multi_process
12835 callback.
12836
12837 2009-05-24 Doug Evans <dje@google.com>
12838
12839 Global renaming of find_thread_pid to find_thread_ptid.
12840 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12841 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12842 All callers updated.
12843
12844 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12845 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12846 directly.
12847
12848 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12849 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12850 (linux_resume_one_lwp): Ditto.
12851
12852 2009-05-23 Doug Evans <dje@google.com>
12853
12854 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12855 from struct inferior_list_entry * to struct lwp_info *.
12856 All callers updated.
12857
12858 2009-05-13 Doug Evans <dje@google.com>
12859
12860 * linux-x86-low.c: Don't include assert.h.
12861 (x86_siginfo_fixup): Use fatal, not assert.
12862 (x86_arch_setup): Fix comment.
12863
12864 2009-05-12 Doug Evans <dje@google.com>
12865
12866 Biarch support for i386/amd64 gdbserver.
12867 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12868 Add linux-x86-low.c.
12869 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12870 (linux-x86-low.o): Add.
12871 * linux-x86-64-low.c: Delete.
12872 * linux-i386-low.c: Delete.
12873 * linux-x86-low.c: New file.
12874 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12875 linux-x86-low.o.
12876 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12877 linux-x86-low.o.
12878 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12879 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12880 (linux_child_pid_to_exec_file): New function.
12881 (elf_64_header_p, elf_64_file_p): New functions.
12882 (siginfo_fixup): New function.
12883 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12884 give target a chance to convert layout.
12885 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12886 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12887
12888 2009-05-07 Doug Evans <dje@google.com>
12889
12890 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12891 (regsets_store_inferior_registers): Ditto.
12892
12893 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12894
12895 PR server/10048
12896
12897 * linux-low.c (must_set_ptrace_flags): Delete.
12898 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12899 of the global.
12900 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12901 `lwp->must_set_ptrace_flags' instead.
12902 (linux_wait_for_event_1): Set ptrace options here.
12903 (linux_wait_1): ... not here.
12904
12905 2009-04-30 Doug Evans <dje@google.com>
12906
12907 * inferiors.c (started_inferior_callback): New function.
12908 (attached_inferior_callback): New function.
12909 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12910 * server.c (print_started_pid, print_attached_pid): New functions.
12911 (detach_or_kill_for_exit): New function.
12912 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12913 * server.h (have_started_inferiors_p): Declare.
12914 (have_attached_inferiors_p): Declare.
12915
12916 * inferiors.c (remove_process): Fix memory leak, free process.
12917 * linux-low.c (linux_remove_process): New function.
12918 (linux_kill): Call it instead of remove_process.
12919 (linux_detach, linux_wait_1): Ditto.
12920
12921 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12922
12923 * configure.srv: Add x86 Windows CE target.
12924
12925 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12926
12927 * inferiors.c (get_thread_process): Make global.
12928 * server.h (get_thread_process): Add prototype.
12929 * thread-db.c (find_one_thread): Use get_thread_process
12930 instead of current_process.
12931 (thread_db_get_tls_address): Do not crash if called when
12932 thread layer is not yet initialized.
12933
12934 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12935
12936 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12937 * spu-low.c (current_tid): Rename to ...
12938 (current_ptid): ... this.
12939 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12940 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12941 ptid_get_lwp (current_ptid) instead of current_tid.
12942 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12943 instead of current_tid. Use find_process_pid to verify pid
12944 argument is valid. Pass proper argument to remove_process.
12945 (spu_thread_alive): Compare current_ptid instead of current_tid.
12946 (spu_resume): Likewise.
12947
12948 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12949
12950 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12951 variable.
12952
12953 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12954
12955 Implement the multiprocess extensions, and add linux multiprocess
12956 support.
12957
12958 * server.h (ULONGEST): Declare.
12959 (struct ptid, ptid_t): New.
12960 (minus_one_ptid, null_ptid): Declare.
12961 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12962 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12963 (struct inferior_list_entry): Change `id' type from unsigned from
12964 to ptid_t.
12965 (struct sym_cache, struct breakpoint, struct
12966 process_info_private): Forward declare.
12967 (struct process_info): Declare.
12968 (current_process): Declare.
12969 (all_processes): Declare.
12970 (initialize_inferiors): Declare.
12971 (add_thread): Adjust to use ptid_t.
12972 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12973 (add_process, remove_process, find_thread_pid): Declare.
12974 (find_inferior_id): Adjust to use ptid_t.
12975 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12976 (multi_process): Declare.
12977 (push_event): Adjust to use ptid_t.
12978 (read_ptid, write_ptid): Declare.
12979 (prepare_resume_reply): Adjust to use ptid_t.
12980 (clear_symbol_cache): Declare.
12981 * inferiors.c (all_processes): New.
12982 (null_ptid, minus_one_ptid): New.
12983 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12984 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12985 (add_thread): Change unsigned long to ptid. Remove gdb_id
12986 parameter. Adjust.
12987 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12988 (gdb_id_to_thread): Rename to ...
12989 (find_thread_pid): ... this. Change unsigned long to ptid.
12990 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12991 (loaded_dll, pull_pid_from_list): Adjust.
12992 (add_process, remove_process, find_process_pid)
12993 (get_thread_process, current_process, initialize_inferiors): New.
12994 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12995 (struct target_waitstatus) <related_pid>: Ditto.
12996 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12997 return type to int.
12998 (struct target_ops) <join>: Add `pid' argument.
12999 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13000 (struct target_ops) <wait>: Add `ptid' field. Change return type
13001 to ptid.
13002 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13003 (mywait): Add `ptid' argument. Change return type to ptid_t.
13004 (target_pid_to_str): Declare.
13005 * target.c (set_desired_inferior): Adjust to use ptids.
13006 (mywait): Add new `ptid' argument. Adjust.
13007 (target_pid_to_str): New.
13008 * mem-break.h (free_all_breakpoints): Declare.
13009 * mem-break.c (breakpoints): Delelete.
13010 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13011 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13012 to use per-process breakpoint list.
13013 (free_all_breakpoints): New.
13014 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13015 (symbol_cache, all_symbols_looked_up): Delete.
13016 (hexchars): New.
13017 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13018 read_ptid): New.
13019 (prepare_resume_reply): Change ptid argument's type from unsigned
13020 long to ptid_t. Adjust. Implement W;process and X;process.
13021 (free_sym_cache, clear_symbol_cache): New.
13022 (look_up_one_symbol): Adjust to per-process symbol cache. *
13023 * server.c (cont_thread, general_thread, step_thread): Change type
13024 to ptid_t.
13025 (attached): Delete.
13026 (multi_process): New.
13027 (last_ptid): Change type to ptid_t.
13028 (struct vstop_notif) <ptid>: Change type to ptid_t.
13029 (queue_stop_reply, push_event): Change `ptid' argument's type to
13030 ptid_t.
13031 (discard_queued_stop_replies): Add `pid' argument.
13032 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13033 changes. Don't reference the `attached' global.
13034 (attach_inferior): Adjust to mywait interface changes.
13035 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13036 features. Handle and report "multiprocess+". Handle
13037 "qAttached:PID".
13038 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13039 changes.
13040 (handle_v_kill): New.
13041 (handle_v_stopped): Adjust to use target_pid_to_str.
13042 (handle_v_requests): Allow multiple attaches and runs when
13043 multiprocess extensions are in effect. Handle "vKill".
13044 (myresume): Adjust to use ptids.
13045 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13046 (handle_status): Adjust to discard_queued_stop_replies interface
13047 change.
13048 (first_thread_of, kill_inferior_callback)
13049 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13050 (main): Call initialize_inferiors. Adjust to use ptids, killing
13051 and detaching from all inferiors. Handle multiprocess packet
13052 variants.
13053 * linux-low.h: Include gdb_proc_service.h.
13054 (struct process_info_private): New.
13055 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13056 <lwpid_of>: Use ptid_get_lwp.
13057 (get_lwp_thread): Adjust.
13058 (struct lwp_info): Add `dead' member.
13059 (find_lwp_pid): Declare.
13060 * linux-low.c (thread_db_active): Delete.
13061 (new_inferior): Adjust comment.
13062 (inferior_pid): Delete.
13063 (linux_add_process): New.
13064 (handle_extended_wait): Adjust.
13065 (add_lwp): Change unsigned long to ptid.
13066 (linux_create_inferior): Add process to processes table. Adjust
13067 to use ptids. Don't set new_inferior here.
13068 (linux_attach_lwp): Rename to ...
13069 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13070 it. Adjust to use ptids.
13071 (linux_attach_lwp): New.
13072 (linux_attach): Add process to processes table. Don't set
13073 new_inferior here.
13074 (struct counter): New.
13075 (second_thread_of_pid_p, last_thread_of_process_p): New.
13076 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13077 multiple processes.
13078 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13079 processes. Remove process from process table.
13080 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13081 to multiple processes.
13082 (any_thread_of): New.
13083 (linux_detach): Add `pid' argument, and handle it. Remove process
13084 from processes table.
13085 (linux_join): Add `pid' argument. Handle it.
13086 (linux_thread_alive): Change unsighed long argument to ptid_t.
13087 Consider dead lwps as not being alive.
13088 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13089 threads we're not interested in.
13090 (same_lwp, find_lwp_pid): New.
13091 (linux_wait_for_lwp): Change `pid' argument's type from int to
13092 ptid_t. Adjust.
13093 (linux_wait_for_event): Rename to ...
13094 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13095 from int to ptid_t. Adjust.
13096 (linux_wait_for_event): New.
13097 (linux_wait_1): Add `ptid' argument. Change return type to
13098 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13099 that exit from the process table.
13100 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13101 Adjust.
13102 (mark_lwp_dead): New.
13103 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13104 stopping all threads, mark its main lwp as dead.
13105 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13106 ptids.
13107 (fetch_register, usr_store_inferior_registers)
13108 (regsets_fetch_inferior_registers)
13109 (regsets_store_inferior_registers, linux_read_memory)
13110 (linux_write_memory): Inline `inferior_pid'.
13111 (linux_look_up_symbols): Adjust to use per-process
13112 `thread_db_active'.
13113 (linux_request_interrupt): Adjust to use ptids.
13114 (linux_read_auxv): Inline `inferior_pid'.
13115 (initialize_low): Don't reference thread_db_active.
13116 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13117 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13118 (ps_getpid): Return the pid of the current inferior.
13119 * thread-db.c (proc_handle, thread_agent): Delete.
13120 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13121 per-process data.
13122 (find_one_thread): Change argument type to ptid_t. Adjust to
13123 per-process data.
13124 (maybe_attach_thread): Adjust to per-process data and ptids.
13125 (thread_db_find_new_threads): Ditto.
13126 (thread_db_init): Ditto.
13127 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13128 processes table. Adjust to use ptids.
13129 (spu_kill, spu_detach): Adjust interface. Remove process from
13130 processes table.
13131 (spu_join, spu_thread_alive): Adjust interface.
13132 (spu_wait): Adjust interface. Remove process from processes
13133 table. Adjust to use ptids.
13134 * win32-low.c (current_inferior_tid): Delete.
13135 (current_inferior_ptid): New.
13136 (debug_event_ptid): New.
13137 (thread_rec): Take a ptid. Adjust.
13138 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13139 (child_delete_thread): Ditto.
13140 (do_initial_child_stuff): Add `attached' argument. Add process to
13141 processes table.
13142 (child_fetch_inferior_registers, child_store_inferior_registers):
13143 Adjust.
13144 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13145 (win32_attach): Pass 1 to do_initial_child_stuff.
13146 (win32_kill): Adjust interface. Remove process from processes
13147 table.
13148 (win32_detach): Ditto.
13149 (win32_join): Adjust interface.
13150 (win32_thread_alive): Take a ptid.
13151 (win32_resume): Adjust to use ptids.
13152 (get_child_debug_event): Ditto.
13153 (win32_wait): Adjust interface. Remove exiting process from
13154 processes table.
13155
13156 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13157
13158 Non-stop mode support.
13159
13160 * server.h (non_stop): Declare.
13161 (gdb_client_data, handler_func): Declare.
13162 (delete_file_handler, add_file_handler, start_event_loop):
13163 Declare.
13164 (handle_serial_event, handle_target_event, push_event)
13165 (putpkt_notif): Declare.
13166 * target.h (enum resume_kind): New.
13167 (struct thread_resume): Replace `step' field by `kind' field.
13168 (TARGET_WNOHANG): Define.
13169 (struct target_ops) <wait>: Add `options' argument.
13170 <supports_non_stop, async, start_non_stop>: New fields.
13171 (target_supports_non_stop, target_async): New.
13172 (start_non_stop): Declare.
13173 (mywait): Add `options' argument.
13174 * target.c (mywait): Add `options' argument. Print child exit
13175 notifications here.
13176 (start_non_stop): New.
13177 * server.c (non_stop, own_buf, mem_buf): New globals.
13178 (struct vstop_notif): New.
13179 (notif_queue): New global.
13180 (queue_stop_reply, push_event, discard_queued_stop_replies)
13181 (send_next_stop_reply): New.
13182 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13183 interface changes.
13184 (attach_inferior): In non-stop mode, don't wait for the target
13185 here.
13186 (handle_general_set): Handle QNonStop.
13187 (handle_query): When handling qC, return the current general
13188 thread, instead of the first thread of the list.
13189 (handle_query): If the backend supports non-stop mode, include
13190 QNonStop+ in the qSupported query response.
13191 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13192 and non-stop mode.
13193 (handle_v_attach, handle_v_run): Handle non-stop mode.
13194 (handle_v_stopped): New.
13195 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13196 (myresume): Adjust to use resume_kind. Handle non-stop.
13197 (queue_stop_reply_callback): New.
13198 (handle_status): Handle non-stop mode.
13199 (main): Clear non_stop flag on reconnection. Use the event-loop.
13200 Refactor serial protocol handling from here ...
13201 (process_serial_event): ... to this new function. When GDB
13202 selects any thread, select one here. In non-stop mode, wait until
13203 GDB acks all pending events before exiting.
13204 (handle_serial_event, handle_target_event): New.
13205 * remote-utils.c (remote_open): Install remote_desc in the event
13206 loop.
13207 (remote_close): Remove remote_desc from the event loop.
13208 (putpkt_binary): Rename to...
13209 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13210 (putpkt_binary): New as wrapper around putpkt_binary_1.
13211 (putpkt_notif): New.
13212 (prepare_resume_reply): In non-stop mode, don't change the
13213 general_thread.
13214 * event-loop.c: New.
13215 * Makefile.in (OBJ): Add event-loop.o.
13216 (event-loop.o): New rule.
13217
13218 * linux-low.h (pid_of): Moved here.
13219 (lwpid_of): New.
13220 (get_lwp_thread): Use lwpid_of.
13221 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13222 * linux-low.c (pid_of): Delete.
13223 (inferior_pid): Use lwpid_of.
13224 (linux_event_pipe): New.
13225 (target_is_async_p): New.
13226 (delete_lwp): New.
13227 (handle_extended_wait): Use lwpid_of.
13228 (add_lwp): Don't set lwpid field.
13229 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13230 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13231 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13232 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13233 first. Adjust to linux_wait_for_event interface changes. Use
13234 lwpid_of.
13235 (linux_detach): Don't delete the main lwp here.
13236 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13237 (status_pending_p): Don't consider explicitly suspended lwps.
13238 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13239 pointer. Add OPTIONS argument. Change return type to int. Use
13240 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13241 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13242 pointer. Add status pointer argument. Return a pid instead of a
13243 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13244 changes. In non-stop mode, don't switch to a random thread.
13245 (linux_wait): Rename to...
13246 (linux_wait_1): ... this. Add target_options argument, and handle
13247 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13248 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13249 clean exit and signal exit code. Don't stop all threads in
13250 non-stop mode. In all-stop mode, only stop all threads when
13251 reporting a stop to GDB. Handle explicit thread stop requests.
13252 (async_file_flush, async_file_mark): New.
13253 (linux_wait): New.
13254 (send_sigstop): Use lwpid_of.
13255 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13256 interface changes. In non-stop mode, don't switch to a random
13257 thread.
13258 (linux_resume_one_lwp): Use lwpid_of.
13259 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13260 (linux_resume_one_thread): ... this. Handle resume_stop. In
13261 non-stop mode, don't look for pending flag in all threads.
13262 (resume_status_pending_p): Don't consider explicitly suspended
13263 threads.
13264 (my_waitpid): Reimplement. Emulate __WALL.
13265 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13266 Use lwpid_of.
13267 (sigchld_handler, linux_supports_non_stop, linux_async)
13268 (linux_start_non_stop): New.
13269 (linux_target_ops): Register linux_supports_non_stop, linux_async
13270 and linux_start_non_stop.
13271 (initialize_low): Install SIGCHLD handler.
13272 * thread-db.c (thread_db_create_event, find_one_thread)
13273 (thread_db_get_tls_address): Use lwpid_of.
13274 * win32-low.c (win32_detach): Adjust to use resume_kind.
13275 (win32_wait): Add `options' argument.
13276 * spu-low.c (spu_resume): Adjust to use resume_kind.
13277 (spu_wait): Add `options' argument.
13278
13279 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13280
13281 Decouple target code from remote protocol.
13282
13283 * target.h (enum target_waitkind): New.
13284 (struct target_waitstatus): New.
13285 (struct target_ops) <wait>: Return an unsigned long. Take a
13286 target_waitstatus pointer instead of a char pointer.
13287 (mywait): Likewise.
13288 * target.c (mywait): Change prototype to return an unsigned long.
13289 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13290 * server.h (thread_from_wait, old_thread_from_wait): Delete
13291 declarations.
13292 (prepare_resume_reply): Change prototype to take a
13293 target_waitstatus.
13294 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13295 (last_status, last_ptid): New.
13296 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13297 pid instead of a signal.
13298 (attach_inferior): Remove "status" and "signal" parameters.
13299 Adjust.
13300 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13301 not as an address.
13302 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13303 (handle_v_requests, myresume): Remove "status" and "signal"
13304 parameters. Adjust.
13305 (handle_status): New.
13306 (main): Delete local `status'. Adjust.
13307 * remote-utils.c: Include target.h.
13308 (prepare_resume_reply): Change prototype to take a
13309 target_waitstatus. Adjust.
13310
13311 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13312 interface.
13313 * spu-low.c (spu_wait): Adjust.
13314 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13315 Delete.
13316 (win32_wait): Adjust.
13317
13318 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13319
13320 * target.h (struct thread_resume): Delete leave_stopped member.
13321 (struct target_ops): Add a `n' argument to the `resume' callback.
13322 * server.c (start_inferior): Adjust.
13323 (handle_v_cont, myresume): Adjust.
13324 * linux-low.c (check_removed_breakpoint): Adjust to resume
13325 interface change, and to removed leave_stopped field.
13326 (resume_ptr): Delete.
13327 (struct thread_resume_array): New.
13328 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13329 resume interface change.
13330 (linux_continue_one_thread, linux_queue_one_thread)
13331 (resume_status_pending_p): Check if the resume field is NULL
13332 instead of checking the leave_stopped member.
13333 (linux_resume): Adjust to the target resume interface change.
13334 * spu-low.c (spu_resume): Adjust to the target resume interface
13335 change.
13336 * win32-low.c (win32_detach, win32_resume): Ditto.
13337
13338 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13339
13340 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13341 flag.
13342 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13343 pending.
13344 (linux_continue_one_thread): Only preserve the stepping flag if
13345 there's a pending breakpoint.
13346
13347 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13348
13349 * server.c (main): After the inferior having exited, call
13350 remote_close before exiting gdbserver.
13351
13352 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13353
13354 Fix size of FPSCR in Power 7 processors.
13355 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13356 (PPC_FEATURE_HAS_DFP): New #define.
13357 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13358 size of the FPSCR.
13359
13360 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13361
13362 * server.c (handle_query) Whitespace and formatting.
13363
13364 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13365
13366 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13367 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13368 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13369 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13370 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13371 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13372 Makefile.in, configure.ac: Fix whitespace throughout.
13373 * configure: Regenerate.
13374
13375 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13376
13377 * inferiors.c (find_inferior): Make it safe for the callback
13378 function to delete the currently iterated inferior.
13379
13380 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13381
13382 * Makefile.in (linuw_low_h): Move higher.
13383 (thread-db.o): Depend on $(linux_low_h).
13384
13385 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13386
13387 Rename "process" to "lwp" throughout.
13388
13389 * linux-low.c (all_processes): Rename to...
13390 (all_lwps): ... this.
13391 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13392 (add_process): Rename to ...
13393 (add_lwp): ... this. Adjust.
13394 (linux_create_inferior): Adjust.
13395 (linux_attach_lwp): Adjust.
13396 (linux_attach): Adjust.
13397 (linux_kill_one_process): Rename to ...
13398 (linux_kill_one_lwp): ... this. Adjust.
13399 (linux_kill): Adjust.
13400 (linux_detach_one_process): Rename to ...
13401 (linux_detach_one_lwp): ... this. Adjust.
13402 (linux_detach): Adjust.
13403 (check_removed_breakpoint): Adjust.
13404 (status_pending_p): Adjust.
13405 (linux_wait_for_process): Rename to ...
13406 (linux_wait_for_lwp): ... this. Adjust.
13407 (linux_wait_for_event): Adjust.
13408 (send_sigstop): Adjust.
13409 (wait_for_sigstop): Adjust.
13410 (stop_all_processes): Rename to ...
13411 (stop_all_lwps): ... this.
13412 (linux_resume_one_process): Rename to ...
13413 (linux_resume_one_lwp): ... this. Adjust.
13414 (linux_set_resume_request, linux_continue_one_thread)
13415 (linux_queue_one_thread, resume_status_pending_p)
13416 (usr_store_inferior_registers, regsets_store_inferior_registers)
13417 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13418 Adjust.
13419 * linux-low.h (get_process): Rename to ...
13420 (get_lwp): ... this. Adjust.
13421 (get_thread_process): Rename to ...
13422 (get_thread_lwp): ... this. Adjust.
13423 (get_process_thread): Rename to ...
13424 (get_lwp_thread): ... this. Adjust.
13425 (struct process_info): Rename to ...
13426 (struct lwp_info): ... this.
13427 (all_processes): Rename to ...
13428 (all_lwps): ... this.
13429 * proc-service.c (ps_lgetregs): Adjust.
13430 * thread-db.c (thread_db_create_event, find_one_thread)
13431 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13432
13433 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13434
13435 * server.c (handle_query): Handle "qAttached".
13436
13437 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13438
13439 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13440 GPLv3, update license URL.
13441
13442 2009-03-01 Doug Evans <dje@google.com>
13443
13444 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13445 (server_h): Add gdb_signals.h.
13446 (signals.o): Update.
13447 * server.h (target_signal_from_host,target_signal_to_host_p)
13448 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13449
13450 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13451
13452 * remote-utils.c (getpkt): Also generate remote-debug
13453 information if noack_mode is set.
13454
13455 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13456
13457 * server.c (handle_query): Report qXfer:siginfo:read and
13458 qXfer:siginfo:write as supported and handle them.
13459 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13460 * linux-low.c (linux_xfer_siginfo): New.
13461 (linux_target_ops): Set it.
13462
13463 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13464
13465 * server.c (gdbserver_usage): Mention --remote-debug.
13466 (main): Accept '--remote-debug' switch.
13467
13468 2009-01-18 Doug Evans <dje@google.com>
13469
13470 * regcache.c (new_register_cache): No need to check result of xcalloc.
13471 * server.c (handle_search_memory): Back out calls to xmalloc,
13472 result is checked and error is returned to user upon failure.
13473 (handle_query): Ditto. Add more checks for result of malloc.
13474 (handle_v_cont): Check result of malloc, report error back to
13475 user upon failure.
13476 (handle_v_run): Ditto. Call freeargv.
13477 * server.h (freeargv): Declare.
13478 * utils.c (freeargv): New fn.
13479
13480 2009-01-15 Doug Evans <dje@google.com>
13481
13482 * gdbreplay.c (perror_with_name): Make arg const char *.
13483 * server.h (target_signal_to_name): Make return type const char *.
13484 * thread-db.c (thread_db_err_str): Make return type const char *.
13485 * utils.c (perror_with_name): Make arg const char *.
13486
13487 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13488
13489 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13490 when handling a EXIT_PROCESS_DEBUG_EVENT.
13491
13492 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13493
13494 * gdbreplay.c (gdbreplay_version): Update copyright year.
13495 * server.c (gdbserver_version): Likewise.
13496
13497 2009-01-05 Doug Evans <dje@google.com>
13498
13499 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13500 (handle_extended_wait): Improve comment.
13501
13502 2008-12-13 Doug Evans <dje@google.com>
13503
13504 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13505 * server.h (ATTR_MALLOC): New macro.
13506 (xmalloc,xcalloc,xstrdup): Declare.
13507 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13508 * inferiors.c: Ditto.
13509 * linux-low.c: Ditto.
13510 * mem-break.c: Ditto.
13511 * regcache.c: Ditto.
13512 * remote-utils.c: Ditto.
13513 * server.c: Ditto.
13514 * target.c: Ditto.
13515 * win32-low.c: Ditto.
13516
13517 2008-12-12 Doug Evans <dje@google.com>
13518
13519 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13520 in debugging printf.
13521
13522 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13523
13524 2008-12-09 Doug Evans <dje@google.com>
13525
13526 * linux-low.h (struct process_info): Delete member tid, unused.
13527 * thread-db.c (find_one_thread): Update.
13528 (maybe_attach_thread): Update.
13529
13530 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13531
13532 * target.h (struct target_ops): Add qxfer_osdata member.
13533 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13534 and dirent.h.
13535 (linux_qxfer_osdata): New functions.
13536 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13537 callback.
13538 * server.c (handle_query): Handle "qXfer:osdata:read:".
13539 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13540 (buffer_xml_printf): New functions.
13541 * server.h (struct buffer): New.
13542 (buffer_grow_str, buffer_grow_str0): New macros.
13543 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13544 (buffer_xml_printf): Declare.
13545
13546 2008-11-24 Doug Evans <dje@google.com>
13547
13548 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13549
13550 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * server.c (handle_v_run): Always use the supplied argument list.
13553
13554 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13555
13556 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13557 (xtensa_regmap_table): Add entry for scompare1.
13558
13559 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13560
13561 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13562 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13563 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13564 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13565 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13566 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13567 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13568 XML target descriptions.
13569 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13570 when inferior is running on an ISA 2.05 or later processor. Add
13571 special case to return offset for full 64-bit slot of FPSCR when
13572 in 32-bits.
13573
13574 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13575
13576 * Makefile.in (SFILES, clean): Added sparc64 files.
13577 (reg-sparc64.o, reg-sparc64.c): New.
13578 * configure.srv (sparc*-*-linux*): New configuration.
13579 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13580 syscall arguments for SPARC.
13581 (regsets_store_inferior_registers): Likewise.
13582 * linux-sparc-low.c: New file.
13583
13584 2008-10-21 Doug Evans <dje@google.com>
13585
13586 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13587 (READLINE_DIR,READLINE_DEP): Delete.
13588 (INTERNAL_CFLAGS): Update.
13589 (LINTFLAGS): Update.
13590
13591 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13592
13593 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13594 whole argv from the last run, not just argv[0].
13595
13596 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13597
13598 * regcache.c (new_register_cache): Return NULL if the register
13599 cache size isn't known yet.
13600 (free_register_cache): Avoid dereferencing a NULL regcache.
13601
13602 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * configure.srv: Merge MIPS and MIPS64.
13605
13606 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13607
13608 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13609
13610 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13611
13612 * Makefile.in: Add required vsx dependencies.
13613
13614 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13615 Declare init_registers_powerpc_vsx32l.
13616 Declare init_registers_powerpc_vsx64l.
13617 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13618 (ppc_arch_setup): Check for VSX in hwcap.
13619 (ppc_fill_vsxregset): New function.
13620 (ppc_store_vsxregset): New function.
13621 Add new VSX entry in regset_info target_regsets.
13622
13623 * configure.srv: Add new VSX dependencies.
13624
13625 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13626
13627 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13628 (remote_open): Set or clear transport_is_reliable.
13629 (putpkt_binary): Don't expect acks in noack mode.
13630 (getpkt): Don't send ack/nac in noack mode.
13631 * server.c (handle_general_set): Handle QStartNoAckMode.
13632 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13633 qSupported.
13634 (main): Reset noack_mode on every connection.
13635 * server.h (noack_mode): Declare.
13636
13637 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13638
13639 * Makefile.in (GDBREPLAY_OBS): New variable.
13640 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13641
13642 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13643 Daniel Jacobowitz <dan@codesourcery.com>
13644
13645 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13646 (usr_store_inferior_registers): Likewise.
13647 (regsets_store_inferior_registers): Likewise.
13648
13649 2008-07-31 Rolf Jansen <rj@surtec.com>
13650 Pedro Alves <pedro@codesourcery.com>
13651
13652 * configure.ac: Check for memmem declaration.
13653 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13654 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13655 (disable_packet_qfThreadInfo): Unconditionally compile.
13656 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13657 * configure, config.in: Regenerate.
13658
13659 2008-07-28 Doug Kwan <dougkwan@google.com>
13660
13661 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13662 (linux_write_memory): Remove declaration of errno.
13663
13664 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13665
13666 * linux-low.c (handle_extended_wait): Do not use "status"
13667 variable uninitialized.
13668
13669 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13670
13671 * server.c (handle_v_attach): Inhibit reporting dll changes.
13672
13673 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13674
13675 * remote-utils.c (prepare_resume_reply): If requested, don't
13676 output "thread:TID" in the T stop reply.
13677
13678 * server.c (disable_packet_vCont, disable_packet_Tthread)
13679 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13680 (handle_query): If requested, disable support for qC, qfThreadInfo
13681 and qsThreadInfo.
13682 (handle_v_requests): If requested, disable support for vCont.
13683 (gdbserver_show_disableable): New.
13684 (main): Handle --disable-packet and --disable-packet=LIST.
13685
13686 * server.h (disable_packet_vCont, disable_packet_Tthread)
13687 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13688
13689 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13690
13691 * server.c (gdbserver_usage): Mention --version.
13692
13693 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13694
13695 * Makefile.in (gdbreplay.o): New rule.
13696
13697 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13698
13699 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13700 message, not gdbserver.
13701
13702 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13703 Nathan Sidwell <nathan@codesourcery.com>
13704 Joseph Myers <joseph@codesourcery.com>
13705
13706 * acinclude.m4: Include ../../config/acx.m4.
13707 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13708 * configure, config.in: Regenerate.
13709 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13710 * server.c (gdbserver_version): Print PKGVERSION.
13711 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13712 (main): Adjust gdbserver_usage calls.
13713 * gdbreplay.c (version, host_name): Add declarations.
13714 (gdbreplay_version, gdbreplay_usage): New.
13715 (main): Accept --version and --help options.
13716
13717 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13718
13719 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13720 (arm_breakpoint_at): Handle Thumb.
13721 (the_low_target): Add comment.
13722
13723 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13724
13725 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13726
13727 2008-05-09 Doug Evans <dje@google.com>
13728
13729 * server.h (decode_search_memory_packet): Declare.
13730 * remote-utils.c (decode_search_memory_packet): New fn.
13731 * server.c (handle_search_memory_1): New fn.
13732 (handle_search_memory): New fn.
13733 (handle_query): Process qSearch:memory packets.
13734
13735 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13736
13737 * regcache.c (registers_length): Remove.
13738 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13739 full register packet.
13740 * regcache.h (registers_length): Remove prototype.
13741 * server.h (PBUFSIZ): Define to 16384.
13742
13743 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13744
13745 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13746 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13747 powerpc-64l.o, and powerpc-altivec64l.o.
13748 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13749 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13750 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13751 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13752 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13753 to srv_xmlfiles.
13754
13755 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13756 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13757 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13758 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13759 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13760 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13761 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13762 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13763 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13764 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13765 (clean): Update.
13766
13767 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13768 (init_registers_powerpc_32l): ... this new prototype.
13769 (init_registers_powerpc_32): Remove, replace by ...
13770 (init_registers_powerpc_altivec32l): ... this new prototype.
13771 (init_registers_powerpc_e500): Remove, replace by ...
13772 (init_registers_powerpc_e500l): ... this new prototype.
13773 (init_registers_ppc64): Remove, replace by ...
13774 (init_registers_powerpc_64l): ... this new prototype.
13775 (init_registers_powerpc_64): Remove, replace by ...
13776 (init_registers_powerpc_altivec64l): ... this new prototype.
13777 (ppc_num_regs): Set to 73.
13778 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13779 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13780 (ppc_cannot_store_register): Handle orig_r3 and trap.
13781 (ppc_arch_setup): Update init_registers_... calls.
13782 (ppc_fill_gregset): Handle orig_r3 and trap.
13783
13784 * inferiors.c (clear_inferiors): Reset current_inferior.
13785
13786 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13787
13788 * acinclude.m4: Add override.m4.
13789 * configure: Regenerate.
13790
13791 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13792
13793 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13794 initial call to init_register_ppc64.
13795
13796 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13797
13798 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13799 single powerpc*-*-linux* case.
13800 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13801
13802 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13803
13804 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13805 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13806 from reg_xmlfiles.
13807 * linux-ppc-low.c: Include <elf.h>.
13808 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13809 (ppc_hwcap): New global variable.
13810 (ppc_regmap): Remove __SPE__ #ifdef sections.
13811 (ppc_regmap_e500): New global variable.
13812 (ppc_cannot_store_register): Update __SPE__ special case.
13813 (ppc_get_hwcap): New function.
13814 (ppc_arch_setup): Use it to determine whether inferior supports
13815 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13816 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13817 Do not access registers if target does not support AltiVec.
13818 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13819 Do not access registers if target does not support SPE.
13820 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13821
13822 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * linux-low.c (disabled_regsets, num_regsets): New.
13825 (use_regsets_p): Delete.
13826 (linux_wait_for_process): Clear disabled_regsets.
13827 (regsets_fetch_inferior_registers): Check and set it.
13828 (regsets_store_inferior_registers): Likewise.
13829 (linux_fetch_registers, linux_store_registers): Do not use
13830 use_regsets_p.
13831 (initialize_low): Allocate disabled_regsets.
13832
13833 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13834
13835 * Makefile.in (LIBOBJS): New.
13836 (OBS): Use LIBOBJS.
13837 (memmem.o): New rule.
13838 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13839 * configure: Regenerated.
13840
13841 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13842
13843 * server.c (handle_query): Never return "unsupported" for
13844 qXfer:features:read queries.
13845
13846 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13847
13848 * server.c (get_features_xml): Fix inverted condition.
13849 (handle_query): Always support qXfer:feature:read.
13850
13851 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13852
13853 * server.c (wrapper_argv): New.
13854 (start_inferior): Handle wrapper_argv. If set, expect an extra
13855 trap.
13856 (gdbserver_usage): Document --wrapper.
13857 (main): Parse --wrapper.
13858
13859 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13860
13861 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13862 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13863 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13864 (ppc_set_pc): Likewise.
13865 (ppc_arch_setup): New function.
13866 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13867 of collect_register.
13868 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13869
13870 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13871
13872 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13873 instead of linux-ppc64-low.o.
13874 * linux-ppc64-low.c: Remove file.
13875 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13876 (linux-ppc64-low.o): Remove rule.
13877
13878 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13879 (init_registers_powerpc_64): Likewise.
13880 (ppc_regmap): Conditionally define depending on __powerpc64__.
13881 (ppc_cannot_store_register): Do not special-case "fpscr" when
13882 compiled on __powerpc64__.
13883 (ppc_collect_ptrace_register): New function.
13884 (ppc_supply_ptrace_register): New function.
13885 (ppc_breakpoint): Change type to "unsigned int".
13886 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13887 (the_low_target): Conditionally provide initializers for the
13888 arch_setup member depending on __powerpc64__. Install
13889 collect_ptrace_register and supply_ptrace_register members.
13890
13891 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13892
13893 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13894 * server.c (gdbserver_xmltarget): Define.
13895 (get_features_xml): Use it to replace "target.xml" and arch_string.
13896
13897 * configure.srv: Remove srv_xmltarget. Add XML files that were
13898 mentioned there to srv_xmlfiles instead. Remove conditional tests
13899 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13900 srv_xmlfiles and srv_regobj to include all possible choices.
13901 * configure.ac (srv_xmltarget): Remove.
13902 (srv_xmlfiles): Do not add "target.xml".
13903 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13904 checks for supplementary target information.
13905 * configure: Regenerate.
13906 * Makefile.in (XML_TARGET): Remove.
13907 (target.xml): Remove rule.
13908 (clean): Do not clean up target.xml.
13909 (.PRECIOUS): Do not mention target.xml.
13910
13911 * target.h (struct target_ops): Remove arch_string member.
13912 * linux-low.c (linux_arch_string): Remove.
13913 (linux_target_ops): Remove arch_string initializer.
13914 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13915 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13916 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13917 * spu-low.c (spu_arch_string): Remove.
13918 (spu_target_ops): Remove arch_string initializer.
13919 * win32-low.c (win32_arch_string): Remove.
13920 (win32_target_ops): Remove arch_string initializer.
13921 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13922 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13923 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13924
13925 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13926
13927 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13928 by collect_ptrace_register and supply_ptrace_register hooks.
13929 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13930 instead of checking for the_low_target.left_pad_xfer.
13931 (usr_store_inferior_registers): Use collect_ptrace_register callback
13932 instead of checking for the_low_target.left_pad_xfer.
13933
13934 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13935 (s390_supply_ptrace_register): Likewise.
13936 (s390_fill_gregset): Call s390_collect_ptrace_register.
13937 (the_low_target): Update.
13938
13939 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13940 (ppc_supply_ptrace_register): Likewise.
13941 (the_low_target): Update.
13942
13943 * linux-i386-low.c (the_low_target): Update.
13944 * linux-x86-64-low.c (the_low_target): Update.
13945
13946 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13947
13948 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13949 reg-s390.o and reg-s390x.o.
13950
13951 * linux-low.c (new_inferior): New global variable.
13952 (linux_create_inferior, linux_attach): Set it.
13953 (linux_wait_for_process): Call the_low_target.arch_setup after the
13954 target has stopped for the first time.
13955 (initialize_low): Do not call the_low_target.arch_setup.
13956
13957 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13958 (s390_set_pc): Likewise.
13959 (s390_arch_setup): New function.
13960 (the_low_target): Use s390_arch_setup as arch_setup routine.
13961
13962 * regcache.c (realloc_register_cache): New function.
13963 (set_register_cache): Call it for each existing regcache.
13964
13965 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13966
13967 * server.h (init_registers): Remove prototype.
13968
13969 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13970 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13971 instead of init_registers ().
13972 * linux-arm-low.c (init_registers_arm): Add prototype.
13973 (init_registers_arm_with_iwmmxt): Likewise.
13974 (the_low_target): Add initializer for arch_setup field.
13975 * linux-cris-low.c (init_registers_cris): Add prototype.
13976 (the_low_target): Add initializer for arch_setup field.
13977 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13978 (the_low_target): Add initializer for arch_setup field.
13979 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13980 (the_low_target): Add initializer for arch_setup field.
13981 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13982 (the_low_target): Add initializer for arch_setup field.
13983 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13984 (the_low_target): Add initializer for arch_setup field.
13985 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13986 (the_low_target): Add initializer for arch_setup field.
13987 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13988 (init_registers_mips64_linux): Likewise.
13989 (the_low_target): Add initializer for arch_setup field.
13990 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13991 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13992 (the_low_target): Add initializer for arch_setup field.
13993 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13994 (init_registers_powerpc_64): Likewise.
13995 (the_low_target): Add initializer for arch_setup field.
13996 * linux-s390-low.c (init_registers_s390): Add prototype.
13997 (init_registers_s390x): Likewise.
13998 (the_low_target): Add initializer for arch_setup field.
13999 * linux-sh-low.c (init_registers_sh): Add prototype.
14000 (the_low_target): Add initializer for arch_setup field.
14001 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14002 (the_low_target): Add initializer for arch_setup field.
14003 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14004 (the_low_target): Add initializer for arch_setup field.
14005
14006 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14007 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14008 instead of init_registers ().
14009 * win32-arm-low.c (init_registers_arm): Add prototype.
14010 (the_low_target): Add initializer for arch_setup field.
14011 * win32-i386-low.c (init_registers_i386): Add prototype.
14012 (the_low_target): Add initializer for arch_setup field.
14013
14014 * spu-low.c (init_registers_spu): Add prototype.
14015 (initialize_low): Call initialie_registers_spu () instead of
14016 initialize_registers ().
14017
14018 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14019
14020 * server.c (handle_v_requests): When handling the vRun and vAttach
14021 packets, if already debugging a process, don't kill it. Return an
14022 error instead.
14023
14024 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14025
14026 * server.c (handle_query): Correct length check.
14027
14028 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14029
14030 * win32-low.c (do_initial_child_stuff): Add process handle
14031 parameter. Set current_process_handle and current_process_id from the
14032 parameters. Clear globals.
14033 (win32_create_inferior): Don't set current_process_handle and
14034 current_process_id here. Instead pass them on the call to
14035 do_initial_child_stuff.
14036 (win32_attach): Likewise.
14037 (win32_clear_inferiors): New.
14038 (win32_kill): Don't close the current process handle or the
14039 current thread handle here. Instead call win32_clear_inferiors.
14040 (win32_detach): Don't open a new handle to the process. Call
14041 win32_clear_inferiors.
14042 (win32_join): Don't rely on current_process_handle; open a new
14043 handle using the process id.
14044 (win32_wait): Call win32_clear_inferiors when the inferior process
14045 has exited.
14046
14047 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * server.c (monitor_show_help): Add "exit".
14050
14051 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14052
14053 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14054 (clean): Add reg-xtensa.c.
14055 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14056 * configure.srv (xtensa*-*-linux*) New target.
14057 * linux-xtensa-low.c: New.
14058 * xtensa-xtregs.c: New.
14059
14060 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14061
14062 * hostio.c: Don't include errno.h.
14063 (errno_to_fileio_errno): Move to hostio-errno.
14064 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14065 error number outputting to the target->hostio_last_error callback.
14066 (hostio_packet_error): Use FILEIO_EINVAL directly.
14067 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14068 calls to hostio_error.
14069 * hostio-errno.c: New.
14070 * server.h (hostio_last_error_from_errno): Declare.
14071 * target.h (target_ops): Add hostio_last_error member.
14072 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14073 as hostio_last_error handler.
14074 * spu-low.c (spu_target_ops): Likewise.
14075 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14076 (wince_hostio_last_error): New functions.
14077 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14078 as hostio_last_error handler.
14079 (win32_target_ops) [!_WIN32_WCE]: Register
14080 hostio_last_error_from_errno as hostio_last_error handler.
14081 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14082 (hostio-errno.o): New rule.
14083 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14084 * configure.srv (srv_hostio_err_objs): New variable. Default to
14085 hostio-errno.o.
14086 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14087 * configure: Regenerate.
14088
14089 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14092 (linux_kill, linux_detach): Clean up the process list.
14093 * remote-utils.c (remote_open): Improve port number parsing.
14094 (putpkt_binary, input_interrupt): Only send interrupts if the target
14095 is running.
14096 * server.c (extended_protocol): Make static.
14097 (attached): Define earlier.
14098 (exit_requested, response_needed, program_argv): New variables.
14099 (target_running): New.
14100 (start_inferior): Clear attached here.
14101 (attach_inferior): Set attached here.
14102 (require_running): Define.
14103 (handle_query): Use require_running and target_running. Implement
14104 "monitor exit".
14105 (handle_v_attach, handle_v_run): New.
14106 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14107 (gdbserver_usage): Update.
14108 (main): Redo argument parsing. Handle --debug and --multi. Handle
14109 --attach along with other options or after the port. Save
14110 program_argv. Support no initial program. Resynchronize
14111 communication with GDB after an error. Handle "monitor exit".
14112 Use require_running and target_running. Always allow the extended
14113 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14114 restart in extended mode.
14115 * README: Refer to the GDB manual. Update --attach usage.
14116
14117 2007-12-20 Andreas Schwab <schwab@suse.de>
14118
14119 * linux-low.c (STACK_SIZE): Define.
14120 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14121 (linux_test_for_tracefork): Likewise.
14122
14123 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * linux-low.c (linux_wait_for_event): Update messages. Do not
14126 reinsert auto-delete breakpoints.
14127 * mem-break.c (struct breakpoint): Change return type of handler to
14128 int.
14129 (set_breakpoint_at): Update handler type.
14130 (reinsert_breakpoint_handler): Return 1 instead of calling
14131 delete_breakpoint.
14132 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14133 setting a new one.
14134 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14135 * mem-break.h (set_breakpoint_at): Update handler type.
14136 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14137 * win32-low.c (auto_delete_breakpoint): New.
14138 (get_child_debug_event): Use it.
14139
14140 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * configure.ac: Check for pread and pwrite.
14143 * hostio.c (handle_pread): Fall back to lseek and read.
14144 (handle_pwrite): Fall back to lseek and write.
14145 * config.in, configure: Regenerated.
14146
14147 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * server.c (myresume): Add own_buf argument.
14150 (main): Update calls.
14151
14152 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14155 * remote-utils.c (remote_open): Do not call disable_async_io.
14156 (block_async_io): Delete.
14157 (unblock_async_io): Make static.
14158 (initialize_async_io): New.
14159 * server.c (handle_v_cont): Handle async I/O here.
14160 (myresume): Likewise. Move other common resume tasks here...
14161 (main): ... from here. Call initialize_async_io. Disable async
14162 I/O before the main loop.
14163 * server.h (initialize_async_io): Declare.
14164 (block_async_io, unblock_async_io): Delete prototypes.
14165 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14166
14167 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14168
14169 * remote-utils.c (readchar): Allow binary data in received messages.
14170
14171 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14172
14173 * win32-low.c (attaching): New global.
14174 (win32_create_inferior): Clear the `attaching' global.
14175 (win32_attach): Set the `attaching' global.
14176 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14177 attaching. Only set a breakpoint at the entry point if not
14178 attaching.
14179
14180 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14181
14182 * server.c (main): Don't report dll events on the initial
14183 connection on attaches.
14184
14185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14186
14187 * server.c (main): Relax numerical bases supported for the pid of
14188 the --attach command line argument.
14189
14190 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14191
14192 * win32-low.c (win32_attach): Call OpenProcess before
14193 DebugActiveProcess, not after. Add last error output to error
14194 call.
14195
14196 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14197
14198 * win32-low.c (win32_get_thread_context)
14199 (win32_set_thread_context): New functions.
14200 (thread_rec): Use win32_get_thread_context.
14201 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14202 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14203 field.
14204
14205 2007-12-03 Leo Zayas
14206 Pedro Alves <pedro_alves@portugalmail.pt>
14207
14208 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14209 global variables.
14210 (child_add_thread): Minor cleanup.
14211 (child_continue): Resume artificially suspended threads before
14212 calling ContinueDebugEvent.
14213 (suspend_one_thread): New.
14214 (fake_breakpoint_event): New.
14215 (get_child_debug_event): Change return type to int. Check here if
14216 gdb sent an interrupt request. If a soft interrupt was requested,
14217 fake a breakpoint event. Return 0 if there is no event to handle,
14218 and 1 otherwise.
14219 (win32_wait): Don't check here if gdb sent an interrupt request.
14220 Ensure there is a valid event to handle.
14221 (win32_request_interrupt): Add soft interruption method as last
14222 resort.
14223
14224 2007-12-03 Leo Zayas
14225 Pedro Alves <pedro_alves@portugalmail.pt>
14226
14227 * win32-low.h (win32_thread_info): Add descriptions to the
14228 structure members. Replace `suspend_count' counter by a
14229 `suspended' flag.
14230 * win32-low.c (thread_rec): Update condition of when to get the
14231 context from the inferior. Rely on ContextFlags being set if it
14232 has already been retrieved. Only suspend the inferior thread if
14233 we haven't already. Warn if that fails.
14234 (continue_one_thread): s/suspend_count/suspended/. Only call
14235 ResumeThread once. Warn if that fails.
14236
14237 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14238
14239 * win32-low.c (win32_wait): Don't read from the inferior when it
14240 has already exited.
14241
14242 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14243
14244 * Makefile.in (win32_low_h): New variable.
14245 (win32-low.o): Add dependency on $(win32_low_h).
14246 (win32-arm-low.o, win32-i386-low.o): New rules.
14247
14248 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14249
14250 * hostio.c: Correct copyright year.
14251
14252 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * Makefile.in (OBS): Add hostio.o.
14255 (hostio.o): New rule.
14256 * server.h (handle_vFile): Declare.
14257 * hostio.c: New file.
14258 * server.c (handle_v_requests): Take packet_len and new_packet_len
14259 for binary packets. Call handle_vFile.
14260 (main): Update call to handle_v_requests.
14261
14262 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14263
14264 * linux-low.c: Include <sched.h>.
14265
14266 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * linux-low.c (linux_tracefork_grandchild): New.
14269 (linux_tracefork_child): Use clone.
14270 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14271
14272 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14273
14274 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14275
14276 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14277
14278 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14279
14280 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * inferiors.c (change_inferior_id): Delete.
14283 (add_pid_to_list, pull_pid_from_list): New.
14284 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14285 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14286 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14287 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14288 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14289 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14290 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14291 (using_threads): Always set to 1.
14292 (handle_extended_wait): New.
14293 (add_process): Do not set TID.
14294 (linux_create_inferior): Set must_set_ptrace_flags.
14295 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14296 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14297 (linux_thread_alive): Rename TID argument to LWPID.
14298 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14299 (linux_wait_for_event): Do not use TID or check using_threads. Update
14300 call to dead_thread_notify. Call handle_extended_wait.
14301 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14302 (send_sigstop): Delete sigstop_sent.
14303 (wait_for_sigstop): Avoid TID.
14304 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14305 (linux_test_for_tracefork): New.
14306 (linux_lookup_signals): Use thread_db_active and
14307 linux_supports_tracefork_flag.
14308 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14309 * linux-low.h (get_process_thread): Avoid TID.
14310 (struct process_ifo): Move thread_known and tid to the end. Remove
14311 sigstop_sent.
14312 (linux_attach_lwp, thread_db_init): Update prototypes.
14313 * server.h (change_inferior_id): Delete prototype.
14314 (add_pid_to_list, pull_pid_from_list): New prototypes.
14315 * thread-db.c (thread_db_use_events): New.
14316 (find_first_thread): Rename to...
14317 (find_one_thread): ...this. Update callers and messages. Do not
14318 call fatal. Check thread_db_use_events. Do not call
14319 change_inferior_id or new_thread_notify.
14320 (maybe_attach_thread): Update. Do not call new_thread_notify.
14321 (thread_db_init): Set thread_db_use_events. Check use_events.
14322 * utils.c (fatal, warning): Correct message prefix.
14323
14324 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14325
14326 * Makefile.in (clean): Remove new files.
14327 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14328 (powerpc-64.o, powerpc-64.c): New rules.
14329 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14330 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14331 with SPE.
14332 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14333 SPE targets.
14334 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14335 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14336 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14337 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14338 (target_regsets): Add AltiVec and SPE register sets.
14339 * configure.ac: Check for AltiVec and SPE.
14340 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14341 (ppc_fill_vrregset, ppc_store_vrregset): New.
14342 (target_regsets): Add AltiVec register set.
14343 * configure: Regenerated.
14344
14345 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14346
14347 * linux-low.c (O_LARGEFILE): Define.
14348 (linux_read_memory): Use /proc/PID/mem.
14349 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14350 * configure, config.in: Regenerated.
14351
14352 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * linux-low.c (linux_wait_for_event): Do not pass signals while
14355 single-stepping.
14356
14357 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14358
14359 * win32-low.c (create_process): New.
14360 (win32_create_inferior): Use create_process instead of
14361 CreateProcess. If create_process failed retry appending an ".exe"
14362 suffix. Store the GetLastError result immediatelly after
14363 create_process calls and use it on the call to error.
14364
14365 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14366
14367 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14368
14369 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14370
14371 * configure.ac: Switch license to GPLv3.
14372
14373 2007-08-01 Michael Snyder <msnyder@access-company.com>
14374
14375 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14376
14377 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14378
14379 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14380 typedef.
14381 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14382 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14383 CloseToolhelp32Snapshot.
14384 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14385 CloseToolhelp32Snapshot.
14386
14387 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14388
14389 * server.c (main): Check for inferior exit before main loop.
14390
14391 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14392
14393 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14394 instead of on tmp_desc.
14395
14396 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14397 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14400 (add_thread): Minor cleanups.
14401 (clear_inferiors): Move lower in the file. Clear the DLL
14402 list.
14403 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14404 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14405 (xml_escape_text): New.
14406 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14407 for qSupported.
14408 (handle_v_cont): Report errors.
14409 (gdbserver_version): Update.
14410 (main): Correct size of own_buf. Do not report initial DLL events.
14411 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14412 (unloaded_dll, xml_escape_text): New.
14413 * win32-low.c (enum target_waitkind): Update comments.
14414 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14415 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14416 (win32_EnumProcessModules, win32_GetModuleInformation)
14417 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14418 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14419 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14420 (win32_Module32First, win32_Module32Next, load_toolhelp)
14421 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14422 (get_child_debug_event): Handle DLL events.
14423 (win32_wait): Likewise.
14424
14425 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14426
14427 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14428 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14429
14430 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14431
14432 * win32-low.c (handle_output_debug_string): Ignore event if not
14433 waiting.
14434
14435 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14436
14437 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14438
14439 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14440
14441 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14442
14443 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * inferiors.c (change_inferior_id): Add comment.
14446 * linux-low.c (check_removed_breakpoint): Add an early
14447 prototype. Improve debug output.
14448 (linux_attach): Doc update.
14449 (linux_detach_one_process, linux_detach): Clean up before releasing
14450 each process.
14451 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14452 * linux-low.h (struct process_info): Doc improvement.
14453 * mem-break.c (delete_all_breakpoints): New.
14454 * mem-break.h (delete_all_breakpoints): New prototype.
14455 * thread-db.c (find_first_thread): New.
14456 (thread_db_create_event): Call it instead of
14457 thread_db_find_new_threads. Clean up unused variables.
14458 (maybe_attach_thread): Remove first thread handling.
14459 (thread_db_find_new_threads): Use find_first_thread.
14460 (thread_db_get_tls_address): Likewise.
14461
14462 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14463
14464 * thread-db.c (thread_db_find_new_threads): Add prototype.
14465 (thread_db_create_event): Check for the main thread before adding
14466 a new thread.
14467 (maybe_attach_thread): Only enable event reporting if TID == 0.
14468 (thread_db_get_tls_address): Check for new threads.
14469
14470 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14471
14472 * linux-low.c (linux_create_inferior): Try execv before execvp.
14473 * spu-low.c (spu_create_inferior): Likewise.
14474
14475 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14476
14477 * linux-low.c (linux_create_inferior): Change execv to execvp.
14478 * spu-low.c (spu_create_inferior): Likewies.
14479
14480 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * Makefile.in (clean): Clean new files instead of deleted ones.
14483 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14484 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14485 rules.
14486 * configure.srv: Specify XML files and new regformats for MIPS and
14487 MIPS64 GNU/Linux.
14488 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14489 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14490 an entry for the restart register.
14491 (mips_cannot_fetch_register, mips_cannot_store_register)
14492 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14493 register names to match the XML descriptions.
14494 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14495 restart register instead of $0.
14496
14497 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14498 Markus Deuling <deuling@de.ibm.com>
14499
14500 * remote-utils.c (decode_xfer_write): New function.
14501 * server.h (decode_xfer_write): Add prototype.
14502 * server.c (handle_query): Add PACKET_LEN argument. Support
14503 qXfer:spu:read and qXfer:spu:write packets.
14504 (main): Pass packet_len to handle_query.
14505 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14506 * target.h (target_ops): Add qxfer_spu.
14507
14508 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14509
14510 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14511 accessing non-seekable spufs files.
14512
14513 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14514
14515 * server.c (handle_query): Add reply for qC packet.
14516
14517 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14518 Leo Zayas <lerele@champenstudios@com>
14519
14520 * server.h (check_remote_input_interrupt_request): New function.
14521 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14522 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14523 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14524 (check_remote_input_interrupt_request): New function.
14525 * server.h (check_remote_input_interrupt_request): Declare.
14526 * win32-low.c (winapi_DebugBreakProcess,
14527 winapi_GenerateConsoleCtrlEvent): New typedefs.
14528 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14529 to 250 ms.
14530 (win32_wait): Check for remote interrupt request
14531 with check_remote_input_interrupt_request.
14532 (win32_request_interrupt): New function.
14533 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14534
14535 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14536
14537 * win32-low.c (debug_registers_changed,
14538 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14539 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14540 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14541 (thread_rec): Get context using the low target.
14542 (child_add_thread): Call thread_added on the low target,
14543 which does the same thing.
14544 (regptr): Delete.
14545 (do_initial_child_stuff): Remove debug registers references.
14546 Set context using the low target. Resume threads after
14547 setting the contexts.
14548 (child_continue): Remove dead variable. Remove debug
14549 registers references.
14550 (child_fetch_inferior_registers): Go through the low target.
14551 (do_child_store_inferior_registers): Remove.
14552 (child_store_inferior_registers): Go through the low target.
14553 (win32_resume): Remove debug registers references.
14554 Set context using the low target.
14555 (handle_exception): Change return type to void. Don't record
14556 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14557 first chance exception.
14558 (get_child_debug_event): Change return type to void. Remove
14559 goto loop. Always return after waiting for debug event.
14560 (win32_wait): Convert to switch statement. Handle spurious
14561 events.
14562
14563 * win32-i386-low.c (debug_registers_changed,
14564 debug_registers_used): New.
14565 (initial_stuff): Rename to ...
14566 (i386_initial_stuff): ... this. Clear debug registers
14567 state variables.
14568 (store_debug_registers): Delete.
14569 (i386_get_thread_context): New.
14570 (load_debug_registers): Delete.
14571 (i386_set_thread_context): New.
14572 (i386_thread_added): New.
14573 (single_step): Rename to ...
14574 (i386_single_step): ... this.
14575 (do_fetch_inferior_registers): Rename to ...
14576 (i386_fetch_inferior_register): ... this.
14577 (i386_store_inferior_register): New.
14578 (the_low_target): Adapt to new interface.
14579
14580 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14581 (arm_get_thread_context): New.
14582 (arm_set_thread_context): New.
14583 (regptr): New.
14584 (do_fetch_inferior_registers): Rename to ...
14585 (arm_fetch_inferior_register): ... this.
14586 (arm_store_inferior_register): New.
14587 (arm_wince_breakpoint): Reimplement as unsigned long.
14588 (arm_wince_breakpoint_len): Define.
14589 (the_low_target): Adapt to new interface.
14590
14591 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14592 load_debug_registers. Add get_thread_context, set_thread_context,
14593 thread_added and store_inferior_register. Rename
14594 fetch_inferior_registers to fetch_inferior_register.
14595 (regptr): Remove declaration.
14596
14597 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14598
14599 * linux-low.c (linux_detach): Change return type to int. Return 0.
14600 * spu-low.c (spu_detach): Likewise.
14601
14602 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14603
14604 * target.h (target_ops): Change return type of detach to int.
14605 Add join.
14606 (join_inferior): New.
14607 * server.c (main): Don't skip detach support on mingw32.
14608 If the inferior doesn't support detaching return error.
14609 Call join_inferior instead of using waitpid.
14610 * linux-low.c (linux_join): New.
14611 (linux_target_op): Add linux_join.
14612 * spu-low.c (spu_join): New.
14613 (spu_target_ops): Add spu_join.
14614 * win32-low.c (win32_detach): Adapt to new interface.
14615 Reopen current_process_handle before detaching. Issue a child
14616 resume before detaching.
14617 (win32_join): New.
14618 (win32_target_op): Add win32_join.
14619
14620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14621
14622 * win32-low.c (win32-attach): Fix return value.
14623 * target.h (target_ops): Describe ATTACH return values.
14624
14625 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14626
14627 * win32-low.c (GETPROCADDRESS): Define.
14628 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14629 (winapi_DebugSetProcessKillOnExit): Likewise.
14630 (win32_create_inferior): Force usage of ansi CreateProcessA.
14631 (win32_attach): Use GETPROCADDRESS.
14632 (win32_detach): Likewise.
14633
14634 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14635
14636 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14637
14638 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14639
14640 * win32-low.c: Commit leftover changes from 2007-03-29.
14641
14642 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14645 fields short instead of int. Add explicit padding.
14646 (i387_cache_to_fsave): Remove unnecessary casts.
14647 (i387_fsave_to_cache): Doc fix.
14648 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14649
14650 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14653 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14654
14655 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14656
14657 * configure.srv (arm*-*-mingw32ce*): Move near the other
14658 arm targets.
14659
14660 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * configure.ac: Add errno checking.
14663 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14664 sys/file.h and malloc.h.
14665 (AC_CHECK_DECLS): Add perror.
14666 (srv_mingwce): Handle.
14667 * configure.srv (i[34567]86-*-cygwin*): Add
14668 win32-i386-low.o to srv_tgtobj.
14669 (i[34567]86-*-mingw*): Likewise.
14670 (arm*-*-mingw32ce*): Add case.
14671 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14672 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14673 [__MINGW32CE__] (strerror): New function.
14674 [__MINGW32CE__] (errno): Define to GetLastError.
14675 [__MINGW32CE__] (COUNTOF): New macro.
14676 (remote_open): Remove extra close call.
14677 * mem-break.c (delete_breakpoint_at): New function.
14678 * mem-break.h (delete_breakpoint_at): Declare.
14679 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14680 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14681 [USE_WIN32API] (read, write): Add char* casts.
14682 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14683 * server.h: Include wincecompat.h on Windows CE.
14684 [HAVE_ERRNO_H]: Check.
14685 (perror): Declare if not declared.
14686 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14687 (perror_with_name): Remove errno declaration.
14688 * wincecompat.h: New.
14689 * wincecompat.c: New.
14690 * win32-low.h: New.
14691 * win32-arm-low.c: New.
14692 * win32-i386-low.c: New.
14693 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14694 (OUTMSG2): Make it safe.
14695 (_T): New macro.
14696 (COUNTOF): New macro.
14697 (NUM_REGS): Get it from the low target.
14698 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14699 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14700 (thread_rec): Let low target handle debug registers.
14701 (child_add_thread): Likewise.
14702 (child_init_thread_list): Likewise.
14703 (continue_one_thread): Likewise.
14704 (regptr): New.
14705 (do_child_fetch_inferior_registers): Move to ...
14706 * win32-i386-low.c: ... here, and rename to ...
14707 (do_fetch_inferior_registers): ... this.
14708 * win32-low.c (child_fetch_inferior_registers):
14709 Go through the low target.
14710 (do_child_store_inferior_registers): Use regptr.
14711 (strwinerror): New function.
14712 (win32_create_inferior): Handle Windows CE.
14713 Use strwinerror instead of strerror on Windows error
14714 codes. Add program to the error output.
14715 Don't close the main thread handle on Windows CE.
14716 (win32_attach): Use coredll.dll on Windows CE.
14717 (win32_kill): Close current process and current
14718 thread handles.
14719 (win32_detach): Use coredll.dll on Windows CE.
14720 (win32_resume): Let low target handle debug registers, and
14721 step request.
14722 (handle_exception): Add/Remove initial breakpoint. Avoid
14723 non-existant WSTOPSIG on Windows CE.
14724 (win32_read_inferior_memory): Cast to remove warning.
14725 (win32_arch_string): Go through the low target.
14726 (initialize_low): Call set_breakpoint_data with the low
14727 target's breakpoint.
14728 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14729 FOP_REGNUM, mappings): Move to ...
14730 * win32-i386-low.c: ... here.
14731 * win32-low.c (win32_thread_info): Move to ...
14732 * win32-low.h: ... here.
14733 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14734 win32-arm-low.c and wincecompat.c.
14735 (all:): Add $EXEEXT.
14736 (install-only:): Likewise.
14737 (gdbserver:): Likewise.
14738 (gdbreplay:): Likewise.
14739 * config.in: Regenerate.
14740 * configure: Regenerate.
14741
14742 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14743
14744 * win32-low.c: Rename typedef thread_info to
14745 win32_thread_info throughout.
14746
14747 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * win32-i386-low.c: Rename to ...
14750 * win32-low.c: ... this.
14751 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14752 * Makefile.in: Likewise.
14753
14754 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14755
14756 * remote-utils.c (monitor_output): Constify msg parameter.
14757 * server.h (monitor_output): Likewise.
14758 * win32-i386-low.c (handle_output_debug_string): New.
14759 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14760 handle_output_debug_string.
14761 (get_child_debug_event): Likewise.
14762
14763 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14764
14765 * server.c (main): Correct strtoul check.
14766
14767 2007-03-27 Jon Ringle <jon@ringle.org>
14768
14769 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14770
14771 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14772
14773 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14774
14775 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * terminal.h: Check HAVE_SGTTY_H.
14778
14779 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14780
14781 * remote-utils.c (remote_open): Print out the assigned port number.
14782
14783 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14784
14785 * remote-utils.c (monitor_output): New function.
14786 * server.c (debug_threads): Define here.
14787 (monitor_show_help): New function.
14788 (handle_query): Handle qRcmd.
14789 (main): Do not handle 'd' packet.
14790 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14791 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14792 of debug_threads.
14793
14794 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14795
14796 * Makefile.in (EXEEXT): New.
14797 (clean): Use $(EXEEXT).
14798
14799 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14800
14801 * target.h (target_ops): Rename send_signal to request_interrupt,
14802 and remove enum target_signal parameter.
14803 * linux-low.c (linux_request_interrupt): Rename from
14804 linux_send_signal, and always send SIGINT.
14805 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14806 and always send SIGINT.
14807 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14808 of send_signal.
14809 (input_interrupt): Likewise.
14810
14811 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14812
14813 * server.c (get_features_xml): Check if target implemented
14814 arch_string.
14815 * win32-i386-low.c (win32_arch_string): New.
14816 (win32_target_ops): Add win32_arch_string as arch_string member.
14817
14818 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14819
14820 * spu-low.c (spu_arch_string): New.
14821 (spu_target_ops): Add spu_arch_string.
14822
14823 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14824
14825 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14826 * configure.ac: Do not check for terminal.h.
14827 * configure, config.in: Regenerated.
14828
14829 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * Makefile.in (OBS): Add $(XML_BUILTIN).
14832 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14833 (clean): Update.
14834 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14835 (arm-with-iwmmxt.c): New.
14836 * config.in, configure: Regenerate.
14837 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14838 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14839 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14840 (arm*-*-linux*): Add iWMMXt and regset support.
14841 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14842 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14843 (arm_store_wmmxregset, target_regsets): New.
14844 * server.c (get_features_xml): Take annex argument. Check builtin
14845 XML documents.
14846 (handle_query): Handle multiple annexes.
14847
14848 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * remote-utils.c [USE_WIN32API] (read, write): Define.
14851 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14852 write.
14853
14854 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14855
14856 * linux-i386-low.c (the_low_target): Set arch_string.
14857 * linux-x86-64-low.c (the_low_target): Likewise.
14858 * linux-low.c (linux_arch_string): New.
14859 (linux_target_ops): Add it.
14860 * linux-low.h (struct linux_target_ops): Add arch_string.
14861 * server.c (write_qxfer_response): Use const void * for DATA.
14862 (get_features_xml): New.
14863 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14864 * target.h (struct target_ops): Add arch_string method.
14865
14866 2007-01-03 Denis Pilat <denis.pilat@st.com>
14867 Daniel Jacobowitz <dan@codesourcery.com>
14868
14869 * linux-low.c (linux_kill): Handle being called with no threads.
14870 * win32-i386-low.c (win32_kill): Likewise.
14871 (get_child_debug_event): Clear current_process_handle.
14872
14873 2006-12-30 Denis PILAT <denis.pilat@st.com>
14874 Daniel Jacobowitz <dan@codesourcery.com>
14875
14876 * remote-utils.c (remote_open): Check the type of specified
14877 serial port devices before opening them.
14878 * server.c (main): Kill the inferior if an error occurs during
14879 the first remote_open.
14880
14881 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14882
14883 * README: Update supported targets.
14884
14885 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * Makefile.in (clean): Remove reg-mips64.c.
14888 (reg-mips64.c, reg-mips64.o): New rules.
14889 * configure.srv: Handle mips64. Include regset support for mips.
14890 * linux-mips-low.c (union mips_register): New.
14891 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14892 (mips_breakpoint, mips_breakpoint_at): Use int.
14893 (mips_collect_register, mips_supply_register)
14894 (mips_collect_register_32bit, mips_supply_register_32bit)
14895 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14896 (mips_store_fpregset, target_regsets): New.
14897 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14898
14899 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14900
14901 * configure.srv: Add target "spu*-*-*".
14902 * Makefile.in (clean): Remove reg-spu.c.
14903 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14904 * spu-low.c: New file.
14905
14906 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * configure.ac: Correct td_thr_tls_get_addr test.
14909 * configure: Regenerated.
14910
14911 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * linux-low.c (linux_wait_for_event): Reformat. Use the
14914 pass_signals array.
14915 * remote-utils.c (decode_address_to_semicolon): New.
14916 * server.c (pass_signals, handle_general_set): New.
14917 (handle_query): Mention QPassSignals for qSupported.
14918 (main): Call handle_general_set.
14919 * server.h (pass_signals, decode_address_to_semicolon): New.
14920
14921 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * server.c (handle_query): Correct error handling for read_auxv.
14924
14925 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14926
14927 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14928 and srv_linux_thread_db to yes.
14929 * linux-s390-low.c (s390_fill_gregset): New function.
14930 (target_regsets): Define data structure.
14931
14932 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14933
14934 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14935 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14936 * config.in, configure: Regenerated.
14937 * inferiors.c (gdb_id_to_thread): New function.
14938 (gdb_id_to_thread_id): Use it.
14939 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14940 * linux-low.h (struct process_info): Add th member.
14941 (thread_db_get_tls_address): New prototype.
14942 * remote-utils.c (decode_address): Make non-static.
14943 * server.c (handle_query): Handle qGetTLSAddr.
14944 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14945 * target.h (struct target_ops): Add get_tls_address.
14946 * thread-db.c (maybe_attach_thread): Save the thread handle.
14947 (thread_db_get_tls_address): New.
14948
14949 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14950
14951 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14952 (linux_resume_one_process): Take a siginfo_t *. Update all
14953 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14954 (struct pending_signals): Add a siginfo_t.
14955 (linux_wait_for_process): Always set last_status.
14956 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14957 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14958 * linux-low.h (struct process_info): Add last_status.
14959
14960 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * remote-utils.c (try_rle): New function.
14963 (putpkt_binary): Use it.
14964
14965 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14966
14967 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14968 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14969 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14970 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14971 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14972 point registers.
14973
14974 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14975
14976 * server.c (terminal_fd): New variable.
14977 (old_foreground_pgrp): Likewise.
14978 (restore_old_foreground_pgrp): New function.
14979 (start_inferior): Record the terminal file descriptor in terminal_fd
14980 and its original foreground group in old_foreground_pgrp. Register
14981 restore_old_foreground_pgrp with atexit().
14982
14983 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * server.c (handle_query): Correct qPart to qXfer.
14986
14987 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * configure.ac: Check for more headers which are missing on
14990 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14991 * configure.srv: Add Cygwin and mingw32.
14992 * remote-utils.c: Don't include headers unconditionally which
14993 are missing on mingw32. Include <winsock.h> for mingw32.
14994 (remote_open): Adjust for mingw32 support. Flush
14995 standard error after writing to it.
14996 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14997 (unblock_async_io, enable_async_io, disable_async_io)
14998 (readchar, getpkt): Update for Winsock support.
14999 (prepare_resume_reply): Expect a protocol signal number.
15000 * server.c: Disable <sys/wait.h> on mingw32.
15001 (start_inferior): Adjust for mingw32 support. Flush
15002 standard error after writing to it.
15003 (attach_inferior): Likewise. Use protocol signal
15004 numbers.
15005 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15006 and names.
15007 * win32-i386-low.c: New file.
15008 * Makefile.in (XM_CLIBS): Set.
15009 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15010 (win32-i386-low.o): New dependency rule.
15011 * linux-low.c (linux_wait): Use target signal numbers.
15012 * target.h (struct target_ops): Doc fix.
15013 * server.h (target_signal_to_name): New prototype.
15014 * gdbreplay.c: Don't include headers unconditionally which
15015 are missing on mingw32. Include <winsock.h> for mingw32.
15016 (remote_close, remote_open): Adjust for Winsock support.
15017 * configure, config.in: Regenerated.
15018
15019 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15020
15021 * server.c (decode_xfer_read, write_qxfer_response): New.
15022 (handle_query): Take a packet length argument. Handle
15023 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15024 the qSupported response.
15025 (main): Update call to handle_query.
15026
15027 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15028
15029 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15030 (putpkt_binary): Renamed from putpkt and adjusted for binary
15031 data.
15032 (putpkt): New wrapper for putpkt_binary.
15033 (readchar): Don't mask off the high bit.
15034 (decode_X_packet): New function.
15035 * server.c (main): Call putpkt_binary if a handler sets the packet
15036 length. Save the length of the incoming packet. Handle 'X'.
15037 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15038
15039 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15040
15041 * server.c (handle_query): Handle qSupported.
15042
15043 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * remote-utils.c (all_symbols_looked_up): New variable.
15046 (look_up_one_symbol): Check it.
15047 * server.h (look_up_one_symbol): New declaration.
15048 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15049
15050 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15051
15052 * Makefile.in (linux-arm-low.o): Update dependencies.
15053 * linux-arm-low.c: Include "gdb_proc_service.h".
15054 (PTRACE_GET_THREAD_AREA): Define.
15055 (ps_get_thread_area): New function.
15056
15057 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15058
15059 * configure.srv (m68k*-*-uclinux*): New target.
15060 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15061 (linux_resume_one_process): Remove extraneous cast.
15062 (linux_read_offsets): New.
15063 (linux_target_op): Add linux_read_offsets on mmuless systems.
15064 * server.c (handle_query): Add qOffsets logic.
15065 * target.h (struct target_ops): Add read_offsets.
15066
15067 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15068
15069 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15070 (PTRACE_GET_THREAD_AREA): Define.
15071 (ps_get_thread_area): New function.
15072 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15073 (linux-x86-64-low.o): Update.
15074
15075 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15076
15077 * configure.ac: Remove checks for prfpregset_t.
15078 * gdb_proc_service.h: New file.
15079 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15080 new "gdb_proc_service.h".
15081 * proc-service.c: Likewise.
15082 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15083 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15084 * Makefile.in (gdb_proc_service_h): Updated.
15085 * configure, config.in: Regenerated.
15086
15087 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * remote-utils.c (prepare_resume_reply): Move declaration
15090 of gdb_id_from_wait to the top of the block.
15091
15092 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * linux-low.c (regsets_store_inferior_registers): Read the regset
15095 from the target before filling it.
15096
15097 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * server.c (attach_inferior): Return SIGTRAP for a successful
15100 attach.
15101
15102 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * Makefile.in (OBS): Add version.o.
15105 (STAGESTUFF): Delete.
15106 (version.o): Add dependencies.
15107 (version.c): Replace rule.
15108 (clean): Remove version.c.
15109 * server.c (gdbserver_version): New.
15110 (gdbserver_usage): Use printf.
15111 (main): Handle --version and --help.
15112 * server.h (version, host_name): Add declarations.
15113
15114 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15115
15116 * linux-arm-low.c:
15117 * linux-arm-low.c:
15118 * inferiors.c:
15119 * i387-fp.h:
15120 * i387-fp.c:
15121 * gdbreplay.c:
15122 * regcache.c:
15123 * proc-service.c:
15124 * mem-break.h:
15125 * mem-break.c:
15126 * linux-x86-64-low.c:
15127 * linux-sh-low.c:
15128 * linux-s390-low.c:
15129 * linux-ppc64-low.c:
15130 * linux-ppc-low.c:
15131 * linux-mips-low.c:
15132 * linux-m68k-low.c:
15133 * linux-m32r-low.c:
15134 * linux-low.h:
15135 * linux-low.c:
15136 * linux-ia64-low.c:
15137 * linux-i386-low.c:
15138 * linux-crisv32-low.c:
15139 * thread-db.c:
15140 * terminal.h:
15141 * target.h:
15142 * target.c:
15143 * server.h:
15144 * server.c:
15145 * remote-utils.c:
15146 * regcache.h:
15147 * utils.c:
15148 * Makefile.in:
15149 * configure.ac:
15150 * gdbserver.1: Add (C) after Copyright. Update the FSF
15151 address.
15152
15153 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15156 (arm_breakpoint_at): Recognize both breakpoints.
15157 (the_low_target): Use the correct breakpoint instruction.
15158
15159 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15162 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15163 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15164 (the_low_target): Update.
15165
15166 2005-10-25 Andreas Schwab <schwab@suse.de>
15167
15168 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15169
15170 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15171 (ia64_num_regs): Reduce to 462.
15172
15173 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15174
15175 * acinclude.m4: Correct quoting.
15176 * aclocal.m4: Regenerated.
15177
15178 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15179 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15180 (thread_db_init): Call thread_db_err_str.
15181 * configure.ac: Check for TD_VERSION.
15182 * config.in, configure: Regenerated.
15183
15184 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15185
15186 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15187
15188 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15191 is not available. Define HAVE_PTRACE_GETREGS if it is.
15192 * config.in, configure: Regenerated.
15193 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15194 * linux-i386-low.c, linux-m68k-low.c: Update to use
15195 HAVE_PTRACE_GETREGS.
15196 * linux-low.c (regsets_fetch_inferior_registers)
15197 (regsets_store_inferior_registers): Only return 0 if we processed
15198 GENERAL_REGS.
15199 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15200 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15201
15202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15203
15204 * inferiors.c (struct thread_info): Add gdb_id.
15205 (add_thread): Add gdb_id argument.
15206 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15207 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15208 calls to add_thread.
15209 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15210 * server.c (handle_query): Use thread_to_gdb_id.
15211 (handle_v_cont, main): Use gdb_id_to_thread_id.
15212 * server.h (add_thread): Update prototype.
15213 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15214 prototypes.
15215
15216 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15219 left-padded registers.
15220 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15221 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15222
15223 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15224
15225 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15226 * configure: Regenerate.
15227 * config.in: Regenerate.
15228 * server.h (NEED_DECLARATION_STRERROR):
15229 Replace with !HAVE_DECL_STRERROR.
15230
15231 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * linux-low.c (linux_wait, linux_send_signal): Don't test
15234 an unsigned long variable for > 0 if it could be MAX_ULONG.
15235 * server.c (myresume): Likewise.
15236 * target.c (set_desired_inferior): Likewise.
15237
15238 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15239
15240 * configure.ac: Simplify and improve check for socklen_t.
15241 * configure, config.in: Regenerate.
15242
15243 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15244
15245 * acconfig.h: Remove.
15246 * configure.ac: Add a test for socklen_t. Use three-argument
15247 AC_DEFINE throughout.
15248 * config.in: Regenerated using autoheader 2.59.
15249 * configure: Regenerated.
15250
15251 * gdbreplay.c (socklen_t): Provide a default.
15252 (remote_open): Use socklen_t.
15253 * remote-utils.c (socklen_t): Provide a default.
15254 (remote_open): Use socklen_t.
15255 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15256 unsigned char.
15257
15258 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15259 char for buffers.
15260 * linux-low.c (linux_read_memory, linux_write_memory)
15261 (linux_read_auxv): Likewise.
15262 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15263 (check_mem_write): Likewise.
15264 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15265 Likewise.
15266 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15267 (registers_from_string, register_data): Likewise.
15268 * server.c (handle_query, main): Likewise.
15269 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15270 (decode_M_packet): Likewise.
15271 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15272 * target.h (struct target_ops): Update read_memory, write_memory,
15273 and read_auxv.
15274 (read_inferior_memory, write_inferior_memory): Update.
15275 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15276 to unsigned char *.
15277 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15278 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15279 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15280 linux-s390-low.c, linux-sh-low.c: Update for changes in
15281 read_inferior_memory and the_low_target->breakpoint.
15282
15283 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15286 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15287 * configure.srv: Add powerpc64-*-linux*.
15288 * linux-ppc64-low.c: New file.
15289
15290 2005-05-23 Orjan Friberg <orjanf@axis.com>
15291
15292 * linux-cris-low.c: New file with support for CRIS.
15293 * linux-crisv32-low.c: Ditto for CRISv32.
15294 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15295 (clean): Add reg-cris.c and reg-crisv32.c.
15296 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15297 reg-crisv32.o, and reg-crisv32.c to make rules.
15298 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15299 recognized targets.
15300
15301 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15302
15303 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15304 of sizeof (PTRACE_XFER_TYPE).
15305 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15306
15307 2005-05-12 Orjan Friberg <orjanf@axis.com>
15308
15309 * target.h (struct target_ops): Add insert_watchpoint,
15310 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15311 pointers for hardware watchpoint support.
15312 * linux-low.h (struct linux_target_ops): Ditto.
15313 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15314 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15315 to linux_target_ops.
15316 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15317 reply packet.
15318 * server.c (main): Recognize 'Z' and 'z' packets.
15319
15320 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15321
15322 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15323 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15324 (the_low_target): Add new members.
15325
15326 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * proc-service.c (ps_lgetregs): Search all_processes instead of
15329 all_threads.
15330
15331 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * server.c (start_inferior): Change return type to int.
15334 (attach_inferior): Change sigptr to int *.
15335 (handle_v_cont, handle_v_requests): Change signal to int *.
15336 (main): Change signal to int.
15337
15338 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15339
15340 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15341 * configure.srv: Add m32r*-*-linux*.
15342 * linux-m32r-low.c: New file.
15343
15344 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15345
15346 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15347
15348 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15349
15350 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15351 Take unsigned long arguments for PIDs.
15352 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15353 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15354 (wait_for_sigstop, linux_resume_one_process)
15355 (regsets_fetch_inferior_registers, linux_send_signal)
15356 (linux_read_auxv): Likewise. Update the types of variables holding
15357 PIDs. Update format string specifiers.
15358 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15359 * remote-utils.c (prepare_resume_reply): Likewise.
15360 * server.c (cont_thread, general_thread, step_thread)
15361 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15362 unsigned long.
15363 (handle_query): Update format specifiers.
15364 (handle_v_cont, main): Use strtoul for thread IDs.
15365 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15366 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15367 (general_thread, step_thread, thread_from_wait)
15368 (old_thread_from_wait): Update.
15369 * target.h (struct thread_resume): Use unsigned long for THREAD.
15370 (struct target_ops): Use unsigned long for arguments to attach and
15371 thread_alive.
15372
15373 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15374
15375 * acinclude.m4: Include bfd/bfd.m4 directly.
15376 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15377 <agriffis@toolchain.org>.
15378 * aclocal.m4, configure: Regenerated.
15379
15380 2005-01-07 Andrew Cagney <cagney@gnu.org>
15381
15382 * configure.ac: Rename configure.in, require autoconf 2.59.
15383 * configure: Re-generate.
15384
15385 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15386
15387 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15388 LIBS when finished.
15389 * aclocal.m4: Regenerated.
15390 * configure: Regenerated.
15391
15392 2004-11-21 Andreas Schwab <schwab@suse.de>
15393
15394 * linux-m68k-low.c (m68k_num_gregs): Define.
15395 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15396 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15397 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15398 (m68k_breakpoint_at): New. Add to the_low_target.
15399
15400 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15401 srv_linux_thread_db to yes.
15402
15403 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15404
15405 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15406 (ARCH_SET_FS): Likewise.
15407 (ARCH_GET_FS): Likewise.
15408 (ARCH_GET_GS): Likewise.
15409
15410 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15411
15412 * linux-i386-low.c (ps_get_thread_area): New.
15413 * linux-x86-64-low.c (ps_get_thread_area): New.
15414 * linux-low.c: Include <sys/syscall.h>.
15415 (linux_kill_one_process): Don't kill the first thread here.
15416 (linux_kill): Kill the first thread here.
15417 (kill_lwp): New function.
15418 (send_sigstop, linux_send_signal): Use it.
15419 * proc-service.c: Clean up #ifdefs.
15420 (fpregset_info): Delete.
15421 (ps_lgetregs): Update and enable implementation.
15422 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15423 implementations.
15424 * remote-utils.c (struct sym_cache, symbol_cache): New.
15425 (input_interrupt): Print a clearer message.
15426 (async_io_enabled): New variable.
15427 (enable_async_io, disable_async_io): Use it. Update comments.
15428 (look_up_one_symbol): Use the symbol cache.
15429 * thread-db.c (thread_db_look_up_symbols): New function.
15430 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15431
15432 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15433
15434 * configure.in: Test for -rdynamic.
15435 * configure: Regenerated.
15436 * Makefile (INTERNAL_LDFLAGS): New.
15437 (gdbserver, gdbreplay): Use it.
15438
15439 2004-09-02 Andrew Cagney <cagney@gnu.org>
15440
15441 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15442
15443 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15444
15445 * linux-low.c (linux_wait): Clear all_processes list also.
15446
15447 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15448
15449 * linux-low.c: Include <errno.h>. Remove extern declaration of
15450 errno.
15451
15452 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * gdbreplay.c, server.h, utils.c: Update copyright years.
15455
15456 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15457
15458 * server.c (main): Print child status or termination signal from
15459 variable 'signal', not 'sig'.
15460
15461 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15462
15463 * linux-low.c (linux_read_memory): Change return type to
15464 int. Check for and return error from ptrace().
15465 * target.c (read_inferior_memory): Change return type to int. Pass
15466 back return status from the_target->read_memory().
15467 * target.h (struct target_ops): Adapt *read_memory() prototype.
15468 Update comment.
15469 (read_inferior_memory): Adapt prototype.
15470 * server.c (main): Return an error packet if
15471 read_inferior_memory() returns an error.
15472
15473 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15474
15475 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15476 Unify with other clean targets.
15477
15478 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15479
15480 * server.c (handle_v_cont): Call set_desired_inferior.
15481
15482 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15483
15484 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15485
15486 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15487
15488 * linux-low.c (linux_wait): Unblock async I/O.
15489 (linux_resume): Block and enable async I/O.
15490 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15491 * server.h (block_async_io, unblock_async_io): Add prototypes.
15492
15493 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15494
15495 * remote-utils.c (remote_open): Print a status notice after
15496 opening a TCP port.
15497 * server.c (attach_inferior): Print a status notice after
15498 attaching.
15499
15500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15501
15502 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15503
15504 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15505
15506 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15507 error packet.
15508 * server.c, target.h: Update copyright years.
15509
15510 2004-02-25 Roland McGrath <roland@redhat.com>
15511
15512 * target.h (struct target_ops): New member `read_auxv'.
15513 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15514 * linux-low.c (linux_read_auxv): New function.
15515 (linux_target_ops): Initialize `read_auxv' member to that.
15516
15517 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15518
15519 Committed by Jim Blandy <jimb@redhat.com>.
15520
15521 * linux-s390-low.c (s390_num_regs): Update.
15522 (s390_regmap): Remove control registers. Use __s390x__ predefine
15523 instead of GPR_SIZE to distiguish s390 and s390x targets.
15524
15525 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15526
15527 * linux-low.c: Update copyright year.
15528 (check_removed_breakpoint): Clear pending_is_breakpoint.
15529 (linux_set_resume_request, linux_queue_one_thread)
15530 (resume_status_pending_p): New functions.
15531 (linux_continue_one_thread): Use process->resume.
15532 (linux_resume): Only resume threads if there are no pending events.
15533 * linux-low.h (struct process_info): Add resume request
15534 pointer.
15535
15536 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15537
15538 * regcache.c (new_register_cache): Clear the allocated register
15539 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15540
15541 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * linux-low.c (linux_resume): Take a struct thread_resume *
15544 argument.
15545 (linux_wait): Update call.
15546 (resume_ptr): New static variable.
15547 (linux_continue_one_thread): Renamed from
15548 linux_continue_one_process. Use resume_ptr.
15549 (linux_resume): Use linux_continue_one_thread.
15550 * server.c (handle_v_cont, handle_v_requests): New functions.
15551 (myresume): New function.
15552 (main): Handle 'v' case.
15553 * target.h (struct thread_resume): New type.
15554 (struct target_ops): Change argument of "resume" to struct
15555 thread_resume *.
15556 (myresume): Delete macro.
15557
15558 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15559
15560 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15561 (uninstall): Support DESTDIR.
15562
15563 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15564
15565 * configure.srv: Add xscale*linux copy of arm*linux entry.
15566
15567 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15568
15569 * linux-arm-low.c (arm_reinsert_addr): New function.
15570 (the_low_target): Add arm_reinsert_addr.
15571
15572 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15573
15574 * mem-break.c: Remove whitespace at end of file.
15575
15576 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15577
15578 * configure.in: Check whether we need to prototype strerror.
15579 * server.h: Optionally prototype strerror.
15580 * gdbreplay.c (perror_with_name): Use strerror.
15581 * linux-low.c (linux_attach_lwp): Use strerror.
15582 * utils.c (perror_with_name): Use strerror.
15583 * config.in, configure: Regenerated.
15584
15585 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15586
15587 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15588 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15589
15590 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15591
15592 * Makefile.in (SFILES): Update.
15593 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15594 low-sun3.c: Remove files.
15595
15596 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15597
15598 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15599 (linux_detach_one_process, linux_detach): New functions.
15600 (linux_target_ops): Add linux_detach.
15601 * server.c (main): Handle 'D' packet.
15602 * target.h (struct target_ops): Add "detach" member.
15603 (detach_inferior): Define.
15604
15605 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15606
15607 From Kelley Cook <kelleycook@wideopenwest.com>:
15608 * configure.srv: Accept i[34567]86 variants.
15609
15610 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15611
15612 * linux-low.c (linux_wait_for_event): Correct comment typos.
15613 (linux_resume_one_process): Call check_removed_breakpoint.
15614 (linux_send_signal): New function.
15615 (linux_target_ops): Add linux_send_signal.
15616 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15617 of kill.
15618 * target.h (struct target_ops): Add send_signal.
15619
15620 2003-05-29 Jim Blandy <jimb@redhat.com>
15621
15622 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15623 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15624 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15625 away part of the register's value.
15626
15627 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15628
15629 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15630 (linux_wait_for_event, linux_init_signals): Likewise.
15631
15632 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15633
15634 * configure.in: Check for stdlib.h.
15635 * configure: Regenerated.
15636 * config.in: Regenerated.
15637
15638 2003-01-04 Andreas Schwab <schwab@suse.de>
15639
15640 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15641
15642 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15643
15644 * Makefile.in: Remove obsolete code.
15645
15646 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15647
15648 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15649 defined(PT_FPR0_HI).
15650
15651 2002-11-17 Stuart Hughes <seh@zee2.com>
15652
15653 * linux-arm-low.c (arm_num_regs): Increase.
15654 (arm_regmap): Include status register.
15655
15656 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * linux-low.c (register_addr): Remove incorrect -1 check.
15659
15660 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15661
15662 * linux-low.c (linux_create_inferior): Call setpgid. Return
15663 the new PID.
15664 (unstopped_p, linux_signal_pid): Remove.
15665 (linux_target_ops): Remove linux_signal_pid.
15666 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15667 global instead of target method.
15668 * target.h (struct target_ops): Remove signal_pid. Update comment
15669 for create_inferior.
15670 * server.c (signal_pid): New variable.
15671 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15672 gdbserver. Set the child to be the foreground process group.
15673 (attach_inferior): Set signal_pid.
15674
15675 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15676
15677 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15678
15679 2002-08-20 Jim Blandy <jimb@redhat.com>
15680
15681 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15682 default for this.
15683
15684 2002-08-01 Andrew Cagney <cagney@redhat.com>
15685
15686 * Makefile.in: Make chill references obsolete.
15687
15688 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15689
15690 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15691 * configure: Regenerate.
15692 * config.in: Regenerate.
15693
15694 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15695
15696 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15697 (perror_with_name, remote_close, remote_open, expect, play): Static.
15698
15699 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15700
15701 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15702 byte offsets instead of an array of indexes.
15703 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15704
15705 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15706
15707 * regcache.c: Add comment.
15708
15709 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15710
15711 * thread-db.c: New file.
15712 * proc-service.c: New file.
15713 * acinclude.m4: New file.
15714 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15715 proc-service.o, and thread-db.o.
15716 (linux-low.o): Add USE_THREAD_DB.
15717 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15718 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15719 * aclocal.m4: Regenerated.
15720 * config.in: Regenerated.
15721 * configure: Regenerated.
15722 * configure.in: Check for proc_service.h, sys/procfs.h,
15723 thread_db.h, and linux/elf.h headrs.
15724 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15725 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15726 Check for -lthread_db and thread support.
15727 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15728 PowerPC, and SuperH.
15729 * i387-fp.c: Constify arguments.
15730 * i387-fp.h: Likewise.
15731 * inferiors.c: (struct thread_info): Renamed from
15732 `struct inferior_info'. Remove PID member. Use generic inferior
15733 list header. All uses updated.
15734 (inferiors, signal_pid): Removed.
15735 (all_threads): New variable.
15736 (get_thread): Define.
15737 (add_inferior_to_list): New function.
15738 (for_each_inferior): New function.
15739 (change_inferior_id): New function.
15740 (add_inferior): Removed.
15741 (remove_inferior): New function.
15742 (add_thread): New function.
15743 (free_one_thread): New function.
15744 (remove_thread): New function.
15745 (clear_inferiors): Use for_each_inferior and free_one_thread.
15746 (find_inferior): New function.
15747 (find_inferior_id): New function.
15748 (inferior_target_data): Update argument type.
15749 (set_inferior_target_data): Likewise.
15750 (inferior_regcache_data): Likewise.
15751 (set_inferior_regcache_data): Likewise.
15752 * linux-low.c (linux_bp_reinsert): Remove.
15753 (all_processes, stopping_threads, using_thrads)
15754 (struct pending_signals, debug_threads, pid_of): New.
15755 (inferior_pid): Replace with macro.
15756 (struct inferior_linux_data): Remove.
15757 (get_stop_pc, add_process): New functions.
15758 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15759 Use add_process and add_thread.
15760 (linux_attach_lwp): New function, based on old linux_attach. Use
15761 add_process and add_thread. Set stop_expected for new threads.
15762 (linux_attach): New function.
15763 (linux_kill_one_process): New function.
15764 (linux_kill): Kill all LWPs.
15765 (linux_thread_alive): Use find_inferior_id.
15766 (check_removed_breakpoints, status_pending_p): New functions.
15767 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15768 Update. Use WNOHANG. Wait for cloned processes also. Update process
15769 struct for the found process.
15770 (linux_wait_for_event): New function.
15771 (linux_wait): Use it. Support LWPs.
15772 (send_sigstop, wait_for_sigstop, stop_all_processes)
15773 (linux_resume_one_process, linux_continue_one_process): New functions.
15774 (linux_resume): Support LWPs.
15775 (REGISTER_RAW_SIZE): Remove.
15776 (fetch_register): Use register_size instead. Call supply_register.
15777 (usr_store_inferior_registers): Likewise. Call collect_register.
15778 Fix recursive case.
15779 (regsets_fetch_inferior_registers): Improve error message.
15780 (regsets_store_inferior_registers): Add debugging.
15781 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15782 (unstopped_p, linux_signal_pid): New functions.
15783 (linux_target_ops): Add linux_signal_pid.
15784 (linux_init_signals): New function.
15785 (initialize_low): Call it. Initialize using_threads.
15786 * regcache.c (inferior_regcache_data): Add valid
15787 flag.
15788 (get_regcache): Fetch registers lazily. Add fetch argument
15789 and update all callers.
15790 (regcache_invalidate_one, regcache_invalidate): New
15791 functions.
15792 (new_register_cache): Renamed from create_register_cache.
15793 Return the new regcache.
15794 (free_register_cache): Change argument to a void *.
15795 (registers_to_string, registers_from_string): Call get_regcache
15796 with fetch flag set.
15797 (register_data): Make static. Pass fetch flag to get_regcache.
15798 (supply_register): Call get_regcache with fetch flag clear.
15799 (collect_register): Call get_regcache with fetch flag set.
15800 (collect_register_as_string): New function.
15801 * regcache.h: Update.
15802 * remote-utils.c (putpkt): Flush after debug output and use
15803 stderr.
15804 Handle input interrupts while waiting for an ACK.
15805 (input_interrupt): Use signal_pid method.
15806 (getpkt): Flush after debug output and use stderr.
15807 (outreg): Use collect_register_as_string.
15808 (new_thread_notify, dead_thread_notify): New functions.
15809 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15810 and general_thread.
15811 (look_up_one_symbol): Flush after debug output.
15812 * server.c (step_thread, server_waiting): New variables.
15813 (start_inferior): Don't use signal_pid. Update call to mywait.
15814 (attach_inferior): Update call to mywait.
15815 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15816 (main): Don't fetch/store registers explicitly. Use
15817 set_desired_inferior. Support proposed ``Hs'' packet. Update
15818 calls to mywait.
15819 * server.h: Update.
15820 (struct inferior_list, struct_inferior_list_entry): New.
15821 * target.c (set_desired_inferior): New.
15822 (write_inferior_memory): Constify.
15823 (mywait): New function.
15824 * target.h: Update.
15825 (struct target_ops): New signal_pid method.
15826 (mywait): Removed macro, added prototype.
15827
15828 * linux-low.h (regset_func): Removed.
15829 (regset_fill_func, regset_store_func): New.
15830 (enum regset_type): New.
15831 (struct regset_info): Add type field. Use new operation types.
15832 (struct linux_target_ops): stop_pc renamed to get_pc.
15833 Add decr_pc_after_break and breakpoint_at.
15834 (get_process, get_thread_proess, get_process_thread)
15835 (strut process_info, all_processes, linux_attach_lwp)
15836 (thread_db_init): New.
15837
15838 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15839 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15840 (the_low_target): Add new members.
15841 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15842 (i386_store_fpxregset): Constify.
15843 (target_regsets): Add new kind identifier.
15844 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15845 (i386_set_pc): Add debugging.
15846 (i386_breakpoint_at): New function.
15847 (the_low_target): Add new members.
15848 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15849 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15850 (mips_breakpoint_at): New.
15851 (the_low_target): Add new members.
15852 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15853 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15854 (the_low_target): Add new members.
15855 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15856 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15857 (the_low_target): Add new members.
15858 * linux-x86-64-low.c (target_regsets): Add new kind
15859 identifier.
15860
15861 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15862
15863 From Martin Pool <mbp@samba.org>:
15864 * server.c (gdbserver_usage): New function.
15865 (main): Call it.
15866
15867 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15868
15869 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15870 stop_at -> stop_pc.
15871
15872 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15873
15874 * Makefile.in: Remove obsolete code.
15875
15876 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15877
15878 * linux-low.c (regsets_fetch_inferior_registers),
15879 (regsets_store_inferior_registers): Removed cast to int from
15880 ptrace() calls.
15881 * regcache.h: Added declaration of struct inferior_info.
15882
15883 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15884
15885 * inferiors.c (struct inferior_info): Add regcache_data.
15886 (add_inferior): Call create_register_cache.
15887 (clear_inferiors): Call free_register_cache.
15888 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15889 * regcache.c (struct inferior_regcache_data): New.
15890 (registers): Remove.
15891 (get_regcache): New function.
15892 (create_register_cache, free_register_cache): New functions.
15893 (set_register_cache): Don't initialize the register cache here.
15894 (registers_to_string, registers_from_string, register_data): Call
15895 get_regcache.
15896 * regcache.h: Add prototypes.
15897 * server.h: Likewise.
15898
15899 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15900
15901 * mem-break.c: New file.
15902 * mem-break.h: New file.
15903 * Makefile.in: Add mem-break.o rule; update server.h
15904 dependencies.
15905 * inferiors.c (struct inferior_info): Add target_data
15906 member.
15907 (clear_inferiors): Free target_data member if set.
15908 (inferior_target_data, set_inferior_target_data): New functions.
15909 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15910 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15911 * linux-low.c (linux_bp_reinsert): New variable.
15912 (struct inferior_linux_data): New.
15913 (linux_create_inferior): Use set_inferior_target_data.
15914 (linux_attach): Likewise. Call add_inferior.
15915 (linux_wait_for_one_inferior): New function.
15916 (linux_wait): Call it.
15917 (linux_write_memory): Add const.
15918 (initialize_low): Call set_breakpoint_data.
15919 * linux-low.h (struct linux_target_ops): Add breakpoint
15920 handling members.
15921 * server.c (attach_inferior): Remove extra add_inferior
15922 call.
15923 * server.h: Include mem-break.h. Update inferior.c
15924 prototypes.
15925 * target.c (read_inferior_memory)
15926 (write_inferior_memory): New functions.
15927 * target.h (read_inferior_memory)
15928 (write_inferior_memory): Change macros to prototypes.
15929 (struct target_ops): Update comments. Add const to write_memory
15930 definition.
15931
15932 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15933
15934 * linux-low.c (usr_store_inferior_registers): Support
15935 registers which are allowed to fail to store.
15936 * linux-low.h (linux_target_ops): Likewise.
15937 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15938 (ppc_cannot_store_register): FPSCR may not be storable.
15939
15940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * server.h: Include <string.h> if HAVE_STRING_H.
15943 * ChangeLog: Correct paths in last ChangeLog entry.
15944
15945 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15946
15947 * linux-low.h: Remove obsolete prototypes.
15948 (struct linux_target_ops): New.
15949 (extern the_low_target): New.
15950 * linux-low.c (num_regs, regmap): Remove declarations.
15951 (register_addr): Use the_low_target explicitly.
15952 (fetch_register): Likewise.
15953 (usr_fetch_inferior_registers): Likewise.
15954 (usr_store_inferior_registers): Likewise.
15955 * linux-arm-low.c (num_regs): Remove.
15956 (arm_num_regs): Define.
15957 (arm_regmap): Renamed from regmap, made static.
15958 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15959 made static.
15960 (arm_cannot_store_register): Renamed from cannot_store_register,
15961 made static.
15962 (the_low_target): New.
15963 * linux-i386-low.c (num_regs): Remove.
15964 (i386_num_regs): Define.
15965 (i386_regmap): Renamed from regmap, made static.
15966 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15967 made static.
15968 (i386_cannot_store_register): Renamed from cannot_store_register,
15969 made static.
15970 (the_low_target): New.
15971 * linux-ia64-low.c (num_regs): Remove.
15972 (ia64_num_regs): Define.
15973 (ia64_regmap): Renamed from regmap, made static.
15974 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15975 made static.
15976 (ia64_cannot_store_register): Renamed from cannot_store_register,
15977 made static.
15978 (the_low_target): New.
15979 * linux-m68k-low.c (num_regs): Remove.
15980 (m68k_num_regs): Define.
15981 (m68k_regmap): Renamed from regmap, made static.
15982 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15983 made static.
15984 (m68k_cannot_store_register): Renamed from cannot_store_register,
15985 made static.
15986 (the_low_target): New.
15987 * linux-mips-low.c (num_regs): Remove.
15988 (mips_num_regs): Define.
15989 (mips_regmap): Renamed from regmap, made static.
15990 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15991 made static.
15992 (mips_cannot_store_register): Renamed from cannot_store_register,
15993 made static.
15994 (the_low_target): New.
15995 * linux-ppc-low.c (num_regs): Remove.
15996 (ppc_num_regs): Define.
15997 (ppc_regmap): Renamed from regmap, made static.
15998 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15999 made static.
16000 (ppc_cannot_store_register): Renamed from cannot_store_register,
16001 made static.
16002 (the_low_target): New.
16003 * linux-s390-low.c (num_regs): Remove.
16004 (s390_num_regs): Define.
16005 (s390_regmap): Renamed from regmap, made static.
16006 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16007 made static.
16008 (s390_cannot_store_register): Renamed from cannot_store_register,
16009 made static.
16010 (the_low_target): New.
16011 * linux-sh-low.c (num_regs): Remove.
16012 (sh_num_regs): Define.
16013 (sh_regmap): Renamed from regmap, made static.
16014 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16015 made static.
16016 (sh_cannot_store_register): Renamed from cannot_store_register,
16017 made static.
16018 (the_low_target): New.
16019 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16020 (the_low_target): New.
16021
16022 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16023
16024 * Makefile.in: Add stamp-h target.
16025 * configure.in: Create stamp-h.
16026 * configure: Regenerated.
16027
16028 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16029
16030 * inferiors.c: New file.
16031 * target.c: New file.
16032 * target.h: New file.
16033 * Makefile.in: Add target.o and inferiors.o. Update
16034 dependencies.
16035 * linux-low.c (inferior_pid): New static variable,
16036 moved from server.c.
16037 (linux_create_inferior): Renamed from create_inferior.
16038 Call add_inferior. Return 0 on success instead of a PID.
16039 (linux_attach): Renamed from myattach.
16040 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16041 (linux_thread_alive): Renamed from mythread_alive.
16042 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16043 child dies.
16044 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16045 (regsets_store_inferior_registers): Correct error message.
16046 Add missing ``return 0''.
16047 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16048 (linux_store_registers): Renamed from store_inferior_registers.
16049 (linux_read_memory): Renamed from read_inferior_memory.
16050 (linux_write_memory): Renamed from write_inferior_memory.
16051 (linux_target_ops): New structure.
16052 (initialize_low): Call set_target_ops ().
16053 * remote-utils.c (unhexify): New function.
16054 (hexify): New function.
16055 (input_interrupt): Send signals to ``signal_pid''.
16056 * server.c (inferior_pid): Remove.
16057 (start_inferior): Update create_inferior call.
16058 (attach_inferior): Call add_inferior.
16059 (handle_query): New function.
16060 (main): Call handle_query for `q' packets.
16061 * server.h: Include "target.h". Remove obsolete prototypes.
16062 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16063
16064 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16065
16066 * Makefile.in: Add WARN_CFLAGS. Update configury
16067 dependencies.
16068 * configure.in: Check for <string.h>
16069 * configure: Regenerate.
16070 * config.in: Regenerate.
16071 * gdbreplay.c: Include needed system headers.
16072 (remote_open): Remove strchr prototype.
16073 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16074 * regcache.c (supply_register): Change buf argument to const void *.
16075 (supply_register_by_name): Likewise.
16076 (collect_register): Change buf argument to void *.
16077 (collect_register_by_name): Likewise.
16078 * regcache.h: Add missing prototypes.
16079 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16080 * server.c (handle_query): New function.
16081 (attached): New static variable, moved out of main.
16082 (main): Quiet longjmp clobber warnings.
16083 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16084 * utils.c (error): Remove NORETURN.
16085 (fatal): Likewise.
This page took 0.343935 seconds and 3 git commands to generate.