Remove usage of find_inferior in last_thread_of_process_p
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (struct counter): Remove.
4 (second_thread_of_pid_p): Remove.
5 (last_thread_of_process_p): Use find_thread.
6
72017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * inferiors.c (find_inferior_in_random): Remove.
10 * inferiors.h (find_inferior_in_random): Remove.
11 * linux-low.c (status_pending_p_callback): Return bool, accept
12 parameter ptid directly.
13 (linux_wait_for_event_filtered): Use find_thread_in_random.
14 (linux_wait_1): Likewise.
15
162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * inferiors.c (find_inferior_id): Remove.
19 (find_thread_ptid): Move implemention from find_inferior_id to
20 here.
21 * inferiors.h (find_inferior_id): Remove.
22 * server.c (handle_status): Use find_thread_ptid.
23 (process_serial_event): Likewise.
24 * thread-db.c (find_one_thread): Likewise.
25 (thread_db_thread_handle): Likewise.
26 * win32-low.c (thread_rec): Likewise.
27 (child_delete_thread): Likewise.
28 (win32_thread_alive): Likewise.
29 (get_child_debug_event): Likewise.
30
312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * linux-mips-low.c (update_watch_registers_callback): Return
34 void, remove pid_p parameter, don't check for pid.
35 (mips_insert_point, mips_remove_point): Use for_each_thread.
36
372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * lynx.low (lynx_delete_thread_callback): Remove.
40 (lynx_mourn): Use for_each_thread.
41
422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * regcache.c (regcache_invalidate_one): Remove.
45 (regcache_invalidate_pid): use for_each_thread.
46
472017-11-26 Tom Tromey <tom@tromey.com>
48
49 * linux-low.c (linux_create_inferior): Update.
50
512017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
52
53 * spu-low.c (spu_create_inferior): Fix typo in argument name.
54
552017-11-24 Alan Hayward <alan.hayward@arm.com>
56
57 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
58 * linux-aarch64-low.c (initialize_low_arch): Call init func.
59 * linux-aarch64-tdesc-selftest.c: New file.
60 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
61
622017-11-24 Alan Hayward <alan.hayward@arm.com>
63
64 * configure.srv: Add new file.
65 * linux-aarch64-low.c (initialize_low_arch): Call init func.
66 * linux-aarch64-tdesc-selftest.c: New file.
67 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
68
692017-11-24 Alan Hayward <alan.hayward@arm.com>
70
71 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
72 * linux-aarch64-low.c (initialize_low_arch): Remove init.
73 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
74
752017-11-24 Alan Hayward <alan.hayward@arm.com>
76
77 * configure.srv: Add new files.
78 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
79 aarch64_linux_read_description.
80 * linux-aarch64-low.c (aarch64_linux_read_description):
81 Merge with aarch64_arch_setup.
82 (aarch64_arch_setup): Call aarch64_linux_read_description.
83 * linux-aarch64-tdesc.c: New file.
84 * linux-aarch64-tdesc.h: New file.
85
862017-11-24 Yao Qi <yao.qi@linaro.org>
87
88 * configure.srv: Set $srv_regobj for tic6x-linux.
89 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
90 (tic6x_read_description): Move some code to tic6x_arch_setup.
91 (tic6x_tdesc_test): New function.
92 (initialize_low_arch): Call selftests::register_test.
93
942017-11-22 Yao Qi <yao.qi@linaro.org>
95
96 * remote-utils.c (prepare_resume_reply): Use memcpy.
97
982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
99
100 * linux-low.c (kill_one_lwp_callback): Return void, take
101 argument directly, don't filter on pid.
102 (linux_kill): Use for_each_thread.
103
1042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
105
106 * linux-low.c (need_step_over_p): Return bool, remove dummy
107 argument.
108 (linux_resume, proceed_all_lwps): Use find_thread.
109
1102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
111
112 * linux-low.c (resume_status_pending_p): Return bool, remove
113 flag_p argument.
114 (linux_resume): Use find_thread.
115
1162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
117
118 * linux-low.c (struct thread_resume_array): Remove.
119 (linux_set_resume_request): Return void, take arguments
120 directly.
121 (linux_resume): Use for_each_thread.
122
1232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
124
125 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
126 return bool, remove data argument.
127 (linux_stabilize_threads): Use find_thread.
128
1292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
130
131 * linux-low.c (unsuspend_one_lwp): Remove.
132 (unsuspend_all_lwps): Use for_each_thread, inline code from
133 unsuspend_one_lwp.
134
1352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
136
137 * gdbthread.h (find_thread): Add overload with ptid_t filter.
138 * linux-low.c (struct iterate_over_lwps_args): Remove.
139 (iterate_over_lwps_filter): Remove.
140 (iterate_over_lwps): Use find_thread.
141
1422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
143
144 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
145 (linux_handle_new_gdb_connection): Use for_each_thread, inline
146 code from reset_lwp_ptrace_options_callback.
147
1482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
149
150 * linux-arm-low.c (struct update_registers_data): Remove.
151 (update_registers_callback): Return void, take arguments
152 directly, don't check thread's pid.
153 (arm_insert_point, arm_remove_point): Use for_each_thread.
154
1552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
156
157 * win32-low.c (continue_one_thread): Return void, take argument
158 directly.
159 (child_continue): Use for_each_thread.
160
1612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
162
163 * win32-i386-low.c (update_debug_registers_callback): Rename
164 to ...
165 (update_debug_registers): ... this, return void, remove pid_p arg.
166 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
167
1682017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
169
170 * inferiors.h (struct process_info): Add constructor, initialize
171 fields..
172 <syscalls_to_catch>: Change type to std::vector<int>.
173 * inferiors.c (add_process): Allocate process_info with new.
174 (remove_process): Free process_info with delete.
175 * linux-low.c (handle_extended_wait): Adjust.
176 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
177 * server.c (handle_general_set): Adjust.
178
1792017-11-16 Pedro Alves <palves@redhat.com>
180
181 * remote-utils.c (remote_close): Block SIGIO signals instead of
182 uninstalling the SIGIO handler.
183
1842017-11-16 Alan Hayward <alan.hayward@arm.com>
185
186 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
187
1882017-11-16 Yao Qi <yao.qi@linaro.org>
189
190 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
191 (tic6x_store_gregset): Likewise.
192 (tic6x_usrregs_info): Move it up.
193
1942017-11-15 Alan Hayward <alan.hayward@arm.com>
195
196 * Makefile.in: Update arch rules.
197 * configure.srv: Explicitly mark arch/ files.
198
1992017-11-13 Andreas Schwab <schwab@suse.de>
200
201 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
202 function.
203 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
204
2052017-11-06 Pedro Alves <palves@redhat.com>
206
207 * config.in, configure: Regenerate.
208
2092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
210
211 * target.c (struct thread_search): Remove.
212 (thread_search_callback): Remove.
213 (prepare_to_access_memory): Use for_each_thread instead of
214 find_inferior. Inline code from thread_search_callback.
215
2162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
217
218 * server.c (struct visit_actioned_threads_data): Remove.
219 (visit_actioned_threads): Change prototype to take arguments
220 directly.
221 (resume): Use find_thread instead of find_inferior.
222
2232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
224
225 * server.c (queue_stop_reply_callback): Change prototype, return
226 void.
227 (find_status_pending_thread_callback): Remove.
228 (handle_status): Replace find_inferior with find_thread and
229 for_each_thread.
230
2312017-10-25 Alan Hayward <alan.hayward@arm.com>
232
233 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
234 with REGNO.
235 (aarch64_store_gregset): Likewise.
236 (aarch64_fill_fpregset): Likewise.
237 (aarch64_store_fpregset): Likewise.
238
2392017-10-21 Simon Marchi <simon.marchi@ericsson.com>
240
241 * gdbthread.h (find_thread, for_each_thread): New functions.
242 * inferiors.c (thread_of_pid): Remove.
243 (find_any_thread_of_pid): Use find_thread.
244 * linux-low.c (num_lwps): Use for_each_thread.
245
2462017-10-17 Yao Qi <yao.qi@linaro.org>
247
248 * Makefile.in: Remove one rule.
249 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
250
2512017-10-17 Yao Qi <yao.qi@linaro.org>
252
253 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
254 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
255
2562017-10-17 Yao Qi <yao.qi@linaro.org>
257
258 * configure.srv: Rename arm.o with arch/arm.o.
259
2602017-10-17 Yao Qi <yao.qi@linaro.org>
261
262 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
263 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
264 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
265 (arch-i386.o, arch-amd64.o): Remove rules.
266 (arch/%.o): New rule.
267 Update POSTCOMPILE and COMPILE.pre.
268 * configure.ac: Invoke AC_CONFIG_COMMANDS.
269 * configure: Re-generated.
270 * configure.srv: Replace arch-i386.o with arch/i386.o.
271 Replace arch-amd64.o with arch/amd64.o.
272
2732017-10-16 Yao Qi <yao.qi@linaro.org>
274
275 * configure: Regenerated.
276
2772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * inferiors.h: (struct inferior_list): Remove.
280 (struct inferior_list_entry); Remove.
281 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
282 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
283 get_first_inferior): Remove.
284 (for_each_inferior, for_each_inferior_with_data, find_inferior,
285 find_inferior_id, find_inferior_in_random): Change signature.
286 * inferiors.c (all_threads): Change type to
287 std::list<thread_info *>.
288 (get_thread): Remove macro.
289 (find_inferior, find_inferior_id): Change signature, implement
290 using find_thread.
291 (find_inferior_in_random): Change signature, implement using
292 find_thread_in_random.
293 (for_each_inferior, for_each_inferior_with_data): Change
294 signature, implement using for_each_thread.
295 (add_inferior_to_list, remove_inferior): Remove.
296 (add_thread, get_first_thread, thread_of_pid,
297 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
298 (get_first_inferior, one_inferior_p, clear_inferior_list):
299 Remove.
300 (clear_inferiors, get_thread_process): Update.
301 * gdbthread.h: Include <list>.
302 (struct thread_info) <entry>: Remove field.
303 <id>: New field.
304 (all_threads): Change type to std::list<thread_info *>.
305 (get_first_inferior): Add doc.
306 (find_thread, for_each_thread, find_thread_in_random): New
307 functions.
308 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
309 * linux-arm-low.c (update_registers_callback): Update.
310 * linux-low.c (second_thread_of_pid_p): Update.
311 (kill_one_lwp_callback, linux_detach_lwp_callback,
312 delete_lwp_callback, status_pending_p_callback, same_lwp,
313 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
314 iterate_over_lwps, not_stopped_callback,
315 resume_stopped_resumed_lwps, count_events_callback,
316 select_singlestep_lwp_callback, select_event_lwp_callback,
317 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
318 suspend_and_send_sigstop_callback, wait_for_sigstop,
319 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
320 lwp_running, linux_set_resume_request, resume_status_pending_p,
321 need_step_over_p, start_step_over, linux_resume_one_thread,
322 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
323 reset_lwp_ptrace_options_callback): Update.
324 * linux-mips-low.c (update_watch_registers_callback): Update.
325 * regcache.c (regcache_invalidate_one, regcache_invalidate):
326 Update.
327 (free_register_cache_thread_one): Remove.
328 (regcache_release): Update.
329 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
330 handle_qxfer_threads_worker): Update.
331 (handle_query): Update, use list iterator.
332 (visit_actioned_threads, handle_pending_status,
333 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
334 clear_pending_status_callback, set_pending_status_callback,
335 find_status_pending_thread_callback, handle_status,
336 process_serial_event): Update.
337 * target.c (thread_search_callback): Update.
338 * thread-db.c (thread_db_get_tls_address): Update.
339 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
340 Update.
341 * win32-i386-low.c (update_debug_registers_callback): Update.
342 * win32-low.c (delete_thread_info, child_delete_thread,
343 continue_one_thread, suspend_one_thread,
344 get_child_debug_event): Adjust.
345
3462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
349 * inferiors.h: Include <list>.
350 (struct process_info) <entry>: Remove field.
351 <pid>: New field.
352 (pid_of): Change macro to function.
353 (ptid_of, lwpid_of): Remove macro.
354 (all_processes): Change type to std::list<process_info *>.
355 (ALL_PROCESSES): Remove macro.
356 (for_each_process, find_process): New function.
357 * inferiors.c (all_processes): Change type to
358 std::list<process_info *>.
359 (find_thread_process): Adjust.
360 (add_process): Likewise.
361 (remove_process): Likewise.
362 (find_process_pid): Likewise.
363 (get_first_process): Likewise.
364 (started_inferior_callback): Remove.
365 (have_started_inferiors_p): Adjust.
366 (attached_inferior_callback): Remove.
367 (have_attached_inferiors_p): Adjust.
368 * linux-low.c (check_zombie_leaders): Likewise.
369 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
370 (x86_linux_update_xmltarget): Adjust.
371 * server.c (handle_query): Likewise.
372 (gdb_reattached_process): Remove.
373 (handle_status): Adjust.
374 (kill_inferior_callback): Likewise.
375 (detach_or_kill_inferior): Remove.
376 (print_started_pid): Likewise.
377 (print_attached_pid): Likewise.
378 (detach_or_kill_for_exit): Update.
379 (process_serial_event): Likewise.
380 * linux-arm-low.c (arm_new_fork): Likewise.
381
3822017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
383
384 * dll.h: Include <list>.
385 (struct dll_info): Add constructor.
386 <entry>: Remove field.
387 (all_dlls): Change type to std::list<dll_info>.
388 * dll.c: Include <algorithm>.
389 (get_dll): Remove macro.
390 (all_dlls): Change type to std::list<dll_info *>.
391 (free_one_dll): Remove.
392 (match_dll): Likewise.
393 (loaded_dll): Adjust.
394 (unloaded_dll): Adjust to all_dlls type change, use
395 std::find_if. Inline code from match_dll.
396 (clear_dlls): Adjust to all_dlls type change.
397 * server.c (emit_dll_description): Remove.
398 (handle_qxfer_libraries): Adjust to all_dlls type change,
399 integrate emit_dll_description's functionality.
400
4012017-10-12 Simon Marchi <simon.marchi@ericsson.com>
402
403 * linux-low.h (struct linux_target_ops) <delete_process>: New
404 field.
405 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
406 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
407 (struct linux_target_ops): Add delete_process callback.
408 * linux-arm-low.c (arm_delete_process): New.
409 (struct linux_target_ops): Add delete_process callback.
410 * linux-bfin-low.c (struct linux_target_ops): Likewise.
411 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
412 * linux-m32r-low.c (struct linux_target_ops): Likewise.
413 * linux-mips-low.c (mips_linux_delete_process): New.
414 (struct linux_target_ops): Add delete_process callback.
415 * linux-ppc-low.c (struct linux_target_ops): Likewise.
416 * linux-s390-low.c (struct linux_target_ops): Likewise.
417 * linux-sh-low.c (struct linux_target_ops): Likewise.
418 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
419 * linux-tile-low.c (struct linux_target_ops): Likewise.
420 * linux-x86-low.c (x86_linux_delete_process): New.
421 (struct linux_target_ops): Add delete_process callback.
422 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
423
4242017-10-12 Simon Marchi <simon.marchi@ericsson.com>
425
426 * linux-aarch64-low.c (the_low_target): Add thread delete
427 callback.
428 * linux-arm-low.c (arm_delete_thread): New function.
429 (the_low_target): Add thread delete callback.
430 * linux-bfin-low.c (the_low_target): Likewise.
431 * linux-crisv32-low.c (the_low_target): Likewise.
432 * linux-low.c (delete_lwp): Invoke delete_thread callback if
433 set.
434 * linux-low.h (struct linux_target_ops) <delete_thread>: New
435 field.
436 * linux-m32r-low.c (the_low_target): Add thread delete callback.
437 * linux-mips-low.c (mips_linux_delete_thread): New function.
438 (the_low_target): Add thread delete callback.
439 * linux-ppc-low.c (the_low_target): Likewise.
440 * linux-s390-low.c (the_low_target): Likewise.
441 * linux-sh-low.c (the_low_target): Likewise.
442 * linux-tic6x-low.c (the_low_target): Likewise.
443 * linux-tile-low.c (the_low_target): Likewise.
444 * linux-x86-low.c (the_low_target): Likewise.
445 * linux-xtensa-low.c (the_low_target): Likewise.
446
4472017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
448
449 * win32-low.c: Include "common-inferior.h".
450
4512017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
452
453 * inferiors.c (set_inferior_cwd): New function.
454 * server.c (handle_general_set): Handle QSetWorkingDir packet.
455 (handle_query): Inform that QSetWorkingDir is supported.
456 * win32-low.c (create_process): Pass the inferior's cwd to
457 CreateProcess.
458
4592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
460
461 * inferiors.c (current_inferior_cwd): New global variable.
462 (get_inferior_cwd): New function.
463 * inferiors.h (struct process_info) <cwd>: New field.
464
4652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
468 (OBS): Add gdb_tilde_expand.o.
469
4702017-10-02 Simon Marchi <simon.marchi@ericsson.com>
471
472 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
473 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
474
4752017-09-29 Pedro Alves <palves@redhat.com>
476
477 * ax.c (gdb_parse_agent_expr): Constify.
478 * ax.h (gdb_parse_agent_expr): Constify.
479 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
480 Constify.
481 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
482 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
483 * remote-utils.h (read_ptid): Constify.
484 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
485 (process_point_options, process_serial_event): Constify.
486 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
487 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
488 (cmd_qtbuffer): Constify.
489
4902017-09-29 Pedro Alves <palves@redhat.com>
491
492 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
493 fails.
494
4952017-09-29 Pedro Alves <palves@redhat.com>
496
497 * linux-low.c (handle_extended_wait): Pass parent thread instead
498 of process to thread_db_notice_clone.
499 * linux-low.h (thread_db_notice_clone): Replace parent process
500 parameter with parent thread parameter.
501 * thread-db.c (find_one_thread): Add comment.
502 (thread_db_notice_clone): Replace parent process parameter with
503 parent thread parameter. Temporarily switch to the parent thread.
504
5052017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
506
507 * gdbthread.h: Include "common-gdbthread.h".
508 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
509 "if" when validating the ptid.
510 * remote-utils.c: Include "gdbthread.h".
511 (prepare_resume_reply): Use "switch_to_thread".
512 * target.c (done_accessing_memory): Likewise.
513
5142017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
515
516 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
517 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
518 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
519 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
520 s390x-gs-linux64-ipa.o to ipa_obj.
521 * linux-s390-low.c (HWCAP_S390_GS): New define.
522 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
523 New functions.
524 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
525 (s390_arch_setup): Check for guarded-storage support and choose
526 appropriate tdesc.
527 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
528 init_registers_s390x_gs_linux64.
529 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
530 enum value.
531 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
532 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
533
5342017-09-22 Simon Marchi <simon.marchi@ericsson.com>
535
536 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
537
5382017-09-21 Kevin Buettner <kevinb@redhat.com>
539
540 * linux-low.h (struct lwp_info): Add new field, thread_handle.
541 (thread_db_thread_handle): Declare.
542 * linux-low.c (linux_target_ops): Initialize thread_handle.
543 * server.c (handle_qxfer_threads_worker): Add support for
544 "handle" attribute.
545 * target.h (struct target_ops): Add new function pointer,
546 thread_handle.
547 (target_thread_handle): Define.
548 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
549 field in lwp.
550 (thread_db_thread_handle): New function.
551
5522017-09-21 Kevin Buettner <kevinb@redhat.com>
553
554 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
555 * linux-low.h (thread_db_notice_clone): Declare.
556 * thread-db.c (thread_db_notice_clone): New function.
557
5582017-09-21 Pedro Alves <palves@redhat.com>
559
560 * server.c (gdb_read_memory, handle_status, process_serial_event)
561 (handle_serial_event, handle_target_event): Adjust to
562 set_desired_thread prototype change.
563 * target.c (set_desired_thread): Remove 'use_general' parameter
564 and adjust.
565 * target.h (set_desired_thread): Remove 'use_general' parameter.
566
5672017-09-20 Tom Tromey <tom@tromey.com>
568
569 * target.c (target_terminal::terminal_state): Define.
570 (target_terminal::init): Rename from target_terminal_init.
571 (target_terminal::inferior): Rename from
572 target_terminal_inferior.
573 (target_terminal::ours): Rename from target_terminal_ours.
574 (target_terminal::ours_for_output, target_terminal::info): New.
575
5762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
577
578 * server.c (accumulate_file_name_length): Remove.
579 (emit_dll_description): Adjust to std::string change.
580 (handle_qxfer_libraries): Use std::string to hold document.
581
5822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
583
584 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
585 return type of xml_escape_text.
586 * server.c (emit_dll_description): Likewise.
587
5882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
589
590 * server.c (captured_main): Accept argument for --selftest.
591 Update run_tests call.
592 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
593 when registering selftests.
594
5952017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
596
597 * regcache.c (get_thread_regcache): Update code to use "std::vector"
598 instead of "VEC" for "target_desc.reg_defs".
599 (regcache_cpy): Likewise.
600 (registers_to_string): Likewise.
601 (registers_from_string): Likewise.
602 (find_regno): Likewise.
603 (supply_regblock): Likewise.
604 (regcache_raw_read_unsigned): Likewise.
605 * tdesc.c (init_target_desc): Likewise.
606 (tdesc_create_reg): Likewise.
607 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
608 (struct target_desc) <reg_defs>: Convert to "std::vector".
609 (target_desc): Do not initialize "reg_defs".
610 (~target_desc): Update code to use "std::vector" instead of "VEC"
611 for "target_desc.reg_defs".
612 (operator==): Likewise.
613
6142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
615
616 * inferiors.h (thread_to_gdb_id): Remove.
617 * inferiors.c (thread_to_gdb_id): Remove.
618 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
619 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
620 lynx_store_registers, lynx_read_memory, lynx_write_memory):
621 Likewise.
622 * nto-low.c (nto_fetch_registers, nto_store_registers,
623 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
624
6252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
626
627 * inferiors.h (gdb_id_to_thread_id): Remove.
628 * inferiors.c (gdb_id_to_thread_id): Remove.
629 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
630 removal. Move pid declaration closer to where it's used.
631
6322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
633
634 * server.c (handle_detach): New function.
635 (process_serial_event): Move code out, call handle_detach.
636
6372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
638
639 * server.c (require_running): Rename to ...
640 (require_running_or_return): ... this ...
641 (require_running_or_break): ... and this.
642 (handle_query, process_serial_event): Adjust.
643
6442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
645
646 * linux-low.c (linux_set_resume_request): Remove unused
647 variables.
648
6492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
650
651 * server.c (first_thread_of): Remove.
652 (process_serial_event): Replace usage of first_thread_of with
653 find_any_thread_of_pid.
654 * tracepoint.c (same_process_p): Remove.
655 (gdb_agent_about_to_close): Replace usage of same_process_p with
656 find_any_thread_of_pid.
657 * linux-x86-low.c (same_process_callback): Remove.
658 (x86_arch_setup_process_callback): Replace usage of
659 same_process_callback with find_any_thread_of_pid.
660 * thread-db.c (any_thread_of): Remove.
661 (switch_to_process): Replace usage of any_thread_of with
662 find_any_thread_of_pid.
663 * inferiors.c (thread_pid_matches_callback): Remove.
664 (find_thread_process): Adjust to use find_any_thread_of_pid.
665
6662017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
667
668 * regcache.c (get_thread_regcache): Guard calls to "memset"
669 with "!VEC_empty".
670
6712017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
672
673 * linux-low.c (handle_extended_wait): Use
674 "allocate_target_description" instead of "XNEW".
675 * linux-x86-low.c (initialize_low_arch): Likewise.
676
6772017-09-05 Yao Qi <yao.qi@linaro.org>
678
679 * configure.srv (srv_i386_regobj): Remove.
680 (srv_amd64_regobj): Remove.
681 (srv_regobj): Set it to "" for x86 non-linux targets.
682 * linux-x86-tdesc.c (i386_linux_read_description):
683 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
684 (init_registers_i386): Remove the declaration.
685 (tdesc_i386): Remove the declaration.
686 (lynx_i386_arch_setup): Call i386_create_target_description.
687 * nto-x86-low.c: Likewise.
688 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
689 [!__x86_64__]: include arch/i386.h.
690 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
691
6922017-09-05 Yao Qi <yao.qi@linaro.org>
693
694 * configure.srv (srv_amd64_linux_xmlfiles): Remove
695 i386/amd64-XXX-linux from it.
696
6972017-09-05 Yao Qi <yao.qi@linaro.org>
698
699 * configure.srv: Empty srv_amd64_linux_regobj if $development is
700 false.
701 (ipa_amd64_linux_regobj): Remove.
702 (ipa_x32_linux_regobj): Remove.
703
7042017-09-05 Yao Qi <yao.qi@linaro.org>
705
706 * Makefile.in (arch-amd64.o): New rule.
707 * configure.srv: Append arch-amd64.o.
708 * linux-amd64-ipa.c: Include common/x86-xstate.h.
709 (get_ipa_tdesc): Call amd64_linux_read_description.
710 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
711 and init_registers_amd64_XXX.
712 * linux-x86-low.c (x86_linux_read_description): Call
713 amd64_linux_read_description.
714 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
715 (initialize_low_arch): Don't call init_registers_x32_XXX and
716 init_registers_amd64_XXX.
717 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
718 and tdesc_amd64_XXX.
719 [__x86_64__] (amd64_tdesc_test): New function.
720 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
721 and init_registers_amd64_XXX.
722 * linux-x86-tdesc.c: Include arch/amd64.h.
723 (xcr0_to_tdesc_idx): New function.
724 (i386_linux_read_description): New function.
725 (amd64_get_ipa_tdesc_idx): New function.
726 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
727 (amd64_get_ipa_tdesc): Declare.
728
7292017-09-05 Yao Qi <yao.qi@linaro.org>
730
731 * configure.srv (srv_i386_linux_xmlfiles): Remove
732 i386/i386-XXX-linux.xml from it.
733
7342017-09-05 Yao Qi <yao.qi@linaro.org>
735
736 * configure.srv: Set srv_i386_linux_regobj empty if $development
737 is false.
738 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
739 initialize_low_tdesc.
740 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
741 with #if initialize_low_tdesc.
742 * linux-x86-tdesc-selftest.c: New file.
743 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
744
7452017-09-05 Yao Qi <yao.qi@linaro.org>
746
747 * Makefile.in (arch-i386.o): New rule.
748 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
749 (x86_64-*-linux*): Likewise.
750 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
751 include arch/i386.h.
752 (i386_linux_read_description): Remove code and call
753 i386_create_target_description.
754 * tdesc.c (allocate_target_description): New function.
755 * tdesc.h (set_tdesc_architecture): Remove declaration.
756 (set_tdesc_osabi): Likewise.
757
7582017-09-05 Yao Qi <yao.qi@linaro.org>
759
760 * linux-x86-tdesc.c: Don't include <inttypes.h>.
761 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
762 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
763 .xmltarget.
764 * server.c (get_features_xml): Call tdesc_get_features_xml.
765 * tdesc.c (set_tdesc_architecture): New function.
766 (set_tdesc_osabi): New function.
767 (tdesc_get_features_xml): New function.
768 (tdesc_create_feature): Add an argument.
769 * tdesc.h (struct target_desc) <features>: New field.
770 <arch, osabi>: New field.
771 (~target_desc): xfree features, arch, and osabi.
772 (target_desc::oerator==): Don't compare .xmltarget.
773 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
774 (set_tdesc_osabi): Likewise.
775 (tdesc_get_features_xml): Likewise.
776
7772017-09-05 Yao Qi <yao.qi@linaro.org>
778
779 * linux-x86-tdesc.c: Include selftest.h.
780 (i386_tdesc_test): New function.
781 (initialize_low_tdesc): Call selftests::register_test.
782 * tdesc.h: Include regdef.h.
783 (target_desc): Override operator == and !=.
784
7852017-09-05 Yao Qi <yao.qi@linaro.org>
786
787 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
788 (ipa_obj): Likewise.
789 * linux-i386-ipa.c: Include common/x86-xstate.h
790 (get_ipa_tdesc): Call i386_linux_read_description.
791 (initialize_low_tracepoint): Don't call init_registers_XXX
792 functions, call initialize_low_tdesc instead.
793 * linux-x86-low.c (x86_linux_read_description): Call
794 i386_linux_read_description.
795 (initialize_low_arch): Don't call init_registers_i386_XXX
796 functions, call initialize_low_tdesc.
797 * linux-x86-tdesc.c: New file.
798 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
799 (i386_get_ipa_tdesc_idx): Declare.
800 (i386_get_ipa_tdesc): Declare.
801 (initialize_low_tdesc): Declare.
802
8032017-09-05 Yao Qi <yao.qi@linaro.org>
804
805 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
806 instead of 0.
807
8082017-09-05 Yao Qi <yao.qi@linaro.org>
809
810 * Makefile.in (IPA_OBJS): Add vec-ipa.o
811 * regcache.c (get_thread_regcache): Use VEC_length.
812 (init_register_cache): Likewise.
813 (regcache_cpy): Likewise.
814 (registers_to_string): Iterate reg_defs via VEC_iterate.
815 (find_regno): Likewise.
816 (find_register_by_number): Use VEC_index.
817 (register_size): Call find_register_by_number.
818 (register_data): Call find_register_by_number.
819 (supply_regblock): Use VEC_length.
820 (regcache_raw_read_unsigned): Likewise.
821 * tdesc.c (init_target_desc): Iterate reg_defs via
822 VEC_iterate.
823 (default_description): Update initializer.
824 (copy_target_description): Don't update field num_registers.
825 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
826 <num_registers>: Remove.
827
8282017-09-04 Simon Marchi <simon.marchi@ericsson.com>
829
830 * Makefile.in (.SECONDARY): Define target.
831
8322017-09-03 Simon Marchi <simon.marchi@ericsson.com>
833
834 * linux-low.c (linux_wait_1): Adjust.
835 * server.c (queue_stop_reply_callback): Adjust.
836
8372017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
838
839 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
840 QEnvironmentUnset and QEnvironmentReset packets.
841 (handle_query): Inform remote that QEnvironmentHexEncoded,
842 QEnvironmentUnset and QEnvironmentReset are supported.
843
8442017-08-25 Simon Marchi <simon.marchi@ericsson.com>
845
846 * inferiors.h (inferior_target_data): Rename to ...
847 (thread_target_data): ... this.
848 (inferior_regcache_data): Rename to ...
849 (thread_regcache_data): ... this.
850 (set_inferior_regcache_data): Rename to ...
851 (set_thread_regcache_data): ... this.
852 * inferiors.c (inferior_target_data): Rename to ...
853 (thread_target_data): ... this.
854 (inferior_regcache_data): Rename to ...
855 (thread_regcache_data): ... this.
856 (set_inferior_regcache_data): Rename to ...
857 (set_thread_regcache_data): ... this.
858 (free_one_thread): Update.
859 * linux-low.h (get_thread_lwp): Update.
860 * regcache.c (get_thread_regcache): Update.
861 (regcache_invalidate_thread): Update.
862 (free_register_cache_thread): Update.
863 * win32-i386-low.c (update_debug_registers_callback): Update.
864 (win32_get_current_dr): Update.
865 * win32-low.c (thread_rec): Update.
866 (delete_thread_info): Update.
867 (continue_one_thread): Update.
868 (suspend_one_thread): Update.
869
8702017-08-24 Simon Marchi <simon.marchi@ericsson.com>
871
872 * inferiors.c (set_inferior_target_data): Remove.
873 * inferiors.h (set_inferior_target_data): Remove.
874
8752017-08-18 Yao Qi <yao.qi@linaro.org>
876
877 * Makefile.in (OBS): Add selftest.o.
878 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
879 * configure, config.in: Re-generated.
880 * server.c: Include common/sefltest.h.
881 (captured_main): Handle option --selftest.
882
8832017-08-09 Yao Qi <yao.qi@linaro.org>
884
885 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
886 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
887 i386-avx-mpx.o and i386-mmx.o.
888 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
889 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
890 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
891 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
892 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
893 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
894 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
895 i386/amd64-avx-mpx.xml.
896
8972017-08-09 Yao Qi <yao.qi@linaro.org>
898
899 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
900 and x32-avx-avx512.o.
901 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
902 i386/x32-avx-avx512.xml.
903
9042017-07-26 Simon Marchi <simon.marchi@ericsson.com>
905
906 * tracepoint.h (enum class fast_tpoint_collect_result): New
907 enumeration.
908 (fast_tracepoint_collecting): Change return type to
909 fast_tpoint_collect_result.
910 * tracepoint.c (fast_tracepoint_collecting): Likewise.
911 * linux-low.h: Include tracepoint.h.
912 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
913 fast_tpoint_collect_result.
914 * linux-low.c (handle_tracepoints): Adjust.
915 (linux_fast_tracepoint_collecting): Change return type to
916 fast_tpoint_collect_result.
917 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
918 linux_wait_1, stuck_in_jump_pad_callback,
919 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
920 proceed_one_lwp): Adjust to type change.
921
9222017-07-10 Yao Qi <yao.qi@linaro.org>
923
924 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
925
9262017-06-29 Yao Qi <yao.qi@linaro.org>
927
928 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
929 Remove.
930 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
931
9322017-06-20 Simon Marchi <simon.marchi@ericsson.com>
933
934 * Makefile.in (IPA_OBJS): Sort and format one item per line.
935
9362017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
937
938 * linux-low.c (linux_create_inferior): Adjust code to access the
939 environment information via 'gdb_environ' class.
940 * lynx-low.c (lynx_create_inferior): Likewise.
941 * server.c (our_environ): Make it an instance of 'gdb_environ'.
942 (get_environ): Return a pointer to 'our_environ'.
943 (captured_main): Initialize 'our_environ'.
944 * server.h (get_environ): Adjust prototype.
945 * spu-low.c (spu_create_inferior): Adjust code to access the
946 environment information via 'gdb_environ' class.
947
9482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
949
950 * linux-low.c (linux_read_memory, linux_write_memory): Remove
951 usage of "register" keyword.
952
9532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
954
955 * configure: Re-generate.
956
9572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
958
959 * configure: Re-generate.
960
9612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
962
963 * Makefile.in (COMPILE.pre): Add "-x c++".
964
9652017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
966
967 * fork-child.c: Conditionally include <signal.h>.
968
9692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
970
971 * server.c (handle_general_set): Handle new packet
972 "QStartupWithShell".
973 (handle_query): Add "QStartupWithShell" to the list of supported
974 packets.
975 (gdbserver_usage): Add help text explaining the
976 new "--startup-with-shell" and "--no-startup-with-shell" CLI
977 options.
978 (captured_main): Recognize and act upon the presence of the new
979 CLI options.
980
9812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
982 Pedro Alves <palves@redhat.com>
983
984 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
985 * configure: Regenerate.
986 * configure.srv (srv_linux_obj): Add "fork-child.o" and
987 "fork-inferior.o".
988 (i[34567]86-*-lynxos*): Likewise.
989 (spu*-*-*): Likewise.
990 * fork-child.c: New file.
991 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
992 and "environ.h".
993 (linux_ptrace_fun): New function.
994 (linux_create_inferior): Adjust function prototype to reflect
995 change on "target.h". Adjust function code to use
996 "fork_inferior".
997 (linux_request_interrupt): Delete "signal_pid".
998 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
999 (lynx_ptrace_fun): New function.
1000 (lynx_create_inferior): Adjust function prototype to reflect
1001 change on "target.h". Adjust function code to use
1002 "fork_inferior".
1003 * nto-low.c (nto_create_inferior): Adjust function prototype and
1004 code to reflect change on "target.h". Update comments.
1005 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1006 "common-terminal.h" and "environ.h".
1007 (terminal_fd): Moved to fork-child.c.
1008 (old_foreground_pgrp): Likewise.
1009 (restore_old_foreground_pgrp): Likewise.
1010 (last_status): Make it global.
1011 (last_ptid): Likewise.
1012 (our_environ): New variable.
1013 (startup_with_shell): Likewise.
1014 (program_name): Likewise.
1015 (program_argv): Rename to...
1016 (program_args): ...this.
1017 (wrapper_argv): New variable.
1018 (start_inferior): Delete function.
1019 (get_exec_wrapper): New function.
1020 (get_exec_file): Likewise.
1021 (get_environ): Likewise.
1022 (prefork_hook): Likewise.
1023 (post_fork_inferior): Likewise.
1024 (postfork_hook): Likewise.
1025 (postfork_child_hook): Likewise.
1026 (handle_v_run): Update code to deal with arguments coming from the
1027 remote host. Update calls from "start_inferior" to
1028 "create_inferior".
1029 (captured_main): Likewise. Initialize environment variable. Call
1030 "have_job_control".
1031 * server.h (post_fork_inferior): New prototype.
1032 (get_environ): Likewise.
1033 (last_status): Declare.
1034 (last_ptid): Likewise.
1035 (signal_pid): Likewise.
1036 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1037 (spu_ptrace_fun): New function.
1038 (spu_create_inferior): Adjust function prototype to reflect change
1039 on "target.h". Adjust function code to use "fork_inferior".
1040 * target.c (target_terminal_init): New function.
1041 (target_terminal_inferior): Likewise.
1042 (target_terminal_ours): Likewise.
1043 * target.h: Include <vector>.
1044 (struct target_ops) <create_inferior>: Update prototype.
1045 (create_inferior): Update macro.
1046 * utils.c (gdb_flush_out_err): New function.
1047 * win32-low.c (win32_create_inferior): Adjust function prototype
1048 and code to reflect change on "target.h".
1049
10502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1051
1052 * inferiors.c (switch_to_thread): New function.
1053
10542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1055
1056 * Makefile.in (SFILE): Add "common/job-control.c".
1057 (OBS): Add "job-control.o".
1058
10592017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1060
1061 * Makefile: Remove "@host_makefile_frag@".
1062
10632017-05-05 Pedro Alves <palves@redhat.com>
1064
1065 * configure: Regenerate.
1066
10672017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1068
1069 * configure: Regenerate.
1070
10712017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1072
1073 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1074 software_single_step change of return type to
1075 std::vector<CORE_ADDR>.
1076 * linux-low.c (install_software_single_step_breakpoints):
1077 Likewise.
1078 * linux-low.h (install_software_single_step_breakpoints):
1079 Likewise.
1080
10812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1082
1083 * remote-utils.c: Include "gdb_termios.h" instead of
1084 "terminal.h".
1085 * terminal.h: Delete file.
1086
10872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1088
1089 * server.c: Include <vector>.
1090 <program_argv, wrapper_argv>: Convert to std::vector.
1091 (start_inferior): Rewrite function to use C++.
1092 (handle_v_run): Likewise. Update code that calculates the argv
1093 based on the vRun packet; use C++.
1094 (captured_main): Likewise.
1095
10962017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1097
1098 * server.c (handle_v_cont): Initialize thread_resume::thread
1099 with null_ptid.
1100
11012017-04-05 Pedro Alves <palves@redhat.com>
1102
1103 * configure: Regenerate.
1104
11052017-04-05 Pedro Alves <palves@redhat.com>
1106
1107 * gdbreplay.c (sync_error): Constify.
1108 * linux-x86-low.c (push_opcode): Constify.
1109
11102017-04-05 Pedro Alves <palves@redhat.com>
1111
1112 * win32-low.c (get_child_debug_event)
1113 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1114 Report TARGET_WAITKIND_SPURIOUS instead.
1115
11162017-04-05 Pedro Alves <palves@redhat.com>
1117
1118 * remote-utils.c (remote_prepare, remote_open): Constify.
1119 * remote-utils.h (remote_prepare, remote_open): Constify.
1120 * server.c (captured_main): Constify 'port' handling.
1121
11222017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1123
1124 * Makefile.in (clean): Clear .deps.
1125
11262017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1127
1128 * .gitignore: Remove generated files, replace with wildcard.
1129 * (clean): Replace removal of generated files with wildcard.
1130 (version.c): Replace with...
1131 (version-generated.c): ...this.
1132 (xml-builtin.c): Replace with...
1133 (xml-builtin-generated.c): ...this.
1134 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1135 (%.c: *regformats*): Replace with...
1136 (%-generated.c: *regformats*): ...this.
1137
11382017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1139
1140 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1141 (xtensa_fill_gregset): Call collect_register_by_name for
1142 threadptr register.
1143 (xtensa_store_gregset): Call supply_register_by_name for
1144 threadptr register.
1145
11462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1147
1148 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1149 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1150 (xtensa_store_gregset): Call supply_register for all registers in
1151 a0_regnum..a0_regnum + C0_NREGS range.
1152
11532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1154
1155 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1156 (ax-ipa.o: ax.c): Remove.
1157 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1158 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1159 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1160 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1161 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1162
11632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1164
1165 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1166 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1167 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1168 (errors-ipa.o: ../common/errors.c): Remove.
1169 (format-ipa.o: ../common/format.c): Remove.
1170 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1171
11722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * Makefile.in (%-ipa.o: %.c): New rule.
1175 (tracepoint-ipa.o: tracepoint.c): Remove.
1176 (utils-ipa.o: utils.c): Remove.
1177 (remote-utils-ipa.o: remote-utils.c): Remove.
1178 (regcache-ipa.o: regcache.c): Remove.
1179 (i386-linux-ipa.o: i386-linux.c): Remove.
1180 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1181 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1182 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1183 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1184 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1185 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1186 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1187 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1188 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1189 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1190 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1191 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1192 (aarch64-ipa.o: aarch64.c): Remove.
1193 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1194 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1195 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1196 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1197 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1198 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1199 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1200 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1201 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1202 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1203 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1204 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1205 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1206 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1207 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1208 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1209 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1210 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1211 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1212 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1213 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1214 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1215 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1216 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1217 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1218 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1219 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1220 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1221 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1222 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1223 (tdesc-ipa.o: tdesc.c): Remove.
1224 (x32-linux-ipa.o: x32-linux.c): Remove.
1225 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1226 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1227
12282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * Makefile.in (%.o: ../arch/%.c): New rule.
1231 (arm.o: ../arch/arm.c): Remove.
1232 (arm-linux.o: ../arch/arm-linux.c): Remove.
1233 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1234 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1235
12362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1237
1238 * Makefile.in (%.o: ../nat/%.c): New rule.
1239 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1240 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1241 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1242 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1243 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1244 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1245 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1246 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1247 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1248 (linux-personality.o: ../nat/linux-personality.c): Remove.
1249 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1250 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1251 (x86-linux.o: ../nat/x86-linux.c): Remove.
1252 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1253 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1254
12552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1256
1257 * Makefile.in (%.o: ../common/%.c): New rule.
1258 (signals.o: ../common/signals.c): Remove.
1259 (print-utils.o: ../common/print-utils.c): Remove.
1260 (rsp-low.o: ../common/rsp-low.c): Remove.
1261 (common-utils.o: ../common/common-utils.c): Remove.
1262 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1263 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1264 (vec.o: ../common/vec.c): Remove.
1265 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1266 (xml-utils.o: ../common/xml-utils.c): Remove.
1267 (ptid.o: ../common/ptid.c): Remove.
1268 (buffer.o: ../common/buffer.c): Remove.
1269 (format.o: ../common/format.c): Remove.
1270 (filestuff.o: ../common/filestuff.c): Remove.
1271 (agent.o: ../common/agent.c): Remove.
1272 (errors.o: ../common/errors.c): Remove.
1273 (environ.o: ../common/environ.c): Remove.
1274 (common-debug.o: ../common/common-debug.c): Remove.
1275 (cleanups.o: ../common/cleanups.c): Remove.
1276 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1277 (fileio.o: ../common/fileio.c): Remove.
1278 (common-regcache.o: ../common/common-regcache.c): Remove.
1279 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1280 (new-op.o: ../common/new-op.c): Remove.
1281 (btrace-common.o: ../common/btrace-common.c): Remove.
1282
12832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1284
1285 * Makefile.in (%.o: ../target/%.c): New rule.
1286 (waitstatus.o: ../target/waitstatus.c): Remove.
1287
12882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1289
1290 * Makefile.in
1291 (%.c: ../regformats/%.dat,
1292 (%.c: ../regformats/arm/%.dat,
1293 (%.c: ../regformats/i386/%.dat,
1294 (%.c: ../regformats/rs6000/%.dat): New rules.
1295 (aarch64.c): Remove.
1296 (reg-arm.c): Remove.
1297 (arm-with-iwmmxt.c): Remove.
1298 (arm-with-vfpv2.c): Remove.
1299 (arm-with-vfpv3.c): Remove.
1300 (arm-with-neon.c): Remove.
1301 (reg-bfin.c): Remove.
1302 (reg-cris.c): Remove.
1303 (reg-crisv32.c): Remove.
1304 (i386.c): Remove.
1305 (i386-linux.c): Remove.
1306 (i386-avx.c): Remove.
1307 (i386-avx-linux.c): Remove.
1308 (i386-avx-avx512.c): Remove.
1309 (i386-avx-avx512-linux.c): Remove.
1310 (i386-mpx.c): Remove.
1311 (i386-mpx-linux.c): Remove.
1312 (i386-avx-mpx-avx512-pku.c): Remove.
1313 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1314 (i386-avx-mpx.c): Remove.
1315 (i386-avx-mpx-linux.c): Remove.
1316 (i386-mmx.c): Remove.
1317 (i386-mmx-linux.c): Remove.
1318 (reg-ia64.c): Remove.
1319 (reg-m32r.c): Remove.
1320 (reg-m68k.c): Remove.
1321 (reg-cf.c): Remove.
1322 (mips-linux.c): Remove.
1323 (mips-dsp-linux.c): Remove.
1324 (mips64-linux.c): Remove.
1325 (mips64-dsp-linux.c): Remove.
1326 (nios2-linux.c): Remove.
1327 (powerpc-32.c): Remove.
1328 (powerpc-32l.c): Remove.
1329 (powerpc-altivec32l.c): Remove.
1330 (powerpc-cell32l.c): Remove.
1331 (powerpc-vsx32l.c): Remove.
1332 (powerpc-isa205-32l.c): Remove.
1333 (powerpc-isa205-altivec32l.c): Remove.
1334 (powerpc-isa205-vsx32l.c): Remove.
1335 (powerpc-e500l.c): Remove.
1336 (powerpc-64l.c): Remove.
1337 (powerpc-altivec64l.c): Remove.
1338 (powerpc-cell64l.c): Remove.
1339 (powerpc-vsx64l.c): Remove.
1340 (powerpc-isa205-64l.c): Remove.
1341 (powerpc-isa205-altivec64l.c): Remove.
1342 (powerpc-isa205-vsx64l.c): Remove.
1343 (s390-linux32.c): Remove.
1344 (s390-linux32v1.c): Remove.
1345 (s390-linux32v2.c): Remove.
1346 (s390-linux64.c): Remove.
1347 (s390-linux64v1.c): Remove.
1348 (s390-linux64v2.c): Remove.
1349 (s390-te-linux64.c): Remove.
1350 (s390-vx-linux64.c): Remove.
1351 (s390-tevx-linux64.c): Remove.
1352 (s390x-linux64.c): Remove.
1353 (s390x-linux64v1.c): Remove.
1354 (s390x-linux64v2.c): Remove.
1355 (s390x-te-linux64.c): Remove.
1356 (s390x-vx-linux64.c): Remove.
1357 (s390x-tevx-linux64.c): Remove.
1358 (tic6x-c64xp-linux.c): Remove.
1359 (tic6x-c64x-linux.c): Remove.
1360 (tic6x-c62x-linux.c): Remove.
1361 (reg-sh.c): Remove.
1362 (reg-sparc64.c): Remove.
1363 (reg-spu.c): Remove.
1364 (amd64.c): Remove.
1365 (amd64-linux.c): Remove.
1366 (amd64-avx.c): Remove.
1367 (amd64-avx-linux.c): Remove.
1368 (amd64-avx-avx512.c): Remove.
1369 (amd64-avx-avx512-linux.c): Remove.
1370 (amd64-mpx.c): Remove.
1371 (amd64-mpx-linux.c): Remove.
1372 (amd64-avx-mpx-avx512-pku.c): Remove.
1373 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1374 (amd64-avx-mpx.c): Remove.
1375 (amd64-avx-mpx-linux.c): Remove.
1376 (x32.c): Remove.
1377 (x32-linux.c): Remove.
1378 (x32-avx.c): Remove.
1379 (x32-avx-linux.c): Remove.
1380 (x32-avx-avx512.c): Remove.
1381 (x32-avx-avx512-linux.c): Remove.
1382 (reg-xtensa.c): Remove.
1383 (reg-tilegx.c): Remove.
1384 (reg-tilegx32.c): Remove.
1385
13862017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1387
1388 * Makefile.in (SFILES): Add "common/environ.c".
1389 (OBJS): Add "common/environ.h".
1390
13912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1392
1393 * configure.ac: Check if the fs_base and gs_base members of
1394 `struct user_regs_struct' exist.
1395 * config.in: Regenerated.
1396 * configure: Likewise.
1397
13982017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1399
1400 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1401 target_read_memory.
1402 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1403 (get_next_pcs_syscall_next_pc): Likewise.
1404
14052016-12-23 Luis Machado <lgustavo@codesourcery.com>
1406
1407 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1408 * nto-x86-low.c: Likewise.
1409
14102016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * Makefile.in: Include disable-implicit-rules.mk.
1413
14142016-11-23 Pedro Alves <palves@redhat.com>
1415
1416 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1417 (debug_vprintf): Use std::chrono::steady_clock instead of
1418 gettimeofday. Use '.' instead of ':'.
1419 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1420 (get_timestamp): Use std::chrono::steady_clock instead of
1421 gettimeofday.
1422
14232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * Makefile.in: Fix whitespace formatting.
1426
14272016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1428
1429 * Makefile.in (SFILES, OBS): Flatten list and order
1430 alphabetically.
1431
14322016-11-23 Pedro Alves <palves@redhat.com>
1433
1434 * event-loop.c (handle_file_event): Use warning.
1435 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1436 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1437 Use warning.
1438
14392016-11-23 Pedro Alves <palves@redhat.com>
1440
1441 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1442 output.
1443 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1444 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1445 debug_printf and debug_flush for debug output.
1446 * server.c (handle_general_set): Likewise.
1447 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1448 output.
1449
14502016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1451
1452 * Makefile.in (.c.o): Replace rule with ...
1453 (%.o: %.c): ... this one.
1454
14552016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1456
1457 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1458 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1459 make.
1460 * configure.ac: Remove checks for the make program.
1461 * configure: Re-generate.
1462
14632016-10-28 Pedro Alves <palves@redhat.com>
1464
1465 * Makefile.in (CXX_DIALECT): Get from configure.
1466 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1467 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1468 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1469 * config.in: Regenerate.
1470 * configure: Regenerate.
1471
14722016-10-27 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-low.c (linux_supports_range_stepping): Return true if
1475 can_software_single_step return true.
1476
14772016-10-27 Yao Qi <yao.qi@linaro.org>
1478
1479 * inferiors.c (find_inferior_in_random): New function.
1480 * inferiors.h (find_inferior_in_random): Declare.
1481 * linux-low.c (linux_wait_for_event_filtered): Call
1482 find_inferior_in_random instead of find_inferior.
1483
14842016-10-27 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-low.c (linux_wait_1): If single-step breakpoints are
1487 inserted, remove them.
1488
14892016-10-26 Pedro Alves <palves@redhat.com>
1490
1491 * linux-low.c (handle_extended_wait): Link parent/child fork
1492 threads.
1493 (linux_wait_1): Unlink them.
1494 (linux_set_resume_request): Ignore resume requests for
1495 already-resumed and unhandled fork child threads.
1496 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1497 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1498 New functions.
1499 (handle_v_requests) <vCont>: Don't call require_running.
1500 * server.h (in_queued_stop_replies): New declaration.
1501
15022016-10-24 Yao Qi <yao.qi@linaro.org>
1503
1504 PR server/20733
1505 * linux-aarch64-low.c (append_insns): Cast the return value to
1506 'uint32_t *'.
1507
15082016-10-10 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1511
15122016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1513
1514 * target.c (target_supports_multi_process): New function, moved
1515 from...
1516 * target.h (target_supports_multi_process): ... here. Remove
1517 macro.
1518
15192016-10-05 Tom Tromey <tom@tromey.com>
1520
1521 PR remote/20655:
1522 * tracepoint.c (handle_tracepoint_bkpts): Check
1523 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1524
15252016-10-05 Yao Qi <yao.qi@linaro.org>
1526
1527 * configure.srv: Update the path of arm-*.xml files.
1528
15292016-10-05 Terry Guo <terry.guo@arm.com>
1530 Yao Qi <yao.qi@linaro.org>
1531
1532 * Makefile.in: Adjust the path of rules.
1533 * configure.srv: Update the path of xml files.
1534 * regformats/arm-with-iwmmxt.dat: Regenerated.
1535 * regformats/arm-with-neon.dat: Likewise.
1536 * regformats/arm-with-vfpv2.dat: Likewise.
1537 * regformats/arm-with-vfpv3.dat Likewise.
1538
15392016-09-30 Yao Qi <yao.qi@linaro.org>
1540
1541 PR gdbserver/20627
1542 * target.c (target_stop_and_wait): Don't call
1543 target_continue_no_signal, use resume_stop instead.
1544
15452016-09-26 Yao Qi <yao.qi@linaro.org>
1546
1547 * linux-low.c (linux_wait_1): Call debug_exit.
1548
15492016-09-23 Pedro Alves <palves@redhat.com>
1550
1551 * Makefile.in (SFILES): Add common/new-op.c.
1552 (OBS): Add common/new-op.o.
1553 (new-op.o): New rule.
1554
15552016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1556
1557 * .gitinore: Ignore more files.
1558
15592016-09-21 Yao Qi <yao.qi@linaro.org>
1560
1561 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1562 23.
1563
15642016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1565
1566 * server.c (start_inferior): Call target_mourn_inferior instead of
1567 mourn_inferior; pass ptid_t argument to it.
1568 (resume): Likewise.
1569 (handle_target_event): Likewise.
1570 * target.c (target_mourn_inferior): New function.
1571 * target.h (mourn_inferior): Delete macro.
1572
15732016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1574
1575 * linux-low.c (lwp_is_stepping): New function.
1576
15772016-09-06 Carl Love <cel@us.ibm.com>
1578
1579 * server.c (start_inferior): Fixed comment, requested comment change
1580 didn't get updated correctly. Removed reference to ptrace () call as
1581 it is only true on Linux systems.
1582
15832016-09-06 Carl Love <cel@us.ibm.com>
1584
1585 * server.c (start_inferior): Do not call
1586 function target_post_create_inferior () if the
1587 inferior process has already exited.
1588
15892016-09-05 Pedro Alves <palves@redhat.com>
1590
1591 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1592 (COMPILE.pre, CC_LD): Use CXX directly.
1593 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1594 * acinclude.m4: Don't include build-with-cxx.m4.
1595 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1596 * configure: Regenerate.
1597
15982016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1599
1600 PR gdb/19495
1601 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1602 call writing data to own_buf.
1603
16042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * target.c (mywait): Call target_wait instead of
1607 the_target->wait.
1608 (target_wait): New function.
1609
16102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * server.c (start_inferior): New variable 'ptid'. Replace calls
1613 to the_target->resume by target_continue{,_no_signal}, depending
1614 on the case.
1615 * target.c (target_stop_and_wait): Call target_continue_no_signal
1616 instead of the_target->resume.
1617 (target_continue): New function.
1618
16192016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1620
1621 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1622
16232016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1624
1625 PR server/20491
1626 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1627 ps_prochandle.
1628 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1629 * linux-arm-low.c (ps_get_thread_area): Likewise.
1630 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1631 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1632 * linux-mips-low.c (ps_get_thread_area): Likewise.
1633 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1634 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1635 * linux-x86-low.c (ps_get_thread_area): Likewise.
1636 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1637
16382016-08-19 Pedro Alves <palves@redhat.com>
1639
1640 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1641
16422016-08-19 Pedro Alves <palves@redhat.com>
1643
1644 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1645 comment. Use memcpy instead of casting through unsigned long.
1646
16472016-08-19 Pedro Alves <palves@redhat.com>
1648
1649 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1650 allocating around 0x80000000.
1651
16522016-08-19 Pedro Alves <palves@redhat.com>
1653
1654 PR gdb/20415
1655 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1656 (x32-avx512-linux-ipa.o): New rules.
1657 * configure.ac (x86_64-*-linux*): New x32 check.
1658 * configure.srv (ipa_x32_linux_regobj): New.
1659 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1660 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1661 descriptions.
1662 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1663 descriptions.
1664 * configure: Regenerate.
1665
16662016-08-09 Pedro Alves <palves@redhat.com>
1667
1668 PR gdb/18653
1669 * Makefile.in (OBS): Add signals-state-save-restore.o.
1670 (signals-state-save-restore.o): New rule.
1671 * config.in: Regenerate.
1672 * configure: Regenerate.
1673 * linux-low.c: Include "signals-state-save-restore.h".
1674 (linux_create_inferior): Call
1675 restore_original_signals_state.
1676 * server.c: Include "dispositions-save-restore.h".
1677 (captured_main): Call save_original_signals_state.
1678
16792016-08-05 Pedro Alves <palves@redhat.com>
1680
1681 * configure: Regenerate.
1682
16832016-08-04 Yao Qi <yao.qi@linaro.org>
1684
1685 * linux-low.c (regsets_fetch_inferior_registers): Check
1686 errno is ESRCH or not.
1687
16882016-08-02 Yao Qi <yao.qi@linaro.org>
1689
1690 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1691 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1692 (thread_db_load_search): Update.
1693 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1694 td_ta_set_event and td_ta_event_getmsg.
1695
16962016-07-26 Pedro Alves <palves@redhat.com>
1697
1698 PR server/20414
1699 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1700 of unsigned long for 64-bit registers and use uint32_t instead of
1701 unsigned int for 32-bit registers.
1702
17032016-07-26 Pedro Alves <palves@redhat.com>
1704
1705 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1706 to 'ptrace'.
1707
17082016-07-21 Tom Tromey <tom@tromey.com>
1709
1710 * configure: Rebuild.
1711
17122016-07-21 Yao Qi <yao.qi@linaro.org>
1713
1714 * mem-break.c (find_gdb_breakpoint): Cast bp to
1715 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1716
17172016-07-21 Yao Qi <yao.qi@linaro.org>
1718
1719 * server.c (handle_v_requests): Support s and S actions
1720 if target_supports_software_single_step return true.
1721
17222016-07-21 Yao Qi <yao.qi@linaro.org>
1723
1724 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1725 is resume_step, call maybe_hw_step.
1726 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1727 and unstop them.
1728 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1729 breakpoints or not.
1730 (proceed_one_lwp): If resume request is resume_step, install
1731 reinsert breakpoints and call maybe_hw_step.
1732
17332016-07-21 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-low.c (proceed_one_lwp): Declare.
1736 (linux_resume_one_thread): Remove local variable 'step'.
1737 Lift code enqueue signal. Call proceed_one_lwp instead of
1738 linux_resume_one_lwp.
1739
17402016-07-21 Yao Qi <yao.qi@linaro.org>
1741
1742 * linux-low.c (linux_resume_one_thread): Call
1743 enqueue_pending_signal.
1744
17452016-07-21 Yao Qi <yao.qi@linaro.org>
1746
1747 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1748 * inferiors.c (do_restore_current_thread_cleanup): New function.
1749 (make_cleanup_restore_current_thread): Likewise.
1750 * linux-low.c (install_software_single_step_breakpoints): Call
1751 make_cleanup_restore_current_thread. Switch current_thread to
1752 thread.
1753
17542016-07-21 Yao Qi <yao.qi@linaro.org>
1755
1756 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1757 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1758 (clone_one_breakpoint): Likewise.
1759 (delete_reinsert_breakpoints): Change parameter to thread.
1760 Callers updated.
1761 (has_reinsert_breakpoints): Likewise.
1762 (uninsert_reinsert_breakpoints): Likewise.
1763 (reinsert_reinsert_breakpoints): Likewise.
1764 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1765 (delete_reinsert_breakpoints): Likewise.
1766 (reinsert_reinsert_breakpoints): Likewise.
1767 (uninsert_reinsert_breakpoints): Likewise.
1768 (has_reinsert_breakpoints): Likewise.
1769
17702016-07-21 Yao Qi <yao.qi@linaro.org>
1771
1772 * inferiors.c (get_thread_process): Make parameter const.
1773 * inferiors.h (get_thread_process): Update declaration.
1774 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1775 Add new parameters child_thread and parent_thread. Callers
1776 updated.
1777 * mem-break.h (clone_all_breakpoints): Update declaration.
1778
17792016-07-21 Yao Qi <yao.qi@linaro.org>
1780
1781 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1782 <command_list, handler>: Remove.
1783 (struct gdb_breakpoint): New.
1784 (struct other_breakpoint): New.
1785 (struct reinsert_breakpoint): New.
1786 (is_gdb_breakpoint): New function.
1787 (any_persistent_commands): Update command_list if
1788 is_gdb_breakpoint returns true.
1789 (set_breakpoint): Create breakpoints according to their types.
1790 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1791 (set_gdb_breakpoint_1): Likewise.
1792 (set_gdb_breakpoint): Likewise.
1793 (clear_breakpoint_conditions): Change parameter type to
1794 'struct gdb_breakpoint *'.
1795 (clear_breakpoint_commands): Likewise.
1796 (clear_breakpoint_conditions_and_commands): Likewise.
1797 (add_condition_to_breakpoint): Likewise.
1798 (add_breakpoint_condition): Likewise.
1799 (add_commands_to_breakpoint): Likewise.
1800 (check_breakpoints): Check other_breakpoint.
1801 (clone_one_breakpoint): Clone breakpopint according to its type.
1802 * mem-break.h (struct gdb_breakpoint): Declare.
1803 (set_gdb_breakpoint): Update declaration.
1804 (clear_breakpoint_conditions_and_commands): Likewise.
1805 (add_breakpoint_condition): Likewise.
1806 (add_breakpoint_commands): Likewise.
1807 * server.c (process_point_options): Change parameter type to
1808 'struct gdb_breakpoint *'.
1809
18102016-07-21 Yao Qi <yao.qi@linaro.org>
1811
1812 * mem-break.c (set_breakpoint_at): Rename it to ...
1813 (set_breakpoint_type_at): ... it.
1814 (set_breakpoint_at): Call set_breakpoint_type_at.
1815 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1816 * mem-break.h (set_breakpoint_at): Update comments.
1817
18182016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1819
1820 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1821 to buf parameter.
1822 (nios2_store_gregset): Likewise.
1823
18242016-07-01 Pedro Alves <palves@redhat.com>
1825 Antoine Tremblay <antoine.tremblay@ericsson.com>
1826
1827 * linux-low.c: Change interface to take the target lwp_info
1828 pointer directly and return void. Handle detaching from a zombie
1829 thread.
1830 (linux_detach_lwp_callback): New function.
1831 (linux_detach): Detach from the leader thread after detaching from
1832 the clone threads.
1833
18342016-06-28 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1837 for variable new_offset.
1838 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1839 (aarch64_ftrace_insn_reloc_cb): Likewise.
1840 (aarch64_ftrace_insn_reloc_tb): Likewise.
1841 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1842 PRIx64 instead of PRIx32.
1843
18442016-06-28 Yao Qi <yao.qi@linaro.org>
1845
1846 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1847 (the_low_target): Install arm_get_syscall_trapinfo.
1848
18492016-06-28 Yao Qi <yao.qi@linaro.org>
1850
1851 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1852 function.
1853 (the_low_target): Install aarch64_get_syscall_trapinfo.
1854
18552016-06-28 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1858 Callers updated.
1859 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1860 Remove parameter sysno.
1861 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1862 sysret.
1863
18642016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1865
1866 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1867 (s390_emit_ne_goto): Likewise.
1868 (s390_emit_lt_goto): Likewise.
1869 (s390_emit_le_goto): Likewise.
1870 (s390_emit_gt_goto): Likewise.
1871 (s390_emit_ge_goto): Likewise.
1872 (s390x_emit_eq_goto): Likewise.
1873 (s390x_emit_ne_goto): Likewise.
1874 (s390x_emit_lt_goto): Likewise.
1875 (s390x_emit_le_goto): Likewise.
1876 (s390x_emit_gt_goto): Likewise.
1877 (s390x_emit_ge_goto): Likewise.
1878 (s390_emit_ops_impl): Mark variable static.
1879 (s390x_emit_ops): Likewise.
1880
18812016-06-17 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-low.c (handle_extended_wait): Call
1884 uninsert_reinsert_breakpoints for the parent process. Remove
1885 reinsert breakpoints from the child process. Reinsert them to
1886 the parent process when vfork is done.
1887 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1888 (reinsert_reinsert_breakpoints): New function.
1889 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1890 (reinsert_reinsert_breakpoints): Declare.
1891
18922016-06-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-low.c (handle_extended_wait): If the parent is doing
1895 step-over, remove the reinsert breakpoints from the forked child.
1896
18972016-06-17 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-low.c (unsuspend_all_lwps): Declare.
1900 (linux_low_filter_event): If thread exited, call finish_step_over.
1901 If step-over is finished, unsuspend other threads.
1902
19032016-06-17 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-low.c (linux_resume_one_lwp_throw): Assert
1906 has_reinsert_breakpoints returns false.
1907 * mem-break.c (delete_disabled_breakpoints): Assert
1908 bp type isn't reinsert_breakpoint.
1909
19102016-06-17 Yao Qi <yao.qi@linaro.org>
1911
1912 * linux-low.c (maybe_hw_step): New function.
1913 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1914 (finish_step_over): Switch current_thread to lwp temporarily,
1915 and assert has_reinsert_breakpoints returns true.
1916 (proceed_one_lwp): Call maybe_hw_step.
1917 * mem-break.c (has_reinsert_breakpoints): New function.
1918 * mem-break.h (has_reinsert_breakpoints): Declare.
1919
19202016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1921
1922 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1923
19242016-05-17 Yao Qi <yao.qi@linaro.org>
1925
1926 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1927 instead of find_inferior.
1928
19292016-05-05 Yao Qi <yao.qi@linaro.org>
1930
1931 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1932 Initialize res to zero.
1933
19342016-05-05 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1937 to uint32_t.
1938
19392016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1940
1941 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1942 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1943 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1944
19452016-04-28 Par Olsson <par.olsson@windriver.com>
1946 Simon Marchi <simon.marchi@ericsson.com>
1947
1948 * tracepoint.c (write_inferior_int8): New function.
1949 (cmd_qtenable_disable): Write enable flag using
1950 write_inferior_int8.
1951
19522016-04-25 Yao Qi <yao.qi@linaro.org>
1953
1954 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1955 (need_step_over_p): Return zero if the LWP has pending signals
1956 can be delivered on software single step target.
1957
19582016-04-25 Yao Qi <yao.qi@linaro.org>
1959
1960 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1961 return instead of error.
1962
19632016-04-22 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1966 to 23.
1967
19682016-04-22 Yao Qi <yao.qi@linaro.org>
1969
1970 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1971 signal when stepping over breakpoint with software single
1972 step.
1973
19742016-04-21 Pedro Alves <palves@redhat.com>
1975
1976 * linux-s390-low.c (s390_collect_ptrace_register)
1977 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1978 add casts.
1979 (s390_check_regset): Use void * instead of gdb_byte *.
1980
19812016-04-20 Pedro Alves <palves@redhat.com>
1982
1983 * configure: Renegerate.
1984
19852016-04-20 Yao Qi <yao.qi@linaro.org>
1986
1987 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1988 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1989 number 16.
1990 (arm_store_gregset): Likewise.
1991
19922016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1993
1994 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1995 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1996 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1997 (amd64-avx-mpx-linux.c): New rules.
1998 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1999 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2000 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2001 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2002 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2003 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2004 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2005 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2006 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2007 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2008 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2009 * linux-x86-low.c (x86_linux_read_description): Add case for
2010 X86_XSTATE_AVX_MPX_MASK.
2011 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2012 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2013 init_registers_i386_avx_mpx_linux.
2014 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2015 (initialize_low_tracepoint): Call
2016 init_registers_i386_avx_mpx_linux.
2017 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2018 (initialize_low_tracepoint): Call
2019 init_registers_amd64_avx_mpx_linux.
2020 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2021 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2022 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2023 declarations.
2024
20252016-04-18 Pedro Alves <palves@redhat.com>
2026
2027 * configure: Regenerate.
2028
20292016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2030
2031 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2032 (aarch64_emit_sub): Likewise.
2033
20342016-04-12 Pedro Alves <palves@redhat.com>
2035
2036 * utils.c (prepare_to_throw_exception): Delete.
2037
20382016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2039
2040 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2041
20422016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2043
2044 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2045
20462016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2047
2048 * linux-aarch64-ipa.c: Add <elf.h> include.
2049 * linux-ppc-ipa.c: Add <elf.h> include.
2050 * linux-s390-ipa.c: Add <elf.h> include.
2051
20522016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2053
2054 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2055 (get_raw_reg_ptr): Likewise.
2056 (get_trace_state_variable_value_ptr): Likewise.
2057 (set_trace_state_variable_value_ptr): Likewise.
2058 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2059 char *.
2060
20612016-03-31 Wei-cheng Wang <cole945@gmail.com>
2062 Marcin Kościelnicki <koriakin@0x04.net>
2063
2064 PR/17221
2065 * linux-ppc-low.c (emit_insns): New function.
2066 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2067 (ppc_emit_prologue): New function.
2068 (ppc_emit_epilogue): New function.
2069 (ppc_emit_add): New function.
2070 (ppc_emit_sub): New function.
2071 (ppc_emit_mul): New function.
2072 (ppc_emit_lsh): New function.
2073 (ppc_emit_rsh_signed): New function.
2074 (ppc_emit_rsh_unsigned): New function.
2075 (ppc_emit_ext): New function.
2076 (ppc_emit_zero_ext): New function.
2077 (ppc_emit_log_not): New function.
2078 (ppc_emit_bit_and): New function.
2079 (ppc_emit_bit_or): New function.
2080 (ppc_emit_bit_xor): New function.
2081 (ppc_emit_bit_not): New function.
2082 (ppc_emit_equal): New function.
2083 (ppc_emit_less_signed): New function.
2084 (ppc_emit_less_unsigned): New function.
2085 (ppc_emit_ref): New function.
2086 (ppc_emit_const): New function.
2087 (ppc_emit_reg): New function.
2088 (ppc_emit_pop): New function.
2089 (ppc_emit_stack_flush): New function.
2090 (ppc_emit_swap): New function.
2091 (ppc_emit_stack_adjust): New function.
2092 (ppc_emit_call): New function.
2093 (ppc_emit_int_call_1): New function.
2094 (ppc_emit_void_call_2): New function.
2095 (ppc_emit_if_goto): New function.
2096 (ppc_emit_goto): New function.
2097 (ppc_emit_eq_goto): New function.
2098 (ppc_emit_ne_goto): New function.
2099 (ppc_emit_lt_goto): New function.
2100 (ppc_emit_le_goto): New function.
2101 (ppc_emit_gt_goto): New function.
2102 (ppc_emit_ge_goto): New function.
2103 (ppc_write_goto_address): New function.
2104 (ppc_emit_ops_impl): New static variable.
2105 (ppc64v1_emit_prologue): New function.
2106 (ppc64v2_emit_prologue): New function.
2107 (ppc64_emit_epilogue): New function.
2108 (ppc64_emit_add): New function.
2109 (ppc64_emit_sub): New function.
2110 (ppc64_emit_mul): New function.
2111 (ppc64_emit_lsh): New function.
2112 (ppc64_emit_rsh_signed): New function.
2113 (ppc64_emit_rsh_unsigned): New function.
2114 (ppc64_emit_ext): New function.
2115 (ppc64_emit_zero_ext): New function.
2116 (ppc64_emit_log_not): New function.
2117 (ppc64_emit_bit_and): New function.
2118 (ppc64_emit_bit_or): New function.
2119 (ppc64_emit_bit_xor): New function.
2120 (ppc64_emit_bit_not): New function.
2121 (ppc64_emit_equal): New function.
2122 (ppc64_emit_less_signed): New function.
2123 (ppc64_emit_less_unsigned): New function.
2124 (ppc64_emit_ref): New function.
2125 (ppc64_emit_const): New function.
2126 (ppc64v1_emit_reg): New function.
2127 (ppc64v2_emit_reg): New function.
2128 (ppc64_emit_pop): New function.
2129 (ppc64_emit_stack_flush): New function.
2130 (ppc64_emit_swap): New function.
2131 (ppc64v1_emit_call): New function.
2132 (ppc64v2_emit_call): New function.
2133 (ppc64v1_emit_int_call_1): New function.
2134 (ppc64v2_emit_int_call_1): New function.
2135 (ppc64v1_emit_void_call_2): New function.
2136 (ppc64v2_emit_void_call_2): New function.
2137 (ppc64_emit_if_goto): New function.
2138 (ppc64_emit_eq_goto): New function.
2139 (ppc64_emit_ne_goto): New function.
2140 (ppc64_emit_lt_goto): New function.
2141 (ppc64_emit_le_goto): New function.
2142 (ppc64_emit_gt_goto): New function.
2143 (ppc64_emit_ge_goto): New function.
2144 (ppc64v1_emit_ops_impl): New static variable.
2145 (ppc64v2_emit_ops_impl): New static variable.
2146 (ppc_emit_ops): New function.
2147 (linux_low_target): Wire in ppc_emit_ops.
2148
21492016-03-31 Wei-cheng Wang <cole945@gmail.com>
2150 Marcin Kościelnicki <koriakin@0x04.net>
2151
2152 PR/17221
2153 * Makefile.in: Add powerpc-*-ipa.o
2154 * configure.srv: Add ipa_obj for powerpc*-linux.
2155 * linux-ppc-ipa.c: New file.
2156 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2157 includes.
2158 (PPC_FIELD): New macro.
2159 (PPC_SEXT): New macro.
2160 (PPC_OP6): New macro.
2161 (PPC_BO): New macro.
2162 (PPC_LI): New macro.
2163 (PPC_BD): New macro.
2164 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2165 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2166 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2167 (ppc_get_thread_area): New function.
2168 (is_elfv2_inferior): New function.
2169 (gen_ds_form): New function.
2170 (GEN_STD): New macro.
2171 (GEN_STDU): New macro.
2172 (GEN_LD): New macro.
2173 (GEN_LDU): New macro.
2174 (gen_d_form): New function.
2175 (GEN_ADDI): New macro.
2176 (GEN_ADDIS): New macro.
2177 (GEN_LI): New macro.
2178 (GEN_LIS): New macro.
2179 (GEN_ORI): New macro.
2180 (GEN_ORIS): New macro.
2181 (GEN_LWZ): New macro.
2182 (GEN_STW): New macro.
2183 (GEN_STWU): New macro.
2184 (gen_xfx_form): New function.
2185 (GEN_MFSPR): New macro.
2186 (GEN_MTSPR): New macro.
2187 (GEN_MFCR): New macro.
2188 (GEN_MTCR): New macro.
2189 (GEN_SYNC): New macro.
2190 (GEN_LWSYNC): New macro.
2191 (gen_x_form): New function.
2192 (GEN_OR): New macro.
2193 (GEN_MR): New macro.
2194 (GEN_LWARX): New macro.
2195 (GEN_STWCX): New macro.
2196 (GEN_CMPW): New macro.
2197 (gen_md_form): New function.
2198 (GEN_RLDICL): New macro.
2199 (GEN_RLDICR): New macro.
2200 (gen_i_form): New function.
2201 (GEN_B): New macro.
2202 (GEN_BL): New macro.
2203 (gen_b_form): New function.
2204 (GEN_BNE): New macro.
2205 (GEN_LOAD): New macro.
2206 (GEN_STORE): New macro.
2207 (gen_limm): New function.
2208 (gen_atomic_xchg): New function.
2209 (gen_call): New function.
2210 (ppc_relocate_instruction): New function.
2211 (ppc_install_fast_tracepoint_jump_pad): New function.
2212 (ppc_get_min_fast_tracepoint_insn_len): New function.
2213 (ppc_get_ipa_tdesc_idx): New function.
2214 (the_low_target): Wire in the new functions.
2215 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2216 tdescs.
2217 * linux-ppc-tdesc.h: New file.
2218
22192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2220
2221 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2222 (alloc_jump_pad_buffer): New function.
2223 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2224 (alloc_jump_pad_buffer): New function.
2225 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2226 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2227 (alloc_jump_pad_buffer): New function.
2228 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2229 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2230 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2231 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2232
22332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2234
2235 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2236 * linux-amd64-ipa.c: Likewise.
2237 * linux-i386-ipa.c: Likewise.
2238 * linux-s390-ipa.c: Likewise.
2239 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2240 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2241 set_trace_state_variable_value_ptr.
2242 (struct ipa_sym_addresses): Likewise.
2243 (symbol_list): Likewise.
2244 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2245 accessing gdb_collect directly.
2246 (gdb_collect_ptr_type): New typedef.
2247 (get_raw_reg_ptr_type): New typedef.
2248 (get_trace_state_variable_value_ptr_type): New typedef.
2249 (set_trace_state_variable_value_ptr_type): New typedef.
2250 (gdb_collect_ptr): New global.
2251 (get_raw_reg_ptr): New global.
2252 (get_trace_state_variable_value_ptr): New global.
2253 (set_trace_state_variable_value_ptr): New global.
2254 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2255 accessing get_raw_reg directly.
2256 (get_get_tsv_func_addr): Likewise for
2257 get_trace_state_variable_value_ptr.
2258 (get_set_tsv_func_addr): Likewise for
2259 set_trace_state_variable_value_ptr.
2260 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2261
22622016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2263
2264 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2265
22662016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2267
2268 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2269 packets.
2270 (relocate_instruction): Remove own_buf.
2271 * server.c (own_buf): Make global.
2272 (handle_v_requests): Make global.
2273 * server.h (own_buf): New declaration.
2274 (handle_v_requests): New prototype.
2275
22762016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2277
2278 PR 18377
2279 * linux-s390-low.c (add_insns): New function.
2280 (s390_emit_prologue): New function.
2281 (s390_emit_epilogue): New function.
2282 (s390_emit_add): New function.
2283 (s390_emit_sub): New function.
2284 (s390_emit_mul): New function.
2285 (s390_emit_lsh): New function.
2286 (s390_emit_rsh_signed): New function.
2287 (s390_emit_rsh_unsigned): New function.
2288 (s390_emit_ext): New function.
2289 (s390_emit_log_not): New function.
2290 (s390_emit_bit_and): New function.
2291 (s390_emit_bit_or): New function.
2292 (s390_emit_bit_xor): New function.
2293 (s390_emit_bit_not): New function.
2294 (s390_emit_equal): New function.
2295 (s390_emit_less_signed): New function.
2296 (s390_emit_less_unsigned): New function.
2297 (s390_emit_ref): New function.
2298 (s390_emit_if_goto): New function.
2299 (s390_emit_goto): New function.
2300 (s390_write_goto_address): New function.
2301 (s390_emit_litpool): New function.
2302 (s390_emit_const): New function.
2303 (s390_emit_call): New function.
2304 (s390_emit_reg): New function.
2305 (s390_emit_pop): New function.
2306 (s390_emit_stack_flush): New function.
2307 (s390_emit_zero_ext): New function.
2308 (s390_emit_swap): New function.
2309 (s390_emit_stack_adjust): New function.
2310 (s390_emit_set_r2): New function.
2311 (s390_emit_int_call_1): New function.
2312 (s390_emit_void_call_2): New function.
2313 (s390_emit_eq_goto): New function.
2314 (s390_emit_ne_goto): New function.
2315 (s390_emit_lt_goto): New function.
2316 (s390_emit_le_goto): New function.
2317 (s390_emit_gt_goto): New function.
2318 (s390_emit_ge_goto): New function.
2319 (s390x_emit_prologue): New function.
2320 (s390x_emit_epilogue): New function.
2321 (s390x_emit_add): New function.
2322 (s390x_emit_sub): New function.
2323 (s390x_emit_mul): New function.
2324 (s390x_emit_lsh): New function.
2325 (s390x_emit_rsh_signed): New function.
2326 (s390x_emit_rsh_unsigned): New function.
2327 (s390x_emit_ext): New function.
2328 (s390x_emit_log_not): New function.
2329 (s390x_emit_bit_and): New function.
2330 (s390x_emit_bit_or): New function.
2331 (s390x_emit_bit_xor): New function.
2332 (s390x_emit_bit_not): New function.
2333 (s390x_emit_equal): New function.
2334 (s390x_emit_less_signed): New function.
2335 (s390x_emit_less_unsigned): New function.
2336 (s390x_emit_ref): New function.
2337 (s390x_emit_if_goto): New function.
2338 (s390x_emit_const): New function.
2339 (s390x_emit_call): New function.
2340 (s390x_emit_reg): New function.
2341 (s390x_emit_pop): New function.
2342 (s390x_emit_stack_flush): New function.
2343 (s390x_emit_zero_ext): New function.
2344 (s390x_emit_swap): New function.
2345 (s390x_emit_stack_adjust): New function.
2346 (s390x_emit_int_call_1): New function.
2347 (s390x_emit_void_call_2): New function.
2348 (s390x_emit_eq_goto): New function.
2349 (s390x_emit_ne_goto): New function.
2350 (s390x_emit_lt_goto): New function.
2351 (s390x_emit_le_goto): New function.
2352 (s390x_emit_gt_goto): New function.
2353 (s390x_emit_ge_goto): New function.
2354 (s390_emit_ops): New function.
2355 (struct linux_target_ops): Fill in emit_ops hook.
2356
23572016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2358
2359 PR 18377
2360 * Makefile.in: Add s390 IPA files.
2361 * configure.srv: Build IPA for s390.
2362 * linux-s390-ipa.c: New file.
2363 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2364 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2365 (tdesc_s390_linux32): Likewise.
2366 (init_registers_s390_linux32v1): Likewise.
2367 (tdesc_s390_linux32v1): Likewise.
2368 (init_registers_s390_linux32v2): Likewise.
2369 (tdesc_s390_linux32v2): Likewise.
2370 (init_registers_s390_linux64): Likewise.
2371 (tdesc_s390_linux64): Likewise.
2372 (init_registers_s390_linux64v1): Likewise.
2373 (tdesc_s390_linux64v1): Likewise.
2374 (init_registers_s390_linux64v2): Likewise.
2375 (tdesc_s390_linux64v2): Likewise.
2376 (init_registers_s390_te_linux64): Likewise.
2377 (tdesc_s390_te_linux64): Likewise.
2378 (init_registers_s390_vx_linux64): Likewise.
2379 (tdesc_s390_vx_linux64): Likewise.
2380 (init_registers_s390_tevx_linux64): Likewise.
2381 (tdesc_s390_tevx_linux64): Likewise.
2382 (init_registers_s390x_linux64): Likewise.
2383 (tdesc_s390x_linux64): Likewise.
2384 (init_registers_s390x_linux64v1): Likewise.
2385 (tdesc_s390x_linux64v1): Likewise.
2386 (init_registers_s390x_linux64v2): Likewise.
2387 (tdesc_s390x_linux64v2): Likewise.
2388 (init_registers_s390x_te_linux64): Likewise.
2389 (tdesc_s390x_te_linux64): Likewise.
2390 (init_registers_s390x_vx_linux64): Likewise.
2391 (tdesc_s390x_vx_linux64): Likewise.
2392 (init_registers_s390x_tevx_linux64): Likewise.
2393 (tdesc_s390x_tevx_linux64): Likewise.
2394 (have_hwcap_s390_vx): New static variable.
2395 (s390_arch_setup): Fill have_hwcap_s390_vx.
2396 (s390_get_thread_area): New function.
2397 (s390_ft_entry_gpr_esa): New const.
2398 (s390_ft_entry_gpr_zarch): New const.
2399 (s390_ft_entry_misc): New const.
2400 (s390_ft_entry_fr): New const.
2401 (s390_ft_entry_vr): New const.
2402 (s390_ft_main_31): New const.
2403 (s390_ft_main_64): New const.
2404 (s390_ft_exit_fr): New const.
2405 (s390_ft_exit_vr): New const.
2406 (s390_ft_exit_misc): New const.
2407 (s390_ft_exit_gpr_esa): New const.
2408 (s390_ft_exit_gpr_zarch): New const.
2409 (append_insns): New function.
2410 (s390_relocate_instruction): New function.
2411 (s390_install_fast_tracepoint_jump_pad): New function.
2412 (s390_get_min_fast_tracepoint_insn_len): New function.
2413 (s390_get_ipa_tdesc_idx): New function.
2414 (struct linux_target_ops): Wire in the above functions.
2415 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2416 * linux-s390-tdesc.h: New file.
2417
24182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2419
2420 * linux-s390-low.c (s390_supports_tracepoints): New function.
2421 (struct linux_target_ops): Fill supports_tracepoints hook.
2422
24232016-03-18 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-low.c (lwp_signal_can_be_delivered): New function.
2426 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2427
24282016-03-18 Yao Qi <yao.qi@linaro.org>
2429
2430 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2431 0 if signal is enqueued. Remove 'signal' from one debugging
2432 message. Move one debugging message to some lines below.
2433 Remove code setting 'signal' to 0.
2434
24352016-03-18 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-low.c (linux_low_filter_event): Remove redundant
2438 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2439
24402016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2441
2442 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2443 (struct linux_target_ops): Wire in the above.
2444
24452016-03-03 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-low.c: Update comments to start_step_over.
2448
24492016-03-03 Yao Qi <yao.qi@linaro.org>
2450
2451 PR server/19736
2452 * linux-low.c (handle_extended_wait): Set child suspended
2453 if event_lwp->bp_reinsert isn't zero.
2454
24552016-03-02 Yao Qi <yao.qi@linaro.org>
2456
2457 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2458 enqueue_pending_signal.
2459
24602016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2461
2462 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2463 is actually loaded.
2464
24652016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2466
2467 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2468 (s390_regmap_3264) [!__s390x__]: New global.
2469 (s390_collect_ptrace_register): Skip map entries containing -1.
2470 (s390_supply_ptrace_register): Ditto.
2471 (s390_fill_gprs_high): New function.
2472 (s390_store_gprs_high): New function.
2473 (s390_regsets): Add NT_S390_HIGH_GPRS.
2474 (s390_get_hwcap): Enable on 31-bit.
2475 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2476 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2477 Detect NT_S390_HIGH_GPRS.
2478 (s390_usrregs_info_3264): Enable on 31-bit.
2479 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2480 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2481
24822016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2483
2484 PR gdb/13808
2485 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2486 * configure.srv: Ditto.
2487 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2488 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2489 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2490 (init_registers_amd64_linux): Remove prototype.
2491 (tdesc_amd64_linux): Remove declaration.
2492 (get_ipa_tdesc): New function.
2493 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2494 initialize remaining tdescs.
2495 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2496 (init_registers_i386_linux): Remove prototype.
2497 (tdesc_i386_linux): Remove declaration.
2498 (get_ipa_tdesc): New function.
2499 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2500 initialize remaining tdescs.
2501 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2502 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2503 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2504 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2505 (x86_get_ipa_tdesc_idx): New function.
2506 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2507 * linux-x86-tdesc.h: New file.
2508 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2509 (target_get_ipa_tdesc_idx): New macro.
2510 * tracepoint.c (ipa_tdesc_idx): New macro.
2511 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2512 (symbol_list): Add ipa_tdesc_idx.
2513 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2514 (ipa_tdesc): Remove.
2515 (ipa_tdesc_idx): New variable.
2516 (get_context_regcache): Use get_ipa_tdesc.
2517 (gdb_collect): Ditto.
2518 (gdb_probe): Ditto.
2519 * tracepoint.h (get_ipa_tdesc): New prototype.
2520 (ipa_tdesc): Remove.
2521
25222016-02-24 Pedro Alves <palves@redhat.com>
2523
2524 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2525 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2526 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2527 Factor out common code between the USE_SIGTRAP_SIGINFO and
2528 !USE_SIGTRAP_SIGINFO blocks.
2529 (linux_low_filter_event): Call save_stop_reason instead of
2530 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2531 Update comments.
2532 (linux_wait_1): Update comments.
2533
25342016-02-24 Wei-cheng Wang <cole945@gmail.com>
2535
2536 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2537 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2538 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2539 ppc_insert_point, ppc_remove_point.
2540
25412016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2542
2543 * linux-s390-low.c (s390_supports_z_point_type): New function.
2544 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2545
25462016-02-16 Yao Qi <yao.qi@linaro.org>
2547
2548 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2549 PC. Get pc from regcache_read_pc.
2550
25512016-02-12 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2554 or linux_get_pc_32bit.
2555 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2556
25572016-02-12 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2560 arm_linux_get_next_pcs_fixup.
2561
25622016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2563
2564 * tracepoint.c (x_tracepoint_action_download): Change
2565 write_inferior_data_ptr to write_inferior_data_pointer.
2566 (cmd_qtstart): Likewise.
2567 (write_inferior_data_ptr): Remove.
2568 (download_agent_expr): Change write_inferior_data_ptr to
2569 write_inferior_data_pointer.
2570 (download_tracepoint_1): Likewise.
2571 (download_tracepoint): Likewise.
2572 (download_trace_state_variables): Likewise.
2573
25742016-02-11 Wei-cheng Wang <cole945@gmail.com>
2575 Marcin Kościelnicki <koriakin@0x04.net>
2576
2577 * tracepoint.c (struct tracepoint_action_ops): Remove.
2578 (struct tracepoint_action): Remove ops.
2579 (m_tracepoint_action_download, r_tracepoint_action_download)
2580 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2581 size and offset accordingly.
2582 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2583 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2584 (tracepoint_action_send, tracepoint_action_download): New functions.
2585 Helpers for trace action handlers.
2586 (add_tracepoint_action): Remove setup actions ops.
2587 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2588
25892016-02-10 Yao Qi <yao.qi@linaro.org>
2590
2591 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2592
25932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2596 to AC_OUTPUT.
2597 * configure: Regenerate.
2598
25992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2602 void * to gdb_byte *.
2603 * linux-low.c (siginfo_fixup): Likewise.
2604 (linux_xfer_siginfo): Likewise.
2605 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2606 Likewise.
2607 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2608
26092016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2610
2611 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2612 to srv_tgtobj.
2613 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2614 to srv_tgtobj.
2615 * linux-x86-low.c [__x86_64__]: Include
2616 "nat/amd64-linux-siginfo.h".
2617 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2618 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2619 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2620 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2621 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2622 (cpt_si_fd, si_timerid, si_overrun): Move from
2623 nat/amd64-linux-siginfo.c.
2624 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2625
26262016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * server.c (skip_to_semicolon): Remove.
2629 (process_point_options): Use strchrnul instead of
2630 skip_to_semicolon.
2631
26322016-01-26 Yao Qi <yao.qi@linaro.org>
2633
2634 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2635 * linux-low.c (install_software_single_step_breakpoints): Don't
2636 call regcache_read_pc.
2637 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2638 argument pc.
2639
26402016-01-26 Yao Qi <yao.qi@linaro.org>
2641
2642 * linux-low.c (install_software_single_step_breakpoints): Call
2643 regcache_read_pc instead of get_pc.
2644
26452016-01-26 Yao Qi <yao.qi@linaro.org>
2646
2647 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2648 (unblock_async_io): Rename to ...
2649 (block_unblock_async_io): ... it. New function.
2650 (enable_async_io): Don't install SIGIO handler. Unblock it
2651 instead.
2652 (disable_async_io): Don't ignore SIGIO. Block it instead.
2653 (initialize_async_io): Install SIGIO handler. Don't call
2654 unblock_async_io.
2655
26562016-01-26 Yao Qi <yao.qi@linaro.org>
2657
2658 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2659 first character is '\003', call *the_target->request_interrupt.
2660
26612016-01-25 Yao Qi <yao.qi@linaro.org>
2662
2663 * remote-utils.c (new_thread_notify): Remove.
2664 (dead_thread_notify): Likewise.
2665 * remote-utils.h (new_thread_notify): Remove declaration.
2666 (dead_thread_notify): Likewise.
2667
26682016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2669
2670 * gdb.trace/pending.exp: Fix expected message on continue.
2671
26722016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2673
2674 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2675 it works properly on big-endian machines where sizeof (CORE_ADDR)
2676 != sizeof (void *).
2677
26782016-01-21 Pedro Alves <palves@redhat.com>
2679
2680 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2681 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2682 * configure: Regenerate.
2683
26842016-01-21 Yao Qi <yao.qi@linaro.org>
2685
2686 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2687 is_thumb and set it according to CPSR saved on the stack.
2688 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2689 arm_sigreturn_next_pc.
2690
26912016-01-18 Yao Qi <yao.qi@linaro.org>
2692
2693 * linux-low.c (linux_set_pc_64bit): New function.
2694 (linux_get_pc_64bit): New function.
2695 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2696 Declare.
2697 * linux-sparc-low.c (debug_threads): Remove declaration.
2698 (sparc_get_pc): Remove.
2699 (the_low_target): Use linux_get_pc_64bit instead of
2700 sparc_get_pc.
2701 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2702 (the_low_target): Use linux_get_pc_64bit and
2703 linux_set_pc_64bit.
2704
27052016-01-18 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-arm-low.c (debug_threads): Remove declaration.
2708 (arm_get_pc, arm_set_pc): Remove.
2709 (the_low_target): Use linux_get_pc_32bit and
2710 linux_set_pc_32bit.
2711 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2712 (the_low_target): Use linux_get_pc_32bit and
2713 linux_set_pc_32bit.
2714 * linux-cris-low.c (debug_threads): Remove declaration.
2715 (cris_get_pc, cris_set_pc,): Remove.
2716 (the_low_target): Use linux_get_pc_32bit and
2717 linux_set_pc_32bit.
2718 * linux-crisv32-low.c (debug_threads): Remove declaration.
2719 (cris_get_pc, cris_set_pc): Remove.
2720 (the_low_target): Use linux_get_pc_32bit and
2721 linux_set_pc_32bit.
2722 * linux-low.c: Include inttypes.h.
2723 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2724 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2725 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2726 (the_low_target): Use linux_get_pc_32bit and
2727 linux_set_pc_32bit.
2728 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2729 (the_low_target): Use linux_get_pc_32bit and
2730 linux_set_pc_32bit.
2731 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2732 (the_low_target): Use linux_get_pc_32bit and
2733 linux_set_pc_32bit.
2734 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2735 (the_low_target): Use linux_get_pc_32bit and
2736 linux_set_pc_32bit.
2737 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2738 (the_low_target): Use linux_get_pc_32bit and
2739 linux_set_pc_32bit.
2740
27412016-01-18 Gary Benson <gbenson@redhat.com>
2742
2743 * configure.ac (AC_FUNC_FORK): New check.
2744 * config.in: Regenerate.
2745 * configure: Likewise.
2746
27472016-01-14 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2750 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2751 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2752 arm_get_next_pcs_ctor.
2753
27542016-01-12 Josh Stone <jistone@redhat.com>
2755 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2756
2757 * inferiors.h: Include "gdb_vecs.h".
2758 (struct process_info): Add syscalls_to_catch.
2759 * inferiors.c (remove_process): Free syscalls_to_catch.
2760 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2761 syscall_return stops.
2762 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2763 * server.c (handle_general_set): Handle QCatchSyscalls.
2764 (handle_query): Report support for QCatchSyscalls.
2765 * target.h (struct target_ops): Add supports_catch_syscall.
2766 (target_supports_catch_syscall): New macro.
2767 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2768 (struct lwp_info): Add syscall_state.
2769 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2770 Maintain syscall_state and syscalls_to_catch across exec.
2771 (get_syscall_trapinfo): New function, proxy to the_low_target.
2772 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2773 (linux_low_filter_event): Toggle syscall_state entry/return for
2774 syscall traps, and set it ignored for all others.
2775 (gdb_catching_syscalls_p): New function.
2776 (gdb_catch_this_syscall_p): New function.
2777 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2778 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2779 (linux_supports_catch_syscall): New function.
2780 (linux_target_ops): Install it.
2781 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2782 (the_low_target): Install it.
2783
27842016-01-12 Mike Frysinger <vapier@gentoo.org>
2785
2786 * acinclude.m4: Include new ../warning.m4 file.
2787 * configure: Regenerated.
2788 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2789
27902016-01-12 Mike Frysinger <vapier@gentoo.org>
2791
2792 * ax.c (is_goto_target): Mark static.
2793 * linux-low.c (register_addr): Likewise.
2794 (linux_fetch_registers, linux_store_registers): Likewise.
2795 * mem-break.c (any_persistent_commands): Fix old prototype.
2796 (add_commands_to_breakpoint): Mark static.
2797 * regcache.c (find_register_by_name): Delete unused func.
2798 * remote-utils.c (hex_or_minus_one): Mark static.
2799 * server.c (monitor_show_help): Mark static.
2800 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2801 handle_v_requests): Likewise.
2802
28032016-01-12 Pedro Alves <palves@redhat.com>
2804
2805 Remove use of the registered trademark symbol throughout.
2806
28072016-01-08 Yao Qi <yao.qi@linaro.org>
2808
2809 * remote-utils.c (getpkt): If c is '\003', call target hook
2810 request_interrupt.
2811
28122016-01-06 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2815 linux-aarch32-low.c.
2816 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2817 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2818 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2819 (thumb2_breakpoint): Declare.
2820 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2821 linux-aarch32-low.h.
2822 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2823 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2824 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2825
28262016-01-01 Joel Brobecker <brobecker@adacore.com>
2827
2828 * gdbreplay.c (gdbreplay_version): Change copyright year in
2829 version message.
2830 * server.c (gdbserver_version): Likewise.
2831
28322015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2833
2834 * server.c (crc32_table): Delete.
2835 (crc32): Use libiberty's xcrc32 function.
2836
28372015-12-22 Joel Brobecker <brobecker@adacore.com>
2838
2839 * lynx-low.c (lynx_delete_thread_callback): New function.
2840 (lynx_mourn): Properly delete our process and all of its
2841 threads. Remove call to clear_inferiors.
2842
28432015-12-22 Joel Brobecker <brobecker@adacore.com>
2844
2845 * target.c (thread_search_callback): Add check that
2846 the thread_stopped target callback is not NULL before
2847 calling it.
2848
28492015-12-21 Yao Qi <yao.qi@linaro.org>
2850
2851 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2852 arm breakpoint.
2853
28542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2855
2856 * server.c (handle_query): Call target_supports_software_single_step.
2857
28582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2859
2860 * linux-low.c (single_step): New function.
2861 (linux_resume_one_lwp_throw): Call single_step.
2862 (start_step_over): Likewise.
2863
28642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2865
2866 * Makefile.in (SFILES): Append arch/arm-linux.c,
2867 arch/arm-get-next-pcs.c.
2868 (arm-linux.o): New rule.
2869 (arm-get-next-pcs.o): New rule.
2870 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2871 arm-linux.o.
2872 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2873 to linux-aarch32-low.c.
2874 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2875 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2876 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2877 (thumb2_breakpoint_len): Likewise.
2878 (arm_is_thumb_mode): Make non-static.
2879 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2880 from linux-aarch32-low.c.
2881 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2882 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2883 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2884 (thumb2_breakpoint_len): Likewise.
2885 (arm_is_thumb_mode): New declaration.
2886 * linux-arm-low.c: Include arch/arm-linux.h
2887 aarch/arm-get-next-pcs.h, sys/syscall.h.
2888 (get_next_pcs_ops): New struct.
2889 (get_next_pcs_addr_bits_remove): New function.
2890 (get_next_pcs_is_thumb): New function.
2891 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2892 (arm_sigreturn_next_pc): Likewise.
2893 (get_next_pcs_syscall_next_pc): Likewise.
2894 (arm_gdbserver_get_next_pcs): Likewise.
2895 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2896 Initialize.
2897 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2898 * server.h: Include gdb_vecs.h.
2899
29002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2901
2902 * Makefile.in (SFILES): Append common/common-regcache.c.
2903 (OBS): Append common-regcache.o.
2904 (common-regcache.o): New rule.
2905 * regcache.c (init_register_cache): Initialize cache to
2906 REG_UNAVAILABLE.
2907 (regcache_raw_read_unsigned): New function.
2908 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2909 register_status enum.
2910
29112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2912
2913 * linux-aarch64-low.c (the_low_targets): Rename
2914 breakpoint_reinsert_addr to get_next_pcs.
2915 * linux-arm-low.c (the_low_targets): Likewise.
2916 * linux-bfin-low.c (the_low_targets): Likewise.
2917 * linux-cris-low.c (the_low_targets): Likewise.
2918 * linux-crisv32-low.c (the_low_targets): Likewise.
2919 * linux-low.c (can_software_single_step): Likewise.
2920 (install_software_single_step_breakpoints): New function.
2921 (start_step_over): Use install_software_single_step_breakpoints.
2922 * linux-low.h: New CORE_ADDR vector.
2923 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2924 get_next_pcs.
2925 * linux-mips-low.c (the_low_targets): Likewise.
2926 * linux-nios2-low.c (the_low_targets): Likewise.
2927 * linux-sparc-low.c (the_low_targets): Likewise.
2928
29292015-12-17 Pedro Alves <palves@redhat.com>
2930
2931 * linux-low.c (linux_kill_one_lwp): Remove references to
2932 LinuxThreads.
2933 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2934 to 'kill'.
2935 (linux_init_signals): Delete.
2936 (initialize_low): Adjust.
2937 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2938
29392015-12-16 Pedro Alves <palves@redhat.com>
2940
2941 * configure.ac (compiler warning flags): When testing a
2942 -Wno-foo option, check whether -Wfoo works instead.
2943 * configure: Regenerate.
2944
29452015-12-11 Don Breazeal <donb@codesourcery.com>
2946
2947 * server.c (process_serial_event): Don't exit from gdbserver
2948 in remote mode if there are still active inferiors.
2949
29502015-12-11 Yao Qi <yao.qi@linaro.org>
2951
2952 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2953 arm_breakpoint_at if the process is 32-bit.
2954
29552015-12-11 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2958 arm breakpoint.
2959
29602015-12-07 Yao Qi <yao.qi@linaro.org>
2961
2962 * configure.srv: Append arm.o to srv_tgtobj for
2963 aarch64*-*-linux* target.
2964 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2965 from linux-arm-low.c.
2966 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2967 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2968 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2969 (thumb2_breakpoint_len): Likewise.
2970 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2971 (arm_breakpoint_kinds): Likewise.
2972 (arm_breakpoint_kind_from_pc): Likewise.
2973 (arm_sw_breakpoint_from_kind): Likewise.
2974 (arm_breakpoint_kind_from_current_state): Likewise.
2975 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2976 (arm_sw_breakpoint_from_kind): Declare.
2977 (arm_breakpoint_kind_from_current_state): Declare.
2978 (arm_breakpoint_at): Declare.
2979 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2980 arm_sw_breakpoint_from_kind if process is 32-bit.
2981 (aarch64_breakpoint_kind_from_pc): New function.
2982 (aarch64_breakpoint_kind_from_current_state): New function.
2983 (the_low_target): Initialize fields breakpoint_kind_from_pc
2984 and breakpoint_kind_from_current_state.
2985 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2986 linux-aarch32-low.c.
2987 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2988 (arm_breakpoint, arm_breakpoint_len): Likewise.
2989 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2990 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2991 (arm_is_thumb_mode): Likewise.
2992 (arm_breakpoint_at): Likewise.
2993 (arm_breakpoint_kind_from_pc): Likewise.
2994 (arm_sw_breakpoint_from_kind): Likewise.
2995 (arm_breakpoint_kind_from_current_state): Likewise.
2996
2997 Revert:
2998 2015-08-04 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3001 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3002 * server.c (extended_protocol): Remove "static".
3003 * server.h (extended_protocol): Declare it.
3004
30052015-12-04 Josh Stone <jistone@redhat.com>
3006
3007 * target.h (struct target_ops) <arch_setup>: Rename to ...
3008 (struct target_ops) <post_create_inferior>: ... this.
3009 (target_arch_setup): Rename to ...
3010 (target_post_create_inferior): ... this, calling post_create_inferior.
3011 * server.c (start_inferior): Update target_arch_setup calls to
3012 target_post_create_inferior.
3013 * linux-low.c (linux_low_ptrace_options): Forward declare.
3014 (linux_arch_setup): Update its comment for general use.
3015 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3016 (struct linux_target_ops): Use linux_post_create_inferior.
3017 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3018 to post_create_inferior.
3019 * nto-low.c (struct nto_target_ops): Likewise.
3020 * spu-low.c (struct spu_target_ops): Likewise.
3021 * win32-low.c (struct win32_target_ops): Likewise.
3022
30232015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3024
3025 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3026
30272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3028
3029 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3030 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3031 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3032 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3033 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3034 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3035 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3036 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3037 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3038 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3039 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3040 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3041
30422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3043
3044 * linux-low.c (linux_look_up_symbols): Don't call
3045 linux_supports_traceclone.
3046 * linux-low.h (thread_db_init): Remove use_events argument.
3047 * thread-db.c (thread_db_use_event): Remove global variable.
3048 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3049 (struct thread_db) <td_create_bp>: Remove field.
3050 (thread_db_create_event): Remove function.
3051 (thread_db_enable_reporting): Likewise.
3052 (find_one_thread): Don't check for thread_db_use_events.
3053 (attach_thread): Likewise.
3054 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3055 (try_thread_db_load_1): Don't check for thread_db_use_events.
3056 (thread_db_init): Remove use_events argument and thread events
3057 handling.
3058 (remove_thread_event_breakpoints): Remove function.
3059 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3060
30612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3062
3063 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3064 New function.
3065 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3066 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3068 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3069 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3070 Initialize.
3071 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3072 New function.
3073 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3074 * linux-low.c (can_hardware_single_step): Use
3075 supports_hardware_single_step.
3076 (can_software_single_step): New function.
3077 (start_step_over): Call can_software_single_step.
3078 (linux_supports_hardware_single_step): New function.
3079 (struct target_ops) <supports_software_single_step>: Initialize.
3080 * linux-low.h (struct linux_target_ops)
3081 <supports_hardware_single_step>: Initialize.
3082 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3083 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3084 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3085 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3086 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3087 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3088 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3089 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3090 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3091 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3092 Initialize.
3093 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3094 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3095 Initialize.
3096 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3097 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3098 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3099 New function.
3100 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3101 * target.h (struct target_ops): <supports_software_single_step>:
3102 New field.
3103 (target_supports_software_single_step): New macro.
3104
31052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3106
3107 * linux-low.c (linux_wait_1): Fix pc advance condition.
3108 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3109 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3110
31112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112
3113 * linux-arm-low.c (arm_is_thumb_mode): New function.
3114 (arm_breakpoint_at): Use arm_is_thumb_mode.
3115 (arm_breakpoint_kind_from_current_state): New function.
3116 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3117 Initialize.
3118 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3119 (linux_breakpoint_kind_from_current_state): New function.
3120 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3121 * linux-low.h (struct linux_target_ops)
3122 <breakpoint_kind_from_current_state>: New field.
3123 * target.h (struct target_ops): Likewise.
3124 (target_breakpoint_kind_from_current_state): New macro.
3125
31262015-11-30 Pedro Alves <palves@redhat.com>
3127
3128 * linux-low.c (linux_resume): Wake up the event loop before
3129 returning.
3130
31312015-11-30 Pedro Alves <palves@redhat.com>
3132
3133 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3134 check.
3135 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3136 to -1.
3137 * target.c (struct thread_search): New structure.
3138 (thread_search_callback): New function.
3139 (prev_general_thread): New global.
3140 (prepare_to_access_memory, done_accessing_memory): New functions.
3141 * target.h (prepare_to_access_memory, done_accessing_memory):
3142 Replace macros with function declarations.
3143
31442015-11-30 Pedro Alves <palves@redhat.com>
3145
3146 PR 14618
3147 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3148 report TARGET_WAITKIND_NO_RESUMED.
3149 * remote-utils.c (prepare_resume_reply): Handle
3150 TARGET_WAITKIND_NO_RESUMED.
3151 * server.c (report_no_resumed): New global.
3152 (handle_query) <qSupported>: Handle "no-resumed+". Report
3153 "no-resumed+" support.
3154 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3155 return error if the client doesn't support no-resumed events.
3156 (push_stop_notification): New function.
3157 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3158 events if the client supports them.
3159
31602015-11-30 Pedro Alves <palves@redhat.com>
3161
3162 * linux-low.c (thread_still_has_status_pending_p): Don't check
3163 vCont;t here.
3164 (lwp_resumed): New function.
3165 (status_pending_p_callback): Return early if the LWP is not
3166 supposed to be resumed.
3167
31682015-11-30 Pedro Alves <palves@redhat.com>
3169
3170 * linux-low.c (handle_extended_wait): Assert that the LWP's
3171 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3172 thread create events, leave the new child's status pending.
3173 (linux_low_filter_event): If GDB wants to hear about thread exit
3174 events, leave the LWP marked dead and don't delete it.
3175 (linux_wait_for_event_filtered): Don't check for thread exit.
3176 (filter_exit_event): New function.
3177 (linux_wait_1): Use it, when returning an exit event.
3178 (linux_resume_one_lwp_throw): Assert that the LWP's
3179 waitstatus is TARGET_WAITKIND_IGNORE.
3180 * remote-utils.c (prepare_resume_reply): Handle
3181 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3182 * server.c (report_thread_events): New global.
3183 (handle_general_set): Handle QThreadEvents.
3184 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3185 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3186 TARGET_WAITKIND_THREAD_EXITED.
3187 * server.h (report_thread_events): Declare.
3188
31892015-11-30 Pedro Alves <palves@redhat.com>
3190
3191 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3192 the thread's last_resume_kind was resume_stop.
3193
31942015-11-30 Pedro Alves <palves@redhat.com>
3195
3196 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3197 before returning.
3198
31992015-11-30 Pedro Alves <palves@redhat.com>
3200
3201 * server.c (handle_v_requests): Handle vCtrlC.
3202
32032015-11-30 Pedro Alves <palves@redhat.com>
3204
3205 * gdbthread.h (find_any_thread_of_pid): Declare.
3206 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3207 functions.
3208 * server.c (handle_query): If current_thread is NULL, look for
3209 another thread of the selected process.
3210
32112015-11-26 Daniel Colascione <dancol@dancol.org>
3212 Simon Marchi <simon.marchi@ericsson.com>
3213
3214 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3215 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3216 name in reply.
3217 * target.h (struct target_ops) <thread_name>: New field.
3218 (target_thread_name): New macro.
3219
32202015-11-23 Joel Brobecker <brobecker@adacore.com>
3221
3222 * regcache.h (regcache_invalidate_pid): Add declaration.
3223 * regcache.c (regcache_invalidate_pid): New function, extracted
3224 from regcache_invalidate.
3225 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3226 Add trivial documentation comment.
3227 * lynx-low.c: Use regcache_invalidate_pid instead of
3228 regcache_invalidate.
3229
32302015-11-23 Joel Brobecker <brobecker@adacore.com>
3231
3232 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3233 and Elf64_auxv_t if the target is Android.
3234
32352015-11-22 Doug Evans <xdje42@gmail.com>
3236
3237 * target.h: #include <sys/types.h>.
3238
32392015-11-19 Pedro Alves <palves@redhat.com>
3240
3241 * linux-low.c (linux_process_qsupported): Change prototype.
3242 Adjust.
3243 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3244 Change prototype.
3245 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3246 and adjust to loop over all features.
3247 * server.c (handle_query) <qSupported>: Adjust to call
3248 target_process_qsupported once, passing it a vector of unprocessed
3249 features.
3250 * target.h (struct target_ops) <process_qsupported>: Change
3251 prototype.
3252 (target_process_qsupported): Adjust.
3253
32542015-11-19 Pedro Alves <palves@redhat.com>
3255
3256 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3257 mode.
3258 * configure: Regenerate.
3259
32602015-11-19 Pedro Alves <palves@redhat.com>
3261
3262 * configure: Regenerate.
3263
32642015-11-19 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3267 type to uint32_t.
3268
32692015-11-19 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3272 (struct aarch64_operand): Move enum out.
3273
32742015-11-19 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3277 struct user_fpsimd_state *.
3278 (aarch64_store_fpregset): Likewise.
3279
32802015-11-19 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3283 struct user_pt_regs *.
3284 (aarch64_store_gregset): Likewise.
3285
32862015-11-18 Pedro Alves <palves@redhat.com>
3287
3288 * Makefile.in (all_object_files): Add $IPA_OBJS.
3289
32902015-11-17 Pedro Alves <palves@redhat.com>
3291
3292 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3293 GDB_SIGNAL_0 and gdb_signal_to_string.
3294
32952015-11-17 Pedro Alves <palves@redhat.com>
3296
3297 * win32-low.c (handle_output_debug_string): Remove parameter.
3298 (win32_kill): Remove our_status local and adjust call to
3299 handle_output_debug_string.
3300 (get_child_debug_event): Adjust call to
3301 handle_output_debug_string.
3302
33032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3304
3305 * linux-mips-low.c (mips_fill_gregset): Add cast.
3306 (mips_store_gregset): Likewise.
3307 (mips_fill_fpregset): Likewise.
3308 (mips_store_fpregset): Likewise.
3309
33102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3311
3312 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3313 priv.
3314
33152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3316
3317 * linux-mips-low.c (mips_linux_new_thread): Change type of
3318 watch_type to enum target_hw_bp_type.
3319
33202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3321
3322 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3323 Change return type to arm_hwbp_type.
3324
33252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3326
3327 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3328 (arm_store_gregset): Likewise.
3329 * linux-arm-low.c (arm_get_hwcap): Likewise.
3330 (arm_read_description): Likewise.
3331
33322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3333
3334 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3335
33362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3337
3338 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3339 (ppc_fill_vsxregset): Likewise.
3340 (ppc_store_vsxregset): Likewise.
3341 (ppc_fill_vrregset): Likewise.
3342 (ppc_store_vrregset): Likewise.
3343 (ppc_fill_evrregset): Likewise.
3344 (ppc_store_evrregset): Likewise.
3345
33462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3347
3348 * linux-ppc-low.c (ppc_usrregs_info): Remove
3349 forward-declaration.
3350 (ppc_arch_setup): Move lower in file.
3351
33522015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3353
3354 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3355 (ps_pdwrite): Likewise.
3356
33572015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3358
3359 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3360 to after assert checks.
3361
33622015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3363
3364 * proc-service.c (ps_pdread): Add/adjust casts.
3365 (ps_pdwrite): Add/adjust casts.
3366
33672015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3368
3369 * server.c (handle_search_memory_1): Cast return value of
3370 memmem.
3371
33722015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3373
3374 * server.c (write_qxfer_response): Change type of data to
3375 gdb_byte *.
3376
33772015-10-29 Pedro Alves <palves@redhat.com>
3378
3379 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3380
33812015-10-29 Pedro Alves <palves@redhat.com>
3382
3383 * tracepoint.c (clear_installed_tracepoints): Add casts.
3384
33852015-10-29 Pedro Alves <palves@redhat.com>
3386
3387 * server.c (handle_v_cont, process_serial_event): Add enum
3388 gdb_signal casts to signal parsing code.
3389
33902015-10-29 Pedro Alves <palves@redhat.com>
3391
3392 * linux-low.h (NULL_REGSET): Define.
3393 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3394 * linux-arm-low.c (arm_regsets): Likewise.
3395 * linux-crisv32-low.c (cris_regsets): Likewise.
3396 * linux-m68k-low.c (m68k_regsets): Likewise.
3397 * linux-mips-low.c (mips_regsets): Likewise.
3398 * linux-nios2-low.c (nios2_regsets): Likewise.
3399 * linux-ppc-low.c (ppc_regsets): Likewise.
3400 * linux-s390-low.c (s390_regsets): Likewise.
3401 * linux-sh-low.c (sh_regsets): Likewise.
3402 * linux-sparc-low.c (sparc_regsets): Likewise.
3403 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3404 * linux-tile-low.c (tile_regsets): Likewise.
3405 * linux-x86-low.c (x86_regsets): Likewise.
3406 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3407
34082015-10-29 Pedro Alves <palves@redhat.com>
3409
3410 * linux-low.h (NULL_REGSET): Define.
3411 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3412 * linux-arm-low.c (arm_regsets): Likewise.
3413 * linux-crisv32-low.c (cris_regsets): Likewise.
3414 * linux-m68k-low.c (m68k_regsets): Likewise.
3415 * linux-mips-low.c (mips_regsets): Likewise.
3416 * linux-nios2-low.c (nios2_regsets): Likewise.
3417 * linux-ppc-low.c (ppc_regsets): Likewise.
3418 * linux-s390-low.c (s390_regsets): Likewise.
3419 * linux-sh-low.c (sh_regsets): Likewise.
3420 * linux-sparc-low.c (sparc_regsets): Likewise.
3421 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3422 * linux-tile-low.c (tile_regsets): Likewise.
3423 * linux-x86-low.c (x86_regsets): Likewise.
3424 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3425
34262015-10-26 Doug Evans <dje@google.com>
3427
3428 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3429
34302015-10-26 Doug Evans <dje@google.com>
3431
3432 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3433
34342015-10-26 Doug Evans <dje@google.com>
3435
3436 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3437 for debug_printf.
3438 (attach_thread, find_new_threads_callback): Ditto.
3439
34402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3441
3442 * mem-break.h (set_breakpoint_data): Remove.
3443
34442015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3445
3446 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3447 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3448 (initialize_low): Remove set_breakpoint_data call.
3449 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3450 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3451 (initialize_low): Remove set_breakpoint_data call.
3452 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3453 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3454 (initialize_low): Remove set_breakpoint_data call.
3455
34562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3457
3458 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3459 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3460 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3461 * target.h (target_breakpoint_kind_from_pc): New macro.
3462
34632015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3464
3465 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3466 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3467 the default breakpoint kind.
3468
34692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3470
3471 * linux-arm-low.c (arm_supports_z_point_type): Add software
3472 breakpoint support.
3473
34742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3475
3476 * linux-arm-low.c: Refactor breakpoint definitions.
3477 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3478 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3479
34802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3481
3482 * Makefile.in: Add arm.c/o.
3483 * configure.srv: Likewise.
3484 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3485 (arm_breakpoint_kind_from_pc): New function.
3486 (arm_sw_breakpoint_from_kind): Return proper kind.
3487 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3488
34892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3490
3491 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3492 removal.
3493 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3494 (struct raw_breakpoint) <size>: Remove.
3495 (struct raw_breakpoint) <kind>: Add.
3496 (bp_size): New function.
3497 (bp_opcode): Likewise.
3498 (find_raw_breakpoint_at): Adjust for kind.
3499 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3500 (remove_memory_breakpoint): Adjust for kind call bp_size.
3501 (set_raw_breakpoint_at): Adjust for kind.
3502 (set_breakpoint): Likewise.
3503 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3504 (delete_raw_breakpoint): Adjust for kind.
3505 (delete_breakpoint): Likewise.
3506 (find_gdb_breakpoint): Likewise.
3507 (set_gdb_breakpoint_1): Likewise.
3508 (set_gdb_breakpoint): Likewise.
3509 (delete_gdb_breakpoint_1): Likewise.
3510 (delete_gdb_breakpoint): Likewise.
3511 (uninsert_raw_breakpoint): Likewise.
3512 (reinsert_raw_breakpoint): Likewise.
3513 (set_breakpoint_data): Remove.
3514 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3515 (check_mem_read): Adjust for kind call bp_size.
3516 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3517 (clone_one_breakpoint): Adjust for kind.
3518 * mem-break.h (set_gdb_breakpoint): Likewise.
3519 (delete_gdb_breakpoint): Likewise.
3520 * server.c (process_serial_event): Likewise.
3521
35222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3523
3524 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3525 (struct linux_target_ops) <breakpoint>: Remove.
3526 (struct linux_target_ops) <breakpoint_len>: Remove.
3527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3528 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3529 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3530 (arm_sw_breakpoint_from_kind): New function.
3531 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3532 (struct linux_target_ops) <breakpoint>: Remove.
3533 (struct linux_target_ops) <breakpoint_len>: Remove.
3534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3536 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3537 (struct linux_target_ops) <breakpoint>: Remove.
3538 (struct linux_target_ops) <breakpoint_len>: Remove.
3539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3541 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3542 (struct linux_target_ops) <breakpoint>: Remove.
3543 (struct linux_target_ops) <breakpoint_len>: Remove.
3544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3546 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3547 and sw_breakpoint_from_kind to increment the pc.
3548 (linux_breakpoint_kind_from_pc): New function.
3549 (linux_sw_breakpoint_from_kind): New function.
3550 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3551 (initialize_low): Call breakpoint_kind_from_pc and
3552 sw_breakpoint_from_kind to replace breakpoint_data/len.
3553 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3554 New field.
3555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3556 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3557 (struct linux_target_ops) <breakpoint>: Remove.
3558 (struct linux_target_ops) <breakpoint_len>: Remove.
3559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3561 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3562 (struct linux_target_ops) <breakpoint>: Remove.
3563 (struct linux_target_ops) <breakpoint_len>: Remove.
3564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3566 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3567 (struct linux_target_ops) <breakpoint>: Remove.
3568 (struct linux_target_ops) <breakpoint_len>: Remove.
3569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3571 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3572 (struct linux_target_ops) <breakpoint>: Remove.
3573 (struct linux_target_ops) <breakpoint_len>: Remove.
3574 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3576 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3577 (struct linux_target_ops) <breakpoint>: Remove.
3578 (struct linux_target_ops) <breakpoint_len>: Remove.
3579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3581 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3582 (struct linux_target_ops) <breakpoint>: Remove.
3583 (struct linux_target_ops) <breakpoint_len>: Remove.
3584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3586 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3587 (struct linux_target_ops) <breakpoint>: Remove.
3588 (struct linux_target_ops) <breakpoint_len>: Remove.
3589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3591 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3592 (struct linux_target_ops) <breakpoint>: Remove.
3593 (struct linux_target_ops) <breakpoint_len>: Remove.
3594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3596 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3597 (struct linux_target_ops) <breakpoint>: Remove.
3598 (struct linux_target_ops) <breakpoint_len>: Remove.
3599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3601 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3602 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3603 (struct linux_target_ops) <breakpoint>: Remove.
3604 (struct linux_target_ops) <breakpoint_len>: Remove.
3605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3607 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3608 (struct linux_target_ops) <breakpoint>: Remove.
3609 (struct linux_target_ops) <breakpoint_len>: Remove.
3610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3612
36132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3614
3615 * linux-cris-low.c (cris_get_pc): Remove void arg.
3616
36172015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3618
3619 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3620 variable name.
3621
36222015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3623
3624 * inferiors.c (thread_pid_matches_callback): New function.
3625 (find_thread_process): New function.
3626 (remove_thread): Reset current_thread.
3627 (remove_process): Assert threads have been removed first.
3628
36292015-10-15 Yao Qi <yao.qi@linaro.org>
3630
3631 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3632 if it is 3.
3633 (aarch64_remove_point): Likewise.
3634 * regcache.c (regcache_register_size): New function.
3635
36362015-10-12 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-aarch64-low.c: Update all callers as emit_load_store
3639 is renamed to aarch64_emit_load_store.
3640
36412015-10-12 Yao Qi <yao.qi@linaro.org>
3642
3643 * linux-aarch64-low.c: Update all callers of function renaming
3644 from emit_insn to aarch64_emit_insn.
3645
36462015-10-12 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3649 arch/aarch64-insn.h.
3650 (struct aarch64_memory_operand): Likewise.
3651 (ENCODE): Likewise.
3652 (emit_insn): Move to arch/aarch64-insn.c.
3653 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3654 (emit_load_store): Move to arch/aarch64-insn.c.
3655 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3656 (can_encode_int32): Remove.
3657
36582015-10-12 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3661 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3662 (aarch64_relocate_instruction): Likewise.
3663 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3664 (struct aarch64_insn_visitor): Likewise.
3665
36662015-10-12 Yao Qi <yao.qi@linaro.org>
3667
3668 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3669 (struct aarch64_insn_visitor): New.
3670 (struct aarch64_insn_relocation_data): New.
3671 (aarch64_ftrace_insn_reloc_b): New function.
3672 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3673 (aarch64_ftrace_insn_reloc_cb): Likewise.
3674 (aarch64_ftrace_insn_reloc_tb): Likewise.
3675 (aarch64_ftrace_insn_reloc_adr): Likewise.
3676 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3677 (aarch64_ftrace_insn_reloc_others): Likewise.
3678 (visitor): New.
3679 (aarch64_relocate_instruction): Use visitor.
3680
36812015-10-12 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3684 int. Add argument buf.
3685 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3686 aarch64_relocate_instruction.
3687
36882015-10-12 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3691 argument insn. Remove local variable insn. Don't call
3692 target_read_uint32.
3693 (aarch64_install_fast_tracepoint_jump_pad): Call
3694 target_read_uint32.
3695
36962015-09-30 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3699 (emit_load_store_pair): Likewise.
3700
37012015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3702
3703 * dll.c (match_dll): Add cast(s).
3704 (unloaded_dll): Likewise.
3705 * linux-low.c (second_thread_of_pid_p): Likewise.
3706 (delete_lwp_callback): Likewise.
3707 (count_events_callback): Likewise.
3708 (select_event_lwp_callback): Likewise.
3709 (linux_set_resume_request): Likewise.
3710 * server.c (accumulate_file_name_length): Likewise.
3711 (emit_dll_description): Likewise.
3712 (handle_qxfer_threads_worker): Likewise.
3713 (visit_actioned_threads): Likewise.
3714 * thread-db.c (any_thread_of): Likewise.
3715 * tracepoint.c (same_process_p): Likewise.
3716 (match_blocktype): Likewise.
3717 (build_traceframe_info_xml): Likewise.
3718
37192015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3720
3721 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3722 assignment.
3723 (gdb_unparse_agent_expr): Likewise.
3724 * hostio.c (require_data): Likewise.
3725 (handle_pread): Likewise.
3726 * linux-low.c (disable_regset): Likewise.
3727 (fetch_register): Likewise.
3728 (store_register): Likewise.
3729 (get_dynamic): Likewise.
3730 (linux_qxfer_libraries_svr4): Likewise.
3731 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3732 (set_fast_tracepoint_jump): Likewise.
3733 (uninsert_fast_tracepoint_jumps_at): Likewise.
3734 (reinsert_fast_tracepoint_jumps_at): Likewise.
3735 (validate_inserted_breakpoint): Likewise.
3736 (clone_agent_expr): Likewise.
3737 * regcache.c (init_register_cache): Likewise.
3738 * remote-utils.c (putpkt_binary_1): Likewise.
3739 (decode_M_packet): Likewise.
3740 (decode_X_packet): Likewise.
3741 (look_up_one_symbol): Likewise.
3742 (relocate_instruction): Likewise.
3743 (monitor_output): Likewise.
3744 * server.c (handle_search_memory): Likewise.
3745 (handle_qxfer_exec_file): Likewise.
3746 (handle_qxfer_libraries): Likewise.
3747 (handle_qxfer): Likewise.
3748 (handle_query): Likewise.
3749 (handle_v_cont): Likewise.
3750 (handle_v_run): Likewise.
3751 (captured_main): Likewise.
3752 * target.c (write_inferior_memory): Likewise.
3753 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3754 * tracepoint.c (init_trace_buffer): Likewise.
3755 (add_tracepoint_action): Likewise.
3756 (add_traceframe): Likewise.
3757 (add_traceframe_block): Likewise.
3758 (cmd_qtdpsrc): Likewise.
3759 (cmd_qtdv): Likewise.
3760 (cmd_qtstatus): Likewise.
3761 (response_source): Likewise.
3762 (response_tsv): Likewise.
3763 (cmd_qtnotes): Likewise.
3764 (gdb_collect): Likewise.
3765 (initialize_tracepoint): Likewise.
3766
37672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3768
3769 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3770 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3771 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3772 <NOP>: New.
3773 (enum aarch64_condition_codes): New enum.
3774 (w0): New static global.
3775 (fp): Likewise.
3776 (lr): Likewise.
3777 (struct aarch64_memory_operand) <type>: New
3778 MEMORY_OPERAND_POSTINDEX type.
3779 (postindex_memory_operand): New helper function.
3780 (emit_ret): New function.
3781 (emit_load_store_pair): New function, factored out of emit_stp
3782 with support for MEMORY_OPERAND_POSTINDEX.
3783 (emit_stp): Rewrite using emit_load_store_pair.
3784 (emit_ldp): New function.
3785 (emit_load_store): Likewise.
3786 (emit_ldr): Mention post-index instruction in comment.
3787 (emit_ldrh): New function.
3788 (emit_ldrb): New function.
3789 (emit_ldrsw): Mention post-index instruction in comment.
3790 (emit_str): Likewise.
3791 (emit_subs): New function.
3792 (emit_cmp): Likewise.
3793 (emit_and): Likewise.
3794 (emit_orr): Likewise.
3795 (emit_orn): Likewise.
3796 (emit_eor): Likewise.
3797 (emit_mvn): Likewise.
3798 (emit_lslv): Likewise.
3799 (emit_lsrv): Likewise.
3800 (emit_asrv): Likewise.
3801 (emit_mul): Likewise.
3802 (emit_sbfm): Likewise.
3803 (emit_sbfx): Likewise.
3804 (emit_ubfm): Likewise.
3805 (emit_ubfx): Likewise.
3806 (emit_csinc): Likewise.
3807 (emit_cset): Likewise.
3808 (emit_nop): Likewise.
3809 (emit_ops_insns): New helper function.
3810 (emit_pop): Likewise.
3811 (emit_push): Likewise.
3812 (aarch64_emit_prologue): New function.
3813 (aarch64_emit_epilogue): Likewise.
3814 (aarch64_emit_add): Likewise.
3815 (aarch64_emit_sub): Likewise.
3816 (aarch64_emit_mul): Likewise.
3817 (aarch64_emit_lsh): Likewise.
3818 (aarch64_emit_rsh_signed): Likewise.
3819 (aarch64_emit_rsh_unsigned): Likewise.
3820 (aarch64_emit_ext): Likewise.
3821 (aarch64_emit_log_not): Likewise.
3822 (aarch64_emit_bit_and): Likewise.
3823 (aarch64_emit_bit_or): Likewise.
3824 (aarch64_emit_bit_xor): Likewise.
3825 (aarch64_emit_bit_not): Likewise.
3826 (aarch64_emit_equal): Likewise.
3827 (aarch64_emit_less_signed): Likewise.
3828 (aarch64_emit_less_unsigned): Likewise.
3829 (aarch64_emit_ref): Likewise.
3830 (aarch64_emit_if_goto): Likewise.
3831 (aarch64_emit_goto): Likewise.
3832 (aarch64_write_goto_address): Likewise.
3833 (aarch64_emit_const): Likewise.
3834 (aarch64_emit_call): Likewise.
3835 (aarch64_emit_reg): Likewise.
3836 (aarch64_emit_pop): Likewise.
3837 (aarch64_emit_stack_flush): Likewise.
3838 (aarch64_emit_zero_ext): Likewise.
3839 (aarch64_emit_swap): Likewise.
3840 (aarch64_emit_stack_adjust): Likewise.
3841 (aarch64_emit_int_call_1): Likewise.
3842 (aarch64_emit_void_call_2): Likewise.
3843 (aarch64_emit_eq_goto): Likewise.
3844 (aarch64_emit_ne_goto): Likewise.
3845 (aarch64_emit_lt_goto): Likewise.
3846 (aarch64_emit_le_goto): Likewise.
3847 (aarch64_emit_gt_goto): Likewise.
3848 (aarch64_emit_ge_got): Likewise.
3849 (aarch64_emit_ops_impl): New static global variable.
3850 (aarch64_emit_ops): New target function, return
3851 &aarch64_emit_ops_impl.
3852 (struct linux_target_ops): Install it.
3853
38542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3855
3856 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3857 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3858 aarch64-ipa.o.
3859 * linux-aarch64-ipa.c: New file.
3860 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3861 and endian.h.
3862 (aarch64_get_thread_area): New target method.
3863 (extract_signed_bitfield): New helper function.
3864 (aarch64_decode_ldr_literal): New function.
3865 (enum aarch64_opcodes): New enum.
3866 (struct aarch64_register): New struct.
3867 (struct aarch64_operand): New struct.
3868 (x0): New static global.
3869 (x1): Likewise.
3870 (x2): Likewise.
3871 (x3): Likewise.
3872 (x4): Likewise.
3873 (w2): Likewise.
3874 (ip0): Likewise.
3875 (sp): Likewise.
3876 (xzr): Likewise.
3877 (aarch64_register): New helper function.
3878 (register_operand): Likewise.
3879 (immediate_operand): Likewise.
3880 (struct aarch64_memory_operand): New struct.
3881 (offset_memory_operand): New helper function.
3882 (preindex_memory_operand): Likewise.
3883 (enum aarch64_system_control_registers): New enum.
3884 (ENCODE): New macro.
3885 (emit_insn): New helper function.
3886 (emit_b): New function.
3887 (emit_bcond): Likewise.
3888 (emit_cb): Likewise.
3889 (emit_tb): Likewise.
3890 (emit_blr): Likewise.
3891 (emit_stp): Likewise.
3892 (emit_ldp_q_offset): Likewise.
3893 (emit_stp_q_offset): Likewise.
3894 (emit_load_store): Likewise.
3895 (emit_ldr): Likewise.
3896 (emit_ldrsw): Likewise.
3897 (emit_str): Likewise.
3898 (emit_ldaxr): Likewise.
3899 (emit_stxr): Likewise.
3900 (emit_stlr): Likewise.
3901 (emit_data_processing_reg): Likewise.
3902 (emit_data_processing): Likewise.
3903 (emit_add): Likewise.
3904 (emit_sub): Likewise.
3905 (emit_mov): Likewise.
3906 (emit_movk): Likewise.
3907 (emit_mov_addr): Likewise.
3908 (emit_mrs): Likewise.
3909 (emit_msr): Likewise.
3910 (emit_sevl): Likewise.
3911 (emit_wfe): Likewise.
3912 (append_insns): Likewise.
3913 (can_encode_int32_in): New helper function.
3914 (aarch64_relocate_instruction): New function.
3915 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3916 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3917 (struct linux_target_ops): Install aarch64_get_thread_area,
3918 aarch64_install_fast_tracepoint_jump_pad and
3919 aarch64_get_min_fast_tracepoint_insn_len.
3920
39212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3922
3923 * Makefile.in (aarch64-insn.o): New rule.
3924 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3925
39262015-09-21 Yao Qi <yao.qi@linaro.org>
3927
3928 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3929
39302015-09-21 Yao Qi <yao.qi@linaro.org>
3931
3932 * tracepoint.c (max_jump_pad_size): Remove.
3933
39342015-09-18 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-aarch64-low.c: Don't include sys/uio.h.
3937 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3938
39392015-09-16 Wei-cheng Wang <cole945@gmail.com>
3940
3941 * tracepoint.c (eval_result_type): Change prototype.
3942 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3943
39442015-09-15 Pedro Alves <palves@redhat.com>
3945
3946 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3947 Check whether to report exec events instead of checking whether
3948 multiprocess is enabled.
3949
39502015-09-15 Pedro Alves <palves@redhat.com>
3951
3952 PR remote/18965
3953 * remote-utils.c (prepare_resume_reply): Merge
3954 TARGET_WAITKIND_VFORK_DONE switch case with the
3955 TARGET_WAITKIND_FORKED case.
3956
39572015-09-15 Yao Qi <yao.qi@linaro.org>
3958
3959 * server.c (handle_query): Check string comparison using
3960 "else if" instead of "if".
3961
39622015-09-15 Yao Qi <yao.qi@linaro.org>
3963
3964 * server.c (vCont_supported): New global variable.
3965 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3966 matches. Append ";vContSupported+" to own_buf.
3967 (handle_v_requests): Append ";s;S" to own_buf if target supports
3968 hardware single step or vCont_supported is false.
3969 (capture_main): Set vCont_supported to zero.
3970
39712015-09-15 Yao Qi <yao.qi@linaro.org>
3972
3973 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3974 it to ...
3975 (linux_supports_hardware_single_step): ... New function.
3976 (linux_target_ops): Update.
3977 * lynx-low.c (lynx_target_ops): Set field
3978 supports_hardware_single_step to target_can_do_hardware_single_step.
3979 * nto-low.c (nto_target_ops): Likewise.
3980 * spu-low.c (spu_target_ops): Likewise.
3981 * win32-low.c (win32_target_ops): Likewise.
3982 * target.c (target_can_do_hardware_single_step): New function.
3983 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3984 Remove. <supports_hardware_single_step>: New field.
3985 (target_supports_conditional_breakpoints): Remove.
3986 (target_supports_hardware_single_step): New macro.
3987 (target_can_do_hardware_single_step): Declare.
3988 * server.c (handle_query): Use target_supports_hardware_single_step
3989 instead of target_supports_conditional_breakpoints.
3990
39912015-09-15 Yao Qi <yao.qi@linaro.org>
3992
3993 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3994 function.
3995 (struct linux_target_ops the_low_target): Install
3996 aarch64_linux_siginfo_fixup.
3997
39982015-09-11 Don Breazeal <donb@codesourcery.com>
3999 Luis Machado <lgustavo@codesourcery.com>
4000
4001 * linux-low.c (linux_mourn): Static declaration.
4002 (linux_arch_setup): Move in front of
4003 handle_extended_wait.
4004 (linux_arch_setup_thread): New function.
4005 (handle_extended_wait): Handle exec events. Call
4006 linux_arch_setup_thread. Make event_lwp argument a
4007 pointer-to-a-pointer.
4008 (check_zombie_leaders): Do not check stopped threads.
4009 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4010 (linux_low_filter_event): Add lwp and thread for exec'ing
4011 non-leader thread if leader thread has been deleted.
4012 Refactor code into linux_arch_setup_thread and call it.
4013 Pass child lwp pointer by reference to handle_extended_wait.
4014 (linux_wait_for_event_filtered): Update comment.
4015 (linux_wait_1): Prevent clobbering exec event status.
4016 (linux_supports_exec_events): New function.
4017 (linux_target_ops) <supports_exec_events>: Initialize new member.
4018 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4019 new member.
4020 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4021 * server.c (report_exec_events): New global variable.
4022 (handle_query): Handle qSupported query for exec-events feature.
4023 (captured_main): Initialize report_exec_events.
4024 * server.h (report_exec_events): Declare new global variable.
4025 * target.h (struct target_ops) <supports_exec_events>: New
4026 member.
4027 (target_supports_exec_events): New macro.
4028 * win32-low.c (win32_target_ops) <supports_exec_events>:
4029 Initialize new member.
4030
40312015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4032
4033 * linux-low.c (linux_low_enable_btrace): Remove.
4034 (linux_target_ops): Replace linux_low_enable_btrace with
4035 linux_enable_btrace.
4036
40372015-09-03 Yao Qi <yao.qi@linaro.org>
4038
4039 * linux-aarch64-low.c (aarch64_insert_point): Call
4040 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4041 returns true.
4042
40432015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4044
4045 * linux-low.c (check_stopped_by_breakpoint): Use
4046 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4047
40482015-08-27 Pedro Alves <palves@redhat.com>
4049
4050 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4051
40522015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4055 the XNEW-family equivalent.
4056 (compile_bytecodes): Likewise.
4057 * dll.c (loaded_dll): Likewise.
4058 * event-loop.c (append_callback_event): Likewise.
4059 (create_file_handler): Likewise.
4060 (create_file_event): Likewise.
4061 * hostio.c (handle_open): Likewise.
4062 * inferiors.c (add_thread): Likewise.
4063 (add_process): Likewise.
4064 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4065 * linux-arm-low.c (arm_new_process): Likewise.
4066 (arm_new_thread): Likewise.
4067 * linux-low.c (add_to_pid_list): Likewise.
4068 (linux_add_process): Likewise.
4069 (handle_extended_wait): Likewise.
4070 (add_lwp): Likewise.
4071 (enqueue_one_deferred_signal): Likewise.
4072 (enqueue_pending_signal): Likewise.
4073 (linux_resume_one_lwp_throw): Likewise.
4074 (linux_resume_one_thread): Likewise.
4075 (linux_read_memory): Likewise.
4076 (linux_write_memory): Likewise.
4077 * linux-mips-low.c (mips_linux_new_process): Likewise.
4078 (mips_linux_new_thread): Likewise.
4079 (mips_add_watchpoint): Likewise.
4080 * linux-x86-low.c (initialize_low_arch): Likewise.
4081 * lynx-low.c (lynx_add_process): Likewise.
4082 * mem-break.c (set_raw_breakpoint_at): Likewise.
4083 (set_breakpoint): Likewise.
4084 (add_condition_to_breakpoint): Likewise.
4085 (add_commands_to_breakpoint): Likewise.
4086 (clone_agent_expr): Likewise.
4087 (clone_one_breakpoint): Likewise.
4088 * regcache.c (new_register_cache): Likewise.
4089 * remote-utils.c (look_up_one_symbol): Likewise.
4090 * server.c (queue_stop_reply): Likewise.
4091 (start_inferior): Likewise.
4092 (queue_stop_reply_callback): Likewise.
4093 (handle_target_event): Likewise.
4094 * spu-low.c (fetch_ppc_memory): Likewise.
4095 (store_ppc_memory): Likewise.
4096 * target.c (set_target_ops): Likewise.
4097 * thread-db.c (thread_db_load_search): Likewise.
4098 (try_thread_db_load_1): Likewise.
4099 * tracepoint.c (add_tracepoint): Likewise.
4100 (add_tracepoint_action): Likewise.
4101 (create_trace_state_variable): Likewise.
4102 (cmd_qtdpsrc): Likewise.
4103 (cmd_qtro): Likewise.
4104 (add_while_stepping_state): Likewise.
4105 * win32-low.c (child_add_thread): Likewise.
4106 (get_image_name): Likewise.
4107
41082015-08-25 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4111
41122015-08-25 Yao Qi <yao.qi@linaro.org>
4113
4114 * Makefile.in (aarch64-linux.o): New rule.
4115 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4116 srv_tgtobj.
4117 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4118 (aarch64_init_debug_reg_state): Make it extern.
4119 (aarch64_linux_prepare_to_resume): Remove.
4120
41212015-08-25 Yao Qi <yao.qi@linaro.org>
4122
4123 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4124 lwp_arch_private_info and ptid_of_lwp.
4125
41262015-08-25 Yao Qi <yao.qi@linaro.org>
4127
4128 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4129 Find proc_info by find_process_pid. All callers updated.
4130
41312015-08-25 Yao Qi <yao.qi@linaro.org>
4132
4133 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4134 Remove.
4135 (debug_reg_change_callback): Remove.
4136 (aarch64_notify_debug_reg_change): Remove.
4137
41382015-08-25 Yao Qi <yao.qi@linaro.org>
4139
4140 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4141 Call current_lwp_ptid.
4142
41432015-08-25 Yao Qi <yao.qi@linaro.org>
4144
4145 * linux-aarch64-low.c (debug_reg_change_callback): Use
4146 debug_printf.
4147
41482015-08-25 Yao Qi <yao.qi@linaro.org>
4149
4150 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4151
41522015-08-25 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4155
41562015-08-25 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4159 the code.
4160
41612015-08-25 Yao Qi <yao.qi@linaro.org>
4162
4163 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4164 Remove.
4165 (debug_reg_change_callback): Remove argument entry and add argument
4166 lwp. Remove local variable thread. Don't print thread id in the
4167 debugging output. Don't check whether pid of thread equals to pid.
4168 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4169 iterate_over_lwps instead find_inferior.
4170
41712015-08-24 Pedro Alves <palves@redhat.com>
4172
4173 * inferiors.c (get_first_process): New function.
4174 * inferiors.h (get_first_process): New declaration.
4175 * remote-utils.c (read_ptid): Default to the first process in the
4176 list, instead of to the current thread's process.
4177
41782015-08-24 Pedro Alves <palves@redhat.com>
4179
4180 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4181 * event-loop.c: Likewise.
4182 * remote-utils.c: Likewise.
4183 * tracepoint.c: Likewise.
4184
41852015-08-24 Pedro Alves <palves@redhat.com>
4186
4187 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4188 ptid_get_lwp.
4189
41902015-08-21 Pedro Alves <palves@redhat.com>
4191
4192 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4193 instead of literal 1.
4194
41952015-08-21 Pedro Alves <palves@redhat.com>
4196
4197 * tdesc.c (default_description): Explicitly zero-initialize.
4198
41992015-08-21 Pedro Alves <palves@redhat.com>
4200
4201 PR gdb/18749
4202 * inferiors.c (remove_thread): Discard any pending stop reply for
4203 this thread.
4204 * server.c (remove_all_on_match_pid): Rename to ...
4205 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4206 instead of a pid.
4207 (discard_queued_stop_replies): Change parameter to a ptid. Now
4208 extern.
4209 (handle_v_kill, kill_inferior_callback, captured_main)
4210 (process_serial_event): Adjust.
4211 * server.h (discard_queued_stop_replies): Declare.
4212
42132015-08-21 Pedro Alves <palves@redhat.com>
4214
4215 * linux-low.c (wait_for_sigstop): Always switch to no thread
4216 selected if the previously current thread dies.
4217 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4218 process instead of the current thread's.
4219 * remote-utils.c (input_interrupt): Don't check if there's no
4220 current thread.
4221 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4222 current thread to the general thread fails, error out.
4223 (handle_qxfer_auxv, handle_qxfer_libraries)
4224 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4225 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4226 (handle_query): Check if there's a thread selected instead of
4227 checking whether there's any thread in the thread list.
4228 (handle_qxfer_threads, handle_qxfer_btrace)
4229 (handle_qxfer_btrace_conf): Don't error out early if there's no
4230 thread in the thread list.
4231 (handle_v_cont, myresume): Don't set the current thread to the
4232 continue thread.
4233 (process_serial_event) <Hg handling>: Also set thread_id if the
4234 previous general thread is still alive.
4235 (process_serial_event) <g/G handling>: If setting the current
4236 thread to the general thread fails, error out.
4237 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4238 thread's lwp instead of the current thread's.
4239 * target.c (set_desired_thread): If the desired thread was not
4240 found, leave the current thread pointing to NULL. Return an int
4241 (boolean) indicating success.
4242 * target.h (set_desired_thread): Change return type to int.
4243
42442015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4245
4246 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4247 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4248 #includes.
4249 (ps_get_thread_area): New function.
4250
42512015-08-19 Gary Benson <gbenson@redhat.com>
4252
4253 * hostio.c (handle_pread): Do not attempt to read more data
4254 than hostio_reply_with_data can fit in a packet.
4255
42562015-08-18 Joel Brobecker <brobecker@adacore.com>
4257
4258 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4259
42602015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4261
4262 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4263
42642015-08-06 Pedro Alves <palves@redhat.com>
4265
4266 * tracepoint.c (expr_eval_result): Now an int.
4267
42682015-08-06 Pedro Alves <palves@redhat.com>
4269
4270 * gdbthread.h (struct regcache): Forward declare.
4271 (struct thread_info) <regcache_data>: Now a struct regcache
4272 pointer.
4273 * inferiors.c (inferior_regcache_data)
4274 (set_inferior_regcache_data): Now work with struct regcache
4275 pointers.
4276 * inferiors.h (struct regcache): Forward declare.
4277 (inferior_regcache_data, set_inferior_regcache_data): Now work
4278 with struct regcache pointers.
4279 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4280 (free_register_cache_thread): Remove struct regcache pointer
4281 casts.
4282
42832015-08-06 Pedro Alves <palves@redhat.com>
4284
4285 * server.c (captured_main): On error, print the exception message
4286 to stderr, and if run_once is set, throw a quit.
4287
42882015-08-06 Pedro Alves <palves@redhat.com>
4289
4290 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4291 the current thread.
4292
42932015-08-06 Pedro Alves <palves@redhat.com>
4294
4295 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4296 reading beyond the passed in buffer length.
4297
42982015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4299
4300 * tracepoint.c (symbol_list) <required>: Remove.
4301
43022015-08-06 Pedro Alves <palves@redhat.com>
4303
4304 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4305 count if stopping and suspending threads.
4306 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4307 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4308 (linux_detach): Complete an ongoing step-over.
4309 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4310 throughout.
4311 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4312 (linux_wait_1): If passing a signal to the inferior after
4313 finishing a step-over, unsuspend and re-resume all lwps. If we
4314 see a single-step event but the thread should be continuing, don't
4315 pass the trap to gdb.
4316 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4317 internal_error instead of gdb_assert.
4318 (enqueue_pending_signal): New function.
4319 (check_ptrace_stopped_lwp_gone): Add debug output.
4320 (start_step_over): Use internal_error instead of gdb_assert.
4321 (complete_ongoing_step_over): New function.
4322 (linux_resume_one_thread): Don't resume a suspended thread.
4323 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4324 it stepping.
4325
43262015-08-06 Pedro Alves <palves@redhat.com>
4327
4328 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4329 (linux_thread_alive): Use lwp_is_marked_dead.
4330 (extended_event_reported): Delete.
4331 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4332 instead of extended_event_reported.
4333 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4334 as well.
4335 (lwp_is_marked_dead): New function.
4336 (lwp_running): Use lwp_is_marked_dead.
4337 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4338 comment.
4339
43402015-08-06 Pedro Alves <palves@redhat.com>
4341
4342 * linux-low.c (linux_wait_1): Move fork event output out of the
4343 !report_to_gdb check. Pass event_child->waitstatus to
4344 target_waitstatus_to_string instead of ourstatus.
4345
43462015-08-04 Yao Qi <yao.qi@linaro.org>
4347
4348 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4349 if current_thread is 32 bit.
4350
43512015-08-04 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4354 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4355 * server.c (extended_protocol): Remove "static".
4356 * server.h (extended_protocol): Declare it.
4357
43582015-08-04 Yao Qi <yao.qi@linaro.org>
4359
4360 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4361 both aarch64 and aarch32.
4362 (aarch64_set_pc): Likewise.
4363
43642015-08-04 Yao Qi <yao.qi@linaro.org>
4365
4366 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4367 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4368 arm-with-neon.xml to srv_xmlfiles.
4369 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4370 (is_64bit_tdesc): New function.
4371 (aarch64_linux_read_description): New function.
4372 (aarch64_arch_setup): Call aarch64_linux_read_description.
4373 (regs_info): Rename to regs_info_aarch64.
4374 (aarch64_regs_info): Return right regs_info.
4375 (initialize_low_arch): Call initialize_low_arch_aarch32.
4376
43772015-08-04 Yao Qi <yao.qi@linaro.org>
4378
4379 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4380 * linux-aarch32-low.c: New file.
4381 * linux-aarch32-low.h: New file.
4382 * linux-arm-low.c (arm_fill_gregset): Move it to
4383 linux-aarch32-low.c.
4384 (arm_store_gregset): Likewise.
4385 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4386 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4387 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4388 (regs_info): Rename to regs_info_arm.
4389 (arm_regs_info): Return regs_info_aarch32 if
4390 have_ptrace_getregset is 1 and target description is
4391 arm_with_neon or arm_with_vfpv3.
4392 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4393 Call initialize_low_arch_aarch32 instead.
4394
43952015-08-04 Yao Qi <yao.qi@linaro.org>
4396
4397 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4398 * linux-low.c: ... here.
4399 * linux-low.h (have_ptrace_getregset): Declare it.
4400
44012015-08-04 Pedro Alves <palves@redhat.com>
4402
4403 * thread-db.c (struct thread_db): Use new typedefs.
4404 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4405 CHK calls.
4406 (disable_thread_event_reporting): Cast result of dlsym to
4407 destination function pointer type.
4408 (thread_db_mourn): Use td_ta_delete_ftype.
4409
44102015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4411
4412 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4413 arch variant.
4414 (CDX_BREAKPOINT): Define for R2.
4415 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4416 (the_low_target): Add comments.
4417
44182015-07-30 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-arm-low.c (arm_hwcap): Remove it.
4421 (arm_read_description): New local variable arm_hwcap. Don't
4422 set arm_hwcap to zero.
4423
44242015-07-30 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4427 Use regcache->tdesc instead.
4428 (arm_store_wmmxregset): Likewise.
4429 (arm_fill_vfpregset): Likewise.
4430 (arm_store_vfpregset): Likewise.
4431
44322015-07-30 Yao Qi <yao.qi@linaro.org>
4433
4434 * linux-arm-low.c: Include arch/arm.h.
4435 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4436 (arm_store_gregset): Likewise.
4437
44382015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4439
4440 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4441 ptrace's 4th parameter.
4442
44432015-07-27 Yao Qi <yao.qi@linaro.org>
4444
4445 * configure.srv (case aarch64*-*-linux*): Don't set
4446 srv_linux_usrregs.
4447
44482015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4449
4450 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4451 sys/ptrace.h.
4452 * linux-arm-low.c: Likewise.
4453 * linux-cris-low.c: Likewise.
4454 * linux-crisv32-low.c: Likewise.
4455 * linux-low.c: Likewise.
4456 * linux-m68k-low.c: Likewise.
4457 * linux-mips-low.c: Likewise.
4458 * linux-nios2-low.c: Likewise.
4459 * linux-s390-low.c: Likewise.
4460 * linux-sparc-low.c: Likewise.
4461 * linux-tic6x-low.c: Likewise.
4462 * linux-tile-low.c: Likewise.
4463 * linux-x86-low.c: Likewise.
4464
44652015-07-24 Pedro Alves <palves@redhat.com>
4466
4467 * config.in: Regenerate.
4468 * configure: Regenerate.
4469
44702015-07-24 Pedro Alves <palves@redhat.com>
4471
4472 * acinclude.m4: Include ../ptrace.m4.
4473 * configure.ac: Call GDB_AC_PTRACE.
4474 * config.in, configure: Regenerate.
4475
44762015-07-24 Yao Qi <yao.qi@linaro.org>
4477
4478 * linux-low.c (linux_create_inferior): Remove setting to
4479 proc->priv->new_inferior.
4480 (linux_attach): Likewise.
4481 (linux_low_filter_event): Likewise.
4482 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4483
44842015-07-24 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-low.c (linux_arch_setup): New function.
4487 (linux_low_filter_event): If proc->tdesc is NULL and
4488 proc->attached is true, call the_low_target.arch_setup.
4489 Otherwise, keep status pending, and return.
4490 (linux_resume_one_lwp_throw): Don't call get_pc if
4491 thread->while_stepping isn't NULL. Don't call
4492 get_thread_regcache if proc->tdesc is NULL.
4493 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4494 (linux_target_ops): Install arch_setup.
4495 * server.c (start_inferior): Call the_target->arch_setup.
4496 * target.h (struct target_ops) <arch_setup>: New field.
4497 (target_arch_setup): New marco.
4498 * lynx-low.c (lynx_target_ops): Update.
4499 * nto-low.c (nto_target_ops): Update.
4500 * spu-low.c (spu_target_ops): Update.
4501 * win32-low.c (win32_target_ops): Update.
4502
45032015-07-24 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-low.c (linux_add_process): Don't set
4506 proc->priv->new_inferior.
4507 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4508 (linux_attach): Likewise.
4509
45102015-07-24 Yao Qi <yao.qi@linaro.org>
4511
4512 * server.c (start_inferior): Code refactor.
4513
45142015-07-24 Yao Qi <yao.qi@linaro.org>
4515
4516 * server.c (process_serial_event): Set general_thread.
4517
45182015-07-21 Yao Qi <yao.qi@linaro.org>
4519
4520 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4521 aarch64_linux_get_debug_reg_capacity.
4522
45232015-07-17 Yao Qi <yao.qi@linaro.org>
4524
4525 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4526 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4527 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4528 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4529 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4530 (AARCH64_HWP_ALIGNMENT): Likewise.
4531 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4532 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4533 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4534 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4535 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4536 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4537 (struct aarch64_debug_reg_state): Likewise.
4538 (struct arch_lwp_info): Likewise.
4539 (aarch64_align_watchpoint): Likewise.
4540 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4541 (aarch64_watchpoint_length): Likewise.
4542 (aarch64_point_encode_ctrl_reg): Likewise
4543 (aarch64_point_is_aligned): Likewise.
4544 (aarch64_align_watchpoint): Likewise.
4545 (aarch64_linux_set_debug_regs):
4546 (aarch64_dr_state_insert_one_point): Likewise.
4547 (aarch64_dr_state_remove_one_point): Likewise.
4548 (aarch64_handle_breakpoint): Likewise.
4549 (aarch64_handle_aligned_watchpoint): Likewise.
4550 (aarch64_handle_unaligned_watchpoint): Likewise.
4551 (aarch64_handle_watchpoint): Likewise.
4552
45532015-07-17 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4556 and don't aarch64_get_debug_reg_state. All callers update.
4557 (aarch64_handle_aligned_watchpoint): Likewise.
4558 (aarch64_handle_unaligned_watchpoint): Likewise.
4559 (aarch64_handle_watchpoint): Likewise.
4560 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4561 (aarch64_remove_point): Likewise.
4562
45632015-07-17 Yao Qi <yao.qi@linaro.org>
4564
4565 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4566 debug_printf.
4567 (aarch64_handle_unaligned_watchpoint): Likewise.
4568
45692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4570
4571 Revert the previous 3 commits:
4572 Move gdb_regex* to common/
4573 Move linux_find_memory_regions_full & co.
4574 gdbserver build-id attribute generator
4575
45762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4577 Jan Kratochvil <jan.kratochvil@redhat.com>
4578
4579 gdbserver build-id attribute generator.
4580 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4581 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4582 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4583 (find_phdr): New.
4584 (get_dynamic): Use find_pdhr to traverse program headers.
4585 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4586 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4587 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4588 (get_hex_build_id): New.
4589 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4590 to reply XML document.
4591
45922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4593 Jan Kratochvil <jan.kratochvil@redhat.com>
4594
4595 * target.c: Include target/target-utils.h and fcntl.h.
4596 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4597 (target_fileio_read_stralloc): New functions.
4598
45992015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4600
4601 * Makefile.in (OBS): Add gdb_regex.o.
4602 (gdb_regex.o): New.
4603 * config.in: Rebuilt.
4604 * configure: Rebuilt.
4605
46062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4607 Jan Kratochvil <jan.kratochvil@redhat.com>
4608
4609 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4610 * Makefile.in (OBS): Add target-utils.o.
4611 (linux-maps.o, target-utils.o): New.
4612 * configure.srv (srv_linux_obj): Add linux-maps.o.
4613
46142015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4615
4616 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4617 function, return 1.
4618 (the_low_target): Install it.
4619
46202015-07-14 Pedro Alves <palves@redhat.com>
4621
4622 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4623 Instead, ignore ECHILD, and throw an error for other errnos.
4624
46252015-07-10 Pedro Alves <palves@redhat.com>
4626
4627 * event-loop.c (struct callback_event) <data>: Change type to
4628 gdb_client_data instance instead of gdb_client_data pointer.
4629 (append_callback_event): Adjust.
4630
46312015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4632
4633 * linux-aarch64-low.c: Add comments for each linux_target_ops
4634 method. Remove comments already covered in target_ops and
4635 linux_target_ops definitions.
4636 (the_low_target): Add comments for each unimplemented method.
4637
46382015-07-09 Yao Qi <yao.qi@linaro.org>
4639
4640 * linux-aarch64-low.c (aarch64_regmap): Remove.
4641 (aarch64_usrregs_info): Remove.
4642 (regs_info): Set field usrregs to NULL.
4643
46442015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4645
4646 * linux-low.c: Include "rsp-low.h"
4647 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4648 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4649 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4650 (handle_btrace_enable_pt): New.
4651 (handle_btrace_general_set): Support "pt".
4652 (handle_btrace_conf_general_set): Support "pt:size".
4653
46542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4655
4656 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4657 Z_PACKET_SW_BP.
4658
46592015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4660
4661 * linux-aarch64-low.c: Remove comment about endianness.
4662 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4663 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4664 memcmp.
4665
46662015-06-24 Gary Benson <gbenson@redhat.com>
4667
4668 * linux-i386-ipa.c (stdint.h): Do not include.
4669 * lynx-i386-low.c (stdint.h): Likewise.
4670 * lynx-ppc-low.c (stdint.h): Likewise.
4671 * mem-break.c (stdint.h): Likewise.
4672 * thread-db.c (stdint.h): Likewise.
4673 * tracepoint.c (stdint.h): Likewise.
4674 * win32-low.c (stdint.h): Likewise.
4675
46762015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4677
4678 * server.c (write_qxfer_response): Update call to
4679 remote_escape_output.
4680
46812015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4682 Jan Kratochvil <jan.kratochvil@redhat.com>
4683
4684 Merge multiple hex conversions.
4685 * gdbreplay.c (tohex): Rename to 'fromhex'.
4686 (logchar): Use fromhex.
4687
46882015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4689
4690 * server.c (handle_qxfer_libraries): Set `version' attribute for
4691 <library-list>.
4692
46932015-06-10 Gary Benson <gbenson@redhat.com>
4694
4695 * target.h (struct target_ops) <multifs_open>: New field.
4696 <multifs_unlink>: Likewise.
4697 <multifs_readlink>: Likewise.
4698 * linux-low.c (nat/linux-namespaces.h): New include.
4699 (linux_target_ops): Initialize the_target->multifs_open,
4700 the_target->multifs_unlink and the_target->multifs_readlink.
4701 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4702 * hostio.c (hostio_fs_pid): New static variable.
4703 (hostio_handle_new_gdb_connection): New function.
4704 (handle_setfs): Likewise.
4705 (handle_open): Use the_target->multifs_open as appropriate.
4706 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4707 (handle_readlink): Use the_target->multifs_readlink as
4708 appropriate.
4709 (handle_vFile): Handle vFile:setfs packets.
4710 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4711 after target_handle_new_gdb_connection.
4712
47132015-06-10 Gary Benson <gbenson@redhat.com>
4714
4715 * configure.ac (AC_CHECK_FUNCS): Add setns.
4716 * config.in: Regenerate.
4717 * configure: Likewise.
4718 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4719 (linux-namespaces.o): New rule.
4720 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4721
47222015-06-09 Gary Benson <gbenson@redhat.com>
4723
4724 * hostio.c (handle_open): Process mode argument with
4725 fileio_to_host_mode.
4726
47272015-06-01 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4730 * linux-x86-low.c: Likewise.
4731
47322015-05-28 Don Breazeal <donb@codesourcery.com>
4733
4734 * linux-low.c (handle_extended_wait): Initialize
4735 thread_info.last_resume_kind for new fork children.
4736
47372015-05-15 Pedro Alves <palves@redhat.com>
4738
4739 * target.h (target_handle_new_gdb_connection): Rewrite using if
4740 wrapped in do/while.
4741
47422015-05-14 Joel Brobecker <brobecker@adacore.com>
4743
4744 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4745 * configure, config.in: Regenerate.
4746 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4747 Declare typedef.
4748
47492015-05-12 Don Breazeal <donb@codesourcery.com>
4750
4751 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4752 PTRACE_EVENT_VFORK_DONE.
4753 (linux_low_ptrace_options, extended_event_reported): Add vfork
4754 events.
4755 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4756 and "vforkdone" for RSP 'T' Stop Reply Packet.
4757 * server.h (report_vfork_events): Declare
4758 global variable.
4759
47602015-05-12 Don Breazeal <donb@codesourcery.com>
4761
4762 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4763 (the_low_target) <new_fork>: Initialize new member.
4764 * linux-arm-low.c (arm_new_fork): New function.
4765 (the_low_target) <new_fork>: Initialize new member.
4766 * linux-low.c (handle_extended_wait): Call new target function
4767 new_fork.
4768 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4769 * linux-mips-low.c (mips_add_watchpoint): New function
4770 extracted from mips_insert_point.
4771 (the_low_target) <new_fork>: Initialize new member.
4772 (mips_linux_new_fork): New function.
4773 (mips_insert_point): Call mips_add_watchpoint.
4774 * linux-x86-low.c (x86_linux_new_fork): New function.
4775 (the_low_target) <new_fork>: Initialize new member.
4776
47772015-05-12 Don Breazeal <donb@codesourcery.com>
4778
4779 * linux-low.c (handle_extended_wait): Implement return value,
4780 rename argument 'event_child' to 'event_lwp', handle
4781 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4782 (linux_low_ptrace_options): New function.
4783 (linux_low_filter_event): Call linux_low_ptrace_options,
4784 use different argument fo linux_enable_event_reporting,
4785 use return value from handle_extended_wait.
4786 (extended_event_reported): New function.
4787 (linux_wait_1): Call extended_event_reported and set
4788 status to report fork events.
4789 (linux_write_memory): Add pid to debug message.
4790 (reset_lwp_ptrace_options_callback): New function.
4791 (linux_handle_new_gdb_connection): New function.
4792 (linux_target_ops): Initialize new structure member.
4793 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4794 * lynx-low.c: Initialize new structure member.
4795 * remote-utils.c (prepare_resume_reply): Implement stop reason
4796 "fork" for "T" stop message.
4797 * server.c (handle_query): Call handle_new_gdb_connection.
4798 * server.h (report_fork_events): Declare global flag.
4799 * target.h (struct target_ops) <handle_new_gdb_connection>:
4800 New member.
4801 (target_handle_new_gdb_connection): New macro.
4802 * win32-low.c: Initialize new structure member.
4803
48042015-05-12 Don Breazeal <donb@codesourcery.com>
4805
4806 * mem-break.c (APPEND_TO_LIST): Define macro.
4807 (clone_agent_expr): New function.
4808 (clone_one_breakpoint): New function.
4809 (clone_all_breakpoints): New function.
4810 * mem-break.h: Declare new functions.
4811
48122015-05-12 Don Breazeal <donb@codesourcery.com>
4813
4814 * linux-low.c (linux_supports_fork_events): New function.
4815 (linux_supports_vfork_events): New function.
4816 (linux_target_ops): Initialize new structure members.
4817 (initialize_low): Call linux_check_ptrace_features.
4818 * lynx-low.c (lynx_target_ops): Initialize new structure
4819 members.
4820 * server.c (report_fork_events, report_vfork_events):
4821 New global flags.
4822 (handle_query): Add new features to qSupported packet and
4823 response.
4824 (captured_main): Initialize new global variables.
4825 * target.h (struct target_ops) <supports_fork_events>:
4826 New member.
4827 <supports_vfork_events>: New member.
4828 (target_supports_fork_events): New macro.
4829 (target_supports_vfork_events): New macro.
4830 * win32-low.c (win32_target_ops): Initialize new structure
4831 members.
4832
48332015-05-12 Gary Benson <gbenson@redhat.com>
4834
4835 * server.c (handle_qxfer_exec_file): Use current process
4836 if annex is empty.
4837
48382015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4839
4840 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4841 Remove HAVE_PTRACE_GETREGS conditionals.
4842 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4843 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4844
48452015-05-08 Yao Qi <yao.qi@linaro.org>
4846
4847 * linux-low.c (linux_supports_conditional_breakpoints): New
4848 function.
4849 (linux_target_ops): Install new target method.
4850 * lynx-low.c (lynx_target_ops): Install NULL hook for
4851 supports_conditional_breakpoints.
4852 * nto-low.c (nto_target_ops): Likewise.
4853 * spu-low.c (spu_target_ops): Likewise.
4854 * win32-low.c (win32_target_ops): Likewise.
4855 * server.c (handle_query): Check
4856 target_supports_conditional_breakpoints.
4857 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4858 New field.
4859 (target_supports_conditional_breakpoints): New macro.
4860
48612015-05-06 Pedro Alves <palves@redhat.com>
4862
4863 PR server/18081
4864 * server.c (start_inferior): If the process exits, mourn it.
4865
48662015-04-21 Gary Benson <gbenson@redhat.com>
4867
4868 * hostio.c (fileio_open_flags_to_host): Factored out to
4869 fileio_to_host_openflags in common/fileio.c. Single use
4870 updated.
4871
48722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4873
4874 * linux-xtensa-low.c (xtensa_fill_gregset)
4875 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4876 XCHAL_HAVE_LOOP.
4877
48782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4879
4880 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4881 (regs_info): Replace usrregs pointer with NULL.
4882
48832015-04-17 Gary Benson <gbenson@redhat.com>
4884
4885 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4886 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4887 * server.c (handle_qxfer_exec_file): New function.
4888 (qxfer_packets): Add exec-file entry.
4889 (handle_query): Report qXfer:exec-file:read as supported packet.
4890
48912015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4892
4893 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4894
48952015-04-09 Gary Benson <gbenson@redhat.com>
4896
4897 * hostio-errno.c (errno_to_fileio_error): Remove function.
4898 Update caller to use remote_fileio_to_fio_error.
4899
49002015-04-09 Yao Qi <yao.qi@linaro.org>
4901
4902 * linux-low.c (linux_insert_point): Call
4903 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4904 (linux_remove_point): Call remove_memory_breakpoint if type is
4905 raw_bkpt_type_sw.
4906 * linux-x86-low.c (x86_insert_point): Don't call
4907 insert_memory_breakpoint.
4908 (x86_remove_point): Don't call remove_memory_breakpoint.
4909
49102015-04-01 Pedro Alves <palves@redhat.com>
4911 Cleber Rosa <crosa@redhat.com>
4912
4913 * server.c (gdbserver_usage): Reorganize and extend the usage
4914 message.
4915
49162015-03-24 Pedro Alves <palves@redhat.com>
4917
4918 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4919 output. Also dump TRAP_TRACE.
4920 (linux_low_filter_event): In debug output, distinguish a
4921 resume_stop SIGSTOP from a delayed SIGSTOP.
4922
49232015-03-24 Gary Benson <gbenson@redhat.com>
4924
4925 * linux-x86-low.c (x86_linux_new_thread): Moved to
4926 nat/x86-linux.c.
4927 (x86_linux_prepare_to_resume): Likewise.
4928
49292015-03-24 Gary Benson <gbenson@redhat.com>
4930
4931 * Makefile.in (x86-linux-dregs.o): New rule.
4932 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4933 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4934 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4935 (x86_linux_dr_get): Likewise.
4936 (x86_linux_dr_set): Likewise.
4937 (update_debug_registers_callback): Likewise.
4938 (x86_linux_dr_set_addr): Likewise.
4939 (x86_linux_dr_get_addr): Likewise.
4940 (x86_linux_dr_set_control): Likewise.
4941 (x86_linux_dr_get_control): Likewise.
4942 (x86_linux_dr_get_status): Likewise.
4943 (x86_linux_update_debug_registers): Likewise.
4944
49452015-03-24 Gary Benson <gbenson@redhat.com>
4946
4947 * linux-x86-low.c (x86_linux_update_debug_registers):
4948 New function, factored out from...
4949 (x86_linux_prepare_to_resume): ...this.
4950
49512015-03-24 Gary Benson <gbenson@redhat.com>
4952
4953 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4954 (x86_linux_dr_set): Likewise.
4955 (update_debug_registers_callback): Likewise.
4956 (x86_linux_dr_set_addr): Likewise.
4957 (x86_linux_dr_get_addr): Likewise.
4958 (x86_linux_dr_set_control): Likewise.
4959 (x86_linux_dr_get_control): Likewise.
4960 (x86_linux_dr_get_status): Likewise.
4961 (x86_linux_prepare_to_resume): Likewise.
4962
49632015-03-24 Gary Benson <gbenson@redhat.com>
4964
4965 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4966 Use perror_with_name. Pass string through gettext.
4967 (x86_linux_dr_set): Likewise.
4968
49692015-03-24 Gary Benson <gbenson@redhat.com>
4970
4971 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4972 (x86_linux_dr_set_addr): ...this.
4973 (x86_dr_low_get_addr): Rename to...
4974 (x86_linux_dr_get_addr): ...this.
4975 (x86_dr_low_set_control): Rename to...
4976 (x86_linux_dr_set_control): ...this.
4977 (x86_dr_low_get_control): Rename to...
4978 (x86_linux_dr_get_control): ...this.
4979 (x86_dr_low_get_status): Rename to...
4980 (x86_linux_dr_get_status): ...this.
4981 (x86_dr_low): Update with new function names.
4982
49832015-03-24 Gary Benson <gbenson@redhat.com>
4984
4985 * Makefile.in (x86-linux.o): New rule.
4986 * configure.srv: Add x86-linux.o to relevant targets.
4987 * linux-low.c (lwp_set_arch_private_info): New function.
4988 (lwp_arch_private_info): Likewise.
4989 * linux-x86-low.c: Include nat/x86-linux.h.
4990 (arch_lwp_info): Removed structure.
4991 (update_debug_registers_callback):
4992 Use lwp_set_debug_registers_changed.
4993 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4994 and lwp_set_debug_registers_changed.
4995 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4996
49972015-03-24 Gary Benson <gbenson@redhat.com>
4998
4999 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5000 * linux-arm-low.c (arm_new_thread): Likewise.
5001 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5002 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5003 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5004 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5005
50062015-03-24 Gary Benson <gbenson@redhat.com>
5007
5008 * linux-low.c (ptid_of_lwp): New function.
5009 (lwp_is_stopped): Likewise.
5010 (lwp_stop_reason): Likewise.
5011 * linux-x86-low.c (update_debug_registers_callback):
5012 Use lwp_is_stopped.
5013 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5014 lwp_stop_reason.
5015
50162015-03-24 Gary Benson <gbenson@redhat.com>
5017
5018 * linux-low.h (linux_stop_lwp): Remove declaration.
5019
50202015-03-24 Gary Benson <gbenson@redhat.com>
5021
5022 * linux-low.h: Include nat/linux-nat.h.
5023 * linux-low.c (iterate_over_lwps_args): New structure.
5024 (iterate_over_lwps_filter): New function.
5025 (iterate_over_lwps): Likewise.
5026 * linux-x86-low.c (update_debug_registers_callback):
5027 Update signature to what iterate_over_lwps expects.
5028 Remove PID check that iterate_over_lwps now performs.
5029 (x86_dr_low_set_addr): Use iterate_over_lwps.
5030 (x86_dr_low_set_control): Likewise.
5031
50322015-03-24 Gary Benson <gbenson@redhat.com>
5033
5034 * linux-x86-low.c (x86_debug_reg_state): New function.
5035 (x86_linux_prepare_to_resume): Use the above.
5036
50372015-03-24 Gary Benson <gbenson@redhat.com>
5038
5039 * linux-low.c (current_lwp_ptid): New function.
5040 * linux-x86-low.c: Include nat/linux-nat.h.
5041 (x86_dr_low_get_addr): Use current_lwp_ptid.
5042 (x86_dr_low_get_control): Likewise.
5043 (x86_dr_low_get_status): Likewise.
5044
50452015-03-20 Pedro Alves <palves@redhat.com>
5046
5047 * tracepoint.c (cmd_qtstatus): Make "str" const.
5048
50492015-03-20 Pedro Alves <palves@redhat.com>
5050
5051 * server.c (handle_general_set): Make "req_str" const.
5052
50532015-03-19 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.c (linux_resume_one_lwp): Rename to ...
5056 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5057 instead call perror_with_name.
5058 (check_ptrace_stopped_lwp_gone): New function.
5059 (linux_resume_one_lwp): Reimplement as wrapper around
5060 linux_resume_one_lwp_throw that swallows errors if the LWP is
5061 gone.
5062
50632015-03-19 Pedro Alves <palves@redhat.com>
5064
5065 * linux-low.c (count_events_callback, select_event_lwp_callback):
5066 No longer check whether the thread has resume_stop as last resume
5067 kind.
5068
50692015-03-19 Pedro Alves <palves@redhat.com>
5070
5071 * linux-low.c (count_events_callback, select_event_lwp_callback):
5072 Use the lwp's status_pending_p field, not the thread's.
5073
50742015-03-19 Pedro Alves <palves@redhat.com>
5075
5076 * linux-low.c (select_event_lwp_callback): Update comments to
5077 no longer mention SIGTRAP.
5078
50792015-03-18 Gary Benson <gbenson@redhat.com>
5080
5081 * server.c (handle_query): Do not report vFile:fstat as supported.
5082
50832015-03-11 Gary Benson <gbenson@redhat.com>
5084
5085 * hostio.c (sys/types.h): New include.
5086 (sys/stat.h): Likewise.
5087 (common-remote-fileio.h): Likewise.
5088 (handle_fstat): New function.
5089 (handle_vFile): Handle vFile:fstat packets.
5090
50912015-03-11 Gary Benson <gbenson@redhat.com>
5092
5093 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5094 struct stat.st_blocks and struct stat.st_blksize.
5095 * configure: Regenerate.
5096 * config.in: Likewise.
5097 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5098 (OBS): Add common-remote-fileio.o.
5099 (common-remote-fileio.o): New rule.
5100
51012015-03-09 Pedro Alves <palves@redhat.com>
5102
5103 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5104 'struct sockaddr' pointer in 'accept' call.
5105
51062015-03-09 Pedro Alves <palves@redhat.com>
5107
5108 Revert:
5109 2015-03-07 Pedro Alves <palves@redhat.com>
5110 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5111 or <winsock2.h> here. Instead include "gdb_socket.h".
5112 (remote_open): Use union gdb_sockaddr_u.
5113 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5114 or <winsock2.h> here. Instead include "gdb_socket.h".
5115 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5116 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5117 or <sys/un.h>.
5118 (init_named_socket, gdb_agent_helper_thread): Use union
5119 gdb_sockaddr_u.
5120
51212015-03-07 Pedro Alves <palves@redhat.com>
5122
5123 * configure.ac (build_warnings): Move
5124 -Wdeclaration-after-statement to the C-specific set.
5125 * configure: Regenerate.
5126
51272015-03-07 Pedro Alves <palves@redhat.com>
5128
5129 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5130 or <winsock2.h> here. Instead include "gdb_socket.h".
5131 (remote_open): Use union gdb_sockaddr_u.
5132 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5133 or <winsock2.h> here. Instead include "gdb_socket.h".
5134 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5135 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5136 or <sys/un.h>.
5137 (init_named_socket, gdb_agent_helper_thread): Use union
5138 gdb_sockaddr_u.
5139
51402015-03-07 Pedro Alves <palves@redhat.com>
5141
5142 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5143 instead.
5144
51452015-03-06 Yao Qi <yao.qi@linaro.org>
5146
5147 * linux-aarch64-low.c (aarch64_insert_point): Use
5148 show_debug_regs as a boolean.
5149 (aarch64_remove_point): Likewise.
5150
51512015-03-05 Pedro Alves <palves@redhat.com>
5152
5153 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5154 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5155 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5156 * nto-low.c (nto_target_ops): Likewise.
5157 * spu-low.c (spu_target_ops): Likewise.
5158 * win32-low.c (win32_target_ops): Likewise.
5159
51602015-03-04 Pedro Alves <palves@redhat.com>
5161
5162 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5163 Decide whether a breakpoint triggered based on the SIGTRAP's
5164 siginfo.si_code.
5165 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5166 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5167 (linux_low_filter_event): Check for breakpoints before checking
5168 watchpoints.
5169 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5170 siginfo.si_code.
5171 (linux_stopped_by_sw_breakpoint)
5172 (linux_supports_stopped_by_sw_breakpoint)
5173 (linux_stopped_by_hw_breakpoint)
5174 (linux_supports_stopped_by_hw_breakpoint): New functions.
5175 (linux_target_ops): Install new target methods.
5176
51772015-03-04 Pedro Alves <palves@redhat.com>
5178
5179 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5180 * server.c (swbreak_feature, hwbreak_feature): New globals.
5181 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5182 (captured_main): Clear swbreak_feature and hwbreak_feature.
5183 * server.h (swbreak_feature, hwbreak_feature): Declare.
5184 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5185 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5186 supports_stopped_by_hw_breakpoint>: New fields.
5187 (target_supports_stopped_by_sw_breakpoint)
5188 (target_stopped_by_sw_breakpoint)
5189 (target_supports_stopped_by_hw_breakpoint)
5190 (target_stopped_by_hw_breakpoint): Declare.
5191
51922015-03-04 Pedro Alves <palves@redhat.com>
5193
5194 enum lwp_stop_reason -> enum target_stop_reason
5195 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5196 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5197 (linux_wait_1, stuck_in_jump_pad_callback)
5198 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5199 (linux_stopped_by_watchpoint):
5200 * linux-low.h (enum lwp_stop_reason): Delete.
5201 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5202 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5203
52042015-03-04 Yao Qi <yao.qi@linaro.org>
5205
5206 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5207
52082015-03-03 Gary Benson <gbenson@redhat.com>
5209
5210 * hostio.c (handle_vFile): Fix prefix lengths.
5211
52122015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5213
5214 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5215 ptr_bits.
5216
52172015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5218
5219 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5220 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5221 (clean): Add "rm -f" for above C files.
5222 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5223 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5224 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5225 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5226 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5227 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5228 (init_registers_s390x_vx_linux64)
5229 (init_registers_s390x_tevx_linux64)
5230 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5231 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5232 declarations.
5233 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5234 (s390_store_vxrs_high): New functions.
5235 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5236 NT_S390_VXRS_HIGH.
5237 (s390_arch_setup): Add logic for selecting one of the new target
5238 descriptions. Activate the new vector regsets if applicable.
5239 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5240 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5241 and init_registers_s390x_tevx_linux64.
5242
52432015-03-01 Pedro Alves <palves@redhat.com>
5244
5245 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5246 parameter.
5247
52482015-02-27 Pedro Alves <palves@redhat.com>
5249
5250 * linux-x86-low.c (u_debugreg_offset): New function.
5251 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5252
52532015-02-27 Pedro Alves <palves@redhat.com>
5254
5255 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5256 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5257 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5258 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5259 (ps_lsetfpregs, ps_getpid)
5260 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5261 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5262 (ps_lsetxregs, ps_plog): Declare.
5263
52642015-02-27 Pedro Alves <palves@redhat.com>
5265
5266 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5267 IP_AGENT_EXPORT_FUNC.
5268 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5269 IP_AGENT_EXPORT_FUNC.
5270 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5271 (IP_AGENT_EXPORT): Delete.
5272 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5273 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5274 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5275 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5276 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5277 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5278 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5279 (traceframe_read_count, traceframe_write_count)
5280 (traceframes_created, trace_state_variables, get_raw_reg)
5281 (get_trace_state_variable_value, set_trace_state_variable_value)
5282 (ust_loaded, helper_thread_id, cmd_buf): Use
5283 IPA_SYM_EXPORTED_NAME.
5284 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5285 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5286 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5287 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5288 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5289 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5290 EXTERN_C_PUSH/EXTERN_C_POP.
5291 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5292 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5293 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5294 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5295 (traceframe_write_count, traceframe_read_count)
5296 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5297 (about_to_request_buffer_space, get_trace_state_variable_value)
5298 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5299 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5300 EXTERN_C_PUSH/EXTERN_C_POP.
5301 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5302 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5303 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5304 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5305 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5306 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5307 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5308 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5309 Define.
5310 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5311 (IP_AGENT_EXPORT_VAR_DECL): Define.
5312 (tracing): Declare.
5313 (gdb_agent_get_raw_reg): Declare.
5314
53152015-02-27 Tom Tromey <tromey@redhat.com>
5316 Pedro Alves <palves@redhat.com>
5317
5318 Rename symbols whose names are reserved C++ keywords throughout.
5319
53202015-02-27 Pedro Alves <palves@redhat.com>
5321
5322 * Makefile.in (COMPILER): New, get it from autoconf.
5323 (CXX): Get from autoconf instead.
5324 (COMPILE.pre): Use COMPILER.
5325 (CC-LD): Rename to ...
5326 (CC_LD): ... this. Use COMPILER.
5327 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5328 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5329 * acinclude.m4: Include build-with-cxx.m4.
5330 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5331 Disable -Werror by default if building in C++ mode.
5332 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5333 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5334 the C++ compiler. Save/restore CXXFLAGS too.
5335 * configure: Regenerate.
5336
53372015-02-27 Pedro Alves <palves@redhat.com>
5338
5339 * acinclude.m4: Include libiberty.m4.
5340 * configure.ac: Call libiberty_INIT.
5341 * config.in, configure: Regenerate.
5342
53432015-02-26 Pedro Alves <palves@redhat.com>
5344
5345 * linux-low.c (linux_wait_1): When incrementing the PC past a
5346 program breakpoint always use the_low_target.breakpoint_len as
5347 increment, rather than the maximum between that and
5348 the_low_target.decr_pc_after_break.
5349
53502015-02-23 Pedro Alves <palves@redhat.com>
5351
5352 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5353 thread was doing a step-over; always adjust the PC if
5354 we stepped over a permanent breakpoint.
5355 (linux_wait_1): If we stepped over breakpoint that was on top of a
5356 permanent breakpoint, manually advance the PC past it.
5357
53582015-02-23 Pedro Alves <palves@redhat.com>
5359
5360 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5361 modes.
5362 (x86_fill_gregset, x86_store_gregset): Use it when handling
5363 $orig_eax.
5364
53652015-02-20 Pedro Alves <palves@redhat.com>
5366
5367 * thread-db.c: Include "nat/linux-procfs.h".
5368 (thread_db_init): Skip listing new threads if the kernel supports
5369 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5370
53712015-02-20 Pedro Alves <palves@redhat.com>
5372
5373 * linux-low.c (status_pending_p_callback): Use ptid_match.
5374
53752015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5376
5377 PR breakpoints/16812
5378 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5379 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5380 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5381
53822015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5383
5384 PR breakpoints/15956
5385 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5386
53872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5388
5389 * linux-low.c (linux_low_btrace_conf): Print size.
5390 * server.c (handle_btrace_conf_general_set): New.
5391 (hanle_general_set): Call handle_btrace_conf_general_set.
5392 (handle_query): Report Qbtrace-conf:bts:size as supported.
5393
53942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5395
5396 * linux-low.c (linux_low_enable_btrace): Update parameters.
5397 (linux_low_btrace_conf): New.
5398 (linux_target_ops)<to_btrace_conf>: Initialize.
5399 * server.c (current_btrace_conf): New.
5400 (handle_btrace_enable): Rename to ...
5401 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5402 to target_enable_btrace. Update comment. Update users.
5403 (handle_qxfer_btrace_conf): New.
5404 (qxfer_packets): Add btrace-conf entry.
5405 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5406 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5407 (target_ops)<read_btrace_conf>: New.
5408 (target_enable_btrace): Update parameters.
5409 (target_read_btrace_conf): New.
5410
54112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5412
5413 * server.c (handle_btrace_general_set): Remove call to
5414 target_supports_btrace.
5415 (supported_btrace_packets): New.
5416 (handle_query): Call supported_btrace_packets.
5417 * target.h: include btrace-common.h.
5418 (btrace_target_info): Removed.
5419 (supports_btrace, target_supports_btrace): Update parameters.
5420
54212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5422
5423 * Makefile.in (SFILES): Add common/btrace-common.c.
5424 (OBS): Add common/btrace-common.o.
5425 (btrace-common.o): Add build rules.
5426 * linux-low: Include btrace-common.h.
5427 (linux_low_read_btrace): Use struct btrace_data. Call
5428 btrace_data_init and btrace_data_fini.
5429
54302015-02-06 Pedro Alves <palves@redhat.com>
5431
5432 * thread-db.c (find_new_threads_callback): Add debug output.
5433
54342015-02-04 Pedro Alves <palves@redhat.com>
5435
5436 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5437 (resume_stopped_resumed_lwps): New function.
5438 (linux_wait_for_event_filtered): Use it.
5439
54402015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5441
5442 * Makefile.in (SFILES): Add linux-personality.c.
5443 (linux-personality.o): New rule.
5444 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5445 list of objects to be built.
5446 * linux-low.c: Include nat/linux-personality.h.
5447 (linux_create_inferior): Remove code to disable address space
5448 randomization (moved to ../nat/linux-personality.c). Create
5449 cleanup to disable address space randomization.
5450
54512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5452
5453 * Makefile.in (posix-strerror.o): New rule.
5454 (mingw-strerror.o): Likewise.
5455 * configure: Regenerated.
5456 * configure.ac: Source file ../common/common.host. Initialize new
5457 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5458
54592015-01-14 Yao Qi <yao@codesourcery.com>
5460
5461 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5462 (ppc-linux.o): New rule.
5463 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5464 * configure.ac: AC_CHECK_FUNCS(getauxval).
5465 * config.in: Re-generated.
5466 * configure: Re-generated.
5467 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5468 ppc64_64bit_inferior_p
5469
54702015-01-14 Yao Qi <yao@codesourcery.com>
5471
5472 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5473 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5474 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5475 (PT_ORIG_R3, PT_TRAP): Likewise.
5476 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5477 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5478 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5479
54802015-01-10 Joel Brobecker <brobecker@adacore.com>
5481
5482 * i387-fp.c (i387_cache_to_xsave): In look over
5483 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5484 zmmh_low_space field by use of zmmh_high_space.
5485
54862015-01-09 Pedro Alves <palves@redhat.com>
5487
5488 * linux-low.c (step_over_bkpt): Move higher up in the file.
5489 (handle_extended_wait): Don't store the stop_pc here.
5490 (get_stop_pc): Adjust comments and rename to ...
5491 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5492 stopped for a software breakpoint or hardware breakpoint.
5493 (thread_still_has_status_pending_p): New function.
5494 (status_pending_p_callback): Use
5495 thread_still_has_status_pending_p. If the event is no longer
5496 interesting, resume the LWP.
5497 (handle_tracepoints): Add assert.
5498 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5499 (wstatus_maybe_breakpoint): New function.
5500 (cancel_breakpoint): Delete function.
5501 (check_stopped_by_watchpoint): New function, factored out from
5502 linux_low_filter_event.
5503 (lp_status_maybe_breakpoint): Delete function.
5504 (linux_low_filter_event): Remove filter_ptid argument.
5505 Leave thread group exits pending here. Store the LWP's stop PC.
5506 Always leave events pending.
5507 (linux_wait_for_event_filtered): Pull all events out of the
5508 kernel, and leave them all pending.
5509 (count_events_callback, select_event_lwp_callback): Consider all
5510 events.
5511 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5512 (select_event_lwp): Only give preference to the stepping LWP in
5513 all-stop mode. Adjust comments.
5514 (ignore_event): New function.
5515 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5516 references to cancel_breakpoints. Adjust to renames. Also give
5517 equal priority to all LWPs that have had events in non-stop mode.
5518 If reporting a software breakpoint event, unadjust the LWP's PC.
5519 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5520 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5521 Adjust.
5522 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5523 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5524 (linux_stopped_by_watchpoint): Adjust.
5525 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5526 * linux-low.h (enum lwp_stop_reason): New.
5527 (struct lwp_info) <stop_pc>: Adjust comment.
5528 <stopped_by_watchpoint>: Delete field.
5529 <stop_reason>: New field.
5530 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5531 * mem-break.c (software_breakpoint_inserted_here)
5532 (hardware_breakpoint_inserted_here): New function.
5533 * mem-break.h (software_breakpoint_inserted_here)
5534 (hardware_breakpoint_inserted_here): Declare.
5535 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5536 (cancel_breakpoints): Delete.
5537 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5538 (upload_fast_traceframes): Remove references to
5539 cancel_breakpoints.
5540
55412015-01-09 Pedro Alves <palves@redhat.com>
5542
5543 * thread-db.c (find_new_threads_callback): Ignore thread if the
5544 kernel thread ID is -1.
5545
55462015-01-09 Pedro Alves <palves@redhat.com>
5547
5548 * linux-low.c (linux_attach_fail_reason_string): Move to
5549 nat/linux-ptrace.c, and rename.
5550 (linux_attach_lwp): Update comment.
5551 (attach_proc_task_lwp_callback): New function.
5552 (linux_attach): Adjust to rename and use
5553 linux_proc_attach_tgid_threads.
5554 (linux_attach_fail_reason_string): Delete declaration.
5555
55562015-01-01 Joel Brobecker <brobecker@adacore.com>
5557
5558 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5559 * server.c (gdbserver_version): Likewise.
5560
55612014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5562
5563 * remote-utils.c: Include ctype.h.
5564 (input_interrupt): Explicitly handle the case when the char
5565 received is the NUL byte. Improve the printing of non-ASCII
5566 characters.
5567
55682014-12-16 Joel Brobecker <brobecker@adacore.com>
5569
5570 * linux-low.c (linux_low_filter_event): Update call to
5571 linux_enable_event_reporting following the addition of
5572 a new parameter to that function.
5573
55742014-12-16 Catalin Udma <catalin.udma@freescale.com>
5575
5576 PR server/17457
5577 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5578 (AARCH64_FPCR_REGNO): Likewise.
5579 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5580 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5581 (aarch64_store_fpregset): Likewise.
5582
55832014-12-15 Joel Brobecker <brobecker@adacore.com>
5584
5585 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5586 Remove FIXME comment about assumption about N.
5587
55882014-12-13 Joel Brobecker <brobecker@adacore.com>
5589
5590 * configure.ac: If large-file support is disabled in GDBserver,
5591 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5592 * configure: Regenerate.
5593
55942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5595
5596 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5597 warning upon ENODATA from ptrace.
5598 * linux-s390-low.c (s390_store_tdb): New.
5599 (s390_regsets): Add regset for NT_S390_TDB.
5600
56012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5602
5603 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5604 without a fill_function.
5605 * linux-s390-low.c (s390_fill_last_break): Remove.
5606 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5607 (s390_arch_setup): Use regset's size instead of fill_function for
5608 loop end condition.
5609
56102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5611
5612 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5613 the regset's store function when ptrace returned an error.
5614 * regcache.c (get_thread_regcache): Invalidate register cache
5615 before fetching inferior's registers.
5616
56172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5618
5619 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5620 while-loop as for-loop.
5621 (regsets_store_inferior_registers): Likewise.
5622
56232014-11-28 Yao Qi <yao@codesourcery.com>
5624
5625 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5626 * config.in, configure: Re-generate.
5627 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5628 is defined.
5629
56302014-11-21 Yao Qi <yao@codesourcery.com>
5631
5632 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5633 (AC_CHECK_HEADERS): Remove malloc.h.
5634 * configure: Re-generated.
5635 * config.in: Re-generated.
5636 * server.h: Don't include alloca.h and malloc.h.
5637 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5638 Don't include malloc.h.
5639
56402014-11-17 Joel Brobecker <brobecker@adacore.com>
5641
5642 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5643 corresponding ERRNO check in same block.
5644
56452014-11-12 Pedro Alves <palves@redhat.com>
5646
5647 * server.c (cont_thread): Update comment.
5648 (start_inferior, attach_inferior): No longer clear cont_thread.
5649 (handle_v_cont): No longer set cont_thread.
5650 (captured_main): Clear cont_thread each time a GDB connects.
5651
56522014-11-12 Pedro Alves <palves@redhat.com>
5653
5654 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5655 thread, and don't resume all threads if the Hc thread has exited.
5656
56572014-11-12 Pedro Alves <palves@redhat.com>
5658
5659 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5660 the process group instead of to a specific LWP.
5661
56622014-10-15 Pedro Alves <palves@redhat.com>
5663
5664 PR server/17487
5665 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5666 parameter.
5667 (arm_set_thread_context): Delete.
5668 (the_low_target): Adjust.
5669 * win32-i386-low.c (debug_registers_changed)
5670 (debug_registers_used): Delete.
5671 (update_debug_registers_callback): New function.
5672 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5673 needing to update their debug registers.
5674 (win32_get_current_dr): New function.
5675 (x86_dr_low_get_addr, x86_dr_low_get_control)
5676 (x86_dr_low_get_status): Fetch the debug register from the thread
5677 record's context.
5678 (i386_initial_stuff): Adjust.
5679 (i386_get_thread_context): Remove current_event parameter. Don't
5680 clear debug_registers_changed nor copy DR values to
5681 debug_reg_state.
5682 (i386_set_thread_context): Delete.
5683 (i386_prepare_to_resume): New function.
5684 (i386_thread_added): Mark the thread as needing to update irs
5685 debug registers.
5686 (the_low_target): Remove i386_set_thread_context and install
5687 i386_prepare_to_resume.
5688 * win32-low.c (win32_get_thread_context): Adjust.
5689 (win32_set_thread_context): Use SetThreadContext
5690 directly.
5691 (win32_prepare_to_resume): New function.
5692 (win32_require_context): New function, factored out from ...
5693 (thread_rec): ... this.
5694 (continue_one_thread): Call win32_prepare_to_resume on each thread
5695 we're about to continue.
5696 (win32_resume): Call win32_prepare_to_resume on the event thread.
5697 * win32-low.h (struct win32_thread_info)
5698 <debug_registers_changed>: New field.
5699 (struct win32_target_ops): Change prototype of set_thread_context,
5700 delete set_thread_context and add prepare_to_resume.
5701 (win32_require_context): New declaration.
5702
57032014-10-08 Gary Benson <gbenson@redhat.com>
5704
5705 * server.h: Do not include common-exceptions.h.
5706
57072014-10-08 Gary Benson <gbenson@redhat.com>
5708
5709 * server.h: Do not include cleanups.h.
5710
57112014-09-30 James Hogan <james.hogan@imgtec.com>
5712
5713 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5714 mips64-dsp-linux.c.
5715
57162014-09-23 Yao Qi <yao@codesourcery.com>
5717
5718 * linux-low.c (lp_status_maybe_breakpoint): New function.
5719 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5720 (count_events_callback): Likewise.
5721 (select_event_lwp_callback): Likewise.
5722 (cancel_breakpoints_callback): Likewise.
5723
57242014-09-19 Don Breazeal <donb@codesourcery.com>
5725
5726 * linux-low.c (handle_extended_wait): Call
5727 linux_ptrace_get_extended_event.
5728 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5729 linux_is_extended_waitstatus.
5730
57312014-09-16 Joel Brobecker <brobecker@adacore.com>
5732
5733 * Makefile.in (CPPFLAGS): Define.
5734 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5735 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5736
57372014-09-16 Gary Benson <gbenson@redhat.com>
5738
5739 * inferiors.h (current_inferior): Renamed as...
5740 (current_thread): New variable. All uses updated.
5741 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5742 (maybe_move_out_of_jump_pad): Likewise.
5743 (cancel_breakpoint): Likewise.
5744 (linux_low_filter_event): Likewise.
5745 (wait_for_sigstop): Likewise.
5746 (linux_resume_one_lwp): Likewise.
5747 (need_step_over_p): Likewise.
5748 (start_step_over): Likewise.
5749 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5750 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5751 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5752 and save_inferior as saved_thread.
5753 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5754 saved_thread.
5755 (regcache_invalidate_thread): Likewise.
5756 * remote-utils.c (prepare_resume_reply): Likewise.
5757 * thread-db.c (thread_db_get_tls_address): Likewise.
5758 (disable_thread_event_reporting): Likewise.
5759 (remove_thread_event_breakpoints): Likewise.
5760 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5761 as saved_thread.
5762 * target.h (set_desired_inferior): Renamed as...
5763 (set_desired_thread): New declaration. All uses updated.
5764 * server.c (myresume): Updated comment to reference thread instead
5765 of inferior.
5766 (handle_serial_event): Likewise.
5767 (handle_target_event): Likewise.
5768
57692014-09-12 Tom Tromey <tromey@redhat.com>
5770 Gary Benson <gbenson@redhat.com>
5771
5772 * regcache.h: Include common-regcache.h.
5773 (regcache_read_pc): Don't declare.
5774 * regcache.c (get_thread_regcache_for_ptid): New function.
5775
57762014-09-11 Tom Tromey <tromey@redhat.com>
5777 Gary Benson <gbenson@redhat.com>
5778
5779 * symbol.c: New file.
5780 * Makefile.in (SFILES): Add symbol.c.
5781 (OBS): Add symbol.o.
5782
57832014-09-11 Gary Benson <gbenson@redhat.com>
5784
5785 * target.c (target_stop_ptid, target_continue_ptid): New
5786 functions.
5787
57882014-09-11 Tom Tromey <tromey@redhat.com>
5789 Gary Benson <gbenson@redhat.com>
5790
5791 * target.h: Include target/target.h.
5792 * target.c (target_read_memory, target_read_uint32)
5793 (target_write_memory): New functions.
5794
57952014-09-11 Gary Benson <gbenson@redhat.com>
5796
5797 * server.h (debug_hw_points): Don't declare.
5798 * server.c (debug_hw_points): Don't define. Replace all uses
5799 with show_debug_regs.
5800 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5801 all uses with show_debug_regs.
5802
58032014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5804
5805 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5806 endianness into account.
5807 (ppc_supply_ptrace_register): Likewise.
5808
58092014-09-03 James Hogan <james.hogan@imgtec.com>
5810
5811 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5812 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5813
58142014-09-03 Gary Benson <gbenson@redhat.com>
5815
5816 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5817 ALL_DEBUG_ADDRESS_REGISTERS.
5818
58192014-09-02 Gary Benson <gbenson@redhat.com>
5820
5821 * i386-low.h: Renamed as...
5822 * x86-low.h: New file. All type, function and variable name
5823 prefixes changed from "i386_" to "x86_". All references updated.
5824 * i386-low.c: Renamed as...
5825 * x86-low.c: New file. All type, function and variable name
5826 prefixes changed from "i386_" to "x86_". All references updated.
5827
58282014-09-02 Gary Benson <gbenson@redhat.com>
5829
5830 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5831 (x86_linux_new_thread): Likewise.
5832
58332014-08-29 Gary Benson <gbenson@redhat.com>
5834
5835 * server.h (setjmp.h): Do not include.
5836 (toplevel): Do not declare.
5837 (common-exceptions.h): Include.
5838 (cleanups.h): Likewise.
5839 * server.c (toplevel): Do not define.
5840 (exit_code): New static global.
5841 (detach_or_kill_for_exit_cleanup): New function.
5842 (main): New function. Original main renamed to...
5843 (captured_main): New function.
5844 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5845
58462014-08-29 Gary Benson <gbenson@redhat.com>
5847
5848 * Makefile.in (SFILES): Add common/common-exceptions.c.
5849 (OBS): Add common-exceptions.o.
5850 (common-exceptions.o): New rule.
5851 * utils.c (prepare_to_throw_exception): New function.
5852
58532014-08-29 Gary Benson <gbenson@redhat.com>
5854
5855 * config.in: Regenerate.
5856 * configure: Likewise.
5857
58582014-08-29 Gary Benson <gbenson@redhat.com>
5859
5860 * Makefile.in (SFILES): Add common/cleanups.c.
5861 (OBS): cleanups.o.
5862 (cleanups.o): New rule.
5863
58642014-08-29 Gary Benson <gbenson@redhat.com>
5865
5866 * utils.c (internal_vwarning): New function.
5867
58682014-08-28 Gary Benson <gbenson@redhat.com>
5869
5870 * utils.h (fatal): Remove declaration.
5871 * utils.c (fatal): Remove function.
5872
58732014-08-28 Gary Benson <gbenson@redhat.com>
5874
5875 * tracepoint.c (gdb_agent_init): Replace fatal with
5876 perror_with_name.
5877 (initialize_tracepoint): Likewise.
5878
58792014-08-28 Gary Benson <gbenson@redhat.com>
5880
5881 * remote-utils.c (remote_prepare): Replace fatal with error.
5882
58832014-08-28 Gary Benson <gbenson@redhat.com>
5884
5885 * linux-low.c (linux_async): Replace fatal with warning.
5886 Tidy up and return.
5887 (linux_start_non_stop): Return -1 if linux_async failed.
5888
58892014-08-28 Gary Benson <gbenson@redhat.com>
5890
5891 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5892 gdb_assert.
5893 (i386_dr_low_get_addr): Remove vague comment.
5894 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5895 gdb_assert.
5896
58972014-08-28 Gary Benson <gbenson@redhat.com>
5898
5899 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5900 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5901 internal_error.
5902 (linux_resume_one_lwp): Likewise.
5903 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5904 gdb_assert.
5905 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5906 with internal_error.
5907 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5908 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5909 (find_register_by_name): Replace fatal with internal_error.
5910 (find_regno): Likewise.
5911 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5912 * thread-db.c (thread_db_create_event): Likewise.
5913 (thread_db_load_search): Likewise.
5914 (try_thread_db_load_1): Likewise.
5915 * tracepoint.c (get_jump_space_head): Replace fatal with
5916 internal_error.
5917 (claim_trampoline_space): Likewise.
5918 (have_fast_tracepoint_trampoline_buffer): Likewise.
5919 (cmd_qtstart): Likewise.
5920 (stop_tracing): Likewise.
5921 (fast_tracepoint_collecting): Likewise.
5922 (target_malloc): Likewise.
5923 (download_tracepoint): Likewise.
5924 (download_trace_state_variables): Replace check with gdb_assert.
5925 (upload_fast_traceframes): Replace fatal with internal_error.
5926
59272014-08-19 Tom Tromey <tromey@redhat.com>
5928 Gary Benson <gbenson@redhat.com>
5929
5930 * Makefile.in (SFILES): Add common/common-debug.c.
5931 (OBS): Add common-debug.o.
5932 (common-debug.o): New rule.
5933 * debug.h (debug_printf): Don't declare.
5934 * debug.c (debug_printf): Renamed and rewritten as...
5935 (debug_vprintf): New function.
5936
59372014-08-19 Gary Benson <gbenson@redhat.com>
5938
5939 * utils.h: Do not include print-utils.h.
5940
59412014-08-19 Tom Tromey <tromey@redhat.com>
5942 Gary Benson <gbenson@redhat.com>
5943
5944 * server.h: Add static assertion.
5945 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5946
59472014-08-19 Tom Tromey <tromey@redhat.com>
5948 Gary Benson <gbenson@redhat.com>
5949
5950 * Makefile.in (SFILES): Add common/errors.c.
5951 (OBS): Add errors.o.
5952 (IPA_OBS): Add errors-ipa.o.
5953 (errors.o): New rule.
5954 (errors-ipa.o): Likewise.
5955 * utils.h (perror_with_name, error, warning): Don't declare.
5956 * utils.c (warning): Renamed and rewritten as...
5957 (vwarning): New function.
5958 (error): Renamed and rewritten as...
5959 (verror): New function.
5960 (internal_error): Renamed and rewritten as...
5961 (internal_verror): New function.
5962
59632014-08-07 Gary Benson <gbenson@redhat.com>
5964
5965 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5966 * configure: Regenerate.
5967 * config.in: Likewise.
5968 * server.h: Do not include errno.h.
5969 * event-loop.c: Likewise.
5970 * hostio-errno.c: Likewise.
5971 * linux-low.c: Likewise.
5972 * remote-utils.c: Likewise.
5973 * spu-low.c: Likewise.
5974 * utils.c: Likewise.
5975 * gdbreplay.c: Unconditionally include errno.h.
5976
59772014-08-07 Gary Benson <gbenson@redhat.com>
5978
5979 * server.h: Do not include string.h.
5980 * event-loop.c: Likewise.
5981 * linux-low.c: Likewise.
5982 * regcache.c: Likewise.
5983 * remote-utils.c: Likewise.
5984 * spu-low.c: Likewise.
5985 * utils.c: Likewise.
5986
59872014-08-07 Gary Benson <gbenson@redhat.com>
5988
5989 * server.h: Do not include gdb_assert.h.
5990
59912014-08-07 Gary Benson <gbenson@redhat.com>
5992
5993 * server.h: Do not include common-utils.h.
5994
59952014-08-07 Gary Benson <gbenson@redhat.com>
5996
5997 * server.h: Do not include ptid.h.
5998 * notif.h: Likewise.
5999
60002014-08-07 Gary Benson <gbenson@redhat.com>
6001
6002 * server.h: Do not include gdb_locale.h.
6003
60042014-08-07 Gary Benson <gbenson@redhat.com>
6005
6006 * server.h: Do not include gdb/signals.h.
6007 * win32-low.c: Likewise.
6008
60092014-08-07 Gary Benson <gbenson@redhat.com>
6010
6011 * server.h: Do not include pathmax.h.
6012
60132014-08-07 Gary Benson <gbenson@redhat.com>
6014
6015 * server.h: Do not include libiberty.h.
6016 * linux-bfin-low.c: Likewise.
6017
60182014-08-07 Gary Benson <gbenson@redhat.com>
6019
6020 * server.h: Do not include ansidecl.h.
6021
60222014-08-07 Gary Benson <gbenson@redhat.com>
6023
6024 * linux-x86-low.c: Do not include stddef.h.
6025 * lynx-ppc-low.c: Likewise.
6026 * tracepoint.c: Likewise.
6027
60282014-08-07 Gary Benson <gbenson@redhat.com>
6029
6030 * server.h: Do not include stdarg.h.
6031 * nto-low.c: Likewise.
6032
60332014-08-07 Gary Benson <gbenson@redhat.com>
6034
6035 * server.h: Do not include stdlib.h.
6036 * inferiors.c: Likewise.
6037 * linux-low.c: Likewise.
6038 * regcache.c: Likewise.
6039 * spu-low.c: Likewise.
6040 * tracepoint.c: Likewise.
6041 * utils.c: Likewise.
6042
60432014-08-07 Gary Benson <gbenson@redhat.com>
6044
6045 * server.h: Do not include stdio.h.
6046 * linux-low.c: Likewise.
6047 * remote-utils.c: Likewise.
6048 * spu-low.c: Likewise.
6049 * utils.c: Likewise.
6050 * wincecompat.c: Likewise.
6051
60522014-08-06 Gary Benson <gbenson@redhat.com>
6053
6054 * regcache.c (init_register_cache): Move conditionals inside if.
6055
60562014-08-06 Gary Benson <gbenson@redhat.com>
6057
6058 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6059
60602014-07-31 Gary Benson <gbenson@redhat.com>
6061
6062 * ax.h: Do not include server.h.
6063 * gdbthread.h: Likewise.
6064 * lynx-low.h: Likewise.
6065 * notif.h: Likewise.
6066
60672014-07-30 Gary Benson <gbenson@redhat.com>
6068
6069 * server.h: Include common-defs.h.
6070 Do not include config.h or build-gnulib-gdbserver/config.h.
6071
60722014-07-30 Gary Benson <gbenson@redhat.com>
6073
6074 * hostio-errno.c: Move server.h to top of includes list.
6075 * inferiors.c: Likewise.
6076 * linux-x86-low.c: Likewise.
6077 * notif.c: Include server.h.
6078
60792014-07-24 Tom Tromey <tromey@redhat.com>
6080 Gary Benson <gbenson@redhat.com>
6081
6082 * server.h (CORE_ADDR): Now unsigned.
6083
60842014-07-16 Pedro Alves <palves@redhat.com>
6085
6086 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6087
60882014-07-15 Pedro Alves <palves@redhat.com>
6089
6090 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6091 copy.
6092
60932014-07-11 Pedro Alves <palves@redhat.com>
6094
6095 * linux-low.c (kill_wait_lwp): New function, based on
6096 kill_one_lwp_callback, but use my_waitpid directly.
6097 (kill_one_lwp_callback, linux_kill): Use it.
6098
60992014-06-23 Pedro Alves <palves@redhat.com>
6100
6101 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6102 before setting DR0..DR3.
6103
61042014-06-20 Gary Benson <gbenson@redhat.com>
6105
6106 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6107 * configure: Regenerated.
6108 * config.in: Likewise.
6109
61102014-06-20 Gary Benson <gbenson@redhat.com>
6111
6112 * Makefile.in (SFILES): Update locations for files moved
6113 from common to nat.
6114 (object file files): Reordered.
6115
61162014-06-20 Gary Benson <gbenson@redhat.com>
6117
6118 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6119 (i386_dr_low_set_addr): Likewise.
6120 (i386_dr_low_get_addr): Likewise.
6121 (i386_dr_low_can_set_control): Likewise.
6122 (i386_dr_low_set_control): Likewise.
6123 (i386_dr_low_get_control): Likewise.
6124 (i386_dr_low_get_status): Likewise.
6125 (i386_get_debug_register_length): Likewise.
6126 * linux-x86-low.c (i386_dr_low_set_addr):
6127 Changed signature. Made static.
6128 (i386_dr_low_get_addr): Likewise.
6129 (i386_dr_low_set_control): Likewise.
6130 (i386_dr_low_get_control): Likewise.
6131 (i386_dr_low_get_status): Likewise.
6132 (i386_dr_low): New global variable.
6133 * win32-i386-low.c (i386_dr_low_set_addr):
6134 Changed signature. Made static.
6135 (i386_dr_low_get_addr): Likewise.
6136 (i386_dr_low_set_control): Likewise.
6137 (i386_dr_low_get_control): Likewise.
6138 (i386_dr_low_get_status): Likewise.
6139 (i386_dr_low): New global variable.
6140
61412014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6142
6143 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6144 * Makefile.in (AR, AR_FLAGS): Define.
6145 * configure: Regenerate.
6146
61472014-06-19 Gary Benson <gbenson@redhat.com>
6148
6149 * Makefile.in (i386-dregs.o): New rule.
6150 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6151 * i386-low.c (target.h): Remove include.
6152 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6153 (DR_CONTROL_SHIFT): Likewise.
6154 (DR_CONTROL_SIZE): Likewise.
6155 (DR_RW_EXECUTE): Likewise.
6156 (DR_RW_WRITE): Likewise.
6157 (DR_RW_READ): Likewise.
6158 (DR_RW_IORW): Likewise.
6159 (DR_LEN_1): Likewise.
6160 (DR_LEN_2): Likewise.
6161 (DR_LEN_4): Likewise.
6162 (DR_LEN_8): Likewise.
6163 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6164 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6165 (DR_ENABLE_SIZE): Likewise.
6166 (DR_LOCAL_SLOWDOWN): Likewise.
6167 (DR_GLOBAL_SLOWDOWN): Likewise.
6168 (DR_CONTROL_RESERVED): Likewise.
6169 (I386_DR_CONTROL_MASK): Likewise.
6170 (I386_DR_VACANT): Likewise.
6171 (I386_DR_LOCAL_ENABLE): Likewise.
6172 (I386_DR_GLOBAL_ENABLE): Likewise.
6173 (I386_DR_DISABLE): Likewise.
6174 (I386_DR_SET_RW_LEN): Likewise.
6175 (I386_DR_GET_RW_LEN): Likewise.
6176 (I386_DR_WATCH_HIT): Likewise.
6177 (i386_wp_op_t): Likewise.
6178 (i386_show_dr): Likewise.
6179 (i386_length_and_rw_bits): Likewise.
6180 (i386_insert_aligned_watchpoint): Likewise.
6181 (i386_remove_aligned_watchpoint): Likewise.
6182 (i386_handle_nonaligned_watchpoint): Likewise.
6183 i386_update_inferior_debug_regs(): Likewise.
6184 (i386_dr_insert_watchpoint): Likewise.
6185 (i386_dr_remove_watchpoint): Likewise.
6186 (i386_dr_region_ok_for_watchpoint): Likewise.
6187 (i386_dr_stopped_data_address): Likewise.
6188 (i386_dr_stopped_by_watchpoint): Likewise.
6189
61902014-06-19 Gary Benson <gbenson@redhat.com>
6191
6192 * i386-low.c (i386_dr_show): Renamed to
6193 i386_show_dr and made static. All uses updated.
6194 (i386_dr_length_and_rw_bits): Renamed to
6195 i386_length_and_rw_bits and made static.
6196 All uses updated.
6197 (i386_dr_insert_aligned_watchpoint): Renamed to
6198 i386_insert_aligned_watchpoint and made static.
6199 All uses updated.
6200 (i386_dr_remove_aligned_watchpoint): Renamed to
6201 i386_remove_aligned_watchpoint and made static.
6202 All uses updated.
6203 (i386_dr_update_inferior_debug_regs): Renamed to
6204 i386_update_inferior_debug_regs and made static.
6205 All uses updated.
6206
62072014-06-18 Gary Benson <gbenson@redhat.com>
6208
6209 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6210 (i386_dr_low_can_set_control): Likewise.
6211 (i386_get_debug_register_length): Likewise.
6212 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6213 (i386_dr_low_can_set_control): Likewise.
6214 (i386_get_debug_register_length): Likewise.
6215
62162014-06-17 Gary Benson <gbenson@redhat.com>
6217
6218 * i386-low.h (i386-dregs.h): New include.
6219 (DR_FIRSTADDR): Now in i386-dregs.h.
6220 (DR_LASTADDR): Likewise.
6221 (DR_NADDR): Likewise.
6222 (DR_STATUS): Likewise.
6223 (DR_CONTROL): Likewise.
6224 (i386_debug_reg_state): Likewise.
6225 (i386_dr_insert_watchpoint): Likewise.
6226 (i386_dr_remove_watchpoint): Likewise.
6227 (i386_dr_region_ok_for_watchpoint): Likewise.
6228 (i386_dr_stopped_data_address): Likewise.
6229 (i386_dr_stopped_by_watchpoint): Likewise.
6230 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6231
62322014-06-18 Gary Benson <gbenson@redhat.com>
6233
6234 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6235 i386_dr_insert_watchpoint.
6236 (i386_low_remove_watchpoint): Renamed to
6237 i386_dr_remove_watchpoint.
6238 (i386_low_region_ok_for_watchpoint): Renamed to
6239 i386_dr_region_ok_for_watchpoint.
6240 (i386_low_stopped_data_address): Renamed to
6241 i386_dr_stopped_data_address.
6242 (i386_low_stopped_by_watchpoint): Renamed to
6243 i386_dr_stopped_by_watchpoint.
6244 * i386-low.c (i386_show_dr): Renamed to
6245 i386_dr_show and made nonstatic. All uses updated.
6246 (i386_length_and_rw_bits): Renamed to
6247 i386_dr_length_and_rw_bits and made nonstatic.
6248 All uses updated.
6249 (i386_insert_aligned_watchpoint): Renamed to
6250 i386_dr_insert_aligned_watchpoint and made nonstatic.
6251 All uses updated.
6252 (i386_remove_aligned_watchpoint): Renamed to
6253 i386_dr_remove_aligned_watchpoint and made nonstatic.
6254 All uses updated.
6255 (i386_update_inferior_debug_regs): Renamed to
6256 i386_dr_update_inferior_debug_regs and made nonstatic.
6257 All uses updated.
6258 (i386_low_insert_watchpoint): Renamed to
6259 i386_dr_insert_watchpoint. All uses updated.
6260 (i386_low_remove_watchpoint): Renamed to
6261 i386_dr_remove_watchpoint. All uses updated.
6262 (i386_low_region_ok_for_watchpoint): Renamed to
6263 i386_dr_region_ok_for_watchpoint. All uses updated.
6264 (i386_low_stopped_data_address): Renamed to
6265 i386_dr_stopped_data_address. All uses updated.
6266 (i386_low_stopped_by_watchpoint): Renamed to
6267 i386_dr_stopped_by_watchpoint. All uses updated.
6268
62692014-06-18 Gary Benson <gbenson@redhat.com>
6270
6271 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6272 (i386_dr_low_can_set_control): Likewise.
6273 (i386_insert_aligned_watchpoint): New check.
6274
62752014-06-18 Gary Benson <gbenson@redhat.com>
6276
6277 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6278 Renamed to state.
6279
62802014-06-18 Gary Benson <gbenson@redhat.com>
6281
6282 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6283 instead of fatal and error.
6284 (i386_handle_nonaligned_watchpoint): Likewise.
6285
62862014-06-18 Gary Benson <gbenson@redhat.com>
6287
6288 * i386-low.c (i386_get_debug_register_length): New macro.
6289 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6290 (i386_show_dr): Use debug_printf instead of fprintf. Use
6291 phex to format values.
6292
62932014-06-18 Gary Benson <gbenson@redhat.com>
6294
6295 * i386-low.h: Comment changes.
6296 * i386-low.c: Likewise.
6297
62982014-06-18 Gary Benson <gbenson@redhat.com>
6299
6300 * i386-low.c: Whitespace changes.
6301
63022014-06-12 Tom Tromey <tromey@redhat.com>
6303
6304 * utils.c (freeargv): Remove.
6305
63062014-06-12 Tom Tromey <tromey@redhat.com>
6307
6308 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6309 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6310 (parse_debug_format_options): Likewise.
6311 (gdbserver_usage): Likewise.
6312 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6313 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6314 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6315 against libiberty.
6316 ($(LIBGNU)): Depend on libiberty.
6317 (all-lib): Recurse into all subdirs.
6318 (install-only): Invoke "install" target in subdirs.
6319 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6320 targets.
6321 * configure: Rebuild.
6322 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6323 for vasprintf, vsnprintf, or gettimeofday.
6324 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6325 srv_tgtobj.
6326
63272014-06-05 Joel Brobecker <brobecker@adacore.com>
6328
6329 * development.sh: Delete.
6330 * Makefile.in (config.status): Adjust dependency on development.sh.
6331 * configure.ac: Adjust development.sh source call.
6332 * configure: Regenerate.
6333
63342014-06-02 Pedro Alves <palves@redhat.com>
6335
6336 * ax.c (gdb_free_agent_expr): New function.
6337 * ax.h (gdb_free_agent_expr): New declaration.
6338 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6339 list.
6340 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6341 static.
6342 (clear_breakpoint_conditions_and_commands): New function.
6343 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6344 (clear_breakpoint_conditions_and_commands): New declaration.
6345
63462014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6347
6348 * linux-aarch64-low.c (asm/ptrace.h): Include.
6349
63502014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6351
6352 Fix TLS access for -static -pthread.
6353 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6354 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6355 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6356
63572014-05-20 Pedro Alves <palves@redhat.com>
6358
6359 * linux-aarch64-low.c (aarch64_insert_point)
6360 (aarch64_remove_point): No longer check whether the type is
6361 supported here. Adjust to new interface.
6362 (the_low_target): Install aarch64_supports_z_point_type as
6363 supports_z_point_type method.
6364 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6365 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6366 instead of a Z packet char. Adjust.
6367 (arm_supports_z_point_type): New function.
6368 (arm_insert_point, arm_remove_point): Adjust to new interface.
6369 (the_low_target): Install arm_supports_z_point_type.
6370 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6371 (cris_insert_point, cris_remove_point): Adjust to new interface.
6372 Don't check whether the type is supported here.
6373 (the_low_target): Install cris_supports_z_point_type.
6374 * linux-low.c (linux_supports_z_point_type): New function.
6375 (linux_insert_point, linux_remove_point): Adjust to new interface.
6376 * linux-low.h (struct linux_target_ops) <insert_point,
6377 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6378 raw_breakpoint pointer parameter.
6379 <supports_z_point_type>: New method.
6380 * linux-mips-low.c (mips_supports_z_point_type): New function.
6381 (mips_insert_point, mips_remove_point): Adjust to new interface.
6382 Use mips_supports_z_point_type.
6383 (the_low_target): Install mips_supports_z_point_type.
6384 * linux-ppc-low.c (the_low_target): Install NULL as
6385 supports_z_point_type method.
6386 * linux-s390-low.c (the_low_target): Install NULL as
6387 supports_z_point_type method.
6388 * linux-sparc-low.c (the_low_target): Install NULL as
6389 supports_z_point_type method.
6390 * linux-x86-low.c (x86_supports_z_point_type): New function.
6391 (x86_insert_point): Adjust to new insert_point interface. Use
6392 insert_memory_breakpoint. Adjust to new
6393 i386_low_insert_watchpoint interface.
6394 (x86_remove_point): Adjust to remove_point interface. Use
6395 remove_memory_breakpoint. Adjust to new
6396 i386_low_remove_watchpoint interface.
6397 (the_low_target): Install x86_supports_z_point_type.
6398 * lynx-low.c (lynx_target_ops): Install NULL as
6399 supports_z_point_type callback.
6400 * nto-low.c (nto_supports_z_point_type): New.
6401 (nto_insert_point, nto_remove_point): Adjust to new interface.
6402 (nto_target_ops): Install nto_supports_z_point_type.
6403 * mem-break.c: Adjust intro comment.
6404 (struct raw_breakpoint) <raw_type, size>: New fields.
6405 <inserted>: Update comment.
6406 <shlib_disabled>: Delete field.
6407 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6408 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6409 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6410 (raw_bkpt_type_to_target_hw_bp_type): New function.
6411 (find_enabled_raw_code_breakpoint_at): New function.
6412 (find_raw_breakpoint_at): New type and size parameters. Use them.
6413 (insert_memory_breakpoint): New function, based off
6414 set_raw_breakpoint_at.
6415 (remove_memory_breakpoint): New function.
6416 (set_raw_breakpoint_at): Reimplement.
6417 (set_breakpoint): New, based on set_breakpoint_at.
6418 (set_breakpoint_at): Reimplement.
6419 (delete_raw_breakpoint): Go through the_target->remove_point
6420 instead of assuming memory breakpoints.
6421 (find_gdb_breakpoint_at): Delete.
6422 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6423 (find_gdb_breakpoint): New function.
6424 (set_gdb_breakpoint_at): Delete.
6425 (z_type_supported): New function.
6426 (set_gdb_breakpoint_1): New function, loosely based off
6427 set_gdb_breakpoint_at.
6428 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6429 (delete_gdb_breakpoint_at): Delete.
6430 (delete_gdb_breakpoint_1): New function, loosely based off
6431 delete_gdb_breakpoint_at.
6432 (delete_gdb_breakpoint): New function.
6433 (clear_gdb_breakpoint_conditions): Rename to ...
6434 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6435 breakpoint.
6436 (add_condition_to_breakpoint): Make static.
6437 (add_breakpoint_condition): Take a struct breakpoint pointer
6438 instead of an address. Adjust.
6439 (gdb_condition_true_at_breakpoint): Rename to ...
6440 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6441 z_type parameter.
6442 (gdb_condition_true_at_breakpoint): Reimplement.
6443 (add_breakpoint_commands): Take a struct breakpoint pointer
6444 instead of an address. Adjust.
6445 (gdb_no_commands_at_breakpoint): Rename to ...
6446 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6447 parameter. Return true if no breakpoint was found. Change debug
6448 output.
6449 (gdb_no_commands_at_breakpoint): Reimplement.
6450 (run_breakpoint_commands): Rename to ...
6451 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6452 and change return type to boolean.
6453 (run_breakpoint_commands): New function.
6454 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6455 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6456 breakpoint. Go through the_target->remove_point instead of
6457 assuming memory breakpoint.
6458 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6459 software and hardware breakpoints.
6460 (reinsert_raw_breakpoint): Go through the_target->insert_point
6461 instead of assuming memory breakpoint.
6462 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6463 software and hardware breakpoints.
6464 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6465 Check both software and hardware breakpoints.
6466 (validate_inserted_breakpoint): Assert the breakpoint is a
6467 software breakpoint. Set the inserted flag to -1 instead of
6468 setting shlib_disabled.
6469 (delete_disabled_breakpoints): Adjust.
6470 (validate_breakpoints): Only validate software breakpoints.
6471 Adjust to inserted flag change.
6472 (check_mem_read, check_mem_write): Skip breakpoint types other
6473 than software breakpoints. Adjust to inserted flag change.
6474 * mem-break.h (enum raw_bkpt_type): New enum.
6475 (raw_breakpoint, struct process_info): Forward declare.
6476 (Z_packet_to_target_hw_bp_type): Delete declaration.
6477 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6478 (set_gdb_breakpoint, delete_gdb_breakpoint)
6479 (clear_breakpoint_conditions): New declarations.
6480 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6481 (breakpoint_inserted_here): Update comment.
6482 (add_breakpoint_condition, add_breakpoint_commands): Replace
6483 address parameter with a breakpoint pointer parameter.
6484 (gdb_breakpoint_here): Update comment.
6485 (delete_gdb_breakpoint_at): Delete.
6486 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6487 * server.c (process_point_options): Take a struct breakpoint
6488 pointer instead of an address. Adjust.
6489 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6490 delete_gdb_breakpoint.
6491 * spu-low.c (spu_target_ops): Install NULL as
6492 supports_z_point_type method.
6493 * target.h: Include mem-break.h.
6494 (struct target_ops) <prepare_to_access_memory>: Update comment.
6495 <supports_z_point_type>: New field.
6496 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6497 instead of a char. Also take a raw breakpoint pointer.
6498 * win32-arm-low.c (the_low_target): Install NULL as
6499 supports_z_point_type.
6500 * win32-i386-low.c (i386_supports_z_point_type): New function.
6501 (i386_insert_point, i386_remove_point): Adjust to new interface.
6502 (the_low_target): Install i386_supports_z_point_type.
6503 * win32-low.c (win32_supports_z_point_type): New function.
6504 (win32_insert_point, win32_remove_point): Adjust to new interface.
6505 (win32_target_ops): Install win32_supports_z_point_type.
6506 * win32-low.h (struct win32_target_ops):
6507 <supports_z_point_type>: New method.
6508 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6509 instead of a char. Also take a raw breakpoint pointer.
6510
65112014-05-20 Pedro Alves <palves@redhat.com>
6512
6513 * mem-break.h: Include break-common.h.
6514 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6515 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6516 (Z_packet_to_target_hw_bp_type): New declaration.
6517 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6518 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6519 (Z_PACKET_ACCESS_WP): Delete macros.
6520 (Z_packet_to_hw_type): Delete function.
6521 * i386-low.h: Don't include break-common.h here.
6522 (Z_packet_to_hw_type): Delete declaration.
6523 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6524 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6525 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6526 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6527 * linux-aarch64-low.c: Don't include break-common.h here.
6528 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6529 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6530 (Z_packet_to_target_hw_bp_type): Delete function.
6531 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6532 function.
6533 (mips_insert_point, mips_remove_point): Use
6534 Z_packet_to_target_hw_bp_type.
6535
65362014-05-20 Pedro Alves <palves@redhat.com>
6537
6538 * linux-aarch64-low.c: Include break-common.h.
6539 (enum target_point_type): Delete.
6540 (Z_packet_to_point_type): Rename to ...
6541 (Z_packet_to_target_hw_bp_type): ... this, and return a
6542 target_hw_bp_type instead.
6543 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6544 instead of an enum target_point_type.
6545 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6546 breakpoint type.
6547 (aarch64_dr_state_insert_one_point)
6548 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6549 (aarch64_handle_aligned_watchpoint)
6550 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6551 Take an enum target_hw_bp_type instead of an enum
6552 target_point_type.
6553 (aarch64_supports_z_point_type): New function.
6554 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6555 use Z_packet_to_target_hw_bp_type.
6556
65572014-05-20 Joel Brobecker <brobecker@adacore.com>
6558
6559 * configure.ac: Only use -Werror by default when DEVELOPMENT
6560 is true.
6561 * configure: Regenerate.
6562
65632014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6564
6565 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6566 * linux-x86-low.c (X86_64_USER_REGS): New.
6567 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6568
65692014-04-28 Yao Qi <yao@codesourcery.com>
6570
6571 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6572 name.
6573
65742014-04-25 Pedro Alves <palves@redhat.com>
6575
6576 PR server/16255
6577 * linux-low.c (linux_attach_fail_reason_string): New function.
6578 (linux_attach_lwp): Delete.
6579 (linux_attach_lwp_1): Rename to ...
6580 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6581 argument. Remove "initial" parameter. Return int instead of
6582 void. Don't error or warn here.
6583 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6584 failure to attach to the tgid. Call warning when failing to
6585 attach to an lwp.
6586 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6587 argument. Remove "initial" parameter. Return int instead of
6588 void. Don't error or warn here.
6589 (linux_attach_fail_reason_string): New declaration.
6590 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6591 interface change. Use linux_attach_fail_reason_string.
6592
65932014-04-24 Michael Sturm <michael.sturm@mintel.com>
6594 Walfred Tedeschi <walfred.tedeschi@intel.com>
6595
6596 * Makefile.in: Added rules to handle new files
6597 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6598 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6599 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6600 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6601 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6602 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6603 x32-avx512-linux.o.
6604 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6605 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6606 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6607 i386/x32-avx512.xml.
6608 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6609 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6610 i386/x32-avx512-linux.xml.
6611 * i387-fp.c (num_avx512_k_registers): New constant for number
6612 of K registers.
6613 (num_avx512_zmmh_low_registers): New constant for number of
6614 lower ZMM registers (0-15).
6615 (num_avx512_zmmh_high_registers): New constant for number of
6616 higher ZMM registers (16-31).
6617 (num_avx512_ymmh_registers): New contant for number of higher
6618 YMM registers (ymm16-31 added by avx521 on x86_64).
6619 (num_avx512_xmm_registers): New constant for number of higher
6620 XMM registers (xmm16-31 added by AVX512 on x86_64).
6621 (struct i387_xsave): Add space for AVX512 registers.
6622 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6623 Add code to handle AVX512 registers.
6624 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6625 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6626 prototypei from generated file.
6627 (tdesc_amd64_avx512_linux): Likewise.
6628 (init_registers_x32_avx512_linux): Likewise.
6629 (tdesc_x32_avx512_linux): Likewise.
6630 (init_registers_i386_avx512_linux): Likewise.
6631 (tdesc_i386_avx512_linux): Likewise.
6632 (x86_64_regmap): Add AVX512 registers.
6633 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6634 mask.
6635 (initialize_low_arch): Add code to initialize AVX512 registers.
6636
66372014-04-23 Pedro Alves <palves@redhat.com>
6638
6639 * mem-break.c (find_gdb_breakpoint_at): Make static.
6640 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6641
66422014-04-23 Pedro Alves <palves@redhat.com>
6643
6644 * i386-low.c: Don't include break-common.h here.
6645 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6646 prototype to take target_hw_bp_type as argument instead of a Z
6647 packet char.
6648 * i386-low.h: Include break-common.h here.
6649 (Z_packet_to_hw_type): Declare.
6650 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6651 prototypes.
6652 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6653 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6654 (x86_remove_point): Convert the packet number to a
6655 target_hw_bp_type before calling i386_low_remove_watchpoint.
6656 * win32-i386-low.c (i386_insert_point): Convert the packet number
6657 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6658 (i386_remove_point): Convert the packet number to a
6659 target_hw_bp_type before calling i386_low_remove_watchpoint.
6660
66612014-04-23 Pedro Alves <palves@redhat.com>
6662
6663 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6664
66652014-04-10 Pedro Alves <palves@redhat.com>
6666
6667 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6668 Check if the condition or command is NULL before checking if the
6669 breakpoint is known. On success, return true.
6670 * mem-break.h (add_breakpoint_condition): Document return.
6671 (add_breakpoint_commands): Add describing comment.
6672 * server.c (skip_to_semicolon): New function.
6673 (process_point_options): Use it.
6674
66752014-04-09 Pedro Alves <palves@redhat.com>
6676
6677 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6678 to lwpid_of.
6679
66802014-02-27 Pedro Alves <palves@redhat.com>
6681
6682 PR 12702
6683 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6684 macros.
6685 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6686 output.
6687 (last_thread_of_process_p): Take a PID argument instead of a
6688 thread pointer.
6689 (linux_wait_for_lwp): Delete.
6690 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6691 functions.
6692 (linux_low_filter_event): New function, party factored out from
6693 linux_wait_for_event.
6694 (linux_wait_for_event): Rename to ...
6695 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6696 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6697 sigsuspend. Check for zombie leaders.
6698 (linux_wait_for_event): Reimplement as wrapper around
6699 linux_wait_for_event_filtered.
6700 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6701 a normal or signal exit is seen, it's the whole process exiting.
6702 (wait_for_sigstop): No longer a for_each_inferior callback.
6703 Rewrite on top of linux_wait_for_event_filtered.
6704 (stop_all_lwps): Call wait_for_sigstop directly.
6705 * server.c (resume, handle_target_event): Handle
6706 TARGET_WAITKIND_NO_RESUMED.
6707
67082014-02-26 Joel Brobecker <brobecker@adacore.com>
6709
6710 * win32-low.c (psapi_get_dll_name,
6711 * win32_CreateToolhelp32Snapshot): Delete.
6712 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6713 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6714 Delete.
6715 (handle_load_dll): Add function description.
6716 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6717
67182014-02-26 Joel Brobecker <brobecker@adacore.com>
6719
6720 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6721 Add comment.
6722 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6723 base address when calling win32_add_one_solib.
6724 (handle_load_dll): Delete local variable load_addr.
6725 Remove 0x1000 offset applied to DLL base address when calling
6726 win32_add_one_solib.
6727 (handle_unload_dll): Add comment.
6728
67292014-02-26 Joel Brobecker <brobecker@adacore.com>
6730
6731 * win32-low.c (win32_add_all_dlls): Renames
6732 win32_ensure_ntdll_loaded. Rewrite function documentation.
6733 Adjust implementation to always load all DLLs.
6734 Add 0x1000 offset to DLL base address when calling
6735 win32_add_one_solib.
6736 (child_initialization_done): New static global.
6737 (do_initial_child_stuff): Set child_initialization_done to
6738 zero during child initialization, and 1 after. Replace call
6739 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6740 Add comment.
6741 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6742 (handle_unload_dll): Add function documentation.
6743 (get_child_debug_event): Ignore load and unload DLL events
6744 during child initialization.
6745
67462014-02-20 Doug Evans <dje@google.com>
6747
6748 Remove global all_lwps.
6749 * inferiors.h (ptid_of): Move here from linux-low.h.
6750 (pid_of, lwpid_of): Ditto.
6751 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6752 parameter is a struct thread_info * now.
6753 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6754 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6755 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6756 directly.
6757 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6758 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6759 * linux-arm-low.c (update_registers_callback): Update, "entry"
6760 parameter is a struct thread_info * now.
6761 Fetch lwpid from current_inferior directly.
6762 (arm_insert_point): Pass &all_threads to find_inferior instead of
6763 &all_lwps.
6764 (arm_remove_point): Ditto.
6765 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6766 (arm_prepare_to_resume): Fetch pid from thread.
6767 (arm_read_description): Fetch lwpid from current_inferior directly.
6768 * linux-low.c (all_lwps): Delete.
6769 (delete_lwp): Delete call to remove_inferior.
6770 (handle_extended_wait): Fetch lwpid from thread.
6771 (add_lwp): Don't set lwp->entry.id. Remove call to
6772 add_inferior_to_list.
6773 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6774 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6775 (kill_one_lwp_callback): Ditto.
6776 (linux_kill): Don't dereference NULL pointer.
6777 Fetch ptid,lwpid from thread.
6778 (get_detach_signal): Fetch ptid from thread.
6779 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6780 Simplify call to regcache_invalidate_thread.
6781 (delete_lwp_callback): Update, "entry" parameter is a
6782 struct thread_info * now. Fetch pid from thread.
6783 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6784 (status_pending_p_callback): Update, "entry" parameter is a
6785 struct thread_info * now. Fetch ptid from thread.
6786 (find_lwp_pid): Update, "entry" parameter is a
6787 struct thread_info * now.
6788 (linux_wait_for_lwp): Fetch pid from thread.
6789 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6790 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6791 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6792 (dequeue_one_deferred_signal): Ditto.
6793 (cancel_breakpoint): Fetch ptid from current_inferior.
6794 (linux_wait_for_event): Pass &all_threads to find_inferior,
6795 not &all_lwps. Fetch ptid, lwpid from thread.
6796 (count_events_callback): Update, "entry" parameter is a
6797 struct thread_info * now.
6798 (select_singlestep_lwp_callback): Ditto.
6799 (select_event_lwp_callback): Ditto.
6800 (cancel_breakpoints_callback): Ditto.
6801 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6802 not &all_lwps.
6803 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6804 (unsuspend_one_lwp): Update, "entry" parameter is a
6805 struct thread_info * now.
6806 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6807 not &all_lwps.
6808 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6809 Fetch lwpid from thread, not lwp.
6810 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6811 Pass &all_threads to find_inferior, not &all_lwps.
6812 (send_sigstop): Fetch lwpid from thread, not lwp.
6813 (send_sigstop_callback): Update, "entry" parameter is a
6814 struct thread_info * now.
6815 (suspend_and_send_sigstop_callback): Ditto.
6816 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6817 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6818 struct thread_info * now.
6819 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6820 from thread, lwp.
6821 (lwp_running): Update, "entry" parameter is a
6822 struct thread_info * now.
6823 (stop_all_lwps): Fetch ptid from thread.
6824 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6825 (linux_resume_one_lwp): Fetch lwpid from thread.
6826 (linux_set_resume_request): Update, "entry" parameter is a
6827 struct thread_info * now. Fetch pid, lwpid from thread.
6828 (resume_status_pending_p): Update, "entry" parameter is a
6829 struct thread_info * now.
6830 (need_step_over_p): Ditto. Fetch lwpid from thread.
6831 (start_step_over): Fetch lwpid from thread.
6832 (linux_resume_one_thread): Update, "entry" parameter is a
6833 struct thread_info * now. Fetch lwpid from thread.
6834 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6835 (proceed_one_lwp): Update, "entry" parameter is a
6836 struct thread_info * now. Fetch lwpid from thread.
6837 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6838 struct thread_info * now.
6839 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6840 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6841 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6842 directly.
6843 (regsets_store_inferior_registers): Ditto.
6844 (fetch_register, store_register): Ditto.
6845 (linux_read_memory, linux_write_memory): Ditto.
6846 (linux_request_interrupt): Ditto.
6847 (linux_read_auxv): Ditto.
6848 (linux_xfer_siginfo): Ditto.
6849 (linux_qxfer_spu): Ditto.
6850 (linux_qxfer_libraries_svr4): Ditto.
6851 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6852 moved to inferiors.h.
6853 (get_lwp): Delete.
6854 (get_thread_lwp): Update.
6855 (struct lwp_info): Delete member "entry". Simplify comment for
6856 member "thread".
6857 (all_lwps): Delete.
6858 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6859 current_inferior directly.
6860 (update_watch_registers_callback): Update, "entry" parameter is a
6861 struct thread_info * now. Fetch pid from thread.
6862 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6863 (mips_insert_point): Fetch lwpid from current_inferior.
6864 Pass &all_threads to find_inferior, not &all_lwps.
6865 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6866 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6867 directly.
6868 (mips_stopped_data_address): Ditto.
6869 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6870 directly.
6871 * linux-tile-low.c (tile_arch_setup): Ditto.
6872 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6873 (update_debug_registers_callback): Update, "entry" parameter is a
6874 struct thread_info * now. Fetch pid from thread.
6875 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6876 Pass &all_threads to find_inferior, not &all_lwps.
6877 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6878 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6879 Pass &all_threads to find_inferior, not &all_lwps.
6880 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6881 (i386_dr_low_get_status): Ditto.
6882 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6883 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6884 (x86_linux_read_description): Ditto.
6885 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6886
68872014-02-20 Doug Evans <dje@google.com>
6888
6889 * inferiors.c (get_first_inferior): Fix buglet.
6890
68912014-02-19 Doug Evans <dje@google.com>
6892
6893 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6894 * inferiors.c (add_thread): Change result type to struct thread_info *.
6895 All callers updated.
6896 (add_lwp): Call add_thread here instead of in callers.
6897 All callers updated.
6898 * linux-low.h (get_lwp_thread): Rewrite.
6899 (struct lwp_info): New member "thread".
6900
69012014-02-19 Doug Evans <dje@google.com>
6902
6903 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6904 All callers updated.
6905
69062014-02-19 Doug Evans <dje@google.com>
6907
6908 * inferiors.c (add_thread): Fix whitespace.
6909
69102014-02-19 Doug Evans <dje@google.com>
6911
6912 * dll.c (clear_dlls): Replace accessing list implemention details
6913 with API function.
6914 * gdbthread.h (get_first_thread): Declare.
6915 * inferiors.c (for_each_inferior_with_data): New function.
6916 (get_first_thread): New function.
6917 (find_thread_ptid): Simplify.
6918 (get_first_inferior): New function.
6919 (clear_list): Delete.
6920 (one_inferior_p): New function.
6921 (clear_inferior_list): New function.
6922 (clear_inferiors): Update.
6923 * inferiors.h (for_each_inferior_with_data): Declare.
6924 (clear_inferior_list): Declare.
6925 (one_inferior_p): Declare.
6926 (get_first_inferior): Declare.
6927 * linux-low.c (linux_wait_for_event): Replace accessing list
6928 implemention details with API function.
6929 * server.c (target_running): Ditto.
6930 (accumulate_file_name_length): New function.
6931 (emit_dll_description): New function.
6932 (handle_qxfer_libraries): Replace accessing list implemention
6933 details with API function.
6934 (handle_qxfer_threads_worker): New function.
6935 (handle_qxfer_threads_proper): Replace accessing list implemention
6936 details with API function.
6937 (handle_query): Ditto.
6938 (visit_actioned_threads_callback_ftype): New typedef.
6939 (visit_actioned_threads_data): New struct.
6940 (visit_actioned_threads): Rewrite to be find_inferior callback.
6941 (resume): Call find_inferior.
6942 (handle_status): Replace accessing list implemention
6943 details with API function.
6944 (process_serial_event): Replace accessing list implemention details
6945 with API function.
6946 * target.c (set_desired_inferior): Replace accessing list implemention
6947 details with API function.
6948 * tracepoint.c (same_process_p): New function.
6949 (gdb_agent_about_to_close): Replace accessing list implemention
6950 details with API function.
6951 * win32-low.c (child_delete_thread): Replace accessing list
6952 implemention details with API function.
6953 (match_dll_by_basename): New function.
6954 (dll_is_loaded_by_basename): New function.
6955 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6956 details call to dll_is_loaded_by_basename.
6957
69582014-02-19 Doug Evans <dje@google.com>
6959
6960 * dll.h (struct dll_info): Add comment.
6961 * gdbthread.h (struct thread_info): Add comment.
6962 (current_ptid): Simplify.
6963 * inferiors.c (add_process): Update.
6964 (remove_process): Update.
6965 * inferiors.h (struct process_info): Rename member "head" to "entry".
6966 * linux-low.c (delete_lwp): Update.
6967 (add_lwp): Update.
6968 (last_thread_of_process_p): Update.
6969 (kill_one_lwp_callback, linux_kill): Update.
6970 (status_pending_p_callback): Update.
6971 (wait_for_sigstop): Update. Simplify read of ptid.
6972 (start_step_over): Update.
6973 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6974 (get_lwp_thread): Update.
6975 (struct lwp_info): Rename member "head" to "entry".
6976 * regcache.h (inferior_list_entry): Delete.
6977 * server.c (kill_inferior_callback): Update.
6978 (detach_or_kill_inferior_callback): Update.
6979 (print_started_pid): Update.
6980 (print_attached_pid): Update.
6981 (process_serial_event): Simplify read of ptid.
6982 * thread-db.c (thread_db_create_event): Update.
6983 (thread_db_get_tls_address): Update.
6984 * win32-low.c (current_inferior_ptid): Simplify.
6985
69862014-02-19 Tom Tromey <tromey@redhat.com>
6987
6988 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6989 argument.
6990 (target_supports_btrace): Update.
6991
69922014-02-14 Yao Qi <yao@codesourcery.com>
6993
6994 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6995 (rsp-low-ipa.o): New target.
6996
69972014-02-12 Tom Tromey <tromey@redhat.com>
6998
6999 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7000 convert_ascii_to_int.
7001 * regcache.c (registers_to_string): Likewise.
7002 * remote-utils.c (decode_M_packet): Likewise.
7003 * server.c (process_serial_event): Likewise.
7004
70052014-02-12 Tom Tromey <tromey@redhat.com>
7006
7007 * server.c (handle_query, handle_v_run): Use hex2bin, not
7008 unhexify.
7009 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7010
70112014-02-12 Tom Tromey <tromey@redhat.com>
7012
7013 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7014 convert_int_to_ascii.
7015 * regcache.c (registers_to_string, collect_register_as_string):
7016 Likewise.
7017 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7018 Likewise.
7019 * server.c (process_serial_event): Likewise.
7020 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7021 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7022
70232014-02-12 Tom Tromey <tromey@redhat.com>
7024
7025 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7026 bin2hex, not hexify.
7027 * tracepoint.c (cmd_qtstatus): Likewise.
7028
70292014-02-12 Tom Tromey <tromey@redhat.com>
7030
7031 * remote-utils.c (monitor_output): Pass explicit length to
7032 hexify.
7033
70342014-02-12 Tom Tromey <tromey@redhat.com>
7035
7036 * tracepoint.c: Include rsp-low.h.
7037 * server.c: Include rsp-low.h.
7038 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7039 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7040 declare.
7041 * remote-utils.c: Include rsp-low.h.
7042 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7043 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7044 (convert_int_to_ascii, convert_ascii_to_int): Move to
7045 common/rsp-low.c.
7046 * regcache.c: Include rsp-low.h.
7047 * ax.c: Include rsp-low.h.
7048 * Makefile.in (SFILES): Add common/rsp-low.c.
7049 (OBS): Add rsp-low.o.
7050 (rsp-low.o): New target.
7051
70522014-02-12 Tom Tromey <tromey@redhat.com>
7053
7054 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7055 Include print-utils.h.
7056 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7057 (plongest, thirty_two, phex_nz): Remove.
7058 * Makefile.in (SFILES): Add common/print-utils.c.
7059 (OBS): Add print-utils.o.
7060 (print-utils-ipa.o): New target.
7061 (print-utils.o): New target.
7062 (IPA_OBJS): Add print-utils-ipa.o.
7063
70642014-02-06 Tom Tromey <tromey@redhat.com>
7065
7066 * Makefile.in (SFILES): Fix indentation.
7067
70682014-02-05 Doug Evans <dje@google.com>
7069
7070 * linux-low.c (linux_wait_for_event): Improve comment.
7071 (linux_wait_1): Keep current_inferior in sync with event_child.
7072
70732014-01-22 Doug Evans <dje@google.com>
7074
7075 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7076
70772014-01-22 Doug Evans <dje@google.com>
7078
7079 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7080 * configure: Regenerate.
7081 * config.in: Regenerate.
7082 * Makefile.in (SFILES): Add debug.c.
7083 (OBS): Add debug.o.
7084 * debug.c: New file.
7085 * debug.h: New file.
7086 * linux-aarch64-low.c (*): Update all debugging printfs to use
7087 debug_printf instead of fprintf.
7088 * linux-arm-low.c (*): Ditto.
7089 * linux-cris-low.c (*): Ditto.
7090 * linux-crisv32-low.c (*): Ditto.
7091 * linux-m32r-low.c (*): Ditto.
7092 * linux-sparc-low.c (*): Ditto.
7093 * linux-x86.c (*): Ditto.
7094 * linux-low.c (*): Ditto.
7095 (linux_wait_1): Add calls to debug_enter, debug_exit.
7096 (linux_wait): Remove redundant debugging printf.
7097 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7098 (linux_resume, unstop_all_lwps): Ditto.
7099 * mem-break.c (*): Update all debugging printfs to use
7100 debug_printf instead of fprintf.
7101 * remote-utils.c (*): Ditto.
7102 * thread-db.c (*): Ditto.
7103 * server.c #include <ctype.h>, "gdb_vecs.h".
7104 (debug_threads): Moved to debug.c.
7105 (*): Update all debugging printfs to use debug_printf instead of
7106 fprintf.
7107 (start_inferior): Replace call to fflush with call to debug_flush.
7108 (monitor_show_help): Mention set debug-format.
7109 (parse_debug_format_options): New function.
7110 (handle_monitor_command): Handle "monitor set debug-format".
7111 (gdbserver_usage): Mention --debug-format.
7112 (main): Parse --debug-format.
7113 * server.h (debug_threads): Declaration moved to debug.h.
7114 #include "debug.h".
7115 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7116 trace_debug_1 that uses debug_printf.
7117 (tracepoint_look_up_symbols): Update all debugging printfs to use
7118 debug_printf instead of fprintf.
7119
71202014-01-20 Baruch Siach <baruch@tkos.co.il>
7121
7122 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7123 sys/ptrace.h.
7124
71252014-01-17 Pedro Alves <palves@redhat.com>
7126
7127 PR build/16445
7128 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7129 defined after including gdb_proc_service.h.
7130
71312014-01-16 Doug Evans <dje@google.com>
7132
7133 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7134 (match_dll): Use it.
7135
71362014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7137
7138 * target.h (target_ops) <read_btrace>: Change parameters and
7139 return type to allow error reporting.
7140 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7141 trace reading errors on.
7142 * linux-low.c (linux_low_read_btrace): Pass trace reading
7143 errors on.
7144 (linux_low_disable_btrace): New.
7145
71462014-01-15 Doug Evans <dje@google.com>
7147
7148 * inferiors.c (thread_id_to_gdb_id): Delete.
7149 * inferiors.h (thread_id_to_gdb_id): Delete.
7150
71512014-01-13 Eli Zaretskii <eliz@gnu.org>
7152
7153 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7154 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7155 versions.
7156
71572014-01-08 Pedro Alves <palves@redhat.com>
7158
7159 * server.c (handle_status): Don't discard previous queued stop
7160 replies or thread's pending status here.
7161 (main) <disconnection>: Do it here instead.
7162
71632014-01-08 Pedro Alves <palves@redhat.com>
7164
7165 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7166 * server.c (visit_actioned_threads, handle_pending_status): New
7167 function.
7168 (handle_v_cont): Factor out parts to ...
7169 (resume): ... this new function. If in all-stop, and a thread
7170 being resumed has a pending status, report it without actually
7171 resuming.
7172 (myresume): Adjust to use the new 'resume' function.
7173 (clear_pending_status_callback, set_pending_status_callback)
7174 (find_status_pending_thread_callback): New functions.
7175 (handle_status): Handle the case of multiple threads having
7176 interesting statuses to report. Report threads' real last signal
7177 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7178 with an interesting thread to report the status for, instead of
7179 always reporting the status of the first thread.
7180
71812014-01-01 Joel Brobecker <brobecker@adacore.com>
7182
7183 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7184 * gdbreplay.c (gdbreplay_version): Likewise.
7185
71862013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7187
7188 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7189 iov.iov_len with the real length in use.
7190
71912013-12-13 Joel Brobecker <brobecker@adacore.com>
7192
7193 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7194 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7195 for all targets that use win32-low.c.
7196 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7197 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7198
71992013-12-13 Pedro Alves <palves@redhat.com>
7200
7201 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7202 if equal to TARGET_WAITKIND_LOADED.
7203 * win32-low.c (cached_status): New static global.
7204 (win32_wait): Add declaration.
7205 (do_initial_child_stuff): Flush all initial pending debug events
7206 up to the initial breakpoint.
7207 (win32_wait): If CACHED_STATUS was set, return that instead
7208 of doing a real wait. Remove the code resuming the execution
7209 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7210 during the initial phase. Also remove the code changing
7211 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7212 TARGET_WAITKIND_STOPPED.
7213
72142013-12-11 Yao Qi <yao@codesourcery.com>
7215
7216 * notif.c (handle_notif_ack): Return 0 if no notification
7217 matches.
7218
72192013-11-20 Doug Evans <dje@google.com>
7220
7221 * linux-low.c (linux_set_resume_request): Fix comment.
7222
72232013-11-20 Doug Evans <dje@google.com>
7224
7225 * linux-low.c (resume_status_pending_p): Tweak comment.
7226
72272013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7228
7229 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7230 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7231 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7232 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7233 (srv_amd64_regobj): Add amd64-mpx.o.
7234 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7235 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7236 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7237 * i387-fp.c (num_pl_bnd_register) Added constant.
7238 (num_pl_bnd_cfg_registers) Added constant.
7239 (struct i387_xsave) Added reserved area and MPX fields.
7240 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7241 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7242 function.
7243 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7244 (init_registers_amd64_mpx_linux): Declare new function.
7245 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7246 (x86_64_regmap): Add MPX registers.
7247 (x86_linux_read_description): Add MPX case.
7248 (initialize_low_arch): Initialize MPX targets.
7249
72502013-11-18 Tom Tromey <tromey@redhat.com>
7251
7252 * configure: Rebuild.
7253 * configure.ac: Don't check for stdlib.h.
7254 * gdbreplay.c: Unconditionally include stdlib.h.
7255
72562013-11-18 Tom Tromey <tromey@redhat.com>
7257
7258 * config.in: Rebuild.
7259 * configure: Rebuild.
7260 * configure.ac: Don't use AC_HEADER_DIRENT.
7261
72622013-11-18 Tom Tromey <tromey@redhat.com>
7263
7264 * server.h: Don't check HAVE_STRING_H.
7265 * gdbreplay.c: Don't check HAVE_STRING_H.
7266 * configure: Rebuild.
7267
72682013-11-18 Tom Tromey <tromey@redhat.com>
7269
7270 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7271 LIBGNU.
7272
72732013-11-08 Tom Tromey <tromey@redhat.com>
7274
7275 * configure, config.in: Rebuild.
7276 * configure.ac: Remove unused configury.
7277
72782013-11-08 Tom Tromey <tromey@redhat.com>
7279
7280 * acinclude.m4: Include common.m4, codeset.m4.
7281 * configure, config.in: Rebuild.
7282 * configure.ac: Use GDB_AC_COMMON.
7283
72842013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7285
7286 * linux-s390-low.c (HWCAP_S390_TE): New define.
7287 (s390_arch_setup): Consider the TE field in the HWCAP for
7288 determining 'have_regset_tdb'.
7289
72902013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7291
7292 PR gdb/16014
7293 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7294 call to sizeof.
7295
72962013-10-02 Pedro Alves <palves@redhat.com>
7297
7298 * server.c (process_serial_event): Don't output "GDBserver
7299 exiting" if GDB is connected through stdio.
7300 * target.c (mywait): Likewise, be silent if GDB is connected
7301 through stdio.
7302
73032013-10-01 Joel Brobecker <brobecker@adacore.com>
7304
7305 * lynx-low.c (lynx_add_threads_after_attach): New function.
7306 (lynx_attach): Remove call to add_thread. Add call to
7307 lynx_add_threads_after_attach instead.
7308
73092013-09-28 Mike Frysinger <vapier@gentoo.org>
7310
7311 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7312 * config.in, configure: Regenerated.
7313
73142013-09-18 Yao Qi <yao@codesourcery.com>
7315
7316 PR server/15959
7317 * server.c (start_inferior): Clear 'resume_info'.
7318
73192013-09-16 Jiong Wang <jiwang@tilera.com>
7320
7321 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7322 for each register.
7323
73242013-09-16 Jiong Wang <jiwang@tilera.com>
7325
7326 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7327 linux-tile-low.o to srv_tgtobj.
7328
73292013-09-16 Will Newton <will.newton@linaro.org>
7330
7331 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7332 out regs.
7333
73342013-09-06 Pedro Alves <palves@redhat.com>
7335
7336 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7337 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7338 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7339 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7340 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7341 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7342
73432013-09-06 Pedro Alves <palves@redhat.com>
7344
7345 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7346 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7347
73482013-09-06 Pedro Alves <palves@redhat.com>
7349
7350 * linux-amd64-ipa.c: Include tracepoint.h.
7351 * linux-i386-ipa.c: Include tracepoint.h.
7352
73532013-09-06 Ricard Wanderlof <ricardw@axis.com>
7354
7355 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7356 (ps_get_thread_area): New function.
7357
73582013-09-06 Ricard Wanderlof <ricardw@axis.com>
7359
7360 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7361 (initialize_low_arch): Call init_registers_crisv32 rather than
7362 init_register_crisv32.
7363
73642013-09-05 Pedro Alves <palves@redhat.com>
7365
7366 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7367 to ...
7368 * hostio.h: ... this new file.
7369 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7370 win32-low.c: Include hostio.h.
7371
73722013-09-05 Pedro Alves <palves@redhat.com>
7373
7374 * server.h (gdb_client_data, handler_func, callback_handler_func)
7375 (delete_file_handler, add_file_handler, append_callback_event)
7376 (delete_callback_event, start_event_loop, initialize_event_loop):
7377 Move to event-loop.h and include it.
7378 * event-loop.h: New file.
7379
73802013-09-05 Pedro Alves <palves@redhat.com>
7381
7382 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7383 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7384 (loaded_dll, unloaded_dll): Move to ...
7385 * dll.h: ... this new file.
7386 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7387
73882013-09-05 Pedro Alves <palves@redhat.com>
7389
7390 * server.h (current_process, get_thread_process, all_processes)
7391 (add_inferior_to_list, for_each_inferior, current_inferior)
7392 (remove_inferior, add_process, remove_process, find_process_pid)
7393 (have_started_inferiors_p, have_attached_inferiors_p)
7394 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7395 (clear_inferiors, find_inferior, find_inferior_id)
7396 (inferior_target_data, set_inferior_target_data)
7397 (inferior_regcache_data, set_inferior_regcache_data): Move to
7398 inferiors.h, and include it.
7399 * inferiors.h: New file.
7400
74012013-09-05 Pedro Alves <palves@redhat.com>
7402
7403 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7404 Move ...
7405 * ax.h: ... here.
7406
74072013-09-05 Pedro Alves <palves@redhat.com>
7408
7409 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7410 tracepoint.h.
7411 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7412 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7413 (handle_tracepoint_general_set, handle_tracepoint_query)
7414 (tracepoint_finished_step, tracepoint_was_hit)
7415 (release_while_stepping_state_list, current_traceframe)
7416 (in_readonly_region, traceframe_read_mem)
7417 (fetch_traceframe_registers, traceframe_read_sdata)
7418 (traceframe_read_info, struct fast_tpoint_collect_status)
7419 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7420 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7421 (supply_fast_tracepoint_registers)
7422 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7423 (ipa_tdesc, claim_trampoline_space)
7424 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7425 (agent_mem_read, agent_get_trace_state_variable_value)
7426 (agent_set_trace_state_variable_value, agent_tsv_read)
7427 (agent_mem_read_string, get_raw_reg_func_addr)
7428 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7429 * tracepoint.h: ... this new file.
7430
74312013-09-05 Pedro Alves <palves@redhat.com>
7432
7433 * server.h (perror_with_name, error, fatal, warning, paddress)
7434 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7435 include it.
7436 * utils.h: New file.
7437
74382013-09-05 Pedro Alves <palves@redhat.com>
7439
7440 * server.h (remote_debug, noack_mode, transport_is_reliable)
7441 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7442 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7443 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7444 (write_enn, initialize_async_io, enable_async_io)
7445 (disable_async_io, check_remote_input_interrupt_request)
7446 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7447 (dead_thread_notify, prepare_resume_reply)
7448 (decode_address_to_semicolon, decode_address, decode_m_packet)
7449 (decode_M_packet, decode_X_packet, decode_xfer_write)
7450 (decode_search_memory_packet, unhexify, hexify)
7451 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7452 (look_up_one_symbol, relocate_instruction)
7453 (monitor_output): Move to remote-utils.h, and include it.
7454 * remote-utils.h: New file.
7455
74562013-09-05 Pedro Alves <palves@redhat.com>
7457
7458 * server.h (_): Delete.
7459
74602013-09-02 Pedro Alves <palves@redhat.com>
7461
7462 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7463 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7464 allocated.
7465 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7466
74672013-09-02 Pierre Muller <muller@sourceware.org>
7468
7469 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7470 or WriteProcessMemory complete successfully and handle
7471 ERROR_PARTIAL_COPY error.
7472
74732013-09-02 Pedro Alves <palves@redhat.com>
7474
7475 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7476 error instead of EIO.
7477
74782013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7479
7480 PR server/15604
7481 * linux-low.c: Include filestuff.h.
7482 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7483 * lynx-low.c: Include filestuff.h.
7484 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7485 * server.c: Include filestuff.h.
7486 (main): Call notice_open_fds.
7487 * spu-low.c: Include filestuff.h.
7488 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7489
74902013-08-22 Luis Machado <lgustavo@codesourcery.com>
7491
7492 * Makefile.in: Explain why ../target and ../nat are not
7493 listed as include file search paths.
7494 (linux-waitpid.o): New object file rule.
7495 * configure.srv (srv_native_linux_obj): New variable.
7496 Replace all occurrences of linux native object files with
7497 $srv_native_linux_obj.
7498 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7499 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7500 (linux_enable_event_reporting): Remove declaration.
7501 (my_waitpid): Moved to common/linux-waitpid.c.
7502 (linux_wait_for_event): Pass ptid when calling
7503 linux_enable_event_reporting.
7504 (linux_supports_tracefork_flag): Remove.
7505 (linux_enable_event_reporting): Likewise.
7506 (linux_tracefork_grandchild): Remove.
7507 (STACK_SIZE): Moved to common/linux-ptrace.c.
7508 (linux_tracefork_child): Remove.
7509 (linux_test_for_tracefork): Remove.
7510 (linux_look_up_symbols): Call linux_supports_traceclone.
7511 (initialize_low): Remove call to linux_test_for_tracefork.
7512 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7513 common/linux-ptrace.h.
7514 (PTRACE_TYPE_ARG4): Likewise.
7515 Include linux-ptrace.h.
7516
75172013-08-21 Pedro Alves <palves@redhat.com>
7518
7519 * config.in: Renegerate.
7520
75212013-08-19 Luis Machado <lgustavo@codesourcery.com>
7522
7523 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7524 (SFILES): Remove $(srcdir)/common/target-common.c and
7525 add $(srcdir)/target/waitstatus.c.
7526 (OBS): Remove target-common.o and add waitstatus.o.
7527 (server_h): Remove $(srcdir)/../common/target-common.h and
7528 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7529 and $(srcdir)/../target/waitstatus.h.
7530 (target-common.o): Remove.
7531 (waitstatus.o): New target object file.
7532 * target.h: Do not include target-common.h and
7533 include target/resume.h, target/wait.h and
7534 target/waitstatus.h.
7535
75362013-08-13 Luis Machado <lgustavo@codesourcery.com>
7537
7538 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7539 to PTRACE_TYPE_ARG3.
7540 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7541 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7542 PTRACE_TYPE_ARG4.
7543 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7544 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7545
75462013-07-27 Jie Zhang <jie@codesourcery.com>
7547 Daniel Jacobowitz <dan@codesourcery.com>
7548 Yao Qi <yao@codesourcery.com>
7549
7550 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7551 (mips-linux-watch.o): New rule.
7552 (mips_linux_watch_h): New variable.
7553 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7554 srv_tgtobj.
7555 * linux-mips-low.c: Include mips-linux-watch.h.
7556 (struct arch_process_info, struct arch_lwp_info): New.
7557 (update_watch_registers_callback): New function.
7558 (mips_linux_new_process, mips_linux_new_thread) New functions.
7559 (mips_linux_prepare_to_resume, mips_insert_point): New
7560 functions.
7561 (mips_remove_point, mips_stopped_by_watchpoint): New
7562 functions.
7563 (rsp_bp_type_to_target_hw_bp_type): New function.
7564 (mips_stopped_data_address): New function.
7565 (the_low_target): Add watchpoint support functions.
7566
75672013-07-27 Yao Qi <yao@codesourcery.com>
7568
7569 * i386-low.c: Include break-common.h.
7570 (enum target_hw_bp_type): Remove.
7571
75722013-07-24 Luis Machado <lgustavo@codesourcery.com>
7573
7574 * Makefile.in (SFILES): /common/target-common.c.
7575 (OBS): Add target-common.o.
7576 (server_h): Add $(srcdir)/../common/target-common.h.
7577 (target-common.o): New target.
7578 * server.c (queue_stop_reply_callback): Free
7579 status string after use.
7580 * target.c (target_waitstatus_to_string): Remove.
7581 * target.h: Include target-common.h.
7582 (resume_kind): Likewise.
7583 (target_waitkind): Likewise.
7584 (target_waitstatus): Likewise.
7585 (TARGET_WNOHANG): Likewise.
7586
75872013-07-04 Yao Qi <yao@codesourcery.com>
7588
7589 * Makefile.in (host_alias): Use @host_noncanonical@.
7590 (target_alias): Use @target_noncanonical@.
7591 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7592 ACX_NONCANONICAL_HOST.
7593 * configure: Regenerated.
7594
7595 Revert:
7596 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7597
7598 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7599 * configure: Rebuild.
7600 * Makefile.in (version_host, version_target): Get from configure.
7601 (version.c): Use $(version_host) and $(version_target).
7602
76032013-07-03 Pedro Alves <palves@redhat.com>
7604
7605 * Makefile.in (config.status): Depend on development.sh.
7606 * acinclude.m4: Include libmcheck.m4.
7607 * configure: Regenerate.
7608
76092013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7610
7611 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7612 attribute inside the parentheses.
7613 (winapi_DebugSetProcessKillOnExit): Ditto.
7614 (winapi_DebugBreakProcess): Ditto.
7615 (winapi_GenerateConsoleCtrlEvent): Ditto.
7616
76172013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7618
7619 * notif.h (notif_event): Add a dummy member to avoid compiler
7620 errors.
7621
76222013-07-01 Pedro Alves <palves@redhat.com>
7623
7624 * hostio.c (HOSTIO_PATH_MAX): Define.
7625 (require_filename, handle_open, handle_unlink, handle_readlink):
7626 Use it.
7627
76282013-07-01 Pedro Alves <palves@redhat.com>
7629
7630 * server.h: Include "pathmax.h".
7631 * linux-low.c: Don't include sys/param.h.
7632 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7633 MAXPATHLEN.
7634 * win32-low.c: Don't include sys/param.h.
7635 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7636
76372013-07-01 Pedro Alves <palves@redhat.com>
7638
7639 * event-loop.c: Don't check HAVE_UNISTD_H before including
7640 <unistd.h>.
7641 * gdbreplay.c: Likewise.
7642 * remote-utils.c: Likewise.
7643 * server.c: Likewise.
7644 * configure.ac: Don't check for unistd.h.
7645 * configure: Regenerate.
7646
76472013-06-28 Tom Tromey <tromey@redhat.com>
7648
7649 * Makefile.in (version.c): Use version.in, not
7650 common/version.in.
7651
76522013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7653
7654 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7655 * configure: Rebuild.
7656 * Makefile.in (version_host, version_target): Get from configure.
7657 (version.c): Use $(version_host) and $(version_target).
7658
76592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7660
7661 Fix trace-status to output user name without trailing colon.
7662 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7663
76642013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7665
7666 Fix trace-status to output proper start-time and stop-time.
7667 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7668 output start time and stop time in hex as gdb expects.
7669
76702013-06-26 Pedro Alves <pedro@codesourcery.com>
7671
7672 * tracepoint.c (build_traceframe_info_xml): Output trace state
7673 variables present in the trace buffer.
7674
76752013-06-24 Tom Tromey <tromey@redhat.com>
7676
7677 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7678 create-version.sh.
7679 (version.o): Remove.
7680 * gdbreplay.c: Include version.h.
7681 (version, host_name): Don't declare.
7682 * server.h: Include version.h.
7683 (version, host_name): Don't declare.
7684
76852013-06-12 Pedro Alves <palves@redhat.com>
7686
7687 * linux-x86-low.c (linux_is_elf64): Delete global.
7688 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7689 with local linux_pid_exe_is_elf_64_file use.
7690
76912013-06-11 Pedro Alves <palves@redhat.com>
7692
7693 * linux-low.c (regset_disabled, disable_regset): New functions.
7694 (regsets_fetch_inferior_registers)
7695 (regsets_store_inferior_registers): Use them.
7696 (initialize_regsets_info); Don't allocate the disabled_regsets
7697 array here.
7698 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7699 comment.
7700
77012013-06-11 Pedro Alves <palves@redhat.com>
7702
7703 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7704 xmalloc.
7705
77062013-06-11 Pedro Alves <palves@redhat.com>
7707
7708 * linux-x86-low.c (initialize_low_arch): Call
7709 init_registers_x32_avx_linux.
7710
77112013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7712
7713 Fix compatibility with Android Bionic.
7714 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7715 it is not empty.
7716
77172013-06-07 Pedro Alves <palves@redhat.com>
7718
7719 PR server/14823
7720 * Makefile.in (OBS): Add tdesc.o.
7721 (IPA_OBJS): Add tdesc-ipa.o.
7722 (tdesc-ipa.o): New rule.
7723 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7724 interface.
7725 * linux-low.c (new_inferior): Delete.
7726 (disabled_regsets, num_regsets): Delete.
7727 (linux_add_process): Adjust to set the new per-process
7728 new_inferior flag.
7729 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7730 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7731 was a stop. When calling arch_setup, switch the current inferior
7732 to the thread that got an event.
7733 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7734 (regsets_fetch_inferior_registers)
7735 (regsets_store_inferior_registers): New regsets_info parameter.
7736 Adjust to use it.
7737 (linux_register_in_regsets): New regs_info parameter. Adjust to
7738 use it.
7739 (register_addr, fetch_register, store_register): New usrregs_info
7740 parameter. Adjust to use it.
7741 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7742 parameter regs_info. Adjust to use it.
7743 (linux_fetch_registers): Get the current inferior's regs_info, and
7744 adjust to use it.
7745 (linux_store_registers): Ditto.
7746 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7747 (initialize_low): Don't initialize the target_regsets here. Call
7748 initialize_low_arch.
7749 * linux-low.h (target_regsets): Delete declaration.
7750 (struct regsets_info): New.
7751 (struct usrregs_info): New.
7752 (struct regs_info): New.
7753 (struct process_info_private) <new_inferior>: New field.
7754 (struct linux_target_ops): Delete the num_regs, regmap, and
7755 regset_bitmap fields. New field regs_info.
7756 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7757 * i387-fp.c (num_xmm_registers): Delete.
7758 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7759 calls to new interface.
7760 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7761 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7762 Infer the number of xmm registers from the regcache's target
7763 description.
7764 * i387-fp.h (num_xmm_registers): Delete.
7765 * inferiors.c (add_thread): Don't install the thread's regcache
7766 here.
7767 * proc-service.c (gregset_info): Fetch the current inferior's
7768 regs_info. Adjust to use it.
7769 * regcache.c: Include tdesc.h.
7770 (register_bytes, reg_defs, num_registers)
7771 (gdbserver_expedite_regs): Delete.
7772 (get_thread_regcache): If the thread doesn't have a regcache yet,
7773 create one, instead of aborting gdbserver.
7774 (regcache_invalidate_one): Rename to ...
7775 (regcache_invalidate_thread): ... this.
7776 (regcache_invalidate_one): New.
7777 (regcache_invalidate): Only invalidate registers of the current
7778 process.
7779 (init_register_cache): Add target_desc parameter, and use it.
7780 (new_register_cache): Ditto. Assert the target description has a
7781 non zero registers_size.
7782 (regcache_cpy): Add assertions. Adjust.
7783 (realloc_register_cache, set_register_cache): Delete.
7784 (registers_to_string, registers_from_string): Adjust.
7785 (find_register_by_name, find_regno, find_register_by_number)
7786 (register_cache_size): Add target_desc parameter, and use it.
7787 (free_register_cache_thread, free_register_cache_thread_one)
7788 (regcache_release, register_cache_size): New.
7789 (register_size): Add target_desc parameter, and use it.
7790 (register_data, supply_register, supply_register_zeroed)
7791 (supply_regblock, supply_register_by_name, collect_register)
7792 (collect_register_as_string, collect_register_by_name): Adjust.
7793 * regcache.h (struct target_desc): Forward declare.
7794 (struct regcache) <tdesc>: New field.
7795 (init_register_cache, new_register_cache): Add target_desc
7796 parameter.
7797 (regcache_invalidate_thread): Declare.
7798 (regcache_invalidate_one): Delete declaration.
7799 (regcache_release): Declare.
7800 (find_register_by_number, register_cache_size, register_size)
7801 (find_regno): Add target_desc parameter.
7802 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7803 declarations.
7804 * remote-utils.c: Include tdesc.h.
7805 (outreg, prepare_resume_reply): Adjust.
7806 * server.c: Include tdesc.h.
7807 (gdbserver_xmltarget): Delete declaration.
7808 (get_features_xml, process_serial_event): Adjust.
7809 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7810 declare.
7811 (struct process_info) <tdesc>: New field.
7812 (ipa_tdesc): Declare.
7813 * tdesc.c: New file.
7814 * tdesc.h: New file.
7815 * tracepoint.c: Include tdesc.h.
7816 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7817 (get_context_regcache): Adjust to pass ipa_tdesc down.
7818 (do_action_at_tracepoint): Adjust to get the register cache size
7819 from the context regcache's description.
7820 (traceframe_walk_blocks): Adjust to get the register cache size
7821 from the current trace frame's description.
7822 (traceframe_get_pc): Adjust to get current trace frame's
7823 description and pass it down.
7824 (gdb_collect): Adjust to get the register cache size from the
7825 IPA's description.
7826 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7827 (gdbserver_xmltarget): Delete.
7828 (initialize_low_tracepoint): Set the ipa's target description.
7829 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7830 (initialize_low_tracepoint): Set the ipa's target description.
7831 * linux-x86-low.c: Include tdesc.h.
7832 [__x86_64__] (is_64bit_tdesc): New.
7833 (ps_get_thread_area, x86_get_thread_area): Use it.
7834 (i386_cannot_store_register): Rename to ...
7835 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7836 (i386_cannot_fetch_register): Rename to ...
7837 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7838 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7839 to new interface.
7840 (target_regsets): Rename to ...
7841 (x86_regsets): ... this.
7842 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7843 interface.
7844 (x86_siginfo_fixup): Use is_64bit_tdesc.
7845 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7846 (tdesc_x32_avx_linux, tdesc_x32_linux)
7847 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7848 Declare.
7849 (x86_linux_update_xmltarget): Delete.
7850 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7851 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7852 (AMD64_LINUX_USER64_CS): New.
7853 (x86_linux_read_description): New, based on
7854 x86_linux_update_xmltarget.
7855 (same_process_callback): New.
7856 (x86_arch_setup_process_callback): New.
7857 (x86_linux_update_xmltarget): New.
7858 (x86_regsets_info): New.
7859 (amd64_linux_regs_info): New.
7860 (i386_linux_usrregs_info): New.
7861 (i386_linux_regs_info): New.
7862 (x86_linux_regs_info): New.
7863 (x86_arch_setup): Reimplement.
7864 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7865 (x86_emit_ops): Ditto.
7866 (the_low_target): Adjust. Install x86_linux_regs_info,
7867 x86_cannot_fetch_register, and x86_cannot_store_register.
7868 (initialize_low_arch): New.
7869 * linux-ia64-low.c (tdesc_ia64): Declare.
7870 (ia64_fetch_register): Adjust.
7871 (ia64_usrregs_info, regs_info): New globals.
7872 (ia64_regs_info): New function.
7873 (the_low_target): Adjust.
7874 (initialize_low_arch): New function.
7875 * linux-sparc-low.c (tdesc_sparc64): Declare.
7876 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7877 Adjust.
7878 (sparc_arch_setup): New function.
7879 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7880 (the_low_target): Adjust.
7881 (initialize_low_arch): New function.
7882 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7883 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7884 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7885 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7886 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7887 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7888 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7889 (tdesc_powerpc_isa205_vsx64l): Declare.
7890 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7891 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7892 (ppc_set_pc, ppc_get_hwcap): Adjust.
7893 (ppc_usrregs_info): Forward declare.
7894 (!__powerpc64__) ppc_regmap_adjusted: New global.
7895 (ppc_arch_setup): Adjust to the current process'es target
7896 description.
7897 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7898 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7899 (ppc_store_evrregset): Adjust.
7900 (target_regsets): Rename to ...
7901 (ppc_regsets): ... this, and make static.
7902 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7903 (ppc_regs_info): New function.
7904 (the_low_target): Adjust.
7905 (initialize_low_arch): New function.
7906 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7907 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7908 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7909 (tdesc_s390x_linux64v2): Declare.
7910 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7911 (s390_fill_gregset, s390_store_last_break): Adjust.
7912 (target_regsets): Rename to ...
7913 (s390_regsets): ... this, and make static.
7914 (s390_get_pc, s390_set_pc): Adjust.
7915 (s390_get_hwcap): New target_desc parameter, and use it.
7916 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7917 (s390_arch_setup): Adjust to set the current process'es target
7918 description. Don't adjust the regmap.
7919 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7920 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7921 (regs_info_3264): New globals.
7922 (s390_regs_info): New function.
7923 (the_low_target): Adjust.
7924 (initialize_low_arch): New function.
7925 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7926 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7927 [__mips64] (init_registers_mips_linux)
7928 (init_registers_mips_dsp_linux): Delete defines.
7929 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7930 (have_dsp): New global.
7931 (mips_read_description): New, based on mips_arch_setup.
7932 (mips_arch_setup): Reimplement.
7933 (get_usrregs_info): New function.
7934 (mips_cannot_fetch_register, mips_cannot_store_register)
7935 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7936 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7937 (target_regsets): Rename to ...
7938 (mips_regsets): ... this, and make static.
7939 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7940 (dsp_regs_info, regs_info): New globals.
7941 (mips_regs_info): New function.
7942 (the_low_target): Adjust.
7943 (initialize_low_arch): New function.
7944 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7945 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7946 Declare.
7947 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7948 (arm_read_description): New, with bits factored from
7949 arm_arch_setup.
7950 (arm_arch_setup): Reimplement.
7951 (target_regsets): Rename to ...
7952 (arm_regsets): ... this, and make static.
7953 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7954 (arm_regs_info): New function.
7955 (the_low_target): Adjust.
7956 (initialize_low_arch): New function.
7957 * linux-m68k-low.c (tdesc_m68k): Declare.
7958 (target_regsets): Rename to ...
7959 (m68k_regsets): ... this, and make static.
7960 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7961 (m68k_regs_info): New function.
7962 (m68k_arch_setup): New function.
7963 (the_low_target): Adjust.
7964 (initialize_low_arch): New function.
7965 * linux-sh-low.c (tdesc_sharch): Declare.
7966 (target_regsets): Rename to ...
7967 (sh_regsets): ... this, and make static.
7968 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7969 (sh_regs_info, sh_arch_setup): New functions.
7970 (the_low_target): Adjust.
7971 (initialize_low_arch): New function.
7972 * linux-bfin-low.c (tdesc_bfin): Declare.
7973 (bfin_arch_setup): New function.
7974 (bfin_usrregs_info, regs_info): New globals.
7975 (bfin_regs_info): New function.
7976 (the_low_target): Adjust.
7977 (initialize_low_arch): New function.
7978 * linux-cris-low.c (tdesc_cris): Declare.
7979 (cris_arch_setup): New function.
7980 (cris_usrregs_info, regs_info): New globals.
7981 (cris_regs_info): New function.
7982 (the_low_target): Adjust.
7983 (initialize_low_arch): New function.
7984 * linux-cris-low.c (tdesc_crisv32): Declare.
7985 (cris_arch_setup): New function.
7986 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7987 (cris_regs_info): New function.
7988 (the_low_target): Adjust.
7989 (initialize_low_arch): New function.
7990 * linux-m32r-low.c (tdesc_m32r): Declare.
7991 (m32r_arch_setup): New function.
7992 (m32r_usrregs_info, regs_info): New globals.
7993 (m32r_regs_info): Adjust.
7994 (initialize_low_arch): New function.
7995 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7996 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7997 (tic6x_usrregs_info): Forward declare.
7998 (tic6x_read_description): New function, based on ...
7999 (tic6x_arch_setup): ... this. Reimplement.
8000 (target_regsets): Rename to ...
8001 (tic6x_regsets): ... this, and make static.
8002 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8003 (tic6x_regs_info): New function.
8004 (the_low_target): Adjust.
8005 (initialize_low_arch): New function.
8006 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8007 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8008 (target_regsets): Rename to ...
8009 (xtensa_regsets): ... this, and make static.
8010 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8011 globals.
8012 (xtensa_arch_setup, xtensa_regs_info): New functions.
8013 (the_low_target): Adjust.
8014 (initialize_low_arch): New function.
8015 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8016 (nios2_arch_setup): Set the current process'es tdesc.
8017 (target_regsets): Rename to ...
8018 (nios2_regsets): ... this.
8019 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8020 (nios2_regs_info): New function.
8021 (the_low_target): Adjust.
8022 (initialize_low_arch): New function.
8023 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8024 (aarch64_arch_setup): Set the current process'es tdesc.
8025 (target_regsets): Rename to ...
8026 (aarch64_regsets): ... this.
8027 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8028 (aarch64_regs_info): New function.
8029 (the_low_target): Adjust.
8030 (initialize_low_arch): New function.
8031 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8032 globals.
8033 (target_regsets): Rename to ...
8034 (tile_regsets): ... this.
8035 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8036 (tile_regs_info): New function.
8037 (tile_arch_setup): Set the current process'es tdesc.
8038 (the_low_target): Adjust.
8039 (initialize_low_arch): New function.
8040 * spu-low.c (tdesc_spu): Declare.
8041 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8042 * win32-arm-low.c (tdesc_arm): Declare.
8043 (arm_arch_setup): New function.
8044 (the_low_target): Install arm_arch_setup instead of
8045 init_registers_arm.
8046 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8047 (init_windows_x86): Rename to ...
8048 (i386_arch_setup): ... this. Set `win32_tdesc'.
8049 (the_low_target): Adjust.
8050 * win32-low.c (win32_tdesc): New global.
8051 (child_add_thread): Don't create the thread cache here.
8052 (do_initial_child_stuff): Set the new process'es tdesc.
8053 * win32-low.h (struct target_desc): Forward declare.
8054 (win32_tdesc): Declare.
8055 * lynx-i386-low.c (tdesc_i386): Declare global.
8056 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8057 * lynx-low.c (lynx_tdesc): New global.
8058 (lynx_add_process): Set the new process'es tdesc.
8059 * lynx-low.h (struct target_desc): Forward declare.
8060 (lynx_tdesc): Declare global.
8061 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8062 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8063 * nto-low.c (nto_tdesc): New global.
8064 (do_attach): Set the new process'es tdesc.
8065 * nto-low.h (struct target_desc): Forward declare.
8066 (nto_tdesc): Declare.
8067 * nto-x86-low.c (tdesc_i386): Declare.
8068 (nto_x86_arch_setup): Set `nto_tdesc'.
8069
80702013-06-04 Gary Benson <gbenson@redhat.com>
8071
8072 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8073 to qSupported response when appropriate.
8074 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8075 with nonzero-length annex.
8076 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8077 arguments supplied in annex.
8078
80792013-05-31 Doug Evans <dje@google.com>
8080
8081 PR server/15594
8082 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8083 64 bits in 64-cross-32 environment.
8084
80852013-05-28 Pedro Alves <palves@redhat.com>
8086
8087 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8088 (aarch64-without-fpu.c): Delete rule.
8089 * configure.srv (aarch64*-*-linux*): Remove references to
8090 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8091 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8092 declaration.
8093
80942013-05-24 Pedro Alves <palves@redhat.com>
8095
8096 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8097 instead of strchr/decode_address. Error if the range isn't split
8098 with a ','. Don't assume there's be a ':' in the action.
8099
81002013-05-23 Yao Qi <yao@codesourcery.com>
8101 Pedro Alves <palves@redhat.com>
8102
8103 * linux-low.c (lwp_in_step_range): New function.
8104 (linux_wait_1): If the thread was range stepping and stopped
8105 outside the stepping range, report the stop to GDB. Otherwise,
8106 continue stepping. Add range stepping debug output.
8107 (linux_set_resume_request): Copy the step range from the resume
8108 request to the lwp.
8109 (linux_supports_range_stepping): New.
8110 (linux_target_ops) <supports_range_stepping>: Set to
8111 linux_supports_range_stepping.
8112 * linux-low.h (struct linux_target_ops)
8113 <supports_range_stepping>: New field.
8114 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8115 * linux-x86-low.c (x86_supports_range_stepping): New.
8116 (the_low_target) <supports_range_stepping>: Set to
8117 x86_supports_range_stepping.
8118 * server.c (handle_v_cont): Handle 'r' action.
8119 (handle_v_requests): Append ";r" if the target supports range
8120 stepping.
8121 * target.h (struct thread_resume) <step_range_start,
8122 step_range_end>: New fields.
8123 (struct target_ops) <supports_range_stepping>:
8124 New field.
8125 (target_supports_range_stepping): New macro.
8126
81272013-05-17 Joel Brobecker <brobecker@adacore.com>
8128
8129 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8130 confusion in comment.
8131
81322013-05-17 Joel Brobecker <brobecker@adacore.com>
8133
8134 * lynx-low.c (struct process_info_private): New type.
8135 (lynx_add_process): New function.
8136 (lynx_create_inferior, lynx_attach): Replace calls to
8137 add_process by calls to lynx_add_process.
8138 (lynx_resume): If PTID is null, then try using
8139 current_process()->private->last_wait_event_ptid.
8140 Add comments.
8141 (lynx_clear_inferiors): Delete. The contents of that function
8142 has been inlined in lynx_mourn;
8143 (lynx_wait_1): Save the ptid in the process's private data.
8144 (lynx_mourn): Free the process' private data. Replace call
8145 to lynx_clear_inferiors by call to clear_inferiors.
8146
81472013-05-17 Yao Qi <yao@codesourcery.com>
8148
8149 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8150 the right place.
8151
81522013-05-16 Luis Machado <lgustavo@codesourcery.com>
8153
8154 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8155 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8156 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8157 PT_TEXT_END_ADDR guards. Update comments.
8158 (linux_target_op) <read_offsets>: Conditionally define to
8159 linux_read_offsets if the target is UCLIBC and if it defines
8160 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8161
81622013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8163 Andrew Jenner <andrew@codesourcery.com>
8164
8165 * Makefile.in (SFILES): Add linux-nios2-low.c.
8166 (clean): Add action to delete nios2-linux.c.
8167 (nios2-linux.c): New rule.
8168 * configure.srv: Add nios2*-*-linux*.
8169 * linux-nios2-low.c: New.
8170
81712013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8172
8173 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8174
81752013-04-25 Hui Zhu <hui@codesourcery.com>
8176
8177 PR gdb/15186
8178 * ax.c (ax_printf): Add fflush.
8179
81802013-04-22 Tom Tromey <tromey@redhat.com>
8181
8182 * Makefile.in (SFILES): Add filestuff.c.
8183 (OBS): Add filestuff.o.
8184 (filestuff.o): New target.
8185 * config.in, configure: Rebuild.
8186 * configure.ac: Check for fdwalk, pipe2.
8187
81882013-04-17 Pedro Alves <palves@redhat.com>
8189
8190 * configure.ac (USE_THREAD_DB): Delete variable.
8191 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8192 Don't AC_SUBST USE_THREAD_DB.
8193 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8194 * config.in, configure: Regenerate.
8195
81962013-04-16 Pedro Alves <palves@redhat.com>
8197
8198 * linux-low.h (struct lwp_info) <thread_known>: Move under
8199 the USE_THREAD_DB #ifdef.
8200
82012013-04-16 Pedro Alves <palves@redhat.com>
8202
8203 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8204 (linux-low.o): Delete rule.
8205 * linux-low.h: Always include "gdb_thread_db.h" instead of
8206 conditionally including thread_db.h.
8207 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8208 HAVE_THREAD_DB_H.
8209
82102013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8211
8212 * Makefile.in (install-only): Fix make install regression.
8213
82142013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8215
8216 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8217 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8218 installation.
8219 * gdbserver.1: Remove.
8220
82212013-03-22 Pedro Alves <palves@redhat.com>
8222
8223 * linux-low.c (handle_extended_wait): Don't call
8224 linux_enable_event_reporting.
8225
82262013-03-15 Tony Theodore <tonyt@logyst.com>
8227
8228 PR build/9098:
8229 * Makefile.in (SHELL): Use @SHELL@.
8230
82312013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8232
8233 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8234 compiler warning.
8235
82362013-03-13 Joel Brobecker <brobecker@adacore.com>
8237
8238 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8239 Remove extraneous NULL element.
8240
82412013-03-13 Yao Qi <yao@codesourcery.com>
8242
8243 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8244 'V' block in trace frame.
8245
82462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8247
8248 * target.h (struct target_ops): Add btrace ops.
8249 (target_supports_btrace): New macro.
8250 (target_enable_btrace): New macro.
8251 (target_disable_btrace): New macro.
8252 (target_read_btrace): New macro.
8253 * gdbthread.h (struct thread_info): Add btrace field.
8254 * server.c: Include btrace-common.h.
8255 (handle_btrace_general_set): New function.
8256 (handle_btrace_enable): New function.
8257 (handle_btrace_disable): New function.
8258 (handle_general_set): Call handle_btrace_general_set.
8259 (handle_qxfer_btrace): New function.
8260 (struct qxfer qxfer_packets[]): Add btrace entry.
8261 * inferiors.c (remove_thread): Disable btrace.
8262 * linux-low: Include linux-btrace.h.
8263 (linux_low_enable_btrace): New function.
8264 (linux_low_read_btrace): New function.
8265 (linux_target_ops): Add btrace ops.
8266 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8267 Add srv_linux_btrace=yes.
8268 (x86_64-*-linux*): Add linux-btrace.o.
8269 Add srv_linux_btrace=yes.
8270 * configure.ac: Define HAVE_LINUX_BTRACE.
8271 * config.in: Regenerated.
8272 * configure: Regenerated.
8273
82742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8275
8276 * server.c (handle_qxfer): Preserve error message if -3 is
8277 returned.
8278 (qxfer): Document the -3 return value.
8279
82802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8281
8282 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8283 (linux_btrace_h): New variable.
8284 (linux-btrace.o): New rule.
8285
82862013-03-08 Stan Shebs <stan@codesourcery.com>
8287 Hafiz Abid Qadeer <abidh@codesourcery.com>
8288
8289 * tracepoint.c (trace_buffer_size): New global.
8290 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8291 (init_trace_buffer): Change to one-argument function. Allocate
8292 trace buffer memory.
8293 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8294 handle QTBuffer:size packet.
8295 (cmd_bigqtbuffer_size): New function.
8296 (initialize_tracepoint): Call init_trace_buffer with
8297 DEFAULT_TRACE_BUFFER_SIZE.
8298 * server.c (handle_query): Add QTBuffer:size in the
8299 supported packets.
8300
83012013-03-07 Yao Qi <yao@codesourcery.com>
8302
8303 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8304 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8305 of -1.
8306 (cmd_qtsp): Adjust condition. Do post increment.
8307 Set cur_action and cur_step_action back to 0.
8308
83092013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8310
8311 PR server/15236
8312 * linux-low.c (linux_write_memory): Return early success if LEN is
8313 zero.
8314
83152013-03-05 Corinna Vinschen <vinschen@redhat.de>
8316
8317 * configure.srv: Add x86_64-*-cygwin* as target.
8318
83192013-02-28 Tom Tromey <tromey@redhat.com>
8320
8321 * configure.ac: Invoke AC_SYS_LARGEFILE.
8322 * configure, config.in: Rebuild.
8323
83242013-02-28 Corinna Vinschen <vinschen@redhat.com>
8325
8326 * win32-low.c: Throughout, fix format strings and casts of
8327 printf-like functions to avoid type related warnings on all
8328 platforms.
8329 (get_child_debug_event): Print dwDebugEventCode as hex since
8330 that's how it's usually documented.
8331
83322013-02-28 Yao Qi <yao@codesourcery.com>
8333
8334 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8335 pulongest.
8336
83372013-02-27 Jiong Wang <jiwang@tilera.com>
8338
8339 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8340 (reg-tilegx32.c): New rule.
8341 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8342 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8343 different register info initializer according to elf class.
8344 (init_registers_tilgx32): New function. The tilegx32 register info
8345 initializer.
8346 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8347 (tile_store_gregset): Likewise.
8348
83492013-02-27 Yao Qi <yao@codesourcery.com>
8350
8351 * server.c (process_point_options): Print debug message when
8352 debug_threads is true.
8353
83542013-02-26 Yao Qi <yao@codesourcery.com>
8355
8356 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8357
83582013-02-19 Pedro Alves <palves@redhat.com>
8359 Kai Tietz <ktietz@redhat.com>
8360
8361 PR gdb/15161
8362
8363 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8364 instead of strtoul to extract address from packet.
8365 (process_serial_event) <'z'>: Likewise.
8366
83672013-02-18 Yao Qi <yao@codesourcery.com>
8368
8369 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8370
83712013-02-14 Pedro Alves <palves@redhat.com>
8372
8373 Plug memory leak.
8374
8375 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8376 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8377
83782013-02-14 Pedro Alves <palves@redhat.com>
8379
8380 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8381
83822013-02-14 Pedro Alves <palves@redhat.com>
8383
8384 * tracepoint.c (save_string): Delete.
8385 (add_tracepoint_action): Use savestring instead of save_string.
8386
83872013-02-12 Pedro Alves <palves@redhat.com>
8388
8389 * linux-xtensa-low.c: Ditto.
8390 * xtensa-xtregs.c: Ditto.
8391
83922013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8393
8394 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8395 thread_db.
8396
83972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8398
8399 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8400 aarch64_num_wp_regs and aarch64_num_bp_regs to
8401 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8402
84032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8404
8405 * linux-aarch64-low.c (ps_get_thread_area): Replace
8406 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8407
84082013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8409 Marcus Shawcroft <marcus.shawcroft@arm.com>
8410 Nigel Stephens <nigel.stephens@arm.com>
8411 Yufeng Zhang <yufeng.zhang@arm.com>
8412
8413 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8414 (aarch64.c, aarch64-without-fpu.c): New targets.
8415 * configure.srv (aarch64*-*-linux*): New.
8416 * linux-aarch64-low.c: New file.
8417
84182013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8419
8420 * linux-low.c (handle_extended_wait, linux_create_inferior)
8421 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8422 (dequeue_one_deferred_signal, linux_resume_one_thread)
8423 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8424 (linux_tracefork_grandchild, linux_test_for_tracefork)
8425 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8426 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8427 where the argument is 0.
8428
84292013-01-25 Yao Qi <yao@codesourcery.com>
8430
8431 * event-loop.c: Include "queue.h".
8432 (gdb_event_p): New typedef.
8433 (struct gdb_event) <next_event>: Remove.
8434 (event_queue): Change to QUEUE(gdb_event_p).
8435 (async_queue_event): Remove.
8436 (gdb_event_xfree): New.
8437 (initialize_event_loop): New.
8438 (process_event): Use API from QUEUE.
8439 (wait_for_event): Likewise.
8440 * server.c (main): Call initialize_event_loop.
8441 * server.h (initialize_event_loop): Declare.
8442
84432013-01-18 Yao Qi <yao@codesourcery.com>
8444
8445 * ax.h (struct eval_agent_expr_context): New.
8446 (gdb_eval_agent_expr): Update declaration.
8447 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8448 TFRAME. Add new argument CTX.
8449 * server.h (struct eval_agent_expr_context): Declare.
8450 (agent_mem_read, agent_tsv_read): Update declaration.
8451 (agent_mem_read_string): Likewise.
8452 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8453 (add_traceframe_block): Add new argument TPOINT.
8454 Increase TPOINT->traceframe_usage.
8455 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8456 eval_tracepoint_agent_expr.
8457 (condition_true_at_tracepoint): Likewise.
8458 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8459 (agent_mem_read_string, agent_tsv_read): Likewise.
8460
84612013-01-16 Yao Qi <yao@codesourcery.com>
8462
8463 * linux-low.c (linux_resume_one_lwp): Don't check
8464 'lwp->bp_reinsert != 0'.
8465
84662013-01-07 Joel Brobecker <brobecker@adacore.com>
8467 Pedro Alves <palves@redhat.com>
8468
8469 * lynx-low.c (ptrace_request_to_str): Define a temporary
8470 macro and use it to simplify this function's implementation.
8471
84722013-01-07 Joel Brobecker <brobecker@adacore.com>
8473
8474 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8475 sets errno.
8476
84772013-01-07 Joel Brobecker <brobecker@adacore.com>
8478
8479 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8480
84812013-01-07 Joel Brobecker <brobecker@adacore.com>
8482
8483 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8484
84852013-01-07 Joel Brobecker <brobecker@adacore.com>
8486
8487 * lynx-low.c (lynx_resume): Use the resume_info parameter
8488 to determine the ptid for the lynx_ptrace call, unless
8489 it is equal to minus_one_ptid, in which case we use the
8490 ptid of the current_inferior.
8491 (lynx_wait_1): After having received a thread create/exit
8492 event, resume the inferior's execution using the signaling
8493 thread's ptid, rather than the old ptid.
8494
84952013-01-07 Joel Brobecker <brobecker@adacore.com>
8496
8497 * lynx-low.c (lynx_resume): Delete variable ret.
8498
84992013-01-01 Joel Brobecker <brobecker@adacore.com>
8500
8501 * gdbreplay.c (gdbreplay_version): Update copyright year.
8502 * server.c (gdbserver_version): Likewise.
8503
85042012-12-17 Joel Brobecker <brobecker@adacore.com>
8505
8506 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8507 new thread.
8508
85092012-12-17 Joel Brobecker <brobecker@adacore.com>
8510
8511 * lynx-low.c (ptrace_request_to_str): Add handling for
8512 PTRACE_GETTRACESIG.
8513
85142012-12-17 Joel Brobecker <brobecker@adacore.com>
8515
8516 * lynx-low.c (lynx_attach): Delete variable new_process.
8517
85182012-12-17 Joel Brobecker <brobecker@adacore.com>
8519
8520 * lynx-low.c (lynx_create_inferior): Delete variable
8521 new_process.
8522
85232012-12-17 Joel Brobecker <brobecker@adacore.com>
8524
8525 * lynx-low.c (ptrace_request_to_str): Do not handle
8526 PTRACE_GETTHREADLIST if this macro does not exist.
8527
85282012-12-15 Yao Qi <yao@codesourcery.com>
8529
8530 * Makefile.in (OBS): Add notif.o.
8531 * notif.c, notif.h: New.
8532 * server.c: Include "notif.h".
8533 (struct vstop_notif) <next>: Remove.
8534 <base>: New field.
8535 (queue_stop_reply): Update.
8536 (push_event, send_next_stop_reply): Remove.
8537 (discard_queued_stop_replies): Update.
8538 (notif_stop): New variable.
8539 (handle_v_stopped): Remove.
8540 (handle_v_requests): Don't call handle_v_stopped. Call
8541 handle_ack_notif instead.
8542 (queue_stop_reply_callback): Call notif_event_enque instead
8543 of queue_stop_reply.
8544 (handle_status): Don't call send_next_stop_reply, call
8545 notif_write_event instead.
8546 (kill_inferior_callback): Likewise.
8547 (detach_or_kill_inferior_callback): Likewise.
8548 (main): Call initialize_notif.
8549 (process_serial_event): Call QUEUE_is_empty.
8550 (handle_target_event): Call notif_push instead of push event.
8551 * server.h (push_event): Remove declaration.
8552
85532012-12-10 Tom Tromey <tromey@redhat.com>
8554
8555 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8556 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8557 macros.
8558 (.c.o): Rewrite.
8559 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8560 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8561 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8562 (amd64-linux-ipa.o, ax.o): Rewrite.
8563 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8564 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8565 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8566 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8567 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8568 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8569 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8570 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8571 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8572 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8573 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8574 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8575 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8576 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8577 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8578 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8579 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8580 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8581 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8582 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8583 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8584 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8585 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8586 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8587 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8588 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8589 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8590 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8591 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8592 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8593 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8594 (reg-tilegx.o): Remove.
8595 (all_object_files): New macro.
8596 Include .deps files.
8597 * aclocal.m4, configure: Rebuild.
8598 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8599 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8600 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8601
86022012-12-05 Tom Tromey <tromey@redhat.com>
8603
8604 PR gdb/14917:
8605 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8606
86072012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8608
8609 * configure.ac: Check for linux/perf_event.h.
8610 * config.in: Regenerated.
8611 * configure: Regenerated.
8612
86132012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8614
8615 * hostio.c (handle_readlink): Decrease buffer size
8616 parameter passed to readlink by one byte.
8617
86182012-11-26 Yao Qi <yao@codesourcery.com>
8619
8620 * configure.ac (build_warnings): Append '-Wempty-body'.
8621 * configure: Regenerated.
8622 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8623 body.
8624
86252012-11-15 Pierre Muller <muller@sourceware.org>
8626
8627 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8628 * config.in: Regenerate.
8629 * configure: Regenerate.
8630 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8631 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8632 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8633 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8634 header.
8635 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8636 instead of <sys/wait.h> header.
8637 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8638
86392012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8640
8641 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8642 (various make rules): Remove -DGDBSERVER
8643
86442012-11-09 Yao Qi <yao@codesourcery.com>
8645
8646 * spu-low.c (current_ptid): Move it to ..
8647 * gdbthread.h: ... here. New.
8648 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8649 * server.c (myresume, process_serial_event): Likewise.
8650 * thread-db.c (thread_db_find_new_threads): Likewise.
8651 * tracepoint.c (run_inferior_command): Likewise.
8652
86532012-10-01 Andrew Burgess <aburgess@broadcom.com>
8654
8655 * server.c (handle_search_memory_1): Include access length in
8656 warning message.
8657
86582012-09-05 Michael Brandt <michael.brandt@axis.com>
8659
8660 * linux-crisv32-low.c: Fix compile errors.
8661
86622012-09-04 Yao Qi <yao@codesourcery.com>
8663
8664 * tracepoint.c (cmd_qtsv): Adjust debug message.
8665 Don't check CUR_TPOINT.
8666
86672012-08-28 Yao Qi <yao@codesourcery.com>
8668
8669 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8670 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8671 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8672 Remove declarations of xmalloc, xreallloc, xstrdup and
8673 freeargv.
8674 * Makefile.in (libiberty_h): New.
8675 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8676 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8677
86782012-08-23 Yao Qi <yao@codesourcery.com>
8679
8680 * server.h: Remove declaration of 'xsnprintf'.
8681
86822012-08-22 Keith Seitz <keiths@redhat.com>
8683
8684 * server.h: Include build-gnulib-gbserver/config.h.
8685 * gdbreplay.c: Likewise.
8686
86872012-08-08 Doug Evans <dje@google.com>
8688
8689 * Makefile.in (SFILES): Add gdb_vecs.c.
8690 (OBS): Add gdb_vecs.o.
8691 (gdb_vecs_h, host_defs_h): New variables.
8692 (thread-db.o): Add $(gdb_vecs_h) dependency.
8693 (gdb_vecs.o): New rule.
8694 * thread-db.c: #include "gdb_vecs.h".
8695 (thread_db_load_search): Use a vector to iterate over path elements.
8696 Handle text appearing after "$pdir".
8697
8698 * configure.ac: Add check for strstr.
8699 * config.in: Regenerate.
8700 * configure: Regenerate.
8701
87022012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8703
8704 * hostio.c (handle_pread): If pread fails, fall back to attempting
8705 lseek/read.
8706 (handle_pwrite): Likewise for pwrite.
8707
87082012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8709
8710 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8711 between unsupported TYPE and unimplementable ADDR/LEN combination.
8712 (arm_insert_point): Act on new return value.
8713
87142012-07-31 Pedro Alves <palves@redhat.com>
8715
8716 * server.c (process_point_options): Only skip tokens if we find
8717 one that is unrecognized. Don't treat 'X' specially while
8718 skipping unrecognized tokens.
8719
87202012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8721
8722 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8723 to 4-byte-align HW breakpoint addresses for Thumb.
8724
87252012-07-27 Yao Qi <yao@codesourcery.com>
8726
8727 PR remote/14161.
8728
8729 * server.h: Declare gdb_agent_about_to_close.
8730 * target.c (kill_inferior): Include "agent.h".
8731 New. Send command 'kill'.
8732 * target.h (kill_inferior): Removed macro.
8733 * tracepoint.c (gdb_agent_about_to_close): New.
8734 (gdb_agent_helper_thread): Handle command 'close'.
8735 Wait endlessly until the inferior stops.
8736 Install gdb_agent_remove_socket to atexit hook.
8737 (agent_socket_name): New static variable.
8738 (gdb_agent_socket_init): Replace local variable 'name' with
8739 'agent_socket_name'.
8740 (gdb_agent_remove_socket): New.
8741
87422012-07-27 Yao Qi <yao@codesourcery.com>
8743
8744 * server.c (process_point_options): Stop at 'X' when parsing.
8745
87462012-07-19 Michael Eager <eager@eagercon.com>
8747
8748 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8749 to hw_execute.
8750 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8751 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8752 hardware breakpoint.
8753
87542012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8755
8756 * gdbserver/linux-low.c (initialize_low): Call
8757 linux_ptrace_init_warnings.
8758
87592012-07-02 Doug Evans <dje@google.com>
8760
8761 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8762 pointer to int.
8763
87642012-07-02 Stan Shebs <stan@codesourcery.com>
8765
8766 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8767 (ax.o): Add it to build rule.
8768 (ax-ipa.o): Ditto.
8769 (OBS): Add format.o.
8770 (IPA_OBS): Add format.o.
8771 * server.c (handle_query): Claim support for breakpoint commands.
8772 (process_point_options): Add command case.
8773 (process_serial_event): Leave running if there are printfs in
8774 effect.
8775 * mem-break.h (any_persistent_commands): Declare.
8776 (add_breakpoint_commands): Declare.
8777 (gdb_no_commands_at_breakpoint): Declare.
8778 (run_breakpoint_commands): Declare.
8779 * mem-break.c (struct point_command_list): New struct.
8780 (struct breakpoint): New field command_list.
8781 (any_persistent_commands): New function.
8782 (add_commands_to_breakpoint): New function.
8783 (add_breakpoint_commands): New function.
8784 (gdb_no_commands_at_breakpoint): New function.
8785 (run_breakpoint_commands): New function.
8786 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8787 locally.
8788 * ax.c: Include format.h.
8789 (ax_printf): New function.
8790 (gdb_eval_agent_expr): Add printf opcode.
8791
87922012-06-13 Yao Qi <yao@codesourcery.com>
8793
8794 * server.c (start_inferior): Remove duplicated writes to fields
8795 'last_resume_kind' and 'last_status' of 'current_inferior'.
8796
87972012-06-12 Yao Qi <yao@codesourcery.com>
8798 Pedro Alves <palves@redhat.com>
8799
8800 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8801 comment.
8802 * server.c (handle_v_cont): Extend comment.
8803
88042012-06-11 Yao Qi <yao@codesourcery.com>
8805
8806 * linux-low.c (linux_attach): Add 'static'.
8807
88082012-06-06 Yao Qi <yao@codesourcery.com>
8809
8810 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8811
88122012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8813
8814 Fix gcc -flto compilation warning.
8815 * server.c (main): Make variable multi_mode and attach volatile.
8816
88172012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8818
8819 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8820 if the platform doesn't know about it.
8821
88222012-05-30 Jeff Kenton <jkenton@tilera.com>
8823
8824 * Makefile.in (SFILES): Add linux-tile-low.c.
8825 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8826 * configure.srv: Handle tilegx-*-linux*.
8827 * linux-tile-low.c: New file.
8828
88292012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8830
8831 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8832
88332012-05-24 Pedro Alves <palves@redhat.com>
8834
8835 PR gdb/7205
8836
8837 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8838
88392012-05-24 Pedro Alves <palves@redhat.com>
8840
8841 PR gdb/7205
8842
8843 Replace target_signal with gdb_signal throughout.
8844
88452012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8846
8847 * linux-low.c (linux_store_registers): Avoid the copying sequence
8848 when no data has been retrieved by ptrace.
8849
88502012-05-22 Will Deacon <will.deacon@arm.com>
8851
8852 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8853 Include asm/ptrace.h.
8854 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8855 already defined.
8856
88572012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8858
8859 * linux-low.c (linux_store_registers): Don't re-retrieve data
8860 with ptrace that has already been obtained from /proc. Always
8861 copy any data retrieved with ptrace to the buffer supplied.
8862
88632012-05-11 Yao Qi <yao@codesourcery.com>
8864 Pedro Alves <palves@redhat.com>
8865
8866 * linux-low.c (enum stopping_threads_kind): New.
8867 (stopping_threads): Change type to `enum stopping_threads_kind'.
8868 (handle_extended_wait): If stopping and suspending threads, leave
8869 the new_lwp suspended too.
8870 (linux_wait_for_event): Adjust.
8871 (stop_all_lwps): Set `stopping_threads' to
8872 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8873 whether we're suspending threads or just stopping them. Assert no
8874 recursion happens.
8875
88762012-04-29 Yao Qi <yao@codesourcery.com>
8877
8878 * server.h: Move some code to ...
8879 * gdbthread.h: ... here. New.
8880 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8881 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8882 (nto-low.o, win32-low.o): Likewise.
8883 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8884 * regcache.c, remote-utils.c, server.c: Likewise.
8885 * target.c, tracepoint.c, win32-low.c: Likewise.
8886
88872012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8888
8889 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8890 (PTRACE_ARG4_TYPE): Likewise.
8891 (PTRACE_XFER_TYPE): Likewise.
8892 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8893 ptrace to PTRACE_ARG3_TYPE.
8894 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8895 (PTRACE_ARG4_TYPE): Likewise.
8896 (PTRACE_XFER_TYPE): Likewise.
8897 (linux_detach_one_lwp): Cast fourth argument of
8898 ptrace to long then PTRACE_ARG4_TYPE.
8899 (regsets_fetch_inferior_registers): Cast third argument of
8900 ptrace to long then PTRACE_ARG3_TYPE.
8901 (regsets_store_inferior_registers): Likewise.
8902
89032012-04-20 Pedro Alves <palves@redhat.com>
8904
8905 * configure: Regenerate.
8906
89072012-04-19 Pedro Alves <palves@redhat.com>
8908
8909 * Makefile.in (GNULIB_BUILDDIR): New.
8910 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8911 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8912 (all, install-only, uninstall, clean-info, all-lib, clean): No
8913 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8914 (maintainer-clean realclean distclean): Use subdir_do.
8915 (subdir_do): New.
8916 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8917 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8918 * acinclude.m4: Include acx_configure_dir.m4.
8919 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8920 calls. Call AC_PROG_RANLIB. Configure gnulib using
8921 ACX_CONFIGURE_DIR.
8922 (GNULIB): New.
8923 (GNULIB_STDINT_H): Adjust.
8924 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8925 * gdbreplay.c: Include build-gnulib/config.h.
8926 * server.h: Likewise.
8927 * aclocal.m4: Regenerate.
8928 * config.in: Regenerate.
8929 * configure: Regenerate.
8930
89312012-04-19 Pedro Alves <palves@redhat.com>
8932
8933 * Makefile.in (LIBGNU, INCGNU): Adjust.
8934 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8935 (all, install-only, uninstall, clean-info, all-lib, clean)
8936 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8937 * configure.ac: Adjust AC_OUTPUT output.
8938 * aclocal.m4: Regenerate.
8939 * configure: Regenerate.
8940
89412012-04-19 Pedro Alves <palves@redhat.com>
8942
8943 * Makefile.in (generated_files): New.
8944 (server_h): Remove the explicit dependency on config.h, and depend
8945 on $generated_files.
8946
89472012-04-19 Pedro Alves <palves@redhat.com>
8948
8949 * Makefile.in (INCGNU): Add -Ignulib.
8950
89512012-04-19 Pedro Alves <palves@redhat.com>
8952
8953 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8954 (INCGNU): ... this, and spell out -I here.
8955 (GNULIB_LIB): Rename to ...
8956 (LIBGNU): ... this.
8957 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8958
89592012-04-19 Pedro Alves <palves@redhat.com>
8960
8961 * config.in: Regenerate.
8962
89632012-04-19 Pedro Alves <palves@redhat.com>
8964
8965 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8966 * server.h (memmem): Remove declaration.
8967 * config.in: Regenerate.
8968 * configure: Regenerate.
8969
89702012-04-19 Yao Qi <yao@codesourcery.com>
8971
8972 * Makefile.in (SFILES): Add common/vec.c.
8973 (OBS): Add vec.o.
8974 (vec.o): New rule.
8975
89762012-04-19 Yao Qi <yao@codesourcery.com>
8977
8978 * remote-utils.c (prepare_resume_reply): Replace with macro
8979 target_core_of_thread.
8980 * server.c (handle_qxfer_threads_proper): Likewise.
8981 * target.h (traget_core_of_thread): New macro.
8982
89832012-04-18 Pedro Alves <palves@redhat.com>
8984
8985 * aclocal.m4: Regenerate.
8986 * configure: Regenerate.
8987
89882012-04-16 Yao Qi <yao@codesourcery.com>
8989
8990 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8991 duplicated on address.
8992
89932012-04-16 Yao Qi <yao@codesourcery.com>
8994
8995 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8996 (struct tracepoint_action_ops) <send>: New field.
8997 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8998 (agent_expr_send, x_tracepoint_action_send): New.
8999 (l_tracepoint_action_send): New.
9000 (cmd_qtdp): Download and install tracepoint
9001 according to `use_agent'.
9002 (run_inferior_command): Add one more parameter `len'.
9003 Update callers.
9004 (tracepoint_send_agent): New.
9005 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9006
90072012-04-16 Yao Qi <yao@codesourcery.com>
9008
9009 * tracepoint.c (download_tracepoints): Moved to ...
9010 (cmd_qtstart): ... here.
9011
90122012-04-14 Yao Qi <yao@codesourcery.com>
9013
9014 * tracepoint.c: Include inttypes.h.
9015 (struct collect_memory_action): Use sized types.
9016 (struct tracepoint): Likewise.
9017 (cmd_qtdp, stop_tracing): Update print specifiers.
9018 (cmd_qtp, response_tracepoint): Likewise.
9019 (collect_data_at_tracepoint): Likewise.
9020 (collect_data_at_step): Likewise.
9021
90222012-04-14 Yao Qi <yao@codesourcery.com>
9023
9024 Import gnulib module inttypes.
9025 * aclocal.m4, config.in, configure: Regenerated.
9026
90272012-04-14 Yao Qi <yao@codesourcery.com>
9028
9029 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9030 Makefile and config.status at last.
9031
90322012-04-13 Yao Qi <yao@codesourcery.com>
9033
9034 * tracepoint.c: Include stdint.h unconditionally.
9035
90362012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9037
9038 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9039 on BFD_HAVE_SYS_PROCFS_TYPE.
9040 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9041 * configure: Regenerate.
9042 * config.in: Likewise.
9043
90442012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9045
9046 * Makefile.in (clean): Also remove x32.c x32-linux.c
9047 x32-avx.c x32-avx-linux.c.
9048 (x32.o): New target.
9049 (x32.c): Likewise.
9050 (x32-linux.o): Likewise.
9051 (x32-linux.c): Likewise.
9052 (x32-avx.o): Likewise.
9053 (x32-avx.c): Likewise.
9054 (x32-avx-linux.o): Likewise.
9055 (x32-avx-linux.c): Likewise.
9056
9057 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9058 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9059 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9060 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9061 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9062 i386/x32-avx-linux.xml.
9063
9064 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9065 (init_registers_x32_avx_linux): Likwise.
9066 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9067 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9068
90692012-04-13 Pedro Alves <palves@redhat.com>
9070
9071 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9072 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9073 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9074 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9075 the sub-make.
9076
90772012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9078
9079 * linux-x86-low.c (compat_x32_clock_t): New.
9080 (compat_x32_siginfo_t): Likewise.
9081 (compat_x32_siginfo_from_siginfo): Likewise.
9082 (siginfo_from_compat_x32_siginfo): Likewise.
9083 (linux_is_elf64): Likewise.
9084 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9085 and siginfo_from_compat_x32_siginfo for x32.
9086 (x86_arch_setup): Set linux_is_elf64.
9087
90882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9089
9090 PR gdb/13969
9091 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9092 e_machine field.
9093 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9094 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9095 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9096 compatible with process.
9097
90982012-04-12 Yao Qi <yao@codesourcery.com>
9099
9100 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9101 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9102 (install-only, install-info, clean): Handle sub dir gnulib.
9103 (all-lib, am--refresh): New targets.
9104 (memmem.o): Remove target.
9105 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9106 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9107 (AC_REPLACE_FUNCS): Remove memmem.
9108 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9109 (AC_OUTPUT): Generate Makefile in gnulib/.
9110 * aclocal.m4, config.in, configure: Regenerated.
9111
91122012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9113
9114 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9115
91162012-04-05 Pedro Alves <palves@redhat.com>
9117
9118 -Werror=strict-aliasing
9119
9120 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9121 pointer.
9122
91232012-04-04 Pedro Alves <palves@redhat.com>
9124
9125 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9126 (sparc_store_gregset_from_stack, sparc_store_gregset)
9127 (sparc_breakpoint_at): Fix formatting.
9128
91292012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9130
9131 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9132 are available.
9133 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9134 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9135 * config.in: Regenerate.
9136 * configure: Likewise.
9137
91382012-03-29 Pedro Alves <palves@redhat.com>
9139
9140 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9141 Correct ptrace arguments.
9142
91432012-03-28 Pedro Alves <palves@redhat.com>
9144
9145 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9146 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9147 (IA64_FR1_REGNUM): New defines.
9148 (ia64_fetch_register): New.
9149 (the_low_target): Install it.
9150 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9151 field.
9152 * linux-low.c (linux_fetch_registers): Try the
9153 the_low_target.fetch_register hook first.
9154
9155 * linux-arm-low.c (the_low_target): Adjust.
9156 * linux-bfin-low.c (the_low_target): Adjust.
9157 * linux-cris-low.c (the_low_target): Adjust.
9158 * linux-crisv32-low.c (the_low_target): Adjust.
9159 * linux-m32r-low.c (the_low_target): Adjust.
9160 * linux-m68k-low.c (the_low_target): Adjust.
9161 * linux-mips-low.c (the_low_target): Adjust.
9162 * linux-ppc-low.c (the_low_target): Adjust.
9163 * linux-s390-low.c (the_low_target): Adjust.
9164 * linux-sh-low.c (the_low_target): Adjust.
9165 * linux-sparc-low.c (the_low_target): Adjust.
9166 * linux-tic6x-low.c (the_low_target): Adjust.
9167 * linux-x86-low.c (the_low_target): Adjust.
9168 * linux-xtensa-low.c (the_low_target): Adjust.
9169
91702012-03-26 Pedro Alves <palves@redhat.com>
9171
9172 * server.c (handle_qxfer_libraries): Don't bail early if
9173 the_target->qxfer_libraries_svr4 is not NULL.
9174
91752012-03-26 Pedro Alves <palves@redhat.com>
9176
9177 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9178
91792012-03-23 Pedro Alves <palves@redhat.com>
9180
9181 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9182 "library-list-svr4" element's start tag when the the DSO list is
9183 empty.
9184
91852012-03-23 Pedro Alves <palves@redhat.com>
9186
9187 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9188 a variable whose type size is the same as the inferior's pointer
9189 size.
9190
91912012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9192
9193 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9194 struct siginfo.
9195 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9196 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9197 * linux-low.h: Include <signal.h>.
9198 (struct siginfo): Remove forward declaration.
9199 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9200 struct siginfo.
9201
92022012-03-21 Mike Frysinger <vapier@gentoo.org>
9203
9204 * .gitignore: Ignore more files.
9205
92062012-03-19 Pedro Alves <palves@redhat.com>
9207 Jan Kratochvil <jan.kratochvil@redhat.com>
9208
9209 * server.c (cont_thread, general_thread): Add describing comments.
9210 (start_inferior): Clear `cont_thread'.
9211 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9212 of a process.
9213
92142012-03-15 Yao Qi <yao@codesourcery.com>
9215
9216 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9217 handling to ...
9218 (cmd_qtdp): ... here.
9219
92202012-03-15 Yao Qi <yao@codesourcery.com>
9221
9222 * tracepoint.c (struct tracepoint_action_ops): New.
9223 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9224 (m_tracepoint_action_download): New.
9225 (r_tracepoint_action_download): New.
9226 (x_tracepoint_action_download): New.
9227 (l_tracepoint_action_download): New.
9228 (add_tracepoint_action): Install `action->ops' according type.
9229 (download_tracepoint_1): Move code `download' function pointer
9230 of various tracepoint_action_ops.
9231
92322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9233
9234 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9235 linux_ptrace_attach_warnings.
9236
92372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9238
9239 * Makefile.in (linux-ptrace.o): New.
9240 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9241 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9242 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9243 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9244 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9245 of these targets.
9246 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9247
92482012-03-08 Yao Qi <yao@codesourcery.com>
9249 Pedro Alves <palves@redhat.com>
9250
9251 Fix PR server/13392.
9252 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9253 offset of JMP insn.
9254 * tracepoint.c (remove_tracepoint): New.
9255 (cmd_qtdp): Call remove_tracepoint when failed to install.
9256
92572012-03-07 Pedro Alves <palves@redhat.com>
9258
9259 * linux-low.c (get_detach_signal): New.
9260 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9261 Pass on pending signals to PTRACE_DETACH. Check the result of the
9262 ptrace call.
9263 * server.c (program_signals, program_signals_p): New.
9264 (handle_general_set): Handle QProgramSignals.
9265 * server.h (program_signals, program_signals_p): Declare.
9266
92672012-03-05 Pedro Alves <palves@redhat.com>
9268 Jan Kratochvil <jan.kratochvil@redhat.com>
9269
9270 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9271 New comment why.
9272
92732012-03-03 Yao Qi <yao@codesourcery.com>
9274
9275 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9276 agent_look_up_symbols.
9277
92782012-03-03 Yao Qi <yao@codesourcery.com>
9279
9280 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9281 (linux-x86-low.o): Likewise.
9282 * server.h: Remove in_process_agent_loaded.
9283 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9284 common/agent.c.
9285 Update callers.
9286
92872012-03-03 Yao Qi <yao@codesourcery.com>
9288
9289 * tracepoint.c (gdb_agent_capability): New global.
9290 (in_process_agent_loaded_ust): Renamed to
9291 `in_process_agent_supports_ust'.
9292 Update callers.
9293 (in_process_agent_supports_ust): Call agent_capability_check.
9294 (clear_installed_tracepoints): Assert that agent supports
9295 agent.
9296
92972012-03-03 Yao Qi <yao@codesourcery.com>
9298
9299 * linux-low.c (linux_supports_agent): New.
9300 (linux_target_ops): Initialize field `supports_agent' with
9301 linux_supports_agent.
9302 * target.h (struct target_ops) <supports_agent>: New.
9303 (target_supports_agent): New macro.
9304 * server.c (handle_general_set): Handle packet 'QAgent'.
9305 (handle_query): Send `QAgent+'.
9306 * Makefile.in (server.o): Depends on agent.h.
9307
93082012-03-03 Yao Qi <yao@codesourcery.com>
9309
9310 * Makefile.in (OBS): Add agent.o.
9311 Add new rule for agent.o.
9312 Track dependence of tracepoint.c on agent.h.
9313 * tracepoint.c (run_inferior_command_1):
9314 (run_inferior_command): Call agent_run_command.
9315 (gdb_ust_connect_sync_socket): Deleted. Move it to
9316 common/agent.c.
9317 (resume_thread, stop_thread): Likewise.
9318 (gdb_ust_socket_init): Renamed to ...
9319 (gdb_agent_socket_init): ... New.
9320 (gdb_ust_thread): Renamed to ...
9321 (gdb_agent_helper_thread): ... New.
9322 (gdb_ust_init): Move some code to ...
9323 (gdb_agent_init): ... here. New.
9324 [HAVE_UST]: Call gdb_ust_init.
9325 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9326 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9327 * config.in, configure: Regenerated.
9328
93292012-03-02 Pedro Alves <palves@redhat.com>
9330
9331 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9332 * linux-low.c (struct simple_pid_list): New.
9333 (stopped_pids): New a struct simple_pid_list pointer.
9334 (add_to_pid_list, pull_pid_from_list): New.
9335 (handle_extended_wait): Don't assume the first signal new children
9336 report is SIGSTOP. Adjust call to pull_pid_from_list.
9337 (linux_wait_for_lwp): Adjust.
9338
93392012-03-02 Yao Qi <yao@codesourcery.com>
9340
9341 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9342 debug log.
9343
93442012-03-02 Yao Qi <yao@codesourcery.com>
9345
9346 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9347 `stop_pc' and `tpoint'. Update caller.
9348
93492012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9350
9351 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9352 * linux-low.c (use_linux_regsets): New macro.
9353 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9354 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9355 (linux_register_in_regsets): New function.
9356 (usr_fetch_inferior_registers): Skip registers covered by
9357 regsets.
9358 (usr_store_inferior_registers): Likewise.
9359 (usr_fetch_inferior_registers): New macro.
9360 (usr_store_inferior_registers): Likewise.
9361 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9362 (linux_store_registers): Likewise.
9363 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9364 prototype.
9365 (init_registers_mips64_dsp_linux): Likewise.
9366 (init_registers_mips_linux): New macro.
9367 (init_registers_mips_dsp_linux): Likewise.
9368 (mips_dsp_num_regs): Likewise.
9369 (DSP_BASE, DSP_CONTROL): New fallback macros.
9370 (mips_base_regs): New macro.
9371 (mips_regmap): Use it. Fix the size.
9372 (mips_dsp_regmap): New variable.
9373 (mips_dsp_regset_bitmap): Likewise.
9374 (mips_arch_setup): New function.
9375 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9376 than mips_regmap.
9377 (mips_cannot_store_register): Likewise.
9378 (the_low_target): Update .arch_setup, .num_regs and .regmap
9379 initializers. Add .regset_bitmap initializer.
9380 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9381 initializer.
9382 * linux-bfin-low.c (the_low_target): Likewise.
9383 * linux-cris-low.c (the_low_target): Likewise.
9384 * linux-crisv32-low.c (the_low_target): Likewise.
9385 * linux-ia64-low.c (the_low_target): Likewise.
9386 * linux-m32r-low.c (the_low_target): Likewise.
9387 * linux-m68k-low.c (the_low_target): Likewise.
9388 * linux-ppc-low.c (the_low_target): Likewise.
9389 * linux-s390-low.c (the_low_target): Likewise.
9390 * linux-sh-low.c (the_low_target): Likewise.
9391 * linux-sparc-low.c (the_low_target): Likewise.
9392 * linux-tic6x-low.c (the_low_target): Likewise.
9393 * linux-x86-low.c (the_low_target): Likewise.
9394 * linux-xtensa-low.c (the_low_target): Likewise.
9395 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9396 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9397 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9398 srv_xmlfiles.
9399 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9400 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9401
94022012-02-29 Yao Qi <yao@codesourcery.com>
9403 Pedro Alves <palves@redhat.com>
9404
9405 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9406 `step_over_finished' is true.
9407
94082012-02-27 Pedro Alves <palves@redhat.com>
9409
9410 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9411 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9412
94132012-02-27 Pedro Alves <palves@redhat.com>
9414
9415 PR server/9684
9416 * linux-low.c (pid_is_stopped): New.
9417 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9418
94192012-02-25 Luis Machado <lgustavo@codesourcery.com>
9420
9421 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9422 of conditions.
9423
94242012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9425
9426 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9427
94282012-02-24 Luis Machado <lgustavo@codesourcery>
9429
9430 * server.c (handle_query): Advertise support for target-side
9431 breakpoint condition evaluation.
9432 (process_point_options): New function.
9433 (process_serial_event): When inserting a breakpoint, check for
9434 a target-side condition that should be evaluated.
9435
9436 * mem-break.c: Include regcache.h and ax.h.
9437 (point_cond_list_t): New data structure.
9438 (breakpoint) <cond_list>: New field.
9439 (find_gdb_breakpoint_at): Make non-static.
9440 (delete_gdb_breakpoint_at): Clear any target-side
9441 conditions.
9442 (clear_gdb_breakpoint_conditions): New function.
9443 (add_condition_to_breakpoint): Likewise.
9444 (add_breakpoint_condition): Likewise.
9445 (gdb_condition_true_at_breakpoint): Likewise.
9446 (gdb_breakpoint_here): Return result directly instead
9447 of going through a local variable.
9448
9449 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9450 (clear_gdb_breakpoint_conditions): Likewise.
9451 (add_breakpoint_condition): Likewise.
9452 (gdb_condition_true_at_breakpoint): Likewise.
9453
9454 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9455 (need_step_over_p): Take target-side breakpoint condition into
9456 consideration.
9457
94582012-02-24 Luis Machado <lgustavo@codesourcery>
9459
9460 * server.h: Include tracepoint.h.
9461 (agent_mem_read, agent_get_trace_state_variable_value,
9462 agent_set_trace_state_variable_value,
9463 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9464 get_set_tsv_func_addr): New prototypes.
9465
9466 * ax.h: New include file.
9467 * ax.c: New source file.
9468
9469 * tracepoint.c: Include ax.h.
9470 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9471 agent_expr, eval_result_type): Move to ax.h.
9472 (parse_agent_expr): Rename to ...
9473 (gdb_parse_agent_expr): ... this, make it non-static and move
9474 to ax.h.
9475 (unparse_agent_expr) Rename to ...
9476 (gdb_unparse_agent_expr): ... this, make it non-static and move
9477 to ax.h.
9478 (eval_agent_expr): Rename to ...
9479 (eval_tracepoint_agent_expr): ... this.
9480 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9481 forward declarations.
9482 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9483 (agent_get_trace_state_variable_value): New function.
9484 (agent_set_trace_state_variable_value): New function.
9485 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9486 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9487 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9488 (condition_true_at_tracepoint): Likewise.
9489 (parse_agent_expr): Rename to ...
9490 (gdb_parse_agent_expr): ... this and move to ax.c.
9491 (unparse_agent_expr): Rename to ...
9492 (gdb_unparse_agent_expr): ... this and move to ax.c.
9493 (gdb_agent_op_name): Move to ax.c.
9494 (eval_agent_expr): Rename to ...
9495 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9496 and move to ax.c.
9497 (eval_tracepoint_agent_expr): New function.
9498 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9499 non-static.
9500 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9501 ax.c.
9502 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9503 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9504 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9505 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9506 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9507 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9508 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9509 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9510 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9511 (compile_bytecodes): Remove forward declaration.
9512 (is_goto_target): Move to ax.c.
9513 (compile_bytecodes): Move to ax.c and call
9514 agent_get_trace_state_variable_value (...) and
9515 agent_set_trace_state_variable_value (...).
9516
9517 * Makefile.in: Update ax.c and IPA dependencies.
9518
95192012-02-24 Pedro Alves <palves@redhat.com>
9520
9521 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9522 (cmd_bigqtbuffer_circular): ... this. Only handle
9523 'QTBuffer:circular:'.
9524 (handle_tracepoint_general_set): Adjust.
9525
95262012-02-16 Yao Qi <yao@codesourcery.com>
9527
9528 * inferiors.c: Move code to ...
9529 * dll.c: .... here. New.
9530 * server.h: Declare clear_dlls.
9531 * Makefile.in (SFILES): Add dll.c.
9532 (OBS): Add dll.o
9533 (dll.o): New rule.
9534
95352012-02-11 Yao Qi <yao@codesourcery.com>
9536
9537 * server.c: (handle_monitor_command): Add a new parameter
9538 `own_buf'.
9539 (handle_query): Update caller.
9540
95412012-02-09 Joel Brobecker <brobecker@adacore.com>
9542
9543 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9544 * configure, config.in: Regenerate.
9545 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9546 is not defined.
9547
95482012-02-02 Pedro Alves <palves@redhat.com>
9549
9550 Try SIGKILL first, then PTRACE_KILL.
9551 * linux-low.c (linux_kill_one_lwp): New.
9552 (linux_kill_one_lwp): Rename to ...
9553 (kill_one_lwp_callback): ... this. Use the new
9554 linux_kill_one_lwp.
9555
95562012-02-02 Pedro Alves <palves@redhat.com>
9557
9558 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9559 inferior.
9560
95612012-01-27 Pedro Alves <palves@redhat.com>
9562
9563 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9564 (elf_64_file_p): Make static.
9565 (linux_pid_exe_is_elf_64_file): New.
9566 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9567 Delete declarations.
9568 (linux_pid_exe_is_elf_64_file): Declare.
9569 * linux-x86-low.c (x86_arch_setup): Use
9570 linux_pid_exe_is_elf_64_file.
9571
95722012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9573
9574 * linux-low.c (linux_wait_for_event_1): Rename to ...
9575 (linux_wait_for_event): ... here and merge it with former
9576 linux_wait_for_event - new variable wait_ptid, use it.
9577 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9578
95792012-01-23 Pedro Alves <palves@redhat.com>
9580
9581 * server.c (main): Avoid yet another case of infinite loop while
9582 detaching/killing after a longjmp.
9583
95842012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9585
9586 Code cleanup.
9587 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9588
95892012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9590
9591 * hostio.c (handle_readlink): New function.
9592 (handle_vFile): Call it to handle "vFile:readlink" packets.
9593
95942012-01-20 Pedro Alves <palves@redhat.com>
9595 Ulrich Weigand <ulrich.weigand@linaro.org>
9596
9597 * server.c (handle_v_requests): Only support vAttach and vRun to
9598 start multiple processes when in extended protocol mode.
9599
96002012-01-17 Pedro Alves <palves@redhat.com>
9601
9602 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9603 memalign plus mprotect to allocate the scratch buffer.
9604
96052012-01-13 Pedro Alves <palves@redhat.com>
9606
9607 * server.c (attach_inferior): Clear `cont_thread'.
9608
96092012-01-13 Pedro Alves <palves@redhat.com>
9610
9611 * server.c (main): Avoid infinite loop while detaching/killing
9612 after a longjmp.
9613
96142012-01-09 Doug Evans <dje@google.com>
9615
9616 * server.c (start_inferior): Set last_ptid in --wrapper case.
9617
96182012-01-06 Yao Qi <yao@codesourcery.com>
9619
9620 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9621 defined.
9622 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9623
96242012-01-04 Yao Qi <yao@codesourcery.com>
9625
9626 * tracepoint.c (cmd_qtdp): Print debug message
9627 for static tracepoint.
9628
96292012-01-04 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c (trace_vdebug): Differentiate debug message
9632 between gdbserver and IPA.
9633
96342012-01-03 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (tracepoint_was_hit): Don't collect for
9637 static tracepoint.
9638
96392012-01-02 Joel Brobecker <brobecker@adacore.com>
9640
9641 * terminal.h: Reformat copyright header.
9642
96432012-01-02 Joel Brobecker <brobecker@adacore.com>
9644
9645 * server.c (gdbserver_version): Update copyright year.
9646 * gdbreplay.c (gdbreplay_version): Likewise.
9647
96482011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9649
9650 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9651
9652 Revert:
9653 2011-12-18 Hui Zhu <teawater@gmail.com>
9654 * linux-low.c (linux_create_inferior): Save return value to ret.
9655
96562011-12-18 Hui Zhu <teawater@gmail.com>
9657
9658 * linux-low.c (linux_create_inferior): Save return value to ret.
9659
96602011-12-16 Doug Evans <dje@google.com>
9661
9662 * linux-low.c (linux_create_inferior): If stdio connection,
9663 redirect stdin from /dev/null, stdout to stderr.
9664 * remote-utils.c (remote_is_stdio): New static global.
9665 (remote_connection_is_stdio): New function.
9666 (remote_prepare): Handle stdio connection.
9667 (remote_open): Ditto.
9668 (remote_close): Don't close stdin for stdio connections.
9669 (read_prim,write_prim): New functions. Replace all calls to
9670 read/write to these.
9671 * server.c (main): Watch for "-" argument. Move call to
9672 remote_prepare before start_inferior.
9673 * server.h (STDIO_CONNECTION_NAME): New macro.
9674 (remote_connection_is_stdio): Declare.
9675
9676 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9677 in debugging output.
9678
96792011-12-15 Yao Qi <yao@codesourcery.com>
9680
9681 * tracepoint.c: Include sys/syscall.h.
9682 (gdb_ust_thread): Remove preprocessor conditional.
9683
96842011-12-14 Pedro Alves <pedro@codesourcery.com>
9685
9686 * linux-low.c (linux_detach_one_lwp): Call
9687 the_low_target.prepare_to_resume before detaching.
9688
96892011-12-14 Yao Qi <yao@codesourcery.com>
9690
9691 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9692 of write.
9693
96942011-12-14 Yao Qi <yao@codesourcery.com>
9695
9696 * i386-low.c (i386_low_stopped_data_address): Initialize local
9697 variable `control'.
9698
96992011-12-13 Pedro Alves <pedro@codesourcery.com>
9700
9701 PR remote/13492
9702
9703 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9704 DR_CONTROL unless necessary. Extend comments.
9705 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9706 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9707
97082011-12-13 Yao Qi <yao@codesourcery.com>
9709
9710 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9711 macros.
9712 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9713
97142011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9715
9716 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9717 Print new debug message for such case.
9718
97192011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9720
9721 Fix overlapping memcpy.
9722 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9723 the read_inferior_memory transfer.
9724 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9725 write_inferior_memory transfer.
9726 (set_fast_tracepoint_jump): New variable buf. Use it for the
9727 read_inferior_memory and write_inferior_memory transfers.
9728 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9729 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9730 Use it for the write_inferior_memory transfer.
9731 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9732 buffers.
9733
97342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9735
9736 * linux-low.c (fetch_register, store_register): Make code
9737 consistent, fix formatting.
9738
97392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9740
9741 * linux-low.c (usr_store_inferior_registers): Factor out code
9742 to handle individual registers into...
9743 (store_register): ... this new function.
9744
97452011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9746
9747 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9748 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9749 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9750 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9751 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9752 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9753 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9754 (srv_xmlfiles): Add new XML files.
9755
9756 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9757 and <sys/uio.h>.
9758 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9759 (init_registers_s390_linux32v1): Add prototype.
9760 (init_registers_s390_linux32v2): Likewise.
9761 (init_registers_s390_linux64v1): Likewise.
9762 (init_registers_s390_linux64v2): Likewise.
9763 (init_registers_s390x_linux64v1): Likewise.
9764 (init_registers_s390x_linux64v2): Likewise.
9765 (s390_num_regs): Increment to 52.
9766 (s390_regmap): Add orig_r2 register.
9767 (s390_num_regs_3264): Increment to 68.
9768 (s390_regmap_3264): Add orig_r2 register.
9769 (s390_collect_ptrace_register): Handle orig_r2 register.
9770 (s390_supply_ptrace_register): Likewise.
9771 (s390_fill_last_break): New function.
9772 (s390_store_last_break): Likewise.
9773 (s390_fill_system_call): New function.
9774 (s390_store_system_call): Likewise.
9775 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9776 register sets.
9777 (s390_check_regset): New function.
9778 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9779 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9780 Update target_regsets for available register sets.
9781
97822011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9783 Jan Kratochvil <jan.kratochvil@redhat.com>
9784
9785 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9786 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9787 New.
9788 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9789 * linux-low.h (struct process_info_private): New member r_debug.
9790 * server.c (handle_qxfer_libraries): Call
9791 the_target->qxfer_libraries_svr4.
9792 (handle_qxfer_libraries_svr4): New function.
9793 (qxfer_packets): New entry "libraries-svr4".
9794 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9795 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9796 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9797 PACKET_qXfer_libraries_svr4.
9798
97992011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9800
9801 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9802 PSW address/mask between 8-byte and 16-byte formats.
9803 (s390_supply_ptrace_register): Likewise.
9804 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9805 basic addressing mode bit.
9806
98072011-11-24 Stan Shebs <stan@codesourcery.com>
9808
9809 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9810
98112011-11-17 Stan Shebs <stan@codesourcery.com>
9812
9813 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9814 (tracing_start_time): New global.
9815 (tracing_stop_time): New global.
9816 (tracing_user_name): New global.
9817 (tracing_notes): New global.
9818 (tracing_stop_note): New global.
9819 (cmd_qtstart): Set traceframe_usage, start_time.
9820 (stop_tracing): Set stop_time.
9821 (cmd_qtstatus): Report additional status.
9822 (cmd_qtp): New function.
9823 (handle_tracepoint_query): Call it.
9824 (cmd_qtnotes): New function.
9825 (handle_tracepoint_general_set): Call it.
9826 (get_timestamp): Rename from tsv_get_timestamp.
9827
98282011-11-14 Stan Shebs <stan@codesourcery.com>
9829 Kwok Cheung Yeung <kcy@codesourcery.com>
9830
9831 * linux-x86-low.c (small_jump_insn): New.
9832 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9833 trampoline and error message, build a trampoline and issue a small
9834 jump instruction to it.
9835 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9836 trampoline and error message.
9837 (x86_get_min_fast_tracepoint_insn_len): New.
9838 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9839 * linux-low.h (struct linux_target_ops): Add arguments to
9840 install_fast_tracepoint_jump_pad operation, add new operation.
9841 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9842 arguments.
9843 (linux_get_min_fast_tracepoint_insn_len): New function.
9844 (linux_target_op): Add new operation.
9845 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9846 (gdb_trampoline_buffer_end): Ditto.
9847 (gdb_trampoline_buffer_error): Ditto.
9848 (struct ipa_sym_addresses): Add fields for new IPA variables.
9849 (symbol_list): Add entries for new IPA variables.
9850 (struct tracepoint): Add fields to hold the address range of the
9851 trampoline used by the tracepoint.
9852 (trampoline_buffer_head): New static variable.
9853 (trampoline_buffer_tail): Ditto.
9854 (claim_trampoline_space): New function.
9855 (have_fast_tracepoint_trampoline_buffer): New function.
9856 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9857 structure.
9858 (install_fast_tracepoint): Ditto, also add error buffer argument.
9859 (cmd_qtminftpilen): New function.
9860 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9861 (fast_tracepoint_from_trampoline_address): New function.
9862 (fast_tracepoint_collecting): Handle trampoline as part of jump
9863 pad space.
9864 (set_trampoline_buffer_space): New function.
9865 (initialize_tracepoint): Initialize new IPA variables.
9866 * target.h (struct target_ops): Add arguments to
9867 install_fast_tracepoint_jump_pad operation, add new
9868 get_min_fast_tracepoint_insn_len operation.
9869 (target_get_min_fast_tracepoint_insn_len): New.
9870 (install_fast_tracepoint_jump_pad): Add arguments.
9871 * server.h (IPA_BUFSIZ): Define.
9872 * linux-i386-ipa.c: Include extra header files.
9873 (initialize_fast_tracepoint_trampoline_buffer): New function.
9874 (initialize_low_tracepoint): Call it.
9875 * server.h (set_trampoline_buffer_space): Declare.
9876 (claim_trampoline_space): Ditto.
9877 (have_fast_tracepoint_trampoline_buffer): Ditto.
9878
98792011-11-14 Yao Qi <yao@codesourcery.com>
9880
9881 * server.c (handle_query): Handle InstallInTrace for qSupported.
9882 * tracepoint.c (add_tracepoint): Sort list.
9883 (install_tracepoint, download_tracepoint): New.
9884 (cmd_qtdp): Call them to install and download tracepoints.
9885 (sort_tracepoints): Removed.
9886 (cmd_qtstart): Update.
9887
98882011-11-14 Yao Qi <yao@codesourcery.com>
9889
9890 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9891 * mem-break.h: Declare.
9892 * tracepoint.c (cmd_qtstart): Move some code to ...
9893 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9894 New.
9895 (download_tracepoints): Move some code to ...
9896 (download_tracepoint_1): ... here. New.
9897
98982011-11-08 Yao Qi <yao@codesourcery.com>
9899
9900 * remote-utils.c (relocate_instruction): A comment fix.
9901
99022011-11-07 Joel Brobecker <brobecker@adacore.com>
9903
9904 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9905 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9906 dr_status_mirror and dr_control_mirror from debug_reg_state.
9907 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9908 (i386_initial_stuff): Remove use of deleted globals.
9909 (i386_get_thread_context, i386_set_thread_context,
9910 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9911 from debug_reg_state.
9912
99132011-11-05 Yao Qi <yao@codesourcery.com>
9914
9915 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9916 address as TPOINT's.
9917
99182011-11-02 Stan Shebs <stan@codesourcery.com>
9919
9920 * tracepoint.c (agent_mem_read_string): New function.
9921 (eval_agent_expr): Call it for tracenz.
9922 * server.c (handle_query): Report support for tracenz.
9923
99242011-11-02 Yao Qi <yao@codesourcery.com>
9925
9926 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9927
99282011-11-02 Yao Qi <yao@codesourcery.com>
9929
9930 * target.h: Fix a typo in comment.
9931
99322011-10-31 Pedro Alves <pedro@codesourcery.com>
9933
9934 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9935 clobber the breakpoints' shadows with fast tracepoint jumps.
9936 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9937 * target.c (write_inferior_memory): Also pass MYADDR down to
9938 check_mem_write.
9939
99402011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9941
9942 * configure.ac: Check support for personality routine.
9943 * configure: Regenerate.
9944 * config.in: Likewise.
9945 * linux-low.c: Include <sys/personality.h>.
9946 Define ADDR_NO_RANDOMIZE if necessary.
9947 (linux_create_inferior): Disable address space randomization when
9948 forking inferior, if requested.
9949 (linux_supports_disable_randomization): New function.
9950 (linux_target_ops): Install it.
9951 * server.h (disable_randomization): Declare.
9952 * server.c (disable_randomization): New global variable.
9953 (handle_general_set): Handle QDisableRandomization.
9954 (handle_query): Likewise for qSupported.
9955 (main): Support --disable-randomization and --no-disable-randomization
9956 command line arguments.
9957 * target.h (struct target_ops): Add supports_disable_randomization.
9958 (target_supports_disable_randomization): New macro.
9959
99602011-09-29 Mike Frysinger <vapier@gentoo.org>
9961
9962 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9963 ifdef check.
9964 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9965 [!PT_GETDSBT] (target_loadmap): New definition.
9966 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9967 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9968 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9969 and PT_GETDSBT to LINUX_LOADMAP.
9970 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9971 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9972
99732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9974
9975 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9976 (arm_linux_hwbp_cap): New static variable.
9977 (arm_linux_get_hwbp_cap): Replace by ...
9978 (arm_linux_init_hwbp_cap): ... this new function.
9979 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9980 (arm_linux_get_hw_watchpoint_count): Likewise.
9981 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9982 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9983 (arm_prepare_to_resume): Use perror_with_name instead of error.
9984
99852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9986
9987 * linux-arm-low.c: Include <signal.h>.
9988 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9989 (struct arm_linux_hwbp_cap): New data type.
9990 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9991 (struct arm_linux_hw_breakpoint): New data type.
9992 (MAX_BPTS, MAX_WPTS): Define.
9993 (struct arch_process_info, struct arch_lwp_info): New data types.
9994 (arm_linux_get_hwbp_cap): New function.
9995 (arm_linux_get_hw_breakpoint_count): Likewise.
9996 (arm_linux_get_hw_watchpoint_count): Likewise.
9997 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9998 (arm_hwbp_control_initialize): Likewise.
9999 (arm_hwbp_control_is_enabled): Likewise.
10000 (arm_hwbp_control_is_initialized): Likewise.
10001 (arm_hwbp_control_disable): Likewise.
10002 (arm_linux_hw_breakpoint_equal): Likewise.
10003 (arm_linux_hw_point_initialize): Likewise.
10004 (struct update_registers_data): New data structure.
10005 (update_registers_callback: New function.
10006 (arm_insert_point): Likewise.
10007 (arm_remove_point): Likewise.
10008 (arm_stopped_by_watchpoint): Likewise.
10009 (arm_stopped_data_address): Likewise.
10010 (arm_new_process): Likewise.
10011 (arm_new_thread): Likewise.
10012 (arm_prepare_to_resume): Likewise.
10013 (the_low_target): Register arm_insert_point, arm_remove_point,
10014 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10015 arm_new_thread, and arm_prepare_to_resume.
10016
100172011-09-15 Stan Shebs <stan@codesourcery.com>
10018
10019 * server.h (struct emit_ops): Add compare-goto fields.
10020 * tracepoint.c (gdb_agent_op_sizes): New table.
10021 (emit_eq_goto): New function.
10022 (emit_ne_goto): New function.
10023 (emit_lt_goto): New function.
10024 (emit_le_goto): New function.
10025 (emit_gt_goto): New function.
10026 (emit_ge_goto): New function.
10027 (is_goto_target): New function.
10028 (compile_bytecodes): Recognize special cases of compare-goto
10029 combinations and call specialized emitters for them.
10030 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10031 (amd64_emit_ne_goto): New function.
10032 (amd64_emit_lt_goto): New function.
10033 (amd64_emit_le_goto): New function.
10034 (amd64_emit_gt_goto): New function.
10035 (amd64_emit_ge_goto): New function.
10036 (amd64_emit_ops): Add the new functions.
10037 (i386_emit_eq_goto): New function.
10038 (i386_emit_ne_goto): New function.
10039 (i386_emit_lt_goto): New function.
10040 (i386_emit_le_goto): New function.
10041 (i386_emit_gt_goto): New function.
10042 (i386_emit_ge_goto): New function.
10043 (i386_emit_ops): Add the new functions.
10044
100452011-09-08 Stan Shebs <stan@codesourcery.com>
10046
10047 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10048 (i386_emit_epilogue): Restore %ebx.
10049
100502011-08-31 Jie Zhang <jzhang918@gmail.com>
10051
10052 * server.c (step_thread): Remove definition.
10053 (process_serial_event): Don't handle Hs.
10054 * server.h (step_thread): Remove declaration.
10055 * target.c (set_desired_inferior): Remove use of step_thread.
10056
100572011-08-24 Luis Machado <lgustavo@codesourcery.com>
10058
10059 * linux-low.c: Include linux-procfs.h.
10060 (linux_attach_lwp_1): Update comments.
10061 (linux_attach): Scan for existing threads when attaching to a
10062 process that is the tgid.
10063 * Makefile.in: Update dependencies.
10064
100652011-08-24 Luis Machado <lgustavo@codesourcery.com>
10066
10067 * configure.srv: Add linux-procfs.o dependencies.
10068
100692011-08-14 Yao Qi <yao@codesourcery.com>
10070
10071 * target.h (struct target_ops): Fix indent.
10072 * win32-low.c (win32_target_ops): Fix comment.
10073
100742011-08-14 Andrew Jenner <andrew@codesourcery.com>
10075 Yao Qi <yao@codesourcery.com>
10076
10077 * Makefile.in (clean): Remove tic6x-*.c files.
10078 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10079 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10080 (tic6x-c64xp-linux.c): Likewise.
10081 * configure.srv: Add support for tic6x-*-uclinux.
10082 * linux-tic6x-low.c: New.
10083 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10084
100852011-08-14 Andrew Stubbs <ams@codesourcery.com>
10086 Yao Qi <yao@codesourcery.com>
10087
10088 * target.h (struct target_ops): Add read_loadmap.
10089 * linux-low.c (struct target_loadseg): New type.
10090 (struct target_loadmap): New type.
10091 (linux_read_loadmap): New function.
10092 (linux_target_ops): Add linux_read_loadmap.
10093 * server.c (handle_query): Support qXfer:fdpic:read packet.
10094 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10095 to NULL.
10096
100972011-08-05 Eli Zaretskii <eliz@gnu.org>
10098
10099 * win32-low.c: Include <stdint.h>.
10100
101012011-07-22 Pedro Alves <pedro@codesourcery.com>
10102
10103 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10104 to the inferior here.
10105 (i386_remove_aligned_watchpoint): Ditto.
10106 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10107 fit part of the watchpoint in the debug registers.
10108 (i386_update_inferior_debug_regs): New.
10109 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10110 registers, and only update the inferior on success.
10111 (i386_low_remove_watchpoint): Ditto.
10112
101132011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10114
10115 * linux-low.c (compare_ints, unique, list_threads, show_process,
10116 linux_core_of_thread): Delete.
10117 (linux_target_ops): Change linux_core_of_thread to
10118 linux_common_core_of_thread.
10119 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10120 * utils.c (malloc_failure): Change type of argument.
10121 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10122 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10123 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10124 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10125 (IPA_OBJS): Add common-utils-ipa.o.
10126 (ptid_h, linux_osdata_h): New macros.
10127 (server_h): Add common/common-utils.h, common/xml-utils.h,
10128 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10129 common/ptid.h.
10130 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10131 ptid.o, buffer.o): New rules.
10132 (linux-low.o): Add common/linux-osdata.h as a dependency.
10133 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10134 * configure.ac: Add AC_HEADER_DIRENT check.
10135 * config.in: Regenerate.
10136 * configure: Regenerate.
10137 * remote-utils.c (xml_escape_text): Delete.
10138 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10139 buffer_xml_printf): Move to common/buffer.c.
10140 * server.c (main): Remove call to initialize_inferiors.
10141 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10142 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10143 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10144 internal_error, gdb_assert, gdb_assert_fail): Delete.
10145 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10146 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10147 common/buffer.h.
10148 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10149 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10150 initialize_inferiors): Delete.
10151
101522011-07-20 Pedro Alves <pedro@codesourcery.com>
10153
10154 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10155 symbol error.
10156
101572011-05-31 Pedro Alves <pedro@codesourcery.com>
10158
10159 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10160 assertion.
10161 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10162
101632011-05-26 Yao Qi <yao@codesourcery.com>
10164
10165 * Makefile.in (thread-db.o): Track dependence to
10166 common/gdb_thread_db.h.
10167 * thread-db.c: include gdb_thread_db.h from right place.
10168
101692011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10170
10171 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10172 __FILE__ and __LINE__ to internal_error.
10173
101742011-05-13 Doug Evans <dje@google.com>
10175
10176 * thread-db.c (try_thread_db_load_from_sdir): New function.
10177 (try_thread_db_load_from_dir): New function.
10178 (thread_db_load_search): Handle $sdir, ignore $pdir.
10179 Remove trying of system directories if search of
10180 libthread-db-search-path fails, that is now done via $sdir.
10181
101822011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10183
10184 * server.c (handle_query): Add EnableDisableTracepoints to the list
10185 of supported features.
10186 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10187 tracepoints.
10188 (cmd_qtenable_disable): New.
10189 (cmd_qtstart): Install tracepoints even if disabled.
10190 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10191 receiving a QTEnable or QTDisable packet.
10192 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10193 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10194 tracepoints.
10195 (gdb_probe): Skip data collection if static tracepoint is disabled.
10196
101972011-05-10 Doug Evans <dje@google.com>
10198
10199 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10200
102012011-05-04 Doug Evans <dje@google.com>
10202
10203 * linux-low.c (linux_join): Skip process lookup.
10204 * spu-low.c (spu_join): Ditto.
10205 * server.c (join_inferiors_callback): Delete.
10206 (process_serial_event): For 'D' packet (detach) call join_inferior
10207 directly.
10208
102092011-05-04 Joseph Myers <joseph@codesourcery.com>
10210
10211 * README: Don't mention xscale*-*-linux*.
10212 * configure.srv (xscale*-*-linux*): Don't handle target.
10213
102142011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10215
10216 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10217 casting pointers.
10218 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10219 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10220 (i386_emit_void_call_2): Likewise.
10221
102222011-04-26 Yao Qi <yao@codesourcery.com>
10223
10224 * linux-low.c: Move common macros to linux-ptrace.h.
10225 Include linux-ptrace.h.
10226 * Makefile.in (linux_ptrace_h): New.
10227 (linux-low.o): Depends on linux-ptrace.h.
10228
102292011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10230
10231 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10232 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10233 (remote_prepare): New function with most of the TCP code from ...
10234 (remote_open): ... here. Detect PORT here unconditionally. Move also
10235 setting transport_is_reliable.
10236 * server.c (run_once): New variable.
10237 (gdbserver_usage): Document it.
10238 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10239 the first run if RUN_ONCE.
10240 * server.h (run_once, remote_prepare): New declarations.
10241
102422011-04-19 Tom Tromey <tromey@redhat.com>
10243
10244 * win32-low.c (handle_load_dll): Remove duplicate "the".
10245
102462011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10247
10248 Remove support for old Cygwin 1.5 versions.
10249 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10250 function to avoid warning.
10251 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10252 warning.
10253
102542011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10255
10256 * gdbserver/server.h (Macro _): Define it if not available.
10257
102582011-03-14 Michael Snyder <msnyder@vmware.com>
10259
10260 * hostio.c (handle_close): Remove unnecessary null test.
10261
102622011-03-10 Joel Brobecker <brobecker@adacore.com>
10263
10264 * Makefile.in (maintainer-clean realclean distclean): Remove
10265 "make ... subdir_do" command.
10266
102672011-03-10 Michael Snyder <msnyder@vmware.com>
10268
10269 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10270
10271 * server.c (handle_v_run): Free alloced buffer on early return.
10272
102732011-03-09 Yao Qi <yao@codesourcery.com>
10274
10275 Revert:
10276 2011-03-04 Yao Qi <yao@codesourcery.com>
10277
10278 * Makefile.in: Remove GNU make feature --directory.
10279
10280 2011-03-05 Yao Qi <yao@codesourcery.com>
10281
10282 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10283 (subdir_do): New make target. Copied from gdb/Makefile.
10284 (maintainer-clean, realclean, distclean, clean): Call corresponding
10285 make targets in common/Makefile.
10286
10287 2011-02-11 Yao Qi <yao@codesourcery.com>
10288
10289 * configure.ac: Call AC_PROG_RANLIB.
10290 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10291 * configure: Regenerate.
10292
102932011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10294
10295 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10296
102972011-03-06 Yao Qi <yao@codesourcery.com>
10298
10299 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10300
103012011-03-05 Yao Qi <yao@codesourcery.com>
10302
10303 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10304 (subdir_do): New make target. Copied from gdb/Makefile.
10305 (maintainer-clean, realclean, distclean, clean): Call corresponding
10306 make targets in common/Makefile.
10307
103082011-03-04 Yao Qi <yao@codesourcery.com>
10309
10310 * Makefile.in: Remove GNU make feature --directory.
10311
103122011-03-04 Michael Snyder <msnyder@vmware.com>
10313
10314 * server.c (queue_stop_reply): Call xmalloc not malloc.
10315
103162011-03-02 Michael Snyder <msnyder@vmware.com>
10317
10318 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10319
103202011-02-28 Michael Snyder <msnyder@vmware.com>
10321
10322 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10323 (cmd_qtframe): Ditto.
10324 (cmd_qtbuffer): Ditto.
10325 (cmd_bigqtbuffer): Ditto.
10326
10327 * utils.c (decimal2str): Initialize 'width' to nine, then
10328 don't mess with it.
10329
103302011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10331
10332 * hostio.c (require_data): Free *data, not data.
10333
103342011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10335
10336 * hostio.c (require_data): Use free, not xfree.
10337
103382011-02-27 Michael Snyder <msnyder@vmware.com>
10339
10340 * server.c (handle_query): Discard unused value.
10341
10342 * hostio.c (require_data): Free malloc memory before returning
10343 error.
10344
103452011-02-26 Michael Snyder <msnyder@vmware.com>
10346
10347 * linux-low.c (list_threads): Call closedir for dirent.
10348
103492011-02-27 Michael Snyder <msnyder@vmware.com>
10350
10351 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10352 a case statement falls through.
10353
10354 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10355
10356 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10357 in comparison.
10358
103592011-02-26 Michael Snyder <msnyder@vmware.com>
10360
10361 * utils.c (decimal2str): Eliminate dead code and dead param.
10362 (pulongest): Drop dead param from call to decimal2str.
10363 (plongest): Ditto.
10364
103652011-02-24 Joel Brobecker <brobecker@adacore.com>
10366
10367 Revert the following patch (not approved yet):
10368 2011-02-21 Hui Zhu <teawater@gmail.com>
10369 * tracepoint.c (tp_printf): New function.
10370 (eval_agent_expr): Handle gdb_agent_op_printf.
10371
103722011-02-21 Hui Zhu <teawater@gmail.com>
10373
10374 * tracepoint.c (tp_printf): New function.
10375 (eval_agent_expr): Handle gdb_agent_op_printf.
10376
103772011-02-18 Tom Tromey <tromey@redhat.com>
10378
10379 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10380 (tracepoint.o): Likewise.
10381 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10382 (gdb_agent_op_names): Likewise.
10383
103842011-02-18 Tom Tromey <tromey@redhat.com>
10385
10386 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10387 gdb_agent_op_rot>: New constants.
10388 (gdb_agent_op_names): Add pick and roll.
10389 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10390 cases.
10391
103922011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10393
10394 * aclocal.m4: Regenerated with aclocal-1.11.1.
10395
103962011-02-14 Pedro Alves <pedro@codesourcery.com>
10397
10398 * server.c (handle_qxfer_traceframe_info): New.
10399 (qxfer_packets): Register "traceframe-info".
10400 (handle_query): Report support for qXfer:traceframe-info:read+.
10401 * tracepoint.c (match_blocktype): New.
10402 (traceframe_find_block_type): Rename to ...
10403 (traceframe_walk_blocks): ... this. Add callback filter argument,
10404 and use it.
10405 (traceframe_find_block_type): New, reimplemented on top of
10406 traceframe_walk_blocks.
10407 (build_traceframe_info_xml): New.
10408 (traceframe_read_info): New.
10409 * server.h (traceframe_read_info): Declare.
10410
104112011-02-11 Yao Qi <yao@codesourcery.com>
10412
10413 * configure.ac: Call AC_PROG_RANLIB.
10414 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10415 * configure: Regenerate.
10416
104172011-02-07 Pedro Alves <pedro@codesourcery.com>
10418
10419 * server.c (gdb_read_memory): Change return semantics to allow
10420 partial transfers.
10421 (handle_search_memory_1): Adjust.
10422 (process_serial_event) <'m' packet>: Handle partial transfers.
10423 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10424
104252011-01-28 Pedro Alves <pedro@codesourcery.com>
10426
10427 * regcache.c (init_register_cache): Initialize
10428 regcache->register_status.
10429 (free_register_cache): Release regcache->register_status.
10430 (regcache_cpy): Copy register_status.
10431 (registers_to_string): Print 'x's for unavailable registers.
10432 (supply_register): Mark the register's status valid or
10433 unavailable, depending on whether a buffer was passed in or not.
10434 (supply_register_zeroed): New.
10435 (supply_regblock): Mark the registers' status valid or
10436 unavailable, depending on whether a buffer was passed in or not.
10437 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10438 (struct regcache): New `register_status' field.
10439 (supply_register_zeroed): Declare.
10440 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10441 supply_register_zeroed, rather than passing a NULL buffer to
10442 supply_register.
10443 * tracepoint.c (fetch_traceframe_registers): Update comment.
10444
104452011-01-28 Pedro Alves <pedro@codesourcery.com>
10446
10447 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10448 buffer explicit.
10449
104502011-01-25 Pedro Alves <pedro@codesourcery.com>
10451
10452 * server.h (decode_xfer_write): Change prototype.
10453 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10454 and don't extract the annex here.
10455 * server.c (decode_xfer_read): Remove `annex' parameter,
10456 and don't extract the annex here.
10457 (decode_xfer): New.
10458 (struct qxfer): New.
10459 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10460 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10461 (handle_qxfer_statictrace): New functions, abstracted out from
10462 handle_query, and made to use the struct qxfer interface.
10463 (handle_threads_qxfer_proper): Rename to ...
10464 (handle_qxfer_threads_proper): ... this.
10465 (handle_threads_qxfer): Rename to ...
10466 (handle_qxfer_threads): ... this. Adjust.
10467 (qxfer_packets): New array.
10468 (handle_qxfer): New function.
10469 (handle_query): Use handle_qxfer.
10470
104712011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10472
10473 * gdbreplay.c: Shorten lines of >= 80 columns.
10474 * linux-low.c: Ditto.
10475 * linux-ppc-low.c: Ditto.
10476 * linux-s390-low.c: Ditto.
10477 * linux-sparc-low.c: Ditto.
10478 * linux-x86-low.c: Ditto.
10479 * linux-xtensa-low.c: Ditto.
10480 * mem-break.c: Ditto.
10481 * nto-low.c: Ditto.
10482 * regcache.h: Ditto.
10483 * remote-utils.c: Ditto.
10484 * server.c: Ditto.
10485 * server.h: Ditto.
10486 * thread-db.c: Ditto.
10487 * tracepoint.c: Ditto.
10488 * utils.c: Ditto.
10489 * win32-low.h: Ditto.
10490
104912011-01-05 Joel Brobecker <brobecker@adacore.com>
10492
10493 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10494 update.
10495
104962011-01-01 Joel Brobecker <brobecker@adacore.com>
10497
10498 * server.c (gdbserver_version): Update copyright year in version
10499 output.
10500 * gdbreplay.c (gdbreplay_version): Ditto.
10501
105022010-12-29 Jie Zhang <jie.zhang@analog.com>
10503
10504 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10505 * linux-bfin-low.c: New file.
10506 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10507 PT_DATA_ADDR for BFIN targets.
10508 * Makefile.in (SFILES): Add linux-bfin-low.c.
10509 (clean): Remove reg-bfin.c.
10510 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10511 * README: Mention supported Blackfin targets.
10512
105132010-12-23 Mike Frysinger <vapier@gentoo.org>
10514
10515 * .gitignore: New file.
10516
105172010-11-16 Mike Frysinger <vapier@gentoo.org>
10518
10519 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10520
105212010-10-22 Jie Zhang <jie@codesourcery.com>
10522
10523 * Makefile.in: Add FLAGS_TO_PASS variable.
10524 (install): Remove dependency of install-only and recursively
10525 invoke make for install-only.
10526
105272010-10-04 Doug Evans <dje@google.com>
10528
10529 * Makefile.in (uninstall): Use $(DESTDIR).
10530
105312010-09-24 Pedro Alves <pedro@codesourcery.com>
10532
10533 PR gdb/11842
10534
10535 * linux-x86-low.c (compat_siginfo_from_siginfo)
10536 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10537 si_code is < 0. Check for si_code == SI_TIMER before checking for
10538 si_code < 0.
10539
105402010-09-13 Joel Brobecker <brobecker@adacore.com>
10541
10542 * lynx-i386-low.c: New file.
10543 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10544
105452010-09-13 Joel Brobecker <brobecker@adacore.com>
10546
10547 * lynx-low.c (ptrace_request_to_str): Remove handling for
10548 request values that have been removed in LynxOS 5.x.
10549
105502010-09-13 Joel Brobecker <brobecker@adacore.com>
10551
10552 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10553 <ptrace.h>
10554
105552010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10556
10557 * configure.ac: Add --enable-inprocess-agent option.
10558 * configure: Rebuilt.
10559
105602010-09-06 Yao Qi <yao@codesourcery.com>
10561
10562 * linux-low.c (linux_kill): Remove unused variable.
10563 (linux_stabilize_threads): Likewise.
10564 * server.c (start_inferior): Likewise.
10565 (queue_stop_reply_callback): Likewise.
10566 * tracepoint.c (do_action_at_tracepoint): Likewise.
10567
105682010-09-06 Yao Qi <yao@codesourcery.com>
10569
10570 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10571 on return.
10572
105732010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10574
10575 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10576
105772010-09-06 Pedro Alves <pedro@codesourcery.com>
10578
10579 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10580 "$(IPA_DEPFILES)".
10581
105822010-09-01 Joel Brobecker <brobecker@adacore.com>
10583
10584 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10585 gdbserver/lynx-ppc-low.c: New files.
10586 * Makefile.in (lynx_low_h): New variable.
10587 (lynx-low.o, lynx-ppc-low.o): New rules.
10588 * configure.ac: On LynxOS, link with -lnetinet.
10589 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10590 * configure: regenerate.
10591
105922010-09-01 Joel Brobecker <brobecker@adacore.com>
10593
10594 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10595 * configure.ac: Add check for vasprintf and vsnprintf.
10596 * configure, config.in: Regenerate.
10597 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10598
105992010-09-01 Joel Brobecker <brobecker@adacore.com>
10600
10601 * gdbreplay.c: Move include of alloca.h up, next to include of
10602 malloc.h.
10603 * server.h: Add include of malloc.h.
10604 * mem-break.c: Remove include of malloc.h.
10605 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10606
106072010-09-01 Joel Brobecker <brobecker@adacore.com>
10608
10609 * Makefile.in (memmem.o): Build with -Wno-error.
10610
106112010-09-01 Joel Brobecker <brobecker@adacore.com>
10612
10613 * utils.c (xsnprintf): Make non-static.
10614 * server.h: Add xsnprintf declaration.
10615 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10616 replace calls to snprintf by calls to xsnprintf throughout.
10617
106182010-09-01 Joel Brobecker <brobecker@adacore.com>
10619
10620 * configure.ac: Add configure check for alloca.
10621 * configure, config.in: Regenerate.
10622 * server.h: Include alloca.h if it exists.
10623 * gdbreplay.c: Include alloca.h if it exists.
10624
106252010-08-28 Pedro Alves <pedro@codesourcery.com>
10626
10627 * linux-low.c (__SIGRTMIN): Define if not already defined.
10628 (linux_create_inferior): Check for __ANDROID__ rather than
10629 __SIGRTMIN.
10630 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10631 are already deferred.
10632 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10633 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10634 stopped and already has a pending signal to report.
10635 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10636 a pending signal to report or is moving out of a jump pad.
10637 (linux_init_signals): Check for __ANDROID__ rather than
10638 __SIGRTMIN.
10639
106402010-08-28 Pedro Alves <pedro@codesourcery.com>
10641
10642 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10643 debug_threads check. Avoid a linear search when not doing debug
10644 output.
10645
106462010-08-27 Pedro Alves <pedro@codesourcery.com>
10647
10648 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10649 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10650 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10651 (process_event): Change local fd's type to gdb_fildes_t.
10652 (create_file_handler): Adjust prototype.
10653 (delete_file_handler): Adjust prototype.
10654 (handle_file_event): Adjust prototype. Use pfildes.
10655 (create_file_event): Adjsut prototype.
10656 * remote-utils.c (remote_desc, listen_desc): Change type to
10657 gdb_fildes_t.
10658 * server.h: New gdb_fildes_t typedef.
10659 [USE_WIN32API]: Include winsock2.h.
10660 (delete_file_handler, add_file_handler): Adjust prototypes.
10661 (pfildes): Declare.
10662 * utils.c (pfildes): New.
10663
106642010-08-27 Pedro Alves <pedro@codesourcery.com>
10665
10666 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10667 * configure: Regenerate.
10668
106692010-08-27 Pedro Alves <pedro@codesourcery.com>
10670
10671 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10672 (linux_done_accessing_memory): ... this.
10673 (linux_target_ops): Adjust.
10674 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10675 * nto-low.c (nto_target_ops): Adjust comment.
10676 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10677 * spu-low.c (spu_target_ops): Adjust comment.
10678 * target.h (target_ops): Rename unprepare_to_access_memory field
10679 to done_accessing_memory.
10680 (unprepare_to_access_memory): Rename to ...
10681 (done_accessing_memory): ... this.
10682
106832010-08-26 Pedro Alves <pedro@codesourcery.com>
10684
10685 * linux-low.c (linux_prepare_to_access_memory): New.
10686 (linux_unprepare_to_access_memory): New.
10687 (linux_target_ops): Install them.
10688 * server.c (read_memory): Rename to ...
10689 (gdb_read_memory): ... this. Use
10690 prepare_to_access_memory/prepare_to_access_memory.
10691 (write_memory): Rename to ...
10692 (gdb_write_memory): ... this. Use
10693 prepare_to_access_memory/prepare_to_access_memory.
10694 (handle_search_memory_1): Adjust.
10695 (process_serial_event): Adjust.
10696 * target.h (struct target_ops): New fields
10697 prepare_to_access_memory and unprepare_to_access_memory.
10698 (prepare_to_access_memory, unprepare_to_access_memory): New.
10699 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10700 prepare_to_access_memory/prepare_to_access_memory.
10701 * nto-low.c (nto_target_ops): Adjust.
10702 * spu-low.c (spu_target_ops): Adjust.
10703 * win32-low.c (win32_target_ops): Adjust.
10704
107052010-08-26 Pedro Alves <pedro@codesourcery.com>
10706
10707 * Makefile.in (WARN_CFLAGS): Get it from configure.
10708 (WERROR_CFLAGS): New.
10709 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10710 * configure.ac: Introduce --enable-werror, which adds -Werror to
10711 the compiler command line. Enabled by default. Disable with
10712 --disable-werror. Add -Wdeclaration-after-statement
10713 Wpointer-arith and -Wformat-nonliteral to warning flags.
10714 * configure: Regenerate.
10715
107162010-08-26 Pedro Alves <pedro@codesourcery.com>
10717
10718 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10719
107202010-08-26 Pedro Alves <pedro@codesourcery.com>
10721
10722 * gdbreplay.c (remote_error): New.
10723 (gdbchar): New.
10724 (expect): Use gdbchar. Check for error reading from GDB.
10725 Clarify sync error output.
10726 (play): Check for errors writing to GDB.
10727 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10728 * remote-utils.c (getpkt): Check for errors writing to the remote
10729 descriptor.
10730
107312010-08-25 Pedro Alves <pedro@codesourcery.com>
10732
10733 * linux-low.c (linux_wait_1): Move non-debugging code out of
10734 `debug_threads' control.
10735
107362010-08-25 Pedro Alves <pedro@codesourcery.com>
10737
10738 * linux-low.c (linux_wait_1): Don't set last_status here.
10739 * server.c (push_event, queue_stop_reply_callback): Assert we're
10740 not pushing a TARGET_WAITKIND_IGNORE event.
10741 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10742 (myresume, handle_target_event): Set the thread's last_resume_kind
10743 and last_status from the target returned status.
10744
107452010-08-25 Pedro Alves <pedro@codesourcery.com>
10746
10747 PR threads/10729
10748
10749 * linux-x86-low.c (update_debug_registers_callback): New.
10750 (i386_dr_low_set_addr): Use it.
10751 (i386_dr_low_get_addr): New.
10752 (i386_dr_low_set_control): Use update_debug_registers_callback.
10753 (i386_dr_low_get_control): New.
10754 (i386_dr_low_get_status): Adjust.
10755 * linux-low.c (linux_stop_lwp): New.
10756 * linux-low.h (linux_stop_lwp): Declare.
10757
10758 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10759 argument instead of a i386_debug_reg_state.
10760 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10761 a i386_debug_reg_state.
10762 (i386_insert_aligned_watchpoint): Adjust.
10763 (i386_remove_aligned_watchpoint): Adjust.
10764 (i386_low_stopped_data_address): Read the debug registers from the
10765 inferior instead of from the mirrors.
10766 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10767 (i386_dr_low_get_addr): Declare.
10768 (i386_dr_low_get_control): Declare.
10769 (i386_dr_low_get_status): Change prototype.
10770
10771 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10772 (i386_dr_low_get_addr): New.
10773 (i386_dr_low_get_control): New.
10774 (i386_dr_low_get_status): Adjust prototype. Return
10775 dr_status_mirror.
10776 (i386_initial_stuff): Clear dr_status_mirror and
10777 dr_control_mirror.
10778 (i386_get_thread_context): Adjust.
10779 (i386_set_thread_context): Adjust.
10780 (i386_thread_added): Adjust.
10781
107822010-08-24 Pedro Alves <pedro@codesourcery.com>
10783
10784 * linux-low.h (linux_thread_area): Delete declaration.
10785
107862010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10787
10788 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10789 after its termination.
10790
107912010-08-09 Pedro Alves <pedro@codesourcery.com>
10792
10793 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10794 (gdb_wants_all_stopped): Delete.
10795 (linux_wait_1): Don't call them.
10796 * server.c (handle_v_cont): Tag all threads as want-stopped.
10797 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10798 stopped as "client-wants-stopped".
10799
108002010-07-31 Pedro Alves <pedro@codesourcery.com>
10801
10802 * Makefile.in (signals_h): New.
10803 (server_h): Depend on it.
10804 (server.o): Don't depend on $(signals_def).
10805 (signals.o): Depend on $(signals_def).
10806
108072010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10808
10809 * Makefile.in (signals_def): New.
10810 (server_h): Append include/gdb/signals.h and signals_def.
10811 (server.o): Append signals_def.
10812
108132010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10814
10815 * server.c (handle_target_event): Use target_signal_to_host for
10816 resume_info.sig initialization.
10817 * target.h (struct thread_resume) <sig>: New comment.
10818
108192010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10820
10821 * server.c (handle_query): strcpy() the returned string from paddress()
10822 instead of sprintf().
10823 * utils.c (paddress): Return phex_nz().
10824
108252010-07-07 Joel Brobecker <brobecker@adacore.com>
10826
10827 * server.c (handle_v_cont): Call mourn_inferior if process
10828 just exited.
10829 (myresume): Likewise.
10830
108312010-07-01 Pedro Alves <pedro@codesourcery.com>
10832
10833 Static tracepoints, and integration with UST.
10834
10835 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10836 * mem-break.c (uninsert_all_breakpoints)
10837 (reinsert_all_breakpoints): New.
10838 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10839 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10840 (gdb_agent_ust_loaded, helper_thread_id)
10841 (gdb_agent_helper_thread_id): New macros.
10842 (struct ipa_sym_addresses): Add addr_ust_loaded,
10843 addr_helper_thread_id, addr_cmd_buf.
10844 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10845 (in_process_agent_loaded_ust): New.
10846 (write_e_ust_not_loaded): New.
10847 (maybe_write_ipa_ust_not_loaded): New.
10848 (struct collect_static_trace_data_action): New.
10849 (enum tracepoint_type) <static_tracepoint>: New.
10850 (struct tracepoint) <handle>: Mention static tracepoints.
10851 (struct static_tracepoint_ctx): New.
10852 (CMD_BUF_SIZE): New.
10853 (add_tracepoint_action): Handle static tracepoint actions.
10854 (unprobe_marker_at): New.
10855 (clear_installed_tracepoints): Handle static tracepoints.
10856 (cmd_qtdp): Handle static tracepoints.
10857 (probe_marker_at): New.
10858 (cmd_qtstart): Handle static tracepoints.
10859 (response_tracepoint): Handle static tracepoints.
10860 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10861 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10862 (get_context_regcache): Handle static tracepoints.
10863 (do_action_at_tracepoint): Handle static tracepoint actions.
10864 (traceframe_find_block_type): Handle static trace data blocks.
10865 (traceframe_read_sdata): New.
10866 (download_tracepoints): Download static tracepoint actions.
10867 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10868 (GDB_PROBE_NAME): New.
10869 (ust_ops): New.
10870 (GET_UST_SYM): New.
10871 (USTF): New.
10872 (dlsym_ust): New.
10873 (ust_marker_to_static_tracepoint): New.
10874 (gdb_probe): New.
10875 (collect_ust_data_at_tracepoint): New.
10876 (gdb_ust_probe): New.
10877 (UNIX_PATH_MAX, SOCK_DIR): New.
10878 (gdb_ust_connect_sync_socket): New.
10879 (resume_thread, stop_thread): New.
10880 (run_inferior_command): New.
10881 (init_named_socket): New.
10882 (gdb_ust_socket_init): New.
10883 (cstr_to_hexstr): New.
10884 (next_st): New.
10885 (first_marker, next_marker): New.
10886 (response_ust_marker): New.
10887 (cmd_qtfstm, cmd_qtsstm): New.
10888 (unprobe_marker_at, probe_marker_at): New.
10889 (cmd_qtstmat, gdb_ust_thread): New.
10890 (gdb_ust_init): New.
10891 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10892 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10893 (ST_REGENTRY): New.
10894 (x86_64_st_collect_regmap): New.
10895 (X86_64_NUM_ST_COLLECT_GREGS): New.
10896 (AMD64_RIP_REGNUM): New.
10897 (supply_static_tracepoint_registers): New.
10898 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10899 (ST_REGENTRY): New.
10900 (i386_st_collect_regmap): New.
10901 (i386_NUM_ST_COLLECT_GREGS): New.
10902 (supply_static_tracepoint_registers): New.
10903 * server.c (handle_query): Handle qXfer:statictrace:read.
10904 <qSupported>: Report support for StaticTracepoints, and
10905 qXfer:statictrace:read features.
10906 * server.h (traceframe_read_sdata)
10907 (supply_static_tracepoint_registers): Declare.
10908 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10909 (unpack_varlen_hex): Include in IPA build.
10910 * Makefile.in (ustlibs, ustinc): New.
10911 (IPA_OBJS): Add remote-utils-ipa.o.
10912 ($(IPA_LIB)): Link -ldl and -lpthread.
10913 (UST_CFLAGS): New.
10914 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10915 * config.in, configure: Regenerate.
10916
109172010-06-20 Ian Lance Taylor <iant@google.com>
10918 Pedro Alves <pedro@codesourcery.com>
10919
10920 * linux-x86-low.c (always_true): Delete.
10921 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10922 trying to fool the compiler with always_true.
10923
109242010-06-20 Pedro Alves <pedro@codesourcery.com>
10925
10926 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10927 conditions in gdbserver.
10928
109292010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10930
10931 * spu-low.c (spu_read_memory): Wrap around local store limit.
10932 (spu_write_memory): Likewise.
10933
109342010-06-15 Pedro Alves <pedro@codesourcery.com>
10935
10936 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10937 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10938 LONGEST uses.
10939 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10940 uses.
10941 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10942 uses with LONGEST uses.
10943
109442010-06-14 Stan Shebs <stan@codesourcery.com>
10945 Pedro Alves <pedro@codesourcery.com>
10946
10947 Bytecode compiler.
10948
10949 * linux-x86-low.c: Include limits.h.
10950 (add_insns): New.
10951 (always_true): New.
10952 (EMIT_ASM): New.
10953 (EMIT_ASM32): New.
10954 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10955 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10956 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10957 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10958 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10959 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10960 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10961 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10962 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10963 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10964 (amd64_emit_void_call_2): New.
10965 (amd64_emit_ops): New.
10966 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10967 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10968 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10969 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10970 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10971 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10972 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10973 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10974 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10975 (i386_emit_stack_adjust, i386_emit_int_call_1)
10976 (i386_emit_void_call_2): New.
10977 (i386_emit_ops): New.
10978 (x86_emit_ops): New.
10979 (the_low_target): Install x86_emit_ops.
10980 * server.h (struct emit_ops): New.
10981 (get_raw_reg_func_addr): Declare.
10982 (current_insn_ptr, emit_error): Declare.
10983 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10984 (set_trace_state_variable_value): New defines.
10985 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10986 addr_get_trace_state_variable_value and
10987 addr_set_trace_state_variable_value.
10988 (symbol_list): New fields for get_raw_reg,
10989 get_trace_state_variable_value and set_trace_state_variable_value.
10990 (condfn): New typedef.
10991 (struct tracepoint): New field `compiled_cond'.
10992 (do_action_at_tracepoint): Clear compiled_cond.
10993 (get_trace_state_variable_value, set_trace_state_variable_value):
10994 Export in the IPA.
10995 (condition_true_at_tracepoint): If there's a compiled condition,
10996 run that.
10997 (current_insn_ptr, emit_error): New globals.
10998 (struct bytecode_address): New.
10999 (get_raw_reg_func_addr): New.
11000 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11001 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11002 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11003 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11004 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11005 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11006 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11007 (compile_tracepoint_condition, compile_bytecodes): New.
11008 * target.h (emit_ops): Forward declare.
11009 (struct target_ops): New field emit_ops.
11010 (target_emit_ops): New.
11011 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11012 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11013 * linux-low.c (linux_emit_ops): New.
11014 (linux_target_ops): Install it.
11015 * linux-low.h (struct linux_target_ops): New field emit_ops.
11016
110172010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11018
11019 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11020 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11021
110222010-06-01 Pedro Alves <pedro@codesourcery.com>
11023 Stan Shebs <stan@codesourcery.com>
11024
11025 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11026 (all): Depend on $(extra_libraries).
11027 (install-only): Install the IPA.
11028 (IPA_OBJS, IPA_LIB): New.
11029 (clean): Remove the IPA lib.
11030 (IPAGENT_CFLAGS): New.
11031 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11032 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11033 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11034 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11035 * configure.ac: Check for atomic builtins support in the compiler.
11036 (IPA_DEPFILES, extra_libraries): Define.
11037 * configure.srv (ipa_obj): Add description.
11038 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11039 (i[34567]86-*-linux*): Set ipa_obj.
11040 (x86_64-*-linux*): Set ipa_obj.
11041 * linux-low.c (stabilizing_threads): New.
11042 (supports_fast_tracepoints): New.
11043 (linux_detach): Stabilize threads before detaching.
11044 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11045 the lwp is either not stabilizing, or is moving out of a jump pad.
11046 (linux_fast_tracepoint_collecting): New.
11047 (maybe_move_out_of_jump_pad): New.
11048 (enqueue_one_deferred_signal): New.
11049 (dequeue_one_deferred_signal): New.
11050 (linux_wait_for_event_1): If moving out of a jump pad, defer
11051 pending signals to later.
11052 (linux_stabilize_threads): New.
11053 (linux_wait_1): Check if threads need moving out of jump pads, and
11054 do it if so.
11055 (stuck_in_jump_pad_callback): New.
11056 (move_out_of_jump_pad_callback): New.
11057 (lwp_running): New.
11058 (linux_resume_one_lwp): Handle moving out of jump pads.
11059 (linux_set_resume_request): Dequeue deferred signals.
11060 (need_step_over_p): Also step over fast tracepoint jumps.
11061 (start_step_over): Also uninsert fast tracepoint jumps.
11062 (finish_step_over): Also reinsert fast tracepoint jumps.
11063 (linux_install_fast_tracepoint_jump): New.
11064 (linux_target_ops): Install linux_stabilize_threads and
11065 linux_install_fast_tracepoint_jump_pad.
11066 * linux-low.h (linux_target_ops) <get_thread_area,
11067 install_fast_tracepoint_jump_pad>: New fields.
11068 (struct lwp_info) <collecting_fast_tracepoint,
11069 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11070 (linux_get_thread_area): Declare.
11071 * linux-x86-low.c (jump_insn): New.
11072 (x86_get_thread_area): New.
11073 (append_insns): New.
11074 (push_opcode): New.
11075 (amd64_install_fast_tracepoint_jump_pad): New.
11076 (i386_install_fast_tracepoint_jump_pad): New.
11077 (x86_install_fast_tracepoint_jump_pad): New.
11078 (the_low_target): Install x86_get_thread_area and
11079 x86_install_fast_tracepoint_jump_pad.
11080 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11081 (struct fast_tracepoint_jump): New.
11082 (fast_tracepoint_jump_insn): New.
11083 (fast_tracepoint_jump_shadow): New.
11084 (find_fast_tracepoint_jump_at): New.
11085 (fast_tracepoint_jump_here): New.
11086 (delete_fast_tracepoint_jump): New.
11087 (set_fast_tracepoint_jump): New.
11088 (uninsert_fast_tracepoint_jumps_at): New.
11089 (reinsert_fast_tracepoint_jumps_at): New.
11090 (set_breakpoint_at): Use write_inferior_memory.
11091 (uninsert_raw_breakpoint): Use write_inferior_memory.
11092 (check_mem_read): Mask out fast tracepoint jumps.
11093 (check_mem_write): Mask out fast tracepoint jumps.
11094 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11095 (set_fast_tracepoint_jump): Declare.
11096 (delete_fast_tracepoint_jump)
11097 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11098 (reinsert_fast_tracepoint_jumps_at): Declare.
11099 * regcache.c: Don't compile many functions when building the
11100 in-process agent library.
11101 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11102 the register buffer in the heap.
11103 (free_register_cache): If the register buffer isn't owned by the
11104 regcache, don't free it.
11105 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11106 pre-existing register caches.
11107 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11108 type.
11109 (convert_ascii_to_int): : Constify `from' parameter type.
11110 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11111 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11112 the needed buffer in-place.
11113 (relocate_instruction): New.
11114 * server.c (handle_query) <qSymbols>: If the target supports
11115 tracepoints, give it a chance of looking up symbols. Report
11116 support for fast tracepoints.
11117 (handle_status): Stabilize threads.
11118 (process_serial_event): Adjust.
11119 * server.h (struct fast_tracepoint_jump): Forward declare.
11120 (struct process_info) <fast_tracepoint_jumps>: New field.
11121 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11122 (decode_X_packet, decode_M_packet): Adjust.
11123 (relocate_instruction): Declare.
11124 (in_process_agent_loaded): Declare.
11125 (tracepoint_look_up_symbols): Declare.
11126 (struct fast_tpoint_collect_status): Declare.
11127 (fast_tracepoint_collecting): Declare.
11128 (force_unlock_trace_buffer): Declare.
11129 (handle_tracepoint_bkpts): Declare.
11130 (initialize_low_tracepoint)
11131 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11132 * target.h (struct target_ops) <stabilize_threads,
11133 install_fast_tracepoint_jump_pad>: New fields.
11134 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11135 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11136 [HAVE_STDINT_H]: Include stdint.h.
11137 (trace_debug_1): Rename to ...
11138 (trace_vdebug): ... this.
11139 (trace_debug): Rename to ...
11140 (trace_debug_1): ... this. Add `level' parameter.
11141 (trace_debug): New.
11142 (ATTR_USED, ATTR_NOINLINE): New.
11143 (IP_AGENT_EXPORT): New.
11144 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11145 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11146 (about_to_request_buffer_space, trace_buffer_is_full)
11147 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11148 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11149 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11150 (traceframe_write_count, traceframes_created)
11151 (trace_state_variables)
11152 New renaming defines.
11153 (struct ipa_sym_addresses): New.
11154 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11155 (symbol_list): New.
11156 (ipa_sym_addrs): New.
11157 (all_tracepoint_symbols_looked_up): New.
11158 (in_process_agent_loaded): New.
11159 (write_e_ipa_not_loaded): New.
11160 (maybe_write_ipa_not_loaded): New.
11161 (tracepoint_look_up_symbols): New.
11162 (debug_threads) [IN_PROCESS_AGENT]: New.
11163 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11164 (UNKNOWN_SIDE_EFFECTS): New.
11165 (stop_tracing): New.
11166 (flush_trace_buffer): New.
11167 (stop_tracing_bkpt): New.
11168 (flush_trace_buffer_bkpt): New.
11169 (read_inferior_integer): New.
11170 (read_inferior_uinteger): New.
11171 (read_inferior_data_pointer): New.
11172 (write_inferior_data_pointer): New.
11173 (write_inferior_integer): New.
11174 (write_inferior_uinteger): New.
11175 (struct collect_static_trace_data_action): Delete.
11176 (enum tracepoint_type): New.
11177 (struct tracepoint) <type>: New field `type'.
11178 <actions_str, step_actions, step_actions_str>: Only include in
11179 GDBserver.
11180 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11181 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11182 (tracepoints): Use IP_AGENT_EXPORT.
11183 (last_tracepoint): Don't include in the IPA.
11184 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11185 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11186 (alloced_trace_state_variables): New.
11187 (trace_state_variables): Use IP_AGENT_EXPORT.
11188 (traceframe_t): Delete unused variable.
11189 (circular_trace_buffer): Don't include in the IPA.
11190 (trace_buffer_start): Delete.
11191 (struct trace_buffer_control): New.
11192 (trace_buffer_free): Delete.
11193 (struct ipa_trace_buffer_control): New.
11194 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11195 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11196 New.
11197 (trace_buffer_ctrl): New.
11198 (TRACE_BUFFER_CTRL_CURR): New.
11199 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11200 Reimplement as macros.
11201 (trace_buffer_wrap): Delete.
11202 (traceframe_write_count, traceframe_read_count)
11203 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11204 (struct tracepoint_hit_ctx) <type>: New field.
11205 (struct fast_tracepoint_ctx): New.
11206 (memory_barrier): New.
11207 (cmpxchg): New.
11208 (record_tracepoint_error): Update atomically in the IPA.
11209 (clear_inferior_trace_buffer): New.
11210 (about_to_request_buffer_space): New.
11211 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11212 updating the same buffer.
11213 (add_tracepoint): Default the tracepoint's type to trap
11214 tracepoint, and orig_size to -1.
11215 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11216 internal variables.
11217 (create_trace_state_variable): New parameter `gdb'. Handle it.
11218 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11219 (cmd_qtdp): Handle fast tracepoints.
11220 (cmd_qtdv): Adjust.
11221 (max_jump_pad_size): New.
11222 (gdb_jump_pad_head): New.
11223 (get_jump_space_head): New.
11224 (claim_jump_space): New.
11225 (sort_tracepoints): New.
11226 (MAX_JUMP_SIZE): New.
11227 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11228 IPA.
11229 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11230 support. Upload fast traceframes, and delete internal IPA
11231 breakpoints.
11232 (stop_tracing_handler): New.
11233 (flush_trace_buffer_handler): New.
11234 (cmd_qtstop): Upload fast tracepoints.
11235 (response_tracepoint): Handle fast tracepoints.
11236 (tracepoint_finished_step): Upload fast traceframes. Set the
11237 tracepoint hit context's tracepoint type.
11238 (handle_tracepoint_bkpts): New.
11239 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11240 type. Add comment about fast tracepoints.
11241 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11242 non-existing action_str field.
11243 (get_context_regcache): Handle fast tracepoints.
11244 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11245 to the regcache.
11246 (fast_tracepoint_from_jump_pad_address): New.
11247 (fast_tracepoint_from_ipa_tpoint_address): New.
11248 (collecting_t): New.
11249 (force_unlock_trace_buffer): New.
11250 (fast_tracepoint_collecting): New.
11251 (collecting): New.
11252 (gdb_collect): New.
11253 (write_inferior_data_ptr): New.
11254 (target_tp_heap): New.
11255 (target_malloc): New.
11256 (download_agent_expr): New.
11257 (UALIGN): New.
11258 (download_tracepoints): New.
11259 (download_trace_state_variables): New.
11260 (upload_fast_traceframes): New.
11261 (IPA_FIRST_TRACEFRAME): New.
11262 (IPA_NEXT_TRACEFRAME_1): New.
11263 (IPA_NEXT_TRACEFRAME): New.
11264 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11265 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11266 (gdb_jump_pad_buffer_end): New.
11267 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11268 (initialize_tracepoint): Adjust.
11269 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11270 buffer. Initialize the low module.
11271 * utils.c (PREFIX, TOOLNAME): New.
11272 (malloc_failure): Use PREFIX.
11273 (error): In the IPA, an error causes an exit.
11274 (fatal, warning): Use PREFIX.
11275 (internal_error): Use TOOLNAME.
11276 (NUMCELLS): Increase to 10.
11277 * configure, config.in: Regenerate.
11278
112792010-06-01 Pedro Alves <pedro@codesourcery.com>
11280
11281 * server.c (handle_query) <qSupported>: Do two passes over the
11282 qSupported string to avoid nesting strtok.
11283
112842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11285
11286 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11287 (CDEPS): New.
11288 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11289 -Wl,--dynamic-list.
11290 * configure: Regenerate.
11291 * proc-service.list: New.
11292
112932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11294
11295 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11296 New comment.
11297
112982010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11299
11300 * gdbreplay.c (remote_open): Check error return from socket() call by
11301 its equality to -1 not by it being negative.
11302 * remote-utils.c (remote_open): Likewise.
11303
113042010-05-23 Pedro Alves <pedro@codesourcery.com>
11305
11306 * config.h: Regenerate.
11307
113082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11309
11310 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11311 doesn't provide PTRACE_GET_THREAD_AREA.
11312
113132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11314
11315 * linux-m68k-low.c: Include <asm/ptrace.h>
11316 (ps_get_thread_area): Implement.
11317
113182010-05-03 Doug Evans <dje@google.com>
11319
11320 * event-loop.c (struct callback_event): New struct.
11321 (callback_list): New global.
11322 (append_callback_event, delete_callback_event): New functions.
11323 (process_callback): New function.
11324 (start_event_loop): Call it.
11325 * remote-utils.c (NOT_SCHEDULED): Define.
11326 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11327 moved out of readchar.
11328 (readchar): Rewrite. Call reschedule before returning.
11329 (reset_readchar): New function.
11330 (remote_close): Call it.
11331 (process_remaining, reschedule): New functions.
11332 * server.h (callback_handler_func): New typedef.
11333 (append_callback_event, delete_callback_event): Declare.
11334
113352010-05-03 Pedro Alves <pedro@codesourcery.com>
11336
11337 * proc-service.c (ps_pglobal_lookup): Use
11338 thread_db_look_up_one_symbol.
11339 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11340 parameter. Use it instead of all_symbols_looked_up.
11341 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11342 field.
11343 (all_symbols_looked_up): Don't declare.
11344 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11345 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11346 field.
11347 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11348 Set all_symbols_looked_up here.
11349 (thread_db_look_up_one_symbol): New.
11350 (thread_db_get_tls_address): Adjust.
11351 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11352 thread_db object on the heap, and tentatively set it in the
11353 process structure.
11354 (thread_db_init): Don't set all_symbols_looked_up here.
11355 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11356
113572010-05-03 Pedro Alves <pedro@codesourcery.com>
11358
11359 * linux-low.c (linux_kill, linux_detach): Adjust.
11360 (status_pending_p_callback): Remove redundant statement. Check
11361 for !TARGET_WAITIKIND_IGNORE, instead of
11362 TARGET_WAITKIND_STOPPED.
11363 (handle_tracepoints): Make sure LWP is locked. Adjust.
11364 (linux_wait_for_event_1): Adjust.
11365 (linux_cancel_breakpoints): New.
11366 (unsuspend_one_lwp): New.
11367 (unsuspend_all_lwps): New.
11368 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11369 (send_sigstop_callback): Change return type to int, add new
11370 `except' parameter and handle it.
11371 (suspend_and_send_sigstop_callback): New.
11372 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11373 pass them down. If SUSPEND, also increment the lwp's suspend
11374 count.
11375 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11376 (need_step_over_p): Don't consider suspended LWPs.
11377 (start_step_over): Adjust.
11378 (proceed_one_lwp): Change return type to int, add new `except'
11379 parameter and handle it.
11380 (unsuspend_and_proceed_one_lwp): New.
11381 (proceed_all_lwps): Use find_inferior instead of
11382 for_each_inferior.
11383 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11384 also decrement the suspend count of LWPs. Pass `except' down,
11385 instead of hacking its suspend count.
11386 (linux_pause_all): Add `freeze' parameter. Adjust.
11387 (linux_unpause_all): New.
11388 (linux_target_ops): Install linux_unpause_all.
11389 * server.c (handle_status): Adjust.
11390 * target.h (struct target_ops): New fields `unpause_all' and
11391 `cancel_breakpoints'. Add new parameter to `pause_all'.
11392 (pause_all): Add new `freeze' parameter.
11393 (unpause_all): New.
11394 (cancel_breakpoints): New.
11395 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11396 cancel breakpoints.
11397 (cmd_qtstart): Pause threads.
11398 (stop_tracing): Pause threads, and cancel breakpoints.
11399 * win32-low.c (win32_target_ops): Adjust.
11400
114012010-05-03 Pedro Alves <pedro@codesourcery.com>
11402
11403 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11404 the inferior right away from here...
11405 (linux_wait_1): ... to here, and adjust to check the thread's
11406 last_resume_kind instead of the lwp's step or stop_expected flags.
11407
114082010-05-02 Pedro Alves <pedro@codesourcery.com>
11409
11410 * README: Use consistent `GDB' and `GDBserver' spellings.
11411
114122010-05-02 Pedro Alves <pedro@codesourcery.com>
11413
11414 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11415 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11416 (linux_detach_one_lwp): Assume the lwp is stopped.
11417 (any_thread_of): Delete.
11418 (linux_detach): Stop all lwps here. Don't blindly delete all
11419 breakpoints.
11420 (delete_lwp_callback): New.
11421 (linux_mourn): Delete all lwps of the process that is gone.
11422 (linux_wait_1): Don't delete the last lwp of the process here.
11423 * mem-break.h (mark_breakpoints_out): Declare.
11424 * mem-break.c (mark_breakpoints_out): New.
11425 (free_all_breakpoints): Use it.
11426 * server.c (handle_target_event): If the process is gone, mark
11427 breakpoints out.
11428 * thread-db.c (struct thread_db) <create_bp>: New field.
11429 (thread_db_enable_reporting): Fix prototype. Store a thread event
11430 breakpoint reference in the thread_db struct.
11431 (thread_db_load_search): Clear the thread_db object.
11432 (try_thread_db_load_1): Ditto.
11433 (switch_to_process): New.
11434 (disable_thread_event_reporting): Use it.
11435 (remove_thread_event_breakpoints): New.
11436 (thread_db_detach, thread_db_mourn): Use it.
11437
114382010-05-01 Pedro Alves <pedro@codesourcery.com>
11439
11440 * linux-low.c (linux_enable_event_reporting): New.
11441 (linux_wait_for_event_1, handle_extended_wait): Use it.
11442
114432010-04-30 Pedro Alves <pedro@codesourcery.com>
11444
11445 * linux-low.c (linux_kill_one_lwp, linux_kill)
11446 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11447 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11448 SIGSTOP even if the LWP is stopped.
11449 (send_sigstop_callback): New.
11450 (stop_all_lwps): Use send_sigstop_callback instead.
11451 (linux_resume_one_thread): Adjust.
11452 (proceed_one_lwp): Still proceed an LWP that the client has
11453 requested to stop, if we haven't reported it as stopped yet. Make
11454 sure that LWPs the client want stopped, have a pending SIGSTOP.
11455
114562010-04-26 Doug Evans <dje@google.com>
11457
11458 * server.c (handle_general_set): Make static.
11459
11460 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11461 Print received char after testing for error/eof instead of before.
11462 (input_interrupt): Tweak comment.
11463
114642010-04-23 Doug Evans <dje@google.com>
11465
11466 * server.c (start_inferior): Print inferior argv if --debug.
11467
114682010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11469
11470 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11471 * nto-x86-low.c: Include server.h
11472
114732010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11474
11475 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11476 be consistent with other sources of this directory.
11477 (init_registers_amd64): Correct name of source file of this function
11478 in the comment.
11479
114802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11481
11482 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11483 64-bit executables.
11484
114852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11486
11487 * win32-i386-low.c: Add 64-bit support.
11488 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11489 (init_registers_amd64): Declare.
11490 (mappings): Add 64-bit version of array.
11491 (init_windows_x86): New function.
11492 (the_low_target): Change init_arch field to init_windows_x86.
11493
114942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11495
11496 * win32-low.c: Adapt to support also 64-bit architecture.
11497 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11498 (get_image_name): Use SIZE_T type for local variable `done'.
11499 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11500 (toolhelp_get_dll_name): Idem.
11501 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11502 Use uintptr_t typecast to avoid warning.
11503 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11504 (handle_exception): Use phex_nz to avoid warning.
11505 (win32_wait): Remove unused local variable `process'.
11506
115072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11508
11509 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11510 `amd64-avx.o'.
11511
115122010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11513
11514 * configure.ac: Use `ws2_32' library for srv_mingw.
11515 * configure: Regenerate.
11516 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11517 * remote-utils.c: Likewise.
11518
115192010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11520
11521 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11522 if __x86_64__ is defined.
11523
115242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11525
11526 * configure: Regenerate.
11527
115282010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11529
11530 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11531 * target.h (target_ops): New get_tib_address field.
11532 * win32-low.h (win32_thread_info): Add thread_local_base field.
11533 * win32-low.c (child_add_thread): Add tlb argument.
11534 Set thread_local_base field to TLB.
11535 (get_child_debug_event): Adapt to child_add_thread change.
11536 (win32_get_tib_address): New function.
11537 (win32_target_ops): Set get_tib_address field to
11538 win32_get_tib_address.
11539 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11540
115412010-04-12 Pedro Alves <pedro@codesourcery.com>
11542
11543 * linux-low.c (linux_mourn): Also remove the process.
11544 * server.c (handle_target_event): Don't remove the process here.
11545 * nto-low.c (nto_mourn): New.
11546 (nto_target_ops): Install it.
11547 * spu-low.c (spu_mourn): New.
11548 (spu_target_ops): Install it.
11549 * win32-low.c (win32_mourn): New.
11550 (win32_target_ops): Install it.
11551
115522010-04-12 Pedro Alves <pedro@codesourcery.com>
11553
11554 * server.h (buffer_xml_printf): Remove redundant `;'.
11555
115562010-04-12 Pedro Alves <pedro@codesourcery.com>
11557
11558 * regcache.c (set_register_cache): Invalidate regcaches before
11559 changing the register cache layout.
11560 (regcache_invalidate_one): Allow a NULL regcache.
11561 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11562 regcaches before changing the register cache layout or the target
11563 regsets.
11564
115652010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11566
11567 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11568 variable warning on Linux/x86-64.
11569
115702010-04-11 Pedro Alves <pedro@codesourcery.com>
11571
11572 GDBserver disconnected tracing support.
11573
11574 * linux-low.c (linux_remove_process): Delete.
11575 (add_lwp): Don't set last_resume_kind here.
11576 (linux_kill): Use `mourn'.
11577 (linux_detach): Use `thread_db_detach', and `mourn'.
11578 (linux_mourn): New.
11579 (linux_attach_lwp_1): Adjust comment.
11580 (linux_attach): last_resume_kind moved the thread_info; adjust.
11581 (status_pending_p_callback): Adjust.
11582 (linux_wait_for_event_1): Adjust.
11583 (count_events_callback, select_singlestep_lwp_callback)
11584 (select_event_lwp_callback, cancel_breakpoints_callback)
11585 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11586 (proceed_one_lwp): Adjust.
11587 (linux_async): Add debug output.
11588 (linux_thread_stopped): New.
11589 (linux_pause_all): New.
11590 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11591 linux_pause_all.
11592 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11593 (thread_db_free): Delete declaration.
11594 (thread_db_detach, thread_db_mourn): Declare.
11595 * thread-db.c (thread_db_init): Use thread_db_mourn.
11596 (thread_db_free): Delete, split in two.
11597 (disable_thread_event_reporting): New.
11598 (thread_db_detach): New.
11599 (thread_db_mourn): New.
11600
11601 * server.h (struct thread_info) <last_resume_kind>: New field.
11602 <attached>: Add comment.
11603 <gdb_detached>: New field.
11604 (handler_func): Change return type to int.
11605 (handle_serial_event, handle_target_event): Ditto.
11606 (gdb_connected): Declare.
11607 (tracing): Delete.
11608 (disconnected_tracing): Declare.
11609 (stop_tracing): Declare.
11610
11611 * server.c (handle_query) <qSupported>: Report support for
11612 disconnected tracing.
11613 (queue_stop_reply_callback): Account for running threads.
11614 (gdb_wants_thread_stopped): New.
11615 (gdb_wants_all_threads_stopped): New.
11616 (gdb_reattached_process): New.
11617 (handle_status): Clear the `gdb_detached' flag of all processes.
11618 In all-stop, stop all threads.
11619 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11620 (process_serial_event): If the remote connection breaks, or if an
11621 exit was forced with "monitor exit", force an event loop exit.
11622 Handle disconnected tracing on detach.
11623 (handle_serial_event): Adjust.
11624 (handle_target_event): If GDB isn't connected, forward events back
11625 to the inferior, unless the last process exited, in which case,
11626 exit gdbserver. Adjust interface.
11627
11628 * remote-utils.c (remote_open): Don't block in accept. Instead
11629 register an event loop source on the listen socket file
11630 descriptor. Refactor bits into ...
11631 (listen_desc): ... this new global.
11632 (gdb_connected): ... this new function.
11633 (enable_async_notification): ... this new function.
11634 (handle_accept_event): ... this new function.
11635 (remote_close): Clear remote_desc.
11636
11637 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11638
11639 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11640 New fields.
11641 (mourn_inferior): Define.
11642 (target_process_qsupported): Avoid the dangling else problem.
11643 (thread_stopped): Define.
11644 (pause_all): Define.
11645 (target_waitstatus_to_string): Declare.
11646 * target.c (target_waitstatus_to_string): New.
11647
11648 * tracepoint.c (tracing): Make extern.
11649 (disconnected_tracing): New.
11650 (stop_tracing): Make extern. Handle tracing stops due to GDB
11651 disconnecting.
11652 (cmd_qtdisconnected): New.
11653 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11654 (handle_tracepoint_general_set): Handle QTDisconnected.
11655
11656 * event-loop.c (event_handler_func): Change return type to int.
11657 (process_event): Bail out if the event handler wants the event
11658 loop to stop.
11659 (handle_file_event): Ditto.
11660 (start_event_loop): Bail out if the event handler wants the event
11661 loop to stop.
11662
11663 * nto-low.c (nto_target_ops): Adjust.
11664 * spu-low.c (spu_wait): Don't remove the process here.
11665 (spu_target_ops): Adjust.
11666 * win32-low.c (win32_wait): Don't remove the process here.
11667 (win32_target_ops): Adjust.
11668
116692010-04-11 Pedro Alves <pedro@codesourcery.com>
11670
11671 * regcache.c (realloc_register_cache): Invalidate inferior's
11672 regcache before recreating it.
11673
116742010-04-09 Pedro Alves <pedro@codesourcery.com>
11675
11676 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11677
116782010-04-09 Stan Shebs <stan@codesourcery.com>
11679 Pedro Alves <pedro@codesourcery.com>
11680
11681 * server.h (LONGEST): New.
11682 (struct thread_info) <while_stepping>: New field.
11683 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11684 Declare.
11685 (initialize_tracepoint, handle_tracepoint_general_set)
11686 (handle_tracepoint_query, tracepoint_finished_step)
11687 (tracepoint_was_hit, release_while_stepping_state_list):
11688 (current_traceframe): Declare.
11689 * server.c (handle_general_set): Handle tracepoint packets.
11690 (read_memory): New.
11691 (write_memory): New.
11692 (handle_search_memory_1): Use read_memory.
11693 (handle_query): Report support for conditional tracepoints, trace
11694 state variables, and tracepoint sources. Handle tracepoint
11695 queries.
11696 (main): Initialize the tracepoints module.
11697 (process_serial_event): Handle traceframe reads/writes.
11698
11699 * linux-low.c (handle_tracepoints): New.
11700 (linux_wait_1): Call it.
11701 (linux_resume_one_lwp): Handle while-stepping.
11702 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11703 (linux_target_ops): Install them.
11704 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11705 New field.
11706 * linux-x86-low.c (x86_supports_tracepoints): New.
11707 (the_low_target). Install it.
11708
11709 * mem-break.h (delete_breakpoint): Declare.
11710 * mem-break.c (delete_breakpoint): Make external.
11711
11712 * target.h (struct target_ops): Add `supports_tracepoints',
11713 `read_pc', and `write_pc' fields.
11714 (target_supports_tracepoints): Define.
11715 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11716 (phex_nz): New.
11717
11718 * regcache.h (struct regcache) <registers_owned>: New field.
11719 (init_register_cache, regcache_cpy): Declare.
11720 (regcache_read_pc, regcache_write_pc): Declare.
11721 (register_cache_size): Declare.
11722 (supply_regblock): Declare.
11723 * regcache.c (init_register_cache): New.
11724 (new_register_cache): Use it.
11725 (regcache_cpy): New.
11726 (register_cache_size): New.
11727 (supply_regblock): New.
11728 (regcache_read_pc, regcache_write_pc): New.
11729
11730 * tracepoint.c: New.
11731
11732 * Makefile.in (OBS): Add tracepoint.o.
11733 (tracepoint.o): New rule.
11734
117352010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11736
11737 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11738 (i386-mmx.o): New.
11739 (i386-mmx.c): Likewise.
11740 (i386-mmx-linux.o): Likewise.
11741 (i386-mmx-linux.c): Likewise.
11742
11743 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11744 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11745 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11746 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11747
11748 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11749 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11750 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11751
117522010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11753
11754 * Makefile.in (clean): Updated.
11755 (i386-avx.o): New.
11756 (i386-avx.c): Likewise.
11757 (i386-avx-linux.o): Likewise.
11758 (i386-avx-linux.c): Likewise.
11759 (amd64-avx.o): Likewise.
11760 (amd64-avx.c): Likewise.
11761 (amd64-avx-linux.o): Likewise.
11762 (amd64-avx-linux.c): Likewise.
11763
11764 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11765 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11766 (srv_amd64_regobj): Add amd64-avx.o.
11767 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11768 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11769 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11770 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11771 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11772 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11773 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11774
11775 * i387-fp.c: Include "i386-xstate.h".
11776 (i387_xsave): New.
11777 (i387_cache_to_xsave): Likewise.
11778 (i387_xsave_to_cache): Likewise.
11779 (x86_xcr0): Likewise.
11780
11781 * i387-fp.h (i387_cache_to_xsave): Likewise.
11782 (i387_xsave_to_cache): Likewise.
11783 (x86_xcr0): Likewise.
11784
11785 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11786 * linux-crisv32-low.c (target_regsets): Likewise.
11787 * linux-m68k-low.c (target_regsets): Likewise.
11788 * linux-mips-low.c (target_regsets): Likewise.
11789 * linux-ppc-low.c (target_regsets): Likewise.
11790 * linux-s390-low.c (target_regsets): Likewise.
11791 * linux-sh-low.c (target_regsets): Likewise.
11792 * linux-sparc-low.c (target_regsets): Likewise.
11793 * linux-xtensa-low.c (target_regsets): Likewise.
11794
11795 * linux-low.c: Include <sys/uio.h>.
11796 (regsets_fetch_inferior_registers): Support nt_type.
11797 (regsets_store_inferior_registers): Likewise.
11798 (linux_process_qsupported): New.
11799 (linux_target_ops): Add linux_process_qsupported.
11800
11801 * linux-low.h (regset_info): Add nt_type.
11802 (linux_target_ops): Add process_qsupported.
11803
11804 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11805 and <sys/uio.h>.
11806 (init_registers_i386_avx_linux): New.
11807 (init_registers_amd64_avx_linux): Likewise.
11808 (xmltarget_i386_linux_no_xml): Likewise.
11809 (xmltarget_amd64_linux_no_xml): Likewise.
11810 (PTRACE_GETREGSET): Likewise.
11811 (PTRACE_SETREGSET): Likewise.
11812 (x86_fill_xstateregset): Likewise.
11813 (x86_store_xstateregset): Likewise.
11814 (use_xml): Likewise.
11815 (x86_linux_update_xmltarget): Likewise.
11816 (x86_linux_process_qsupported): Likewise.
11817 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11818 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11819 init_registers_i386_linux here. Call
11820 x86_linux_update_xmltarget.
11821 (the_low_target): Add x86_linux_process_qsupported.
11822
11823 * server.c (handle_query): Call target_process_qsupported.
11824
11825 * target.h (target_ops): Add process_qsupported.
11826 (target_process_qsupported): New.
11827
118282010-04-03 Pedro Alves <pedro@codesourcery.com>
11829
11830 * inferiors.c (add_thread): Set last_status kind to
11831 TARGET_WAITKIND_IGNORE.
11832 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11833 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11834 (linux_wait_1): Move `thread' local definition to block that uses
11835 it. Don't NULL initialize `event_child'.
11836 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11837 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11838 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11839
118402010-04-01 Pedro Alves <pedro@codesourcery.com>
11841
11842 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11843 an extended waitstatus, or by a watchpoint.
11844 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11845 thread was stepping or has been stopped by a watchpoint.
11846
118472010-04-01 Pedro Alves <pedro@codesourcery.com>
11848
11849 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11850 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11851 of another, then delete the previous, and validate all
11852 breakpoints.
11853 (validate_inserted_breakpoint): New.
11854 (delete_disabled_breakpoints): New.
11855 (validate_breakpoints): New.
11856 (check_mem_read): Validate breakpoints before trusting their
11857 shadow. Delete disabled breakpoints.
11858 (check_mem_write): Validate breakpoints before trusting they
11859 should be inserted. Delete disabled breakpoints.
11860 * mem-break.h (validate_breakpoints):
11861 * server.c (handle_query): Validate breakpoints when we see a
11862 qSymbol query.
11863
118642010-04-01 Pedro Alves <pedro@codesourcery.com>
11865
11866 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11867 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11868 if we could tell there's a GDB breakpoint at stop_pc.
11869 (need_step_over_p): Don't do a step over if we find a GDB
11870 breakpoint at the resume PC.
11871
11872 * mem-break.c (struct raw_breakpoint): New.
11873 (enum bkpt_type): New type `gdb_breakpoint'.
11874 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11875 fields. New field `raw'.
11876 (find_raw_breakpoint_at): New.
11877 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11878 breakpoint instead.
11879 (set_breakpoint_at): Adjust.
11880 (delete_raw_breakpoint): New.
11881 (release_breakpoint): New.
11882 (delete_breakpoint): Rename to...
11883 (delete_breakpoint_1): ... this. Add proc parameter. Use
11884 release_breakpoint. Return ENOENT.
11885 (delete_breakpoint): Reimplement.
11886 (find_breakpoint_at): Delete.
11887 (find_gdb_breakpoint_at): New.
11888 (delete_breakpoint_at): Delete.
11889 (set_gdb_breakpoint_at): New.
11890 (delete_gdb_breakpoint_at): New.
11891 (gdb_breakpoint_here): New.
11892 (set_reinsert_breakpoint): Use release_breakpoint.
11893 (uninsert_breakpoint): Rename to ...
11894 (uninsert_raw_breakpoint): ... this.
11895 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11896 (reinsert_raw_breakpoint): Change parameter type to
11897 raw_breakpoint.
11898 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11899 instead.
11900 (check_breakpoints): Adjust. Use release_breakpoint.
11901 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11902 (breakpoint_inserted_here): Ditto.
11903 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11904 Don't trust the breakpoint's shadow if it is not inserted.
11905 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11906 (delete_all_breakpoints): Adjust.
11907 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11908 use delete_breakpoint_1.
11909
11910 * mem-break.h (breakpoints_supported): Delete declaration.
11911 (set_gdb_breakpoint_at): Declare.
11912 (gdb_breakpoint_here): Declare.
11913 (delete_breakpoint_at): Delete.
11914 (delete_gdb_breakpoint_at): Declare.
11915
11916 * server.h (struct raw_breakpoint): Forward declare.
11917 (struct process_info): New field `raw_breakpoints'.
11918
11919 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11920 breakpoints.
11921
119222010-03-24 Pedro Alves <pedro@codesourcery.com>
11923
11924 * linux-low.c (status_pending_p_callback): Fix comment.
11925 (linux_wait_for_event_1): Move most of the internal breakpoint
11926 handling from here...
11927 (linux_wait_1): ... to here.
11928 (count_events_callback): New.
11929 (select_singlestep_lwp_callback): New.
11930 (select_event_lwp_callback): New.
11931 (cancel_breakpoints_callback): New.
11932 (select_event_lwp): New.
11933 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11934 priority to all LWPs that have had events that should be reported
11935 to the client. Cancel breakpoints when about to reporting the
11936 event to the client, not while stopping lwps. No longer cancel
11937 finished single-steps here.
11938 (cancel_finished_single_step): Delete.
11939 (cancel_finished_single_steps): Delete.
11940
119412010-03-24 Pedro Alves <pedro@codesourcery.com>
11942
11943 * mem-break.c (enum bkpt_type): New.
11944 (struct breakpoint): New field `type'.
11945 (set_breakpoint_at): Change return type to struct breakpoint
11946 pointer. Set type to `other_breakpoint' by default.
11947 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11948 in the breakpoint list.
11949 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11950 (reinsert_breakpoint): Rename to ...
11951 (reinsert_raw_breakpoint): ... this.
11952 (reinsert_breakpoints_at): Adjust.
11953 * mem-break.h (struct breakpoint): Declare.
11954 (set_breakpoint_at): Change return type to struct breakpoint
11955 pointer.
11956
119572010-03-24 Pedro Alves <pedro@codesourcery.com>
11958
11959 * server.c (handle_query): Assign, not compare.
11960
119612010-03-24 Pedro Alves <pedro@codesourcery.com>
11962
11963 Teach linux gdbserver to step-over-breakpoints.
11964
11965 * linux-low.c (can_hardware_single_step): New.
11966 (supports_breakpoints): New.
11967 (handle_extended_wait): If stopping threads, read the stop pc of
11968 the new cloned LWP.
11969 (get_pc): New.
11970 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11971 low target doesn't support retrieving the PC.
11972 (add_lwp): Set last_resume_kind to resume_continue.
11973 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11974 (linux_attach): Don't clear stop_expected. Set the lwp's
11975 last_resume_kind to resume_stop.
11976 (linux_detach_one_lwp): Don't check for removed breakpoints.
11977 (check_removed_breakpoint): Delete.
11978 (status_pending_p): Rename to ...
11979 (status_pending_p_callback): ... this. Don't check for removed
11980 breakpoints. Don't consider threads that are stopped from GDB's
11981 perspective.
11982 (linux_wait_for_lwp): Always read the stop_pc here.
11983 (cancel_breakpoint): New.
11984 (step_over_bkpt): New global.
11985 (linux_wait_for_event_1): Implement stepping over breakpoints.
11986 (gdb_wants_lwp_stopped): New.
11987 (gdb_wants_all_stopped): New.
11988 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11989 single-step traps here. Store the thread's last reported target
11990 wait status.
11991 (send_sigstop): Don't clear stop_expected. Always set it,
11992 instead.
11993 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11994 (cancel_finished_single_step): New.
11995 (cancel_finished_single_steps): New.
11996 (wait_for_sigstop): Don't cancel finished single-step traps here.
11997 (linux_resume_one_lwp): Don't check for removed breakpoints.
11998 Don't set `step' on non-hardware step archs.
11999 (linux_set_resume_request): Ignore resume_stop requests if already
12000 stopping or stopped. Set the lwp's last_resume_kind.
12001 (resume_status_pending_p): Don't check for removed breakpoints.
12002 (need_step_over_p): New.
12003 (start_step_over): New.
12004 (finish_step_over): New.
12005 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12006 requests. Clear the thread's last reported target waitstatus.
12007 Don't use the `suspended' flag. Don't consider pending breakpoints.
12008 (linux_resume): Start a step-over if necessary.
12009 (proceed_one_lwp): New.
12010 (proceed_all_lwps): New.
12011 (unstop_all_lwps): New.
12012 * linux-low.h (struct lwp_info): Rewrite comment for the
12013 `suspended' flag. Add the `stop_pc' field. Delete the
12014 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12015 Add `'last_resume_kind' and `need_step_over' fields.
12016 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12017 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12018 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12019 (set_raw_breakpoint_at): New.
12020 (set_breakpoint_at): Rewrite to use it.
12021 (reinsert_breakpoint_handler): Delete.
12022 (set_reinsert_breakpoint): New.
12023 (reinsert_breakpoint_by_bp): Delete.
12024 (delete_reinsert_breakpoints): New.
12025 (uninsert_breakpoint): Rewrite.
12026 (uninsert_breakpoints_at): New.
12027 (reinsert_breakpoint): Rewrite.
12028 (reinsert_breakpoints_at): New.
12029 (check_breakpoints): Rewrite.
12030 (breakpoint_here): New.
12031 (breakpoint_inserted_here): New.
12032 (check_mem_read): Adjust.
12033 * mem-break.h (breakpoints_supported, breakpoint_here)
12034 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12035 (reinsert_breakpoint_by_bp): Delete declaration.
12036 (delete_reinsert_breakpoints): Declare.
12037 (reinsert_breakpoint): Delete declaration.
12038 (reinsert_breakpoints_at): Declare.
12039 (uninsert_breakpoint): Delete declaration.
12040 (uninsert_breakpoints_at): Declare.
12041 (check_breakpoints): Adjust prototype.
12042 * server.h: Adjust include order.
12043 (struct thread_info): Declare here. Add a `last_status' field.
12044
120452010-03-23 Michael Snyder <msnyder@vmware.com>
12046
12047 * server.c (crc32): New function.
12048 (handle_query): Add handling for 'qCRC:' request.
12049
120502010-03-23 Pedro Alves <pedro@codesourcery.com>
12051
12052 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12053 lwp had been stopped by a watchpoint.
12054
120552010-03-16 Pedro Alves <pedro@codesourcery.com>
12056
12057 * server.h (internal_error): Declare.
12058 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12059 * utils.c (internal_error): New function.
12060
120612010-03-15 Andreas Schwab <schwab@redhat.com>
12062
12063 * configure.srv: Fix typo setting srv_regobj.
12064
120652010-03-15 Pedro Alves <pedro@codesourcery.com>
12066
12067 * linux-low.c (fetch_register): Avoid passing a non string literal
12068 format to `error'.
12069 (usr_store_inferior_registers): Ditto.
12070
120712010-03-14 Pedro Alves <pedro@codesourcery.com>
12072
12073 * linux-low.c (linux_write_memory): Bail out early if peeking
12074 memory failed.
12075
120762010-03-14 Pedro Alves <pedro@codesourcery.com>
12077
12078 * linux-low.h (struct lwp_info): New fields
12079 `stopped_by_watchpoint' and `stopped_data_address'.
12080 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12081 here, and cache them in the lwp object.
12082 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12083 directly.
12084 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12085 field.
12086 (linux_stopped_by_watchpoint): Rewrite.
12087 (linux_stopped_data_address): Rewrite.
12088
120892010-03-06 Simo Melenius <simo.melenius@iki.fi>
12090
12091 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12092 switching the current inferior, not before.
12093
120942010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12095
12096 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12097 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12098 i386-linux.c and amd64-linux.c.
12099 (reg-i386.o): Removed.
12100 (reg-i386.c): Likewise.
12101 (reg-i386-linux.o): Likewise.
12102 (reg-i386-linux.c): Likewise.
12103 (reg-x86-64.o): Likewise.
12104 (reg-x86-64.c): Likewise.
12105 (reg-x86-64-linux.o): Likewise.
12106 (reg-x86-64-linux.c): Likewise.
12107 (i386.o): New.
12108 (i386.c): Likewise.
12109 (i386-linux.o): Likewise.
12110 (i386-linux.c): Likewise.
12111 (amd64.o): Likewise.
12112 (amd64.c): Likewise.
12113 (amd64-linux.o): Likewise.
12114 (amd64-linux.c): Likewise.
12115
12116 * configure.srv (srv_i386_regobj): New.
12117 (srv_i386_linux_regobj): Likewise.
12118 (srv_amd64_regobj): Likewise.
12119 (srv_amd64_linux_regobj): Likewise.
12120 (srv_i386_32bit_xmlfiles): Likewise.
12121 (srv_i386_64bit_xmlfiles): Likewise.
12122 (srv_i386_xmlfiles): Likewise.
12123 (srv_amd64_xmlfiles): Likewise.
12124 (srv_i386_linux_xmlfiles): Likewise.
12125 (srv_amd64_linux_xmlfiles): Likewise.
12126 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12127 srv_xmlfiles to $srv_i386_xmlfiles.
12128 (i[34567]86-*-mingw32ce*): Likewise.
12129 (i[34567]86-*-mingw*): Likewise.
12130 (i[34567]86-*-nto*): Likewise.
12131 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12132 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12133 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12134 (x86_64-*-linux*): Likewise.
12135
12136 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12137 (init_registers_amd64_linux): New.
12138 (x86_arch_setup): Replace init_registers_x86_64_linux with
12139 init_registers_amd64_linux.
12140
121412010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12142
12143 * configure.ac: Check for libdl. If it is not available link against
12144 static libthread_db.
12145 * configure: Regenerate.
12146
121472010-02-22 Pedro Alves <pedro@codesourcery.com>
12148
12149 PR9605
12150
12151 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12152 handing a read watchpoint.
12153 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12154
121552010-02-12 Doug Evans <dje@google.com>
12156
12157 * linux-low.c (linux_supports_tracefork_flag): Document.
12158 (linux_look_up_symbols): Add comment.
12159
121602010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12161
12162 * regcache.c (supply_register): Clear regcache if buf is NULL.
12163
121642010-02-02 Nicolas Roche <roche@sourceware.org>
12165 Joel Brobecker <brobecker@adacore.com>
12166
12167 * inferiors.c (find_inferior): Add function documentation.
12168 (unloaded_dll): Handle the case where the unloaded dll has not
12169 been previously registered in the dll list.
12170
121712010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12172
12173 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12174 (thumb2_breakpoint): New.
12175 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12176
121772010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12180 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12181 breakpoints.
12182
121832010-01-21 Pedro Alves <pedro@codesourcery.com>
12184
12185 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12186
121872010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12188
12189 * linux-s390-low.c (s390_collect_ptrace_register)
12190 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12191
121922010-01-21 Doug Evans <dje@google.com>
12193
12194 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12195 (PTRACE_ARG4_TYPE): New macro.
12196 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12197 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12198 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12199 (usr_store_inferior_registers): Ditto.
12200 (linux_read_memory, linux_write_memory): Ditto.
12201 (linux_test_for_tracefork): Ditto.
12202
12203 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12204 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12205
122062010-01-21 Pedro Alves <pedro@codesourcery.com>
12207
12208 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12209 target.
12210
122112010-01-21 Pedro Alves <pedro@codesourcery.com>
12212
12213 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12214 prototype to take a regcache. Adjust.
12215
122162010-01-20 Pedro Alves <pedro@codesourcery.com>
12217
12218 * regcache.h (struct thread_info): Forward declare.
12219 (struct regcache): New.
12220 (new_register_cache): Adjust prototype.
12221 (get_thread_regcache): Declare.
12222 (free_register_cache): Adjust prototype.
12223 (registers_to_string, registers_from_string): Ditto.
12224 (supply_register, supply_register_by_name, collect_register)
12225 (collect_register_as_string, collect_register_by_name): Ditto.
12226 * regcache.c (struct inferior_regcache_data): Delete.
12227 (get_regcache): Rename to ...
12228 (get_thread_regcache): ... this. Adjust. Switch inferior before
12229 fetching registers.
12230 (regcache_invalidate_one): Adjust.
12231 (regcache_invalidate): Fix prototype.
12232 (new_register_cache): Return the new register cache.
12233 (free_register_cache): Change prototype.
12234 (realloc_register_cache): Adjust.
12235 (registers_to_string): Change prototype to take a regcache. Adjust.
12236 (registers_from_string): Ditto.
12237 (register_data): Ditto.
12238 (supply_register): Ditto.
12239 (supply_register_by_name): Ditto.
12240 (collect_register): Ditto.
12241 (collect_register_as_string): Ditto.
12242 (collect_register_by_name): Ditto.
12243 * server.c (process_serial_event): Adjust.
12244 * linux-low.h (regset_fill_func, regset_store_func): Change
12245 prototype.
12246 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12247 Change prototype.
12248 * linux-low.c (get_stop_pc): Adjust.
12249 (check_removed_breakpoint): Adjust.
12250 (linux_wait_for_event): Adjust.
12251 (linux_resume_one_lwp): Adjust.
12252 (fetch_register): Add regcache parameter. Adjust.
12253 (usr_store_inferior_registers): Ditto.
12254 (regsets_fetch_inferior_registers): Ditto.
12255 (regsets_store_inferior_registers): Ditto.
12256 (linux_fetch_registers, linux_store_registers): Ditto.
12257 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12258 regcache. Adjust.
12259 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12260 Ditto.
12261 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12262 prototype to take a regcache.
12263 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12264 * remote-utils.c (convert_ascii_to_int, outreg)
12265 (prepare_resume_reply): Change prototype to take a regcache.
12266 Adjust.
12267 * target.h (struct target_ops) <fetch_registers, store_registers>:
12268 Change prototype to take a regcache.
12269 (fetch_inferior_registers, store_inferior_registers): Change
12270 prototype to take a regcache. Adjust.
12271 * proc-service.c (ps_lgetregs): Adjust.
12272 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12273 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12274 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12275 take a regcache. Adjust.
12276 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12277 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12278 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12279 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12280 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12281 (cris_cannot_fetch_register):
12282 (cris_breakpoint_at): Change prototype to take a regcache.
12283 Adjust.
12284 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12285 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12286 to take a regcache. Adjust.
12287 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12288 Adjust.
12289 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12290 take a regcache. Adjust.
12291 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12292 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12293 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12294 * linux-mips-low.c (mips_get_pc):
12295 (mips_set_pc): Change prototype to take a regcache. Adjust.
12296 (mips_reinsert_addr): Adjust.
12297 (mips_collect_register): Change prototype to take a regcache.
12298 Adjust.
12299 (mips_supply_register):
12300 (mips_collect_register_32bit, mips_supply_register_32bit)
12301 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12302 (mips_store_fpregset): Ditto.
12303 * linux-ppc-low.c (ppc_supply_ptrace_register)
12304 (ppc_supply_ptrace_register): Ditto.
12305 (parse_spufs_run): Adjust.
12306 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12307 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12308 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12309 take a regcache. Adjust.
12310 * linux-s390-low.c (s390_collect_ptrace_register)
12311 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12312 (s390_set_pc): Change prototype to take a regcache. Adjust.
12313 (s390_arch_setup): Adjust.
12314 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12315 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12316 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12317 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12318 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12319 regcache. Adjust.
12320 (sparc_breakpoint_at): Adjust.
12321 * linux-xtensa-low.c (xtensa_fill_gregset):
12322 (xtensa_store_gregset):
12323 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12324 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12325 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12326 prototype to take a regcache. Adjust.
12327 * win32-arm-low.c (arm_fetch_inferior_register)
12328 (arm_store_inferior_register): Change prototype to take a
12329 regcache. Adjust.
12330 * win32-i386-low.c (i386_fetch_inferior_register)
12331 (i386_store_inferior_register): Change prototype to take a
12332 regcache. Adjust.
12333 * win32-low.c (child_fetch_inferior_registers)
12334 (child_store_inferior_registers): Change prototype to take a
12335 regcache. Adjust.
12336 (win32_wait): Adjust.
12337 (win32_fetch_inferior_registers): Change prototype to take a
12338 regcache. Adjust.
12339 (win32_store_inferior_registers): Adjust.
12340 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12341 store_inferior_register>: Change prototype to take a regcache.
12342
123432010-01-20 Doug Evans <dje@google.com>
12344
12345 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12346 #ifdef.
12347 (linux_wait_for_event1, linux_init_signals): Ditto.
12348 (W_STOPCODE): Provide definition if missing.
12349
123502010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12351
12352 * linux-low.c (linux_core_of_thread): New.
12353 (compare_ints, show_process, list_threads): New.
12354 (linux_qxfer_osdata): Report threads and cores.
12355 (linux_target_op): Register linux_core_of_thread.
12356 * remote-utils.c (prepare_resume_reply): Report the core.
12357 (buffer_xml_printf): Support %d specifier.
12358 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12359 New.
12360 (handle_query): Handle qXfer:threads. Announce availability
12361 thereof.
12362 * target.h (struct target_ops): New field core_of_thread.
12363
123642010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12365
12366 * Makefile.in (clean): Remove new generated files.
12367 (reg-s390.o, reg-s390.c): Remove rules.
12368 (reg-s390x.o, reg-s390x.c): Likewise.
12369 (s390-linux32.o, s390-linux32.c): Add rules.
12370 (s390-linux64.o, s390-linux64.c): Likewise.
12371 (s390x-linux64.o, s390x-linux64.c): Likewise.
12372 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12373 * linux-s390-low.c: Include <elf.h>.
12374 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12375 (init_registers_s390): Remove prototype.
12376 (init_registers_s390x): Likewise.
12377 (init_registers_s390_linux32): Add prototype.
12378 (init_registers_s390_linux64): Likewise.
12379 (init_registers_s390x_linux64): Likewise.
12380 (s390_num_regs_3264): New define.
12381 (s390_regmap_3264): New global variable.
12382 (s390_cannot_fetch_register): Remove obsolete check.
12383 (s390_cannot_store_register): Likewise.
12384 (s390_collect_ptrace_register): Handle upper/lower register halves.
12385 (s390_supply_ptrace_register): Likewise.
12386 (s390_fill_gregset): Update to register number changes.
12387 (s390_get_hwcap): New routine.
12388 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12389 Install appropriate regmap and register set.
12390
123912010-01-01 Joel Brobecker <brobecker@adacore.com>
12392
12393 * server.c (gdbserver_version): Update copyright year to 2010.
12394 * gdbreplay.c (gdbreplay_version): Likewise.
12395
123962009-12-28 Doug Evans <dje@google.com>
12397
12398 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12399 elf/external.h. Include <elf.h> instead but only if necessary.
12400
124012009-12-28 Pedro Alves <pedro@codesourcery.com>
12402
12403 * linux-low.c (linux_remove_process): Remove `detaching'
12404 parameter. Don't release/detach from thread_db here.
12405 (linux_kill): Release/detach from thread_db here, ...
12406 (linux_detach): ... and here, before actually detaching.
12407 (linux_wait_1): ... and here, when a process exits.
12408 * thread-db.c (any_thread_of): New.
12409 (thread_db_free): Switch the current inferior to a thread of the
12410 passed in process.
12411
124122009-12-21 Doug Evans <dje@google.com>
12413
12414 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12415
12416 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12417 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12418 warning ifndef __NR_tkill. Move setting of errno there too.
12419 Delete unnecessary resetting of errno after syscall.
12420 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12421
12422 * configure.ac: Check for dladdr.
12423 * config.in: Regenerate.
12424 * configure: Regenerate.
12425 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12426 (try_thread_db_load): Update.
12427
12428 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12429
124302009-12-18 Doug Evans <dje@google.com>
12431
12432 * event-loop.c: Include unistd.h if it exists.
12433
12434 * linux-low.c (my_waitpid): Move definition away from being in
12435 between linux_tracefork_child/linux_test_for_tracefork.
12436
12437 * gdb_proc_service.h (psaddr_t): Fix type.
12438 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12439 signature to match glibc.
12440
124412009-12-16 Doug Evans <dje@google.com>
12442
12443 * linux-low.c (linux_read_memory): Fix argument to read.
12444
124452009-11-26 Pedro Alves <pedro@codesourcery.com>
12446
12447 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12448 events, don't leave current_inferior pointing at null.
12449
124502009-11-26 Pedro Alves <pedro@codesourcery.com>
12451
12452 * win32-low.c (LOG): Delete.
12453 (OUTMSG): Output to stderr.
12454 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12455 on compile time LOG macro.
12456 (win32_wait): Fix debug output.
12457
124582009-11-26 Pedro Alves <pedro@codesourcery.com>
12459
12460 * win32-low.c (win32_add_one_solib): If the dll name is
12461 "ntdll.dll", prepend the system directory to the dll path.
12462
124632009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12464
12465 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12466
124672009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12468 Vladimir Prus <vladimir@codesourcery.com>
12469
12470 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12471 * configure.ac: Check for __mcoldfire__ and set
12472 gdb_cv_m68k_is_coldfire.
12473 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12474 reg-cf.o and reg-m68k.o.
12475 * configure: Regenerated.
12476
124772009-11-16 Pedro Alves <pedro@codesourcery.com>
12478
12479 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12480 Pass it to thread_db_free.
12481 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12482 proper `detaching' argument to linux_remove_process.
12483 * linux-low.h (thread_db_free): Add `detaching' parameter.
12484 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12485 to thread_db_free.
12486 (thread_db_free): Add `detaching' parameter. Only
12487 call td_ta_clear_event if detaching from process.
12488
124892009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12490
12491 * thread-db.c (thread_db_free): Fix typo.
12492
124932009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12494
12495 PR gdb/10838
12496 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12497
124982009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12499
12500 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12501 with an i686 compiler.
12502 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12503 needed.
12504 * configure: Rebuilt.
12505
125062009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12507
12508 PR gdb/10783
12509
12510 * server.c (handle_search_memory_1): Correct read_addr initialization
12511 in loop for searching subsequent chunks.
12512
125132009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12514
12515 * configure.ac: New --with-libthread-db option.
12516 * thread-db.c: Allow direct dependence on libthread_db.
12517 (thread_db_free): Adjust.
12518 * config.in: Regenerate.
12519 * configure: Likewise.
12520
125212009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12522
12523 PR gdb/10757
12524 * thread-db.c (attach_thread): New function.
12525 (maybe_attach_thread): Return success/failure.
12526 (find_new_threads_callback): Adjust.
12527 (thread_db_find_new_threads): Loop until no new threads.
12528
125292009-10-13 Pedro Alves <pedro@codesourcery.com>
12530
12531 * proc-service.c (ps_lgetregs): Formatting.
12532
125332009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12534
12535 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12536 * configure.ac: Adjust.
12537 * linux-low.h (struct process_info_private): Move members to struct
12538 thread_db.
12539 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12540 * linux-low.c (linux_remove_process): Adjust.
12541 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12542 * server.c (handle_query): Move code ...
12543 (handle_monitor_command): ... here. New function.
12544 * target.h (struct target_ops): New member.
12545 * thread-db.c (struct thread_db): New.
12546 (libthread_db_search_path): New variable.
12547 (thread_db_create_event, thread_db_enable_reporting)
12548 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12549 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12550 (try_thread_db_load_1, dladdr_to_soname): New functions.
12551 (try_thread_db_load, thread_db_load_search): New functions.
12552 (thread_db_init): Search for libthread_db.
12553 (thread_db_free): New function.
12554 (thread_db_handle_monitor_command): Likewise.
12555 * config.in: Regenerate.
12556 * configure: Regenerate.
12557
125582009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12559
12560 * spu-low.c (spu_kill): Wait for inferior to terminate.
12561 Call clear_inferiors.
12562 (spu_detach): Call clear_inferiors.
12563
125642009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12565
12566 * aclocal.m4: Regenerate.
12567 * config.in: Likewise.
12568 * configure: Likewise.
12569
125702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12571
12572 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12573 (parse_spufs_run): New function.
12574 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12575 (ppc_breakpoint_at): Handle SPU breakpoints.
12576
125772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12578
12579 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12580 (SPUFS_MAGIC): Define.
12581 (spu_enumerate_spu_ids): New function.
12582 (linux_qxfer_spu): New function.
12583 (linux_target_ops): Install linux_qxfer_spu.
12584
125852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12586
12587 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12588 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12589 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12590 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12591 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12592 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12593 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12594 (init_registers_powerpc_cell32l): Add prototype.
12595 (init_registers_powerpc_cell64l): Likewise.
12596 (ppc_arch_setup): Detect Cell/B.E. architecture.
12597
125982009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12599
12600 * Makefile.in (datarootdir): New variable.
12601
126022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12603
12604 * linux-low.c (linux_write_memory): Update debugging output.
12605 * Makefile.in (clean): Add new descriptions.
12606 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12607 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12608 * configure.srv: Add new files for arm*-*-linux*.
12609 * linux-arm-low.c: Add new declarations.
12610 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12611 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12612 (HWCAP_VFPv3D16): New.
12613 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12614 instead of __IWMMXT__.
12615 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12616 (arm_arch_setup): New.
12617 (target_regsets): Remove #ifdef. Add VFP regset.
12618 (the_low_target): Use arm_arch_setup.
12619
126202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12621
12622 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12623 the main thread again.
12624
126252009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12626
12627 Adding Neutrino gdbserver.
12628 * configure: Regenerated.
12629 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12630 * configure.srv (i[34567]86-*-nto*): New target.
12631 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12632 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12633 (nto_comctrl) [__QNX__]: New function.
12634 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12635
126362009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12637
12638 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12639 srv_tgtobj.
12640
126412009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12642 Pedro Alves <pedro@codesourcery.com>
12643
12644 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12645 don't support CONTEXT_EXTENDED_REGISTERS.
12646 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12647 (the_low_target): Install them.
12648 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12649 failing with ERROR_PIPE_NOT_CONNECTED.
12650
126512009-06-30 Doug Evans <dje@google.com>
12652 Pierre Muller <muller@ics.u-strasbg.fr>
12653
12654 Add h/w watchpoint support to x86-linux, win32-i386.
12655 * Makefile.in (SFILES): Add i386-low.c
12656 (i386_low_h): Define.
12657 (i386-low.o): Add dependencies.
12658 (linux-x86-low.o): Add i386-low.h dependency.
12659 (win32-i386-low.o): Ditto.
12660 * i386-low.c: New file.
12661 * i386-low.h: New file.
12662 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12663 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12664 * linux-low.c (linux_add_process): Initialize arch_private.
12665 (linux_remove_process): Free arch_private.
12666 (add_lwp): Initialize arch_private.
12667 (delete_lwp): Free arch_private.
12668 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12669 provided.
12670 * linux-low.h (process_info_private): New member arch_private.
12671 (lwp_info): New member arch_private.
12672 (linux_target_ops): New members new_process, new_thread,
12673 prepare_to_resume.
12674 (ptid_of): New macro.
12675 * linux-x86-low.c: Include stddef.h, i386-low.h.
12676 (arch_process_info): New struct.
12677 (arch_lwp_info): New struct.
12678 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12679 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12680 (i386_dr_low_get_status): New function.
12681 (x86_insert_point, x86_remove_point): New functions.
12682 (x86_stopped_by_watchpoint): New function.
12683 (x86_stopped_data_address): New function.
12684 (x86_linux_new_process, x86_linux_new_thread): New functions.
12685 (x86_linux_prepare_to_resume): New function.
12686 (the_low_target): Add entries for insert_point, remove_point,
12687 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12688 prepare_to_resume.
12689 * server.c (debug_hw_points): New global.
12690 (monitor_show_help): Document set debug-hw-points.
12691 (handle_query): Process "set debug-hw-points".
12692 * server.h (debug_hw_points): Declare.
12693 (paddress): Declare.
12694 * utils.c (NUMCELLS, CELLSIZE): New macros.
12695 (get_sell, xsnprintf, paddress): New functions.
12696 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12697 remove_point, stopped_by_watchpoint, stopped_data_address.
12698 * win32-i386-low.c: Include i386-low.h.
12699 (debug_reg_state): Replaces dr.
12700 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12701 (i386_dr_low_get_status): New function.
12702 (i386_insert_point, i386_remove_point): New functions.
12703 (i386_stopped_by_watchpoint): New function.
12704 (i386_stopped_data_address): New function.
12705 (i386_initial_stuff): Update.
12706 (get_thread_context,set_thread_context,i386_thread_added): Update.
12707 (the_low_target): Add entries for insert_point,
12708 remove_point, stopped_by_watchpoint, stopped_data_address.
12709 * win32-low.c (win32_insert_watchpoint): New function.
12710 (win32_remove_watchpoint): New function.
12711 (win32_stopped_by_watchpoint): New function.
12712 (win32_stopped_data_address): New function.
12713 (win32_target_ops): Add entries for insert_watchpoint,
12714 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12715 * win32-low.h (win32_target_ops): New members insert_point,
12716 remove_point, stopped_by_watchpoint, stopped_data_address.
12717
127182009-06-25 Pedro Alves <pedro@codesourcery.com>
12719
12720 * server.c (process_serial_event): Re-return unsupported, not
12721 error, if the type isn't recognized. Re-allow supporting only
12722 insert or remove packets. Also call require_running for
12723 breakpoints. Add missing break statement to default case. Tidy.
12724 * target.h (struct target_ops): Rename insert_watchpoint to
12725 insert_point, and remove_watchpoint to remove_point.
12726
12727 * linux-low.h (struct linux_target_ops): Likewise.
12728 * linux-low.c (linux_insert_watchpoint): Rename to ...
12729 (linux_insert_point): ... this. Adjust.
12730 (linux_remove_watchpoint): Rename to ...
12731 (linux_remove_point): ... this. Adjust.
12732 (linux_target_ops): Adjust.
12733 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12734 (cris_insert_point): ... this.
12735 (cris_remove_watchpoint): Rename to ...
12736 (cris_remove_point): ... this.
12737 (the_low_target): Adjust.
12738
127392009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12740
12741 * server.c (handle_v_kill): Pass signal_pid to
12742 kill_inferior if multi_process is zero.
12743
127442009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12745
12746 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12747 * target.h (target_ops): Comment for *_watchpoint to make it clear
12748 the functions can get types '0' and '1'.
12749
127502009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12751
12752 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12753 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12754 * regcache.c (get_regcache): Likewise.
12755 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12756 * win32-low.c (child_fetch_inferior_registers): Remove check for
12757 regno 0.
12758
127592009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12760 Pedro Alves <pedro@codesourcery.com>
12761
12762 * target.h (struct target_ops) <supports_multi_process>: New
12763 callback.
12764 (target_supports_multi_process): New.
12765 * server.c (handle_query): Even if GDB reports support, only
12766 enable multi-process if the target also supports it. Report
12767 multi-process support only if the target backend supports it.
12768 * linux-low.c (linux_supports_multi_process): New function.
12769 (linux_target_ops): Install it as target_supports_multi_process
12770 callback.
12771
127722009-05-24 Doug Evans <dje@google.com>
12773
12774 Global renaming of find_thread_pid to find_thread_ptid.
12775 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12776 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12777 All callers updated.
12778
12779 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12780 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12781 directly.
12782
12783 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12784 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12785 (linux_resume_one_lwp): Ditto.
12786
127872009-05-23 Doug Evans <dje@google.com>
12788
12789 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12790 from struct inferior_list_entry * to struct lwp_info *.
12791 All callers updated.
12792
127932009-05-13 Doug Evans <dje@google.com>
12794
12795 * linux-x86-low.c: Don't include assert.h.
12796 (x86_siginfo_fixup): Use fatal, not assert.
12797 (x86_arch_setup): Fix comment.
12798
127992009-05-12 Doug Evans <dje@google.com>
12800
12801 Biarch support for i386/amd64 gdbserver.
12802 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12803 Add linux-x86-low.c.
12804 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12805 (linux-x86-low.o): Add.
12806 * linux-x86-64-low.c: Delete.
12807 * linux-i386-low.c: Delete.
12808 * linux-x86-low.c: New file.
12809 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12810 linux-x86-low.o.
12811 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12812 linux-x86-low.o.
12813 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12814 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12815 (linux_child_pid_to_exec_file): New function.
12816 (elf_64_header_p, elf_64_file_p): New functions.
12817 (siginfo_fixup): New function.
12818 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12819 give target a chance to convert layout.
12820 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12821 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12822
128232009-05-07 Doug Evans <dje@google.com>
12824
12825 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12826 (regsets_store_inferior_registers): Ditto.
12827
128282009-05-06 Pedro Alves <pedro@codesourcery.com>
12829
12830 PR server/10048
12831
12832 * linux-low.c (must_set_ptrace_flags): Delete.
12833 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12834 of the global.
12835 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12836 `lwp->must_set_ptrace_flags' instead.
12837 (linux_wait_for_event_1): Set ptrace options here.
12838 (linux_wait_1): ... not here.
12839
128402009-04-30 Doug Evans <dje@google.com>
12841
12842 * inferiors.c (started_inferior_callback): New function.
12843 (attached_inferior_callback): New function.
12844 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12845 * server.c (print_started_pid, print_attached_pid): New functions.
12846 (detach_or_kill_for_exit): New function.
12847 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12848 * server.h (have_started_inferiors_p): Declare.
12849 (have_attached_inferiors_p): Declare.
12850
12851 * inferiors.c (remove_process): Fix memory leak, free process.
12852 * linux-low.c (linux_remove_process): New function.
12853 (linux_kill): Call it instead of remove_process.
12854 (linux_detach, linux_wait_1): Ditto.
12855
128562009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12857
12858 * configure.srv: Add x86 Windows CE target.
12859
128602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12861
12862 * inferiors.c (get_thread_process): Make global.
12863 * server.h (get_thread_process): Add prototype.
12864 * thread-db.c (find_one_thread): Use get_thread_process
12865 instead of current_process.
12866 (thread_db_get_tls_address): Do not crash if called when
12867 thread layer is not yet initialized.
12868
128692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12870
12871 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12872 * spu-low.c (current_tid): Rename to ...
12873 (current_ptid): ... this.
12874 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12875 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12876 ptid_get_lwp (current_ptid) instead of current_tid.
12877 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12878 instead of current_tid. Use find_process_pid to verify pid
12879 argument is valid. Pass proper argument to remove_process.
12880 (spu_thread_alive): Compare current_ptid instead of current_tid.
12881 (spu_resume): Likewise.
12882
128832009-04-02 Pedro Alves <pedro@codesourcery.com>
12884
12885 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12886 variable.
12887
128882009-04-01 Pedro Alves <pedro@codesourcery.com>
12889
12890 Implement the multiprocess extensions, and add linux multiprocess
12891 support.
12892
12893 * server.h (ULONGEST): Declare.
12894 (struct ptid, ptid_t): New.
12895 (minus_one_ptid, null_ptid): Declare.
12896 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12897 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12898 (struct inferior_list_entry): Change `id' type from unsigned from
12899 to ptid_t.
12900 (struct sym_cache, struct breakpoint, struct
12901 process_info_private): Forward declare.
12902 (struct process_info): Declare.
12903 (current_process): Declare.
12904 (all_processes): Declare.
12905 (initialize_inferiors): Declare.
12906 (add_thread): Adjust to use ptid_t.
12907 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12908 (add_process, remove_process, find_thread_pid): Declare.
12909 (find_inferior_id): Adjust to use ptid_t.
12910 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12911 (multi_process): Declare.
12912 (push_event): Adjust to use ptid_t.
12913 (read_ptid, write_ptid): Declare.
12914 (prepare_resume_reply): Adjust to use ptid_t.
12915 (clear_symbol_cache): Declare.
12916 * inferiors.c (all_processes): New.
12917 (null_ptid, minus_one_ptid): New.
12918 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12919 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12920 (add_thread): Change unsigned long to ptid. Remove gdb_id
12921 parameter. Adjust.
12922 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12923 (gdb_id_to_thread): Rename to ...
12924 (find_thread_pid): ... this. Change unsigned long to ptid.
12925 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12926 (loaded_dll, pull_pid_from_list): Adjust.
12927 (add_process, remove_process, find_process_pid)
12928 (get_thread_process, current_process, initialize_inferiors): New.
12929 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12930 (struct target_waitstatus) <related_pid>: Ditto.
12931 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12932 return type to int.
12933 (struct target_ops) <join>: Add `pid' argument.
12934 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12935 (struct target_ops) <wait>: Add `ptid' field. Change return type
12936 to ptid.
12937 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12938 (mywait): Add `ptid' argument. Change return type to ptid_t.
12939 (target_pid_to_str): Declare.
12940 * target.c (set_desired_inferior): Adjust to use ptids.
12941 (mywait): Add new `ptid' argument. Adjust.
12942 (target_pid_to_str): New.
12943 * mem-break.h (free_all_breakpoints): Declare.
12944 * mem-break.c (breakpoints): Delelete.
12945 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12946 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12947 to use per-process breakpoint list.
12948 (free_all_breakpoints): New.
12949 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12950 (symbol_cache, all_symbols_looked_up): Delete.
12951 (hexchars): New.
12952 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12953 read_ptid): New.
12954 (prepare_resume_reply): Change ptid argument's type from unsigned
12955 long to ptid_t. Adjust. Implement W;process and X;process.
12956 (free_sym_cache, clear_symbol_cache): New.
12957 (look_up_one_symbol): Adjust to per-process symbol cache. *
12958 * server.c (cont_thread, general_thread, step_thread): Change type
12959 to ptid_t.
12960 (attached): Delete.
12961 (multi_process): New.
12962 (last_ptid): Change type to ptid_t.
12963 (struct vstop_notif) <ptid>: Change type to ptid_t.
12964 (queue_stop_reply, push_event): Change `ptid' argument's type to
12965 ptid_t.
12966 (discard_queued_stop_replies): Add `pid' argument.
12967 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12968 changes. Don't reference the `attached' global.
12969 (attach_inferior): Adjust to mywait interface changes.
12970 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12971 features. Handle and report "multiprocess+". Handle
12972 "qAttached:PID".
12973 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12974 changes.
12975 (handle_v_kill): New.
12976 (handle_v_stopped): Adjust to use target_pid_to_str.
12977 (handle_v_requests): Allow multiple attaches and runs when
12978 multiprocess extensions are in effect. Handle "vKill".
12979 (myresume): Adjust to use ptids.
12980 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12981 (handle_status): Adjust to discard_queued_stop_replies interface
12982 change.
12983 (first_thread_of, kill_inferior_callback)
12984 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12985 (main): Call initialize_inferiors. Adjust to use ptids, killing
12986 and detaching from all inferiors. Handle multiprocess packet
12987 variants.
12988 * linux-low.h: Include gdb_proc_service.h.
12989 (struct process_info_private): New.
12990 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12991 <lwpid_of>: Use ptid_get_lwp.
12992 (get_lwp_thread): Adjust.
12993 (struct lwp_info): Add `dead' member.
12994 (find_lwp_pid): Declare.
12995 * linux-low.c (thread_db_active): Delete.
12996 (new_inferior): Adjust comment.
12997 (inferior_pid): Delete.
12998 (linux_add_process): New.
12999 (handle_extended_wait): Adjust.
13000 (add_lwp): Change unsigned long to ptid.
13001 (linux_create_inferior): Add process to processes table. Adjust
13002 to use ptids. Don't set new_inferior here.
13003 (linux_attach_lwp): Rename to ...
13004 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13005 it. Adjust to use ptids.
13006 (linux_attach_lwp): New.
13007 (linux_attach): Add process to processes table. Don't set
13008 new_inferior here.
13009 (struct counter): New.
13010 (second_thread_of_pid_p, last_thread_of_process_p): New.
13011 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13012 multiple processes.
13013 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13014 processes. Remove process from process table.
13015 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13016 to multiple processes.
13017 (any_thread_of): New.
13018 (linux_detach): Add `pid' argument, and handle it. Remove process
13019 from processes table.
13020 (linux_join): Add `pid' argument. Handle it.
13021 (linux_thread_alive): Change unsighed long argument to ptid_t.
13022 Consider dead lwps as not being alive.
13023 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13024 threads we're not interested in.
13025 (same_lwp, find_lwp_pid): New.
13026 (linux_wait_for_lwp): Change `pid' argument's type from int to
13027 ptid_t. Adjust.
13028 (linux_wait_for_event): Rename to ...
13029 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13030 from int to ptid_t. Adjust.
13031 (linux_wait_for_event): New.
13032 (linux_wait_1): Add `ptid' argument. Change return type to
13033 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13034 that exit from the process table.
13035 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13036 Adjust.
13037 (mark_lwp_dead): New.
13038 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13039 stopping all threads, mark its main lwp as dead.
13040 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13041 ptids.
13042 (fetch_register, usr_store_inferior_registers)
13043 (regsets_fetch_inferior_registers)
13044 (regsets_store_inferior_registers, linux_read_memory)
13045 (linux_write_memory): Inline `inferior_pid'.
13046 (linux_look_up_symbols): Adjust to use per-process
13047 `thread_db_active'.
13048 (linux_request_interrupt): Adjust to use ptids.
13049 (linux_read_auxv): Inline `inferior_pid'.
13050 (initialize_low): Don't reference thread_db_active.
13051 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13052 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13053 (ps_getpid): Return the pid of the current inferior.
13054 * thread-db.c (proc_handle, thread_agent): Delete.
13055 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13056 per-process data.
13057 (find_one_thread): Change argument type to ptid_t. Adjust to
13058 per-process data.
13059 (maybe_attach_thread): Adjust to per-process data and ptids.
13060 (thread_db_find_new_threads): Ditto.
13061 (thread_db_init): Ditto.
13062 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13063 processes table. Adjust to use ptids.
13064 (spu_kill, spu_detach): Adjust interface. Remove process from
13065 processes table.
13066 (spu_join, spu_thread_alive): Adjust interface.
13067 (spu_wait): Adjust interface. Remove process from processes
13068 table. Adjust to use ptids.
13069 * win32-low.c (current_inferior_tid): Delete.
13070 (current_inferior_ptid): New.
13071 (debug_event_ptid): New.
13072 (thread_rec): Take a ptid. Adjust.
13073 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13074 (child_delete_thread): Ditto.
13075 (do_initial_child_stuff): Add `attached' argument. Add process to
13076 processes table.
13077 (child_fetch_inferior_registers, child_store_inferior_registers):
13078 Adjust.
13079 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13080 (win32_attach): Pass 1 to do_initial_child_stuff.
13081 (win32_kill): Adjust interface. Remove process from processes
13082 table.
13083 (win32_detach): Ditto.
13084 (win32_join): Adjust interface.
13085 (win32_thread_alive): Take a ptid.
13086 (win32_resume): Adjust to use ptids.
13087 (get_child_debug_event): Ditto.
13088 (win32_wait): Adjust interface. Remove exiting process from
13089 processes table.
13090
130912009-04-01 Pedro Alves <pedro@codesourcery.com>
13092
13093 Non-stop mode support.
13094
13095 * server.h (non_stop): Declare.
13096 (gdb_client_data, handler_func): Declare.
13097 (delete_file_handler, add_file_handler, start_event_loop):
13098 Declare.
13099 (handle_serial_event, handle_target_event, push_event)
13100 (putpkt_notif): Declare.
13101 * target.h (enum resume_kind): New.
13102 (struct thread_resume): Replace `step' field by `kind' field.
13103 (TARGET_WNOHANG): Define.
13104 (struct target_ops) <wait>: Add `options' argument.
13105 <supports_non_stop, async, start_non_stop>: New fields.
13106 (target_supports_non_stop, target_async): New.
13107 (start_non_stop): Declare.
13108 (mywait): Add `options' argument.
13109 * target.c (mywait): Add `options' argument. Print child exit
13110 notifications here.
13111 (start_non_stop): New.
13112 * server.c (non_stop, own_buf, mem_buf): New globals.
13113 (struct vstop_notif): New.
13114 (notif_queue): New global.
13115 (queue_stop_reply, push_event, discard_queued_stop_replies)
13116 (send_next_stop_reply): New.
13117 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13118 interface changes.
13119 (attach_inferior): In non-stop mode, don't wait for the target
13120 here.
13121 (handle_general_set): Handle QNonStop.
13122 (handle_query): When handling qC, return the current general
13123 thread, instead of the first thread of the list.
13124 (handle_query): If the backend supports non-stop mode, include
13125 QNonStop+ in the qSupported query response.
13126 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13127 and non-stop mode.
13128 (handle_v_attach, handle_v_run): Handle non-stop mode.
13129 (handle_v_stopped): New.
13130 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13131 (myresume): Adjust to use resume_kind. Handle non-stop.
13132 (queue_stop_reply_callback): New.
13133 (handle_status): Handle non-stop mode.
13134 (main): Clear non_stop flag on reconnection. Use the event-loop.
13135 Refactor serial protocol handling from here ...
13136 (process_serial_event): ... to this new function. When GDB
13137 selects any thread, select one here. In non-stop mode, wait until
13138 GDB acks all pending events before exiting.
13139 (handle_serial_event, handle_target_event): New.
13140 * remote-utils.c (remote_open): Install remote_desc in the event
13141 loop.
13142 (remote_close): Remove remote_desc from the event loop.
13143 (putpkt_binary): Rename to...
13144 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13145 (putpkt_binary): New as wrapper around putpkt_binary_1.
13146 (putpkt_notif): New.
13147 (prepare_resume_reply): In non-stop mode, don't change the
13148 general_thread.
13149 * event-loop.c: New.
13150 * Makefile.in (OBJ): Add event-loop.o.
13151 (event-loop.o): New rule.
13152
13153 * linux-low.h (pid_of): Moved here.
13154 (lwpid_of): New.
13155 (get_lwp_thread): Use lwpid_of.
13156 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13157 * linux-low.c (pid_of): Delete.
13158 (inferior_pid): Use lwpid_of.
13159 (linux_event_pipe): New.
13160 (target_is_async_p): New.
13161 (delete_lwp): New.
13162 (handle_extended_wait): Use lwpid_of.
13163 (add_lwp): Don't set lwpid field.
13164 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13165 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13166 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13167 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13168 first. Adjust to linux_wait_for_event interface changes. Use
13169 lwpid_of.
13170 (linux_detach): Don't delete the main lwp here.
13171 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13172 (status_pending_p): Don't consider explicitly suspended lwps.
13173 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13174 pointer. Add OPTIONS argument. Change return type to int. Use
13175 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13176 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13177 pointer. Add status pointer argument. Return a pid instead of a
13178 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13179 changes. In non-stop mode, don't switch to a random thread.
13180 (linux_wait): Rename to...
13181 (linux_wait_1): ... this. Add target_options argument, and handle
13182 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13183 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13184 clean exit and signal exit code. Don't stop all threads in
13185 non-stop mode. In all-stop mode, only stop all threads when
13186 reporting a stop to GDB. Handle explicit thread stop requests.
13187 (async_file_flush, async_file_mark): New.
13188 (linux_wait): New.
13189 (send_sigstop): Use lwpid_of.
13190 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13191 interface changes. In non-stop mode, don't switch to a random
13192 thread.
13193 (linux_resume_one_lwp): Use lwpid_of.
13194 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13195 (linux_resume_one_thread): ... this. Handle resume_stop. In
13196 non-stop mode, don't look for pending flag in all threads.
13197 (resume_status_pending_p): Don't consider explicitly suspended
13198 threads.
13199 (my_waitpid): Reimplement. Emulate __WALL.
13200 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13201 Use lwpid_of.
13202 (sigchld_handler, linux_supports_non_stop, linux_async)
13203 (linux_start_non_stop): New.
13204 (linux_target_ops): Register linux_supports_non_stop, linux_async
13205 and linux_start_non_stop.
13206 (initialize_low): Install SIGCHLD handler.
13207 * thread-db.c (thread_db_create_event, find_one_thread)
13208 (thread_db_get_tls_address): Use lwpid_of.
13209 * win32-low.c (win32_detach): Adjust to use resume_kind.
13210 (win32_wait): Add `options' argument.
13211 * spu-low.c (spu_resume): Adjust to use resume_kind.
13212 (spu_wait): Add `options' argument.
13213
132142009-04-01 Pedro Alves <pedro@codesourcery.com>
13215
13216 Decouple target code from remote protocol.
13217
13218 * target.h (enum target_waitkind): New.
13219 (struct target_waitstatus): New.
13220 (struct target_ops) <wait>: Return an unsigned long. Take a
13221 target_waitstatus pointer instead of a char pointer.
13222 (mywait): Likewise.
13223 * target.c (mywait): Change prototype to return an unsigned long.
13224 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13225 * server.h (thread_from_wait, old_thread_from_wait): Delete
13226 declarations.
13227 (prepare_resume_reply): Change prototype to take a
13228 target_waitstatus.
13229 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13230 (last_status, last_ptid): New.
13231 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13232 pid instead of a signal.
13233 (attach_inferior): Remove "status" and "signal" parameters.
13234 Adjust.
13235 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13236 not as an address.
13237 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13238 (handle_v_requests, myresume): Remove "status" and "signal"
13239 parameters. Adjust.
13240 (handle_status): New.
13241 (main): Delete local `status'. Adjust.
13242 * remote-utils.c: Include target.h.
13243 (prepare_resume_reply): Change prototype to take a
13244 target_waitstatus. Adjust.
13245
13246 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13247 interface.
13248 * spu-low.c (spu_wait): Adjust.
13249 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13250 Delete.
13251 (win32_wait): Adjust.
13252
132532009-04-01 Pedro Alves <pedro@codesourcery.com>
13254
13255 * target.h (struct thread_resume): Delete leave_stopped member.
13256 (struct target_ops): Add a `n' argument to the `resume' callback.
13257 * server.c (start_inferior): Adjust.
13258 (handle_v_cont, myresume): Adjust.
13259 * linux-low.c (check_removed_breakpoint): Adjust to resume
13260 interface change, and to removed leave_stopped field.
13261 (resume_ptr): Delete.
13262 (struct thread_resume_array): New.
13263 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13264 resume interface change.
13265 (linux_continue_one_thread, linux_queue_one_thread)
13266 (resume_status_pending_p): Check if the resume field is NULL
13267 instead of checking the leave_stopped member.
13268 (linux_resume): Adjust to the target resume interface change.
13269 * spu-low.c (spu_resume): Adjust to the target resume interface
13270 change.
13271 * win32-low.c (win32_detach, win32_resume): Ditto.
13272
132732009-04-01 Pedro Alves <pedro@codesourcery.com>
13274
13275 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13276 flag.
13277 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13278 pending.
13279 (linux_continue_one_thread): Only preserve the stepping flag if
13280 there's a pending breakpoint.
13281
132822009-03-31 Pedro Alves <pedro@codesourcery.com>
13283
13284 * server.c (main): After the inferior having exited, call
13285 remote_close before exiting gdbserver.
13286
132872009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13288
13289 Fix size of FPSCR in Power 7 processors.
13290 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13291 (PPC_FEATURE_HAS_DFP): New #define.
13292 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13293 size of the FPSCR.
13294
132952009-03-23 Pedro Alves <pedro@codesourcery.com>
13296
13297 * server.c (handle_query) Whitespace and formatting.
13298
132992009-03-22 Pedro Alves <pedro@codesourcery.com>
13300
13301 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13302 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13303 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13304 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13305 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13306 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13307 Makefile.in, configure.ac: Fix whitespace throughout.
13308 * configure: Regenerate.
13309
133102009-03-22 Pedro Alves <pedro@codesourcery.com>
13311
13312 * inferiors.c (find_inferior): Make it safe for the callback
13313 function to delete the currently iterated inferior.
13314
133152009-03-22 Pedro Alves <pedro@codesourcery.com>
13316
13317 * Makefile.in (linuw_low_h): Move higher.
13318 (thread-db.o): Depend on $(linux_low_h).
13319
133202009-03-17 Pedro Alves <pedro@codesourcery.com>
13321
13322 Rename "process" to "lwp" throughout.
13323
13324 * linux-low.c (all_processes): Rename to...
13325 (all_lwps): ... this.
13326 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13327 (add_process): Rename to ...
13328 (add_lwp): ... this. Adjust.
13329 (linux_create_inferior): Adjust.
13330 (linux_attach_lwp): Adjust.
13331 (linux_attach): Adjust.
13332 (linux_kill_one_process): Rename to ...
13333 (linux_kill_one_lwp): ... this. Adjust.
13334 (linux_kill): Adjust.
13335 (linux_detach_one_process): Rename to ...
13336 (linux_detach_one_lwp): ... this. Adjust.
13337 (linux_detach): Adjust.
13338 (check_removed_breakpoint): Adjust.
13339 (status_pending_p): Adjust.
13340 (linux_wait_for_process): Rename to ...
13341 (linux_wait_for_lwp): ... this. Adjust.
13342 (linux_wait_for_event): Adjust.
13343 (send_sigstop): Adjust.
13344 (wait_for_sigstop): Adjust.
13345 (stop_all_processes): Rename to ...
13346 (stop_all_lwps): ... this.
13347 (linux_resume_one_process): Rename to ...
13348 (linux_resume_one_lwp): ... this. Adjust.
13349 (linux_set_resume_request, linux_continue_one_thread)
13350 (linux_queue_one_thread, resume_status_pending_p)
13351 (usr_store_inferior_registers, regsets_store_inferior_registers)
13352 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13353 Adjust.
13354 * linux-low.h (get_process): Rename to ...
13355 (get_lwp): ... this. Adjust.
13356 (get_thread_process): Rename to ...
13357 (get_thread_lwp): ... this. Adjust.
13358 (get_process_thread): Rename to ...
13359 (get_lwp_thread): ... this. Adjust.
13360 (struct process_info): Rename to ...
13361 (struct lwp_info): ... this.
13362 (all_processes): Rename to ...
13363 (all_lwps): ... this.
13364 * proc-service.c (ps_lgetregs): Adjust.
13365 * thread-db.c (thread_db_create_event, find_one_thread)
13366 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13367
133682009-03-14 Pedro Alves <pedro@codesourcery.com>
13369
13370 * server.c (handle_query): Handle "qAttached".
13371
133722009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13373
13374 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13375 GPLv3, update license URL.
13376
133772009-03-01 Doug Evans <dje@google.com>
13378
13379 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13380 (server_h): Add gdb_signals.h.
13381 (signals.o): Update.
13382 * server.h (target_signal_from_host,target_signal_to_host_p)
13383 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13384
133852009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13386
13387 * remote-utils.c (getpkt): Also generate remote-debug
13388 information if noack_mode is set.
13389
133902009-02-06 Pedro Alves <pedro@codesourcery.com>
13391
13392 * server.c (handle_query): Report qXfer:siginfo:read and
13393 qXfer:siginfo:write as supported and handle them.
13394 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13395 * linux-low.c (linux_xfer_siginfo): New.
13396 (linux_target_ops): Set it.
13397
133982009-01-26 Pedro Alves <pedro@codesourcery.com>
13399
13400 * server.c (gdbserver_usage): Mention --remote-debug.
13401 (main): Accept '--remote-debug' switch.
13402
134032009-01-18 Doug Evans <dje@google.com>
13404
13405 * regcache.c (new_register_cache): No need to check result of xcalloc.
13406 * server.c (handle_search_memory): Back out calls to xmalloc,
13407 result is checked and error is returned to user upon failure.
13408 (handle_query): Ditto. Add more checks for result of malloc.
13409 (handle_v_cont): Check result of malloc, report error back to
13410 user upon failure.
13411 (handle_v_run): Ditto. Call freeargv.
13412 * server.h (freeargv): Declare.
13413 * utils.c (freeargv): New fn.
13414
134152009-01-15 Doug Evans <dje@google.com>
13416
13417 * gdbreplay.c (perror_with_name): Make arg const char *.
13418 * server.h (target_signal_to_name): Make return type const char *.
13419 * thread-db.c (thread_db_err_str): Make return type const char *.
13420 * utils.c (perror_with_name): Make arg const char *.
13421
134222009-01-14 Pedro Alves <pedro@codesourcery.com>
13423
13424 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13425 when handling a EXIT_PROCESS_DEBUG_EVENT.
13426
134272009-01-06 Joel Brobecker <brobecker@adacore.com>
13428
13429 * gdbreplay.c (gdbreplay_version): Update copyright year.
13430 * server.c (gdbserver_version): Likewise.
13431
134322009-01-05 Doug Evans <dje@google.com>
13433
13434 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13435 (handle_extended_wait): Improve comment.
13436
134372008-12-13 Doug Evans <dje@google.com>
13438
13439 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13440 * server.h (ATTR_MALLOC): New macro.
13441 (xmalloc,xcalloc,xstrdup): Declare.
13442 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13443 * inferiors.c: Ditto.
13444 * linux-low.c: Ditto.
13445 * mem-break.c: Ditto.
13446 * regcache.c: Ditto.
13447 * remote-utils.c: Ditto.
13448 * server.c: Ditto.
13449 * target.c: Ditto.
13450 * win32-low.c: Ditto.
13451
134522008-12-12 Doug Evans <dje@google.com>
13453
13454 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13455 in debugging printf.
13456
13457 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13458
134592008-12-09 Doug Evans <dje@google.com>
13460
13461 * linux-low.h (struct process_info): Delete member tid, unused.
13462 * thread-db.c (find_one_thread): Update.
13463 (maybe_attach_thread): Update.
13464
134652008-12-02 Pedro Alves <pedro@codesourcery.com>
13466
13467 * target.h (struct target_ops): Add qxfer_osdata member.
13468 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13469 and dirent.h.
13470 (linux_qxfer_osdata): New functions.
13471 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13472 callback.
13473 * server.c (handle_query): Handle "qXfer:osdata:read:".
13474 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13475 (buffer_xml_printf): New functions.
13476 * server.h (struct buffer): New.
13477 (buffer_grow_str, buffer_grow_str0): New macros.
13478 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13479 (buffer_xml_printf): Declare.
13480
134812008-11-24 Doug Evans <dje@google.com>
13482
13483 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13484
134852008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * server.c (handle_v_run): Always use the supplied argument list.
13488
134892008-11-19 Bob Wilson <bob.wilson@acm.org>
13490
13491 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13492 (xtensa_regmap_table): Add entry for scompare1.
13493
134942008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13495
13496 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13497 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13498 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13499 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13500 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13501 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13502 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13503 XML target descriptions.
13504 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13505 when inferior is running on an ISA 2.05 or later processor. Add
13506 special case to return offset for full 64-bit slot of FPSCR when
13507 in 32-bits.
13508
135092008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13510
13511 * Makefile.in (SFILES, clean): Added sparc64 files.
13512 (reg-sparc64.o, reg-sparc64.c): New.
13513 * configure.srv (sparc*-*-linux*): New configuration.
13514 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13515 syscall arguments for SPARC.
13516 (regsets_store_inferior_registers): Likewise.
13517 * linux-sparc-low.c: New file.
13518
135192008-10-21 Doug Evans <dje@google.com>
13520
13521 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13522 (READLINE_DIR,READLINE_DEP): Delete.
13523 (INTERNAL_CFLAGS): Update.
13524 (LINTFLAGS): Update.
13525
135262008-10-10 Pedro Alves <pedro@codesourcery.com>
13527
13528 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13529 whole argv from the last run, not just argv[0].
13530
135312008-09-08 Pedro Alves <pedro@codesourcery.com>
13532
13533 * regcache.c (new_register_cache): Return NULL if the register
13534 cache size isn't known yet.
13535 (free_register_cache): Avoid dereferencing a NULL regcache.
13536
135372008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13538
13539 * configure.srv: Merge MIPS and MIPS64.
13540
135412008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13542
13543 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13544
135452008-08-18 Luis Machado <luisgpm@br.ibm.com>
13546
13547 * Makefile.in: Add required vsx dependencies.
13548
13549 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13550 Declare init_registers_powerpc_vsx32l.
13551 Declare init_registers_powerpc_vsx64l.
13552 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13553 (ppc_arch_setup): Check for VSX in hwcap.
13554 (ppc_fill_vsxregset): New function.
13555 (ppc_store_vsxregset): New function.
13556 Add new VSX entry in regset_info target_regsets.
13557
13558 * configure.srv: Add new VSX dependencies.
13559
135602008-08-12 Pedro Alves <pedro@codesourcery.com>
13561
13562 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13563 (remote_open): Set or clear transport_is_reliable.
13564 (putpkt_binary): Don't expect acks in noack mode.
13565 (getpkt): Don't send ack/nac in noack mode.
13566 * server.c (handle_general_set): Handle QStartNoAckMode.
13567 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13568 qSupported.
13569 (main): Reset noack_mode on every connection.
13570 * server.h (noack_mode): Declare.
13571
135722008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13573
13574 * Makefile.in (GDBREPLAY_OBS): New variable.
13575 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13576
135772008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13578 Daniel Jacobowitz <dan@codesourcery.com>
13579
13580 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13581 (usr_store_inferior_registers): Likewise.
13582 (regsets_store_inferior_registers): Likewise.
13583
135842008-07-31 Rolf Jansen <rj@surtec.com>
13585 Pedro Alves <pedro@codesourcery.com>
13586
13587 * configure.ac: Check for memmem declaration.
13588 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13589 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13590 (disable_packet_qfThreadInfo): Unconditionally compile.
13591 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13592 * configure, config.in: Regenerate.
13593
135942008-07-28 Doug Kwan <dougkwan@google.com>
13595
13596 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13597 (linux_write_memory): Remove declaration of errno.
13598
135992008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13600
13601 * linux-low.c (handle_extended_wait): Do not use "status"
13602 variable uninitialized.
13603
136042008-07-07 Pedro Alves <pedro@codesourcery.com>
13605
13606 * server.c (handle_v_attach): Inhibit reporting dll changes.
13607
136082008-06-27 Pedro Alves <pedro@codesourcery.com>
13609
13610 * remote-utils.c (prepare_resume_reply): If requested, don't
13611 output "thread:TID" in the T stop reply.
13612
13613 * server.c (disable_packet_vCont, disable_packet_Tthread)
13614 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13615 (handle_query): If requested, disable support for qC, qfThreadInfo
13616 and qsThreadInfo.
13617 (handle_v_requests): If requested, disable support for vCont.
13618 (gdbserver_show_disableable): New.
13619 (main): Handle --disable-packet and --disable-packet=LIST.
13620
13621 * server.h (disable_packet_vCont, disable_packet_Tthread)
13622 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13623
136242008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13625
13626 * server.c (gdbserver_usage): Mention --version.
13627
136282008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13629
13630 * Makefile.in (gdbreplay.o): New rule.
13631
136322008-06-06 Joseph Myers <joseph@codesourcery.com>
13633
13634 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13635 message, not gdbserver.
13636
136372008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13638 Nathan Sidwell <nathan@codesourcery.com>
13639 Joseph Myers <joseph@codesourcery.com>
13640
13641 * acinclude.m4: Include ../../config/acx.m4.
13642 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13643 * configure, config.in: Regenerate.
13644 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13645 * server.c (gdbserver_version): Print PKGVERSION.
13646 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13647 (main): Adjust gdbserver_usage calls.
13648 * gdbreplay.c (version, host_name): Add declarations.
13649 (gdbreplay_version, gdbreplay_usage): New.
13650 (main): Accept --version and --help options.
13651
136522008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13653
13654 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13655 (arm_breakpoint_at): Handle Thumb.
13656 (the_low_target): Add comment.
13657
136582008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13659
13660 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13661
136622008-05-09 Doug Evans <dje@google.com>
13663
13664 * server.h (decode_search_memory_packet): Declare.
13665 * remote-utils.c (decode_search_memory_packet): New fn.
13666 * server.c (handle_search_memory_1): New fn.
13667 (handle_search_memory): New fn.
13668 (handle_query): Process qSearch:memory packets.
13669
136702008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13671
13672 * regcache.c (registers_length): Remove.
13673 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13674 full register packet.
13675 * regcache.h (registers_length): Remove prototype.
13676 * server.h (PBUFSIZ): Define to 16384.
13677
136782008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13679
13680 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13681 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13682 powerpc-64l.o, and powerpc-altivec64l.o.
13683 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13684 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13685 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13686 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13687 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13688 to srv_xmlfiles.
13689
13690 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13691 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13692 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13693 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13694 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13695 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13696 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13697 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13698 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13699 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13700 (clean): Update.
13701
13702 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13703 (init_registers_powerpc_32l): ... this new prototype.
13704 (init_registers_powerpc_32): Remove, replace by ...
13705 (init_registers_powerpc_altivec32l): ... this new prototype.
13706 (init_registers_powerpc_e500): Remove, replace by ...
13707 (init_registers_powerpc_e500l): ... this new prototype.
13708 (init_registers_ppc64): Remove, replace by ...
13709 (init_registers_powerpc_64l): ... this new prototype.
13710 (init_registers_powerpc_64): Remove, replace by ...
13711 (init_registers_powerpc_altivec64l): ... this new prototype.
13712 (ppc_num_regs): Set to 73.
13713 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13714 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13715 (ppc_cannot_store_register): Handle orig_r3 and trap.
13716 (ppc_arch_setup): Update init_registers_... calls.
13717 (ppc_fill_gregset): Handle orig_r3 and trap.
13718
13719 * inferiors.c (clear_inferiors): Reset current_inferior.
13720
137212008-04-23 Paolo Bonzini <bonzini@gnu.org>
13722
13723 * acinclude.m4: Add override.m4.
13724 * configure: Regenerate.
13725
137262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13727
13728 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13729 initial call to init_register_ppc64.
13730
137312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13732
13733 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13734 single powerpc*-*-linux* case.
13735 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13736
137372008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13738
13739 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13740 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13741 from reg_xmlfiles.
13742 * linux-ppc-low.c: Include <elf.h>.
13743 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13744 (ppc_hwcap): New global variable.
13745 (ppc_regmap): Remove __SPE__ #ifdef sections.
13746 (ppc_regmap_e500): New global variable.
13747 (ppc_cannot_store_register): Update __SPE__ special case.
13748 (ppc_get_hwcap): New function.
13749 (ppc_arch_setup): Use it to determine whether inferior supports
13750 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13751 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13752 Do not access registers if target does not support AltiVec.
13753 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13754 Do not access registers if target does not support SPE.
13755 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13756
137572008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13758
13759 * linux-low.c (disabled_regsets, num_regsets): New.
13760 (use_regsets_p): Delete.
13761 (linux_wait_for_process): Clear disabled_regsets.
13762 (regsets_fetch_inferior_registers): Check and set it.
13763 (regsets_store_inferior_registers): Likewise.
13764 (linux_fetch_registers, linux_store_registers): Do not use
13765 use_regsets_p.
13766 (initialize_low): Allocate disabled_regsets.
13767
137682008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13769
13770 * Makefile.in (LIBOBJS): New.
13771 (OBS): Use LIBOBJS.
13772 (memmem.o): New rule.
13773 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13774 * configure: Regenerated.
13775
137762008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13777
13778 * server.c (handle_query): Never return "unsupported" for
13779 qXfer:features:read queries.
13780
137812008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13782
13783 * server.c (get_features_xml): Fix inverted condition.
13784 (handle_query): Always support qXfer:feature:read.
13785
137862008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13787
13788 * server.c (wrapper_argv): New.
13789 (start_inferior): Handle wrapper_argv. If set, expect an extra
13790 trap.
13791 (gdbserver_usage): Document --wrapper.
13792 (main): Parse --wrapper.
13793
137942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13795
13796 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13797 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13798 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13799 (ppc_set_pc): Likewise.
13800 (ppc_arch_setup): New function.
13801 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13802 of collect_register.
13803 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13804
138052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13806
13807 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13808 instead of linux-ppc64-low.o.
13809 * linux-ppc64-low.c: Remove file.
13810 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13811 (linux-ppc64-low.o): Remove rule.
13812
13813 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13814 (init_registers_powerpc_64): Likewise.
13815 (ppc_regmap): Conditionally define depending on __powerpc64__.
13816 (ppc_cannot_store_register): Do not special-case "fpscr" when
13817 compiled on __powerpc64__.
13818 (ppc_collect_ptrace_register): New function.
13819 (ppc_supply_ptrace_register): New function.
13820 (ppc_breakpoint): Change type to "unsigned int".
13821 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13822 (the_low_target): Conditionally provide initializers for the
13823 arch_setup member depending on __powerpc64__. Install
13824 collect_ptrace_register and supply_ptrace_register members.
13825
138262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13827
13828 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13829 * server.c (gdbserver_xmltarget): Define.
13830 (get_features_xml): Use it to replace "target.xml" and arch_string.
13831
13832 * configure.srv: Remove srv_xmltarget. Add XML files that were
13833 mentioned there to srv_xmlfiles instead. Remove conditional tests
13834 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13835 srv_xmlfiles and srv_regobj to include all possible choices.
13836 * configure.ac (srv_xmltarget): Remove.
13837 (srv_xmlfiles): Do not add "target.xml".
13838 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13839 checks for supplementary target information.
13840 * configure: Regenerate.
13841 * Makefile.in (XML_TARGET): Remove.
13842 (target.xml): Remove rule.
13843 (clean): Do not clean up target.xml.
13844 (.PRECIOUS): Do not mention target.xml.
13845
13846 * target.h (struct target_ops): Remove arch_string member.
13847 * linux-low.c (linux_arch_string): Remove.
13848 (linux_target_ops): Remove arch_string initializer.
13849 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13850 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13851 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13852 * spu-low.c (spu_arch_string): Remove.
13853 (spu_target_ops): Remove arch_string initializer.
13854 * win32-low.c (win32_arch_string): Remove.
13855 (win32_target_ops): Remove arch_string initializer.
13856 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13857 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13858 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13859
138602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13861
13862 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13863 by collect_ptrace_register and supply_ptrace_register hooks.
13864 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13865 instead of checking for the_low_target.left_pad_xfer.
13866 (usr_store_inferior_registers): Use collect_ptrace_register callback
13867 instead of checking for the_low_target.left_pad_xfer.
13868
13869 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13870 (s390_supply_ptrace_register): Likewise.
13871 (s390_fill_gregset): Call s390_collect_ptrace_register.
13872 (the_low_target): Update.
13873
13874 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13875 (ppc_supply_ptrace_register): Likewise.
13876 (the_low_target): Update.
13877
13878 * linux-i386-low.c (the_low_target): Update.
13879 * linux-x86-64-low.c (the_low_target): Update.
13880
138812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13882
13883 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13884 reg-s390.o and reg-s390x.o.
13885
13886 * linux-low.c (new_inferior): New global variable.
13887 (linux_create_inferior, linux_attach): Set it.
13888 (linux_wait_for_process): Call the_low_target.arch_setup after the
13889 target has stopped for the first time.
13890 (initialize_low): Do not call the_low_target.arch_setup.
13891
13892 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13893 (s390_set_pc): Likewise.
13894 (s390_arch_setup): New function.
13895 (the_low_target): Use s390_arch_setup as arch_setup routine.
13896
13897 * regcache.c (realloc_register_cache): New function.
13898 (set_register_cache): Call it for each existing regcache.
13899
139002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13901
13902 * server.h (init_registers): Remove prototype.
13903
13904 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13905 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13906 instead of init_registers ().
13907 * linux-arm-low.c (init_registers_arm): Add prototype.
13908 (init_registers_arm_with_iwmmxt): Likewise.
13909 (the_low_target): Add initializer for arch_setup field.
13910 * linux-cris-low.c (init_registers_cris): Add prototype.
13911 (the_low_target): Add initializer for arch_setup field.
13912 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13913 (the_low_target): Add initializer for arch_setup field.
13914 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13915 (the_low_target): Add initializer for arch_setup field.
13916 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13917 (the_low_target): Add initializer for arch_setup field.
13918 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13919 (the_low_target): Add initializer for arch_setup field.
13920 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13921 (the_low_target): Add initializer for arch_setup field.
13922 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13923 (init_registers_mips64_linux): Likewise.
13924 (the_low_target): Add initializer for arch_setup field.
13925 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13926 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13927 (the_low_target): Add initializer for arch_setup field.
13928 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13929 (init_registers_powerpc_64): Likewise.
13930 (the_low_target): Add initializer for arch_setup field.
13931 * linux-s390-low.c (init_registers_s390): Add prototype.
13932 (init_registers_s390x): Likewise.
13933 (the_low_target): Add initializer for arch_setup field.
13934 * linux-sh-low.c (init_registers_sh): Add prototype.
13935 (the_low_target): Add initializer for arch_setup field.
13936 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13937 (the_low_target): Add initializer for arch_setup field.
13938 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13939 (the_low_target): Add initializer for arch_setup field.
13940
13941 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13942 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13943 instead of init_registers ().
13944 * win32-arm-low.c (init_registers_arm): Add prototype.
13945 (the_low_target): Add initializer for arch_setup field.
13946 * win32-i386-low.c (init_registers_i386): Add prototype.
13947 (the_low_target): Add initializer for arch_setup field.
13948
13949 * spu-low.c (init_registers_spu): Add prototype.
13950 (initialize_low): Call initialie_registers_spu () instead of
13951 initialize_registers ().
13952
139532008-02-19 Pedro Alves <pedro@codesourcery.com>
13954
13955 * server.c (handle_v_requests): When handling the vRun and vAttach
13956 packets, if already debugging a process, don't kill it. Return an
13957 error instead.
13958
139592008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * server.c (handle_query): Correct length check.
13962
139632008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13964
13965 * win32-low.c (do_initial_child_stuff): Add process handle
13966 parameter. Set current_process_handle and current_process_id from the
13967 parameters. Clear globals.
13968 (win32_create_inferior): Don't set current_process_handle and
13969 current_process_id here. Instead pass them on the call to
13970 do_initial_child_stuff.
13971 (win32_attach): Likewise.
13972 (win32_clear_inferiors): New.
13973 (win32_kill): Don't close the current process handle or the
13974 current thread handle here. Instead call win32_clear_inferiors.
13975 (win32_detach): Don't open a new handle to the process. Call
13976 win32_clear_inferiors.
13977 (win32_join): Don't rely on current_process_handle; open a new
13978 handle using the process id.
13979 (win32_wait): Call win32_clear_inferiors when the inferior process
13980 has exited.
13981
139822008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * server.c (monitor_show_help): Add "exit".
13985
139862008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13987
13988 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13989 (clean): Add reg-xtensa.c.
13990 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13991 * configure.srv (xtensa*-*-linux*) New target.
13992 * linux-xtensa-low.c: New.
13993 * xtensa-xtregs.c: New.
13994
139952008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13996
13997 * hostio.c: Don't include errno.h.
13998 (errno_to_fileio_errno): Move to hostio-errno.
13999 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14000 error number outputting to the target->hostio_last_error callback.
14001 (hostio_packet_error): Use FILEIO_EINVAL directly.
14002 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14003 calls to hostio_error.
14004 * hostio-errno.c: New.
14005 * server.h (hostio_last_error_from_errno): Declare.
14006 * target.h (target_ops): Add hostio_last_error member.
14007 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14008 as hostio_last_error handler.
14009 * spu-low.c (spu_target_ops): Likewise.
14010 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14011 (wince_hostio_last_error): New functions.
14012 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14013 as hostio_last_error handler.
14014 (win32_target_ops) [!_WIN32_WCE]: Register
14015 hostio_last_error_from_errno as hostio_last_error handler.
14016 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14017 (hostio-errno.o): New rule.
14018 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14019 * configure.srv (srv_hostio_err_objs): New variable. Default to
14020 hostio-errno.o.
14021 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14022 * configure: Regenerate.
14023
140242008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14025
14026 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14027 (linux_kill, linux_detach): Clean up the process list.
14028 * remote-utils.c (remote_open): Improve port number parsing.
14029 (putpkt_binary, input_interrupt): Only send interrupts if the target
14030 is running.
14031 * server.c (extended_protocol): Make static.
14032 (attached): Define earlier.
14033 (exit_requested, response_needed, program_argv): New variables.
14034 (target_running): New.
14035 (start_inferior): Clear attached here.
14036 (attach_inferior): Set attached here.
14037 (require_running): Define.
14038 (handle_query): Use require_running and target_running. Implement
14039 "monitor exit".
14040 (handle_v_attach, handle_v_run): New.
14041 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14042 (gdbserver_usage): Update.
14043 (main): Redo argument parsing. Handle --debug and --multi. Handle
14044 --attach along with other options or after the port. Save
14045 program_argv. Support no initial program. Resynchronize
14046 communication with GDB after an error. Handle "monitor exit".
14047 Use require_running and target_running. Always allow the extended
14048 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14049 restart in extended mode.
14050 * README: Refer to the GDB manual. Update --attach usage.
14051
140522007-12-20 Andreas Schwab <schwab@suse.de>
14053
14054 * linux-low.c (STACK_SIZE): Define.
14055 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14056 (linux_test_for_tracefork): Likewise.
14057
140582007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14059
14060 * linux-low.c (linux_wait_for_event): Update messages. Do not
14061 reinsert auto-delete breakpoints.
14062 * mem-break.c (struct breakpoint): Change return type of handler to
14063 int.
14064 (set_breakpoint_at): Update handler type.
14065 (reinsert_breakpoint_handler): Return 1 instead of calling
14066 delete_breakpoint.
14067 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14068 setting a new one.
14069 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14070 * mem-break.h (set_breakpoint_at): Update handler type.
14071 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14072 * win32-low.c (auto_delete_breakpoint): New.
14073 (get_child_debug_event): Use it.
14074
140752007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14076
14077 * configure.ac: Check for pread and pwrite.
14078 * hostio.c (handle_pread): Fall back to lseek and read.
14079 (handle_pwrite): Fall back to lseek and write.
14080 * config.in, configure: Regenerated.
14081
140822007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * server.c (myresume): Add own_buf argument.
14085 (main): Update calls.
14086
140872007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14090 * remote-utils.c (remote_open): Do not call disable_async_io.
14091 (block_async_io): Delete.
14092 (unblock_async_io): Make static.
14093 (initialize_async_io): New.
14094 * server.c (handle_v_cont): Handle async I/O here.
14095 (myresume): Likewise. Move other common resume tasks here...
14096 (main): ... from here. Call initialize_async_io. Disable async
14097 I/O before the main loop.
14098 * server.h (initialize_async_io): Declare.
14099 (block_async_io, unblock_async_io): Delete prototypes.
14100 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14101
141022007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14103
14104 * remote-utils.c (readchar): Allow binary data in received messages.
14105
141062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14107
14108 * win32-low.c (attaching): New global.
14109 (win32_create_inferior): Clear the `attaching' global.
14110 (win32_attach): Set the `attaching' global.
14111 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14112 attaching. Only set a breakpoint at the entry point if not
14113 attaching.
14114
141152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14116
14117 * server.c (main): Don't report dll events on the initial
14118 connection on attaches.
14119
141202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14121
14122 * server.c (main): Relax numerical bases supported for the pid of
14123 the --attach command line argument.
14124
141252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14126
14127 * win32-low.c (win32_attach): Call OpenProcess before
14128 DebugActiveProcess, not after. Add last error output to error
14129 call.
14130
141312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14132
14133 * win32-low.c (win32_get_thread_context)
14134 (win32_set_thread_context): New functions.
14135 (thread_rec): Use win32_get_thread_context.
14136 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14137 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14138 field.
14139
141402007-12-03 Leo Zayas
14141 Pedro Alves <pedro_alves@portugalmail.pt>
14142
14143 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14144 global variables.
14145 (child_add_thread): Minor cleanup.
14146 (child_continue): Resume artificially suspended threads before
14147 calling ContinueDebugEvent.
14148 (suspend_one_thread): New.
14149 (fake_breakpoint_event): New.
14150 (get_child_debug_event): Change return type to int. Check here if
14151 gdb sent an interrupt request. If a soft interrupt was requested,
14152 fake a breakpoint event. Return 0 if there is no event to handle,
14153 and 1 otherwise.
14154 (win32_wait): Don't check here if gdb sent an interrupt request.
14155 Ensure there is a valid event to handle.
14156 (win32_request_interrupt): Add soft interruption method as last
14157 resort.
14158
141592007-12-03 Leo Zayas
14160 Pedro Alves <pedro_alves@portugalmail.pt>
14161
14162 * win32-low.h (win32_thread_info): Add descriptions to the
14163 structure members. Replace `suspend_count' counter by a
14164 `suspended' flag.
14165 * win32-low.c (thread_rec): Update condition of when to get the
14166 context from the inferior. Rely on ContextFlags being set if it
14167 has already been retrieved. Only suspend the inferior thread if
14168 we haven't already. Warn if that fails.
14169 (continue_one_thread): s/suspend_count/suspended/. Only call
14170 ResumeThread once. Warn if that fails.
14171
141722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * win32-low.c (win32_wait): Don't read from the inferior when it
14175 has already exited.
14176
141772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14178
14179 * Makefile.in (win32_low_h): New variable.
14180 (win32-low.o): Add dependency on $(win32_low_h).
14181 (win32-arm-low.o, win32-i386-low.o): New rules.
14182
141832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * hostio.c: Correct copyright year.
14186
141872007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * Makefile.in (OBS): Add hostio.o.
14190 (hostio.o): New rule.
14191 * server.h (handle_vFile): Declare.
14192 * hostio.c: New file.
14193 * server.c (handle_v_requests): Take packet_len and new_packet_len
14194 for binary packets. Call handle_vFile.
14195 (main): Update call to handle_v_requests.
14196
141972007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * linux-low.c: Include <sched.h>.
14200
142012007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14202
14203 * linux-low.c (linux_tracefork_grandchild): New.
14204 (linux_tracefork_child): Use clone.
14205 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14206
142072007-10-31 Joel Brobecker <brobecker@adacore.com>
14208
14209 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14210
142112007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14212
14213 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14214
142152007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * inferiors.c (change_inferior_id): Delete.
14218 (add_pid_to_list, pull_pid_from_list): New.
14219 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14220 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14221 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14222 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14223 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14224 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14225 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14226 (using_threads): Always set to 1.
14227 (handle_extended_wait): New.
14228 (add_process): Do not set TID.
14229 (linux_create_inferior): Set must_set_ptrace_flags.
14230 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14231 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14232 (linux_thread_alive): Rename TID argument to LWPID.
14233 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14234 (linux_wait_for_event): Do not use TID or check using_threads. Update
14235 call to dead_thread_notify. Call handle_extended_wait.
14236 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14237 (send_sigstop): Delete sigstop_sent.
14238 (wait_for_sigstop): Avoid TID.
14239 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14240 (linux_test_for_tracefork): New.
14241 (linux_lookup_signals): Use thread_db_active and
14242 linux_supports_tracefork_flag.
14243 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14244 * linux-low.h (get_process_thread): Avoid TID.
14245 (struct process_ifo): Move thread_known and tid to the end. Remove
14246 sigstop_sent.
14247 (linux_attach_lwp, thread_db_init): Update prototypes.
14248 * server.h (change_inferior_id): Delete prototype.
14249 (add_pid_to_list, pull_pid_from_list): New prototypes.
14250 * thread-db.c (thread_db_use_events): New.
14251 (find_first_thread): Rename to...
14252 (find_one_thread): ...this. Update callers and messages. Do not
14253 call fatal. Check thread_db_use_events. Do not call
14254 change_inferior_id or new_thread_notify.
14255 (maybe_attach_thread): Update. Do not call new_thread_notify.
14256 (thread_db_init): Set thread_db_use_events. Check use_events.
14257 * utils.c (fatal, warning): Correct message prefix.
14258
142592007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * Makefile.in (clean): Remove new files.
14262 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14263 (powerpc-64.o, powerpc-64.c): New rules.
14264 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14265 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14266 with SPE.
14267 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14268 SPE targets.
14269 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14270 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14271 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14272 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14273 (target_regsets): Add AltiVec and SPE register sets.
14274 * configure.ac: Check for AltiVec and SPE.
14275 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14276 (ppc_fill_vrregset, ppc_store_vrregset): New.
14277 (target_regsets): Add AltiVec register set.
14278 * configure: Regenerated.
14279
142802007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * linux-low.c (O_LARGEFILE): Define.
14283 (linux_read_memory): Use /proc/PID/mem.
14284 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14285 * configure, config.in: Regenerated.
14286
142872007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * linux-low.c (linux_wait_for_event): Do not pass signals while
14290 single-stepping.
14291
142922007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14293
14294 * win32-low.c (create_process): New.
14295 (win32_create_inferior): Use create_process instead of
14296 CreateProcess. If create_process failed retry appending an ".exe"
14297 suffix. Store the GetLastError result immediatelly after
14298 create_process calls and use it on the call to error.
14299
143002007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14301
14302 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14303
143042007-08-23 Joel Brobecker <brobecker@adacore.com>
14305
14306 * configure.ac: Switch license to GPLv3.
14307
143082007-08-01 Michael Snyder <msnyder@access-company.com>
14309
14310 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14311
143122007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14313
14314 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14315 typedef.
14316 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14317 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14318 CloseToolhelp32Snapshot.
14319 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14320 CloseToolhelp32Snapshot.
14321
143222007-07-27 Michael Snyder <michael.snyder@access-company.com>
14323
14324 * server.c (main): Check for inferior exit before main loop.
14325
143262007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14327
14328 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14329 instead of on tmp_desc.
14330
143312007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14332 Daniel Jacobowitz <dan@codesourcery.com>
14333
14334 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14335 (add_thread): Minor cleanups.
14336 (clear_inferiors): Move lower in the file. Clear the DLL
14337 list.
14338 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14339 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14340 (xml_escape_text): New.
14341 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14342 for qSupported.
14343 (handle_v_cont): Report errors.
14344 (gdbserver_version): Update.
14345 (main): Correct size of own_buf. Do not report initial DLL events.
14346 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14347 (unloaded_dll, xml_escape_text): New.
14348 * win32-low.c (enum target_waitkind): Update comments.
14349 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14350 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14351 (win32_EnumProcessModules, win32_GetModuleInformation)
14352 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14353 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14354 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14355 (win32_Module32First, win32_Module32Next, load_toolhelp)
14356 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14357 (get_child_debug_event): Handle DLL events.
14358 (win32_wait): Likewise.
14359
143602007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14363 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14364
143652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14366
14367 * win32-low.c (handle_output_debug_string): Ignore event if not
14368 waiting.
14369
143702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14371
14372 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14373
143742007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14375
14376 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14377
143782007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14379
14380 * inferiors.c (change_inferior_id): Add comment.
14381 * linux-low.c (check_removed_breakpoint): Add an early
14382 prototype. Improve debug output.
14383 (linux_attach): Doc update.
14384 (linux_detach_one_process, linux_detach): Clean up before releasing
14385 each process.
14386 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14387 * linux-low.h (struct process_info): Doc improvement.
14388 * mem-break.c (delete_all_breakpoints): New.
14389 * mem-break.h (delete_all_breakpoints): New prototype.
14390 * thread-db.c (find_first_thread): New.
14391 (thread_db_create_event): Call it instead of
14392 thread_db_find_new_threads. Clean up unused variables.
14393 (maybe_attach_thread): Remove first thread handling.
14394 (thread_db_find_new_threads): Use find_first_thread.
14395 (thread_db_get_tls_address): Likewise.
14396
143972007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * thread-db.c (thread_db_find_new_threads): Add prototype.
14400 (thread_db_create_event): Check for the main thread before adding
14401 a new thread.
14402 (maybe_attach_thread): Only enable event reporting if TID == 0.
14403 (thread_db_get_tls_address): Check for new threads.
14404
144052007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14406
14407 * linux-low.c (linux_create_inferior): Try execv before execvp.
14408 * spu-low.c (spu_create_inferior): Likewise.
14409
144102007-06-13 Mike Frysinger <vapier@gentoo.org>
14411
14412 * linux-low.c (linux_create_inferior): Change execv to execvp.
14413 * spu-low.c (spu_create_inferior): Likewies.
14414
144152007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14416
14417 * Makefile.in (clean): Clean new files instead of deleted ones.
14418 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14419 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14420 rules.
14421 * configure.srv: Specify XML files and new regformats for MIPS and
14422 MIPS64 GNU/Linux.
14423 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14424 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14425 an entry for the restart register.
14426 (mips_cannot_fetch_register, mips_cannot_store_register)
14427 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14428 register names to match the XML descriptions.
14429 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14430 restart register instead of $0.
14431
144322007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14433 Markus Deuling <deuling@de.ibm.com>
14434
14435 * remote-utils.c (decode_xfer_write): New function.
14436 * server.h (decode_xfer_write): Add prototype.
14437 * server.c (handle_query): Add PACKET_LEN argument. Support
14438 qXfer:spu:read and qXfer:spu:write packets.
14439 (main): Pass packet_len to handle_query.
14440 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14441 * target.h (target_ops): Add qxfer_spu.
14442
144432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14444
14445 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14446 accessing non-seekable spufs files.
14447
144482007-05-16 Markus Deuling <deuling@de.ibm.com>
14449
14450 * server.c (handle_query): Add reply for qC packet.
14451
144522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14453 Leo Zayas <lerele@champenstudios@com>
14454
14455 * server.h (check_remote_input_interrupt_request): New function.
14456 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14457 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14458 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14459 (check_remote_input_interrupt_request): New function.
14460 * server.h (check_remote_input_interrupt_request): Declare.
14461 * win32-low.c (winapi_DebugBreakProcess,
14462 winapi_GenerateConsoleCtrlEvent): New typedefs.
14463 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14464 to 250 ms.
14465 (win32_wait): Check for remote interrupt request
14466 with check_remote_input_interrupt_request.
14467 (win32_request_interrupt): New function.
14468 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14469
144702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14471
14472 * win32-low.c (debug_registers_changed,
14473 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14474 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14475 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14476 (thread_rec): Get context using the low target.
14477 (child_add_thread): Call thread_added on the low target,
14478 which does the same thing.
14479 (regptr): Delete.
14480 (do_initial_child_stuff): Remove debug registers references.
14481 Set context using the low target. Resume threads after
14482 setting the contexts.
14483 (child_continue): Remove dead variable. Remove debug
14484 registers references.
14485 (child_fetch_inferior_registers): Go through the low target.
14486 (do_child_store_inferior_registers): Remove.
14487 (child_store_inferior_registers): Go through the low target.
14488 (win32_resume): Remove debug registers references.
14489 Set context using the low target.
14490 (handle_exception): Change return type to void. Don't record
14491 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14492 first chance exception.
14493 (get_child_debug_event): Change return type to void. Remove
14494 goto loop. Always return after waiting for debug event.
14495 (win32_wait): Convert to switch statement. Handle spurious
14496 events.
14497
14498 * win32-i386-low.c (debug_registers_changed,
14499 debug_registers_used): New.
14500 (initial_stuff): Rename to ...
14501 (i386_initial_stuff): ... this. Clear debug registers
14502 state variables.
14503 (store_debug_registers): Delete.
14504 (i386_get_thread_context): New.
14505 (load_debug_registers): Delete.
14506 (i386_set_thread_context): New.
14507 (i386_thread_added): New.
14508 (single_step): Rename to ...
14509 (i386_single_step): ... this.
14510 (do_fetch_inferior_registers): Rename to ...
14511 (i386_fetch_inferior_register): ... this.
14512 (i386_store_inferior_register): New.
14513 (the_low_target): Adapt to new interface.
14514
14515 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14516 (arm_get_thread_context): New.
14517 (arm_set_thread_context): New.
14518 (regptr): New.
14519 (do_fetch_inferior_registers): Rename to ...
14520 (arm_fetch_inferior_register): ... this.
14521 (arm_store_inferior_register): New.
14522 (arm_wince_breakpoint): Reimplement as unsigned long.
14523 (arm_wince_breakpoint_len): Define.
14524 (the_low_target): Adapt to new interface.
14525
14526 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14527 load_debug_registers. Add get_thread_context, set_thread_context,
14528 thread_added and store_inferior_register. Rename
14529 fetch_inferior_registers to fetch_inferior_register.
14530 (regptr): Remove declaration.
14531
145322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14533
14534 * linux-low.c (linux_detach): Change return type to int. Return 0.
14535 * spu-low.c (spu_detach): Likewise.
14536
145372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14538
14539 * target.h (target_ops): Change return type of detach to int.
14540 Add join.
14541 (join_inferior): New.
14542 * server.c (main): Don't skip detach support on mingw32.
14543 If the inferior doesn't support detaching return error.
14544 Call join_inferior instead of using waitpid.
14545 * linux-low.c (linux_join): New.
14546 (linux_target_op): Add linux_join.
14547 * spu-low.c (spu_join): New.
14548 (spu_target_ops): Add spu_join.
14549 * win32-low.c (win32_detach): Adapt to new interface.
14550 Reopen current_process_handle before detaching. Issue a child
14551 resume before detaching.
14552 (win32_join): New.
14553 (win32_target_op): Add win32_join.
14554
145552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14556
14557 * win32-low.c (win32-attach): Fix return value.
14558 * target.h (target_ops): Describe ATTACH return values.
14559
145602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14561
14562 * win32-low.c (GETPROCADDRESS): Define.
14563 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14564 (winapi_DebugSetProcessKillOnExit): Likewise.
14565 (win32_create_inferior): Force usage of ansi CreateProcessA.
14566 (win32_attach): Use GETPROCADDRESS.
14567 (win32_detach): Likewise.
14568
145692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14570
14571 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14572
145732007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14574
14575 * win32-low.c: Commit leftover changes from 2007-03-29.
14576
145772007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14578
14579 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14580 fields short instead of int. Add explicit padding.
14581 (i387_cache_to_fsave): Remove unnecessary casts.
14582 (i387_fsave_to_cache): Doc fix.
14583 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14584
145852007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14588 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14589
145902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14591
14592 * configure.srv (arm*-*-mingw32ce*): Move near the other
14593 arm targets.
14594
145952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14596
14597 * configure.ac: Add errno checking.
14598 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14599 sys/file.h and malloc.h.
14600 (AC_CHECK_DECLS): Add perror.
14601 (srv_mingwce): Handle.
14602 * configure.srv (i[34567]86-*-cygwin*): Add
14603 win32-i386-low.o to srv_tgtobj.
14604 (i[34567]86-*-mingw*): Likewise.
14605 (arm*-*-mingw32ce*): Add case.
14606 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14607 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14608 [__MINGW32CE__] (strerror): New function.
14609 [__MINGW32CE__] (errno): Define to GetLastError.
14610 [__MINGW32CE__] (COUNTOF): New macro.
14611 (remote_open): Remove extra close call.
14612 * mem-break.c (delete_breakpoint_at): New function.
14613 * mem-break.h (delete_breakpoint_at): Declare.
14614 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14615 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14616 [USE_WIN32API] (read, write): Add char* casts.
14617 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14618 * server.h: Include wincecompat.h on Windows CE.
14619 [HAVE_ERRNO_H]: Check.
14620 (perror): Declare if not declared.
14621 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14622 (perror_with_name): Remove errno declaration.
14623 * wincecompat.h: New.
14624 * wincecompat.c: New.
14625 * win32-low.h: New.
14626 * win32-arm-low.c: New.
14627 * win32-i386-low.c: New.
14628 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14629 (OUTMSG2): Make it safe.
14630 (_T): New macro.
14631 (COUNTOF): New macro.
14632 (NUM_REGS): Get it from the low target.
14633 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14634 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14635 (thread_rec): Let low target handle debug registers.
14636 (child_add_thread): Likewise.
14637 (child_init_thread_list): Likewise.
14638 (continue_one_thread): Likewise.
14639 (regptr): New.
14640 (do_child_fetch_inferior_registers): Move to ...
14641 * win32-i386-low.c: ... here, and rename to ...
14642 (do_fetch_inferior_registers): ... this.
14643 * win32-low.c (child_fetch_inferior_registers):
14644 Go through the low target.
14645 (do_child_store_inferior_registers): Use regptr.
14646 (strwinerror): New function.
14647 (win32_create_inferior): Handle Windows CE.
14648 Use strwinerror instead of strerror on Windows error
14649 codes. Add program to the error output.
14650 Don't close the main thread handle on Windows CE.
14651 (win32_attach): Use coredll.dll on Windows CE.
14652 (win32_kill): Close current process and current
14653 thread handles.
14654 (win32_detach): Use coredll.dll on Windows CE.
14655 (win32_resume): Let low target handle debug registers, and
14656 step request.
14657 (handle_exception): Add/Remove initial breakpoint. Avoid
14658 non-existant WSTOPSIG on Windows CE.
14659 (win32_read_inferior_memory): Cast to remove warning.
14660 (win32_arch_string): Go through the low target.
14661 (initialize_low): Call set_breakpoint_data with the low
14662 target's breakpoint.
14663 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14664 FOP_REGNUM, mappings): Move to ...
14665 * win32-i386-low.c: ... here.
14666 * win32-low.c (win32_thread_info): Move to ...
14667 * win32-low.h: ... here.
14668 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14669 win32-arm-low.c and wincecompat.c.
14670 (all:): Add $EXEEXT.
14671 (install-only:): Likewise.
14672 (gdbserver:): Likewise.
14673 (gdbreplay:): Likewise.
14674 * config.in: Regenerate.
14675 * configure: Regenerate.
14676
146772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14678
14679 * win32-low.c: Rename typedef thread_info to
14680 win32_thread_info throughout.
14681
146822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14683
14684 * win32-i386-low.c: Rename to ...
14685 * win32-low.c: ... this.
14686 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14687 * Makefile.in: Likewise.
14688
146892007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14690
14691 * remote-utils.c (monitor_output): Constify msg parameter.
14692 * server.h (monitor_output): Likewise.
14693 * win32-i386-low.c (handle_output_debug_string): New.
14694 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14695 handle_output_debug_string.
14696 (get_child_debug_event): Likewise.
14697
146982007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14699
14700 * server.c (main): Correct strtoul check.
14701
147022007-03-27 Jon Ringle <jon@ringle.org>
14703
14704 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14705
147062007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14707
14708 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14709
147102007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * terminal.h: Check HAVE_SGTTY_H.
14713
147142007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14715
14716 * remote-utils.c (remote_open): Print out the assigned port number.
14717
147182007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14719
14720 * remote-utils.c (monitor_output): New function.
14721 * server.c (debug_threads): Define here.
14722 (monitor_show_help): New function.
14723 (handle_query): Handle qRcmd.
14724 (main): Do not handle 'd' packet.
14725 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14726 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14727 of debug_threads.
14728
147292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14730
14731 * Makefile.in (EXEEXT): New.
14732 (clean): Use $(EXEEXT).
14733
147342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * target.h (target_ops): Rename send_signal to request_interrupt,
14737 and remove enum target_signal parameter.
14738 * linux-low.c (linux_request_interrupt): Rename from
14739 linux_send_signal, and always send SIGINT.
14740 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14741 and always send SIGINT.
14742 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14743 of send_signal.
14744 (input_interrupt): Likewise.
14745
147462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14747
14748 * server.c (get_features_xml): Check if target implemented
14749 arch_string.
14750 * win32-i386-low.c (win32_arch_string): New.
14751 (win32_target_ops): Add win32_arch_string as arch_string member.
14752
147532007-02-22 Markus Deuling <deuling@de.ibm.com>
14754
14755 * spu-low.c (spu_arch_string): New.
14756 (spu_target_ops): Add spu_arch_string.
14757
147582007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14761 * configure.ac: Do not check for terminal.h.
14762 * configure, config.in: Regenerated.
14763
147642007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * Makefile.in (OBS): Add $(XML_BUILTIN).
14767 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14768 (clean): Update.
14769 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14770 (arm-with-iwmmxt.c): New.
14771 * config.in, configure: Regenerate.
14772 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14773 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14774 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14775 (arm*-*-linux*): Add iWMMXt and regset support.
14776 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14777 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14778 (arm_store_wmmxregset, target_regsets): New.
14779 * server.c (get_features_xml): Take annex argument. Check builtin
14780 XML documents.
14781 (handle_query): Handle multiple annexes.
14782
147832007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14784
14785 * remote-utils.c [USE_WIN32API] (read, write): Define.
14786 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14787 write.
14788
147892007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * linux-i386-low.c (the_low_target): Set arch_string.
14792 * linux-x86-64-low.c (the_low_target): Likewise.
14793 * linux-low.c (linux_arch_string): New.
14794 (linux_target_ops): Add it.
14795 * linux-low.h (struct linux_target_ops): Add arch_string.
14796 * server.c (write_qxfer_response): Use const void * for DATA.
14797 (get_features_xml): New.
14798 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14799 * target.h (struct target_ops): Add arch_string method.
14800
148012007-01-03 Denis Pilat <denis.pilat@st.com>
14802 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * linux-low.c (linux_kill): Handle being called with no threads.
14805 * win32-i386-low.c (win32_kill): Likewise.
14806 (get_child_debug_event): Clear current_process_handle.
14807
148082006-12-30 Denis PILAT <denis.pilat@st.com>
14809 Daniel Jacobowitz <dan@codesourcery.com>
14810
14811 * remote-utils.c (remote_open): Check the type of specified
14812 serial port devices before opening them.
14813 * server.c (main): Kill the inferior if an error occurs during
14814 the first remote_open.
14815
148162006-12-05 Markus Deuling <deuling@de.ibm.com>
14817
14818 * README: Update supported targets.
14819
148202006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * Makefile.in (clean): Remove reg-mips64.c.
14823 (reg-mips64.c, reg-mips64.o): New rules.
14824 * configure.srv: Handle mips64. Include regset support for mips.
14825 * linux-mips-low.c (union mips_register): New.
14826 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14827 (mips_breakpoint, mips_breakpoint_at): Use int.
14828 (mips_collect_register, mips_supply_register)
14829 (mips_collect_register_32bit, mips_supply_register_32bit)
14830 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14831 (mips_store_fpregset, target_regsets): New.
14832 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14833
148342006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14835
14836 * configure.srv: Add target "spu*-*-*".
14837 * Makefile.in (clean): Remove reg-spu.c.
14838 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14839 * spu-low.c: New file.
14840
148412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14842
14843 * configure.ac: Correct td_thr_tls_get_addr test.
14844 * configure: Regenerated.
14845
148462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14847
14848 * linux-low.c (linux_wait_for_event): Reformat. Use the
14849 pass_signals array.
14850 * remote-utils.c (decode_address_to_semicolon): New.
14851 * server.c (pass_signals, handle_general_set): New.
14852 (handle_query): Mention QPassSignals for qSupported.
14853 (main): Call handle_general_set.
14854 * server.h (pass_signals, decode_address_to_semicolon): New.
14855
148562006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * server.c (handle_query): Correct error handling for read_auxv.
14859
148602005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14861
14862 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14863 and srv_linux_thread_db to yes.
14864 * linux-s390-low.c (s390_fill_gregset): New function.
14865 (target_regsets): Define data structure.
14866
148672006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14868
14869 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14870 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14871 * config.in, configure: Regenerated.
14872 * inferiors.c (gdb_id_to_thread): New function.
14873 (gdb_id_to_thread_id): Use it.
14874 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14875 * linux-low.h (struct process_info): Add th member.
14876 (thread_db_get_tls_address): New prototype.
14877 * remote-utils.c (decode_address): Make non-static.
14878 * server.c (handle_query): Handle qGetTLSAddr.
14879 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14880 * target.h (struct target_ops): Add get_tls_address.
14881 * thread-db.c (maybe_attach_thread): Save the thread handle.
14882 (thread_db_get_tls_address): New.
14883
148842006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14885
14886 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14887 (linux_resume_one_process): Take a siginfo_t *. Update all
14888 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14889 (struct pending_signals): Add a siginfo_t.
14890 (linux_wait_for_process): Always set last_status.
14891 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14892 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14893 * linux-low.h (struct process_info): Add last_status.
14894
148952006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14896
14897 * remote-utils.c (try_rle): New function.
14898 (putpkt_binary): Use it.
14899
149002006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14903 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14904 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14905 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14906 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14907 point registers.
14908
149092006-08-08 Richard Sandiford <richard@codesourcery.com>
14910
14911 * server.c (terminal_fd): New variable.
14912 (old_foreground_pgrp): Likewise.
14913 (restore_old_foreground_pgrp): New function.
14914 (start_inferior): Record the terminal file descriptor in terminal_fd
14915 and its original foreground group in old_foreground_pgrp. Register
14916 restore_old_foreground_pgrp with atexit().
14917
149182006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14919
14920 * server.c (handle_query): Correct qPart to qXfer.
14921
149222006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14923
14924 * configure.ac: Check for more headers which are missing on
14925 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14926 * configure.srv: Add Cygwin and mingw32.
14927 * remote-utils.c: Don't include headers unconditionally which
14928 are missing on mingw32. Include <winsock.h> for mingw32.
14929 (remote_open): Adjust for mingw32 support. Flush
14930 standard error after writing to it.
14931 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14932 (unblock_async_io, enable_async_io, disable_async_io)
14933 (readchar, getpkt): Update for Winsock support.
14934 (prepare_resume_reply): Expect a protocol signal number.
14935 * server.c: Disable <sys/wait.h> on mingw32.
14936 (start_inferior): Adjust for mingw32 support. Flush
14937 standard error after writing to it.
14938 (attach_inferior): Likewise. Use protocol signal
14939 numbers.
14940 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14941 and names.
14942 * win32-i386-low.c: New file.
14943 * Makefile.in (XM_CLIBS): Set.
14944 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14945 (win32-i386-low.o): New dependency rule.
14946 * linux-low.c (linux_wait): Use target signal numbers.
14947 * target.h (struct target_ops): Doc fix.
14948 * server.h (target_signal_to_name): New prototype.
14949 * gdbreplay.c: Don't include headers unconditionally which
14950 are missing on mingw32. Include <winsock.h> for mingw32.
14951 (remote_close, remote_open): Adjust for Winsock support.
14952 * configure, config.in: Regenerated.
14953
149542006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * server.c (decode_xfer_read, write_qxfer_response): New.
14957 (handle_query): Take a packet length argument. Handle
14958 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14959 the qSupported response.
14960 (main): Update call to handle_query.
14961
149622006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14963
14964 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14965 (putpkt_binary): Renamed from putpkt and adjusted for binary
14966 data.
14967 (putpkt): New wrapper for putpkt_binary.
14968 (readchar): Don't mask off the high bit.
14969 (decode_X_packet): New function.
14970 * server.c (main): Call putpkt_binary if a handler sets the packet
14971 length. Save the length of the incoming packet. Handle 'X'.
14972 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14973
149742006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14975
14976 * server.c (handle_query): Handle qSupported.
14977
149782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * remote-utils.c (all_symbols_looked_up): New variable.
14981 (look_up_one_symbol): Check it.
14982 * server.h (look_up_one_symbol): New declaration.
14983 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14984
149852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * Makefile.in (linux-arm-low.o): Update dependencies.
14988 * linux-arm-low.c: Include "gdb_proc_service.h".
14989 (PTRACE_GET_THREAD_AREA): Define.
14990 (ps_get_thread_area): New function.
14991
149922006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14993
14994 * configure.srv (m68k*-*-uclinux*): New target.
14995 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14996 (linux_resume_one_process): Remove extraneous cast.
14997 (linux_read_offsets): New.
14998 (linux_target_op): Add linux_read_offsets on mmuless systems.
14999 * server.c (handle_query): Add qOffsets logic.
15000 * target.h (struct target_ops): Add read_offsets.
15001
150022006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15005 (PTRACE_GET_THREAD_AREA): Define.
15006 (ps_get_thread_area): New function.
15007 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15008 (linux-x86-64-low.o): Update.
15009
150102006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15011
15012 * configure.ac: Remove checks for prfpregset_t.
15013 * gdb_proc_service.h: New file.
15014 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15015 new "gdb_proc_service.h".
15016 * proc-service.c: Likewise.
15017 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15018 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15019 * Makefile.in (gdb_proc_service_h): Updated.
15020 * configure, config.in: Regenerated.
15021
150222006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * remote-utils.c (prepare_resume_reply): Move declaration
15025 of gdb_id_from_wait to the top of the block.
15026
150272006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15028
15029 * linux-low.c (regsets_store_inferior_registers): Read the regset
15030 from the target before filling it.
15031
150322006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * server.c (attach_inferior): Return SIGTRAP for a successful
15035 attach.
15036
150372006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15038
15039 * Makefile.in (OBS): Add version.o.
15040 (STAGESTUFF): Delete.
15041 (version.o): Add dependencies.
15042 (version.c): Replace rule.
15043 (clean): Remove version.c.
15044 * server.c (gdbserver_version): New.
15045 (gdbserver_usage): Use printf.
15046 (main): Handle --version and --help.
15047 * server.h (version, host_name): Add declarations.
15048
150492005-12-23 Eli Zaretskii <eliz@gnu.org>
15050
15051 * linux-arm-low.c:
15052 * linux-arm-low.c:
15053 * inferiors.c:
15054 * i387-fp.h:
15055 * i387-fp.c:
15056 * gdbreplay.c:
15057 * regcache.c:
15058 * proc-service.c:
15059 * mem-break.h:
15060 * mem-break.c:
15061 * linux-x86-64-low.c:
15062 * linux-sh-low.c:
15063 * linux-s390-low.c:
15064 * linux-ppc64-low.c:
15065 * linux-ppc-low.c:
15066 * linux-mips-low.c:
15067 * linux-m68k-low.c:
15068 * linux-m32r-low.c:
15069 * linux-low.h:
15070 * linux-low.c:
15071 * linux-ia64-low.c:
15072 * linux-i386-low.c:
15073 * linux-crisv32-low.c:
15074 * thread-db.c:
15075 * terminal.h:
15076 * target.h:
15077 * target.c:
15078 * server.h:
15079 * server.c:
15080 * remote-utils.c:
15081 * regcache.h:
15082 * utils.c:
15083 * Makefile.in:
15084 * configure.ac:
15085 * gdbserver.1: Add (C) after Copyright. Update the FSF
15086 address.
15087
150882005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15089
15090 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15091 (arm_breakpoint_at): Recognize both breakpoints.
15092 (the_low_target): Use the correct breakpoint instruction.
15093
150942005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15095
15096 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15097 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15098 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15099 (the_low_target): Update.
15100
151012005-10-25 Andreas Schwab <schwab@suse.de>
15102
15103 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15104
15105 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15106 (ia64_num_regs): Reduce to 462.
15107
151082005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * acinclude.m4: Correct quoting.
15111 * aclocal.m4: Regenerated.
15112
15113 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15114 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15115 (thread_db_init): Call thread_db_err_str.
15116 * configure.ac: Check for TD_VERSION.
15117 * config.in, configure: Regenerated.
15118
151192005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15120
15121 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15122
151232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15126 is not available. Define HAVE_PTRACE_GETREGS if it is.
15127 * config.in, configure: Regenerated.
15128 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15129 * linux-i386-low.c, linux-m68k-low.c: Update to use
15130 HAVE_PTRACE_GETREGS.
15131 * linux-low.c (regsets_fetch_inferior_registers)
15132 (regsets_store_inferior_registers): Only return 0 if we processed
15133 GENERAL_REGS.
15134 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15135 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15136
151372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15138
15139 * inferiors.c (struct thread_info): Add gdb_id.
15140 (add_thread): Add gdb_id argument.
15141 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15142 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15143 calls to add_thread.
15144 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15145 * server.c (handle_query): Use thread_to_gdb_id.
15146 (handle_v_cont, main): Use gdb_id_to_thread_id.
15147 * server.h (add_thread): Update prototype.
15148 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15149 prototypes.
15150
151512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15152
15153 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15154 left-padded registers.
15155 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15156 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15157
151582005-07-01 Steve Ellcey <sje@cup.hp.com>
15159
15160 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15161 * configure: Regenerate.
15162 * config.in: Regenerate.
15163 * server.h (NEED_DECLARATION_STRERROR):
15164 Replace with !HAVE_DECL_STRERROR.
15165
151662005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * linux-low.c (linux_wait, linux_send_signal): Don't test
15169 an unsigned long variable for > 0 if it could be MAX_ULONG.
15170 * server.c (myresume): Likewise.
15171 * target.c (set_desired_inferior): Likewise.
15172
151732005-06-13 Mark Kettenis <kettenis@gnu.org>
15174
15175 * configure.ac: Simplify and improve check for socklen_t.
15176 * configure, config.in: Regenerate.
15177
151782005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * acconfig.h: Remove.
15181 * configure.ac: Add a test for socklen_t. Use three-argument
15182 AC_DEFINE throughout.
15183 * config.in: Regenerated using autoheader 2.59.
15184 * configure: Regenerated.
15185
15186 * gdbreplay.c (socklen_t): Provide a default.
15187 (remote_open): Use socklen_t.
15188 * remote-utils.c (socklen_t): Provide a default.
15189 (remote_open): Use socklen_t.
15190 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15191 unsigned char.
15192
15193 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15194 char for buffers.
15195 * linux-low.c (linux_read_memory, linux_write_memory)
15196 (linux_read_auxv): Likewise.
15197 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15198 (check_mem_write): Likewise.
15199 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15200 Likewise.
15201 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15202 (registers_from_string, register_data): Likewise.
15203 * server.c (handle_query, main): Likewise.
15204 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15205 (decode_M_packet): Likewise.
15206 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15207 * target.h (struct target_ops): Update read_memory, write_memory,
15208 and read_auxv.
15209 (read_inferior_memory, write_inferior_memory): Update.
15210 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15211 to unsigned char *.
15212 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15213 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15214 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15215 linux-s390-low.c, linux-sh-low.c: Update for changes in
15216 read_inferior_memory and the_low_target->breakpoint.
15217
152182005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15219
15220 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15221 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15222 * configure.srv: Add powerpc64-*-linux*.
15223 * linux-ppc64-low.c: New file.
15224
152252005-05-23 Orjan Friberg <orjanf@axis.com>
15226
15227 * linux-cris-low.c: New file with support for CRIS.
15228 * linux-crisv32-low.c: Ditto for CRISv32.
15229 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15230 (clean): Add reg-cris.c and reg-crisv32.c.
15231 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15232 reg-crisv32.o, and reg-crisv32.c to make rules.
15233 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15234 recognized targets.
15235
152362005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15237
15238 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15239 of sizeof (PTRACE_XFER_TYPE).
15240 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15241
152422005-05-12 Orjan Friberg <orjanf@axis.com>
15243
15244 * target.h (struct target_ops): Add insert_watchpoint,
15245 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15246 pointers for hardware watchpoint support.
15247 * linux-low.h (struct linux_target_ops): Ditto.
15248 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15249 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15250 to linux_target_ops.
15251 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15252 reply packet.
15253 * server.c (main): Recognize 'Z' and 'z' packets.
15254
152552005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15256
15257 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15258 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15259 (the_low_target): Add new members.
15260
152612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15262
15263 * proc-service.c (ps_lgetregs): Search all_processes instead of
15264 all_threads.
15265
152662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15267
15268 * server.c (start_inferior): Change return type to int.
15269 (attach_inferior): Change sigptr to int *.
15270 (handle_v_cont, handle_v_requests): Change signal to int *.
15271 (main): Change signal to int.
15272
152732005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15274
15275 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15276 * configure.srv: Add m32r*-*-linux*.
15277 * linux-m32r-low.c: New file.
15278
152792005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15280
15281 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15282
152832005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15286 Take unsigned long arguments for PIDs.
15287 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15288 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15289 (wait_for_sigstop, linux_resume_one_process)
15290 (regsets_fetch_inferior_registers, linux_send_signal)
15291 (linux_read_auxv): Likewise. Update the types of variables holding
15292 PIDs. Update format string specifiers.
15293 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15294 * remote-utils.c (prepare_resume_reply): Likewise.
15295 * server.c (cont_thread, general_thread, step_thread)
15296 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15297 unsigned long.
15298 (handle_query): Update format specifiers.
15299 (handle_v_cont, main): Use strtoul for thread IDs.
15300 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15301 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15302 (general_thread, step_thread, thread_from_wait)
15303 (old_thread_from_wait): Update.
15304 * target.h (struct thread_resume): Use unsigned long for THREAD.
15305 (struct target_ops): Use unsigned long for arguments to attach and
15306 thread_alive.
15307
153082005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15309
15310 * acinclude.m4: Include bfd/bfd.m4 directly.
15311 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15312 <agriffis@toolchain.org>.
15313 * aclocal.m4, configure: Regenerated.
15314
153152005-01-07 Andrew Cagney <cagney@gnu.org>
15316
15317 * configure.ac: Rename configure.in, require autoconf 2.59.
15318 * configure: Re-generate.
15319
153202004-12-08 Daniel Jacobowitz <dan@debian.org>
15321
15322 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15323 LIBS when finished.
15324 * aclocal.m4: Regenerated.
15325 * configure: Regenerated.
15326
153272004-11-21 Andreas Schwab <schwab@suse.de>
15328
15329 * linux-m68k-low.c (m68k_num_gregs): Define.
15330 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15331 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15332 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15333 (m68k_breakpoint_at): New. Add to the_low_target.
15334
15335 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15336 srv_linux_thread_db to yes.
15337
153382004-10-20 Joel Brobecker <brobecker@gnat.com>
15339
15340 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15341 (ARCH_SET_FS): Likewise.
15342 (ARCH_GET_FS): Likewise.
15343 (ARCH_GET_GS): Likewise.
15344
153452004-10-16 Daniel Jacobowitz <dan@debian.org>
15346
15347 * linux-i386-low.c (ps_get_thread_area): New.
15348 * linux-x86-64-low.c (ps_get_thread_area): New.
15349 * linux-low.c: Include <sys/syscall.h>.
15350 (linux_kill_one_process): Don't kill the first thread here.
15351 (linux_kill): Kill the first thread here.
15352 (kill_lwp): New function.
15353 (send_sigstop, linux_send_signal): Use it.
15354 * proc-service.c: Clean up #ifdefs.
15355 (fpregset_info): Delete.
15356 (ps_lgetregs): Update and enable implementation.
15357 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15358 implementations.
15359 * remote-utils.c (struct sym_cache, symbol_cache): New.
15360 (input_interrupt): Print a clearer message.
15361 (async_io_enabled): New variable.
15362 (enable_async_io, disable_async_io): Use it. Update comments.
15363 (look_up_one_symbol): Use the symbol cache.
15364 * thread-db.c (thread_db_look_up_symbols): New function.
15365 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15366
153672004-10-16 Daniel Jacobowitz <dan@debian.org>
15368
15369 * configure.in: Test for -rdynamic.
15370 * configure: Regenerated.
15371 * Makefile (INTERNAL_LDFLAGS): New.
15372 (gdbserver, gdbreplay): Use it.
15373
153742004-09-02 Andrew Cagney <cagney@gnu.org>
15375
15376 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15377
153782004-03-23 Daniel Jacobowitz <drow@mvista.com>
15379
15380 * linux-low.c (linux_wait): Clear all_processes list also.
15381
153822004-03-12 Daniel Jacobowitz <drow@mvista.com>
15383
15384 * linux-low.c: Include <errno.h>. Remove extern declaration of
15385 errno.
15386
153872004-03-12 Daniel Jacobowitz <drow@mvista.com>
15388
15389 * gdbreplay.c, server.h, utils.c: Update copyright years.
15390
153912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15392
15393 * server.c (main): Print child status or termination signal from
15394 variable 'signal', not 'sig'.
15395
153962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15397
15398 * linux-low.c (linux_read_memory): Change return type to
15399 int. Check for and return error from ptrace().
15400 * target.c (read_inferior_memory): Change return type to int. Pass
15401 back return status from the_target->read_memory().
15402 * target.h (struct target_ops): Adapt *read_memory() prototype.
15403 Update comment.
15404 (read_inferior_memory): Adapt prototype.
15405 * server.c (main): Return an error packet if
15406 read_inferior_memory() returns an error.
15407
154082004-03-04 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15411 Unify with other clean targets.
15412
154132004-02-29 Daniel Jacobowitz <drow@mvista.com>
15414
15415 * server.c (handle_v_cont): Call set_desired_inferior.
15416
154172004-02-29 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15420
154212004-02-29 Daniel Jacobowitz <drow@mvista.com>
15422
15423 * linux-low.c (linux_wait): Unblock async I/O.
15424 (linux_resume): Block and enable async I/O.
15425 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15426 * server.h (block_async_io, unblock_async_io): Add prototypes.
15427
154282004-02-29 Daniel Jacobowitz <drow@mvista.com>
15429
15430 * remote-utils.c (remote_open): Print a status notice after
15431 opening a TCP port.
15432 * server.c (attach_inferior): Print a status notice after
15433 attaching.
15434
154352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15436
15437 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15438
154392004-02-26 Daniel Jacobowitz <drow@mvista.com>
15440
15441 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15442 error packet.
15443 * server.c, target.h: Update copyright years.
15444
154452004-02-25 Roland McGrath <roland@redhat.com>
15446
15447 * target.h (struct target_ops): New member `read_auxv'.
15448 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15449 * linux-low.c (linux_read_auxv): New function.
15450 (linux_target_ops): Initialize `read_auxv' member to that.
15451
154522004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15453
15454 Committed by Jim Blandy <jimb@redhat.com>.
15455
15456 * linux-s390-low.c (s390_num_regs): Update.
15457 (s390_regmap): Remove control registers. Use __s390x__ predefine
15458 instead of GPR_SIZE to distiguish s390 and s390x targets.
15459
154602004-01-31 Daniel Jacobowitz <drow@mvista.com>
15461
15462 * linux-low.c: Update copyright year.
15463 (check_removed_breakpoint): Clear pending_is_breakpoint.
15464 (linux_set_resume_request, linux_queue_one_thread)
15465 (resume_status_pending_p): New functions.
15466 (linux_continue_one_thread): Use process->resume.
15467 (linux_resume): Only resume threads if there are no pending events.
15468 * linux-low.h (struct process_info): Add resume request
15469 pointer.
15470
154712004-01-30 Daniel Jacobowitz <drow@mvista.com>
15472
15473 * regcache.c (new_register_cache): Clear the allocated register
15474 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15475
154762003-10-13 Daniel Jacobowitz <drow@mvista.com>
15477
15478 * linux-low.c (linux_resume): Take a struct thread_resume *
15479 argument.
15480 (linux_wait): Update call.
15481 (resume_ptr): New static variable.
15482 (linux_continue_one_thread): Renamed from
15483 linux_continue_one_process. Use resume_ptr.
15484 (linux_resume): Use linux_continue_one_thread.
15485 * server.c (handle_v_cont, handle_v_requests): New functions.
15486 (myresume): New function.
15487 (main): Handle 'v' case.
15488 * target.h (struct thread_resume): New type.
15489 (struct target_ops): Change argument of "resume" to struct
15490 thread_resume *.
15491 (myresume): Delete macro.
15492
154932003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15494
15495 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15496 (uninstall): Support DESTDIR.
15497
15498Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15499
15500 * configure.srv: Add xscale*linux copy of arm*linux entry.
15501
155022003-07-24 Daniel Jacobowitz <drow@mvista.com>
15503
15504 * linux-arm-low.c (arm_reinsert_addr): New function.
15505 (the_low_target): Add arm_reinsert_addr.
15506
155072003-07-08 Mark Kettenis <kettenis@gnu.org>
15508
15509 * mem-break.c: Remove whitespace at end of file.
15510
155112003-06-28 Daniel Jacobowitz <drow@mvista.com>
15512
15513 * configure.in: Check whether we need to prototype strerror.
15514 * server.h: Optionally prototype strerror.
15515 * gdbreplay.c (perror_with_name): Use strerror.
15516 * linux-low.c (linux_attach_lwp): Use strerror.
15517 * utils.c (perror_with_name): Use strerror.
15518 * config.in, configure: Regenerated.
15519
155202003-06-28 Daniel Jacobowitz <drow@mvista.com>
15521
15522 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15523 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15524
155252003-06-20 Daniel Jacobowitz <drow@mvista.com>
15526
15527 * Makefile.in (SFILES): Update.
15528 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15529 low-sun3.c: Remove files.
15530
155312003-06-17 Daniel Jacobowitz <drow@mvista.com>
15532
15533 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15534 (linux_detach_one_process, linux_detach): New functions.
15535 (linux_target_ops): Add linux_detach.
15536 * server.c (main): Handle 'D' packet.
15537 * target.h (struct target_ops): Add "detach" member.
15538 (detach_inferior): Define.
15539
155402003-06-13 Mark Kettenis <kettenis@gnu.org>
15541
15542 From Kelley Cook <kelleycook@wideopenwest.com>:
15543 * configure.srv: Accept i[34567]86 variants.
15544
155452003-06-05 Daniel Jacobowitz <drow@mvista.com>
15546
15547 * linux-low.c (linux_wait_for_event): Correct comment typos.
15548 (linux_resume_one_process): Call check_removed_breakpoint.
15549 (linux_send_signal): New function.
15550 (linux_target_ops): Add linux_send_signal.
15551 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15552 of kill.
15553 * target.h (struct target_ops): Add send_signal.
15554
155552003-05-29 Jim Blandy <jimb@redhat.com>
15556
15557 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15558 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15559 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15560 away part of the register's value.
15561
155622003-03-26 Daniel Jacobowitz <drow@mvista.com>
15563
15564 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15565 (linux_wait_for_event, linux_init_signals): Likewise.
15566
155672003-03-17 Daniel Jacobowitz <drow@mvista.com>
15568
15569 * configure.in: Check for stdlib.h.
15570 * configure: Regenerated.
15571 * config.in: Regenerated.
15572
155732003-01-04 Andreas Schwab <schwab@suse.de>
15574
15575 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15576
155772003-01-02 Andrew Cagney <ac131313@redhat.com>
15578
15579 * Makefile.in: Remove obsolete code.
15580
155812002-11-20 Daniel Jacobowitz <drow@mvista.com>
15582
15583 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15584 defined(PT_FPR0_HI).
15585
155862002-11-17 Stuart Hughes <seh@zee2.com>
15587
15588 * linux-arm-low.c (arm_num_regs): Increase.
15589 (arm_regmap): Include status register.
15590
155912002-11-17 Daniel Jacobowitz <drow@mvista.com>
15592
15593 * linux-low.c (register_addr): Remove incorrect -1 check.
15594
155952002-08-29 Daniel Jacobowitz <drow@mvista.com>
15596
15597 * linux-low.c (linux_create_inferior): Call setpgid. Return
15598 the new PID.
15599 (unstopped_p, linux_signal_pid): Remove.
15600 (linux_target_ops): Remove linux_signal_pid.
15601 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15602 global instead of target method.
15603 * target.h (struct target_ops): Remove signal_pid. Update comment
15604 for create_inferior.
15605 * server.c (signal_pid): New variable.
15606 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15607 gdbserver. Set the child to be the foreground process group.
15608 (attach_inferior): Set signal_pid.
15609
156102002-08-23 Daniel Jacobowitz <drow@mvista.com>
15611
15612 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15613
156142002-08-20 Jim Blandy <jimb@redhat.com>
15615
15616 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15617 default for this.
15618
156192002-08-01 Andrew Cagney <cagney@redhat.com>
15620
15621 * Makefile.in: Make chill references obsolete.
15622
156232002-07-24 Kevin Buettner <kevinb@redhat.com>
15624
15625 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15626 * configure: Regenerate.
15627 * config.in: Regenerate.
15628
156292002-07-09 David O'Brien <obrien@FreeBSD.org>
15630
15631 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15632 (perror_with_name, remote_close, remote_open, expect, play): Static.
15633
156342002-07-04 Michal Ludvig <mludvig@suse.cz>
15635
15636 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15637 byte offsets instead of an array of indexes.
15638 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15639
156402002-06-13 Daniel Jacobowitz <drow@mvista.com>
15641
15642 * regcache.c: Add comment.
15643
156442002-06-11 Daniel Jacobowitz <drow@mvista.com>
15645
15646 * thread-db.c: New file.
15647 * proc-service.c: New file.
15648 * acinclude.m4: New file.
15649 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15650 proc-service.o, and thread-db.o.
15651 (linux-low.o): Add USE_THREAD_DB.
15652 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15653 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15654 * aclocal.m4: Regenerated.
15655 * config.in: Regenerated.
15656 * configure: Regenerated.
15657 * configure.in: Check for proc_service.h, sys/procfs.h,
15658 thread_db.h, and linux/elf.h headrs.
15659 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15660 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15661 Check for -lthread_db and thread support.
15662 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15663 PowerPC, and SuperH.
15664 * i387-fp.c: Constify arguments.
15665 * i387-fp.h: Likewise.
15666 * inferiors.c: (struct thread_info): Renamed from
15667 `struct inferior_info'. Remove PID member. Use generic inferior
15668 list header. All uses updated.
15669 (inferiors, signal_pid): Removed.
15670 (all_threads): New variable.
15671 (get_thread): Define.
15672 (add_inferior_to_list): New function.
15673 (for_each_inferior): New function.
15674 (change_inferior_id): New function.
15675 (add_inferior): Removed.
15676 (remove_inferior): New function.
15677 (add_thread): New function.
15678 (free_one_thread): New function.
15679 (remove_thread): New function.
15680 (clear_inferiors): Use for_each_inferior and free_one_thread.
15681 (find_inferior): New function.
15682 (find_inferior_id): New function.
15683 (inferior_target_data): Update argument type.
15684 (set_inferior_target_data): Likewise.
15685 (inferior_regcache_data): Likewise.
15686 (set_inferior_regcache_data): Likewise.
15687 * linux-low.c (linux_bp_reinsert): Remove.
15688 (all_processes, stopping_threads, using_thrads)
15689 (struct pending_signals, debug_threads, pid_of): New.
15690 (inferior_pid): Replace with macro.
15691 (struct inferior_linux_data): Remove.
15692 (get_stop_pc, add_process): New functions.
15693 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15694 Use add_process and add_thread.
15695 (linux_attach_lwp): New function, based on old linux_attach. Use
15696 add_process and add_thread. Set stop_expected for new threads.
15697 (linux_attach): New function.
15698 (linux_kill_one_process): New function.
15699 (linux_kill): Kill all LWPs.
15700 (linux_thread_alive): Use find_inferior_id.
15701 (check_removed_breakpoints, status_pending_p): New functions.
15702 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15703 Update. Use WNOHANG. Wait for cloned processes also. Update process
15704 struct for the found process.
15705 (linux_wait_for_event): New function.
15706 (linux_wait): Use it. Support LWPs.
15707 (send_sigstop, wait_for_sigstop, stop_all_processes)
15708 (linux_resume_one_process, linux_continue_one_process): New functions.
15709 (linux_resume): Support LWPs.
15710 (REGISTER_RAW_SIZE): Remove.
15711 (fetch_register): Use register_size instead. Call supply_register.
15712 (usr_store_inferior_registers): Likewise. Call collect_register.
15713 Fix recursive case.
15714 (regsets_fetch_inferior_registers): Improve error message.
15715 (regsets_store_inferior_registers): Add debugging.
15716 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15717 (unstopped_p, linux_signal_pid): New functions.
15718 (linux_target_ops): Add linux_signal_pid.
15719 (linux_init_signals): New function.
15720 (initialize_low): Call it. Initialize using_threads.
15721 * regcache.c (inferior_regcache_data): Add valid
15722 flag.
15723 (get_regcache): Fetch registers lazily. Add fetch argument
15724 and update all callers.
15725 (regcache_invalidate_one, regcache_invalidate): New
15726 functions.
15727 (new_register_cache): Renamed from create_register_cache.
15728 Return the new regcache.
15729 (free_register_cache): Change argument to a void *.
15730 (registers_to_string, registers_from_string): Call get_regcache
15731 with fetch flag set.
15732 (register_data): Make static. Pass fetch flag to get_regcache.
15733 (supply_register): Call get_regcache with fetch flag clear.
15734 (collect_register): Call get_regcache with fetch flag set.
15735 (collect_register_as_string): New function.
15736 * regcache.h: Update.
15737 * remote-utils.c (putpkt): Flush after debug output and use
15738 stderr.
15739 Handle input interrupts while waiting for an ACK.
15740 (input_interrupt): Use signal_pid method.
15741 (getpkt): Flush after debug output and use stderr.
15742 (outreg): Use collect_register_as_string.
15743 (new_thread_notify, dead_thread_notify): New functions.
15744 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15745 and general_thread.
15746 (look_up_one_symbol): Flush after debug output.
15747 * server.c (step_thread, server_waiting): New variables.
15748 (start_inferior): Don't use signal_pid. Update call to mywait.
15749 (attach_inferior): Update call to mywait.
15750 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15751 (main): Don't fetch/store registers explicitly. Use
15752 set_desired_inferior. Support proposed ``Hs'' packet. Update
15753 calls to mywait.
15754 * server.h: Update.
15755 (struct inferior_list, struct_inferior_list_entry): New.
15756 * target.c (set_desired_inferior): New.
15757 (write_inferior_memory): Constify.
15758 (mywait): New function.
15759 * target.h: Update.
15760 (struct target_ops): New signal_pid method.
15761 (mywait): Removed macro, added prototype.
15762
15763 * linux-low.h (regset_func): Removed.
15764 (regset_fill_func, regset_store_func): New.
15765 (enum regset_type): New.
15766 (struct regset_info): Add type field. Use new operation types.
15767 (struct linux_target_ops): stop_pc renamed to get_pc.
15768 Add decr_pc_after_break and breakpoint_at.
15769 (get_process, get_thread_proess, get_process_thread)
15770 (strut process_info, all_processes, linux_attach_lwp)
15771 (thread_db_init): New.
15772
15773 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15774 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15775 (the_low_target): Add new members.
15776 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15777 (i386_store_fpxregset): Constify.
15778 (target_regsets): Add new kind identifier.
15779 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15780 (i386_set_pc): Add debugging.
15781 (i386_breakpoint_at): New function.
15782 (the_low_target): Add new members.
15783 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15784 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15785 (mips_breakpoint_at): New.
15786 (the_low_target): Add new members.
15787 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15788 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15789 (the_low_target): Add new members.
15790 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15791 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15792 (the_low_target): Add new members.
15793 * linux-x86-64-low.c (target_regsets): Add new kind
15794 identifier.
15795
157962002-05-15 Daniel Jacobowitz <drow@mvista.com>
15797
15798 From Martin Pool <mbp@samba.org>:
15799 * server.c (gdbserver_usage): New function.
15800 (main): Call it.
15801
158022002-05-14 Daniel Jacobowitz <drow@mvista.com>
15803
15804 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15805 stop_at -> stop_pc.
15806
158072002-05-04 Andrew Cagney <ac131313@redhat.com>
15808
15809 * Makefile.in: Remove obsolete code.
15810
158112002-04-24 Michal Ludvig <mludvig@suse.cz>
15812
15813 * linux-low.c (regsets_fetch_inferior_registers),
15814 (regsets_store_inferior_registers): Removed cast to int from
15815 ptrace() calls.
15816 * regcache.h: Added declaration of struct inferior_info.
15817
158182002-04-20 Daniel Jacobowitz <drow@mvista.com>
15819
15820 * inferiors.c (struct inferior_info): Add regcache_data.
15821 (add_inferior): Call create_register_cache.
15822 (clear_inferiors): Call free_register_cache.
15823 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15824 * regcache.c (struct inferior_regcache_data): New.
15825 (registers): Remove.
15826 (get_regcache): New function.
15827 (create_register_cache, free_register_cache): New functions.
15828 (set_register_cache): Don't initialize the register cache here.
15829 (registers_to_string, registers_from_string, register_data): Call
15830 get_regcache.
15831 * regcache.h: Add prototypes.
15832 * server.h: Likewise.
15833
158342002-04-20 Daniel Jacobowitz <drow@mvista.com>
15835
15836 * mem-break.c: New file.
15837 * mem-break.h: New file.
15838 * Makefile.in: Add mem-break.o rule; update server.h
15839 dependencies.
15840 * inferiors.c (struct inferior_info): Add target_data
15841 member.
15842 (clear_inferiors): Free target_data member if set.
15843 (inferior_target_data, set_inferior_target_data): New functions.
15844 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15845 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15846 * linux-low.c (linux_bp_reinsert): New variable.
15847 (struct inferior_linux_data): New.
15848 (linux_create_inferior): Use set_inferior_target_data.
15849 (linux_attach): Likewise. Call add_inferior.
15850 (linux_wait_for_one_inferior): New function.
15851 (linux_wait): Call it.
15852 (linux_write_memory): Add const.
15853 (initialize_low): Call set_breakpoint_data.
15854 * linux-low.h (struct linux_target_ops): Add breakpoint
15855 handling members.
15856 * server.c (attach_inferior): Remove extra add_inferior
15857 call.
15858 * server.h: Include mem-break.h. Update inferior.c
15859 prototypes.
15860 * target.c (read_inferior_memory)
15861 (write_inferior_memory): New functions.
15862 * target.h (read_inferior_memory)
15863 (write_inferior_memory): Change macros to prototypes.
15864 (struct target_ops): Update comments. Add const to write_memory
15865 definition.
15866
158672002-04-11 Daniel Jacobowitz <drow@mvista.com>
15868
15869 * linux-low.c (usr_store_inferior_registers): Support
15870 registers which are allowed to fail to store.
15871 * linux-low.h (linux_target_ops): Likewise.
15872 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15873 (ppc_cannot_store_register): FPSCR may not be storable.
15874
158752002-04-09 Daniel Jacobowitz <drow@mvista.com>
15876
15877 * server.h: Include <string.h> if HAVE_STRING_H.
15878 * ChangeLog: Correct paths in last ChangeLog entry.
15879
158802002-04-09 Daniel Jacobowitz <drow@mvista.com>
15881
15882 * linux-low.h: Remove obsolete prototypes.
15883 (struct linux_target_ops): New.
15884 (extern the_low_target): New.
15885 * linux-low.c (num_regs, regmap): Remove declarations.
15886 (register_addr): Use the_low_target explicitly.
15887 (fetch_register): Likewise.
15888 (usr_fetch_inferior_registers): Likewise.
15889 (usr_store_inferior_registers): Likewise.
15890 * linux-arm-low.c (num_regs): Remove.
15891 (arm_num_regs): Define.
15892 (arm_regmap): Renamed from regmap, made static.
15893 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15894 made static.
15895 (arm_cannot_store_register): Renamed from cannot_store_register,
15896 made static.
15897 (the_low_target): New.
15898 * linux-i386-low.c (num_regs): Remove.
15899 (i386_num_regs): Define.
15900 (i386_regmap): Renamed from regmap, made static.
15901 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15902 made static.
15903 (i386_cannot_store_register): Renamed from cannot_store_register,
15904 made static.
15905 (the_low_target): New.
15906 * linux-ia64-low.c (num_regs): Remove.
15907 (ia64_num_regs): Define.
15908 (ia64_regmap): Renamed from regmap, made static.
15909 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15910 made static.
15911 (ia64_cannot_store_register): Renamed from cannot_store_register,
15912 made static.
15913 (the_low_target): New.
15914 * linux-m68k-low.c (num_regs): Remove.
15915 (m68k_num_regs): Define.
15916 (m68k_regmap): Renamed from regmap, made static.
15917 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15918 made static.
15919 (m68k_cannot_store_register): Renamed from cannot_store_register,
15920 made static.
15921 (the_low_target): New.
15922 * linux-mips-low.c (num_regs): Remove.
15923 (mips_num_regs): Define.
15924 (mips_regmap): Renamed from regmap, made static.
15925 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15926 made static.
15927 (mips_cannot_store_register): Renamed from cannot_store_register,
15928 made static.
15929 (the_low_target): New.
15930 * linux-ppc-low.c (num_regs): Remove.
15931 (ppc_num_regs): Define.
15932 (ppc_regmap): Renamed from regmap, made static.
15933 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15934 made static.
15935 (ppc_cannot_store_register): Renamed from cannot_store_register,
15936 made static.
15937 (the_low_target): New.
15938 * linux-s390-low.c (num_regs): Remove.
15939 (s390_num_regs): Define.
15940 (s390_regmap): Renamed from regmap, made static.
15941 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15942 made static.
15943 (s390_cannot_store_register): Renamed from cannot_store_register,
15944 made static.
15945 (the_low_target): New.
15946 * linux-sh-low.c (num_regs): Remove.
15947 (sh_num_regs): Define.
15948 (sh_regmap): Renamed from regmap, made static.
15949 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15950 made static.
15951 (sh_cannot_store_register): Renamed from cannot_store_register,
15952 made static.
15953 (the_low_target): New.
15954 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15955 (the_low_target): New.
15956
159572002-04-09 Daniel Jacobowitz <drow@mvista.com>
15958
15959 * Makefile.in: Add stamp-h target.
15960 * configure.in: Create stamp-h.
15961 * configure: Regenerated.
15962
159632002-04-09 Daniel Jacobowitz <drow@mvista.com>
15964
15965 * inferiors.c: New file.
15966 * target.c: New file.
15967 * target.h: New file.
15968 * Makefile.in: Add target.o and inferiors.o. Update
15969 dependencies.
15970 * linux-low.c (inferior_pid): New static variable,
15971 moved from server.c.
15972 (linux_create_inferior): Renamed from create_inferior.
15973 Call add_inferior. Return 0 on success instead of a PID.
15974 (linux_attach): Renamed from myattach.
15975 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15976 (linux_thread_alive): Renamed from mythread_alive.
15977 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15978 child dies.
15979 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15980 (regsets_store_inferior_registers): Correct error message.
15981 Add missing ``return 0''.
15982 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15983 (linux_store_registers): Renamed from store_inferior_registers.
15984 (linux_read_memory): Renamed from read_inferior_memory.
15985 (linux_write_memory): Renamed from write_inferior_memory.
15986 (linux_target_ops): New structure.
15987 (initialize_low): Call set_target_ops ().
15988 * remote-utils.c (unhexify): New function.
15989 (hexify): New function.
15990 (input_interrupt): Send signals to ``signal_pid''.
15991 * server.c (inferior_pid): Remove.
15992 (start_inferior): Update create_inferior call.
15993 (attach_inferior): Call add_inferior.
15994 (handle_query): New function.
15995 (main): Call handle_query for `q' packets.
15996 * server.h: Include "target.h". Remove obsolete prototypes.
15997 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15998
159992002-04-09 Daniel Jacobowitz <drow@mvista.com>
16000
16001 * Makefile.in: Add WARN_CFLAGS. Update configury
16002 dependencies.
16003 * configure.in: Check for <string.h>
16004 * configure: Regenerate.
16005 * config.in: Regenerate.
16006 * gdbreplay.c: Include needed system headers.
16007 (remote_open): Remove strchr prototype.
16008 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16009 * regcache.c (supply_register): Change buf argument to const void *.
16010 (supply_register_by_name): Likewise.
16011 (collect_register): Change buf argument to void *.
16012 (collect_register_by_name): Likewise.
16013 * regcache.h: Add missing prototypes.
16014 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16015 * server.c (handle_query): New function.
16016 (attached): New static variable, moved out of main.
16017 (main): Quiet longjmp clobber warnings.
16018 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16019 * utils.c (error): Remove NORETURN.
16020 (fatal): Likewise.
This page took 0.079075 seconds and 4 git commands to generate.