gdb: Add missing #ifdef USE_THREAD_DB to gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2
3 * linux-low.c (handle_extended_wait): Surround call to
4 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5
6 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7
8 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
9 linux_ptrace_attach_fail_reason_string now returning an
10 std::string.
11 (linux_attach): Likewise.
12 * thread-db.c (attach_thread): Likewise.
13
14 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
15
16 PR gdb/21559
17 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
18 checking for fs_base/gs_base fields in struct user_regs_struct.
19 * configure: Regenerate.
20
21 2018-01-16 Yao Qi <yao.qi@linaro.org>
22
23 PR gdb/18749
24 * linux-low.c (fetch_register): Call supply_register instead of
25 error.
26
27 2018-01-08 Yao Qi <yao.qi@linaro.org>
28 Simon Marchi <simon.marchi@ericsson.com>
29
30 * Makefile.in (OBS): Remove selftest.o.
31 * configure.ac: Set srv_selftest_objs if $development is true.
32 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
33 * configure: Re-generated.
34 * server.c (captured_main): Wrap variable selftest_filter with
35 GDB_SELF_TEST.
36
37 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * server.c (parse_debug_format_options): Return std::string.
40 (handle_monitor_command, captured_main): Adjust.
41
42 2018-01-05 Pedro Alves <palves@redhat.com>
43
44 PR gdb/18653
45 * server.c (captured_main): Pass quiet=false to
46 save_original_signals_state.
47
48 2018-01-01 Joel Brobecker <brobecker@adacore.com>
49
50 * gdbreplay.c (gdbreplay_version): Update copyright year in
51 version message.
52 * server.c (gdbserver_version): Likewise.
53
54 2017-12-08 Tom Tromey <tom@tromey.com>
55
56 * ax.c (ax_printf): Update.
57
58 2017-12-07 Yao Qi <yao.qi@linaro.org>
59
60 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
61 aarch64_linux_read_description.
62 * linux-amd64-ipa.c (idx2mask): New array.
63 (get_ipa_tdesc): Move idx2mask out.
64 (initialize_low_tracepoint): Initialize target descriptions.
65 * linux-i386-ipa.c (idx2mask): New array.
66 (get_ipa_tdesc): Move idx2mask out.
67 (initialize_low_tracepoint): Initialize target descriptions.
68
69 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
70
71 * tdesc.c (struct tdesc_type): Change return type.
72 (tdesc_add_flag): Change parameter type.
73 (tdesc_add_bitfield): Likewise.
74 (tdesc_add_field): Likewise.
75 (tdesc_set_struct_size): Likewise.
76
77 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
78
79 * regcache.c (registers_to_string): Remove unused variable.
80
81 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
82
83 * inferiors.c (for_each_inferior_with_data): Remove.
84 * inferiors.h (for_each_inferior_with_data): Remove.
85 * server.c (handle_qxfer_threads_worker): Change parameter type.
86 (handle_qxfer_threads_proper): Use for_each_thread.
87
88 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * inferiors.c (for_each_inferior): Remove.
91 (clear_inferiors): Use for_each_thread.
92 * inferiors.h (for_each_inferior): Remove.
93 * linux-low.c (linux_wait_for_event_filtered): Use
94 for_each_thread.
95 (linux_stabilize_threads): Likewise.
96 * regcache.c (regcache_release): Likewise.
97 * server.c (gdb_wants_all_threads_stopped): Likewise.
98 (clear_pending_status_callback): Remove.
99 (handle_status): Use for_each_thread.
100 (captured_main): Likewise.
101 * win32-low.c (child_init_thread_list): Likewise.
102 (win32_clear_inferiors): Likewise.
103 (fake_breakpoint_event): Likewise.
104
105 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
106
107 * inferiors.h (find_inferior): Remove.
108 * inferiors.c (find_inferior): Remove.
109
110 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * linux-low.c (resume_status_pending_p): Update comment.
113 (need_step_over_p): Update comment.
114
115 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
116
117 * linux-low.c (proceed_one_lwp): Return void, change parameter
118 type.
119 (unsuspend_and_proceed_one_lwp): Likewise.
120 (proceed_all_lwps): Use for_each_thread.
121 (unstop_all_lwps): Likewise.
122
123 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * linux-low.c (linux_resume_one_thread): Return void, take
126 parameter directly.
127 (linux_resume): Use for_each_thread.
128
129 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * linux-low.c (send_sigstop_callback): Return void, change
132 parameter type. Rename to...
133 (send_sigstop): ... this.
134 (suspend_and_send_sigstop_callback): Return void, change parameter
135 type. Rename to...
136 (suspend_and_send_sigstop): ... this.
137 (stop_all_lwps): Use for_each_thread.
138
139 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
140
141 * linux-low.c (lwp_running): Return bool, remove unused
142 argument.
143 (linux_stabilize_threads): Use find_thread.
144
145 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
146
147 * linux-low.c (select_singlestep_lwp_callback): Remove.
148 (count_events_callback): Remove.
149 (select_event_lwp_callback): Remove.
150 (select_event_lwp): Use find_thread/for_each_thread.
151
152 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * linux-low.c (not_stopped_callback): Return bool, take filter
155 argument directly.
156 (linux_wait_for_event_filtered): Use find_thread.
157 (linux_wait_1): Likewise.
158
159 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * linux-low.c (same_lwp): Remove.
162 (find_lwp_pid): Use find_thread.
163
164 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
165
166 * linux-low.c (delete_lwp_callback): Remove.
167 (linux_mourn): Use for_each_thread.
168
169 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
170
171 * linux-low.c (linux_detach_lwp_callback): Return void, remove
172 args parameter, don't check for pid.
173 (linux_detach): Use for_each_thread.
174
175 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
176
177 * linux-low.c (struct counter): Remove.
178 (second_thread_of_pid_p): Remove.
179 (last_thread_of_process_p): Use find_thread.
180
181 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
182
183 * inferiors.c (find_inferior_in_random): Remove.
184 * inferiors.h (find_inferior_in_random): Remove.
185 * linux-low.c (status_pending_p_callback): Return bool, accept
186 parameter ptid directly.
187 (linux_wait_for_event_filtered): Use find_thread_in_random.
188 (linux_wait_1): Likewise.
189
190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
191
192 * inferiors.c (find_inferior_id): Remove.
193 (find_thread_ptid): Move implemention from find_inferior_id to
194 here.
195 * inferiors.h (find_inferior_id): Remove.
196 * server.c (handle_status): Use find_thread_ptid.
197 (process_serial_event): Likewise.
198 * thread-db.c (find_one_thread): Likewise.
199 (thread_db_thread_handle): Likewise.
200 * win32-low.c (thread_rec): Likewise.
201 (child_delete_thread): Likewise.
202 (win32_thread_alive): Likewise.
203 (get_child_debug_event): Likewise.
204
205 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * linux-mips-low.c (update_watch_registers_callback): Return
208 void, remove pid_p parameter, don't check for pid.
209 (mips_insert_point, mips_remove_point): Use for_each_thread.
210
211 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
212
213 * lynx.low (lynx_delete_thread_callback): Remove.
214 (lynx_mourn): Use for_each_thread.
215
216 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
217
218 * regcache.c (regcache_invalidate_one): Remove.
219 (regcache_invalidate_pid): use for_each_thread.
220
221 2017-11-26 Tom Tromey <tom@tromey.com>
222
223 * linux-low.c (linux_create_inferior): Update.
224
225 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
226
227 * spu-low.c (spu_create_inferior): Fix typo in argument name.
228
229 2017-11-24 Alan Hayward <alan.hayward@arm.com>
230
231 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
232 * linux-aarch64-low.c (initialize_low_arch): Call init func.
233 * linux-aarch64-tdesc-selftest.c: New file.
234 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
235
236 2017-11-24 Alan Hayward <alan.hayward@arm.com>
237
238 * configure.srv: Add new file.
239 * linux-aarch64-low.c (initialize_low_arch): Call init func.
240 * linux-aarch64-tdesc-selftest.c: New file.
241 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
242
243 2017-11-24 Alan Hayward <alan.hayward@arm.com>
244
245 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
246 * linux-aarch64-low.c (initialize_low_arch): Remove init.
247 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
248
249 2017-11-24 Alan Hayward <alan.hayward@arm.com>
250
251 * configure.srv: Add new files.
252 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
253 aarch64_linux_read_description.
254 * linux-aarch64-low.c (aarch64_linux_read_description):
255 Merge with aarch64_arch_setup.
256 (aarch64_arch_setup): Call aarch64_linux_read_description.
257 * linux-aarch64-tdesc.c: New file.
258 * linux-aarch64-tdesc.h: New file.
259
260 2017-11-24 Yao Qi <yao.qi@linaro.org>
261
262 * configure.srv: Set $srv_regobj for tic6x-linux.
263 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
264 (tic6x_read_description): Move some code to tic6x_arch_setup.
265 (tic6x_tdesc_test): New function.
266 (initialize_low_arch): Call selftests::register_test.
267
268 2017-11-22 Yao Qi <yao.qi@linaro.org>
269
270 * remote-utils.c (prepare_resume_reply): Use memcpy.
271
272 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
273
274 * linux-low.c (kill_one_lwp_callback): Return void, take
275 argument directly, don't filter on pid.
276 (linux_kill): Use for_each_thread.
277
278 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
279
280 * linux-low.c (need_step_over_p): Return bool, remove dummy
281 argument.
282 (linux_resume, proceed_all_lwps): Use find_thread.
283
284 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
285
286 * linux-low.c (resume_status_pending_p): Return bool, remove
287 flag_p argument.
288 (linux_resume): Use find_thread.
289
290 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
291
292 * linux-low.c (struct thread_resume_array): Remove.
293 (linux_set_resume_request): Return void, take arguments
294 directly.
295 (linux_resume): Use for_each_thread.
296
297 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
298
299 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
300 return bool, remove data argument.
301 (linux_stabilize_threads): Use find_thread.
302
303 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
304
305 * linux-low.c (unsuspend_one_lwp): Remove.
306 (unsuspend_all_lwps): Use for_each_thread, inline code from
307 unsuspend_one_lwp.
308
309 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
310
311 * gdbthread.h (find_thread): Add overload with ptid_t filter.
312 * linux-low.c (struct iterate_over_lwps_args): Remove.
313 (iterate_over_lwps_filter): Remove.
314 (iterate_over_lwps): Use find_thread.
315
316 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
317
318 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
319 (linux_handle_new_gdb_connection): Use for_each_thread, inline
320 code from reset_lwp_ptrace_options_callback.
321
322 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
323
324 * linux-arm-low.c (struct update_registers_data): Remove.
325 (update_registers_callback): Return void, take arguments
326 directly, don't check thread's pid.
327 (arm_insert_point, arm_remove_point): Use for_each_thread.
328
329 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
330
331 * win32-low.c (continue_one_thread): Return void, take argument
332 directly.
333 (child_continue): Use for_each_thread.
334
335 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
336
337 * win32-i386-low.c (update_debug_registers_callback): Rename
338 to ...
339 (update_debug_registers): ... this, return void, remove pid_p arg.
340 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
341
342 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
343
344 * inferiors.h (struct process_info): Add constructor, initialize
345 fields..
346 <syscalls_to_catch>: Change type to std::vector<int>.
347 * inferiors.c (add_process): Allocate process_info with new.
348 (remove_process): Free process_info with delete.
349 * linux-low.c (handle_extended_wait): Adjust.
350 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
351 * server.c (handle_general_set): Adjust.
352
353 2017-11-16 Pedro Alves <palves@redhat.com>
354
355 * remote-utils.c (remote_close): Block SIGIO signals instead of
356 uninstalling the SIGIO handler.
357
358 2017-11-16 Alan Hayward <alan.hayward@arm.com>
359
360 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
361
362 2017-11-16 Yao Qi <yao.qi@linaro.org>
363
364 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
365 (tic6x_store_gregset): Likewise.
366 (tic6x_usrregs_info): Move it up.
367
368 2017-11-15 Alan Hayward <alan.hayward@arm.com>
369
370 * Makefile.in: Update arch rules.
371 * configure.srv: Explicitly mark arch/ files.
372
373 2017-11-13 Andreas Schwab <schwab@suse.de>
374
375 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
376 function.
377 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
378
379 2017-11-06 Pedro Alves <palves@redhat.com>
380
381 * config.in, configure: Regenerate.
382
383 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
384
385 * target.c (struct thread_search): Remove.
386 (thread_search_callback): Remove.
387 (prepare_to_access_memory): Use for_each_thread instead of
388 find_inferior. Inline code from thread_search_callback.
389
390 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
391
392 * server.c (struct visit_actioned_threads_data): Remove.
393 (visit_actioned_threads): Change prototype to take arguments
394 directly.
395 (resume): Use find_thread instead of find_inferior.
396
397 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
398
399 * server.c (queue_stop_reply_callback): Change prototype, return
400 void.
401 (find_status_pending_thread_callback): Remove.
402 (handle_status): Replace find_inferior with find_thread and
403 for_each_thread.
404
405 2017-10-25 Alan Hayward <alan.hayward@arm.com>
406
407 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
408 with REGNO.
409 (aarch64_store_gregset): Likewise.
410 (aarch64_fill_fpregset): Likewise.
411 (aarch64_store_fpregset): Likewise.
412
413 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
414
415 * gdbthread.h (find_thread, for_each_thread): New functions.
416 * inferiors.c (thread_of_pid): Remove.
417 (find_any_thread_of_pid): Use find_thread.
418 * linux-low.c (num_lwps): Use for_each_thread.
419
420 2017-10-17 Yao Qi <yao.qi@linaro.org>
421
422 * Makefile.in: Remove one rule.
423 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
424
425 2017-10-17 Yao Qi <yao.qi@linaro.org>
426
427 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
428 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
429
430 2017-10-17 Yao Qi <yao.qi@linaro.org>
431
432 * configure.srv: Rename arm.o with arch/arm.o.
433
434 2017-10-17 Yao Qi <yao.qi@linaro.org>
435
436 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
437 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
438 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
439 (arch-i386.o, arch-amd64.o): Remove rules.
440 (arch/%.o): New rule.
441 Update POSTCOMPILE and COMPILE.pre.
442 * configure.ac: Invoke AC_CONFIG_COMMANDS.
443 * configure: Re-generated.
444 * configure.srv: Replace arch-i386.o with arch/i386.o.
445 Replace arch-amd64.o with arch/amd64.o.
446
447 2017-10-16 Yao Qi <yao.qi@linaro.org>
448
449 * configure: Regenerated.
450
451 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
452
453 * inferiors.h: (struct inferior_list): Remove.
454 (struct inferior_list_entry); Remove.
455 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
456 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
457 get_first_inferior): Remove.
458 (for_each_inferior, for_each_inferior_with_data, find_inferior,
459 find_inferior_id, find_inferior_in_random): Change signature.
460 * inferiors.c (all_threads): Change type to
461 std::list<thread_info *>.
462 (get_thread): Remove macro.
463 (find_inferior, find_inferior_id): Change signature, implement
464 using find_thread.
465 (find_inferior_in_random): Change signature, implement using
466 find_thread_in_random.
467 (for_each_inferior, for_each_inferior_with_data): Change
468 signature, implement using for_each_thread.
469 (add_inferior_to_list, remove_inferior): Remove.
470 (add_thread, get_first_thread, thread_of_pid,
471 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
472 (get_first_inferior, one_inferior_p, clear_inferior_list):
473 Remove.
474 (clear_inferiors, get_thread_process): Update.
475 * gdbthread.h: Include <list>.
476 (struct thread_info) <entry>: Remove field.
477 <id>: New field.
478 (all_threads): Change type to std::list<thread_info *>.
479 (get_first_inferior): Add doc.
480 (find_thread, for_each_thread, find_thread_in_random): New
481 functions.
482 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
483 * linux-arm-low.c (update_registers_callback): Update.
484 * linux-low.c (second_thread_of_pid_p): Update.
485 (kill_one_lwp_callback, linux_detach_lwp_callback,
486 delete_lwp_callback, status_pending_p_callback, same_lwp,
487 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
488 iterate_over_lwps, not_stopped_callback,
489 resume_stopped_resumed_lwps, count_events_callback,
490 select_singlestep_lwp_callback, select_event_lwp_callback,
491 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
492 suspend_and_send_sigstop_callback, wait_for_sigstop,
493 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
494 lwp_running, linux_set_resume_request, resume_status_pending_p,
495 need_step_over_p, start_step_over, linux_resume_one_thread,
496 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
497 reset_lwp_ptrace_options_callback): Update.
498 * linux-mips-low.c (update_watch_registers_callback): Update.
499 * regcache.c (regcache_invalidate_one, regcache_invalidate):
500 Update.
501 (free_register_cache_thread_one): Remove.
502 (regcache_release): Update.
503 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
504 handle_qxfer_threads_worker): Update.
505 (handle_query): Update, use list iterator.
506 (visit_actioned_threads, handle_pending_status,
507 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
508 clear_pending_status_callback, set_pending_status_callback,
509 find_status_pending_thread_callback, handle_status,
510 process_serial_event): Update.
511 * target.c (thread_search_callback): Update.
512 * thread-db.c (thread_db_get_tls_address): Update.
513 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
514 Update.
515 * win32-i386-low.c (update_debug_registers_callback): Update.
516 * win32-low.c (delete_thread_info, child_delete_thread,
517 continue_one_thread, suspend_one_thread,
518 get_child_debug_event): Adjust.
519
520 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
523 * inferiors.h: Include <list>.
524 (struct process_info) <entry>: Remove field.
525 <pid>: New field.
526 (pid_of): Change macro to function.
527 (ptid_of, lwpid_of): Remove macro.
528 (all_processes): Change type to std::list<process_info *>.
529 (ALL_PROCESSES): Remove macro.
530 (for_each_process, find_process): New function.
531 * inferiors.c (all_processes): Change type to
532 std::list<process_info *>.
533 (find_thread_process): Adjust.
534 (add_process): Likewise.
535 (remove_process): Likewise.
536 (find_process_pid): Likewise.
537 (get_first_process): Likewise.
538 (started_inferior_callback): Remove.
539 (have_started_inferiors_p): Adjust.
540 (attached_inferior_callback): Remove.
541 (have_attached_inferiors_p): Adjust.
542 * linux-low.c (check_zombie_leaders): Likewise.
543 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
544 (x86_linux_update_xmltarget): Adjust.
545 * server.c (handle_query): Likewise.
546 (gdb_reattached_process): Remove.
547 (handle_status): Adjust.
548 (kill_inferior_callback): Likewise.
549 (detach_or_kill_inferior): Remove.
550 (print_started_pid): Likewise.
551 (print_attached_pid): Likewise.
552 (detach_or_kill_for_exit): Update.
553 (process_serial_event): Likewise.
554 * linux-arm-low.c (arm_new_fork): Likewise.
555
556 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
557
558 * dll.h: Include <list>.
559 (struct dll_info): Add constructor.
560 <entry>: Remove field.
561 (all_dlls): Change type to std::list<dll_info>.
562 * dll.c: Include <algorithm>.
563 (get_dll): Remove macro.
564 (all_dlls): Change type to std::list<dll_info *>.
565 (free_one_dll): Remove.
566 (match_dll): Likewise.
567 (loaded_dll): Adjust.
568 (unloaded_dll): Adjust to all_dlls type change, use
569 std::find_if. Inline code from match_dll.
570 (clear_dlls): Adjust to all_dlls type change.
571 * server.c (emit_dll_description): Remove.
572 (handle_qxfer_libraries): Adjust to all_dlls type change,
573 integrate emit_dll_description's functionality.
574
575 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
576
577 * linux-low.h (struct linux_target_ops) <delete_process>: New
578 field.
579 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
580 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
581 (struct linux_target_ops): Add delete_process callback.
582 * linux-arm-low.c (arm_delete_process): New.
583 (struct linux_target_ops): Add delete_process callback.
584 * linux-bfin-low.c (struct linux_target_ops): Likewise.
585 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
586 * linux-m32r-low.c (struct linux_target_ops): Likewise.
587 * linux-mips-low.c (mips_linux_delete_process): New.
588 (struct linux_target_ops): Add delete_process callback.
589 * linux-ppc-low.c (struct linux_target_ops): Likewise.
590 * linux-s390-low.c (struct linux_target_ops): Likewise.
591 * linux-sh-low.c (struct linux_target_ops): Likewise.
592 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
593 * linux-tile-low.c (struct linux_target_ops): Likewise.
594 * linux-x86-low.c (x86_linux_delete_process): New.
595 (struct linux_target_ops): Add delete_process callback.
596 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
597
598 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
599
600 * linux-aarch64-low.c (the_low_target): Add thread delete
601 callback.
602 * linux-arm-low.c (arm_delete_thread): New function.
603 (the_low_target): Add thread delete callback.
604 * linux-bfin-low.c (the_low_target): Likewise.
605 * linux-crisv32-low.c (the_low_target): Likewise.
606 * linux-low.c (delete_lwp): Invoke delete_thread callback if
607 set.
608 * linux-low.h (struct linux_target_ops) <delete_thread>: New
609 field.
610 * linux-m32r-low.c (the_low_target): Add thread delete callback.
611 * linux-mips-low.c (mips_linux_delete_thread): New function.
612 (the_low_target): Add thread delete callback.
613 * linux-ppc-low.c (the_low_target): Likewise.
614 * linux-s390-low.c (the_low_target): Likewise.
615 * linux-sh-low.c (the_low_target): Likewise.
616 * linux-tic6x-low.c (the_low_target): Likewise.
617 * linux-tile-low.c (the_low_target): Likewise.
618 * linux-x86-low.c (the_low_target): Likewise.
619 * linux-xtensa-low.c (the_low_target): Likewise.
620
621 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
622
623 * win32-low.c: Include "common-inferior.h".
624
625 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
626
627 * inferiors.c (set_inferior_cwd): New function.
628 * server.c (handle_general_set): Handle QSetWorkingDir packet.
629 (handle_query): Inform that QSetWorkingDir is supported.
630 * win32-low.c (create_process): Pass the inferior's cwd to
631 CreateProcess.
632
633 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
634
635 * inferiors.c (current_inferior_cwd): New global variable.
636 (get_inferior_cwd): New function.
637 * inferiors.h (struct process_info) <cwd>: New field.
638
639 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
640
641 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
642 (OBS): Add gdb_tilde_expand.o.
643
644 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
645
646 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
647 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
648
649 2017-09-29 Pedro Alves <palves@redhat.com>
650
651 * ax.c (gdb_parse_agent_expr): Constify.
652 * ax.h (gdb_parse_agent_expr): Constify.
653 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
654 Constify.
655 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
656 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
657 * remote-utils.h (read_ptid): Constify.
658 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
659 (process_point_options, process_serial_event): Constify.
660 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
661 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
662 (cmd_qtbuffer): Constify.
663
664 2017-09-29 Pedro Alves <palves@redhat.com>
665
666 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
667 fails.
668
669 2017-09-29 Pedro Alves <palves@redhat.com>
670
671 * linux-low.c (handle_extended_wait): Pass parent thread instead
672 of process to thread_db_notice_clone.
673 * linux-low.h (thread_db_notice_clone): Replace parent process
674 parameter with parent thread parameter.
675 * thread-db.c (find_one_thread): Add comment.
676 (thread_db_notice_clone): Replace parent process parameter with
677 parent thread parameter. Temporarily switch to the parent thread.
678
679 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
680
681 * gdbthread.h: Include "common-gdbthread.h".
682 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
683 "if" when validating the ptid.
684 * remote-utils.c: Include "gdbthread.h".
685 (prepare_resume_reply): Use "switch_to_thread".
686 * target.c (done_accessing_memory): Likewise.
687
688 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
689
690 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
691 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
692 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
693 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
694 s390x-gs-linux64-ipa.o to ipa_obj.
695 * linux-s390-low.c (HWCAP_S390_GS): New define.
696 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
697 New functions.
698 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
699 (s390_arch_setup): Check for guarded-storage support and choose
700 appropriate tdesc.
701 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
702 init_registers_s390x_gs_linux64.
703 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
704 enum value.
705 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
706 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
707
708 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
709
710 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
711
712 2017-09-21 Kevin Buettner <kevinb@redhat.com>
713
714 * linux-low.h (struct lwp_info): Add new field, thread_handle.
715 (thread_db_thread_handle): Declare.
716 * linux-low.c (linux_target_ops): Initialize thread_handle.
717 * server.c (handle_qxfer_threads_worker): Add support for
718 "handle" attribute.
719 * target.h (struct target_ops): Add new function pointer,
720 thread_handle.
721 (target_thread_handle): Define.
722 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
723 field in lwp.
724 (thread_db_thread_handle): New function.
725
726 2017-09-21 Kevin Buettner <kevinb@redhat.com>
727
728 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
729 * linux-low.h (thread_db_notice_clone): Declare.
730 * thread-db.c (thread_db_notice_clone): New function.
731
732 2017-09-21 Pedro Alves <palves@redhat.com>
733
734 * server.c (gdb_read_memory, handle_status, process_serial_event)
735 (handle_serial_event, handle_target_event): Adjust to
736 set_desired_thread prototype change.
737 * target.c (set_desired_thread): Remove 'use_general' parameter
738 and adjust.
739 * target.h (set_desired_thread): Remove 'use_general' parameter.
740
741 2017-09-20 Tom Tromey <tom@tromey.com>
742
743 * target.c (target_terminal::terminal_state): Define.
744 (target_terminal::init): Rename from target_terminal_init.
745 (target_terminal::inferior): Rename from
746 target_terminal_inferior.
747 (target_terminal::ours): Rename from target_terminal_ours.
748 (target_terminal::ours_for_output, target_terminal::info): New.
749
750 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
751
752 * server.c (accumulate_file_name_length): Remove.
753 (emit_dll_description): Adjust to std::string change.
754 (handle_qxfer_libraries): Use std::string to hold document.
755
756 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
757
758 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
759 return type of xml_escape_text.
760 * server.c (emit_dll_description): Likewise.
761
762 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
763
764 * server.c (captured_main): Accept argument for --selftest.
765 Update run_tests call.
766 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
767 when registering selftests.
768
769 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
770
771 * regcache.c (get_thread_regcache): Update code to use "std::vector"
772 instead of "VEC" for "target_desc.reg_defs".
773 (regcache_cpy): Likewise.
774 (registers_to_string): Likewise.
775 (registers_from_string): Likewise.
776 (find_regno): Likewise.
777 (supply_regblock): Likewise.
778 (regcache_raw_read_unsigned): Likewise.
779 * tdesc.c (init_target_desc): Likewise.
780 (tdesc_create_reg): Likewise.
781 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
782 (struct target_desc) <reg_defs>: Convert to "std::vector".
783 (target_desc): Do not initialize "reg_defs".
784 (~target_desc): Update code to use "std::vector" instead of "VEC"
785 for "target_desc.reg_defs".
786 (operator==): Likewise.
787
788 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
789
790 * inferiors.h (thread_to_gdb_id): Remove.
791 * inferiors.c (thread_to_gdb_id): Remove.
792 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
793 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
794 lynx_store_registers, lynx_read_memory, lynx_write_memory):
795 Likewise.
796 * nto-low.c (nto_fetch_registers, nto_store_registers,
797 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
798
799 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
800
801 * inferiors.h (gdb_id_to_thread_id): Remove.
802 * inferiors.c (gdb_id_to_thread_id): Remove.
803 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
804 removal. Move pid declaration closer to where it's used.
805
806 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
807
808 * server.c (handle_detach): New function.
809 (process_serial_event): Move code out, call handle_detach.
810
811 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
812
813 * server.c (require_running): Rename to ...
814 (require_running_or_return): ... this ...
815 (require_running_or_break): ... and this.
816 (handle_query, process_serial_event): Adjust.
817
818 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
819
820 * linux-low.c (linux_set_resume_request): Remove unused
821 variables.
822
823 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
824
825 * server.c (first_thread_of): Remove.
826 (process_serial_event): Replace usage of first_thread_of with
827 find_any_thread_of_pid.
828 * tracepoint.c (same_process_p): Remove.
829 (gdb_agent_about_to_close): Replace usage of same_process_p with
830 find_any_thread_of_pid.
831 * linux-x86-low.c (same_process_callback): Remove.
832 (x86_arch_setup_process_callback): Replace usage of
833 same_process_callback with find_any_thread_of_pid.
834 * thread-db.c (any_thread_of): Remove.
835 (switch_to_process): Replace usage of any_thread_of with
836 find_any_thread_of_pid.
837 * inferiors.c (thread_pid_matches_callback): Remove.
838 (find_thread_process): Adjust to use find_any_thread_of_pid.
839
840 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
841
842 * regcache.c (get_thread_regcache): Guard calls to "memset"
843 with "!VEC_empty".
844
845 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
846
847 * linux-low.c (handle_extended_wait): Use
848 "allocate_target_description" instead of "XNEW".
849 * linux-x86-low.c (initialize_low_arch): Likewise.
850
851 2017-09-05 Yao Qi <yao.qi@linaro.org>
852
853 * configure.srv (srv_i386_regobj): Remove.
854 (srv_amd64_regobj): Remove.
855 (srv_regobj): Set it to "" for x86 non-linux targets.
856 * linux-x86-tdesc.c (i386_linux_read_description):
857 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
858 (init_registers_i386): Remove the declaration.
859 (tdesc_i386): Remove the declaration.
860 (lynx_i386_arch_setup): Call i386_create_target_description.
861 * nto-x86-low.c: Likewise.
862 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
863 [!__x86_64__]: include arch/i386.h.
864 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
865
866 2017-09-05 Yao Qi <yao.qi@linaro.org>
867
868 * configure.srv (srv_amd64_linux_xmlfiles): Remove
869 i386/amd64-XXX-linux from it.
870
871 2017-09-05 Yao Qi <yao.qi@linaro.org>
872
873 * configure.srv: Empty srv_amd64_linux_regobj if $development is
874 false.
875 (ipa_amd64_linux_regobj): Remove.
876 (ipa_x32_linux_regobj): Remove.
877
878 2017-09-05 Yao Qi <yao.qi@linaro.org>
879
880 * Makefile.in (arch-amd64.o): New rule.
881 * configure.srv: Append arch-amd64.o.
882 * linux-amd64-ipa.c: Include common/x86-xstate.h.
883 (get_ipa_tdesc): Call amd64_linux_read_description.
884 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
885 and init_registers_amd64_XXX.
886 * linux-x86-low.c (x86_linux_read_description): Call
887 amd64_linux_read_description.
888 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
889 (initialize_low_arch): Don't call init_registers_x32_XXX and
890 init_registers_amd64_XXX.
891 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
892 and tdesc_amd64_XXX.
893 [__x86_64__] (amd64_tdesc_test): New function.
894 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
895 and init_registers_amd64_XXX.
896 * linux-x86-tdesc.c: Include arch/amd64.h.
897 (xcr0_to_tdesc_idx): New function.
898 (i386_linux_read_description): New function.
899 (amd64_get_ipa_tdesc_idx): New function.
900 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
901 (amd64_get_ipa_tdesc): Declare.
902
903 2017-09-05 Yao Qi <yao.qi@linaro.org>
904
905 * configure.srv (srv_i386_linux_xmlfiles): Remove
906 i386/i386-XXX-linux.xml from it.
907
908 2017-09-05 Yao Qi <yao.qi@linaro.org>
909
910 * configure.srv: Set srv_i386_linux_regobj empty if $development
911 is false.
912 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
913 initialize_low_tdesc.
914 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
915 with #if initialize_low_tdesc.
916 * linux-x86-tdesc-selftest.c: New file.
917 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
918
919 2017-09-05 Yao Qi <yao.qi@linaro.org>
920
921 * Makefile.in (arch-i386.o): New rule.
922 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
923 (x86_64-*-linux*): Likewise.
924 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
925 include arch/i386.h.
926 (i386_linux_read_description): Remove code and call
927 i386_create_target_description.
928 * tdesc.c (allocate_target_description): New function.
929 * tdesc.h (set_tdesc_architecture): Remove declaration.
930 (set_tdesc_osabi): Likewise.
931
932 2017-09-05 Yao Qi <yao.qi@linaro.org>
933
934 * linux-x86-tdesc.c: Don't include <inttypes.h>.
935 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
936 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
937 .xmltarget.
938 * server.c (get_features_xml): Call tdesc_get_features_xml.
939 * tdesc.c (set_tdesc_architecture): New function.
940 (set_tdesc_osabi): New function.
941 (tdesc_get_features_xml): New function.
942 (tdesc_create_feature): Add an argument.
943 * tdesc.h (struct target_desc) <features>: New field.
944 <arch, osabi>: New field.
945 (~target_desc): xfree features, arch, and osabi.
946 (target_desc::oerator==): Don't compare .xmltarget.
947 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
948 (set_tdesc_osabi): Likewise.
949 (tdesc_get_features_xml): Likewise.
950
951 2017-09-05 Yao Qi <yao.qi@linaro.org>
952
953 * linux-x86-tdesc.c: Include selftest.h.
954 (i386_tdesc_test): New function.
955 (initialize_low_tdesc): Call selftests::register_test.
956 * tdesc.h: Include regdef.h.
957 (target_desc): Override operator == and !=.
958
959 2017-09-05 Yao Qi <yao.qi@linaro.org>
960
961 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
962 (ipa_obj): Likewise.
963 * linux-i386-ipa.c: Include common/x86-xstate.h
964 (get_ipa_tdesc): Call i386_linux_read_description.
965 (initialize_low_tracepoint): Don't call init_registers_XXX
966 functions, call initialize_low_tdesc instead.
967 * linux-x86-low.c (x86_linux_read_description): Call
968 i386_linux_read_description.
969 (initialize_low_arch): Don't call init_registers_i386_XXX
970 functions, call initialize_low_tdesc.
971 * linux-x86-tdesc.c: New file.
972 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
973 (i386_get_ipa_tdesc_idx): Declare.
974 (i386_get_ipa_tdesc): Declare.
975 (initialize_low_tdesc): Declare.
976
977 2017-09-05 Yao Qi <yao.qi@linaro.org>
978
979 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
980 instead of 0.
981
982 2017-09-05 Yao Qi <yao.qi@linaro.org>
983
984 * Makefile.in (IPA_OBJS): Add vec-ipa.o
985 * regcache.c (get_thread_regcache): Use VEC_length.
986 (init_register_cache): Likewise.
987 (regcache_cpy): Likewise.
988 (registers_to_string): Iterate reg_defs via VEC_iterate.
989 (find_regno): Likewise.
990 (find_register_by_number): Use VEC_index.
991 (register_size): Call find_register_by_number.
992 (register_data): Call find_register_by_number.
993 (supply_regblock): Use VEC_length.
994 (regcache_raw_read_unsigned): Likewise.
995 * tdesc.c (init_target_desc): Iterate reg_defs via
996 VEC_iterate.
997 (default_description): Update initializer.
998 (copy_target_description): Don't update field num_registers.
999 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1000 <num_registers>: Remove.
1001
1002 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * Makefile.in (.SECONDARY): Define target.
1005
1006 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1007
1008 * linux-low.c (linux_wait_1): Adjust.
1009 * server.c (queue_stop_reply_callback): Adjust.
1010
1011 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1012
1013 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1014 QEnvironmentUnset and QEnvironmentReset packets.
1015 (handle_query): Inform remote that QEnvironmentHexEncoded,
1016 QEnvironmentUnset and QEnvironmentReset are supported.
1017
1018 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * inferiors.h (inferior_target_data): Rename to ...
1021 (thread_target_data): ... this.
1022 (inferior_regcache_data): Rename to ...
1023 (thread_regcache_data): ... this.
1024 (set_inferior_regcache_data): Rename to ...
1025 (set_thread_regcache_data): ... this.
1026 * inferiors.c (inferior_target_data): Rename to ...
1027 (thread_target_data): ... this.
1028 (inferior_regcache_data): Rename to ...
1029 (thread_regcache_data): ... this.
1030 (set_inferior_regcache_data): Rename to ...
1031 (set_thread_regcache_data): ... this.
1032 (free_one_thread): Update.
1033 * linux-low.h (get_thread_lwp): Update.
1034 * regcache.c (get_thread_regcache): Update.
1035 (regcache_invalidate_thread): Update.
1036 (free_register_cache_thread): Update.
1037 * win32-i386-low.c (update_debug_registers_callback): Update.
1038 (win32_get_current_dr): Update.
1039 * win32-low.c (thread_rec): Update.
1040 (delete_thread_info): Update.
1041 (continue_one_thread): Update.
1042 (suspend_one_thread): Update.
1043
1044 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1045
1046 * inferiors.c (set_inferior_target_data): Remove.
1047 * inferiors.h (set_inferior_target_data): Remove.
1048
1049 2017-08-18 Yao Qi <yao.qi@linaro.org>
1050
1051 * Makefile.in (OBS): Add selftest.o.
1052 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1053 * configure, config.in: Re-generated.
1054 * server.c: Include common/sefltest.h.
1055 (captured_main): Handle option --selftest.
1056
1057 2017-08-09 Yao Qi <yao.qi@linaro.org>
1058
1059 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1060 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1061 i386-avx-mpx.o and i386-mmx.o.
1062 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1063 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1064 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1065 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1066 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1067 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1068 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1069 i386/amd64-avx-mpx.xml.
1070
1071 2017-08-09 Yao Qi <yao.qi@linaro.org>
1072
1073 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1074 and x32-avx-avx512.o.
1075 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1076 i386/x32-avx-avx512.xml.
1077
1078 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1079
1080 * tracepoint.h (enum class fast_tpoint_collect_result): New
1081 enumeration.
1082 (fast_tracepoint_collecting): Change return type to
1083 fast_tpoint_collect_result.
1084 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1085 * linux-low.h: Include tracepoint.h.
1086 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1087 fast_tpoint_collect_result.
1088 * linux-low.c (handle_tracepoints): Adjust.
1089 (linux_fast_tracepoint_collecting): Change return type to
1090 fast_tpoint_collect_result.
1091 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1092 linux_wait_1, stuck_in_jump_pad_callback,
1093 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1094 proceed_one_lwp): Adjust to type change.
1095
1096 2017-07-10 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1099
1100 2017-06-29 Yao Qi <yao.qi@linaro.org>
1101
1102 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1103 Remove.
1104 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1105
1106 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1107
1108 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1109
1110 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1111
1112 * linux-low.c (linux_create_inferior): Adjust code to access the
1113 environment information via 'gdb_environ' class.
1114 * lynx-low.c (lynx_create_inferior): Likewise.
1115 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1116 (get_environ): Return a pointer to 'our_environ'.
1117 (captured_main): Initialize 'our_environ'.
1118 * server.h (get_environ): Adjust prototype.
1119 * spu-low.c (spu_create_inferior): Adjust code to access the
1120 environment information via 'gdb_environ' class.
1121
1122 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1123
1124 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1125 usage of "register" keyword.
1126
1127 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * configure: Re-generate.
1130
1131 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1132
1133 * configure: Re-generate.
1134
1135 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1136
1137 * Makefile.in (COMPILE.pre): Add "-x c++".
1138
1139 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1140
1141 * fork-child.c: Conditionally include <signal.h>.
1142
1143 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1144
1145 * server.c (handle_general_set): Handle new packet
1146 "QStartupWithShell".
1147 (handle_query): Add "QStartupWithShell" to the list of supported
1148 packets.
1149 (gdbserver_usage): Add help text explaining the
1150 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1151 options.
1152 (captured_main): Recognize and act upon the presence of the new
1153 CLI options.
1154
1155 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1156 Pedro Alves <palves@redhat.com>
1157
1158 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1159 * configure: Regenerate.
1160 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1161 "fork-inferior.o".
1162 (i[34567]86-*-lynxos*): Likewise.
1163 (spu*-*-*): Likewise.
1164 * fork-child.c: New file.
1165 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1166 and "environ.h".
1167 (linux_ptrace_fun): New function.
1168 (linux_create_inferior): Adjust function prototype to reflect
1169 change on "target.h". Adjust function code to use
1170 "fork_inferior".
1171 (linux_request_interrupt): Delete "signal_pid".
1172 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1173 (lynx_ptrace_fun): New function.
1174 (lynx_create_inferior): Adjust function prototype to reflect
1175 change on "target.h". Adjust function code to use
1176 "fork_inferior".
1177 * nto-low.c (nto_create_inferior): Adjust function prototype and
1178 code to reflect change on "target.h". Update comments.
1179 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1180 "common-terminal.h" and "environ.h".
1181 (terminal_fd): Moved to fork-child.c.
1182 (old_foreground_pgrp): Likewise.
1183 (restore_old_foreground_pgrp): Likewise.
1184 (last_status): Make it global.
1185 (last_ptid): Likewise.
1186 (our_environ): New variable.
1187 (startup_with_shell): Likewise.
1188 (program_name): Likewise.
1189 (program_argv): Rename to...
1190 (program_args): ...this.
1191 (wrapper_argv): New variable.
1192 (start_inferior): Delete function.
1193 (get_exec_wrapper): New function.
1194 (get_exec_file): Likewise.
1195 (get_environ): Likewise.
1196 (prefork_hook): Likewise.
1197 (post_fork_inferior): Likewise.
1198 (postfork_hook): Likewise.
1199 (postfork_child_hook): Likewise.
1200 (handle_v_run): Update code to deal with arguments coming from the
1201 remote host. Update calls from "start_inferior" to
1202 "create_inferior".
1203 (captured_main): Likewise. Initialize environment variable. Call
1204 "have_job_control".
1205 * server.h (post_fork_inferior): New prototype.
1206 (get_environ): Likewise.
1207 (last_status): Declare.
1208 (last_ptid): Likewise.
1209 (signal_pid): Likewise.
1210 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1211 (spu_ptrace_fun): New function.
1212 (spu_create_inferior): Adjust function prototype to reflect change
1213 on "target.h". Adjust function code to use "fork_inferior".
1214 * target.c (target_terminal_init): New function.
1215 (target_terminal_inferior): Likewise.
1216 (target_terminal_ours): Likewise.
1217 * target.h: Include <vector>.
1218 (struct target_ops) <create_inferior>: Update prototype.
1219 (create_inferior): Update macro.
1220 * utils.c (gdb_flush_out_err): New function.
1221 * win32-low.c (win32_create_inferior): Adjust function prototype
1222 and code to reflect change on "target.h".
1223
1224 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1225
1226 * inferiors.c (switch_to_thread): New function.
1227
1228 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * Makefile.in (SFILE): Add "common/job-control.c".
1231 (OBS): Add "job-control.o".
1232
1233 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1234
1235 * Makefile: Remove "@host_makefile_frag@".
1236
1237 2017-05-05 Pedro Alves <palves@redhat.com>
1238
1239 * configure: Regenerate.
1240
1241 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1242
1243 * configure: Regenerate.
1244
1245 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1248 software_single_step change of return type to
1249 std::vector<CORE_ADDR>.
1250 * linux-low.c (install_software_single_step_breakpoints):
1251 Likewise.
1252 * linux-low.h (install_software_single_step_breakpoints):
1253 Likewise.
1254
1255 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1256
1257 * remote-utils.c: Include "gdb_termios.h" instead of
1258 "terminal.h".
1259 * terminal.h: Delete file.
1260
1261 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1262
1263 * server.c: Include <vector>.
1264 <program_argv, wrapper_argv>: Convert to std::vector.
1265 (start_inferior): Rewrite function to use C++.
1266 (handle_v_run): Likewise. Update code that calculates the argv
1267 based on the vRun packet; use C++.
1268 (captured_main): Likewise.
1269
1270 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1271
1272 * server.c (handle_v_cont): Initialize thread_resume::thread
1273 with null_ptid.
1274
1275 2017-04-05 Pedro Alves <palves@redhat.com>
1276
1277 * configure: Regenerate.
1278
1279 2017-04-05 Pedro Alves <palves@redhat.com>
1280
1281 * gdbreplay.c (sync_error): Constify.
1282 * linux-x86-low.c (push_opcode): Constify.
1283
1284 2017-04-05 Pedro Alves <palves@redhat.com>
1285
1286 * win32-low.c (get_child_debug_event)
1287 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1288 Report TARGET_WAITKIND_SPURIOUS instead.
1289
1290 2017-04-05 Pedro Alves <palves@redhat.com>
1291
1292 * remote-utils.c (remote_prepare, remote_open): Constify.
1293 * remote-utils.h (remote_prepare, remote_open): Constify.
1294 * server.c (captured_main): Constify 'port' handling.
1295
1296 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1297
1298 * Makefile.in (clean): Clear .deps.
1299
1300 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1301
1302 * .gitignore: Remove generated files, replace with wildcard.
1303 * (clean): Replace removal of generated files with wildcard.
1304 (version.c): Replace with...
1305 (version-generated.c): ...this.
1306 (xml-builtin.c): Replace with...
1307 (xml-builtin-generated.c): ...this.
1308 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1309 (%.c: *regformats*): Replace with...
1310 (%-generated.c: *regformats*): ...this.
1311
1312 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1313
1314 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1315 (xtensa_fill_gregset): Call collect_register_by_name for
1316 threadptr register.
1317 (xtensa_store_gregset): Call supply_register_by_name for
1318 threadptr register.
1319
1320 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1321
1322 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1323 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1324 (xtensa_store_gregset): Call supply_register for all registers in
1325 a0_regnum..a0_regnum + C0_NREGS range.
1326
1327 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1330 (ax-ipa.o: ax.c): Remove.
1331 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1332 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1333 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1334 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1335 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1336
1337 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1338
1339 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1340 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1341 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1342 (errors-ipa.o: ../common/errors.c): Remove.
1343 (format-ipa.o: ../common/format.c): Remove.
1344 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1345
1346 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1347
1348 * Makefile.in (%-ipa.o: %.c): New rule.
1349 (tracepoint-ipa.o: tracepoint.c): Remove.
1350 (utils-ipa.o: utils.c): Remove.
1351 (remote-utils-ipa.o: remote-utils.c): Remove.
1352 (regcache-ipa.o: regcache.c): Remove.
1353 (i386-linux-ipa.o: i386-linux.c): Remove.
1354 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1355 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1356 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1357 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1358 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1359 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1360 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1361 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1362 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1363 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1364 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1365 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1366 (aarch64-ipa.o: aarch64.c): Remove.
1367 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1368 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1369 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1370 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1371 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1372 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1373 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1374 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1375 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1376 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1377 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1378 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1379 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1380 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1381 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1382 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1383 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1384 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1385 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1386 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1387 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1388 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1389 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1390 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1391 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1392 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1393 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1394 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1395 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1396 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1397 (tdesc-ipa.o: tdesc.c): Remove.
1398 (x32-linux-ipa.o: x32-linux.c): Remove.
1399 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1400 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1401
1402 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * Makefile.in (%.o: ../arch/%.c): New rule.
1405 (arm.o: ../arch/arm.c): Remove.
1406 (arm-linux.o: ../arch/arm-linux.c): Remove.
1407 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1408 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1409
1410 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * Makefile.in (%.o: ../nat/%.c): New rule.
1413 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1414 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1415 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1416 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1417 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1418 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1419 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1420 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1421 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1422 (linux-personality.o: ../nat/linux-personality.c): Remove.
1423 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1424 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1425 (x86-linux.o: ../nat/x86-linux.c): Remove.
1426 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1427 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1428
1429 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1430
1431 * Makefile.in (%.o: ../common/%.c): New rule.
1432 (signals.o: ../common/signals.c): Remove.
1433 (print-utils.o: ../common/print-utils.c): Remove.
1434 (rsp-low.o: ../common/rsp-low.c): Remove.
1435 (common-utils.o: ../common/common-utils.c): Remove.
1436 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1437 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1438 (vec.o: ../common/vec.c): Remove.
1439 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1440 (xml-utils.o: ../common/xml-utils.c): Remove.
1441 (ptid.o: ../common/ptid.c): Remove.
1442 (buffer.o: ../common/buffer.c): Remove.
1443 (format.o: ../common/format.c): Remove.
1444 (filestuff.o: ../common/filestuff.c): Remove.
1445 (agent.o: ../common/agent.c): Remove.
1446 (errors.o: ../common/errors.c): Remove.
1447 (environ.o: ../common/environ.c): Remove.
1448 (common-debug.o: ../common/common-debug.c): Remove.
1449 (cleanups.o: ../common/cleanups.c): Remove.
1450 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1451 (fileio.o: ../common/fileio.c): Remove.
1452 (common-regcache.o: ../common/common-regcache.c): Remove.
1453 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1454 (new-op.o: ../common/new-op.c): Remove.
1455 (btrace-common.o: ../common/btrace-common.c): Remove.
1456
1457 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * Makefile.in (%.o: ../target/%.c): New rule.
1460 (waitstatus.o: ../target/waitstatus.c): Remove.
1461
1462 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * Makefile.in
1465 (%.c: ../regformats/%.dat,
1466 (%.c: ../regformats/arm/%.dat,
1467 (%.c: ../regformats/i386/%.dat,
1468 (%.c: ../regformats/rs6000/%.dat): New rules.
1469 (aarch64.c): Remove.
1470 (reg-arm.c): Remove.
1471 (arm-with-iwmmxt.c): Remove.
1472 (arm-with-vfpv2.c): Remove.
1473 (arm-with-vfpv3.c): Remove.
1474 (arm-with-neon.c): Remove.
1475 (reg-bfin.c): Remove.
1476 (reg-cris.c): Remove.
1477 (reg-crisv32.c): Remove.
1478 (i386.c): Remove.
1479 (i386-linux.c): Remove.
1480 (i386-avx.c): Remove.
1481 (i386-avx-linux.c): Remove.
1482 (i386-avx-avx512.c): Remove.
1483 (i386-avx-avx512-linux.c): Remove.
1484 (i386-mpx.c): Remove.
1485 (i386-mpx-linux.c): Remove.
1486 (i386-avx-mpx-avx512-pku.c): Remove.
1487 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1488 (i386-avx-mpx.c): Remove.
1489 (i386-avx-mpx-linux.c): Remove.
1490 (i386-mmx.c): Remove.
1491 (i386-mmx-linux.c): Remove.
1492 (reg-ia64.c): Remove.
1493 (reg-m32r.c): Remove.
1494 (reg-m68k.c): Remove.
1495 (reg-cf.c): Remove.
1496 (mips-linux.c): Remove.
1497 (mips-dsp-linux.c): Remove.
1498 (mips64-linux.c): Remove.
1499 (mips64-dsp-linux.c): Remove.
1500 (nios2-linux.c): Remove.
1501 (powerpc-32.c): Remove.
1502 (powerpc-32l.c): Remove.
1503 (powerpc-altivec32l.c): Remove.
1504 (powerpc-cell32l.c): Remove.
1505 (powerpc-vsx32l.c): Remove.
1506 (powerpc-isa205-32l.c): Remove.
1507 (powerpc-isa205-altivec32l.c): Remove.
1508 (powerpc-isa205-vsx32l.c): Remove.
1509 (powerpc-e500l.c): Remove.
1510 (powerpc-64l.c): Remove.
1511 (powerpc-altivec64l.c): Remove.
1512 (powerpc-cell64l.c): Remove.
1513 (powerpc-vsx64l.c): Remove.
1514 (powerpc-isa205-64l.c): Remove.
1515 (powerpc-isa205-altivec64l.c): Remove.
1516 (powerpc-isa205-vsx64l.c): Remove.
1517 (s390-linux32.c): Remove.
1518 (s390-linux32v1.c): Remove.
1519 (s390-linux32v2.c): Remove.
1520 (s390-linux64.c): Remove.
1521 (s390-linux64v1.c): Remove.
1522 (s390-linux64v2.c): Remove.
1523 (s390-te-linux64.c): Remove.
1524 (s390-vx-linux64.c): Remove.
1525 (s390-tevx-linux64.c): Remove.
1526 (s390x-linux64.c): Remove.
1527 (s390x-linux64v1.c): Remove.
1528 (s390x-linux64v2.c): Remove.
1529 (s390x-te-linux64.c): Remove.
1530 (s390x-vx-linux64.c): Remove.
1531 (s390x-tevx-linux64.c): Remove.
1532 (tic6x-c64xp-linux.c): Remove.
1533 (tic6x-c64x-linux.c): Remove.
1534 (tic6x-c62x-linux.c): Remove.
1535 (reg-sh.c): Remove.
1536 (reg-sparc64.c): Remove.
1537 (reg-spu.c): Remove.
1538 (amd64.c): Remove.
1539 (amd64-linux.c): Remove.
1540 (amd64-avx.c): Remove.
1541 (amd64-avx-linux.c): Remove.
1542 (amd64-avx-avx512.c): Remove.
1543 (amd64-avx-avx512-linux.c): Remove.
1544 (amd64-mpx.c): Remove.
1545 (amd64-mpx-linux.c): Remove.
1546 (amd64-avx-mpx-avx512-pku.c): Remove.
1547 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1548 (amd64-avx-mpx.c): Remove.
1549 (amd64-avx-mpx-linux.c): Remove.
1550 (x32.c): Remove.
1551 (x32-linux.c): Remove.
1552 (x32-avx.c): Remove.
1553 (x32-avx-linux.c): Remove.
1554 (x32-avx-avx512.c): Remove.
1555 (x32-avx-avx512-linux.c): Remove.
1556 (reg-xtensa.c): Remove.
1557 (reg-tilegx.c): Remove.
1558 (reg-tilegx32.c): Remove.
1559
1560 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1561
1562 * Makefile.in (SFILES): Add "common/environ.c".
1563 (OBJS): Add "common/environ.h".
1564
1565 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1566
1567 * configure.ac: Check if the fs_base and gs_base members of
1568 `struct user_regs_struct' exist.
1569 * config.in: Regenerated.
1570 * configure: Likewise.
1571
1572 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1573
1574 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1575 target_read_memory.
1576 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1577 (get_next_pcs_syscall_next_pc): Likewise.
1578
1579 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1580
1581 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1582 * nto-x86-low.c: Likewise.
1583
1584 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1585
1586 * Makefile.in: Include disable-implicit-rules.mk.
1587
1588 2016-11-23 Pedro Alves <palves@redhat.com>
1589
1590 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1591 (debug_vprintf): Use std::chrono::steady_clock instead of
1592 gettimeofday. Use '.' instead of ':'.
1593 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1594 (get_timestamp): Use std::chrono::steady_clock instead of
1595 gettimeofday.
1596
1597 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * Makefile.in: Fix whitespace formatting.
1600
1601 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1602
1603 * Makefile.in (SFILES, OBS): Flatten list and order
1604 alphabetically.
1605
1606 2016-11-23 Pedro Alves <palves@redhat.com>
1607
1608 * event-loop.c (handle_file_event): Use warning.
1609 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1610 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1611 Use warning.
1612
1613 2016-11-23 Pedro Alves <palves@redhat.com>
1614
1615 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1616 output.
1617 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1618 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1619 debug_printf and debug_flush for debug output.
1620 * server.c (handle_general_set): Likewise.
1621 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1622 output.
1623
1624 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * Makefile.in (.c.o): Replace rule with ...
1627 (%.o: %.c): ... this one.
1628
1629 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1630
1631 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1632 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1633 make.
1634 * configure.ac: Remove checks for the make program.
1635 * configure: Re-generate.
1636
1637 2016-10-28 Pedro Alves <palves@redhat.com>
1638
1639 * Makefile.in (CXX_DIALECT): Get from configure.
1640 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1641 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1642 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1643 * config.in: Regenerate.
1644 * configure: Regenerate.
1645
1646 2016-10-27 Yao Qi <yao.qi@linaro.org>
1647
1648 * linux-low.c (linux_supports_range_stepping): Return true if
1649 can_software_single_step return true.
1650
1651 2016-10-27 Yao Qi <yao.qi@linaro.org>
1652
1653 * inferiors.c (find_inferior_in_random): New function.
1654 * inferiors.h (find_inferior_in_random): Declare.
1655 * linux-low.c (linux_wait_for_event_filtered): Call
1656 find_inferior_in_random instead of find_inferior.
1657
1658 2016-10-27 Yao Qi <yao.qi@linaro.org>
1659
1660 * linux-low.c (linux_wait_1): If single-step breakpoints are
1661 inserted, remove them.
1662
1663 2016-10-26 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (handle_extended_wait): Link parent/child fork
1666 threads.
1667 (linux_wait_1): Unlink them.
1668 (linux_set_resume_request): Ignore resume requests for
1669 already-resumed and unhandled fork child threads.
1670 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1671 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1672 New functions.
1673 (handle_v_requests) <vCont>: Don't call require_running.
1674 * server.h (in_queued_stop_replies): New declaration.
1675
1676 2016-10-24 Yao Qi <yao.qi@linaro.org>
1677
1678 PR server/20733
1679 * linux-aarch64-low.c (append_insns): Cast the return value to
1680 'uint32_t *'.
1681
1682 2016-10-10 Yao Qi <yao.qi@linaro.org>
1683
1684 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1685
1686 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1687
1688 * target.c (target_supports_multi_process): New function, moved
1689 from...
1690 * target.h (target_supports_multi_process): ... here. Remove
1691 macro.
1692
1693 2016-10-05 Tom Tromey <tom@tromey.com>
1694
1695 PR remote/20655:
1696 * tracepoint.c (handle_tracepoint_bkpts): Check
1697 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1698
1699 2016-10-05 Yao Qi <yao.qi@linaro.org>
1700
1701 * configure.srv: Update the path of arm-*.xml files.
1702
1703 2016-10-05 Terry Guo <terry.guo@arm.com>
1704 Yao Qi <yao.qi@linaro.org>
1705
1706 * Makefile.in: Adjust the path of rules.
1707 * configure.srv: Update the path of xml files.
1708 * regformats/arm-with-iwmmxt.dat: Regenerated.
1709 * regformats/arm-with-neon.dat: Likewise.
1710 * regformats/arm-with-vfpv2.dat: Likewise.
1711 * regformats/arm-with-vfpv3.dat Likewise.
1712
1713 2016-09-30 Yao Qi <yao.qi@linaro.org>
1714
1715 PR gdbserver/20627
1716 * target.c (target_stop_and_wait): Don't call
1717 target_continue_no_signal, use resume_stop instead.
1718
1719 2016-09-26 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-low.c (linux_wait_1): Call debug_exit.
1722
1723 2016-09-23 Pedro Alves <palves@redhat.com>
1724
1725 * Makefile.in (SFILES): Add common/new-op.c.
1726 (OBS): Add common/new-op.o.
1727 (new-op.o): New rule.
1728
1729 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1730
1731 * .gitinore: Ignore more files.
1732
1733 2016-09-21 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1736 23.
1737
1738 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1739
1740 * server.c (start_inferior): Call target_mourn_inferior instead of
1741 mourn_inferior; pass ptid_t argument to it.
1742 (resume): Likewise.
1743 (handle_target_event): Likewise.
1744 * target.c (target_mourn_inferior): New function.
1745 * target.h (mourn_inferior): Delete macro.
1746
1747 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1748
1749 * linux-low.c (lwp_is_stepping): New function.
1750
1751 2016-09-06 Carl Love <cel@us.ibm.com>
1752
1753 * server.c (start_inferior): Fixed comment, requested comment change
1754 didn't get updated correctly. Removed reference to ptrace () call as
1755 it is only true on Linux systems.
1756
1757 2016-09-06 Carl Love <cel@us.ibm.com>
1758
1759 * server.c (start_inferior): Do not call
1760 function target_post_create_inferior () if the
1761 inferior process has already exited.
1762
1763 2016-09-05 Pedro Alves <palves@redhat.com>
1764
1765 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1766 (COMPILE.pre, CC_LD): Use CXX directly.
1767 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1768 * acinclude.m4: Don't include build-with-cxx.m4.
1769 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1770 * configure: Regenerate.
1771
1772 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1773
1774 PR gdb/19495
1775 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1776 call writing data to own_buf.
1777
1778 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1779
1780 * target.c (mywait): Call target_wait instead of
1781 the_target->wait.
1782 (target_wait): New function.
1783
1784 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1785
1786 * server.c (start_inferior): New variable 'ptid'. Replace calls
1787 to the_target->resume by target_continue{,_no_signal}, depending
1788 on the case.
1789 * target.c (target_stop_and_wait): Call target_continue_no_signal
1790 instead of the_target->resume.
1791 (target_continue): New function.
1792
1793 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1794
1795 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1796
1797 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1798
1799 PR server/20491
1800 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1801 ps_prochandle.
1802 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1803 * linux-arm-low.c (ps_get_thread_area): Likewise.
1804 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1805 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1806 * linux-mips-low.c (ps_get_thread_area): Likewise.
1807 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1808 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1809 * linux-x86-low.c (ps_get_thread_area): Likewise.
1810 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1811
1812 2016-08-19 Pedro Alves <palves@redhat.com>
1813
1814 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1815
1816 2016-08-19 Pedro Alves <palves@redhat.com>
1817
1818 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1819 comment. Use memcpy instead of casting through unsigned long.
1820
1821 2016-08-19 Pedro Alves <palves@redhat.com>
1822
1823 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1824 allocating around 0x80000000.
1825
1826 2016-08-19 Pedro Alves <palves@redhat.com>
1827
1828 PR gdb/20415
1829 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1830 (x32-avx512-linux-ipa.o): New rules.
1831 * configure.ac (x86_64-*-linux*): New x32 check.
1832 * configure.srv (ipa_x32_linux_regobj): New.
1833 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1834 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1835 descriptions.
1836 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1837 descriptions.
1838 * configure: Regenerate.
1839
1840 2016-08-09 Pedro Alves <palves@redhat.com>
1841
1842 PR gdb/18653
1843 * Makefile.in (OBS): Add signals-state-save-restore.o.
1844 (signals-state-save-restore.o): New rule.
1845 * config.in: Regenerate.
1846 * configure: Regenerate.
1847 * linux-low.c: Include "signals-state-save-restore.h".
1848 (linux_create_inferior): Call
1849 restore_original_signals_state.
1850 * server.c: Include "dispositions-save-restore.h".
1851 (captured_main): Call save_original_signals_state.
1852
1853 2016-08-05 Pedro Alves <palves@redhat.com>
1854
1855 * configure: Regenerate.
1856
1857 2016-08-04 Yao Qi <yao.qi@linaro.org>
1858
1859 * linux-low.c (regsets_fetch_inferior_registers): Check
1860 errno is ESRCH or not.
1861
1862 2016-08-02 Yao Qi <yao.qi@linaro.org>
1863
1864 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1865 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1866 (thread_db_load_search): Update.
1867 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1868 td_ta_set_event and td_ta_event_getmsg.
1869
1870 2016-07-26 Pedro Alves <palves@redhat.com>
1871
1872 PR server/20414
1873 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1874 of unsigned long for 64-bit registers and use uint32_t instead of
1875 unsigned int for 32-bit registers.
1876
1877 2016-07-26 Pedro Alves <palves@redhat.com>
1878
1879 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1880 to 'ptrace'.
1881
1882 2016-07-21 Tom Tromey <tom@tromey.com>
1883
1884 * configure: Rebuild.
1885
1886 2016-07-21 Yao Qi <yao.qi@linaro.org>
1887
1888 * mem-break.c (find_gdb_breakpoint): Cast bp to
1889 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1890
1891 2016-07-21 Yao Qi <yao.qi@linaro.org>
1892
1893 * server.c (handle_v_requests): Support s and S actions
1894 if target_supports_software_single_step return true.
1895
1896 2016-07-21 Yao Qi <yao.qi@linaro.org>
1897
1898 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1899 is resume_step, call maybe_hw_step.
1900 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1901 and unstop them.
1902 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1903 breakpoints or not.
1904 (proceed_one_lwp): If resume request is resume_step, install
1905 reinsert breakpoints and call maybe_hw_step.
1906
1907 2016-07-21 Yao Qi <yao.qi@linaro.org>
1908
1909 * linux-low.c (proceed_one_lwp): Declare.
1910 (linux_resume_one_thread): Remove local variable 'step'.
1911 Lift code enqueue signal. Call proceed_one_lwp instead of
1912 linux_resume_one_lwp.
1913
1914 2016-07-21 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-low.c (linux_resume_one_thread): Call
1917 enqueue_pending_signal.
1918
1919 2016-07-21 Yao Qi <yao.qi@linaro.org>
1920
1921 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1922 * inferiors.c (do_restore_current_thread_cleanup): New function.
1923 (make_cleanup_restore_current_thread): Likewise.
1924 * linux-low.c (install_software_single_step_breakpoints): Call
1925 make_cleanup_restore_current_thread. Switch current_thread to
1926 thread.
1927
1928 2016-07-21 Yao Qi <yao.qi@linaro.org>
1929
1930 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1931 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1932 (clone_one_breakpoint): Likewise.
1933 (delete_reinsert_breakpoints): Change parameter to thread.
1934 Callers updated.
1935 (has_reinsert_breakpoints): Likewise.
1936 (uninsert_reinsert_breakpoints): Likewise.
1937 (reinsert_reinsert_breakpoints): Likewise.
1938 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1939 (delete_reinsert_breakpoints): Likewise.
1940 (reinsert_reinsert_breakpoints): Likewise.
1941 (uninsert_reinsert_breakpoints): Likewise.
1942 (has_reinsert_breakpoints): Likewise.
1943
1944 2016-07-21 Yao Qi <yao.qi@linaro.org>
1945
1946 * inferiors.c (get_thread_process): Make parameter const.
1947 * inferiors.h (get_thread_process): Update declaration.
1948 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1949 Add new parameters child_thread and parent_thread. Callers
1950 updated.
1951 * mem-break.h (clone_all_breakpoints): Update declaration.
1952
1953 2016-07-21 Yao Qi <yao.qi@linaro.org>
1954
1955 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1956 <command_list, handler>: Remove.
1957 (struct gdb_breakpoint): New.
1958 (struct other_breakpoint): New.
1959 (struct reinsert_breakpoint): New.
1960 (is_gdb_breakpoint): New function.
1961 (any_persistent_commands): Update command_list if
1962 is_gdb_breakpoint returns true.
1963 (set_breakpoint): Create breakpoints according to their types.
1964 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1965 (set_gdb_breakpoint_1): Likewise.
1966 (set_gdb_breakpoint): Likewise.
1967 (clear_breakpoint_conditions): Change parameter type to
1968 'struct gdb_breakpoint *'.
1969 (clear_breakpoint_commands): Likewise.
1970 (clear_breakpoint_conditions_and_commands): Likewise.
1971 (add_condition_to_breakpoint): Likewise.
1972 (add_breakpoint_condition): Likewise.
1973 (add_commands_to_breakpoint): Likewise.
1974 (check_breakpoints): Check other_breakpoint.
1975 (clone_one_breakpoint): Clone breakpopint according to its type.
1976 * mem-break.h (struct gdb_breakpoint): Declare.
1977 (set_gdb_breakpoint): Update declaration.
1978 (clear_breakpoint_conditions_and_commands): Likewise.
1979 (add_breakpoint_condition): Likewise.
1980 (add_breakpoint_commands): Likewise.
1981 * server.c (process_point_options): Change parameter type to
1982 'struct gdb_breakpoint *'.
1983
1984 2016-07-21 Yao Qi <yao.qi@linaro.org>
1985
1986 * mem-break.c (set_breakpoint_at): Rename it to ...
1987 (set_breakpoint_type_at): ... it.
1988 (set_breakpoint_at): Call set_breakpoint_type_at.
1989 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1990 * mem-break.h (set_breakpoint_at): Update comments.
1991
1992 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1993
1994 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1995 to buf parameter.
1996 (nios2_store_gregset): Likewise.
1997
1998 2016-07-01 Pedro Alves <palves@redhat.com>
1999 Antoine Tremblay <antoine.tremblay@ericsson.com>
2000
2001 * linux-low.c: Change interface to take the target lwp_info
2002 pointer directly and return void. Handle detaching from a zombie
2003 thread.
2004 (linux_detach_lwp_callback): New function.
2005 (linux_detach): Detach from the leader thread after detaching from
2006 the clone threads.
2007
2008 2016-06-28 Yao Qi <yao.qi@linaro.org>
2009
2010 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2011 for variable new_offset.
2012 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2013 (aarch64_ftrace_insn_reloc_cb): Likewise.
2014 (aarch64_ftrace_insn_reloc_tb): Likewise.
2015 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2016 PRIx64 instead of PRIx32.
2017
2018 2016-06-28 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2021 (the_low_target): Install arm_get_syscall_trapinfo.
2022
2023 2016-06-28 Yao Qi <yao.qi@linaro.org>
2024
2025 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2026 function.
2027 (the_low_target): Install aarch64_get_syscall_trapinfo.
2028
2029 2016-06-28 Yao Qi <yao.qi@linaro.org>
2030
2031 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2032 Callers updated.
2033 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2034 Remove parameter sysno.
2035 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2036 sysret.
2037
2038 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2039
2040 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2041 (s390_emit_ne_goto): Likewise.
2042 (s390_emit_lt_goto): Likewise.
2043 (s390_emit_le_goto): Likewise.
2044 (s390_emit_gt_goto): Likewise.
2045 (s390_emit_ge_goto): Likewise.
2046 (s390x_emit_eq_goto): Likewise.
2047 (s390x_emit_ne_goto): Likewise.
2048 (s390x_emit_lt_goto): Likewise.
2049 (s390x_emit_le_goto): Likewise.
2050 (s390x_emit_gt_goto): Likewise.
2051 (s390x_emit_ge_goto): Likewise.
2052 (s390_emit_ops_impl): Mark variable static.
2053 (s390x_emit_ops): Likewise.
2054
2055 2016-06-17 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-low.c (handle_extended_wait): Call
2058 uninsert_reinsert_breakpoints for the parent process. Remove
2059 reinsert breakpoints from the child process. Reinsert them to
2060 the parent process when vfork is done.
2061 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2062 (reinsert_reinsert_breakpoints): New function.
2063 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2064 (reinsert_reinsert_breakpoints): Declare.
2065
2066 2016-06-17 Yao Qi <yao.qi@linaro.org>
2067
2068 * linux-low.c (handle_extended_wait): If the parent is doing
2069 step-over, remove the reinsert breakpoints from the forked child.
2070
2071 2016-06-17 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-low.c (unsuspend_all_lwps): Declare.
2074 (linux_low_filter_event): If thread exited, call finish_step_over.
2075 If step-over is finished, unsuspend other threads.
2076
2077 2016-06-17 Yao Qi <yao.qi@linaro.org>
2078
2079 * linux-low.c (linux_resume_one_lwp_throw): Assert
2080 has_reinsert_breakpoints returns false.
2081 * mem-break.c (delete_disabled_breakpoints): Assert
2082 bp type isn't reinsert_breakpoint.
2083
2084 2016-06-17 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-low.c (maybe_hw_step): New function.
2087 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2088 (finish_step_over): Switch current_thread to lwp temporarily,
2089 and assert has_reinsert_breakpoints returns true.
2090 (proceed_one_lwp): Call maybe_hw_step.
2091 * mem-break.c (has_reinsert_breakpoints): New function.
2092 * mem-break.h (has_reinsert_breakpoints): Declare.
2093
2094 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2095
2096 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2097
2098 2016-05-17 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2101 instead of find_inferior.
2102
2103 2016-05-05 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2106 Initialize res to zero.
2107
2108 2016-05-05 Yao Qi <yao.qi@linaro.org>
2109
2110 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2111 to uint32_t.
2112
2113 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2114
2115 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2116 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2117 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2118
2119 2016-04-28 Par Olsson <par.olsson@windriver.com>
2120 Simon Marchi <simon.marchi@ericsson.com>
2121
2122 * tracepoint.c (write_inferior_int8): New function.
2123 (cmd_qtenable_disable): Write enable flag using
2124 write_inferior_int8.
2125
2126 2016-04-25 Yao Qi <yao.qi@linaro.org>
2127
2128 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2129 (need_step_over_p): Return zero if the LWP has pending signals
2130 can be delivered on software single step target.
2131
2132 2016-04-25 Yao Qi <yao.qi@linaro.org>
2133
2134 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2135 return instead of error.
2136
2137 2016-04-22 Yao Qi <yao.qi@linaro.org>
2138
2139 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2140 to 23.
2141
2142 2016-04-22 Yao Qi <yao.qi@linaro.org>
2143
2144 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2145 signal when stepping over breakpoint with software single
2146 step.
2147
2148 2016-04-21 Pedro Alves <palves@redhat.com>
2149
2150 * linux-s390-low.c (s390_collect_ptrace_register)
2151 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2152 add casts.
2153 (s390_check_regset): Use void * instead of gdb_byte *.
2154
2155 2016-04-20 Pedro Alves <palves@redhat.com>
2156
2157 * configure: Renegerate.
2158
2159 2016-04-20 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2162 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2163 number 16.
2164 (arm_store_gregset): Likewise.
2165
2166 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2167
2168 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2169 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2170 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2171 (amd64-avx-mpx-linux.c): New rules.
2172 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2173 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2174 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2175 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2176 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2177 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2178 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2179 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2180 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2181 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2182 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2183 * linux-x86-low.c (x86_linux_read_description): Add case for
2184 X86_XSTATE_AVX_MPX_MASK.
2185 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2186 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2187 init_registers_i386_avx_mpx_linux.
2188 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2189 (initialize_low_tracepoint): Call
2190 init_registers_i386_avx_mpx_linux.
2191 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2192 (initialize_low_tracepoint): Call
2193 init_registers_amd64_avx_mpx_linux.
2194 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2195 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2196 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2197 declarations.
2198
2199 2016-04-18 Pedro Alves <palves@redhat.com>
2200
2201 * configure: Regenerate.
2202
2203 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2204
2205 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2206 (aarch64_emit_sub): Likewise.
2207
2208 2016-04-12 Pedro Alves <palves@redhat.com>
2209
2210 * utils.c (prepare_to_throw_exception): Delete.
2211
2212 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2215
2216 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2217
2218 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2219
2220 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2221
2222 * linux-aarch64-ipa.c: Add <elf.h> include.
2223 * linux-ppc-ipa.c: Add <elf.h> include.
2224 * linux-s390-ipa.c: Add <elf.h> include.
2225
2226 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2227
2228 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2229 (get_raw_reg_ptr): Likewise.
2230 (get_trace_state_variable_value_ptr): Likewise.
2231 (set_trace_state_variable_value_ptr): Likewise.
2232 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2233 char *.
2234
2235 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2236 Marcin Kościelnicki <koriakin@0x04.net>
2237
2238 PR/17221
2239 * linux-ppc-low.c (emit_insns): New function.
2240 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2241 (ppc_emit_prologue): New function.
2242 (ppc_emit_epilogue): New function.
2243 (ppc_emit_add): New function.
2244 (ppc_emit_sub): New function.
2245 (ppc_emit_mul): New function.
2246 (ppc_emit_lsh): New function.
2247 (ppc_emit_rsh_signed): New function.
2248 (ppc_emit_rsh_unsigned): New function.
2249 (ppc_emit_ext): New function.
2250 (ppc_emit_zero_ext): New function.
2251 (ppc_emit_log_not): New function.
2252 (ppc_emit_bit_and): New function.
2253 (ppc_emit_bit_or): New function.
2254 (ppc_emit_bit_xor): New function.
2255 (ppc_emit_bit_not): New function.
2256 (ppc_emit_equal): New function.
2257 (ppc_emit_less_signed): New function.
2258 (ppc_emit_less_unsigned): New function.
2259 (ppc_emit_ref): New function.
2260 (ppc_emit_const): New function.
2261 (ppc_emit_reg): New function.
2262 (ppc_emit_pop): New function.
2263 (ppc_emit_stack_flush): New function.
2264 (ppc_emit_swap): New function.
2265 (ppc_emit_stack_adjust): New function.
2266 (ppc_emit_call): New function.
2267 (ppc_emit_int_call_1): New function.
2268 (ppc_emit_void_call_2): New function.
2269 (ppc_emit_if_goto): New function.
2270 (ppc_emit_goto): New function.
2271 (ppc_emit_eq_goto): New function.
2272 (ppc_emit_ne_goto): New function.
2273 (ppc_emit_lt_goto): New function.
2274 (ppc_emit_le_goto): New function.
2275 (ppc_emit_gt_goto): New function.
2276 (ppc_emit_ge_goto): New function.
2277 (ppc_write_goto_address): New function.
2278 (ppc_emit_ops_impl): New static variable.
2279 (ppc64v1_emit_prologue): New function.
2280 (ppc64v2_emit_prologue): New function.
2281 (ppc64_emit_epilogue): New function.
2282 (ppc64_emit_add): New function.
2283 (ppc64_emit_sub): New function.
2284 (ppc64_emit_mul): New function.
2285 (ppc64_emit_lsh): New function.
2286 (ppc64_emit_rsh_signed): New function.
2287 (ppc64_emit_rsh_unsigned): New function.
2288 (ppc64_emit_ext): New function.
2289 (ppc64_emit_zero_ext): New function.
2290 (ppc64_emit_log_not): New function.
2291 (ppc64_emit_bit_and): New function.
2292 (ppc64_emit_bit_or): New function.
2293 (ppc64_emit_bit_xor): New function.
2294 (ppc64_emit_bit_not): New function.
2295 (ppc64_emit_equal): New function.
2296 (ppc64_emit_less_signed): New function.
2297 (ppc64_emit_less_unsigned): New function.
2298 (ppc64_emit_ref): New function.
2299 (ppc64_emit_const): New function.
2300 (ppc64v1_emit_reg): New function.
2301 (ppc64v2_emit_reg): New function.
2302 (ppc64_emit_pop): New function.
2303 (ppc64_emit_stack_flush): New function.
2304 (ppc64_emit_swap): New function.
2305 (ppc64v1_emit_call): New function.
2306 (ppc64v2_emit_call): New function.
2307 (ppc64v1_emit_int_call_1): New function.
2308 (ppc64v2_emit_int_call_1): New function.
2309 (ppc64v1_emit_void_call_2): New function.
2310 (ppc64v2_emit_void_call_2): New function.
2311 (ppc64_emit_if_goto): New function.
2312 (ppc64_emit_eq_goto): New function.
2313 (ppc64_emit_ne_goto): New function.
2314 (ppc64_emit_lt_goto): New function.
2315 (ppc64_emit_le_goto): New function.
2316 (ppc64_emit_gt_goto): New function.
2317 (ppc64_emit_ge_goto): New function.
2318 (ppc64v1_emit_ops_impl): New static variable.
2319 (ppc64v2_emit_ops_impl): New static variable.
2320 (ppc_emit_ops): New function.
2321 (linux_low_target): Wire in ppc_emit_ops.
2322
2323 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2324 Marcin Kościelnicki <koriakin@0x04.net>
2325
2326 PR/17221
2327 * Makefile.in: Add powerpc-*-ipa.o
2328 * configure.srv: Add ipa_obj for powerpc*-linux.
2329 * linux-ppc-ipa.c: New file.
2330 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2331 includes.
2332 (PPC_FIELD): New macro.
2333 (PPC_SEXT): New macro.
2334 (PPC_OP6): New macro.
2335 (PPC_BO): New macro.
2336 (PPC_LI): New macro.
2337 (PPC_BD): New macro.
2338 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2339 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2340 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2341 (ppc_get_thread_area): New function.
2342 (is_elfv2_inferior): New function.
2343 (gen_ds_form): New function.
2344 (GEN_STD): New macro.
2345 (GEN_STDU): New macro.
2346 (GEN_LD): New macro.
2347 (GEN_LDU): New macro.
2348 (gen_d_form): New function.
2349 (GEN_ADDI): New macro.
2350 (GEN_ADDIS): New macro.
2351 (GEN_LI): New macro.
2352 (GEN_LIS): New macro.
2353 (GEN_ORI): New macro.
2354 (GEN_ORIS): New macro.
2355 (GEN_LWZ): New macro.
2356 (GEN_STW): New macro.
2357 (GEN_STWU): New macro.
2358 (gen_xfx_form): New function.
2359 (GEN_MFSPR): New macro.
2360 (GEN_MTSPR): New macro.
2361 (GEN_MFCR): New macro.
2362 (GEN_MTCR): New macro.
2363 (GEN_SYNC): New macro.
2364 (GEN_LWSYNC): New macro.
2365 (gen_x_form): New function.
2366 (GEN_OR): New macro.
2367 (GEN_MR): New macro.
2368 (GEN_LWARX): New macro.
2369 (GEN_STWCX): New macro.
2370 (GEN_CMPW): New macro.
2371 (gen_md_form): New function.
2372 (GEN_RLDICL): New macro.
2373 (GEN_RLDICR): New macro.
2374 (gen_i_form): New function.
2375 (GEN_B): New macro.
2376 (GEN_BL): New macro.
2377 (gen_b_form): New function.
2378 (GEN_BNE): New macro.
2379 (GEN_LOAD): New macro.
2380 (GEN_STORE): New macro.
2381 (gen_limm): New function.
2382 (gen_atomic_xchg): New function.
2383 (gen_call): New function.
2384 (ppc_relocate_instruction): New function.
2385 (ppc_install_fast_tracepoint_jump_pad): New function.
2386 (ppc_get_min_fast_tracepoint_insn_len): New function.
2387 (ppc_get_ipa_tdesc_idx): New function.
2388 (the_low_target): Wire in the new functions.
2389 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2390 tdescs.
2391 * linux-ppc-tdesc.h: New file.
2392
2393 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2394
2395 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2396 (alloc_jump_pad_buffer): New function.
2397 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2398 (alloc_jump_pad_buffer): New function.
2399 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2400 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2401 (alloc_jump_pad_buffer): New function.
2402 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2403 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2404 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2405 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2406
2407 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2408
2409 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2410 * linux-amd64-ipa.c: Likewise.
2411 * linux-i386-ipa.c: Likewise.
2412 * linux-s390-ipa.c: Likewise.
2413 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2414 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2415 set_trace_state_variable_value_ptr.
2416 (struct ipa_sym_addresses): Likewise.
2417 (symbol_list): Likewise.
2418 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2419 accessing gdb_collect directly.
2420 (gdb_collect_ptr_type): New typedef.
2421 (get_raw_reg_ptr_type): New typedef.
2422 (get_trace_state_variable_value_ptr_type): New typedef.
2423 (set_trace_state_variable_value_ptr_type): New typedef.
2424 (gdb_collect_ptr): New global.
2425 (get_raw_reg_ptr): New global.
2426 (get_trace_state_variable_value_ptr): New global.
2427 (set_trace_state_variable_value_ptr): New global.
2428 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2429 accessing get_raw_reg directly.
2430 (get_get_tsv_func_addr): Likewise for
2431 get_trace_state_variable_value_ptr.
2432 (get_set_tsv_func_addr): Likewise for
2433 set_trace_state_variable_value_ptr.
2434 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2435
2436 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2437
2438 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2439
2440 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2441
2442 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2443 packets.
2444 (relocate_instruction): Remove own_buf.
2445 * server.c (own_buf): Make global.
2446 (handle_v_requests): Make global.
2447 * server.h (own_buf): New declaration.
2448 (handle_v_requests): New prototype.
2449
2450 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2451
2452 PR 18377
2453 * linux-s390-low.c (add_insns): New function.
2454 (s390_emit_prologue): New function.
2455 (s390_emit_epilogue): New function.
2456 (s390_emit_add): New function.
2457 (s390_emit_sub): New function.
2458 (s390_emit_mul): New function.
2459 (s390_emit_lsh): New function.
2460 (s390_emit_rsh_signed): New function.
2461 (s390_emit_rsh_unsigned): New function.
2462 (s390_emit_ext): New function.
2463 (s390_emit_log_not): New function.
2464 (s390_emit_bit_and): New function.
2465 (s390_emit_bit_or): New function.
2466 (s390_emit_bit_xor): New function.
2467 (s390_emit_bit_not): New function.
2468 (s390_emit_equal): New function.
2469 (s390_emit_less_signed): New function.
2470 (s390_emit_less_unsigned): New function.
2471 (s390_emit_ref): New function.
2472 (s390_emit_if_goto): New function.
2473 (s390_emit_goto): New function.
2474 (s390_write_goto_address): New function.
2475 (s390_emit_litpool): New function.
2476 (s390_emit_const): New function.
2477 (s390_emit_call): New function.
2478 (s390_emit_reg): New function.
2479 (s390_emit_pop): New function.
2480 (s390_emit_stack_flush): New function.
2481 (s390_emit_zero_ext): New function.
2482 (s390_emit_swap): New function.
2483 (s390_emit_stack_adjust): New function.
2484 (s390_emit_set_r2): New function.
2485 (s390_emit_int_call_1): New function.
2486 (s390_emit_void_call_2): New function.
2487 (s390_emit_eq_goto): New function.
2488 (s390_emit_ne_goto): New function.
2489 (s390_emit_lt_goto): New function.
2490 (s390_emit_le_goto): New function.
2491 (s390_emit_gt_goto): New function.
2492 (s390_emit_ge_goto): New function.
2493 (s390x_emit_prologue): New function.
2494 (s390x_emit_epilogue): New function.
2495 (s390x_emit_add): New function.
2496 (s390x_emit_sub): New function.
2497 (s390x_emit_mul): New function.
2498 (s390x_emit_lsh): New function.
2499 (s390x_emit_rsh_signed): New function.
2500 (s390x_emit_rsh_unsigned): New function.
2501 (s390x_emit_ext): New function.
2502 (s390x_emit_log_not): New function.
2503 (s390x_emit_bit_and): New function.
2504 (s390x_emit_bit_or): New function.
2505 (s390x_emit_bit_xor): New function.
2506 (s390x_emit_bit_not): New function.
2507 (s390x_emit_equal): New function.
2508 (s390x_emit_less_signed): New function.
2509 (s390x_emit_less_unsigned): New function.
2510 (s390x_emit_ref): New function.
2511 (s390x_emit_if_goto): New function.
2512 (s390x_emit_const): New function.
2513 (s390x_emit_call): New function.
2514 (s390x_emit_reg): New function.
2515 (s390x_emit_pop): New function.
2516 (s390x_emit_stack_flush): New function.
2517 (s390x_emit_zero_ext): New function.
2518 (s390x_emit_swap): New function.
2519 (s390x_emit_stack_adjust): New function.
2520 (s390x_emit_int_call_1): New function.
2521 (s390x_emit_void_call_2): New function.
2522 (s390x_emit_eq_goto): New function.
2523 (s390x_emit_ne_goto): New function.
2524 (s390x_emit_lt_goto): New function.
2525 (s390x_emit_le_goto): New function.
2526 (s390x_emit_gt_goto): New function.
2527 (s390x_emit_ge_goto): New function.
2528 (s390_emit_ops): New function.
2529 (struct linux_target_ops): Fill in emit_ops hook.
2530
2531 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2532
2533 PR 18377
2534 * Makefile.in: Add s390 IPA files.
2535 * configure.srv: Build IPA for s390.
2536 * linux-s390-ipa.c: New file.
2537 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2538 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2539 (tdesc_s390_linux32): Likewise.
2540 (init_registers_s390_linux32v1): Likewise.
2541 (tdesc_s390_linux32v1): Likewise.
2542 (init_registers_s390_linux32v2): Likewise.
2543 (tdesc_s390_linux32v2): Likewise.
2544 (init_registers_s390_linux64): Likewise.
2545 (tdesc_s390_linux64): Likewise.
2546 (init_registers_s390_linux64v1): Likewise.
2547 (tdesc_s390_linux64v1): Likewise.
2548 (init_registers_s390_linux64v2): Likewise.
2549 (tdesc_s390_linux64v2): Likewise.
2550 (init_registers_s390_te_linux64): Likewise.
2551 (tdesc_s390_te_linux64): Likewise.
2552 (init_registers_s390_vx_linux64): Likewise.
2553 (tdesc_s390_vx_linux64): Likewise.
2554 (init_registers_s390_tevx_linux64): Likewise.
2555 (tdesc_s390_tevx_linux64): Likewise.
2556 (init_registers_s390x_linux64): Likewise.
2557 (tdesc_s390x_linux64): Likewise.
2558 (init_registers_s390x_linux64v1): Likewise.
2559 (tdesc_s390x_linux64v1): Likewise.
2560 (init_registers_s390x_linux64v2): Likewise.
2561 (tdesc_s390x_linux64v2): Likewise.
2562 (init_registers_s390x_te_linux64): Likewise.
2563 (tdesc_s390x_te_linux64): Likewise.
2564 (init_registers_s390x_vx_linux64): Likewise.
2565 (tdesc_s390x_vx_linux64): Likewise.
2566 (init_registers_s390x_tevx_linux64): Likewise.
2567 (tdesc_s390x_tevx_linux64): Likewise.
2568 (have_hwcap_s390_vx): New static variable.
2569 (s390_arch_setup): Fill have_hwcap_s390_vx.
2570 (s390_get_thread_area): New function.
2571 (s390_ft_entry_gpr_esa): New const.
2572 (s390_ft_entry_gpr_zarch): New const.
2573 (s390_ft_entry_misc): New const.
2574 (s390_ft_entry_fr): New const.
2575 (s390_ft_entry_vr): New const.
2576 (s390_ft_main_31): New const.
2577 (s390_ft_main_64): New const.
2578 (s390_ft_exit_fr): New const.
2579 (s390_ft_exit_vr): New const.
2580 (s390_ft_exit_misc): New const.
2581 (s390_ft_exit_gpr_esa): New const.
2582 (s390_ft_exit_gpr_zarch): New const.
2583 (append_insns): New function.
2584 (s390_relocate_instruction): New function.
2585 (s390_install_fast_tracepoint_jump_pad): New function.
2586 (s390_get_min_fast_tracepoint_insn_len): New function.
2587 (s390_get_ipa_tdesc_idx): New function.
2588 (struct linux_target_ops): Wire in the above functions.
2589 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2590 * linux-s390-tdesc.h: New file.
2591
2592 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2593
2594 * linux-s390-low.c (s390_supports_tracepoints): New function.
2595 (struct linux_target_ops): Fill supports_tracepoints hook.
2596
2597 2016-03-18 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-low.c (lwp_signal_can_be_delivered): New function.
2600 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2601
2602 2016-03-18 Yao Qi <yao.qi@linaro.org>
2603
2604 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2605 0 if signal is enqueued. Remove 'signal' from one debugging
2606 message. Move one debugging message to some lines below.
2607 Remove code setting 'signal' to 0.
2608
2609 2016-03-18 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-low.c (linux_low_filter_event): Remove redundant
2612 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2613
2614 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2615
2616 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2617 (struct linux_target_ops): Wire in the above.
2618
2619 2016-03-03 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-low.c: Update comments to start_step_over.
2622
2623 2016-03-03 Yao Qi <yao.qi@linaro.org>
2624
2625 PR server/19736
2626 * linux-low.c (handle_extended_wait): Set child suspended
2627 if event_lwp->bp_reinsert isn't zero.
2628
2629 2016-03-02 Yao Qi <yao.qi@linaro.org>
2630
2631 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2632 enqueue_pending_signal.
2633
2634 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2635
2636 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2637 is actually loaded.
2638
2639 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2640
2641 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2642 (s390_regmap_3264) [!__s390x__]: New global.
2643 (s390_collect_ptrace_register): Skip map entries containing -1.
2644 (s390_supply_ptrace_register): Ditto.
2645 (s390_fill_gprs_high): New function.
2646 (s390_store_gprs_high): New function.
2647 (s390_regsets): Add NT_S390_HIGH_GPRS.
2648 (s390_get_hwcap): Enable on 31-bit.
2649 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2650 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2651 Detect NT_S390_HIGH_GPRS.
2652 (s390_usrregs_info_3264): Enable on 31-bit.
2653 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2654 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2655
2656 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2657
2658 PR gdb/13808
2659 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2660 * configure.srv: Ditto.
2661 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2662 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2663 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2664 (init_registers_amd64_linux): Remove prototype.
2665 (tdesc_amd64_linux): Remove declaration.
2666 (get_ipa_tdesc): New function.
2667 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2668 initialize remaining tdescs.
2669 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2670 (init_registers_i386_linux): Remove prototype.
2671 (tdesc_i386_linux): Remove declaration.
2672 (get_ipa_tdesc): New function.
2673 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2674 initialize remaining tdescs.
2675 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2676 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2677 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2678 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2679 (x86_get_ipa_tdesc_idx): New function.
2680 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2681 * linux-x86-tdesc.h: New file.
2682 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2683 (target_get_ipa_tdesc_idx): New macro.
2684 * tracepoint.c (ipa_tdesc_idx): New macro.
2685 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2686 (symbol_list): Add ipa_tdesc_idx.
2687 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2688 (ipa_tdesc): Remove.
2689 (ipa_tdesc_idx): New variable.
2690 (get_context_regcache): Use get_ipa_tdesc.
2691 (gdb_collect): Ditto.
2692 (gdb_probe): Ditto.
2693 * tracepoint.h (get_ipa_tdesc): New prototype.
2694 (ipa_tdesc): Remove.
2695
2696 2016-02-24 Pedro Alves <palves@redhat.com>
2697
2698 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2699 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2700 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2701 Factor out common code between the USE_SIGTRAP_SIGINFO and
2702 !USE_SIGTRAP_SIGINFO blocks.
2703 (linux_low_filter_event): Call save_stop_reason instead of
2704 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2705 Update comments.
2706 (linux_wait_1): Update comments.
2707
2708 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2709
2710 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2711 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2712 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2713 ppc_insert_point, ppc_remove_point.
2714
2715 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2716
2717 * linux-s390-low.c (s390_supports_z_point_type): New function.
2718 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2719
2720 2016-02-16 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2723 PC. Get pc from regcache_read_pc.
2724
2725 2016-02-12 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2728 or linux_get_pc_32bit.
2729 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2730
2731 2016-02-12 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2734 arm_linux_get_next_pcs_fixup.
2735
2736 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2737
2738 * tracepoint.c (x_tracepoint_action_download): Change
2739 write_inferior_data_ptr to write_inferior_data_pointer.
2740 (cmd_qtstart): Likewise.
2741 (write_inferior_data_ptr): Remove.
2742 (download_agent_expr): Change write_inferior_data_ptr to
2743 write_inferior_data_pointer.
2744 (download_tracepoint_1): Likewise.
2745 (download_tracepoint): Likewise.
2746 (download_trace_state_variables): Likewise.
2747
2748 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2749 Marcin Kościelnicki <koriakin@0x04.net>
2750
2751 * tracepoint.c (struct tracepoint_action_ops): Remove.
2752 (struct tracepoint_action): Remove ops.
2753 (m_tracepoint_action_download, r_tracepoint_action_download)
2754 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2755 size and offset accordingly.
2756 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2757 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2758 (tracepoint_action_send, tracepoint_action_download): New functions.
2759 Helpers for trace action handlers.
2760 (add_tracepoint_action): Remove setup actions ops.
2761 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2762
2763 2016-02-10 Yao Qi <yao.qi@linaro.org>
2764
2765 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2766
2767 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2768
2769 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2770 to AC_OUTPUT.
2771 * configure: Regenerate.
2772
2773 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2774
2775 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2776 void * to gdb_byte *.
2777 * linux-low.c (siginfo_fixup): Likewise.
2778 (linux_xfer_siginfo): Likewise.
2779 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2780 Likewise.
2781 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2782
2783 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2784
2785 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2786 to srv_tgtobj.
2787 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2788 to srv_tgtobj.
2789 * linux-x86-low.c [__x86_64__]: Include
2790 "nat/amd64-linux-siginfo.h".
2791 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2792 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2793 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2794 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2795 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2796 (cpt_si_fd, si_timerid, si_overrun): Move from
2797 nat/amd64-linux-siginfo.c.
2798 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2799
2800 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2801
2802 * server.c (skip_to_semicolon): Remove.
2803 (process_point_options): Use strchrnul instead of
2804 skip_to_semicolon.
2805
2806 2016-01-26 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2809 * linux-low.c (install_software_single_step_breakpoints): Don't
2810 call regcache_read_pc.
2811 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2812 argument pc.
2813
2814 2016-01-26 Yao Qi <yao.qi@linaro.org>
2815
2816 * linux-low.c (install_software_single_step_breakpoints): Call
2817 regcache_read_pc instead of get_pc.
2818
2819 2016-01-26 Yao Qi <yao.qi@linaro.org>
2820
2821 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2822 (unblock_async_io): Rename to ...
2823 (block_unblock_async_io): ... it. New function.
2824 (enable_async_io): Don't install SIGIO handler. Unblock it
2825 instead.
2826 (disable_async_io): Don't ignore SIGIO. Block it instead.
2827 (initialize_async_io): Install SIGIO handler. Don't call
2828 unblock_async_io.
2829
2830 2016-01-26 Yao Qi <yao.qi@linaro.org>
2831
2832 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2833 first character is '\003', call *the_target->request_interrupt.
2834
2835 2016-01-25 Yao Qi <yao.qi@linaro.org>
2836
2837 * remote-utils.c (new_thread_notify): Remove.
2838 (dead_thread_notify): Likewise.
2839 * remote-utils.h (new_thread_notify): Remove declaration.
2840 (dead_thread_notify): Likewise.
2841
2842 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2843
2844 * gdb.trace/pending.exp: Fix expected message on continue.
2845
2846 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2847
2848 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2849 it works properly on big-endian machines where sizeof (CORE_ADDR)
2850 != sizeof (void *).
2851
2852 2016-01-21 Pedro Alves <palves@redhat.com>
2853
2854 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2855 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2856 * configure: Regenerate.
2857
2858 2016-01-21 Yao Qi <yao.qi@linaro.org>
2859
2860 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2861 is_thumb and set it according to CPSR saved on the stack.
2862 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2863 arm_sigreturn_next_pc.
2864
2865 2016-01-18 Yao Qi <yao.qi@linaro.org>
2866
2867 * linux-low.c (linux_set_pc_64bit): New function.
2868 (linux_get_pc_64bit): New function.
2869 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2870 Declare.
2871 * linux-sparc-low.c (debug_threads): Remove declaration.
2872 (sparc_get_pc): Remove.
2873 (the_low_target): Use linux_get_pc_64bit instead of
2874 sparc_get_pc.
2875 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2876 (the_low_target): Use linux_get_pc_64bit and
2877 linux_set_pc_64bit.
2878
2879 2016-01-18 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-arm-low.c (debug_threads): Remove declaration.
2882 (arm_get_pc, arm_set_pc): Remove.
2883 (the_low_target): Use linux_get_pc_32bit and
2884 linux_set_pc_32bit.
2885 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2886 (the_low_target): Use linux_get_pc_32bit and
2887 linux_set_pc_32bit.
2888 * linux-cris-low.c (debug_threads): Remove declaration.
2889 (cris_get_pc, cris_set_pc,): Remove.
2890 (the_low_target): Use linux_get_pc_32bit and
2891 linux_set_pc_32bit.
2892 * linux-crisv32-low.c (debug_threads): Remove declaration.
2893 (cris_get_pc, cris_set_pc): Remove.
2894 (the_low_target): Use linux_get_pc_32bit and
2895 linux_set_pc_32bit.
2896 * linux-low.c: Include inttypes.h.
2897 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2898 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2899 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2900 (the_low_target): Use linux_get_pc_32bit and
2901 linux_set_pc_32bit.
2902 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2903 (the_low_target): Use linux_get_pc_32bit and
2904 linux_set_pc_32bit.
2905 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2906 (the_low_target): Use linux_get_pc_32bit and
2907 linux_set_pc_32bit.
2908 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2909 (the_low_target): Use linux_get_pc_32bit and
2910 linux_set_pc_32bit.
2911 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2912 (the_low_target): Use linux_get_pc_32bit and
2913 linux_set_pc_32bit.
2914
2915 2016-01-18 Gary Benson <gbenson@redhat.com>
2916
2917 * configure.ac (AC_FUNC_FORK): New check.
2918 * config.in: Regenerate.
2919 * configure: Likewise.
2920
2921 2016-01-14 Yao Qi <yao.qi@linaro.org>
2922
2923 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2924 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2925 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2926 arm_get_next_pcs_ctor.
2927
2928 2016-01-12 Josh Stone <jistone@redhat.com>
2929 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2930
2931 * inferiors.h: Include "gdb_vecs.h".
2932 (struct process_info): Add syscalls_to_catch.
2933 * inferiors.c (remove_process): Free syscalls_to_catch.
2934 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2935 syscall_return stops.
2936 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2937 * server.c (handle_general_set): Handle QCatchSyscalls.
2938 (handle_query): Report support for QCatchSyscalls.
2939 * target.h (struct target_ops): Add supports_catch_syscall.
2940 (target_supports_catch_syscall): New macro.
2941 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2942 (struct lwp_info): Add syscall_state.
2943 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2944 Maintain syscall_state and syscalls_to_catch across exec.
2945 (get_syscall_trapinfo): New function, proxy to the_low_target.
2946 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2947 (linux_low_filter_event): Toggle syscall_state entry/return for
2948 syscall traps, and set it ignored for all others.
2949 (gdb_catching_syscalls_p): New function.
2950 (gdb_catch_this_syscall_p): New function.
2951 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2952 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2953 (linux_supports_catch_syscall): New function.
2954 (linux_target_ops): Install it.
2955 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2956 (the_low_target): Install it.
2957
2958 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2959
2960 * acinclude.m4: Include new ../warning.m4 file.
2961 * configure: Regenerated.
2962 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2963
2964 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2965
2966 * ax.c (is_goto_target): Mark static.
2967 * linux-low.c (register_addr): Likewise.
2968 (linux_fetch_registers, linux_store_registers): Likewise.
2969 * mem-break.c (any_persistent_commands): Fix old prototype.
2970 (add_commands_to_breakpoint): Mark static.
2971 * regcache.c (find_register_by_name): Delete unused func.
2972 * remote-utils.c (hex_or_minus_one): Mark static.
2973 * server.c (monitor_show_help): Mark static.
2974 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2975 handle_v_requests): Likewise.
2976
2977 2016-01-12 Pedro Alves <palves@redhat.com>
2978
2979 Remove use of the registered trademark symbol throughout.
2980
2981 2016-01-08 Yao Qi <yao.qi@linaro.org>
2982
2983 * remote-utils.c (getpkt): If c is '\003', call target hook
2984 request_interrupt.
2985
2986 2016-01-06 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2989 linux-aarch32-low.c.
2990 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2991 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2992 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2993 (thumb2_breakpoint): Declare.
2994 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2995 linux-aarch32-low.h.
2996 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2997 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2998 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2999
3000 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3001
3002 * gdbreplay.c (gdbreplay_version): Change copyright year in
3003 version message.
3004 * server.c (gdbserver_version): Likewise.
3005
3006 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3007
3008 * server.c (crc32_table): Delete.
3009 (crc32): Use libiberty's xcrc32 function.
3010
3011 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3012
3013 * lynx-low.c (lynx_delete_thread_callback): New function.
3014 (lynx_mourn): Properly delete our process and all of its
3015 threads. Remove call to clear_inferiors.
3016
3017 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3018
3019 * target.c (thread_search_callback): Add check that
3020 the thread_stopped target callback is not NULL before
3021 calling it.
3022
3023 2015-12-21 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3026 arm breakpoint.
3027
3028 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3029
3030 * server.c (handle_query): Call target_supports_software_single_step.
3031
3032 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3033
3034 * linux-low.c (single_step): New function.
3035 (linux_resume_one_lwp_throw): Call single_step.
3036 (start_step_over): Likewise.
3037
3038 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3039
3040 * Makefile.in (SFILES): Append arch/arm-linux.c,
3041 arch/arm-get-next-pcs.c.
3042 (arm-linux.o): New rule.
3043 (arm-get-next-pcs.o): New rule.
3044 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3045 arm-linux.o.
3046 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3047 to linux-aarch32-low.c.
3048 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3049 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3050 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3051 (thumb2_breakpoint_len): Likewise.
3052 (arm_is_thumb_mode): Make non-static.
3053 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3054 from linux-aarch32-low.c.
3055 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3056 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3057 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3058 (thumb2_breakpoint_len): Likewise.
3059 (arm_is_thumb_mode): New declaration.
3060 * linux-arm-low.c: Include arch/arm-linux.h
3061 aarch/arm-get-next-pcs.h, sys/syscall.h.
3062 (get_next_pcs_ops): New struct.
3063 (get_next_pcs_addr_bits_remove): New function.
3064 (get_next_pcs_is_thumb): New function.
3065 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3066 (arm_sigreturn_next_pc): Likewise.
3067 (get_next_pcs_syscall_next_pc): Likewise.
3068 (arm_gdbserver_get_next_pcs): Likewise.
3069 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3070 Initialize.
3071 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3072 * server.h: Include gdb_vecs.h.
3073
3074 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3075
3076 * Makefile.in (SFILES): Append common/common-regcache.c.
3077 (OBS): Append common-regcache.o.
3078 (common-regcache.o): New rule.
3079 * regcache.c (init_register_cache): Initialize cache to
3080 REG_UNAVAILABLE.
3081 (regcache_raw_read_unsigned): New function.
3082 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3083 register_status enum.
3084
3085 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3086
3087 * linux-aarch64-low.c (the_low_targets): Rename
3088 breakpoint_reinsert_addr to get_next_pcs.
3089 * linux-arm-low.c (the_low_targets): Likewise.
3090 * linux-bfin-low.c (the_low_targets): Likewise.
3091 * linux-cris-low.c (the_low_targets): Likewise.
3092 * linux-crisv32-low.c (the_low_targets): Likewise.
3093 * linux-low.c (can_software_single_step): Likewise.
3094 (install_software_single_step_breakpoints): New function.
3095 (start_step_over): Use install_software_single_step_breakpoints.
3096 * linux-low.h: New CORE_ADDR vector.
3097 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3098 get_next_pcs.
3099 * linux-mips-low.c (the_low_targets): Likewise.
3100 * linux-nios2-low.c (the_low_targets): Likewise.
3101 * linux-sparc-low.c (the_low_targets): Likewise.
3102
3103 2015-12-17 Pedro Alves <palves@redhat.com>
3104
3105 * linux-low.c (linux_kill_one_lwp): Remove references to
3106 LinuxThreads.
3107 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3108 to 'kill'.
3109 (linux_init_signals): Delete.
3110 (initialize_low): Adjust.
3111 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3112
3113 2015-12-16 Pedro Alves <palves@redhat.com>
3114
3115 * configure.ac (compiler warning flags): When testing a
3116 -Wno-foo option, check whether -Wfoo works instead.
3117 * configure: Regenerate.
3118
3119 2015-12-11 Don Breazeal <donb@codesourcery.com>
3120
3121 * server.c (process_serial_event): Don't exit from gdbserver
3122 in remote mode if there are still active inferiors.
3123
3124 2015-12-11 Yao Qi <yao.qi@linaro.org>
3125
3126 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3127 arm_breakpoint_at if the process is 32-bit.
3128
3129 2015-12-11 Yao Qi <yao.qi@linaro.org>
3130
3131 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3132 arm breakpoint.
3133
3134 2015-12-07 Yao Qi <yao.qi@linaro.org>
3135
3136 * configure.srv: Append arm.o to srv_tgtobj for
3137 aarch64*-*-linux* target.
3138 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3139 from linux-arm-low.c.
3140 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3141 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3142 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3143 (thumb2_breakpoint_len): Likewise.
3144 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3145 (arm_breakpoint_kinds): Likewise.
3146 (arm_breakpoint_kind_from_pc): Likewise.
3147 (arm_sw_breakpoint_from_kind): Likewise.
3148 (arm_breakpoint_kind_from_current_state): Likewise.
3149 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3150 (arm_sw_breakpoint_from_kind): Declare.
3151 (arm_breakpoint_kind_from_current_state): Declare.
3152 (arm_breakpoint_at): Declare.
3153 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3154 arm_sw_breakpoint_from_kind if process is 32-bit.
3155 (aarch64_breakpoint_kind_from_pc): New function.
3156 (aarch64_breakpoint_kind_from_current_state): New function.
3157 (the_low_target): Initialize fields breakpoint_kind_from_pc
3158 and breakpoint_kind_from_current_state.
3159 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3160 linux-aarch32-low.c.
3161 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3162 (arm_breakpoint, arm_breakpoint_len): Likewise.
3163 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3164 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3165 (arm_is_thumb_mode): Likewise.
3166 (arm_breakpoint_at): Likewise.
3167 (arm_breakpoint_kind_from_pc): Likewise.
3168 (arm_sw_breakpoint_from_kind): Likewise.
3169 (arm_breakpoint_kind_from_current_state): Likewise.
3170
3171 Revert:
3172 2015-08-04 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3175 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3176 * server.c (extended_protocol): Remove "static".
3177 * server.h (extended_protocol): Declare it.
3178
3179 2015-12-04 Josh Stone <jistone@redhat.com>
3180
3181 * target.h (struct target_ops) <arch_setup>: Rename to ...
3182 (struct target_ops) <post_create_inferior>: ... this.
3183 (target_arch_setup): Rename to ...
3184 (target_post_create_inferior): ... this, calling post_create_inferior.
3185 * server.c (start_inferior): Update target_arch_setup calls to
3186 target_post_create_inferior.
3187 * linux-low.c (linux_low_ptrace_options): Forward declare.
3188 (linux_arch_setup): Update its comment for general use.
3189 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3190 (struct linux_target_ops): Use linux_post_create_inferior.
3191 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3192 to post_create_inferior.
3193 * nto-low.c (struct nto_target_ops): Likewise.
3194 * spu-low.c (struct spu_target_ops): Likewise.
3195 * win32-low.c (struct win32_target_ops): Likewise.
3196
3197 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3200
3201 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3202
3203 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3204 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3205 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3206 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3207 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3208 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3209 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3210 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3211 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3212 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3213 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3214 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3215
3216 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3217
3218 * linux-low.c (linux_look_up_symbols): Don't call
3219 linux_supports_traceclone.
3220 * linux-low.h (thread_db_init): Remove use_events argument.
3221 * thread-db.c (thread_db_use_event): Remove global variable.
3222 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3223 (struct thread_db) <td_create_bp>: Remove field.
3224 (thread_db_create_event): Remove function.
3225 (thread_db_enable_reporting): Likewise.
3226 (find_one_thread): Don't check for thread_db_use_events.
3227 (attach_thread): Likewise.
3228 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3229 (try_thread_db_load_1): Don't check for thread_db_use_events.
3230 (thread_db_init): Remove use_events argument and thread events
3231 handling.
3232 (remove_thread_event_breakpoints): Remove function.
3233 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3234
3235 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3236
3237 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3238 New function.
3239 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3240 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3242 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3243 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3244 Initialize.
3245 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3246 New function.
3247 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3248 * linux-low.c (can_hardware_single_step): Use
3249 supports_hardware_single_step.
3250 (can_software_single_step): New function.
3251 (start_step_over): Call can_software_single_step.
3252 (linux_supports_hardware_single_step): New function.
3253 (struct target_ops) <supports_software_single_step>: Initialize.
3254 * linux-low.h (struct linux_target_ops)
3255 <supports_hardware_single_step>: Initialize.
3256 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3257 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3258 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3259 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3260 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3261 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3262 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3263 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3264 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3265 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3266 Initialize.
3267 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3268 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3269 Initialize.
3270 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3271 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3272 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3273 New function.
3274 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3275 * target.h (struct target_ops): <supports_software_single_step>:
3276 New field.
3277 (target_supports_software_single_step): New macro.
3278
3279 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3280
3281 * linux-low.c (linux_wait_1): Fix pc advance condition.
3282 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3283 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3284
3285 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3286
3287 * linux-arm-low.c (arm_is_thumb_mode): New function.
3288 (arm_breakpoint_at): Use arm_is_thumb_mode.
3289 (arm_breakpoint_kind_from_current_state): New function.
3290 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3291 Initialize.
3292 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3293 (linux_breakpoint_kind_from_current_state): New function.
3294 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3295 * linux-low.h (struct linux_target_ops)
3296 <breakpoint_kind_from_current_state>: New field.
3297 * target.h (struct target_ops): Likewise.
3298 (target_breakpoint_kind_from_current_state): New macro.
3299
3300 2015-11-30 Pedro Alves <palves@redhat.com>
3301
3302 * linux-low.c (linux_resume): Wake up the event loop before
3303 returning.
3304
3305 2015-11-30 Pedro Alves <palves@redhat.com>
3306
3307 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3308 check.
3309 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3310 to -1.
3311 * target.c (struct thread_search): New structure.
3312 (thread_search_callback): New function.
3313 (prev_general_thread): New global.
3314 (prepare_to_access_memory, done_accessing_memory): New functions.
3315 * target.h (prepare_to_access_memory, done_accessing_memory):
3316 Replace macros with function declarations.
3317
3318 2015-11-30 Pedro Alves <palves@redhat.com>
3319
3320 PR 14618
3321 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3322 report TARGET_WAITKIND_NO_RESUMED.
3323 * remote-utils.c (prepare_resume_reply): Handle
3324 TARGET_WAITKIND_NO_RESUMED.
3325 * server.c (report_no_resumed): New global.
3326 (handle_query) <qSupported>: Handle "no-resumed+". Report
3327 "no-resumed+" support.
3328 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3329 return error if the client doesn't support no-resumed events.
3330 (push_stop_notification): New function.
3331 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3332 events if the client supports them.
3333
3334 2015-11-30 Pedro Alves <palves@redhat.com>
3335
3336 * linux-low.c (thread_still_has_status_pending_p): Don't check
3337 vCont;t here.
3338 (lwp_resumed): New function.
3339 (status_pending_p_callback): Return early if the LWP is not
3340 supposed to be resumed.
3341
3342 2015-11-30 Pedro Alves <palves@redhat.com>
3343
3344 * linux-low.c (handle_extended_wait): Assert that the LWP's
3345 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3346 thread create events, leave the new child's status pending.
3347 (linux_low_filter_event): If GDB wants to hear about thread exit
3348 events, leave the LWP marked dead and don't delete it.
3349 (linux_wait_for_event_filtered): Don't check for thread exit.
3350 (filter_exit_event): New function.
3351 (linux_wait_1): Use it, when returning an exit event.
3352 (linux_resume_one_lwp_throw): Assert that the LWP's
3353 waitstatus is TARGET_WAITKIND_IGNORE.
3354 * remote-utils.c (prepare_resume_reply): Handle
3355 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3356 * server.c (report_thread_events): New global.
3357 (handle_general_set): Handle QThreadEvents.
3358 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3359 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3360 TARGET_WAITKIND_THREAD_EXITED.
3361 * server.h (report_thread_events): Declare.
3362
3363 2015-11-30 Pedro Alves <palves@redhat.com>
3364
3365 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3366 the thread's last_resume_kind was resume_stop.
3367
3368 2015-11-30 Pedro Alves <palves@redhat.com>
3369
3370 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3371 before returning.
3372
3373 2015-11-30 Pedro Alves <palves@redhat.com>
3374
3375 * server.c (handle_v_requests): Handle vCtrlC.
3376
3377 2015-11-30 Pedro Alves <palves@redhat.com>
3378
3379 * gdbthread.h (find_any_thread_of_pid): Declare.
3380 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3381 functions.
3382 * server.c (handle_query): If current_thread is NULL, look for
3383 another thread of the selected process.
3384
3385 2015-11-26 Daniel Colascione <dancol@dancol.org>
3386 Simon Marchi <simon.marchi@ericsson.com>
3387
3388 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3389 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3390 name in reply.
3391 * target.h (struct target_ops) <thread_name>: New field.
3392 (target_thread_name): New macro.
3393
3394 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3395
3396 * regcache.h (regcache_invalidate_pid): Add declaration.
3397 * regcache.c (regcache_invalidate_pid): New function, extracted
3398 from regcache_invalidate.
3399 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3400 Add trivial documentation comment.
3401 * lynx-low.c: Use regcache_invalidate_pid instead of
3402 regcache_invalidate.
3403
3404 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3405
3406 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3407 and Elf64_auxv_t if the target is Android.
3408
3409 2015-11-22 Doug Evans <xdje42@gmail.com>
3410
3411 * target.h: #include <sys/types.h>.
3412
3413 2015-11-19 Pedro Alves <palves@redhat.com>
3414
3415 * linux-low.c (linux_process_qsupported): Change prototype.
3416 Adjust.
3417 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3418 Change prototype.
3419 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3420 and adjust to loop over all features.
3421 * server.c (handle_query) <qSupported>: Adjust to call
3422 target_process_qsupported once, passing it a vector of unprocessed
3423 features.
3424 * target.h (struct target_ops) <process_qsupported>: Change
3425 prototype.
3426 (target_process_qsupported): Adjust.
3427
3428 2015-11-19 Pedro Alves <palves@redhat.com>
3429
3430 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3431 mode.
3432 * configure: Regenerate.
3433
3434 2015-11-19 Pedro Alves <palves@redhat.com>
3435
3436 * configure: Regenerate.
3437
3438 2015-11-19 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3441 type to uint32_t.
3442
3443 2015-11-19 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3446 (struct aarch64_operand): Move enum out.
3447
3448 2015-11-19 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3451 struct user_fpsimd_state *.
3452 (aarch64_store_fpregset): Likewise.
3453
3454 2015-11-19 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3457 struct user_pt_regs *.
3458 (aarch64_store_gregset): Likewise.
3459
3460 2015-11-18 Pedro Alves <palves@redhat.com>
3461
3462 * Makefile.in (all_object_files): Add $IPA_OBJS.
3463
3464 2015-11-17 Pedro Alves <palves@redhat.com>
3465
3466 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3467 GDB_SIGNAL_0 and gdb_signal_to_string.
3468
3469 2015-11-17 Pedro Alves <palves@redhat.com>
3470
3471 * win32-low.c (handle_output_debug_string): Remove parameter.
3472 (win32_kill): Remove our_status local and adjust call to
3473 handle_output_debug_string.
3474 (get_child_debug_event): Adjust call to
3475 handle_output_debug_string.
3476
3477 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3478
3479 * linux-mips-low.c (mips_fill_gregset): Add cast.
3480 (mips_store_gregset): Likewise.
3481 (mips_fill_fpregset): Likewise.
3482 (mips_store_fpregset): Likewise.
3483
3484 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3485
3486 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3487 priv.
3488
3489 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * linux-mips-low.c (mips_linux_new_thread): Change type of
3492 watch_type to enum target_hw_bp_type.
3493
3494 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3495
3496 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3497 Change return type to arm_hwbp_type.
3498
3499 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3500
3501 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3502 (arm_store_gregset): Likewise.
3503 * linux-arm-low.c (arm_get_hwcap): Likewise.
3504 (arm_read_description): Likewise.
3505
3506 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3507
3508 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3509
3510 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3511
3512 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3513 (ppc_fill_vsxregset): Likewise.
3514 (ppc_store_vsxregset): Likewise.
3515 (ppc_fill_vrregset): Likewise.
3516 (ppc_store_vrregset): Likewise.
3517 (ppc_fill_evrregset): Likewise.
3518 (ppc_store_evrregset): Likewise.
3519
3520 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3521
3522 * linux-ppc-low.c (ppc_usrregs_info): Remove
3523 forward-declaration.
3524 (ppc_arch_setup): Move lower in file.
3525
3526 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3527
3528 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3529 (ps_pdwrite): Likewise.
3530
3531 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3532
3533 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3534 to after assert checks.
3535
3536 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * proc-service.c (ps_pdread): Add/adjust casts.
3539 (ps_pdwrite): Add/adjust casts.
3540
3541 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3542
3543 * server.c (handle_search_memory_1): Cast return value of
3544 memmem.
3545
3546 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3547
3548 * server.c (write_qxfer_response): Change type of data to
3549 gdb_byte *.
3550
3551 2015-10-29 Pedro Alves <palves@redhat.com>
3552
3553 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3554
3555 2015-10-29 Pedro Alves <palves@redhat.com>
3556
3557 * tracepoint.c (clear_installed_tracepoints): Add casts.
3558
3559 2015-10-29 Pedro Alves <palves@redhat.com>
3560
3561 * server.c (handle_v_cont, process_serial_event): Add enum
3562 gdb_signal casts to signal parsing code.
3563
3564 2015-10-29 Pedro Alves <palves@redhat.com>
3565
3566 * linux-low.h (NULL_REGSET): Define.
3567 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3568 * linux-arm-low.c (arm_regsets): Likewise.
3569 * linux-crisv32-low.c (cris_regsets): Likewise.
3570 * linux-m68k-low.c (m68k_regsets): Likewise.
3571 * linux-mips-low.c (mips_regsets): Likewise.
3572 * linux-nios2-low.c (nios2_regsets): Likewise.
3573 * linux-ppc-low.c (ppc_regsets): Likewise.
3574 * linux-s390-low.c (s390_regsets): Likewise.
3575 * linux-sh-low.c (sh_regsets): Likewise.
3576 * linux-sparc-low.c (sparc_regsets): Likewise.
3577 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3578 * linux-tile-low.c (tile_regsets): Likewise.
3579 * linux-x86-low.c (x86_regsets): Likewise.
3580 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3581
3582 2015-10-29 Pedro Alves <palves@redhat.com>
3583
3584 * linux-low.h (NULL_REGSET): Define.
3585 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3586 * linux-arm-low.c (arm_regsets): Likewise.
3587 * linux-crisv32-low.c (cris_regsets): Likewise.
3588 * linux-m68k-low.c (m68k_regsets): Likewise.
3589 * linux-mips-low.c (mips_regsets): Likewise.
3590 * linux-nios2-low.c (nios2_regsets): Likewise.
3591 * linux-ppc-low.c (ppc_regsets): Likewise.
3592 * linux-s390-low.c (s390_regsets): Likewise.
3593 * linux-sh-low.c (sh_regsets): Likewise.
3594 * linux-sparc-low.c (sparc_regsets): Likewise.
3595 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3596 * linux-tile-low.c (tile_regsets): Likewise.
3597 * linux-x86-low.c (x86_regsets): Likewise.
3598 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3599
3600 2015-10-26 Doug Evans <dje@google.com>
3601
3602 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3603
3604 2015-10-26 Doug Evans <dje@google.com>
3605
3606 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3607
3608 2015-10-26 Doug Evans <dje@google.com>
3609
3610 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3611 for debug_printf.
3612 (attach_thread, find_new_threads_callback): Ditto.
3613
3614 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615
3616 * mem-break.h (set_breakpoint_data): Remove.
3617
3618 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3619
3620 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3621 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3622 (initialize_low): Remove set_breakpoint_data call.
3623 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3624 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3625 (initialize_low): Remove set_breakpoint_data call.
3626 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3627 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3628 (initialize_low): Remove set_breakpoint_data call.
3629
3630 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3631
3632 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3633 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3634 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3635 * target.h (target_breakpoint_kind_from_pc): New macro.
3636
3637 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3638
3639 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3640 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3641 the default breakpoint kind.
3642
3643 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3644
3645 * linux-arm-low.c (arm_supports_z_point_type): Add software
3646 breakpoint support.
3647
3648 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3649
3650 * linux-arm-low.c: Refactor breakpoint definitions.
3651 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3652 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3653
3654 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3655
3656 * Makefile.in: Add arm.c/o.
3657 * configure.srv: Likewise.
3658 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3659 (arm_breakpoint_kind_from_pc): New function.
3660 (arm_sw_breakpoint_from_kind): Return proper kind.
3661 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3662
3663 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3664
3665 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3666 removal.
3667 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3668 (struct raw_breakpoint) <size>: Remove.
3669 (struct raw_breakpoint) <kind>: Add.
3670 (bp_size): New function.
3671 (bp_opcode): Likewise.
3672 (find_raw_breakpoint_at): Adjust for kind.
3673 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3674 (remove_memory_breakpoint): Adjust for kind call bp_size.
3675 (set_raw_breakpoint_at): Adjust for kind.
3676 (set_breakpoint): Likewise.
3677 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3678 (delete_raw_breakpoint): Adjust for kind.
3679 (delete_breakpoint): Likewise.
3680 (find_gdb_breakpoint): Likewise.
3681 (set_gdb_breakpoint_1): Likewise.
3682 (set_gdb_breakpoint): Likewise.
3683 (delete_gdb_breakpoint_1): Likewise.
3684 (delete_gdb_breakpoint): Likewise.
3685 (uninsert_raw_breakpoint): Likewise.
3686 (reinsert_raw_breakpoint): Likewise.
3687 (set_breakpoint_data): Remove.
3688 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3689 (check_mem_read): Adjust for kind call bp_size.
3690 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3691 (clone_one_breakpoint): Adjust for kind.
3692 * mem-break.h (set_gdb_breakpoint): Likewise.
3693 (delete_gdb_breakpoint): Likewise.
3694 * server.c (process_serial_event): Likewise.
3695
3696 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3697
3698 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3699 (struct linux_target_ops) <breakpoint>: Remove.
3700 (struct linux_target_ops) <breakpoint_len>: Remove.
3701 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3702 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3703 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3704 (arm_sw_breakpoint_from_kind): New function.
3705 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3706 (struct linux_target_ops) <breakpoint>: Remove.
3707 (struct linux_target_ops) <breakpoint_len>: Remove.
3708 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3710 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3711 (struct linux_target_ops) <breakpoint>: Remove.
3712 (struct linux_target_ops) <breakpoint_len>: Remove.
3713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3715 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3716 (struct linux_target_ops) <breakpoint>: Remove.
3717 (struct linux_target_ops) <breakpoint_len>: Remove.
3718 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3719 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3720 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3721 and sw_breakpoint_from_kind to increment the pc.
3722 (linux_breakpoint_kind_from_pc): New function.
3723 (linux_sw_breakpoint_from_kind): New function.
3724 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3725 (initialize_low): Call breakpoint_kind_from_pc and
3726 sw_breakpoint_from_kind to replace breakpoint_data/len.
3727 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3728 New field.
3729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3730 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3731 (struct linux_target_ops) <breakpoint>: Remove.
3732 (struct linux_target_ops) <breakpoint_len>: Remove.
3733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3735 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3736 (struct linux_target_ops) <breakpoint>: Remove.
3737 (struct linux_target_ops) <breakpoint_len>: Remove.
3738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3740 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3741 (struct linux_target_ops) <breakpoint>: Remove.
3742 (struct linux_target_ops) <breakpoint_len>: Remove.
3743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3745 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3746 (struct linux_target_ops) <breakpoint>: Remove.
3747 (struct linux_target_ops) <breakpoint_len>: Remove.
3748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3750 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3751 (struct linux_target_ops) <breakpoint>: Remove.
3752 (struct linux_target_ops) <breakpoint_len>: Remove.
3753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3755 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3756 (struct linux_target_ops) <breakpoint>: Remove.
3757 (struct linux_target_ops) <breakpoint_len>: Remove.
3758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3760 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3761 (struct linux_target_ops) <breakpoint>: Remove.
3762 (struct linux_target_ops) <breakpoint_len>: Remove.
3763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3765 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3766 (struct linux_target_ops) <breakpoint>: Remove.
3767 (struct linux_target_ops) <breakpoint_len>: Remove.
3768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3770 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3771 (struct linux_target_ops) <breakpoint>: Remove.
3772 (struct linux_target_ops) <breakpoint_len>: Remove.
3773 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3774 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3775 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3776 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3777 (struct linux_target_ops) <breakpoint>: Remove.
3778 (struct linux_target_ops) <breakpoint_len>: Remove.
3779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3781 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3782 (struct linux_target_ops) <breakpoint>: Remove.
3783 (struct linux_target_ops) <breakpoint_len>: Remove.
3784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3785 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3786
3787 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3788
3789 * linux-cris-low.c (cris_get_pc): Remove void arg.
3790
3791 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3792
3793 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3794 variable name.
3795
3796 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3797
3798 * inferiors.c (thread_pid_matches_callback): New function.
3799 (find_thread_process): New function.
3800 (remove_thread): Reset current_thread.
3801 (remove_process): Assert threads have been removed first.
3802
3803 2015-10-15 Yao Qi <yao.qi@linaro.org>
3804
3805 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3806 if it is 3.
3807 (aarch64_remove_point): Likewise.
3808 * regcache.c (regcache_register_size): New function.
3809
3810 2015-10-12 Yao Qi <yao.qi@linaro.org>
3811
3812 * linux-aarch64-low.c: Update all callers as emit_load_store
3813 is renamed to aarch64_emit_load_store.
3814
3815 2015-10-12 Yao Qi <yao.qi@linaro.org>
3816
3817 * linux-aarch64-low.c: Update all callers of function renaming
3818 from emit_insn to aarch64_emit_insn.
3819
3820 2015-10-12 Yao Qi <yao.qi@linaro.org>
3821
3822 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3823 arch/aarch64-insn.h.
3824 (struct aarch64_memory_operand): Likewise.
3825 (ENCODE): Likewise.
3826 (emit_insn): Move to arch/aarch64-insn.c.
3827 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3828 (emit_load_store): Move to arch/aarch64-insn.c.
3829 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3830 (can_encode_int32): Remove.
3831
3832 2015-10-12 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3835 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3836 (aarch64_relocate_instruction): Likewise.
3837 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3838 (struct aarch64_insn_visitor): Likewise.
3839
3840 2015-10-12 Yao Qi <yao.qi@linaro.org>
3841
3842 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3843 (struct aarch64_insn_visitor): New.
3844 (struct aarch64_insn_relocation_data): New.
3845 (aarch64_ftrace_insn_reloc_b): New function.
3846 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3847 (aarch64_ftrace_insn_reloc_cb): Likewise.
3848 (aarch64_ftrace_insn_reloc_tb): Likewise.
3849 (aarch64_ftrace_insn_reloc_adr): Likewise.
3850 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3851 (aarch64_ftrace_insn_reloc_others): Likewise.
3852 (visitor): New.
3853 (aarch64_relocate_instruction): Use visitor.
3854
3855 2015-10-12 Yao Qi <yao.qi@linaro.org>
3856
3857 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3858 int. Add argument buf.
3859 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3860 aarch64_relocate_instruction.
3861
3862 2015-10-12 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3865 argument insn. Remove local variable insn. Don't call
3866 target_read_uint32.
3867 (aarch64_install_fast_tracepoint_jump_pad): Call
3868 target_read_uint32.
3869
3870 2015-09-30 Yao Qi <yao.qi@linaro.org>
3871
3872 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3873 (emit_load_store_pair): Likewise.
3874
3875 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * dll.c (match_dll): Add cast(s).
3878 (unloaded_dll): Likewise.
3879 * linux-low.c (second_thread_of_pid_p): Likewise.
3880 (delete_lwp_callback): Likewise.
3881 (count_events_callback): Likewise.
3882 (select_event_lwp_callback): Likewise.
3883 (linux_set_resume_request): Likewise.
3884 * server.c (accumulate_file_name_length): Likewise.
3885 (emit_dll_description): Likewise.
3886 (handle_qxfer_threads_worker): Likewise.
3887 (visit_actioned_threads): Likewise.
3888 * thread-db.c (any_thread_of): Likewise.
3889 * tracepoint.c (same_process_p): Likewise.
3890 (match_blocktype): Likewise.
3891 (build_traceframe_info_xml): Likewise.
3892
3893 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3894
3895 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3896 assignment.
3897 (gdb_unparse_agent_expr): Likewise.
3898 * hostio.c (require_data): Likewise.
3899 (handle_pread): Likewise.
3900 * linux-low.c (disable_regset): Likewise.
3901 (fetch_register): Likewise.
3902 (store_register): Likewise.
3903 (get_dynamic): Likewise.
3904 (linux_qxfer_libraries_svr4): Likewise.
3905 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3906 (set_fast_tracepoint_jump): Likewise.
3907 (uninsert_fast_tracepoint_jumps_at): Likewise.
3908 (reinsert_fast_tracepoint_jumps_at): Likewise.
3909 (validate_inserted_breakpoint): Likewise.
3910 (clone_agent_expr): Likewise.
3911 * regcache.c (init_register_cache): Likewise.
3912 * remote-utils.c (putpkt_binary_1): Likewise.
3913 (decode_M_packet): Likewise.
3914 (decode_X_packet): Likewise.
3915 (look_up_one_symbol): Likewise.
3916 (relocate_instruction): Likewise.
3917 (monitor_output): Likewise.
3918 * server.c (handle_search_memory): Likewise.
3919 (handle_qxfer_exec_file): Likewise.
3920 (handle_qxfer_libraries): Likewise.
3921 (handle_qxfer): Likewise.
3922 (handle_query): Likewise.
3923 (handle_v_cont): Likewise.
3924 (handle_v_run): Likewise.
3925 (captured_main): Likewise.
3926 * target.c (write_inferior_memory): Likewise.
3927 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3928 * tracepoint.c (init_trace_buffer): Likewise.
3929 (add_tracepoint_action): Likewise.
3930 (add_traceframe): Likewise.
3931 (add_traceframe_block): Likewise.
3932 (cmd_qtdpsrc): Likewise.
3933 (cmd_qtdv): Likewise.
3934 (cmd_qtstatus): Likewise.
3935 (response_source): Likewise.
3936 (response_tsv): Likewise.
3937 (cmd_qtnotes): Likewise.
3938 (gdb_collect): Likewise.
3939 (initialize_tracepoint): Likewise.
3940
3941 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3942
3943 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3944 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3945 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3946 <NOP>: New.
3947 (enum aarch64_condition_codes): New enum.
3948 (w0): New static global.
3949 (fp): Likewise.
3950 (lr): Likewise.
3951 (struct aarch64_memory_operand) <type>: New
3952 MEMORY_OPERAND_POSTINDEX type.
3953 (postindex_memory_operand): New helper function.
3954 (emit_ret): New function.
3955 (emit_load_store_pair): New function, factored out of emit_stp
3956 with support for MEMORY_OPERAND_POSTINDEX.
3957 (emit_stp): Rewrite using emit_load_store_pair.
3958 (emit_ldp): New function.
3959 (emit_load_store): Likewise.
3960 (emit_ldr): Mention post-index instruction in comment.
3961 (emit_ldrh): New function.
3962 (emit_ldrb): New function.
3963 (emit_ldrsw): Mention post-index instruction in comment.
3964 (emit_str): Likewise.
3965 (emit_subs): New function.
3966 (emit_cmp): Likewise.
3967 (emit_and): Likewise.
3968 (emit_orr): Likewise.
3969 (emit_orn): Likewise.
3970 (emit_eor): Likewise.
3971 (emit_mvn): Likewise.
3972 (emit_lslv): Likewise.
3973 (emit_lsrv): Likewise.
3974 (emit_asrv): Likewise.
3975 (emit_mul): Likewise.
3976 (emit_sbfm): Likewise.
3977 (emit_sbfx): Likewise.
3978 (emit_ubfm): Likewise.
3979 (emit_ubfx): Likewise.
3980 (emit_csinc): Likewise.
3981 (emit_cset): Likewise.
3982 (emit_nop): Likewise.
3983 (emit_ops_insns): New helper function.
3984 (emit_pop): Likewise.
3985 (emit_push): Likewise.
3986 (aarch64_emit_prologue): New function.
3987 (aarch64_emit_epilogue): Likewise.
3988 (aarch64_emit_add): Likewise.
3989 (aarch64_emit_sub): Likewise.
3990 (aarch64_emit_mul): Likewise.
3991 (aarch64_emit_lsh): Likewise.
3992 (aarch64_emit_rsh_signed): Likewise.
3993 (aarch64_emit_rsh_unsigned): Likewise.
3994 (aarch64_emit_ext): Likewise.
3995 (aarch64_emit_log_not): Likewise.
3996 (aarch64_emit_bit_and): Likewise.
3997 (aarch64_emit_bit_or): Likewise.
3998 (aarch64_emit_bit_xor): Likewise.
3999 (aarch64_emit_bit_not): Likewise.
4000 (aarch64_emit_equal): Likewise.
4001 (aarch64_emit_less_signed): Likewise.
4002 (aarch64_emit_less_unsigned): Likewise.
4003 (aarch64_emit_ref): Likewise.
4004 (aarch64_emit_if_goto): Likewise.
4005 (aarch64_emit_goto): Likewise.
4006 (aarch64_write_goto_address): Likewise.
4007 (aarch64_emit_const): Likewise.
4008 (aarch64_emit_call): Likewise.
4009 (aarch64_emit_reg): Likewise.
4010 (aarch64_emit_pop): Likewise.
4011 (aarch64_emit_stack_flush): Likewise.
4012 (aarch64_emit_zero_ext): Likewise.
4013 (aarch64_emit_swap): Likewise.
4014 (aarch64_emit_stack_adjust): Likewise.
4015 (aarch64_emit_int_call_1): Likewise.
4016 (aarch64_emit_void_call_2): Likewise.
4017 (aarch64_emit_eq_goto): Likewise.
4018 (aarch64_emit_ne_goto): Likewise.
4019 (aarch64_emit_lt_goto): Likewise.
4020 (aarch64_emit_le_goto): Likewise.
4021 (aarch64_emit_gt_goto): Likewise.
4022 (aarch64_emit_ge_got): Likewise.
4023 (aarch64_emit_ops_impl): New static global variable.
4024 (aarch64_emit_ops): New target function, return
4025 &aarch64_emit_ops_impl.
4026 (struct linux_target_ops): Install it.
4027
4028 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4029
4030 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4031 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4032 aarch64-ipa.o.
4033 * linux-aarch64-ipa.c: New file.
4034 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4035 and endian.h.
4036 (aarch64_get_thread_area): New target method.
4037 (extract_signed_bitfield): New helper function.
4038 (aarch64_decode_ldr_literal): New function.
4039 (enum aarch64_opcodes): New enum.
4040 (struct aarch64_register): New struct.
4041 (struct aarch64_operand): New struct.
4042 (x0): New static global.
4043 (x1): Likewise.
4044 (x2): Likewise.
4045 (x3): Likewise.
4046 (x4): Likewise.
4047 (w2): Likewise.
4048 (ip0): Likewise.
4049 (sp): Likewise.
4050 (xzr): Likewise.
4051 (aarch64_register): New helper function.
4052 (register_operand): Likewise.
4053 (immediate_operand): Likewise.
4054 (struct aarch64_memory_operand): New struct.
4055 (offset_memory_operand): New helper function.
4056 (preindex_memory_operand): Likewise.
4057 (enum aarch64_system_control_registers): New enum.
4058 (ENCODE): New macro.
4059 (emit_insn): New helper function.
4060 (emit_b): New function.
4061 (emit_bcond): Likewise.
4062 (emit_cb): Likewise.
4063 (emit_tb): Likewise.
4064 (emit_blr): Likewise.
4065 (emit_stp): Likewise.
4066 (emit_ldp_q_offset): Likewise.
4067 (emit_stp_q_offset): Likewise.
4068 (emit_load_store): Likewise.
4069 (emit_ldr): Likewise.
4070 (emit_ldrsw): Likewise.
4071 (emit_str): Likewise.
4072 (emit_ldaxr): Likewise.
4073 (emit_stxr): Likewise.
4074 (emit_stlr): Likewise.
4075 (emit_data_processing_reg): Likewise.
4076 (emit_data_processing): Likewise.
4077 (emit_add): Likewise.
4078 (emit_sub): Likewise.
4079 (emit_mov): Likewise.
4080 (emit_movk): Likewise.
4081 (emit_mov_addr): Likewise.
4082 (emit_mrs): Likewise.
4083 (emit_msr): Likewise.
4084 (emit_sevl): Likewise.
4085 (emit_wfe): Likewise.
4086 (append_insns): Likewise.
4087 (can_encode_int32_in): New helper function.
4088 (aarch64_relocate_instruction): New function.
4089 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4090 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4091 (struct linux_target_ops): Install aarch64_get_thread_area,
4092 aarch64_install_fast_tracepoint_jump_pad and
4093 aarch64_get_min_fast_tracepoint_insn_len.
4094
4095 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4096
4097 * Makefile.in (aarch64-insn.o): New rule.
4098 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4099
4100 2015-09-21 Yao Qi <yao.qi@linaro.org>
4101
4102 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4103
4104 2015-09-21 Yao Qi <yao.qi@linaro.org>
4105
4106 * tracepoint.c (max_jump_pad_size): Remove.
4107
4108 2015-09-18 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch64-low.c: Don't include sys/uio.h.
4111 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4112
4113 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4114
4115 * tracepoint.c (eval_result_type): Change prototype.
4116 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4117
4118 2015-09-15 Pedro Alves <palves@redhat.com>
4119
4120 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4121 Check whether to report exec events instead of checking whether
4122 multiprocess is enabled.
4123
4124 2015-09-15 Pedro Alves <palves@redhat.com>
4125
4126 PR remote/18965
4127 * remote-utils.c (prepare_resume_reply): Merge
4128 TARGET_WAITKIND_VFORK_DONE switch case with the
4129 TARGET_WAITKIND_FORKED case.
4130
4131 2015-09-15 Yao Qi <yao.qi@linaro.org>
4132
4133 * server.c (handle_query): Check string comparison using
4134 "else if" instead of "if".
4135
4136 2015-09-15 Yao Qi <yao.qi@linaro.org>
4137
4138 * server.c (vCont_supported): New global variable.
4139 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4140 matches. Append ";vContSupported+" to own_buf.
4141 (handle_v_requests): Append ";s;S" to own_buf if target supports
4142 hardware single step or vCont_supported is false.
4143 (capture_main): Set vCont_supported to zero.
4144
4145 2015-09-15 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4148 it to ...
4149 (linux_supports_hardware_single_step): ... New function.
4150 (linux_target_ops): Update.
4151 * lynx-low.c (lynx_target_ops): Set field
4152 supports_hardware_single_step to target_can_do_hardware_single_step.
4153 * nto-low.c (nto_target_ops): Likewise.
4154 * spu-low.c (spu_target_ops): Likewise.
4155 * win32-low.c (win32_target_ops): Likewise.
4156 * target.c (target_can_do_hardware_single_step): New function.
4157 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4158 Remove. <supports_hardware_single_step>: New field.
4159 (target_supports_conditional_breakpoints): Remove.
4160 (target_supports_hardware_single_step): New macro.
4161 (target_can_do_hardware_single_step): Declare.
4162 * server.c (handle_query): Use target_supports_hardware_single_step
4163 instead of target_supports_conditional_breakpoints.
4164
4165 2015-09-15 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4168 function.
4169 (struct linux_target_ops the_low_target): Install
4170 aarch64_linux_siginfo_fixup.
4171
4172 2015-09-11 Don Breazeal <donb@codesourcery.com>
4173 Luis Machado <lgustavo@codesourcery.com>
4174
4175 * linux-low.c (linux_mourn): Static declaration.
4176 (linux_arch_setup): Move in front of
4177 handle_extended_wait.
4178 (linux_arch_setup_thread): New function.
4179 (handle_extended_wait): Handle exec events. Call
4180 linux_arch_setup_thread. Make event_lwp argument a
4181 pointer-to-a-pointer.
4182 (check_zombie_leaders): Do not check stopped threads.
4183 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4184 (linux_low_filter_event): Add lwp and thread for exec'ing
4185 non-leader thread if leader thread has been deleted.
4186 Refactor code into linux_arch_setup_thread and call it.
4187 Pass child lwp pointer by reference to handle_extended_wait.
4188 (linux_wait_for_event_filtered): Update comment.
4189 (linux_wait_1): Prevent clobbering exec event status.
4190 (linux_supports_exec_events): New function.
4191 (linux_target_ops) <supports_exec_events>: Initialize new member.
4192 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4193 new member.
4194 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4195 * server.c (report_exec_events): New global variable.
4196 (handle_query): Handle qSupported query for exec-events feature.
4197 (captured_main): Initialize report_exec_events.
4198 * server.h (report_exec_events): Declare new global variable.
4199 * target.h (struct target_ops) <supports_exec_events>: New
4200 member.
4201 (target_supports_exec_events): New macro.
4202 * win32-low.c (win32_target_ops) <supports_exec_events>:
4203 Initialize new member.
4204
4205 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4206
4207 * linux-low.c (linux_low_enable_btrace): Remove.
4208 (linux_target_ops): Replace linux_low_enable_btrace with
4209 linux_enable_btrace.
4210
4211 2015-09-03 Yao Qi <yao.qi@linaro.org>
4212
4213 * linux-aarch64-low.c (aarch64_insert_point): Call
4214 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4215 returns true.
4216
4217 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4218
4219 * linux-low.c (check_stopped_by_breakpoint): Use
4220 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4221
4222 2015-08-27 Pedro Alves <palves@redhat.com>
4223
4224 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4225
4226 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4227
4228 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4229 the XNEW-family equivalent.
4230 (compile_bytecodes): Likewise.
4231 * dll.c (loaded_dll): Likewise.
4232 * event-loop.c (append_callback_event): Likewise.
4233 (create_file_handler): Likewise.
4234 (create_file_event): Likewise.
4235 * hostio.c (handle_open): Likewise.
4236 * inferiors.c (add_thread): Likewise.
4237 (add_process): Likewise.
4238 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4239 * linux-arm-low.c (arm_new_process): Likewise.
4240 (arm_new_thread): Likewise.
4241 * linux-low.c (add_to_pid_list): Likewise.
4242 (linux_add_process): Likewise.
4243 (handle_extended_wait): Likewise.
4244 (add_lwp): Likewise.
4245 (enqueue_one_deferred_signal): Likewise.
4246 (enqueue_pending_signal): Likewise.
4247 (linux_resume_one_lwp_throw): Likewise.
4248 (linux_resume_one_thread): Likewise.
4249 (linux_read_memory): Likewise.
4250 (linux_write_memory): Likewise.
4251 * linux-mips-low.c (mips_linux_new_process): Likewise.
4252 (mips_linux_new_thread): Likewise.
4253 (mips_add_watchpoint): Likewise.
4254 * linux-x86-low.c (initialize_low_arch): Likewise.
4255 * lynx-low.c (lynx_add_process): Likewise.
4256 * mem-break.c (set_raw_breakpoint_at): Likewise.
4257 (set_breakpoint): Likewise.
4258 (add_condition_to_breakpoint): Likewise.
4259 (add_commands_to_breakpoint): Likewise.
4260 (clone_agent_expr): Likewise.
4261 (clone_one_breakpoint): Likewise.
4262 * regcache.c (new_register_cache): Likewise.
4263 * remote-utils.c (look_up_one_symbol): Likewise.
4264 * server.c (queue_stop_reply): Likewise.
4265 (start_inferior): Likewise.
4266 (queue_stop_reply_callback): Likewise.
4267 (handle_target_event): Likewise.
4268 * spu-low.c (fetch_ppc_memory): Likewise.
4269 (store_ppc_memory): Likewise.
4270 * target.c (set_target_ops): Likewise.
4271 * thread-db.c (thread_db_load_search): Likewise.
4272 (try_thread_db_load_1): Likewise.
4273 * tracepoint.c (add_tracepoint): Likewise.
4274 (add_tracepoint_action): Likewise.
4275 (create_trace_state_variable): Likewise.
4276 (cmd_qtdpsrc): Likewise.
4277 (cmd_qtro): Likewise.
4278 (add_while_stepping_state): Likewise.
4279 * win32-low.c (child_add_thread): Likewise.
4280 (get_image_name): Likewise.
4281
4282 2015-08-25 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4285
4286 2015-08-25 Yao Qi <yao.qi@linaro.org>
4287
4288 * Makefile.in (aarch64-linux.o): New rule.
4289 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4290 srv_tgtobj.
4291 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4292 (aarch64_init_debug_reg_state): Make it extern.
4293 (aarch64_linux_prepare_to_resume): Remove.
4294
4295 2015-08-25 Yao Qi <yao.qi@linaro.org>
4296
4297 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4298 lwp_arch_private_info and ptid_of_lwp.
4299
4300 2015-08-25 Yao Qi <yao.qi@linaro.org>
4301
4302 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4303 Find proc_info by find_process_pid. All callers updated.
4304
4305 2015-08-25 Yao Qi <yao.qi@linaro.org>
4306
4307 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4308 Remove.
4309 (debug_reg_change_callback): Remove.
4310 (aarch64_notify_debug_reg_change): Remove.
4311
4312 2015-08-25 Yao Qi <yao.qi@linaro.org>
4313
4314 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4315 Call current_lwp_ptid.
4316
4317 2015-08-25 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch64-low.c (debug_reg_change_callback): Use
4320 debug_printf.
4321
4322 2015-08-25 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4325
4326 2015-08-25 Yao Qi <yao.qi@linaro.org>
4327
4328 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4329
4330 2015-08-25 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4333 the code.
4334
4335 2015-08-25 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4338 Remove.
4339 (debug_reg_change_callback): Remove argument entry and add argument
4340 lwp. Remove local variable thread. Don't print thread id in the
4341 debugging output. Don't check whether pid of thread equals to pid.
4342 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4343 iterate_over_lwps instead find_inferior.
4344
4345 2015-08-24 Pedro Alves <palves@redhat.com>
4346
4347 * inferiors.c (get_first_process): New function.
4348 * inferiors.h (get_first_process): New declaration.
4349 * remote-utils.c (read_ptid): Default to the first process in the
4350 list, instead of to the current thread's process.
4351
4352 2015-08-24 Pedro Alves <palves@redhat.com>
4353
4354 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4355 * event-loop.c: Likewise.
4356 * remote-utils.c: Likewise.
4357 * tracepoint.c: Likewise.
4358
4359 2015-08-24 Pedro Alves <palves@redhat.com>
4360
4361 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4362 ptid_get_lwp.
4363
4364 2015-08-21 Pedro Alves <palves@redhat.com>
4365
4366 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4367 instead of literal 1.
4368
4369 2015-08-21 Pedro Alves <palves@redhat.com>
4370
4371 * tdesc.c (default_description): Explicitly zero-initialize.
4372
4373 2015-08-21 Pedro Alves <palves@redhat.com>
4374
4375 PR gdb/18749
4376 * inferiors.c (remove_thread): Discard any pending stop reply for
4377 this thread.
4378 * server.c (remove_all_on_match_pid): Rename to ...
4379 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4380 instead of a pid.
4381 (discard_queued_stop_replies): Change parameter to a ptid. Now
4382 extern.
4383 (handle_v_kill, kill_inferior_callback, captured_main)
4384 (process_serial_event): Adjust.
4385 * server.h (discard_queued_stop_replies): Declare.
4386
4387 2015-08-21 Pedro Alves <palves@redhat.com>
4388
4389 * linux-low.c (wait_for_sigstop): Always switch to no thread
4390 selected if the previously current thread dies.
4391 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4392 process instead of the current thread's.
4393 * remote-utils.c (input_interrupt): Don't check if there's no
4394 current thread.
4395 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4396 current thread to the general thread fails, error out.
4397 (handle_qxfer_auxv, handle_qxfer_libraries)
4398 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4399 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4400 (handle_query): Check if there's a thread selected instead of
4401 checking whether there's any thread in the thread list.
4402 (handle_qxfer_threads, handle_qxfer_btrace)
4403 (handle_qxfer_btrace_conf): Don't error out early if there's no
4404 thread in the thread list.
4405 (handle_v_cont, myresume): Don't set the current thread to the
4406 continue thread.
4407 (process_serial_event) <Hg handling>: Also set thread_id if the
4408 previous general thread is still alive.
4409 (process_serial_event) <g/G handling>: If setting the current
4410 thread to the general thread fails, error out.
4411 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4412 thread's lwp instead of the current thread's.
4413 * target.c (set_desired_thread): If the desired thread was not
4414 found, leave the current thread pointing to NULL. Return an int
4415 (boolean) indicating success.
4416 * target.h (set_desired_thread): Change return type to int.
4417
4418 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4419
4420 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4421 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4422 #includes.
4423 (ps_get_thread_area): New function.
4424
4425 2015-08-19 Gary Benson <gbenson@redhat.com>
4426
4427 * hostio.c (handle_pread): Do not attempt to read more data
4428 than hostio_reply_with_data can fit in a packet.
4429
4430 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4431
4432 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4433
4434 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4435
4436 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4437
4438 2015-08-06 Pedro Alves <palves@redhat.com>
4439
4440 * tracepoint.c (expr_eval_result): Now an int.
4441
4442 2015-08-06 Pedro Alves <palves@redhat.com>
4443
4444 * gdbthread.h (struct regcache): Forward declare.
4445 (struct thread_info) <regcache_data>: Now a struct regcache
4446 pointer.
4447 * inferiors.c (inferior_regcache_data)
4448 (set_inferior_regcache_data): Now work with struct regcache
4449 pointers.
4450 * inferiors.h (struct regcache): Forward declare.
4451 (inferior_regcache_data, set_inferior_regcache_data): Now work
4452 with struct regcache pointers.
4453 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4454 (free_register_cache_thread): Remove struct regcache pointer
4455 casts.
4456
4457 2015-08-06 Pedro Alves <palves@redhat.com>
4458
4459 * server.c (captured_main): On error, print the exception message
4460 to stderr, and if run_once is set, throw a quit.
4461
4462 2015-08-06 Pedro Alves <palves@redhat.com>
4463
4464 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4465 the current thread.
4466
4467 2015-08-06 Pedro Alves <palves@redhat.com>
4468
4469 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4470 reading beyond the passed in buffer length.
4471
4472 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4473
4474 * tracepoint.c (symbol_list) <required>: Remove.
4475
4476 2015-08-06 Pedro Alves <palves@redhat.com>
4477
4478 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4479 count if stopping and suspending threads.
4480 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4481 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4482 (linux_detach): Complete an ongoing step-over.
4483 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4484 throughout.
4485 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4486 (linux_wait_1): If passing a signal to the inferior after
4487 finishing a step-over, unsuspend and re-resume all lwps. If we
4488 see a single-step event but the thread should be continuing, don't
4489 pass the trap to gdb.
4490 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4491 internal_error instead of gdb_assert.
4492 (enqueue_pending_signal): New function.
4493 (check_ptrace_stopped_lwp_gone): Add debug output.
4494 (start_step_over): Use internal_error instead of gdb_assert.
4495 (complete_ongoing_step_over): New function.
4496 (linux_resume_one_thread): Don't resume a suspended thread.
4497 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4498 it stepping.
4499
4500 2015-08-06 Pedro Alves <palves@redhat.com>
4501
4502 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4503 (linux_thread_alive): Use lwp_is_marked_dead.
4504 (extended_event_reported): Delete.
4505 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4506 instead of extended_event_reported.
4507 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4508 as well.
4509 (lwp_is_marked_dead): New function.
4510 (lwp_running): Use lwp_is_marked_dead.
4511 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4512 comment.
4513
4514 2015-08-06 Pedro Alves <palves@redhat.com>
4515
4516 * linux-low.c (linux_wait_1): Move fork event output out of the
4517 !report_to_gdb check. Pass event_child->waitstatus to
4518 target_waitstatus_to_string instead of ourstatus.
4519
4520 2015-08-04 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4523 if current_thread is 32 bit.
4524
4525 2015-08-04 Yao Qi <yao.qi@linaro.org>
4526
4527 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4528 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4529 * server.c (extended_protocol): Remove "static".
4530 * server.h (extended_protocol): Declare it.
4531
4532 2015-08-04 Yao Qi <yao.qi@linaro.org>
4533
4534 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4535 both aarch64 and aarch32.
4536 (aarch64_set_pc): Likewise.
4537
4538 2015-08-04 Yao Qi <yao.qi@linaro.org>
4539
4540 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4541 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4542 arm-with-neon.xml to srv_xmlfiles.
4543 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4544 (is_64bit_tdesc): New function.
4545 (aarch64_linux_read_description): New function.
4546 (aarch64_arch_setup): Call aarch64_linux_read_description.
4547 (regs_info): Rename to regs_info_aarch64.
4548 (aarch64_regs_info): Return right regs_info.
4549 (initialize_low_arch): Call initialize_low_arch_aarch32.
4550
4551 2015-08-04 Yao Qi <yao.qi@linaro.org>
4552
4553 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4554 * linux-aarch32-low.c: New file.
4555 * linux-aarch32-low.h: New file.
4556 * linux-arm-low.c (arm_fill_gregset): Move it to
4557 linux-aarch32-low.c.
4558 (arm_store_gregset): Likewise.
4559 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4560 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4561 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4562 (regs_info): Rename to regs_info_arm.
4563 (arm_regs_info): Return regs_info_aarch32 if
4564 have_ptrace_getregset is 1 and target description is
4565 arm_with_neon or arm_with_vfpv3.
4566 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4567 Call initialize_low_arch_aarch32 instead.
4568
4569 2015-08-04 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4572 * linux-low.c: ... here.
4573 * linux-low.h (have_ptrace_getregset): Declare it.
4574
4575 2015-08-04 Pedro Alves <palves@redhat.com>
4576
4577 * thread-db.c (struct thread_db): Use new typedefs.
4578 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4579 CHK calls.
4580 (disable_thread_event_reporting): Cast result of dlsym to
4581 destination function pointer type.
4582 (thread_db_mourn): Use td_ta_delete_ftype.
4583
4584 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4585
4586 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4587 arch variant.
4588 (CDX_BREAKPOINT): Define for R2.
4589 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4590 (the_low_target): Add comments.
4591
4592 2015-07-30 Yao Qi <yao.qi@linaro.org>
4593
4594 * linux-arm-low.c (arm_hwcap): Remove it.
4595 (arm_read_description): New local variable arm_hwcap. Don't
4596 set arm_hwcap to zero.
4597
4598 2015-07-30 Yao Qi <yao.qi@linaro.org>
4599
4600 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4601 Use regcache->tdesc instead.
4602 (arm_store_wmmxregset): Likewise.
4603 (arm_fill_vfpregset): Likewise.
4604 (arm_store_vfpregset): Likewise.
4605
4606 2015-07-30 Yao Qi <yao.qi@linaro.org>
4607
4608 * linux-arm-low.c: Include arch/arm.h.
4609 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4610 (arm_store_gregset): Likewise.
4611
4612 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4613
4614 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4615 ptrace's 4th parameter.
4616
4617 2015-07-27 Yao Qi <yao.qi@linaro.org>
4618
4619 * configure.srv (case aarch64*-*-linux*): Don't set
4620 srv_linux_usrregs.
4621
4622 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4623
4624 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4625 sys/ptrace.h.
4626 * linux-arm-low.c: Likewise.
4627 * linux-cris-low.c: Likewise.
4628 * linux-crisv32-low.c: Likewise.
4629 * linux-low.c: Likewise.
4630 * linux-m68k-low.c: Likewise.
4631 * linux-mips-low.c: Likewise.
4632 * linux-nios2-low.c: Likewise.
4633 * linux-s390-low.c: Likewise.
4634 * linux-sparc-low.c: Likewise.
4635 * linux-tic6x-low.c: Likewise.
4636 * linux-tile-low.c: Likewise.
4637 * linux-x86-low.c: Likewise.
4638
4639 2015-07-24 Pedro Alves <palves@redhat.com>
4640
4641 * config.in: Regenerate.
4642 * configure: Regenerate.
4643
4644 2015-07-24 Pedro Alves <palves@redhat.com>
4645
4646 * acinclude.m4: Include ../ptrace.m4.
4647 * configure.ac: Call GDB_AC_PTRACE.
4648 * config.in, configure: Regenerate.
4649
4650 2015-07-24 Yao Qi <yao.qi@linaro.org>
4651
4652 * linux-low.c (linux_create_inferior): Remove setting to
4653 proc->priv->new_inferior.
4654 (linux_attach): Likewise.
4655 (linux_low_filter_event): Likewise.
4656 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4657
4658 2015-07-24 Yao Qi <yao.qi@linaro.org>
4659
4660 * linux-low.c (linux_arch_setup): New function.
4661 (linux_low_filter_event): If proc->tdesc is NULL and
4662 proc->attached is true, call the_low_target.arch_setup.
4663 Otherwise, keep status pending, and return.
4664 (linux_resume_one_lwp_throw): Don't call get_pc if
4665 thread->while_stepping isn't NULL. Don't call
4666 get_thread_regcache if proc->tdesc is NULL.
4667 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4668 (linux_target_ops): Install arch_setup.
4669 * server.c (start_inferior): Call the_target->arch_setup.
4670 * target.h (struct target_ops) <arch_setup>: New field.
4671 (target_arch_setup): New marco.
4672 * lynx-low.c (lynx_target_ops): Update.
4673 * nto-low.c (nto_target_ops): Update.
4674 * spu-low.c (spu_target_ops): Update.
4675 * win32-low.c (win32_target_ops): Update.
4676
4677 2015-07-24 Yao Qi <yao.qi@linaro.org>
4678
4679 * linux-low.c (linux_add_process): Don't set
4680 proc->priv->new_inferior.
4681 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4682 (linux_attach): Likewise.
4683
4684 2015-07-24 Yao Qi <yao.qi@linaro.org>
4685
4686 * server.c (start_inferior): Code refactor.
4687
4688 2015-07-24 Yao Qi <yao.qi@linaro.org>
4689
4690 * server.c (process_serial_event): Set general_thread.
4691
4692 2015-07-21 Yao Qi <yao.qi@linaro.org>
4693
4694 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4695 aarch64_linux_get_debug_reg_capacity.
4696
4697 2015-07-17 Yao Qi <yao.qi@linaro.org>
4698
4699 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4700 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4701 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4702 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4703 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4704 (AARCH64_HWP_ALIGNMENT): Likewise.
4705 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4706 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4707 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4708 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4709 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4710 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4711 (struct aarch64_debug_reg_state): Likewise.
4712 (struct arch_lwp_info): Likewise.
4713 (aarch64_align_watchpoint): Likewise.
4714 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4715 (aarch64_watchpoint_length): Likewise.
4716 (aarch64_point_encode_ctrl_reg): Likewise
4717 (aarch64_point_is_aligned): Likewise.
4718 (aarch64_align_watchpoint): Likewise.
4719 (aarch64_linux_set_debug_regs):
4720 (aarch64_dr_state_insert_one_point): Likewise.
4721 (aarch64_dr_state_remove_one_point): Likewise.
4722 (aarch64_handle_breakpoint): Likewise.
4723 (aarch64_handle_aligned_watchpoint): Likewise.
4724 (aarch64_handle_unaligned_watchpoint): Likewise.
4725 (aarch64_handle_watchpoint): Likewise.
4726
4727 2015-07-17 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4730 and don't aarch64_get_debug_reg_state. All callers update.
4731 (aarch64_handle_aligned_watchpoint): Likewise.
4732 (aarch64_handle_unaligned_watchpoint): Likewise.
4733 (aarch64_handle_watchpoint): Likewise.
4734 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4735 (aarch64_remove_point): Likewise.
4736
4737 2015-07-17 Yao Qi <yao.qi@linaro.org>
4738
4739 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4740 debug_printf.
4741 (aarch64_handle_unaligned_watchpoint): Likewise.
4742
4743 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4744
4745 Revert the previous 3 commits:
4746 Move gdb_regex* to common/
4747 Move linux_find_memory_regions_full & co.
4748 gdbserver build-id attribute generator
4749
4750 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4751 Jan Kratochvil <jan.kratochvil@redhat.com>
4752
4753 gdbserver build-id attribute generator.
4754 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4755 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4756 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4757 (find_phdr): New.
4758 (get_dynamic): Use find_pdhr to traverse program headers.
4759 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4760 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4761 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4762 (get_hex_build_id): New.
4763 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4764 to reply XML document.
4765
4766 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4767 Jan Kratochvil <jan.kratochvil@redhat.com>
4768
4769 * target.c: Include target/target-utils.h and fcntl.h.
4770 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4771 (target_fileio_read_stralloc): New functions.
4772
4773 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4774
4775 * Makefile.in (OBS): Add gdb_regex.o.
4776 (gdb_regex.o): New.
4777 * config.in: Rebuilt.
4778 * configure: Rebuilt.
4779
4780 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4781 Jan Kratochvil <jan.kratochvil@redhat.com>
4782
4783 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4784 * Makefile.in (OBS): Add target-utils.o.
4785 (linux-maps.o, target-utils.o): New.
4786 * configure.srv (srv_linux_obj): Add linux-maps.o.
4787
4788 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4789
4790 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4791 function, return 1.
4792 (the_low_target): Install it.
4793
4794 2015-07-14 Pedro Alves <palves@redhat.com>
4795
4796 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4797 Instead, ignore ECHILD, and throw an error for other errnos.
4798
4799 2015-07-10 Pedro Alves <palves@redhat.com>
4800
4801 * event-loop.c (struct callback_event) <data>: Change type to
4802 gdb_client_data instance instead of gdb_client_data pointer.
4803 (append_callback_event): Adjust.
4804
4805 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4806
4807 * linux-aarch64-low.c: Add comments for each linux_target_ops
4808 method. Remove comments already covered in target_ops and
4809 linux_target_ops definitions.
4810 (the_low_target): Add comments for each unimplemented method.
4811
4812 2015-07-09 Yao Qi <yao.qi@linaro.org>
4813
4814 * linux-aarch64-low.c (aarch64_regmap): Remove.
4815 (aarch64_usrregs_info): Remove.
4816 (regs_info): Set field usrregs to NULL.
4817
4818 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4819
4820 * linux-low.c: Include "rsp-low.h"
4821 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4822 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4823 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4824 (handle_btrace_enable_pt): New.
4825 (handle_btrace_general_set): Support "pt".
4826 (handle_btrace_conf_general_set): Support "pt:size".
4827
4828 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4829
4830 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4831 Z_PACKET_SW_BP.
4832
4833 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4834
4835 * linux-aarch64-low.c: Remove comment about endianness.
4836 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4837 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4838 memcmp.
4839
4840 2015-06-24 Gary Benson <gbenson@redhat.com>
4841
4842 * linux-i386-ipa.c (stdint.h): Do not include.
4843 * lynx-i386-low.c (stdint.h): Likewise.
4844 * lynx-ppc-low.c (stdint.h): Likewise.
4845 * mem-break.c (stdint.h): Likewise.
4846 * thread-db.c (stdint.h): Likewise.
4847 * tracepoint.c (stdint.h): Likewise.
4848 * win32-low.c (stdint.h): Likewise.
4849
4850 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4851
4852 * server.c (write_qxfer_response): Update call to
4853 remote_escape_output.
4854
4855 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4856 Jan Kratochvil <jan.kratochvil@redhat.com>
4857
4858 Merge multiple hex conversions.
4859 * gdbreplay.c (tohex): Rename to 'fromhex'.
4860 (logchar): Use fromhex.
4861
4862 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4863
4864 * server.c (handle_qxfer_libraries): Set `version' attribute for
4865 <library-list>.
4866
4867 2015-06-10 Gary Benson <gbenson@redhat.com>
4868
4869 * target.h (struct target_ops) <multifs_open>: New field.
4870 <multifs_unlink>: Likewise.
4871 <multifs_readlink>: Likewise.
4872 * linux-low.c (nat/linux-namespaces.h): New include.
4873 (linux_target_ops): Initialize the_target->multifs_open,
4874 the_target->multifs_unlink and the_target->multifs_readlink.
4875 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4876 * hostio.c (hostio_fs_pid): New static variable.
4877 (hostio_handle_new_gdb_connection): New function.
4878 (handle_setfs): Likewise.
4879 (handle_open): Use the_target->multifs_open as appropriate.
4880 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4881 (handle_readlink): Use the_target->multifs_readlink as
4882 appropriate.
4883 (handle_vFile): Handle vFile:setfs packets.
4884 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4885 after target_handle_new_gdb_connection.
4886
4887 2015-06-10 Gary Benson <gbenson@redhat.com>
4888
4889 * configure.ac (AC_CHECK_FUNCS): Add setns.
4890 * config.in: Regenerate.
4891 * configure: Likewise.
4892 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4893 (linux-namespaces.o): New rule.
4894 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4895
4896 2015-06-09 Gary Benson <gbenson@redhat.com>
4897
4898 * hostio.c (handle_open): Process mode argument with
4899 fileio_to_host_mode.
4900
4901 2015-06-01 Yao Qi <yao.qi@linaro.org>
4902
4903 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4904 * linux-x86-low.c: Likewise.
4905
4906 2015-05-28 Don Breazeal <donb@codesourcery.com>
4907
4908 * linux-low.c (handle_extended_wait): Initialize
4909 thread_info.last_resume_kind for new fork children.
4910
4911 2015-05-15 Pedro Alves <palves@redhat.com>
4912
4913 * target.h (target_handle_new_gdb_connection): Rewrite using if
4914 wrapped in do/while.
4915
4916 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4917
4918 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4919 * configure, config.in: Regenerate.
4920 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4921 Declare typedef.
4922
4923 2015-05-12 Don Breazeal <donb@codesourcery.com>
4924
4925 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4926 PTRACE_EVENT_VFORK_DONE.
4927 (linux_low_ptrace_options, extended_event_reported): Add vfork
4928 events.
4929 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4930 and "vforkdone" for RSP 'T' Stop Reply Packet.
4931 * server.h (report_vfork_events): Declare
4932 global variable.
4933
4934 2015-05-12 Don Breazeal <donb@codesourcery.com>
4935
4936 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4937 (the_low_target) <new_fork>: Initialize new member.
4938 * linux-arm-low.c (arm_new_fork): New function.
4939 (the_low_target) <new_fork>: Initialize new member.
4940 * linux-low.c (handle_extended_wait): Call new target function
4941 new_fork.
4942 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4943 * linux-mips-low.c (mips_add_watchpoint): New function
4944 extracted from mips_insert_point.
4945 (the_low_target) <new_fork>: Initialize new member.
4946 (mips_linux_new_fork): New function.
4947 (mips_insert_point): Call mips_add_watchpoint.
4948 * linux-x86-low.c (x86_linux_new_fork): New function.
4949 (the_low_target) <new_fork>: Initialize new member.
4950
4951 2015-05-12 Don Breazeal <donb@codesourcery.com>
4952
4953 * linux-low.c (handle_extended_wait): Implement return value,
4954 rename argument 'event_child' to 'event_lwp', handle
4955 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4956 (linux_low_ptrace_options): New function.
4957 (linux_low_filter_event): Call linux_low_ptrace_options,
4958 use different argument fo linux_enable_event_reporting,
4959 use return value from handle_extended_wait.
4960 (extended_event_reported): New function.
4961 (linux_wait_1): Call extended_event_reported and set
4962 status to report fork events.
4963 (linux_write_memory): Add pid to debug message.
4964 (reset_lwp_ptrace_options_callback): New function.
4965 (linux_handle_new_gdb_connection): New function.
4966 (linux_target_ops): Initialize new structure member.
4967 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4968 * lynx-low.c: Initialize new structure member.
4969 * remote-utils.c (prepare_resume_reply): Implement stop reason
4970 "fork" for "T" stop message.
4971 * server.c (handle_query): Call handle_new_gdb_connection.
4972 * server.h (report_fork_events): Declare global flag.
4973 * target.h (struct target_ops) <handle_new_gdb_connection>:
4974 New member.
4975 (target_handle_new_gdb_connection): New macro.
4976 * win32-low.c: Initialize new structure member.
4977
4978 2015-05-12 Don Breazeal <donb@codesourcery.com>
4979
4980 * mem-break.c (APPEND_TO_LIST): Define macro.
4981 (clone_agent_expr): New function.
4982 (clone_one_breakpoint): New function.
4983 (clone_all_breakpoints): New function.
4984 * mem-break.h: Declare new functions.
4985
4986 2015-05-12 Don Breazeal <donb@codesourcery.com>
4987
4988 * linux-low.c (linux_supports_fork_events): New function.
4989 (linux_supports_vfork_events): New function.
4990 (linux_target_ops): Initialize new structure members.
4991 (initialize_low): Call linux_check_ptrace_features.
4992 * lynx-low.c (lynx_target_ops): Initialize new structure
4993 members.
4994 * server.c (report_fork_events, report_vfork_events):
4995 New global flags.
4996 (handle_query): Add new features to qSupported packet and
4997 response.
4998 (captured_main): Initialize new global variables.
4999 * target.h (struct target_ops) <supports_fork_events>:
5000 New member.
5001 <supports_vfork_events>: New member.
5002 (target_supports_fork_events): New macro.
5003 (target_supports_vfork_events): New macro.
5004 * win32-low.c (win32_target_ops): Initialize new structure
5005 members.
5006
5007 2015-05-12 Gary Benson <gbenson@redhat.com>
5008
5009 * server.c (handle_qxfer_exec_file): Use current process
5010 if annex is empty.
5011
5012 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5013
5014 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5015 Remove HAVE_PTRACE_GETREGS conditionals.
5016 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5017 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5018
5019 2015-05-08 Yao Qi <yao.qi@linaro.org>
5020
5021 * linux-low.c (linux_supports_conditional_breakpoints): New
5022 function.
5023 (linux_target_ops): Install new target method.
5024 * lynx-low.c (lynx_target_ops): Install NULL hook for
5025 supports_conditional_breakpoints.
5026 * nto-low.c (nto_target_ops): Likewise.
5027 * spu-low.c (spu_target_ops): Likewise.
5028 * win32-low.c (win32_target_ops): Likewise.
5029 * server.c (handle_query): Check
5030 target_supports_conditional_breakpoints.
5031 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5032 New field.
5033 (target_supports_conditional_breakpoints): New macro.
5034
5035 2015-05-06 Pedro Alves <palves@redhat.com>
5036
5037 PR server/18081
5038 * server.c (start_inferior): If the process exits, mourn it.
5039
5040 2015-04-21 Gary Benson <gbenson@redhat.com>
5041
5042 * hostio.c (fileio_open_flags_to_host): Factored out to
5043 fileio_to_host_openflags in common/fileio.c. Single use
5044 updated.
5045
5046 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5047
5048 * linux-xtensa-low.c (xtensa_fill_gregset)
5049 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5050 XCHAL_HAVE_LOOP.
5051
5052 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5053
5054 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5055 (regs_info): Replace usrregs pointer with NULL.
5056
5057 2015-04-17 Gary Benson <gbenson@redhat.com>
5058
5059 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5060 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5061 * server.c (handle_qxfer_exec_file): New function.
5062 (qxfer_packets): Add exec-file entry.
5063 (handle_query): Report qXfer:exec-file:read as supported packet.
5064
5065 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5066
5067 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5068
5069 2015-04-09 Gary Benson <gbenson@redhat.com>
5070
5071 * hostio-errno.c (errno_to_fileio_error): Remove function.
5072 Update caller to use remote_fileio_to_fio_error.
5073
5074 2015-04-09 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-low.c (linux_insert_point): Call
5077 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5078 (linux_remove_point): Call remove_memory_breakpoint if type is
5079 raw_bkpt_type_sw.
5080 * linux-x86-low.c (x86_insert_point): Don't call
5081 insert_memory_breakpoint.
5082 (x86_remove_point): Don't call remove_memory_breakpoint.
5083
5084 2015-04-01 Pedro Alves <palves@redhat.com>
5085 Cleber Rosa <crosa@redhat.com>
5086
5087 * server.c (gdbserver_usage): Reorganize and extend the usage
5088 message.
5089
5090 2015-03-24 Pedro Alves <palves@redhat.com>
5091
5092 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5093 output. Also dump TRAP_TRACE.
5094 (linux_low_filter_event): In debug output, distinguish a
5095 resume_stop SIGSTOP from a delayed SIGSTOP.
5096
5097 2015-03-24 Gary Benson <gbenson@redhat.com>
5098
5099 * linux-x86-low.c (x86_linux_new_thread): Moved to
5100 nat/x86-linux.c.
5101 (x86_linux_prepare_to_resume): Likewise.
5102
5103 2015-03-24 Gary Benson <gbenson@redhat.com>
5104
5105 * Makefile.in (x86-linux-dregs.o): New rule.
5106 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5107 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5108 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5109 (x86_linux_dr_get): Likewise.
5110 (x86_linux_dr_set): Likewise.
5111 (update_debug_registers_callback): Likewise.
5112 (x86_linux_dr_set_addr): Likewise.
5113 (x86_linux_dr_get_addr): Likewise.
5114 (x86_linux_dr_set_control): Likewise.
5115 (x86_linux_dr_get_control): Likewise.
5116 (x86_linux_dr_get_status): Likewise.
5117 (x86_linux_update_debug_registers): Likewise.
5118
5119 2015-03-24 Gary Benson <gbenson@redhat.com>
5120
5121 * linux-x86-low.c (x86_linux_update_debug_registers):
5122 New function, factored out from...
5123 (x86_linux_prepare_to_resume): ...this.
5124
5125 2015-03-24 Gary Benson <gbenson@redhat.com>
5126
5127 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5128 (x86_linux_dr_set): Likewise.
5129 (update_debug_registers_callback): Likewise.
5130 (x86_linux_dr_set_addr): Likewise.
5131 (x86_linux_dr_get_addr): Likewise.
5132 (x86_linux_dr_set_control): Likewise.
5133 (x86_linux_dr_get_control): Likewise.
5134 (x86_linux_dr_get_status): Likewise.
5135 (x86_linux_prepare_to_resume): Likewise.
5136
5137 2015-03-24 Gary Benson <gbenson@redhat.com>
5138
5139 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5140 Use perror_with_name. Pass string through gettext.
5141 (x86_linux_dr_set): Likewise.
5142
5143 2015-03-24 Gary Benson <gbenson@redhat.com>
5144
5145 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5146 (x86_linux_dr_set_addr): ...this.
5147 (x86_dr_low_get_addr): Rename to...
5148 (x86_linux_dr_get_addr): ...this.
5149 (x86_dr_low_set_control): Rename to...
5150 (x86_linux_dr_set_control): ...this.
5151 (x86_dr_low_get_control): Rename to...
5152 (x86_linux_dr_get_control): ...this.
5153 (x86_dr_low_get_status): Rename to...
5154 (x86_linux_dr_get_status): ...this.
5155 (x86_dr_low): Update with new function names.
5156
5157 2015-03-24 Gary Benson <gbenson@redhat.com>
5158
5159 * Makefile.in (x86-linux.o): New rule.
5160 * configure.srv: Add x86-linux.o to relevant targets.
5161 * linux-low.c (lwp_set_arch_private_info): New function.
5162 (lwp_arch_private_info): Likewise.
5163 * linux-x86-low.c: Include nat/x86-linux.h.
5164 (arch_lwp_info): Removed structure.
5165 (update_debug_registers_callback):
5166 Use lwp_set_debug_registers_changed.
5167 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5168 and lwp_set_debug_registers_changed.
5169 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5170
5171 2015-03-24 Gary Benson <gbenson@redhat.com>
5172
5173 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5174 * linux-arm-low.c (arm_new_thread): Likewise.
5175 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5176 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5177 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5178 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5179
5180 2015-03-24 Gary Benson <gbenson@redhat.com>
5181
5182 * linux-low.c (ptid_of_lwp): New function.
5183 (lwp_is_stopped): Likewise.
5184 (lwp_stop_reason): Likewise.
5185 * linux-x86-low.c (update_debug_registers_callback):
5186 Use lwp_is_stopped.
5187 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5188 lwp_stop_reason.
5189
5190 2015-03-24 Gary Benson <gbenson@redhat.com>
5191
5192 * linux-low.h (linux_stop_lwp): Remove declaration.
5193
5194 2015-03-24 Gary Benson <gbenson@redhat.com>
5195
5196 * linux-low.h: Include nat/linux-nat.h.
5197 * linux-low.c (iterate_over_lwps_args): New structure.
5198 (iterate_over_lwps_filter): New function.
5199 (iterate_over_lwps): Likewise.
5200 * linux-x86-low.c (update_debug_registers_callback):
5201 Update signature to what iterate_over_lwps expects.
5202 Remove PID check that iterate_over_lwps now performs.
5203 (x86_dr_low_set_addr): Use iterate_over_lwps.
5204 (x86_dr_low_set_control): Likewise.
5205
5206 2015-03-24 Gary Benson <gbenson@redhat.com>
5207
5208 * linux-x86-low.c (x86_debug_reg_state): New function.
5209 (x86_linux_prepare_to_resume): Use the above.
5210
5211 2015-03-24 Gary Benson <gbenson@redhat.com>
5212
5213 * linux-low.c (current_lwp_ptid): New function.
5214 * linux-x86-low.c: Include nat/linux-nat.h.
5215 (x86_dr_low_get_addr): Use current_lwp_ptid.
5216 (x86_dr_low_get_control): Likewise.
5217 (x86_dr_low_get_status): Likewise.
5218
5219 2015-03-20 Pedro Alves <palves@redhat.com>
5220
5221 * tracepoint.c (cmd_qtstatus): Make "str" const.
5222
5223 2015-03-20 Pedro Alves <palves@redhat.com>
5224
5225 * server.c (handle_general_set): Make "req_str" const.
5226
5227 2015-03-19 Pedro Alves <palves@redhat.com>
5228
5229 * linux-low.c (linux_resume_one_lwp): Rename to ...
5230 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5231 instead call perror_with_name.
5232 (check_ptrace_stopped_lwp_gone): New function.
5233 (linux_resume_one_lwp): Reimplement as wrapper around
5234 linux_resume_one_lwp_throw that swallows errors if the LWP is
5235 gone.
5236
5237 2015-03-19 Pedro Alves <palves@redhat.com>
5238
5239 * linux-low.c (count_events_callback, select_event_lwp_callback):
5240 No longer check whether the thread has resume_stop as last resume
5241 kind.
5242
5243 2015-03-19 Pedro Alves <palves@redhat.com>
5244
5245 * linux-low.c (count_events_callback, select_event_lwp_callback):
5246 Use the lwp's status_pending_p field, not the thread's.
5247
5248 2015-03-19 Pedro Alves <palves@redhat.com>
5249
5250 * linux-low.c (select_event_lwp_callback): Update comments to
5251 no longer mention SIGTRAP.
5252
5253 2015-03-18 Gary Benson <gbenson@redhat.com>
5254
5255 * server.c (handle_query): Do not report vFile:fstat as supported.
5256
5257 2015-03-11 Gary Benson <gbenson@redhat.com>
5258
5259 * hostio.c (sys/types.h): New include.
5260 (sys/stat.h): Likewise.
5261 (common-remote-fileio.h): Likewise.
5262 (handle_fstat): New function.
5263 (handle_vFile): Handle vFile:fstat packets.
5264
5265 2015-03-11 Gary Benson <gbenson@redhat.com>
5266
5267 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5268 struct stat.st_blocks and struct stat.st_blksize.
5269 * configure: Regenerate.
5270 * config.in: Likewise.
5271 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5272 (OBS): Add common-remote-fileio.o.
5273 (common-remote-fileio.o): New rule.
5274
5275 2015-03-09 Pedro Alves <palves@redhat.com>
5276
5277 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5278 'struct sockaddr' pointer in 'accept' call.
5279
5280 2015-03-09 Pedro Alves <palves@redhat.com>
5281
5282 Revert:
5283 2015-03-07 Pedro Alves <palves@redhat.com>
5284 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5285 or <winsock2.h> here. Instead include "gdb_socket.h".
5286 (remote_open): Use union gdb_sockaddr_u.
5287 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5288 or <winsock2.h> here. Instead include "gdb_socket.h".
5289 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5290 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5291 or <sys/un.h>.
5292 (init_named_socket, gdb_agent_helper_thread): Use union
5293 gdb_sockaddr_u.
5294
5295 2015-03-07 Pedro Alves <palves@redhat.com>
5296
5297 * configure.ac (build_warnings): Move
5298 -Wdeclaration-after-statement to the C-specific set.
5299 * configure: Regenerate.
5300
5301 2015-03-07 Pedro Alves <palves@redhat.com>
5302
5303 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5304 or <winsock2.h> here. Instead include "gdb_socket.h".
5305 (remote_open): Use union gdb_sockaddr_u.
5306 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5307 or <winsock2.h> here. Instead include "gdb_socket.h".
5308 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5309 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5310 or <sys/un.h>.
5311 (init_named_socket, gdb_agent_helper_thread): Use union
5312 gdb_sockaddr_u.
5313
5314 2015-03-07 Pedro Alves <palves@redhat.com>
5315
5316 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5317 instead.
5318
5319 2015-03-06 Yao Qi <yao.qi@linaro.org>
5320
5321 * linux-aarch64-low.c (aarch64_insert_point): Use
5322 show_debug_regs as a boolean.
5323 (aarch64_remove_point): Likewise.
5324
5325 2015-03-05 Pedro Alves <palves@redhat.com>
5326
5327 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5328 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5329 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5330 * nto-low.c (nto_target_ops): Likewise.
5331 * spu-low.c (spu_target_ops): Likewise.
5332 * win32-low.c (win32_target_ops): Likewise.
5333
5334 2015-03-04 Pedro Alves <palves@redhat.com>
5335
5336 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5337 Decide whether a breakpoint triggered based on the SIGTRAP's
5338 siginfo.si_code.
5339 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5340 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5341 (linux_low_filter_event): Check for breakpoints before checking
5342 watchpoints.
5343 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5344 siginfo.si_code.
5345 (linux_stopped_by_sw_breakpoint)
5346 (linux_supports_stopped_by_sw_breakpoint)
5347 (linux_stopped_by_hw_breakpoint)
5348 (linux_supports_stopped_by_hw_breakpoint): New functions.
5349 (linux_target_ops): Install new target methods.
5350
5351 2015-03-04 Pedro Alves <palves@redhat.com>
5352
5353 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5354 * server.c (swbreak_feature, hwbreak_feature): New globals.
5355 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5356 (captured_main): Clear swbreak_feature and hwbreak_feature.
5357 * server.h (swbreak_feature, hwbreak_feature): Declare.
5358 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5359 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5360 supports_stopped_by_hw_breakpoint>: New fields.
5361 (target_supports_stopped_by_sw_breakpoint)
5362 (target_stopped_by_sw_breakpoint)
5363 (target_supports_stopped_by_hw_breakpoint)
5364 (target_stopped_by_hw_breakpoint): Declare.
5365
5366 2015-03-04 Pedro Alves <palves@redhat.com>
5367
5368 enum lwp_stop_reason -> enum target_stop_reason
5369 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5370 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5371 (linux_wait_1, stuck_in_jump_pad_callback)
5372 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5373 (linux_stopped_by_watchpoint):
5374 * linux-low.h (enum lwp_stop_reason): Delete.
5375 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5377
5378 2015-03-04 Yao Qi <yao.qi@linaro.org>
5379
5380 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5381
5382 2015-03-03 Gary Benson <gbenson@redhat.com>
5383
5384 * hostio.c (handle_vFile): Fix prefix lengths.
5385
5386 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5387
5388 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5389 ptr_bits.
5390
5391 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5392
5393 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5394 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5395 (clean): Add "rm -f" for above C files.
5396 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5397 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5398 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5399 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5400 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5401 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5402 (init_registers_s390x_vx_linux64)
5403 (init_registers_s390x_tevx_linux64)
5404 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5405 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5406 declarations.
5407 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5408 (s390_store_vxrs_high): New functions.
5409 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5410 NT_S390_VXRS_HIGH.
5411 (s390_arch_setup): Add logic for selecting one of the new target
5412 descriptions. Activate the new vector regsets if applicable.
5413 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5414 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5415 and init_registers_s390x_tevx_linux64.
5416
5417 2015-03-01 Pedro Alves <palves@redhat.com>
5418
5419 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5420 parameter.
5421
5422 2015-02-27 Pedro Alves <palves@redhat.com>
5423
5424 * linux-x86-low.c (u_debugreg_offset): New function.
5425 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5426
5427 2015-02-27 Pedro Alves <palves@redhat.com>
5428
5429 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5430 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5431 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5432 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5433 (ps_lsetfpregs, ps_getpid)
5434 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5435 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5436 (ps_lsetxregs, ps_plog): Declare.
5437
5438 2015-02-27 Pedro Alves <palves@redhat.com>
5439
5440 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5441 IP_AGENT_EXPORT_FUNC.
5442 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5443 IP_AGENT_EXPORT_FUNC.
5444 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5445 (IP_AGENT_EXPORT): Delete.
5446 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5447 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5448 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5449 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5450 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5451 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5452 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5453 (traceframe_read_count, traceframe_write_count)
5454 (traceframes_created, trace_state_variables, get_raw_reg)
5455 (get_trace_state_variable_value, set_trace_state_variable_value)
5456 (ust_loaded, helper_thread_id, cmd_buf): Use
5457 IPA_SYM_EXPORTED_NAME.
5458 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5459 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5460 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5461 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5462 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5463 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5464 EXTERN_C_PUSH/EXTERN_C_POP.
5465 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5466 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5467 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5468 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5469 (traceframe_write_count, traceframe_read_count)
5470 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5471 (about_to_request_buffer_space, get_trace_state_variable_value)
5472 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5473 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5474 EXTERN_C_PUSH/EXTERN_C_POP.
5475 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5476 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5477 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5478 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5479 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5480 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5481 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5482 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5483 Define.
5484 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5485 (IP_AGENT_EXPORT_VAR_DECL): Define.
5486 (tracing): Declare.
5487 (gdb_agent_get_raw_reg): Declare.
5488
5489 2015-02-27 Tom Tromey <tromey@redhat.com>
5490 Pedro Alves <palves@redhat.com>
5491
5492 Rename symbols whose names are reserved C++ keywords throughout.
5493
5494 2015-02-27 Pedro Alves <palves@redhat.com>
5495
5496 * Makefile.in (COMPILER): New, get it from autoconf.
5497 (CXX): Get from autoconf instead.
5498 (COMPILE.pre): Use COMPILER.
5499 (CC-LD): Rename to ...
5500 (CC_LD): ... this. Use COMPILER.
5501 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5502 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5503 * acinclude.m4: Include build-with-cxx.m4.
5504 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5505 Disable -Werror by default if building in C++ mode.
5506 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5507 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5508 the C++ compiler. Save/restore CXXFLAGS too.
5509 * configure: Regenerate.
5510
5511 2015-02-27 Pedro Alves <palves@redhat.com>
5512
5513 * acinclude.m4: Include libiberty.m4.
5514 * configure.ac: Call libiberty_INIT.
5515 * config.in, configure: Regenerate.
5516
5517 2015-02-26 Pedro Alves <palves@redhat.com>
5518
5519 * linux-low.c (linux_wait_1): When incrementing the PC past a
5520 program breakpoint always use the_low_target.breakpoint_len as
5521 increment, rather than the maximum between that and
5522 the_low_target.decr_pc_after_break.
5523
5524 2015-02-23 Pedro Alves <palves@redhat.com>
5525
5526 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5527 thread was doing a step-over; always adjust the PC if
5528 we stepped over a permanent breakpoint.
5529 (linux_wait_1): If we stepped over breakpoint that was on top of a
5530 permanent breakpoint, manually advance the PC past it.
5531
5532 2015-02-23 Pedro Alves <palves@redhat.com>
5533
5534 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5535 modes.
5536 (x86_fill_gregset, x86_store_gregset): Use it when handling
5537 $orig_eax.
5538
5539 2015-02-20 Pedro Alves <palves@redhat.com>
5540
5541 * thread-db.c: Include "nat/linux-procfs.h".
5542 (thread_db_init): Skip listing new threads if the kernel supports
5543 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5544
5545 2015-02-20 Pedro Alves <palves@redhat.com>
5546
5547 * linux-low.c (status_pending_p_callback): Use ptid_match.
5548
5549 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5550
5551 PR breakpoints/16812
5552 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5553 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5554 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5555
5556 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5557
5558 PR breakpoints/15956
5559 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5560
5561 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5562
5563 * linux-low.c (linux_low_btrace_conf): Print size.
5564 * server.c (handle_btrace_conf_general_set): New.
5565 (hanle_general_set): Call handle_btrace_conf_general_set.
5566 (handle_query): Report Qbtrace-conf:bts:size as supported.
5567
5568 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5569
5570 * linux-low.c (linux_low_enable_btrace): Update parameters.
5571 (linux_low_btrace_conf): New.
5572 (linux_target_ops)<to_btrace_conf>: Initialize.
5573 * server.c (current_btrace_conf): New.
5574 (handle_btrace_enable): Rename to ...
5575 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5576 to target_enable_btrace. Update comment. Update users.
5577 (handle_qxfer_btrace_conf): New.
5578 (qxfer_packets): Add btrace-conf entry.
5579 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5580 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5581 (target_ops)<read_btrace_conf>: New.
5582 (target_enable_btrace): Update parameters.
5583 (target_read_btrace_conf): New.
5584
5585 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5586
5587 * server.c (handle_btrace_general_set): Remove call to
5588 target_supports_btrace.
5589 (supported_btrace_packets): New.
5590 (handle_query): Call supported_btrace_packets.
5591 * target.h: include btrace-common.h.
5592 (btrace_target_info): Removed.
5593 (supports_btrace, target_supports_btrace): Update parameters.
5594
5595 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5596
5597 * Makefile.in (SFILES): Add common/btrace-common.c.
5598 (OBS): Add common/btrace-common.o.
5599 (btrace-common.o): Add build rules.
5600 * linux-low: Include btrace-common.h.
5601 (linux_low_read_btrace): Use struct btrace_data. Call
5602 btrace_data_init and btrace_data_fini.
5603
5604 2015-02-06 Pedro Alves <palves@redhat.com>
5605
5606 * thread-db.c (find_new_threads_callback): Add debug output.
5607
5608 2015-02-04 Pedro Alves <palves@redhat.com>
5609
5610 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5611 (resume_stopped_resumed_lwps): New function.
5612 (linux_wait_for_event_filtered): Use it.
5613
5614 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5615
5616 * Makefile.in (SFILES): Add linux-personality.c.
5617 (linux-personality.o): New rule.
5618 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5619 list of objects to be built.
5620 * linux-low.c: Include nat/linux-personality.h.
5621 (linux_create_inferior): Remove code to disable address space
5622 randomization (moved to ../nat/linux-personality.c). Create
5623 cleanup to disable address space randomization.
5624
5625 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5626
5627 * Makefile.in (posix-strerror.o): New rule.
5628 (mingw-strerror.o): Likewise.
5629 * configure: Regenerated.
5630 * configure.ac: Source file ../common/common.host. Initialize new
5631 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5632
5633 2015-01-14 Yao Qi <yao@codesourcery.com>
5634
5635 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5636 (ppc-linux.o): New rule.
5637 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5638 * configure.ac: AC_CHECK_FUNCS(getauxval).
5639 * config.in: Re-generated.
5640 * configure: Re-generated.
5641 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5642 ppc64_64bit_inferior_p
5643
5644 2015-01-14 Yao Qi <yao@codesourcery.com>
5645
5646 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5647 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5648 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5649 (PT_ORIG_R3, PT_TRAP): Likewise.
5650 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5651 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5652 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5653
5654 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5655
5656 * i387-fp.c (i387_cache_to_xsave): In look over
5657 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5658 zmmh_low_space field by use of zmmh_high_space.
5659
5660 2015-01-09 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (step_over_bkpt): Move higher up in the file.
5663 (handle_extended_wait): Don't store the stop_pc here.
5664 (get_stop_pc): Adjust comments and rename to ...
5665 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5666 stopped for a software breakpoint or hardware breakpoint.
5667 (thread_still_has_status_pending_p): New function.
5668 (status_pending_p_callback): Use
5669 thread_still_has_status_pending_p. If the event is no longer
5670 interesting, resume the LWP.
5671 (handle_tracepoints): Add assert.
5672 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5673 (wstatus_maybe_breakpoint): New function.
5674 (cancel_breakpoint): Delete function.
5675 (check_stopped_by_watchpoint): New function, factored out from
5676 linux_low_filter_event.
5677 (lp_status_maybe_breakpoint): Delete function.
5678 (linux_low_filter_event): Remove filter_ptid argument.
5679 Leave thread group exits pending here. Store the LWP's stop PC.
5680 Always leave events pending.
5681 (linux_wait_for_event_filtered): Pull all events out of the
5682 kernel, and leave them all pending.
5683 (count_events_callback, select_event_lwp_callback): Consider all
5684 events.
5685 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5686 (select_event_lwp): Only give preference to the stepping LWP in
5687 all-stop mode. Adjust comments.
5688 (ignore_event): New function.
5689 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5690 references to cancel_breakpoints. Adjust to renames. Also give
5691 equal priority to all LWPs that have had events in non-stop mode.
5692 If reporting a software breakpoint event, unadjust the LWP's PC.
5693 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5694 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5695 Adjust.
5696 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5697 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5698 (linux_stopped_by_watchpoint): Adjust.
5699 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5700 * linux-low.h (enum lwp_stop_reason): New.
5701 (struct lwp_info) <stop_pc>: Adjust comment.
5702 <stopped_by_watchpoint>: Delete field.
5703 <stop_reason>: New field.
5704 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5705 * mem-break.c (software_breakpoint_inserted_here)
5706 (hardware_breakpoint_inserted_here): New function.
5707 * mem-break.h (software_breakpoint_inserted_here)
5708 (hardware_breakpoint_inserted_here): Declare.
5709 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5710 (cancel_breakpoints): Delete.
5711 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5712 (upload_fast_traceframes): Remove references to
5713 cancel_breakpoints.
5714
5715 2015-01-09 Pedro Alves <palves@redhat.com>
5716
5717 * thread-db.c (find_new_threads_callback): Ignore thread if the
5718 kernel thread ID is -1.
5719
5720 2015-01-09 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (linux_attach_fail_reason_string): Move to
5723 nat/linux-ptrace.c, and rename.
5724 (linux_attach_lwp): Update comment.
5725 (attach_proc_task_lwp_callback): New function.
5726 (linux_attach): Adjust to rename and use
5727 linux_proc_attach_tgid_threads.
5728 (linux_attach_fail_reason_string): Delete declaration.
5729
5730 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5731
5732 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5733 * server.c (gdbserver_version): Likewise.
5734
5735 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5736
5737 * remote-utils.c: Include ctype.h.
5738 (input_interrupt): Explicitly handle the case when the char
5739 received is the NUL byte. Improve the printing of non-ASCII
5740 characters.
5741
5742 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5743
5744 * linux-low.c (linux_low_filter_event): Update call to
5745 linux_enable_event_reporting following the addition of
5746 a new parameter to that function.
5747
5748 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5749
5750 PR server/17457
5751 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5752 (AARCH64_FPCR_REGNO): Likewise.
5753 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5754 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5755 (aarch64_store_fpregset): Likewise.
5756
5757 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5758
5759 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5760 Remove FIXME comment about assumption about N.
5761
5762 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5763
5764 * configure.ac: If large-file support is disabled in GDBserver,
5765 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5766 * configure: Regenerate.
5767
5768 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5769
5770 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5771 warning upon ENODATA from ptrace.
5772 * linux-s390-low.c (s390_store_tdb): New.
5773 (s390_regsets): Add regset for NT_S390_TDB.
5774
5775 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5776
5777 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5778 without a fill_function.
5779 * linux-s390-low.c (s390_fill_last_break): Remove.
5780 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5781 (s390_arch_setup): Use regset's size instead of fill_function for
5782 loop end condition.
5783
5784 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5785
5786 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5787 the regset's store function when ptrace returned an error.
5788 * regcache.c (get_thread_regcache): Invalidate register cache
5789 before fetching inferior's registers.
5790
5791 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5792
5793 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5794 while-loop as for-loop.
5795 (regsets_store_inferior_registers): Likewise.
5796
5797 2014-11-28 Yao Qi <yao@codesourcery.com>
5798
5799 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5800 * config.in, configure: Re-generate.
5801 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5802 is defined.
5803
5804 2014-11-21 Yao Qi <yao@codesourcery.com>
5805
5806 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5807 (AC_CHECK_HEADERS): Remove malloc.h.
5808 * configure: Re-generated.
5809 * config.in: Re-generated.
5810 * server.h: Don't include alloca.h and malloc.h.
5811 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5812 Don't include malloc.h.
5813
5814 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5815
5816 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5817 corresponding ERRNO check in same block.
5818
5819 2014-11-12 Pedro Alves <palves@redhat.com>
5820
5821 * server.c (cont_thread): Update comment.
5822 (start_inferior, attach_inferior): No longer clear cont_thread.
5823 (handle_v_cont): No longer set cont_thread.
5824 (captured_main): Clear cont_thread each time a GDB connects.
5825
5826 2014-11-12 Pedro Alves <palves@redhat.com>
5827
5828 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5829 thread, and don't resume all threads if the Hc thread has exited.
5830
5831 2014-11-12 Pedro Alves <palves@redhat.com>
5832
5833 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5834 the process group instead of to a specific LWP.
5835
5836 2014-10-15 Pedro Alves <palves@redhat.com>
5837
5838 PR server/17487
5839 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5840 parameter.
5841 (arm_set_thread_context): Delete.
5842 (the_low_target): Adjust.
5843 * win32-i386-low.c (debug_registers_changed)
5844 (debug_registers_used): Delete.
5845 (update_debug_registers_callback): New function.
5846 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5847 needing to update their debug registers.
5848 (win32_get_current_dr): New function.
5849 (x86_dr_low_get_addr, x86_dr_low_get_control)
5850 (x86_dr_low_get_status): Fetch the debug register from the thread
5851 record's context.
5852 (i386_initial_stuff): Adjust.
5853 (i386_get_thread_context): Remove current_event parameter. Don't
5854 clear debug_registers_changed nor copy DR values to
5855 debug_reg_state.
5856 (i386_set_thread_context): Delete.
5857 (i386_prepare_to_resume): New function.
5858 (i386_thread_added): Mark the thread as needing to update irs
5859 debug registers.
5860 (the_low_target): Remove i386_set_thread_context and install
5861 i386_prepare_to_resume.
5862 * win32-low.c (win32_get_thread_context): Adjust.
5863 (win32_set_thread_context): Use SetThreadContext
5864 directly.
5865 (win32_prepare_to_resume): New function.
5866 (win32_require_context): New function, factored out from ...
5867 (thread_rec): ... this.
5868 (continue_one_thread): Call win32_prepare_to_resume on each thread
5869 we're about to continue.
5870 (win32_resume): Call win32_prepare_to_resume on the event thread.
5871 * win32-low.h (struct win32_thread_info)
5872 <debug_registers_changed>: New field.
5873 (struct win32_target_ops): Change prototype of set_thread_context,
5874 delete set_thread_context and add prepare_to_resume.
5875 (win32_require_context): New declaration.
5876
5877 2014-10-08 Gary Benson <gbenson@redhat.com>
5878
5879 * server.h: Do not include common-exceptions.h.
5880
5881 2014-10-08 Gary Benson <gbenson@redhat.com>
5882
5883 * server.h: Do not include cleanups.h.
5884
5885 2014-09-30 James Hogan <james.hogan@imgtec.com>
5886
5887 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5888 mips64-dsp-linux.c.
5889
5890 2014-09-23 Yao Qi <yao@codesourcery.com>
5891
5892 * linux-low.c (lp_status_maybe_breakpoint): New function.
5893 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5894 (count_events_callback): Likewise.
5895 (select_event_lwp_callback): Likewise.
5896 (cancel_breakpoints_callback): Likewise.
5897
5898 2014-09-19 Don Breazeal <donb@codesourcery.com>
5899
5900 * linux-low.c (handle_extended_wait): Call
5901 linux_ptrace_get_extended_event.
5902 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5903 linux_is_extended_waitstatus.
5904
5905 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5906
5907 * Makefile.in (CPPFLAGS): Define.
5908 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5909 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5910
5911 2014-09-16 Gary Benson <gbenson@redhat.com>
5912
5913 * inferiors.h (current_inferior): Renamed as...
5914 (current_thread): New variable. All uses updated.
5915 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5916 (maybe_move_out_of_jump_pad): Likewise.
5917 (cancel_breakpoint): Likewise.
5918 (linux_low_filter_event): Likewise.
5919 (wait_for_sigstop): Likewise.
5920 (linux_resume_one_lwp): Likewise.
5921 (need_step_over_p): Likewise.
5922 (start_step_over): Likewise.
5923 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5924 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5925 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5926 and save_inferior as saved_thread.
5927 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5928 saved_thread.
5929 (regcache_invalidate_thread): Likewise.
5930 * remote-utils.c (prepare_resume_reply): Likewise.
5931 * thread-db.c (thread_db_get_tls_address): Likewise.
5932 (disable_thread_event_reporting): Likewise.
5933 (remove_thread_event_breakpoints): Likewise.
5934 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5935 as saved_thread.
5936 * target.h (set_desired_inferior): Renamed as...
5937 (set_desired_thread): New declaration. All uses updated.
5938 * server.c (myresume): Updated comment to reference thread instead
5939 of inferior.
5940 (handle_serial_event): Likewise.
5941 (handle_target_event): Likewise.
5942
5943 2014-09-12 Tom Tromey <tromey@redhat.com>
5944 Gary Benson <gbenson@redhat.com>
5945
5946 * regcache.h: Include common-regcache.h.
5947 (regcache_read_pc): Don't declare.
5948 * regcache.c (get_thread_regcache_for_ptid): New function.
5949
5950 2014-09-11 Tom Tromey <tromey@redhat.com>
5951 Gary Benson <gbenson@redhat.com>
5952
5953 * symbol.c: New file.
5954 * Makefile.in (SFILES): Add symbol.c.
5955 (OBS): Add symbol.o.
5956
5957 2014-09-11 Gary Benson <gbenson@redhat.com>
5958
5959 * target.c (target_stop_ptid, target_continue_ptid): New
5960 functions.
5961
5962 2014-09-11 Tom Tromey <tromey@redhat.com>
5963 Gary Benson <gbenson@redhat.com>
5964
5965 * target.h: Include target/target.h.
5966 * target.c (target_read_memory, target_read_uint32)
5967 (target_write_memory): New functions.
5968
5969 2014-09-11 Gary Benson <gbenson@redhat.com>
5970
5971 * server.h (debug_hw_points): Don't declare.
5972 * server.c (debug_hw_points): Don't define. Replace all uses
5973 with show_debug_regs.
5974 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5975 all uses with show_debug_regs.
5976
5977 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5978
5979 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5980 endianness into account.
5981 (ppc_supply_ptrace_register): Likewise.
5982
5983 2014-09-03 James Hogan <james.hogan@imgtec.com>
5984
5985 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5986 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5987
5988 2014-09-03 Gary Benson <gbenson@redhat.com>
5989
5990 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5991 ALL_DEBUG_ADDRESS_REGISTERS.
5992
5993 2014-09-02 Gary Benson <gbenson@redhat.com>
5994
5995 * i386-low.h: Renamed as...
5996 * x86-low.h: New file. All type, function and variable name
5997 prefixes changed from "i386_" to "x86_". All references updated.
5998 * i386-low.c: Renamed as...
5999 * x86-low.c: New file. All type, function and variable name
6000 prefixes changed from "i386_" to "x86_". All references updated.
6001
6002 2014-09-02 Gary Benson <gbenson@redhat.com>
6003
6004 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6005 (x86_linux_new_thread): Likewise.
6006
6007 2014-08-29 Gary Benson <gbenson@redhat.com>
6008
6009 * server.h (setjmp.h): Do not include.
6010 (toplevel): Do not declare.
6011 (common-exceptions.h): Include.
6012 (cleanups.h): Likewise.
6013 * server.c (toplevel): Do not define.
6014 (exit_code): New static global.
6015 (detach_or_kill_for_exit_cleanup): New function.
6016 (main): New function. Original main renamed to...
6017 (captured_main): New function.
6018 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6019
6020 2014-08-29 Gary Benson <gbenson@redhat.com>
6021
6022 * Makefile.in (SFILES): Add common/common-exceptions.c.
6023 (OBS): Add common-exceptions.o.
6024 (common-exceptions.o): New rule.
6025 * utils.c (prepare_to_throw_exception): New function.
6026
6027 2014-08-29 Gary Benson <gbenson@redhat.com>
6028
6029 * config.in: Regenerate.
6030 * configure: Likewise.
6031
6032 2014-08-29 Gary Benson <gbenson@redhat.com>
6033
6034 * Makefile.in (SFILES): Add common/cleanups.c.
6035 (OBS): cleanups.o.
6036 (cleanups.o): New rule.
6037
6038 2014-08-29 Gary Benson <gbenson@redhat.com>
6039
6040 * utils.c (internal_vwarning): New function.
6041
6042 2014-08-28 Gary Benson <gbenson@redhat.com>
6043
6044 * utils.h (fatal): Remove declaration.
6045 * utils.c (fatal): Remove function.
6046
6047 2014-08-28 Gary Benson <gbenson@redhat.com>
6048
6049 * tracepoint.c (gdb_agent_init): Replace fatal with
6050 perror_with_name.
6051 (initialize_tracepoint): Likewise.
6052
6053 2014-08-28 Gary Benson <gbenson@redhat.com>
6054
6055 * remote-utils.c (remote_prepare): Replace fatal with error.
6056
6057 2014-08-28 Gary Benson <gbenson@redhat.com>
6058
6059 * linux-low.c (linux_async): Replace fatal with warning.
6060 Tidy up and return.
6061 (linux_start_non_stop): Return -1 if linux_async failed.
6062
6063 2014-08-28 Gary Benson <gbenson@redhat.com>
6064
6065 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6066 gdb_assert.
6067 (i386_dr_low_get_addr): Remove vague comment.
6068 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6069 gdb_assert.
6070
6071 2014-08-28 Gary Benson <gbenson@redhat.com>
6072
6073 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6074 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6075 internal_error.
6076 (linux_resume_one_lwp): Likewise.
6077 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6078 gdb_assert.
6079 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6080 with internal_error.
6081 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6082 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6083 (find_register_by_name): Replace fatal with internal_error.
6084 (find_regno): Likewise.
6085 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6086 * thread-db.c (thread_db_create_event): Likewise.
6087 (thread_db_load_search): Likewise.
6088 (try_thread_db_load_1): Likewise.
6089 * tracepoint.c (get_jump_space_head): Replace fatal with
6090 internal_error.
6091 (claim_trampoline_space): Likewise.
6092 (have_fast_tracepoint_trampoline_buffer): Likewise.
6093 (cmd_qtstart): Likewise.
6094 (stop_tracing): Likewise.
6095 (fast_tracepoint_collecting): Likewise.
6096 (target_malloc): Likewise.
6097 (download_tracepoint): Likewise.
6098 (download_trace_state_variables): Replace check with gdb_assert.
6099 (upload_fast_traceframes): Replace fatal with internal_error.
6100
6101 2014-08-19 Tom Tromey <tromey@redhat.com>
6102 Gary Benson <gbenson@redhat.com>
6103
6104 * Makefile.in (SFILES): Add common/common-debug.c.
6105 (OBS): Add common-debug.o.
6106 (common-debug.o): New rule.
6107 * debug.h (debug_printf): Don't declare.
6108 * debug.c (debug_printf): Renamed and rewritten as...
6109 (debug_vprintf): New function.
6110
6111 2014-08-19 Gary Benson <gbenson@redhat.com>
6112
6113 * utils.h: Do not include print-utils.h.
6114
6115 2014-08-19 Tom Tromey <tromey@redhat.com>
6116 Gary Benson <gbenson@redhat.com>
6117
6118 * server.h: Add static assertion.
6119 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6120
6121 2014-08-19 Tom Tromey <tromey@redhat.com>
6122 Gary Benson <gbenson@redhat.com>
6123
6124 * Makefile.in (SFILES): Add common/errors.c.
6125 (OBS): Add errors.o.
6126 (IPA_OBS): Add errors-ipa.o.
6127 (errors.o): New rule.
6128 (errors-ipa.o): Likewise.
6129 * utils.h (perror_with_name, error, warning): Don't declare.
6130 * utils.c (warning): Renamed and rewritten as...
6131 (vwarning): New function.
6132 (error): Renamed and rewritten as...
6133 (verror): New function.
6134 (internal_error): Renamed and rewritten as...
6135 (internal_verror): New function.
6136
6137 2014-08-07 Gary Benson <gbenson@redhat.com>
6138
6139 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6140 * configure: Regenerate.
6141 * config.in: Likewise.
6142 * server.h: Do not include errno.h.
6143 * event-loop.c: Likewise.
6144 * hostio-errno.c: Likewise.
6145 * linux-low.c: Likewise.
6146 * remote-utils.c: Likewise.
6147 * spu-low.c: Likewise.
6148 * utils.c: Likewise.
6149 * gdbreplay.c: Unconditionally include errno.h.
6150
6151 2014-08-07 Gary Benson <gbenson@redhat.com>
6152
6153 * server.h: Do not include string.h.
6154 * event-loop.c: Likewise.
6155 * linux-low.c: Likewise.
6156 * regcache.c: Likewise.
6157 * remote-utils.c: Likewise.
6158 * spu-low.c: Likewise.
6159 * utils.c: Likewise.
6160
6161 2014-08-07 Gary Benson <gbenson@redhat.com>
6162
6163 * server.h: Do not include gdb_assert.h.
6164
6165 2014-08-07 Gary Benson <gbenson@redhat.com>
6166
6167 * server.h: Do not include common-utils.h.
6168
6169 2014-08-07 Gary Benson <gbenson@redhat.com>
6170
6171 * server.h: Do not include ptid.h.
6172 * notif.h: Likewise.
6173
6174 2014-08-07 Gary Benson <gbenson@redhat.com>
6175
6176 * server.h: Do not include gdb_locale.h.
6177
6178 2014-08-07 Gary Benson <gbenson@redhat.com>
6179
6180 * server.h: Do not include gdb/signals.h.
6181 * win32-low.c: Likewise.
6182
6183 2014-08-07 Gary Benson <gbenson@redhat.com>
6184
6185 * server.h: Do not include pathmax.h.
6186
6187 2014-08-07 Gary Benson <gbenson@redhat.com>
6188
6189 * server.h: Do not include libiberty.h.
6190 * linux-bfin-low.c: Likewise.
6191
6192 2014-08-07 Gary Benson <gbenson@redhat.com>
6193
6194 * server.h: Do not include ansidecl.h.
6195
6196 2014-08-07 Gary Benson <gbenson@redhat.com>
6197
6198 * linux-x86-low.c: Do not include stddef.h.
6199 * lynx-ppc-low.c: Likewise.
6200 * tracepoint.c: Likewise.
6201
6202 2014-08-07 Gary Benson <gbenson@redhat.com>
6203
6204 * server.h: Do not include stdarg.h.
6205 * nto-low.c: Likewise.
6206
6207 2014-08-07 Gary Benson <gbenson@redhat.com>
6208
6209 * server.h: Do not include stdlib.h.
6210 * inferiors.c: Likewise.
6211 * linux-low.c: Likewise.
6212 * regcache.c: Likewise.
6213 * spu-low.c: Likewise.
6214 * tracepoint.c: Likewise.
6215 * utils.c: Likewise.
6216
6217 2014-08-07 Gary Benson <gbenson@redhat.com>
6218
6219 * server.h: Do not include stdio.h.
6220 * linux-low.c: Likewise.
6221 * remote-utils.c: Likewise.
6222 * spu-low.c: Likewise.
6223 * utils.c: Likewise.
6224 * wincecompat.c: Likewise.
6225
6226 2014-08-06 Gary Benson <gbenson@redhat.com>
6227
6228 * regcache.c (init_register_cache): Move conditionals inside if.
6229
6230 2014-08-06 Gary Benson <gbenson@redhat.com>
6231
6232 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6233
6234 2014-07-31 Gary Benson <gbenson@redhat.com>
6235
6236 * ax.h: Do not include server.h.
6237 * gdbthread.h: Likewise.
6238 * lynx-low.h: Likewise.
6239 * notif.h: Likewise.
6240
6241 2014-07-30 Gary Benson <gbenson@redhat.com>
6242
6243 * server.h: Include common-defs.h.
6244 Do not include config.h or build-gnulib-gdbserver/config.h.
6245
6246 2014-07-30 Gary Benson <gbenson@redhat.com>
6247
6248 * hostio-errno.c: Move server.h to top of includes list.
6249 * inferiors.c: Likewise.
6250 * linux-x86-low.c: Likewise.
6251 * notif.c: Include server.h.
6252
6253 2014-07-24 Tom Tromey <tromey@redhat.com>
6254 Gary Benson <gbenson@redhat.com>
6255
6256 * server.h (CORE_ADDR): Now unsigned.
6257
6258 2014-07-16 Pedro Alves <palves@redhat.com>
6259
6260 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6261
6262 2014-07-15 Pedro Alves <palves@redhat.com>
6263
6264 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6265 copy.
6266
6267 2014-07-11 Pedro Alves <palves@redhat.com>
6268
6269 * linux-low.c (kill_wait_lwp): New function, based on
6270 kill_one_lwp_callback, but use my_waitpid directly.
6271 (kill_one_lwp_callback, linux_kill): Use it.
6272
6273 2014-06-23 Pedro Alves <palves@redhat.com>
6274
6275 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6276 before setting DR0..DR3.
6277
6278 2014-06-20 Gary Benson <gbenson@redhat.com>
6279
6280 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6281 * configure: Regenerated.
6282 * config.in: Likewise.
6283
6284 2014-06-20 Gary Benson <gbenson@redhat.com>
6285
6286 * Makefile.in (SFILES): Update locations for files moved
6287 from common to nat.
6288 (object file files): Reordered.
6289
6290 2014-06-20 Gary Benson <gbenson@redhat.com>
6291
6292 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6293 (i386_dr_low_set_addr): Likewise.
6294 (i386_dr_low_get_addr): Likewise.
6295 (i386_dr_low_can_set_control): Likewise.
6296 (i386_dr_low_set_control): Likewise.
6297 (i386_dr_low_get_control): Likewise.
6298 (i386_dr_low_get_status): Likewise.
6299 (i386_get_debug_register_length): Likewise.
6300 * linux-x86-low.c (i386_dr_low_set_addr):
6301 Changed signature. Made static.
6302 (i386_dr_low_get_addr): Likewise.
6303 (i386_dr_low_set_control): Likewise.
6304 (i386_dr_low_get_control): Likewise.
6305 (i386_dr_low_get_status): Likewise.
6306 (i386_dr_low): New global variable.
6307 * win32-i386-low.c (i386_dr_low_set_addr):
6308 Changed signature. Made static.
6309 (i386_dr_low_get_addr): Likewise.
6310 (i386_dr_low_set_control): Likewise.
6311 (i386_dr_low_get_control): Likewise.
6312 (i386_dr_low_get_status): Likewise.
6313 (i386_dr_low): New global variable.
6314
6315 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6316
6317 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6318 * Makefile.in (AR, AR_FLAGS): Define.
6319 * configure: Regenerate.
6320
6321 2014-06-19 Gary Benson <gbenson@redhat.com>
6322
6323 * Makefile.in (i386-dregs.o): New rule.
6324 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6325 * i386-low.c (target.h): Remove include.
6326 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6327 (DR_CONTROL_SHIFT): Likewise.
6328 (DR_CONTROL_SIZE): Likewise.
6329 (DR_RW_EXECUTE): Likewise.
6330 (DR_RW_WRITE): Likewise.
6331 (DR_RW_READ): Likewise.
6332 (DR_RW_IORW): Likewise.
6333 (DR_LEN_1): Likewise.
6334 (DR_LEN_2): Likewise.
6335 (DR_LEN_4): Likewise.
6336 (DR_LEN_8): Likewise.
6337 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6338 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6339 (DR_ENABLE_SIZE): Likewise.
6340 (DR_LOCAL_SLOWDOWN): Likewise.
6341 (DR_GLOBAL_SLOWDOWN): Likewise.
6342 (DR_CONTROL_RESERVED): Likewise.
6343 (I386_DR_CONTROL_MASK): Likewise.
6344 (I386_DR_VACANT): Likewise.
6345 (I386_DR_LOCAL_ENABLE): Likewise.
6346 (I386_DR_GLOBAL_ENABLE): Likewise.
6347 (I386_DR_DISABLE): Likewise.
6348 (I386_DR_SET_RW_LEN): Likewise.
6349 (I386_DR_GET_RW_LEN): Likewise.
6350 (I386_DR_WATCH_HIT): Likewise.
6351 (i386_wp_op_t): Likewise.
6352 (i386_show_dr): Likewise.
6353 (i386_length_and_rw_bits): Likewise.
6354 (i386_insert_aligned_watchpoint): Likewise.
6355 (i386_remove_aligned_watchpoint): Likewise.
6356 (i386_handle_nonaligned_watchpoint): Likewise.
6357 i386_update_inferior_debug_regs(): Likewise.
6358 (i386_dr_insert_watchpoint): Likewise.
6359 (i386_dr_remove_watchpoint): Likewise.
6360 (i386_dr_region_ok_for_watchpoint): Likewise.
6361 (i386_dr_stopped_data_address): Likewise.
6362 (i386_dr_stopped_by_watchpoint): Likewise.
6363
6364 2014-06-19 Gary Benson <gbenson@redhat.com>
6365
6366 * i386-low.c (i386_dr_show): Renamed to
6367 i386_show_dr and made static. All uses updated.
6368 (i386_dr_length_and_rw_bits): Renamed to
6369 i386_length_and_rw_bits and made static.
6370 All uses updated.
6371 (i386_dr_insert_aligned_watchpoint): Renamed to
6372 i386_insert_aligned_watchpoint and made static.
6373 All uses updated.
6374 (i386_dr_remove_aligned_watchpoint): Renamed to
6375 i386_remove_aligned_watchpoint and made static.
6376 All uses updated.
6377 (i386_dr_update_inferior_debug_regs): Renamed to
6378 i386_update_inferior_debug_regs and made static.
6379 All uses updated.
6380
6381 2014-06-18 Gary Benson <gbenson@redhat.com>
6382
6383 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6384 (i386_dr_low_can_set_control): Likewise.
6385 (i386_get_debug_register_length): Likewise.
6386 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6387 (i386_dr_low_can_set_control): Likewise.
6388 (i386_get_debug_register_length): Likewise.
6389
6390 2014-06-17 Gary Benson <gbenson@redhat.com>
6391
6392 * i386-low.h (i386-dregs.h): New include.
6393 (DR_FIRSTADDR): Now in i386-dregs.h.
6394 (DR_LASTADDR): Likewise.
6395 (DR_NADDR): Likewise.
6396 (DR_STATUS): Likewise.
6397 (DR_CONTROL): Likewise.
6398 (i386_debug_reg_state): Likewise.
6399 (i386_dr_insert_watchpoint): Likewise.
6400 (i386_dr_remove_watchpoint): Likewise.
6401 (i386_dr_region_ok_for_watchpoint): Likewise.
6402 (i386_dr_stopped_data_address): Likewise.
6403 (i386_dr_stopped_by_watchpoint): Likewise.
6404 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6405
6406 2014-06-18 Gary Benson <gbenson@redhat.com>
6407
6408 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6409 i386_dr_insert_watchpoint.
6410 (i386_low_remove_watchpoint): Renamed to
6411 i386_dr_remove_watchpoint.
6412 (i386_low_region_ok_for_watchpoint): Renamed to
6413 i386_dr_region_ok_for_watchpoint.
6414 (i386_low_stopped_data_address): Renamed to
6415 i386_dr_stopped_data_address.
6416 (i386_low_stopped_by_watchpoint): Renamed to
6417 i386_dr_stopped_by_watchpoint.
6418 * i386-low.c (i386_show_dr): Renamed to
6419 i386_dr_show and made nonstatic. All uses updated.
6420 (i386_length_and_rw_bits): Renamed to
6421 i386_dr_length_and_rw_bits and made nonstatic.
6422 All uses updated.
6423 (i386_insert_aligned_watchpoint): Renamed to
6424 i386_dr_insert_aligned_watchpoint and made nonstatic.
6425 All uses updated.
6426 (i386_remove_aligned_watchpoint): Renamed to
6427 i386_dr_remove_aligned_watchpoint and made nonstatic.
6428 All uses updated.
6429 (i386_update_inferior_debug_regs): Renamed to
6430 i386_dr_update_inferior_debug_regs and made nonstatic.
6431 All uses updated.
6432 (i386_low_insert_watchpoint): Renamed to
6433 i386_dr_insert_watchpoint. All uses updated.
6434 (i386_low_remove_watchpoint): Renamed to
6435 i386_dr_remove_watchpoint. All uses updated.
6436 (i386_low_region_ok_for_watchpoint): Renamed to
6437 i386_dr_region_ok_for_watchpoint. All uses updated.
6438 (i386_low_stopped_data_address): Renamed to
6439 i386_dr_stopped_data_address. All uses updated.
6440 (i386_low_stopped_by_watchpoint): Renamed to
6441 i386_dr_stopped_by_watchpoint. All uses updated.
6442
6443 2014-06-18 Gary Benson <gbenson@redhat.com>
6444
6445 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6446 (i386_dr_low_can_set_control): Likewise.
6447 (i386_insert_aligned_watchpoint): New check.
6448
6449 2014-06-18 Gary Benson <gbenson@redhat.com>
6450
6451 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6452 Renamed to state.
6453
6454 2014-06-18 Gary Benson <gbenson@redhat.com>
6455
6456 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6457 instead of fatal and error.
6458 (i386_handle_nonaligned_watchpoint): Likewise.
6459
6460 2014-06-18 Gary Benson <gbenson@redhat.com>
6461
6462 * i386-low.c (i386_get_debug_register_length): New macro.
6463 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6464 (i386_show_dr): Use debug_printf instead of fprintf. Use
6465 phex to format values.
6466
6467 2014-06-18 Gary Benson <gbenson@redhat.com>
6468
6469 * i386-low.h: Comment changes.
6470 * i386-low.c: Likewise.
6471
6472 2014-06-18 Gary Benson <gbenson@redhat.com>
6473
6474 * i386-low.c: Whitespace changes.
6475
6476 2014-06-12 Tom Tromey <tromey@redhat.com>
6477
6478 * utils.c (freeargv): Remove.
6479
6480 2014-06-12 Tom Tromey <tromey@redhat.com>
6481
6482 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6483 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6484 (parse_debug_format_options): Likewise.
6485 (gdbserver_usage): Likewise.
6486 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6487 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6488 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6489 against libiberty.
6490 ($(LIBGNU)): Depend on libiberty.
6491 (all-lib): Recurse into all subdirs.
6492 (install-only): Invoke "install" target in subdirs.
6493 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6494 targets.
6495 * configure: Rebuild.
6496 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6497 for vasprintf, vsnprintf, or gettimeofday.
6498 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6499 srv_tgtobj.
6500
6501 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6502
6503 * development.sh: Delete.
6504 * Makefile.in (config.status): Adjust dependency on development.sh.
6505 * configure.ac: Adjust development.sh source call.
6506 * configure: Regenerate.
6507
6508 2014-06-02 Pedro Alves <palves@redhat.com>
6509
6510 * ax.c (gdb_free_agent_expr): New function.
6511 * ax.h (gdb_free_agent_expr): New declaration.
6512 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6513 list.
6514 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6515 static.
6516 (clear_breakpoint_conditions_and_commands): New function.
6517 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6518 (clear_breakpoint_conditions_and_commands): New declaration.
6519
6520 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6521
6522 * linux-aarch64-low.c (asm/ptrace.h): Include.
6523
6524 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6525
6526 Fix TLS access for -static -pthread.
6527 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6528 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6529 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6530
6531 2014-05-20 Pedro Alves <palves@redhat.com>
6532
6533 * linux-aarch64-low.c (aarch64_insert_point)
6534 (aarch64_remove_point): No longer check whether the type is
6535 supported here. Adjust to new interface.
6536 (the_low_target): Install aarch64_supports_z_point_type as
6537 supports_z_point_type method.
6538 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6539 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6540 instead of a Z packet char. Adjust.
6541 (arm_supports_z_point_type): New function.
6542 (arm_insert_point, arm_remove_point): Adjust to new interface.
6543 (the_low_target): Install arm_supports_z_point_type.
6544 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6545 (cris_insert_point, cris_remove_point): Adjust to new interface.
6546 Don't check whether the type is supported here.
6547 (the_low_target): Install cris_supports_z_point_type.
6548 * linux-low.c (linux_supports_z_point_type): New function.
6549 (linux_insert_point, linux_remove_point): Adjust to new interface.
6550 * linux-low.h (struct linux_target_ops) <insert_point,
6551 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6552 raw_breakpoint pointer parameter.
6553 <supports_z_point_type>: New method.
6554 * linux-mips-low.c (mips_supports_z_point_type): New function.
6555 (mips_insert_point, mips_remove_point): Adjust to new interface.
6556 Use mips_supports_z_point_type.
6557 (the_low_target): Install mips_supports_z_point_type.
6558 * linux-ppc-low.c (the_low_target): Install NULL as
6559 supports_z_point_type method.
6560 * linux-s390-low.c (the_low_target): Install NULL as
6561 supports_z_point_type method.
6562 * linux-sparc-low.c (the_low_target): Install NULL as
6563 supports_z_point_type method.
6564 * linux-x86-low.c (x86_supports_z_point_type): New function.
6565 (x86_insert_point): Adjust to new insert_point interface. Use
6566 insert_memory_breakpoint. Adjust to new
6567 i386_low_insert_watchpoint interface.
6568 (x86_remove_point): Adjust to remove_point interface. Use
6569 remove_memory_breakpoint. Adjust to new
6570 i386_low_remove_watchpoint interface.
6571 (the_low_target): Install x86_supports_z_point_type.
6572 * lynx-low.c (lynx_target_ops): Install NULL as
6573 supports_z_point_type callback.
6574 * nto-low.c (nto_supports_z_point_type): New.
6575 (nto_insert_point, nto_remove_point): Adjust to new interface.
6576 (nto_target_ops): Install nto_supports_z_point_type.
6577 * mem-break.c: Adjust intro comment.
6578 (struct raw_breakpoint) <raw_type, size>: New fields.
6579 <inserted>: Update comment.
6580 <shlib_disabled>: Delete field.
6581 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6582 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6583 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6584 (raw_bkpt_type_to_target_hw_bp_type): New function.
6585 (find_enabled_raw_code_breakpoint_at): New function.
6586 (find_raw_breakpoint_at): New type and size parameters. Use them.
6587 (insert_memory_breakpoint): New function, based off
6588 set_raw_breakpoint_at.
6589 (remove_memory_breakpoint): New function.
6590 (set_raw_breakpoint_at): Reimplement.
6591 (set_breakpoint): New, based on set_breakpoint_at.
6592 (set_breakpoint_at): Reimplement.
6593 (delete_raw_breakpoint): Go through the_target->remove_point
6594 instead of assuming memory breakpoints.
6595 (find_gdb_breakpoint_at): Delete.
6596 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6597 (find_gdb_breakpoint): New function.
6598 (set_gdb_breakpoint_at): Delete.
6599 (z_type_supported): New function.
6600 (set_gdb_breakpoint_1): New function, loosely based off
6601 set_gdb_breakpoint_at.
6602 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6603 (delete_gdb_breakpoint_at): Delete.
6604 (delete_gdb_breakpoint_1): New function, loosely based off
6605 delete_gdb_breakpoint_at.
6606 (delete_gdb_breakpoint): New function.
6607 (clear_gdb_breakpoint_conditions): Rename to ...
6608 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6609 breakpoint.
6610 (add_condition_to_breakpoint): Make static.
6611 (add_breakpoint_condition): Take a struct breakpoint pointer
6612 instead of an address. Adjust.
6613 (gdb_condition_true_at_breakpoint): Rename to ...
6614 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6615 z_type parameter.
6616 (gdb_condition_true_at_breakpoint): Reimplement.
6617 (add_breakpoint_commands): Take a struct breakpoint pointer
6618 instead of an address. Adjust.
6619 (gdb_no_commands_at_breakpoint): Rename to ...
6620 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6621 parameter. Return true if no breakpoint was found. Change debug
6622 output.
6623 (gdb_no_commands_at_breakpoint): Reimplement.
6624 (run_breakpoint_commands): Rename to ...
6625 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6626 and change return type to boolean.
6627 (run_breakpoint_commands): New function.
6628 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6629 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6630 breakpoint. Go through the_target->remove_point instead of
6631 assuming memory breakpoint.
6632 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6633 software and hardware breakpoints.
6634 (reinsert_raw_breakpoint): Go through the_target->insert_point
6635 instead of assuming memory breakpoint.
6636 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6637 software and hardware breakpoints.
6638 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6639 Check both software and hardware breakpoints.
6640 (validate_inserted_breakpoint): Assert the breakpoint is a
6641 software breakpoint. Set the inserted flag to -1 instead of
6642 setting shlib_disabled.
6643 (delete_disabled_breakpoints): Adjust.
6644 (validate_breakpoints): Only validate software breakpoints.
6645 Adjust to inserted flag change.
6646 (check_mem_read, check_mem_write): Skip breakpoint types other
6647 than software breakpoints. Adjust to inserted flag change.
6648 * mem-break.h (enum raw_bkpt_type): New enum.
6649 (raw_breakpoint, struct process_info): Forward declare.
6650 (Z_packet_to_target_hw_bp_type): Delete declaration.
6651 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6652 (set_gdb_breakpoint, delete_gdb_breakpoint)
6653 (clear_breakpoint_conditions): New declarations.
6654 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6655 (breakpoint_inserted_here): Update comment.
6656 (add_breakpoint_condition, add_breakpoint_commands): Replace
6657 address parameter with a breakpoint pointer parameter.
6658 (gdb_breakpoint_here): Update comment.
6659 (delete_gdb_breakpoint_at): Delete.
6660 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6661 * server.c (process_point_options): Take a struct breakpoint
6662 pointer instead of an address. Adjust.
6663 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6664 delete_gdb_breakpoint.
6665 * spu-low.c (spu_target_ops): Install NULL as
6666 supports_z_point_type method.
6667 * target.h: Include mem-break.h.
6668 (struct target_ops) <prepare_to_access_memory>: Update comment.
6669 <supports_z_point_type>: New field.
6670 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6671 instead of a char. Also take a raw breakpoint pointer.
6672 * win32-arm-low.c (the_low_target): Install NULL as
6673 supports_z_point_type.
6674 * win32-i386-low.c (i386_supports_z_point_type): New function.
6675 (i386_insert_point, i386_remove_point): Adjust to new interface.
6676 (the_low_target): Install i386_supports_z_point_type.
6677 * win32-low.c (win32_supports_z_point_type): New function.
6678 (win32_insert_point, win32_remove_point): Adjust to new interface.
6679 (win32_target_ops): Install win32_supports_z_point_type.
6680 * win32-low.h (struct win32_target_ops):
6681 <supports_z_point_type>: New method.
6682 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6683 instead of a char. Also take a raw breakpoint pointer.
6684
6685 2014-05-20 Pedro Alves <palves@redhat.com>
6686
6687 * mem-break.h: Include break-common.h.
6688 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6689 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6690 (Z_packet_to_target_hw_bp_type): New declaration.
6691 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6692 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6693 (Z_PACKET_ACCESS_WP): Delete macros.
6694 (Z_packet_to_hw_type): Delete function.
6695 * i386-low.h: Don't include break-common.h here.
6696 (Z_packet_to_hw_type): Delete declaration.
6697 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6698 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6699 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6700 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6701 * linux-aarch64-low.c: Don't include break-common.h here.
6702 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6703 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6704 (Z_packet_to_target_hw_bp_type): Delete function.
6705 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6706 function.
6707 (mips_insert_point, mips_remove_point): Use
6708 Z_packet_to_target_hw_bp_type.
6709
6710 2014-05-20 Pedro Alves <palves@redhat.com>
6711
6712 * linux-aarch64-low.c: Include break-common.h.
6713 (enum target_point_type): Delete.
6714 (Z_packet_to_point_type): Rename to ...
6715 (Z_packet_to_target_hw_bp_type): ... this, and return a
6716 target_hw_bp_type instead.
6717 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6718 instead of an enum target_point_type.
6719 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6720 breakpoint type.
6721 (aarch64_dr_state_insert_one_point)
6722 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6723 (aarch64_handle_aligned_watchpoint)
6724 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6725 Take an enum target_hw_bp_type instead of an enum
6726 target_point_type.
6727 (aarch64_supports_z_point_type): New function.
6728 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6729 use Z_packet_to_target_hw_bp_type.
6730
6731 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6732
6733 * configure.ac: Only use -Werror by default when DEVELOPMENT
6734 is true.
6735 * configure: Regenerate.
6736
6737 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6738
6739 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6740 * linux-x86-low.c (X86_64_USER_REGS): New.
6741 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6742
6743 2014-04-28 Yao Qi <yao@codesourcery.com>
6744
6745 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6746 name.
6747
6748 2014-04-25 Pedro Alves <palves@redhat.com>
6749
6750 PR server/16255
6751 * linux-low.c (linux_attach_fail_reason_string): New function.
6752 (linux_attach_lwp): Delete.
6753 (linux_attach_lwp_1): Rename to ...
6754 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6755 argument. Remove "initial" parameter. Return int instead of
6756 void. Don't error or warn here.
6757 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6758 failure to attach to the tgid. Call warning when failing to
6759 attach to an lwp.
6760 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6761 argument. Remove "initial" parameter. Return int instead of
6762 void. Don't error or warn here.
6763 (linux_attach_fail_reason_string): New declaration.
6764 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6765 interface change. Use linux_attach_fail_reason_string.
6766
6767 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6768 Walfred Tedeschi <walfred.tedeschi@intel.com>
6769
6770 * Makefile.in: Added rules to handle new files
6771 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6772 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6773 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6774 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6775 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6776 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6777 x32-avx512-linux.o.
6778 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6779 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6780 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6781 i386/x32-avx512.xml.
6782 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6783 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6784 i386/x32-avx512-linux.xml.
6785 * i387-fp.c (num_avx512_k_registers): New constant for number
6786 of K registers.
6787 (num_avx512_zmmh_low_registers): New constant for number of
6788 lower ZMM registers (0-15).
6789 (num_avx512_zmmh_high_registers): New constant for number of
6790 higher ZMM registers (16-31).
6791 (num_avx512_ymmh_registers): New contant for number of higher
6792 YMM registers (ymm16-31 added by avx521 on x86_64).
6793 (num_avx512_xmm_registers): New constant for number of higher
6794 XMM registers (xmm16-31 added by AVX512 on x86_64).
6795 (struct i387_xsave): Add space for AVX512 registers.
6796 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6797 Add code to handle AVX512 registers.
6798 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6799 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6800 prototypei from generated file.
6801 (tdesc_amd64_avx512_linux): Likewise.
6802 (init_registers_x32_avx512_linux): Likewise.
6803 (tdesc_x32_avx512_linux): Likewise.
6804 (init_registers_i386_avx512_linux): Likewise.
6805 (tdesc_i386_avx512_linux): Likewise.
6806 (x86_64_regmap): Add AVX512 registers.
6807 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6808 mask.
6809 (initialize_low_arch): Add code to initialize AVX512 registers.
6810
6811 2014-04-23 Pedro Alves <palves@redhat.com>
6812
6813 * mem-break.c (find_gdb_breakpoint_at): Make static.
6814 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6815
6816 2014-04-23 Pedro Alves <palves@redhat.com>
6817
6818 * i386-low.c: Don't include break-common.h here.
6819 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6820 prototype to take target_hw_bp_type as argument instead of a Z
6821 packet char.
6822 * i386-low.h: Include break-common.h here.
6823 (Z_packet_to_hw_type): Declare.
6824 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6825 prototypes.
6826 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6827 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6828 (x86_remove_point): Convert the packet number to a
6829 target_hw_bp_type before calling i386_low_remove_watchpoint.
6830 * win32-i386-low.c (i386_insert_point): Convert the packet number
6831 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6832 (i386_remove_point): Convert the packet number to a
6833 target_hw_bp_type before calling i386_low_remove_watchpoint.
6834
6835 2014-04-23 Pedro Alves <palves@redhat.com>
6836
6837 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6838
6839 2014-04-10 Pedro Alves <palves@redhat.com>
6840
6841 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6842 Check if the condition or command is NULL before checking if the
6843 breakpoint is known. On success, return true.
6844 * mem-break.h (add_breakpoint_condition): Document return.
6845 (add_breakpoint_commands): Add describing comment.
6846 * server.c (skip_to_semicolon): New function.
6847 (process_point_options): Use it.
6848
6849 2014-04-09 Pedro Alves <palves@redhat.com>
6850
6851 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6852 to lwpid_of.
6853
6854 2014-02-27 Pedro Alves <palves@redhat.com>
6855
6856 PR 12702
6857 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6858 macros.
6859 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6860 output.
6861 (last_thread_of_process_p): Take a PID argument instead of a
6862 thread pointer.
6863 (linux_wait_for_lwp): Delete.
6864 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6865 functions.
6866 (linux_low_filter_event): New function, party factored out from
6867 linux_wait_for_event.
6868 (linux_wait_for_event): Rename to ...
6869 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6870 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6871 sigsuspend. Check for zombie leaders.
6872 (linux_wait_for_event): Reimplement as wrapper around
6873 linux_wait_for_event_filtered.
6874 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6875 a normal or signal exit is seen, it's the whole process exiting.
6876 (wait_for_sigstop): No longer a for_each_inferior callback.
6877 Rewrite on top of linux_wait_for_event_filtered.
6878 (stop_all_lwps): Call wait_for_sigstop directly.
6879 * server.c (resume, handle_target_event): Handle
6880 TARGET_WAITKIND_NO_RESUMED.
6881
6882 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6883
6884 * win32-low.c (psapi_get_dll_name,
6885 * win32_CreateToolhelp32Snapshot): Delete.
6886 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6887 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6888 Delete.
6889 (handle_load_dll): Add function description.
6890 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6891
6892 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6893
6894 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6895 Add comment.
6896 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6897 base address when calling win32_add_one_solib.
6898 (handle_load_dll): Delete local variable load_addr.
6899 Remove 0x1000 offset applied to DLL base address when calling
6900 win32_add_one_solib.
6901 (handle_unload_dll): Add comment.
6902
6903 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6904
6905 * win32-low.c (win32_add_all_dlls): Renames
6906 win32_ensure_ntdll_loaded. Rewrite function documentation.
6907 Adjust implementation to always load all DLLs.
6908 Add 0x1000 offset to DLL base address when calling
6909 win32_add_one_solib.
6910 (child_initialization_done): New static global.
6911 (do_initial_child_stuff): Set child_initialization_done to
6912 zero during child initialization, and 1 after. Replace call
6913 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6914 Add comment.
6915 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6916 (handle_unload_dll): Add function documentation.
6917 (get_child_debug_event): Ignore load and unload DLL events
6918 during child initialization.
6919
6920 2014-02-20 Doug Evans <dje@google.com>
6921
6922 Remove global all_lwps.
6923 * inferiors.h (ptid_of): Move here from linux-low.h.
6924 (pid_of, lwpid_of): Ditto.
6925 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6926 parameter is a struct thread_info * now.
6927 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6928 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6929 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6930 directly.
6931 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6932 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6933 * linux-arm-low.c (update_registers_callback): Update, "entry"
6934 parameter is a struct thread_info * now.
6935 Fetch lwpid from current_inferior directly.
6936 (arm_insert_point): Pass &all_threads to find_inferior instead of
6937 &all_lwps.
6938 (arm_remove_point): Ditto.
6939 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6940 (arm_prepare_to_resume): Fetch pid from thread.
6941 (arm_read_description): Fetch lwpid from current_inferior directly.
6942 * linux-low.c (all_lwps): Delete.
6943 (delete_lwp): Delete call to remove_inferior.
6944 (handle_extended_wait): Fetch lwpid from thread.
6945 (add_lwp): Don't set lwp->entry.id. Remove call to
6946 add_inferior_to_list.
6947 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6948 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6949 (kill_one_lwp_callback): Ditto.
6950 (linux_kill): Don't dereference NULL pointer.
6951 Fetch ptid,lwpid from thread.
6952 (get_detach_signal): Fetch ptid from thread.
6953 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6954 Simplify call to regcache_invalidate_thread.
6955 (delete_lwp_callback): Update, "entry" parameter is a
6956 struct thread_info * now. Fetch pid from thread.
6957 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6958 (status_pending_p_callback): Update, "entry" parameter is a
6959 struct thread_info * now. Fetch ptid from thread.
6960 (find_lwp_pid): Update, "entry" parameter is a
6961 struct thread_info * now.
6962 (linux_wait_for_lwp): Fetch pid from thread.
6963 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6964 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6965 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6966 (dequeue_one_deferred_signal): Ditto.
6967 (cancel_breakpoint): Fetch ptid from current_inferior.
6968 (linux_wait_for_event): Pass &all_threads to find_inferior,
6969 not &all_lwps. Fetch ptid, lwpid from thread.
6970 (count_events_callback): Update, "entry" parameter is a
6971 struct thread_info * now.
6972 (select_singlestep_lwp_callback): Ditto.
6973 (select_event_lwp_callback): Ditto.
6974 (cancel_breakpoints_callback): Ditto.
6975 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6976 not &all_lwps.
6977 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6978 (unsuspend_one_lwp): Update, "entry" parameter is a
6979 struct thread_info * now.
6980 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6981 not &all_lwps.
6982 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6983 Fetch lwpid from thread, not lwp.
6984 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6985 Pass &all_threads to find_inferior, not &all_lwps.
6986 (send_sigstop): Fetch lwpid from thread, not lwp.
6987 (send_sigstop_callback): Update, "entry" parameter is a
6988 struct thread_info * now.
6989 (suspend_and_send_sigstop_callback): Ditto.
6990 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6991 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6992 struct thread_info * now.
6993 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6994 from thread, lwp.
6995 (lwp_running): Update, "entry" parameter is a
6996 struct thread_info * now.
6997 (stop_all_lwps): Fetch ptid from thread.
6998 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6999 (linux_resume_one_lwp): Fetch lwpid from thread.
7000 (linux_set_resume_request): Update, "entry" parameter is a
7001 struct thread_info * now. Fetch pid, lwpid from thread.
7002 (resume_status_pending_p): Update, "entry" parameter is a
7003 struct thread_info * now.
7004 (need_step_over_p): Ditto. Fetch lwpid from thread.
7005 (start_step_over): Fetch lwpid from thread.
7006 (linux_resume_one_thread): Update, "entry" parameter is a
7007 struct thread_info * now. Fetch lwpid from thread.
7008 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7009 (proceed_one_lwp): Update, "entry" parameter is a
7010 struct thread_info * now. Fetch lwpid from thread.
7011 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7012 struct thread_info * now.
7013 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7014 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7015 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7016 directly.
7017 (regsets_store_inferior_registers): Ditto.
7018 (fetch_register, store_register): Ditto.
7019 (linux_read_memory, linux_write_memory): Ditto.
7020 (linux_request_interrupt): Ditto.
7021 (linux_read_auxv): Ditto.
7022 (linux_xfer_siginfo): Ditto.
7023 (linux_qxfer_spu): Ditto.
7024 (linux_qxfer_libraries_svr4): Ditto.
7025 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7026 moved to inferiors.h.
7027 (get_lwp): Delete.
7028 (get_thread_lwp): Update.
7029 (struct lwp_info): Delete member "entry". Simplify comment for
7030 member "thread".
7031 (all_lwps): Delete.
7032 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7033 current_inferior directly.
7034 (update_watch_registers_callback): Update, "entry" parameter is a
7035 struct thread_info * now. Fetch pid from thread.
7036 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7037 (mips_insert_point): Fetch lwpid from current_inferior.
7038 Pass &all_threads to find_inferior, not &all_lwps.
7039 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7040 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7041 directly.
7042 (mips_stopped_data_address): Ditto.
7043 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7044 directly.
7045 * linux-tile-low.c (tile_arch_setup): Ditto.
7046 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7047 (update_debug_registers_callback): Update, "entry" parameter is a
7048 struct thread_info * now. Fetch pid from thread.
7049 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7050 Pass &all_threads to find_inferior, not &all_lwps.
7051 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7052 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7053 Pass &all_threads to find_inferior, not &all_lwps.
7054 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7055 (i386_dr_low_get_status): Ditto.
7056 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7057 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7058 (x86_linux_read_description): Ditto.
7059 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7060
7061 2014-02-20 Doug Evans <dje@google.com>
7062
7063 * inferiors.c (get_first_inferior): Fix buglet.
7064
7065 2014-02-19 Doug Evans <dje@google.com>
7066
7067 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7068 * inferiors.c (add_thread): Change result type to struct thread_info *.
7069 All callers updated.
7070 (add_lwp): Call add_thread here instead of in callers.
7071 All callers updated.
7072 * linux-low.h (get_lwp_thread): Rewrite.
7073 (struct lwp_info): New member "thread".
7074
7075 2014-02-19 Doug Evans <dje@google.com>
7076
7077 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7078 All callers updated.
7079
7080 2014-02-19 Doug Evans <dje@google.com>
7081
7082 * inferiors.c (add_thread): Fix whitespace.
7083
7084 2014-02-19 Doug Evans <dje@google.com>
7085
7086 * dll.c (clear_dlls): Replace accessing list implemention details
7087 with API function.
7088 * gdbthread.h (get_first_thread): Declare.
7089 * inferiors.c (for_each_inferior_with_data): New function.
7090 (get_first_thread): New function.
7091 (find_thread_ptid): Simplify.
7092 (get_first_inferior): New function.
7093 (clear_list): Delete.
7094 (one_inferior_p): New function.
7095 (clear_inferior_list): New function.
7096 (clear_inferiors): Update.
7097 * inferiors.h (for_each_inferior_with_data): Declare.
7098 (clear_inferior_list): Declare.
7099 (one_inferior_p): Declare.
7100 (get_first_inferior): Declare.
7101 * linux-low.c (linux_wait_for_event): Replace accessing list
7102 implemention details with API function.
7103 * server.c (target_running): Ditto.
7104 (accumulate_file_name_length): New function.
7105 (emit_dll_description): New function.
7106 (handle_qxfer_libraries): Replace accessing list implemention
7107 details with API function.
7108 (handle_qxfer_threads_worker): New function.
7109 (handle_qxfer_threads_proper): Replace accessing list implemention
7110 details with API function.
7111 (handle_query): Ditto.
7112 (visit_actioned_threads_callback_ftype): New typedef.
7113 (visit_actioned_threads_data): New struct.
7114 (visit_actioned_threads): Rewrite to be find_inferior callback.
7115 (resume): Call find_inferior.
7116 (handle_status): Replace accessing list implemention
7117 details with API function.
7118 (process_serial_event): Replace accessing list implemention details
7119 with API function.
7120 * target.c (set_desired_inferior): Replace accessing list implemention
7121 details with API function.
7122 * tracepoint.c (same_process_p): New function.
7123 (gdb_agent_about_to_close): Replace accessing list implemention
7124 details with API function.
7125 * win32-low.c (child_delete_thread): Replace accessing list
7126 implemention details with API function.
7127 (match_dll_by_basename): New function.
7128 (dll_is_loaded_by_basename): New function.
7129 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7130 details call to dll_is_loaded_by_basename.
7131
7132 2014-02-19 Doug Evans <dje@google.com>
7133
7134 * dll.h (struct dll_info): Add comment.
7135 * gdbthread.h (struct thread_info): Add comment.
7136 (current_ptid): Simplify.
7137 * inferiors.c (add_process): Update.
7138 (remove_process): Update.
7139 * inferiors.h (struct process_info): Rename member "head" to "entry".
7140 * linux-low.c (delete_lwp): Update.
7141 (add_lwp): Update.
7142 (last_thread_of_process_p): Update.
7143 (kill_one_lwp_callback, linux_kill): Update.
7144 (status_pending_p_callback): Update.
7145 (wait_for_sigstop): Update. Simplify read of ptid.
7146 (start_step_over): Update.
7147 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7148 (get_lwp_thread): Update.
7149 (struct lwp_info): Rename member "head" to "entry".
7150 * regcache.h (inferior_list_entry): Delete.
7151 * server.c (kill_inferior_callback): Update.
7152 (detach_or_kill_inferior_callback): Update.
7153 (print_started_pid): Update.
7154 (print_attached_pid): Update.
7155 (process_serial_event): Simplify read of ptid.
7156 * thread-db.c (thread_db_create_event): Update.
7157 (thread_db_get_tls_address): Update.
7158 * win32-low.c (current_inferior_ptid): Simplify.
7159
7160 2014-02-19 Tom Tromey <tromey@redhat.com>
7161
7162 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7163 argument.
7164 (target_supports_btrace): Update.
7165
7166 2014-02-14 Yao Qi <yao@codesourcery.com>
7167
7168 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7169 (rsp-low-ipa.o): New target.
7170
7171 2014-02-12 Tom Tromey <tromey@redhat.com>
7172
7173 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7174 convert_ascii_to_int.
7175 * regcache.c (registers_to_string): Likewise.
7176 * remote-utils.c (decode_M_packet): Likewise.
7177 * server.c (process_serial_event): Likewise.
7178
7179 2014-02-12 Tom Tromey <tromey@redhat.com>
7180
7181 * server.c (handle_query, handle_v_run): Use hex2bin, not
7182 unhexify.
7183 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7184
7185 2014-02-12 Tom Tromey <tromey@redhat.com>
7186
7187 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7188 convert_int_to_ascii.
7189 * regcache.c (registers_to_string, collect_register_as_string):
7190 Likewise.
7191 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7192 Likewise.
7193 * server.c (process_serial_event): Likewise.
7194 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7195 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7196
7197 2014-02-12 Tom Tromey <tromey@redhat.com>
7198
7199 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7200 bin2hex, not hexify.
7201 * tracepoint.c (cmd_qtstatus): Likewise.
7202
7203 2014-02-12 Tom Tromey <tromey@redhat.com>
7204
7205 * remote-utils.c (monitor_output): Pass explicit length to
7206 hexify.
7207
7208 2014-02-12 Tom Tromey <tromey@redhat.com>
7209
7210 * tracepoint.c: Include rsp-low.h.
7211 * server.c: Include rsp-low.h.
7212 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7213 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7214 declare.
7215 * remote-utils.c: Include rsp-low.h.
7216 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7217 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7218 (convert_int_to_ascii, convert_ascii_to_int): Move to
7219 common/rsp-low.c.
7220 * regcache.c: Include rsp-low.h.
7221 * ax.c: Include rsp-low.h.
7222 * Makefile.in (SFILES): Add common/rsp-low.c.
7223 (OBS): Add rsp-low.o.
7224 (rsp-low.o): New target.
7225
7226 2014-02-12 Tom Tromey <tromey@redhat.com>
7227
7228 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7229 Include print-utils.h.
7230 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7231 (plongest, thirty_two, phex_nz): Remove.
7232 * Makefile.in (SFILES): Add common/print-utils.c.
7233 (OBS): Add print-utils.o.
7234 (print-utils-ipa.o): New target.
7235 (print-utils.o): New target.
7236 (IPA_OBJS): Add print-utils-ipa.o.
7237
7238 2014-02-06 Tom Tromey <tromey@redhat.com>
7239
7240 * Makefile.in (SFILES): Fix indentation.
7241
7242 2014-02-05 Doug Evans <dje@google.com>
7243
7244 * linux-low.c (linux_wait_for_event): Improve comment.
7245 (linux_wait_1): Keep current_inferior in sync with event_child.
7246
7247 2014-01-22 Doug Evans <dje@google.com>
7248
7249 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7250
7251 2014-01-22 Doug Evans <dje@google.com>
7252
7253 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7254 * configure: Regenerate.
7255 * config.in: Regenerate.
7256 * Makefile.in (SFILES): Add debug.c.
7257 (OBS): Add debug.o.
7258 * debug.c: New file.
7259 * debug.h: New file.
7260 * linux-aarch64-low.c (*): Update all debugging printfs to use
7261 debug_printf instead of fprintf.
7262 * linux-arm-low.c (*): Ditto.
7263 * linux-cris-low.c (*): Ditto.
7264 * linux-crisv32-low.c (*): Ditto.
7265 * linux-m32r-low.c (*): Ditto.
7266 * linux-sparc-low.c (*): Ditto.
7267 * linux-x86.c (*): Ditto.
7268 * linux-low.c (*): Ditto.
7269 (linux_wait_1): Add calls to debug_enter, debug_exit.
7270 (linux_wait): Remove redundant debugging printf.
7271 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7272 (linux_resume, unstop_all_lwps): Ditto.
7273 * mem-break.c (*): Update all debugging printfs to use
7274 debug_printf instead of fprintf.
7275 * remote-utils.c (*): Ditto.
7276 * thread-db.c (*): Ditto.
7277 * server.c #include <ctype.h>, "gdb_vecs.h".
7278 (debug_threads): Moved to debug.c.
7279 (*): Update all debugging printfs to use debug_printf instead of
7280 fprintf.
7281 (start_inferior): Replace call to fflush with call to debug_flush.
7282 (monitor_show_help): Mention set debug-format.
7283 (parse_debug_format_options): New function.
7284 (handle_monitor_command): Handle "monitor set debug-format".
7285 (gdbserver_usage): Mention --debug-format.
7286 (main): Parse --debug-format.
7287 * server.h (debug_threads): Declaration moved to debug.h.
7288 #include "debug.h".
7289 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7290 trace_debug_1 that uses debug_printf.
7291 (tracepoint_look_up_symbols): Update all debugging printfs to use
7292 debug_printf instead of fprintf.
7293
7294 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7295
7296 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7297 sys/ptrace.h.
7298
7299 2014-01-17 Pedro Alves <palves@redhat.com>
7300
7301 PR build/16445
7302 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7303 defined after including gdb_proc_service.h.
7304
7305 2014-01-16 Doug Evans <dje@google.com>
7306
7307 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7308 (match_dll): Use it.
7309
7310 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7311
7312 * target.h (target_ops) <read_btrace>: Change parameters and
7313 return type to allow error reporting.
7314 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7315 trace reading errors on.
7316 * linux-low.c (linux_low_read_btrace): Pass trace reading
7317 errors on.
7318 (linux_low_disable_btrace): New.
7319
7320 2014-01-15 Doug Evans <dje@google.com>
7321
7322 * inferiors.c (thread_id_to_gdb_id): Delete.
7323 * inferiors.h (thread_id_to_gdb_id): Delete.
7324
7325 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7326
7327 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7328 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7329 versions.
7330
7331 2014-01-08 Pedro Alves <palves@redhat.com>
7332
7333 * server.c (handle_status): Don't discard previous queued stop
7334 replies or thread's pending status here.
7335 (main) <disconnection>: Do it here instead.
7336
7337 2014-01-08 Pedro Alves <palves@redhat.com>
7338
7339 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7340 * server.c (visit_actioned_threads, handle_pending_status): New
7341 function.
7342 (handle_v_cont): Factor out parts to ...
7343 (resume): ... this new function. If in all-stop, and a thread
7344 being resumed has a pending status, report it without actually
7345 resuming.
7346 (myresume): Adjust to use the new 'resume' function.
7347 (clear_pending_status_callback, set_pending_status_callback)
7348 (find_status_pending_thread_callback): New functions.
7349 (handle_status): Handle the case of multiple threads having
7350 interesting statuses to report. Report threads' real last signal
7351 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7352 with an interesting thread to report the status for, instead of
7353 always reporting the status of the first thread.
7354
7355 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7356
7357 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7358 * gdbreplay.c (gdbreplay_version): Likewise.
7359
7360 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7361
7362 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7363 iov.iov_len with the real length in use.
7364
7365 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7366
7367 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7368 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7369 for all targets that use win32-low.c.
7370 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7371 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7372
7373 2013-12-13 Pedro Alves <palves@redhat.com>
7374
7375 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7376 if equal to TARGET_WAITKIND_LOADED.
7377 * win32-low.c (cached_status): New static global.
7378 (win32_wait): Add declaration.
7379 (do_initial_child_stuff): Flush all initial pending debug events
7380 up to the initial breakpoint.
7381 (win32_wait): If CACHED_STATUS was set, return that instead
7382 of doing a real wait. Remove the code resuming the execution
7383 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7384 during the initial phase. Also remove the code changing
7385 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7386 TARGET_WAITKIND_STOPPED.
7387
7388 2013-12-11 Yao Qi <yao@codesourcery.com>
7389
7390 * notif.c (handle_notif_ack): Return 0 if no notification
7391 matches.
7392
7393 2013-11-20 Doug Evans <dje@google.com>
7394
7395 * linux-low.c (linux_set_resume_request): Fix comment.
7396
7397 2013-11-20 Doug Evans <dje@google.com>
7398
7399 * linux-low.c (resume_status_pending_p): Tweak comment.
7400
7401 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7402
7403 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7404 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7405 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7406 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7407 (srv_amd64_regobj): Add amd64-mpx.o.
7408 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7409 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7410 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7411 * i387-fp.c (num_pl_bnd_register) Added constant.
7412 (num_pl_bnd_cfg_registers) Added constant.
7413 (struct i387_xsave) Added reserved area and MPX fields.
7414 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7415 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7416 function.
7417 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7418 (init_registers_amd64_mpx_linux): Declare new function.
7419 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7420 (x86_64_regmap): Add MPX registers.
7421 (x86_linux_read_description): Add MPX case.
7422 (initialize_low_arch): Initialize MPX targets.
7423
7424 2013-11-18 Tom Tromey <tromey@redhat.com>
7425
7426 * configure: Rebuild.
7427 * configure.ac: Don't check for stdlib.h.
7428 * gdbreplay.c: Unconditionally include stdlib.h.
7429
7430 2013-11-18 Tom Tromey <tromey@redhat.com>
7431
7432 * config.in: Rebuild.
7433 * configure: Rebuild.
7434 * configure.ac: Don't use AC_HEADER_DIRENT.
7435
7436 2013-11-18 Tom Tromey <tromey@redhat.com>
7437
7438 * server.h: Don't check HAVE_STRING_H.
7439 * gdbreplay.c: Don't check HAVE_STRING_H.
7440 * configure: Rebuild.
7441
7442 2013-11-18 Tom Tromey <tromey@redhat.com>
7443
7444 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7445 LIBGNU.
7446
7447 2013-11-08 Tom Tromey <tromey@redhat.com>
7448
7449 * configure, config.in: Rebuild.
7450 * configure.ac: Remove unused configury.
7451
7452 2013-11-08 Tom Tromey <tromey@redhat.com>
7453
7454 * acinclude.m4: Include common.m4, codeset.m4.
7455 * configure, config.in: Rebuild.
7456 * configure.ac: Use GDB_AC_COMMON.
7457
7458 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7459
7460 * linux-s390-low.c (HWCAP_S390_TE): New define.
7461 (s390_arch_setup): Consider the TE field in the HWCAP for
7462 determining 'have_regset_tdb'.
7463
7464 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7465
7466 PR gdb/16014
7467 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7468 call to sizeof.
7469
7470 2013-10-02 Pedro Alves <palves@redhat.com>
7471
7472 * server.c (process_serial_event): Don't output "GDBserver
7473 exiting" if GDB is connected through stdio.
7474 * target.c (mywait): Likewise, be silent if GDB is connected
7475 through stdio.
7476
7477 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7478
7479 * lynx-low.c (lynx_add_threads_after_attach): New function.
7480 (lynx_attach): Remove call to add_thread. Add call to
7481 lynx_add_threads_after_attach instead.
7482
7483 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7484
7485 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7486 * config.in, configure: Regenerated.
7487
7488 2013-09-18 Yao Qi <yao@codesourcery.com>
7489
7490 PR server/15959
7491 * server.c (start_inferior): Clear 'resume_info'.
7492
7493 2013-09-16 Jiong Wang <jiwang@tilera.com>
7494
7495 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7496 for each register.
7497
7498 2013-09-16 Jiong Wang <jiwang@tilera.com>
7499
7500 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7501 linux-tile-low.o to srv_tgtobj.
7502
7503 2013-09-16 Will Newton <will.newton@linaro.org>
7504
7505 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7506 out regs.
7507
7508 2013-09-06 Pedro Alves <palves@redhat.com>
7509
7510 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7511 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7512 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7513 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7514 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7515 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7516
7517 2013-09-06 Pedro Alves <palves@redhat.com>
7518
7519 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7520 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7521
7522 2013-09-06 Pedro Alves <palves@redhat.com>
7523
7524 * linux-amd64-ipa.c: Include tracepoint.h.
7525 * linux-i386-ipa.c: Include tracepoint.h.
7526
7527 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7528
7529 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7530 (ps_get_thread_area): New function.
7531
7532 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7533
7534 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7535 (initialize_low_arch): Call init_registers_crisv32 rather than
7536 init_register_crisv32.
7537
7538 2013-09-05 Pedro Alves <palves@redhat.com>
7539
7540 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7541 to ...
7542 * hostio.h: ... this new file.
7543 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7544 win32-low.c: Include hostio.h.
7545
7546 2013-09-05 Pedro Alves <palves@redhat.com>
7547
7548 * server.h (gdb_client_data, handler_func, callback_handler_func)
7549 (delete_file_handler, add_file_handler, append_callback_event)
7550 (delete_callback_event, start_event_loop, initialize_event_loop):
7551 Move to event-loop.h and include it.
7552 * event-loop.h: New file.
7553
7554 2013-09-05 Pedro Alves <palves@redhat.com>
7555
7556 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7557 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7558 (loaded_dll, unloaded_dll): Move to ...
7559 * dll.h: ... this new file.
7560 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7561
7562 2013-09-05 Pedro Alves <palves@redhat.com>
7563
7564 * server.h (current_process, get_thread_process, all_processes)
7565 (add_inferior_to_list, for_each_inferior, current_inferior)
7566 (remove_inferior, add_process, remove_process, find_process_pid)
7567 (have_started_inferiors_p, have_attached_inferiors_p)
7568 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7569 (clear_inferiors, find_inferior, find_inferior_id)
7570 (inferior_target_data, set_inferior_target_data)
7571 (inferior_regcache_data, set_inferior_regcache_data): Move to
7572 inferiors.h, and include it.
7573 * inferiors.h: New file.
7574
7575 2013-09-05 Pedro Alves <palves@redhat.com>
7576
7577 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7578 Move ...
7579 * ax.h: ... here.
7580
7581 2013-09-05 Pedro Alves <palves@redhat.com>
7582
7583 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7584 tracepoint.h.
7585 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7586 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7587 (handle_tracepoint_general_set, handle_tracepoint_query)
7588 (tracepoint_finished_step, tracepoint_was_hit)
7589 (release_while_stepping_state_list, current_traceframe)
7590 (in_readonly_region, traceframe_read_mem)
7591 (fetch_traceframe_registers, traceframe_read_sdata)
7592 (traceframe_read_info, struct fast_tpoint_collect_status)
7593 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7594 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7595 (supply_fast_tracepoint_registers)
7596 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7597 (ipa_tdesc, claim_trampoline_space)
7598 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7599 (agent_mem_read, agent_get_trace_state_variable_value)
7600 (agent_set_trace_state_variable_value, agent_tsv_read)
7601 (agent_mem_read_string, get_raw_reg_func_addr)
7602 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7603 * tracepoint.h: ... this new file.
7604
7605 2013-09-05 Pedro Alves <palves@redhat.com>
7606
7607 * server.h (perror_with_name, error, fatal, warning, paddress)
7608 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7609 include it.
7610 * utils.h: New file.
7611
7612 2013-09-05 Pedro Alves <palves@redhat.com>
7613
7614 * server.h (remote_debug, noack_mode, transport_is_reliable)
7615 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7616 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7617 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7618 (write_enn, initialize_async_io, enable_async_io)
7619 (disable_async_io, check_remote_input_interrupt_request)
7620 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7621 (dead_thread_notify, prepare_resume_reply)
7622 (decode_address_to_semicolon, decode_address, decode_m_packet)
7623 (decode_M_packet, decode_X_packet, decode_xfer_write)
7624 (decode_search_memory_packet, unhexify, hexify)
7625 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7626 (look_up_one_symbol, relocate_instruction)
7627 (monitor_output): Move to remote-utils.h, and include it.
7628 * remote-utils.h: New file.
7629
7630 2013-09-05 Pedro Alves <palves@redhat.com>
7631
7632 * server.h (_): Delete.
7633
7634 2013-09-02 Pedro Alves <palves@redhat.com>
7635
7636 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7637 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7638 allocated.
7639 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7640
7641 2013-09-02 Pierre Muller <muller@sourceware.org>
7642
7643 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7644 or WriteProcessMemory complete successfully and handle
7645 ERROR_PARTIAL_COPY error.
7646
7647 2013-09-02 Pedro Alves <palves@redhat.com>
7648
7649 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7650 error instead of EIO.
7651
7652 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7653
7654 PR server/15604
7655 * linux-low.c: Include filestuff.h.
7656 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7657 * lynx-low.c: Include filestuff.h.
7658 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7659 * server.c: Include filestuff.h.
7660 (main): Call notice_open_fds.
7661 * spu-low.c: Include filestuff.h.
7662 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7663
7664 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7665
7666 * Makefile.in: Explain why ../target and ../nat are not
7667 listed as include file search paths.
7668 (linux-waitpid.o): New object file rule.
7669 * configure.srv (srv_native_linux_obj): New variable.
7670 Replace all occurrences of linux native object files with
7671 $srv_native_linux_obj.
7672 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7673 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7674 (linux_enable_event_reporting): Remove declaration.
7675 (my_waitpid): Moved to common/linux-waitpid.c.
7676 (linux_wait_for_event): Pass ptid when calling
7677 linux_enable_event_reporting.
7678 (linux_supports_tracefork_flag): Remove.
7679 (linux_enable_event_reporting): Likewise.
7680 (linux_tracefork_grandchild): Remove.
7681 (STACK_SIZE): Moved to common/linux-ptrace.c.
7682 (linux_tracefork_child): Remove.
7683 (linux_test_for_tracefork): Remove.
7684 (linux_look_up_symbols): Call linux_supports_traceclone.
7685 (initialize_low): Remove call to linux_test_for_tracefork.
7686 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7687 common/linux-ptrace.h.
7688 (PTRACE_TYPE_ARG4): Likewise.
7689 Include linux-ptrace.h.
7690
7691 2013-08-21 Pedro Alves <palves@redhat.com>
7692
7693 * config.in: Renegerate.
7694
7695 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7696
7697 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7698 (SFILES): Remove $(srcdir)/common/target-common.c and
7699 add $(srcdir)/target/waitstatus.c.
7700 (OBS): Remove target-common.o and add waitstatus.o.
7701 (server_h): Remove $(srcdir)/../common/target-common.h and
7702 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7703 and $(srcdir)/../target/waitstatus.h.
7704 (target-common.o): Remove.
7705 (waitstatus.o): New target object file.
7706 * target.h: Do not include target-common.h and
7707 include target/resume.h, target/wait.h and
7708 target/waitstatus.h.
7709
7710 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7711
7712 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7713 to PTRACE_TYPE_ARG3.
7714 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7715 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7716 PTRACE_TYPE_ARG4.
7717 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7718 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7719
7720 2013-07-27 Jie Zhang <jie@codesourcery.com>
7721 Daniel Jacobowitz <dan@codesourcery.com>
7722 Yao Qi <yao@codesourcery.com>
7723
7724 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7725 (mips-linux-watch.o): New rule.
7726 (mips_linux_watch_h): New variable.
7727 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7728 srv_tgtobj.
7729 * linux-mips-low.c: Include mips-linux-watch.h.
7730 (struct arch_process_info, struct arch_lwp_info): New.
7731 (update_watch_registers_callback): New function.
7732 (mips_linux_new_process, mips_linux_new_thread) New functions.
7733 (mips_linux_prepare_to_resume, mips_insert_point): New
7734 functions.
7735 (mips_remove_point, mips_stopped_by_watchpoint): New
7736 functions.
7737 (rsp_bp_type_to_target_hw_bp_type): New function.
7738 (mips_stopped_data_address): New function.
7739 (the_low_target): Add watchpoint support functions.
7740
7741 2013-07-27 Yao Qi <yao@codesourcery.com>
7742
7743 * i386-low.c: Include break-common.h.
7744 (enum target_hw_bp_type): Remove.
7745
7746 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7747
7748 * Makefile.in (SFILES): /common/target-common.c.
7749 (OBS): Add target-common.o.
7750 (server_h): Add $(srcdir)/../common/target-common.h.
7751 (target-common.o): New target.
7752 * server.c (queue_stop_reply_callback): Free
7753 status string after use.
7754 * target.c (target_waitstatus_to_string): Remove.
7755 * target.h: Include target-common.h.
7756 (resume_kind): Likewise.
7757 (target_waitkind): Likewise.
7758 (target_waitstatus): Likewise.
7759 (TARGET_WNOHANG): Likewise.
7760
7761 2013-07-04 Yao Qi <yao@codesourcery.com>
7762
7763 * Makefile.in (host_alias): Use @host_noncanonical@.
7764 (target_alias): Use @target_noncanonical@.
7765 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7766 ACX_NONCANONICAL_HOST.
7767 * configure: Regenerated.
7768
7769 Revert:
7770 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7771
7772 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7773 * configure: Rebuild.
7774 * Makefile.in (version_host, version_target): Get from configure.
7775 (version.c): Use $(version_host) and $(version_target).
7776
7777 2013-07-03 Pedro Alves <palves@redhat.com>
7778
7779 * Makefile.in (config.status): Depend on development.sh.
7780 * acinclude.m4: Include libmcheck.m4.
7781 * configure: Regenerate.
7782
7783 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7784
7785 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7786 attribute inside the parentheses.
7787 (winapi_DebugSetProcessKillOnExit): Ditto.
7788 (winapi_DebugBreakProcess): Ditto.
7789 (winapi_GenerateConsoleCtrlEvent): Ditto.
7790
7791 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7792
7793 * notif.h (notif_event): Add a dummy member to avoid compiler
7794 errors.
7795
7796 2013-07-01 Pedro Alves <palves@redhat.com>
7797
7798 * hostio.c (HOSTIO_PATH_MAX): Define.
7799 (require_filename, handle_open, handle_unlink, handle_readlink):
7800 Use it.
7801
7802 2013-07-01 Pedro Alves <palves@redhat.com>
7803
7804 * server.h: Include "pathmax.h".
7805 * linux-low.c: Don't include sys/param.h.
7806 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7807 MAXPATHLEN.
7808 * win32-low.c: Don't include sys/param.h.
7809 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7810
7811 2013-07-01 Pedro Alves <palves@redhat.com>
7812
7813 * event-loop.c: Don't check HAVE_UNISTD_H before including
7814 <unistd.h>.
7815 * gdbreplay.c: Likewise.
7816 * remote-utils.c: Likewise.
7817 * server.c: Likewise.
7818 * configure.ac: Don't check for unistd.h.
7819 * configure: Regenerate.
7820
7821 2013-06-28 Tom Tromey <tromey@redhat.com>
7822
7823 * Makefile.in (version.c): Use version.in, not
7824 common/version.in.
7825
7826 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7827
7828 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7829 * configure: Rebuild.
7830 * Makefile.in (version_host, version_target): Get from configure.
7831 (version.c): Use $(version_host) and $(version_target).
7832
7833 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7834
7835 Fix trace-status to output user name without trailing colon.
7836 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7837
7838 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7839
7840 Fix trace-status to output proper start-time and stop-time.
7841 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7842 output start time and stop time in hex as gdb expects.
7843
7844 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7845
7846 * tracepoint.c (build_traceframe_info_xml): Output trace state
7847 variables present in the trace buffer.
7848
7849 2013-06-24 Tom Tromey <tromey@redhat.com>
7850
7851 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7852 create-version.sh.
7853 (version.o): Remove.
7854 * gdbreplay.c: Include version.h.
7855 (version, host_name): Don't declare.
7856 * server.h: Include version.h.
7857 (version, host_name): Don't declare.
7858
7859 2013-06-12 Pedro Alves <palves@redhat.com>
7860
7861 * linux-x86-low.c (linux_is_elf64): Delete global.
7862 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7863 with local linux_pid_exe_is_elf_64_file use.
7864
7865 2013-06-11 Pedro Alves <palves@redhat.com>
7866
7867 * linux-low.c (regset_disabled, disable_regset): New functions.
7868 (regsets_fetch_inferior_registers)
7869 (regsets_store_inferior_registers): Use them.
7870 (initialize_regsets_info); Don't allocate the disabled_regsets
7871 array here.
7872 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7873 comment.
7874
7875 2013-06-11 Pedro Alves <palves@redhat.com>
7876
7877 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7878 xmalloc.
7879
7880 2013-06-11 Pedro Alves <palves@redhat.com>
7881
7882 * linux-x86-low.c (initialize_low_arch): Call
7883 init_registers_x32_avx_linux.
7884
7885 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7886
7887 Fix compatibility with Android Bionic.
7888 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7889 it is not empty.
7890
7891 2013-06-07 Pedro Alves <palves@redhat.com>
7892
7893 PR server/14823
7894 * Makefile.in (OBS): Add tdesc.o.
7895 (IPA_OBJS): Add tdesc-ipa.o.
7896 (tdesc-ipa.o): New rule.
7897 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7898 interface.
7899 * linux-low.c (new_inferior): Delete.
7900 (disabled_regsets, num_regsets): Delete.
7901 (linux_add_process): Adjust to set the new per-process
7902 new_inferior flag.
7903 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7904 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7905 was a stop. When calling arch_setup, switch the current inferior
7906 to the thread that got an event.
7907 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7908 (regsets_fetch_inferior_registers)
7909 (regsets_store_inferior_registers): New regsets_info parameter.
7910 Adjust to use it.
7911 (linux_register_in_regsets): New regs_info parameter. Adjust to
7912 use it.
7913 (register_addr, fetch_register, store_register): New usrregs_info
7914 parameter. Adjust to use it.
7915 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7916 parameter regs_info. Adjust to use it.
7917 (linux_fetch_registers): Get the current inferior's regs_info, and
7918 adjust to use it.
7919 (linux_store_registers): Ditto.
7920 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7921 (initialize_low): Don't initialize the target_regsets here. Call
7922 initialize_low_arch.
7923 * linux-low.h (target_regsets): Delete declaration.
7924 (struct regsets_info): New.
7925 (struct usrregs_info): New.
7926 (struct regs_info): New.
7927 (struct process_info_private) <new_inferior>: New field.
7928 (struct linux_target_ops): Delete the num_regs, regmap, and
7929 regset_bitmap fields. New field regs_info.
7930 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7931 * i387-fp.c (num_xmm_registers): Delete.
7932 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7933 calls to new interface.
7934 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7935 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7936 Infer the number of xmm registers from the regcache's target
7937 description.
7938 * i387-fp.h (num_xmm_registers): Delete.
7939 * inferiors.c (add_thread): Don't install the thread's regcache
7940 here.
7941 * proc-service.c (gregset_info): Fetch the current inferior's
7942 regs_info. Adjust to use it.
7943 * regcache.c: Include tdesc.h.
7944 (register_bytes, reg_defs, num_registers)
7945 (gdbserver_expedite_regs): Delete.
7946 (get_thread_regcache): If the thread doesn't have a regcache yet,
7947 create one, instead of aborting gdbserver.
7948 (regcache_invalidate_one): Rename to ...
7949 (regcache_invalidate_thread): ... this.
7950 (regcache_invalidate_one): New.
7951 (regcache_invalidate): Only invalidate registers of the current
7952 process.
7953 (init_register_cache): Add target_desc parameter, and use it.
7954 (new_register_cache): Ditto. Assert the target description has a
7955 non zero registers_size.
7956 (regcache_cpy): Add assertions. Adjust.
7957 (realloc_register_cache, set_register_cache): Delete.
7958 (registers_to_string, registers_from_string): Adjust.
7959 (find_register_by_name, find_regno, find_register_by_number)
7960 (register_cache_size): Add target_desc parameter, and use it.
7961 (free_register_cache_thread, free_register_cache_thread_one)
7962 (regcache_release, register_cache_size): New.
7963 (register_size): Add target_desc parameter, and use it.
7964 (register_data, supply_register, supply_register_zeroed)
7965 (supply_regblock, supply_register_by_name, collect_register)
7966 (collect_register_as_string, collect_register_by_name): Adjust.
7967 * regcache.h (struct target_desc): Forward declare.
7968 (struct regcache) <tdesc>: New field.
7969 (init_register_cache, new_register_cache): Add target_desc
7970 parameter.
7971 (regcache_invalidate_thread): Declare.
7972 (regcache_invalidate_one): Delete declaration.
7973 (regcache_release): Declare.
7974 (find_register_by_number, register_cache_size, register_size)
7975 (find_regno): Add target_desc parameter.
7976 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7977 declarations.
7978 * remote-utils.c: Include tdesc.h.
7979 (outreg, prepare_resume_reply): Adjust.
7980 * server.c: Include tdesc.h.
7981 (gdbserver_xmltarget): Delete declaration.
7982 (get_features_xml, process_serial_event): Adjust.
7983 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7984 declare.
7985 (struct process_info) <tdesc>: New field.
7986 (ipa_tdesc): Declare.
7987 * tdesc.c: New file.
7988 * tdesc.h: New file.
7989 * tracepoint.c: Include tdesc.h.
7990 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7991 (get_context_regcache): Adjust to pass ipa_tdesc down.
7992 (do_action_at_tracepoint): Adjust to get the register cache size
7993 from the context regcache's description.
7994 (traceframe_walk_blocks): Adjust to get the register cache size
7995 from the current trace frame's description.
7996 (traceframe_get_pc): Adjust to get current trace frame's
7997 description and pass it down.
7998 (gdb_collect): Adjust to get the register cache size from the
7999 IPA's description.
8000 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8001 (gdbserver_xmltarget): Delete.
8002 (initialize_low_tracepoint): Set the ipa's target description.
8003 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8004 (initialize_low_tracepoint): Set the ipa's target description.
8005 * linux-x86-low.c: Include tdesc.h.
8006 [__x86_64__] (is_64bit_tdesc): New.
8007 (ps_get_thread_area, x86_get_thread_area): Use it.
8008 (i386_cannot_store_register): Rename to ...
8009 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8010 (i386_cannot_fetch_register): Rename to ...
8011 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8012 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8013 to new interface.
8014 (target_regsets): Rename to ...
8015 (x86_regsets): ... this.
8016 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8017 interface.
8018 (x86_siginfo_fixup): Use is_64bit_tdesc.
8019 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8020 (tdesc_x32_avx_linux, tdesc_x32_linux)
8021 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8022 Declare.
8023 (x86_linux_update_xmltarget): Delete.
8024 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8025 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8026 (AMD64_LINUX_USER64_CS): New.
8027 (x86_linux_read_description): New, based on
8028 x86_linux_update_xmltarget.
8029 (same_process_callback): New.
8030 (x86_arch_setup_process_callback): New.
8031 (x86_linux_update_xmltarget): New.
8032 (x86_regsets_info): New.
8033 (amd64_linux_regs_info): New.
8034 (i386_linux_usrregs_info): New.
8035 (i386_linux_regs_info): New.
8036 (x86_linux_regs_info): New.
8037 (x86_arch_setup): Reimplement.
8038 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8039 (x86_emit_ops): Ditto.
8040 (the_low_target): Adjust. Install x86_linux_regs_info,
8041 x86_cannot_fetch_register, and x86_cannot_store_register.
8042 (initialize_low_arch): New.
8043 * linux-ia64-low.c (tdesc_ia64): Declare.
8044 (ia64_fetch_register): Adjust.
8045 (ia64_usrregs_info, regs_info): New globals.
8046 (ia64_regs_info): New function.
8047 (the_low_target): Adjust.
8048 (initialize_low_arch): New function.
8049 * linux-sparc-low.c (tdesc_sparc64): Declare.
8050 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8051 Adjust.
8052 (sparc_arch_setup): New function.
8053 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8054 (the_low_target): Adjust.
8055 (initialize_low_arch): New function.
8056 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8057 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8058 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8059 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8060 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8061 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8062 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8063 (tdesc_powerpc_isa205_vsx64l): Declare.
8064 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8065 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8066 (ppc_set_pc, ppc_get_hwcap): Adjust.
8067 (ppc_usrregs_info): Forward declare.
8068 (!__powerpc64__) ppc_regmap_adjusted: New global.
8069 (ppc_arch_setup): Adjust to the current process'es target
8070 description.
8071 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8072 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8073 (ppc_store_evrregset): Adjust.
8074 (target_regsets): Rename to ...
8075 (ppc_regsets): ... this, and make static.
8076 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8077 (ppc_regs_info): New function.
8078 (the_low_target): Adjust.
8079 (initialize_low_arch): New function.
8080 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8081 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8082 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8083 (tdesc_s390x_linux64v2): Declare.
8084 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8085 (s390_fill_gregset, s390_store_last_break): Adjust.
8086 (target_regsets): Rename to ...
8087 (s390_regsets): ... this, and make static.
8088 (s390_get_pc, s390_set_pc): Adjust.
8089 (s390_get_hwcap): New target_desc parameter, and use it.
8090 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8091 (s390_arch_setup): Adjust to set the current process'es target
8092 description. Don't adjust the regmap.
8093 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8094 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8095 (regs_info_3264): New globals.
8096 (s390_regs_info): New function.
8097 (the_low_target): Adjust.
8098 (initialize_low_arch): New function.
8099 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8100 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8101 [__mips64] (init_registers_mips_linux)
8102 (init_registers_mips_dsp_linux): Delete defines.
8103 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8104 (have_dsp): New global.
8105 (mips_read_description): New, based on mips_arch_setup.
8106 (mips_arch_setup): Reimplement.
8107 (get_usrregs_info): New function.
8108 (mips_cannot_fetch_register, mips_cannot_store_register)
8109 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8110 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8111 (target_regsets): Rename to ...
8112 (mips_regsets): ... this, and make static.
8113 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8114 (dsp_regs_info, regs_info): New globals.
8115 (mips_regs_info): New function.
8116 (the_low_target): Adjust.
8117 (initialize_low_arch): New function.
8118 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8119 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8120 Declare.
8121 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8122 (arm_read_description): New, with bits factored from
8123 arm_arch_setup.
8124 (arm_arch_setup): Reimplement.
8125 (target_regsets): Rename to ...
8126 (arm_regsets): ... this, and make static.
8127 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8128 (arm_regs_info): New function.
8129 (the_low_target): Adjust.
8130 (initialize_low_arch): New function.
8131 * linux-m68k-low.c (tdesc_m68k): Declare.
8132 (target_regsets): Rename to ...
8133 (m68k_regsets): ... this, and make static.
8134 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8135 (m68k_regs_info): New function.
8136 (m68k_arch_setup): New function.
8137 (the_low_target): Adjust.
8138 (initialize_low_arch): New function.
8139 * linux-sh-low.c (tdesc_sharch): Declare.
8140 (target_regsets): Rename to ...
8141 (sh_regsets): ... this, and make static.
8142 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8143 (sh_regs_info, sh_arch_setup): New functions.
8144 (the_low_target): Adjust.
8145 (initialize_low_arch): New function.
8146 * linux-bfin-low.c (tdesc_bfin): Declare.
8147 (bfin_arch_setup): New function.
8148 (bfin_usrregs_info, regs_info): New globals.
8149 (bfin_regs_info): New function.
8150 (the_low_target): Adjust.
8151 (initialize_low_arch): New function.
8152 * linux-cris-low.c (tdesc_cris): Declare.
8153 (cris_arch_setup): New function.
8154 (cris_usrregs_info, regs_info): New globals.
8155 (cris_regs_info): New function.
8156 (the_low_target): Adjust.
8157 (initialize_low_arch): New function.
8158 * linux-cris-low.c (tdesc_crisv32): Declare.
8159 (cris_arch_setup): New function.
8160 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8161 (cris_regs_info): New function.
8162 (the_low_target): Adjust.
8163 (initialize_low_arch): New function.
8164 * linux-m32r-low.c (tdesc_m32r): Declare.
8165 (m32r_arch_setup): New function.
8166 (m32r_usrregs_info, regs_info): New globals.
8167 (m32r_regs_info): Adjust.
8168 (initialize_low_arch): New function.
8169 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8170 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8171 (tic6x_usrregs_info): Forward declare.
8172 (tic6x_read_description): New function, based on ...
8173 (tic6x_arch_setup): ... this. Reimplement.
8174 (target_regsets): Rename to ...
8175 (tic6x_regsets): ... this, and make static.
8176 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8177 (tic6x_regs_info): New function.
8178 (the_low_target): Adjust.
8179 (initialize_low_arch): New function.
8180 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8181 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8182 (target_regsets): Rename to ...
8183 (xtensa_regsets): ... this, and make static.
8184 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8185 globals.
8186 (xtensa_arch_setup, xtensa_regs_info): New functions.
8187 (the_low_target): Adjust.
8188 (initialize_low_arch): New function.
8189 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8190 (nios2_arch_setup): Set the current process'es tdesc.
8191 (target_regsets): Rename to ...
8192 (nios2_regsets): ... this.
8193 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8194 (nios2_regs_info): New function.
8195 (the_low_target): Adjust.
8196 (initialize_low_arch): New function.
8197 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8198 (aarch64_arch_setup): Set the current process'es tdesc.
8199 (target_regsets): Rename to ...
8200 (aarch64_regsets): ... this.
8201 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8202 (aarch64_regs_info): New function.
8203 (the_low_target): Adjust.
8204 (initialize_low_arch): New function.
8205 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8206 globals.
8207 (target_regsets): Rename to ...
8208 (tile_regsets): ... this.
8209 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8210 (tile_regs_info): New function.
8211 (tile_arch_setup): Set the current process'es tdesc.
8212 (the_low_target): Adjust.
8213 (initialize_low_arch): New function.
8214 * spu-low.c (tdesc_spu): Declare.
8215 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8216 * win32-arm-low.c (tdesc_arm): Declare.
8217 (arm_arch_setup): New function.
8218 (the_low_target): Install arm_arch_setup instead of
8219 init_registers_arm.
8220 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8221 (init_windows_x86): Rename to ...
8222 (i386_arch_setup): ... this. Set `win32_tdesc'.
8223 (the_low_target): Adjust.
8224 * win32-low.c (win32_tdesc): New global.
8225 (child_add_thread): Don't create the thread cache here.
8226 (do_initial_child_stuff): Set the new process'es tdesc.
8227 * win32-low.h (struct target_desc): Forward declare.
8228 (win32_tdesc): Declare.
8229 * lynx-i386-low.c (tdesc_i386): Declare global.
8230 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8231 * lynx-low.c (lynx_tdesc): New global.
8232 (lynx_add_process): Set the new process'es tdesc.
8233 * lynx-low.h (struct target_desc): Forward declare.
8234 (lynx_tdesc): Declare global.
8235 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8236 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8237 * nto-low.c (nto_tdesc): New global.
8238 (do_attach): Set the new process'es tdesc.
8239 * nto-low.h (struct target_desc): Forward declare.
8240 (nto_tdesc): Declare.
8241 * nto-x86-low.c (tdesc_i386): Declare.
8242 (nto_x86_arch_setup): Set `nto_tdesc'.
8243
8244 2013-06-04 Gary Benson <gbenson@redhat.com>
8245
8246 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8247 to qSupported response when appropriate.
8248 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8249 with nonzero-length annex.
8250 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8251 arguments supplied in annex.
8252
8253 2013-05-31 Doug Evans <dje@google.com>
8254
8255 PR server/15594
8256 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8257 64 bits in 64-cross-32 environment.
8258
8259 2013-05-28 Pedro Alves <palves@redhat.com>
8260
8261 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8262 (aarch64-without-fpu.c): Delete rule.
8263 * configure.srv (aarch64*-*-linux*): Remove references to
8264 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8265 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8266 declaration.
8267
8268 2013-05-24 Pedro Alves <palves@redhat.com>
8269
8270 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8271 instead of strchr/decode_address. Error if the range isn't split
8272 with a ','. Don't assume there's be a ':' in the action.
8273
8274 2013-05-23 Yao Qi <yao@codesourcery.com>
8275 Pedro Alves <palves@redhat.com>
8276
8277 * linux-low.c (lwp_in_step_range): New function.
8278 (linux_wait_1): If the thread was range stepping and stopped
8279 outside the stepping range, report the stop to GDB. Otherwise,
8280 continue stepping. Add range stepping debug output.
8281 (linux_set_resume_request): Copy the step range from the resume
8282 request to the lwp.
8283 (linux_supports_range_stepping): New.
8284 (linux_target_ops) <supports_range_stepping>: Set to
8285 linux_supports_range_stepping.
8286 * linux-low.h (struct linux_target_ops)
8287 <supports_range_stepping>: New field.
8288 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8289 * linux-x86-low.c (x86_supports_range_stepping): New.
8290 (the_low_target) <supports_range_stepping>: Set to
8291 x86_supports_range_stepping.
8292 * server.c (handle_v_cont): Handle 'r' action.
8293 (handle_v_requests): Append ";r" if the target supports range
8294 stepping.
8295 * target.h (struct thread_resume) <step_range_start,
8296 step_range_end>: New fields.
8297 (struct target_ops) <supports_range_stepping>:
8298 New field.
8299 (target_supports_range_stepping): New macro.
8300
8301 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8302
8303 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8304 confusion in comment.
8305
8306 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8307
8308 * lynx-low.c (struct process_info_private): New type.
8309 (lynx_add_process): New function.
8310 (lynx_create_inferior, lynx_attach): Replace calls to
8311 add_process by calls to lynx_add_process.
8312 (lynx_resume): If PTID is null, then try using
8313 current_process()->private->last_wait_event_ptid.
8314 Add comments.
8315 (lynx_clear_inferiors): Delete. The contents of that function
8316 has been inlined in lynx_mourn;
8317 (lynx_wait_1): Save the ptid in the process's private data.
8318 (lynx_mourn): Free the process' private data. Replace call
8319 to lynx_clear_inferiors by call to clear_inferiors.
8320
8321 2013-05-17 Yao Qi <yao@codesourcery.com>
8322
8323 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8324 the right place.
8325
8326 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8327
8328 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8329 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8330 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8331 PT_TEXT_END_ADDR guards. Update comments.
8332 (linux_target_op) <read_offsets>: Conditionally define to
8333 linux_read_offsets if the target is UCLIBC and if it defines
8334 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8335
8336 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8337 Andrew Jenner <andrew@codesourcery.com>
8338
8339 * Makefile.in (SFILES): Add linux-nios2-low.c.
8340 (clean): Add action to delete nios2-linux.c.
8341 (nios2-linux.c): New rule.
8342 * configure.srv: Add nios2*-*-linux*.
8343 * linux-nios2-low.c: New.
8344
8345 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8346
8347 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8348
8349 2013-04-25 Hui Zhu <hui@codesourcery.com>
8350
8351 PR gdb/15186
8352 * ax.c (ax_printf): Add fflush.
8353
8354 2013-04-22 Tom Tromey <tromey@redhat.com>
8355
8356 * Makefile.in (SFILES): Add filestuff.c.
8357 (OBS): Add filestuff.o.
8358 (filestuff.o): New target.
8359 * config.in, configure: Rebuild.
8360 * configure.ac: Check for fdwalk, pipe2.
8361
8362 2013-04-17 Pedro Alves <palves@redhat.com>
8363
8364 * configure.ac (USE_THREAD_DB): Delete variable.
8365 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8366 Don't AC_SUBST USE_THREAD_DB.
8367 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8368 * config.in, configure: Regenerate.
8369
8370 2013-04-16 Pedro Alves <palves@redhat.com>
8371
8372 * linux-low.h (struct lwp_info) <thread_known>: Move under
8373 the USE_THREAD_DB #ifdef.
8374
8375 2013-04-16 Pedro Alves <palves@redhat.com>
8376
8377 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8378 (linux-low.o): Delete rule.
8379 * linux-low.h: Always include "gdb_thread_db.h" instead of
8380 conditionally including thread_db.h.
8381 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8382 HAVE_THREAD_DB_H.
8383
8384 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8385
8386 * Makefile.in (install-only): Fix make install regression.
8387
8388 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8389
8390 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8391 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8392 installation.
8393 * gdbserver.1: Remove.
8394
8395 2013-03-22 Pedro Alves <palves@redhat.com>
8396
8397 * linux-low.c (handle_extended_wait): Don't call
8398 linux_enable_event_reporting.
8399
8400 2013-03-15 Tony Theodore <tonyt@logyst.com>
8401
8402 PR build/9098:
8403 * Makefile.in (SHELL): Use @SHELL@.
8404
8405 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8406
8407 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8408 compiler warning.
8409
8410 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8411
8412 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8413 Remove extraneous NULL element.
8414
8415 2013-03-13 Yao Qi <yao@codesourcery.com>
8416
8417 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8418 'V' block in trace frame.
8419
8420 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8421
8422 * target.h (struct target_ops): Add btrace ops.
8423 (target_supports_btrace): New macro.
8424 (target_enable_btrace): New macro.
8425 (target_disable_btrace): New macro.
8426 (target_read_btrace): New macro.
8427 * gdbthread.h (struct thread_info): Add btrace field.
8428 * server.c: Include btrace-common.h.
8429 (handle_btrace_general_set): New function.
8430 (handle_btrace_enable): New function.
8431 (handle_btrace_disable): New function.
8432 (handle_general_set): Call handle_btrace_general_set.
8433 (handle_qxfer_btrace): New function.
8434 (struct qxfer qxfer_packets[]): Add btrace entry.
8435 * inferiors.c (remove_thread): Disable btrace.
8436 * linux-low: Include linux-btrace.h.
8437 (linux_low_enable_btrace): New function.
8438 (linux_low_read_btrace): New function.
8439 (linux_target_ops): Add btrace ops.
8440 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8441 Add srv_linux_btrace=yes.
8442 (x86_64-*-linux*): Add linux-btrace.o.
8443 Add srv_linux_btrace=yes.
8444 * configure.ac: Define HAVE_LINUX_BTRACE.
8445 * config.in: Regenerated.
8446 * configure: Regenerated.
8447
8448 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8449
8450 * server.c (handle_qxfer): Preserve error message if -3 is
8451 returned.
8452 (qxfer): Document the -3 return value.
8453
8454 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8455
8456 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8457 (linux_btrace_h): New variable.
8458 (linux-btrace.o): New rule.
8459
8460 2013-03-08 Stan Shebs <stan@codesourcery.com>
8461 Hafiz Abid Qadeer <abidh@codesourcery.com>
8462
8463 * tracepoint.c (trace_buffer_size): New global.
8464 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8465 (init_trace_buffer): Change to one-argument function. Allocate
8466 trace buffer memory.
8467 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8468 handle QTBuffer:size packet.
8469 (cmd_bigqtbuffer_size): New function.
8470 (initialize_tracepoint): Call init_trace_buffer with
8471 DEFAULT_TRACE_BUFFER_SIZE.
8472 * server.c (handle_query): Add QTBuffer:size in the
8473 supported packets.
8474
8475 2013-03-07 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8478 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8479 of -1.
8480 (cmd_qtsp): Adjust condition. Do post increment.
8481 Set cur_action and cur_step_action back to 0.
8482
8483 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8484
8485 PR server/15236
8486 * linux-low.c (linux_write_memory): Return early success if LEN is
8487 zero.
8488
8489 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8490
8491 * configure.srv: Add x86_64-*-cygwin* as target.
8492
8493 2013-02-28 Tom Tromey <tromey@redhat.com>
8494
8495 * configure.ac: Invoke AC_SYS_LARGEFILE.
8496 * configure, config.in: Rebuild.
8497
8498 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8499
8500 * win32-low.c: Throughout, fix format strings and casts of
8501 printf-like functions to avoid type related warnings on all
8502 platforms.
8503 (get_child_debug_event): Print dwDebugEventCode as hex since
8504 that's how it's usually documented.
8505
8506 2013-02-28 Yao Qi <yao@codesourcery.com>
8507
8508 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8509 pulongest.
8510
8511 2013-02-27 Jiong Wang <jiwang@tilera.com>
8512
8513 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8514 (reg-tilegx32.c): New rule.
8515 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8516 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8517 different register info initializer according to elf class.
8518 (init_registers_tilgx32): New function. The tilegx32 register info
8519 initializer.
8520 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8521 (tile_store_gregset): Likewise.
8522
8523 2013-02-27 Yao Qi <yao@codesourcery.com>
8524
8525 * server.c (process_point_options): Print debug message when
8526 debug_threads is true.
8527
8528 2013-02-26 Yao Qi <yao@codesourcery.com>
8529
8530 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8531
8532 2013-02-19 Pedro Alves <palves@redhat.com>
8533 Kai Tietz <ktietz@redhat.com>
8534
8535 PR gdb/15161
8536
8537 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8538 instead of strtoul to extract address from packet.
8539 (process_serial_event) <'z'>: Likewise.
8540
8541 2013-02-18 Yao Qi <yao@codesourcery.com>
8542
8543 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8544
8545 2013-02-14 Pedro Alves <palves@redhat.com>
8546
8547 Plug memory leak.
8548
8549 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8550 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8551
8552 2013-02-14 Pedro Alves <palves@redhat.com>
8553
8554 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8555
8556 2013-02-14 Pedro Alves <palves@redhat.com>
8557
8558 * tracepoint.c (save_string): Delete.
8559 (add_tracepoint_action): Use savestring instead of save_string.
8560
8561 2013-02-12 Pedro Alves <palves@redhat.com>
8562
8563 * linux-xtensa-low.c: Ditto.
8564 * xtensa-xtregs.c: Ditto.
8565
8566 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8567
8568 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8569 thread_db.
8570
8571 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8572
8573 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8574 aarch64_num_wp_regs and aarch64_num_bp_regs to
8575 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8576
8577 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8578
8579 * linux-aarch64-low.c (ps_get_thread_area): Replace
8580 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8581
8582 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8583 Marcus Shawcroft <marcus.shawcroft@arm.com>
8584 Nigel Stephens <nigel.stephens@arm.com>
8585 Yufeng Zhang <yufeng.zhang@arm.com>
8586
8587 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8588 (aarch64.c, aarch64-without-fpu.c): New targets.
8589 * configure.srv (aarch64*-*-linux*): New.
8590 * linux-aarch64-low.c: New file.
8591
8592 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8593
8594 * linux-low.c (handle_extended_wait, linux_create_inferior)
8595 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8596 (dequeue_one_deferred_signal, linux_resume_one_thread)
8597 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8598 (linux_tracefork_grandchild, linux_test_for_tracefork)
8599 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8600 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8601 where the argument is 0.
8602
8603 2013-01-25 Yao Qi <yao@codesourcery.com>
8604
8605 * event-loop.c: Include "queue.h".
8606 (gdb_event_p): New typedef.
8607 (struct gdb_event) <next_event>: Remove.
8608 (event_queue): Change to QUEUE(gdb_event_p).
8609 (async_queue_event): Remove.
8610 (gdb_event_xfree): New.
8611 (initialize_event_loop): New.
8612 (process_event): Use API from QUEUE.
8613 (wait_for_event): Likewise.
8614 * server.c (main): Call initialize_event_loop.
8615 * server.h (initialize_event_loop): Declare.
8616
8617 2013-01-18 Yao Qi <yao@codesourcery.com>
8618
8619 * ax.h (struct eval_agent_expr_context): New.
8620 (gdb_eval_agent_expr): Update declaration.
8621 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8622 TFRAME. Add new argument CTX.
8623 * server.h (struct eval_agent_expr_context): Declare.
8624 (agent_mem_read, agent_tsv_read): Update declaration.
8625 (agent_mem_read_string): Likewise.
8626 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8627 (add_traceframe_block): Add new argument TPOINT.
8628 Increase TPOINT->traceframe_usage.
8629 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8630 eval_tracepoint_agent_expr.
8631 (condition_true_at_tracepoint): Likewise.
8632 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8633 (agent_mem_read_string, agent_tsv_read): Likewise.
8634
8635 2013-01-16 Yao Qi <yao@codesourcery.com>
8636
8637 * linux-low.c (linux_resume_one_lwp): Don't check
8638 'lwp->bp_reinsert != 0'.
8639
8640 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8641 Pedro Alves <palves@redhat.com>
8642
8643 * lynx-low.c (ptrace_request_to_str): Define a temporary
8644 macro and use it to simplify this function's implementation.
8645
8646 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8647
8648 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8649 sets errno.
8650
8651 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8652
8653 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8654
8655 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8656
8657 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8658
8659 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8660
8661 * lynx-low.c (lynx_resume): Use the resume_info parameter
8662 to determine the ptid for the lynx_ptrace call, unless
8663 it is equal to minus_one_ptid, in which case we use the
8664 ptid of the current_inferior.
8665 (lynx_wait_1): After having received a thread create/exit
8666 event, resume the inferior's execution using the signaling
8667 thread's ptid, rather than the old ptid.
8668
8669 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8670
8671 * lynx-low.c (lynx_resume): Delete variable ret.
8672
8673 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8674
8675 * gdbreplay.c (gdbreplay_version): Update copyright year.
8676 * server.c (gdbserver_version): Likewise.
8677
8678 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8679
8680 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8681 new thread.
8682
8683 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8684
8685 * lynx-low.c (ptrace_request_to_str): Add handling for
8686 PTRACE_GETTRACESIG.
8687
8688 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8689
8690 * lynx-low.c (lynx_attach): Delete variable new_process.
8691
8692 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8693
8694 * lynx-low.c (lynx_create_inferior): Delete variable
8695 new_process.
8696
8697 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8698
8699 * lynx-low.c (ptrace_request_to_str): Do not handle
8700 PTRACE_GETTHREADLIST if this macro does not exist.
8701
8702 2012-12-15 Yao Qi <yao@codesourcery.com>
8703
8704 * Makefile.in (OBS): Add notif.o.
8705 * notif.c, notif.h: New.
8706 * server.c: Include "notif.h".
8707 (struct vstop_notif) <next>: Remove.
8708 <base>: New field.
8709 (queue_stop_reply): Update.
8710 (push_event, send_next_stop_reply): Remove.
8711 (discard_queued_stop_replies): Update.
8712 (notif_stop): New variable.
8713 (handle_v_stopped): Remove.
8714 (handle_v_requests): Don't call handle_v_stopped. Call
8715 handle_ack_notif instead.
8716 (queue_stop_reply_callback): Call notif_event_enque instead
8717 of queue_stop_reply.
8718 (handle_status): Don't call send_next_stop_reply, call
8719 notif_write_event instead.
8720 (kill_inferior_callback): Likewise.
8721 (detach_or_kill_inferior_callback): Likewise.
8722 (main): Call initialize_notif.
8723 (process_serial_event): Call QUEUE_is_empty.
8724 (handle_target_event): Call notif_push instead of push event.
8725 * server.h (push_event): Remove declaration.
8726
8727 2012-12-10 Tom Tromey <tromey@redhat.com>
8728
8729 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8730 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8731 macros.
8732 (.c.o): Rewrite.
8733 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8734 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8735 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8736 (amd64-linux-ipa.o, ax.o): Rewrite.
8737 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8738 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8739 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8740 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8741 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8742 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8743 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8744 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8745 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8746 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8747 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8748 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8749 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8750 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8751 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8752 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8753 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8754 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8755 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8756 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8757 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8758 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8759 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8760 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8761 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8762 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8763 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8764 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8765 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8766 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8767 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8768 (reg-tilegx.o): Remove.
8769 (all_object_files): New macro.
8770 Include .deps files.
8771 * aclocal.m4, configure: Rebuild.
8772 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8773 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8774 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8775
8776 2012-12-05 Tom Tromey <tromey@redhat.com>
8777
8778 PR gdb/14917:
8779 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8780
8781 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8782
8783 * configure.ac: Check for linux/perf_event.h.
8784 * config.in: Regenerated.
8785 * configure: Regenerated.
8786
8787 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8788
8789 * hostio.c (handle_readlink): Decrease buffer size
8790 parameter passed to readlink by one byte.
8791
8792 2012-11-26 Yao Qi <yao@codesourcery.com>
8793
8794 * configure.ac (build_warnings): Append '-Wempty-body'.
8795 * configure: Regenerated.
8796 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8797 body.
8798
8799 2012-11-15 Pierre Muller <muller@sourceware.org>
8800
8801 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8802 * config.in: Regenerate.
8803 * configure: Regenerate.
8804 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8805 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8806 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8807 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8808 header.
8809 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8810 instead of <sys/wait.h> header.
8811 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8812
8813 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8814
8815 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8816 (various make rules): Remove -DGDBSERVER
8817
8818 2012-11-09 Yao Qi <yao@codesourcery.com>
8819
8820 * spu-low.c (current_ptid): Move it to ..
8821 * gdbthread.h: ... here. New.
8822 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8823 * server.c (myresume, process_serial_event): Likewise.
8824 * thread-db.c (thread_db_find_new_threads): Likewise.
8825 * tracepoint.c (run_inferior_command): Likewise.
8826
8827 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8828
8829 * server.c (handle_search_memory_1): Include access length in
8830 warning message.
8831
8832 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8833
8834 * linux-crisv32-low.c: Fix compile errors.
8835
8836 2012-09-04 Yao Qi <yao@codesourcery.com>
8837
8838 * tracepoint.c (cmd_qtsv): Adjust debug message.
8839 Don't check CUR_TPOINT.
8840
8841 2012-08-28 Yao Qi <yao@codesourcery.com>
8842
8843 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8844 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8845 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8846 Remove declarations of xmalloc, xreallloc, xstrdup and
8847 freeargv.
8848 * Makefile.in (libiberty_h): New.
8849 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8850 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8851
8852 2012-08-23 Yao Qi <yao@codesourcery.com>
8853
8854 * server.h: Remove declaration of 'xsnprintf'.
8855
8856 2012-08-22 Keith Seitz <keiths@redhat.com>
8857
8858 * server.h: Include build-gnulib-gbserver/config.h.
8859 * gdbreplay.c: Likewise.
8860
8861 2012-08-08 Doug Evans <dje@google.com>
8862
8863 * Makefile.in (SFILES): Add gdb_vecs.c.
8864 (OBS): Add gdb_vecs.o.
8865 (gdb_vecs_h, host_defs_h): New variables.
8866 (thread-db.o): Add $(gdb_vecs_h) dependency.
8867 (gdb_vecs.o): New rule.
8868 * thread-db.c: #include "gdb_vecs.h".
8869 (thread_db_load_search): Use a vector to iterate over path elements.
8870 Handle text appearing after "$pdir".
8871
8872 * configure.ac: Add check for strstr.
8873 * config.in: Regenerate.
8874 * configure: Regenerate.
8875
8876 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8877
8878 * hostio.c (handle_pread): If pread fails, fall back to attempting
8879 lseek/read.
8880 (handle_pwrite): Likewise for pwrite.
8881
8882 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8883
8884 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8885 between unsupported TYPE and unimplementable ADDR/LEN combination.
8886 (arm_insert_point): Act on new return value.
8887
8888 2012-07-31 Pedro Alves <palves@redhat.com>
8889
8890 * server.c (process_point_options): Only skip tokens if we find
8891 one that is unrecognized. Don't treat 'X' specially while
8892 skipping unrecognized tokens.
8893
8894 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8895
8896 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8897 to 4-byte-align HW breakpoint addresses for Thumb.
8898
8899 2012-07-27 Yao Qi <yao@codesourcery.com>
8900
8901 PR remote/14161.
8902
8903 * server.h: Declare gdb_agent_about_to_close.
8904 * target.c (kill_inferior): Include "agent.h".
8905 New. Send command 'kill'.
8906 * target.h (kill_inferior): Removed macro.
8907 * tracepoint.c (gdb_agent_about_to_close): New.
8908 (gdb_agent_helper_thread): Handle command 'close'.
8909 Wait endlessly until the inferior stops.
8910 Install gdb_agent_remove_socket to atexit hook.
8911 (agent_socket_name): New static variable.
8912 (gdb_agent_socket_init): Replace local variable 'name' with
8913 'agent_socket_name'.
8914 (gdb_agent_remove_socket): New.
8915
8916 2012-07-27 Yao Qi <yao@codesourcery.com>
8917
8918 * server.c (process_point_options): Stop at 'X' when parsing.
8919
8920 2012-07-19 Michael Eager <eager@eagercon.com>
8921
8922 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8923 to hw_execute.
8924 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8925 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8926 hardware breakpoint.
8927
8928 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8929
8930 * gdbserver/linux-low.c (initialize_low): Call
8931 linux_ptrace_init_warnings.
8932
8933 2012-07-02 Doug Evans <dje@google.com>
8934
8935 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8936 pointer to int.
8937
8938 2012-07-02 Stan Shebs <stan@codesourcery.com>
8939
8940 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8941 (ax.o): Add it to build rule.
8942 (ax-ipa.o): Ditto.
8943 (OBS): Add format.o.
8944 (IPA_OBS): Add format.o.
8945 * server.c (handle_query): Claim support for breakpoint commands.
8946 (process_point_options): Add command case.
8947 (process_serial_event): Leave running if there are printfs in
8948 effect.
8949 * mem-break.h (any_persistent_commands): Declare.
8950 (add_breakpoint_commands): Declare.
8951 (gdb_no_commands_at_breakpoint): Declare.
8952 (run_breakpoint_commands): Declare.
8953 * mem-break.c (struct point_command_list): New struct.
8954 (struct breakpoint): New field command_list.
8955 (any_persistent_commands): New function.
8956 (add_commands_to_breakpoint): New function.
8957 (add_breakpoint_commands): New function.
8958 (gdb_no_commands_at_breakpoint): New function.
8959 (run_breakpoint_commands): New function.
8960 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8961 locally.
8962 * ax.c: Include format.h.
8963 (ax_printf): New function.
8964 (gdb_eval_agent_expr): Add printf opcode.
8965
8966 2012-06-13 Yao Qi <yao@codesourcery.com>
8967
8968 * server.c (start_inferior): Remove duplicated writes to fields
8969 'last_resume_kind' and 'last_status' of 'current_inferior'.
8970
8971 2012-06-12 Yao Qi <yao@codesourcery.com>
8972 Pedro Alves <palves@redhat.com>
8973
8974 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8975 comment.
8976 * server.c (handle_v_cont): Extend comment.
8977
8978 2012-06-11 Yao Qi <yao@codesourcery.com>
8979
8980 * linux-low.c (linux_attach): Add 'static'.
8981
8982 2012-06-06 Yao Qi <yao@codesourcery.com>
8983
8984 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8985
8986 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8987
8988 Fix gcc -flto compilation warning.
8989 * server.c (main): Make variable multi_mode and attach volatile.
8990
8991 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8992
8993 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8994 if the platform doesn't know about it.
8995
8996 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8997
8998 * Makefile.in (SFILES): Add linux-tile-low.c.
8999 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9000 * configure.srv: Handle tilegx-*-linux*.
9001 * linux-tile-low.c: New file.
9002
9003 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9004
9005 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9006
9007 2012-05-24 Pedro Alves <palves@redhat.com>
9008
9009 PR gdb/7205
9010
9011 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9012
9013 2012-05-24 Pedro Alves <palves@redhat.com>
9014
9015 PR gdb/7205
9016
9017 Replace target_signal with gdb_signal throughout.
9018
9019 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9020
9021 * linux-low.c (linux_store_registers): Avoid the copying sequence
9022 when no data has been retrieved by ptrace.
9023
9024 2012-05-22 Will Deacon <will.deacon@arm.com>
9025
9026 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9027 Include asm/ptrace.h.
9028 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9029 already defined.
9030
9031 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9032
9033 * linux-low.c (linux_store_registers): Don't re-retrieve data
9034 with ptrace that has already been obtained from /proc. Always
9035 copy any data retrieved with ptrace to the buffer supplied.
9036
9037 2012-05-11 Yao Qi <yao@codesourcery.com>
9038 Pedro Alves <palves@redhat.com>
9039
9040 * linux-low.c (enum stopping_threads_kind): New.
9041 (stopping_threads): Change type to `enum stopping_threads_kind'.
9042 (handle_extended_wait): If stopping and suspending threads, leave
9043 the new_lwp suspended too.
9044 (linux_wait_for_event): Adjust.
9045 (stop_all_lwps): Set `stopping_threads' to
9046 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9047 whether we're suspending threads or just stopping them. Assert no
9048 recursion happens.
9049
9050 2012-04-29 Yao Qi <yao@codesourcery.com>
9051
9052 * server.h: Move some code to ...
9053 * gdbthread.h: ... here. New.
9054 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9055 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9056 (nto-low.o, win32-low.o): Likewise.
9057 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9058 * regcache.c, remote-utils.c, server.c: Likewise.
9059 * target.c, tracepoint.c, win32-low.c: Likewise.
9060
9061 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9062
9063 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9064 (PTRACE_ARG4_TYPE): Likewise.
9065 (PTRACE_XFER_TYPE): Likewise.
9066 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9067 ptrace to PTRACE_ARG3_TYPE.
9068 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9069 (PTRACE_ARG4_TYPE): Likewise.
9070 (PTRACE_XFER_TYPE): Likewise.
9071 (linux_detach_one_lwp): Cast fourth argument of
9072 ptrace to long then PTRACE_ARG4_TYPE.
9073 (regsets_fetch_inferior_registers): Cast third argument of
9074 ptrace to long then PTRACE_ARG3_TYPE.
9075 (regsets_store_inferior_registers): Likewise.
9076
9077 2012-04-20 Pedro Alves <palves@redhat.com>
9078
9079 * configure: Regenerate.
9080
9081 2012-04-19 Pedro Alves <palves@redhat.com>
9082
9083 * Makefile.in (GNULIB_BUILDDIR): New.
9084 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9085 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9086 (all, install-only, uninstall, clean-info, all-lib, clean): No
9087 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9088 (maintainer-clean realclean distclean): Use subdir_do.
9089 (subdir_do): New.
9090 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9091 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9092 * acinclude.m4: Include acx_configure_dir.m4.
9093 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9094 calls. Call AC_PROG_RANLIB. Configure gnulib using
9095 ACX_CONFIGURE_DIR.
9096 (GNULIB): New.
9097 (GNULIB_STDINT_H): Adjust.
9098 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9099 * gdbreplay.c: Include build-gnulib/config.h.
9100 * server.h: Likewise.
9101 * aclocal.m4: Regenerate.
9102 * config.in: Regenerate.
9103 * configure: Regenerate.
9104
9105 2012-04-19 Pedro Alves <palves@redhat.com>
9106
9107 * Makefile.in (LIBGNU, INCGNU): Adjust.
9108 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9109 (all, install-only, uninstall, clean-info, all-lib, clean)
9110 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9111 * configure.ac: Adjust AC_OUTPUT output.
9112 * aclocal.m4: Regenerate.
9113 * configure: Regenerate.
9114
9115 2012-04-19 Pedro Alves <palves@redhat.com>
9116
9117 * Makefile.in (generated_files): New.
9118 (server_h): Remove the explicit dependency on config.h, and depend
9119 on $generated_files.
9120
9121 2012-04-19 Pedro Alves <palves@redhat.com>
9122
9123 * Makefile.in (INCGNU): Add -Ignulib.
9124
9125 2012-04-19 Pedro Alves <palves@redhat.com>
9126
9127 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9128 (INCGNU): ... this, and spell out -I here.
9129 (GNULIB_LIB): Rename to ...
9130 (LIBGNU): ... this.
9131 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9132
9133 2012-04-19 Pedro Alves <palves@redhat.com>
9134
9135 * config.in: Regenerate.
9136
9137 2012-04-19 Pedro Alves <palves@redhat.com>
9138
9139 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9140 * server.h (memmem): Remove declaration.
9141 * config.in: Regenerate.
9142 * configure: Regenerate.
9143
9144 2012-04-19 Yao Qi <yao@codesourcery.com>
9145
9146 * Makefile.in (SFILES): Add common/vec.c.
9147 (OBS): Add vec.o.
9148 (vec.o): New rule.
9149
9150 2012-04-19 Yao Qi <yao@codesourcery.com>
9151
9152 * remote-utils.c (prepare_resume_reply): Replace with macro
9153 target_core_of_thread.
9154 * server.c (handle_qxfer_threads_proper): Likewise.
9155 * target.h (traget_core_of_thread): New macro.
9156
9157 2012-04-18 Pedro Alves <palves@redhat.com>
9158
9159 * aclocal.m4: Regenerate.
9160 * configure: Regenerate.
9161
9162 2012-04-16 Yao Qi <yao@codesourcery.com>
9163
9164 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9165 duplicated on address.
9166
9167 2012-04-16 Yao Qi <yao@codesourcery.com>
9168
9169 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9170 (struct tracepoint_action_ops) <send>: New field.
9171 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9172 (agent_expr_send, x_tracepoint_action_send): New.
9173 (l_tracepoint_action_send): New.
9174 (cmd_qtdp): Download and install tracepoint
9175 according to `use_agent'.
9176 (run_inferior_command): Add one more parameter `len'.
9177 Update callers.
9178 (tracepoint_send_agent): New.
9179 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9180
9181 2012-04-16 Yao Qi <yao@codesourcery.com>
9182
9183 * tracepoint.c (download_tracepoints): Moved to ...
9184 (cmd_qtstart): ... here.
9185
9186 2012-04-14 Yao Qi <yao@codesourcery.com>
9187
9188 * tracepoint.c: Include inttypes.h.
9189 (struct collect_memory_action): Use sized types.
9190 (struct tracepoint): Likewise.
9191 (cmd_qtdp, stop_tracing): Update print specifiers.
9192 (cmd_qtp, response_tracepoint): Likewise.
9193 (collect_data_at_tracepoint): Likewise.
9194 (collect_data_at_step): Likewise.
9195
9196 2012-04-14 Yao Qi <yao@codesourcery.com>
9197
9198 Import gnulib module inttypes.
9199 * aclocal.m4, config.in, configure: Regenerated.
9200
9201 2012-04-14 Yao Qi <yao@codesourcery.com>
9202
9203 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9204 Makefile and config.status at last.
9205
9206 2012-04-13 Yao Qi <yao@codesourcery.com>
9207
9208 * tracepoint.c: Include stdint.h unconditionally.
9209
9210 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9211
9212 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9213 on BFD_HAVE_SYS_PROCFS_TYPE.
9214 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9215 * configure: Regenerate.
9216 * config.in: Likewise.
9217
9218 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9219
9220 * Makefile.in (clean): Also remove x32.c x32-linux.c
9221 x32-avx.c x32-avx-linux.c.
9222 (x32.o): New target.
9223 (x32.c): Likewise.
9224 (x32-linux.o): Likewise.
9225 (x32-linux.c): Likewise.
9226 (x32-avx.o): Likewise.
9227 (x32-avx.c): Likewise.
9228 (x32-avx-linux.o): Likewise.
9229 (x32-avx-linux.c): Likewise.
9230
9231 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9232 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9233 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9234 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9235 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9236 i386/x32-avx-linux.xml.
9237
9238 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9239 (init_registers_x32_avx_linux): Likwise.
9240 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9241 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9242
9243 2012-04-13 Pedro Alves <palves@redhat.com>
9244
9245 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9246 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9247 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9248 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9249 the sub-make.
9250
9251 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9252
9253 * linux-x86-low.c (compat_x32_clock_t): New.
9254 (compat_x32_siginfo_t): Likewise.
9255 (compat_x32_siginfo_from_siginfo): Likewise.
9256 (siginfo_from_compat_x32_siginfo): Likewise.
9257 (linux_is_elf64): Likewise.
9258 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9259 and siginfo_from_compat_x32_siginfo for x32.
9260 (x86_arch_setup): Set linux_is_elf64.
9261
9262 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9263
9264 PR gdb/13969
9265 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9266 e_machine field.
9267 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9268 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9269 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9270 compatible with process.
9271
9272 2012-04-12 Yao Qi <yao@codesourcery.com>
9273
9274 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9275 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9276 (install-only, install-info, clean): Handle sub dir gnulib.
9277 (all-lib, am--refresh): New targets.
9278 (memmem.o): Remove target.
9279 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9280 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9281 (AC_REPLACE_FUNCS): Remove memmem.
9282 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9283 (AC_OUTPUT): Generate Makefile in gnulib/.
9284 * aclocal.m4, config.in, configure: Regenerated.
9285
9286 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9287
9288 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9289
9290 2012-04-05 Pedro Alves <palves@redhat.com>
9291
9292 -Werror=strict-aliasing
9293
9294 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9295 pointer.
9296
9297 2012-04-04 Pedro Alves <palves@redhat.com>
9298
9299 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9300 (sparc_store_gregset_from_stack, sparc_store_gregset)
9301 (sparc_breakpoint_at): Fix formatting.
9302
9303 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9304
9305 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9306 are available.
9307 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9308 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9309 * config.in: Regenerate.
9310 * configure: Likewise.
9311
9312 2012-03-29 Pedro Alves <palves@redhat.com>
9313
9314 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9315 Correct ptrace arguments.
9316
9317 2012-03-28 Pedro Alves <palves@redhat.com>
9318
9319 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9320 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9321 (IA64_FR1_REGNUM): New defines.
9322 (ia64_fetch_register): New.
9323 (the_low_target): Install it.
9324 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9325 field.
9326 * linux-low.c (linux_fetch_registers): Try the
9327 the_low_target.fetch_register hook first.
9328
9329 * linux-arm-low.c (the_low_target): Adjust.
9330 * linux-bfin-low.c (the_low_target): Adjust.
9331 * linux-cris-low.c (the_low_target): Adjust.
9332 * linux-crisv32-low.c (the_low_target): Adjust.
9333 * linux-m32r-low.c (the_low_target): Adjust.
9334 * linux-m68k-low.c (the_low_target): Adjust.
9335 * linux-mips-low.c (the_low_target): Adjust.
9336 * linux-ppc-low.c (the_low_target): Adjust.
9337 * linux-s390-low.c (the_low_target): Adjust.
9338 * linux-sh-low.c (the_low_target): Adjust.
9339 * linux-sparc-low.c (the_low_target): Adjust.
9340 * linux-tic6x-low.c (the_low_target): Adjust.
9341 * linux-x86-low.c (the_low_target): Adjust.
9342 * linux-xtensa-low.c (the_low_target): Adjust.
9343
9344 2012-03-26 Pedro Alves <palves@redhat.com>
9345
9346 * server.c (handle_qxfer_libraries): Don't bail early if
9347 the_target->qxfer_libraries_svr4 is not NULL.
9348
9349 2012-03-26 Pedro Alves <palves@redhat.com>
9350
9351 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9352
9353 2012-03-23 Pedro Alves <palves@redhat.com>
9354
9355 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9356 "library-list-svr4" element's start tag when the the DSO list is
9357 empty.
9358
9359 2012-03-23 Pedro Alves <palves@redhat.com>
9360
9361 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9362 a variable whose type size is the same as the inferior's pointer
9363 size.
9364
9365 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9366
9367 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9368 struct siginfo.
9369 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9370 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9371 * linux-low.h: Include <signal.h>.
9372 (struct siginfo): Remove forward declaration.
9373 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9374 struct siginfo.
9375
9376 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9377
9378 * .gitignore: Ignore more files.
9379
9380 2012-03-19 Pedro Alves <palves@redhat.com>
9381 Jan Kratochvil <jan.kratochvil@redhat.com>
9382
9383 * server.c (cont_thread, general_thread): Add describing comments.
9384 (start_inferior): Clear `cont_thread'.
9385 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9386 of a process.
9387
9388 2012-03-15 Yao Qi <yao@codesourcery.com>
9389
9390 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9391 handling to ...
9392 (cmd_qtdp): ... here.
9393
9394 2012-03-15 Yao Qi <yao@codesourcery.com>
9395
9396 * tracepoint.c (struct tracepoint_action_ops): New.
9397 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9398 (m_tracepoint_action_download): New.
9399 (r_tracepoint_action_download): New.
9400 (x_tracepoint_action_download): New.
9401 (l_tracepoint_action_download): New.
9402 (add_tracepoint_action): Install `action->ops' according type.
9403 (download_tracepoint_1): Move code `download' function pointer
9404 of various tracepoint_action_ops.
9405
9406 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9407
9408 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9409 linux_ptrace_attach_warnings.
9410
9411 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9412
9413 * Makefile.in (linux-ptrace.o): New.
9414 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9415 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9416 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9417 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9418 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9419 of these targets.
9420 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9421
9422 2012-03-08 Yao Qi <yao@codesourcery.com>
9423 Pedro Alves <palves@redhat.com>
9424
9425 Fix PR server/13392.
9426 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9427 offset of JMP insn.
9428 * tracepoint.c (remove_tracepoint): New.
9429 (cmd_qtdp): Call remove_tracepoint when failed to install.
9430
9431 2012-03-07 Pedro Alves <palves@redhat.com>
9432
9433 * linux-low.c (get_detach_signal): New.
9434 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9435 Pass on pending signals to PTRACE_DETACH. Check the result of the
9436 ptrace call.
9437 * server.c (program_signals, program_signals_p): New.
9438 (handle_general_set): Handle QProgramSignals.
9439 * server.h (program_signals, program_signals_p): Declare.
9440
9441 2012-03-05 Pedro Alves <palves@redhat.com>
9442 Jan Kratochvil <jan.kratochvil@redhat.com>
9443
9444 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9445 New comment why.
9446
9447 2012-03-03 Yao Qi <yao@codesourcery.com>
9448
9449 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9450 agent_look_up_symbols.
9451
9452 2012-03-03 Yao Qi <yao@codesourcery.com>
9453
9454 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9455 (linux-x86-low.o): Likewise.
9456 * server.h: Remove in_process_agent_loaded.
9457 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9458 common/agent.c.
9459 Update callers.
9460
9461 2012-03-03 Yao Qi <yao@codesourcery.com>
9462
9463 * tracepoint.c (gdb_agent_capability): New global.
9464 (in_process_agent_loaded_ust): Renamed to
9465 `in_process_agent_supports_ust'.
9466 Update callers.
9467 (in_process_agent_supports_ust): Call agent_capability_check.
9468 (clear_installed_tracepoints): Assert that agent supports
9469 agent.
9470
9471 2012-03-03 Yao Qi <yao@codesourcery.com>
9472
9473 * linux-low.c (linux_supports_agent): New.
9474 (linux_target_ops): Initialize field `supports_agent' with
9475 linux_supports_agent.
9476 * target.h (struct target_ops) <supports_agent>: New.
9477 (target_supports_agent): New macro.
9478 * server.c (handle_general_set): Handle packet 'QAgent'.
9479 (handle_query): Send `QAgent+'.
9480 * Makefile.in (server.o): Depends on agent.h.
9481
9482 2012-03-03 Yao Qi <yao@codesourcery.com>
9483
9484 * Makefile.in (OBS): Add agent.o.
9485 Add new rule for agent.o.
9486 Track dependence of tracepoint.c on agent.h.
9487 * tracepoint.c (run_inferior_command_1):
9488 (run_inferior_command): Call agent_run_command.
9489 (gdb_ust_connect_sync_socket): Deleted. Move it to
9490 common/agent.c.
9491 (resume_thread, stop_thread): Likewise.
9492 (gdb_ust_socket_init): Renamed to ...
9493 (gdb_agent_socket_init): ... New.
9494 (gdb_ust_thread): Renamed to ...
9495 (gdb_agent_helper_thread): ... New.
9496 (gdb_ust_init): Move some code to ...
9497 (gdb_agent_init): ... here. New.
9498 [HAVE_UST]: Call gdb_ust_init.
9499 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9500 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9501 * config.in, configure: Regenerated.
9502
9503 2012-03-02 Pedro Alves <palves@redhat.com>
9504
9505 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9506 * linux-low.c (struct simple_pid_list): New.
9507 (stopped_pids): New a struct simple_pid_list pointer.
9508 (add_to_pid_list, pull_pid_from_list): New.
9509 (handle_extended_wait): Don't assume the first signal new children
9510 report is SIGSTOP. Adjust call to pull_pid_from_list.
9511 (linux_wait_for_lwp): Adjust.
9512
9513 2012-03-02 Yao Qi <yao@codesourcery.com>
9514
9515 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9516 debug log.
9517
9518 2012-03-02 Yao Qi <yao@codesourcery.com>
9519
9520 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9521 `stop_pc' and `tpoint'. Update caller.
9522
9523 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9524
9525 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9526 * linux-low.c (use_linux_regsets): New macro.
9527 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9528 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9529 (linux_register_in_regsets): New function.
9530 (usr_fetch_inferior_registers): Skip registers covered by
9531 regsets.
9532 (usr_store_inferior_registers): Likewise.
9533 (usr_fetch_inferior_registers): New macro.
9534 (usr_store_inferior_registers): Likewise.
9535 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9536 (linux_store_registers): Likewise.
9537 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9538 prototype.
9539 (init_registers_mips64_dsp_linux): Likewise.
9540 (init_registers_mips_linux): New macro.
9541 (init_registers_mips_dsp_linux): Likewise.
9542 (mips_dsp_num_regs): Likewise.
9543 (DSP_BASE, DSP_CONTROL): New fallback macros.
9544 (mips_base_regs): New macro.
9545 (mips_regmap): Use it. Fix the size.
9546 (mips_dsp_regmap): New variable.
9547 (mips_dsp_regset_bitmap): Likewise.
9548 (mips_arch_setup): New function.
9549 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9550 than mips_regmap.
9551 (mips_cannot_store_register): Likewise.
9552 (the_low_target): Update .arch_setup, .num_regs and .regmap
9553 initializers. Add .regset_bitmap initializer.
9554 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9555 initializer.
9556 * linux-bfin-low.c (the_low_target): Likewise.
9557 * linux-cris-low.c (the_low_target): Likewise.
9558 * linux-crisv32-low.c (the_low_target): Likewise.
9559 * linux-ia64-low.c (the_low_target): Likewise.
9560 * linux-m32r-low.c (the_low_target): Likewise.
9561 * linux-m68k-low.c (the_low_target): Likewise.
9562 * linux-ppc-low.c (the_low_target): Likewise.
9563 * linux-s390-low.c (the_low_target): Likewise.
9564 * linux-sh-low.c (the_low_target): Likewise.
9565 * linux-sparc-low.c (the_low_target): Likewise.
9566 * linux-tic6x-low.c (the_low_target): Likewise.
9567 * linux-x86-low.c (the_low_target): Likewise.
9568 * linux-xtensa-low.c (the_low_target): Likewise.
9569 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9570 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9571 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9572 srv_xmlfiles.
9573 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9574 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9575
9576 2012-02-29 Yao Qi <yao@codesourcery.com>
9577 Pedro Alves <palves@redhat.com>
9578
9579 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9580 `step_over_finished' is true.
9581
9582 2012-02-27 Pedro Alves <palves@redhat.com>
9583
9584 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9585 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9586
9587 2012-02-27 Pedro Alves <palves@redhat.com>
9588
9589 PR server/9684
9590 * linux-low.c (pid_is_stopped): New.
9591 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9592
9593 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9594
9595 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9596 of conditions.
9597
9598 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9599
9600 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9601
9602 2012-02-24 Luis Machado <lgustavo@codesourcery>
9603
9604 * server.c (handle_query): Advertise support for target-side
9605 breakpoint condition evaluation.
9606 (process_point_options): New function.
9607 (process_serial_event): When inserting a breakpoint, check for
9608 a target-side condition that should be evaluated.
9609
9610 * mem-break.c: Include regcache.h and ax.h.
9611 (point_cond_list_t): New data structure.
9612 (breakpoint) <cond_list>: New field.
9613 (find_gdb_breakpoint_at): Make non-static.
9614 (delete_gdb_breakpoint_at): Clear any target-side
9615 conditions.
9616 (clear_gdb_breakpoint_conditions): New function.
9617 (add_condition_to_breakpoint): Likewise.
9618 (add_breakpoint_condition): Likewise.
9619 (gdb_condition_true_at_breakpoint): Likewise.
9620 (gdb_breakpoint_here): Return result directly instead
9621 of going through a local variable.
9622
9623 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9624 (clear_gdb_breakpoint_conditions): Likewise.
9625 (add_breakpoint_condition): Likewise.
9626 (gdb_condition_true_at_breakpoint): Likewise.
9627
9628 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9629 (need_step_over_p): Take target-side breakpoint condition into
9630 consideration.
9631
9632 2012-02-24 Luis Machado <lgustavo@codesourcery>
9633
9634 * server.h: Include tracepoint.h.
9635 (agent_mem_read, agent_get_trace_state_variable_value,
9636 agent_set_trace_state_variable_value,
9637 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9638 get_set_tsv_func_addr): New prototypes.
9639
9640 * ax.h: New include file.
9641 * ax.c: New source file.
9642
9643 * tracepoint.c: Include ax.h.
9644 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9645 agent_expr, eval_result_type): Move to ax.h.
9646 (parse_agent_expr): Rename to ...
9647 (gdb_parse_agent_expr): ... this, make it non-static and move
9648 to ax.h.
9649 (unparse_agent_expr) Rename to ...
9650 (gdb_unparse_agent_expr): ... this, make it non-static and move
9651 to ax.h.
9652 (eval_agent_expr): Rename to ...
9653 (eval_tracepoint_agent_expr): ... this.
9654 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9655 forward declarations.
9656 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9657 (agent_get_trace_state_variable_value): New function.
9658 (agent_set_trace_state_variable_value): New function.
9659 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9660 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9661 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9662 (condition_true_at_tracepoint): Likewise.
9663 (parse_agent_expr): Rename to ...
9664 (gdb_parse_agent_expr): ... this and move to ax.c.
9665 (unparse_agent_expr): Rename to ...
9666 (gdb_unparse_agent_expr): ... this and move to ax.c.
9667 (gdb_agent_op_name): Move to ax.c.
9668 (eval_agent_expr): Rename to ...
9669 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9670 and move to ax.c.
9671 (eval_tracepoint_agent_expr): New function.
9672 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9673 non-static.
9674 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9675 ax.c.
9676 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9677 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9678 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9679 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9680 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9681 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9682 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9683 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9684 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9685 (compile_bytecodes): Remove forward declaration.
9686 (is_goto_target): Move to ax.c.
9687 (compile_bytecodes): Move to ax.c and call
9688 agent_get_trace_state_variable_value (...) and
9689 agent_set_trace_state_variable_value (...).
9690
9691 * Makefile.in: Update ax.c and IPA dependencies.
9692
9693 2012-02-24 Pedro Alves <palves@redhat.com>
9694
9695 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9696 (cmd_bigqtbuffer_circular): ... this. Only handle
9697 'QTBuffer:circular:'.
9698 (handle_tracepoint_general_set): Adjust.
9699
9700 2012-02-16 Yao Qi <yao@codesourcery.com>
9701
9702 * inferiors.c: Move code to ...
9703 * dll.c: .... here. New.
9704 * server.h: Declare clear_dlls.
9705 * Makefile.in (SFILES): Add dll.c.
9706 (OBS): Add dll.o
9707 (dll.o): New rule.
9708
9709 2012-02-11 Yao Qi <yao@codesourcery.com>
9710
9711 * server.c: (handle_monitor_command): Add a new parameter
9712 `own_buf'.
9713 (handle_query): Update caller.
9714
9715 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9716
9717 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9718 * configure, config.in: Regenerate.
9719 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9720 is not defined.
9721
9722 2012-02-02 Pedro Alves <palves@redhat.com>
9723
9724 Try SIGKILL first, then PTRACE_KILL.
9725 * linux-low.c (linux_kill_one_lwp): New.
9726 (linux_kill_one_lwp): Rename to ...
9727 (kill_one_lwp_callback): ... this. Use the new
9728 linux_kill_one_lwp.
9729
9730 2012-02-02 Pedro Alves <palves@redhat.com>
9731
9732 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9733 inferior.
9734
9735 2012-01-27 Pedro Alves <palves@redhat.com>
9736
9737 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9738 (elf_64_file_p): Make static.
9739 (linux_pid_exe_is_elf_64_file): New.
9740 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9741 Delete declarations.
9742 (linux_pid_exe_is_elf_64_file): Declare.
9743 * linux-x86-low.c (x86_arch_setup): Use
9744 linux_pid_exe_is_elf_64_file.
9745
9746 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9747
9748 * linux-low.c (linux_wait_for_event_1): Rename to ...
9749 (linux_wait_for_event): ... here and merge it with former
9750 linux_wait_for_event - new variable wait_ptid, use it.
9751 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9752
9753 2012-01-23 Pedro Alves <palves@redhat.com>
9754
9755 * server.c (main): Avoid yet another case of infinite loop while
9756 detaching/killing after a longjmp.
9757
9758 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9759
9760 Code cleanup.
9761 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9762
9763 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9764
9765 * hostio.c (handle_readlink): New function.
9766 (handle_vFile): Call it to handle "vFile:readlink" packets.
9767
9768 2012-01-20 Pedro Alves <palves@redhat.com>
9769 Ulrich Weigand <ulrich.weigand@linaro.org>
9770
9771 * server.c (handle_v_requests): Only support vAttach and vRun to
9772 start multiple processes when in extended protocol mode.
9773
9774 2012-01-17 Pedro Alves <palves@redhat.com>
9775
9776 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9777 memalign plus mprotect to allocate the scratch buffer.
9778
9779 2012-01-13 Pedro Alves <palves@redhat.com>
9780
9781 * server.c (attach_inferior): Clear `cont_thread'.
9782
9783 2012-01-13 Pedro Alves <palves@redhat.com>
9784
9785 * server.c (main): Avoid infinite loop while detaching/killing
9786 after a longjmp.
9787
9788 2012-01-09 Doug Evans <dje@google.com>
9789
9790 * server.c (start_inferior): Set last_ptid in --wrapper case.
9791
9792 2012-01-06 Yao Qi <yao@codesourcery.com>
9793
9794 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9795 defined.
9796 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9797
9798 2012-01-04 Yao Qi <yao@codesourcery.com>
9799
9800 * tracepoint.c (cmd_qtdp): Print debug message
9801 for static tracepoint.
9802
9803 2012-01-04 Yao Qi <yao@codesourcery.com>
9804
9805 * tracepoint.c (trace_vdebug): Differentiate debug message
9806 between gdbserver and IPA.
9807
9808 2012-01-03 Yao Qi <yao@codesourcery.com>
9809
9810 * tracepoint.c (tracepoint_was_hit): Don't collect for
9811 static tracepoint.
9812
9813 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9814
9815 * terminal.h: Reformat copyright header.
9816
9817 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9818
9819 * server.c (gdbserver_version): Update copyright year.
9820 * gdbreplay.c (gdbreplay_version): Likewise.
9821
9822 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9823
9824 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9825
9826 Revert:
9827 2011-12-18 Hui Zhu <teawater@gmail.com>
9828 * linux-low.c (linux_create_inferior): Save return value to ret.
9829
9830 2011-12-18 Hui Zhu <teawater@gmail.com>
9831
9832 * linux-low.c (linux_create_inferior): Save return value to ret.
9833
9834 2011-12-16 Doug Evans <dje@google.com>
9835
9836 * linux-low.c (linux_create_inferior): If stdio connection,
9837 redirect stdin from /dev/null, stdout to stderr.
9838 * remote-utils.c (remote_is_stdio): New static global.
9839 (remote_connection_is_stdio): New function.
9840 (remote_prepare): Handle stdio connection.
9841 (remote_open): Ditto.
9842 (remote_close): Don't close stdin for stdio connections.
9843 (read_prim,write_prim): New functions. Replace all calls to
9844 read/write to these.
9845 * server.c (main): Watch for "-" argument. Move call to
9846 remote_prepare before start_inferior.
9847 * server.h (STDIO_CONNECTION_NAME): New macro.
9848 (remote_connection_is_stdio): Declare.
9849
9850 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9851 in debugging output.
9852
9853 2011-12-15 Yao Qi <yao@codesourcery.com>
9854
9855 * tracepoint.c: Include sys/syscall.h.
9856 (gdb_ust_thread): Remove preprocessor conditional.
9857
9858 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9859
9860 * linux-low.c (linux_detach_one_lwp): Call
9861 the_low_target.prepare_to_resume before detaching.
9862
9863 2011-12-14 Yao Qi <yao@codesourcery.com>
9864
9865 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9866 of write.
9867
9868 2011-12-14 Yao Qi <yao@codesourcery.com>
9869
9870 * i386-low.c (i386_low_stopped_data_address): Initialize local
9871 variable `control'.
9872
9873 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9874
9875 PR remote/13492
9876
9877 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9878 DR_CONTROL unless necessary. Extend comments.
9879 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9880 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9881
9882 2011-12-13 Yao Qi <yao@codesourcery.com>
9883
9884 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9885 macros.
9886 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9887
9888 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9889
9890 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9891 Print new debug message for such case.
9892
9893 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9894
9895 Fix overlapping memcpy.
9896 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9897 the read_inferior_memory transfer.
9898 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9899 write_inferior_memory transfer.
9900 (set_fast_tracepoint_jump): New variable buf. Use it for the
9901 read_inferior_memory and write_inferior_memory transfers.
9902 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9903 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9904 Use it for the write_inferior_memory transfer.
9905 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9906 buffers.
9907
9908 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9909
9910 * linux-low.c (fetch_register, store_register): Make code
9911 consistent, fix formatting.
9912
9913 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9914
9915 * linux-low.c (usr_store_inferior_registers): Factor out code
9916 to handle individual registers into...
9917 (store_register): ... this new function.
9918
9919 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9920
9921 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9922 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9923 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9924 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9925 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9926 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9927 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9928 (srv_xmlfiles): Add new XML files.
9929
9930 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9931 and <sys/uio.h>.
9932 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9933 (init_registers_s390_linux32v1): Add prototype.
9934 (init_registers_s390_linux32v2): Likewise.
9935 (init_registers_s390_linux64v1): Likewise.
9936 (init_registers_s390_linux64v2): Likewise.
9937 (init_registers_s390x_linux64v1): Likewise.
9938 (init_registers_s390x_linux64v2): Likewise.
9939 (s390_num_regs): Increment to 52.
9940 (s390_regmap): Add orig_r2 register.
9941 (s390_num_regs_3264): Increment to 68.
9942 (s390_regmap_3264): Add orig_r2 register.
9943 (s390_collect_ptrace_register): Handle orig_r2 register.
9944 (s390_supply_ptrace_register): Likewise.
9945 (s390_fill_last_break): New function.
9946 (s390_store_last_break): Likewise.
9947 (s390_fill_system_call): New function.
9948 (s390_store_system_call): Likewise.
9949 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9950 register sets.
9951 (s390_check_regset): New function.
9952 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9953 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9954 Update target_regsets for available register sets.
9955
9956 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9957 Jan Kratochvil <jan.kratochvil@redhat.com>
9958
9959 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9960 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9961 New.
9962 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9963 * linux-low.h (struct process_info_private): New member r_debug.
9964 * server.c (handle_qxfer_libraries): Call
9965 the_target->qxfer_libraries_svr4.
9966 (handle_qxfer_libraries_svr4): New function.
9967 (qxfer_packets): New entry "libraries-svr4".
9968 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9969 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9970 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9971 PACKET_qXfer_libraries_svr4.
9972
9973 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9974
9975 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9976 PSW address/mask between 8-byte and 16-byte formats.
9977 (s390_supply_ptrace_register): Likewise.
9978 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9979 basic addressing mode bit.
9980
9981 2011-11-24 Stan Shebs <stan@codesourcery.com>
9982
9983 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9984
9985 2011-11-17 Stan Shebs <stan@codesourcery.com>
9986
9987 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9988 (tracing_start_time): New global.
9989 (tracing_stop_time): New global.
9990 (tracing_user_name): New global.
9991 (tracing_notes): New global.
9992 (tracing_stop_note): New global.
9993 (cmd_qtstart): Set traceframe_usage, start_time.
9994 (stop_tracing): Set stop_time.
9995 (cmd_qtstatus): Report additional status.
9996 (cmd_qtp): New function.
9997 (handle_tracepoint_query): Call it.
9998 (cmd_qtnotes): New function.
9999 (handle_tracepoint_general_set): Call it.
10000 (get_timestamp): Rename from tsv_get_timestamp.
10001
10002 2011-11-14 Stan Shebs <stan@codesourcery.com>
10003 Kwok Cheung Yeung <kcy@codesourcery.com>
10004
10005 * linux-x86-low.c (small_jump_insn): New.
10006 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10007 trampoline and error message, build a trampoline and issue a small
10008 jump instruction to it.
10009 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10010 trampoline and error message.
10011 (x86_get_min_fast_tracepoint_insn_len): New.
10012 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10013 * linux-low.h (struct linux_target_ops): Add arguments to
10014 install_fast_tracepoint_jump_pad operation, add new operation.
10015 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10016 arguments.
10017 (linux_get_min_fast_tracepoint_insn_len): New function.
10018 (linux_target_op): Add new operation.
10019 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10020 (gdb_trampoline_buffer_end): Ditto.
10021 (gdb_trampoline_buffer_error): Ditto.
10022 (struct ipa_sym_addresses): Add fields for new IPA variables.
10023 (symbol_list): Add entries for new IPA variables.
10024 (struct tracepoint): Add fields to hold the address range of the
10025 trampoline used by the tracepoint.
10026 (trampoline_buffer_head): New static variable.
10027 (trampoline_buffer_tail): Ditto.
10028 (claim_trampoline_space): New function.
10029 (have_fast_tracepoint_trampoline_buffer): New function.
10030 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10031 structure.
10032 (install_fast_tracepoint): Ditto, also add error buffer argument.
10033 (cmd_qtminftpilen): New function.
10034 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10035 (fast_tracepoint_from_trampoline_address): New function.
10036 (fast_tracepoint_collecting): Handle trampoline as part of jump
10037 pad space.
10038 (set_trampoline_buffer_space): New function.
10039 (initialize_tracepoint): Initialize new IPA variables.
10040 * target.h (struct target_ops): Add arguments to
10041 install_fast_tracepoint_jump_pad operation, add new
10042 get_min_fast_tracepoint_insn_len operation.
10043 (target_get_min_fast_tracepoint_insn_len): New.
10044 (install_fast_tracepoint_jump_pad): Add arguments.
10045 * server.h (IPA_BUFSIZ): Define.
10046 * linux-i386-ipa.c: Include extra header files.
10047 (initialize_fast_tracepoint_trampoline_buffer): New function.
10048 (initialize_low_tracepoint): Call it.
10049 * server.h (set_trampoline_buffer_space): Declare.
10050 (claim_trampoline_space): Ditto.
10051 (have_fast_tracepoint_trampoline_buffer): Ditto.
10052
10053 2011-11-14 Yao Qi <yao@codesourcery.com>
10054
10055 * server.c (handle_query): Handle InstallInTrace for qSupported.
10056 * tracepoint.c (add_tracepoint): Sort list.
10057 (install_tracepoint, download_tracepoint): New.
10058 (cmd_qtdp): Call them to install and download tracepoints.
10059 (sort_tracepoints): Removed.
10060 (cmd_qtstart): Update.
10061
10062 2011-11-14 Yao Qi <yao@codesourcery.com>
10063
10064 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10065 * mem-break.h: Declare.
10066 * tracepoint.c (cmd_qtstart): Move some code to ...
10067 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10068 New.
10069 (download_tracepoints): Move some code to ...
10070 (download_tracepoint_1): ... here. New.
10071
10072 2011-11-08 Yao Qi <yao@codesourcery.com>
10073
10074 * remote-utils.c (relocate_instruction): A comment fix.
10075
10076 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10077
10078 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10079 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10080 dr_status_mirror and dr_control_mirror from debug_reg_state.
10081 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10082 (i386_initial_stuff): Remove use of deleted globals.
10083 (i386_get_thread_context, i386_set_thread_context,
10084 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10085 from debug_reg_state.
10086
10087 2011-11-05 Yao Qi <yao@codesourcery.com>
10088
10089 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10090 address as TPOINT's.
10091
10092 2011-11-02 Stan Shebs <stan@codesourcery.com>
10093
10094 * tracepoint.c (agent_mem_read_string): New function.
10095 (eval_agent_expr): Call it for tracenz.
10096 * server.c (handle_query): Report support for tracenz.
10097
10098 2011-11-02 Yao Qi <yao@codesourcery.com>
10099
10100 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10101
10102 2011-11-02 Yao Qi <yao@codesourcery.com>
10103
10104 * target.h: Fix a typo in comment.
10105
10106 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10107
10108 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10109 clobber the breakpoints' shadows with fast tracepoint jumps.
10110 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10111 * target.c (write_inferior_memory): Also pass MYADDR down to
10112 check_mem_write.
10113
10114 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10115
10116 * configure.ac: Check support for personality routine.
10117 * configure: Regenerate.
10118 * config.in: Likewise.
10119 * linux-low.c: Include <sys/personality.h>.
10120 Define ADDR_NO_RANDOMIZE if necessary.
10121 (linux_create_inferior): Disable address space randomization when
10122 forking inferior, if requested.
10123 (linux_supports_disable_randomization): New function.
10124 (linux_target_ops): Install it.
10125 * server.h (disable_randomization): Declare.
10126 * server.c (disable_randomization): New global variable.
10127 (handle_general_set): Handle QDisableRandomization.
10128 (handle_query): Likewise for qSupported.
10129 (main): Support --disable-randomization and --no-disable-randomization
10130 command line arguments.
10131 * target.h (struct target_ops): Add supports_disable_randomization.
10132 (target_supports_disable_randomization): New macro.
10133
10134 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10135
10136 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10137 ifdef check.
10138 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10139 [!PT_GETDSBT] (target_loadmap): New definition.
10140 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10141 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10142 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10143 and PT_GETDSBT to LINUX_LOADMAP.
10144 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10145 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10146
10147 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10148
10149 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10150 (arm_linux_hwbp_cap): New static variable.
10151 (arm_linux_get_hwbp_cap): Replace by ...
10152 (arm_linux_init_hwbp_cap): ... this new function.
10153 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10154 (arm_linux_get_hw_watchpoint_count): Likewise.
10155 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10156 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10157 (arm_prepare_to_resume): Use perror_with_name instead of error.
10158
10159 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10160
10161 * linux-arm-low.c: Include <signal.h>.
10162 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10163 (struct arm_linux_hwbp_cap): New data type.
10164 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10165 (struct arm_linux_hw_breakpoint): New data type.
10166 (MAX_BPTS, MAX_WPTS): Define.
10167 (struct arch_process_info, struct arch_lwp_info): New data types.
10168 (arm_linux_get_hwbp_cap): New function.
10169 (arm_linux_get_hw_breakpoint_count): Likewise.
10170 (arm_linux_get_hw_watchpoint_count): Likewise.
10171 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10172 (arm_hwbp_control_initialize): Likewise.
10173 (arm_hwbp_control_is_enabled): Likewise.
10174 (arm_hwbp_control_is_initialized): Likewise.
10175 (arm_hwbp_control_disable): Likewise.
10176 (arm_linux_hw_breakpoint_equal): Likewise.
10177 (arm_linux_hw_point_initialize): Likewise.
10178 (struct update_registers_data): New data structure.
10179 (update_registers_callback: New function.
10180 (arm_insert_point): Likewise.
10181 (arm_remove_point): Likewise.
10182 (arm_stopped_by_watchpoint): Likewise.
10183 (arm_stopped_data_address): Likewise.
10184 (arm_new_process): Likewise.
10185 (arm_new_thread): Likewise.
10186 (arm_prepare_to_resume): Likewise.
10187 (the_low_target): Register arm_insert_point, arm_remove_point,
10188 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10189 arm_new_thread, and arm_prepare_to_resume.
10190
10191 2011-09-15 Stan Shebs <stan@codesourcery.com>
10192
10193 * server.h (struct emit_ops): Add compare-goto fields.
10194 * tracepoint.c (gdb_agent_op_sizes): New table.
10195 (emit_eq_goto): New function.
10196 (emit_ne_goto): New function.
10197 (emit_lt_goto): New function.
10198 (emit_le_goto): New function.
10199 (emit_gt_goto): New function.
10200 (emit_ge_goto): New function.
10201 (is_goto_target): New function.
10202 (compile_bytecodes): Recognize special cases of compare-goto
10203 combinations and call specialized emitters for them.
10204 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10205 (amd64_emit_ne_goto): New function.
10206 (amd64_emit_lt_goto): New function.
10207 (amd64_emit_le_goto): New function.
10208 (amd64_emit_gt_goto): New function.
10209 (amd64_emit_ge_goto): New function.
10210 (amd64_emit_ops): Add the new functions.
10211 (i386_emit_eq_goto): New function.
10212 (i386_emit_ne_goto): New function.
10213 (i386_emit_lt_goto): New function.
10214 (i386_emit_le_goto): New function.
10215 (i386_emit_gt_goto): New function.
10216 (i386_emit_ge_goto): New function.
10217 (i386_emit_ops): Add the new functions.
10218
10219 2011-09-08 Stan Shebs <stan@codesourcery.com>
10220
10221 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10222 (i386_emit_epilogue): Restore %ebx.
10223
10224 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10225
10226 * server.c (step_thread): Remove definition.
10227 (process_serial_event): Don't handle Hs.
10228 * server.h (step_thread): Remove declaration.
10229 * target.c (set_desired_inferior): Remove use of step_thread.
10230
10231 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10232
10233 * linux-low.c: Include linux-procfs.h.
10234 (linux_attach_lwp_1): Update comments.
10235 (linux_attach): Scan for existing threads when attaching to a
10236 process that is the tgid.
10237 * Makefile.in: Update dependencies.
10238
10239 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10240
10241 * configure.srv: Add linux-procfs.o dependencies.
10242
10243 2011-08-14 Yao Qi <yao@codesourcery.com>
10244
10245 * target.h (struct target_ops): Fix indent.
10246 * win32-low.c (win32_target_ops): Fix comment.
10247
10248 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10249 Yao Qi <yao@codesourcery.com>
10250
10251 * Makefile.in (clean): Remove tic6x-*.c files.
10252 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10253 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10254 (tic6x-c64xp-linux.c): Likewise.
10255 * configure.srv: Add support for tic6x-*-uclinux.
10256 * linux-tic6x-low.c: New.
10257 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10258
10259 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10260 Yao Qi <yao@codesourcery.com>
10261
10262 * target.h (struct target_ops): Add read_loadmap.
10263 * linux-low.c (struct target_loadseg): New type.
10264 (struct target_loadmap): New type.
10265 (linux_read_loadmap): New function.
10266 (linux_target_ops): Add linux_read_loadmap.
10267 * server.c (handle_query): Support qXfer:fdpic:read packet.
10268 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10269 to NULL.
10270
10271 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10272
10273 * win32-low.c: Include <stdint.h>.
10274
10275 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10276
10277 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10278 to the inferior here.
10279 (i386_remove_aligned_watchpoint): Ditto.
10280 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10281 fit part of the watchpoint in the debug registers.
10282 (i386_update_inferior_debug_regs): New.
10283 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10284 registers, and only update the inferior on success.
10285 (i386_low_remove_watchpoint): Ditto.
10286
10287 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10288
10289 * linux-low.c (compare_ints, unique, list_threads, show_process,
10290 linux_core_of_thread): Delete.
10291 (linux_target_ops): Change linux_core_of_thread to
10292 linux_common_core_of_thread.
10293 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10294 * utils.c (malloc_failure): Change type of argument.
10295 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10296 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10297 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10298 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10299 (IPA_OBJS): Add common-utils-ipa.o.
10300 (ptid_h, linux_osdata_h): New macros.
10301 (server_h): Add common/common-utils.h, common/xml-utils.h,
10302 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10303 common/ptid.h.
10304 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10305 ptid.o, buffer.o): New rules.
10306 (linux-low.o): Add common/linux-osdata.h as a dependency.
10307 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10308 * configure.ac: Add AC_HEADER_DIRENT check.
10309 * config.in: Regenerate.
10310 * configure: Regenerate.
10311 * remote-utils.c (xml_escape_text): Delete.
10312 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10313 buffer_xml_printf): Move to common/buffer.c.
10314 * server.c (main): Remove call to initialize_inferiors.
10315 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10316 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10317 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10318 internal_error, gdb_assert, gdb_assert_fail): Delete.
10319 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10320 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10321 common/buffer.h.
10322 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10323 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10324 initialize_inferiors): Delete.
10325
10326 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10327
10328 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10329 symbol error.
10330
10331 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10332
10333 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10334 assertion.
10335 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10336
10337 2011-05-26 Yao Qi <yao@codesourcery.com>
10338
10339 * Makefile.in (thread-db.o): Track dependence to
10340 common/gdb_thread_db.h.
10341 * thread-db.c: include gdb_thread_db.h from right place.
10342
10343 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10344
10345 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10346 __FILE__ and __LINE__ to internal_error.
10347
10348 2011-05-13 Doug Evans <dje@google.com>
10349
10350 * thread-db.c (try_thread_db_load_from_sdir): New function.
10351 (try_thread_db_load_from_dir): New function.
10352 (thread_db_load_search): Handle $sdir, ignore $pdir.
10353 Remove trying of system directories if search of
10354 libthread-db-search-path fails, that is now done via $sdir.
10355
10356 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10357
10358 * server.c (handle_query): Add EnableDisableTracepoints to the list
10359 of supported features.
10360 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10361 tracepoints.
10362 (cmd_qtenable_disable): New.
10363 (cmd_qtstart): Install tracepoints even if disabled.
10364 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10365 receiving a QTEnable or QTDisable packet.
10366 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10367 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10368 tracepoints.
10369 (gdb_probe): Skip data collection if static tracepoint is disabled.
10370
10371 2011-05-10 Doug Evans <dje@google.com>
10372
10373 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10374
10375 2011-05-04 Doug Evans <dje@google.com>
10376
10377 * linux-low.c (linux_join): Skip process lookup.
10378 * spu-low.c (spu_join): Ditto.
10379 * server.c (join_inferiors_callback): Delete.
10380 (process_serial_event): For 'D' packet (detach) call join_inferior
10381 directly.
10382
10383 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10384
10385 * README: Don't mention xscale*-*-linux*.
10386 * configure.srv (xscale*-*-linux*): Don't handle target.
10387
10388 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10389
10390 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10391 casting pointers.
10392 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10393 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10394 (i386_emit_void_call_2): Likewise.
10395
10396 2011-04-26 Yao Qi <yao@codesourcery.com>
10397
10398 * linux-low.c: Move common macros to linux-ptrace.h.
10399 Include linux-ptrace.h.
10400 * Makefile.in (linux_ptrace_h): New.
10401 (linux-low.o): Depends on linux-ptrace.h.
10402
10403 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10404
10405 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10406 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10407 (remote_prepare): New function with most of the TCP code from ...
10408 (remote_open): ... here. Detect PORT here unconditionally. Move also
10409 setting transport_is_reliable.
10410 * server.c (run_once): New variable.
10411 (gdbserver_usage): Document it.
10412 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10413 the first run if RUN_ONCE.
10414 * server.h (run_once, remote_prepare): New declarations.
10415
10416 2011-04-19 Tom Tromey <tromey@redhat.com>
10417
10418 * win32-low.c (handle_load_dll): Remove duplicate "the".
10419
10420 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10421
10422 Remove support for old Cygwin 1.5 versions.
10423 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10424 function to avoid warning.
10425 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10426 warning.
10427
10428 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10429
10430 * gdbserver/server.h (Macro _): Define it if not available.
10431
10432 2011-03-14 Michael Snyder <msnyder@vmware.com>
10433
10434 * hostio.c (handle_close): Remove unnecessary null test.
10435
10436 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10437
10438 * Makefile.in (maintainer-clean realclean distclean): Remove
10439 "make ... subdir_do" command.
10440
10441 2011-03-10 Michael Snyder <msnyder@vmware.com>
10442
10443 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10444
10445 * server.c (handle_v_run): Free alloced buffer on early return.
10446
10447 2011-03-09 Yao Qi <yao@codesourcery.com>
10448
10449 Revert:
10450 2011-03-04 Yao Qi <yao@codesourcery.com>
10451
10452 * Makefile.in: Remove GNU make feature --directory.
10453
10454 2011-03-05 Yao Qi <yao@codesourcery.com>
10455
10456 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10457 (subdir_do): New make target. Copied from gdb/Makefile.
10458 (maintainer-clean, realclean, distclean, clean): Call corresponding
10459 make targets in common/Makefile.
10460
10461 2011-02-11 Yao Qi <yao@codesourcery.com>
10462
10463 * configure.ac: Call AC_PROG_RANLIB.
10464 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10465 * configure: Regenerate.
10466
10467 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10468
10469 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10470
10471 2011-03-06 Yao Qi <yao@codesourcery.com>
10472
10473 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10474
10475 2011-03-05 Yao Qi <yao@codesourcery.com>
10476
10477 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10478 (subdir_do): New make target. Copied from gdb/Makefile.
10479 (maintainer-clean, realclean, distclean, clean): Call corresponding
10480 make targets in common/Makefile.
10481
10482 2011-03-04 Yao Qi <yao@codesourcery.com>
10483
10484 * Makefile.in: Remove GNU make feature --directory.
10485
10486 2011-03-04 Michael Snyder <msnyder@vmware.com>
10487
10488 * server.c (queue_stop_reply): Call xmalloc not malloc.
10489
10490 2011-03-02 Michael Snyder <msnyder@vmware.com>
10491
10492 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10493
10494 2011-02-28 Michael Snyder <msnyder@vmware.com>
10495
10496 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10497 (cmd_qtframe): Ditto.
10498 (cmd_qtbuffer): Ditto.
10499 (cmd_bigqtbuffer): Ditto.
10500
10501 * utils.c (decimal2str): Initialize 'width' to nine, then
10502 don't mess with it.
10503
10504 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10505
10506 * hostio.c (require_data): Free *data, not data.
10507
10508 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10509
10510 * hostio.c (require_data): Use free, not xfree.
10511
10512 2011-02-27 Michael Snyder <msnyder@vmware.com>
10513
10514 * server.c (handle_query): Discard unused value.
10515
10516 * hostio.c (require_data): Free malloc memory before returning
10517 error.
10518
10519 2011-02-26 Michael Snyder <msnyder@vmware.com>
10520
10521 * linux-low.c (list_threads): Call closedir for dirent.
10522
10523 2011-02-27 Michael Snyder <msnyder@vmware.com>
10524
10525 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10526 a case statement falls through.
10527
10528 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10529
10530 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10531 in comparison.
10532
10533 2011-02-26 Michael Snyder <msnyder@vmware.com>
10534
10535 * utils.c (decimal2str): Eliminate dead code and dead param.
10536 (pulongest): Drop dead param from call to decimal2str.
10537 (plongest): Ditto.
10538
10539 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10540
10541 Revert the following patch (not approved yet):
10542 2011-02-21 Hui Zhu <teawater@gmail.com>
10543 * tracepoint.c (tp_printf): New function.
10544 (eval_agent_expr): Handle gdb_agent_op_printf.
10545
10546 2011-02-21 Hui Zhu <teawater@gmail.com>
10547
10548 * tracepoint.c (tp_printf): New function.
10549 (eval_agent_expr): Handle gdb_agent_op_printf.
10550
10551 2011-02-18 Tom Tromey <tromey@redhat.com>
10552
10553 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10554 (tracepoint.o): Likewise.
10555 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10556 (gdb_agent_op_names): Likewise.
10557
10558 2011-02-18 Tom Tromey <tromey@redhat.com>
10559
10560 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10561 gdb_agent_op_rot>: New constants.
10562 (gdb_agent_op_names): Add pick and roll.
10563 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10564 cases.
10565
10566 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10567
10568 * aclocal.m4: Regenerated with aclocal-1.11.1.
10569
10570 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10571
10572 * server.c (handle_qxfer_traceframe_info): New.
10573 (qxfer_packets): Register "traceframe-info".
10574 (handle_query): Report support for qXfer:traceframe-info:read+.
10575 * tracepoint.c (match_blocktype): New.
10576 (traceframe_find_block_type): Rename to ...
10577 (traceframe_walk_blocks): ... this. Add callback filter argument,
10578 and use it.
10579 (traceframe_find_block_type): New, reimplemented on top of
10580 traceframe_walk_blocks.
10581 (build_traceframe_info_xml): New.
10582 (traceframe_read_info): New.
10583 * server.h (traceframe_read_info): Declare.
10584
10585 2011-02-11 Yao Qi <yao@codesourcery.com>
10586
10587 * configure.ac: Call AC_PROG_RANLIB.
10588 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10589 * configure: Regenerate.
10590
10591 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10592
10593 * server.c (gdb_read_memory): Change return semantics to allow
10594 partial transfers.
10595 (handle_search_memory_1): Adjust.
10596 (process_serial_event) <'m' packet>: Handle partial transfers.
10597 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10598
10599 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10600
10601 * regcache.c (init_register_cache): Initialize
10602 regcache->register_status.
10603 (free_register_cache): Release regcache->register_status.
10604 (regcache_cpy): Copy register_status.
10605 (registers_to_string): Print 'x's for unavailable registers.
10606 (supply_register): Mark the register's status valid or
10607 unavailable, depending on whether a buffer was passed in or not.
10608 (supply_register_zeroed): New.
10609 (supply_regblock): Mark the registers' status valid or
10610 unavailable, depending on whether a buffer was passed in or not.
10611 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10612 (struct regcache): New `register_status' field.
10613 (supply_register_zeroed): Declare.
10614 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10615 supply_register_zeroed, rather than passing a NULL buffer to
10616 supply_register.
10617 * tracepoint.c (fetch_traceframe_registers): Update comment.
10618
10619 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10620
10621 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10622 buffer explicit.
10623
10624 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10625
10626 * server.h (decode_xfer_write): Change prototype.
10627 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10628 and don't extract the annex here.
10629 * server.c (decode_xfer_read): Remove `annex' parameter,
10630 and don't extract the annex here.
10631 (decode_xfer): New.
10632 (struct qxfer): New.
10633 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10634 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10635 (handle_qxfer_statictrace): New functions, abstracted out from
10636 handle_query, and made to use the struct qxfer interface.
10637 (handle_threads_qxfer_proper): Rename to ...
10638 (handle_qxfer_threads_proper): ... this.
10639 (handle_threads_qxfer): Rename to ...
10640 (handle_qxfer_threads): ... this. Adjust.
10641 (qxfer_packets): New array.
10642 (handle_qxfer): New function.
10643 (handle_query): Use handle_qxfer.
10644
10645 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10646
10647 * gdbreplay.c: Shorten lines of >= 80 columns.
10648 * linux-low.c: Ditto.
10649 * linux-ppc-low.c: Ditto.
10650 * linux-s390-low.c: Ditto.
10651 * linux-sparc-low.c: Ditto.
10652 * linux-x86-low.c: Ditto.
10653 * linux-xtensa-low.c: Ditto.
10654 * mem-break.c: Ditto.
10655 * nto-low.c: Ditto.
10656 * regcache.h: Ditto.
10657 * remote-utils.c: Ditto.
10658 * server.c: Ditto.
10659 * server.h: Ditto.
10660 * thread-db.c: Ditto.
10661 * tracepoint.c: Ditto.
10662 * utils.c: Ditto.
10663 * win32-low.h: Ditto.
10664
10665 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10666
10667 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10668 update.
10669
10670 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10671
10672 * server.c (gdbserver_version): Update copyright year in version
10673 output.
10674 * gdbreplay.c (gdbreplay_version): Ditto.
10675
10676 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10677
10678 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10679 * linux-bfin-low.c: New file.
10680 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10681 PT_DATA_ADDR for BFIN targets.
10682 * Makefile.in (SFILES): Add linux-bfin-low.c.
10683 (clean): Remove reg-bfin.c.
10684 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10685 * README: Mention supported Blackfin targets.
10686
10687 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10688
10689 * .gitignore: New file.
10690
10691 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10692
10693 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10694
10695 2010-10-22 Jie Zhang <jie@codesourcery.com>
10696
10697 * Makefile.in: Add FLAGS_TO_PASS variable.
10698 (install): Remove dependency of install-only and recursively
10699 invoke make for install-only.
10700
10701 2010-10-04 Doug Evans <dje@google.com>
10702
10703 * Makefile.in (uninstall): Use $(DESTDIR).
10704
10705 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10706
10707 PR gdb/11842
10708
10709 * linux-x86-low.c (compat_siginfo_from_siginfo)
10710 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10711 si_code is < 0. Check for si_code == SI_TIMER before checking for
10712 si_code < 0.
10713
10714 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10715
10716 * lynx-i386-low.c: New file.
10717 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10718
10719 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10720
10721 * lynx-low.c (ptrace_request_to_str): Remove handling for
10722 request values that have been removed in LynxOS 5.x.
10723
10724 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10725
10726 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10727 <ptrace.h>
10728
10729 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10730
10731 * configure.ac: Add --enable-inprocess-agent option.
10732 * configure: Rebuilt.
10733
10734 2010-09-06 Yao Qi <yao@codesourcery.com>
10735
10736 * linux-low.c (linux_kill): Remove unused variable.
10737 (linux_stabilize_threads): Likewise.
10738 * server.c (start_inferior): Likewise.
10739 (queue_stop_reply_callback): Likewise.
10740 * tracepoint.c (do_action_at_tracepoint): Likewise.
10741
10742 2010-09-06 Yao Qi <yao@codesourcery.com>
10743
10744 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10745 on return.
10746
10747 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10748
10749 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10750
10751 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10752
10753 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10754 "$(IPA_DEPFILES)".
10755
10756 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10757
10758 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10759 gdbserver/lynx-ppc-low.c: New files.
10760 * Makefile.in (lynx_low_h): New variable.
10761 (lynx-low.o, lynx-ppc-low.o): New rules.
10762 * configure.ac: On LynxOS, link with -lnetinet.
10763 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10764 * configure: regenerate.
10765
10766 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10767
10768 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10769 * configure.ac: Add check for vasprintf and vsnprintf.
10770 * configure, config.in: Regenerate.
10771 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10772
10773 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10774
10775 * gdbreplay.c: Move include of alloca.h up, next to include of
10776 malloc.h.
10777 * server.h: Add include of malloc.h.
10778 * mem-break.c: Remove include of malloc.h.
10779 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10780
10781 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10782
10783 * Makefile.in (memmem.o): Build with -Wno-error.
10784
10785 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10786
10787 * utils.c (xsnprintf): Make non-static.
10788 * server.h: Add xsnprintf declaration.
10789 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10790 replace calls to snprintf by calls to xsnprintf throughout.
10791
10792 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10793
10794 * configure.ac: Add configure check for alloca.
10795 * configure, config.in: Regenerate.
10796 * server.h: Include alloca.h if it exists.
10797 * gdbreplay.c: Include alloca.h if it exists.
10798
10799 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10800
10801 * linux-low.c (__SIGRTMIN): Define if not already defined.
10802 (linux_create_inferior): Check for __ANDROID__ rather than
10803 __SIGRTMIN.
10804 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10805 are already deferred.
10806 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10807 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10808 stopped and already has a pending signal to report.
10809 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10810 a pending signal to report or is moving out of a jump pad.
10811 (linux_init_signals): Check for __ANDROID__ rather than
10812 __SIGRTMIN.
10813
10814 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10815
10816 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10817 debug_threads check. Avoid a linear search when not doing debug
10818 output.
10819
10820 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10821
10822 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10823 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10824 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10825 (process_event): Change local fd's type to gdb_fildes_t.
10826 (create_file_handler): Adjust prototype.
10827 (delete_file_handler): Adjust prototype.
10828 (handle_file_event): Adjust prototype. Use pfildes.
10829 (create_file_event): Adjsut prototype.
10830 * remote-utils.c (remote_desc, listen_desc): Change type to
10831 gdb_fildes_t.
10832 * server.h: New gdb_fildes_t typedef.
10833 [USE_WIN32API]: Include winsock2.h.
10834 (delete_file_handler, add_file_handler): Adjust prototypes.
10835 (pfildes): Declare.
10836 * utils.c (pfildes): New.
10837
10838 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10839
10840 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10841 * configure: Regenerate.
10842
10843 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10844
10845 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10846 (linux_done_accessing_memory): ... this.
10847 (linux_target_ops): Adjust.
10848 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10849 * nto-low.c (nto_target_ops): Adjust comment.
10850 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10851 * spu-low.c (spu_target_ops): Adjust comment.
10852 * target.h (target_ops): Rename unprepare_to_access_memory field
10853 to done_accessing_memory.
10854 (unprepare_to_access_memory): Rename to ...
10855 (done_accessing_memory): ... this.
10856
10857 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10858
10859 * linux-low.c (linux_prepare_to_access_memory): New.
10860 (linux_unprepare_to_access_memory): New.
10861 (linux_target_ops): Install them.
10862 * server.c (read_memory): Rename to ...
10863 (gdb_read_memory): ... this. Use
10864 prepare_to_access_memory/prepare_to_access_memory.
10865 (write_memory): Rename to ...
10866 (gdb_write_memory): ... this. Use
10867 prepare_to_access_memory/prepare_to_access_memory.
10868 (handle_search_memory_1): Adjust.
10869 (process_serial_event): Adjust.
10870 * target.h (struct target_ops): New fields
10871 prepare_to_access_memory and unprepare_to_access_memory.
10872 (prepare_to_access_memory, unprepare_to_access_memory): New.
10873 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10874 prepare_to_access_memory/prepare_to_access_memory.
10875 * nto-low.c (nto_target_ops): Adjust.
10876 * spu-low.c (spu_target_ops): Adjust.
10877 * win32-low.c (win32_target_ops): Adjust.
10878
10879 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10880
10881 * Makefile.in (WARN_CFLAGS): Get it from configure.
10882 (WERROR_CFLAGS): New.
10883 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10884 * configure.ac: Introduce --enable-werror, which adds -Werror to
10885 the compiler command line. Enabled by default. Disable with
10886 --disable-werror. Add -Wdeclaration-after-statement
10887 Wpointer-arith and -Wformat-nonliteral to warning flags.
10888 * configure: Regenerate.
10889
10890 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10891
10892 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10893
10894 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10895
10896 * gdbreplay.c (remote_error): New.
10897 (gdbchar): New.
10898 (expect): Use gdbchar. Check for error reading from GDB.
10899 Clarify sync error output.
10900 (play): Check for errors writing to GDB.
10901 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10902 * remote-utils.c (getpkt): Check for errors writing to the remote
10903 descriptor.
10904
10905 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.c (linux_wait_1): Move non-debugging code out of
10908 `debug_threads' control.
10909
10910 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10911
10912 * linux-low.c (linux_wait_1): Don't set last_status here.
10913 * server.c (push_event, queue_stop_reply_callback): Assert we're
10914 not pushing a TARGET_WAITKIND_IGNORE event.
10915 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10916 (myresume, handle_target_event): Set the thread's last_resume_kind
10917 and last_status from the target returned status.
10918
10919 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10920
10921 PR threads/10729
10922
10923 * linux-x86-low.c (update_debug_registers_callback): New.
10924 (i386_dr_low_set_addr): Use it.
10925 (i386_dr_low_get_addr): New.
10926 (i386_dr_low_set_control): Use update_debug_registers_callback.
10927 (i386_dr_low_get_control): New.
10928 (i386_dr_low_get_status): Adjust.
10929 * linux-low.c (linux_stop_lwp): New.
10930 * linux-low.h (linux_stop_lwp): Declare.
10931
10932 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10933 argument instead of a i386_debug_reg_state.
10934 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10935 a i386_debug_reg_state.
10936 (i386_insert_aligned_watchpoint): Adjust.
10937 (i386_remove_aligned_watchpoint): Adjust.
10938 (i386_low_stopped_data_address): Read the debug registers from the
10939 inferior instead of from the mirrors.
10940 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10941 (i386_dr_low_get_addr): Declare.
10942 (i386_dr_low_get_control): Declare.
10943 (i386_dr_low_get_status): Change prototype.
10944
10945 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10946 (i386_dr_low_get_addr): New.
10947 (i386_dr_low_get_control): New.
10948 (i386_dr_low_get_status): Adjust prototype. Return
10949 dr_status_mirror.
10950 (i386_initial_stuff): Clear dr_status_mirror and
10951 dr_control_mirror.
10952 (i386_get_thread_context): Adjust.
10953 (i386_set_thread_context): Adjust.
10954 (i386_thread_added): Adjust.
10955
10956 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10957
10958 * linux-low.h (linux_thread_area): Delete declaration.
10959
10960 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10961
10962 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10963 after its termination.
10964
10965 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10966
10967 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10968 (gdb_wants_all_stopped): Delete.
10969 (linux_wait_1): Don't call them.
10970 * server.c (handle_v_cont): Tag all threads as want-stopped.
10971 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10972 stopped as "client-wants-stopped".
10973
10974 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10975
10976 * Makefile.in (signals_h): New.
10977 (server_h): Depend on it.
10978 (server.o): Don't depend on $(signals_def).
10979 (signals.o): Depend on $(signals_def).
10980
10981 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10982
10983 * Makefile.in (signals_def): New.
10984 (server_h): Append include/gdb/signals.h and signals_def.
10985 (server.o): Append signals_def.
10986
10987 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10988
10989 * server.c (handle_target_event): Use target_signal_to_host for
10990 resume_info.sig initialization.
10991 * target.h (struct thread_resume) <sig>: New comment.
10992
10993 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10994
10995 * server.c (handle_query): strcpy() the returned string from paddress()
10996 instead of sprintf().
10997 * utils.c (paddress): Return phex_nz().
10998
10999 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11000
11001 * server.c (handle_v_cont): Call mourn_inferior if process
11002 just exited.
11003 (myresume): Likewise.
11004
11005 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11006
11007 Static tracepoints, and integration with UST.
11008
11009 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11010 * mem-break.c (uninsert_all_breakpoints)
11011 (reinsert_all_breakpoints): New.
11012 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11013 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11014 (gdb_agent_ust_loaded, helper_thread_id)
11015 (gdb_agent_helper_thread_id): New macros.
11016 (struct ipa_sym_addresses): Add addr_ust_loaded,
11017 addr_helper_thread_id, addr_cmd_buf.
11018 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11019 (in_process_agent_loaded_ust): New.
11020 (write_e_ust_not_loaded): New.
11021 (maybe_write_ipa_ust_not_loaded): New.
11022 (struct collect_static_trace_data_action): New.
11023 (enum tracepoint_type) <static_tracepoint>: New.
11024 (struct tracepoint) <handle>: Mention static tracepoints.
11025 (struct static_tracepoint_ctx): New.
11026 (CMD_BUF_SIZE): New.
11027 (add_tracepoint_action): Handle static tracepoint actions.
11028 (unprobe_marker_at): New.
11029 (clear_installed_tracepoints): Handle static tracepoints.
11030 (cmd_qtdp): Handle static tracepoints.
11031 (probe_marker_at): New.
11032 (cmd_qtstart): Handle static tracepoints.
11033 (response_tracepoint): Handle static tracepoints.
11034 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11035 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11036 (get_context_regcache): Handle static tracepoints.
11037 (do_action_at_tracepoint): Handle static tracepoint actions.
11038 (traceframe_find_block_type): Handle static trace data blocks.
11039 (traceframe_read_sdata): New.
11040 (download_tracepoints): Download static tracepoint actions.
11041 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11042 (GDB_PROBE_NAME): New.
11043 (ust_ops): New.
11044 (GET_UST_SYM): New.
11045 (USTF): New.
11046 (dlsym_ust): New.
11047 (ust_marker_to_static_tracepoint): New.
11048 (gdb_probe): New.
11049 (collect_ust_data_at_tracepoint): New.
11050 (gdb_ust_probe): New.
11051 (UNIX_PATH_MAX, SOCK_DIR): New.
11052 (gdb_ust_connect_sync_socket): New.
11053 (resume_thread, stop_thread): New.
11054 (run_inferior_command): New.
11055 (init_named_socket): New.
11056 (gdb_ust_socket_init): New.
11057 (cstr_to_hexstr): New.
11058 (next_st): New.
11059 (first_marker, next_marker): New.
11060 (response_ust_marker): New.
11061 (cmd_qtfstm, cmd_qtsstm): New.
11062 (unprobe_marker_at, probe_marker_at): New.
11063 (cmd_qtstmat, gdb_ust_thread): New.
11064 (gdb_ust_init): New.
11065 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11066 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11067 (ST_REGENTRY): New.
11068 (x86_64_st_collect_regmap): New.
11069 (X86_64_NUM_ST_COLLECT_GREGS): New.
11070 (AMD64_RIP_REGNUM): New.
11071 (supply_static_tracepoint_registers): New.
11072 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11073 (ST_REGENTRY): New.
11074 (i386_st_collect_regmap): New.
11075 (i386_NUM_ST_COLLECT_GREGS): New.
11076 (supply_static_tracepoint_registers): New.
11077 * server.c (handle_query): Handle qXfer:statictrace:read.
11078 <qSupported>: Report support for StaticTracepoints, and
11079 qXfer:statictrace:read features.
11080 * server.h (traceframe_read_sdata)
11081 (supply_static_tracepoint_registers): Declare.
11082 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11083 (unpack_varlen_hex): Include in IPA build.
11084 * Makefile.in (ustlibs, ustinc): New.
11085 (IPA_OBJS): Add remote-utils-ipa.o.
11086 ($(IPA_LIB)): Link -ldl and -lpthread.
11087 (UST_CFLAGS): New.
11088 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11089 * config.in, configure: Regenerate.
11090
11091 2010-06-20 Ian Lance Taylor <iant@google.com>
11092 Pedro Alves <pedro@codesourcery.com>
11093
11094 * linux-x86-low.c (always_true): Delete.
11095 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11096 trying to fool the compiler with always_true.
11097
11098 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11099
11100 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11101 conditions in gdbserver.
11102
11103 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11104
11105 * spu-low.c (spu_read_memory): Wrap around local store limit.
11106 (spu_write_memory): Likewise.
11107
11108 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11109
11110 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11111 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11112 LONGEST uses.
11113 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11114 uses.
11115 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11116 uses with LONGEST uses.
11117
11118 2010-06-14 Stan Shebs <stan@codesourcery.com>
11119 Pedro Alves <pedro@codesourcery.com>
11120
11121 Bytecode compiler.
11122
11123 * linux-x86-low.c: Include limits.h.
11124 (add_insns): New.
11125 (always_true): New.
11126 (EMIT_ASM): New.
11127 (EMIT_ASM32): New.
11128 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11129 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11130 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11131 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11132 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11133 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11134 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11135 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11136 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11137 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11138 (amd64_emit_void_call_2): New.
11139 (amd64_emit_ops): New.
11140 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11141 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11142 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11143 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11144 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11145 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11146 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11147 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11148 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11149 (i386_emit_stack_adjust, i386_emit_int_call_1)
11150 (i386_emit_void_call_2): New.
11151 (i386_emit_ops): New.
11152 (x86_emit_ops): New.
11153 (the_low_target): Install x86_emit_ops.
11154 * server.h (struct emit_ops): New.
11155 (get_raw_reg_func_addr): Declare.
11156 (current_insn_ptr, emit_error): Declare.
11157 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11158 (set_trace_state_variable_value): New defines.
11159 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11160 addr_get_trace_state_variable_value and
11161 addr_set_trace_state_variable_value.
11162 (symbol_list): New fields for get_raw_reg,
11163 get_trace_state_variable_value and set_trace_state_variable_value.
11164 (condfn): New typedef.
11165 (struct tracepoint): New field `compiled_cond'.
11166 (do_action_at_tracepoint): Clear compiled_cond.
11167 (get_trace_state_variable_value, set_trace_state_variable_value):
11168 Export in the IPA.
11169 (condition_true_at_tracepoint): If there's a compiled condition,
11170 run that.
11171 (current_insn_ptr, emit_error): New globals.
11172 (struct bytecode_address): New.
11173 (get_raw_reg_func_addr): New.
11174 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11175 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11176 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11177 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11178 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11179 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11180 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11181 (compile_tracepoint_condition, compile_bytecodes): New.
11182 * target.h (emit_ops): Forward declare.
11183 (struct target_ops): New field emit_ops.
11184 (target_emit_ops): New.
11185 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11186 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11187 * linux-low.c (linux_emit_ops): New.
11188 (linux_target_ops): Install it.
11189 * linux-low.h (struct linux_target_ops): New field emit_ops.
11190
11191 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11192
11193 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11194 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11195
11196 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11197 Stan Shebs <stan@codesourcery.com>
11198
11199 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11200 (all): Depend on $(extra_libraries).
11201 (install-only): Install the IPA.
11202 (IPA_OBJS, IPA_LIB): New.
11203 (clean): Remove the IPA lib.
11204 (IPAGENT_CFLAGS): New.
11205 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11206 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11207 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11208 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11209 * configure.ac: Check for atomic builtins support in the compiler.
11210 (IPA_DEPFILES, extra_libraries): Define.
11211 * configure.srv (ipa_obj): Add description.
11212 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11213 (i[34567]86-*-linux*): Set ipa_obj.
11214 (x86_64-*-linux*): Set ipa_obj.
11215 * linux-low.c (stabilizing_threads): New.
11216 (supports_fast_tracepoints): New.
11217 (linux_detach): Stabilize threads before detaching.
11218 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11219 the lwp is either not stabilizing, or is moving out of a jump pad.
11220 (linux_fast_tracepoint_collecting): New.
11221 (maybe_move_out_of_jump_pad): New.
11222 (enqueue_one_deferred_signal): New.
11223 (dequeue_one_deferred_signal): New.
11224 (linux_wait_for_event_1): If moving out of a jump pad, defer
11225 pending signals to later.
11226 (linux_stabilize_threads): New.
11227 (linux_wait_1): Check if threads need moving out of jump pads, and
11228 do it if so.
11229 (stuck_in_jump_pad_callback): New.
11230 (move_out_of_jump_pad_callback): New.
11231 (lwp_running): New.
11232 (linux_resume_one_lwp): Handle moving out of jump pads.
11233 (linux_set_resume_request): Dequeue deferred signals.
11234 (need_step_over_p): Also step over fast tracepoint jumps.
11235 (start_step_over): Also uninsert fast tracepoint jumps.
11236 (finish_step_over): Also reinsert fast tracepoint jumps.
11237 (linux_install_fast_tracepoint_jump): New.
11238 (linux_target_ops): Install linux_stabilize_threads and
11239 linux_install_fast_tracepoint_jump_pad.
11240 * linux-low.h (linux_target_ops) <get_thread_area,
11241 install_fast_tracepoint_jump_pad>: New fields.
11242 (struct lwp_info) <collecting_fast_tracepoint,
11243 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11244 (linux_get_thread_area): Declare.
11245 * linux-x86-low.c (jump_insn): New.
11246 (x86_get_thread_area): New.
11247 (append_insns): New.
11248 (push_opcode): New.
11249 (amd64_install_fast_tracepoint_jump_pad): New.
11250 (i386_install_fast_tracepoint_jump_pad): New.
11251 (x86_install_fast_tracepoint_jump_pad): New.
11252 (the_low_target): Install x86_get_thread_area and
11253 x86_install_fast_tracepoint_jump_pad.
11254 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11255 (struct fast_tracepoint_jump): New.
11256 (fast_tracepoint_jump_insn): New.
11257 (fast_tracepoint_jump_shadow): New.
11258 (find_fast_tracepoint_jump_at): New.
11259 (fast_tracepoint_jump_here): New.
11260 (delete_fast_tracepoint_jump): New.
11261 (set_fast_tracepoint_jump): New.
11262 (uninsert_fast_tracepoint_jumps_at): New.
11263 (reinsert_fast_tracepoint_jumps_at): New.
11264 (set_breakpoint_at): Use write_inferior_memory.
11265 (uninsert_raw_breakpoint): Use write_inferior_memory.
11266 (check_mem_read): Mask out fast tracepoint jumps.
11267 (check_mem_write): Mask out fast tracepoint jumps.
11268 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11269 (set_fast_tracepoint_jump): Declare.
11270 (delete_fast_tracepoint_jump)
11271 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11272 (reinsert_fast_tracepoint_jumps_at): Declare.
11273 * regcache.c: Don't compile many functions when building the
11274 in-process agent library.
11275 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11276 the register buffer in the heap.
11277 (free_register_cache): If the register buffer isn't owned by the
11278 regcache, don't free it.
11279 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11280 pre-existing register caches.
11281 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11282 type.
11283 (convert_ascii_to_int): : Constify `from' parameter type.
11284 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11285 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11286 the needed buffer in-place.
11287 (relocate_instruction): New.
11288 * server.c (handle_query) <qSymbols>: If the target supports
11289 tracepoints, give it a chance of looking up symbols. Report
11290 support for fast tracepoints.
11291 (handle_status): Stabilize threads.
11292 (process_serial_event): Adjust.
11293 * server.h (struct fast_tracepoint_jump): Forward declare.
11294 (struct process_info) <fast_tracepoint_jumps>: New field.
11295 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11296 (decode_X_packet, decode_M_packet): Adjust.
11297 (relocate_instruction): Declare.
11298 (in_process_agent_loaded): Declare.
11299 (tracepoint_look_up_symbols): Declare.
11300 (struct fast_tpoint_collect_status): Declare.
11301 (fast_tracepoint_collecting): Declare.
11302 (force_unlock_trace_buffer): Declare.
11303 (handle_tracepoint_bkpts): Declare.
11304 (initialize_low_tracepoint)
11305 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11306 * target.h (struct target_ops) <stabilize_threads,
11307 install_fast_tracepoint_jump_pad>: New fields.
11308 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11309 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11310 [HAVE_STDINT_H]: Include stdint.h.
11311 (trace_debug_1): Rename to ...
11312 (trace_vdebug): ... this.
11313 (trace_debug): Rename to ...
11314 (trace_debug_1): ... this. Add `level' parameter.
11315 (trace_debug): New.
11316 (ATTR_USED, ATTR_NOINLINE): New.
11317 (IP_AGENT_EXPORT): New.
11318 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11319 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11320 (about_to_request_buffer_space, trace_buffer_is_full)
11321 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11322 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11323 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11324 (traceframe_write_count, traceframes_created)
11325 (trace_state_variables)
11326 New renaming defines.
11327 (struct ipa_sym_addresses): New.
11328 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11329 (symbol_list): New.
11330 (ipa_sym_addrs): New.
11331 (all_tracepoint_symbols_looked_up): New.
11332 (in_process_agent_loaded): New.
11333 (write_e_ipa_not_loaded): New.
11334 (maybe_write_ipa_not_loaded): New.
11335 (tracepoint_look_up_symbols): New.
11336 (debug_threads) [IN_PROCESS_AGENT]: New.
11337 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11338 (UNKNOWN_SIDE_EFFECTS): New.
11339 (stop_tracing): New.
11340 (flush_trace_buffer): New.
11341 (stop_tracing_bkpt): New.
11342 (flush_trace_buffer_bkpt): New.
11343 (read_inferior_integer): New.
11344 (read_inferior_uinteger): New.
11345 (read_inferior_data_pointer): New.
11346 (write_inferior_data_pointer): New.
11347 (write_inferior_integer): New.
11348 (write_inferior_uinteger): New.
11349 (struct collect_static_trace_data_action): Delete.
11350 (enum tracepoint_type): New.
11351 (struct tracepoint) <type>: New field `type'.
11352 <actions_str, step_actions, step_actions_str>: Only include in
11353 GDBserver.
11354 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11355 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11356 (tracepoints): Use IP_AGENT_EXPORT.
11357 (last_tracepoint): Don't include in the IPA.
11358 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11359 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11360 (alloced_trace_state_variables): New.
11361 (trace_state_variables): Use IP_AGENT_EXPORT.
11362 (traceframe_t): Delete unused variable.
11363 (circular_trace_buffer): Don't include in the IPA.
11364 (trace_buffer_start): Delete.
11365 (struct trace_buffer_control): New.
11366 (trace_buffer_free): Delete.
11367 (struct ipa_trace_buffer_control): New.
11368 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11369 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11370 New.
11371 (trace_buffer_ctrl): New.
11372 (TRACE_BUFFER_CTRL_CURR): New.
11373 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11374 Reimplement as macros.
11375 (trace_buffer_wrap): Delete.
11376 (traceframe_write_count, traceframe_read_count)
11377 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11378 (struct tracepoint_hit_ctx) <type>: New field.
11379 (struct fast_tracepoint_ctx): New.
11380 (memory_barrier): New.
11381 (cmpxchg): New.
11382 (record_tracepoint_error): Update atomically in the IPA.
11383 (clear_inferior_trace_buffer): New.
11384 (about_to_request_buffer_space): New.
11385 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11386 updating the same buffer.
11387 (add_tracepoint): Default the tracepoint's type to trap
11388 tracepoint, and orig_size to -1.
11389 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11390 internal variables.
11391 (create_trace_state_variable): New parameter `gdb'. Handle it.
11392 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11393 (cmd_qtdp): Handle fast tracepoints.
11394 (cmd_qtdv): Adjust.
11395 (max_jump_pad_size): New.
11396 (gdb_jump_pad_head): New.
11397 (get_jump_space_head): New.
11398 (claim_jump_space): New.
11399 (sort_tracepoints): New.
11400 (MAX_JUMP_SIZE): New.
11401 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11402 IPA.
11403 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11404 support. Upload fast traceframes, and delete internal IPA
11405 breakpoints.
11406 (stop_tracing_handler): New.
11407 (flush_trace_buffer_handler): New.
11408 (cmd_qtstop): Upload fast tracepoints.
11409 (response_tracepoint): Handle fast tracepoints.
11410 (tracepoint_finished_step): Upload fast traceframes. Set the
11411 tracepoint hit context's tracepoint type.
11412 (handle_tracepoint_bkpts): New.
11413 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11414 type. Add comment about fast tracepoints.
11415 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11416 non-existing action_str field.
11417 (get_context_regcache): Handle fast tracepoints.
11418 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11419 to the regcache.
11420 (fast_tracepoint_from_jump_pad_address): New.
11421 (fast_tracepoint_from_ipa_tpoint_address): New.
11422 (collecting_t): New.
11423 (force_unlock_trace_buffer): New.
11424 (fast_tracepoint_collecting): New.
11425 (collecting): New.
11426 (gdb_collect): New.
11427 (write_inferior_data_ptr): New.
11428 (target_tp_heap): New.
11429 (target_malloc): New.
11430 (download_agent_expr): New.
11431 (UALIGN): New.
11432 (download_tracepoints): New.
11433 (download_trace_state_variables): New.
11434 (upload_fast_traceframes): New.
11435 (IPA_FIRST_TRACEFRAME): New.
11436 (IPA_NEXT_TRACEFRAME_1): New.
11437 (IPA_NEXT_TRACEFRAME): New.
11438 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11439 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11440 (gdb_jump_pad_buffer_end): New.
11441 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11442 (initialize_tracepoint): Adjust.
11443 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11444 buffer. Initialize the low module.
11445 * utils.c (PREFIX, TOOLNAME): New.
11446 (malloc_failure): Use PREFIX.
11447 (error): In the IPA, an error causes an exit.
11448 (fatal, warning): Use PREFIX.
11449 (internal_error): Use TOOLNAME.
11450 (NUMCELLS): Increase to 10.
11451 * configure, config.in: Regenerate.
11452
11453 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11454
11455 * server.c (handle_query) <qSupported>: Do two passes over the
11456 qSupported string to avoid nesting strtok.
11457
11458 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11459
11460 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11461 (CDEPS): New.
11462 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11463 -Wl,--dynamic-list.
11464 * configure: Regenerate.
11465 * proc-service.list: New.
11466
11467 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11468
11469 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11470 New comment.
11471
11472 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11473
11474 * gdbreplay.c (remote_open): Check error return from socket() call by
11475 its equality to -1 not by it being negative.
11476 * remote-utils.c (remote_open): Likewise.
11477
11478 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11479
11480 * config.h: Regenerate.
11481
11482 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11483
11484 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11485 doesn't provide PTRACE_GET_THREAD_AREA.
11486
11487 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11488
11489 * linux-m68k-low.c: Include <asm/ptrace.h>
11490 (ps_get_thread_area): Implement.
11491
11492 2010-05-03 Doug Evans <dje@google.com>
11493
11494 * event-loop.c (struct callback_event): New struct.
11495 (callback_list): New global.
11496 (append_callback_event, delete_callback_event): New functions.
11497 (process_callback): New function.
11498 (start_event_loop): Call it.
11499 * remote-utils.c (NOT_SCHEDULED): Define.
11500 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11501 moved out of readchar.
11502 (readchar): Rewrite. Call reschedule before returning.
11503 (reset_readchar): New function.
11504 (remote_close): Call it.
11505 (process_remaining, reschedule): New functions.
11506 * server.h (callback_handler_func): New typedef.
11507 (append_callback_event, delete_callback_event): Declare.
11508
11509 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11510
11511 * proc-service.c (ps_pglobal_lookup): Use
11512 thread_db_look_up_one_symbol.
11513 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11514 parameter. Use it instead of all_symbols_looked_up.
11515 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11516 field.
11517 (all_symbols_looked_up): Don't declare.
11518 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11519 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11520 field.
11521 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11522 Set all_symbols_looked_up here.
11523 (thread_db_look_up_one_symbol): New.
11524 (thread_db_get_tls_address): Adjust.
11525 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11526 thread_db object on the heap, and tentatively set it in the
11527 process structure.
11528 (thread_db_init): Don't set all_symbols_looked_up here.
11529 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11530
11531 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11532
11533 * linux-low.c (linux_kill, linux_detach): Adjust.
11534 (status_pending_p_callback): Remove redundant statement. Check
11535 for !TARGET_WAITIKIND_IGNORE, instead of
11536 TARGET_WAITKIND_STOPPED.
11537 (handle_tracepoints): Make sure LWP is locked. Adjust.
11538 (linux_wait_for_event_1): Adjust.
11539 (linux_cancel_breakpoints): New.
11540 (unsuspend_one_lwp): New.
11541 (unsuspend_all_lwps): New.
11542 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11543 (send_sigstop_callback): Change return type to int, add new
11544 `except' parameter and handle it.
11545 (suspend_and_send_sigstop_callback): New.
11546 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11547 pass them down. If SUSPEND, also increment the lwp's suspend
11548 count.
11549 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11550 (need_step_over_p): Don't consider suspended LWPs.
11551 (start_step_over): Adjust.
11552 (proceed_one_lwp): Change return type to int, add new `except'
11553 parameter and handle it.
11554 (unsuspend_and_proceed_one_lwp): New.
11555 (proceed_all_lwps): Use find_inferior instead of
11556 for_each_inferior.
11557 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11558 also decrement the suspend count of LWPs. Pass `except' down,
11559 instead of hacking its suspend count.
11560 (linux_pause_all): Add `freeze' parameter. Adjust.
11561 (linux_unpause_all): New.
11562 (linux_target_ops): Install linux_unpause_all.
11563 * server.c (handle_status): Adjust.
11564 * target.h (struct target_ops): New fields `unpause_all' and
11565 `cancel_breakpoints'. Add new parameter to `pause_all'.
11566 (pause_all): Add new `freeze' parameter.
11567 (unpause_all): New.
11568 (cancel_breakpoints): New.
11569 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11570 cancel breakpoints.
11571 (cmd_qtstart): Pause threads.
11572 (stop_tracing): Pause threads, and cancel breakpoints.
11573 * win32-low.c (win32_target_ops): Adjust.
11574
11575 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11576
11577 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11578 the inferior right away from here...
11579 (linux_wait_1): ... to here, and adjust to check the thread's
11580 last_resume_kind instead of the lwp's step or stop_expected flags.
11581
11582 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11583
11584 * README: Use consistent `GDB' and `GDBserver' spellings.
11585
11586 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11587
11588 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11589 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11590 (linux_detach_one_lwp): Assume the lwp is stopped.
11591 (any_thread_of): Delete.
11592 (linux_detach): Stop all lwps here. Don't blindly delete all
11593 breakpoints.
11594 (delete_lwp_callback): New.
11595 (linux_mourn): Delete all lwps of the process that is gone.
11596 (linux_wait_1): Don't delete the last lwp of the process here.
11597 * mem-break.h (mark_breakpoints_out): Declare.
11598 * mem-break.c (mark_breakpoints_out): New.
11599 (free_all_breakpoints): Use it.
11600 * server.c (handle_target_event): If the process is gone, mark
11601 breakpoints out.
11602 * thread-db.c (struct thread_db) <create_bp>: New field.
11603 (thread_db_enable_reporting): Fix prototype. Store a thread event
11604 breakpoint reference in the thread_db struct.
11605 (thread_db_load_search): Clear the thread_db object.
11606 (try_thread_db_load_1): Ditto.
11607 (switch_to_process): New.
11608 (disable_thread_event_reporting): Use it.
11609 (remove_thread_event_breakpoints): New.
11610 (thread_db_detach, thread_db_mourn): Use it.
11611
11612 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11613
11614 * linux-low.c (linux_enable_event_reporting): New.
11615 (linux_wait_for_event_1, handle_extended_wait): Use it.
11616
11617 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11618
11619 * linux-low.c (linux_kill_one_lwp, linux_kill)
11620 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11621 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11622 SIGSTOP even if the LWP is stopped.
11623 (send_sigstop_callback): New.
11624 (stop_all_lwps): Use send_sigstop_callback instead.
11625 (linux_resume_one_thread): Adjust.
11626 (proceed_one_lwp): Still proceed an LWP that the client has
11627 requested to stop, if we haven't reported it as stopped yet. Make
11628 sure that LWPs the client want stopped, have a pending SIGSTOP.
11629
11630 2010-04-26 Doug Evans <dje@google.com>
11631
11632 * server.c (handle_general_set): Make static.
11633
11634 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11635 Print received char after testing for error/eof instead of before.
11636 (input_interrupt): Tweak comment.
11637
11638 2010-04-23 Doug Evans <dje@google.com>
11639
11640 * server.c (start_inferior): Print inferior argv if --debug.
11641
11642 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11643
11644 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11645 * nto-x86-low.c: Include server.h
11646
11647 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11648
11649 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11650 be consistent with other sources of this directory.
11651 (init_registers_amd64): Correct name of source file of this function
11652 in the comment.
11653
11654 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11655
11656 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11657 64-bit executables.
11658
11659 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11660
11661 * win32-i386-low.c: Add 64-bit support.
11662 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11663 (init_registers_amd64): Declare.
11664 (mappings): Add 64-bit version of array.
11665 (init_windows_x86): New function.
11666 (the_low_target): Change init_arch field to init_windows_x86.
11667
11668 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11669
11670 * win32-low.c: Adapt to support also 64-bit architecture.
11671 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11672 (get_image_name): Use SIZE_T type for local variable `done'.
11673 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11674 (toolhelp_get_dll_name): Idem.
11675 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11676 Use uintptr_t typecast to avoid warning.
11677 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11678 (handle_exception): Use phex_nz to avoid warning.
11679 (win32_wait): Remove unused local variable `process'.
11680
11681 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11682
11683 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11684 `amd64-avx.o'.
11685
11686 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11687
11688 * configure.ac: Use `ws2_32' library for srv_mingw.
11689 * configure: Regenerate.
11690 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11691 * remote-utils.c: Likewise.
11692
11693 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11694
11695 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11696 if __x86_64__ is defined.
11697
11698 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11699
11700 * configure: Regenerate.
11701
11702 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11703
11704 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11705 * target.h (target_ops): New get_tib_address field.
11706 * win32-low.h (win32_thread_info): Add thread_local_base field.
11707 * win32-low.c (child_add_thread): Add tlb argument.
11708 Set thread_local_base field to TLB.
11709 (get_child_debug_event): Adapt to child_add_thread change.
11710 (win32_get_tib_address): New function.
11711 (win32_target_ops): Set get_tib_address field to
11712 win32_get_tib_address.
11713 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11714
11715 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11716
11717 * linux-low.c (linux_mourn): Also remove the process.
11718 * server.c (handle_target_event): Don't remove the process here.
11719 * nto-low.c (nto_mourn): New.
11720 (nto_target_ops): Install it.
11721 * spu-low.c (spu_mourn): New.
11722 (spu_target_ops): Install it.
11723 * win32-low.c (win32_mourn): New.
11724 (win32_target_ops): Install it.
11725
11726 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11727
11728 * server.h (buffer_xml_printf): Remove redundant `;'.
11729
11730 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11731
11732 * regcache.c (set_register_cache): Invalidate regcaches before
11733 changing the register cache layout.
11734 (regcache_invalidate_one): Allow a NULL regcache.
11735 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11736 regcaches before changing the register cache layout or the target
11737 regsets.
11738
11739 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11740
11741 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11742 variable warning on Linux/x86-64.
11743
11744 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11745
11746 GDBserver disconnected tracing support.
11747
11748 * linux-low.c (linux_remove_process): Delete.
11749 (add_lwp): Don't set last_resume_kind here.
11750 (linux_kill): Use `mourn'.
11751 (linux_detach): Use `thread_db_detach', and `mourn'.
11752 (linux_mourn): New.
11753 (linux_attach_lwp_1): Adjust comment.
11754 (linux_attach): last_resume_kind moved the thread_info; adjust.
11755 (status_pending_p_callback): Adjust.
11756 (linux_wait_for_event_1): Adjust.
11757 (count_events_callback, select_singlestep_lwp_callback)
11758 (select_event_lwp_callback, cancel_breakpoints_callback)
11759 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11760 (proceed_one_lwp): Adjust.
11761 (linux_async): Add debug output.
11762 (linux_thread_stopped): New.
11763 (linux_pause_all): New.
11764 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11765 linux_pause_all.
11766 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11767 (thread_db_free): Delete declaration.
11768 (thread_db_detach, thread_db_mourn): Declare.
11769 * thread-db.c (thread_db_init): Use thread_db_mourn.
11770 (thread_db_free): Delete, split in two.
11771 (disable_thread_event_reporting): New.
11772 (thread_db_detach): New.
11773 (thread_db_mourn): New.
11774
11775 * server.h (struct thread_info) <last_resume_kind>: New field.
11776 <attached>: Add comment.
11777 <gdb_detached>: New field.
11778 (handler_func): Change return type to int.
11779 (handle_serial_event, handle_target_event): Ditto.
11780 (gdb_connected): Declare.
11781 (tracing): Delete.
11782 (disconnected_tracing): Declare.
11783 (stop_tracing): Declare.
11784
11785 * server.c (handle_query) <qSupported>: Report support for
11786 disconnected tracing.
11787 (queue_stop_reply_callback): Account for running threads.
11788 (gdb_wants_thread_stopped): New.
11789 (gdb_wants_all_threads_stopped): New.
11790 (gdb_reattached_process): New.
11791 (handle_status): Clear the `gdb_detached' flag of all processes.
11792 In all-stop, stop all threads.
11793 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11794 (process_serial_event): If the remote connection breaks, or if an
11795 exit was forced with "monitor exit", force an event loop exit.
11796 Handle disconnected tracing on detach.
11797 (handle_serial_event): Adjust.
11798 (handle_target_event): If GDB isn't connected, forward events back
11799 to the inferior, unless the last process exited, in which case,
11800 exit gdbserver. Adjust interface.
11801
11802 * remote-utils.c (remote_open): Don't block in accept. Instead
11803 register an event loop source on the listen socket file
11804 descriptor. Refactor bits into ...
11805 (listen_desc): ... this new global.
11806 (gdb_connected): ... this new function.
11807 (enable_async_notification): ... this new function.
11808 (handle_accept_event): ... this new function.
11809 (remote_close): Clear remote_desc.
11810
11811 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11812
11813 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11814 New fields.
11815 (mourn_inferior): Define.
11816 (target_process_qsupported): Avoid the dangling else problem.
11817 (thread_stopped): Define.
11818 (pause_all): Define.
11819 (target_waitstatus_to_string): Declare.
11820 * target.c (target_waitstatus_to_string): New.
11821
11822 * tracepoint.c (tracing): Make extern.
11823 (disconnected_tracing): New.
11824 (stop_tracing): Make extern. Handle tracing stops due to GDB
11825 disconnecting.
11826 (cmd_qtdisconnected): New.
11827 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11828 (handle_tracepoint_general_set): Handle QTDisconnected.
11829
11830 * event-loop.c (event_handler_func): Change return type to int.
11831 (process_event): Bail out if the event handler wants the event
11832 loop to stop.
11833 (handle_file_event): Ditto.
11834 (start_event_loop): Bail out if the event handler wants the event
11835 loop to stop.
11836
11837 * nto-low.c (nto_target_ops): Adjust.
11838 * spu-low.c (spu_wait): Don't remove the process here.
11839 (spu_target_ops): Adjust.
11840 * win32-low.c (win32_wait): Don't remove the process here.
11841 (win32_target_ops): Adjust.
11842
11843 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11844
11845 * regcache.c (realloc_register_cache): Invalidate inferior's
11846 regcache before recreating it.
11847
11848 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11849
11850 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11851
11852 2010-04-09 Stan Shebs <stan@codesourcery.com>
11853 Pedro Alves <pedro@codesourcery.com>
11854
11855 * server.h (LONGEST): New.
11856 (struct thread_info) <while_stepping>: New field.
11857 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11858 Declare.
11859 (initialize_tracepoint, handle_tracepoint_general_set)
11860 (handle_tracepoint_query, tracepoint_finished_step)
11861 (tracepoint_was_hit, release_while_stepping_state_list):
11862 (current_traceframe): Declare.
11863 * server.c (handle_general_set): Handle tracepoint packets.
11864 (read_memory): New.
11865 (write_memory): New.
11866 (handle_search_memory_1): Use read_memory.
11867 (handle_query): Report support for conditional tracepoints, trace
11868 state variables, and tracepoint sources. Handle tracepoint
11869 queries.
11870 (main): Initialize the tracepoints module.
11871 (process_serial_event): Handle traceframe reads/writes.
11872
11873 * linux-low.c (handle_tracepoints): New.
11874 (linux_wait_1): Call it.
11875 (linux_resume_one_lwp): Handle while-stepping.
11876 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11877 (linux_target_ops): Install them.
11878 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11879 New field.
11880 * linux-x86-low.c (x86_supports_tracepoints): New.
11881 (the_low_target). Install it.
11882
11883 * mem-break.h (delete_breakpoint): Declare.
11884 * mem-break.c (delete_breakpoint): Make external.
11885
11886 * target.h (struct target_ops): Add `supports_tracepoints',
11887 `read_pc', and `write_pc' fields.
11888 (target_supports_tracepoints): Define.
11889 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11890 (phex_nz): New.
11891
11892 * regcache.h (struct regcache) <registers_owned>: New field.
11893 (init_register_cache, regcache_cpy): Declare.
11894 (regcache_read_pc, regcache_write_pc): Declare.
11895 (register_cache_size): Declare.
11896 (supply_regblock): Declare.
11897 * regcache.c (init_register_cache): New.
11898 (new_register_cache): Use it.
11899 (regcache_cpy): New.
11900 (register_cache_size): New.
11901 (supply_regblock): New.
11902 (regcache_read_pc, regcache_write_pc): New.
11903
11904 * tracepoint.c: New.
11905
11906 * Makefile.in (OBS): Add tracepoint.o.
11907 (tracepoint.o): New rule.
11908
11909 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11910
11911 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11912 (i386-mmx.o): New.
11913 (i386-mmx.c): Likewise.
11914 (i386-mmx-linux.o): Likewise.
11915 (i386-mmx-linux.c): Likewise.
11916
11917 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11918 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11919 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11920 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11921
11922 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11923 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11924 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11925
11926 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11927
11928 * Makefile.in (clean): Updated.
11929 (i386-avx.o): New.
11930 (i386-avx.c): Likewise.
11931 (i386-avx-linux.o): Likewise.
11932 (i386-avx-linux.c): Likewise.
11933 (amd64-avx.o): Likewise.
11934 (amd64-avx.c): Likewise.
11935 (amd64-avx-linux.o): Likewise.
11936 (amd64-avx-linux.c): Likewise.
11937
11938 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11939 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11940 (srv_amd64_regobj): Add amd64-avx.o.
11941 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11942 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11943 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11944 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11945 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11946 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11947 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11948
11949 * i387-fp.c: Include "i386-xstate.h".
11950 (i387_xsave): New.
11951 (i387_cache_to_xsave): Likewise.
11952 (i387_xsave_to_cache): Likewise.
11953 (x86_xcr0): Likewise.
11954
11955 * i387-fp.h (i387_cache_to_xsave): Likewise.
11956 (i387_xsave_to_cache): Likewise.
11957 (x86_xcr0): Likewise.
11958
11959 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11960 * linux-crisv32-low.c (target_regsets): Likewise.
11961 * linux-m68k-low.c (target_regsets): Likewise.
11962 * linux-mips-low.c (target_regsets): Likewise.
11963 * linux-ppc-low.c (target_regsets): Likewise.
11964 * linux-s390-low.c (target_regsets): Likewise.
11965 * linux-sh-low.c (target_regsets): Likewise.
11966 * linux-sparc-low.c (target_regsets): Likewise.
11967 * linux-xtensa-low.c (target_regsets): Likewise.
11968
11969 * linux-low.c: Include <sys/uio.h>.
11970 (regsets_fetch_inferior_registers): Support nt_type.
11971 (regsets_store_inferior_registers): Likewise.
11972 (linux_process_qsupported): New.
11973 (linux_target_ops): Add linux_process_qsupported.
11974
11975 * linux-low.h (regset_info): Add nt_type.
11976 (linux_target_ops): Add process_qsupported.
11977
11978 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11979 and <sys/uio.h>.
11980 (init_registers_i386_avx_linux): New.
11981 (init_registers_amd64_avx_linux): Likewise.
11982 (xmltarget_i386_linux_no_xml): Likewise.
11983 (xmltarget_amd64_linux_no_xml): Likewise.
11984 (PTRACE_GETREGSET): Likewise.
11985 (PTRACE_SETREGSET): Likewise.
11986 (x86_fill_xstateregset): Likewise.
11987 (x86_store_xstateregset): Likewise.
11988 (use_xml): Likewise.
11989 (x86_linux_update_xmltarget): Likewise.
11990 (x86_linux_process_qsupported): Likewise.
11991 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11992 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11993 init_registers_i386_linux here. Call
11994 x86_linux_update_xmltarget.
11995 (the_low_target): Add x86_linux_process_qsupported.
11996
11997 * server.c (handle_query): Call target_process_qsupported.
11998
11999 * target.h (target_ops): Add process_qsupported.
12000 (target_process_qsupported): New.
12001
12002 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12003
12004 * inferiors.c (add_thread): Set last_status kind to
12005 TARGET_WAITKIND_IGNORE.
12006 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12007 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12008 (linux_wait_1): Move `thread' local definition to block that uses
12009 it. Don't NULL initialize `event_child'.
12010 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12011 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12012 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12013
12014 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12015
12016 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12017 an extended waitstatus, or by a watchpoint.
12018 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12019 thread was stepping or has been stopped by a watchpoint.
12020
12021 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12022
12023 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12024 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12025 of another, then delete the previous, and validate all
12026 breakpoints.
12027 (validate_inserted_breakpoint): New.
12028 (delete_disabled_breakpoints): New.
12029 (validate_breakpoints): New.
12030 (check_mem_read): Validate breakpoints before trusting their
12031 shadow. Delete disabled breakpoints.
12032 (check_mem_write): Validate breakpoints before trusting they
12033 should be inserted. Delete disabled breakpoints.
12034 * mem-break.h (validate_breakpoints):
12035 * server.c (handle_query): Validate breakpoints when we see a
12036 qSymbol query.
12037
12038 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12039
12040 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12041 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12042 if we could tell there's a GDB breakpoint at stop_pc.
12043 (need_step_over_p): Don't do a step over if we find a GDB
12044 breakpoint at the resume PC.
12045
12046 * mem-break.c (struct raw_breakpoint): New.
12047 (enum bkpt_type): New type `gdb_breakpoint'.
12048 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12049 fields. New field `raw'.
12050 (find_raw_breakpoint_at): New.
12051 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12052 breakpoint instead.
12053 (set_breakpoint_at): Adjust.
12054 (delete_raw_breakpoint): New.
12055 (release_breakpoint): New.
12056 (delete_breakpoint): Rename to...
12057 (delete_breakpoint_1): ... this. Add proc parameter. Use
12058 release_breakpoint. Return ENOENT.
12059 (delete_breakpoint): Reimplement.
12060 (find_breakpoint_at): Delete.
12061 (find_gdb_breakpoint_at): New.
12062 (delete_breakpoint_at): Delete.
12063 (set_gdb_breakpoint_at): New.
12064 (delete_gdb_breakpoint_at): New.
12065 (gdb_breakpoint_here): New.
12066 (set_reinsert_breakpoint): Use release_breakpoint.
12067 (uninsert_breakpoint): Rename to ...
12068 (uninsert_raw_breakpoint): ... this.
12069 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12070 (reinsert_raw_breakpoint): Change parameter type to
12071 raw_breakpoint.
12072 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12073 instead.
12074 (check_breakpoints): Adjust. Use release_breakpoint.
12075 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12076 (breakpoint_inserted_here): Ditto.
12077 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12078 Don't trust the breakpoint's shadow if it is not inserted.
12079 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12080 (delete_all_breakpoints): Adjust.
12081 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12082 use delete_breakpoint_1.
12083
12084 * mem-break.h (breakpoints_supported): Delete declaration.
12085 (set_gdb_breakpoint_at): Declare.
12086 (gdb_breakpoint_here): Declare.
12087 (delete_breakpoint_at): Delete.
12088 (delete_gdb_breakpoint_at): Declare.
12089
12090 * server.h (struct raw_breakpoint): Forward declare.
12091 (struct process_info): New field `raw_breakpoints'.
12092
12093 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12094 breakpoints.
12095
12096 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12097
12098 * linux-low.c (status_pending_p_callback): Fix comment.
12099 (linux_wait_for_event_1): Move most of the internal breakpoint
12100 handling from here...
12101 (linux_wait_1): ... to here.
12102 (count_events_callback): New.
12103 (select_singlestep_lwp_callback): New.
12104 (select_event_lwp_callback): New.
12105 (cancel_breakpoints_callback): New.
12106 (select_event_lwp): New.
12107 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12108 priority to all LWPs that have had events that should be reported
12109 to the client. Cancel breakpoints when about to reporting the
12110 event to the client, not while stopping lwps. No longer cancel
12111 finished single-steps here.
12112 (cancel_finished_single_step): Delete.
12113 (cancel_finished_single_steps): Delete.
12114
12115 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12116
12117 * mem-break.c (enum bkpt_type): New.
12118 (struct breakpoint): New field `type'.
12119 (set_breakpoint_at): Change return type to struct breakpoint
12120 pointer. Set type to `other_breakpoint' by default.
12121 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12122 in the breakpoint list.
12123 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12124 (reinsert_breakpoint): Rename to ...
12125 (reinsert_raw_breakpoint): ... this.
12126 (reinsert_breakpoints_at): Adjust.
12127 * mem-break.h (struct breakpoint): Declare.
12128 (set_breakpoint_at): Change return type to struct breakpoint
12129 pointer.
12130
12131 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12132
12133 * server.c (handle_query): Assign, not compare.
12134
12135 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12136
12137 Teach linux gdbserver to step-over-breakpoints.
12138
12139 * linux-low.c (can_hardware_single_step): New.
12140 (supports_breakpoints): New.
12141 (handle_extended_wait): If stopping threads, read the stop pc of
12142 the new cloned LWP.
12143 (get_pc): New.
12144 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12145 low target doesn't support retrieving the PC.
12146 (add_lwp): Set last_resume_kind to resume_continue.
12147 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12148 (linux_attach): Don't clear stop_expected. Set the lwp's
12149 last_resume_kind to resume_stop.
12150 (linux_detach_one_lwp): Don't check for removed breakpoints.
12151 (check_removed_breakpoint): Delete.
12152 (status_pending_p): Rename to ...
12153 (status_pending_p_callback): ... this. Don't check for removed
12154 breakpoints. Don't consider threads that are stopped from GDB's
12155 perspective.
12156 (linux_wait_for_lwp): Always read the stop_pc here.
12157 (cancel_breakpoint): New.
12158 (step_over_bkpt): New global.
12159 (linux_wait_for_event_1): Implement stepping over breakpoints.
12160 (gdb_wants_lwp_stopped): New.
12161 (gdb_wants_all_stopped): New.
12162 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12163 single-step traps here. Store the thread's last reported target
12164 wait status.
12165 (send_sigstop): Don't clear stop_expected. Always set it,
12166 instead.
12167 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12168 (cancel_finished_single_step): New.
12169 (cancel_finished_single_steps): New.
12170 (wait_for_sigstop): Don't cancel finished single-step traps here.
12171 (linux_resume_one_lwp): Don't check for removed breakpoints.
12172 Don't set `step' on non-hardware step archs.
12173 (linux_set_resume_request): Ignore resume_stop requests if already
12174 stopping or stopped. Set the lwp's last_resume_kind.
12175 (resume_status_pending_p): Don't check for removed breakpoints.
12176 (need_step_over_p): New.
12177 (start_step_over): New.
12178 (finish_step_over): New.
12179 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12180 requests. Clear the thread's last reported target waitstatus.
12181 Don't use the `suspended' flag. Don't consider pending breakpoints.
12182 (linux_resume): Start a step-over if necessary.
12183 (proceed_one_lwp): New.
12184 (proceed_all_lwps): New.
12185 (unstop_all_lwps): New.
12186 * linux-low.h (struct lwp_info): Rewrite comment for the
12187 `suspended' flag. Add the `stop_pc' field. Delete the
12188 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12189 Add `'last_resume_kind' and `need_step_over' fields.
12190 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12191 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12192 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12193 (set_raw_breakpoint_at): New.
12194 (set_breakpoint_at): Rewrite to use it.
12195 (reinsert_breakpoint_handler): Delete.
12196 (set_reinsert_breakpoint): New.
12197 (reinsert_breakpoint_by_bp): Delete.
12198 (delete_reinsert_breakpoints): New.
12199 (uninsert_breakpoint): Rewrite.
12200 (uninsert_breakpoints_at): New.
12201 (reinsert_breakpoint): Rewrite.
12202 (reinsert_breakpoints_at): New.
12203 (check_breakpoints): Rewrite.
12204 (breakpoint_here): New.
12205 (breakpoint_inserted_here): New.
12206 (check_mem_read): Adjust.
12207 * mem-break.h (breakpoints_supported, breakpoint_here)
12208 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12209 (reinsert_breakpoint_by_bp): Delete declaration.
12210 (delete_reinsert_breakpoints): Declare.
12211 (reinsert_breakpoint): Delete declaration.
12212 (reinsert_breakpoints_at): Declare.
12213 (uninsert_breakpoint): Delete declaration.
12214 (uninsert_breakpoints_at): Declare.
12215 (check_breakpoints): Adjust prototype.
12216 * server.h: Adjust include order.
12217 (struct thread_info): Declare here. Add a `last_status' field.
12218
12219 2010-03-23 Michael Snyder <msnyder@vmware.com>
12220
12221 * server.c (crc32): New function.
12222 (handle_query): Add handling for 'qCRC:' request.
12223
12224 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12225
12226 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12227 lwp had been stopped by a watchpoint.
12228
12229 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12230
12231 * server.h (internal_error): Declare.
12232 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12233 * utils.c (internal_error): New function.
12234
12235 2010-03-15 Andreas Schwab <schwab@redhat.com>
12236
12237 * configure.srv: Fix typo setting srv_regobj.
12238
12239 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12240
12241 * linux-low.c (fetch_register): Avoid passing a non string literal
12242 format to `error'.
12243 (usr_store_inferior_registers): Ditto.
12244
12245 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12246
12247 * linux-low.c (linux_write_memory): Bail out early if peeking
12248 memory failed.
12249
12250 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12251
12252 * linux-low.h (struct lwp_info): New fields
12253 `stopped_by_watchpoint' and `stopped_data_address'.
12254 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12255 here, and cache them in the lwp object.
12256 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12257 directly.
12258 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12259 field.
12260 (linux_stopped_by_watchpoint): Rewrite.
12261 (linux_stopped_data_address): Rewrite.
12262
12263 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12264
12265 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12266 switching the current inferior, not before.
12267
12268 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12269
12270 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12271 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12272 i386-linux.c and amd64-linux.c.
12273 (reg-i386.o): Removed.
12274 (reg-i386.c): Likewise.
12275 (reg-i386-linux.o): Likewise.
12276 (reg-i386-linux.c): Likewise.
12277 (reg-x86-64.o): Likewise.
12278 (reg-x86-64.c): Likewise.
12279 (reg-x86-64-linux.o): Likewise.
12280 (reg-x86-64-linux.c): Likewise.
12281 (i386.o): New.
12282 (i386.c): Likewise.
12283 (i386-linux.o): Likewise.
12284 (i386-linux.c): Likewise.
12285 (amd64.o): Likewise.
12286 (amd64.c): Likewise.
12287 (amd64-linux.o): Likewise.
12288 (amd64-linux.c): Likewise.
12289
12290 * configure.srv (srv_i386_regobj): New.
12291 (srv_i386_linux_regobj): Likewise.
12292 (srv_amd64_regobj): Likewise.
12293 (srv_amd64_linux_regobj): Likewise.
12294 (srv_i386_32bit_xmlfiles): Likewise.
12295 (srv_i386_64bit_xmlfiles): Likewise.
12296 (srv_i386_xmlfiles): Likewise.
12297 (srv_amd64_xmlfiles): Likewise.
12298 (srv_i386_linux_xmlfiles): Likewise.
12299 (srv_amd64_linux_xmlfiles): Likewise.
12300 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12301 srv_xmlfiles to $srv_i386_xmlfiles.
12302 (i[34567]86-*-mingw32ce*): Likewise.
12303 (i[34567]86-*-mingw*): Likewise.
12304 (i[34567]86-*-nto*): Likewise.
12305 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12306 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12307 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12308 (x86_64-*-linux*): Likewise.
12309
12310 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12311 (init_registers_amd64_linux): New.
12312 (x86_arch_setup): Replace init_registers_x86_64_linux with
12313 init_registers_amd64_linux.
12314
12315 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12316
12317 * configure.ac: Check for libdl. If it is not available link against
12318 static libthread_db.
12319 * configure: Regenerate.
12320
12321 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12322
12323 PR9605
12324
12325 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12326 handing a read watchpoint.
12327 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12328
12329 2010-02-12 Doug Evans <dje@google.com>
12330
12331 * linux-low.c (linux_supports_tracefork_flag): Document.
12332 (linux_look_up_symbols): Add comment.
12333
12334 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12335
12336 * regcache.c (supply_register): Clear regcache if buf is NULL.
12337
12338 2010-02-02 Nicolas Roche <roche@sourceware.org>
12339 Joel Brobecker <brobecker@adacore.com>
12340
12341 * inferiors.c (find_inferior): Add function documentation.
12342 (unloaded_dll): Handle the case where the unloaded dll has not
12343 been previously registered in the dll list.
12344
12345 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12346
12347 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12348 (thumb2_breakpoint): New.
12349 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12350
12351 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12352
12353 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12354 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12355 breakpoints.
12356
12357 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12358
12359 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12360
12361 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12362
12363 * linux-s390-low.c (s390_collect_ptrace_register)
12364 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12365
12366 2010-01-21 Doug Evans <dje@google.com>
12367
12368 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12369 (PTRACE_ARG4_TYPE): New macro.
12370 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12371 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12372 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12373 (usr_store_inferior_registers): Ditto.
12374 (linux_read_memory, linux_write_memory): Ditto.
12375 (linux_test_for_tracefork): Ditto.
12376
12377 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12378 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12379
12380 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12381
12382 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12383 target.
12384
12385 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12386
12387 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12388 prototype to take a regcache. Adjust.
12389
12390 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12391
12392 * regcache.h (struct thread_info): Forward declare.
12393 (struct regcache): New.
12394 (new_register_cache): Adjust prototype.
12395 (get_thread_regcache): Declare.
12396 (free_register_cache): Adjust prototype.
12397 (registers_to_string, registers_from_string): Ditto.
12398 (supply_register, supply_register_by_name, collect_register)
12399 (collect_register_as_string, collect_register_by_name): Ditto.
12400 * regcache.c (struct inferior_regcache_data): Delete.
12401 (get_regcache): Rename to ...
12402 (get_thread_regcache): ... this. Adjust. Switch inferior before
12403 fetching registers.
12404 (regcache_invalidate_one): Adjust.
12405 (regcache_invalidate): Fix prototype.
12406 (new_register_cache): Return the new register cache.
12407 (free_register_cache): Change prototype.
12408 (realloc_register_cache): Adjust.
12409 (registers_to_string): Change prototype to take a regcache. Adjust.
12410 (registers_from_string): Ditto.
12411 (register_data): Ditto.
12412 (supply_register): Ditto.
12413 (supply_register_by_name): Ditto.
12414 (collect_register): Ditto.
12415 (collect_register_as_string): Ditto.
12416 (collect_register_by_name): Ditto.
12417 * server.c (process_serial_event): Adjust.
12418 * linux-low.h (regset_fill_func, regset_store_func): Change
12419 prototype.
12420 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12421 Change prototype.
12422 * linux-low.c (get_stop_pc): Adjust.
12423 (check_removed_breakpoint): Adjust.
12424 (linux_wait_for_event): Adjust.
12425 (linux_resume_one_lwp): Adjust.
12426 (fetch_register): Add regcache parameter. Adjust.
12427 (usr_store_inferior_registers): Ditto.
12428 (regsets_fetch_inferior_registers): Ditto.
12429 (regsets_store_inferior_registers): Ditto.
12430 (linux_fetch_registers, linux_store_registers): Ditto.
12431 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12432 regcache. Adjust.
12433 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12434 Ditto.
12435 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12436 prototype to take a regcache.
12437 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12438 * remote-utils.c (convert_ascii_to_int, outreg)
12439 (prepare_resume_reply): Change prototype to take a regcache.
12440 Adjust.
12441 * target.h (struct target_ops) <fetch_registers, store_registers>:
12442 Change prototype to take a regcache.
12443 (fetch_inferior_registers, store_inferior_registers): Change
12444 prototype to take a regcache. Adjust.
12445 * proc-service.c (ps_lgetregs): Adjust.
12446 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12447 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12448 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12449 take a regcache. Adjust.
12450 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12451 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12452 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12453 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12454 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12455 (cris_cannot_fetch_register):
12456 (cris_breakpoint_at): Change prototype to take a regcache.
12457 Adjust.
12458 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12459 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12460 to take a regcache. Adjust.
12461 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12462 Adjust.
12463 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12464 take a regcache. Adjust.
12465 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12466 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12467 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12468 * linux-mips-low.c (mips_get_pc):
12469 (mips_set_pc): Change prototype to take a regcache. Adjust.
12470 (mips_reinsert_addr): Adjust.
12471 (mips_collect_register): Change prototype to take a regcache.
12472 Adjust.
12473 (mips_supply_register):
12474 (mips_collect_register_32bit, mips_supply_register_32bit)
12475 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12476 (mips_store_fpregset): Ditto.
12477 * linux-ppc-low.c (ppc_supply_ptrace_register)
12478 (ppc_supply_ptrace_register): Ditto.
12479 (parse_spufs_run): Adjust.
12480 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12481 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12482 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12483 take a regcache. Adjust.
12484 * linux-s390-low.c (s390_collect_ptrace_register)
12485 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12486 (s390_set_pc): Change prototype to take a regcache. Adjust.
12487 (s390_arch_setup): Adjust.
12488 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12489 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12490 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12491 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12492 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12493 regcache. Adjust.
12494 (sparc_breakpoint_at): Adjust.
12495 * linux-xtensa-low.c (xtensa_fill_gregset):
12496 (xtensa_store_gregset):
12497 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12498 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12499 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12500 prototype to take a regcache. Adjust.
12501 * win32-arm-low.c (arm_fetch_inferior_register)
12502 (arm_store_inferior_register): Change prototype to take a
12503 regcache. Adjust.
12504 * win32-i386-low.c (i386_fetch_inferior_register)
12505 (i386_store_inferior_register): Change prototype to take a
12506 regcache. Adjust.
12507 * win32-low.c (child_fetch_inferior_registers)
12508 (child_store_inferior_registers): Change prototype to take a
12509 regcache. Adjust.
12510 (win32_wait): Adjust.
12511 (win32_fetch_inferior_registers): Change prototype to take a
12512 regcache. Adjust.
12513 (win32_store_inferior_registers): Adjust.
12514 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12515 store_inferior_register>: Change prototype to take a regcache.
12516
12517 2010-01-20 Doug Evans <dje@google.com>
12518
12519 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12520 #ifdef.
12521 (linux_wait_for_event1, linux_init_signals): Ditto.
12522 (W_STOPCODE): Provide definition if missing.
12523
12524 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12525
12526 * linux-low.c (linux_core_of_thread): New.
12527 (compare_ints, show_process, list_threads): New.
12528 (linux_qxfer_osdata): Report threads and cores.
12529 (linux_target_op): Register linux_core_of_thread.
12530 * remote-utils.c (prepare_resume_reply): Report the core.
12531 (buffer_xml_printf): Support %d specifier.
12532 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12533 New.
12534 (handle_query): Handle qXfer:threads. Announce availability
12535 thereof.
12536 * target.h (struct target_ops): New field core_of_thread.
12537
12538 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12539
12540 * Makefile.in (clean): Remove new generated files.
12541 (reg-s390.o, reg-s390.c): Remove rules.
12542 (reg-s390x.o, reg-s390x.c): Likewise.
12543 (s390-linux32.o, s390-linux32.c): Add rules.
12544 (s390-linux64.o, s390-linux64.c): Likewise.
12545 (s390x-linux64.o, s390x-linux64.c): Likewise.
12546 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12547 * linux-s390-low.c: Include <elf.h>.
12548 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12549 (init_registers_s390): Remove prototype.
12550 (init_registers_s390x): Likewise.
12551 (init_registers_s390_linux32): Add prototype.
12552 (init_registers_s390_linux64): Likewise.
12553 (init_registers_s390x_linux64): Likewise.
12554 (s390_num_regs_3264): New define.
12555 (s390_regmap_3264): New global variable.
12556 (s390_cannot_fetch_register): Remove obsolete check.
12557 (s390_cannot_store_register): Likewise.
12558 (s390_collect_ptrace_register): Handle upper/lower register halves.
12559 (s390_supply_ptrace_register): Likewise.
12560 (s390_fill_gregset): Update to register number changes.
12561 (s390_get_hwcap): New routine.
12562 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12563 Install appropriate regmap and register set.
12564
12565 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12566
12567 * server.c (gdbserver_version): Update copyright year to 2010.
12568 * gdbreplay.c (gdbreplay_version): Likewise.
12569
12570 2009-12-28 Doug Evans <dje@google.com>
12571
12572 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12573 elf/external.h. Include <elf.h> instead but only if necessary.
12574
12575 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12576
12577 * linux-low.c (linux_remove_process): Remove `detaching'
12578 parameter. Don't release/detach from thread_db here.
12579 (linux_kill): Release/detach from thread_db here, ...
12580 (linux_detach): ... and here, before actually detaching.
12581 (linux_wait_1): ... and here, when a process exits.
12582 * thread-db.c (any_thread_of): New.
12583 (thread_db_free): Switch the current inferior to a thread of the
12584 passed in process.
12585
12586 2009-12-21 Doug Evans <dje@google.com>
12587
12588 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12589
12590 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12591 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12592 warning ifndef __NR_tkill. Move setting of errno there too.
12593 Delete unnecessary resetting of errno after syscall.
12594 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12595
12596 * configure.ac: Check for dladdr.
12597 * config.in: Regenerate.
12598 * configure: Regenerate.
12599 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12600 (try_thread_db_load): Update.
12601
12602 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12603
12604 2009-12-18 Doug Evans <dje@google.com>
12605
12606 * event-loop.c: Include unistd.h if it exists.
12607
12608 * linux-low.c (my_waitpid): Move definition away from being in
12609 between linux_tracefork_child/linux_test_for_tracefork.
12610
12611 * gdb_proc_service.h (psaddr_t): Fix type.
12612 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12613 signature to match glibc.
12614
12615 2009-12-16 Doug Evans <dje@google.com>
12616
12617 * linux-low.c (linux_read_memory): Fix argument to read.
12618
12619 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12620
12621 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12622 events, don't leave current_inferior pointing at null.
12623
12624 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12625
12626 * win32-low.c (LOG): Delete.
12627 (OUTMSG): Output to stderr.
12628 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12629 on compile time LOG macro.
12630 (win32_wait): Fix debug output.
12631
12632 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12633
12634 * win32-low.c (win32_add_one_solib): If the dll name is
12635 "ntdll.dll", prepend the system directory to the dll path.
12636
12637 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12638
12639 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12640
12641 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12642 Vladimir Prus <vladimir@codesourcery.com>
12643
12644 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12645 * configure.ac: Check for __mcoldfire__ and set
12646 gdb_cv_m68k_is_coldfire.
12647 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12648 reg-cf.o and reg-m68k.o.
12649 * configure: Regenerated.
12650
12651 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12652
12653 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12654 Pass it to thread_db_free.
12655 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12656 proper `detaching' argument to linux_remove_process.
12657 * linux-low.h (thread_db_free): Add `detaching' parameter.
12658 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12659 to thread_db_free.
12660 (thread_db_free): Add `detaching' parameter. Only
12661 call td_ta_clear_event if detaching from process.
12662
12663 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12664
12665 * thread-db.c (thread_db_free): Fix typo.
12666
12667 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12668
12669 PR gdb/10838
12670 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12671
12672 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12673
12674 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12675 with an i686 compiler.
12676 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12677 needed.
12678 * configure: Rebuilt.
12679
12680 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12681
12682 PR gdb/10783
12683
12684 * server.c (handle_search_memory_1): Correct read_addr initialization
12685 in loop for searching subsequent chunks.
12686
12687 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12688
12689 * configure.ac: New --with-libthread-db option.
12690 * thread-db.c: Allow direct dependence on libthread_db.
12691 (thread_db_free): Adjust.
12692 * config.in: Regenerate.
12693 * configure: Likewise.
12694
12695 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12696
12697 PR gdb/10757
12698 * thread-db.c (attach_thread): New function.
12699 (maybe_attach_thread): Return success/failure.
12700 (find_new_threads_callback): Adjust.
12701 (thread_db_find_new_threads): Loop until no new threads.
12702
12703 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12704
12705 * proc-service.c (ps_lgetregs): Formatting.
12706
12707 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12708
12709 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12710 * configure.ac: Adjust.
12711 * linux-low.h (struct process_info_private): Move members to struct
12712 thread_db.
12713 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12714 * linux-low.c (linux_remove_process): Adjust.
12715 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12716 * server.c (handle_query): Move code ...
12717 (handle_monitor_command): ... here. New function.
12718 * target.h (struct target_ops): New member.
12719 * thread-db.c (struct thread_db): New.
12720 (libthread_db_search_path): New variable.
12721 (thread_db_create_event, thread_db_enable_reporting)
12722 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12723 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12724 (try_thread_db_load_1, dladdr_to_soname): New functions.
12725 (try_thread_db_load, thread_db_load_search): New functions.
12726 (thread_db_init): Search for libthread_db.
12727 (thread_db_free): New function.
12728 (thread_db_handle_monitor_command): Likewise.
12729 * config.in: Regenerate.
12730 * configure: Regenerate.
12731
12732 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12733
12734 * spu-low.c (spu_kill): Wait for inferior to terminate.
12735 Call clear_inferiors.
12736 (spu_detach): Call clear_inferiors.
12737
12738 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12739
12740 * aclocal.m4: Regenerate.
12741 * config.in: Likewise.
12742 * configure: Likewise.
12743
12744 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12745
12746 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12747 (parse_spufs_run): New function.
12748 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12749 (ppc_breakpoint_at): Handle SPU breakpoints.
12750
12751 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12752
12753 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12754 (SPUFS_MAGIC): Define.
12755 (spu_enumerate_spu_ids): New function.
12756 (linux_qxfer_spu): New function.
12757 (linux_target_ops): Install linux_qxfer_spu.
12758
12759 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12760
12761 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12762 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12763 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12764 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12765 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12766 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12767 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12768 (init_registers_powerpc_cell32l): Add prototype.
12769 (init_registers_powerpc_cell64l): Likewise.
12770 (ppc_arch_setup): Detect Cell/B.E. architecture.
12771
12772 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12773
12774 * Makefile.in (datarootdir): New variable.
12775
12776 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12777
12778 * linux-low.c (linux_write_memory): Update debugging output.
12779 * Makefile.in (clean): Add new descriptions.
12780 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12781 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12782 * configure.srv: Add new files for arm*-*-linux*.
12783 * linux-arm-low.c: Add new declarations.
12784 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12785 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12786 (HWCAP_VFPv3D16): New.
12787 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12788 instead of __IWMMXT__.
12789 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12790 (arm_arch_setup): New.
12791 (target_regsets): Remove #ifdef. Add VFP regset.
12792 (the_low_target): Use arm_arch_setup.
12793
12794 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12795
12796 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12797 the main thread again.
12798
12799 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12800
12801 Adding Neutrino gdbserver.
12802 * configure: Regenerated.
12803 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12804 * configure.srv (i[34567]86-*-nto*): New target.
12805 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12806 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12807 (nto_comctrl) [__QNX__]: New function.
12808 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12809
12810 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12811
12812 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12813 srv_tgtobj.
12814
12815 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12816 Pedro Alves <pedro@codesourcery.com>
12817
12818 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12819 don't support CONTEXT_EXTENDED_REGISTERS.
12820 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12821 (the_low_target): Install them.
12822 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12823 failing with ERROR_PIPE_NOT_CONNECTED.
12824
12825 2009-06-30 Doug Evans <dje@google.com>
12826 Pierre Muller <muller@ics.u-strasbg.fr>
12827
12828 Add h/w watchpoint support to x86-linux, win32-i386.
12829 * Makefile.in (SFILES): Add i386-low.c
12830 (i386_low_h): Define.
12831 (i386-low.o): Add dependencies.
12832 (linux-x86-low.o): Add i386-low.h dependency.
12833 (win32-i386-low.o): Ditto.
12834 * i386-low.c: New file.
12835 * i386-low.h: New file.
12836 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12837 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12838 * linux-low.c (linux_add_process): Initialize arch_private.
12839 (linux_remove_process): Free arch_private.
12840 (add_lwp): Initialize arch_private.
12841 (delete_lwp): Free arch_private.
12842 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12843 provided.
12844 * linux-low.h (process_info_private): New member arch_private.
12845 (lwp_info): New member arch_private.
12846 (linux_target_ops): New members new_process, new_thread,
12847 prepare_to_resume.
12848 (ptid_of): New macro.
12849 * linux-x86-low.c: Include stddef.h, i386-low.h.
12850 (arch_process_info): New struct.
12851 (arch_lwp_info): New struct.
12852 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12853 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12854 (i386_dr_low_get_status): New function.
12855 (x86_insert_point, x86_remove_point): New functions.
12856 (x86_stopped_by_watchpoint): New function.
12857 (x86_stopped_data_address): New function.
12858 (x86_linux_new_process, x86_linux_new_thread): New functions.
12859 (x86_linux_prepare_to_resume): New function.
12860 (the_low_target): Add entries for insert_point, remove_point,
12861 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12862 prepare_to_resume.
12863 * server.c (debug_hw_points): New global.
12864 (monitor_show_help): Document set debug-hw-points.
12865 (handle_query): Process "set debug-hw-points".
12866 * server.h (debug_hw_points): Declare.
12867 (paddress): Declare.
12868 * utils.c (NUMCELLS, CELLSIZE): New macros.
12869 (get_sell, xsnprintf, paddress): New functions.
12870 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12871 remove_point, stopped_by_watchpoint, stopped_data_address.
12872 * win32-i386-low.c: Include i386-low.h.
12873 (debug_reg_state): Replaces dr.
12874 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12875 (i386_dr_low_get_status): New function.
12876 (i386_insert_point, i386_remove_point): New functions.
12877 (i386_stopped_by_watchpoint): New function.
12878 (i386_stopped_data_address): New function.
12879 (i386_initial_stuff): Update.
12880 (get_thread_context,set_thread_context,i386_thread_added): Update.
12881 (the_low_target): Add entries for insert_point,
12882 remove_point, stopped_by_watchpoint, stopped_data_address.
12883 * win32-low.c (win32_insert_watchpoint): New function.
12884 (win32_remove_watchpoint): New function.
12885 (win32_stopped_by_watchpoint): New function.
12886 (win32_stopped_data_address): New function.
12887 (win32_target_ops): Add entries for insert_watchpoint,
12888 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12889 * win32-low.h (win32_target_ops): New members insert_point,
12890 remove_point, stopped_by_watchpoint, stopped_data_address.
12891
12892 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12893
12894 * server.c (process_serial_event): Re-return unsupported, not
12895 error, if the type isn't recognized. Re-allow supporting only
12896 insert or remove packets. Also call require_running for
12897 breakpoints. Add missing break statement to default case. Tidy.
12898 * target.h (struct target_ops): Rename insert_watchpoint to
12899 insert_point, and remove_watchpoint to remove_point.
12900
12901 * linux-low.h (struct linux_target_ops): Likewise.
12902 * linux-low.c (linux_insert_watchpoint): Rename to ...
12903 (linux_insert_point): ... this. Adjust.
12904 (linux_remove_watchpoint): Rename to ...
12905 (linux_remove_point): ... this. Adjust.
12906 (linux_target_ops): Adjust.
12907 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12908 (cris_insert_point): ... this.
12909 (cris_remove_watchpoint): Rename to ...
12910 (cris_remove_point): ... this.
12911 (the_low_target): Adjust.
12912
12913 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12914
12915 * server.c (handle_v_kill): Pass signal_pid to
12916 kill_inferior if multi_process is zero.
12917
12918 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12919
12920 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12921 * target.h (target_ops): Comment for *_watchpoint to make it clear
12922 the functions can get types '0' and '1'.
12923
12924 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12925
12926 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12927 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12928 * regcache.c (get_regcache): Likewise.
12929 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12930 * win32-low.c (child_fetch_inferior_registers): Remove check for
12931 regno 0.
12932
12933 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12934 Pedro Alves <pedro@codesourcery.com>
12935
12936 * target.h (struct target_ops) <supports_multi_process>: New
12937 callback.
12938 (target_supports_multi_process): New.
12939 * server.c (handle_query): Even if GDB reports support, only
12940 enable multi-process if the target also supports it. Report
12941 multi-process support only if the target backend supports it.
12942 * linux-low.c (linux_supports_multi_process): New function.
12943 (linux_target_ops): Install it as target_supports_multi_process
12944 callback.
12945
12946 2009-05-24 Doug Evans <dje@google.com>
12947
12948 Global renaming of find_thread_pid to find_thread_ptid.
12949 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12950 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12951 All callers updated.
12952
12953 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12954 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12955 directly.
12956
12957 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12958 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12959 (linux_resume_one_lwp): Ditto.
12960
12961 2009-05-23 Doug Evans <dje@google.com>
12962
12963 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12964 from struct inferior_list_entry * to struct lwp_info *.
12965 All callers updated.
12966
12967 2009-05-13 Doug Evans <dje@google.com>
12968
12969 * linux-x86-low.c: Don't include assert.h.
12970 (x86_siginfo_fixup): Use fatal, not assert.
12971 (x86_arch_setup): Fix comment.
12972
12973 2009-05-12 Doug Evans <dje@google.com>
12974
12975 Biarch support for i386/amd64 gdbserver.
12976 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12977 Add linux-x86-low.c.
12978 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12979 (linux-x86-low.o): Add.
12980 * linux-x86-64-low.c: Delete.
12981 * linux-i386-low.c: Delete.
12982 * linux-x86-low.c: New file.
12983 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12984 linux-x86-low.o.
12985 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12986 linux-x86-low.o.
12987 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12988 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12989 (linux_child_pid_to_exec_file): New function.
12990 (elf_64_header_p, elf_64_file_p): New functions.
12991 (siginfo_fixup): New function.
12992 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12993 give target a chance to convert layout.
12994 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12995 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12996
12997 2009-05-07 Doug Evans <dje@google.com>
12998
12999 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13000 (regsets_store_inferior_registers): Ditto.
13001
13002 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13003
13004 PR server/10048
13005
13006 * linux-low.c (must_set_ptrace_flags): Delete.
13007 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13008 of the global.
13009 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13010 `lwp->must_set_ptrace_flags' instead.
13011 (linux_wait_for_event_1): Set ptrace options here.
13012 (linux_wait_1): ... not here.
13013
13014 2009-04-30 Doug Evans <dje@google.com>
13015
13016 * inferiors.c (started_inferior_callback): New function.
13017 (attached_inferior_callback): New function.
13018 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13019 * server.c (print_started_pid, print_attached_pid): New functions.
13020 (detach_or_kill_for_exit): New function.
13021 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13022 * server.h (have_started_inferiors_p): Declare.
13023 (have_attached_inferiors_p): Declare.
13024
13025 * inferiors.c (remove_process): Fix memory leak, free process.
13026 * linux-low.c (linux_remove_process): New function.
13027 (linux_kill): Call it instead of remove_process.
13028 (linux_detach, linux_wait_1): Ditto.
13029
13030 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13031
13032 * configure.srv: Add x86 Windows CE target.
13033
13034 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13035
13036 * inferiors.c (get_thread_process): Make global.
13037 * server.h (get_thread_process): Add prototype.
13038 * thread-db.c (find_one_thread): Use get_thread_process
13039 instead of current_process.
13040 (thread_db_get_tls_address): Do not crash if called when
13041 thread layer is not yet initialized.
13042
13043 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13044
13045 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13046 * spu-low.c (current_tid): Rename to ...
13047 (current_ptid): ... this.
13048 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13049 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13050 ptid_get_lwp (current_ptid) instead of current_tid.
13051 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13052 instead of current_tid. Use find_process_pid to verify pid
13053 argument is valid. Pass proper argument to remove_process.
13054 (spu_thread_alive): Compare current_ptid instead of current_tid.
13055 (spu_resume): Likewise.
13056
13057 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13058
13059 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13060 variable.
13061
13062 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13063
13064 Implement the multiprocess extensions, and add linux multiprocess
13065 support.
13066
13067 * server.h (ULONGEST): Declare.
13068 (struct ptid, ptid_t): New.
13069 (minus_one_ptid, null_ptid): Declare.
13070 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13071 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13072 (struct inferior_list_entry): Change `id' type from unsigned from
13073 to ptid_t.
13074 (struct sym_cache, struct breakpoint, struct
13075 process_info_private): Forward declare.
13076 (struct process_info): Declare.
13077 (current_process): Declare.
13078 (all_processes): Declare.
13079 (initialize_inferiors): Declare.
13080 (add_thread): Adjust to use ptid_t.
13081 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13082 (add_process, remove_process, find_thread_pid): Declare.
13083 (find_inferior_id): Adjust to use ptid_t.
13084 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13085 (multi_process): Declare.
13086 (push_event): Adjust to use ptid_t.
13087 (read_ptid, write_ptid): Declare.
13088 (prepare_resume_reply): Adjust to use ptid_t.
13089 (clear_symbol_cache): Declare.
13090 * inferiors.c (all_processes): New.
13091 (null_ptid, minus_one_ptid): New.
13092 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13093 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13094 (add_thread): Change unsigned long to ptid. Remove gdb_id
13095 parameter. Adjust.
13096 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13097 (gdb_id_to_thread): Rename to ...
13098 (find_thread_pid): ... this. Change unsigned long to ptid.
13099 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13100 (loaded_dll, pull_pid_from_list): Adjust.
13101 (add_process, remove_process, find_process_pid)
13102 (get_thread_process, current_process, initialize_inferiors): New.
13103 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13104 (struct target_waitstatus) <related_pid>: Ditto.
13105 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13106 return type to int.
13107 (struct target_ops) <join>: Add `pid' argument.
13108 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13109 (struct target_ops) <wait>: Add `ptid' field. Change return type
13110 to ptid.
13111 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13112 (mywait): Add `ptid' argument. Change return type to ptid_t.
13113 (target_pid_to_str): Declare.
13114 * target.c (set_desired_inferior): Adjust to use ptids.
13115 (mywait): Add new `ptid' argument. Adjust.
13116 (target_pid_to_str): New.
13117 * mem-break.h (free_all_breakpoints): Declare.
13118 * mem-break.c (breakpoints): Delelete.
13119 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13120 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13121 to use per-process breakpoint list.
13122 (free_all_breakpoints): New.
13123 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13124 (symbol_cache, all_symbols_looked_up): Delete.
13125 (hexchars): New.
13126 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13127 read_ptid): New.
13128 (prepare_resume_reply): Change ptid argument's type from unsigned
13129 long to ptid_t. Adjust. Implement W;process and X;process.
13130 (free_sym_cache, clear_symbol_cache): New.
13131 (look_up_one_symbol): Adjust to per-process symbol cache. *
13132 * server.c (cont_thread, general_thread, step_thread): Change type
13133 to ptid_t.
13134 (attached): Delete.
13135 (multi_process): New.
13136 (last_ptid): Change type to ptid_t.
13137 (struct vstop_notif) <ptid>: Change type to ptid_t.
13138 (queue_stop_reply, push_event): Change `ptid' argument's type to
13139 ptid_t.
13140 (discard_queued_stop_replies): Add `pid' argument.
13141 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13142 changes. Don't reference the `attached' global.
13143 (attach_inferior): Adjust to mywait interface changes.
13144 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13145 features. Handle and report "multiprocess+". Handle
13146 "qAttached:PID".
13147 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13148 changes.
13149 (handle_v_kill): New.
13150 (handle_v_stopped): Adjust to use target_pid_to_str.
13151 (handle_v_requests): Allow multiple attaches and runs when
13152 multiprocess extensions are in effect. Handle "vKill".
13153 (myresume): Adjust to use ptids.
13154 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13155 (handle_status): Adjust to discard_queued_stop_replies interface
13156 change.
13157 (first_thread_of, kill_inferior_callback)
13158 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13159 (main): Call initialize_inferiors. Adjust to use ptids, killing
13160 and detaching from all inferiors. Handle multiprocess packet
13161 variants.
13162 * linux-low.h: Include gdb_proc_service.h.
13163 (struct process_info_private): New.
13164 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13165 <lwpid_of>: Use ptid_get_lwp.
13166 (get_lwp_thread): Adjust.
13167 (struct lwp_info): Add `dead' member.
13168 (find_lwp_pid): Declare.
13169 * linux-low.c (thread_db_active): Delete.
13170 (new_inferior): Adjust comment.
13171 (inferior_pid): Delete.
13172 (linux_add_process): New.
13173 (handle_extended_wait): Adjust.
13174 (add_lwp): Change unsigned long to ptid.
13175 (linux_create_inferior): Add process to processes table. Adjust
13176 to use ptids. Don't set new_inferior here.
13177 (linux_attach_lwp): Rename to ...
13178 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13179 it. Adjust to use ptids.
13180 (linux_attach_lwp): New.
13181 (linux_attach): Add process to processes table. Don't set
13182 new_inferior here.
13183 (struct counter): New.
13184 (second_thread_of_pid_p, last_thread_of_process_p): New.
13185 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13186 multiple processes.
13187 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13188 processes. Remove process from process table.
13189 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13190 to multiple processes.
13191 (any_thread_of): New.
13192 (linux_detach): Add `pid' argument, and handle it. Remove process
13193 from processes table.
13194 (linux_join): Add `pid' argument. Handle it.
13195 (linux_thread_alive): Change unsighed long argument to ptid_t.
13196 Consider dead lwps as not being alive.
13197 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13198 threads we're not interested in.
13199 (same_lwp, find_lwp_pid): New.
13200 (linux_wait_for_lwp): Change `pid' argument's type from int to
13201 ptid_t. Adjust.
13202 (linux_wait_for_event): Rename to ...
13203 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13204 from int to ptid_t. Adjust.
13205 (linux_wait_for_event): New.
13206 (linux_wait_1): Add `ptid' argument. Change return type to
13207 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13208 that exit from the process table.
13209 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13210 Adjust.
13211 (mark_lwp_dead): New.
13212 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13213 stopping all threads, mark its main lwp as dead.
13214 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13215 ptids.
13216 (fetch_register, usr_store_inferior_registers)
13217 (regsets_fetch_inferior_registers)
13218 (regsets_store_inferior_registers, linux_read_memory)
13219 (linux_write_memory): Inline `inferior_pid'.
13220 (linux_look_up_symbols): Adjust to use per-process
13221 `thread_db_active'.
13222 (linux_request_interrupt): Adjust to use ptids.
13223 (linux_read_auxv): Inline `inferior_pid'.
13224 (initialize_low): Don't reference thread_db_active.
13225 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13226 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13227 (ps_getpid): Return the pid of the current inferior.
13228 * thread-db.c (proc_handle, thread_agent): Delete.
13229 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13230 per-process data.
13231 (find_one_thread): Change argument type to ptid_t. Adjust to
13232 per-process data.
13233 (maybe_attach_thread): Adjust to per-process data and ptids.
13234 (thread_db_find_new_threads): Ditto.
13235 (thread_db_init): Ditto.
13236 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13237 processes table. Adjust to use ptids.
13238 (spu_kill, spu_detach): Adjust interface. Remove process from
13239 processes table.
13240 (spu_join, spu_thread_alive): Adjust interface.
13241 (spu_wait): Adjust interface. Remove process from processes
13242 table. Adjust to use ptids.
13243 * win32-low.c (current_inferior_tid): Delete.
13244 (current_inferior_ptid): New.
13245 (debug_event_ptid): New.
13246 (thread_rec): Take a ptid. Adjust.
13247 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13248 (child_delete_thread): Ditto.
13249 (do_initial_child_stuff): Add `attached' argument. Add process to
13250 processes table.
13251 (child_fetch_inferior_registers, child_store_inferior_registers):
13252 Adjust.
13253 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13254 (win32_attach): Pass 1 to do_initial_child_stuff.
13255 (win32_kill): Adjust interface. Remove process from processes
13256 table.
13257 (win32_detach): Ditto.
13258 (win32_join): Adjust interface.
13259 (win32_thread_alive): Take a ptid.
13260 (win32_resume): Adjust to use ptids.
13261 (get_child_debug_event): Ditto.
13262 (win32_wait): Adjust interface. Remove exiting process from
13263 processes table.
13264
13265 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13266
13267 Non-stop mode support.
13268
13269 * server.h (non_stop): Declare.
13270 (gdb_client_data, handler_func): Declare.
13271 (delete_file_handler, add_file_handler, start_event_loop):
13272 Declare.
13273 (handle_serial_event, handle_target_event, push_event)
13274 (putpkt_notif): Declare.
13275 * target.h (enum resume_kind): New.
13276 (struct thread_resume): Replace `step' field by `kind' field.
13277 (TARGET_WNOHANG): Define.
13278 (struct target_ops) <wait>: Add `options' argument.
13279 <supports_non_stop, async, start_non_stop>: New fields.
13280 (target_supports_non_stop, target_async): New.
13281 (start_non_stop): Declare.
13282 (mywait): Add `options' argument.
13283 * target.c (mywait): Add `options' argument. Print child exit
13284 notifications here.
13285 (start_non_stop): New.
13286 * server.c (non_stop, own_buf, mem_buf): New globals.
13287 (struct vstop_notif): New.
13288 (notif_queue): New global.
13289 (queue_stop_reply, push_event, discard_queued_stop_replies)
13290 (send_next_stop_reply): New.
13291 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13292 interface changes.
13293 (attach_inferior): In non-stop mode, don't wait for the target
13294 here.
13295 (handle_general_set): Handle QNonStop.
13296 (handle_query): When handling qC, return the current general
13297 thread, instead of the first thread of the list.
13298 (handle_query): If the backend supports non-stop mode, include
13299 QNonStop+ in the qSupported query response.
13300 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13301 and non-stop mode.
13302 (handle_v_attach, handle_v_run): Handle non-stop mode.
13303 (handle_v_stopped): New.
13304 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13305 (myresume): Adjust to use resume_kind. Handle non-stop.
13306 (queue_stop_reply_callback): New.
13307 (handle_status): Handle non-stop mode.
13308 (main): Clear non_stop flag on reconnection. Use the event-loop.
13309 Refactor serial protocol handling from here ...
13310 (process_serial_event): ... to this new function. When GDB
13311 selects any thread, select one here. In non-stop mode, wait until
13312 GDB acks all pending events before exiting.
13313 (handle_serial_event, handle_target_event): New.
13314 * remote-utils.c (remote_open): Install remote_desc in the event
13315 loop.
13316 (remote_close): Remove remote_desc from the event loop.
13317 (putpkt_binary): Rename to...
13318 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13319 (putpkt_binary): New as wrapper around putpkt_binary_1.
13320 (putpkt_notif): New.
13321 (prepare_resume_reply): In non-stop mode, don't change the
13322 general_thread.
13323 * event-loop.c: New.
13324 * Makefile.in (OBJ): Add event-loop.o.
13325 (event-loop.o): New rule.
13326
13327 * linux-low.h (pid_of): Moved here.
13328 (lwpid_of): New.
13329 (get_lwp_thread): Use lwpid_of.
13330 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13331 * linux-low.c (pid_of): Delete.
13332 (inferior_pid): Use lwpid_of.
13333 (linux_event_pipe): New.
13334 (target_is_async_p): New.
13335 (delete_lwp): New.
13336 (handle_extended_wait): Use lwpid_of.
13337 (add_lwp): Don't set lwpid field.
13338 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13339 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13340 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13341 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13342 first. Adjust to linux_wait_for_event interface changes. Use
13343 lwpid_of.
13344 (linux_detach): Don't delete the main lwp here.
13345 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13346 (status_pending_p): Don't consider explicitly suspended lwps.
13347 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13348 pointer. Add OPTIONS argument. Change return type to int. Use
13349 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13350 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13351 pointer. Add status pointer argument. Return a pid instead of a
13352 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13353 changes. In non-stop mode, don't switch to a random thread.
13354 (linux_wait): Rename to...
13355 (linux_wait_1): ... this. Add target_options argument, and handle
13356 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13357 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13358 clean exit and signal exit code. Don't stop all threads in
13359 non-stop mode. In all-stop mode, only stop all threads when
13360 reporting a stop to GDB. Handle explicit thread stop requests.
13361 (async_file_flush, async_file_mark): New.
13362 (linux_wait): New.
13363 (send_sigstop): Use lwpid_of.
13364 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13365 interface changes. In non-stop mode, don't switch to a random
13366 thread.
13367 (linux_resume_one_lwp): Use lwpid_of.
13368 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13369 (linux_resume_one_thread): ... this. Handle resume_stop. In
13370 non-stop mode, don't look for pending flag in all threads.
13371 (resume_status_pending_p): Don't consider explicitly suspended
13372 threads.
13373 (my_waitpid): Reimplement. Emulate __WALL.
13374 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13375 Use lwpid_of.
13376 (sigchld_handler, linux_supports_non_stop, linux_async)
13377 (linux_start_non_stop): New.
13378 (linux_target_ops): Register linux_supports_non_stop, linux_async
13379 and linux_start_non_stop.
13380 (initialize_low): Install SIGCHLD handler.
13381 * thread-db.c (thread_db_create_event, find_one_thread)
13382 (thread_db_get_tls_address): Use lwpid_of.
13383 * win32-low.c (win32_detach): Adjust to use resume_kind.
13384 (win32_wait): Add `options' argument.
13385 * spu-low.c (spu_resume): Adjust to use resume_kind.
13386 (spu_wait): Add `options' argument.
13387
13388 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13389
13390 Decouple target code from remote protocol.
13391
13392 * target.h (enum target_waitkind): New.
13393 (struct target_waitstatus): New.
13394 (struct target_ops) <wait>: Return an unsigned long. Take a
13395 target_waitstatus pointer instead of a char pointer.
13396 (mywait): Likewise.
13397 * target.c (mywait): Change prototype to return an unsigned long.
13398 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13399 * server.h (thread_from_wait, old_thread_from_wait): Delete
13400 declarations.
13401 (prepare_resume_reply): Change prototype to take a
13402 target_waitstatus.
13403 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13404 (last_status, last_ptid): New.
13405 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13406 pid instead of a signal.
13407 (attach_inferior): Remove "status" and "signal" parameters.
13408 Adjust.
13409 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13410 not as an address.
13411 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13412 (handle_v_requests, myresume): Remove "status" and "signal"
13413 parameters. Adjust.
13414 (handle_status): New.
13415 (main): Delete local `status'. Adjust.
13416 * remote-utils.c: Include target.h.
13417 (prepare_resume_reply): Change prototype to take a
13418 target_waitstatus. Adjust.
13419
13420 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13421 interface.
13422 * spu-low.c (spu_wait): Adjust.
13423 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13424 Delete.
13425 (win32_wait): Adjust.
13426
13427 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13428
13429 * target.h (struct thread_resume): Delete leave_stopped member.
13430 (struct target_ops): Add a `n' argument to the `resume' callback.
13431 * server.c (start_inferior): Adjust.
13432 (handle_v_cont, myresume): Adjust.
13433 * linux-low.c (check_removed_breakpoint): Adjust to resume
13434 interface change, and to removed leave_stopped field.
13435 (resume_ptr): Delete.
13436 (struct thread_resume_array): New.
13437 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13438 resume interface change.
13439 (linux_continue_one_thread, linux_queue_one_thread)
13440 (resume_status_pending_p): Check if the resume field is NULL
13441 instead of checking the leave_stopped member.
13442 (linux_resume): Adjust to the target resume interface change.
13443 * spu-low.c (spu_resume): Adjust to the target resume interface
13444 change.
13445 * win32-low.c (win32_detach, win32_resume): Ditto.
13446
13447 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13448
13449 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13450 flag.
13451 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13452 pending.
13453 (linux_continue_one_thread): Only preserve the stepping flag if
13454 there's a pending breakpoint.
13455
13456 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13457
13458 * server.c (main): After the inferior having exited, call
13459 remote_close before exiting gdbserver.
13460
13461 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13462
13463 Fix size of FPSCR in Power 7 processors.
13464 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13465 (PPC_FEATURE_HAS_DFP): New #define.
13466 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13467 size of the FPSCR.
13468
13469 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13470
13471 * server.c (handle_query) Whitespace and formatting.
13472
13473 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13474
13475 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13476 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13477 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13478 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13479 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13480 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13481 Makefile.in, configure.ac: Fix whitespace throughout.
13482 * configure: Regenerate.
13483
13484 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13485
13486 * inferiors.c (find_inferior): Make it safe for the callback
13487 function to delete the currently iterated inferior.
13488
13489 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13490
13491 * Makefile.in (linuw_low_h): Move higher.
13492 (thread-db.o): Depend on $(linux_low_h).
13493
13494 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13495
13496 Rename "process" to "lwp" throughout.
13497
13498 * linux-low.c (all_processes): Rename to...
13499 (all_lwps): ... this.
13500 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13501 (add_process): Rename to ...
13502 (add_lwp): ... this. Adjust.
13503 (linux_create_inferior): Adjust.
13504 (linux_attach_lwp): Adjust.
13505 (linux_attach): Adjust.
13506 (linux_kill_one_process): Rename to ...
13507 (linux_kill_one_lwp): ... this. Adjust.
13508 (linux_kill): Adjust.
13509 (linux_detach_one_process): Rename to ...
13510 (linux_detach_one_lwp): ... this. Adjust.
13511 (linux_detach): Adjust.
13512 (check_removed_breakpoint): Adjust.
13513 (status_pending_p): Adjust.
13514 (linux_wait_for_process): Rename to ...
13515 (linux_wait_for_lwp): ... this. Adjust.
13516 (linux_wait_for_event): Adjust.
13517 (send_sigstop): Adjust.
13518 (wait_for_sigstop): Adjust.
13519 (stop_all_processes): Rename to ...
13520 (stop_all_lwps): ... this.
13521 (linux_resume_one_process): Rename to ...
13522 (linux_resume_one_lwp): ... this. Adjust.
13523 (linux_set_resume_request, linux_continue_one_thread)
13524 (linux_queue_one_thread, resume_status_pending_p)
13525 (usr_store_inferior_registers, regsets_store_inferior_registers)
13526 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13527 Adjust.
13528 * linux-low.h (get_process): Rename to ...
13529 (get_lwp): ... this. Adjust.
13530 (get_thread_process): Rename to ...
13531 (get_thread_lwp): ... this. Adjust.
13532 (get_process_thread): Rename to ...
13533 (get_lwp_thread): ... this. Adjust.
13534 (struct process_info): Rename to ...
13535 (struct lwp_info): ... this.
13536 (all_processes): Rename to ...
13537 (all_lwps): ... this.
13538 * proc-service.c (ps_lgetregs): Adjust.
13539 * thread-db.c (thread_db_create_event, find_one_thread)
13540 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13541
13542 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13543
13544 * server.c (handle_query): Handle "qAttached".
13545
13546 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13547
13548 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13549 GPLv3, update license URL.
13550
13551 2009-03-01 Doug Evans <dje@google.com>
13552
13553 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13554 (server_h): Add gdb_signals.h.
13555 (signals.o): Update.
13556 * server.h (target_signal_from_host,target_signal_to_host_p)
13557 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13558
13559 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13560
13561 * remote-utils.c (getpkt): Also generate remote-debug
13562 information if noack_mode is set.
13563
13564 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13565
13566 * server.c (handle_query): Report qXfer:siginfo:read and
13567 qXfer:siginfo:write as supported and handle them.
13568 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13569 * linux-low.c (linux_xfer_siginfo): New.
13570 (linux_target_ops): Set it.
13571
13572 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13573
13574 * server.c (gdbserver_usage): Mention --remote-debug.
13575 (main): Accept '--remote-debug' switch.
13576
13577 2009-01-18 Doug Evans <dje@google.com>
13578
13579 * regcache.c (new_register_cache): No need to check result of xcalloc.
13580 * server.c (handle_search_memory): Back out calls to xmalloc,
13581 result is checked and error is returned to user upon failure.
13582 (handle_query): Ditto. Add more checks for result of malloc.
13583 (handle_v_cont): Check result of malloc, report error back to
13584 user upon failure.
13585 (handle_v_run): Ditto. Call freeargv.
13586 * server.h (freeargv): Declare.
13587 * utils.c (freeargv): New fn.
13588
13589 2009-01-15 Doug Evans <dje@google.com>
13590
13591 * gdbreplay.c (perror_with_name): Make arg const char *.
13592 * server.h (target_signal_to_name): Make return type const char *.
13593 * thread-db.c (thread_db_err_str): Make return type const char *.
13594 * utils.c (perror_with_name): Make arg const char *.
13595
13596 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13597
13598 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13599 when handling a EXIT_PROCESS_DEBUG_EVENT.
13600
13601 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13602
13603 * gdbreplay.c (gdbreplay_version): Update copyright year.
13604 * server.c (gdbserver_version): Likewise.
13605
13606 2009-01-05 Doug Evans <dje@google.com>
13607
13608 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13609 (handle_extended_wait): Improve comment.
13610
13611 2008-12-13 Doug Evans <dje@google.com>
13612
13613 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13614 * server.h (ATTR_MALLOC): New macro.
13615 (xmalloc,xcalloc,xstrdup): Declare.
13616 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13617 * inferiors.c: Ditto.
13618 * linux-low.c: Ditto.
13619 * mem-break.c: Ditto.
13620 * regcache.c: Ditto.
13621 * remote-utils.c: Ditto.
13622 * server.c: Ditto.
13623 * target.c: Ditto.
13624 * win32-low.c: Ditto.
13625
13626 2008-12-12 Doug Evans <dje@google.com>
13627
13628 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13629 in debugging printf.
13630
13631 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13632
13633 2008-12-09 Doug Evans <dje@google.com>
13634
13635 * linux-low.h (struct process_info): Delete member tid, unused.
13636 * thread-db.c (find_one_thread): Update.
13637 (maybe_attach_thread): Update.
13638
13639 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13640
13641 * target.h (struct target_ops): Add qxfer_osdata member.
13642 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13643 and dirent.h.
13644 (linux_qxfer_osdata): New functions.
13645 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13646 callback.
13647 * server.c (handle_query): Handle "qXfer:osdata:read:".
13648 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13649 (buffer_xml_printf): New functions.
13650 * server.h (struct buffer): New.
13651 (buffer_grow_str, buffer_grow_str0): New macros.
13652 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13653 (buffer_xml_printf): Declare.
13654
13655 2008-11-24 Doug Evans <dje@google.com>
13656
13657 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13658
13659 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13660
13661 * server.c (handle_v_run): Always use the supplied argument list.
13662
13663 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13664
13665 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13666 (xtensa_regmap_table): Add entry for scompare1.
13667
13668 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13669
13670 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13671 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13672 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13673 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13674 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13675 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13676 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13677 XML target descriptions.
13678 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13679 when inferior is running on an ISA 2.05 or later processor. Add
13680 special case to return offset for full 64-bit slot of FPSCR when
13681 in 32-bits.
13682
13683 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13684
13685 * Makefile.in (SFILES, clean): Added sparc64 files.
13686 (reg-sparc64.o, reg-sparc64.c): New.
13687 * configure.srv (sparc*-*-linux*): New configuration.
13688 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13689 syscall arguments for SPARC.
13690 (regsets_store_inferior_registers): Likewise.
13691 * linux-sparc-low.c: New file.
13692
13693 2008-10-21 Doug Evans <dje@google.com>
13694
13695 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13696 (READLINE_DIR,READLINE_DEP): Delete.
13697 (INTERNAL_CFLAGS): Update.
13698 (LINTFLAGS): Update.
13699
13700 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13701
13702 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13703 whole argv from the last run, not just argv[0].
13704
13705 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13706
13707 * regcache.c (new_register_cache): Return NULL if the register
13708 cache size isn't known yet.
13709 (free_register_cache): Avoid dereferencing a NULL regcache.
13710
13711 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13712
13713 * configure.srv: Merge MIPS and MIPS64.
13714
13715 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13716
13717 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13718
13719 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13720
13721 * Makefile.in: Add required vsx dependencies.
13722
13723 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13724 Declare init_registers_powerpc_vsx32l.
13725 Declare init_registers_powerpc_vsx64l.
13726 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13727 (ppc_arch_setup): Check for VSX in hwcap.
13728 (ppc_fill_vsxregset): New function.
13729 (ppc_store_vsxregset): New function.
13730 Add new VSX entry in regset_info target_regsets.
13731
13732 * configure.srv: Add new VSX dependencies.
13733
13734 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13735
13736 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13737 (remote_open): Set or clear transport_is_reliable.
13738 (putpkt_binary): Don't expect acks in noack mode.
13739 (getpkt): Don't send ack/nac in noack mode.
13740 * server.c (handle_general_set): Handle QStartNoAckMode.
13741 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13742 qSupported.
13743 (main): Reset noack_mode on every connection.
13744 * server.h (noack_mode): Declare.
13745
13746 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13747
13748 * Makefile.in (GDBREPLAY_OBS): New variable.
13749 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13750
13751 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13752 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13755 (usr_store_inferior_registers): Likewise.
13756 (regsets_store_inferior_registers): Likewise.
13757
13758 2008-07-31 Rolf Jansen <rj@surtec.com>
13759 Pedro Alves <pedro@codesourcery.com>
13760
13761 * configure.ac: Check for memmem declaration.
13762 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13763 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13764 (disable_packet_qfThreadInfo): Unconditionally compile.
13765 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13766 * configure, config.in: Regenerate.
13767
13768 2008-07-28 Doug Kwan <dougkwan@google.com>
13769
13770 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13771 (linux_write_memory): Remove declaration of errno.
13772
13773 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13774
13775 * linux-low.c (handle_extended_wait): Do not use "status"
13776 variable uninitialized.
13777
13778 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13779
13780 * server.c (handle_v_attach): Inhibit reporting dll changes.
13781
13782 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13783
13784 * remote-utils.c (prepare_resume_reply): If requested, don't
13785 output "thread:TID" in the T stop reply.
13786
13787 * server.c (disable_packet_vCont, disable_packet_Tthread)
13788 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13789 (handle_query): If requested, disable support for qC, qfThreadInfo
13790 and qsThreadInfo.
13791 (handle_v_requests): If requested, disable support for vCont.
13792 (gdbserver_show_disableable): New.
13793 (main): Handle --disable-packet and --disable-packet=LIST.
13794
13795 * server.h (disable_packet_vCont, disable_packet_Tthread)
13796 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13797
13798 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13799
13800 * server.c (gdbserver_usage): Mention --version.
13801
13802 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13803
13804 * Makefile.in (gdbreplay.o): New rule.
13805
13806 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13807
13808 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13809 message, not gdbserver.
13810
13811 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13812 Nathan Sidwell <nathan@codesourcery.com>
13813 Joseph Myers <joseph@codesourcery.com>
13814
13815 * acinclude.m4: Include ../../config/acx.m4.
13816 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13817 * configure, config.in: Regenerate.
13818 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13819 * server.c (gdbserver_version): Print PKGVERSION.
13820 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13821 (main): Adjust gdbserver_usage calls.
13822 * gdbreplay.c (version, host_name): Add declarations.
13823 (gdbreplay_version, gdbreplay_usage): New.
13824 (main): Accept --version and --help options.
13825
13826 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13827
13828 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13829 (arm_breakpoint_at): Handle Thumb.
13830 (the_low_target): Add comment.
13831
13832 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13835
13836 2008-05-09 Doug Evans <dje@google.com>
13837
13838 * server.h (decode_search_memory_packet): Declare.
13839 * remote-utils.c (decode_search_memory_packet): New fn.
13840 * server.c (handle_search_memory_1): New fn.
13841 (handle_search_memory): New fn.
13842 (handle_query): Process qSearch:memory packets.
13843
13844 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13845
13846 * regcache.c (registers_length): Remove.
13847 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13848 full register packet.
13849 * regcache.h (registers_length): Remove prototype.
13850 * server.h (PBUFSIZ): Define to 16384.
13851
13852 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13853
13854 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13855 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13856 powerpc-64l.o, and powerpc-altivec64l.o.
13857 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13858 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13859 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13860 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13861 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13862 to srv_xmlfiles.
13863
13864 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13865 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13866 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13867 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13868 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13869 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13870 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13871 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13872 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13873 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13874 (clean): Update.
13875
13876 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13877 (init_registers_powerpc_32l): ... this new prototype.
13878 (init_registers_powerpc_32): Remove, replace by ...
13879 (init_registers_powerpc_altivec32l): ... this new prototype.
13880 (init_registers_powerpc_e500): Remove, replace by ...
13881 (init_registers_powerpc_e500l): ... this new prototype.
13882 (init_registers_ppc64): Remove, replace by ...
13883 (init_registers_powerpc_64l): ... this new prototype.
13884 (init_registers_powerpc_64): Remove, replace by ...
13885 (init_registers_powerpc_altivec64l): ... this new prototype.
13886 (ppc_num_regs): Set to 73.
13887 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13888 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13889 (ppc_cannot_store_register): Handle orig_r3 and trap.
13890 (ppc_arch_setup): Update init_registers_... calls.
13891 (ppc_fill_gregset): Handle orig_r3 and trap.
13892
13893 * inferiors.c (clear_inferiors): Reset current_inferior.
13894
13895 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13896
13897 * acinclude.m4: Add override.m4.
13898 * configure: Regenerate.
13899
13900 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13901
13902 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13903 initial call to init_register_ppc64.
13904
13905 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13906
13907 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13908 single powerpc*-*-linux* case.
13909 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13910
13911 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13912
13913 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13914 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13915 from reg_xmlfiles.
13916 * linux-ppc-low.c: Include <elf.h>.
13917 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13918 (ppc_hwcap): New global variable.
13919 (ppc_regmap): Remove __SPE__ #ifdef sections.
13920 (ppc_regmap_e500): New global variable.
13921 (ppc_cannot_store_register): Update __SPE__ special case.
13922 (ppc_get_hwcap): New function.
13923 (ppc_arch_setup): Use it to determine whether inferior supports
13924 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13925 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13926 Do not access registers if target does not support AltiVec.
13927 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13928 Do not access registers if target does not support SPE.
13929 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13930
13931 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13932
13933 * linux-low.c (disabled_regsets, num_regsets): New.
13934 (use_regsets_p): Delete.
13935 (linux_wait_for_process): Clear disabled_regsets.
13936 (regsets_fetch_inferior_registers): Check and set it.
13937 (regsets_store_inferior_registers): Likewise.
13938 (linux_fetch_registers, linux_store_registers): Do not use
13939 use_regsets_p.
13940 (initialize_low): Allocate disabled_regsets.
13941
13942 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * Makefile.in (LIBOBJS): New.
13945 (OBS): Use LIBOBJS.
13946 (memmem.o): New rule.
13947 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13948 * configure: Regenerated.
13949
13950 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13951
13952 * server.c (handle_query): Never return "unsupported" for
13953 qXfer:features:read queries.
13954
13955 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13956
13957 * server.c (get_features_xml): Fix inverted condition.
13958 (handle_query): Always support qXfer:feature:read.
13959
13960 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * server.c (wrapper_argv): New.
13963 (start_inferior): Handle wrapper_argv. If set, expect an extra
13964 trap.
13965 (gdbserver_usage): Document --wrapper.
13966 (main): Parse --wrapper.
13967
13968 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13969
13970 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13971 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13972 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13973 (ppc_set_pc): Likewise.
13974 (ppc_arch_setup): New function.
13975 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13976 of collect_register.
13977 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13978
13979 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13980
13981 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13982 instead of linux-ppc64-low.o.
13983 * linux-ppc64-low.c: Remove file.
13984 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13985 (linux-ppc64-low.o): Remove rule.
13986
13987 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13988 (init_registers_powerpc_64): Likewise.
13989 (ppc_regmap): Conditionally define depending on __powerpc64__.
13990 (ppc_cannot_store_register): Do not special-case "fpscr" when
13991 compiled on __powerpc64__.
13992 (ppc_collect_ptrace_register): New function.
13993 (ppc_supply_ptrace_register): New function.
13994 (ppc_breakpoint): Change type to "unsigned int".
13995 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13996 (the_low_target): Conditionally provide initializers for the
13997 arch_setup member depending on __powerpc64__. Install
13998 collect_ptrace_register and supply_ptrace_register members.
13999
14000 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14001
14002 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14003 * server.c (gdbserver_xmltarget): Define.
14004 (get_features_xml): Use it to replace "target.xml" and arch_string.
14005
14006 * configure.srv: Remove srv_xmltarget. Add XML files that were
14007 mentioned there to srv_xmlfiles instead. Remove conditional tests
14008 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14009 srv_xmlfiles and srv_regobj to include all possible choices.
14010 * configure.ac (srv_xmltarget): Remove.
14011 (srv_xmlfiles): Do not add "target.xml".
14012 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14013 checks for supplementary target information.
14014 * configure: Regenerate.
14015 * Makefile.in (XML_TARGET): Remove.
14016 (target.xml): Remove rule.
14017 (clean): Do not clean up target.xml.
14018 (.PRECIOUS): Do not mention target.xml.
14019
14020 * target.h (struct target_ops): Remove arch_string member.
14021 * linux-low.c (linux_arch_string): Remove.
14022 (linux_target_ops): Remove arch_string initializer.
14023 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14024 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14025 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14026 * spu-low.c (spu_arch_string): Remove.
14027 (spu_target_ops): Remove arch_string initializer.
14028 * win32-low.c (win32_arch_string): Remove.
14029 (win32_target_ops): Remove arch_string initializer.
14030 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14031 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14032 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14033
14034 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14035
14036 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14037 by collect_ptrace_register and supply_ptrace_register hooks.
14038 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14039 instead of checking for the_low_target.left_pad_xfer.
14040 (usr_store_inferior_registers): Use collect_ptrace_register callback
14041 instead of checking for the_low_target.left_pad_xfer.
14042
14043 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14044 (s390_supply_ptrace_register): Likewise.
14045 (s390_fill_gregset): Call s390_collect_ptrace_register.
14046 (the_low_target): Update.
14047
14048 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14049 (ppc_supply_ptrace_register): Likewise.
14050 (the_low_target): Update.
14051
14052 * linux-i386-low.c (the_low_target): Update.
14053 * linux-x86-64-low.c (the_low_target): Update.
14054
14055 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14056
14057 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14058 reg-s390.o and reg-s390x.o.
14059
14060 * linux-low.c (new_inferior): New global variable.
14061 (linux_create_inferior, linux_attach): Set it.
14062 (linux_wait_for_process): Call the_low_target.arch_setup after the
14063 target has stopped for the first time.
14064 (initialize_low): Do not call the_low_target.arch_setup.
14065
14066 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14067 (s390_set_pc): Likewise.
14068 (s390_arch_setup): New function.
14069 (the_low_target): Use s390_arch_setup as arch_setup routine.
14070
14071 * regcache.c (realloc_register_cache): New function.
14072 (set_register_cache): Call it for each existing regcache.
14073
14074 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14075
14076 * server.h (init_registers): Remove prototype.
14077
14078 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14079 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14080 instead of init_registers ().
14081 * linux-arm-low.c (init_registers_arm): Add prototype.
14082 (init_registers_arm_with_iwmmxt): Likewise.
14083 (the_low_target): Add initializer for arch_setup field.
14084 * linux-cris-low.c (init_registers_cris): Add prototype.
14085 (the_low_target): Add initializer for arch_setup field.
14086 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14087 (the_low_target): Add initializer for arch_setup field.
14088 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14089 (the_low_target): Add initializer for arch_setup field.
14090 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14091 (the_low_target): Add initializer for arch_setup field.
14092 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14093 (the_low_target): Add initializer for arch_setup field.
14094 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14095 (the_low_target): Add initializer for arch_setup field.
14096 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14097 (init_registers_mips64_linux): Likewise.
14098 (the_low_target): Add initializer for arch_setup field.
14099 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14100 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14101 (the_low_target): Add initializer for arch_setup field.
14102 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14103 (init_registers_powerpc_64): Likewise.
14104 (the_low_target): Add initializer for arch_setup field.
14105 * linux-s390-low.c (init_registers_s390): Add prototype.
14106 (init_registers_s390x): Likewise.
14107 (the_low_target): Add initializer for arch_setup field.
14108 * linux-sh-low.c (init_registers_sh): Add prototype.
14109 (the_low_target): Add initializer for arch_setup field.
14110 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14111 (the_low_target): Add initializer for arch_setup field.
14112 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14113 (the_low_target): Add initializer for arch_setup field.
14114
14115 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14116 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14117 instead of init_registers ().
14118 * win32-arm-low.c (init_registers_arm): Add prototype.
14119 (the_low_target): Add initializer for arch_setup field.
14120 * win32-i386-low.c (init_registers_i386): Add prototype.
14121 (the_low_target): Add initializer for arch_setup field.
14122
14123 * spu-low.c (init_registers_spu): Add prototype.
14124 (initialize_low): Call initialie_registers_spu () instead of
14125 initialize_registers ().
14126
14127 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14128
14129 * server.c (handle_v_requests): When handling the vRun and vAttach
14130 packets, if already debugging a process, don't kill it. Return an
14131 error instead.
14132
14133 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * server.c (handle_query): Correct length check.
14136
14137 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14138
14139 * win32-low.c (do_initial_child_stuff): Add process handle
14140 parameter. Set current_process_handle and current_process_id from the
14141 parameters. Clear globals.
14142 (win32_create_inferior): Don't set current_process_handle and
14143 current_process_id here. Instead pass them on the call to
14144 do_initial_child_stuff.
14145 (win32_attach): Likewise.
14146 (win32_clear_inferiors): New.
14147 (win32_kill): Don't close the current process handle or the
14148 current thread handle here. Instead call win32_clear_inferiors.
14149 (win32_detach): Don't open a new handle to the process. Call
14150 win32_clear_inferiors.
14151 (win32_join): Don't rely on current_process_handle; open a new
14152 handle using the process id.
14153 (win32_wait): Call win32_clear_inferiors when the inferior process
14154 has exited.
14155
14156 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14157
14158 * server.c (monitor_show_help): Add "exit".
14159
14160 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14161
14162 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14163 (clean): Add reg-xtensa.c.
14164 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14165 * configure.srv (xtensa*-*-linux*) New target.
14166 * linux-xtensa-low.c: New.
14167 * xtensa-xtregs.c: New.
14168
14169 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14170
14171 * hostio.c: Don't include errno.h.
14172 (errno_to_fileio_errno): Move to hostio-errno.
14173 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14174 error number outputting to the target->hostio_last_error callback.
14175 (hostio_packet_error): Use FILEIO_EINVAL directly.
14176 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14177 calls to hostio_error.
14178 * hostio-errno.c: New.
14179 * server.h (hostio_last_error_from_errno): Declare.
14180 * target.h (target_ops): Add hostio_last_error member.
14181 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14182 as hostio_last_error handler.
14183 * spu-low.c (spu_target_ops): Likewise.
14184 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14185 (wince_hostio_last_error): New functions.
14186 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14187 as hostio_last_error handler.
14188 (win32_target_ops) [!_WIN32_WCE]: Register
14189 hostio_last_error_from_errno as hostio_last_error handler.
14190 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14191 (hostio-errno.o): New rule.
14192 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14193 * configure.srv (srv_hostio_err_objs): New variable. Default to
14194 hostio-errno.o.
14195 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14196 * configure: Regenerate.
14197
14198 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14201 (linux_kill, linux_detach): Clean up the process list.
14202 * remote-utils.c (remote_open): Improve port number parsing.
14203 (putpkt_binary, input_interrupt): Only send interrupts if the target
14204 is running.
14205 * server.c (extended_protocol): Make static.
14206 (attached): Define earlier.
14207 (exit_requested, response_needed, program_argv): New variables.
14208 (target_running): New.
14209 (start_inferior): Clear attached here.
14210 (attach_inferior): Set attached here.
14211 (require_running): Define.
14212 (handle_query): Use require_running and target_running. Implement
14213 "monitor exit".
14214 (handle_v_attach, handle_v_run): New.
14215 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14216 (gdbserver_usage): Update.
14217 (main): Redo argument parsing. Handle --debug and --multi. Handle
14218 --attach along with other options or after the port. Save
14219 program_argv. Support no initial program. Resynchronize
14220 communication with GDB after an error. Handle "monitor exit".
14221 Use require_running and target_running. Always allow the extended
14222 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14223 restart in extended mode.
14224 * README: Refer to the GDB manual. Update --attach usage.
14225
14226 2007-12-20 Andreas Schwab <schwab@suse.de>
14227
14228 * linux-low.c (STACK_SIZE): Define.
14229 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14230 (linux_test_for_tracefork): Likewise.
14231
14232 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * linux-low.c (linux_wait_for_event): Update messages. Do not
14235 reinsert auto-delete breakpoints.
14236 * mem-break.c (struct breakpoint): Change return type of handler to
14237 int.
14238 (set_breakpoint_at): Update handler type.
14239 (reinsert_breakpoint_handler): Return 1 instead of calling
14240 delete_breakpoint.
14241 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14242 setting a new one.
14243 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14244 * mem-break.h (set_breakpoint_at): Update handler type.
14245 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14246 * win32-low.c (auto_delete_breakpoint): New.
14247 (get_child_debug_event): Use it.
14248
14249 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14250
14251 * configure.ac: Check for pread and pwrite.
14252 * hostio.c (handle_pread): Fall back to lseek and read.
14253 (handle_pwrite): Fall back to lseek and write.
14254 * config.in, configure: Regenerated.
14255
14256 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14257
14258 * server.c (myresume): Add own_buf argument.
14259 (main): Update calls.
14260
14261 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14264 * remote-utils.c (remote_open): Do not call disable_async_io.
14265 (block_async_io): Delete.
14266 (unblock_async_io): Make static.
14267 (initialize_async_io): New.
14268 * server.c (handle_v_cont): Handle async I/O here.
14269 (myresume): Likewise. Move other common resume tasks here...
14270 (main): ... from here. Call initialize_async_io. Disable async
14271 I/O before the main loop.
14272 * server.h (initialize_async_io): Declare.
14273 (block_async_io, unblock_async_io): Delete prototypes.
14274 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14275
14276 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14277
14278 * remote-utils.c (readchar): Allow binary data in received messages.
14279
14280 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14281
14282 * win32-low.c (attaching): New global.
14283 (win32_create_inferior): Clear the `attaching' global.
14284 (win32_attach): Set the `attaching' global.
14285 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14286 attaching. Only set a breakpoint at the entry point if not
14287 attaching.
14288
14289 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14290
14291 * server.c (main): Don't report dll events on the initial
14292 connection on attaches.
14293
14294 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14295
14296 * server.c (main): Relax numerical bases supported for the pid of
14297 the --attach command line argument.
14298
14299 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14300
14301 * win32-low.c (win32_attach): Call OpenProcess before
14302 DebugActiveProcess, not after. Add last error output to error
14303 call.
14304
14305 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14306
14307 * win32-low.c (win32_get_thread_context)
14308 (win32_set_thread_context): New functions.
14309 (thread_rec): Use win32_get_thread_context.
14310 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14311 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14312 field.
14313
14314 2007-12-03 Leo Zayas
14315 Pedro Alves <pedro_alves@portugalmail.pt>
14316
14317 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14318 global variables.
14319 (child_add_thread): Minor cleanup.
14320 (child_continue): Resume artificially suspended threads before
14321 calling ContinueDebugEvent.
14322 (suspend_one_thread): New.
14323 (fake_breakpoint_event): New.
14324 (get_child_debug_event): Change return type to int. Check here if
14325 gdb sent an interrupt request. If a soft interrupt was requested,
14326 fake a breakpoint event. Return 0 if there is no event to handle,
14327 and 1 otherwise.
14328 (win32_wait): Don't check here if gdb sent an interrupt request.
14329 Ensure there is a valid event to handle.
14330 (win32_request_interrupt): Add soft interruption method as last
14331 resort.
14332
14333 2007-12-03 Leo Zayas
14334 Pedro Alves <pedro_alves@portugalmail.pt>
14335
14336 * win32-low.h (win32_thread_info): Add descriptions to the
14337 structure members. Replace `suspend_count' counter by a
14338 `suspended' flag.
14339 * win32-low.c (thread_rec): Update condition of when to get the
14340 context from the inferior. Rely on ContextFlags being set if it
14341 has already been retrieved. Only suspend the inferior thread if
14342 we haven't already. Warn if that fails.
14343 (continue_one_thread): s/suspend_count/suspended/. Only call
14344 ResumeThread once. Warn if that fails.
14345
14346 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14347
14348 * win32-low.c (win32_wait): Don't read from the inferior when it
14349 has already exited.
14350
14351 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14352
14353 * Makefile.in (win32_low_h): New variable.
14354 (win32-low.o): Add dependency on $(win32_low_h).
14355 (win32-arm-low.o, win32-i386-low.o): New rules.
14356
14357 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * hostio.c: Correct copyright year.
14360
14361 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * Makefile.in (OBS): Add hostio.o.
14364 (hostio.o): New rule.
14365 * server.h (handle_vFile): Declare.
14366 * hostio.c: New file.
14367 * server.c (handle_v_requests): Take packet_len and new_packet_len
14368 for binary packets. Call handle_vFile.
14369 (main): Update call to handle_v_requests.
14370
14371 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * linux-low.c: Include <sched.h>.
14374
14375 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14376
14377 * linux-low.c (linux_tracefork_grandchild): New.
14378 (linux_tracefork_child): Use clone.
14379 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14380
14381 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14382
14383 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14384
14385 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14388
14389 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * inferiors.c (change_inferior_id): Delete.
14392 (add_pid_to_list, pull_pid_from_list): New.
14393 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14394 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14395 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14396 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14397 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14398 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14399 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14400 (using_threads): Always set to 1.
14401 (handle_extended_wait): New.
14402 (add_process): Do not set TID.
14403 (linux_create_inferior): Set must_set_ptrace_flags.
14404 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14405 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14406 (linux_thread_alive): Rename TID argument to LWPID.
14407 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14408 (linux_wait_for_event): Do not use TID or check using_threads. Update
14409 call to dead_thread_notify. Call handle_extended_wait.
14410 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14411 (send_sigstop): Delete sigstop_sent.
14412 (wait_for_sigstop): Avoid TID.
14413 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14414 (linux_test_for_tracefork): New.
14415 (linux_lookup_signals): Use thread_db_active and
14416 linux_supports_tracefork_flag.
14417 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14418 * linux-low.h (get_process_thread): Avoid TID.
14419 (struct process_ifo): Move thread_known and tid to the end. Remove
14420 sigstop_sent.
14421 (linux_attach_lwp, thread_db_init): Update prototypes.
14422 * server.h (change_inferior_id): Delete prototype.
14423 (add_pid_to_list, pull_pid_from_list): New prototypes.
14424 * thread-db.c (thread_db_use_events): New.
14425 (find_first_thread): Rename to...
14426 (find_one_thread): ...this. Update callers and messages. Do not
14427 call fatal. Check thread_db_use_events. Do not call
14428 change_inferior_id or new_thread_notify.
14429 (maybe_attach_thread): Update. Do not call new_thread_notify.
14430 (thread_db_init): Set thread_db_use_events. Check use_events.
14431 * utils.c (fatal, warning): Correct message prefix.
14432
14433 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14434
14435 * Makefile.in (clean): Remove new files.
14436 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14437 (powerpc-64.o, powerpc-64.c): New rules.
14438 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14439 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14440 with SPE.
14441 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14442 SPE targets.
14443 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14444 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14445 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14446 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14447 (target_regsets): Add AltiVec and SPE register sets.
14448 * configure.ac: Check for AltiVec and SPE.
14449 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14450 (ppc_fill_vrregset, ppc_store_vrregset): New.
14451 (target_regsets): Add AltiVec register set.
14452 * configure: Regenerated.
14453
14454 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * linux-low.c (O_LARGEFILE): Define.
14457 (linux_read_memory): Use /proc/PID/mem.
14458 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14459 * configure, config.in: Regenerated.
14460
14461 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * linux-low.c (linux_wait_for_event): Do not pass signals while
14464 single-stepping.
14465
14466 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14467
14468 * win32-low.c (create_process): New.
14469 (win32_create_inferior): Use create_process instead of
14470 CreateProcess. If create_process failed retry appending an ".exe"
14471 suffix. Store the GetLastError result immediatelly after
14472 create_process calls and use it on the call to error.
14473
14474 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14477
14478 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14479
14480 * configure.ac: Switch license to GPLv3.
14481
14482 2007-08-01 Michael Snyder <msnyder@access-company.com>
14483
14484 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14485
14486 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14489 typedef.
14490 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14491 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14492 CloseToolhelp32Snapshot.
14493 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14494 CloseToolhelp32Snapshot.
14495
14496 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14497
14498 * server.c (main): Check for inferior exit before main loop.
14499
14500 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14501
14502 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14503 instead of on tmp_desc.
14504
14505 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14506 Daniel Jacobowitz <dan@codesourcery.com>
14507
14508 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14509 (add_thread): Minor cleanups.
14510 (clear_inferiors): Move lower in the file. Clear the DLL
14511 list.
14512 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14513 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14514 (xml_escape_text): New.
14515 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14516 for qSupported.
14517 (handle_v_cont): Report errors.
14518 (gdbserver_version): Update.
14519 (main): Correct size of own_buf. Do not report initial DLL events.
14520 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14521 (unloaded_dll, xml_escape_text): New.
14522 * win32-low.c (enum target_waitkind): Update comments.
14523 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14524 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14525 (win32_EnumProcessModules, win32_GetModuleInformation)
14526 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14527 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14528 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14529 (win32_Module32First, win32_Module32Next, load_toolhelp)
14530 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14531 (get_child_debug_event): Handle DLL events.
14532 (win32_wait): Likewise.
14533
14534 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14535
14536 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14537 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14538
14539 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14540
14541 * win32-low.c (handle_output_debug_string): Ignore event if not
14542 waiting.
14543
14544 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14545
14546 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14547
14548 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14551
14552 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14553
14554 * inferiors.c (change_inferior_id): Add comment.
14555 * linux-low.c (check_removed_breakpoint): Add an early
14556 prototype. Improve debug output.
14557 (linux_attach): Doc update.
14558 (linux_detach_one_process, linux_detach): Clean up before releasing
14559 each process.
14560 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14561 * linux-low.h (struct process_info): Doc improvement.
14562 * mem-break.c (delete_all_breakpoints): New.
14563 * mem-break.h (delete_all_breakpoints): New prototype.
14564 * thread-db.c (find_first_thread): New.
14565 (thread_db_create_event): Call it instead of
14566 thread_db_find_new_threads. Clean up unused variables.
14567 (maybe_attach_thread): Remove first thread handling.
14568 (thread_db_find_new_threads): Use find_first_thread.
14569 (thread_db_get_tls_address): Likewise.
14570
14571 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * thread-db.c (thread_db_find_new_threads): Add prototype.
14574 (thread_db_create_event): Check for the main thread before adding
14575 a new thread.
14576 (maybe_attach_thread): Only enable event reporting if TID == 0.
14577 (thread_db_get_tls_address): Check for new threads.
14578
14579 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * linux-low.c (linux_create_inferior): Try execv before execvp.
14582 * spu-low.c (spu_create_inferior): Likewise.
14583
14584 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14585
14586 * linux-low.c (linux_create_inferior): Change execv to execvp.
14587 * spu-low.c (spu_create_inferior): Likewies.
14588
14589 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14590
14591 * Makefile.in (clean): Clean new files instead of deleted ones.
14592 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14593 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14594 rules.
14595 * configure.srv: Specify XML files and new regformats for MIPS and
14596 MIPS64 GNU/Linux.
14597 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14598 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14599 an entry for the restart register.
14600 (mips_cannot_fetch_register, mips_cannot_store_register)
14601 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14602 register names to match the XML descriptions.
14603 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14604 restart register instead of $0.
14605
14606 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14607 Markus Deuling <deuling@de.ibm.com>
14608
14609 * remote-utils.c (decode_xfer_write): New function.
14610 * server.h (decode_xfer_write): Add prototype.
14611 * server.c (handle_query): Add PACKET_LEN argument. Support
14612 qXfer:spu:read and qXfer:spu:write packets.
14613 (main): Pass packet_len to handle_query.
14614 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14615 * target.h (target_ops): Add qxfer_spu.
14616
14617 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14618
14619 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14620 accessing non-seekable spufs files.
14621
14622 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14623
14624 * server.c (handle_query): Add reply for qC packet.
14625
14626 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14627 Leo Zayas <lerele@champenstudios@com>
14628
14629 * server.h (check_remote_input_interrupt_request): New function.
14630 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14631 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14632 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14633 (check_remote_input_interrupt_request): New function.
14634 * server.h (check_remote_input_interrupt_request): Declare.
14635 * win32-low.c (winapi_DebugBreakProcess,
14636 winapi_GenerateConsoleCtrlEvent): New typedefs.
14637 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14638 to 250 ms.
14639 (win32_wait): Check for remote interrupt request
14640 with check_remote_input_interrupt_request.
14641 (win32_request_interrupt): New function.
14642 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14643
14644 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14645
14646 * win32-low.c (debug_registers_changed,
14647 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14648 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14649 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14650 (thread_rec): Get context using the low target.
14651 (child_add_thread): Call thread_added on the low target,
14652 which does the same thing.
14653 (regptr): Delete.
14654 (do_initial_child_stuff): Remove debug registers references.
14655 Set context using the low target. Resume threads after
14656 setting the contexts.
14657 (child_continue): Remove dead variable. Remove debug
14658 registers references.
14659 (child_fetch_inferior_registers): Go through the low target.
14660 (do_child_store_inferior_registers): Remove.
14661 (child_store_inferior_registers): Go through the low target.
14662 (win32_resume): Remove debug registers references.
14663 Set context using the low target.
14664 (handle_exception): Change return type to void. Don't record
14665 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14666 first chance exception.
14667 (get_child_debug_event): Change return type to void. Remove
14668 goto loop. Always return after waiting for debug event.
14669 (win32_wait): Convert to switch statement. Handle spurious
14670 events.
14671
14672 * win32-i386-low.c (debug_registers_changed,
14673 debug_registers_used): New.
14674 (initial_stuff): Rename to ...
14675 (i386_initial_stuff): ... this. Clear debug registers
14676 state variables.
14677 (store_debug_registers): Delete.
14678 (i386_get_thread_context): New.
14679 (load_debug_registers): Delete.
14680 (i386_set_thread_context): New.
14681 (i386_thread_added): New.
14682 (single_step): Rename to ...
14683 (i386_single_step): ... this.
14684 (do_fetch_inferior_registers): Rename to ...
14685 (i386_fetch_inferior_register): ... this.
14686 (i386_store_inferior_register): New.
14687 (the_low_target): Adapt to new interface.
14688
14689 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14690 (arm_get_thread_context): New.
14691 (arm_set_thread_context): New.
14692 (regptr): New.
14693 (do_fetch_inferior_registers): Rename to ...
14694 (arm_fetch_inferior_register): ... this.
14695 (arm_store_inferior_register): New.
14696 (arm_wince_breakpoint): Reimplement as unsigned long.
14697 (arm_wince_breakpoint_len): Define.
14698 (the_low_target): Adapt to new interface.
14699
14700 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14701 load_debug_registers. Add get_thread_context, set_thread_context,
14702 thread_added and store_inferior_register. Rename
14703 fetch_inferior_registers to fetch_inferior_register.
14704 (regptr): Remove declaration.
14705
14706 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14707
14708 * linux-low.c (linux_detach): Change return type to int. Return 0.
14709 * spu-low.c (spu_detach): Likewise.
14710
14711 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14712
14713 * target.h (target_ops): Change return type of detach to int.
14714 Add join.
14715 (join_inferior): New.
14716 * server.c (main): Don't skip detach support on mingw32.
14717 If the inferior doesn't support detaching return error.
14718 Call join_inferior instead of using waitpid.
14719 * linux-low.c (linux_join): New.
14720 (linux_target_op): Add linux_join.
14721 * spu-low.c (spu_join): New.
14722 (spu_target_ops): Add spu_join.
14723 * win32-low.c (win32_detach): Adapt to new interface.
14724 Reopen current_process_handle before detaching. Issue a child
14725 resume before detaching.
14726 (win32_join): New.
14727 (win32_target_op): Add win32_join.
14728
14729 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14730
14731 * win32-low.c (win32-attach): Fix return value.
14732 * target.h (target_ops): Describe ATTACH return values.
14733
14734 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * win32-low.c (GETPROCADDRESS): Define.
14737 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14738 (winapi_DebugSetProcessKillOnExit): Likewise.
14739 (win32_create_inferior): Force usage of ansi CreateProcessA.
14740 (win32_attach): Use GETPROCADDRESS.
14741 (win32_detach): Likewise.
14742
14743 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14744
14745 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14746
14747 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * win32-low.c: Commit leftover changes from 2007-03-29.
14750
14751 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14754 fields short instead of int. Add explicit padding.
14755 (i387_cache_to_fsave): Remove unnecessary casts.
14756 (i387_fsave_to_cache): Doc fix.
14757 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14758
14759 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14762 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14763
14764 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14765
14766 * configure.srv (arm*-*-mingw32ce*): Move near the other
14767 arm targets.
14768
14769 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14770
14771 * configure.ac: Add errno checking.
14772 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14773 sys/file.h and malloc.h.
14774 (AC_CHECK_DECLS): Add perror.
14775 (srv_mingwce): Handle.
14776 * configure.srv (i[34567]86-*-cygwin*): Add
14777 win32-i386-low.o to srv_tgtobj.
14778 (i[34567]86-*-mingw*): Likewise.
14779 (arm*-*-mingw32ce*): Add case.
14780 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14781 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14782 [__MINGW32CE__] (strerror): New function.
14783 [__MINGW32CE__] (errno): Define to GetLastError.
14784 [__MINGW32CE__] (COUNTOF): New macro.
14785 (remote_open): Remove extra close call.
14786 * mem-break.c (delete_breakpoint_at): New function.
14787 * mem-break.h (delete_breakpoint_at): Declare.
14788 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14789 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14790 [USE_WIN32API] (read, write): Add char* casts.
14791 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14792 * server.h: Include wincecompat.h on Windows CE.
14793 [HAVE_ERRNO_H]: Check.
14794 (perror): Declare if not declared.
14795 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14796 (perror_with_name): Remove errno declaration.
14797 * wincecompat.h: New.
14798 * wincecompat.c: New.
14799 * win32-low.h: New.
14800 * win32-arm-low.c: New.
14801 * win32-i386-low.c: New.
14802 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14803 (OUTMSG2): Make it safe.
14804 (_T): New macro.
14805 (COUNTOF): New macro.
14806 (NUM_REGS): Get it from the low target.
14807 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14808 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14809 (thread_rec): Let low target handle debug registers.
14810 (child_add_thread): Likewise.
14811 (child_init_thread_list): Likewise.
14812 (continue_one_thread): Likewise.
14813 (regptr): New.
14814 (do_child_fetch_inferior_registers): Move to ...
14815 * win32-i386-low.c: ... here, and rename to ...
14816 (do_fetch_inferior_registers): ... this.
14817 * win32-low.c (child_fetch_inferior_registers):
14818 Go through the low target.
14819 (do_child_store_inferior_registers): Use regptr.
14820 (strwinerror): New function.
14821 (win32_create_inferior): Handle Windows CE.
14822 Use strwinerror instead of strerror on Windows error
14823 codes. Add program to the error output.
14824 Don't close the main thread handle on Windows CE.
14825 (win32_attach): Use coredll.dll on Windows CE.
14826 (win32_kill): Close current process and current
14827 thread handles.
14828 (win32_detach): Use coredll.dll on Windows CE.
14829 (win32_resume): Let low target handle debug registers, and
14830 step request.
14831 (handle_exception): Add/Remove initial breakpoint. Avoid
14832 non-existant WSTOPSIG on Windows CE.
14833 (win32_read_inferior_memory): Cast to remove warning.
14834 (win32_arch_string): Go through the low target.
14835 (initialize_low): Call set_breakpoint_data with the low
14836 target's breakpoint.
14837 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14838 FOP_REGNUM, mappings): Move to ...
14839 * win32-i386-low.c: ... here.
14840 * win32-low.c (win32_thread_info): Move to ...
14841 * win32-low.h: ... here.
14842 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14843 win32-arm-low.c and wincecompat.c.
14844 (all:): Add $EXEEXT.
14845 (install-only:): Likewise.
14846 (gdbserver:): Likewise.
14847 (gdbreplay:): Likewise.
14848 * config.in: Regenerate.
14849 * configure: Regenerate.
14850
14851 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14852
14853 * win32-low.c: Rename typedef thread_info to
14854 win32_thread_info throughout.
14855
14856 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14857
14858 * win32-i386-low.c: Rename to ...
14859 * win32-low.c: ... this.
14860 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14861 * Makefile.in: Likewise.
14862
14863 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14864
14865 * remote-utils.c (monitor_output): Constify msg parameter.
14866 * server.h (monitor_output): Likewise.
14867 * win32-i386-low.c (handle_output_debug_string): New.
14868 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14869 handle_output_debug_string.
14870 (get_child_debug_event): Likewise.
14871
14872 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14873
14874 * server.c (main): Correct strtoul check.
14875
14876 2007-03-27 Jon Ringle <jon@ringle.org>
14877
14878 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14879
14880 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14881
14882 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14883
14884 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14885
14886 * terminal.h: Check HAVE_SGTTY_H.
14887
14888 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14889
14890 * remote-utils.c (remote_open): Print out the assigned port number.
14891
14892 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14893
14894 * remote-utils.c (monitor_output): New function.
14895 * server.c (debug_threads): Define here.
14896 (monitor_show_help): New function.
14897 (handle_query): Handle qRcmd.
14898 (main): Do not handle 'd' packet.
14899 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14900 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14901 of debug_threads.
14902
14903 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14904
14905 * Makefile.in (EXEEXT): New.
14906 (clean): Use $(EXEEXT).
14907
14908 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14909
14910 * target.h (target_ops): Rename send_signal to request_interrupt,
14911 and remove enum target_signal parameter.
14912 * linux-low.c (linux_request_interrupt): Rename from
14913 linux_send_signal, and always send SIGINT.
14914 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14915 and always send SIGINT.
14916 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14917 of send_signal.
14918 (input_interrupt): Likewise.
14919
14920 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14921
14922 * server.c (get_features_xml): Check if target implemented
14923 arch_string.
14924 * win32-i386-low.c (win32_arch_string): New.
14925 (win32_target_ops): Add win32_arch_string as arch_string member.
14926
14927 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14928
14929 * spu-low.c (spu_arch_string): New.
14930 (spu_target_ops): Add spu_arch_string.
14931
14932 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14933
14934 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14935 * configure.ac: Do not check for terminal.h.
14936 * configure, config.in: Regenerated.
14937
14938 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14939
14940 * Makefile.in (OBS): Add $(XML_BUILTIN).
14941 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14942 (clean): Update.
14943 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14944 (arm-with-iwmmxt.c): New.
14945 * config.in, configure: Regenerate.
14946 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14947 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14948 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14949 (arm*-*-linux*): Add iWMMXt and regset support.
14950 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14951 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14952 (arm_store_wmmxregset, target_regsets): New.
14953 * server.c (get_features_xml): Take annex argument. Check builtin
14954 XML documents.
14955 (handle_query): Handle multiple annexes.
14956
14957 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14958
14959 * remote-utils.c [USE_WIN32API] (read, write): Define.
14960 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14961 write.
14962
14963 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * linux-i386-low.c (the_low_target): Set arch_string.
14966 * linux-x86-64-low.c (the_low_target): Likewise.
14967 * linux-low.c (linux_arch_string): New.
14968 (linux_target_ops): Add it.
14969 * linux-low.h (struct linux_target_ops): Add arch_string.
14970 * server.c (write_qxfer_response): Use const void * for DATA.
14971 (get_features_xml): New.
14972 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14973 * target.h (struct target_ops): Add arch_string method.
14974
14975 2007-01-03 Denis Pilat <denis.pilat@st.com>
14976 Daniel Jacobowitz <dan@codesourcery.com>
14977
14978 * linux-low.c (linux_kill): Handle being called with no threads.
14979 * win32-i386-low.c (win32_kill): Likewise.
14980 (get_child_debug_event): Clear current_process_handle.
14981
14982 2006-12-30 Denis PILAT <denis.pilat@st.com>
14983 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * remote-utils.c (remote_open): Check the type of specified
14986 serial port devices before opening them.
14987 * server.c (main): Kill the inferior if an error occurs during
14988 the first remote_open.
14989
14990 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14991
14992 * README: Update supported targets.
14993
14994 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14995
14996 * Makefile.in (clean): Remove reg-mips64.c.
14997 (reg-mips64.c, reg-mips64.o): New rules.
14998 * configure.srv: Handle mips64. Include regset support for mips.
14999 * linux-mips-low.c (union mips_register): New.
15000 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15001 (mips_breakpoint, mips_breakpoint_at): Use int.
15002 (mips_collect_register, mips_supply_register)
15003 (mips_collect_register_32bit, mips_supply_register_32bit)
15004 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15005 (mips_store_fpregset, target_regsets): New.
15006 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15007
15008 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15009
15010 * configure.srv: Add target "spu*-*-*".
15011 * Makefile.in (clean): Remove reg-spu.c.
15012 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15013 * spu-low.c: New file.
15014
15015 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * configure.ac: Correct td_thr_tls_get_addr test.
15018 * configure: Regenerated.
15019
15020 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * linux-low.c (linux_wait_for_event): Reformat. Use the
15023 pass_signals array.
15024 * remote-utils.c (decode_address_to_semicolon): New.
15025 * server.c (pass_signals, handle_general_set): New.
15026 (handle_query): Mention QPassSignals for qSupported.
15027 (main): Call handle_general_set.
15028 * server.h (pass_signals, decode_address_to_semicolon): New.
15029
15030 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15031
15032 * server.c (handle_query): Correct error handling for read_auxv.
15033
15034 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15035
15036 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15037 and srv_linux_thread_db to yes.
15038 * linux-s390-low.c (s390_fill_gregset): New function.
15039 (target_regsets): Define data structure.
15040
15041 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15042
15043 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15044 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15045 * config.in, configure: Regenerated.
15046 * inferiors.c (gdb_id_to_thread): New function.
15047 (gdb_id_to_thread_id): Use it.
15048 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15049 * linux-low.h (struct process_info): Add th member.
15050 (thread_db_get_tls_address): New prototype.
15051 * remote-utils.c (decode_address): Make non-static.
15052 * server.c (handle_query): Handle qGetTLSAddr.
15053 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15054 * target.h (struct target_ops): Add get_tls_address.
15055 * thread-db.c (maybe_attach_thread): Save the thread handle.
15056 (thread_db_get_tls_address): New.
15057
15058 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15061 (linux_resume_one_process): Take a siginfo_t *. Update all
15062 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15063 (struct pending_signals): Add a siginfo_t.
15064 (linux_wait_for_process): Always set last_status.
15065 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15066 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15067 * linux-low.h (struct process_info): Add last_status.
15068
15069 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * remote-utils.c (try_rle): New function.
15072 (putpkt_binary): Use it.
15073
15074 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15077 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15078 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15079 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15080 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15081 point registers.
15082
15083 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15084
15085 * server.c (terminal_fd): New variable.
15086 (old_foreground_pgrp): Likewise.
15087 (restore_old_foreground_pgrp): New function.
15088 (start_inferior): Record the terminal file descriptor in terminal_fd
15089 and its original foreground group in old_foreground_pgrp. Register
15090 restore_old_foreground_pgrp with atexit().
15091
15092 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * server.c (handle_query): Correct qPart to qXfer.
15095
15096 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * configure.ac: Check for more headers which are missing on
15099 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15100 * configure.srv: Add Cygwin and mingw32.
15101 * remote-utils.c: Don't include headers unconditionally which
15102 are missing on mingw32. Include <winsock.h> for mingw32.
15103 (remote_open): Adjust for mingw32 support. Flush
15104 standard error after writing to it.
15105 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15106 (unblock_async_io, enable_async_io, disable_async_io)
15107 (readchar, getpkt): Update for Winsock support.
15108 (prepare_resume_reply): Expect a protocol signal number.
15109 * server.c: Disable <sys/wait.h> on mingw32.
15110 (start_inferior): Adjust for mingw32 support. Flush
15111 standard error after writing to it.
15112 (attach_inferior): Likewise. Use protocol signal
15113 numbers.
15114 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15115 and names.
15116 * win32-i386-low.c: New file.
15117 * Makefile.in (XM_CLIBS): Set.
15118 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15119 (win32-i386-low.o): New dependency rule.
15120 * linux-low.c (linux_wait): Use target signal numbers.
15121 * target.h (struct target_ops): Doc fix.
15122 * server.h (target_signal_to_name): New prototype.
15123 * gdbreplay.c: Don't include headers unconditionally which
15124 are missing on mingw32. Include <winsock.h> for mingw32.
15125 (remote_close, remote_open): Adjust for Winsock support.
15126 * configure, config.in: Regenerated.
15127
15128 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * server.c (decode_xfer_read, write_qxfer_response): New.
15131 (handle_query): Take a packet length argument. Handle
15132 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15133 the qSupported response.
15134 (main): Update call to handle_query.
15135
15136 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15137
15138 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15139 (putpkt_binary): Renamed from putpkt and adjusted for binary
15140 data.
15141 (putpkt): New wrapper for putpkt_binary.
15142 (readchar): Don't mask off the high bit.
15143 (decode_X_packet): New function.
15144 * server.c (main): Call putpkt_binary if a handler sets the packet
15145 length. Save the length of the incoming packet. Handle 'X'.
15146 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15147
15148 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * server.c (handle_query): Handle qSupported.
15151
15152 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15153
15154 * remote-utils.c (all_symbols_looked_up): New variable.
15155 (look_up_one_symbol): Check it.
15156 * server.h (look_up_one_symbol): New declaration.
15157 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15158
15159 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * Makefile.in (linux-arm-low.o): Update dependencies.
15162 * linux-arm-low.c: Include "gdb_proc_service.h".
15163 (PTRACE_GET_THREAD_AREA): Define.
15164 (ps_get_thread_area): New function.
15165
15166 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15167
15168 * configure.srv (m68k*-*-uclinux*): New target.
15169 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15170 (linux_resume_one_process): Remove extraneous cast.
15171 (linux_read_offsets): New.
15172 (linux_target_op): Add linux_read_offsets on mmuless systems.
15173 * server.c (handle_query): Add qOffsets logic.
15174 * target.h (struct target_ops): Add read_offsets.
15175
15176 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15177
15178 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15179 (PTRACE_GET_THREAD_AREA): Define.
15180 (ps_get_thread_area): New function.
15181 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15182 (linux-x86-64-low.o): Update.
15183
15184 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15185
15186 * configure.ac: Remove checks for prfpregset_t.
15187 * gdb_proc_service.h: New file.
15188 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15189 new "gdb_proc_service.h".
15190 * proc-service.c: Likewise.
15191 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15192 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15193 * Makefile.in (gdb_proc_service_h): Updated.
15194 * configure, config.in: Regenerated.
15195
15196 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15197
15198 * remote-utils.c (prepare_resume_reply): Move declaration
15199 of gdb_id_from_wait to the top of the block.
15200
15201 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15202
15203 * linux-low.c (regsets_store_inferior_registers): Read the regset
15204 from the target before filling it.
15205
15206 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * server.c (attach_inferior): Return SIGTRAP for a successful
15209 attach.
15210
15211 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * Makefile.in (OBS): Add version.o.
15214 (STAGESTUFF): Delete.
15215 (version.o): Add dependencies.
15216 (version.c): Replace rule.
15217 (clean): Remove version.c.
15218 * server.c (gdbserver_version): New.
15219 (gdbserver_usage): Use printf.
15220 (main): Handle --version and --help.
15221 * server.h (version, host_name): Add declarations.
15222
15223 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15224
15225 * linux-arm-low.c:
15226 * linux-arm-low.c:
15227 * inferiors.c:
15228 * i387-fp.h:
15229 * i387-fp.c:
15230 * gdbreplay.c:
15231 * regcache.c:
15232 * proc-service.c:
15233 * mem-break.h:
15234 * mem-break.c:
15235 * linux-x86-64-low.c:
15236 * linux-sh-low.c:
15237 * linux-s390-low.c:
15238 * linux-ppc64-low.c:
15239 * linux-ppc-low.c:
15240 * linux-mips-low.c:
15241 * linux-m68k-low.c:
15242 * linux-m32r-low.c:
15243 * linux-low.h:
15244 * linux-low.c:
15245 * linux-ia64-low.c:
15246 * linux-i386-low.c:
15247 * linux-crisv32-low.c:
15248 * thread-db.c:
15249 * terminal.h:
15250 * target.h:
15251 * target.c:
15252 * server.h:
15253 * server.c:
15254 * remote-utils.c:
15255 * regcache.h:
15256 * utils.c:
15257 * Makefile.in:
15258 * configure.ac:
15259 * gdbserver.1: Add (C) after Copyright. Update the FSF
15260 address.
15261
15262 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15265 (arm_breakpoint_at): Recognize both breakpoints.
15266 (the_low_target): Use the correct breakpoint instruction.
15267
15268 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15271 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15272 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15273 (the_low_target): Update.
15274
15275 2005-10-25 Andreas Schwab <schwab@suse.de>
15276
15277 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15278
15279 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15280 (ia64_num_regs): Reduce to 462.
15281
15282 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15283
15284 * acinclude.m4: Correct quoting.
15285 * aclocal.m4: Regenerated.
15286
15287 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15288 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15289 (thread_db_init): Call thread_db_err_str.
15290 * configure.ac: Check for TD_VERSION.
15291 * config.in, configure: Regenerated.
15292
15293 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15294
15295 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15296
15297 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15298
15299 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15300 is not available. Define HAVE_PTRACE_GETREGS if it is.
15301 * config.in, configure: Regenerated.
15302 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15303 * linux-i386-low.c, linux-m68k-low.c: Update to use
15304 HAVE_PTRACE_GETREGS.
15305 * linux-low.c (regsets_fetch_inferior_registers)
15306 (regsets_store_inferior_registers): Only return 0 if we processed
15307 GENERAL_REGS.
15308 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15309 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15310
15311 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * inferiors.c (struct thread_info): Add gdb_id.
15314 (add_thread): Add gdb_id argument.
15315 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15316 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15317 calls to add_thread.
15318 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15319 * server.c (handle_query): Use thread_to_gdb_id.
15320 (handle_v_cont, main): Use gdb_id_to_thread_id.
15321 * server.h (add_thread): Update prototype.
15322 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15323 prototypes.
15324
15325 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15328 left-padded registers.
15329 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15330 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15331
15332 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15333
15334 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15335 * configure: Regenerate.
15336 * config.in: Regenerate.
15337 * server.h (NEED_DECLARATION_STRERROR):
15338 Replace with !HAVE_DECL_STRERROR.
15339
15340 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15341
15342 * linux-low.c (linux_wait, linux_send_signal): Don't test
15343 an unsigned long variable for > 0 if it could be MAX_ULONG.
15344 * server.c (myresume): Likewise.
15345 * target.c (set_desired_inferior): Likewise.
15346
15347 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15348
15349 * configure.ac: Simplify and improve check for socklen_t.
15350 * configure, config.in: Regenerate.
15351
15352 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15353
15354 * acconfig.h: Remove.
15355 * configure.ac: Add a test for socklen_t. Use three-argument
15356 AC_DEFINE throughout.
15357 * config.in: Regenerated using autoheader 2.59.
15358 * configure: Regenerated.
15359
15360 * gdbreplay.c (socklen_t): Provide a default.
15361 (remote_open): Use socklen_t.
15362 * remote-utils.c (socklen_t): Provide a default.
15363 (remote_open): Use socklen_t.
15364 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15365 unsigned char.
15366
15367 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15368 char for buffers.
15369 * linux-low.c (linux_read_memory, linux_write_memory)
15370 (linux_read_auxv): Likewise.
15371 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15372 (check_mem_write): Likewise.
15373 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15374 Likewise.
15375 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15376 (registers_from_string, register_data): Likewise.
15377 * server.c (handle_query, main): Likewise.
15378 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15379 (decode_M_packet): Likewise.
15380 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15381 * target.h (struct target_ops): Update read_memory, write_memory,
15382 and read_auxv.
15383 (read_inferior_memory, write_inferior_memory): Update.
15384 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15385 to unsigned char *.
15386 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15387 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15388 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15389 linux-s390-low.c, linux-sh-low.c: Update for changes in
15390 read_inferior_memory and the_low_target->breakpoint.
15391
15392 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15393
15394 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15395 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15396 * configure.srv: Add powerpc64-*-linux*.
15397 * linux-ppc64-low.c: New file.
15398
15399 2005-05-23 Orjan Friberg <orjanf@axis.com>
15400
15401 * linux-cris-low.c: New file with support for CRIS.
15402 * linux-crisv32-low.c: Ditto for CRISv32.
15403 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15404 (clean): Add reg-cris.c and reg-crisv32.c.
15405 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15406 reg-crisv32.o, and reg-crisv32.c to make rules.
15407 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15408 recognized targets.
15409
15410 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15411
15412 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15413 of sizeof (PTRACE_XFER_TYPE).
15414 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15415
15416 2005-05-12 Orjan Friberg <orjanf@axis.com>
15417
15418 * target.h (struct target_ops): Add insert_watchpoint,
15419 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15420 pointers for hardware watchpoint support.
15421 * linux-low.h (struct linux_target_ops): Ditto.
15422 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15423 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15424 to linux_target_ops.
15425 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15426 reply packet.
15427 * server.c (main): Recognize 'Z' and 'z' packets.
15428
15429 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15430
15431 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15432 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15433 (the_low_target): Add new members.
15434
15435 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * proc-service.c (ps_lgetregs): Search all_processes instead of
15438 all_threads.
15439
15440 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * server.c (start_inferior): Change return type to int.
15443 (attach_inferior): Change sigptr to int *.
15444 (handle_v_cont, handle_v_requests): Change signal to int *.
15445 (main): Change signal to int.
15446
15447 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15448
15449 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15450 * configure.srv: Add m32r*-*-linux*.
15451 * linux-m32r-low.c: New file.
15452
15453 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15456
15457 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15458
15459 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15460 Take unsigned long arguments for PIDs.
15461 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15462 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15463 (wait_for_sigstop, linux_resume_one_process)
15464 (regsets_fetch_inferior_registers, linux_send_signal)
15465 (linux_read_auxv): Likewise. Update the types of variables holding
15466 PIDs. Update format string specifiers.
15467 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15468 * remote-utils.c (prepare_resume_reply): Likewise.
15469 * server.c (cont_thread, general_thread, step_thread)
15470 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15471 unsigned long.
15472 (handle_query): Update format specifiers.
15473 (handle_v_cont, main): Use strtoul for thread IDs.
15474 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15475 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15476 (general_thread, step_thread, thread_from_wait)
15477 (old_thread_from_wait): Update.
15478 * target.h (struct thread_resume): Use unsigned long for THREAD.
15479 (struct target_ops): Use unsigned long for arguments to attach and
15480 thread_alive.
15481
15482 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15483
15484 * acinclude.m4: Include bfd/bfd.m4 directly.
15485 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15486 <agriffis@toolchain.org>.
15487 * aclocal.m4, configure: Regenerated.
15488
15489 2005-01-07 Andrew Cagney <cagney@gnu.org>
15490
15491 * configure.ac: Rename configure.in, require autoconf 2.59.
15492 * configure: Re-generate.
15493
15494 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15495
15496 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15497 LIBS when finished.
15498 * aclocal.m4: Regenerated.
15499 * configure: Regenerated.
15500
15501 2004-11-21 Andreas Schwab <schwab@suse.de>
15502
15503 * linux-m68k-low.c (m68k_num_gregs): Define.
15504 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15505 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15506 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15507 (m68k_breakpoint_at): New. Add to the_low_target.
15508
15509 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15510 srv_linux_thread_db to yes.
15511
15512 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15513
15514 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15515 (ARCH_SET_FS): Likewise.
15516 (ARCH_GET_FS): Likewise.
15517 (ARCH_GET_GS): Likewise.
15518
15519 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15520
15521 * linux-i386-low.c (ps_get_thread_area): New.
15522 * linux-x86-64-low.c (ps_get_thread_area): New.
15523 * linux-low.c: Include <sys/syscall.h>.
15524 (linux_kill_one_process): Don't kill the first thread here.
15525 (linux_kill): Kill the first thread here.
15526 (kill_lwp): New function.
15527 (send_sigstop, linux_send_signal): Use it.
15528 * proc-service.c: Clean up #ifdefs.
15529 (fpregset_info): Delete.
15530 (ps_lgetregs): Update and enable implementation.
15531 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15532 implementations.
15533 * remote-utils.c (struct sym_cache, symbol_cache): New.
15534 (input_interrupt): Print a clearer message.
15535 (async_io_enabled): New variable.
15536 (enable_async_io, disable_async_io): Use it. Update comments.
15537 (look_up_one_symbol): Use the symbol cache.
15538 * thread-db.c (thread_db_look_up_symbols): New function.
15539 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15540
15541 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15542
15543 * configure.in: Test for -rdynamic.
15544 * configure: Regenerated.
15545 * Makefile (INTERNAL_LDFLAGS): New.
15546 (gdbserver, gdbreplay): Use it.
15547
15548 2004-09-02 Andrew Cagney <cagney@gnu.org>
15549
15550 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15551
15552 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15553
15554 * linux-low.c (linux_wait): Clear all_processes list also.
15555
15556 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15557
15558 * linux-low.c: Include <errno.h>. Remove extern declaration of
15559 errno.
15560
15561 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15562
15563 * gdbreplay.c, server.h, utils.c: Update copyright years.
15564
15565 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15566
15567 * server.c (main): Print child status or termination signal from
15568 variable 'signal', not 'sig'.
15569
15570 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15571
15572 * linux-low.c (linux_read_memory): Change return type to
15573 int. Check for and return error from ptrace().
15574 * target.c (read_inferior_memory): Change return type to int. Pass
15575 back return status from the_target->read_memory().
15576 * target.h (struct target_ops): Adapt *read_memory() prototype.
15577 Update comment.
15578 (read_inferior_memory): Adapt prototype.
15579 * server.c (main): Return an error packet if
15580 read_inferior_memory() returns an error.
15581
15582 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15583
15584 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15585 Unify with other clean targets.
15586
15587 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15588
15589 * server.c (handle_v_cont): Call set_desired_inferior.
15590
15591 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15592
15593 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15594
15595 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15596
15597 * linux-low.c (linux_wait): Unblock async I/O.
15598 (linux_resume): Block and enable async I/O.
15599 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15600 * server.h (block_async_io, unblock_async_io): Add prototypes.
15601
15602 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15603
15604 * remote-utils.c (remote_open): Print a status notice after
15605 opening a TCP port.
15606 * server.c (attach_inferior): Print a status notice after
15607 attaching.
15608
15609 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15610
15611 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15612
15613 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15614
15615 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15616 error packet.
15617 * server.c, target.h: Update copyright years.
15618
15619 2004-02-25 Roland McGrath <roland@redhat.com>
15620
15621 * target.h (struct target_ops): New member `read_auxv'.
15622 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15623 * linux-low.c (linux_read_auxv): New function.
15624 (linux_target_ops): Initialize `read_auxv' member to that.
15625
15626 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15627
15628 Committed by Jim Blandy <jimb@redhat.com>.
15629
15630 * linux-s390-low.c (s390_num_regs): Update.
15631 (s390_regmap): Remove control registers. Use __s390x__ predefine
15632 instead of GPR_SIZE to distiguish s390 and s390x targets.
15633
15634 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15635
15636 * linux-low.c: Update copyright year.
15637 (check_removed_breakpoint): Clear pending_is_breakpoint.
15638 (linux_set_resume_request, linux_queue_one_thread)
15639 (resume_status_pending_p): New functions.
15640 (linux_continue_one_thread): Use process->resume.
15641 (linux_resume): Only resume threads if there are no pending events.
15642 * linux-low.h (struct process_info): Add resume request
15643 pointer.
15644
15645 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15646
15647 * regcache.c (new_register_cache): Clear the allocated register
15648 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15649
15650 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15651
15652 * linux-low.c (linux_resume): Take a struct thread_resume *
15653 argument.
15654 (linux_wait): Update call.
15655 (resume_ptr): New static variable.
15656 (linux_continue_one_thread): Renamed from
15657 linux_continue_one_process. Use resume_ptr.
15658 (linux_resume): Use linux_continue_one_thread.
15659 * server.c (handle_v_cont, handle_v_requests): New functions.
15660 (myresume): New function.
15661 (main): Handle 'v' case.
15662 * target.h (struct thread_resume): New type.
15663 (struct target_ops): Change argument of "resume" to struct
15664 thread_resume *.
15665 (myresume): Delete macro.
15666
15667 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15668
15669 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15670 (uninstall): Support DESTDIR.
15671
15672 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15673
15674 * configure.srv: Add xscale*linux copy of arm*linux entry.
15675
15676 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15677
15678 * linux-arm-low.c (arm_reinsert_addr): New function.
15679 (the_low_target): Add arm_reinsert_addr.
15680
15681 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15682
15683 * mem-break.c: Remove whitespace at end of file.
15684
15685 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15686
15687 * configure.in: Check whether we need to prototype strerror.
15688 * server.h: Optionally prototype strerror.
15689 * gdbreplay.c (perror_with_name): Use strerror.
15690 * linux-low.c (linux_attach_lwp): Use strerror.
15691 * utils.c (perror_with_name): Use strerror.
15692 * config.in, configure: Regenerated.
15693
15694 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15695
15696 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15697 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15698
15699 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15700
15701 * Makefile.in (SFILES): Update.
15702 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15703 low-sun3.c: Remove files.
15704
15705 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15706
15707 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15708 (linux_detach_one_process, linux_detach): New functions.
15709 (linux_target_ops): Add linux_detach.
15710 * server.c (main): Handle 'D' packet.
15711 * target.h (struct target_ops): Add "detach" member.
15712 (detach_inferior): Define.
15713
15714 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15715
15716 From Kelley Cook <kelleycook@wideopenwest.com>:
15717 * configure.srv: Accept i[34567]86 variants.
15718
15719 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15720
15721 * linux-low.c (linux_wait_for_event): Correct comment typos.
15722 (linux_resume_one_process): Call check_removed_breakpoint.
15723 (linux_send_signal): New function.
15724 (linux_target_ops): Add linux_send_signal.
15725 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15726 of kill.
15727 * target.h (struct target_ops): Add send_signal.
15728
15729 2003-05-29 Jim Blandy <jimb@redhat.com>
15730
15731 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15732 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15733 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15734 away part of the register's value.
15735
15736 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15737
15738 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15739 (linux_wait_for_event, linux_init_signals): Likewise.
15740
15741 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15742
15743 * configure.in: Check for stdlib.h.
15744 * configure: Regenerated.
15745 * config.in: Regenerated.
15746
15747 2003-01-04 Andreas Schwab <schwab@suse.de>
15748
15749 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15750
15751 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15752
15753 * Makefile.in: Remove obsolete code.
15754
15755 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15756
15757 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15758 defined(PT_FPR0_HI).
15759
15760 2002-11-17 Stuart Hughes <seh@zee2.com>
15761
15762 * linux-arm-low.c (arm_num_regs): Increase.
15763 (arm_regmap): Include status register.
15764
15765 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15766
15767 * linux-low.c (register_addr): Remove incorrect -1 check.
15768
15769 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15770
15771 * linux-low.c (linux_create_inferior): Call setpgid. Return
15772 the new PID.
15773 (unstopped_p, linux_signal_pid): Remove.
15774 (linux_target_ops): Remove linux_signal_pid.
15775 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15776 global instead of target method.
15777 * target.h (struct target_ops): Remove signal_pid. Update comment
15778 for create_inferior.
15779 * server.c (signal_pid): New variable.
15780 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15781 gdbserver. Set the child to be the foreground process group.
15782 (attach_inferior): Set signal_pid.
15783
15784 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15785
15786 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15787
15788 2002-08-20 Jim Blandy <jimb@redhat.com>
15789
15790 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15791 default for this.
15792
15793 2002-08-01 Andrew Cagney <cagney@redhat.com>
15794
15795 * Makefile.in: Make chill references obsolete.
15796
15797 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15798
15799 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15800 * configure: Regenerate.
15801 * config.in: Regenerate.
15802
15803 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15804
15805 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15806 (perror_with_name, remote_close, remote_open, expect, play): Static.
15807
15808 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15809
15810 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15811 byte offsets instead of an array of indexes.
15812 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15813
15814 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15815
15816 * regcache.c: Add comment.
15817
15818 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15819
15820 * thread-db.c: New file.
15821 * proc-service.c: New file.
15822 * acinclude.m4: New file.
15823 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15824 proc-service.o, and thread-db.o.
15825 (linux-low.o): Add USE_THREAD_DB.
15826 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15827 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15828 * aclocal.m4: Regenerated.
15829 * config.in: Regenerated.
15830 * configure: Regenerated.
15831 * configure.in: Check for proc_service.h, sys/procfs.h,
15832 thread_db.h, and linux/elf.h headrs.
15833 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15834 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15835 Check for -lthread_db and thread support.
15836 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15837 PowerPC, and SuperH.
15838 * i387-fp.c: Constify arguments.
15839 * i387-fp.h: Likewise.
15840 * inferiors.c: (struct thread_info): Renamed from
15841 `struct inferior_info'. Remove PID member. Use generic inferior
15842 list header. All uses updated.
15843 (inferiors, signal_pid): Removed.
15844 (all_threads): New variable.
15845 (get_thread): Define.
15846 (add_inferior_to_list): New function.
15847 (for_each_inferior): New function.
15848 (change_inferior_id): New function.
15849 (add_inferior): Removed.
15850 (remove_inferior): New function.
15851 (add_thread): New function.
15852 (free_one_thread): New function.
15853 (remove_thread): New function.
15854 (clear_inferiors): Use for_each_inferior and free_one_thread.
15855 (find_inferior): New function.
15856 (find_inferior_id): New function.
15857 (inferior_target_data): Update argument type.
15858 (set_inferior_target_data): Likewise.
15859 (inferior_regcache_data): Likewise.
15860 (set_inferior_regcache_data): Likewise.
15861 * linux-low.c (linux_bp_reinsert): Remove.
15862 (all_processes, stopping_threads, using_thrads)
15863 (struct pending_signals, debug_threads, pid_of): New.
15864 (inferior_pid): Replace with macro.
15865 (struct inferior_linux_data): Remove.
15866 (get_stop_pc, add_process): New functions.
15867 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15868 Use add_process and add_thread.
15869 (linux_attach_lwp): New function, based on old linux_attach. Use
15870 add_process and add_thread. Set stop_expected for new threads.
15871 (linux_attach): New function.
15872 (linux_kill_one_process): New function.
15873 (linux_kill): Kill all LWPs.
15874 (linux_thread_alive): Use find_inferior_id.
15875 (check_removed_breakpoints, status_pending_p): New functions.
15876 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15877 Update. Use WNOHANG. Wait for cloned processes also. Update process
15878 struct for the found process.
15879 (linux_wait_for_event): New function.
15880 (linux_wait): Use it. Support LWPs.
15881 (send_sigstop, wait_for_sigstop, stop_all_processes)
15882 (linux_resume_one_process, linux_continue_one_process): New functions.
15883 (linux_resume): Support LWPs.
15884 (REGISTER_RAW_SIZE): Remove.
15885 (fetch_register): Use register_size instead. Call supply_register.
15886 (usr_store_inferior_registers): Likewise. Call collect_register.
15887 Fix recursive case.
15888 (regsets_fetch_inferior_registers): Improve error message.
15889 (regsets_store_inferior_registers): Add debugging.
15890 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15891 (unstopped_p, linux_signal_pid): New functions.
15892 (linux_target_ops): Add linux_signal_pid.
15893 (linux_init_signals): New function.
15894 (initialize_low): Call it. Initialize using_threads.
15895 * regcache.c (inferior_regcache_data): Add valid
15896 flag.
15897 (get_regcache): Fetch registers lazily. Add fetch argument
15898 and update all callers.
15899 (regcache_invalidate_one, regcache_invalidate): New
15900 functions.
15901 (new_register_cache): Renamed from create_register_cache.
15902 Return the new regcache.
15903 (free_register_cache): Change argument to a void *.
15904 (registers_to_string, registers_from_string): Call get_regcache
15905 with fetch flag set.
15906 (register_data): Make static. Pass fetch flag to get_regcache.
15907 (supply_register): Call get_regcache with fetch flag clear.
15908 (collect_register): Call get_regcache with fetch flag set.
15909 (collect_register_as_string): New function.
15910 * regcache.h: Update.
15911 * remote-utils.c (putpkt): Flush after debug output and use
15912 stderr.
15913 Handle input interrupts while waiting for an ACK.
15914 (input_interrupt): Use signal_pid method.
15915 (getpkt): Flush after debug output and use stderr.
15916 (outreg): Use collect_register_as_string.
15917 (new_thread_notify, dead_thread_notify): New functions.
15918 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15919 and general_thread.
15920 (look_up_one_symbol): Flush after debug output.
15921 * server.c (step_thread, server_waiting): New variables.
15922 (start_inferior): Don't use signal_pid. Update call to mywait.
15923 (attach_inferior): Update call to mywait.
15924 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15925 (main): Don't fetch/store registers explicitly. Use
15926 set_desired_inferior. Support proposed ``Hs'' packet. Update
15927 calls to mywait.
15928 * server.h: Update.
15929 (struct inferior_list, struct_inferior_list_entry): New.
15930 * target.c (set_desired_inferior): New.
15931 (write_inferior_memory): Constify.
15932 (mywait): New function.
15933 * target.h: Update.
15934 (struct target_ops): New signal_pid method.
15935 (mywait): Removed macro, added prototype.
15936
15937 * linux-low.h (regset_func): Removed.
15938 (regset_fill_func, regset_store_func): New.
15939 (enum regset_type): New.
15940 (struct regset_info): Add type field. Use new operation types.
15941 (struct linux_target_ops): stop_pc renamed to get_pc.
15942 Add decr_pc_after_break and breakpoint_at.
15943 (get_process, get_thread_proess, get_process_thread)
15944 (strut process_info, all_processes, linux_attach_lwp)
15945 (thread_db_init): New.
15946
15947 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15948 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15949 (the_low_target): Add new members.
15950 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15951 (i386_store_fpxregset): Constify.
15952 (target_regsets): Add new kind identifier.
15953 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15954 (i386_set_pc): Add debugging.
15955 (i386_breakpoint_at): New function.
15956 (the_low_target): Add new members.
15957 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15958 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15959 (mips_breakpoint_at): New.
15960 (the_low_target): Add new members.
15961 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15962 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15963 (the_low_target): Add new members.
15964 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15965 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15966 (the_low_target): Add new members.
15967 * linux-x86-64-low.c (target_regsets): Add new kind
15968 identifier.
15969
15970 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15971
15972 From Martin Pool <mbp@samba.org>:
15973 * server.c (gdbserver_usage): New function.
15974 (main): Call it.
15975
15976 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15977
15978 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15979 stop_at -> stop_pc.
15980
15981 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15982
15983 * Makefile.in: Remove obsolete code.
15984
15985 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15986
15987 * linux-low.c (regsets_fetch_inferior_registers),
15988 (regsets_store_inferior_registers): Removed cast to int from
15989 ptrace() calls.
15990 * regcache.h: Added declaration of struct inferior_info.
15991
15992 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15993
15994 * inferiors.c (struct inferior_info): Add regcache_data.
15995 (add_inferior): Call create_register_cache.
15996 (clear_inferiors): Call free_register_cache.
15997 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15998 * regcache.c (struct inferior_regcache_data): New.
15999 (registers): Remove.
16000 (get_regcache): New function.
16001 (create_register_cache, free_register_cache): New functions.
16002 (set_register_cache): Don't initialize the register cache here.
16003 (registers_to_string, registers_from_string, register_data): Call
16004 get_regcache.
16005 * regcache.h: Add prototypes.
16006 * server.h: Likewise.
16007
16008 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16009
16010 * mem-break.c: New file.
16011 * mem-break.h: New file.
16012 * Makefile.in: Add mem-break.o rule; update server.h
16013 dependencies.
16014 * inferiors.c (struct inferior_info): Add target_data
16015 member.
16016 (clear_inferiors): Free target_data member if set.
16017 (inferior_target_data, set_inferior_target_data): New functions.
16018 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16019 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16020 * linux-low.c (linux_bp_reinsert): New variable.
16021 (struct inferior_linux_data): New.
16022 (linux_create_inferior): Use set_inferior_target_data.
16023 (linux_attach): Likewise. Call add_inferior.
16024 (linux_wait_for_one_inferior): New function.
16025 (linux_wait): Call it.
16026 (linux_write_memory): Add const.
16027 (initialize_low): Call set_breakpoint_data.
16028 * linux-low.h (struct linux_target_ops): Add breakpoint
16029 handling members.
16030 * server.c (attach_inferior): Remove extra add_inferior
16031 call.
16032 * server.h: Include mem-break.h. Update inferior.c
16033 prototypes.
16034 * target.c (read_inferior_memory)
16035 (write_inferior_memory): New functions.
16036 * target.h (read_inferior_memory)
16037 (write_inferior_memory): Change macros to prototypes.
16038 (struct target_ops): Update comments. Add const to write_memory
16039 definition.
16040
16041 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16042
16043 * linux-low.c (usr_store_inferior_registers): Support
16044 registers which are allowed to fail to store.
16045 * linux-low.h (linux_target_ops): Likewise.
16046 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16047 (ppc_cannot_store_register): FPSCR may not be storable.
16048
16049 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16050
16051 * server.h: Include <string.h> if HAVE_STRING_H.
16052 * ChangeLog: Correct paths in last ChangeLog entry.
16053
16054 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16055
16056 * linux-low.h: Remove obsolete prototypes.
16057 (struct linux_target_ops): New.
16058 (extern the_low_target): New.
16059 * linux-low.c (num_regs, regmap): Remove declarations.
16060 (register_addr): Use the_low_target explicitly.
16061 (fetch_register): Likewise.
16062 (usr_fetch_inferior_registers): Likewise.
16063 (usr_store_inferior_registers): Likewise.
16064 * linux-arm-low.c (num_regs): Remove.
16065 (arm_num_regs): Define.
16066 (arm_regmap): Renamed from regmap, made static.
16067 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16068 made static.
16069 (arm_cannot_store_register): Renamed from cannot_store_register,
16070 made static.
16071 (the_low_target): New.
16072 * linux-i386-low.c (num_regs): Remove.
16073 (i386_num_regs): Define.
16074 (i386_regmap): Renamed from regmap, made static.
16075 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16076 made static.
16077 (i386_cannot_store_register): Renamed from cannot_store_register,
16078 made static.
16079 (the_low_target): New.
16080 * linux-ia64-low.c (num_regs): Remove.
16081 (ia64_num_regs): Define.
16082 (ia64_regmap): Renamed from regmap, made static.
16083 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16084 made static.
16085 (ia64_cannot_store_register): Renamed from cannot_store_register,
16086 made static.
16087 (the_low_target): New.
16088 * linux-m68k-low.c (num_regs): Remove.
16089 (m68k_num_regs): Define.
16090 (m68k_regmap): Renamed from regmap, made static.
16091 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16092 made static.
16093 (m68k_cannot_store_register): Renamed from cannot_store_register,
16094 made static.
16095 (the_low_target): New.
16096 * linux-mips-low.c (num_regs): Remove.
16097 (mips_num_regs): Define.
16098 (mips_regmap): Renamed from regmap, made static.
16099 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16100 made static.
16101 (mips_cannot_store_register): Renamed from cannot_store_register,
16102 made static.
16103 (the_low_target): New.
16104 * linux-ppc-low.c (num_regs): Remove.
16105 (ppc_num_regs): Define.
16106 (ppc_regmap): Renamed from regmap, made static.
16107 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16108 made static.
16109 (ppc_cannot_store_register): Renamed from cannot_store_register,
16110 made static.
16111 (the_low_target): New.
16112 * linux-s390-low.c (num_regs): Remove.
16113 (s390_num_regs): Define.
16114 (s390_regmap): Renamed from regmap, made static.
16115 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16116 made static.
16117 (s390_cannot_store_register): Renamed from cannot_store_register,
16118 made static.
16119 (the_low_target): New.
16120 * linux-sh-low.c (num_regs): Remove.
16121 (sh_num_regs): Define.
16122 (sh_regmap): Renamed from regmap, made static.
16123 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16124 made static.
16125 (sh_cannot_store_register): Renamed from cannot_store_register,
16126 made static.
16127 (the_low_target): New.
16128 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16129 (the_low_target): New.
16130
16131 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16132
16133 * Makefile.in: Add stamp-h target.
16134 * configure.in: Create stamp-h.
16135 * configure: Regenerated.
16136
16137 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16138
16139 * inferiors.c: New file.
16140 * target.c: New file.
16141 * target.h: New file.
16142 * Makefile.in: Add target.o and inferiors.o. Update
16143 dependencies.
16144 * linux-low.c (inferior_pid): New static variable,
16145 moved from server.c.
16146 (linux_create_inferior): Renamed from create_inferior.
16147 Call add_inferior. Return 0 on success instead of a PID.
16148 (linux_attach): Renamed from myattach.
16149 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16150 (linux_thread_alive): Renamed from mythread_alive.
16151 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16152 child dies.
16153 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16154 (regsets_store_inferior_registers): Correct error message.
16155 Add missing ``return 0''.
16156 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16157 (linux_store_registers): Renamed from store_inferior_registers.
16158 (linux_read_memory): Renamed from read_inferior_memory.
16159 (linux_write_memory): Renamed from write_inferior_memory.
16160 (linux_target_ops): New structure.
16161 (initialize_low): Call set_target_ops ().
16162 * remote-utils.c (unhexify): New function.
16163 (hexify): New function.
16164 (input_interrupt): Send signals to ``signal_pid''.
16165 * server.c (inferior_pid): Remove.
16166 (start_inferior): Update create_inferior call.
16167 (attach_inferior): Call add_inferior.
16168 (handle_query): New function.
16169 (main): Call handle_query for `q' packets.
16170 * server.h: Include "target.h". Remove obsolete prototypes.
16171 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16172
16173 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16174
16175 * Makefile.in: Add WARN_CFLAGS. Update configury
16176 dependencies.
16177 * configure.in: Check for <string.h>
16178 * configure: Regenerate.
16179 * config.in: Regenerate.
16180 * gdbreplay.c: Include needed system headers.
16181 (remote_open): Remove strchr prototype.
16182 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16183 * regcache.c (supply_register): Change buf argument to const void *.
16184 (supply_register_by_name): Likewise.
16185 (collect_register): Change buf argument to void *.
16186 (collect_register_by_name): Likewise.
16187 * regcache.h: Add missing prototypes.
16188 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16189 * server.c (handle_query): New function.
16190 (attached): New static variable, moved out of main.
16191 (main): Quiet longjmp clobber warnings.
16192 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16193 * utils.c (error): Remove NORETURN.
16194 (fatal): Likewise.
This page took 0.591415 seconds and 4 git commands to generate.